Question re: -fPIC and -O1 on sparc
Jeffrey A Law
law@cygnus.com
Wed Jun 30 23:07:00 GMT 1999
In message < 199906111856.NAA27423@polya.math.purdue.edu >you write:
> Is it planned that the -fPIC and -O1 options will work together in the
> next release of egcs for the sparc? The current prerelease still bombs
> on the following example:
>
> This file:
>
> #include <stdio.h>
>
> 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:
>
> polya-134% gcc -O1 -fPIC -o test-egcs test-egcs.c
>
> with this compiler:
>
> polya-135% gcc -v
> Reading specs from /opt/egcs-19990602/lib/gcc-lib/sparc-sun-solaris2.5.1/gc
> c-2.95/specs
> gcc version gcc-2.95 19990602 (prerelease)
>
> generates a segmentation fault when run.
This bug was fixed a week or two ago.
Thanks,
jeff
More information about the Gcc-bugs
mailing list