Optimization of conditional access to globals: thread-unsafe?

Duncan Sands baldrick@free.fr
Mon Oct 29 19:43:00 GMT 2007


Hi Tomash,

>   moonlight:/tmp$ /usr/local/gcc-4.3-trunk/bin/gcc -O0 mmap.c -o mmap
>   moonlight:/tmp$ ./mmap
>   GCC is the best compiler ever!
>   moonlight:/tmp$ /usr/local/gcc-4.3-trunk/bin/gcc -O1 mmap.c -o mmap
>   moonlight:/tmp$ ./mmap
>   Segmentation fault

I don't see this with gcc 4.1 or 4.2.  Just a data point.

Ciao,

Duncan.



More information about the Gcc mailing list