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

            Bug ID: 126511
           Summary: [13/14/15/16/17 Regression] ICE verify_flow_info
                    failed with sanitize=null since r13-1754
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mjires at gcc dot gnu.org
                CC: amonakov at gcc dot gnu.org, dodji at gcc dot gnu.org,
                    dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org,
                    kcc at gcc dot gnu.org
  Target Milestone: ---

Compiling reduced testcase gcc.dg/asan/pr117209.c results in ICE since
r13-1754-g7a158a5776f5ca.

$ cat pr117209.c
struct A { };
void foo();
int baz_z;
__attribute__((returns_twice, const)) int bar(struct A);
void baz() {
  struct A *x;
  int *y;
  if (baz_z)
    foo();
  *y = bar(*x);
}


$ gcc pr117209.c -fsanitize=null
pr117209.c: In function ‘baz’:
pr117209.c:11:1: error: gimple_bb (stmt) is set to a wrong basic block
   11 | }
      | ^
# .MEM_13 = VDEF <.MEM_3(ab)>
.UBSAN_NULL (y_8(D), 1B, 0);
during GIMPLE pass: ubsan
pr117209.c:11:1: internal compiler error: verify_gimple failed
0x27c3f81 internal_error(char const*, ...)
        /home/mjires/git/GCC/master/gcc/diagnostic-global-context.cc:787
0x10ff539 verify_gimple_in_cfg(function*, bool, bool)
        /home/mjires/git/GCC/master/gcc/tree-cfg.cc:5566
0xf49e1a execute_function_todo
        /home/mjires/git/GCC/master/gcc/passes.cc:2100
0xf4a364 do_per_function
        /home/mjires/git/GCC/master/gcc/passes.cc:1699
0xf4a4c0 execute_todo
        /home/mjires/git/GCC/master/gcc/passes.cc:2152
/home/mjires/built/master/libexec/gcc/x86_64-pc-linux-gnu/17.0.0/cc1 -quiet
pr117209.c -quiet -dumpdir a- -dumpbase pr117209.c -dumpbase-ext .c
-mtune=generic -march=x86-64 -fsanitize=null -o /tmp/ccYXKwn8.s
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.


$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/x86_64-pc-linux-gnu/17.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --disable-bootstrap
--enable-languages=c,c++,fortran,lto --disable-multilib --disable-libsanitizer
--enable-checking : (reconfigured) /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --disable-bootstrap --disable-multilib
--disable-libsanitizer --enable-checking --enable-languages=c,c++,fortran,lto
--no-create --no-recursion
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 17.0.0 20260730 (experimental) (GCC)

Reply via email to