Bug 87843 - gcc segfault with -O2
Summary: gcc segfault with -O2
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 8.0
Hardware: i686
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-04-03 02:57 UTC by Bruce Hoult
Modified: 2007-04-18 16:52 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-10-03 19:24:25 UTC
Embargoed:


Attachments (Terms of Use)

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.


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