Re: [PATCH] [libstdc++] [testsuite] xfail double-prec from_chars for float128_t

2024-04-18 Thread Alexandre Oliva
On Apr 16, 2024, Alexandre Oliva wrote: > * testsuite/20_util/to_chars/float128-c++23.cc: Xfail run on > aarch64-vxworks. FTR, here's the fixed ChangeLog entry I'm putting in: (s/-/_/) * testsuite/20_util/to_chars/float128_c++23.cc: Xfail run on aarch64-vxworks. --

Re: [PATCH] [testsuite] introduce strndup effective target

2024-04-18 Thread Alexandre Oliva
On Apr 16, 2024, Alexandre Oliva wrote: > * gcc.dg/builtin-dynamic-object-size-1.c: Likewise. > * gcc.dg/builtin-dynamic-object-size-2.c: Likewise. > * gcc.dg/builtin-dynamic-object-size-3.c: Likewise. > * gcc.dg/builtin-dynamic-object-size-4.c: Likewise. These hunks

Re: [PATCH] [testsuite] [arm] accept empty init for bfloat16

2024-04-18 Thread Alexandre Oliva
On Apr 16, 2024, Mike Stump wrote: > Indeed, I kinda expect coverage already for that feature in > another test case. *nod*, jsm added gcc.dg/c11-empty-init-[123].c (and more) in the patch that implemented this c23 feature. -- Alexandre Oliva, happy hacker

Re: [PATCH]AArch64: remove reliance on register allocator for simd/gpreg costing. [PR114741]

2024-04-18 Thread Richard Earnshaw (lists)
On 18/04/2024 11:11, Tamar Christina wrote: > Hi All, > > In PR114741 we see that we have a regression in codegen when SVE is enable > where > the simple testcase: > > void foo(unsigned v, unsigned *p) > { > *p = v & 1; > } > > generates > > foo: > fmovs31, w0 > and

Re: [PATCH] libgcc: Fix up __divmodbitint4 [PR114755]

2024-04-18 Thread Jakub Jelinek
On Thu, Apr 18, 2024 at 11:25:43AM +0200, Christophe Lyon wrote: > On Thu, 18 Apr 2024 at 09:37, Jakub Jelinek wrote: > > The following testcase aborts on aarch64-linux but does not on x86_64-linux. > > In both cases there is UB in the __divmodbitint4 implemenetation. > > When the divisor is

[PATCH]AArch64: remove reliance on register allocator for simd/gpreg costing. [PR114741]

2024-04-18 Thread Tamar Christina
Hi All, In PR114741 we see that we have a regression in codegen when SVE is enable where the simple testcase: void foo(unsigned v, unsigned *p) { *p = v & 1; } generates foo: fmovs31, w0 and z31.s, z31.s, #1 str s31, [x1] ret instead of: foo:

[PATCH v2] gcc-14: Add Ada changes

2024-04-18 Thread Marc Poulhiès
Co-authored-by: Fernando Oleo Blanco --- Hello Fernando, Thanks again for your changes. After consulting other colleagues, I'm proposing this revised version. Does that look ok to you? As it was simpler I've created a new commit with a Co-authored-by line, but can easily change that if you

Re: [PATCH] libgcc: Fix up __divmodbitint4 [PR114755]

2024-04-18 Thread Christophe Lyon
On Thu, 18 Apr 2024 at 09:37, Jakub Jelinek wrote: > > Hi! > > The following testcase aborts on aarch64-linux but does not on x86_64-linux. > In both cases there is UB in the __divmodbitint4 implemenetation. > When the divisor is negative with most significant limb (even when partial) > all ones,

Re: [PATCH, rs6000] Use bcdsub. instead of bcdadd. for bcd invalid number checking

2024-04-18 Thread Segher Boessenkool
On Thu, Apr 18, 2024 at 11:14:42AM +0800, Kewen.Lin wrote: > on 2024/4/18 10:01, HAO CHEN GUI wrote: > > This patch replace bcdadd. with bcdsub. for bcd invalid number checking. > > bcdadd on two same numbers might cause overflow which also set > > overflow/invalid bit so that we can't

[PATCH] libgfortran: Fix up the autoreconf warnings.

2024-04-18 Thread Iain Sandoe
@tschwinge since he did quite a bit of work on getting autoreconf to work in the GCC-13 cycle. This does not address the issues with regenerating lib code, but it does make things somewhat smoother for cases where the updates are only in Makefile.am, configure.ac or libtool.m4 for example. It is

