Bug 1166173 - gcc internal compiler error with -fsanitize=undefined
Summary: gcc internal compiler error with -fsanitize=undefined
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 21
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-20 13:58 UTC by Erik Helin
Modified: 2015-02-17 10:20 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-17 10:20:51 UTC


Attachments (Terms of Use)
A reproducer that causes internal compiler error in gcc 4.9.2 with -fsanitize=undefined (67 bytes, text/plain)
2014-11-20 13:58 UTC, Erik Helin
no flags Details

Description Erik Helin 2014-11-20 13:58:29 UTC
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.

Comment 1 Erik Helin 2014-11-20 13:59:19 UTC
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 :(

Comment 2 Marek Polacek 2015-01-12 16:57:38 UTC
I think this should be already fixed.

Comment 3 Marek Polacek 2015-02-17 10:20:51 UTC
Closing, as gcc-4.9.2-6.fc21 is pushed.


Note You need to log in before you can comment on or make changes to this bug.