Bug 60687 - Internal compiler error in subst_stack_regs_pat, at reg-stack.c: 1404
Summary: Internal compiler error in subst_stack_regs_pat, at reg-stack.c: 1404
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc   
(Show other bugs)
Version: 7.1
Hardware: i386 Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2002-03-04 20:40 UTC by Need Real Name
Modified: 2007-04-18 16:40 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-03-04 20:40:08 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Need Real Name 2002-03-04 20:40:04 UTC
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:

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 16:34:08 UTC
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.