http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53214
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-04 10:05:02 UTC --- Reduced C testcase: double a(double) __attribute__ ((optimize(3), used)); double a(double r) { return r; } int main () { } ICEs this way with gcc -flto t.c but not with -flto-partition=none or when the optimization level selected in the attribute matches that of the compile.