[Bug target/120417] gcc -m32 -O1 codegen error, leading to SIGSEGV, workaround -fno-tree-coalesce-vars

2025-05-25 Thread simonsobisch at gnu dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120417 --- Comment #7 from Simon Sobisch --- UB may be necessary to trigger that (and with GCC+libc that _does_ work on all environments but GNU/Linux 32bit [in theory it could also be multiarch -m32, but I think that should not make a difference]) :-/

[Bug middle-end/120434] GCC uses signed extend (movsxd) for known positive variables rather than zero extend 'mov'

2025-05-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120434 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2025-05-26 Severity|normal

[Bug middle-end/120434] GCC uses signed extend (movsxd) for known positive variables rather than zero extend 'mov'

2025-05-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120434 --- Comment #4 from Andrew Pinski --- Interesting clang/LLVM only does this for -Os and only on x86_64. I am agreeing it should be done at -O2 because it is almost always better to zero extend rather than sign extend on MOST if not all targets.

[Bug target/120434] (x86-64) GCC uses 'movsxd' for positive variables which is larger code than 'mov'

2025-05-25 Thread Explorer09 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120434 --- Comment #2 from Kang-Che Sung --- (Sorry I didn't know what happened with the bug report system, but I submitted an empty report by accident. I added the report in comment 1.)

[Bug target/120434] (x86-64) GCC uses 'movsxd' for positive variables larger code than 'mov'

2025-05-25 Thread Explorer09 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120434 --- Comment #1 from Kang-Che Sung --- For signed integers that GCC can detect to be always positive, it uses signed extension instead of zero extension, even in the "-Os" optimization mode. For x86-64, sometimes zero extension can produce small

[Bug target/120434] New: (x86-64) GCC uses 'movsxd' for positive variables larger code than 'mov'

2025-05-25 Thread Explorer09 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120434 Bug ID: 120434 Summary: (x86-64) GCC uses 'movsxd' for positive variables larger code than 'mov' Product: gcc Version: 15.1.0 Status: UNCONFIRMED Severity: nor

[Bug target/120433] RISC-V:Unexpected Sign-Extension Behavior for uint32_t Return Values in RV64

2025-05-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120433 Andrew Pinski changed: What|Removed |Added Resolution|--- |INVALID Keywords|

[Bug target/120433] RISC-V:Unexpected Sign-Extension Behavior for uint32_t Return Values in RV64

2025-05-25 Thread bigmagicreadsun at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120433 --- Comment #3 from fujin zhao --- (In reply to fujin zhao from comment #2) > I've refactored a0_in_asm() as requested, but the result remains unchanged. > Here’s the updated implementation: > > > __attribute__((noinline)) uint32_t a0_in_asm()

[Bug target/120433] RISC-V:Unexpected Sign-Extension Behavior for uint32_t Return Values in RV64

2025-05-25 Thread bigmagicreadsun at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120433 --- Comment #2 from fujin zhao --- I've refactored a0_in_asm() as requested, but the result remains unchanged. Here’s the updated implementation: __attribute__((noinline)) uint32_t a0_in_asm() { uint32_t result; asm volatile (

[Bug target/120433] RISC-V:Unexpected Sign-Extension Behavior for uint32_t Return Values in RV64

2025-05-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120433 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED

[Bug c/120433] New: RISC-V:Unexpected Sign-Extension Behavior for uint32_t Return Values in RV64

2025-05-25 Thread bigmagicreadsun at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120433 Bug ID: 120433 Summary: RISC-V:Unexpected Sign-Extension Behavior for uint32_t Return Values in RV64 Product: gcc Version: 14.2.1 Status: UNCONFIRMED Severity:

[Bug target/120427] [12/13/14/15/16 Regression] "and $0,mem" is generated without -Oz since r12-6106-gef26c151c14a87

2025-05-25 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120427 --- Comment #2 from H.J. Lu --- Another issue with the commit: +;; With -Oz, transform mov $imm,reg to the shorter push $imm; pop reg. +(define_peephole2 + [(set (match_operand:SWI248 0 "general_reg_operand") + (match_operand:SWI248 1 "const_

[Bug libstdc++/120432] New: flat_map operator[] is broken for const lvalue keys

2025-05-25 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120432 Bug ID: 120432 Summary: flat_map operator[] is broken for const lvalue keys Product: gcc Version: 16.0 Status: UNCONFIRMED Severity: normal Priority: P3 Compone

