+2003-09-23 Geoffrey Keating <geoffk@apple.com>
+
+ * config/rs6000/rs6000.c (function_arg_pass_by_reference): Don't
+ pass zero-size arrays by reference.
+ (rs6000_va_arg): Likewise.
+
2003-09-23 Nathanael Nerode <neroden@gcc.gnu.org>
* config.gcc: Set use_fixproto=no in each specific *-gnu*
return 1;
}
- return type && int_size_in_bytes (type) <= 0;
+ return type && int_size_in_bytes (type) < 0;
}
\f
/* Perform any needed actions needed for a function that is receiving a
if (DEFAULT_ABI != ABI_V4)
{
/* Variable sized types are passed by reference. */
- if (int_size_in_bytes (type) <= 0)
+ if (int_size_in_bytes (type) < 0)
{
u = build_pointer_type (type);
+2003-09-23 Geoffrey Keating <geoffk@apple.com>
+
+ * gcc.dg/darwin-abi-1.c: New file.
+
2003-09-21 Andrew Pinski <pinskia@physics.uc.edu>
PR target/12281
--- /dev/null
+/* { dg-do compile { target powerpc*-*-darwin* } } */
+/* { dg-options "-O" } */
+/* { dg-final { scan-assembler "li r3,12345\n\tbl " } } */
+
+/* Check that zero-size structures don't affect parameter passing. */
+
+struct empty { };
+extern void foo (struct empty e, int a);
+void bar (void) {
+ struct empty e;
+ foo (e, 12345);
+}