[Bug tree-optimization/103025] New: ICE in insert_stmt_after, at tree-ssa-reassoc.c:1524

marxin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 1 14:58:13 GMT 2021


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

            Bug ID: 103025
           Summary: ICE in insert_stmt_after, at tree-ssa-reassoc.c:1524
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: rguenth at gcc dot gnu.org
  Target Milestone: ---

The following ICEs:

$ cat vect.i
static void __get_cpuid_count(int __leaf) {
  unsigned __eax;
  __asm__ __volatile__("" : "=a"(__eax));
  if (__eax == 0 || __eax < __leaf)
    __asm__("");
}
void main() {
  int want_b;
  __get_cpuid_count(7);
}

$ gcc vect.i -fno-tree-ccp -ftrivial-auto-var-init=pattern -fno-tree-dce
-fnon-call-exceptions -fno-tree-forwprop -fno-tree-fre -O1
during GIMPLE pass: reassoc
vect.i: In function ‘main’:
vect.i:7:6: internal compiler error: in insert_stmt_after, at
tree-ssa-reassoc.c:1524
    7 | void main() {
      |      ^~~~
0x7b2b4a insert_stmt_after
        /home/marxin/Programming/gcc/gcc/tree-ssa-reassoc.c:1524
0x10d0a4b build_and_add_sum
        /home/marxin/Programming/gcc/gcc/tree-ssa-reassoc.c:1589
0x10dcebb eliminate_redundant_comparison
        /home/marxin/Programming/gcc/gcc/tree-ssa-reassoc.c:2312
0x10dcebb optimize_ops_list
        /home/marxin/Programming/gcc/gcc/tree-ssa-reassoc.c:2450
0x10e290b reassociate_bb
        /home/marxin/Programming/gcc/gcc/tree-ssa-reassoc.c:6634
0x10e2f7b reassociate_bb
        /home/marxin/Programming/gcc/gcc/tree-ssa-reassoc.c:6796
0x10e52fe do_reassoc
        /home/marxin/Programming/gcc/gcc/tree-ssa-reassoc.c:6908
0x10e52fe execute_reassoc
        /home/marxin/Programming/gcc/gcc/tree-ssa-reassoc.c:6997
0x10e52fe execute
        /home/marxin/Programming/gcc/gcc/tree-ssa-reassoc.c:7038
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.


More information about the Gcc-bugs mailing list