[Bug c/112571] [13/14 Regression] ICE with nested redefinition of enum
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112571 Joseph S. Myers changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |jsm28 at gcc dot gnu.org Known to work||14.0 Status|NEW |ASSIGNED --- Comment #4 from Joseph S. Myers --- Fixed for GCC 14 so far.
[Bug c/112571] [13/14 Regression] ICE with nested redefinition of enum
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112571 --- Comment #3 from GCC Commits --- The master branch has been updated by Joseph Myers : https://gcc.gnu.org/g:d22d1a9346f27db41459738c6eb404f8f0956e6f commit r14-8669-gd22d1a9346f27db41459738c6eb404f8f0956e6f Author: Joseph Myers Date: Wed Jan 31 21:39:53 2024 + c: Fix ICE for nested enum redefinitions with/without fixed underlying type [PR112571] Bug 112571 reports an ICE-on-invalid for cases where an enum is defined, without a fixed underlying type, inside the enum type specifier for a definition of that same enum with a fixed underlying type. The ultimate cause is attempting to access ENUM_UNDERLYING_TYPE in a case where it is NULL. Avoid this by clearing ENUM_FIXED_UNDERLYING_TYPE_P in thie case of inconsistent definitions. Bootstrapped wth no regressions for x86_64-pc-linux-gnu. PR c/112571 gcc/c/ * c-decl.cc (start_enum): Clear ENUM_FIXED_UNDERLYING_TYPE_P when defining without a fixed underlying type an enumeration previously declared with a fixed underlying type. gcc/testsuite/ * gcc.dg/c23-enum-9.c, gcc.dg/c23-enum-10.c: New tests.
[Bug c/112571] [13/14 Regression] ICE with nested redefinition of enum
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112571 Andrew Pinski changed: What|Removed |Added Known to work||12.3.0 Status|UNCONFIRMED |NEW Target Milestone|--- |13.3 Ever confirmed|0 |1 Summary|ICE with nested |[13/14 Regression] ICE with |redefinition of enum|nested redefinition of enum Last reconfirmed||2023-11-19 Known to fail||13.1.0 --- Comment #2 from Andrew Pinski --- Confirmed. >but not on 13.2 with -std=c2x Yes it does just hidden from the user really: :3: confused by earlier errors, bailing out is an ICE after an error with --enable-checking=release (which is the default for release branches). Anyways 12.x didn't ICE for the one in comment #1.