aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/align-global-large.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2012-08-19 10:33:04 +0000
committerDimitry Andric <dim@FreeBSD.org>2012-08-19 10:33:04 +0000
commit657bc3d9848e3be92029b2416031340988cd0111 (patch)
tree5b9c2fa9d79942fbdce3d618e37e27c18263af9a /test/CodeGen/align-global-large.c
parent56d91b49b13fe55c918afbda19f6165b5fbff87a (diff)
downloadsrc-657bc3d9848e3be92029b2416031340988cd0111.tar.gz
src-657bc3d9848e3be92029b2416031340988cd0111.zip
Vendor import of clang trunk r162107:vendor/clang/clang-trunk-r162107
Notes
Notes: svn path=/vendor/clang/dist/; revision=239392 svn path=/vendor/clang/clang-trunk-r162107/; revision=239393; tag=vendor/clang/clang-trunk-r162107
Diffstat (limited to 'test/CodeGen/align-global-large.c')
-rw-r--r--test/CodeGen/align-global-large.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/align-global-large.c b/test/CodeGen/align-global-large.c
new file mode 100644
index 000000000000..fcbe758a82e4
--- /dev/null
+++ b/test/CodeGen/align-global-large.c
@@ -0,0 +1,18 @@
+// PR13606 - Clang crashes with large alignment attribute
+// RUN: %clang -S -emit-llvm %s -o - | FileCheck %s
+
+// CHECK: x
+// CHECK: align
+// CHECK: 1048576
+volatile char x[4000] __attribute__((aligned(0x100000)));
+
+int
+main (int argc, char ** argv) {
+ // CHECK: y
+ // CHECK: align
+ // CHECK: 1048576
+ volatile char y[4000] __attribute__((aligned(0x100000)));
+
+ return y[argc];
+}
+