https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123835

            Bug ID: 123835
           Summary: ICE in start_enum, at cp/decl.cc:18786
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: suyuchang at whu dot edu.cn
  Target Milestone: ---

Input:
enum alignas ( union {}) decltype () ::

Command:
g++ test.cpp

Output:
<source>:1:36: error: expected primary-expression before ')' token
1 | enum alignas ( union {}) decltype () ::
| ^
<source>:1:40: error: expected identifier at end of input
1 | enum alignas ( union {}) decltype () ::
| ^
<source>:1:40: error: expected '{' at end of input
<source>:1:40: internal compiler error: in start_enum, at cp/decl.cc:18786
0x2952bb8 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag () [1], diagnostics::kind)
???:0
0x29478fb internal_error(char const, ...)
???:0
0xb1e3cc fancy_abort(char const*, int, char const*)
???:0
0xd64a23 c_parse_file()
???:0
0xeee549 c_common_parse_file()
???:0
/cefs/e2/e208000267cce234eb736ef3_gcc-trunk-20260127/bin/../libexec/gcc/x86_64-linux-gnu/16.0.1/cc1plus
-quiet -imultiarch x86_64-linux-gnu -iprefix
/cefs/e2/e208000267cce234eb736ef3_gcc-trunk-20260127/bin/../lib/gcc/x86_64-linux-gnu/16.0.1/
-D_GNU_SOURCE <source> -quiet -dumpdir /app/ -dumpbase output.cpp -dumpbase-ext
.cpp -masm=intel -mtune=generic -march=x86-64 -g -fdiagnostics-color=always
-fno-verbose-asm -o /app/output.s
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See https://gcc.gnu.org/bugs/
 for instructions.
Compiler returned: 1

This only occurs in GCC-trunk, and this also makes released GCC "confused by
earlier errors, bailing out".

The test case was generated by a fuzzer.

Reply via email to