Re: Missing DWARF children for variable templates

2023-11-10 Thread Nima Hamidi via Gcc
Another similar issue is with alias templates. The following code: ``` template struct Cls {  using ptr = T *; }; template using Cls_ptr = typename Cls::ptr; Cls_ptr ai; Cls_ptr af; ``` produces ``` < 1><0x0029> DW_TAG_typedef  DW_AT_type <0x003d>  DW_AT_name (indexed string:

Missing DWARF children for variable templates

2023-11-10 Thread Nima Hamidi via Gcc
Hello all, When I compile ``` template struct Cls {  static const int v = 0; }; template int constexpr Cls_v = Cls::v; int func() {  return Cls_v + Cls_v; } ``` using `g++ -c main.cpp -o main.o -g`, I see two indistinguishable DIEs in the generated debug info: ``` < 1><0x003a>

[PATCH v2] Simplify year::is_leap().

2023-11-10 Thread Cassio Neri
The current implementation returns (_M_y & (__is_multiple_of_100 ? 15 : 3)) == 0; where __is_multiple_of_100 is calculated using an obfuscated algorithm which saves one ror instruction when compared to _M_y % 100 == 0 [1]. In leap years calculation, it's mathematically correct to replace the

[Bug middle-end/111754] [14 Regression] ICE: in decompose, at rtl.h:2313 at -O

2023-11-10 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111754 Sam James changed: What|Removed |Added CC||sjames at gcc dot gnu.org

[PATCH v2] Remove unnecessary "& 1" in year_month_day_last::day()

2023-11-10 Thread Cassio Neri
When year_month_day_last::day() was implemented, Dr. Matthias Kretz realised that the operation "& 1" wasn't necessary but we did not patch it at that time. This patch removes the unnecessary operation. libstdc++-v3/ChangeLog: * include/std/chrono: --- libstdc++-v3/include/std/chrono | 24

[PATCH v2] c++: fix parsing with auto(x) [PR112410]

2023-11-10 Thread Marek Polacek
On Thu, Nov 09, 2023 at 07:07:03PM -0500, Jason Merrill wrote: > On 11/9/23 14:58, Marek Polacek wrote: > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > > > -- >8 -- > > Here we are wrongly parsing > > > >int y(auto(42)); > > > > which uses the C++23 cast-to-prvalue

[PATCH] c-family: Let libcpp know when the compilation is for a PCH [PR9471]

2023-11-10 Thread Lewis Hyatt
Hello- The PR may be 20 years old, but by now it only needs a one-line fix :). Is it OK please? Bootstrapped + regtested all langauges on x86-64 Linux. Thanks! -Lewis https://gcc.gnu.org/bugzilla/show_bug.cgi?id=9471 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47857 -- >8 -- libcpp will

[Bug tree-optimization/112469] [14 Regression] ICE: eliminate_stmt, at tree-ssa-sccvn.cc:6944

2023-11-10 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112469 --- Comment #10 from CVS Commits --- The master branch has been updated by Pan Li : https://gcc.gnu.org/g:108e93403c461f57437da28348e5d5409ed2adc8 commit r14-5351-g108e93403c461f57437da28348e5d5409ed2adc8 Author: Juzhe-Zhong Date: Sat Nov

[Bug libstdc++/79700] std::fabsf and std::fabsl missing from

2023-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700 Jonathan Wakely changed: What|Removed |Added Target Milestone|13.3|14.0 Status|NEW

Re: [PATCH] libgcc/m68k: Fixes for soft float

2023-11-10 Thread Keith Packard
> I pushed this to the trunk after fixing a few minor whitespace nits. > You didn't mention the divdf change, but I'll assume that was just an > oversight. Yeah, a couple of minor fixes there that I forgot to mention in the log. > I'm largely trusting your reputation on the fpgnulib changes.

[Bug libstdc++/112473] integer_sequence accepts non-integer types

2023-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112473 Jonathan Wakely changed: What|Removed |Added Target Milestone|13.3|12.4

[Bug libstdc++/112473] integer_sequence accepts non-integer types

2023-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112473 Jonathan Wakely changed: What|Removed |Added Status|NEW |ASSIGNED

[Bug libstdc++/112467] [14 Regression] libstdc++ fails to build on clang: bits/stl_bvector.h:189:23: error: '__assume__' attribute cannot be applied to a statement

2023-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112467 Jonathan Wakely changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug middle-end/110859] New FAIL: 23_containers/vector/bool/110807.cc

