http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47525
Summary: DCE fails to eliminate a dead call to a pure function when compiled with -maltivec Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: berg...@gcc.gnu.org The dead code eliminator is failing to eliminate a call to a dead pure function when compiled with -maltivec. The test case looks like (it's a slightly modified pr42461.c, so that older compilers that don't support __builtin_unreachable() can compile it): bergner@igoo:~/> cat pr42461-2.c extern int link_failure (int) __attribute__ ((pure)); extern void no_return (void) __attribute__ ((noreturn,pure)); int main (void) { if (link_failure (0) < 1) no_return (); return 0; } This compiles fine with GCC 4.3, but fails with GCC 4.4, 4.5 and trunk with the following error message: bergner@igoo:~/> gcc -O2 -maltivec pr42461-2.c /tmp/ccUy2BCz.o:(.text+0x10): undefined reference to `link_failure' collect2: ld returned 1 exit status