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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [reg-vol-struct-1.c] - Rev 867

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

/* Test cases of structures with volatile fields declared register:
   should be allowed unless register name given but explicitly taking
   the address forbidden.  */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
 
/* { dg-do compile } */
 
struct S { volatile int field; };
 
void
f (void)
{
  register struct S a;
  register struct S b[2];
  register struct S c __asm__("nosuchreg"); /* { dg-error "object with volatile field" "explicit reg name" } */
  &a; /* { dg-warning "address of register" "explicit address" } */
  b; /* { dg-warning "address of register" "implicit address" } */
}
 

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.