Bug 31076 - Internal compiler error in fixup_var_refs_1, at function.c:1874
Summary: Internal compiler error in fixup_var_refs_1, at function.c:1874
Status: CLOSED DUPLICATE of bug 29686
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc   
(Show other bugs)
Version: 7.0
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-03-08 17:36 UTC by John Reiser
Modified: 2007-04-18 16:32 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-03-08 17:37:02 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description John Reiser 2001-03-08 17:36:59 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.75 [en] (X11; U; Linux 2.2.5-15 i586)


 $g -v --save-temps -c -O bug*.c
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-75)
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/cpp0 -lang-c -v -iprefix
/usr/local/gcc-2.95.2/bin/../lib/gcc-lib/i386-redhat-linux/2.96/
-D__GNUC__=2 -D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix
-Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix)
-D__OPTIMIZE__ -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__
-D__tune_i386__ bug-gcc-2-96.c bug-gcc-2-96.i
GNU CPP version 2.96 20000731 (Red Hat Linux 7.0) (cpplib)
 (i386 Linux/ELF)
ignoring nonexistent directory
"/usr/local/gcc-2.95.2/lib/gcc-lib/i386-redhat-linux/2.96/include"
ignoring nonexistent directory
"/usr/local/gcc-2.95.2/i386-redhat-linux/include"ignoring nonexistent
directory "/usr/local/include"
ignoring nonexistent directory "/usr/i386-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/cc1 bug-gcc-2-96.i -quiet
-dumpbase bug-gcc-2-96.c -O -version -o bug-gcc-2-96.s
GNU C version 2.96 20000731 (Red Hat Linux 7.1 2.96-75) (i386-redhat-linux)
compiled by GNU C version 2.96 20000731 (Red Hat Linux 7.1 2.96-75).
bug-gcc-2-96.c: In function `traceback':
bug-gcc-2-96.c:30: Internal compiler error in fixup_var_refs_1, at
function.c:1874
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
bash-2.04$ cat bug*.c
typedef struct {
        unsigned ra_length;
} RAmap;

typedef struct {
        RAmap *ra_map;
} Modtab;
extern Modtab modtab[];

void
traceback(int *bp, unsigned char * pc, unsigned char * sp, unsigned char *
*tb)
{
    int j = 10;
    for (;;) {
        Modtab *mp = modtab;
        if (pc < (unsigned char *)&bp) {
                if (0>=--j) {
                        return;
                }
        }
        if (modtab != mp) {
                RAmap *ra = (--mp)->ra_map;
                if ((1<<31) & ra->ra_length) {
                        if ((void *)&tb < (void *)bp) {
                                sp = (unsigned char *)(1+ bp);
                        }
                }
        }
    }
}
bash-2.04$ echo bug*.c
bug-gcc-2-96.c


Reproducible: Always
Steps to Reproduce:
1. cut+paste 30-line .c file (no cpp necessary, but *.i in Additional Info
anyway)
2. gcc -c -O bug.c
3.
	

Actual Results:  bug-gcc-2-96.c: In function `traceback':
bug-gcc-2-96.c:30: Internal compiler error in fixup_var_refs_1, at
function.c:1874


Expected Results:  correct compilation and no complaints

Note that I could not select "Version 7.1" at line 3 of step 5
on bugzilla helper page.

$ cat bug*.i
# 1 "bug-gcc-2-96.c"
typedef struct {
        unsigned ra_length;
} RAmap;

typedef struct {
        RAmap *ra_map;
} Modtab;
extern Modtab modtab[];

void
traceback(int *bp, unsigned char * pc, unsigned char * sp, unsigned char *
*tb)
{
    int j = 10;
    for (;;) {
        Modtab *mp = modtab;
        if (pc < (unsigned char *)&bp) {
                if (0>=--j) {
                        return;
                }
        }
        if (modtab != mp) {
                RAmap *ra = (--mp)->ra_map;
                if ((1<<31) & ra->ra_length) {
                        if ((void *)&tb < (void *)bp) {
                                sp = (unsigned char *)(1+ bp);
                        }
                }
        }
    }
}
$

Comment 1 Jakub Jelinek 2001-03-08 17:55:32 UTC

*** This bug has been marked as a duplicate of 29686 ***


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