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 tree-optimization/78997] New: ICE on valid code at -O3 on x86_64-linux-gnu: verify_gimple failed


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

            Bug ID: 78997
           Summary: ICE on valid code at -O3 on x86_64-linux-gnu:
                    verify_gimple failed
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

This is a regression from 6.x.  The test is still about 2KB and has been
extremely tough to reduce. 

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 7.0.0 20170104 (experimental) [trunk revision 244072] (GCC)
$
$ gcc-trunk -O2 small.c
$ gcc-6.2 -O3 small.c
$
$ gcc-trunk -O3 small.c
small.c: In function ‘foo’:
small.c:7:6: error: the first argument of a VEC_COND_EXPR must be of a boolean
vector type of the same number of elements as the result
 void foo ()
      ^~~
vector(8) short int
vector(16) unsigned char
vect__ifc__822.147_690 = VEC_COND_EXPR <vect_cst__692, vect_cst__691,
vect__ifc__824.146_710>;
small.c:7:6: internal compiler error: verify_gimple failed
0xc4f6cf verify_gimple_in_cfg(function*, bool)
        ../../gcc-source-trunk/gcc/tree-cfg.c:5266
0xb2d552 execute_function_todo
        ../../gcc-source-trunk/gcc/passes.c:1965
0xb2df09 execute_todo
        ../../gcc-source-trunk/gcc/passes.c:2015
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
$


-------------------------------------------------


int printf (const char *, ...);

static short f, p, q, s, u, aa, ab, ac;
static int b, c, d, e, h, k, l, m, n, o, r, t, v, w, x, y, z, ad, ae, af, ag,
ah, ai, aj, ak, al, am, an;
int a, ao, ap, aq, ar, g, as, at, au, av, aw, ax, ay;

void foo ()
{ 
  int ba[2], i, j, bb;
  while (b)
    { 
      b++;
      while (b)
        { 
          for (; aw; aw++)
            for (; q; q++)
              { 
                short bc[20];
                if (k)
                  for (i = 0; i < 4; i++)
                    for (j = 0; j < 4; j++)
                      if (p)
                        bc[i * 4 + j] = 8;
                for (; ad; ad--)
                  t = bc[1];
              }
          for (bb = 0; bb < 5; bb++)
            if (m && v)
              { 
                printf ("%d", n);
                v = g && v;
                n = 0;
              }
          ab &= ba[0];
          aw = l;
          aa++;
          x++;
          while (1)
            { 
              int bd[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1};
              ap = a ? ba[1] : 0;
              if (ba[0] && o < ax)
                { 
                  int be[] =
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1};
                  for (; ae; ae++)
                    { 
                      e ^= ba[b] ^ aa;
                      f = r;
                      for (; y; y++)
                        aj &= u | ag;
                      int e[] =
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1};
                      if (a)
                        { 
                          r = c;
                          aj &= ag |= aq;
                        }
                      av = ai * u;
                      af = c;
                    }
                  au = d;
                  p++;
                  u = aj;
                  a = ba[1];
                  at = ar = af != ai && l;
                  as = ax = f;
                  ao = ak ? 0 : ah;
                  aw = ao;
                }
              ay = c;
              int bf[] =
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1};
              if (w < f)
                { 
                  int bg[] = {0};
                  if (aw)
                    break;
                }
              else
                aw = aa | (h &= ag) >> d, c = b = z && am;
              for (; w; w--)
                l = ac ^= al |= b;
              for (; k; k = 0)
                { 
                  int bh = m | s && n;
                  m = bh;
                  for (; t; t--)
                    f = q ^= (c < (e < ah));
                }
              d = an |= b;
              if (v)
                { 
                  int bi[] =
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1};
                  if (aw)
                    break;
                }
            }
        }
    }
}

int main ()
{ 
  foo ();
  return 0;
}

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