public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/100525] New: 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 cnsun at uwaterloo dot ca
2021-08-12 22:22 ` [Bug c/100525] " pinskia at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: cnsun at uwaterloo dot ca @ 2021-05-11 15:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100525
Bug ID: 100525
Summary: ICE: tree check: expected class ‘type’, have
‘exceptional’ (error_mark) in
useless_type_conversion_p, at gimple-expr.c:87
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: cnsun at uwaterloo dot ca
Target Milestone: ---
$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/tmp.FUbEknNORK-gcc-builder/gcc/configure
--enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch
--prefix=/scratch/software/gcc-trunk --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210511 (experimental) [master revision
:7db32cac8:aa891c56f25baac94db004e309d1b6e40b770a95] (GCC)
$ cat mutant.c
__GIMPLE
foo() { __builtin_abs(a); }
$ gcc-trunk -O0 mutant.c
mutant.c:1:1: error: ‘__GIMPLE’ only valid with ‘-fgimple’
1 | __GIMPLE
| ^~~~~~~~
mutant.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
2 | foo() { __builtin_abs(a); }
| ^~~
mutant.c: In function ‘foo’:
mutant.c:2:23: error: ‘a’ undeclared (first use in this function)
2 | foo() { __builtin_abs(a); }
| ^
mutant.c:2:23: note: each undeclared identifier is reported only once for each
function it appears in
during GIMPLE pass: lower
mutant.c:2:1: internal compiler error: tree check: expected class ‘type’, have
‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:87
2 | foo() { __builtin_abs(a); }
| ^~~
0x7bce07 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
/tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/tree.c:8724
0x6cb6de tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
/tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/tree.h:3479
0x6cb6de useless_type_conversion_p(tree_node*, tree_node*)
/tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-expr.c:87
0xbe57da gimple_builtin_call_types_compatible_p(gimple const*, tree_node*)
/tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple.c:2723
0x19177b5 lower_stmt
/tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-low.c:387
0x19177b5 lower_sequence
/tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-low.c:217
0x191766d lower_gimple_bind
/tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-low.c:473
0x191852d lower_function_body
/tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-low.c:110
0x191852d execute
/tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-low.c:195
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
^ 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 ` 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
end of thread, other threads:[~2022-11-28 22:20 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2022-11-15 19:44 ` pinskia at gcc dot gnu.org
2022-11-28 22:20 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).