[Bug c/119612] [15 regression] gcc.dg/pr106465.c newly re-broken

2025-04-08 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119612 uecker at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|

[Bug lto/119792] [14 Regression] internal error with simple discriminated types in Ada

2025-04-17 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119792 --- Comment #13 from uecker at gcc dot gnu.org --- FWIW, when I restore my patch on GCC-14 and add the size check to useless_type_conversion_p, this then fixes the Ada test case. diff --git a/gcc/gimple-expr.cc b/gcc/gimple-expr.cc index 0477c

[Bug middle-end/104800] reodering of potentially trapping operations and volatile stores

2025-04-13 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104800 uecker at gcc dot gnu.org changed: What|Removed |Added CC||uecker at gcc dot gnu.org --

[Bug c/113688] verify_type fails for compatible structs with FAM in C23, builtin-sprintf-warn-1.c and gnu23-tag-1.c with -g

2025-04-13 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113688 --- Comment #15 from uecker at gcc dot gnu.org --- It fixes a regression (but maybe I should have kept this in the title until the release). Still, if it causes too much trouble, we can revert it. But let me understand the issue first. What i

[Bug c/113688] [14 regression] verify_type fails for compatible structs with FAM in C23, builtin-sprintf-warn-1.c and gnu23-tag-1.c with -g

2025-04-13 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113688 --- Comment #17 from uecker at gcc dot gnu.org --- (BTW: Any idea why the preceding commit does not appear in bugzilla?)

[Bug c/119842] [15/16 Regression] ICE: in c_type_tag, at c/c-typeck.cc:606

2025-04-20 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119842 uecker at gcc dot gnu.org changed: What|Removed |Added CC||uecker at gcc dot gnu.org --

[Bug c/116082] -Wunterminated-string-initialization should not warn about strings that end with "\0" but should warn still for -Wc++-compat

2025-04-26 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116082 --- Comment #12 from uecker at gcc dot gnu.org --- You are mistaken. Why not just try? https://godbolt.org/z/sEcxvMjG6

[Bug c/113688] [14 regression] verify_type fails for compatible structs with FAM in C23, builtin-sprintf-warn-1.c and gnu23-tag-1.c with -g

2025-04-13 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113688 --- Comment #22 from uecker at gcc dot gnu.org --- Or in other words, the correct way is to set TYPE_CANONICAL to the same type for all types in the same equivalence classes of compatible types. If compatible is not an equivalence relationship,

[Bug c/113688] [14 regression] verify_type fails for compatible structs with FAM in C23, builtin-sprintf-warn-1.c and gnu23-tag-1.c with -g

2025-04-13 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113688 --- Comment #21 from uecker at gcc dot gnu.org --- (In reply to uecker from comment #20) > This was based on a discussion with Richard. TYPE_CANONICAL is used for > aliasing decisions and the FE must set it to from equivalence classes for > type

[Bug c/113688] [14 regression] verify_type fails for compatible structs with FAM in C23, builtin-sprintf-warn-1.c and gnu23-tag-1.c with -g

2025-04-13 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113688 --- Comment #20 from uecker at gcc dot gnu.org --- This was based on a discussion with Richard. TYPE_CANONICAL is used for aliasing decisions and the FE must set it to from equivalence classes for types that are compatible. In C, the types in

[Bug c/113688] [14 regression] verify_type fails for compatible structs with FAM in C23, builtin-sprintf-warn-1.c and gnu23-tag-1.c with -g

2025-04-14 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113688 --- Comment #28 from uecker at gcc dot gnu.org --- I am not sure alias set zero is a solution because it seems you would have to make many types have set zero to be correct. Capturing the equivalence classes using TYPA_CANONICAL seems a sound a

[Bug middle-end/104800] reodering of potentially trapping operations and volatile stores

2025-04-14 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104800 --- Comment #19 from uecker at gcc dot gnu.org --- We could add an optional flag and see? There are also many users who would like to have this as they use volatile to suppress unwanted code motion.

[Bug c/116892] forward declaration of enum followed by packed on the enum type causes an ICE in verify_type