2023-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110859 --- Comment #5 from Jonathan Wakely --- Should be fixed at r14-5260-ge39b3e02c27bd7

[committed] libstdc++: Do not use assume attribute for Clang [PR112467]

2023-11-10 Thread Jonathan Wakely
Tested x86_64-linux (-m32 and -m64). Pushed to trunk. -- >8 -- Clang has an 'assume' attribute, but it's a function attribute not a statement attribute. The recently-added use of the statement form causes an error with Clang. libstdc++-v3/ChangeLog: PR libstdc++/112467 *

[Bug libstdc++/112467] [14 Regression] libstdc++ fails to build on clang: bits/stl_bvector.h:189:23: error: '__assume__' attribute cannot be applied to a statement

2023-11-10 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112467 --- Comment #8 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:807f47497f17ed50be91f0f879308cb6fa063966 commit r14-5350-g807f47497f17ed50be91f0f879308cb6fa063966 Author: Jonathan Wakely

[committed] libstdc++: Simplify std::string_view comparisons (LWG 3950)

2023-11-10 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- LWG 3950 points out that the comparisons of std::basic_string_view can be simplified to just a single overload of operator== and a single overload of operator<=>. Those overloads work fine for homogeneous comparisons of two string view objects.

[committed] libstdc++: Add static_assert to std::integer_sequence [PR112473]

2023-11-10 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- C++20 allows class types as non-type template parameters, but std::integer_sequence explicitly disallows them. Enforce that. libstdc++-v3/ChangeLog: PR libstdc++/112473 * include/bits/utility.h (integer_sequence): Add

[committed] libstdc++: Fix broken tests for

2023-11-10 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- When I added these tests I gave them .h file extensions, so they've never been run. They need to use the no_pch option, so that they only test the header and don't get via . libstdc++-v3/ChangeLog: *

[committed] libstdc++: Deprecate std::atomic_xxx overloads for std::shared_ptr

2023-11-10 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- These overloads are deprecated in C++20 (and likely to be removed for C++26). The std::atomic> specialization should be preferred in new code. libstdc++-v3/ChangeLog: * include/bits/shared_ptr_atomic.h (atomic_is_lock_free)

[committed] libstdc++: Fix test that fails with -ffreestanding

2023-11-10 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- The -ffreestanding option disables Debug Mode, forcibly #undef'ing _GLIBCXX_DEBUG. This means that the dangling checks in std::pair are disabled for -ffreestanding in C++17 and earlier, because they depend on _GLIBCXX_DEBUG. Adjust the target

[committed] libstdc++: Add [[nodiscard]] to std::span members

