[Bug c/114014] [14/15 Regression] ICE: 'verify_type' failed: 'TYPE_CANONICAL' is not compatible with -g on gcc.dg/gnu23-tag-1.c and builtin-sprintf-warn-1.c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114014 --- Comment #7 from GCC Commits --- The releases/gcc-14 branch has been updated by Eric Botcazou : https://gcc.gnu.org/g:5457388f58262bee41ae1d744ff6f3da34119e2d commit r14-11611-g5457388f58262bee41ae1d744ff6f3da34119e2d Author: Eric Botcazou Date: Mon Apr 14 23:35:43 2025 +0200 Revert very recent backport of changes to the type system The backport of the change made for PR c/113688 onto the 14 branch a couple of weeks ago has seriously broken the LTO compiler for the Ada language on the 14 branch, because it changes the GCC type system for the sake of C in a way that is not compatible with simple discriminated types in Ada. To be more precise, useless_type_conversion_p now returns true for some (view-) conversions that are needed by the rest of the compiler. gcc/ PR lto/119792 Revert Backported from master: 2024-12-12 Martin Uecker PR c/113688 PR c/114014 PR c/114713 PR c/117724 * tree.cc (gimple_canonical_types_compatible_p): Add exception. (verify_type): Add exception. gcc/lto/ PR lto/119792 Revert Backported from master: 2024-12-12 Martin Uecker * lto-common.cc (hash_canonical_type): Add exception. gcc/testsuite/ * gcc.dg/pr113688.c: Delete. * gcc.dg/pr114014.c: Likewise. * gcc.dg/pr114713.c: Likewise. * gcc.dg/pr117724.c: Likewise
[Bug c/114014] [14/15 Regression] ICE: 'verify_type' failed: 'TYPE_CANONICAL' is not compatible with -g on gcc.dg/gnu23-tag-1.c and builtin-sprintf-warn-1.c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114014 --- Comment #6 from GCC Commits --- The releases/gcc-14 branch has been updated by Martin Uecker : https://gcc.gnu.org/g:73549be0a3c819b2ab78e0e973f5b4d41b9f4a2d commit r14-11478-g73549be0a3c819b2ab78e0e973f5b4d41b9f4a2d Author: Martin Uecker Date: Sat Nov 23 08:04:05 2024 +0100 Fix type compatibility for types with flexible array member 2/2 [PR113688,PR114713,PR117724] For checking or computing TYPE_CANONICAL, ignore the array size when it is the last element of a structure or union. To not get errors because of an inconsistent number of members, zero-sized arrays which are the last element are not ignored anymore when checking the fields of a struct. PR c/113688 PR c/114014 PR c/114713 PR c/117724 gcc/ChangeLog: * tree.cc (gimple_canonical_types_compatible_p): Add exception. gcc/lto/ChangeLog: * lto-common.cc (hash_canonical_type): Add exception. gcc/testsuite/ChangeLog: * gcc.dg/pr113688.c: New test. * gcc.dg/pr114014.c: New test. * gcc.dg/pr114713.c: New test. * gcc.dg/pr117724.c: New test. (cherry picked from commit d46c7f313b5a30ee04080f249e31e12987d50aa2)
[Bug c/114014] [14/15 Regression] ICE: 'verify_type' failed: 'TYPE_CANONICAL' is not compatible with -g on gcc.dg/gnu23-tag-1.c and builtin-sprintf-warn-1.c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114014 --- Comment #5 from GCC Commits --- The master branch has been updated by Martin Uecker : https://gcc.gnu.org/g:d46c7f313b5a30ee04080f249e31e12987d50aa2 commit r15-6170-gd46c7f313b5a30ee04080f249e31e12987d50aa2 Author: Martin Uecker Date: Sat Nov 23 08:04:05 2024 +0100 Fix type compatibility for types with flexible array member 2/2 [PR113688,PR114713,PR117724] For checking or computing TYPE_CANONICAL, ignore the array size when it is the last element of a structure or union. To not get errors because of an inconsistent number of members, zero-sized arrays which are the last element are not ignored anymore when checking the fields of a struct. PR c/113688 PR c/114014 PR c/114713 PR c/117724 gcc/ChangeLog: * tree.cc (gimple_canonical_types_compatible_p): Add exception. gcc/lto/ChangeLog: * lto-common.cc (hash_canonical_type): Add exception. gcc/testsuite/ChangeLog: * gcc.dg/pr113688.c: New test. * gcc.dg/pr114014.c: New test. * gcc.dg/pr114713.c: New test. * gcc.dg/pr117724.c: New test.
[Bug c/114014] [14/15 Regression] ICE: 'verify_type' failed: 'TYPE_CANONICAL' is not compatible with -g on gcc.dg/gnu23-tag-1.c and builtin-sprintf-warn-1.c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114014 Andrew Pinski changed: What|Removed |Added Resolution|--- |DUPLICATE Status|NEW |RESOLVED --- Comment #4 from Andrew Pinski --- Dup. *** This bug has been marked as a duplicate of bug 113688 ***
