This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Segmentation fault with -fPIC -O1 on egcs-19990412
- To: egcs-bugs at egcs dot cygnus dot com
- Subject: Segmentation fault with -fPIC -O1 on egcs-19990412
- From: Brad Lucier <lucier at math dot purdue dot edu>
- Date: Wed, 14 Apr 1999 21:07:28 -0500 (EST)
- Cc: lucier at math dot purdue dot edu
This file:
void test(double x, double *y) {
printf("%f %f\n", x, *y);
return;
}
void call_test(double x) {
double y = x;
test(0.5*y, &y);
test(0.5*y, &y);
}
int main() {
call_test(1.0);
return 0;
}
compiled with these options:
peano-67% gcc -O1 -fPIC -o test-egcs test-egcs.c
with this compiler:
peano-69% gcc -v
Reading specs from /opt/egcs-19990412/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.93.18/specs
gcc version egcs-2.93.18 19990412 (gcc2 ss-980929 experimental)
generates a segmentation fault when run.
Brad Lucier lucier@math.purdue.edu