Description of problem: When building routed as a pie, gcc gives an internal error while trying to compile one of the .c files with -fpie. 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 config/s390/s390.c:2276 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 `/usr/src/build/372607-s390x/BUILD/netkit-routed-0.17/routed' make: *** [routed.build] Error 2 Expected results: no error Additional info: Reproduceable for both FC1, RHEL3 and FC2 devel.
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; void foo (int x, char *y) { struct S *h; int k = 1, l; again: 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); void foo (void *x, struct I *y, char *z) { struct S *f; int k = 1, l; again: 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); z++; } if (k) { k = 0; goto again; } } (each time a different ICE).