summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr19633.c
blob: 01c7eec312922d45f7534c4f137b737064f52e05 (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
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-ssa-vops" } */
struct S
{
  int w, x, y, z;
};
struct T
{
  int r;
  struct S s;
};
void bar (struct S, int);
void
foo (int a, struct T b)
{
  struct S x;
  struct S *c = &x;
  if (a)
    c = &b.s;
  bar (*c, a);
}

/* Make sure that .GLOBAL_VAR is not created when there are no
   clobbering calls.  */
/* { dg-final { scan-tree-dump-times "GLOBAL_VAR" 0 "ssa"} } */
/* { dg-final { cleanup-tree-dump "ssa" } } */