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]

egcs segfaults on rh51 (example)





Hi,

the following programm segfaults with the -O6 optimisation.
The strange thing is: if you uncomment : //pow(6.0,3.0);
it even wotks with -O6.

Can someone tell me if its a bug or I'm doing something wrong?
Please reply by mail, because im not on the mailing list.

I'm using RH 5.1. 

[m_vogt@mv lib]$ g++ --version
egcs-2.90.27 980315 (egcs-1.0.2 release)
                ^
                |
                a bit old ?


regards,


martin

------------->sigsevTest.cpp


/*
  No SegFault:

  g++ -o sigsev.exe sigsevTest.cpp 

  SegFault:

  g++ -o sigsev.exe -O6 sigsevTest.cpp 
 */

#include <stdio.h>
#include <math.h>



int main() {
  printf("hello Martin test->main\n");

  //pow(6.0,3.0);
  float value;
  value=cos(double(0));
  printf("Wert: %f\n",value);
  pow(6.0,3.0);

  printf("hi:\n");
  exit(0);
}
                                                



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