Go testsuite patch committed: Don't quote quoted parentheses

2020-12-07 Thread Ian Lance Taylor via Gcc-patches
This patch fixes go-test.exp to not backslash quote parentheses that are already backslash quoted. This regexp quoting isn't fully general, it just has to handle the cases that arise in the testsuite. This change fixes a case in a new test, not yet committed. (It would be nice to have a general

Go patch committed: Don't name type descriptor for alias type

2020-12-07 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend avoids using an alias type name when naming a type descriptor. The test case for this https://golang.org/cl/275632. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 47cf6054ce8d11aa681846d08433afdb4404abe7 diff --git

Re: Merge from trunk to gccgo branch

2020-12-04 Thread Ian Lance Taylor via Gcc-patches
I've now merged trunk revision 918a5b84a2c51dc9d011d39461cc276e6558069d to the gccgo branch. Ian

libgo patch committed: Update type descriptor name in fieldtrack C code

2020-12-04 Thread Ian Lance Taylor via Gcc-patches
This libgo patch updates the type descriptor name in the fieldtrack C support code. We were using the old name, but nothing noticed because it is a weak reference that is permitted to be nil, so that it works with code that does not use the field tracking library. Bootstrapped and ran Go

Merge from trunk to gccgo branch

2020-12-03 Thread Ian Lance Taylor via Gcc-patches
I merged trunk revision 3089f5feef36810c625b5813370a97b4ecc841f8 to the gccgo branch. Ian

Re: Go testsuite patch committed: Add a bunch of new tests

2020-12-03 Thread Ian Lance Taylor via Gcc-patches
On Thu, Dec 3, 2020 at 11:15 AM Ian Lance Taylor wrote: > > This patch to the Go testsuite adds a bunch of new tests from the > source repo. These are mostly tests that were added specifically to > test gccgo. There are still other tests in the source repo that are > not reflected in the gccgo

Go testsuite patch committed: Add a bunch of new tests

2020-12-03 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go testsuite adds a bunch of new tests from the source repo. These are mostly tests that were added specifically to test gccgo. There are still other tests in the source repo that are not reflected in the gccgo copy. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.

Go testsuite patch committed: Add -I. when compiling in directory

2020-12-03 Thread Ian Lance Taylor via Gcc-patches
This Go testsuite patch adds a -I. argument when compiling sources in a directory. This tells the compiler to import packages in the current directory first, which is what we want in the testsuite. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian *

Go testsuite: update existing tests to source repo

2020-12-03 Thread Ian Lance Taylor via Gcc-patches
I've committed a patch to update the existing Go tests, the ones under go.test, to the versions in the source repo at https://go.googlesource.com/. This does not include any of the new tests, just updates the ones we already have and removes the ones that no longer exist in the source. The

Go patch committed: Convert comparison function result to expected bool type

2020-12-03 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend converts the result type of calling a comparison function to the expected bool type. Otherwise cases like type mybool bool var b mybool = [10]string{} == [10]string{} get an incorrect type checking error. Bootstrapped and ran Go testsuite on

Go patch committed: Defer to middle-end for complex division

2020-12-03 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend and libgo defers to the middle-end for complex division. Go used to use slightly different semantics than C99 for complex division, so we used runtime routines to handle the difference. The gc compiler has changed its behavior to match C99, so change ours as well.

libbacktrace patch committed: permit values at end of buffer

2020-12-02 Thread Ian Lance Taylor via Gcc-patches
A couple of buffer overflow checks in libbacktrace incorrectly used >= when comparing the end of the value with the end of the buffer. It is of course OK if the value ends at the very end of the buffer. This patch corrects those cases to use > instead. Bootstrapped and ran libbacktrace and Go

Re: Go patch committed: Don't advance past unexpected semicolon

2020-12-02 Thread Ian Lance Taylor via Gcc-patches
On Wed, Dec 2, 2020 at 7:47 AM Ian Lance Taylor wrote: > > This Go frontend patch changes the parser to not advance past an > unexpected semicolon, after it gives an error. We've already read the > unexpected semicolon, so advancing again causes us to skip the next > token, causing future errors

Go patch committed: Reword "declared and not used" error message

2020-12-02 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend rewords the "declared and not used" error message. This is a copy of https://golang.org/cl/203282 in the gc compiler. >From the CL 203282 description: "declared and not used" is technically correct, but might confuse the user. Switching "and" to "but" will

Go patch committed: Better mixed named/unnamed parameter error

2020-12-02 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend improves the error message reported for mixed named and unnamed parameters. This requires updating a test in the testsuite to the current version in the source repo. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

Re: [PATCH] gcc: handle double quotes in symbol name during stabstrings generation

2020-12-02 Thread Ian Lance Taylor via Gcc-patches
On Wed, Dec 2, 2020 at 4:24 AM CHIGOT, CLEMENT wrote: > > Since the new gccgo mangling scheme, libgo compilation is broken on AIX (or > in Linux with -gstabs) because of a type symbol having a " in its name. I've > made a patch (see attachment) in order to fix stabstring generation, because, >

Go patch committed: Don't advance past unexpected semicolon

2020-12-02 Thread Ian Lance Taylor via Gcc-patches
This Go frontend patch changes the parser to not advance past an unexpected semicolon, after it gives an error. We've already read the unexpected semicolon, so advancing again causes us to skip the next token, causing future errors to be out of sync. Bootstrapped and ran Go testsuite on

Go testsuite patch committed: Permit */ at end of ERROR line

2020-12-01 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go testsuite driver go-test.exp permits a */ at the end of a ERROR line. This will be used for a test that has no final newline. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian * go.test/go-test.exp (errchk): Permit trailing */ on ERROR

libgo patch committed: Don't define CacheLinePadSize for mips64x

2020-11-30 Thread Ian Lance Taylor via Gcc-patches
This libgo patch changes the internal/cpu package to not define CacheLinePadSize for mips64x. For libgo the definition always comes from the generated file cpugen.go. This fixes GCC PR 98041. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

Go patch committed: Check len and cap for append(s, make(T, I)...)

2020-11-30 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend and runtime checks both len and cap when handling the case of append(s, make(T, I)...). The overflow checks done in growslice always reported an error for the capacity argument, even if it was the length argument that overflowed. This change lets the code pass the

libgo patch committed: Define SO_RCVTIMEO on 32-bit GNU/Linux

2020-11-30 Thread Ian Lance Taylor via Gcc-patches
This libgo patch defines SO_RCVTIMEO on 32-bit GNU/Linux. It was not being defined before because it is defined as a conditional expression that is too complicated for -fdump-go-spec to handle. This fixes https://golang.org/issue/42872. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.

Go patch committed: Improve error messages for expected curly brace

2020-11-30 Thread Ian Lance Taylor via Gcc-patches
This Go frontend patch improves the error messages for an expected curly brace. This is for https://golang.org/issue/17328. This requires updating some tests to the current sources in the main repo. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

Go patch committed: Use correct assignment order for type assertions

2020-11-30 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend uses the use correct assignment order for type assertions. For "a, b := v.(T)" we must set a before b. This is for https://golang.org/issue/13433. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

Go patch committed: Always use int context for index values

2020-11-30 Thread Ian Lance Taylor via Gcc-patches
This patch changes the Go frontend to always use a context that expects an int type when determining the type of an index value. This is for https://golang.org/issue/14844. This requires updating one of the tests in the testsuite to the source version. Bootstrapped and ran Go testsuite on

Go patch committed: Better error messages for missing interface method

2020-11-30 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend generates better error messages for a missing interface method. This is for https://golang.org/issue/10700. This requires updating one test to the one in the source repo. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

Go patch committed: Improve error for import of non-string

2020-11-30 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend improves the error message when using an import statement with something other than a string. This requires updating one of the tests to the current version in the main repo. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

Go patch committed: Avoid follow-on errors for bad types

2020-11-28 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend marks bad types are erroneous, to avoid generating further errors. This required some code using array types to check for errors. This is for https://golang.org/issue/19880. This requires updating one of the tests in the testsuite. Bootstrapped and ran Go testsuite

Go patch committed: Better error for x, x := 1, 2

2020-11-28 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend gives a better error message when the same variable is declared multiple times on the left hand side of a := statement. Was assign.go:59:28: error: multiple assignments to x Now assign.go:59:28: error: ‘x’ repeated on left side of := Bootstrapped and ran Go

Re: [PATCH 00/31] VAX: Bring the port up to date (yes, MODE_CC conversion is included)

2020-11-26 Thread Ian Lance Taylor via Gcc-patches
On Wed, Nov 25, 2020 at 10:36 AM Maciej W. Rozycki wrote: > > On Fri, 20 Nov 2020, Maciej W. Rozycki wrote: > > > These changes have been regression-tested throughout development with the > > `vax-netbsdelf' target running NetBSD 9.0, using said VAXstation 4000/60, > > which uses the Mariah

Go patch committed: Avoid silent integer truncation in compiler

2020-11-25 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend avoids silent integer truncation when compiling code like string(1 << 32). In the conversion of a constant integer to a string type, the value of the constant integer was being silently truncated from unsigned long to unsigned int, producing the wrong string value.

Re: Go patch committed: Change name mangling convention

2020-11-23 Thread Ian Lance Taylor via Gcc-patches
On Sun, Nov 22, 2020 at 11:00 AM Rainer Orth wrote: > > > This patch to the Go frontend and libgo changes the name mangling > > convention. The previous convention (which was actually the second > > one) turned out to be ambiguous when the path to a package contained a > > dot; this is a common

libgo patch committed: Update to Go 1.15.5 release

2020-11-20 Thread Ian Lance Taylor via Gcc-patches
This patch updates libgo to the Go 1.15.5 release. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 6c458bbaaa54755de5b25e5a844186893b2b8568 diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 9545a598738..37374d55853 100644 ---

Go patch committed: Change name mangling convention

2020-11-20 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend and libgo changes the name mangling convention. The previous convention (which was actually the second one) turned out to be ambiguous when the path to a package contained a dot; this is a common case, as many package paths are of the form "github.com/name/package".

libgo patch committed: Update gofrontend mangling checks

2020-11-17 Thread Ian Lance Taylor via Gcc-patches
This libgo patch updates the gofrontend mangling checks, in preparation for changing the mangling scheme again. This is a port of two patches in the master repository. https://golang.org/cl/259298 cmd/cgo: split gofrontend mangling checks into cmd/internal/pkgpath This is a step toward

Merge from trunk to gccgo branch

2020-11-10 Thread Ian Lance Taylor via Gcc-patches
I merged trunk revision cf392dbdf17e38026f8e3c0e9af7f5b87f63be56 to the gccgo branch. Ian

libgo patch committed: Update to Go 1.15.4 release

2020-11-10 Thread Ian Lance Taylor via Gcc-patches
This patch updates libgo to the 1.15.4 release. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 8815a8e97f8d0ee4066e737152c8198a80e9fe32 diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 149f20077e3..e62578fc781 100644 ---

Go patch committed: Turn off -fipa-icf-functions

2020-11-04 Thread Ian Lance Taylor via Gcc-patches
Go code expects to be able to do a reliable backtrace and get correct file/line information of callers. This is broken by -fipa-icf-functions, so this Go frontend patch disables that option by default. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian *

libgo patch committed: Support NetBSD versioned symbols

2020-10-28 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Nikhil Benesch adds support for NetBSD versioned symbols. On NetBSD, for backwards compatibility, various libc symbols are renamed to a symbol with a version suffix. For example, this is the (abbreviated) definition of sigaction: int sigaction(...) __asm__

Re: [PATCH] Support the new ("v0") mangling scheme in rust-demangle.

2020-10-28 Thread Ian Lance Taylor via Gcc-patches
On Wed, Oct 28, 2020 at 3:22 PM Nikhil Benesch via Gcc-patches wrote: > > I think it is mostly a matter of snagging some of Ian's limited time. > I suspect it is still worthwhile to try to get the original patch > reviewed and merged, because then any follow-up changes for const > generics

Re: libgo patch committed: Additional BSD-specific syscall wrappers

2020-10-28 Thread Ian Lance Taylor via Gcc-patches
On Wed, Oct 28, 2020 at 2:53 AM Rainer Orth wrote: > > > This libgo patch by Nikhil Benesch imports additional code from > > upstream for handing system calls on BSD systems. This makes the > > syscall package on NetBSD complete enough to compile the standard > > library. Boostrapped and ran Go

libgo patch committed: Update to Go 1.15.3 release

2020-10-27 Thread Ian Lance Taylor via Gcc-patches
This patch updates libgo to the Go 1.15.3 release. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian c1ddc4818479413a967694cf6b5e322c0549890f diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 7d065954502..1f65809fc81 100644 ---

Go patch committed: Export notinheap annotation

2020-10-27 Thread Ian Lance Taylor via Gcc-patches
This Go frontend patch adds the notinheap annotation to the export data. This is the Go frontend version of https://golang.org/cl/259297. This is required now because that change is in the 1.15.3 release. This requires changing the go/internal/gccgoimporter package, to skip the new annotation.

Go patch committed: Remove unused Type::in_heap_ member variable

2020-10-27 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend removes the unused Type::in_heap_ member variable. This member variable was added in https://golang.org/cl/46490, but it was never used. The code uses Named_type::in_heap_ instead. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline.

libgo patch committed: Additional BSD-specific syscall wrappers

2020-10-26 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Nikhil Benesch imports additional code from upstream for handing system calls on BSD systems. This makes the syscall package on NetBSD complete enough to compile the standard library. Boostrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

libgo patch committed: Merge upstream net/http/cgi changes

2020-10-23 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Nikhil Benesch updates the net/http/cgi package to incorporate upstream modifications to the cgi package's set of rules about which environment variables should be inherited by child processes by default on each platform. In particular this permits tests to pass on NetBSD by

libgo patch committed: Only compile ptrace shim on GNU/Linux

2020-10-21 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Nikhil Benesch only compiles the ptrace varargs shim on GNU/Linux, to avoid compilation failures on some other platforms. The C ptrace function is not entirely portable (e.g., NetBSD has `int data` instead of `void* data`), and so far Linux is the only platform that needs the

libgo patch committed: Update BSD socket code

2020-10-21 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Nikhil Benesch imports the upstream code for BSD sockets and sysctls into the syscall package. This code is sufficiently different that it doesn't get merged by the scripts. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

libgo patch committed: Adjust NetBSD-specific types

2020-10-20 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Nikhil Benesch adjusts some of the syscall types and names to maintain backward compatibility on NetBSD. Specifically, the RTM_RESOLVE constant must be added if it is missing, and the stat_t struct must use the suffix "timespec" rather than "tim" for its time-related fields.

libbacktrace patch committed: Use __attribute__((__fallthrough__))

2020-10-20 Thread Ian Lance Taylor via Gcc-patches
This libbacktrace patch uses __attribute__((__fallthrough__)) rather than relying on a /*fallthrough*/ comment. Bootstrapped and ran libbacktrace tests on x86_64-pc-linux-gnu. Committed to mainline. Ian * internal.h (ATTRIBUTE_FALLTHROUGH): Define. * elf.c (elf_zlib_inflate): Use

libgo patch committed: Remove sendfile on NetBSD

2020-10-20 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Nikhil Benesch removes sendfile from the syscall package on NetBSD, as NetBSD doesn't have the sendfile system call. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 76a9f0acd248bba801e6208d11a96db5b7f940dc diff --git

Go patch committed: Don't export function type parameter names

2020-10-15 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend stops exporting function type parameter names. When hashing a function type the parameter names are ignored. Therefore, we should not write them into the export data. Otherwise, minor changes in the order in which we process the types can cause the export data to

libgo patch committed: Correct types in __go_ptrace shim

2020-10-15 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Nikhil Benesch uses the correct types in the __go_ptrace shim. This makes them match the types declared in Go and the types declared by the C ptrace function, i.e., void*. This avoids a warning about an implicit int-to-pointer cast on some platforms. Bootstrapped and ran Go

libgo patch committed: Fix path to x/net/route package in Makefile

2020-10-15 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Nikhil Benesch corrects a Makefile typo in the path to the x/net/route package. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 6949fbefe28134744a86c5d7b8d9c17fcf3a16a0 diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index

Go patch committed: Export type for string/bool constants

2020-10-15 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend includes the type in the export data when an inlinable function refers to a string or bool constant. The patch consolidates the identical code for constant type export into a pair of static methods. This fixes https://golang.org/issue/35739. Bootstrapped and ran Go

libgo patch committed: Print reason code if throw fails

2020-10-14 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Nikhil Benesch prints the reason code if throwing an unwind exception fails. Calls to _Unwind_RaiseException and friends *can* return due to bugs in libgo or memory corruption. When this occurs, print a message to stderr with the reason code before aborting to aid debugging.

libgo patch committed: Export NetBSD specific types in mksysinfo.sh

2020-10-14 Thread Ian Lance Taylor via Gcc-patches
The libgo syscall package depends on many NetBSD-specific types on NetBSD. This libgo patch by Nikhil Benesch teaches mksysinfo.sh to export these types. This alone is not sufficient to get the syscall package to compile on NetBSD, but it's a start. Bootstrapped and ran Go testsuite on

libgo patch committed: correct semaphore implementation on NetBSD

2020-10-14 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Nikhil Benesch corrects the semaphore implementation on NetBSD. NetBSD's semaphores use the underlying lighweight process mechanism (LWP) on NetBSD, rather than pthreads. This means the m.prodcid needs to be set to the LWP ID rather than the pthread ID in order for unpark

libgo patch committed: Set signal PC on NetBSD

2020-10-13 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Nikhil Benesch sets the signal PC field on NetBSD. The NetBSD libc provides an architecture-independent macro that can extract the PC from a ucontext struct. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

libgo patch committed: Fix NUL terminator check in socket length

2020-10-13 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Nikhil Benesch backports a fix for *BSD unix sockets from the master sources. *BSD does not include the null terminator when in its reported socketlength. Port the upstream bugfix for the issue (https://golang.org/issue/6627). This was likely missed during the usual upstream

libgo patch committed: Ensure uniqueness of type descriptors on AIX

2020-10-13 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Clément Chigot ensures the uniqueness of type descriptors on AIX. On AIX, duplication of type descriptors can occur if one is declared in the shared libgo and one in the Go program being compiled. The AIX linker isn't able to merge them together as GNU/Linux one does. One

Merge from master to gccgo branch

2020-10-12 Thread Ian Lance Taylor via Gcc-patches
I merged master revision 3175d40fc52fb8eb3c3b18cc343d773da24434fb to the gccgo branch. Ian

libgo patch committed: Stop using -fno-section-anchors on AIX

2020-10-07 Thread Ian Lance Taylor via Gcc-patches
This patch by Clément Chigot changes the libgo configure script to stop using -fno-section-anchors on AIX. This option is no longer needed. There is no crash without it since at least gcc-9. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

libgo patch committed: Handle go1.10+ correctly in match.sh

2020-10-07 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Nikhil Benesch handles go1.10+ correctly in match.sh. The same issue will arise with Go 1.100, but that is a long ways off. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 33137fb1974e4b4aa5c82fbcecc2d9e2d854c394 diff --git

Go patch committed: Avoid undefined behavior in Import::read

2020-10-06 Thread Ian Lance Taylor via Gcc-patches
This Go frontend patch by Nikhil Benesch avoids undefined behavior in Import::read. For some implementations of Stream, advancing the stream will invalidate the previously-returned peek buffer. Copy the peek buffer before advancing in Import::read to avoid this undefined behavior. Bootstrapped

Re: [PATCH] lto: fix LTO debug sections copying.

2020-10-06 Thread Ian Lance Taylor via Gcc-patches
On Tue, Oct 6, 2020 at 3:20 AM Martin Liška wrote: > > On 10/6/20 10:00 AM, Richard Biener wrote: > > On Tue, Oct 6, 2020 at 9:01 AM Martin Liška wrote: > >> > >> On 10/5/20 6:34 PM, Ian Lance Taylor wrote: > >>> On Mon, Oct 5, 2020 at 9:09 AM Martin Liška wrote: > > The previous

Go patch committed: correct file reading logic in Stream_from_file

2020-10-05 Thread Ian Lance Taylor via Gcc-patches
This Go frontend patch by Nikhil Benesch fixes the file reading logic in the Stream_from_file class. That class is almost never used, and I guess nobody noticed these problems. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

Re: [PATCH] lto: fix LTO debug sections copying.

2020-10-05 Thread Ian Lance Taylor via Gcc-patches
On Mon, Oct 5, 2020 at 9:09 AM Martin Liška wrote: > > The previous patch was not correct. This one should be. > > Ready for master? I don't understand why this code uses symtab_indices_shndx at all. There should only be one SHT_SYMTAB_SHNDX section. There shouldn't be any need for the

Go patch committed: Set varargs correctly for type of method expression

2020-10-01 Thread Ian Lance Taylor via Gcc-patches
This Go frontend patch set varargs correctly for the type of method expression. This fixes https://golang.org/issue/41737. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline and GCC 10 branch. Ian 8e23cd3a2d23ad851938bf7015fc97539d65a8c6 diff --git

libgo patch committed: Add 32-bit RISC-V support

2020-09-30 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Maciej W. Rozycki adds 32-bit RISC-V support. Bootstrapped and ran Go tests on x86_64-pc-linux-gnu. Committed to mainline. Ian a119b20263517656379c4833a3341031a6d58dc4 diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 314ffd2efab..8d9fda54619 100644 ---

Re: [PATCH] New patch for the port of gccgo to GNU/Hurd

2020-09-28 Thread Ian Lance Taylor via Gcc-patches
On Fri, Sep 25, 2020 at 8:04 AM Svante Signell wrote: > > Latest Debian snapshot of gcc (20200917-1) FTBFS due to a missing hurd > entry in the // +build line of libgo/go/net/fd_posix.go. Attached is a > patch for that missing entry. Thanks. Committed to mainline. Ian

libbacktrace patch committed: Create mtest.dsym

2020-09-28 Thread Ian Lance Taylor via Gcc-patches
This libbacktrace patch creates mtest.dsym when using dsymutil. This is for PR 97082, but it probably doesn't fix the PR. Bootstrapped and ran libbacktrace tests on x86_64-pc-linux-gnu. Committed to mainline. Ian PR libbacktrace/97082 * Makefile.am (check_DATA): Add mtest.dSYM if

libbacktrace patch committed: Only use dsymutil with Mach-O

2020-09-28 Thread Ian Lance Taylor via Gcc-patches
This patch changes the libbacktrace tests to only run dsymutil when building for Mach-O. This should fix GCC PR 97227. Bootstrapped and ran libbacktrace tests on x86_64-pc-linux-gnu. Committed to mainline. Ian PR libbacktrace/97227 * configure.ac (USE_DSYMUTIL): Define instead of

libgo patch committed: Don't build __go_ptrace on AIX

2020-09-24 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Clément Chigot removes __go_ptrace on AIX. AIX ptrace syscalls doesn't have the same semantic than the glibc one. The syscall package is already handling it correctly so disable the new __go_ptrace C function for AIX. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.

libgo patch committed: Update to Go1.15.2 release

2020-09-23 Thread Ian Lance Taylor via Gcc-patches
This patch updates libgo to the Go1.15.2 release. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 928fa8ccc0e1ef8f3861a28b5ad2d2d220f7219d diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 5d26b7e2da1..f51dac55365 100644 ---

libgo patch committed: Fix syscall tests that call Ioctl on AIX

2020-09-22 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Clément Chigot fixes the syscall package tests that call Ioctl on AIX, by calling raw_ioctl_ptr rather than syscall. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian e884ced05231a04b1a3c70ece7237d0b1eeebf19 diff --git

libgo patch committed: Remove ptrace for ppc64 AIX

2020-09-22 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Clément Chigot removes the ptrace syscall on ppc64 AIX. ptrace is available only for 32 bits programs. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian bbc644a3e0d9da37d0987918be5764d17a6069c4 diff --git a/gcc/go/gofrontend/MERGE

libgo patch committed: Fix build errors on AIX

2020-09-22 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Clément Chigot fixes build errors on AIX. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 63cd53d2f5da07856340bbea11ee09ab1125e8c0 diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index a8ba5a35e44..d17d39702c8 100644 ---

Re: libbacktrace patch committed: Avoid ambiguous binary search

2020-09-22 Thread Ian Lance Taylor via Gcc-patches
On Tue, Sep 8, 2020 at 6:22 PM Ian Lance Taylor wrote: > > This patch to libbacktrace avoids ambiguous binary searches. > Searching for a range match can cause the search order to not match > the sort order, which can cause libbacktrace to miss matching entries. > This patch allocates an extra

Re: Go patch committed: Finalize methods for type aliases of struct types

2020-09-22 Thread Ian Lance Taylor via Gcc-patches
On Mon, Sep 21, 2020 at 3:54 PM Ian Lance Taylor wrote: > > This patch to the Go frontend finalizes methods for type aliases of > struct types. Previously we would finalize the methods of the alias > type itself, but since its a type alias we really need to finalize the > methods of the aliased

Go patch committed: Use runtime.eqtype for type switches on AIX

2020-09-22 Thread Ian Lance Taylor via Gcc-patches
This patch by Clément Chigot changes the Go frontend to call runtime.eqtype for non-interface type switches on AIX. All type switch clauses must call runtime.eqtype if the linker isn't able to merge type descriptors pointers. Previously, only interface-type clauses were doing it. This is for

Go patch committed: Finalize methods for type aliases of struct types

2020-09-21 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend finalizes methods for type aliases of struct types. Previously we would finalize the methods of the alias type itself, but since its a type alias we really need to finalize the methods of the aliased type. This patch also handles method expressions of unnamed struct

libgo patch committed: Recognize aixbigafMagic archives

2020-09-21 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Clément Chigot recognizes aixbigafMagic archives. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 1b785ecdc817ee14417beb1fd7389622fd8d035f diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index f79a1f04201..d8db888e4b6 100644

libgo patch committed: Don't put golang.org packages in zstdpkglist.go

2020-09-21 Thread Ian Lance Taylor via Gcc-patches
This patch to libgo avoids putting golang.org packages in zstdpkglist.go. This ensures that internal/goroot.IsStandardPackage does not treat golang.org packages as being in the standard library. This fixes https://golang.org/issue/41499. Committed to mainline and GCC 10 branch. Ian

Re: libsanitizer patch committed: Update for libbacktrace changes

2020-09-21 Thread Ian Lance Taylor via Gcc-patches
On Mon, Sep 21, 2020 at 12:04 PM Ian Lance Taylor wrote: > > Recent changes to libbacktrace have introduced a few more globally > symbols. These then need to be renamed in the libsanitizer copy. > This patch does that. Tested by configuring > --with-build-config=bootstrap-asan and running a

libsanitizer patch committed: Update for libbacktrace changes

2020-09-21 Thread Ian Lance Taylor via Gcc-patches
Recent changes to libbacktrace have introduced a few more globally symbols. These then need to be renamed in the libsanitizer copy. This patch does that. Tested by configuring --with-build-config=bootstrap-asan and running a bootstrap. Committed to mainline as obvious. Ian *

libgo patch committed: glibc ptrace is a varargs function

2020-09-17 Thread Ian Lance Taylor via Gcc-patches
This patch by Paul Murphy fixes calls from libgo to ptrace. In glibc, ptrace is actually declared as a variadic function. On ppc64le the ABI requires to the caller to allocate space for the parameters and allows the caller to modify them. On ppc64le, depending on how and what version of GCC is

Re: libbacktrace: Add support for MiniDebugInfo

2020-09-16 Thread Ian Lance Taylor via Gcc-patches
On Wed, Sep 16, 2020 at 8:54 AM Alex Coplan wrote: > > On 16/09/2020 07:26, Ian Lance Taylor wrote: > > On Wed, Sep 16, 2020, 4:03 AM Alex Coplan wrote: > > > > > Hi Ian, > > > > > > On 14/09/2020 14:12, Ian Lance Taylor via Gcc-patches wrote: &g

Re: libbacktrace: Add support for MiniDebugInfo

2020-09-16 Thread Ian Lance Taylor via Gcc-patches
On Wed, Sep 16, 2020, 4:03 AM Alex Coplan wrote: > Hi Ian, > > On 14/09/2020 14:12, Ian Lance Taylor via Gcc-patches wrote: > > This patch to libbacktrace adds support for MiniDebugInfo, as > > requested in PR 93608. > > This appears to introduce a failure in

libgo: add additional references in sysinfo.c

2020-09-15 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Than McIntosh adds a few more explicit references to enumeration constants (RUSAGE_SELF, DT_UNKNOWN) in sysinfo.c to insure that their hosting enums are emitted into DWARF, when using a clang host compiler during the gollvm build. Bootstrapped and ran Go testsuite on

libbacktrace: Add support for MiniDebugInfo

2020-09-14 Thread Ian Lance Taylor via Gcc-patches
This patch to libbacktrace adds support for MiniDebugInfo, as requested in PR 93608. MiniDebugInfo stores compressed symbol tables for an executable, where the executable is otherwise stripped. It is documented at https://fedoraproject.org/wiki/Features/MiniDebugInfo and

libbacktrace patch committed: Don't strip underscore on 64-bit PE

2020-09-08 Thread Ian Lance Taylor via Gcc-patches
This patch to libbacktrace avoids stripping a leading underscore from symbol names on 64-bit PE COFF. Bootstrapped and ran Go tests on x86_64-pc-linux-gnu. Committed to mainline. Ian * pecoff.c (coff_initialize_syminfo): Add is_64 parameter. (coff_add): Determine and pass is_64. diff --git

libbacktrace patch committed: Get executable name on macOS

2020-09-08 Thread Ian Lance Taylor via Gcc-patches
This patch to libbacktrace gets the executable name on macOS using _NSGetExecutablePath. This is another aspect of PR 96973. Tested basic functionality on macOS. Bootstrapped and ran libbacktrace tests on x86_64-pc-linux-gnu. Committed to mainline. Ian * fileline.c

libbacktrace patch committed: Avoid ambiguous binary search

2020-09-08 Thread Ian Lance Taylor via Gcc-patches
This patch to libbacktrace avoids ambiguous binary searches. Searching for a range match can cause the search order to not match the sort order, which can cause libbacktrace to miss matching entries. This patch allocates an extra entry at the end of function_addrs and unit_addrs vectors, so that

libbacktrace patch committed: Correct tipo in comment

2020-09-08 Thread Ian Lance Taylor via Gcc-patches
This patch suggested by Ondřej Čertík fixes a typpo in a comment. Bootstrapped and ran libbacktrace tests on x86_64-pc-linux-gnu. Committed to mainline. Ian * simple.c (simple_unwind): Correct comment spelling. diff --git a/libbacktrace/simple.c b/libbacktrace/simple.c index

libbacktrace patch committed: Correct Mach-O memory allocation

2020-09-08 Thread Ian Lance Taylor via Gcc-patches
This libbacktrace patch corrects the amount of memory allocated when looking for the Mach-O dsym file. We weren't allocating space for the backslash. Thanks to Alex Crichton for noticing this. This also fixes the amount of space released when freeing diralc in the same function. Thanks to

libbacktrace patch committed: Correctly swap Mach-O fat 32-bit file offset

2020-09-08 Thread Ian Lance Taylor via Gcc-patches
This libbacktrace patch correctly swaps the 32-bit file offset in a Mach-O fat file. This is based on a patch by Francois-Xavier Coudert , who analyzed the problem. This is for PR 96973. Bootstrapped and ran libbacktrace tests on x86_64-pc-linux-gnu. Committed to mainline. Ian PR

libbacktrace patch committed: Only match magic number at start of file

2020-09-08 Thread Ian Lance Taylor via Gcc-patches
This patch fixes the libbacktrace file type detection, which is run at configure time, to only look for a magic number at the very start of the file. Otherwise we can get confused if the bytes happen to appear elsewhere on the first "line". This is for PR 96971. Bootstrapped and ran

libgo patch committed: Remove middle dot from shell script

2020-08-27 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Maciej W. Rozycki removes a middle dot from the gotest shell script. There was a U+00B7 middle dot character, placed after "mips64p32le" in the target lists, which is now changed to a space. The U+00B7 character may not be considered whitespace by Bourne shell and any

libgo patch committed: Add -maix32 when calling GCC on 32-bit AIX

2020-08-26 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Clément Chigot adds -maix32 when running GCC on 32-bit AIX. As gcc might now be compiled in 64bit, -maix32 must always be added to ensure that created objects will be 32bit. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

libgo patch committed: Add FAT library support for AIX static libraries

2020-08-26 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Clément Chigot adds FAT library support for static libraries on AIX. Like shared libraries, AIX static libraries must also have both 32 and 64 bit objects. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

<    1   2   3   4   5   6   >