2023-11-10 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- All std::span member functions are pure functions that have no side effects. They are only useful for their return value, so they should all warn if that value is not used. libstdc++-v3/ChangeLog: * include/std/span (span, as_bytes,

[committed] libstdc++: Add [[nodiscard]] to lock types

2023-11-10 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- Adding this attribute means users get a warning when they accidentally create a temporary lock instead of creating an automatic variable with block scope. For std::lock_guard both constructors have side effects (they both take a mutex and so both

[committed] libstdc++: Remove handling for underscore-prefixed libm functions [PR111638]

2023-11-10 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- The checks in linkage.m4 try to support math functions prefixed with underscores, like _acosf and _isinf. However, that doesn't work because they're renamed to the standard names using a macro, but then undefines that macro again. This simply

[Bug libstdc++/112473] integer_sequence accepts non-integer types

2023-11-10 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112473 --- Comment #4 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:0953497a81f1e320989b9f2aaa7f56747eddd4a0 commit r14-5347-g0953497a81f1e320989b9f2aaa7f56747eddd4a0 Author: Jonathan Wakely

[Bug libstdc++/111638] GLIBCXX_MAYBE_UNDERSCORED_FUNCS autoconf macro doesn't work

2023-11-10 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111638 --- Comment #1 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:898fd81b831c106859bc99e65c7c1cbb642320c8 commit r14-5342-g898fd81b831c106859bc99e65c7c1cbb642320c8 Author: Jonathan Wakely

Re: [Ping][PATCH] libstdc++: Add missing functions to [PR79700]

2023-11-10 Thread Jonathan Wakely
I've finally convinced myself that this patch is OK, because we provide stub versions of all the functions being declared here. So if a target is missing them, we provide them anyway. That happens to be broken for the avr target, but that defaults to --disable-libstdcxx anyway. I've pushed the

[Bug libstdc++/79700] std::fabsf and std::fabsl missing from

2023-11-10 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700 --- Comment #24 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:0b880466e910b4f1be2ea2d0d9cb9407d24ca299 commit r14-5341-g0b880466e910b4f1be2ea2d0d9cb9407d24ca299 Author: Nathaniel Shead

[pushed] testsuite: fix lambda-decltype3.C in C++11

2023-11-10 Thread Marek Polacek
Tested x86_64-pc-linux-gnu, applying to trunk. -- >8 -- This fixes FAIL: g++.dg/cpp0x/lambda/lambda-decltype3.C -std=c++11 (test for excess errors) due to lambda-decltype3.C:25:6: error: lambda capture initializers only available with '-std=c++14' or '-std=gnu++14' [-Wc++14-extensions]

Re: [PATCH v3] libiberty: Use posix_spawn in pex-unix when available.

2023-11-10 Thread Patrick O'Neill
On 11/10/23 03:00, Prathamesh Kulkarni wrote: On Thu, 5 Oct 2023 at 00:00, Brendan Shanks wrote: Hi, This patch implements pex_unix_exec_child using posix_spawn when available. This should especially benefit recent macOS (where vfork just calls fork), but should have equivalent or faster

[Bug target/112481] [14 Regression] RISCV: ICE: Segmentation fault when compiling pr110817-3.c

2023-11-10 Thread patrick at rivosinc dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112481 --- Comment #3 from Patrick O'Neill --- Initial bisection was correct: r14-5319-ga5922427c29

Re: [PATCH] rs6000: Disable PCREL for unsupported targets [PR111045]

2023-11-10 Thread Peter Bergner
On 8/25/23 6:20 AM, Kewen.Lin wrote: > btw, I was also expecting that we don't implicitly set > OPTION_MASK_PCREL any more for Power10, that is to remove > OPTION_MASK_PCREL from OTHER_POWER10_MASKS. So my patch removes the flag from the default power10 flags, like you want. However, it doesn't

Re: [PATCH] C99 testsuite readiness: More unverified testcase un-reductions

2023-11-10 Thread Jeff Law
On 11/10/23 15:06, Florian Weimer wrote: gcc/testsuite/ * gcc.c-torture/compile/BUG17.c (main): Add missing int return type and missing void type. * gcc.c-torture/compile/BUG18.c (main): Likewise. Call __builtin_printf instead of printf. *

[Bug c++/112482] error when auto(x) is used in a variable initializer (block scope)

2023-11-10 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112482 Marek Polacek changed: What|Removed |Added Keywords||rejects-valid

[Bug c++/112482] New: error when auto(x) is used in a variable initializer (block scope)

2023-11-10 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112482 Bug ID: 112482 Summary: error when auto(x) is used in a variable initializer (block scope) Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal

Re: [PATCH] C99 testsuite readiness: Compile more tests with -std=gnu89

2023-11-10 Thread Jeff Law
On 11/10/23 15:07, Florian Weimer wrote: gcc/testsuite/ * gcc.c-torture/compile/386.c: Compile with -std=gnu89. * gcc.c-torture/compile/BUG1.c: Likewise. * gcc.c-torture/compile/BUG11.c: Likewise. * gcc.c-torture/compile/BUG16.c: Likewise. *

[Bug target/112481] [14 Regression] RISCV: ICE: Segmentation fault when compiling pr110817-3.c

2023-11-10 Thread patrick at rivosinc dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112481 --- Comment #2 from Patrick O'Neill --- Sorry - got overzealous and mixed up my terminals. Still bisecting. Good: 8da8b9225762126ca41b12243d6531cd41a831b3 Bad: a5922427c29fad177251d89cc946d1c5bfc135eb

Re: [PATCH] C99 testsuite readiness: Add missing abort, exit declarations

2023-11-10 Thread Jeff Law
On 11/10/23 15:07, Florian Weimer wrote: The execute tests use abort/exit to report failure/success, but they generally do not declare these functions (or include ). This change adds declarations as appropriate. It would have been possible to switch to __builtin_abort and __builtin_exit

Re: [PATCH] C99 testsuite readiness: Cleanup of execute tests

2023-11-10 Thread Jeff Law
On 11/10/23 15:07, Florian Weimer wrote: This change updates the gcc.c-torture/execute/ to avoid obsolete language constructs. In the changed tests, use of the features appears to be accidental, and updating allows the tests run with the default compiler flags. gcc/testsuite/ *

Re: [PATCH] rs6000: Disable PCREL for unsupported targets [PR111045]

2023-11-10 Thread Peter Bergner
On 8/27/23 9:06 PM, Kewen.Lin wrote: > Assuming we only have ELFv2_ABI_CHECK in PCREL_SUPPORTED_BY_OS, we > can have either TARGET_PCREL or !TARGET_PCREL after the checking. > For the latter, it's fine and don't need any checks. For the former, > if it's implicit, for !TARGET_PREFIXED we will

[PATCH] MAINTAINERS: Fix formatting

2023-11-10 Thread Sam James
ChangeLog: * MAINTAINERS (Write After Approval): Fix indentation and missing email bracket. Signed-off-by: Sam James --- MAINTAINERS | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index c43167d9a752..9ad68687f769 100644 ---

Re: [committed] Enable LRA on several ports

2023-11-10 Thread Jeff Law
On 8/13/23 20:11, Hans-Peter Nilsson wrote: On Mon, 1 May 2023, Jeff Law wrote: Spurred by Segher's RFC, I went ahead and tested several ports with LRA enabled. Not surprisingly, many failed, but a few built their full set of libraries successful and of those a few even ran their

Re: [PATCH] libgcc/m68k: Fixes for soft float

2023-11-10 Thread Jeff Law
On 8/22/23 20:15, Keith Packard via Gcc-patches wrote: Check for non-zero denorm in __adddf3. Need to check both the upper and lower 32-bit chunks of a 64-bit float for a non-zero value when checking to see if the value is -0. Fix __addsf3 when the sum exponent is exactly 0xff to ensure that

[Bug target/112481] [14 Regression] RISCV: ICE: Segmentation fault when compiling pr110817-3.c

2023-11-10 Thread patrick at rivosinc dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112481 --- Comment #1 from Patrick O'Neill --- First bad commit: r14-5319-ga5922427c29

Re: [PATCH 4/4] maintainer-scripts/gcc_release: cleanup whitespace

2023-11-10 Thread Sam James
Joseph Myers writes: > On Thu, 2 Nov 2023, Sam James wrote: > >> maintainer-scripts/ >> * gcc_release: Cleanup whitespace. > > OK. Thanks. Would you mind pushing the two you approved?

[Committed] RISC-V: Add test for PR112469

2023-11-10 Thread Juzhe-Zhong
As PR: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112469 which has been fixed by Richard patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-November/635994.html Add tests to avoid regression. Committed. PR target/112469 gcc/testsuite/ChangeLog: *

Re: [PATCH] doc: Add fpatchable-function-entry to Option-Summary page[PR110983]

2023-11-10 Thread Jeff Law
On 8/28/23 23:25, Mao via Gcc-patches wrote: The -fpatchable-function-entry is missing in both the web doc [1] and the man page's "Option Summary" section. This patch is to add it. [1]: https://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html THanks. I created a ChangeLog and pushed this to

[Bug middle-end/110983] -fpatchable-function-entry is missing in Option Summary page

2023-11-10 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110983 --- Comment #7 from CVS Commits --- The master branch has been updated by Jeff Law : https://gcc.gnu.org/g:b42dd1379048fd9cc7eb7039b9dfee02d6884df7 commit r14-5338-gb42dd1379048fd9cc7eb7039b9dfee02d6884df7 Author: Mao Date: Fri Nov 10

GCC devroom at FOSDEM 2024: Call for Participation open

2023-11-10 Thread David Malcolm via Gcc
We're excited to announce that GCC will have a developer room at the upcoming FOSDEM 2024, in Brussels, Belgium: https://fosdem.org/2024/ This email is a Call for Presentations about GCC for the developer room. Important Dates: 1st December 2023 Submission deadline 8th December

Re: [PATCH v3 3/4] ifcvt: Handle multiple rewired regs and refactor noce_convert_multiple_sets

2023-11-10 Thread Jeff Law
On 8/30/23 04:13, Manolis Tsamis wrote: The existing implementation of need_cmov_or_rewire and noce_convert_multiple_sets_1 assumes that sets are either REG or SUBREG. This commit enchances them so they can handle/rewire arbitrary set statements. To do that a new helper struct

[PATCH 2/4] Add support for integer vector pair built-ins

2023-11-10 Thread Michael Meissner
This patch adds a series of built-in functions to allow users to write code to do a number of simple operations where the loop is done using the __vector_pair type. The __vector_pair type is an opaque type. These built-in functions keep the two 128-bit vectors within the __vector_pair together,

Re: [PATCH] libgccjit: Fix GGC segfault when using -flto

2023-11-10 Thread David Malcolm
On Fri, 2023-11-10 at 11:02 -0500, Antoni Boucher wrote: > Hi. > This patch fixes the segfault when using -flto with libgccjit (bug > 111396). > > You mentioned in bugzilla that this didn't fix the reproducer for > you, Rereading https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111396 it looks like

[PATCH 4/4] Add support for doing a horizontal add on vector pair elements.

2023-11-10 Thread Michael Meissner
This patch adds a series of built-in functions to allow users to write code to do a number of simple operations where the loop is done using the __vector_pair type. The __vector_pair type is an opaque type. These built-in functions keep the two 128-bit vectors within the __vector_pair together,

[PATCH 3/4] Add support for initializing and extracting from vector pairs

2023-11-10 Thread Michael Meissner
This patch adds a series of built-in functions to allow users to write code to do a number of simple operations where the loop is done using the __vector_pair type. The __vector_pair type is an opaque type. These built-in functions keep the two 128-bit vectors within the __vector_pair together,

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-10 Thread Jason Merrill
[combined reply to all three threads] On 11/9/23 23:24, waffl3x wrote: I'm unfortunately going down a rabbit hole again. --function.h:608 `/* If pointers to member functions use the least significant bit to indicate whether a function is virtual, ensure a pointer to this function will have

[PATCH 1/4] Add support for floating point vector pair built-in functions

2023-11-10 Thread Michael Meissner
This patch adds a series of built-in functions to allow users to write code to do a number of simple operations where the loop is done using the __vector_pair type. The __vector_pair type is an opaque type. These built-in functions keep the two 128-bit vectors within the __vector_pair together,

[PATCH 0/4] Add vector pair builtins to PowerPC

2023-11-10 Thread Michael Meissner
These set of patches add support for using the vector pair load (lxvp, plxvp, and lxvpx) instructions and the vector pair store (stxvp, pstxvp, and stxvpx) that were introduced with ISA 3.1 on Power10 systems. With GCC 13, the only place vector pairs (and vector quads) were used were to feed into

[Bug libstdc++/112480] optional::reset emits inefficient code when T is trivially-destructible

2023-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112480 --- Comment #4 from Jonathan Wakely --- (In reply to Andrew Pinski from comment #3) > I think that is because that transformation would violate the memory model > of C++. Ah yes. It would be safe for another thread to read the same memory

[PATCH, V2] Power10: Add options to disable load and store vector pair.

2023-11-10 Thread Michael Meissner
This is version 2 of the patch to add -mno-load-vector-pair and -mno-store-vector-pair undocumented tuning switches. The differences between the first version of the patch and this version is that I added explicit RTL abi attributes for when the compiler can generate the load vector pair and

[PATCH] c++/modules: more checks for exporting names with using-declarations

2023-11-10 Thread Nathaniel Shead
I noticed while fixing PR106849 that we don't currently check validity of exporting non-functions via using-declarations either; this patch adds those checks factored out into a new function. I also tried to make the error messages a bit more descriptive. This patch is based on [1] (with the

[Bug tree-optimization/56711] missed optimization for __uint128_t of (unsigned long long)x != x

2023-11-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56711 Andrew Pinski changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug tree-optimization/95752] Failure to optimize complicated usage of __builtin_ctz with conditionals properly

2023-11-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95752 Bug 95752 depends on bug 56711, which changed state. Bug 56711 Summary: missed optimization for __uint128_t of (unsigned long long)x != x https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56711 What|Removed |Added

gcc-12-20231110 is now available

2023-11-10 Thread GCC Administrator via Gcc
Snapshot gcc-12-20231110 is now available on https://gcc.gnu.org/pub/gcc/snapshots/12-20231110/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 12 git branch with the following options: git://gcc.gnu.org/git/gcc.git branch

[Bug target/112470] [11/12/13/14 regression] [AARCH64] stack-protector vulnerability fixing solution impact code size and performance

2023-11-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112470 Andrew Pinski changed: What|Removed |Added Severity|normal |critical Priority|P3

[Bug target/112470] [11/12/13/14 regression] [AARCH64] stack-protector vulnerability fixing solution impact code size and performance

2023-11-10 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112470 Sam James changed: What|Removed |Added Summary|[AARCH64] stack-protector |[11/12/13/14 regression]

[PATCH] C99 testsuite readiness: Compile more tests with -std=gnu89

2023-11-10 Thread Florian Weimer
gcc/testsuite/ * gcc.c-torture/compile/386.c: Compile with -std=gnu89. * gcc.c-torture/compile/BUG1.c: Likewise. * gcc.c-torture/compile/BUG11.c: Likewise. * gcc.c-torture/compile/BUG16.c: Likewise. * gcc.c-torture/compile/BUG2.c: Likewise. *

[PATCH] C99 testsuite readiness: More unverified testcase un-reductions

2023-11-10 Thread Florian Weimer
gcc/testsuite/ * gcc.c-torture/compile/BUG17.c (main): Add missing int return type and missing void type. * gcc.c-torture/compile/BUG18.c (main): Likewise. Call __builtin_printf instead of printf. * gcc.c-torture/compile/BUG21.c (Nase): Add missing void

[PATCH] C99 testsuite readiness: Verified un-reductions

2023-11-10 Thread Florian Weimer
gcc/testsuite/ * gcc.c-torture/compile/20080613-1.c (hop_sendmsg): Call __builtin_memcpy instead of memcpy. * gcc.c-torture/compile/complex-6.c (bar): Declare. * gcc.c-torture/compile/pr23445.c (__brelse): Declare. * gcc.c-torture/compile/pr23946.c

[PATCH] C99 testsuite readiness: -fpermissive tests

2023-11-10 Thread Florian Weimer
These tests use obsolete language constructs, but they are not clearly targeting C89, either. So use -fpermissive to keep future errors as warnings. The reasons why obsolete constructs are used used vary from test to test. Some tests deliberately exercise later stages of the compiler that only

Re: [PATCH v3 4/4] ifcvt: Remove obsolete code for subreg handling in noce_convert_multiple_sets

2023-11-10 Thread Jeff Law
On 8/30/23 04:14, Manolis Tsamis wrote: This code used to handle register replacement issues with SUBREG before simplify_replace_rtx was introduced. This should not be needed anymore as new_val has the correct mode and that should be preserved by simplify_replace_rtx. gcc/ChangeLog:

[Bug libstdc++/112480] optional::reset emits inefficient code when T is trivially-destructible

2023-11-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112480 --- Comment #3 from Andrew Pinski --- (In reply to Corey Kosak from comment #2) > Thanks for the reply and the correction about illegally running the > destructor. > > As for why the compiler can't do the optimization itself, I don't know, but

[committed] RISC-V: Fix indentation of "length" attribute for branches and jumps

2023-11-10 Thread Maciej W. Rozycki
The "length" attribute calculation expressions for branches and jumps are incorrectly and misleadingly indented, and they overrun the 80 column limit as well, all of this causing troubles in following them. Correct all these issues. gcc/ * config/riscv/riscv.md (length): Fix

[Bug libstdc++/112480] optional::reset emits inefficient code when T is trivially-destructible

2023-11-10 Thread gnu at kosak dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112480 --- Comment #2 from Corey Kosak --- Thanks for the reply and the correction about illegally running the destructor. As for why the compiler can't do the optimization itself, I don't know, but the optimization isn't applied here either: ```

Re: [PATCH v3 2/4] ifcvt: Allow more operations in multiple set if conversion

2023-11-10 Thread Jeff Law
On 10/19/23 13:46, Richard Sandiford wrote: + /* Allow a wide range of operations and let the costing function decide +if the conversion is worth it later. */ + enum rtx_code code = GET_CODE (src); + if (!(CONSTANT_P (src) + || code == REG + || code

Re: [PATCH v3 1/4] ifcvt: handle sequences that clobber flags in noce_convert_multiple_sets

2023-11-10 Thread Jeff Law
On 10/20/23 03:16, Richard Sandiford wrote: Thanks for the context. Robin Dapp writes: Sorry for the slow review. TBH I was hoping someone else would pick it up, since (a) I'm not very familiar with this code, and (b) I don't really agree with the way that the current code works. I'm not

[Bug target/112481] [14 Regression] RISCV: ICE: Segmentation fault when compiling pr110817-3.c

2023-11-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112481 Andrew Pinski changed: What|Removed |Added Keywords||ice-on-valid-code Target

[PATCH 1/3] options: add gcc/regenerate-opt-urls.py

2023-11-10 Thread David Malcolm
gcc/ChangeLog: * doc/options.texi (Option properties): Add UrlSuffix and description of regenerate-opt-urls.py. * regenerate-opt-urls.py: New file. --- gcc/doc/options.texi | 17 ++ gcc/regenerate-opt-urls.py | 366 + 2 files

[PATCH 3/3] diagnostics: use the .opt.urls files to urlify quoted text

2023-11-10 Thread David Malcolm
This patch adds machinery for using the .opt.urls files linking to the documentation of our options in gcc_urlifier. For every enabled .opt file, the corresponding .opt.urls file will also be used when constructing the "optionslist" file. The patch adds a new awk script to process the optionslist

[PATCH 0/3] Option handling: add documentation URLs

2023-11-10 Thread David Malcolm
In r14-5118-gc5db4d8ba5f3de I added a mechanism to automatically add URLs to quoted strings in diagnostics. This was based on a data table mapping strings to URLs, with placeholder data covering various pragmas and a couple of options. The following patches add automatic URLification in our

[Bug target/112481] New: [14 Regression] RISCV: ICE: Segmentation fault when compiling pr110817-3.c

2023-11-10 Thread patrick at rivosinc dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112481 Bug ID: 112481 Summary: [14 Regression] RISCV: ICE: Segmentation fault when compiling pr110817-3.c Product: gcc Version: 14.0 Status: UNCONFIRMED Severity:

[Bug rtl-optimization/110307] ICE in move_insn, at haifa-sched.cc:5473 when building Ruby on alpha with -fPIC -O2 (or -fpeephole2 -fschedule-insns2)

2023-11-10 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110307 --- Comment #14 from Sam James --- (In reply to Alexander Monakov from comment #13) > Note to self: check how control_flow_insn_p relates. Did you have a chance to look at this bit? matoro asked me to cherry-pick it downstream but it's in

Re: [PATCH] c++: non-dependent .* folding [PR112427]

2023-11-10 Thread Jason Merrill
On 11/10/23 10:28, Patrick Palka wrote: On Fri, 10 Nov 2023, Patrick Palka wrote: On Thu, 9 Nov 2023, Jason Merrill wrote: On 11/8/23 16:59, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- Here when building up the

Re: [PATCH v3 1/4] ifcvt: handle sequences that clobber flags in noce_convert_multiple_sets

2023-11-10 Thread Jeff Law
On 10/20/23 01:04, Robin Dapp wrote: But I'm not sure which cases this code is trying to catch. Is it trying to catch cases where seq2 "spontaneously" uses registers that happen to overlap with cond? If so, then when does that happen? And if it does happen, wouldn't the sequence also

Re: [PATCH v3 1/4] ifcvt: handle sequences that clobber flags in noce_convert_multiple_sets

2023-11-10 Thread Jeff Law
On 10/19/23 13:41, Richard Sandiford wrote: Manolis Tsamis writes: This is an extension of what was done in PR106590. Currently if a sequence generated in noce_convert_multiple_sets clobbers the condition rtx (cc_cmp or rev_cc_cmp) then only seq1 is used afterwards (sequences that emit the

[Bug c++/109122] std::ranges::find segfaults with gcc (trunk but not 12.2) on godbolt

2023-11-10 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109122 Patrick Palka changed: What|Removed |Added Keywords|needs-reduction | CC|

Re: [PATCH v3 2/2]middle-end match.pd: optimize fneg (fabs (x)) to copysign (x, -1) [PR109154]

2023-11-10 Thread Andrew Pinski
On Fri, Nov 10, 2023 at 5:12 AM Richard Biener wrote: > > On Fri, 10 Nov 2023, Tamar Christina wrote: > > > > > Hi Prathamesh, > > > > Yes Arm requires SIMD for copysign. The testcases fail because they don't > > turn on Neon. > > > > I'll update them. > > On x86_64 with -m32 I see > > FAIL:

Re: [RFC 1/2] RISC-V: Add support for _Bfloat16.

2023-11-10 Thread Jeff Law
On 10/25/23 04:15, Jin Ma wrote: +;; The conversion of DF to BF needs to be done with SF if there is a +;; chance to generate at least one instruction, otherwise just using +;; libfunc __truncdfbf2. +(define_expand "truncdfbf2" + [(set (match_operand:BF 0 "register_operand" "=f") +

[Bug libstdc++/112467] [14 Regression] libstdc++ fails to build on clang: bits/stl_bvector.h:189:23: error: '__assume__' attribute cannot be applied to a statement

2023-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112467 Jonathan Wakely changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org

[Bug libstdc++/112480] optional::reset emits inefficient code when T is trivially-destructible

2023-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112480 Jonathan Wakely changed: What|Removed |Added Last reconfirmed||2023-11-10

[Bug libstdc++/112467] [14 Regression] libstdc++ fails to build on clang: bits/stl_bvector.h:189:23: error: '__assume__' attribute cannot be applied to a statement

2023-11-10 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112467 Sam James changed: What|Removed |Added CC||sjames at gcc dot gnu.org --- Comment #6

[Bug modula2/110779] SysClock can not read the clock

2023-11-10 Thread gaius at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110779 --- Comment #21 from Gaius Mulley --- I've just noticed that the patch doesn't address the issue of GLIBCXX_IS_NATIVE.

Re: [PING 2] [C PATCH] Synthesize nonnull attribute for parameters declared with static

2023-11-10 Thread Jeff Law
On 10/21/23 05:09, Martin Uecker wrote: C programmers increasingly use static to indicate that pointer parameters are non-null. Clang can exploit this for warnings and optimizations. GCC has some warnings but not all warnings it has for nonnull. Below is a patch to add a nonnull attribute

Re: [PATCH] attribs: Use existing traits for excl_hash_traits

2023-11-10 Thread Jeff Law
On 11/6/23 05:32, Richard Sandiford wrote: Ping. Richard Sandiford via Gcc-patches writes: excl_hash_traits can be defined more simply by reusing existing traits. Tested on aarch64-linux-gnu. OK to install? Richard gcc/ * attribs.cc (excl_hash_traits): Delete.

Re: [PATCH 3/3] attribs: Namespace-aware lookup_attribute_spec

2023-11-10 Thread Jeff Law
On 11/6/23 05:24, Richard Sandiford wrote: attribute_ignored_p already used a namespace-aware query to find the attribute_spec for an existing attribute: const attribute_spec *as = lookup_attribute_spec (TREE_PURPOSE (attr)); This patch does the same for other callers in the file.

Re: [PATCH 3/3] RISC-V: Add support for XCVbi extension in CV32E40P

2023-11-10 Thread Jeff Law
On 11/8/23 04:09, Mary Bennett wrote: Spec: github.com/openhwgroup/core-v-sw/blob/master/specifications/corev-builtin-spec.md Contributors: Mary Bennett Nandni Jamnadas Pietra Ferreira Charlie Keaney Jessica Mills Craig Blackmore Simon Cook Jeremy Bennett

Re: [PATCH] c++: fix tf_decltype manipulation for COMPOUND_EXPR

2023-11-10 Thread Patrick Palka
On Fri, 10 Nov 2023, Jason Merrill wrote: > On 11/10/23 12:25, Patrick Palka wrote: > > On Thu, 9 Nov 2023, Jason Merrill wrote: > > > > > On 11/7/23 10:08, Patrick Palka wrote: > > > > bootstrapped and regtested on x86_64-pc-linxu-gnu, does this look OK for > > > > trunk? > > > > > > > > -- >8

Re: [PATCH] Avoid generate vblendps with ymm16+

2023-11-10 Thread Jakub Jelinek
On Thu, Nov 09, 2023 at 03:27:11PM +0800, Hongtao Liu wrote: > On Thu, Nov 9, 2023 at 3:15 PM Hu, Lin1 wrote: > > > > This patch aims to avoid generate vblendps with ymm16+, And have > > bootstrapped and tested on x86_64-pc-linux-gnu{-m32,-m64}. Ok for trunk? > > > > gcc/ChangeLog: > > > >

[Bug modula2/110779] SysClock can not read the clock

2023-11-10 Thread gaius at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110779 --- Comment #20 from Gaius Mulley --- Created attachment 56558 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56558=edit Proposed fix (libgm2/acinclude.m4 and libgm2/configure.host) Here is a proposed patch for a new file

[Bug c++/109122] std::ranges::find segfaults with gcc (trunk but not 12.2) on godbolt

2023-11-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109122 --- Comment #4 from Andrew Pinski --- Created attachment 56557 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56557=edit reduction but not best though

[Bug libstdc++/112480] New: optional::reset emits inefficient code when T is trivially-destructible

2023-11-10 Thread gnu at kosak dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112480 Bug ID: 112480 Summary: optional::reset emits inefficient code when T is trivially-destructible Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity:

  1   2   3   >