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