Bug 60687 - Internal compiler error in subst_stack_regs_pat, at reg-stack.c: 1404
Internal compiler error in subst_stack_regs_pat, at reg-stack.c: 1404
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-03-04 15:40 EST by Need Real Name
Modified: 2007-04-18 12:40 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-03-04 15:40:08 EST
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 Need Real Name 2002-03-04 15:40:04 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.2-2 i686)

Description of problem:
Reproducible bug occurs with -O2 or -O3 option. When compiling the short sample
program below, gcc-2.96-85 crashes with an "Internal compiler error". 

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


How reproducible:
Always

Steps to Reproduce:
1. Let gauss.c be this simple program:

#include <stdlib.h>

double gauss(void) {
  double r;

  r = rand()/(double)RAND_MAX;
}


2. gcc -O2 -c -o gauss.o gauss.c
 

Actual Results:  gauss.c: In function `gauss':
gauss.c:7: Internal compiler error in subst_stack_regs_pat, at reg-stack.c:1404
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.


Expected Results:  it should have compiled just fine, like it does without "-O2"

Additional info:

Change the result type of the function gauss from "double" to "int" or "void",
and the bug goes away.
Comment 1 Jakub Jelinek 2002-03-05 11:34:08 EST
This was fixed in 2.96-86 and above.

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