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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [pr42025-2.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 688 jeremybenn
typedef struct
2
{
3
  void *p;
4
} Ptr;
5
 
6
struct A
7
{
8
  int i;
9
  union
10
  {
11
    Ptr p;
12
    char *q;
13
  } u;
14
};
15
 
16
extern Ptr get_stuff (void);
17
extern void use_stuff (char *);
18
 
19
static void foo(struct A p, char *q)
20
{
21
  if (p.i)
22
    p.u.p = get_stuff ();
23
  else
24
    p.u.q = q;
25
 
26
  use_stuff (p.u.q);
27
}
28
 
29
void bar(struct A *p, char *q)
30
{
31
  foo(*p, q);
32
}

powered by: WebSVN 2.1.0

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