Bug 19211 - Internal compiler error
Summary: Internal compiler error
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-10-17 00:40 UTC by Braden McDaniel
Modified: 2007-04-18 16:29 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-10-17 14:18:06 UTC
Embargoed:


Attachments (Terms of Use)
The problem code (4.42 KB, text/plain)
2000-10-17 00:43 UTC, Braden McDaniel
no flags Details
included file for e_hypot.c (7.85 KB, text/plain)
2000-10-17 00:44 UTC, Braden McDaniel
no flags Details

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...;


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