This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Question re: -fPIC and -O1 on sparc



  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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]