Re: [PATCH] [vxworks] avoid mangling __STDC_VERSION_LIMITS_H__

2024-04-18 Thread Olivier Hainque
> On 16 Apr 2024, at 05:27, Alexandre Oliva wrote: > > > The mangling of the macro name that guards limits.h from reinclusion > was mangling a c23-required macro as well. Make the edit pattern > stricter. > > Regstrapped on x86_64-linux-gnu. Also tested with gcc-13 on arm-, > aarch64-,

Re: [PATCH] libstdc++: Support link chains in std::chrono::tzdb::locate_zone [PR114770]

2024-04-18 Thread Jonathan Wakely
On Thu, 18 Apr 2024 at 17:33, Jonathan Wakely wrote: > > This would fix the but, *fix the bug > how do people feel about it this close to the > gcc-14 release? > > Tested x86_64-linux.

Re: [PATCH] [testsuite] introduce strndup effective target

2024-04-18 Thread Mike Stump
On Apr 18, 2024, at 4:32 AM, Alexandre Oliva wrote: > > On Apr 16, 2024, Alexandre Oliva wrote: > >> * gcc.dg/builtin-dynamic-object-size-1.c: Likewise. >> * gcc.dg/builtin-dynamic-object-size-2.c: Likewise. >> * gcc.dg/builtin-dynamic-object-size-3.c: Likewise. >> *

Re: [PATCH 0/3] Recover in-tree libiconv build support

2024-04-18 Thread Kévin Le Gouguec
Arsen Arsenović writes: > Evening! > > This patchset recovers support for building the toolchain tree with > in-tree libiconv being used for host modules and gettext. As spotted by > Kévin Le Gouguec , I accidentally removed this > functionality earlier. > > This patchset includes the patch

Re: [PATCH] [libstdc++] introduce --disable-compat-libstdcxx-abi

