summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/align-global-large.c
diff options
context:
space:
mode:
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 0000000..fcbe758
--- /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];
+}
+
OpenPOWER on IntegriCloud