http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56321
Bug #: 56321 Summary: ICE:segfault in midend for -funsafe-math-optimizations -O3 Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: ktkac...@gcc.gnu.org CC: jgreenha...@gcc.gnu.org, wschm...@linux.vnet.ibm.com Target: arm-none-eabi, x86_64-unknown-linux-gnu Created attachment 29449 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29449 ICE triggers for -O3 -funsafe-math-optimizations Attached test case triggers a segfault in the midend. Observed on both arm-none-eabi and x86_64-unknown-linux-gnu gcc -O3 -funsafe-math-optimizations test.c -S test.c: In function ‘foo’: test.c:1:7: internal compiler error: Segmentation fault float foo(int n) ^ 0x8f4e45 crash_signal ../../gcc-fsf/gcc/toplev.c:332 0x84b7bc execute_function_todo ../../gcc-fsf/gcc/passes.c:1967 0x84da0d execute_todo ../../gcc-fsf/gcc/passes.c:1999 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. Bisection showed r186567 introduced the problem. It seems that the reassoc code tries to do something wrong with __builtin_pow*