Bug 19211

Summary: Internal compiler error
Product: [Retired] Red Hat Linux Reporter: Braden McDaniel <braden>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED WONTFIX QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: dr
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-10-17 14:18:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
The problem code
none
included file for e_hypot.c none

Description Braden McDaniel 2000-10-17 00:40:16 UTC
When passing -O2 in conjunction with -fPIC, gcc ICEs on this code from
fdlibm (which is used in Mozilla JavaScript). Attachments to follow.

Comment 1 Braden McDaniel 2000-10-17 00:43:57 UTC
Created attachment 4229 [details]
The problem code

Comment 2 Braden McDaniel 2000-10-17 00:44:39 UTC
Created attachment 4230 [details]
included file for e_hypot.c

Comment 3 Jakub Jelinek 2000-11-13 09:34:57 UTC
You can fix this up by passing -fno-strict-aliasing option to gcc when
compiling it, the code does illegal type punning. Even if it compiled fine,
it would not work as expected with strict aliasing turned on. I agree that gcc
should not ICE on any bad code, but as this ICE goes away since function-as-trees
were added to mainline gcc, fixing this would be in my eyes only wasted time
(the ICE can be only triggered by the illegal type punning
of floating point values under certain specific conditions). Example of illegal
code is double d; ... *(int *)&d = 0x...;