The the .vars dump for following functions (that only differ by the type of their parameters):
void test55 (_Bool XXX, _Bool YYY) { if (XXX && YYY) { if (!XXX) link_error (); } } void test555 (int XXX, int YYY) { if (XXX && YYY) { if (!XXX) link_error (); } } is: test555 (XXX, YYY) { <bb 0>: return; } test555 (XXX, YYY) { <bb 0>: if (XXX != 0 && YYY != 0) goto <L0>; else goto <L2>; <L0>:; if (XXX == 0) goto <L1>; else goto <L2>; <L1>:; link_error () [tail call]; <L2>:; return; } The pass that eliminates the link_error call for the first function is DOM1, but unfortunatelly it does not do the same thing for the second function. -- Summary: DOM working for _Bool but not for int Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dann at godzilla dot ics dot uci dot edu CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20065