aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2010-07-14 22:26:35 +0000
committerEric Christopher <echristo@apple.com>2010-07-14 22:26:35 +0000
commit55d2455541f6c65373ce4f0db48539737bd221c9 (patch)
tree325d5c67d1dff49168dcd84b419d2e5f7394300a
parent1c64f5b7c8a54030b577e0b12609ec16ae6299d9 (diff)
downloadexternal_llvm-55d2455541f6c65373ce4f0db48539737bd221c9.zip
external_llvm-55d2455541f6c65373ce4f0db48539737bd221c9.tar.gz
external_llvm-55d2455541f6c65373ce4f0db48539737bd221c9.tar.bz2
Add a testcase for the vla and stack realignment warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108365 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/FrontendC/vla-1.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/FrontendC/vla-1.c b/test/FrontendC/vla-1.c
new file mode 100644
index 0000000..e290349
--- /dev/null
+++ b/test/FrontendC/vla-1.c
@@ -0,0 +1,7 @@
+// RUN: %llvmgcc -std=gnu99 %s -S |& grep {error: "is greater than the stack alignment" }
+
+int foo(int a)
+{
+ int var[a] __attribute__((__aligned__(32)));
+ return 4;
+}