[Bug target/120417] gcc -m32 -O1 codegen error, leading to SIGSEGV, workaround -fno-tree-coalesce-vars

2025-05-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120417 Sam James changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed|

[Bug target/119966] [16 regression] pru: Invalid register in RTL expression starting with r16-160-ge6f89d78c1a752

2025-05-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119966 --- Comment #11 from Andrew Pinski --- (In reply to Dimitar Dimitrov from comment #10) > This issue was fixed with r16-809-gf725d6765373f7. That commit was not even supposed to fix this either. Even though that did fix the issue that exposed by

[Bug fortran/85750] [12/13 Regression] Default initialization of derived type array missing

2025-05-25 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85750 anlauf at gcc dot gnu.org changed: What|Removed |Added Resolution|--- |FIXED Summary|[12/

[Bug libstdc++/112349] ranges::min/max make unnecessary copies

2025-05-25 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112349 Jonathan Wakely changed: What|Removed |Added Status|ASSIGNED|RESOLVED Target Milestone|14.4

[Bug libstdc++/111250] __glibcxx_requires_subscript assertions are not checked during constant evaluation

2025-05-25 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111250 Jonathan Wakely changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug fortran/120431] SPREAD does not handle scalar argument and NCOPIES=-1 correctly

2025-05-25 Thread kargls at comcast dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120431 --- Comment #1 from kargls at comcast dot net --- (In reply to kargls from comment #0) > Consider, > > real :: arr > arr = 1 > print *, spread(arr, 1, -1) > end > Small update. The above should be handled in simplification, but curren

[Bug target/120417] gcc -m32 -O1 codegen error, leading to SIGSEGV, workaround -fno-tree-coalesce-vars

2025-05-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120417 Sam James changed: What|Removed |Added CC||sjames at gcc dot gnu.org --- Comment #6 fr

[Bug fortran/85750] [12/13/14 Regression] Default initialization of derived type array missing

2025-05-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85750 --- Comment #18 from GCC Commits --- The releases/gcc-14 branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:0100ea2b4eb1c83972e0db07503a7cfe8a38932e commit r14-11805-g0100ea2b4eb1c83972e0db07503a7cfe8a38932e Author: Harald Anlauf

[Bug fortran/98454] Apparent wrong initialization in function result

2025-05-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98454 --- Comment #16 from GCC Commits --- The releases/gcc-14 branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:9c21d7eaf8383749d1a9cd266709ec9ed04e3a00 commit r14-11804-g9c21d7eaf8383749d1a9cd266709ec9ed04e3a00 Author: Harald Anlauf

[Bug target/86772] [meta-bug] tracking port status for CVE-2017-5753

2025-05-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86772 --- Comment #6 from GCC Commits --- The releases/gcc-15 branch has been updated by Michael Eager : https://gcc.gnu.org/g:4ac1fb51c7b780159837e951bd893954d7d8803a commit r15-9727-g4ac1fb51c7b780159837e951bd893954d7d8803a Author: Michael J. Eager

[Bug fortran/120431] New: SPREAD does not handle scalar argument and NCOPIES=-1 correctly

2025-05-25 Thread kargls at comcast dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120431 Bug ID: 120431 Summary: SPREAD does not handle scalar argument and NCOPIES=-1 correctly Product: gcc Version: 16.0 Status: UNCONFIRMED Severity: normal

[Bug target/86772] [meta-bug] tracking port status for CVE-2017-5753

2025-05-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86772 --- Comment #5 from GCC Commits --- The trunk branch has been updated by Michael Eager : https://gcc.gnu.org/g:2159f024f63c12fd356748ae8fc106bb9b355688 commit r16-871-g2159f024f63c12fd356748ae8fc106bb9b355688 Author: Michael J. Eager Date: S

[Bug c/99526] Casts should retain typedef information

2025-05-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99526 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2025-05-25 Status|UNCONFIRME

[Bug c/99526] Casts should retain typedef information

2025-05-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99526 --- Comment #1 from Andrew Pinski --- https://github.com/FRRouting/frr/tree/master/tools/gcc-plugins https://github.com/FRRouting/frr/blob/master/tools/gcc-plugins/gcc-retain-typeinfo.patch seems like the patch which will fix this.

[Bug target/120417] gcc -m32 -O1 codegen error, leading to SIGSEGV, workaround -fno-tree-coalesce-vars

