aboutsummaryrefslogtreecommitdiffstats
path: root/test/CFrontend/2004-11-27-InvalidConstantExpr.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-11-27 19:44:07 +0000
committerChris Lattner <sabre@nondot.org>2004-11-27 19:44:07 +0000
commite63632f16f0e602a7c149b94dc3e6c7a0e4e3830 (patch)
treed41569a4dce2108567de1e3673063e8b8b8d9da4 /test/CFrontend/2004-11-27-InvalidConstantExpr.c
parenta4bcecfb0cf0c152c86ce94cc251c93d0ad872a6 (diff)
downloadexternal_llvm-e63632f16f0e602a7c149b94dc3e6c7a0e4e3830.zip
external_llvm-e63632f16f0e602a7c149b94dc3e6c7a0e4e3830.tar.gz
external_llvm-e63632f16f0e602a7c149b94dc3e6c7a0e4e3830.tar.bz2
New testcase for PR424
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18281 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CFrontend/2004-11-27-InvalidConstantExpr.c')
-rw-r--r--test/CFrontend/2004-11-27-InvalidConstantExpr.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CFrontend/2004-11-27-InvalidConstantExpr.c b/test/CFrontend/2004-11-27-InvalidConstantExpr.c
new file mode 100644
index 0000000..54468a5
--- /dev/null
+++ b/test/CFrontend/2004-11-27-InvalidConstantExpr.c
@@ -0,0 +1,10 @@
+// RUN: %llvmgcc %s -S -o - | not grep 'foo\* sub'
+// This should not produce a subtrace constantexpr of a pointer
+struct foo {
+ int Y;
+ char X[100];
+} F;
+
+int test(char *Y) {
+ return Y - F.X;
+}