]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/13474 (fail to compile non type argument specialization of pointer to array...
authorGiovanni Bajo <giovannibajo@gcc.gnu.org>
Tue, 13 Jan 2004 01:07:02 +0000 (01:07 +0000)
committerGiovanni Bajo <giovannibajo@gcc.gnu.org>
Tue, 13 Jan 2004 01:07:02 +0000 (01:07 +0000)
PR c++/13474
* g++.dg/template/array3.C: New test.

From-SVN: r75778

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/array3.C [new file with mode: 0644]

index 5a1a497595d1cb8acdcbcb4189a704b640f34c05..4785a3d6f4b1b83061f6619568cc9ae17dd7d268 100644 (file)
@@ -1,3 +1,8 @@
+2004-01-13  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
+
+       PR c++/13474
+       * g++.dg/template/array3.C: New test.
+
 2004-01-12  Zack Weinberg  <zack@codesourcery.com>
 
        * g++.dg/ext/lvalue1.C: No longer expected to fail.
diff --git a/gcc/testsuite/g++.dg/template/array3.C b/gcc/testsuite/g++.dg/template/array3.C
new file mode 100644 (file)
index 0000000..27d72f9
--- /dev/null
@@ -0,0 +1,17 @@
+// { dg-do compile }
+// Origin: Graeme Prentice <gprentice at paradise dot net dot nz>
+// PR c++/13474: An array domain which is value-dependent must be folded 
+//  in time for deduction.
+
+template< int X, int Y, int (*array_ptr)[Y] > 
+class A;
+
+int array[5];
+
+template< int X > 
+class A<X,5,&array> {};
+
+int main()
+{
+  A<6,5,&array> z1;  
+}