Re: RFA: libiberty: avoid UBSAN complaint in cplus-dem.c

2018-07-27 Thread Ian Lance Taylor via gcc-patches
On Fri, Jul 27, 2018 at 10:12 AM, Tom Tromey wrote: > I built gdb with -fsanitize=undefined, and there was a complaint coming > from cplus-dem.c. remember_Btype can call memcpy with a NULL pointer, > which is undefined behavior according to the C standard. > > This patch fixes the problem for me.

Re: [PATCH] libbacktrace: Move define of HAVE_ZLIB into check for -lz

2018-07-31 Thread Ian Lance Taylor via gcc-patches
On Sun, Jul 29, 2018 at 7:50 AM, Iain Buclaw wrote: > > This is really to suppress the default action-if-found for > AC_CHECK_LIBS. Zlib is not a dependency of libbacktrace, and so it > shouldn't be added to LIBS. When looking at the check, saw that could > remove the test for ac_cv_lib_z_compre

Re: [PATCH] libbacktrace: Move define of HAVE_ZLIB into check for -lz

2018-07-31 Thread Ian Lance Taylor via gcc-patches
On Tue, Jul 31, 2018 at 8:10 AM, Iain Buclaw wrote: > On 31 July 2018 at 16:33, Ian Lance Taylor wrote: >> On Sun, Jul 29, 2018 at 7:50 AM, Iain Buclaw wrote: >>> >>> This is really to suppress the default action-if-found for >>> AC_CHECK_LIBS. Zlib is not a dependency of libbacktrace, and so i

Re: [PATCH 01/11] Add __builtin_speculation_safe_value

2018-07-31 Thread Ian Lance Taylor via gcc-patches
On Tue, Jul 31, 2018 at 12:25 PM, H.J. Lu wrote: > On Mon, Jul 30, 2018 at 6:16 AM, Richard Biener wrote: >> On Fri, 27 Jul 2018, Richard Earnshaw wrote: >> >>> >>> This patch defines a new intrinsic function >>> __builtin_speculation_safe_value. A generic default implementation is >>> defined w

Re: [PATCH] libgcc: Use initarray section type for .init_stack

2023-05-31 Thread Ian Lance Taylor via Gcc-patches
On Wed, May 31, 2023 at 12:41 AM Kewen.Lin via Gcc-patches wrote: > > >> libgcc/ChangeLog: > >> > >> * config/i386/morestack.S: Use @init_array rather than > >> @progbits for section type of section .init_array. > >> * config/rs6000/morestack.S: Likewise. > >> * config/s390/mor

libgo patch committet: Don't collect package CGOLDFLAGS

2023-07-20 Thread Ian Lance Taylor via Gcc-patches
This libgo patch to the go command sources stops collecting package CGOLDFLAGS when using gccgo. The flags are already collected via cmd/cgo. The gccgo_link_c test is tweaked to do real linking as with this change the cgo ldflags are not fully reflected in go build -n output, since they now only

libbacktrace patch committed

2023-07-31 Thread Ian Lance Taylor via Gcc-patches
This libbacktrace patch, based on one by Andres Freund, uses the _pgmptr variable declared on Windows to find the executable file name if none is specified. Bootstrapped and ran libbacktrace testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Patch from Andres Freund: * configure.ac: C

Re: [PATCH] mksysinfo: add support for musl libc

2022-06-30 Thread Ian Lance Taylor via Gcc-patches
On Thu, Jun 30, 2022 at 9:59 AM Sören Tempel wrote: > > Ian Lance Taylor wrote: > > Thanks for the info. Does this patch work? It tweaks the handling of > > SYS_SECCOMP to be specific to that constant. > > Yes, your patch works for me too on Alpine Linux Edge. Thanks. Committed to mainline.

Go patch committed: Avoid C++20 keyword requires

2022-07-01 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend renames "requires" to "needs" to avoid the C++20 keyword. Bootstrapped on x86_64-pc-linux-gnu. Committed to mainline. Ian 9d44418664ec8c3e59365901e3ec02e488d9e01c diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 0d49e9e70c6..65f64e0fbfb 100644 --

DSE patch RFA: Don't delete trapping insn

2022-07-01 Thread Ian Lance Taylor via Gcc-patches
The DSE pass can delete a dead store even if the instruction can trap. That is incorrect when using -fnon-call-exceptions -fno-delete-dead-exceptions. This led to a bug report against gccgo: https://go.dev/issue/53012. However, the bug is not specific to Go. This patch fixes the problem in a sim

Go patch committe: Use correct init order for multi-value init

