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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [arm/] [volatile-bitfields-4.c] - Rev 691

Compare with Previous | Blame | View Log

/* { dg-require-effective-target arm_eabi } */
/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-final { scan-assembler-times "ldr\[\\t \]+\[^\n\]*,\[\\t \]*\\\[\[^\n\]*\\\]" 2 } } */
/* { dg-final { scan-assembler-times "str\[\\t \]+\[^\n\]*,\[\\t \]*\\\[\[^\n\]*\\\]" 2 } } */
/* { dg-final { scan-assembler-not "strb" } } */
 
struct thing {
  unsigned a: 8;
  unsigned b: 8;
  unsigned c: 8;
  unsigned d: 8;
};
 
struct thing2 {
  volatile unsigned a: 8;
  volatile unsigned b: 8;
  volatile unsigned c: 8;
  volatile unsigned d: 8;
};
 
void test1(volatile struct thing *t)
{
  t->a = 5;
}
 
void test2(struct thing2 *t)
{
  t->a = 5;
}
 

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.