Bug 247407

Summary: gcc w/ -O1+ gives internal compiler error: Segmentation fault
Product: [Fedora] Fedora Reporter: Matthew Fluet <fluet>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: adam
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-09-26 19:34:19 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:
Bug Depends On:    
Bug Blocks: 268281    
Attachments:
Description Flags
preprocessed source demonstrating gcc ICE none

Description Matthew Fluet 2007-07-09 04:33:48 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.12) Gecko/20070530 Fedora/1.5.0.12-1.fc6 Firefox/1.5.0.12

Description of problem:
After the recent update to gcc-4.1.2-13.fc6, I observe many ICEs on C files produced by MLton (http://mlton.org), a compiler for Standard ML that uses C and gcc as one backend.  The ICEs occur with optimization level 1 or higher; I do not observe the ICEs with optimization level 0.  I did not observe any such ICEs (with any optimization level) with 
gcc-4.1.1-51.fc6.

As the C code is machine generated, it isn't particularly human readable.
Nonetheless, I've attached a preprocessed source file, as indicated by the gcc error message.

Version-Release number of selected component (if applicable):
gcc-4.1.2-13.fc6

How reproducible:
Always


Steps to Reproduce:
1. gcc -c -O1 ccVnl11d.out.c


Actual Results:
z.2.c: In function ‘Chunk2’:
z.2.c:1188: warning: assignment makes pointer from integer without a cast
z.2.c:1533: warning: assignment makes pointer from integer without a cast
z.2.c:1552: warning: assignment makes pointer from integer without a cast
z.2.c:164: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccRZLLye.out file, please attach this to your bugreport.


Expected Results:


Additional info:

Comment 1 Matthew Fluet 2007-07-09 04:35:30 UTC
Created attachment 158745 [details]
preprocessed source demonstrating gcc ICE

Comment 2 Jakub Jelinek 2007-07-09 12:56:51 UTC
Tracking upstream.

Comment 3 Adam Goode 2007-08-29 15:19:54 UTC
Can the fix in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32694#c5 be backported? 

This is breaking MLton in Fedora:
http://koji.fedoraproject.org/koji/getfile?taskID=131416&name=build.log

Comment 4 Adam Goode 2007-09-17 20:54:58 UTC
F8t3 freeze is soon. Any chance of this being fixed before that? Thanks.

Comment 5 Adam Goode 2007-09-26 19:34:19 UTC
I've confirmed this is fixed in latest rawhide. Thanks!