2025-04-14 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116892 --- Comment #6 from uecker at gcc dot gnu.org --- Maybe something like that will do? diff --git a/gcc/c/c-decl.cc b/gcc/c/c-decl.cc index 8c420f22976..fb1216fe808 100644 --- a/gcc/c/c-decl.cc +++ b/gcc/c/c-decl.cc @@ -10303,6 +10303,7 @@ finish

[Bug c/119717] ICE in gimplify_expr, at gimplify.cc:20339 due to counted_by attribute

2025-04-14 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119717 uecker at gcc dot gnu.org changed: What|Removed |Added CC||uecker at gcc dot gnu.org --

[Bug tree-optimization/93010] Wrong optimization: provenance affects comparison of saved bits of addresses of dead auto variables

2025-04-12 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93010 uecker at gcc dot gnu.org changed: What|Removed |Added Last reconfirmed||2025-04-12 Ever confirmed

[Bug c/113688] [14 regression] verify_type fails for compatible structs with FAM in C23, builtin-sprintf-warn-1.c and gnu23-tag-1.c with -g

2025-04-14 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113688 --- Comment #32 from uecker at gcc dot gnu.org --- (In reply to rguent...@suse.de from comment #31) > On Mon, 14 Apr 2025, ebotcazou at gcc dot gnu.org wrote: > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113688 > > > > --- Comment #30 fro

[Bug c/113688] [14 regression] verify_type fails for compatible structs with FAM in C23, builtin-sprintf-warn-1.c and gnu23-tag-1.c with -g

2025-04-14 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113688 --- Comment #35 from uecker at gcc dot gnu.org --- (In reply to Eric Botcazou from comment #34) > > Those aliasing bugs are very annoying though and I think one reason people > > who care about correctness / reliability tend to use -fno-strict-al

[Bug c/113688] [14 regression] verify_type fails for compatible structs with FAM in C23, builtin-sprintf-warn-1.c and gnu23-tag-1.c with -g

2025-04-14 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113688 --- Comment #29 from uecker at gcc dot gnu.org --- Note that this is not directly related to C23 changes. C23 changes reuse the across TU rules also inside TU. But here the problem is that the across TU aliasing was already broken in some corne

[Bug c/113688] [14 regression] verify_type fails for compatible structs with FAM in C23, builtin-sprintf-warn-1.c and gnu23-tag-1.c with -g

2025-04-14 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113688 --- Comment #33 from uecker at gcc dot gnu.org --- Those aliasing bugs are very annoying though and I think one reason people who care about correctness / reliability tend to use -fno-strict-alasing. It would be nice to get this sorted out inste

[Bug target/118141] GCC miscompiles __builtin_convertvector() narrowing operation on amd64 above -O1

2025-04-25 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118141 uecker at gcc dot gnu.org changed: What|Removed |Added CC||uecker at gcc dot gnu.org --

[Bug tree-optimization/93010] Wrong optimization: provenance affects comparison of saved bits of addresses of dead auto variables

2025-04-11 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93010 uecker at gcc dot gnu.org changed: What|Removed |Added CC||uecker at gcc dot gnu.org ---

[Bug lto/119792] [14 Regression] internal error with simple discriminated types in Ada

2025-04-15 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119792 --- Comment #9 from uecker at gcc dot gnu.org --- If the problem is that useless_type_conversion_p should not return true for certain types with the same TYPE_CANONICAL, shouldn't we simply add back the test for the size of the FAM here to usel

[Bug lto/119792] [14 Regression] internal error with simple discriminated types in Ada

2025-04-15 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119792 --- Comment #11 from uecker at gcc dot gnu.org --- (In reply to rguent...@suse.de from comment #10) > On Tue, 15 Apr 2025, uecker at gcc dot gnu.org wrote: > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119792 > > > > --- Comment #9 from

[Bug c/116082] -Wunterminated-string-initialization should not warn about strings that end with "\0" but should warn still for -Wc++-compat

2025-04-25 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116082 --- Comment #6 from uecker at gcc dot gnu.org --- This is not about padding. The string literal has a final NUL character and yours then has two. The warning is about truncation of the final NUL character in the string literal. So I think the wa

[Bug tree-optimization/119980] New: wrong aliasing decision with structure acces

