aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/graphite/pr60979.c
blob: 0004a51248d40561718fbd6343db6f750a92af58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* { dg-options "-O -fgraphite-identity" } */

#include <setjmp.h>

struct x;

typedef struct x **(*a)(struct x *);

struct x {
    union {
	struct {
	    union {
		a *i;
	    } l;
	    int s;
	} y;
    } e;
};

jmp_buf c;

void
b(struct x *r)
{
  int f;
  static int w = 0;
  volatile jmp_buf m;
  f = (*(((struct x *)r)->e.y.l.i[2]((struct x *)r)))->e.y.s;
  if (w++ != 0)
    __builtin_memcpy((char *)m, (const char *)c, sizeof(jmp_buf));
  if (setjmp (c) == 0) {
      int z;
      for (z = 0; z < 0; ++z)
	;
  }
  d((const char *)m);
}