Bug 117872 - building routed as pie causes internal compiler error
Summary: building routed as pie causes internal compiler error
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc   
(Show other bugs)
Version: rawhide
Hardware: s390x
OS: Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2004-03-09 14:57 UTC by Jens Petersen
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version: 3.3.3-3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-03-17 12:56:04 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 Jens Petersen 2004-03-09 14:57:51 UTC
Description of problem:
When building routed as a pie, gcc gives an internal
error while trying to compile one of the .c files with

How reproducible:
every time

Steps to Reproduce:
1. rpmbuild --rebuild routed-0.17-17.src.rpm
Actual results:
cc -O2 -g -pipe -Wall -W -Wpointer-arith -Wbad-function-cast
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wnested-externs -Winline  -fpie output.c -c
output.c: In function `supply':
output.c:171: internal compiler error: in legitimize_pic_address, at
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/ccSvZiqP.out file, please attach
this to your bugreport
make[1]: *** [output.o] Error 1
make[1]: Leaving directory
make: *** [routed.build] Error 2

Expected results:
no error

Additional info:
Reproduceable for both FC1, RHEL3 and FC2 devel.

Comment 1 Jakub Jelinek 2004-03-09 20:46:06 UTC
Distilled into 2 testcases:
first ICEs gcc 3.3.x, second gcc trunk as of today.
/* { dg-do compile } */
/* { dg-options "-O2 -fpic" } */

void bar (char *, int);

extern char b[];
extern int d, e;
struct S
  struct S *m;
  int n;
} **g;

foo (int x, char *y)
  struct S *h;
  int k = 1, l;

  for (h = *g; h != (struct S *) g; h = h->m)
      if (k == 0 && h->n & 0x100000);
      l = y - b;
      if (e)
        bar (b, l);
      if (d)
        bar (b, l);
  if (k)
      k = 0;
      goto again;

/* { dg-do compile } */
/* { dg-options "-O2 -fpic" } */

struct I
  void *i;
  int j;
struct S
  struct S *m;
} **a;
extern char b[];
int d, e;

void bar (void *, void *, char *, int, int);
void baz (void *, int);

foo (void *x, struct I *y, char *z)
  struct S *f;
  int k = 1, l;

  for (f = *a; f != (struct S *) a; f = f->m)
      l = z - b;
      if (e && y)
        bar (&y->i, x, b, l, y->j);
      if (d)
        baz (x, l);
  if (k)
      k = 0;
      goto again;

(each time a different ICE).

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