Go patch committed: Initialize variables with go:embed directives

2021-01-19 Thread Ian Lance Taylor via Gcc-patches
This Go frontend patch initializes variables with go:embed directives. This completes the compiler work for go:embed. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian eed40bca6f2eb3af0c811cf6ec9e123c5bf4907d diff --git a/gcc/go/gofrontend/MERGE

Go patch committed: Read embedcfg file, parse go:embed directives

2021-01-18 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend reads go:embed directives and attaches them to variables. It also reads the embedcfg file passed on the command line. We still don't actually do anything with the directives. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

libbacktrace patch committed: Don't fail tests if dwz fails

2021-01-18 Thread Ian Lance Taylor via Gcc-patches
On my system the current version of dwz fails on some DWARF 5 input. This is reportedly fixed by https://sourceware.org/pipermail/dwz/2021q1/000775.html, but in the meantime there is no reason for the libbacktrace testsuite to fail just because dwz fails. This patch changes the Makefile so that

libbacktrace patch committed: Use correct DWARF-5 filename index

2021-01-18 Thread Ian Lance Taylor via Gcc-patches
This libbacktrace patch uses the correct directory and filename index for DWARF 5. For DWARF 4 and before, the zero entry for the directory and filename information stored in the line program came from the compilation unit. Because of that, the old code used to handle zero specially, and

Re: [PATCH] libbacktrace: Fix up DWARF5 .debug_line handling [PR98716]

2021-01-18 Thread Ian Lance Taylor via Gcc-patches
On Mon, Jan 18, 2021 at 10:44 AM Jakub Jelinek via Gcc-patches wrote: > > When GCC (since the switch to -gdwarf-5 by default) is configured and built > against recent binutils (2.35.1 if slightly patched, or 2.36 or trunk), > the assembler emits DWARF5 .debug_line rather than DWARF4 or older >

Go patch committed: Add support for reading embedcfg files

2021-01-14 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend adds support for reading embedcfg files. An embedcfg file is a JSON file created by the go command when it sees a go:embed directive, and passed to the Go frontend via the new -fgo-embedcfg option. This code is not yet called, and does not yet do anything. It's

libgo patch committed: Update hurd support

2021-01-14 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Svante Signell updates the hurd support. This fixes GCC PR 98496. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian ab5bf5f728be354427a5b06784f34011fea555bc diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index

libgo patch committed: Ensure openat uses variadic wrapper

2021-01-12 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Paul Murphy ensures that openat always uses the variadic libc wrapper. On powerpc64le, not using the wrapper caused a failure in TestUnshareUidGidMapping due to stack corruption which resulted in a bogus execve syscall. This fixes GCC PR 98610. Bootstrapped and ran Go

Re: Patch RFA: Support non-ASCII file names in git-changelog

2021-01-07 Thread Ian Lance Taylor via Gcc-patches
On Wed, Jan 6, 2021 at 5:37 AM Martin Liška wrote: > > On 1/6/21 8:25 AM, Martin Liška wrote: > > Anyway, I've got a workaround that I'm going to push. > > It's fixed now. > > @Ian: Can you please try to push the changes now? It worked. Thanks. Ian b87ec922c4090fcacf802c73b6bfd59a8632f8a5 diff

libgo patch committed: Don't define sys_SETREUID and friends

2021-01-05 Thread Ian Lance Taylor via Gcc-patches
This libgo patch changes the syscall package to not define sys_SETREUID and some friends. We don't use them anyhow, sice we always call the C library functions which do the right thing. And they aren't defined on all GNU/Linux variants. This fixes GCC PR 98510. Bootstrapped and ran Go

Re: libgo patch committed: Update to Go1.16beta1 release

2021-01-05 Thread Ian Lance Taylor via Gcc-patches
On Sat, Jan 2, 2021 at 6:14 AM Matthias Klose wrote: > > On 1/2/21 12:11 AM, Ian Lance Taylor wrote: > > On Thu, Dec 31, 2020 at 7:40 AM Matthias Klose wrote: > >> > >> On 12/31/20 12:14 AM, Ian Lance Taylor via Gcc-patches wrote: > >>> I've committed a

