summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/template8.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.brendan/template8.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/template8.C20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/template8.C b/gcc/testsuite/g++.old-deja/g++.brendan/template8.C
new file mode 100644
index 000000000..66ba0d8ac
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/template8.C
@@ -0,0 +1,20 @@
+// { dg-do assemble }
+// GROUPS passed templates
+#include <stdio.h>
+
+// make sure we accept unions for templates
+template<int n>
+union Double_alignt{
+ double for_alignt;
+ char array[n];
+
+};
+
+int main(){
+
+
+ Double_alignt<20000> heap;
+
+ printf(" &heap.array[0] = %d, &heap.for_alignt = %d\n", &heap.array[0], &heap.for_alignt);
+
+}