https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71460
Uroš Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jsm28 at gcc dot gnu.org
--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> ---
Following patch fixes the failure:
--cut here--
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index b807a9a..4526c7d 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -10310,10 +10310,8 @@ ix86_promote_function_mode (const_tree type,
machine_mode mode,
static bool
ix86_member_type_forces_blk (const_tree field, machine_mode mode)
{
- /* Union with XFmode must be in BLKmode. */
- return (mode == XFmode
- && (TREE_CODE (DECL_FIELD_CONTEXT (field)) == UNION_TYPE
- || TREE_CODE (DECL_FIELD_CONTEXT (field)) == QUAL_UNION_TYPE));
+ return (IS_STACK_MODE (mode) && flag_signaling_nans
+ && RECORD_OR_UNION_TYPE_P (DECL_FIELD_CONTEXT (field)));
}
rtx
--cut here--
Patch was tested with various -mfpmath=... compile flags. IMO, we don't need
BLKmode when we copy the value using SSE registers (and the test indeed does
not fail with -mfpmath=sse), and we still can copy XFmode using x87 regs
without -fsignalling-nans.
Richi, Joseph - does the new condition look OK to you?