2024-04-18 Thread Alexandre Oliva
On Apr 16, 2024, Jonathan Wakely wrote: >> +dnl >> +dnl Enable -Wabi=2 if not overridden by --disable-compat-libstdcxx-abi. >> +dnl >> +AC_DEFUN([GLIBCXX_ENABLE_WABI], [ >> + # Default. >> + WARN_FLAGS_WABI=\ -Wabi=2 >> + AC_MSG_CHECKING([for --disable-compat-libstdcxx-abi]) >> +

[PATCH] libstdc++: Support link chains in std::chrono::tzdb::locate_zone [PR114770]

2024-04-18 Thread Jonathan Wakely
This would fix the but, how do people feel about it this close to the gcc-14 release? Tested x86_64-linux. -- >8 -- Since 2022 the TZif format defined in the zic(8) man page has said that links can refer to other links, rather than only referring to a zone. This isn't supported by the C++20

[PATCH v1 0/6] Add DLL import/export implementation to AArch64

2024-04-18 Thread Evgeny Karpov
Hello, This is the second patch series, following the first patch series which introduced the aarch64-w64-mingw32 target. https://gcc.gnu.org/pipermail/gcc-patches/2024-February/thread.html#646203 https://gcc.gnu.org/pipermail/gcc-patches/2024-March/thread.html#647128

[PATCH v1 4/6] aarch64: Add selectany attribute handling

2024-04-18 Thread Evgeny Karpov
This patch extends the aarch64 attributes list with the selectany attribute for the aarch64-w64-mingw32 target and reuses the mingw implementation to handle it. * config/aarch64/aarch64.cc: Extend the aarch64 attributes list. * config/aarch64/cygming.h

[gcc-13 PATCH 1/2] libstdc++: Fix libstdc++exp.a so it really does contain Filesystem TS symbols

2024-04-18 Thread Jonathan Wakely
In r14-3812-gb96b554592c5cb I claimed that libstdc++exp.a now contains all the symbols from libstdc++fs.a as well as libstdc++_libbacktrace.a, but that wasn't true. Only the symbols from the latter were added to libstdc++exp.a, the Filesystem TS ones weren't. This seems to be because libtool won't

[gcc-13 PATCH 2/2] libstdc++: Add libstdc++_libbacktrace.a to libstdc++exp

2024-04-18 Thread Jonathan Wakely
This completes the fixes to put all experimental symbols into libstdc++exp.a. On trunk the libstdc++_libbacktrace.a was removed completely and its contents aded to libstdc++exp.a instead. We don't want to do that on the gcc-13 branch because it will break makefiles using it. We can add the

[committed] Add nios2*-*-* to the list of obsolete targets

2024-04-18 Thread Sandra Loosemore
I've committed the attach patch, per https://gcc.gnu.org/pipermail/gcc/2024-April/243749.html -SandraFrom 71ba5a721749174815dec712d113f3afb251deda Mon Sep 17 00:00:00 2001 From: Sandra Loosemore Date: Mon, 8 Apr 2024 14:36:08 + Subject: [committed] Add nios2*-*-* to the list of obsolete

Re: [PATCH v3] bpf: remove huge memory waste with string allocation.

2024-04-18 Thread David Faust
Hi Cupertino, On 4/18/24 13:58, Cupertino Miranda wrote: > Hi David, everyone, > > Following Davids last review I decided to properly detect error cases, > as suggested. > The error however should be reported earlier in compilation in > pack_enum_valud function, where all the errors are

[PATCH v1 1/6] Move mingw_* declarations to the mingw folder

2024-04-18 Thread Evgeny Karpov
This patch refactors recent changes to move mingw-related functionality to the mingw folder. More renamings to the mingw_ prefix will be done in follow-up commits. This is the first commit in the second patch series to add DLL import/export implementation to AArch64. Coauthors: Zac Walker , Mark

[committed, wwwdocs] gcc-14/changes.html: nios2 target is obsolete

2024-04-18 Thread Sandra Loosemore
I've committed the attached patch, per https://gcc.gnu.org/pipermail/gcc/2024-April/243749.html -SandraFrom a6afbd07ee3d669dc6ac396d68a99926a30818f9 Mon Sep 17 00:00:00 2001 From: Sandra Loosemore Date: Mon, 15 Apr 2024 17:17:35 + Subject: [committed, wwwdocs] gcc-14/changes.html: nios2

[PATCH v3] bpf: remove huge memory waste with string allocation.

2024-04-18 Thread Cupertino Miranda
Hi David, everyone, Following Davids last review I decided to properly detect error cases, as suggested. The error however should be reported earlier in compilation in pack_enum_valud function, where all the errors are reported. Thanks for the quick and detailed reviews. Regards, Cupertino The

[PATCH v1 6/6] aarch64: Add DLL import/export to AArch64 target

2024-04-18 Thread Evgeny Karpov
This patch reuses the MinGW implementation to enable DLL import/export functionality for the aarch64-w64-mingw32 target. It also modifies environment configurations for MinGW. gcc/ChangeLog: * config.gcc: Add winnt-dll.o, which contains the DLL import/export implementation.

[PATCH v1 5/6] Adjust DLL import/export implementation for AArch64

2024-04-18 Thread Evgeny Karpov
The DLL import/export mingw implementation, originally from ix86, requires minor adjustments to be compatible with AArch64. gcc/ChangeLog: * config/mingw/mingw32.h (defined): Use the correct DllMainCRTStartup entry function. * config/mingw/winnt-dll.cc (defined): Exclude

[PATCH v1 3/6] Rename functions for reuse in AArch64

2024-04-18 Thread Evgeny Karpov
This patch renames functions related to dllimport/dllexport and selectany functionality. These functions will be reused in the aarch64-w64-mingw32 target. gcc/ChangeLog: * config/i386/cygming.h (mingw_pe_record_stub): Rename functions in mingw folder which will be reused for

Re: [PATCH] libstdc++: Fix std::ranges::iota is not included in numeric [PR108760]

2024-04-18 Thread Patrick Palka
On Wed, 17 Apr 2024, Michael Levine (BLOOMBERG/ 919 3RD A) wrote: > This patch fixes GCC Bug 108760: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108760 > Before this patch, using std::ranges::iota required including > when it should have been sufficient to only include . > > When the patch

[gcc-13 PATCH 0/2] Replace libstdc++_libbacktrace.a with libstdc++exp.a

2024-04-18 Thread Jonathan Wakely
The first patch is a backport from trunk to fix the fact that I messed up the change to add all symbols from libstdc++fs.a into libstdc++exp.a, which was backported as r13-8207-g17acf9fbeb10d7. The change builds libstdc++fs.a twice, once to install it and once as a convenience library to be

Re: [gcc-13 PATCH 2/2] libstdc++: Add libstdc++_libbacktrace.a to libstdc++exp

2024-04-18 Thread Jonathan Wakely
On Thu, 18 Apr 2024 at 20:51, Jonathan Wakely wrote: > > This completes the fixes to put all experimental symbols into > libstdc++exp.a. > > On trunk the libstdc++_libbacktrace.a was removed completely and its > contents aded to libstdc++exp.a instead. We don't want to do that on the > gcc-13

[PATCH v1 2/6] Extract ix86 dllimport implementation to mingw

2024-04-18 Thread Evgeny Karpov
This patch extracts the ix86 implementation for expanding a SYMBOL into its corresponding dllimport, far-address, or refptr symbol. It will be reused in the aarch64-w64-mingw32 target. The implementation is copied as is from i386/i386.cc with minor changes to follow to the code style. Also this

Re: [PATCH v2 2/2] c++/modules: Fix instantiation of imported temploid friends [PR114275]

2024-04-18 Thread Nathaniel Shead
On Wed, Apr 17, 2024 at 02:02:21PM -0400, Patrick Palka wrote: > On Mon, 15 Apr 2024, Nathaniel Shead wrote: > > > I'm not a huge fan of always streaming 'imported_temploid_friends' for > > all decls, but I don't think it adds much performance cost over adding a > > new flag to categorise decls

Re: [PATCH v2 1/2] Driver: Add new -truncate option

2024-04-18 Thread Peter0x44
18 Apr 2024 7:26:27 am Richard Biener : On Thu, Apr 18, 2024 at 6:12 AM Peter Damianov wrote: This commit adds a new option to the driver that truncates one file after linking. Tested likeso: $ gcc hello.c -c $ du -h hello.o 4.0K  hello.o $ gcc hello.o -truncate hello $ ./a.out Hello

[PATCH] internal-fn: Temporarily disable flag_trapv during .{ADD,SUB,MUL}_OVERFLOW etc. expansion [PR114753]

2024-04-18 Thread Jakub Jelinek
Hi! __builtin_{add,sub,mul}_overflow{,_p} builtins are well defined for all inputs even for -ftrapv, and the -fsanitize=signed-integer-overflow ifns shouldn't abort in libgcc but emit the desired ubsan diagnostics or abort depending on -fsanitize* setting regardless of -ftrapv. The expansion of

[PATCH] libgcc: Fix up __divmodbitint4 [PR114755]

2024-04-18 Thread Jakub Jelinek
Hi! The following testcase aborts on aarch64-linux but does not on x86_64-linux. In both cases there is UB in the __divmodbitint4 implemenetation. When the divisor is negative with most significant limb (even when partial) all ones, has at least 2 limbs and the second most significant limb has

Re: [PATCH] internal-fn: Temporarily disable flag_trapv during .{ADD,SUB,MUL}_OVERFLOW etc. expansion [PR114753]

2024-04-18 Thread Richard Biener
On Thu, 18 Apr 2024, Jakub Jelinek wrote: > Hi! > > __builtin_{add,sub,mul}_overflow{,_p} builtins are well defined > for all inputs even for -ftrapv, and the -fsanitize=signed-integer-overflow > ifns shouldn't abort in libgcc but emit the desired ubsan diagnostics > or abort depending on

Re: [PATCH] libgcc: Fix up __divmodbitint4 [PR114755]

2024-04-18 Thread Richard Biener
On Thu, 18 Apr 2024, Jakub Jelinek wrote: > Hi! > > The following testcase aborts on aarch64-linux but does not on x86_64-linux. > In both cases there is UB in the __divmodbitint4 implemenetation. > When the divisor is negative with most significant limb (even when partial) > all ones, has at

Re: [PATCH v2 1/2] Driver: Add new -truncate option

2024-04-18 Thread Richard Biener
On Thu, Apr 18, 2024 at 6:12 AM Peter Damianov wrote: > > This commit adds a new option to the driver that truncates one file after > linking. > > Tested likeso: > > $ gcc hello.c -c > $ du -h hello.o > 4.0K hello.o > $ gcc hello.o -truncate hello > $ ./a.out > Hello world > $ du -h hello.o > $

Re: [PATCH v2 2/2] lto-wrapper: Truncate files using -truncate driver option [PR110710]

2024-04-18 Thread Richard Biener
On Thu, Apr 18, 2024 at 6:12 AM Peter Damianov wrote: > > This commit changes the Makefiles generated by lto-wrapper to no longer use > the "mv" and "touch" shell commands. These don't exist on Windows, so when the > Makefile attempts to call them, it results in errors like: > The system cannot