http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52086

             Bug #: 52086
           Summary: [4.7 Regression] ICE caused by wrong peephole2 for
                    QImode mem += reg followed by test
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: ja...@gcc.gnu.org
        ReportedBy: ja...@gcc.gnu.org
            Target: i?86-linux


/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-additional-options "-fpic" { target fpic } } */

struct S { char a; char b[100]; };
int bar (void);
int baz (int);

void
foo (struct S *x)
{
  if (bar () & 1)
    {
      char c = bar ();
      baz (4);
      x->a += c;
      while (x->a)
        x->b[c] = bar ();
    }
}

ICEs on i?86-linux (and x86_64-linux -m32) starting with:
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179646

Reply via email to