]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/c-c++-common/pr63764-1.c
PR target/63764
[thirdparty/gcc.git] / gcc / testsuite / c-c++-common / pr63764-1.c
1 /* PR target/63764 */
2 /* { dg-do compile } */
3
4 #define A __attribute__((vector_size (4 * sizeof (float))))
5 typedef float V A;
6
7 void
8 fn1 (V *x)
9 {
10 V a = *x;
11 ((V) a)[0] = 0; /* { dg-error "lvalue required as left operand of assignment" } */
12 *x = a;
13 }
14
15 void
16 fn2 (V *x)
17 {
18 float A a = *x;
19 ((float A) a)[0] = 0; /* { dg-error "lvalue required as left operand of assignment" } */
20 *x = a;
21 }