From: Jason Merrill Date: Fri, 27 May 2011 19:32:22 +0000 (-0400) Subject: re PR c++/49176 ([c++0x] valid code rejected with "error: uninitialized const") X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=69cf9a1cfe034650e76a31ea6d98b92da0acf188;p=gcc.git re PR c++/49176 ([c++0x] valid code rejected with "error: uninitialized const") PR c++/49176 * g++.dg/template/const5.C: New. From-SVN: r174356 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 319fc28e059..a9e31ce77fc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2011-05-27 Jason Merrill + 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 index 00000000000..5d3ec5b1c91 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/const5.C @@ -0,0 +1,12 @@ +// PR c++/49176 +// { dg-options -std=c++0x } + +struct A { static int a(); }; + +template +struct B { static int const b; }; + +int f() { return B<0>::b; } + +template +int const B::b=A::a();