[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

[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

[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

[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

[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

[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

[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:

[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:

[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) =

[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

[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=edit patch Tentative patch for the fix that makes the incomplete types have structural equivalence at the beginning and

[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

[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=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:

[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

[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

[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

[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);

[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:

[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

[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

[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

[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,

[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

[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=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

[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, > >

[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

[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

[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

[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

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

2023-10-18 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

[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

[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:

[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=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

[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

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

2023-08-17 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

[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

[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

[Bug c/109956] GCC reserves 9 bytes for struct s { int a; char b; char t[]; } x = {1, 2, 3};

2023-08-08 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109956 --- Comment #15 from Martin Uecker --- GCC seems to allocate enough for sizeof(struct foo) + n * sizeof(char) but not for sizeof(struct { int a; char b; char t[n]; }).

[Bug c++/110920] New: variably-length array declarations as parameters for C compatibility

2023-08-06 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110920 Bug ID: 110920 Summary: variably-length array declarations as parameters for C compatibility Product: gcc Version: unknown Status: UNCONFIRMED Severity:

[Bug c/102558] missing warning comparing T[static N] to null

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

[Bug c/108986] [11 Regression] Incorrect warning for [static] array parameter

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

[Bug c/68193] _Generic -Woverflow false alarm

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

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

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

[Bug c/110703] Incorrect "-Wfloat-conversion" diagnostic with _Generic

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

[Bug tree-optimization/102556] equality comparison of a [static N] parameter to null not folded

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

[Bug c/110878] -Wstringop-overflow incorrectly warns about arguments to functions with static array parameter declarations

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

[Bug sanitizer/98609] sanitizer diagnoses VLAs with length zero although zero-length arrays are a GNU extension

2023-07-30 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98609 --- Comment #9 from Martin Uecker --- I just ran into this problem again while trying to fix PR98608 where the problem is that instrumentation of parameters is missing. In parameters people often use n == 0 null and some of the -Wnonnull

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

2023-07-30 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98608 --- Comment #2 from Martin Uecker --- The problem is actually the missing sanitizer instrumentation of the parameter type. This is easy to fix, but then I run into the problem that a lot of code has n == 0 in parameters. Having an option to

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

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

[Bug c/110815] [static] not as useful as the nonnull attribute

2023-07-26 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110815 --- Comment #1 from Martin Uecker --- Created attachment 55638 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55638=edit patch This patch would synthesize a nonnull attribute for such parameters, making this fully equivalent.

[Bug c/110815] New: [static] not as useful as the nonnull attribute

2023-07-26 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110815 Bug ID: 110815 Summary: [static] not as useful as the nonnull attribute Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3

[Bug middle-end/110754] assume create spurious load for volatile variable

2023-07-21 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110754 --- Comment #6 from Martin Uecker --- One should check whether there is a similar issue with atomics, at least regarding accidentally introducing memory ordering or so.

[Bug c++/110754] New: assume create spurious load for volatile variable

2023-07-20 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110754 Bug ID: 110754 Summary: assume create spurious load for volatile variable Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug middle-end/83172] -Wstack-size= doesn't detect the correct stack size with VLA or alloca

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

[Bug c/29970] mixing ({...}) with VLA leads to massive breakage

2023-05-30 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29970 --- Comment #18 from Martin Uecker --- What is not fixed is returning structs with VLA members as in the first three test cases, e.g. the second one still ICEs.

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

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

[Bug c/109956] GCC reserves 9 bytes for struct s { int a; char b; char t[]; } x = {1, 2, 3};

2023-05-26 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109956 --- Comment #14 from Martin Uecker --- Maybe. On the other hand, I wonder whether a struct with FAM should not rather always have the same size, and alignment, and representation as the corresponding struct with a conventional array. This

[Bug c/109970] New: -Wstringop-overflow should work with parameter forward declarations

2023-05-25 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109970 Bug ID: 109970 Summary: -Wstringop-overflow should work with parameter forward declarations Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal

[Bug c/109956] GCC reserves 9 bytes for struct s { int a; char b; char t[]; } x = {1, 2, 3};

2023-05-25 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109956 --- Comment #12 from Martin Uecker --- The C standard says "However, when a . (or -> ) operator has a left operand that is (a pointer to) a structure with a flexible array member and the right operand names that member, it behaves as if that

[Bug c/109956] GCC reserves 9 bytes for struct s { int a; char b; char t[]; } x = {1, 2, 3};

2023-05-24 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109956 --- Comment #9 from Martin Uecker --- Clang as well, but that would be only padding inside the first part without taking into account extra element in the FAM. I am more concert about programmers using the formula sizeof(.) + n * sizeof for

[Bug c/109956] GCC reserves 9 bytes for struct s { int a; char b; char t[]; } x = {1, 2, 3};

2023-05-24 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109956 --- Comment #5 from Martin Uecker --- Clang bug: https://github.com/llvm/llvm-project/issues/62929

[Bug c/109956] GCC reserves 9 bytes for struct s { int a; char b; char t[]; } x = {1, 2, 3};

2023-05-24 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109956 --- Comment #4 from Martin Uecker --- The concern would be that a program relying on the size of an object being larger may then have out of bounds accesses. But rereading the standard, I am also not not seeing that this is required. (for the

[Bug c/109956] GCC reserves 9 bytes for struct s { int a; char b; char t[]; } x = {1, 2, 3};

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

[Bug c/96114] ICE in make_ssa_name_fn, at tree-ssanames.c:279 since r7-536-g381cdae49785fc4b

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

[Bug c/91093] Error on implicit int by default

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

[Bug c/106425] implicit-int

2023-05-19 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106425 Martin Uecker changed: What|Removed |Added Resolution|--- |DUPLICATE Status|NEW

  1   2   3   >