public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/115143] New: [14/15 Regression] tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.cc:85
@ 2024-05-17 21:29 patrick at rivosinc dot com
  2024-05-18  2:00 ` [Bug tree-optimization/115143] " pinskia at gcc dot gnu.org
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: patrick at rivosinc dot com @ 2024-05-17 21:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115143

            Bug ID: 115143
           Summary: [14/15 Regression] tree check: expected class 'type',
                    have 'exceptional' (error_mark) in
                    useless_type_conversion_p, at gimple-expr.cc:85
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: patrick at rivosinc dot com
  Target Milestone: ---

Testcase:
short a, d;
char b;
long c;
unsigned long e, f;
void g(unsigned long h) {
  if (c ? e : b)
    if (e)
      if (d) {
        a = f ? ({
          unsigned long i = d ? f : 0, j = e ? h : 0;
          i < j ? i : j;
        }) : 0;
      }
}

Backtrace:
> /scratch/tc-testing/tc-may-17/build-rv64gcv/bin/riscv64-unknown-linux-gnu-gcc -O3 red.c -o red.out
during GIMPLE pass: phiopt
./red.c: In function 'g':
./red.c:14:1: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.cc:85
   14 | }
      | ^
0xb17187 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        ../../../gcc/gcc/tree.cc:9045
0xa40033 tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
        ../../../gcc/gcc/tree.h:3779
0xa40033 useless_type_conversion_p(tree_node*, tree_node*)
        ../../../gcc/gcc/gimple-expr.cc:85
0x1378e92 verify_gimple_assign_binary
        ../../../gcc/gcc/tree-cfg.cc:4309
0x13841de verify_gimple_in_cfg(function*, bool, bool)
        ../../../gcc/gcc/tree-cfg.cc:5614
0x11fff20 execute_function_todo
        ../../../gcc/gcc/passes.cc:2089
0x120046b execute_todo
        ../../../gcc/gcc/passes.cc:2143
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.

Godbolt:
https://godbolt.org/z/o187xKdP1

Affects x86, arm, risc-v.

Found via fuzzer.

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2024-06-11 17:20 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-17 21:29 [Bug tree-optimization/115143] New: [14/15 Regression] tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.cc:85 patrick at rivosinc dot com
2024-05-18  2:00 ` [Bug tree-optimization/115143] " pinskia at gcc dot gnu.org
2024-05-18  2:22 ` pinskia at gcc dot gnu.org
2024-05-18 13:11 ` pinskia at gcc dot gnu.org
2024-05-18 13:12 ` [Bug tree-optimization/115143] [13/14/15 " pinskia at gcc dot gnu.org
2024-05-18 13:15 ` [Bug tree-optimization/115143] [11/12/13/14/15 " pinskia at gcc dot gnu.org
2024-05-18 13:27 ` pinskia at gcc dot gnu.org
2024-05-18 13:27 ` pinskia at gcc dot gnu.org
2024-05-18 14:04 ` pinskia at gcc dot gnu.org
2024-05-18 14:06 ` pinskia at gcc dot gnu.org
2024-05-18 14:10 ` pinskia at gcc dot gnu.org
2024-05-18 14:36 ` pinskia at gcc dot gnu.org
2024-05-18 23:12 ` pinskia at gcc dot gnu.org
2024-05-20 21:45 ` cvs-commit at gcc dot gnu.org
2024-05-20 21:57 ` cvs-commit at gcc dot gnu.org
2024-05-20 21:58 ` [Bug tree-optimization/115143] [11/12/13 " pinskia at gcc dot gnu.org
2024-05-21  9:20 ` jakub at gcc dot gnu.org
2024-05-21 14:32 ` cvs-commit at gcc dot gnu.org
2024-05-21 14:36 ` [Bug tree-optimization/115143] [11/12 " pinskia at gcc dot gnu.org
2024-06-11 17:19 ` cvs-commit at gcc dot gnu.org
2024-06-11 17:20 ` [Bug tree-optimization/115143] [11 " 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).