Follow up to PR 37635. >From trans-intrinsic.c: /* LEADZ (i) = (i == 0) ? BIT_SIZE (i) : __builtin_clz(i) - (BIT_SIZE('int') - BIT_SIZE(i))
The conditional expression is necessary because the result of LEADZ(0) is defined, but the result of __builtin_clz(0) is undefined for most targets. [...] /* ??? For some combinations of targets and integer kinds, the condition can be avoided if CLZ_DEFINED_VALUE_AT_ZERO is used. Later. */ -- Summary: Optimize LEADZ/TRAILZ for zero arguments Product: gcc Version: 4.4.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37780