Bug 226706 - Attached code crashes the compiler, error at: reload1.c:9508
Attached code crashes the compiler, error at: reload1.c:9508
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: gcc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2007-01-31 20:33 EST by Andrew Biggs
Modified: 2007-11-16 20:14 EST (History)
1 user (show)

See Also:
Fixed In Version: RHSA-2007-0473
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-06-11 13:50:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
File referenced for attachment in error message. (779 bytes, application/octet-stream)
2007-02-01 10:39 EST, Andrew Biggs
no flags Details
Patch that fixes the bug (1.36 KB, patch)
2007-02-13 00:35 EST, Alexandre Oliva
no flags Details | Diff

  None (edit)
Description Andrew Biggs 2007-01-31 20:33:16 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20061206 Firefox/

Description of problem:
A GCC internal error results from attempting to compile the following code with g++ and the -fnon-call-exceptions, -O2, and -fPIC options:

void foo() { 
     try {   
        float y = 10; 
        while (y > 0) {
            double z = (y / 10);
            y = z;
     catch (...) {}

when using the following command line:

Version-Release number of selected component (if applicable):
gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-49)

How reproducible:

Steps to Reproduce:
1. Copy the code given in the description of this bug report to foo.cpp.
2. Attempt to build foo.os using the command line:
      g++ -o foo.os -c -fnon-call-exceptions -O2 -fPIC foo.cpp
3. Compilation will fail, indicating an internal compiler error at reload1.c:9508.

Actual Results:
The compilation fails, here is the full error message from gcc:

foo.cpp: In function `void foo()':
foo.cpp:13: Internal compiler error in fixup_abnormal_edges, at reload1.c:9508
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/ccW0oA9V.out file, please attach this to your bugreport.

Expected Results:
Should have built successfully.

Additional info:
Comment 1 Andrew Biggs 2007-02-01 10:39:24 EST
Created attachment 147106 [details]
File referenced for attachment in error message.
Comment 2 Alexandre Oliva 2007-02-13 00:35:48 EST
Created attachment 147957 [details]
Patch that fixes the bug

This bug is already fixed in GCC 4.1, as part of a patch that fixes a bigger
problem introduced afterwards.	This is a "backport" for 3.2 of the relevant
portion of the larger patch.
Comment 7 Jakub Jelinek 2007-03-26 08:50:30 EDT
Fixed in gcc-3.2.3-59.
Comment 11 Red Hat Bugzilla 2007-06-11 13:50:14 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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