Program that segfaults with-Ofast

Andrew Haley aph@redhat.com
Wed Jan 3 14:57:00 GMT 2018


On 03/01/18 14:44, Christer Solskogen wrote:
> Okay, so it won't mess up how the code is presented in GDB if it is 
> compiled with the different optimizations? Adding -g should be enough?

Yes, using optimization messes up code terribly in GDB.  However,
it's the best we've got to go on.

> Just to be clear; I do not think it is compiler bug either. It's just 
> that I "blame" the compiler when it seems to not be triggered on a older 
> compiler. There's no question in my mind that the real problem is the code.

Sure.

-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



More information about the Gcc-help mailing list