I have a C program that GCC compiles without warnings and it runs just
fine. However, when I compile it using any of the -O options (-O0, -O1,
etc.) it segfaults when executed (still no compiler warnings or errors).
I know nothing about compiler otimization, other than it makes my program
run faster. Any suggestions on how to debug this, or what to look for
would be greatly appreciated.
Thank you.
fine. However, when I compile it using any of the -O options (-O0, -O1,
etc.) it segfaults when executed (still no compiler warnings or errors).
I know nothing about compiler otimization, other than it makes my program
run faster. Any suggestions on how to debug this, or what to look for
would be greatly appreciated.
Thank you.
Comment