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

            Bug ID: 121421
           Summary: [ICE] internal compiler error: Segmentation fault
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: njuwy at smail dot nju.edu.cn
  Target Milestone: ---

Compiler Explorer: https://godbolt.org/z/4a4aj7PoG


The crash triggering program (compile with `gcc-16 -O0`):
```
void main(void)
{
    void __GIMPLE b()
}
```

The crash output:
```
<source>: In function 'main':
<source>:3:10: error: '__GIMPLE' only valid with '-fgimple'
    3 |     void __GIMPLE b()
      |          ^~~~~~~~
<source>: In function 'b':
<source>:4:1: error: expected declaration specifiers before '}' token
    4 | }
      | ^
<source>:5: error: expected '{' at end of input
<source>:4:1: internal compiler error: Segmentation fault
    4 | }
      | ^
0x254c505 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
        ???:0
0x2541da6 internal_error(char const*, ...)
        ???:0
0xa2a06e add_stmt(tree_node*)
        ???:0
0xace1de c_parse_file()
        ???:0
0xb500f9 c_common_parse_file()
        ???:0
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
```

Reply via email to