summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-17.c
blob: 0db5198ac1d78009c62564a2e1f0e3c7051f3431 (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 "-O2 -fdump-tree-dse1" } */

struct s1 {
    unsigned short f1;
    unsigned char f2;
};

struct s2 {
    struct s1 *p1;
};

void f1(struct s2 *p)
{
  p->p1->f2 = 9;
  p->p1->f2 = 10;
}

/* { dg-final { scan-tree-dump-times "f2 =" 1 "dse1" } } */