https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120309
Bug ID: 120309
Summary: internal compiler error: Segmentation fault in
groktypename since gcc 15.1
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: mario.rodriguezb1 at um dot es
Target Milestone: ---
ICE only since 15.1 and happening in trunk:
```
#include <stdatomic.h>
#include <stdint.h>
typedef _Atomic(uintptr_t) g;
_Static_assert(_Generic(g(0)))
```
```
<source>:4:1: internal compiler error: Segmentation fault
4 | _Static_assert(_Generic(g(0)))
| ^~~~~~~~~~~~~~
0x261bc05 diagnostic_context::diagnostic_impl(rich_location*,
diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag
(*) [1], diagnostic_t)
???:0
0x2639976 internal_error(char const*, ...)
???:0
0xa2d7cb groktypename(c_type_name*, tree_node**, bool*)
???:0
0xab9b0e c_parse_file()
???:0
0xb38779 c_common_parse_file()
???:0
```
To reproduce quickly:
https://godbolt.org/z/a9eofno5j