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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vector-subscript-3.c] - Rev 801

Go to most recent revision | Compare with Previous | Blame | View Log

/* Check the case when index is out of bound */
/* { dg-do compile } */
/* { dg-options "-Warray-bounds" } */
 
#define vector __attribute__((vector_size(16) ))
 
 
int test0(void)
{
  vector int a;
  return a[10]; /* { dg-warning "index value is out of bound" } */
}
 
int test1(void)
{
  vector int a;
  return a[-1]; /* { dg-warning "index value is out of bound" } */
}
 
 

Go to most recent revision | 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.