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

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

Line No. Rev Author Line
1 689 jeremybenn
/* Verify that we do not IPA-SRA bitfields.  */
2
/* { dg-do run } */
3
/* { dg-options "-O2"  } */
4
/* { dg-require-effective-target int32plus } */
5
 
6
extern void abort (void);
7
 
8
struct S
9
{
10
  int j : 8;
11
  int i : 24;
12
  int l;
13
};
14
 
15
static int __attribute__((noinline)) foo (struct S *s)
16
{
17
  int z = s->i;
18
  if (z != 777)
19
    abort ();
20
  return 0;
21
}
22
 
23
int __attribute__((noinline)) bar (struct S *s)
24
{
25
  return foo (s);
26
}
27
 
28
int main (int argc, char *argv[])
29
{
30
  struct S s;
31
  s.j = 5;
32
  s.i = 777;
33
  s.l = -1;
34
 
35
  return bar (&s);
36
}

powered by: WebSVN 2.1.0

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