PR c++/49176
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 27 May 2011 19:32:22 +0000 (19:32 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 27 May 2011 19:32:22 +0000 (19:32 +0000)
* g++.dg/template/const5.C: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174356 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 319fc28..a9e31ce 100644 (file)
@@ -1,5 +1,8 @@
 2011-05-27  Jason Merrill  <jason@redhat.com>
 
+       PR c++/49176
+       * g++.dg/template/const5.C: New.
+
        * g++.dg/cpp0x/enum18.C: New.
 
        * g++.dg/cpp0x/lambda/lambda-nested4.C: New.
diff --git a/gcc/testsuite/g++.dg/template/const5.C b/gcc/testsuite/g++.dg/template/const5.C
new file mode 100644 (file)
index 0000000..5d3ec5b
--- /dev/null
@@ -0,0 +1,12 @@
+// PR c++/49176
+// { dg-options -std=c++0x }
+
+struct A { static int a(); };
+
+template<int>
+struct B { static int const b; };
+
+int f() { return B<0>::b; }
+
+template<int I>
+int const B<I>::b=A::a();