summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr26421.c
blob: 70f123158afbe9f7f8be300b360bb3793fa3aa3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */

typedef struct {
  int i;
  int j;
  int k;
} Foo;

void bar(Foo*);
int foo(void)
{
  Foo a;
  a.i = 1;
  bar(&a);
  return a.i;
}

/* Verify the call clobbers all of a.  */

/* { dg-final { scan-tree-dump-not "return 1;" "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */