aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr36666.c
blob: 9eb132cd044e697deb4ae7549edc130906ffb488 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
struct Foo {
    int *p;
    struct X {
	int a,b,c,d,e,*f;
    } x;
} *init, *init2;

struct X __attribute__((const)) foo(struct X);
struct Foo __attribute__((const)) foo2(struct Foo);

void bar1 (void)
{
  init->x = foo (init2->x);
}
void bar2 (void)
{
  init->x = foo (init->x);
}
void bar3 (void)
{
  *init = foo2 (*init2);
}