This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 09 Jun 2016 07:06:19 +0000
- Subject: [Bug target/71460] Copying structs can trap (on x86-32) due to SNaN to QNaN
- Auto-submitted: auto-generated
- References: <bug-71460-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-06-09
CC| |uros at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
It looks like RTL expansion uses DFmode to copy the aggregate which is likely
because the backend (or stor-layout.c) assigns DFmode to struct s. A similar
issue should exist on Itanium.
This means the x86 target, to fix this particular case, should implement
targetm.member_type_forces_blk for x87 modes (and -fsignalling-nans?).
;; y = x;
(insn 19 18 20 (set (reg:DF 96)
(mem/c:DF (plus:SI (reg/f:SI 82 virtual-stack-vars)
(const_int -8 [0xfffffffffffffff8])) [0 x+0 S8 A32])) t2.c:16
-1
(nil))
(insn 20 19 0 (set (mem/c:DF (plus:SI (reg/f:SI 82 virtual-stack-vars)
(const_int -16 [0xfffffffffffffff0])) [0 y+0 S8 A32])
(reg:DF 96)) t2.c:16 -1
(nil))