[Bug c/117490] Invalid TBAA for structures without tag and compatible definition in C.

2024-11-08 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117490 --- Comment #5 from Martin Uecker --- Am Freitag, dem 08.11.2024 um 14:22 + schrieb rguenth at gcc dot gnu.org: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117490 > > Richard Biener changed: > >What|Removed

[Bug c/117145] [14/15 Regression] ICE: in make_ssa_name_fn, at tree-ssanames.cc:355 at -O1 and above with vector_size and VLA in struct argument since r14-1143-g42d1612eb5c3b2

2024-10-23 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117145 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #9 f

[Bug c/117245] [13/14/15 Regression] ICE: verify_ssa failed (error: definition in block 2 follows the use) with VLA types in struct with a vector type rebuild and nested functions

2024-10-21 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117245 --- Comment #6 from Martin Uecker --- The commit causing this was like this where the middle end code was removed, which then exposed the cases where the FE did not emit DECL_EXPR correctly. https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=42d16

[Bug c/117245] [13/14/15 Regression] ICE: verify_ssa failed (error: definition in block 2 follows the use) with VLA types in struct with a vector type rebuild and nested functions

2024-10-21 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117245 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #5 f

[Bug sanitizer/98623] sanitizer does not diagnose when passing pointers to arrays of incorrect run-time length

2024-10-11 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98623 --- Comment #3 from Martin Uecker --- PATCH https://gcc.gnu.org/pipermail/gcc-patches/2024-July/657253.html

[Bug c/87588] gcc does not warn about unused variable which references to itself

2024-09-18 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87588 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #5 fr

[Bug c/116767] C const function pointer no code generated (or optimized out)

2024-09-18 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116767 --- Comment #7 from Martin Uecker --- I wonder whether there should be a warning when a declaration has the "const" attribute, but the actual definition does not.

[Bug c/116767] C const function pointer no code generated (or optimized out)

2024-09-18 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116767 --- Comment #4 from Martin Uecker --- You are right about both. It gets miscompiled also with side effects and if you are remove the forward declaration, you get: :10:21: warning: initialization makes '__attribute__((const))' qualified functio

[Bug c/116767] C const function pointer no code generated (or optimized out)

2024-09-18 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116767 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #2 f

[Bug c/116726] [14/15 Regression] compiler segfault when using certain struct redefinitions

2024-09-17 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116726 --- Comment #8 from Martin Uecker --- PATCH: https://gcc.gnu.org/pipermail/gcc-patches/2024-September/663123.html

[Bug c/116726] [14/15 Regression] compiler segfault when using certain struct redefinitions

2024-09-17 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116726 --- Comment #7 from Martin Uecker --- (In reply to Peter Damianov from comment #6) > Another testcase: > not an ICE, but I think rejects-valid > ``` > typedef void f(struct s1); > struct s1 { > int f1; > }; > typedef void f(struct s1); > ``` >

[Bug c/116726] [14/15 Regression] compiler segfault when using certain struct redefinitions

2024-09-17 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116726 --- Comment #5 from Martin Uecker --- Fix being tested. diff --git a/gcc/c/c-typeck.cc b/gcc/c/c-typeck.cc index 58b2724b39e..ba6d96d26b2 100644 --- a/gcc/c/c-typeck.cc +++ b/gcc/c/c-typeck.cc @@ -1686,8 +1686,11 @@ tagged_types_tu_compatible_

[Bug c/116728] c23 tag compatibility broken with pointers to incomplete types

2024-09-17 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116728 --- Comment #5 from Martin Uecker --- Sorry, mixed this up with the other bug. Here I would say the behavior is correct as specified in ISO C23. Note that incomplete structs could be completed later also before ISO C23. But incomplete struct t

[Bug c/116728] c23 tag compatibility broken with pointers to incomplete types

2024-09-17 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116728 --- Comment #4 from Martin Uecker --- Although the new example doesn't crash and the error I get seems correct to me. What is the problem you see here?

[Bug c/116728] c23 tag compatibility broken with pointers to incomplete types

2024-09-16 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116728 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #3 f

[Bug c/116726] [14/15 Regression] compiler segfault when using certain struct redefinitions