2025-05-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120417 --- Comment #5 from Andrew Pinski --- (In reply to Simon Sobisch from comment #4) > @sjames: What do you mean with "needs reduction"? And do you intend to do it > on your own? Yes this is more of a keyword for GCC developers rather than for the

[Bug target/120070] [15/16 regression] m68k-linux-gnu-gcc -Os ICE segfault compiling xfs_trans_ail.c

2025-05-25 Thread ats-gccbugs at offog dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120070 --- Comment #6 from Adam Sampson --- Created attachment 61518 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61518&action=edit Minimised example 2 I've just run into a second example of this while crossbuilding libzip 1.11.4 - the attache

[Bug ada/120430] Bogus "formal object is not referenced" when a generic parameter is used in a child package

2025-05-25 Thread liam at liampwll dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120430 --- Comment #1 from Liam Powell --- When a generic parameter of a package is used in a child package but not the parent package a bogus warning is generated. Example below: generic Foo : Integer; package A is end A; generic package A.B is

[Bug ada/120430] New: Bogus formal object is not referenced

2025-05-25 Thread liam at liampwll dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120430 Bug ID: 120430 Summary: Bogus formal object is not referenced Product: gcc Version: 14.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada

[Bug tree-optimization/52171] memcmp/strcmp/strncmp can be optimized when the result is tested for [in]equality with 0

2025-05-25 Thread kaelfandrew at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52171 Kael Franco changed: What|Removed |Added CC||kaelfandrew at gmail dot com --- Comment #

[Bug target/80881] Implement Windows native TLS

2025-05-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80881 --- Comment #107 from GCC Commits --- The master branch has been updated by Jonathan Yong : https://gcc.gnu.org/g:5840bf969e2bfdf4f6c51d04aeb1a96a87727d80 commit r16-867-g5840bf969e2bfdf4f6c51d04aeb1a96a87727d80 Author: LIU Hao Date: Sat Feb

[Bug target/53929] [meta-bug] -masm=intel with global symbol

2025-05-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53929 --- Comment #31 from GCC Commits --- The master branch has been updated by Jonathan Yong : https://gcc.gnu.org/g:5840bf969e2bfdf4f6c51d04aeb1a96a87727d80 commit r16-867-g5840bf969e2bfdf4f6c51d04aeb1a96a87727d80 Author: LIU Hao Date: Sat Feb

[Bug c++/104177] coroutine frame is not being allocated with the correct alignment

2025-05-25 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104177 --- Comment #25 from Iain Sandoe --- (In reply to Janko Dedic from comment #24) > It seems like P2014 is no longer being pursued. > > https://github.com/cplusplus/papers/issues/750#issuecomment-2657897866 I spoke with the author, the paper has

[Bug c++/104177] coroutine frame is not being allocated with the correct alignment

2025-05-25 Thread jankodedic2 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104177 --- Comment #24 from Janko Dedic --- It seems like P2014 is no longer being pursued. https://github.com/cplusplus/papers/issues/750#issuecomment-2657897866

[Bug middle-end/118939] [14/15/16 Regression] ada: executable segfaults on arm-linux-gnueabi when assigning an access to controlled type since r14-2653-g2971ff7b1d564a

2025-05-25 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118939 --- Comment #24 from Eric Botcazou --- *** Bug 120424 has been marked as a duplicate of this bug. ***

[Bug target/120424] [arm] -fnon-call-exceptions -fstack-clash-protection triggers lra-eliminations bug

2025-05-25 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120424 --- Comment #5 from Eric Botcazou --- *** This bug has been marked as a duplicate of bug 118939 ***

[Bug target/120417] gcc -m32 -O1 codegen error, leading to SIGSEGV, workaround -fno-tree-coalesce-vars

2025-05-25 Thread simonsobisch at gnu dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120417 --- Comment #4 from Simon Sobisch --- @sjames: What do you mean with "needs reduction"? And do you intend to do it on your own? [Note: I've reduced the original program that was generated from as much as possible, then also reduced the amount o

[Bug middle-end/118989] Missing explanation for switch-lower-slow-alg-max-cases

2025-05-25 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118989 Eric Botcazou changed: What|Removed |Added CC||aoliva at gcc dot gnu.org --- Comment #

[Bug target/120424] [arm] -fnon-call-exceptions -fstack-clash-protection triggers lra-eliminations bug

2025-05-25 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120424 Eric Botcazou changed: What|Removed |Added CC||ebotcazou at gcc dot gnu.org