OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [powerpc/] [altivec-23.c] - Rev 691

Compare with Previous | Blame | View Log

/* Verify that it is possible to define variables of composite types
   containing vector types.  We used to crash handling the
   initializer of automatic ones.  */
 
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-maltivec -mabi=altivec" } */
 
#include <altivec.h>
 
typedef vector int vt;
typedef struct { vt x; int y[sizeof(vt) / sizeof (int)]; } st;
#define INIT { 1, 2, 3, 4 }
 
void f ()
{
  vt x = INIT;
  vt y[1] = { INIT };
  st s = { INIT, INIT };
}
 
vt x = INIT;
vt y[1] = { INIT };
st s = { INIT, INIT };
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.