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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [c99-restrict-1.c] - Diff between revs 298 and 338

Only display areas with differences | Details | Blame | View Log

Rev 298 Rev 338
/* Test for restrict: in C99 only.  */
/* Test for restrict: in C99 only.  */
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
/* Origin: Joseph Myers <jsm28@cam.ac.uk> */
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
 
 
char *restrict foo;
char *restrict foo;
 
 
/* The following are constraint violations and should be rejected.  */
/* The following are constraint violations and should be rejected.  */
 
 
int restrict bar; /* { dg-bogus "warning" "warning in place of error" } */
int restrict bar; /* { dg-bogus "warning" "warning in place of error" } */
/* { dg-error "restrict" "restrict constraint violation" { target *-*-* } 10 } */
/* { dg-error "restrict" "restrict constraint violation" { target *-*-* } 10 } */
 
 
typedef void (*fp) (void);
typedef void (*fp) (void);
 
 
fp restrict baz; /* { dg-bogus "warning" "warning in place of error" } */
fp restrict baz; /* { dg-bogus "warning" "warning in place of error" } */
/* { dg-error "restrict" "restrict constraint violation" { target *-*-* } 15 } */
/* { dg-error "restrict" "restrict constraint violation" { target *-*-* } 15 } */
 
 
void quux (int restrict a[3]); /* { dg-bogus "warning" "warning in place of error" } */
void quux (int restrict a[3]); /* { dg-bogus "warning" "warning in place of error" } */
/* { dg-error "restrict" "restrict constraint violation" { target *-*-* } 18 } */
/* { dg-error "restrict" "restrict constraint violation" { target *-*-* } 18 } */
 
 

powered by: WebSVN 2.1.0

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