Go patch committed: Remove Array_index_expression::is_lvalue_

2022-05-06 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go fronend removes the is_lvalue_ field from Array_index_expression. As of https://go.dev/cl/77510 (https://gcc.gnu.org/pipermail/gcc-patches/2017-November/487697.html) it is never used. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

Go patch committed: Reject duplicate bool keys in a map literal

2022-05-06 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend rejects duplicate bool keys in a map literal. This is hardly a common case, but we may as well get it right. This is for https://go.dev/issue/35945 and htps://go.dev/issue/28104. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

Re: [PATCH v4] libgo: Don't use pt_regs member in mcontext_t

2022-04-20 Thread Ian Lance Taylor via Gcc-patches
On Thu, Apr 14, 2022 at 3:15 PM Ian Lance Taylor wrote: > > Thanks! I tested a version of that code with glibc, and it works > there too, so I've committed this patch after testing on > powerpc-linux-gnu and x86_64-linux-gnu. Please let me know about any > problems. Well, that patch broke PPC

Re: [PATCH] libgo: Fix non-portable sed commands

2022-04-19 Thread Ian Lance Taylor via Gcc-patches
On Tue, Apr 19, 2022 at 11:06 AM Jonathan Wakely wrote: > > This fixes the libgo build if /usr/bin/sed is found before > /usr/xpg4/bin/sed on Solaris. > > Tested sparc-sun-solaris2.11, OK for trunk? Thanks, already committed based on your earlier e-mail. Ian

Re: Error when building gcc w/ Go language on Solaris

