+2008-07-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR middle-end/36858
+ * function.c (locate_and_pad_parm): Cap boundary earlier.
+
2008-07-17 Julian Brown <julian@codesourcery.com>
* config/arm/arm.c (arm_cxx_determine_class_data_visibility): Make
= type ? size_in_bytes (type) : size_int (GET_MODE_SIZE (passed_mode));
where_pad = FUNCTION_ARG_PADDING (passed_mode, type);
boundary = FUNCTION_ARG_BOUNDARY (passed_mode, type);
+ if (boundary > PREFERRED_STACK_BOUNDARY)
+ boundary = PREFERRED_STACK_BOUNDARY;
locate->where_pad = where_pad;
locate->boundary = boundary;
/* Remember if the outgoing parameter requires extra alignment on the
calling function side. */
- if (boundary > PREFERRED_STACK_BOUNDARY)
- boundary = PREFERRED_STACK_BOUNDARY;
if (crtl->stack_alignment_needed < boundary)
crtl->stack_alignment_needed = boundary;
+2008-07-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR middle-end/36858
+ * gcc.target/i386/vararg-1.c: New.
+
2008-07-18 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/parameter_array_init_4.f90: Silence pedantic warning.
--- /dev/null
+/* PR middle-end/36858 */
+/* { dg-do run } */
+/* { dg-options "-w" { target { lp64 } } } */
+/* { dg-options "-w -msse2 -mpreferred-stack-boundary=2" { target { ilp32 } } } */
+
+#include "sse2-check.h"
+#include <stdarg.h>
+#include <emmintrin.h>
+
+int
+__attribute__((noinline))
+test (int a, ...)
+{
+ return a;
+}
+
+__m128 n1 = { -283.3, -23.3, 213.4, 1119.03 };
+
+int
+__attribute__((noinline))
+foo (void)
+{
+ return test (1, n1);
+}
+
+static void
+__attribute__((noinline))
+sse2_test (void)
+{
+ if (foo () != 1)
+ abort ();
+}