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

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).