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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr51528.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-fno-early-inlining" } */
3
 
4
extern void abort (void);
5
 
6
union U
7
{
8
  int i;
9
  _Bool b;
10
};
11
 
12
_Bool gb;
13
 
14
void  __attribute__ ((noinline))
15
use_bool (union U u)
16
{
17
  gb = u.b;
18
}
19
 
20
union U
21
bar (void)
22
{
23
  union U u;
24
  u.i = 0xFFFE;
25
  return u;
26
}
27
 
28
union U  __attribute__ ((noinline))
29
foo (void)
30
{
31
  union U u,v;
32
 
33
  u.b = 1;
34
  use_bool (u);
35
  u = bar ();
36
 
37
  return u;
38
}
39
 
40
int main (int argc, char **argv)
41
{
42
  union U u = foo ();
43
  if (u.i != 0xFFFE)
44
    abort ();
45
  return 0;
46
}

powered by: WebSVN 2.1.0

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