PR target/20795
* config/i386/i386.c (construct_container): Pass empty aligned
struct, union or class in memory.
* g++.dg/abi/param2.C: New test.
From-SVN: r97912
+2005-04-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/20795
+ * config/i386/i386.c (construct_container): Pass empty aligned
+ struct, union or class in memory.
+
2005-04-09 Kazu Hirata <kazu@cs.umass.edu>
* dominance.c, gthr-win32.h, reg-stack.c, tree-ssa-copy.c,
abort ();
}
}
+
+ /* Empty aligned struct, union or class. */
+ if (nexps == 0)
+ return NULL;
+
ret = gen_rtx_PARALLEL (mode, rtvec_alloc (nexps));
for (i = 0; i < nexps; i++)
XVECEXP (ret, 0, i) = exp [i];
+2005-04-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/20795
+ * g++.dg/abi/param2.C: New test.
+
2005-04-09 Uros Bizjak <uros@kss-loka.si>
* gcc.dg/builtins-53.c: New test.
--- /dev/null
+// PR target/20795
+// Test passing aligned empty aggregate
+// { dg-do compile }
+
+struct S { union {} a; } __attribute__((aligned));
+
+S
+foo (S arg)
+{
+ return arg;
+}
+
+void
+bar (void)
+{
+ S arg;
+ foo (arg);
+}