https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109359
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #3) > I think the fold-const.cc change is right though. > I wonder if for constant evaluation (constexpr, constinit) we shouldn't > arrange for those to be evaluated with temporarily -fno-rounding-math, I > think C uses > fold_init and its START_FOLD_INIT ... END_FOLD_INIT for this purpose.. > And otherwise perhaps we want dynamic initialization and do the conversion > at runtime? > Or disable the -frounding-math for all initializer folding? > What we emit is definitely wrong, > Variable which claims to have 8 bytes in size but actually has 16 under the > hood, with constants in different mode. We should have ICEd emitting the constant. And yes, I think -frounding-math should be disabled for constinit initializer folding (and possibly whether it is const or not should not depend on -frounding-math).