aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2007-09-07 08:30:09 +0000
committerBill Wendling <isanbard@gmail.com>2007-09-07 08:30:09 +0000
commitdf62edc6259244f01f165827d18c9badb29e1caa (patch)
tree7989a27723968f880f3de01a088cabf70dcbb228
parent24905f7cfbf50deaa9dd7c94c5e02789b8afeaef (diff)
downloadexternal_llvm-df62edc6259244f01f165827d18c9badb29e1caa.zip
external_llvm-df62edc6259244f01f165827d18c9badb29e1caa.tar.gz
external_llvm-df62edc6259244f01f165827d18c9badb29e1caa.tar.bz2
Test for PR1641.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41762 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CFrontend/2007-09-05-ConstCtor.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CFrontend/2007-09-05-ConstCtor.c b/test/CFrontend/2007-09-05-ConstCtor.c
new file mode 100644
index 0000000..c267a59
--- /dev/null
+++ b/test/CFrontend/2007-09-05-ConstCtor.c
@@ -0,0 +1,14 @@
+// RUN: %llvmgcc -xc -Os -c %s -o /dev/null
+// PR1641
+
+struct A {
+ unsigned long l;
+};
+
+void bar(struct A *a);
+
+void bork() {
+ const unsigned long vcgt = 'vcgt';
+ struct A a = { vcgt };
+ bar(&a);
+}