[Bug c/105950] > O2 optimization causes runtime (SIGILL) during main initialization

jkanapes at yahoo dot com gcc-bugzilla@gcc.gnu.org
Tue Jun 14 12:32:12 GMT 2022


--- Comment #19 from John Kanapes <jkanapes at yahoo dot com> ---
Aaaah. So it's different than the other gcc flags...
I just linked libubsan...
No compilation errors. At runtime it SIGILLS at the same gdb point as before...
Same as the rest of the recommended flags.

BTW since -O3 is the highest gcc optimization, gcc could print a warning:
Warning -Ox is deprecated. Downgrading to -O3;-)
Otherwise in a few years you will find code compiled with -O20 and then it is
the sky. It just takes 1 coder to use it in open source, and since gcc seems to
take it, all the other coders will copy it:(

More information about the Gcc-bugs mailing list