aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/const-eval.c
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-10-31 20:57:44 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-10-31 20:57:44 +0000
commit6a7c94af983717e2c2d6aebe42cb4737c1c7b9e6 (patch)
tree6bf91b80cdb184e81bb3b7d4c606d789529f6ab0 /test/Sema/const-eval.c
parentaa97b53175ef138144f69dbc7fda6870c5740226 (diff)
Refactoring and test for r143360. Support for array rvalue to pointer decay is
needed for C++11, and will follow later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143363 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/const-eval.c')
-rw-r--r--test/Sema/const-eval.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/Sema/const-eval.c b/test/Sema/const-eval.c
index 8cfa7ea6f8..df56b06e48 100644
--- a/test/Sema/const-eval.c
+++ b/test/Sema/const-eval.c
@@ -92,3 +92,6 @@ double d2 = ++d; // expected-error {{not a compile-time constant}}
int n = 2;
int intLvalue[*(int*)((long)&n ?: 1)] = { 1, 2 }; // expected-error {{variable length array}}
+
+union u { int a; char b[4]; };
+char c = ((union u)(123456)).b[0]; // expected-error {{not a compile-time constant}}