gcc/testsuite/g++.old-deja/g++.brendan/template31.C
raw| 1 | // { dg-do assemble } |
| 2 | // GROUPS passed templates |
| 3 | // PRMS Id: 13218 |
| 4 | |
| 5 | struct C { |
| 6 | int x; |
| 7 | char y; |
| 8 | double z; |
| 9 | }; |
| 10 | C c02; |
| 11 | |
| 12 | template <int* ip> struct A { |
| 13 | int* p; |
| 14 | A() : p(ip) {} |
| 15 | }; |
| 16 | |
| 17 | template <C* cp> struct B { |
| 18 | C* p; |
| 19 | B() : p(cp) {} |
| 20 | }; |
| 21 | |
| 22 | int i00; |
| 23 | |
| 24 | int main(void) |
| 25 | { |
| 26 | A<&i00> a00; |
| 27 | |
| 28 | extern int i01; |
| 29 | A<&i01> a01; |
| 30 | |
| 31 | B<&c02> b02; |
| 32 | |
| 33 | extern C c03; |
| 34 | B<&c03> b03; |
| 35 | } |
| 36 | |
| 37 | int i01; |
| 38 | C c03; |