[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN

joseph at codesourcery dot com gcc-bugzilla@gcc.gnu.org
Thu Jun 9 11:16:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460

--- Comment #8 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
It's not correct to use flag_signaling_nans for a fix.  
flag_signaling_nans is only for cases where a bit-pattern for a signaling 
NaN is interpreted as a floating-point value.  It's not where a struct or 
union element has floating-point type but is never interpreted as a value 
of that type, just the whole aggregate copied.  It's completely valid 
without flag_signaling_nans to copy a struct that happens to have such a 
bit pattern.

Does the patch (without flag_signaling_nans) help with the bug 58416 case 
or not?


More information about the Gcc-bugs mailing list