summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr37248-1.c
blob: 4107fd6e2cd88722db6786dd64a7d317d490a764 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* PR middle-end/37248 */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */

struct S
{
  unsigned char a : 1;
  unsigned char b : 1;
  unsigned char c : 1;
} s;

int
foo (struct S x)
{
  return x.a && x.b && x.c;
}

/* { dg-final { scan-tree-dump "& 7;" "optimized" } } */
/* { dg-final { scan-tree-dump "== 7;" "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */