ix86_return_in_memory should check negative return from int_size_in_bytes,
similar to other ports.
gcc/
PR target/66817
* config/i386/i386.c (ix86_return_in_memory): Return true
if int_size_in_bytes returns negative for IA MCU.
gcc/testsuite/
PR target/66817
* gcc.target/i386/pr66817.c: New test.
From-SVN: r225605
+2015-07-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/66817
+ * config/i386/i386.c (ix86_return_in_memory): Return true
+ if int_size_in_bytes returns negative for IA MCU.
+
2015-07-09 Marek Polacek <polacek@redhat.com>
PR tree-optimization/66718
/* Intel MCU psABI returns scalars and aggregates no larger than 8
bytes in registers. */
if (TARGET_IAMCU)
- return VECTOR_MODE_P (mode) || size > 8;
+ return VECTOR_MODE_P (mode) || size < 0 || size > 8;
if (mode == BLKmode)
return true;
+2015-07-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/66817
+ * gcc.target/i386/pr66817.c: New test.
+
2015-07-09 Marek Polacek <polacek@redhat.com>
PR tree-optimization/66718
--- /dev/null
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-O2 -mno-sse -mno-mmx -miamcu" } */
+
+extern void abort (void);
+int
+main (int argc, char **argv)
+{
+ int size = 10;
+ typedef struct
+ {
+ char val[size];
+ }
+ block;
+ block a, b;
+ block __attribute__((noinline))
+ retframe_block ()
+ {
+ return *(block *) &b;
+ }
+ b.val[0] = 1;
+ b.val[9] = 2;
+ a=retframe_block ();
+ if (a.val[0] != 1
+ || a.val[9] != 2)
+ abort ();
+ return 0;
+}