aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-83.c
blob: cf6be22937732c27ea621a73e9250d008515ca54 (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
27
28
29
30
31
32
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-fre1-details" } */

struct X
{
   int a : 1;
   int b : 1;
} x;

void foo (int v)
{
  x.a = 1;
  x.b = v;
  x.a = 1;
  x.b = v;
}

struct Y
{
   _Bool a;
   _Bool b;
} y;

void bar (int v)
{
  y.a = 1;
  y.b = v;
  y.a = 1;
  y.b = v;
}

/* { dg-final { scan-tree-dump-times "Deleted redundant store" 4 "fre1" } } */