diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/expr/bool1.C')
-rw-r--r-- | gcc/testsuite/g++.dg/expr/bool1.C | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/expr/bool1.C b/gcc/testsuite/g++.dg/expr/bool1.C new file mode 100644 index 000000000..bfb40e330 --- /dev/null +++ b/gcc/testsuite/g++.dg/expr/bool1.C @@ -0,0 +1,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 bool my_bool; +int main() +{ + my_bool b = false; + int i; + + b++; + b++; + i = b; + if (i != 1) + abort (); + return 0; +} + + |