view gcc/testsuite/c-c++-common/pr63764-1.c @ 128:fe568345ddd5

fix CbC-example
author mir3636
date Wed, 11 Apr 2018 19:32:28 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* PR target/63764 */
/* { dg-do compile } */

#define A __attribute__((vector_size (4 * sizeof (float))))
typedef float V A;

void
fn1 (V *x)
{
  V a = *x;
  ((V) a)[0] = 0;	/* { dg-error "lvalue required as left operand of assignment" } */
  *x = a;
}

void
fn2 (V *x)
{
  float A a = *x;
  ((float A) a)[0] = 0;	/* { dg-error "lvalue required as left operand of assignment" } */
  *x = a;
}