I\'ve got an MCVE which, on some of my machines crashes when compiled with g++ version 4.4.7 but does work with clang++ version 3.4.2 and g++ version 6.3.
I\'d like
Though the true solution to this bug would be not to use RedHat GnuCC 4.4.7 (or any RedHat compiler...), we are temporarily stuck with this version.
We did find an alternative: obfuscate the constructor of BaseType
to the compiler hence preventing it to over-optimize it. We did it simply by defining BaseType::BaseType()
in a separate translation unit.
Doing so bypass g++ bug. We did indeed checked that both BaseType
and TypeTextFix
virtual table pointers were written to constructed object before calling its related constructors.