OSDN Git Service

* gcc.dg/990424-1.c: New test.
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 25 Apr 1999 12:29:35 +0000 (12:29 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 25 Apr 1999 12:29:35 +0000 (12:29 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26622 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/990424-1.c [new file with mode: 0644]

index 367b912..0756727 100644 (file)
@@ -1,3 +1,7 @@
+Sun Apr 25 12:28:59 1999  Richard Henderson  <rth@cygnus.com>
+
+       * gcc.dg/990424-1.c: New test.
+
 1999-04-24  Craig Burley  <craig@jcb-sc.com>
 
        * g77.f-torture/execute/u77-test.f (main): Bug involving
diff --git a/gcc/testsuite/gcc.dg/990424-1.c b/gcc/testsuite/gcc.dg/990424-1.c
new file mode 100644 (file)
index 0000000..589e046
--- /dev/null
@@ -0,0 +1,26 @@
+/* Test that stack alignment is preserved with pending_stack_adjust
+   with stdcall functions.  */
+
+/* { dg-do run { target i?86-*-* } } */
+/* { dg-options -mpreferred-stack-boundary=4 } */
+
+void __attribute__((stdcall)) foo(int a, int b, int c);
+
+int
+main ()
+{
+  foo(1, 2, 3);
+  foo(1, 2, 3);
+  exit (0);
+}
+
+void __attribute__((stdcall))
+foo(int a, int b, int c)
+{
+  static int last_align = -1;
+  int dummy, align = (int)&dummy & 15;
+  if (last_align < 0)
+    last_align = align;
+  else if (align != last_align)
+    abort ();
+}