[patch][Bug middle-end/33472] ICE and invalid rtl sharing with complex on
authorKai Tietz <kai.tietz@onevision.com>
Mon, 24 Sep 2007 09:20:34 +0000 (09:20 +0000)
committerKai Tietz <ktietz@gcc.gnu.org>
Mon, 24 Sep 2007 09:20:34 +0000 (11:20 +0200)
x86_64-mingw.

2007-09-24  Kai Tietz  <kai.tietz@onevision.com>

* i386.c: (return_in_memory_ms_64): Handle return types for complex types.

From-SVN: r128710

gcc/ChangeLog
gcc/config/i386/i386.c

index dbafee4..350663c 100644 (file)
@@ -1,3 +1,7 @@
+2007-09-24  Kai Tietz  <kai.tietz@onevision.com>
+
+       * i386.c:  (return_in_memory_ms_64): Handle return types for complex types.
+
 2007-09-23  H.J. Lu  <hongjiu.lu@intel.com>
 
        * configure.ac (ld_vers): Support GNU linker version xx.xx.*
index 7bd5cb6..c01bcbb 100644 (file)
@@ -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