[Bug rtl-optimization/52490] New: RTL DCE removes trapping const libcalls

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Mar 5 13:16:00 GMT 2012


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

             Bug #: 52490
           Summary: RTL DCE removes trapping const libcalls
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rguenth@gcc.gnu.org


The testcase from PR47086

void
foo ()
{
  int n = 0;
  while (1)
    {
      int i[n % 1];
      n++;
    }
}

is miscompiled with -O -ftrapv -fnon-call-exceptions -fexceptions
by RTL DCE which removes the call to addvdi3.



More information about the Gcc-bugs mailing list