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

            Bug ID: 115573
           Summary: ICE: verify_flow_info failed with no_reorder attribute
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iamanonymous.cs at gmail dot com
  Target Milestone: ---

ICE on trunk.
Compiler Explorer: https://godbolt.org/z/8sbP3Ydh6

*******************************************************************************
OS and Platform:
$ uname -a:
Linux ubuntu 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023
x86_64 x86_64 x86_64 GNU/Linux
*******************************************************************************
gcc version:
Using built-in specs.
COLLECT_GCC=/root/gcc_set/trunk-48a320a/bin/gcc
COLLECT_LTO_WRAPPER=/root/gcc_set/trunk-48a320a/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/root/gcc_set/trunk-48a320a
--with-gmp=/root/build_essential --with-mpfr=/root/build_essential
--with-mpc=/root/build_essential --enable-languages=c,c++ --disable-multilib
--with-sanitizer=address,undefined,thread,leak --enable-coverage
--disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.0 20240426 (experimental) (GCC) 

*******************************************************************************
Program:
$ cat mutant.c
int a;
__attribute__((no_reorder)) int b() {
  __label__ d, e;
  void f(int c) { goto *c ? &&d : &&e; }
d:
  f(a);
e:
}

*******************************************************************************
Command Lines:
$ gcc -O2 mutant.c
mutant.c: In function ‘f’:
mutant.c:4:40: error: basic block 2 edge lists are corrupted
    4 |   void f(int c) { goto *c ? &&d : &&e; }
      |                                        ^
during RTL pass: cprop
mutant.c:4:40: internal compiler error: verify_flow_info failed
0x117ca2f verify_flow_info()
        ../../gcc/gcc/cfghooks.cc:287
0x116b814 checking_verify_flow_info()
        ../../gcc/gcc/cfghooks.h:214
0x11a913e commit_edge_insertions()
        ../../gcc/gcc/cfgrtl.cc:2155
0x45abf2f bypass_conditional_jumps
        ../../gcc/gcc/cprop.cc:1744
0x45ac80c one_cprop_pass
        ../../gcc/gcc/cprop.cc:1895
0x45acadd execute_rtl_cprop
        ../../gcc/gcc/cprop.cc:1940
0x45accf0 execute
        ../../gcc/gcc/cprop.cc:1980
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.

Reply via email to