2024-09-15 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116726 --- Comment #4 from Martin Uecker --- I will look at this.

[Bug c/46073] __builtin_choose_expr outputs warnings for unused expression

2024-09-06 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46073 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #7 fr

[Bug c/116456] New: initialization of auto / __auto_type variable at file scope with compound literal with const

2024-08-21 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116456 Bug ID: 116456 Summary: initialization of auto / __auto_type variable at file scope with compound literal with const Product: gcc Version: 11.0 Status: UNCONFIRMED

[Bug c/116284] New: incorrect classification of zero-sized array as variably modified

2024-08-08 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116284 Bug ID: 116284 Summary: incorrect classification of zero-sized array as variably modified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal

[Bug c/98539] incorrect warning with -Wvla-parameter for unspecified bound in multi-dim array

2024-08-07 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98539 --- Comment #3 from Martin Uecker --- Another symptom is the incorrect warning we get here: void foo(char (*a)[*], int (*x)[*]); void foo(char (*a)[*], int (*x)[sizeof *a]); :3:30: warning: mismatch in bound 1 of argument 2 declared as 'int

[Bug c/116193] enhancement: type attribute that causes overflow for unsigned integer types to trap

2024-08-02 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116193 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #5 f

[Bug c/116016] enhancement: add __builtin_set_counted_by(P->FAM, COUNT) or equivalent

2024-07-30 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116016 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #24

[Bug c/116141] New: ICE with conditional operator

2024-07-30 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116141 Bug ID: 116141 Summary: ICE with conditional operator Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Ass

[Bug c/115027] Missing warning: unused struct's with self-referential initialisers

2024-06-29 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115027 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #2 f

[Bug c/115515] New: constexpr ICE

2024-06-16 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115515 Bug ID: 115515 Summary: constexpr ICE Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigne

[Bug tree-optimization/115177] incorrect TBAA for derived types involving hardbool types

2024-06-04 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115177 --- Comment #5 from Martin Uecker --- If we do want to constrain the type, we should make them incompatible at the language level. Aliasing is secondary. From a safety perspective, it is always safer to allow aliasing, because the optimizer bre

[Bug tree-optimization/115157] incorrect TBAA for derived types involving enum types

2024-05-26 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115157 --- Comment #2 from Martin Uecker --- PATCH: https://gcc.gnu.org/pipermail/gcc-patches/2024-May/652669.html

[Bug tree-optimization/115177] incorrect TBAA for derived types involving hardbool types

2024-05-21 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115177 Martin Uecker changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug tree-optimization/115177] New: incorrect TBAA for derived types involving hardbool types

2024-05-21 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115177 Bug ID: 115177 Summary: incorrect TBAA for derived types involving hardbool types Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal

[Bug tree-optimization/115157] New: incorrect TBAA for derived types involving enum types

2024-05-19 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115157 Bug ID: 115157 Summary: incorrect TBAA for derived types involving enum types Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Co

[Bug c/114831] typeof doesn't evaluate expression when it has variably modified type in some cases

2024-05-18 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114831 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #2 f

[Bug tree-optimization/114959] incorrect TBAA for drived types involving function types

2024-05-06 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114959 --- Comment #2 from Martin Uecker --- The GCC FE has all the necessary logic to compute type compatibility and this could easily be adapted to compute equivalence classes and then set a TYPE_CANONICAL. All function types in the same class would

[Bug tree-optimization/114959] New: incorrect TBAA for drived types involving function types

2024-05-06 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114959 Bug ID: 114959 Summary: incorrect TBAA for drived types involving function types Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal P

[Bug c/114873] Incorrect warning generated for [*] array when in atomic or typeof type specifier for a parameter declaration

2024-05-01 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114873 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #6 f

[Bug lto/114574] [14 regression] ICE when building curl with LTO (fld_incomplete_type_of, at ipa-free-lang-data.cc:257) since r14-9763

2024-04-18 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114574 --- Comment #30 from Martin Uecker --- Am Donnerstag, dem 18.04.2024 um 11:57 + schrieb jakub at gcc dot gnu.org: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114574 > > --- Comment #29 from Jakub Jelinek --- > (In reply to uecker from c

