https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126683
Bug ID: 126683
Summary: <source>:7:8: internal compiler error: tree check:
expected class 'type', have 'exceptional' (error_mark)
in create_tmp_from_val, at gimplify.cc:632 only in
trunk (17)
Product: gcc
Version: 17.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 on program:
```
float f;
void
foo (void)
{
f += __builtin_log1pf (f);
}
int *f(int *a, int *b)
{}
```
Stacktrace:
```
<source>:7:8: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in create_tmp_from_val, at gimplify.cc:632
7 | f += __builtin_log1pf (f);
| ^~~~~~~~~~~~~~~~~~~~
0x27fe448 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
???:0
0x27f308b internal_error(char const*, ...)
???:0
0x93750c tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
???:0
0xe990a5 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xe99bb3 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xe9b72a gimplify_stmt(tree_node**, gimple**)
???:0
0xe98990 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xeb96c6 gimplify_body(tree_node*, bool)
???:0
0xeb9b8c gimplify_function_tree(tree_node*)
???:0
0xc6fd37 cgraph_node::analyze()
???:0
0xc73206 symbol_table::finalize_compilation_unit()
???:0
```
To quickly reproduce:
https://godbolt.org/z/nGq4sMEfa