2022-04-19 Thread Ian Lance Taylor via Gcc-patches
On Tue, Apr 19, 2022 at 6:36 AM Jonathan Wakely wrote: > > The 'check-tail' target in libgo/Makefile.am does: > > ... | sed -n -e 's/.* \(version.*$$\)/\1/p'` >> libgo.sum > > This doesn't work with Solaris sed (and is documented by Autoconf as > being non-portable). The $ needs to be outside

Re: [PATCH] mksigtab.sh: Add support for musl libc

2022-04-18 Thread Ian Lance Taylor via Gcc-patches
On Fri, Apr 15, 2022 at 6:38 AM Sören Tempel wrote: > > Attached are two small git-format-patch(1) files which add support for > musl libc to gofrontend's mksigtab.sh script. They address the following > issues: > > * Signal 34 is special on musl and is used internally for >

Go patch commited: Fix initialization ordering

2022-04-15 Thread Ian Lance Taylor via Gcc-patches
compiler: revert `for package-scope "a = b; b = x" just set "a = x"` This patch to the Go frontend reverts https://go.dev/cl/245098, which introduced incorrect initialization ordering. This patch adjusts the runtime package to work even with that change reverted. Original description of change

Re: [PATCH v4] libgo: Don't use pt_regs member in mcontext_t

2022-04-14 Thread Ian Lance Taylor via Gcc-patches
On Mon, Apr 11, 2022 at 11:28 AM Sören Tempel wrote: > > Ian Lance Taylor wrote: > > What I was hoping from my earlier question was that you could tell me > > the exact lines to write in the current sources that will compile on > > MUSL. Don't include , don't refer to earlier patches as > > that

Go testsuite patch committed: Update issue10441.go to upstream version

2022-04-13 Thread Ian Lance Taylor via Gcc-patches
This patch updates issue10441.go to the upstream version. The test only needs to be compiled, not linked. Linking failed on some platforms, and there was no need to do it anyhow. Ran test on x86_64-pc-linux-gnu. Committed to mainline. Ian 33ba46663cdf2c9e995265eb838585488f81e907 diff --git

Re: [PATCH v4] libgo: Don't use pt_regs member in mcontext_t

2022-04-11 Thread Ian Lance Taylor via Gcc-patches
On Mon, Apr 11, 2022 at 10:26 AM Sören Tempel wrote: > > Any updates no this? > > Sorry I keep bothering you with this but we are quite literally only a > few lines away from having the go-signal.c code compile on PPC64 musl :) > > Let me know if you need more information to get this fixed. What

libbacktrace patch committed: don't skip aligned byte

2022-04-05 Thread Ian Lance Taylor via Gcc-patches
This libbacktrace patch by Rui Ueyama fixes handling an uncompressed block that starts at an aligned byte. If the bits before the uncompressed block ended at a byte boundary, libbacktrace accidentally skipped the next byte, which is the first byte of the length of the block. Bootstrapped and ran

Re: [PATCH v4] libgo: Don't use pt_regs member in mcontext_t

2022-04-02 Thread Ian Lance Taylor via Gcc-patches
On Sat, Apr 2, 2022 at 1:21 AM Sören Tempel wrote: > > Thanks for committing a first fix! Unfortunately, your changes don't > work on ppc64le musl since you are now still using .regs on ppc64le the > include of asm/ptrace.h (as added in the v1 of my patch) is missing. > Hence, your patch fails to

Re: [PATCH v4] libgo: Don't use pt_regs member in mcontext_t

2022-03-31 Thread Ian Lance Taylor via Gcc-patches
On Thu, Mar 31, 2022 at 9:41 AM Sören Tempel wrote: > > Ping. > > Would be nice to get this integrated since this one of the changes needed to > make gccgo work with musl libc. Let me know if the patch needs to be revised > further. I went with a simpler solution, more verbose but easier to

libgo: update to 1.18 release

2022-03-16 Thread Ian Lance Taylor via Gcc-patches
This patch updates libgo to the final 1.18 release. Bootstrapped and ran Go testsuite on x86_64-pc-linux-nu. Committed to mainline. Ian patch.txt.gz Description: application/gzip

Go patch committed: ignore function type result name in export data

2022-03-08 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend ignores the function type result name when producing export data. This change ensures that we never output a result name in the export data if there is only a single result. Previously we would output a ? if the single result had a name. That made the output

Re: [PATCH v3] libgo: Don't use pt_regs member in mcontext_t

2022-03-07 Thread Ian Lance Taylor via Gcc-patches
On Sun, Mar 6, 2022 at 11:11 PM wrote: > > +#ifdef __PPC64__ > + ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gp_regs[32]; > +#else > + ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gregs[32]; > +#endif Have you tested this in 32-bit mode? It does not look correct based on

libgo patch committed: Skip _FILE in mkruntimeinc

2022-03-04 Thread Ian Lance Taylor via Gcc-patches
This libgo patch skips the _FILE struct in mkruntimeinc.sh. We don't need it, and it breaks uclibc. This should fix GCC PR 101246. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 59a20b189dcbda8d929503ae1b1f864535a27584 diff --git a/gcc/go/gofrontend/MERGE

libgo patch committed: move semaphore to gotool packages

2022-03-04 Thread Ian Lance Taylor via Gcc-patches
This patch by Clément Chigot moves golang.org/x/sync/semaphore from the libgo packages to the gotools packages, since it is only used by gofmt. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian e71079517f16fee6759bad2be14f574c3548743e diff --git

libgo patch committed: Fix AIX build

2022-03-04 Thread Ian Lance Taylor via Gcc-patches
This patch by Clément Chigot fixes the build of libgo on AIX, which was broken in the update to the Go 1.18 release. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian 98a7a7b5275b226932f503cc1dcc21fd9a9f8476 diff --git a/gcc/go/gofrontend/MERGE

libgo patch committed: Update README.gcc

2022-02-22 Thread Ian Lance Taylor via Gcc-patches
I committed this libgo patch to update the README.gcc file. Ian 0f16f4ad82cb47bc444688822cc142d80192c284 diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 7455d01c179..424bbebfeed 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@

libgo patch committed: make -Werror optional

2022-02-22 Thread Ian Lance Taylor via Gcc-patches
I committed ths libgo patch to make -Werror optional. This patch is already in the GCC sources, where it was erroneously applied before the upstream patch. This is the upstream patch. Ian diff --git a/libgo/configure.ac b/libgo/configure.ac index 3cadc6d20..7e2b98ba6 100644 ---

Re: [PATCH v4] Make `-Werror` optional in libatomic/libbacktrace/libgomp/libitm/libsanitizer

2022-02-22 Thread Ian Lance Taylor via Gcc-patches
On Thu, Feb 3, 2022 at 6:07 AM David Seifert via Gcc-patches wrote: > > * `-Werror` can cause issues when a more recent version of GCC compiles > an older version: > - https://bugs.gentoo.org/229059 > - https://bugs.gentoo.org/475350 > - https://bugs.gentoo.org/667104 > >

Re: libgo patch committed: Update to Go1.18rc1 release

2022-02-21 Thread Ian Lance Taylor via Gcc-patches
On Sun, Feb 20, 2022 at 2:13 PM Rainer Orth wrote: > > > This patch updates libgo to the Go1.18rc1 release. Bootstrapped and > > ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. > > this broke Solaris bootstrap: > > ld: fatal: file runtime/internal/.libs/syscall.o: open failed:

Re: [gofrontend-dev] Re: [PATCH] libgo: include asm/ptrace.h for pt_regs definition on PowerPC

2022-02-21 Thread Ian Lance Taylor via Gcc-patches
Note for gofrontend-dev: on gcc-patches only Andreas Schwab suggested using uc_regs instead of regs, which does look correct to me. Ian On Mon, Feb 21, 2022 at 8:47 AM Sören Tempel wrote: > > Ping. > > Summary: Fix build of libgo on PPC with musl libc and libucontext by > explicitly including

libgo patch committed: Update hurd support

2022-02-18 Thread Ian Lance Taylor via Gcc-patches
This libgo patch based on patches by Svante Signell updates the hurd support in libgo. This is for GCC PR 104290. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian fa59861178df32a1f1271be6f763b71d2bb5ecab diff --git a/gcc/go/gofrontend/MERGE

libgo patch committed: Update to Go1.18rc1 release

2022-02-18 Thread Ian Lance Taylor via Gcc-patches
This patch updates libgo to the Go1.18rc1 release. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian patch.txt.bz2 Description: application/bzip

libgo patch committed: Add hurd build tag for setReadMsgCloseOnExec

2022-02-17 Thread Ian Lance Taylor via Gcc-patches
This libgo patch, from Svante Signell, adds a hurd build tag for setReadMsgCloseOnExec. This fixes GCC PRs 103573 and 104290. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu (which doesn't test much). Committed to mainline. Ian 8ec374f329b72e640bffe3abf8c082f9a287adb3 diff --git

Re: [PATCHv3] libiberty rust-demangle, ignore .suffix

2022-02-17 Thread Ian Lance Taylor via Gcc-patches
On Thu, Feb 17, 2022 at 2:45 AM Mark Wielaard wrote: > > Ping. Is this OK to commit now? > I am not sure who can approve this. > > On Sun, Jan 16, 2022 at 01:35:34AM +0100, Mark Wielaard wrote: > > Rust symbols can have a .suffix because of compiler transformations. > > These can be ignored in

Re: Merge from trunk to gccgo branch

2022-02-16 Thread Ian Lance Taylor via Gcc-patches
And another one: I merged trunk revision 837eb12629dd8a8a45fac9b8db57b29ecda46f14 to the gccgo branch. Ian

libbacktrace patch committed: Handle skeleton units

2022-02-16 Thread Ian Lance Taylor via Gcc-patches
This libbacktrace patch handles DWARF 5 skeleton units, which are used when part of the DWARF information is stored in a separate file. This doesn't actually look in the separate file, as the line number information, which is all that we care about, is normally kept in the main executable because

Re: Merge from trunk to gccgo branch

2022-02-16 Thread Ian Lance Taylor via Gcc-patches
I merged trunk revision 24ca97325cab7bc454c785d55f37120fe7ea6f74 to the gccgo branch. Ian

Re: libgo patch committed: Update to Go1.18beta2 release

2022-02-16 Thread Ian Lance Taylor via Gcc-patches
On Tue, Feb 15, 2022 at 1:19 AM Eric Botcazou wrote: > > > I've committed a change to update libgo to the Go1.18beta2 release. > > This apparently broke the build on SPARC/Solaris 11.3: I've committed this patch to fix these problems. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu and

libbacktrace patch committed: Initialize DWARF 5 fields of unit

2022-02-16 Thread Ian Lance Taylor via Gcc-patches
When I added the DWARF 5 support to libbacktrace in 2019-12-13 I forgot to initialize the new fields of the unit data structure. Whoops. Fixed with this patch. Bootstrapped and ran libbacktrace and Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian * dwarf.c (build_address_map):

Re: libgo patch committed: Update to Go1.18beta2 release

2022-02-15 Thread Ian Lance Taylor via Gcc-patches
Thanks, I'm working on it. I'm having some trouble with the Solaris machines I have access to. Ian On Tue, Feb 15, 2022, 1:20 AM Eric Botcazou via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > > I've committed a change to update libgo to the Go1.18beta2 release. > > This apparently broke the

Re: Merge from trunk to gccgo branch

2022-02-13 Thread Ian Lance Taylor via Gcc-patches
I merged trunk revision 58aeb75d4097010ad9bb72b964265b18ab284f93 to the gccgo branch. Ian

Go patch committed: Call timer function via syscall.

2022-02-13 Thread Ian Lance Taylor via Gcc-patches
It turns out to be painful to require linking against -lrt on GNU/Linux, as that makes it harder to link Go code into C programs. Instead just call the timer syscalls directly. That is what the upstream library does anyhow. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to

Go patch committed: Don't set ptrmask bit for pointer to notinheap type

2022-02-13 Thread Ian Lance Taylor via Gcc-patches
This patch fixes the Go frontend to not set a bit in the garbage-collection ptrmask bit for a pointer to notinheap type. This is a follow-up to https://gcc.gnu.org/pipermail/gcc-patches/2022-February/590150.html. The test case for this is https://go.dev/cl/385454. Bootstrapped and ran Go

Merge from trunk to gccgo branch

2022-02-11 Thread Ian Lance Taylor via Gcc-patches
I merged trunk revision 8dc2499aa62f768c6395c9754b8cabc1ce25c494 to the gccgo branch. Ian

libgo patch committed: Update to Go1.18beta2 release

2022-02-11 Thread Ian Lance Taylor via Gcc-patches
I've committed a change to update libgo to the Go1.18beta2 release. Bootstrapped and tested on x86_64-pc-linux-gnu. As usual with these release updates, the change is too large for this e-mail. Please see the git history or https://go.dev/cl/384695 for the exact changes. Ian gotools/: *

Go patch committed: Don't warn for print()

2022-02-09 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend stops warning for calls of print(). We used to warn for calls to print(), because it doesn't do anything. However, a Go 1.18 test uses that call, and it is valid Go. Change the compiler to just accept it and compile it; this will produce calls to printlock and

Go patch committed: Use nil pointer for zero length string constant

2022-02-09 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend uses a nil pointer for a zero length string constant. We used to pointlessly set the pointer of a zero length string constant to point to a zero byte constant. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

Go patch committed: treat notinheap types as not being pointers

2022-02-09 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend treats notinheap types as not being pointers. By definition, a type is marked noinheap doesn't contain any pointers that the garbage collector cares about, and neither does a pointer to such a type. Change the type descriptors to consistently treat such types as not

Go patch committed: link against -lrt on GNU/Linux

2022-02-09 Thread Ian Lance Taylor via Gcc-patches
In the Go 1.18 release libgo needs to link against -lrt on GNU/Linux only, to call the timer_create, timer_settime, and timer_delete functions. In preparation this patch changes the gccgo driver to link against -lrt when linking libgo statiically, and the gotools Makefile to link the runtime test

Patch committed: Correct -fgo-dump-spec alignment field name

2022-02-09 Thread Ian Lance Taylor via Gcc-patches
My earlier patch to correct the -fgo-dump-spec field name (https://gcc.gnu.org/pipermail/gcc-patches/2021-December/587464.html) was incomplete. It replaced part of the name with "_", but not all of it. This patch completes the job. Bootstrapped and ran Go and -fgo-dump-spec testsuite on

Go patch committed: Recognize Go 1.18 runtime/internal/atomic methods

2022-02-08 Thread Ian Lance Taylor via Gcc-patches
The Go 1.18 library introduces specific types in runtime/internal/atomic. This patch to the Go frontend recognizes and optimizes the methods on those types, as we do with the functions in runtime/internal/atomic. While we're here avoid getting confused by methods in any other package that we

Go patch committed: Implement FuncPCABI0, FuncPCABIInternal

2022-02-08 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend and libgo implements the abi.FuncPCABI0 and abi.FuncPCABIInternal functions. The Go 1.18 standard library uses an internal/abi package with two functions that are implemented in the compiler. This patch implements them in the gofrontend, to support the upcoming

Go patch committed: Add "any" as alias for "interface{}"

2022-02-04 Thread Ian Lance Taylor via Gcc-patches
In the Go 1.18 release the predeclared identifier "any" is a new alias for the type "interface{}". This patch adds this alias to the Go frontend. This requires updating a test. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

libgo patch committed: Build panic32.go on amd64p32

2022-01-20 Thread Ian Lance Taylor via Gcc-patches
This libgo patch builds panic32.go on amd64p32 (that is, x86 x32 mode). This fixes GCC PR 104149. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu, and H.J. tested the patch on x32 (thanks!). Committed to mainline. Ian 4f614712c908ca00fdb83057420e0023c9171477 diff --git

Go patch committed: Permit unnamed types when ignoring struct tags

2022-01-06 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend permits converting unnamed types when ignoring struct tags. I think the code was written this way because before conversion could ignore struct tags this case could only arise with named types. Now that conversions permit struct tags to change, this can occur with

Go patch committed: Remove duplication of Named_object traversal

2022-01-04 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend removes duplication of Named_object traversal code. Adding type parameters was about to add a partial third version. Remove the duplication to avoid that. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

Re: [gofrontend-dev] Re: Go patch committed: Don't pad epollevent on sparc64 GNU/Linux

2021-12-31 Thread Ian Lance Taylor via Gcc-patches
On Fri, Dec 31, 2021 at 1:32 AM Jakub Jelinek wrote: > > The following patch adjusts the testcase for the above change. > Tested on x86_64-linux, ok for trunk? > > 2021-12-31 Jakub Jelinek > > * gcc.misc-tests/godump-1.c: Adjust for renaming of last > field from _align suffix

Go patch committed: Don't pad epollevent on sparc64 GNU/Linux

2021-12-29 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend, libgo, and the -fgo-dump-spec code avoids padding incorrectly when a zero-sized field is inserted solely for alignment. We avoid this by not padding after a "_" field, and by using "_" fields for padding. This is fine since the padding is only there in case someone

Re: libgo patch committed: redirect mkrsysinfo.sh grep output to /dev/null

2021-11-19 Thread Ian Lance Taylor via Gcc-patches
On Fri, Nov 19, 2021 at 3:47 AM Bernhard Reutner-Fischer via Gcc-patches wrote: > > On Fri, 28 Oct 2016 10:55:18 -0700 > Ian Lance Taylor wrote: > > > This patch to libgo redirects the output of a grep command in > > mkrsysinfo.sh to /dev/null. The output otherwise appears in the > > grep -q

Go patch committed: Traverse func subexprs when creating func descriptors

2021-11-11 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend fixes the Create_func_descriptors pass to traverse the subexpressions of the function in a Call_expression. There are no subexpressions in the normal case of calling a function a method directly, but there are subexpressions when in code like F().M() when F returns an

Re: [PATCH] libbacktrace: fix UBSAN issues

2021-11-11 Thread Ian Lance Taylor via Gcc-patches
On Thu, Nov 11, 2021 at 7:39 AM Martin Liška wrote: > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Martin > > Fix issues mentioned in the PR. > > PR libbacktrace/103167 > > libbacktrace/ChangeLog: > > * elf.c

Re: Merge from trunk to gccgo branch

2021-10-27 Thread Ian Lance Taylor via Gcc-patches
I merged trunk revision 99b1021d21e5812ed01221d8fca8e8a32488a934 to the gccgo branch. Ian

Go patch committed: Permit compiler directives in parenthesized groups

2021-10-26 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend permits compiler directives in parenthesized groups. The original compiler directive support was only for //line at the start of a line and for //go: comments before function declarations. When support was added for //go:notinheap for types and //go:embed for

Re: [PATCH] Handle jobserver file descriptors in btest.

2021-10-22 Thread Ian Lance Taylor via Gcc-patches
On Fri, Oct 22, 2021 at 1:15 AM Martin Liška wrote: > > On 10/21/21 20:15, Ian Lance Taylor wrote: > > On Thu, Oct 21, 2021 at 12:48 AM Martin Liška wrote: > >> > >> The patch is about sensitive handling of file descriptors opened > >> by make's jobserver. > > > > Thanks. I think a better

Re: [PATCH] Handle jobserver file descriptors in btest.

2021-10-21 Thread Ian Lance Taylor via Gcc-patches
On Thu, Oct 21, 2021 at 12:48 AM Martin Liška wrote: > > The patch is about sensitive handling of file descriptors opened > by make's jobserver. Thanks. I think a better approach would be, at the start of main, fstat the descriptors up to 10 and record the ones for which fstat succeeds. Then

Re: [PATCH v2 0/4] libffi: Sync with upstream

2021-10-16 Thread Ian Lance Taylor via Gcc-patches
On Sat, Oct 16, 2021 at 10:14 AM H.J. Lu via Gcc-patches wrote: > > Go on master branch isn't buildable on AIX. What should I do > next to get my libffi sync patches into master branch? Is the only problem you are having the missing-objcopy problem? To fix that one, install the GNU binutils.

Re: Merge from trunk to gccgo branch

2021-10-07 Thread Ian Lance Taylor via Gcc-patches
I merged trunk revision f49e3d28be44179f07b8a06159139ce77096dda7 to the gccgo branch. Ian

libgcc patch committed: Use .init_array for constructor if available

2021-10-07 Thread Ian Lance Taylor via Gcc-patches
This libgcc patch changes the morestack support to use the .init_array. section for the constructor rather than the .ctors.65535 section, if the target supports .init_array. This should avoid pointless mixing .ctors and .init_array. Bootstrapped and ran Go and split-stack tests on

Go patch committed: Use nullptr in a couple of cases

2021-10-05 Thread Ian Lance Taylor via Gcc-patches
This Go frontend patch by Than McIntosh uses nullptr in a couple of cases to avoid errors in template matching with some stage1 compilers. Bootstrapped on x86_64-pc-linux-gnu. Committed to mainline. Ian patch f4da52d91658cf73eb95d3d8b4b0fd79c8b0ac23 diff --git a/gcc/go/gofrontend/MERGE

Go patch committed: Avoid calling Expression::type before lowering

2021-09-30 Thread Ian Lance Taylor via Gcc-patches
For some future work on the Go frontend it will be annoying to have to make Expression::type work before the lowering pass, so this patch changes the frontend so that that doesn't happen. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian patch.txt

Re: Merge from trunk to gccgo branch

2021-09-21 Thread Ian Lance Taylor via Gcc-patches
I merged trunk revision 09e18d113b3c3dae896ac1a8ad1e0087adbb153b to the gccgo branch. Ian

libgo patch committed: set runtime.GOROOT at build time

2021-09-21 Thread Ian Lance Taylor via Gcc-patches
This patch changes libto to set runtime.GOROOT value at build time. In Go 1.17 the gc toolchain changed to set runtime.GOROOT in cmd/link (previously it was runtime/internal/sys.GOROOT). This patch does the same in libgo. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to

Re: Merge from trunk to gccgo branch

2021-09-17 Thread Ian Lance Taylor via Gcc-patches
I merged trunk revision 89be17a1b231ade643f28fbe616d53377e069da8 to the gccgo branch. Ian

libgo patch committed: Update to go1.17.1 release

2021-09-16 Thread Ian Lance Taylor via Gcc-patches
This patch updates libgo to the go1.17.1 release. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 1d62d26192bf7c2f303d993f9a2963a0fd5b475a diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index f4816816500..e2abd5fc4b7 100644 ---

Merge from trunk to gccgo branch

2021-09-13 Thread Ian Lance Taylor via Gcc-patches
I merged trunk revision 104c05c5284b7822d770ee51a7d91946c7e56d50 to the gccgo branch. Ian

Go patch committed: Don't pad zero-sized trailing field in results struct

2021-09-11 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend avoids padding zero-sized trailing fields in the struct created to hold result parameters. This avoids a miscompilation when a function returns multiple results and the last result is zero-sized (this is not a useful way to write a function but it can happen

Go patch committed: Correct condition for calling memclrHasPointers

2021-09-10 Thread Ian Lance Taylor via Gcc-patches
This Go frontend patch corrects the condition under which we call memclrHasPointers. When compiling append(s, make([]typ, ln)...), where typ has a pointer, and the append fits within the existing capacity of s, the condition used to clear out the new elements was reversed. This fixes

Re: libgo patch committed: Update to Go1.17rc2 release

2021-09-07 Thread Ian Lance Taylor via Gcc-patches
On Fri, Sep 3, 2021 at 2:00 AM Matthias Klose wrote: > > On 8/31/21 3:24 PM, H.J. Lu via Gcc-patches wrote: > > On Thu, Aug 12, 2021 at 8:24 PM Ian Lance Taylor via Gcc-patches > > wrote: > >> > >> This patch updates libgo from the Go1.16.5 release to th

libgo patch committed: Use hash32 for p32 variants

2021-09-07 Thread Ian Lance Taylor via Gcc-patches
This libgo patch uses hash32 rather than hash64 for amd32p32 (x32 mode) and mips64p32 and mips64p32le (the n32 ABI). This should fix PR 102102. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 3e86f786c08a5ae8b3153352a1295ab7fe6a4b51 diff --git

libgo patch committed: Update to final Go 1.17 release

2021-09-05 Thread Ian Lance Taylor via Gcc-patches
This patch updates libgo to the final Go 1.17 release. (I'm aware of a couple of bug reports building libgo, I haven't had time to get to them yet.) Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian patch.txt 1d98014a8ae3c357071478d337f0169edec2ce0c diff

Re: libgo patch committed: Update to Go1.17rc2 release

2021-08-14 Thread Ian Lance Taylor via Gcc-patches
On Fri, Aug 13, 2021 at 2:08 PM Rainer Orth wrote: > > unfortunately, things are considerably worse: syscall.lo fails to build > and go1 even ICEs: > > /vol/gcc/src/hg/master/local/libgo/go/syscall/libcall_posix_utimesnano.go:13:1: > error: redefinition of ‘UtimesNano’ >13 | func

Re: libgo patch committed: Update to Go1.17rc2 release

2021-08-13 Thread Ian Lance Taylor via Gcc-patches
On Fri, Aug 13, 2021 at 5:43 AM Rainer Orth wrote: > > Hi Ian, > > > This patch updates libgo from the Go1.16.5 release to the Go 1.17rc2 > > release. As usual with these version updates, the patch itself is too > > large to attach to this e-mail message. I've attached the changes to > > files

Re: [PATCH] libbacktrace: fix fd leak tests on systems with extra descriptors

2021-08-13 Thread Ian Lance Taylor via Gcc-patches
On Fri, Aug 13, 2021 at 12:05 AM Sergei Trofimovich wrote: > > On Thu, 12 Aug 2021 16:16:04 -0700 > Ian Lance Taylor wrote: > > > On Thu, Aug 12, 2021 at 3:34 PM Sergei Trofimovich via Gcc-patches > > wrote: > > > > > > From: Sergei Trofimovich > > > > > > I noticed test failures when ran gcc

libgo patch committed: Update to Go1.17rc2 release

2021-08-12 Thread Ian Lance Taylor via Gcc-patches
This patch updates libgo from the Go1.16.5 release to the Go 1.17rc2 release. As usual with these version updates, the patch itself is too large to attach to this e-mail message. I've attached the changes to files that are specific to gccgo. Bootstraped and ran Go testsuite on

Go patch committed: Store pointers to go:notinheap types indirectly

2021-08-12 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend and libgo stores pointers to go:notinheap types indirectly. This provides better support for using cgo with incomplete types. This is the gofrontend version of https://golang.org/cl/264480. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to

Re: [PATCH] libbacktrace: fix fd leak tests on systems with extra descriptors

2021-08-12 Thread Ian Lance Taylor via Gcc-patches
On Thu, Aug 12, 2021 at 3:34 PM Sergei Trofimovich via Gcc-patches wrote: > > From: Sergei Trofimovich > > I noticed test failures when ran gcc test suite from under mc shell. > mc opens fd=9 and exposes it to child processes. As a result a few > tests failes: > FAIL: b2test_buildid >

Re: [PATCH] libbacktrace: fix b2test_buildid test on non-english locales

2021-08-12 Thread Ian Lance Taylor via Gcc-patches
On Thu, Aug 12, 2021 at 3:35 PM Sergei Trofimovich via Gcc-patches wrote: > > From: Sergei Trofimovich > > On LANG=ru_RU.UTF-8 'b2test_buildid' test fails due to localized readelf > output: > > $ LANG=ru_RU.UTF-8 readelf -n b2test | fgrep 4e37e8f > ID сборки:

Go patch committed: Don't crash on a, b := int(0)

2021-08-10 Thread Ian Lance Taylor via Gcc-patches
This patch the Go frontend avoids a crash on the invalid code "a, b := int(0)". This fixes GCC PR 101851. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 498e91bf7d6a8000bb4b74f95c404064b8eac644 diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE

Re: Go patch committed: Support unsafe.Add and unsafe.Slice

2021-08-07 Thread Ian Lance Taylor via Gcc-patches
On Mon, Aug 2, 2021 at 3:23 PM Ian Lance Taylor wrote: > > The upcoming Go 1.17 release adds two new functions to the unsafe > package: unsafe.Add and unsafe.Slice. These functions must be > implemented in the compiler. This patch implements them for gccgo. > Bootstrapped and ran Go testsuite

Re: Go patch committed: Be strict about escape analysis of builtin functions

2021-08-06 Thread Ian Lance Taylor via Gcc-patches
On Wed, Aug 4, 2021 at 9:24 PM Ian Lance Taylor wrote: > > This Go frontend patch by Cherry Mui makes the escape analysis pass > stricter about builtin functions In the places where we handle > builtin functions, list all supported ones, and fail if an unexpected > one is seen. So if a new

Go patch committed: extend runtime/internal/atomic to sync/atomic

2021-08-05 Thread Ian Lance Taylor via Gcc-patches
This Go patch extends the internal runtime/internal/atomic package to match the externally visible sync/atomic package. This is the gofrontend version of https://golang.org/cl/289152. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

Go patch committed: Be strict about escape analysis of builtin functions

2021-08-04 Thread Ian Lance Taylor via Gcc-patches
This Go frontend patch by Cherry Mui makes the escape analysis pass stricter about builtin functions In the places where we handle builtin functions, list all supported ones, and fail if an unexpected one is seen. So if a new builtin function is added in the future we can detect it, instead of

Go patch committed: Support new language constructs in escape analysis

2021-08-03 Thread Ian Lance Taylor via Gcc-patches
This Go frontend patch by Cherry Mui supports the new language constructs in escape analysis. Previous patches added new language constructs in Go 1.17, specifically, unsafe.Add, unsafe.Slice, and conversion from a slice to a pointer to an array. This patch handles them in the escape analysis.

Go patch committed: Return two values from selectnbrecv

2021-08-03 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend and libgo changes selectnbrecv to return two values. The only difference between selectnbrecv and selectnbrecv2 is that the latter uses a pointer argument as the second return value from chanrecv. This patch changes selectnbrecv to return the two values from

Re: Go patch committed: Allow converting from slice to pointer-to-array

2021-08-03 Thread Ian Lance Taylor via Gcc-patches
On Mon, Aug 2, 2021 at 3:53 PM Ian Lance Taylor wrote: > > The upcoming Go 1.17 release has a new language feature: it permits > conversions from slice types to pointer-to-array types. If the slice > is too short, the conversion panics. This patch implements this new > feature in gccgo.

Go patch committed: Allow converting from slice to pointer-to-array

2021-08-02 Thread Ian Lance Taylor via Gcc-patches
The upcoming Go 1.17 release has a new language feature: it permits conversions from slice types to pointer-to-array types. If the slice is too short, the conversion panics. This patch implements this new feature in gccgo. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to

Go patch committed: Support unsafe.Add and unsafe.Slice

2021-08-02 Thread Ian Lance Taylor via Gcc-patches
The upcoming Go 1.17 release adds two new functions to the unsafe package: unsafe.Add and unsafe.Slice. These functions must be implemented in the compiler. This patch implements them for gccgo. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

Go patch committed: Avoid aliases in receiver types

2021-07-19 Thread Ian Lance Taylor via Gcc-patches
This patch changes the Go frontend to avoid aliases in receiver types. If a package declares a method on an alias type, the alias would be used in the export data. This would then trigger a compiler assertion on import: we should not be adding methods to aliases. Fix the problem by ensuring that

Re: [PATCH] godump: Fix -fdump-go-spec= reproduceability issue

2021-07-13 Thread Ian Lance Taylor via Gcc-patches
On Tue, Jul 13, 2021 at 12:49 AM Jakub Jelinek wrote: > > 2021-07-13 Jakub Jelinek > > PR go/101407 > * godump.c (godump_str_hash): New type. > (godump_container::pot_dummy_types): Use string_hash instead of > ptr_hash in the hash_set. Thanks for looking at

Re: disable -Warray-bounds in libgo (PR 101374)

2021-07-09 Thread Ian Lance Taylor via Gcc-patches
On Thu, Jul 8, 2021 at 11:16 PM Richard Biener wrote: > > On Thu, Jul 8, 2021 at 8:02 PM Martin Sebor via Gcc-patches > wrote: > > > > Hi Ian, > > > > Yesterday's enhancement to -Warray-bounds has exposed a couple of > > issues in libgo where the code writes into an invalid constant > > address

Re: Go patch committed: In composite literals use temps only for interfaces

2021-06-29 Thread Ian Lance Taylor via Gcc-patches
On Tue, Jun 29, 2021 at 11:01 AM Ian Lance Taylor wrote: > > This patch to the Go frontend reduces the number of temporaries that > the compiler genrrates for composite literals. For a composite > literal we only need to introduce a temporary variable if we may be > converting to an interface

Go patch commited: Set DECL_NAMELESS for temporaries

2021-06-29 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend sets DECL_NAMELESS for temporary variables. This is consistent with what create_tmp_var does, but is used for cases where we can't use create_tmp_var. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian * go-gcc.cc

Go patch committed: In composite literals use temps only for interfaces

2021-06-29 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend reduces the number of temporaries that the compiler genrrates for composite literals. For a composite literal we only need to introduce a temporary variable if we may be converting to an interface type, so only do it then. This saves over 80% of compilation time

Re: [PATCH] libbacktrace: fix DWARF suppport for XCOFF files

2021-06-28 Thread Ian Lance Taylor via Gcc-patches
On Mon, Jun 28, 2021 at 12:27 AM CHIGOT, CLEMENT wrote: > > A few things were missing to correctly handle DWARF files on AIX. > > Moreover, the previously base_addres was the starting address of > the .text section of a loaded file instead of the difference > between this starting address and the

libgo patch committed: Update libgo to Go 1.16.5

2021-06-10 Thread Ian Lance Taylor via Gcc-patches
This patch updates libgo to the Go 1.16.5 release. Bootstrapped and tested on x86_64-pc-linux-gnu. Committed to tip and GCC 11 branch. Ian a7d86ad16c5afdbbbae5218c012e1bbf6966bf1d diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 1f38c9110ba..f16fb9facc3 100644 ---

Go patch committed: Don't quote ampersand in gccgo.texi

2021-05-27 Thread Ian Lance Taylor via Gcc-patches
This patch removes HTML quoting from the Texinfo file gccgo.html. Committed to mainline. Ian diff --git a/gcc/go/gccgo.texi b/gcc/go/gccgo.texi index ce6b518bb7b..fa0e4882403 100644 --- a/gcc/go/gccgo.texi +++ b/gcc/go/gccgo.texi @@ -495,7 +495,7 @@ like (after importing the @code{os} package):

<    1   2   3   4   5   6   >