OSDN Git Service

Added testcase that fails when stack alignment is incorrectly capped.
authorasharif <asharif@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 11 Dec 2010 01:45:10 +0000 (01:45 +0000)
committerasharif <asharif@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 11 Dec 2010 01:45:10 +0000 (01:45 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167709 138bc75d-0d04-0410-961f-82ee72b054a4

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

index cc83f27..a2eac89 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" );
+}
+