https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115642
Bug ID: 115642
Summary: [gcc][trunk] internal compiler error: tree check:
expected class 'type', have 'exceptional' (error_mark)
in c_expr_sizeof_expr
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: 141242068 at smail dot nju.edu.cn
Target Milestone: ---
Compiler explorer: https://gcc.godbolt.org/z/EWcfsT9hW
This crash involve gcc-trunk, no additional options are required.
The crash triggering program:
```
void f (int N) {
int a[2][N];
sizeof ((int [2][N])a);
}
```
The stack dump:
```
<source>:3:3: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in c_expr_sizeof_expr, at c/c-typeck.cc:3390
3 | sizeof ((int [2][N])a);
| ^~~~~~
0x23be10c internal_error(char const*, ...)
???:0
0x8948df tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
???:0
0xa3bf1b c_parse_file()
???:0
0xab5959 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.
```