2025-04-28 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119980 Bug ID: 119980 Summary: wrong aliasing decision with structure acces Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug c/118765] c23 tag matching broken for multiple redeclarations of typedefs

2025-03-01 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118765 --- Comment #13 from uecker at gcc dot gnu.org --- Yes thanks, I need to analyze this a bit more but I narrowed the problem down to this. What do you mean by "my non-toy sources compiles/works correctly now"? There should be no existing code

[Bug c/119173] New: Documentation for -Wzero-as-null-pointer-constant should move to Warning Options

2025-03-09 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119173 Bug ID: 119173 Summary: Documentation for -Wzero-as-null-pointer-constant should move to Warning Options Product: gcc Version: 15.0 Status: UNCONFIRMED Severit

[Bug c/118061] [15 regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in tagged_types_tu_compatible_p, at c/c-typeck.cc:1946

2025-03-01 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118061 --- Comment #3 from uecker at gcc dot gnu.org --- Created attachment 60627 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60627&action=edit patch Patch adding checking for errors.

[Bug c/118765] c23 tag matching broken for multiple redeclarations of typedefs

2025-03-01 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118765 --- Comment #11 from uecker at gcc dot gnu.org --- Created attachment 60628 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60628&action=edit patch Tentative fix.

[Bug c/119251] New diagnostic: -Wcompound-literal-address

2025-03-12 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119251 uecker at gcc dot gnu.org changed: What|Removed |Added CC||uecker at gcc dot gnu.org --

[Bug c/119251] New diagnostic: -Wcompound-literal-address

2025-03-12 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119251 --- Comment #5 from uecker at gcc dot gnu.org --- Maybe a more targeted warning would make sense, e.g. taking the address of a compound literal inside ({ }). Maybe even checking whether it escapes? And/or only inside macros?

[Bug c/119526] standard attributes should be preserved in redeclarations

2025-03-29 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119526 uecker at gcc dot gnu.org changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c/119612] [15 regression] gcc.dg/pr106465.c newly re-broken

2025-04-04 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119612 --- Comment #2 from uecker at gcc dot gnu.org --- add_decl_expr adds these TYPE_DECLS, I think it is sufficient to relax the assertion for this case.

[Bug c/119612] [15 regression] gcc.dg/pr106465.c newly re-broken

2025-04-04 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119612 --- Comment #3 from uecker at gcc dot gnu.org --- diff --git a/gcc/c/c-typeck.cc b/gcc/c/c-typeck.cc index aaf8e54416a..cfe72028c6d 100644 --- a/gcc/c/c-typeck.cc +++ b/gcc/c/c-typeck.cc @@ -1813,10 +1813,13 @@ tagged_types_tu_compatible_p (const

[Bug c/118765] c23 tag matching broken for multiple redeclarations of typedefs

2025-03-22 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118765 uecker at gcc dot gnu.org changed: What|Removed |Added Attachment #60628|0 |1 is obsolete|

[Bug c/118765] c23 tag matching broken for multiple redeclarations of typedefs

2025-03-22 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118765 --- Comment #19 from uecker at gcc dot gnu.org --- (In reply to Hime Haieto from comment #17) > I'm not entirely sure what I should be doing/commenting on at the moment > considering that the current patches are clearly marked as being > temporar

[Bug c/118061] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in tagged_types_tu_compatible_p, at c/c-typeck.cc:1946

2025-03-20 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118061 uecker at gcc dot gnu.org changed: What|Removed |Added Resolution|--- |FIXED Status|ASS

[Bug c/119526] New: standard attributes should be preserved in redeclarations

2025-03-29 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119526 Bug ID: 119526 Summary: standard attributes should be preserved in redeclarations Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Pri

[Bug c/119612] [15 regression] gcc.dg/pr106465.c newly re-broken

2025-04-03 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119612 uecker at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW See Also|

[Bug target/120326] problems with attribute __ms_struct__

2025-05-19 Thread uecker at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120326 --- Comment #3 from uecker at gcc dot gnu.org --- Those should not get the same TYPE_CANONICAL. tagged_types_tu_compatible_p should be changed to detect this case which is due to different packing of bit fields. It works correctly for this: stru

<    1   2   3