gcc/testsuite/g++.old-deja/g++.brendan/template8.C
raw| 1 | // { dg-do assemble } |
| 2 | // GROUPS passed templates |
| 3 | #include <stdio.h> |
| 4 | |
| 5 | // make sure we accept unions for templates |
| 6 | template<int n> |
| 7 | union Double_alignt{ |
| 8 | double for_alignt; |
| 9 | char array[n]; |
| 10 | |
| 11 | }; |
| 12 | |
| 13 | int main(){ |
| 14 | |
| 15 | |
| 16 | Double_alignt<20000> heap; |
| 17 | |
| 18 | printf(" &heap.array[0] = %d, &heap.for_alignt = %d\n", &heap.array[0], &heap.for_alignt); |
| 19 | |
| 20 | } |