Bug#1309: in not produced if compiler optimizes
I realized that the bug is not produced if I compile with
optimization :-) :
[jpp]kaj69:~/C/testing $ cat test.c
#include <math.h>
main() {
double j, k = 1.0;
j = sin(k);
printf("worked\n");
}
[jpp]kaj69:~/C/testing $ gcc -g test.c -lm
[jpp]kaj69:~/C/testing $ ./a.out
Segmentation fault
[jpp]kaj69:~/C/testing $ gcc -g -O test.c -lm
[jpp]kaj69:~/C/testing $ ./a.out
worked
[jpp]kaj69:~/C/testing $
Cheers,
Joao Pedro PEDROSO Universite Catholique de Louvain
CORE - room b.140
jpp@core.ucl.ac.be 34 voie du Roman Pays
Tel: +32-10-474325 B-1348 Louvain-la-Neuve
Fax: +32-10-474301 BELGIUM
----------------------------------------------------------------
Reply to: