Created attachment 959377 [details] A reproducer that causes internal compiler error in gcc 4.9.2 with -fsanitize=undefined Description of problem: When compiling the following small program, GCC reports an internal compiler error: repro.c: In function ´fun´: repro.c: internal compiler error: in gimplify_expr, at gimplify.c:8361 (int)(1.0 < f ? 1.0 : 0.0); ^ Version-Release number of selected component (if applicable): gcc --version: gcc (GCC) 4.9.2 20141101 (Red Hat 4.9.2-1) uname -a: Linux 3.17.1-302.fc21.x86_64 #1 SMP Fri Oct 17 20:05:46 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux How reproducible: Steps to Reproduce: 1. Write the following small program to a (repro.c, also attached): void fun() { double f = 0.0; (int)(1.0 < f ? 1.0 : 0.0); } 2. Run: gcc -c -fsanitize=undefined repro.c -o repro.o Actual results: repro.c: In function ´fun´: repro.c: internal compiler error: in gimplify_expr, at gimplify.c:8361 (int)(1.0 < f ? 1.0 : 0.0); Expected results: An object file called repro.o Additional info: I did not succeed in making a smaller reproducer.
I was not able to create an account on GCC's bugzilla instance, https://gcc.gnu.org/bugzilla/, so I could not file an bug upstream :(
I think this should be already fixed.
Closing, as gcc-4.9.2-6.fc21 is pushed.