summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/align-global-large.c
diff options
context:
space:
mode:
authorJohn Criswell <criswell@uiuc.edu>2012-08-15 18:40:30 +0000
committerJohn Criswell <criswell@uiuc.edu>2012-08-15 18:40:30 +0000
commitedc84507c763cf4841d4f701b6c35ccb35f11ef4 (patch)
tree3f1c39487393c7d1fe5c08d8a00e71870628ba8e /clang/test/CodeGen/align-global-large.c
parent352dfff4476b076e2c032d59ea0def3519a7a5c9 (diff)
downloadbcm5719-llvm-edc84507c763cf4841d4f701b6c35ccb35f11ef4.tar.gz
bcm5719-llvm-edc84507c763cf4841d4f701b6c35ccb35f11ef4.zip
Fix for PR#13606: http://llvm.org/bugs/show_bug.cgi?id=13606
Changed the alignment of an LValue to be 64 bits so that we can handle alignment values up to half of a 64-bit address space. llvm-svn: 161971
Diffstat (limited to 'clang/test/CodeGen/align-global-large.c')
-rw-r--r--clang/test/CodeGen/align-global-large.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/CodeGen/align-global-large.c b/clang/test/CodeGen/align-global-large.c
new file mode 100644
index 00000000000..fcbe758a82e
--- /dev/null
+++ b/clang/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];
+}
+
OpenPOWER on IntegriCloud