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] - Blame information for rev 701

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

Line No. Rev Author Line
1 689 jeremybenn
/* Check the case when index is out of bound */
2
/* { dg-do compile } */
3
/* { dg-options "-Warray-bounds" } */
4
 
5
#define vector __attribute__((vector_size(16) ))
6
 
7
 
8
int test0(void)
9
{
10
  vector int a;
11
  return a[10]; /* { dg-warning "index value is out of bound" } */
12
}
13
 
14
int test1(void)
15
{
16
  vector int a;
17
  return a[-1]; /* { dg-warning "index value is out of bound" } */
18
}
19
 

powered by: WebSVN 2.1.0

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