2022-07-01 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend uses the correct initialization order for code like var a = c var b, c = x.(bool) The global c is initialized by the preinit of b, but we were missing a dependency of c on b, so a would be initialized to the zero value of c rather than the correct value. Simply addi

Go patch committed: Better error message for unknown package name

2022-07-05 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend gives a better error message for an unknown package name, saying "undefined reference" rather than "expected package". This requires updating a test. This fixes https://go.dev/issue/51237. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to main

Go patch committed: Propagate array length error marker

2022-07-05 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend propagates the array length error marker farther, to avoid a compiler crash on invalid code. This fixes https://go.dev/issue/53639. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian c70a48a8f8f6a43b35f783b5672c9a3c0a363c31 diff --

libbacktrace patch committed: Don't let "make clean" remove allocfail.sh

2022-07-07 Thread Ian Lance Taylor via Gcc-patches
The script allocfail.sh was being incorrectly removed by "make clean". This patch fixes the problem. This fixes https://github.com/ianlancetaylor/libbacktrace/issues/81. Ran libbacktrace "make check" and "make clean" on x86_64-pc-linux-gnu. Committed to mainline. Ian For https://github.com/ianl

libbacktrace patch committed: Don't exit Mach-O dyld loop on failure

2022-07-07 Thread Ian Lance Taylor via Gcc-patches
This libbacktrace patch changes the loop over dynamic libraries on Mach-O to keep going if we fail to find the debug info for a particular library. We can still pick up debug info for other libraries even if one fails. Tested on x86_64-pc-linux-gnu which admittedly does little, but others have te

libbacktrace patch committed: Check for sys/link.h

2022-07-08 Thread Ian Lance Taylor via Gcc-patches
Apparently QNX declares dl_iterate_phdr and friends in sys/link.h rather than link.h. This patch updates libbacktrace to check there. This fixes https://github.com/ianlancetaylor/libbacktrace/issues/86. Bootstrapped and ran libbacktrace testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

libgo patch committed: Don't include in sysinfo.c

2022-07-13 Thread Ian Lance Taylor via Gcc-patches
This libgo patch stops including when building gen-sysinfo.go. Removing this doesn't change anything at least with glibc 2.33. The include was added in https://go.dev/cl/6100049 but it's not clear why. This should fix GCC PR 106266. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Co

Go patch committed: Don't crash on f(g()) if g returns a zero-sized value

2022-07-15 Thread Ian Lance Taylor via Gcc-patches
This patch to the GCC interface of the Go frontend fixes a crash in f(g()) if g returns a zero-sized value. In that case the GCC interface modifies g to return void, since GCC's middle-end does not have solid support for zero-sized values. This patch detects the f(g()) case and replaces the call

Go patch committed: Handle f().x if f returns a zero-sized type

2022-07-16 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend handles the case of f().x when the function f returns a zero-sized type. In that case the GCC interface will have changed f to return void, as the GCC middle-end does not have complete support for zero-sized types. This patch handles the case of void when in a struct

Re: libgo patch committed: Don't include in sysinfo.c

2022-07-21 Thread Ian Lance Taylor via Gcc-patches
On Thu, Jul 21, 2022 at 4:53 AM Martin Liška wrote: > > On 7/21/22 12:19, Richard Biener via Gcc-patches wrote: > > On Wed, Jul 13, 2022 at 6:03 PM Ian Lance Taylor via Gcc-patches > > wrote: > >> > >> This libgo patch stops including when building > &g

Re: [PATCH] libgo: make match.sh POSIX-shell compatible