Re: Go patch committed: Accept -fgo-embedcfg option

2021-01-05 Thread Ian Lance Taylor via Gcc-patches
On Tue, Jan 5, 2021 at 7:15 AM Jakub Jelinek via Gcc-patches wrote: > > On Tue, Jan 05, 2021 at 11:06:27AM +0100, Andreas Schwab wrote: > > FAIL: compiler driver --help=go option(s): "^ +-.*[^:.]$" absent from > > output: " -fgo-embedcfg=List embedded files via go:embed" > > Fixed

Go patch committed: Accept -fgo-embedcfg option

2021-01-04 Thread Ian Lance Taylor via Gcc-patches
This patch adds a new -fgo-embedcfg option. This will be used by the go command to implement the go:embed directive that is new in the upcoming Go 1.16 release. The option doesn't yet do anything, this is just framework. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to

Re: libgo patch committed: Update to Go1.16beta1 release

2021-01-01 Thread Ian Lance Taylor via Gcc-patches
As far as I know all the build problems introduced by the update to Go1.16beta1 are now fixed. Please let me know if I missed anything. Sorry for the difficulties, it's hard to test on so many systems. Ian On Fri, Jan 1, 2021 at 3:14 PM Ian Lance Taylor wrote: > > On Fri, Jan 1, 2021 a

Re: libgo patch committed: Update to Go1.16beta1 release

2021-01-01 Thread Ian Lance Taylor via Gcc-patches
On Fri, Jan 1, 2021 at 1:32 AM Andreas Schwab wrote: > > --- a/libgo/go/internal/cpu/cpu_gccgo.c > +++ b/libgo/go/internal/cpu/cpu_gccgo.c > @@ -200,3 +200,29 @@ struct queryResult kdsaQuery() { > } > > #endif /* defined(__s390x__) */ > + > +#ifdef __aarch64__ > + > +uint64_t getisar0(void) >

Re: libgo patch committed: Update to Go1.16beta1 release

2021-01-01 Thread Ian Lance Taylor via Gcc-patches
On Thu, Dec 31, 2020 at 11:48 AM Rainer Orth wrote: > > > I've committed a patch to update libgo to the Go 1.16beta1 release. > > > > This patch does not include support for the new //go:embed directive > > that will be available in Go 1.16.1 (https://golang.org/issue/41191) > > Support for that

Re: libgo patch committed: Update to Go1.16beta1 release

2021-01-01 Thread Ian Lance Taylor via Gcc-patches
On Thu, Dec 31, 2020 at 7:40 AM Matthias Klose wrote: > > On 12/31/20 12:14 AM, Ian Lance Taylor via Gcc-patches wrote: > > I've committed a patch to update libgo to the Go 1.16beta1 release. > > > > This patch does not include support for the new //go:embed directive &g

libgo patch committed: Update to Go1.16beta1 release

2020-12-30 Thread Ian Lance Taylor via Gcc-patches
I've committed a patch to update libgo to the Go 1.16beta1 release. This patch does not include support for the new //go:embed directive that will be available in Go 1.16.1 (https://golang.org/issue/41191) Support for that requires compiler changes, which will come later. As usual with these big

Go patch committed: Parenthesize channel type strings as needed

2020-12-23 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend avoids the ambiguity between "chan <- (chan int)" and "chan (<- chan int)". This parenthesizes the same way as the gc compiler. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian a40029e3b185a4b4e16a2a83933f742ff48c9743 diff --git

Go patch committed: Nil-checked pointers and indexes can trap

2020-12-23 Thread Ian Lance Taylor via Gcc-patches
The Go frontend was treating indirections through pointers that had been explicitly checked against nil and slice and string index expressions as non-trapping memory references. That is true for ordinary Go programs, but it isn't true if the programs construct their own memory addresses. In

