I have a C program (hey, I'm cheating here, its generated C code) that crashes (segmentation fault) whenever I compile it with gcc -O2
optimization flag. (gcc 4.6.0)
Do you have an idea how I could debug this?
I think I could test by removing the optimizations one by one to see which one makes my program crash ... but this could potentially take a long time. Do you have any better idea?
The optimization that causes the problem is -fstrict-overflow. I'll continue to put new information as I have them.
Thanks