gcc/testsuite/g++.dg/rtti/typeid12.C
raw| 1 | // PR c++/87547 |
| 2 | // { dg-do run } |
| 3 | |
| 4 | #include <typeinfo> |
| 5 | |
| 6 | struct S { unsigned int a : 4; unsigned int b : 12; int c; unsigned long d : 8; } s; |
| 7 | |
| 8 | int |
| 9 | main () |
| 10 | { |
| 11 | if (typeid (s.a) != typeid (unsigned int) |
| 12 | || typeid (s.b) != typeid (unsigned int) |
| 13 | || typeid (s.c) != typeid (int) |
| 14 | || typeid (s.d) != typeid (unsigned long)) |
| 15 | __builtin_abort (); |
| 16 | } |