Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 87843

Summary: gcc segfault with -O2
Product: [Retired] Red Hat Linux Reporter: Bruce Hoult <bruce>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED CURRENTRELEASE QA Contact: Brian Brock <bbrock>
Severity: high Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-03 19:24:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Bruce Hoult 2003-04-03 02:57:46 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312

Description of problem:
gcc segfaults while compiling the following C code, which is a much
cut-down version.

Note: in the real code (which is the output of the d2c Dylan compiler) there is
more after the call to bar, but it shares the property of not doing a "return"
(in fact the real function later calls an error function that never returns)

--------------------------------
typedef struct a *a_t;

extern a_t bar(double value);

float foo(float r, float g)
{
    bar(r);
}
--------------------------------
gcc -O2 bug.c

bug.c: In function `foo':
bug.c:8: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.


Version-Release number of selected component (if applicable):
gcc 3.2-7

How reproducible:
Always

Steps to Reproduce:
gcc -O2 bug.c


Actual Results:  bug.c: In function `foo':
bug.c:8: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.


Expected Results:  object file and/or errors or warnings


Additional info:

Comment 1 Bruce Hoult 2003-07-07 00:39:57 UTC
seems to be fixed in 3.3

Comment 2 Richard Henderson 2004-10-03 19:24:25 UTC
Also fixed in 3.2.3-20.

Comment 3 David Lawrence 2006-04-24 19:01:33 UTC
Adding to blocker bug 185486 and adding IBM group.

Comment 4 David Lawrence 2006-04-24 19:44:43 UTC
The last changes to these bugs were mistakenly made. Removing incorrect blocker
bug and confidential group.