Added testcase that fails when stack alignment is incorrectly capped.
authorAhmad Sharif <asharif@google.com>
Sat, 11 Dec 2010 01:45:10 +0000 (01:45 +0000)
committerAhmad Sharif <asharif@gcc.gnu.org>
Sat, 11 Dec 2010 01:45:10 +0000 (01:45 +0000)
From-SVN: r167709

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/max-stack-align.c [new file with mode: 0644]

index cc83f27f4663c4e56177f2a2da13b28c0dd2e3ba..a2eac8999ed0a96377b41b1d026f9ee8518d923f 100644 (file)
@@ -1,3 +1,7 @@
+2010-12-10 Ahmad Sharif <asharif@google.com>
+
+       * gcc.target/i386/max-stack-align.c: New testcase.
+
 2010-12-10  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        * gcc.dg/funcorder.c: Remove XFAIL for hppa*64*-*-*.
diff --git a/gcc/testsuite/gcc.target/i386/max-stack-align.c b/gcc/testsuite/gcc.target/i386/max-stack-align.c
new file mode 100644 (file)
index 0000000..3fcb2fa
--- /dev/null
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-fomit-frame-pointer" } */
+
+void foo()
+{
+  int a, b, c, e, f, g, h, i;
+       __asm__ volatile( " jb 1b \n\t"
+                         : : "c" (a), "d" (a), "S" (a), "D" (a),
+                         "r" (a), "a" (a) ,"r" (a), "r" (a)
+                         : "%""rbp" );
+}
+