* [Bug c/100525] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:87
2021-05-11 15:24 [Bug c/100525] New: ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:87 cnsun at uwaterloo dot ca
@ 2021-08-12 22:22 ` pinskia at gcc dot gnu.org
2022-08-08 12:37 ` k.even-mendoza at imperial dot ac.uk
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-12 22:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100525
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-08-12
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/100525] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:87
2021-05-11 15:24 [Bug c/100525] New: ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:87 cnsun at uwaterloo dot ca
2021-08-12 22:22 ` [Bug c/100525] " pinskia at gcc dot gnu.org
@ 2022-08-08 12:37 ` k.even-mendoza at imperial dot ac.uk
2022-08-08 15:47 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: k.even-mendoza at imperial dot ac.uk @ 2022-08-08 12:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100525
Karine EM <k.even-mendoza at imperial dot ac.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |k.even-mendoza at imperial dot ac.
| |uk
--- Comment #2 from Karine EM <k.even-mendoza at imperial dot ac.uk> ---
I also got this error with a bit different trace/pass in GCC-13:
======
void **a;
void b() { void **c = a; }
a;
=====
and the trace:
fuzzer-file-879.c:2:19: internal compiler error: tree check: expected class
'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at
gimple-expr.cc:87
2 | void b() { void **c = a; }
| ^
0x7e598b tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
.././../gcc-source/gcc/tree.cc:8829
0x712633 tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
.././../gcc-source/gcc/tree.h:3580
0x712633 useless_type_conversion_p(tree_node*, tree_node*)
.././../gcc-source/gcc/gimple-expr.cc:87
0xc3e491 gimplify_modify_expr
.././../gcc-source/gcc/gimplify.cc:6035
0xc2d9f6 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
.././../gcc-source/gcc/gimplify.cc:15098
0xc310c6 gimplify_stmt(tree_node**, gimple**)
.././../gcc-source/gcc/gimplify.cc:7151
0xc3bb8a gimplify_and_add(tree_node*, gimple**)
.././../gcc-source/gcc/gimplify.cc:496
0xc3bb8a gimplify_decl_expr
.././../gcc-source/gcc/gimplify.cc:1936
0xc2da72 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
.././../gcc-source/gcc/gimplify.cc:15295
0xc310c6 gimplify_stmt(tree_node**, gimple**)
.././../gcc-source/gcc/gimplify.cc:7151
0xc31884 gimplify_bind_expr
.././../gcc-source/gcc/gimplify.cc:1428
0xc2e161 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
.././../gcc-source/gcc/gimplify.cc:15299
0xc3fa9f gimplify_stmt(tree_node**, gimple**)
.././../gcc-source/gcc/gimplify.cc:7151
0xc3fa9f gimplify_body(tree_node*, bool)
.././../gcc-source/gcc/gimplify.cc:16355
0xc3feed gimplify_function_tree(tree_node*)
.././../gcc-source/gcc/gimplify.cc:16509
0xa6ba97 cgraph_node::analyze()
.././../gcc-source/gcc/cgraphunit.cc:676
0xa6e6e7 analyze_functions
.././../gcc-source/gcc/cgraphunit.cc:1241
0xa6f36d symbol_table::finalize_compilation_unit()
.././../gcc-source/gcc/cgraphunit.cc:2501
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/100525] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:87
2021-05-11 15:24 [Bug c/100525] New: ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:87 cnsun at uwaterloo dot ca
2021-08-12 22:22 ` [Bug c/100525] " pinskia at gcc dot gnu.org
2022-08-08 12:37 ` k.even-mendoza at imperial dot ac.uk
@ 2022-08-08 15:47 ` pinskia at gcc dot gnu.org
2022-08-09 6:55 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-08-08 15:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100525
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Karine EM from comment #2)
> I also got this error with a bit different trace/pass in GCC-13:
I think that is a different issue so I filed PR 106560 for that one.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/100525] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:87
2021-05-11 15:24 [Bug c/100525] New: ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:87 cnsun at uwaterloo dot ca
` (2 preceding siblings ...)
2022-08-08 15:47 ` pinskia at gcc dot gnu.org
@ 2022-08-09 6:55 ` rguenth at gcc dot gnu.org
2022-11-15 19:44 ` pinskia at gcc dot gnu.org
2022-11-28 22:20 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-08-09 6:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100525
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Btw, the issue for the original testcase is that we run into
static void
c_parser_gimple_statement (gimple_parser &parser, gimple_seq *seq)
{
...
/* GIMPLE call statement without LHS. */
if (c_parser_next_token_is (parser, CPP_SEMICOLON)
&& TREE_CODE (lhs.value) == CALL_EXPR)
{
gimple *call;
call = gimple_build_call_from_tree (lhs.value, NULL);
gimple_seq_add_stmt_without_update (seq, call);
gimple_set_location (call, loc);
return;
and the C FE hands us back a non-error CALL_EXPR with an error_mark_node
argument. Usually those get "cleaned out" during gimplification but here
it prevails.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/100525] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:87
2021-05-11 15:24 [Bug c/100525] New: ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:87 cnsun at uwaterloo dot ca
` (3 preceding siblings ...)
2022-08-09 6:55 ` rguenth at gcc dot gnu.org
@ 2022-11-15 19:44 ` pinskia at gcc dot gnu.org
2022-11-28 22:20 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-15 19:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100525
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org
Resolution|--- |FIXED
Keywords| |ice-checking
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=107305
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This was fixed with r13-3397-g8e2b5cf7cde999 .
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/100525] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:87
2021-05-11 15:24 [Bug c/100525] New: ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:87 cnsun at uwaterloo dot ca
` (4 preceding siblings ...)
2022-11-15 19:44 ` pinskia at gcc dot gnu.org
@ 2022-11-28 22:20 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-28 22:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100525
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |13.0
^ permalink raw reply [flat|nested] 7+ messages in thread