[Bug c/114731] -Wincompatible-pointer-types false positive in combination with _Generic(3)

2024-04-16 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114731 --- Comment #19 from Martin Uecker --- It would still work for other arguments that are used in the active branch, but not arguments you may not use in active branch or other subexpressions not used in the active branch.

[Bug c/114731] -Wincompatible-pointer-types false positive in combination with _Generic(3)

2024-04-16 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114731 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #18

[Bug c/97100] -Wformat checks all arms of _Generic leading to irrelevant type expectation warnings

2024-04-16 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97100 --- Comment #13 from Martin Uecker --- A C compiler has to diagnose all constraint violations. Alternatively, it could also reject the program with an error.

[Bug c/97100] -Wformat checks all arms of _Generic leading to irrelevant type expectation warnings

2024-04-16 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97100 --- Comment #11 from Martin Uecker --- A conforming C compiler has to diagnose all violations of constraints with the same correct type of x in all branches (not the type it would have in another context where a different is taken).

[Bug c/114727] New: ICE with c23 with aligned attribute and .-g

2024-04-15 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114727 Bug ID: 114727 Summary: ICE with c23 with aligned attribute and .-g Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c

[Bug lto/114713] New: incorrect TBAA for struct with flexible array member or GNU zero size

2024-04-14 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114713 Bug ID: 114713 Summary: incorrect TBAA for struct with flexible array member or GNU zero size Product: gcc Version: unknown Status: UNCONFIRMED Severity: norma

[Bug c/114361] ICE with c23 related to completion of incomplete structure types

2024-04-05 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114361 Martin Uecker changed: What|Removed |Added Resolution|FIXED |--- See Also|

[Bug lto/114574] [14 regression] ICE when building curl with LTO (fld_incomplete_type_of, at ipa-free-lang-data.cc:257) since r14-9763

2024-04-05 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114574 --- Comment #20 from Martin Uecker --- (In reply to Martin Uecker from comment #18) > > > > + TYPE_CANONICAL (x) = TYPE_CANONICAL (t); > > As has been discussed, this is wrong, it should have been > > TYPE_CANONICAL (x) = build_qualified_ty

[Bug lto/114574] [14 regression] ICE when building curl with LTO (fld_incomplete_type_of, at ipa-free-lang-data.cc:257) since r14-9763

2024-04-05 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114574 --- Comment #18 from Martin Uecker --- > > + TYPE_CANONICAL (x) = TYPE_CANONICAL (t); > As has been discussed, this is wrong, it should have been > TYPE_CANONICAL (x) = build_qualified_type (TYPE_CANONICAL (t), TYPE_QUALS > (x)); > or so

[Bug lto/114574] [14 regression] ICE when building curl with LTO (fld_incomplete_type_of, at ipa-free-lang-data.cc:257) since r14-9763

2024-04-04 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114574 Martin Uecker changed: What|Removed |Added Attachment #57874|0 |1 is obsolete|

[Bug lto/114574] [14 regression] ICE when building curl with LTO (fld_incomplete_type_of, at ipa-free-lang-data.cc:257) since r14-9763

2024-04-04 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114574 --- Comment #15 from Martin Uecker --- Created attachment 57874 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57874&action=edit patch Tentative patch for the fix that makes the incomplete types have structural equivalence at the beginni

[Bug lto/114574] [14 regression] ICE when building curl with LTO (fld_incomplete_type_of, at ipa-free-lang-data.cc:257) since r14-9763

2024-04-04 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114574 --- Comment #14 from Martin Uecker --- (In reply to Jakub Jelinek from comment #12) > Not an expert on TYPE_CANONICAL, but my understanding is that non-NULL > TYPE_CANONICAL is just an optimization to speed up type comparisons (but it > seems c-

[Bug lto/114574] [14 regression] ICE when building curl with LTO (fld_incomplete_type_of, at ipa-free-lang-data.cc:257) since r14-9763

2024-04-04 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114574 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #13

[Bug c/114361] ICE with c23 when creating mutually nested and compatible types with statement expressions

2024-03-29 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114361 Martin Uecker changed: What|Removed |Added Resolution|DUPLICATE |--- Status|RESOLVED

