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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [ipa/] [pr45644.c] - Rev 801

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

/* Verify that we do not IPA-SRA bitfields.  */
/* { dg-do run } */
/* { dg-options "-O2"  } */
/* { dg-require-effective-target int32plus } */
 
extern void abort (void);
 
struct S
{
  int j : 8;
  int i : 24;
  int l;
};
 
static int __attribute__((noinline)) foo (struct S *s)
{
  int z = s->i;
  if (z != 777)
    abort ();
  return 0;
}
 
int __attribute__((noinline)) bar (struct S *s)
{
  return foo (s);
}
 
int main (int argc, char *argv[])
{
  struct S s;
  s.j = 5;
  s.i = 777;
  s.l = -1;
 
  return bar (&s);
}
 

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.