This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Question re: -fPIC and -O1 on sparc
- To: Brad Lucier <lucier at math dot purdue dot edu>
- Subject: Re: Question re: -fPIC and -O1 on sparc
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Fri, 25 Jun 1999 07:50:09 -0600
- cc: egcs-bugs at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
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