[Bug c/114361] ICE with c23 when creating mutually nested and compatible types with statement expressions

2024-03-29 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114361 --- Comment #3 from Martin Uecker --- Created attachment 57834 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57834&action=edit patch Tentative patch.

[Bug c/114361] New: ICE with c23 when creating mutually nested and compatible types with statement expressions

2024-03-16 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114361 Bug ID: 114361 Summary: ICE with c23 when creating mutually nested and compatible types with statement expressions Product: gcc Version: 14.0 Status: UNCONFIRMED

[Bug tree-optimization/113879] New: missed optimization - not exploiting known range of integers

2024-02-11 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113879 Bug ID: 113879 Summary: missed optimization - not exploiting known range of integers Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal

[Bug c/113878] New: missed optimization with sanitizer and signed integer overflow

2024-02-11 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113878 Bug ID: 113878 Summary: missed optimization with sanitizer and signed integer overflow Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal

[Bug c/113438] ICE (segfault) in dwarf2out_decl with -g -std=c23 on c23-tag-composite-2.c

2024-01-28 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113438 --- Comment #5 from Martin Uecker --- PATCH: https://gcc.gnu.org/pipermail/gcc-patches/2024-January/644124.html

[Bug c++/113263] New: ICE for invalid code for compound literal and type definition in return type

2024-01-07 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113263 Bug ID: 113263 Summary: ICE for invalid code for compound literal and type definition in return type Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: n

[Bug c/112488] [14 Regression] ICE in make_ssa_name_fn with VLA inside type and inlining since r14-1142

2023-12-08 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112488 --- Comment #10 from Martin Uecker --- PATCH: https://gcc.gnu.org/pipermail/gcc-patches/2023-December/639961.html

[Bug c/112488] [14 Regression] ICE in make_ssa_name_fn with VLA inside type and inlining since r14-1142

2023-12-07 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112488 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #9 f

[Bug c/112791] error: 'TYPE_CANONICAL' is not compatible

2023-11-30 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112791 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #1 f

[Bug lto/112716] LTO optimization with struct with variable size

2023-11-28 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112716 --- Comment #9 from Martin Uecker --- (In reply to Richard Biener from comment #8) > (In reply to uecker from comment #7) > > > > > > > Note that even without LTO when you enable inlining you'd expose two > > > different structures with two di

[Bug lto/112716] LTO optimization with struct with variable size

2023-11-27 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112716 --- Comment #5 from Martin Uecker --- It works (and is required to work) for other types, e.g. [[gnu::noinline,gnu::noipa]] int foo(void *p, void *q) { int n = 5; int (*p2)[n] = p; (*p2)[0] = 1; bar(q); r

[Bug lto/112716] New: LTO optimization with struct of variable ssize

2023-11-26 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112716 Bug ID: 112716 Summary: LTO optimization with struct of variable ssize Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: l

[Bug c/112429] New: Wnonnull should warn for multi-dimensional arrays

2023-11-07 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112429 Bug ID: 112429 Summary: Wnonnull should warn for multi-dimensional arrays Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component

[Bug c/112428] New: Wnonnull outputs wrong type

2023-11-07 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112428 Bug ID: 112428 Summary: Wnonnull outputs wrong type Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee

[Bug libfortran/112364] calloc used incorrectly

2023-11-03 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112364 --- Comment #11 from Martin Uecker --- This is one possible way to read it. But as written, I think one can easily understand it the other way, because calloc never mentions requested total size but only about space for an array of objects of s

[Bug libfortran/112364] calloc used incorrectly

2023-11-03 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112364 --- Comment #9 from Martin Uecker --- (In reply to jos...@codesourcery.com from comment #7) > I believe "size requested" refers to the product nmemb * size in the case > of calloc, so getting the arguments the "wrong" way round does not affect

[Bug c/112347] [14 regression] ICE on jemalloc-5.3.0: Segmentation fault around convert_for_assignment()

2023-11-03 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112347 --- Comment #20 from Martin Uecker --- Ah, this is how it works. Thanks!

[Bug c/112347] [14 regression] ICE on jemalloc-5.3.0: Segmentation fault around convert_for_assignment()

