RE: [COMMITTED V3 1/4] RISC-V: Add non-vector types to dfa pipelines

2024-02-02 Thread Li, Pan2
Hi Edwin > I believe the only problematic failures are the 5 vls calling convention > ones where only 24 ld\\s+a[0-1],\\s*[0-9]+\\(sp\\) are found. Does this "only 24" comes from calling-convention-1.c? > This is what I'm getting locally (first instance of wrong match): > v32qi_RET1_ARG8: >

Re: [patch, libgfortran] PR111022 ES0.0E0 format gave ES0.dE0 output with d too high.

2024-02-02 Thread Steve Kargl
Jerry, The patch looks good to me, but please give Harald a chance to comment. -- steve On Fri, Feb 02, 2024 at 07:17:55PM -0800, Jerry D wrote: > On 1/30/24 12:36 PM, Harald Anlauf wrote: > > Hi Jerry, > > > > Am 30.01.24 um 19:15 schrieb Jerry D: > > > The attached patch attempts to fix the

Re: [patch, libgfortran] PR111022 ES0.0E0 format gave ES0.dE0 output with d too high.

2024-02-02 Thread Jerry D
On 1/30/24 12:36 PM, Harald Anlauf wrote: Hi Jerry, Am 30.01.24 um 19:15 schrieb Jerry D: The attached patch attempts to fix the handling of the EN0.0E0 and ES0.0E0 formatting by correctly calculating the number of digits needed for the exponents and building those exponents into the float

Re: [COMMITTED V3 1/4] RISC-V: Add non-vector types to dfa pipelines

2024-02-02 Thread Edwin Lu
On 2/1/2024 8:28 PM, Li, Pan2 wrote: Hi Edwin, Just rerun the newlib and there is no ICE but still 160 dump failures as below. Pan Hi Pan, Thanks for confirming! Having dump failures is expected. There are around 7 more unique failures than I expected

Re: [PATCH] Change gcc/ira-conflicts.cc build_conflict_bit_table to use size_t/%zu

2024-02-02 Thread Jakub Jelinek
On Fri, Feb 02, 2024 at 11:43:21PM +, Jonathan Yong wrote: > On 2/1/24 15:33, Jonathan Yong wrote: > > On 2/1/24 15:25, Jakub Jelinek wrote: > > > On Thu, Feb 01, 2024 at 03:55:51PM +0100, Jakub Jelinek wrote: > > > > No, besides the formatting being incorrect both in ChangeLog and in the > >

[PATCH] coreutils-sum-pr108666.c: fix spurious LLP64 warnings

