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

struct S
{
  int a[1];
  int z[256];
};

void foo (struct S *s, int i)
{
  struct S disappear;

  disappear.a[i] = 12;
  *s = disappear;
}

/* { dg-final { scan-tree-dump-times "disappear" 0 "optimized"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */