summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/expr/bool3.C
blob: 61669e27befd6d9fc59708afda3c390b68974618 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// { dg-do run }
// PR C++/29295
// make sure that a typedef for a bool will have the
//  the same results as a bool itself.

extern "C" void abort();
typedef volatile bool my_bool;
int main()
{ 
  my_bool b = false;
  int i;

  b++;
  b++;
  i = b;
  if (i != 1)
    abort ();
  return 0;
}