2023-11-03 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112347 --- Comment #18 from Martin Uecker --- I think this can be closed.

[Bug libfortran/112364] calloc used incorrectly

2023-11-03 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112364 --- Comment #6 from Martin Uecker --- For reference, this is were the revised wording in C comes. This is intentional. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2293.htm

[Bug c/112347] [14 regression] ICE on jemalloc-5.3.0: Segmentation fault around convert_for_assignment()

2023-11-03 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112347 --- Comment #16 from Martin Uecker --- I agree that the C++ should have this warning as well, although it seems less important there. This would be an enhancement request for the C++ FE.

[Bug c/112347] [14 regression] ICE on jemalloc-5.3.0: Segmentation fault around convert_for_assignment()

2023-11-03 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112347 --- Comment #14 from Martin Uecker --- "I think calloc is available in C++, so the warning is wrong." I am happy to revise the warning if it is wrong or annoying, but I do not understand what C++ has to do with this.

[Bug libfortran/112364] calloc used incorrectly

2023-11-03 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112364 --- Comment #4 from Martin Uecker --- Interesting. But independently of alignment, the description of calloc makes it clear that it allocates an array of nmemb objects of size x. So in any case I think the code should be changed accordingly, wh

[Bug libfortran/112364] calloc used incorrectly

2023-11-03 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112364 --- Comment #2 from Martin Uecker --- I don't think this is correct. The requirement is "The pointer returned if the allocation succeeds is suitably aligned so that it may be assigned to a pointer to any type of object with a fundamental align

[Bug libfortran/112364] New: calloc used incorrectly

2023-11-03 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112364 Bug ID: 112364 Summary: calloc used incorrectly Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran

[Bug c/112347] [14 regression] ICE on jemalloc-5.3.0: Segmentation fault around convert_for_assignment()

2023-11-03 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112347 --- Comment #12 from Martin Uecker --- I filed a bug for libfortran: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112364

[Bug c/112347] [14 regression] ICE on jemalloc-5.3.0: Segmentation fault around convert_for_assignment()

2023-11-02 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112347 --- Comment #11 from Martin Uecker --- In this case this is by design because the size of an element should be second argument to calloc. ("The calloc function allocates space for an array of nmemb objects, each of whose size is size.")

[Bug c/112347] [14 regression] ICE on jemalloc-5.3.0: Segmentation fault around convert_for_assignment()

2023-11-02 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112347 Martin Uecker changed: What|Removed |Added Attachment #56490|0 |1 is obsolete|

[Bug c/112347] [14 regression] ICE on jemalloc-5.3.0: Segmentation fault around convert_for_assignment()

2023-11-02 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112347 Martin Uecker changed: What|Removed |Added Attachment #56489|0 |1 is obsolete|

[Bug c/112347] [14 regression] ICE on jemalloc-5.3.0: Segmentation fault around convert_for_assignment()

2023-11-02 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112347 --- Comment #4 from Martin Uecker --- Created attachment 56489 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56489&action=edit patch This should fix it. I am running some tests and will commit this.

[Bug c/112347] [14 regression] ICE on jemalloc-5.3.0: Segmentation fault around convert_for_assignment()

2023-11-02 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112347 --- Comment #3 from Martin Uecker --- Thanks for reporting. I will fix this.

[Bug sanitizer/98608] missing sanitizer detection for arrays with invalid length defind using typeof

2023-11-01 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98608 --- Comment #3 from Martin Uecker --- PATCH (but unclear about n == 0) https://gcc.gnu.org/pipermail/gcc-patches/2023-November/634896.html

[Bug c/70954] -Wmisleading-indentation false positive on GNU "ed"

2023-11-01 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70954 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #2 fr

[Bug ipa/96503] attribute alloc_size effect lost after inlining

2023-10-25 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96503 --- Comment #7 from Martin Uecker --- Am Mittwoch, dem 25.10.2023 um 11:08 + schrieb siddhesh at gcc dot gnu.org: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96503 > > --- Comment #6 from Siddhesh Poyarekar --- > So basically, > > __b

[Bug ipa/96503] attribute alloc_size effect lost after inlining

2023-10-24 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96503 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #3 fr

