summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/bool2.C
blob: e77bd848725e69c3a911613e94102372f1c217ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// { dg-do run  }
// Make sure that bool bitfields promote to int properly.

struct F {
  bool b1 : 1;
  bool b2 : 7;
};

int main()
{
  F f = { true, true };

  if (int (f.b1) != 1)
    return 1;
}