From 996caac6daf068f5db3b8455db336c1df62ec4f9 Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Mon, 24 Sep 2007 09:20:34 +0000 Subject: [PATCH] [patch][Bug middle-end/33472] ICE and invalid rtl sharing with complex on x86_64-mingw. 2007-09-24 Kai Tietz * i386.c: (return_in_memory_ms_64): Handle return types for complex types. From-SVN: r128710 --- gcc/ChangeLog | 4 ++++ gcc/config/i386/i386.c | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dbafee45d9d..350663c9240 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2007-09-24 Kai Tietz + + * i386.c: (return_in_memory_ms_64): Handle return types for complex types. + 2007-09-23 H.J. Lu * configure.ac (ld_vers): Support GNU linker version xx.xx.* diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 7bd5cb6a719..c01bcbb32e1 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -4721,11 +4721,12 @@ return_in_memory_ms_64 (const_tree type, enum machine_mode mode) HOST_WIDE_INT size = int_size_in_bytes (type); /* __m128 and friends are returned in xmm0. */ - if (size == 16 && VECTOR_MODE_P (mode)) + if (!COMPLEX_MODE_P (mode) && size == 16 && VECTOR_MODE_P (mode)) return 0; - /* Otherwise, the size must be exactly in [1248]. */ - return (size != 1 && size != 2 && size != 4 && size != 8); + /* Otherwise, the size must be exactly in [1248]. But not for complex. */ + return (size != 1 && size != 2 && size != 4 && size != 8) + || COMPLEX_MODE_P (mode); } int -- 2.30.2