[Bug c++/110848] Consider enabling -Wvla by default in non-GNU C++ modes

2023-10-23 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110848 --- Comment #25 from Martin Uecker --- I agree that they are not idiomatic C++ and that there exist good reasons why a programmer may want to avoid them (including standards compliance). But code not being idiomatic is not a terrible good reas

[Bug c++/110848] Consider enabling -Wvla by default in non-GNU C++ modes

2023-10-23 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110848 --- Comment #22 from Martin Uecker --- There may be many good reasons to prefer std::vector over VLAs in C++ but security and safety is not one of them. There are plenty of CVEs caused by std::vector out-of-bounds accesses. The question is whet

[Bug c++/110848] Consider enabling -Wvla by default in non-GNU C++ modes

2023-10-22 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110848 --- Comment #20 from Martin Uecker --- And what alternative do you think is fundamentally safer than VLAs? VLAs know their bound. Thus, they integrate with _FORTIFY_SOURCE, and UBSan bounds checking. Also UBSan address checking at run-time. At

[Bug c++/110848] Consider enabling -Wvla by default in non-GNU C++ modes

2023-10-22 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110848 --- Comment #16 from Martin Uecker --- I do not think -Wall should warn about GNU extensions when used with -std=gnu++XX in C++ and I think it is annoying that clang does it now. It only drives people to use alloca or other alternatives with wo

[Bug c/111808] [C23] constexpr with excess precision

2023-10-17 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111808 --- Comment #8 from Martin Uecker --- There are certainly other similar portability issues, e.g.: enum : long { X = 0xUL }; https://godbolt.org/z/hKsqPe9c1 BTW: Are there better examples where we have similar build failures also in p

[Bug c/111808] [C23] constexpr with excess precision

2023-10-17 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111808 --- Comment #6 from Martin Uecker --- Adding a note is a good idea, but it doesn't really solve the issue. The problem I see is that somebody developing on x86-64 does not get a warning that the code is not strictly conforming and then it fails

[Bug c/111808] [C23] constexpr with excess precision

2023-10-14 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111808 --- Comment #2 from Martin Uecker --- On i386 1. / 3. is computed with higher precision than double and then the initializer changes the value which is a contraint violation in C23. But whether this happens or not depends on the architecture,

[Bug c/111808] New: [C23] constexpr

2023-10-14 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111808 Bug ID: 111808 Summary: [C23] constexpr Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned

[Bug c/111708] Calling external global function instead of local static function.

2023-10-14 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111708 --- Comment #8 from Martin Uecker --- PATCH: https://gcc.gnu.org/pipermail/gcc-patches/2023-October/632999.html

[Bug c/111708] Calling external global function instead of local static function.

2023-10-08 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111708 --- Comment #7 from Martin Uecker --- Created attachment 56075 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56075&action=edit patch adding error external / internal mismatch of functions Untested patch.

[Bug c/111708] Calling external global function instead of local static function.

2023-10-08 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111708 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #6 f

[Bug c/108896] provide "element_count" attribute to give more context to __builtin_dynamic_object_size() and -fsanitize=bounds

2023-10-05 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108896 --- Comment #48 from Martin Uecker --- Indicating a null terminated string should certainly use a different attribute name.

[Bug c/71219] Warn about (struct S*)malloc(n) where n < sizeof(struct S)

2023-09-18 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71219 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #5 fr

[Bug c++/109021] accept size parameter in extern C

2023-08-16 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109021 --- Comment #6 from Martin Uecker --- Note that I do not propose to add variably modified types to C++. This would indeed be a major extension. I simply propose to ignore the size expressions in C headers as a usability improvement. My patch

[Bug c++/109021] accept size parameter in extern C

2023-08-15 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109021 --- Comment #4 from Martin Uecker --- Sorry, how can an enhancement request that addresses a real C/C++ compatibility problem be marked "resolved invalid" ?

[Bug c/84510] C front-end does not utilise -Wuseless-cast

2023-08-10 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84510 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #2 fr

[Bug c/66425] (void) cast doesn't suppress __attribute__((warn_unused_result))

2023-08-10 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #56 f

  1   2   3   >