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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr52244.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
 
3
extern void abort (void);
4
 
5
typedef union u_r
6
{
7
  _Bool b;
8
  unsigned char c;
9
} u_t;
10
 
11
u_t
12
bar (void)
13
{
14
  u_t u;
15
  u.c = 0x12;
16
  return u;
17
}
18
 
19
u_t  __attribute__ ((noinline))
20
foo (void)
21
{
22
  u_t u;
23
 
24
  u.b = 1;
25
  u = bar ();
26
 
27
  return u;
28
}
29
 
30
int main (int argc, char **argv)
31
{
32
  u_t u = foo ();
33
  if (u.c != 0x12)
34
    abort ();
35
  return 0;
36
}

powered by: WebSVN 2.1.0

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