Go patch committed: Remove references to slicecopy and slicestringcopy

2020-12-23 Thread Ian Lance Taylor via Gcc-patches
In the Go frontend, all calls to the runtime functions slicecopy and slicestringcopy were removed in https://golang.org/cl/170005. Remove the remaining mentions. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian b26699c53b257d3354a4cfd3fc9174104f116154 diff

Go patch committed: Initialize saw_send_stmt locals

2020-12-22 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend initializes a couple of saw_send_stmt local variables that were incorrectly left uninitialized. These are variables in the compiler source, not in the generated code. The C++ compiler wasn't warning because we take their address. This fixes

Go patch committed: Eliminate the scase.kind field

2020-12-22 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend and libgo eliminates the scase.kind field, saving some space on the stack when running a select statement. Instead of using a kind, the compiler now sorts all the send cases before the receive cases, and gives the default case a special index of -1. This is in

libgo patch committed: Add a success field to the sudog structure

2020-12-22 Thread Ian Lance Taylor via Gcc-patches
This libgo patch adds a success field to the sudog structure used to manage select statements. This is a step toward enabling some compiler changes as part of upgrading to the Go 1.16beta1 release. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

libgo patch committed: Omit nil-channel cases from selectgo order slices

2020-12-22 Thread Ian Lance Taylor via Gcc-patches
This patch to libgo omits the nil-channel cases from the order slices used in the selectgo function. This is a simplification for future work. This is being brought in here as part of updating to the Go 1.16beta1 release. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to

Go patch committed: Remove the scase.releasetime field

2020-12-22 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend and libgo removes the scase.releasetime field. This is a step toward updating libgo to the Go1.16beta1 release. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 9f5d0bc8ace6b8d386ed40fd8ff904251912be5c diff --git

godump patch committed: DECL_ORIGINAL_TYPE is sometimes NULL

2020-12-21 Thread Ian Lance Taylor via Gcc-patches
This patch to -fdump-go-spec code handles the case where DECL_ORIGINAL_TYPE of a decl is NULL. I saw this case while building on aarch64-unknown-linux-gnu for the type pthread_attr_t. I don't know whether this is supposed to be possible or not, but this patch does enable the build to continue

Go patch committed: Force MPFR exponent range to be large enough

2020-12-21 Thread Ian Lance Taylor via Gcc-patches
The Go frontend recently started checking whether an exponent was out of range when parsing a string into a floating point number. It turns out that in GCC the mpfr exponent range is target dependent, due to PR 88074. That breaks some Go programs that use large exponents in untyped constants on

Re: [PATCH] Correct -fdump-go-spec's handling of incomplete types

2020-12-20 Thread Ian Lance Taylor via Gcc-patches
On Thu, Dec 17, 2020 at 10:22 AM Nikhil Benesch wrote: > > On 12/17/20 1:05 PM, Ian Lance Taylor wrote: > > Thanks for looking into this. I've gotten confused now, though. > > Which patch fixes the problem on Solaris? Thanks. > > > > Ian > > The patch I subm

Go patch committed: Check for floating-point exponent overflow

2020-12-18 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend checks for floating-point exponent overflow. Previously we just ignored the error and carried on. This forces us to ignore some floating point constants in the mksysinfo and mkrsysinfo shell scripts, and forces us to update a couple of tests. Bootstrapped and ran Go

Re: Patch RFA: Support non-ASCII file names in git-changelog

2020-12-18 Thread Ian Lance Taylor via Gcc-patches
On Fri, Dec 18, 2020 at 2:28 AM Martin Liška wrote: > > On 12/17/20 5:26 AM, Ian Lance Taylor via Gcc-patches wrote: > > As discussed at > > https://gcc.gnu.org/pipermail/gcc-patches/2020-December/561995.html , > > the ChangeLog checker does not correctly handle files

Go testsuite patch committed: Handle +builds line correctly in testsuite

2020-12-17 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go testsuite driver changes it to handle +build lines correctly, which is to say, in the same way that they are handled by the upstream test driver. Update several tests from the upstream repo to use "gc" and "!gccgo" as appropriate so that tests continue to pass. This cleans

Re: [PATCH] Correct -fdump-go-spec's handling of incomplete types

2020-12-17 Thread Ian Lance Taylor via Gcc-patches
On Thu, Dec 17, 2020 at 8:31 AM Nikhil Benesch via Gcc-patches wrote: > > On 12/17/20 7:28 AM, Rainer Orth wrote: > > I first tried with the new version included, but that broke badly: > > > > cc1 -fpreprocessed sysinfo.i -quiet -O -std=gnu99 > > -fdump-go-spec=tmp-gen-sysinfo.go -o sysinfo.s >

Patch RFA: Support non-ASCII file names in git-changelog

2020-12-16 Thread Ian Lance Taylor via Gcc-patches
As discussed at https://gcc.gnu.org/pipermail/gcc-patches/2020-December/561995.html , the ChangeLog checker does not correctly handle files with non-ASCII file names. This patch fixes the problem. I have little experience with Python, so I may have made some foolish mistakes here. OK to commit?

Re: Change to gcc/testsuite/go.test/test rejected by ChangeLog checker

2020-12-16 Thread Ian Lance Taylor via Gcc-patches
On Wed, Dec 16, 2020 at 8:01 PM Ian Lance Taylor wrote: > > Thanks for the pointer to git-verify. It also fails. It looks like > when the file name contains a non-ASCII character, it comes back with > quotation marks around it. That causes the test "if > pat

Re: Change to gcc/testsuite/go.test/test rejected by ChangeLog checker

2020-12-16 Thread Ian Lance Taylor via Gcc-patches
On Wed, Dec 16, 2020 at 7:38 PM Kewen.Lin wrote: > > With the helper gcc-verify from contrib/gcc-git-customization.sh [1], > you can verify your local commit to meet required ChangeLog formats. > Does gcc-verify claim that it's ok locally? > > If no, probably you can amend the commit message with

Re: Go testsuite patch committed: Add some new tests

2020-12-16 Thread Ian Lance Taylor via Gcc-patches
And another set of new tests. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian patch.txt.bz2 Description: application/bzip

Re: Go testsuite patch committed: Add some new tests

2020-12-16 Thread Ian Lance Taylor via Gcc-patches
This patch adds some more new tests from the fixedbugs subdirectory of the source repo that currently pass with gccgo. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian patch.txt.bz2 Description: application/bzip

Re: Change to gcc/testsuite/go.test/test rejected by ChangeLog checker

2020-12-16 Thread Ian Lance Taylor via Gcc-patches
On Wed, Dec 16, 2020 at 6:54 PM Kewen.Lin wrote: > > on 2020/12/16 上午7:53, Ian Lance Taylor via Gcc-patches wrote: > > On Tue, Dec 15, 2020 at 3:51 PM Ian Lance Taylor wrote: > >> > >> On Tue, Dec 15, 2020 at 3:43 PM Ian Lance Taylor wrote: > >>> >

Go testsuite patch committed: Add some new tests

2020-12-16 Thread Ian Lance Taylor via Gcc-patches
This patch adds some new tests from the fixedbugs subdirectory of the source repo that currently pass with gccgo. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian e38c912700f001ea1c8a32533bedb4c802e38d3f diff --git

Re: Change to gcc/testsuite/go.test/test rejected by ChangeLog checker

2020-12-15 Thread Ian Lance Taylor via Gcc-patches
On Tue, Dec 15, 2020 at 3:51 PM Ian Lance Taylor wrote: > > On Tue, Dec 15, 2020 at 3:43 PM Ian Lance Taylor wrote: > > > > I'm trying to commit a change that adds a bunch of new files to > > gcc/testsuite/go.test/test. It's being rejected because the hook > >

Re: Change to gcc/testsuite/go.test/test rejected by ChangeLog checker

2020-12-15 Thread Ian Lance Taylor via Gcc-patches
On Tue, Dec 15, 2020 at 3:43 PM Ian Lance Taylor wrote: > > I'm trying to commit a change that adds a bunch of new files to > gcc/testsuite/go.test/test. It's being rejected because the hook > can't deduce a ChangeLog file. But this directory has no ChangeLog > files. I've

Change to gcc/testsuite/go.test/test rejected by ChangeLog checker

2020-12-15 Thread Ian Lance Taylor via Gcc-patches
I'm trying to commit a change that adds a bunch of new files to gcc/testsuite/go.test/test. It's being rejected because the hook can't deduce a ChangeLog file. But this directory has no ChangeLog files. I've committed other changes to this directory without a ChangeLog entry. What is going

Re: Go patch committed: Avoid knock-on errors from invalid interfaces

2020-12-15 Thread Ian Lance Taylor via Gcc-patches
On Tue, Dec 15, 2020 at 1:01 PM Ian Lance Taylor wrote: > > This patch to the Go frontend avoids knock-on errors from invalid > interfaces. The test case for this is issue11614.go in the source > repo. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. > Committed to main

Go patch committed: Correct grammar in error message

2020-12-15 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend corrects the grammar in an error message. Noticed while looking at https://golang.org/issue/43200. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 5aba02667113fbe43d74c37724f29868f098dd1c diff --git a/gcc/go/gofrontend/MERGE

Go patch committed: Avoid knock-on errors from invalid interfaces

2020-12-15 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend avoids knock-on errors from invalid interfaces. The test case for this is issue11614.go in the source repo. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 788d204885c187d5604e3960d7c78e1523f04861 diff --git

Go patch committed: Discard global sinks with static initializers

2020-12-15 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend discards global sink variables with static initializers. This is specifically for the test issue23781.go, which builds a large static array. The code does compile and work without this change, but it takes a long time and generates a large object file. Discarding

Go patch committed: Better error for unexpected digit

2020-12-15 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend generates a better error for an unexpected digit. A digit character is not invalid in general, but it's not permitted at the start of an identifier. Report a better error message. The test case is issue11359.go in the source repo. Bootstrapped and ran Go testsuite

Go testsuite patch committed: Retain any characters at end of ERROR line

2020-12-14 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go testsuite driver retains any characters at the end of an ERROR line in a test. This is needed for at least one upcoming test. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian * go.test/go-test.exp (errchk): Retain any characters at the

Re: [PATCH] Correct -fdump-go-spec's handling of incomplete types

2020-12-14 Thread Ian Lance Taylor via Gcc-patches
On Mon, Dec 14, 2020 at 7:14 PM Nikhil Benesch wrote: > > On 12/14/20 5:30 AM, Rainer Orth wrote: > > with the revised godump.c patch and this one for mk*sysinfo.sh, I still > > get failures on all of Solaris 11.3/x86, 11.4/x86, and 11.4/SPARC > > (didn't try 11.3/SPARC): > > > > * Solaris

Re: [PATCH] Correct -fdump-go-spec's handling of incomplete types

2020-12-13 Thread Ian Lance Taylor via Gcc-patches
On Sun, Dec 13, 2020 at 3:30 PM Nikhil Benesch wrote: > > On 12/13/20 4:55 PM, Nikhil Benesch wrote: > > There are a few more hurdles before this patch is ready for commit. The > > changes to godump.c deserve new test cases. [...] > > Updated patch attached, as promised, and is ready for review.

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

2020-12-11 Thread Ian Lance Taylor via Gcc-patches
On Thu, Dec 10, 2020 at 9:09 PM Ian Lance Taylor wrote: > > On Tue, Dec 8, 2020 at 5:15 AM CHIGOT, CLEMENT > wrote: > > > > Any news about this bug ? It's not urgent even if it's breaking gcc builds > > with Go language, but I just want to know if you need any inpu

Go patch committed: Encode user visible names if necessary

2020-12-11 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend encodes user visible names if necessary. We already encode the assembler names. With this patch, we also avoid putting weird characters into the user visible name. Doing so breaks stabs debugging in particular, and may also cause debugger problems. Instead, we

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

2020-12-10 Thread Ian Lance Taylor via Gcc-patches
lem. Ian > > From: CHIGOT, CLEMENT > Sent: Wednesday, December 2, 2020 5:14 PM > To: Ian Lance Taylor > Cc: gcc-patches@gcc.gnu.org ; David Edelsohn > > Subject: Re: [PATCH] gcc: handle double quotes in symbol name during > stabstrings generation >

Re: [PATCH] Correct -fdump-go-spec's handling of incomplete types

2020-12-09 Thread Ian Lance Taylor via Gcc-patches
On Tue, Dec 8, 2020 at 2:57 PM Nikhil Benesch wrote: > > This patch corrects -fdump-go-spec's handling of incomplete types. > To my knowledge the issue fixed here has not been previously > reported. It was exposed by an in-progress port of gccgo to FreeBSD. > > Given the following C code > >

Go testsuite patch committed: Recognize errorcheckdir -n

2020-12-09 Thread Ian Lance Taylor via Gcc-patches
This patch to go-test.exp recognizes errorcheckdir -n, as used by the updated bug345 test. The -n option is meaningful for the gc compiler, but irrelevant for gccgo. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian * go.test/go-test.exp (go-gc-tests):

Re: Go testsuite patch committed: Don't quote quoted parentheses

2020-12-09 Thread Ian Lance Taylor via Gcc-patches
On Wed, Dec 9, 2020 at 2:39 AM Andreas Schwab wrote: > > This breaks make -C gcc check-go RUNTESTFLAGS="go-test.exp=chan.go": > > ERROR: tcl error sourcing > /opt/gcc/gcc-20201209/gcc/testsuite/go.test/go-test.exp. > ERROR: couldn't compile regular expression pattern: parentheses () not >

libgo patch committed: Update to Go 1.15.6 release

2020-12-08 Thread Ian Lance Taylor via Gcc-patches
This patch updates libgo to the Go 1.15.6 release. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 7a75590577dd3da6ab5091097cc9b80f02615360 diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 619f1c001f0..dc2682d95d1 100644 ---

Go patch committed: Use correct location for iota errors

2020-12-08 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend uses the correct location for errors involving iota in a constant expression. We also check for a valid array length when reducing len or cap of an array to a constant value. This is for https://golang.org/issue/8183. Bootstrapped and ran Go testsuite on

libgcc patch committed: Block signals when release split-stack memory

2020-12-08 Thread Ian Lance Taylor via Gcc-patches
This patch to libgcc blocks signals when releasing split-stack memory due to a thread exiting. Without this, if a signal arrives, the signal handler may try to split the stack itself, which won't work as the data structures won't be in a stable state. We just leave signals blocked while

libgo patch commited: Don't use AF_LINK on Hurd

2020-12-07 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Svante Signell fixes the libgo build by not using AF_LINK on Hurd systems. This fixes GCC PR 98153. Bootstrapped and ran Go tests on x86_64-pc-linux-gnu. Committed to mainline. Ian eafa578e83e4d4f5e29e7e69e9701b4c55e3bd02 diff --git a/gcc/go/gofrontend/MERGE

Re: Merge from trunk to gccgo branch

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

Go patch committed: The type of a string index is byte

2020-12-07 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend sets the type of a string index expression to byte, which is a type alias. To make this work from the do_type method, we add "byte" and "rune" to the list of known integer types, and look them up that way rather than via gogo->lookup_global. This is for

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 reflect

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, causin

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 *

<    1   2   3   4   5   6   7   8   9   10   >