This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/78342] New: [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2657 (error: flow control insn inside a basic block)


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

            Bug ID: 78342
           Summary: [7 Regression] ICE in rtl_verify_bb_insns, at
                    cfgrtl.c:2657 (error: flow control insn inside a basic
                    block)
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---
            Target: powerpc-*-linux-gnu*

gcc-7.0.0-alpha20161113 snapshot ICEs when compiling the following reduced
snippet for 32-bit BE powerpc w/ -O2 (or -O3) -fPIC:

unsigned int cn, pb;

void
zc (void)
{
  char *ir;
  char r2 = 1;
  unsigned long long int ws = ((pb != 0) ? cn : 2ull);

  if (ws >= 2u)
    {
      ir = (char *)&ws;
      for (pb = 0; pb < 2; ++pb)
        {
          ws = 0ull;
          while (*ir < 1)
            (*ir)++;
        }
    }
  else
    ir = &r2;

  if (ws == 0ull || *ir != r2)
    cn = 0;
  cn %= 0;
}

% powerpc-e300c3-linux-gnu-gcc-7.0.0-alpha20161113 -fPIC -O2 -w -c uq0ggewy.c
uq0ggewy.c: In function 'zc':
uq0ggewy.c:26:1: error: in basic block 7:
 }
 ^
uq0ggewy.c:26:1: error: flow control insn inside a basic block
(insn 109 58 146 7 (trap_if (const_int 1 [0x1])
        (const_int 0 [0])) 820 {trap}
     (nil))
uq0ggewy.c:26:1: internal compiler error: in rtl_verify_bb_insns, at
cfgrtl.c:2657
0x320be071ca5 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20161113/work/gcc-7-20161113/gcc/rtl-error.c:108
0x320bdc3d037 rtl_verify_bb_insns
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20161113/work/gcc-7-20161113/gcc/cfgrtl.c:2657
0x320bdc3d037 rtl_verify_flow_info_1
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20161113/work/gcc-7-20161113/gcc/cfgrtl.c:2743
0x320bdc3d0a4 rtl_verify_flow_info
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20161113/work/gcc-7-20161113/gcc/cfgrtl.c:2985
0x320bdc291dd verify_flow_info()
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20161113/work/gcc-7-20161113/gcc/cfghooks.c:258
0x320be725921 execute
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-7.0.0_alpha20161113/work/gcc-7-20161113/gcc/bb-reorder.c:2577

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]