summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr69802.c
blob: 27ee02f36b5d54193741f779a0fc4a98e4ee95a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* PR tree-optimization/69802 */
/* { dg-do compile } */
/* { dg-options "-O2 -Wall" } */

struct S { unsigned f : 1; };
int a, d;

int
foo (void)
{
  unsigned b = 0;
  struct S c;
  d = ((1 && b) < c.f) & c.f;	/* { dg-warning "is used uninitialized" } */
  return a;
}

int
bar (_Bool c)
{
  unsigned b = 0;
  d = ((1 && b) < c) & c;
  return a;
}