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



             Bug #: 56932

           Summary: [regression 4.8]: vrp and/or niter-related wrong-code

                    bug

    Classification: Unclassified

           Product: gcc

           Version: 4.8.0

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: middle-end

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: kti...@gcc.gnu.org





The following testcase triggers this wrong code-bug.



int a[250];

__attribute__ ((noinline))

t(int i)

{

  if (i==0)

    exit(0);

  if (i>255)

    abort ();

}

main()

{

  unsigned int i;

  for (i=0;;i++)

    {

      a[i]=t((i+5)&0xff);

    }

}



It fails with vrp-pass enabled.  The issue is that overflow of (i+5)&0xff isn't

detected correct.



This test is related to existing testcase pr/55875 in gcc.c-torture/execute.

Reply via email to