Consider int foo (int a) { if (a == 0) if (a == 0) return 1; return 0; }
Note that the second "if" statement is redundant. -- Summary: VRP does not get rid of a redundant "if" statement. Product: gcc Version: unknown Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P2 Component: tree-optimization AssignedTo: kazu at cs dot umass dot edu ReportedBy: kazu at cs dot umass dot edu CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20657