2022-07-22 Thread Ian Lance Taylor via Gcc-patches
On Tue, Jul 19, 2022 at 11:35 PM wrote: > > From: Sören Tempel > > The `(( expression ))` syntax is a Bash extension and not supported by > POSIX shell [1]. However, the arithmetic expressions used by the > gobuild() function can also be expressed using arithmetic POSIX > expansions with `$(( exp

Merge from trunk to gccgo branch

2022-07-27 Thread Ian Lance Taylor via Gcc-patches
I merged trunk revision 5eb9f117a361538834b9740d59219911680717d1 to the gccgo branch. Ian

Re: [PATCH] libgo: Explicitly define SYS_timer_settime for 32-bit musl targets

2022-07-30 Thread Ian Lance Taylor via Gcc-patches
On Thu, Jul 28, 2022 at 11:15 AM wrote: > > From: Sören Tempel > > On 32-bit systems, musl only defines SYS_timer_settime32 not > SYS_timer_settime. This causes the following compilation error: > > os_linux.go:251:30: error: reference to undefined name > '_SYS_timer_settime' >

Re: [PATCH] PR bootstrap/106472: Add libgo depends on libbacktrace to Makefile.def

2022-07-30 Thread Ian Lance Taylor via Gcc-patches
On Sat, Jul 30, 2022 at 2:38 PM Roger Sayle wrote: > > > This patch fixes PR bootstrap/106472 by adding a missing dependency > to Makefile.def to allow make bootstrap when configured using > "--enable-languages=go" (and not using make with multiple threads). > > Tested on x86-64-pc-linux-gnu. Ok

Re: [PATCH] [libbacktrace] fix up broken test

2023-08-03 Thread Ian Lance Taylor via Gcc-patches
On Thu, Aug 3, 2023 at 6:27 AM Richard Biener via Gcc-patches wrote: > > zstdtest has some inline data where some testcases lack the > uncompressed length field. Thus it computes that but still > ends up allocating memory for the uncompressed buffer based on > that (zero) length. Oops. Causes m

Re: [RFC] GCC Security policy

2023-08-08 Thread Ian Lance Taylor via Gcc-patches
On Tue, Aug 8, 2023 at 6:02 AM Jakub Jelinek via Gcc-patches wrote: > > On Tue, Aug 08, 2023 at 02:52:57PM +0200, Richard Biener via Gcc-patches > wrote: > > There's probably external tools to do this, not sure if we should replicate > > things in the driver for this. > > > > But sure, I think th

Re: [RFC] GCC Security policy

2023-08-08 Thread Ian Lance Taylor via Gcc-patches
On Tue, Aug 8, 2023 at 7:37 AM Jakub Jelinek wrote: > > BTW, I think we should perhaps differentiate between production ready > libraries (e.g. libgcc, libstdc++, libgomp, libatomic, libgfortran, > libquadmath, > libssp) vs. e.g. the sanitizer libraries which are meant for debugging and > I belie

Re: [PATCH 1/2] go: update usage of TARGET_AIX to TARGET_AIX_OS

2023-06-16 Thread Ian Lance Taylor via Gcc-patches
On Fri, Jun 16, 2023 at 9:00 AM Paul E. Murphy via Gcc-patches wrote: > > TARGET_AIX is defined to a non-zero value on linux and maybe other > powerpc64le targets. This leads to unexpected behavior such as > dropping the .go_export section when linking a shared library > on linux/powerpc64le. > >

libgo patch committed: Add benchmarks and examples to test list

2023-06-16 Thread Ian Lance Taylor via Gcc-patches
In https://go.dev/cl/384695 (https://gcc.gnu.org/pipermail/gcc-patches/2022-February/590289.html) I simplified the code that built lists of benchmarks, examples, and fuzz tests, and managed to break it. This patch corrects the code to once again make the benchmarks available, and to run the example

libgo patch committed: Use a C function to call mmap

2023-06-20 Thread Ian Lance Taylor via Gcc-patches
This libgo patches changes the runtime pacakge to use a C function to call mmap. The final argument to mmap, of type off_t, varies. In https://go.dev/cl/445375 (https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604158.html) we changed it to always use the C off_t type, but that broke 32-bit b

Re: libgo patch committed: Use a C function to call mmap

2023-06-20 Thread Ian Lance Taylor via Gcc-patches
On Tue, Jun 20, 2023 at 11:35 AM Andreas Schwab wrote: > > On Jun 20 2023, Ian Lance Taylor via Gcc-patches wrote: > > > This libgo patches changes the runtime pacakge to use a C function to call > > mmap. > > > > The final argument to mmap, of type off_t, varies

Merge from trunk to gccgo branch

2023-06-21 Thread Ian Lance Taylor via Gcc-patches
I merged trunk revision 577223aebc7acdd31e62b33c1682fe54a622ae27 to the gccgo branch. Ian

Go patch committed: Determine types of Slice_{value, info} expressions

2023-06-21 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend determines the types of a couple of expressions types that accidentally failed to recurse into their subexpressions. The test case for this is https://go.dev/cl/505015. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian f42544e04a13

Re: [PATCH 1/2] go: update usage of TARGET_AIX to TARGET_AIX_OS

2023-06-22 Thread Ian Lance Taylor via Gcc-patches
On Thu, Jun 22, 2023, 4:47 PM Peter Bergner wrote: > On 6/22/23 6:37 PM, Peter Bergner via Gcc-patches wrote: > > On 6/16/23 12:01 PM, Ian Lance Taylor via Gcc-patches wrote: > >> On Fri, Jun 16, 2023 at 9:00 AM Paul E. Murphy via Gcc-patches > >> wrote: > >&g

Go patch committed: Support bootstrapping Go 1.21

2023-06-23 Thread Ian Lance Taylor via Gcc-patches
compiler, libgo: support bootstrapping gc compiler In the Go 1.21 release the package internal/profile imports internal/lazyregexp. That works when bootstrapping with Go 1.17, because that compiler has internal/lazyregep and permits importing it. We also have internal/lazyregexp in libgo, but sin

Go patch committed: Support -fgo-importcfg

2023-06-26 Thread Ian Lance Taylor via Gcc-patches
The gc Go compiler has a -importcfg option that takes a file that provides a mapping from import paths to the files that satisfy those imports. This is used by the go build tool to let the compiler read imported packages directly out of the build cache. Without this option the go build tool has t

Re: Merge from trunk to gccgo branch

2023-06-26 Thread Ian Lance Taylor via Gcc-patches
I merged trunk revision 3a39a31b8ae9c6465434aefa657f7fcc86f905c0 to the gccgo branch. Ian

Re: [PATCH] Always define `WIN32_LEAN_AND_MEAN` before

2023-03-05 Thread Ian Lance Taylor via Gcc-patches
On Fri, Mar 3, 2023 at 10:47 PM Xi Ruoyao wrote: > > On Sat, 2023-01-07 at 06:52 +, Jonathan Yong via Gcc-patches wrote: > > On 1/6/23 18:10, Jakub Jelinek wrote: > > > On Sat, Jan 07, 2023 at 02:01:05AM +0800, LIU Hao via Gcc-patches > > > wrote: > > > > libgomp/ > > > > > > > > PR mi

Re: Now gcc-13: [Fwd: [PATCH] gcc-12: Re-enable split-stack support for GNU/Hurd.]

2023-03-15 Thread Ian Lance Taylor via Gcc-patches
On Wed, Mar 15, 2023 at 9:14 AM Svante Signell wrote: > > Package: gcc-snapshot > Version: 1:20230315-1 > Severity: important > Tags: patch > User: debian-h...@lists.debian.org > Usertags: hurd > Affects: gcc-snapshot > X-Debbugs-CC: debian-h...@lists.debian.org > > Hello, seems like the patch gcc

libgo patch committed: Add syscall.prlimit

2023-05-11 Thread Ian Lance Taylor via Gcc-patches
As of https://go.dev/cl/476695 the package golang.org/x/sys/unix expects a syscall.prlimit function to exist. This libgo patch adds that function. This is for https://go.dev/issue/46279 and https://go.dev/issue/59712. Since this is a small patch and is needed to compile the widely used x/sys/uni

Go driver patch committed: Always act as though -g was passed

2021-01-28 Thread Ian Lance Taylor via Gcc-patches
The go1 compiler always turns on debugging, to support Go stack traces and functions like runtime.Callers. With the recent switch to turn on DWARF 5 by default, this caused failures with some versions of gas, such as 2.35.1, because the assembly code would assume DWARF 5 but the driver would not p

libgo: update to Go1.16rc1 release

2021-01-29 Thread Ian Lance Taylor via Gcc-patches
This patch updates libgo to the Go1.16rc1 release (the first 1.16 release candidate). Bootstrapped and ran Go tests on x86_64-pc-linux-gnu. Committed to mainline. The diffs are too large to attach, so I've trimmed out some uninteresting changes to generated files. They are of course available i

libgo patch committed: Correct reference to getsystemcgf

2021-01-29 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Clément Chigot directly sets getsystemcfg as //extern in internal/cpu instead of trying to use the runtime as in Go toolchain. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 7da2394fc591a3fb236190c8712f3960a4ee8e5f diff --git a/gcc/go/gofr

gotools patch committed: Test file embedding

2021-02-02 Thread Ian Lance Taylor via Gcc-patches
This patch to the gotools Makefile runs "go test embed/internal/embedtest" using the newly built go tool, to test that file embedding works. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian * Makefile.am (check-embed): New target. (check): Depend on check-emb

Merge from trunk to gccgo branch

2021-02-02 Thread Ian Lance Taylor via Gcc-patches
I merged trunk revision 8e4a738d2540ab6aff77506d368bf4e3fa6963bd to the gccgo branch. Ian

libgo patch committed: Install new packages

2021-02-03 Thread Ian Lance Taylor via Gcc-patches
In the update of libgo to the Go 1.16 beta and release candidate, I forgot to update the Makefile to actually install new packages. This patch does that. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 8e6839059d52c02acb52a4ba1ea6a5fcda88d16b diff --git a/gc

Re: Merge from trunk to gccgo branch

2021-02-03 Thread Ian Lance Taylor via Gcc-patches
I merged trunk revision 530203d6e3244c25eda4124f0fa5756ca9a5683e to the gccgo branch. Ian

libbacktrace patch committed: Use objcopy --help to check for option

2021-02-11 Thread Ian Lance Taylor via Gcc-patches
This patch changes the libbacktrace configure script to check for whether objcopy supports --add-gnu-debuglink (a test that only affects the libbacktrace testsuite) to look at the objcopy --help option rather than trying to apply --add-gnu-debuglink to /bin/ls. The latter can trigger a warning if

Go patch committed: Use correct path for string/[]byte embed

2021-02-12 Thread Ian Lance Taylor via Gcc-patches
This patch by Michael Matloob fixes the Go frontend to use the correct path when opening an embedded file for a string or []byte type. For the other embed.FS case we were correctly using the Files mapping, but for string or []byte we were not. Bootstrapped and ran Go testsuite on x86_64-pc-linux-

Re: Merge from trunk to gccgo branch

2021-02-12 Thread Ian Lance Taylor via Gcc-patches
I merged trunk revision 9769564e7456453e2273071d0faa5aab2554ff78 to the gccgo branch. Ian

Go patch committed: Unalias receiver type in export data

2021-02-16 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend unaliases the receiver type when outputting export data for a method. This avoids a crash when importing such a package. The test case for this is https://golang.org/cl/292009. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 91

libgo patch committed: Update to Go1.16 release

2021-02-19 Thread Ian Lance Taylor via Gcc-patches
This patch updates libgo to the final Go 1.16 release. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian c89b42d3b9d76dedb35e8478913ddf5367f3b5e6 diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index eed9ce01905..217bdd55f1d 100644 --- a/gcc/go/g

libgo patch committed: Ensure 8 byte atomicity on ppc64

2021-02-25 Thread Ian Lance Taylor via Gcc-patches
This libgo patch by Lynn Boger ensures 8 byte atomicity in memmove and memset on ppc64. Go requires that pointer moves are done 8 bytes at a time, so that the concurrent garbage collector always sees an entire pointer value. gccgo uses libc's memmove and memset which does not require that, and the

libbacktrace patch committed: Pass -1 to error callback for unknown DWARF

2021-03-02 Thread Ian Lance Taylor via Gcc-patches
This libbacktrace patch passes -1 to the error callback function for unknown DWARF versions. This makes users of libbacktrace treat DWARF versions that libbacktrace does not support as though no debug information were available. This fixes PR 98818. Bootstrapped and ran libbacktrace tests on x86

Go patch committed: All go:embed with import _ "embed"

2021-03-02 Thread Ian Lance Taylor via Gcc-patches
This patch by Michael Matloob fixes the Go frontend to permit //go:embed comments in files that do import _ "embed" The embed spec allows for //go:embed to be used in files that underscore-import package "embed". This is useful for embeds to []byte and string vars because the embed.FS type ma

libbacktrace patch committed: Don't special case file 0

2021-03-02 Thread Ian Lance Taylor via Gcc-patches
This libbacktrace patch stops special casing file 0. It's no longer necessary as for DWARF 5 support we now set up filename 0 in all cases. Bootstrapped and ran libbacktrace and Go tests on x86_64-pc-linux-gnu. Committed to mainline. Ian * dwarf.c (read_line_program): Don't special case file 0

libgo patch committed: Cast SIGSTKSZ to uintptr

2021-03-08 Thread Ian Lance Taylor via Gcc-patches
This libgo patch casts SIGSTKSZ to uintptr before comparing it to a uintptr value. This fixes build failures with newer versions of glibc in which SIGSTKSZ has changed such that the type is now long. The build failure is a signed-unsigned comparison warning that turns into an error due to -Werror

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 06d0437d4a5faca

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 m

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. Bootstr

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 chanrecv

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. At

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 sil

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 a6b138f257a431f3337f3c6bf5

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 builti

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 on

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: [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 сборки: 4e37e8fead8d6e8b0a9dc95ea25cd784d

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 > FAI

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 main

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 x86_64-pc-linux-gn

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 t

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: 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 UtimesNano(

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 https://sourceware.org/gd

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 x86_64-pc-

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

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: > &

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 u

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 * libbacktrace/backt

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 boot

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 507f392ade582

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

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

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 http

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 t

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 ent

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 --- a/gc

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 b/gcc/go/

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 a/gcc/go/gofrontend/MER

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 --- a/gcc/go/gofron

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.

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 HAVE_DSYMUTIL

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 USE_DSYMUTIL.

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

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 --- a/gc

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 a/gcc/go/gofronte

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 symtab_in

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 500c2690e24054730a2ecf9989720e9d5

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 patch

  1   2   3   4   5   6   >