Bug 87843 - gcc segfault with -O2
gcc segfault with -O2
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
8.0
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-04-02 21:57 EST by Bruce Hoult
Modified: 2007-04-18 12:52 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-03 15:24:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bruce Hoult 2003-04-02 21:57:46 EST
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-06 20:39:57 EDT
seems to be fixed in 3.3
Comment 2 Richard Henderson 2004-10-03 15:24:25 EDT
Also fixed in 3.2.3-20.
Comment 3 David Lawrence 2006-04-24 15:01:33 EDT
Adding to blocker bug 185486 and adding IBM group.
Comment 4 David Lawrence 2006-04-24 15:44:43 EDT
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.