gcc/testsuite/g++.dg/ext/bitfield1.C
raw| 1 | // PR c++/30328 |
| 2 | // { dg-do link } |
| 3 | // { dg-options "" } |
| 4 | |
| 5 | typedef int int32_t __attribute__((mode (__SI__))); |
| 6 | |
| 7 | struct S |
| 8 | { |
| 9 | int32_t a:17; |
| 10 | } x; |
| 11 | |
| 12 | typedef typeof (x.a) foo; |
| 13 | |
| 14 | template <class T> |
| 15 | T* inc(T* p) { return p+1; } |
| 16 | |
| 17 | int main () |
| 18 | { |
| 19 | foo x[2] = { 1,2 }; |
| 20 | int32_t y[2] = { 1,2 }; |
| 21 | *inc(x); |
| 22 | *inc(y); |
| 23 | return 0; |
| 24 | } |