aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/expr-address-of.c
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2009-02-15 22:45:20 +0000
committerNate Begeman <natebegeman@mac.com>2009-02-15 22:45:20 +0000
commitb104b1f6ca76cefab25c6ecb5df3bf87a0f875d3 (patch)
treea8780a233427fc84683068e9d8cbde8142d58f2b /test/Sema/expr-address-of.c
parent8e9dcb720bbc373ac6a152322f99a5ec46629c2e (diff)
Don't allow taking the address of an element in an ext_vector
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64614 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/expr-address-of.c')
-rw-r--r--test/Sema/expr-address-of.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/Sema/expr-address-of.c b/test/Sema/expr-address-of.c
index 58bc540a30..7dd7dd67d3 100644
--- a/test/Sema/expr-address-of.c
+++ b/test/Sema/expr-address-of.c
@@ -28,9 +28,14 @@ void foo() {
void testVectorComponentAccess() {
typedef float v4sf __attribute__ ((vector_size (16)));
static v4sf q;
- float* r = &q[0]; // expected-error {{address of vector requested}}
+ float* r = &q[0]; // expected-error {{address of vector element requested}}
}
+typedef __attribute__(( ext_vector_type(4) )) float float4;
+
+float *testExtVectorComponentAccess(float4 x) {
+ return &x.w; // expected-error {{address of vector element requested}}
+}
void f0() {
register int *x0;