2024-02-02 Thread Jonathan Yong
Attached patch OK? Fixes the following warnings: coreutils-sum-pr108666.c:17:1: warning: conflicting types for built-in function ‘memcpy’; expected ‘void *(void *, const void *, long long unsigned int)’ [-Wbuiltin-declaration-mismatch] 17 | memcpy(void* __restrict __dest, const void*

Re: [PATCH] Change gcc/ira-conflicts.cc build_conflict_bit_table to use size_t/%zu

2024-02-02 Thread Jonathan Yong
On 2/1/24 15:33, Jonathan Yong wrote: On 2/1/24 15:25, Jakub Jelinek wrote: On Thu, Feb 01, 2024 at 03:55:51PM +0100, Jakub Jelinek wrote: No, besides the formatting being incorrect both in ChangeLog and in the patch, this pessimizes ILP32 hosts unnecessarily. So like this instead?

libgo patch committed: Better error messages for unsupported target

2024-02-02 Thread Ian Lance Taylor
This libgo patch generates better error messages then the Go GOARCH and GOOS values can't be determined from the target. This indicates that the target is not supported. This is for GCC PR 113530. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

Go patch committed: Export the type "any" as a builtin

2024-02-02 Thread Ian Lance Taylor
This patch to the Go frontend exports the type "any" as a builtin. Otherwise we can't tell the difference between builtin type "any" and a locally defined type "any". This will require updates to the gccgo export data parsers in the main Go repo and the x/tools repo. These updates are

Re: [PATCH] combine: Don't optimize SIGN_EXTEND of MEM on WORD_REGISTER_OPERATIONS targets [PR113010]

2024-02-02 Thread Greg McGary
On 2/1/24 10:24 PM, Jeff Law wrote: On 2/1/24 18:24, Greg McGary wrote: However, for a machine where (WORD_REGISTER_OPERATIONS && load_extend_op (inner_mode) == SIGN_EXTEND), the high part of a PSoM is  only known at runtime as 0s or 1s. That's the downstream bug. The fix for such machines

[PATCH v5] x86-64: Find a scratch register for large model profiling

2024-02-02 Thread H.J. Lu
Changes in v5: 1. Add pr113689-3.c. 2. Use %r10 if ix86_profile_before_prologue () return true. 3. Try a callee-saved register which has been saved on stack in the prologue. Changes in v4: 1. Remove pr113689-3.c. 2. Use df_get_live_out. Changes in v3: 1. Remove r10_ok. Changes in v2: 1. Add

[PATCH] aarch64: Fix undefined code in vect_ctz_1.c

2024-02-02 Thread Andrew Pinski
The testcase gcc.target/aarch64/vect_ctz_1.c fails execution when running with -march=armv9-a due to the testcase calls __builtin_ctz with a value of 0. The testcase should not depend on undefined behavior of __builtin_ctz. So this changes it to use the g form with the 2nd argument of 32. Now the

Re: [PATCH 1/2] c++: requires-exprs and partial constraint subst [PR112769]

2024-02-02 Thread Jason Merrill
On 2/2/24 15:57, Patrick Palka wrote: On Fri, 2 Feb 2024, Patrick Palka wrote: On Fri, 2 Feb 2024, Jason Merrill wrote: On 2/2/24 14:41, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- In r11-3261-gb28b621ac67bee we made

Re: [PATCH 1/2] c++: requires-exprs and partial constraint subst [PR112769]

2024-02-02 Thread Patrick Palka
On Fri, 2 Feb 2024, Patrick Palka wrote: > On Fri, 2 Feb 2024, Jason Merrill wrote: > > > On 2/2/24 14:41, Patrick Palka wrote: > > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this > > > look OK for trunk? > > > > > > -- >8 -- > > > > > > In r11-3261-gb28b621ac67bee we made

Re: [PATCH 1/2] c++: requires-exprs and partial constraint subst [PR112769]

2024-02-02 Thread Patrick Palka
On Fri, 2 Feb 2024, Jason Merrill wrote: > On 2/2/24 14:41, Patrick Palka wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this > > look OK for trunk? > > > > -- >8 -- > > > > In r11-3261-gb28b621ac67bee we made tsubst_requires_expr never partially > > substitute into a

Re: [PATCH 1/2] c++: requires-exprs and partial constraint subst [PR112769]

2024-02-02 Thread Jason Merrill
On 2/2/24 14:41, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- In r11-3261-gb28b621ac67bee we made tsubst_requires_expr never partially substitute into a requires-expression so as to avoid checking its requirements out of order

Re: [PATCH 1/2] c++: requires-exprs and partial constraint subst [PR112769]

2024-02-02 Thread Jason Merrill
On 2/2/24 14:41, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? OK. -- >8 -- In r11-3261-gb28b621ac67bee we made tsubst_requires_expr never partially substitute into a requires-expression so as to avoid checking its requirements out of

[PATCH 2/2] c++: remove lookup_template_class's entering_scope flag

2024-02-02 Thread Patrick Palka
Bootstrapped and regtested on x86_64-pc-linux, does this look like an improvement? This is not a bugfix and barely related to the previous patch, but the previous patch's new use of entering_scope=true motivated me to submit this patch since it seems like a nice simplification. -- >8 --

[PATCH 1/2] c++: requires-exprs and partial constraint subst [PR112769]

2024-02-02 Thread Patrick Palka
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- In r11-3261-gb28b621ac67bee we made tsubst_requires_expr never partially substitute into a requires-expression so as to avoid checking its requirements out of order during e.g. generic lambda regeneration.

Re: [PATCH v4] x86-64: Find a scratch register for large model profiling

2024-02-02 Thread H.J. Lu
On Fri, Feb 02, 2024 at 05:10:05PM +0100, Jakub Jelinek wrote: > On Fri, Feb 02, 2024 at 07:42:00AM -0800, H.J. Lu wrote: > > --- a/gcc/config/i386/i386.cc > > +++ b/gcc/config/i386/i386.cc > > @@ -22749,6 +22749,39 @@ current_fentry_section (const char **name) > >return true; > > } > > > >

Re: [PATCH] Notes on the warnings-as-errors change in GCC 14

2024-02-02 Thread Jonathan Wakely
On 02/02/24 17:59 +0100, Florian Weimer wrote: --- htdocs/gcc-14/porting_to.html | 465 ++ 1 file changed, 465 insertions(+) base-commit: 15056edbb60e24a6410d9b75f7386de28ea60bc1 diff --git a/htdocs/gcc-14/porting_to.html b/htdocs/gcc-14/porting_to.html

[pushed] c++: op== defaulted outside class [PR110084]

2024-02-02 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- defaulted_late_check is for checks that need to happen after the class is complete; we shouldn't call it sooner. PR c++/110084 gcc/cp/ChangeLog: * pt.cc (tsubst_function_decl): Only check a function defaulted

Re: [PATCH 1/2] libdecnumber: fixed undefined behavior in `decFloatFMA`

2024-02-02 Thread Ian McCormack
I've confirmed that these changes fix the error in MIRI, too. I'll post an updated patch once I confirm that there aren't any regressions. On Fri, Feb 2, 2024 at 10:38 AM Jakub Jelinek wrote: > On Fri, Feb 02, 2024 at 04:32:09PM +0100, Jakub Jelinek wrote: > > Anyway, I think all of > >

[committed] hppa: Implement TARGET_ATOMIC_ASSIGN_EXPAND_FENV

2024-02-02 Thread John David Anglin
Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11.11. This is the first step in fixing PR target/59778. libatomic/fenv.c needs fixing for hppa so exceptions are correctly raised. Committed to trunk. Dave --- hppa: Implement TARGET_ATOMIC_ASSIGN_EXPAND_FENV This change implements

Re: [PATCH] Notes on the warnings-as-errors change in GCC 14

2024-02-02 Thread Jonathan Wakely
On 02/02/24 17:59 +0100, Florian Weimer wrote: --- htdocs/gcc-14/porting_to.html | 465 ++ 1 file changed, 465 insertions(+) base-commit: 15056edbb60e24a6410d9b75f7386de28ea60bc1 diff --git a/htdocs/gcc-14/porting_to.html b/htdocs/gcc-14/porting_to.html

Re: [PATCH] libgcc, v2: Fix up _BitInt division [PR113604]

2024-02-02 Thread Joseph Myers
On Wed, 31 Jan 2024, Jakub Jelinek wrote: > Hi! > > On Sat, Jan 27, 2024 at 08:53:42AM +0100, Jakub Jelinek wrote: > > The following testcase ends up with SIGFPE in __divmodbitint4. > > The problem is a thinko in my attempt to implement Knuth's algorithm. > > Here is an updated version of the

[PATCH] Notes on the warnings-as-errors change in GCC 14

2024-02-02 Thread Florian Weimer
--- htdocs/gcc-14/porting_to.html | 465 ++ 1 file changed, 465 insertions(+) diff --git a/htdocs/gcc-14/porting_to.html b/htdocs/gcc-14/porting_to.html index 3e4cedc3..4c8f9c8f 100644 --- a/htdocs/gcc-14/porting_to.html +++ b/htdocs/gcc-14/porting_to.html

Re: [PATCH] libstdc++: atomic: Add missing clear_padding in __atomic_float constructor

2024-02-02 Thread xndcn
Thank you for your careful review! > But we don't need a new one if it's going to be used in exactly one test and > if the new option does the same thing for all targets that run the test. Got it, thanks. Now add option "-latomic" directly, but it still rely on the trick "[atomic_link_flags

Re: [PATCH] c++: Don't advertise cxx_constexpr_string_builtins [PR113658]

2024-02-02 Thread Marek Polacek
On Fri, Feb 02, 2024 at 05:32:31PM +0100, Jakub Jelinek wrote: > On Fri, Feb 02, 2024 at 11:27:09AM -0500, Marek Polacek wrote: > > > With -pedantic-errors we would have __has_extension behaving like > > > __has_feature, and I wanted to check in the test that this doesn't get > > > reported as a

Re: [PATCH] c++: Don't advertise cxx_constexpr_string_builtins [PR113658]

2024-02-02 Thread Jakub Jelinek
On Fri, Feb 02, 2024 at 11:27:09AM -0500, Marek Polacek wrote: > > With -pedantic-errors we would have __has_extension behaving like > > __has_feature, and I wanted to check in the test that this doesn't get > > reported as a feature or extension. > > Oh I see. A comment to that effect might be

Re: [PATCH] c++: Don't advertise cxx_constexpr_string_builtins [PR113658]

2024-02-02 Thread Marek Polacek
On Fri, Feb 02, 2024 at 03:45:48PM +, Alex Coplan wrote: > On 02/02/2024 09:34, Marek Polacek wrote: > > On Fri, Feb 02, 2024 at 10:27:23AM +, Alex Coplan wrote: > > > Bootstrapped/regtested on x86_64-apple-darwin, OK for trunk? > > > > > > Thanks, > > > Alex > > > > > > -- >8 -- > > >

Re: [PATCH v4] x86-64: Find a scratch register for large model profiling

2024-02-02 Thread Jakub Jelinek
On Fri, Feb 02, 2024 at 07:42:00AM -0800, H.J. Lu wrote: > --- a/gcc/config/i386/i386.cc > +++ b/gcc/config/i386/i386.cc > @@ -22749,6 +22749,39 @@ current_fentry_section (const char **name) >return true; > } > > +/* Return an caller-saved register, which isn't live, at entry for > +

[PATCH] gcc: configure: Fix the optimization flags cleanup

2024-02-02 Thread Slava Barinov
Currently sed command in flag cleanup removes all the -O[0-9] flags, ignoring the context. This leads to issues when the optimization flags is passed to linker: CFLAGS="-Os -Wl,-O1 -Wl,--hash-style=gnu" is converted into CFLAGS="-Os -Wl,-Wl,--hash-style=gnu" Which leads to configure failure with

[pushed] testsuite, Darwin: Allow for undefined symbols in shared test.

2024-02-02 Thread Iain Sandoe
tested on i686, x86_64 Darwin, x86_64, aarch64 linux, pushed to trunk, thanks, Iain --- 8< --- Darwin's linker defaults to error on undefined (which makes it look as if we do not support shared, leading to tests being marked incorrectly as unsupported). This fixes the issue by allowing the

Re: [PATCH] c++: Don't advertise cxx_constexpr_string_builtins [PR113658]

2024-02-02 Thread Alex Coplan
On 02/02/2024 09:34, Marek Polacek wrote: > On Fri, Feb 02, 2024 at 10:27:23AM +, Alex Coplan wrote: > > Bootstrapped/regtested on x86_64-apple-darwin, OK for trunk? > > > > Thanks, > > Alex > > > > -- >8 -- > > > > When __has_feature was introduced for GCC 14, I included the feature > >

Re: [PATCH v2] x86-64: Find a scratch register for large model profiling

2024-02-02 Thread H.J. Lu
On Fri, Feb 2, 2024 at 4:22 AM Jakub Jelinek wrote: > > On Thu, Feb 01, 2024 at 03:02:47PM -0800, H.J. Lu wrote: > > @@ -2763,6 +2789,8 @@ construct_container (machine_mode mode, machine_mode > > orig_mode, > >{ > >case X86_64_INTEGER_CLASS: > >case

[PATCH v4] x86-64: Find a scratch register for large model profiling

2024-02-02 Thread H.J. Lu
Changes in v4: 1. Remove pr113689-2.c. 2. Use df_get_live_out. Changes in v3: 1. Remove r10_ok. Changes in v2: 1. Add int_parameter_registers to machine_function to track integer registers used for parameter passing. 2. Update x86_64_select_profile_regnum to try %r10 first and use an

Re: [PATCH 1/2] libdecnumber: fixed undefined behavior in `decFloatFMA`

2024-02-02 Thread Jakub Jelinek
On Fri, Feb 02, 2024 at 04:32:09PM +0100, Jakub Jelinek wrote: > Anyway, I think all of > decBasic.c: for (; UBTOUI(umsd)==0 && umsd+3 decBasic.c: for (; *umsd==0 && umsd decBasic.c: for (; UBTOUI(hi->msd)==0 && hi->msd+3lsd;) hi->msd+=4; > decBasic.c: for (; *hi->msd==0 && hi->msdlsd;)

Re: [PATCH 1/2] libdecnumber: fixed undefined behavior in `decFloatFMA`

2024-02-02 Thread Jakub Jelinek
On Fri, Feb 02, 2024 at 10:09:05AM -0500, Ian McCormack wrote: > This patch fixes a minor instance of undefined behavior in libdecnumber. It > was discovered in the Rust bindings for libdecnumber (`dec`) using a custom > version of MIRI that can execute foreign functions. > > Within the

[PATCH] testsuite: Fix c-c++-common/pr103798-2.c on Solaris [PR113706]

2024-02-02 Thread Rainer Orth
c-c++-common/pr103798-2.c FAILs on Solaris when compiled as C++: FAIL: c-c++-common/pr103798-2.c -std=gnu++14 scan-assembler-not memchr FAIL: c-c++-common/pr103798-2.c -std=gnu++17 scan-assembler-not memchr FAIL: c-c++-common/pr103798-2.c -std=gnu++20 scan-assembler-not memchr FAIL:

Re: [PATCH 1/2] bitint: Use TARGET_ARRAY_MODE for large bitints where target supports it

2024-02-02 Thread Jakub Jelinek
On Thu, Jan 25, 2024 at 05:45:00PM +, Andre Vieira wrote: > > This patch ensures we use TARGET_ARRAY_MODE to determine the storage mode of > large bitints that are represented as arrays in memory. This is required to > support such bitints for aarch64 and potential other targets with similar

[PATCH 2/2] libdecnumber: fixed undefined behavior in decNumberGetBCD.

2024-02-02 Thread Ian McCormack
This patch fixes a minor instance of undefined behavior in libdecnumber. It was discovered in the Rust bindings for libdecnumber (`dec`) using a custom version of MIRI that can execute foreign functions. On the last iteration of the `while` loop in `decNumberGetBCD`, the pointer `up` will be

[PATCH 1/2] libdecnumber: fixed undefined behavior in `decFloatFMA`

2024-02-02 Thread Ian McCormack
This patch fixes a minor instance of undefined behavior in libdecnumber. It was discovered in the Rust bindings for libdecnumber (`dec`) using a custom version of MIRI that can execute foreign functions. Within the function `decFloatFMA`, the pointer `lo->msd` is initialized to point to a byte

Re: [PATCH v4 4/5] Add tests for C/C++ musttail attributes

2024-02-02 Thread Andi Kleen
> Sorry, I wasn't clear about this in previous patch -- noipa will > subsume other ipa attributes, > so there's no need to have noinline, noclone along with noipa. > int __attribute__((noipa)) callee(int i) should be sufficient for > disabling IPA optimizations involving callee. I thought you

Re: Updated musttail patches

2024-02-02 Thread Andi Kleen
On Fri, Feb 02, 2024 at 01:18:06PM +, Joseph Myers wrote: > On Fri, 2 Feb 2024, Andi Kleen wrote: > > > This patchkit implements a [[musttail]] attribute for C/C++. > > > > v4: > > Addressed all feedback except clang::musttail is still supported > > (I don't want to force an #ifdef to most

Re: [PATCH 2/2] aarch64: Add support for _BitInt

2024-02-02 Thread Jakub Jelinek
On Thu, Jan 25, 2024 at 05:45:01PM +, Andre Vieira wrote: > This patch adds support for C23's _BitInt for the AArch64 port when compiling > for little endianness. Big Endianness requires further target-agnostic > support and we therefor disable it for now. > > gcc/ChangeLog: > > *

Re: [PATCH] libgcc: Include stdlib.h for abort() on mingw32

2024-02-02 Thread Jeff Law
On 1/30/24 10:04, Khem Raj wrote: libgcc/ * config/i386/enable-execute-stack-mingw32.c: Include stdlib.h for abort() definition. Thanks. Pushed to the trunk. jeff

[committed] libstdc++: Make std::function deduction guide support explicit object functions [PR113335]

2024-02-02 Thread Jonathan Wakely
Teted x86_64-linux. Pushed to trunk. -- >8 -- This makes the deduction guides for std::function and std::packaged_task work for explicit object member functions, i.e. "deducing this", as per LWG 3617. libstdc++-v3/ChangeLog: PR libstdc++/113335 * include/bits/std_function.h

Re: [PATCH 2/2] rtl-optimization/113255 - avoid re-associating REG_POINTER MINUS

2024-02-02 Thread Jeff Law
On 2/1/24 07:20, Richard Biener wrote: The following avoids re-associating (minus:DI (reg/f:DI 119) (minus:DI (reg/f:DI 120) (reg/f:DI 114))) into (minus:DI (plus:DI (reg/f:DI 114) (reg/f:DI 119)) (reg/f:DI 120)) as that possibly confuses the REG_POINTER

Re: [PATCH] c++: Don't advertise cxx_constexpr_string_builtins [PR113658]

2024-02-02 Thread Marek Polacek
On Fri, Feb 02, 2024 at 10:27:23AM +, Alex Coplan wrote: > Bootstrapped/regtested on x86_64-apple-darwin, OK for trunk? > > Thanks, > Alex > > -- >8 -- > > When __has_feature was introduced for GCC 14, I included the feature > cxx_constexpr_string_builtins, since of the relevant string

Re: [PATCH] Fix some of vect-avg-*.c testcases

2024-02-02 Thread Jeff Law
On 1/29/24 22:19, Andrew Pinski wrote: The vect-avg-*.c testcases are trying to make sure the AVG internal function are used and not doing promotion to `vector unsigned short` but when V4QI is implemented, `vector(2) unsigned short` shows up in the detail dump file and causes the failure. To

Re: [PATCH] testsuite, ubsan: Add libstdc++ deps where required.

2024-02-02 Thread Jeff Law
On 1/30/24 03:31, Iain Sandoe wrote: tested on i686, x86_64 (and aarch64) Darwin, x86_64, aarch64 Linux, OK for trunk? thanks Iain --- 8< --- We use the ubsan tests from both C, C++, D and Fortran. the sanitizer libraries link to libstdc++. When we are using the C/gdc/gfortran driver, and

Re: [PATCH] testsuite, asan, hwsan: Add libstdc++ deps where required.

2024-02-02 Thread Jeff Law
On 1/30/24 03:30, Iain Sandoe wrote: tested on i686, x86_64 (and aarch64) Darwin, x86_64, aarch64 Linux, OK for trunk? thanks Iain --- 8< --- We use the shared asan/hwasan from both C,C++,D and Fortran. The sanitizer libraries link to libstdc++. When we are using the C/gdc/gfortran driver,

[committed] libstdc++: Fix experimental/names.cc failure on AIX

2024-02-02 Thread Jonathan Wakely
Tested x86_64-linux and powerpc-ibm-aix7.3.1.0. Pushed to trunk. -- >8 -- This fails due to "u" being used in a system header. FAIL: experimental/names.cc -std=gnu++17 (test for excess errors) Excess errors: /usr/include/sys/poll.h:77: error: expected unqualified-id before ';' token

[PATCH] libstdc++: Add copyright and license text to new generated headers

2024-02-02 Thread Jonathan Wakely
These new headers should probably have the usual boilerplate at the top, so make the Python scripts output it. -- >8 -- contrib/ChangeLog: * unicode/gen_libstdcxx_unicode_data.py: Add copyright and license text to the output. libstdc++-v3/ChangeLog: *

Re: Updated musttail patches

2024-02-02 Thread Joseph Myers
On Fri, 2 Feb 2024, Andi Kleen wrote: > This patchkit implements a [[musttail]] attribute for C/C++. > > v4: > Addressed all feedback except clang::musttail is still supported > (I don't want to force an #ifdef to most users) and I'm also still I'm fine with supporting [[clang::musttail]].

Re: [PATCH][gcc-13] libstdc++: Add Filesystem TS and std::stacktrace symbols to libstdc++exp.a

2024-02-02 Thread Jonathan Wakely
On Tue, 9 Jan 2024 at 12:44, Jonathan Wakely wrote: > > I was talking to Matthias Klose about enabling libstdc++_libbacktrace.a > for Ubuntu's gcc package and I realised that it would be preferable if > the gcc-13 branch had those libbacktrace symbols in libstdc++exp.a. I > already did that for

Re: [Patch, stage-1, RFC]: i386: attribute regparm/stdcall and vaargs

2024-02-02 Thread Joseph Myers
On Fri, 2 Feb 2024, Bernhard Reutner-Fischer via Gcc wrote: > Hi Joseph! > > On Tue, 30 Jan 2024 14:54:49 + (UTC) > Joseph Myers wrote: > > > On Tue, 30 Jan 2024, Bernhard Reutner-Fischer via Gcc wrote: > > > > > * builtin-attrs.def (ATTR_TM_NOTHROW_RT_LIST): Use ATTR_NOTHROW_LIST > > >

Re: [PATCH] libstdc++: Fix libstdc++exp.a so it really does contain Filesystem TS symbols

2024-02-02 Thread Jonathan Wakely
On 02/02/24 12:14 +, Jonathan Wakely wrote: This should fix the problem that libstdc++exp.a doesn't actually contain the symbols from libstdc++fs.a, despite me claiming it did. This increases the size of libstdc++exp.a considerably, because now it really does contain what I intended it to

[PATCH] libstdc++: Fix libstdc++exp.a so it really does contain Filesystem TS symbols

2024-02-02 Thread Jonathan Wakely
This should fix the problem that libstdc++exp.a doesn't actually contain the symbols from libstdc++fs.a, despite me claiming it did. This increases the size of libstdc++exp.a considerably, because now it really does contain what I intended it to contain. We might be able to avoid that increased

Re: [PATCH v2] x86-64: Find a scratch register for large model profiling

2024-02-02 Thread Jakub Jelinek
On Thu, Feb 01, 2024 at 03:02:47PM -0800, H.J. Lu wrote: > @@ -2763,6 +2789,8 @@ construct_container (machine_mode mode, machine_mode > orig_mode, >{ >case X86_64_INTEGER_CLASS: >case X86_64_INTEGERSI_CLASS: > + if (!in_return) > + set_int_parameter_registers_bit

Re: [PATCH] x86-64: Find a scratch register for large model profiling

2024-02-02 Thread H.J. Lu
On Fri, Feb 2, 2024 at 4:07 AM wrote: > > On 2 February 2024 00:02:54 CET, "H.J. Lu" wrote: > >On Thu, Feb 1, 2024 at 10:32 AM Jakub Jelinek wrote: > >> > >> On Thu, Feb 01, 2024 at 10:15:30AM -0800, H.J. Lu wrote: > >> > --- a/gcc/config/i386/i386.cc > >> > +++ b/gcc/config/i386/i386.cc > >> >

[PATCH v3] x86-64: Find a scratch register for large model profiling

2024-02-02 Thread H.J. Lu
Changes in v3: 1. Remove r10_ok. Changes in v2: 1. Add int_parameter_registers to machine_function to track integer registers used for parameter passing. 2. Update x86_64_select_profile_regnum to try %r10 first and use an caller-saved register, which isn't used for parameter passing. --- 2

Re: [PATCH] x86-64: Find a scratch register for large model profiling

2024-02-02 Thread rep . dot . nop
On 2 February 2024 00:02:54 CET, "H.J. Lu" wrote: >On Thu, Feb 1, 2024 at 10:32 AM Jakub Jelinek wrote: >> >> On Thu, Feb 01, 2024 at 10:15:30AM -0800, H.J. Lu wrote: >> > --- a/gcc/config/i386/i386.cc >> > +++ b/gcc/config/i386/i386.cc >> > @@ -22749,6 +22749,31 @@ current_fentry_section (const

Re: [PATCH v2] arm: Fix missing bti instruction for virtual thunks

2024-02-02 Thread Richard Earnshaw (lists)
On 26/01/2024 15:31, Richard Ball wrote: > v2: Formatting and test options fix. > > Adds missing bti instruction at the beginning of a virtual > thunk, when bti is enabled. > > gcc/ChangeLog: > > * config/arm/arm.cc (arm_output_mi_thunk): Emit > insn for bti_c when bti is enabled. >

Re: [PATCH v4 4/5] Add tests for C/C++ musttail attributes

2024-02-02 Thread Prathamesh Kulkarni
On Fri, 2 Feb 2024 at 14:44, Andi Kleen wrote: > > Mostly adopted from the existing C musttail plugin tests. > > gcc/testsuite/ChangeLog: > > * c-c++-common/musttail1.c: New test. > * c-c++-common/musttail2.c: New test. > * c-c++-common/musttail3.c: New test. > *

Re: [Patch, stage-1, RFC]: i386: attribute regparm/stdcall and vaargs

2024-02-02 Thread Bernhard Reutner-Fischer
Hi Joseph! On Tue, 30 Jan 2024 14:54:49 + (UTC) Joseph Myers wrote: > On Tue, 30 Jan 2024, Bernhard Reutner-Fischer via Gcc wrote: > > > * builtin-attrs.def (ATTR_TM_NOTHROW_RT_LIST): Use ATTR_NOTHROW_LIST > > instead of ATTR_TM_NOTHROW_LIST, thus removing ATTR_TM_REGPARM. > >

[committed] libgcc: Export XF, TF, HF and BFmode specific _BitInt symbols from libgcc_s.so.1 [PR113700]

2024-02-02 Thread Jakub Jelinek
Hi! Rainer pointed out that __PFX__ and __FIXPTPFX__ prefix replacement is done solely for libgcc-std.ver.in and not for the *.ver files in config. I've used the __PFX__ prefix even in config/i386/libgcc-glibc.ver because it was used for similar symbols in libgcc-std.ver.in, and that results in

Re: [PATCH] gcc/configure: Re-introduce INSTALL_INFO

2024-02-02 Thread Christophe Lyon
On Fri, 2 Feb 2024 at 11:10, wrote: > > On 1 February 2024 18:15:34 CET, Christophe Lyon > wrote: > >BUILD_INFO is currently a byproduct of checking makeinfo > >presence/version. INSTALL_INFO used to be defined similarly, but was > >removed in 2000 (!) by commit

[committed, gcc-12] libstdc++: Force-inline shared_ptr::operator bool() for C++20 [PR108636]

2024-02-02 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to releases/gcc-12 branch. -- >8 -- This avoids a linker error with -fkeep-inline-functions when including . We can't backport the fix from trunk because it adds an export to the shared library. By marking the "missing" symbol always_inline for C++20 mode we don't

[committed] libstdc++: Implement some missing functions for net::ip::network_v6

2024-02-02 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/experimental/internet (network_v6::network): Define. (network_v6::hosts): Finish implementing. (network_v6::to_string): Do not concatenate std::string to arbitrary std::basic_string

[committed 2/2] libstdc++: Fix invalid order in PSTL inplace_merge test [PR90276]

2024-02-02 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- This looks like a typo in the upstream test that causes a failure in debug mode. It has been reported upstream. libstdc++-v3/ChangeLog: PR libstdc++/90276 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Fix

[committed 1/2] libstdc++: Avoid reusing moved-from iterators in PSTL tests [PR90276]

2024-02-02 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- The reverse_invoker utility for PSTL tests uses forwarding references for all parameters, but some of those parameters get forwarded to move constructors which then leave the objects in a moved-from state. When the parameters are forwarded a second

[PATCH] c++: Don't advertise cxx_constexpr_string_builtins [PR113658]

2024-02-02 Thread Alex Coplan
Bootstrapped/regtested on x86_64-apple-darwin, OK for trunk? Thanks, Alex -- >8 -- When __has_feature was introduced for GCC 14, I included the feature cxx_constexpr_string_builtins, since of the relevant string builtins that GCC implements, it seems to support constexpr evaluation of those

[committed] libstdc++: Allow explicit conversion of string views with different traits

2024-02-02 Thread Jonathan Wakely
Tested aarch64-linux. Pushed to trunk. -- >8 -- This was changed by LWG 3857. libstdc++-v3/ChangeLog: * include/std/string_view (basic_string_view(R&&)): Remove constraint that traits_type must be the same, as per LWG 3857. *

[committed] libstdc++: Remove noexcept from std::osyncstream::operator=

2024-02-02 Thread Jonathan Wakely
Tested aarch64-linux. Pushed to trunk. -- >8 -- This should not be noexcept because its _M_syncbuf member has a potentially-throwing move assignment operator. The noexcept was removed by LWG 3867. libstdc++-v3/ChangeLog: * include/std/syncstream (basic_osyncstream::operator=): Remove

[committed] libstdc++: Remove noexcept from std::generator::promise_type::yield_value

2024-02-02 Thread Jonathan Wakely
Tested aarch64-linux. Pushed to trunk. -- >8 -- This overload of std::generator::promise_type::yield_value calls things which might throw, so should not be noexcept. The noexcept was remove by LWG 3894. libstdc++-v3/ChangeLog: * include/std/generator (promise_type::yield_value): Remove

Re: [PATCH] testsuite: i386: Fix gcc.target/i386/pr71321.c on Solaris/x86

2024-02-02 Thread Uros Bizjak
On Fri, Feb 2, 2024 at 9:59 AM Rainer Orth wrote: > > gcc.target/i386/pr71321.c FAILs on 64-bit Solaris/x86 with the native > assembler: > > FAIL: gcc.target/i386/pr71321.c scan-assembler-not lea.*0 > > The problem is that /bin/as doesn't fully support cfi directives, so the > .eh_frame section

Re: [PATCH]middle-end: check memory accesses in the destination block [PR113588].

2024-02-02 Thread Richard Biener
> Am 01.02.2024 um 22:34 schrieb Tamar Christina : > >  >> >>> >>> If the above is correct then I think I understand what you're saying and >>> will update the patch and do some Checks. >> >> Yes, I think that's what I wanted to say. >> > > As discussed: > > Bootstrapped Regtested on

Re: [PATCH] lower-bitint: Handle uninitialized large/huge SSA_NAMEs as inline asm inputs [PR113699]

2024-02-02 Thread Richard Biener
> Am 02.02.2024 um 10:41 schrieb Jakub Jelinek : > > Hi! > > Similar problem to calls with uninitialized large/huge _BitInt SSA_NAME > arguments, var_to_partition will not work for those, but unlike calls > where we just create a new uninitialized SSA_NAME here we need to change > the inline

Re: [PATCH] lower-bitint: Handle casts from large/huge _BitInt to pointer/reference types [PR113692]

2024-02-02 Thread Richard Biener
> Am 02.02.2024 um 10:53 schrieb Jakub Jelinek : > > Hi! > > I thought one needs to cast first to pointer-sized integer before casting to > pointer, but apparently that is not the case. > So the following patch arranges for the large/huge _BitInt to > pointer/reference conversions to use the

Re: [PATCH] tree-ssa-math-opts: Fix is_widening_mult_rhs_p - unbreak bootstrap [PR113705]

2024-02-02 Thread Richard Biener
> Am 01.02.2024 um 23:46 schrieb Jakub Jelinek : > > On Tue, Jan 30, 2024 at 07:33:10AM -, Roger Sayle wrote: > + wide_int bits = wide_int::from (tree_nonzero_bits (rhs), > >

Re: [PATCH] gcc/configure: Re-introduce INSTALL_INFO

2024-02-02 Thread rep . dot . nop
On 1 February 2024 18:15:34 CET, Christophe Lyon wrote: >BUILD_INFO is currently a byproduct of checking makeinfo >presence/version. INSTALL_INFO used to be defined similarly, but was >removed in 2000 (!) by commit 17db658241d18cf6db59d31bc2d6eac96e9257df >(svn r38141). > >In order to save

Re: [PATCH] LoongArch: libsanitizer: Enable build lsan and tsan for loongarch64.

2024-02-02 Thread Jakub Jelinek
On Tue, Jan 30, 2024 at 10:09:51AM +0800, Lulu Cheng wrote: > From: chenguoqi > > libsanitizer/ChangeLog: > > * configure.tgt: Enable tsan and lsan for loongarch64. > * tsan/Makefile.am: Add tsan_rtl_loongarch64.S to > EXTRA_libtsan_la_SOURCES. This line is too long and should

[PATCH] LoongArch: Avoid out-of-bounds access in loongarch_symbol_insns

2024-02-02 Thread Xi Ruoyao
We call loongarch_symbol_insns with mode = MAX_MACHINE_MODE sometimes. But in loongarch_symbol_insns: if (LSX_SUPPORTED_MODE_P (mode) || LASX_SUPPORTED_MODE_P (mode)) return 0; And LSX_SUPPORTED_MODE_P is defined as: #define LSX_SUPPORTED_MODE_P(MODE) \ (ISA_HAS_LSX \

[PATCH] testsuite: Add another bitint testcase [PR113691]

2024-02-02 Thread Jakub Jelinek
Hi! This is fixed by the PR113692 patch. Will commit as obvious if that patch makes it in. 2024-02-02 Jakub Jelinek PR tree-optimization/113691 * gcc.dg/bitint-83.c: New test. --- gcc/testsuite/gcc.dg/bitint-83.c.jj 2024-02-01 12:32:39.555709390 +0100 +++

[PATCH] lower-bitint: Handle casts from large/huge _BitInt to pointer/reference types [PR113692]

2024-02-02 Thread Jakub Jelinek
Hi! I thought one needs to cast first to pointer-sized integer before casting to pointer, but apparently that is not the case. So the following patch arranges for the large/huge _BitInt to pointer/reference conversions to use the same code as for conversions of them to small integral types.

Re: [PATCH] RISC-V: Expand VLMAX scalar move in reduction

2024-02-02 Thread Kito Cheng
LGTM :) On Fri, Feb 2, 2024 at 9:58 AM Juzhe-Zhong wrote: > > This patch fixes the following: > > vsetvli a5,a1,e32,m1,tu,ma > sllia4,a5,2 > sub a1,a1,a5 > vle32.v v2,0(a0) > add a0,a0,a4 > vadd.vv v1,v2,v1 > bne a1,zero,.L3

[PATCH] lower-bitint: Handle uninitialized large/huge SSA_NAMEs as inline asm inputs [PR113699]

2024-02-02 Thread Jakub Jelinek
Hi! Similar problem to calls with uninitialized large/huge _BitInt SSA_NAME arguments, var_to_partition will not work for those, but unlike calls where we just create a new uninitialized SSA_NAME here we need to change the inline asm input to be an uninitialized VAR_DECL. Bootstrapped/regtested

Re: [PATCH]middle-end: check memory accesses in the destination block [PR113588].

2024-02-02 Thread Toon Moene
On 2/1/24 22:33, Tamar Christina wrote: Bootstrapped Regtested on aarch64-none-linux-gnu and x86_64-pc-linux-gnu no issues. Also checked both with --enable-lto --with-build-config='bootstrap-O3 bootstrap-lto' --enable-multilib and --enable-lto --with-build-config=bootstrap-O3

[PATCH v4 2/5] C++: Support clang compatible [[musttail]] (PR83324)

2024-02-02 Thread Andi Kleen
This patch implements a clang compatible [[musttail]] attribute for returns. musttail is useful as an alternative to computed goto for interpreters. With computed goto the interpreter function usually ends up very big which causes problems with register allocation and other per function

[PATCH v4 3/5] C: Implement musttail attribute for returns

2024-02-02 Thread Andi Kleen
Implement a C23 clang compatible musttail attribute similar to the earlier C++ implementation in the C parser. PR83324 gcc/c/ChangeLog: * c-parser.cc (struct attr_state): Define with musttail_p. (c_parser_statement_after_labels): Handle [[musttail]]

[PATCH v4 5/5] Add documentation for musttail attribute

2024-02-02 Thread Andi Kleen
gcc/ChangeLog: * doc/extend.texi: Document [[musttail]] --- gcc/doc/extend.texi | 16 1 file changed, 16 insertions(+) diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 142e41ab8fbf..866f6c4a9fed 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@

Updated musttail patches

2024-02-02 Thread Andi Kleen
This patchkit implements a [[musttail]] attribute for C/C++. v4: Addressed all feedback except clang::musttail is still supported (I don't want to force an #ifdef to most users) and I'm also still using the lookup/remove_attributes (not clear if anything else is worth it and it would certainly be

[PATCH v4 4/5] Add tests for C/C++ musttail attributes

2024-02-02 Thread Andi Kleen
Mostly adopted from the existing C musttail plugin tests. gcc/testsuite/ChangeLog: * c-c++-common/musttail1.c: New test. * c-c++-common/musttail2.c: New test. * c-c++-common/musttail3.c: New test. * c-c++-common/musttail4.c: New test. *

[PATCH v4 1/5] Improve must tail in RTL backend

2024-02-02 Thread Andi Kleen
- Give error messages for all causes of non sibling call generation - Don't override choices of other non sibling call checks with must tail. This causes ICEs. The must tail attribute now only overrides flag_optimize_sibling_calls locally. - Error out when tree-tailcall failed to mark a must-tail

[COMMITTED] testsuite: i386: Fix gcc.target/i386/sse2-stv-1.c on Solaris/x86

2024-02-02 Thread Rainer Orth
gcc.target/i386/sse2-stv-1.c FAILs on 32-bit Solaris/x86: FAIL: gcc.target/i386/sse2-stv-1.c scan-assembler-not %[er]sp FAIL: gcc.target/i386/sse2-stv-1.c scan-assembler-not shldl The test assumes the Linux/x86 default of -mno-stackrealign, while 32-bit Solaris/x86 default to -mstackrealign.

[COMMITTED] testsuite: i386: Restrict gcc.target/i386/pr80569.c to gas

2024-02-02 Thread Rainer Orth
gcc.target/i386/pr80569.c FAILs on Solaris/x86 with the native assembler: FAIL: gcc.target/i386/pr80569.c (test for excess errors) Excess errors: Assembler: pr80569.c "/var/tmp//ccm4_iqb.s", line 2 : Illegal mnemonic Near line: ".code16gcc" "/var/tmp//ccm4_iqb.s",

[PATCH] testsuite: i386: Fix gcc.target/i386/pr71321.c on Solaris/x86

2024-02-02 Thread Rainer Orth
gcc.target/i386/pr71321.c FAILs on 64-bit Solaris/x86 with the native assembler: FAIL: gcc.target/i386/pr71321.c scan-assembler-not lea.*0 The problem is that /bin/as doesn't fully support cfi directives, so the .eh_frame section is specified explicitly, which includes ".long 0". The regular

Re: [PATCH] RISC-V: Allow LICM hoist POLY_INT configuration code sequence

2024-02-02 Thread Kito Cheng
LGTM :) On Thu, Feb 1, 2024 at 11:46 PM Juzhe-Zhong wrote: > > Realize in recent benchmark evaluation (coremark-pro zip-test): > > vid.v v2 > vmv.v.i v5,0 > .L9: > vle16.v v3,0(a4) > vrsub.vxv4,v2,a6 ---> LICM failed to hoist it outside the > loop. >

  1   2   >