| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -Wuninitialized" } */ |
| 3 |
struct S { char *s1; long s2; }; |
| 4 |
struct T { int t1; long t2; long t3; }; |
| 5 |
extern int fn2 (void); |
| 6 |
extern int fn3 (struct T); |
| 7 |
extern struct T fn4 (); |
| 8 |
extern int fn5 (char **, long *, int); |
| 9 |
extern void fn6 (void); |
| 10 |
extern void fn7 (void *); |
| 11 |
struct S *fn10 (); |
| 12 |
static int p; |
| 13 |
static void *q; |
| 14 |
extern struct T r; |
| 15 |
|
| 16 |
static struct T |
| 17 |
fn8 (struct T x, int y) |
| 18 |
{ |
| 19 |
struct S *u = fn10 (); |
| 20 |
int v = fn5 (&u->s1, &u->s2, 0); |
| 21 |
while (1) |
| 22 |
{ |
| 23 |
if (p) |
| 24 |
fn6 (); |
| 25 |
if (fn3 (x)) |
| 26 |
return fn4 (); |
| 27 |
if (y & 1) |
| 28 |
return r; |
| 29 |
v = fn5 (&u->s1, &u->s2, 1); |
| 30 |
} |
| 31 |
} |
| 32 |
|
| 33 |
struct T |
| 34 |
fn9 (struct T x, int y) |
| 35 |
{ |
| 36 |
struct T t = fn8 (x, y); |
| 37 |
if (fn2 ()) |
| 38 |
fn7 (q); |
| 39 |
return t; |
| 40 |
} |
| 41 |
|
| 42 |
void * |
| 43 |
fn1 (void) |
| 44 |
{ |
| 45 |
return fn9; |
| 46 |
} |