When compiling the following program with -O2, gcc gives an ICE "internal compiler error: in trunc_int_for_mode, at explow.c:56".
Versions affected: gcc (GCC) 4.4.3 20100127 (Red Hat 4.4.3-4) gcc (GCC) 4.5.1 20100521 (prerelease) ================================================ static inline unsigned parity(unsigned x) { return (unsigned) __builtin_parity(x); } unsigned f(unsigned rpoly) { return parity(rpoly & 1) ^ parity(rpoly & 6); } ================================================ -- Summary: __builtin_parity() causes ICE in trunc_int_for_mode() Product: gcc Version: 4.5.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rainy6144 at gmail dot com GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44481