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]

Segmentation fault with -fPIC -O1 on egcs-19990412


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


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