Bug 539923

Summary: gcc -O256 causes "internal compiler error: in cl_optimization_save, at options.c:5594"
Product: [Fedora] Fedora Reporter: Yuta Kitamura <kee>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: jakub
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-03 08:39:51 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:

Description Yuta Kitamura 2009-11-21 16:25:00 UTC
Description of problem:
Invoking a command "gcc -ON filename.c" (for N >= 256) causes an internal compiler error. See steps to reproduce for more details.

Version-Release number of selected component (if applicable):
$ gcc --version
gcc (GCC) 4.4.1 20090725 (Red Hat 4.4.1-2)
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

How reproducible:
Always.

Steps to Reproduce:
$ touch a.c
$ gcc -O256 a.c
cc1: internal compiler error: in cl_optimization_save, at options.c:5594
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
  
Actual results:
See above.

Expected results:
The compiler should not get killed.

Additional info:

Comment 1 Jakub Jelinek 2009-11-23 07:51:25 UTC
Why are you doing it, when only -O{,0,1,2,3,s} mean anything?

Comment 2 Yuta Kitamura 2009-11-24 00:26:38 UTC
(In reply to comment #1)
> Why are you doing it, when only -O{,0,1,2,3,s} mean anything?  

My friend found this only by chance. There was no specific intention.

At least, GCC shouldn't cause the internal error in this case. GCC should accept (or reject) it gracefully.

Comment 4 Jakub Jelinek 2009-12-03 08:39:51 UTC
Fixed in gcc-4.4.2-12.fc12.