[Bug tree-optimization/31727] New: Functions with non-local gotos are considered not to have side effects

rakdver at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Apr 27 10:55:00 GMT 2007


In the following testcase with -O1, dce removes the bla call, thus
making the otherwise infinite loop terminate:

static void bla(void *label)
{
  goto *label;
}

int main (void)
{
l1:
  bla (&&l1);

  return 0;
}


-- 
           Summary: Functions with non-local gotos are considered not to
                    have side effects
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rakdver at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list