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 88305 - internal compiler error on attached source file
Summary: internal compiler error on attached source file
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 9
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2003-04-08 19:09 UTC by Jeff Epler
Modified: 2007-04-18 16:52 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2004-10-03 19:53:55 UTC

Attachments (Terms of Use)

Description Jeff Epler 2003-04-08 19:09:42 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20021203

Description of problem:
A simple one-function C program causes an internal compiler error when compiled
with optimization (-O2).  This ICE may also exist in vanilla gcc-3.2.2

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

How reproducible:

Steps to Reproduce:
1. cat > p2l.ii <<EOF
extern double fabs(double x);

typedef struct { float x, y; } S;
typedef struct _T T;

extern void fT( T *p );
extern T *h();
extern S g( );

int f(void)
    T *t=0;
    int c=0;
    S s;

    const S exp_s = {0.,0.};

    if(!(t = h()))

        s = g();
        if( (fabs( (s.x) - (exp_s.x) ) > 1 )
            || (fabs( (s.y) - (exp_s.y) ) > 1 ) )


    return c;

2. gcc -O2 p2l.ii

Actual Results:  p2l.ii: In function `int f()':
p2l.ii:38: Internal compiler error in find_reloads_toplev, at reload.c:4439
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:> for instructions.

Expected Results:  successful generation of an object file

Additional info:

Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

Comment 1 Jeff Epler 2003-06-17 20:57:21 UTC
I believe that this bug is fixed in gcc's 3.2.3 release, and either does not
exist or is fixed in 3.3 and trunk.

Comment 2 Jeff Epler 2003-12-22 03:28:33 UTC
The source file compiles without errors on Fedora Core with gcc-3.2.2-1

Comment 3 Richard Henderson 2004-10-03 19:53:55 UTC
Indeed, the ICE does not ocurr with 3.2.3.  I assume this was some
bug introduced and then fixed on the branch.

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