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

            Bug ID: 85167
           Summary: shrink-wrap.c:333:15: runtime error with UBSAN
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For the following C code stored in source code file bug426.c:

struct a {
  long b
};
c, d, e;
f() {
  long g;
  for (; g == c ? 0 : (e = 1); g = ((struct a *)g)->b)
    if (h())
      return d;
}

$ ~/gcc/results/bin/gcc -c -w -O2 bug426.c
../../trunk/gcc/shrink-wrap.c:333:15: runtime error: member access within null
pointer of type 'struct df_lr_bb_info'
../../trunk/gcc/shrink-wrap.c:334:15: runtime error: member access within null
pointer of type 'struct df_lr_bb_info'
$ ~/gcc/results/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/home/dcb/gcc/results/bin/gcc
COLLECT_LTO_WRAPPER=/home/dcb/gcc/results.259004.ubsan/libexec/gcc/x86_64-pc-linux-gnu/8.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../trunk/configure --prefix=/home/dcb/gcc/results.259004.ubsan
--with-build-config=bootstrap-ubsan --disable-multilib --disable-werror
--enable-checking=df,extra,fold,rtl,yes --enable-languages=c,c++,fortran
Thread model: posix
gcc version 8.0.1 20180402 (experimental) (GCC) 
$

Reply via email to