From 6019d86d178872350d20ed111d52550c075a7121 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Fri, 15 Nov 2013 23:17:23 +0000 Subject: [PATCH] re PR c++/58599 ([c++11] Trouble with non-static data member initializers in templates) 2013-11-15 Paolo Carlini PR c++/58599 * g++.dg/cpp0x/nsdmi-template5.C: New. From-SVN: r204866 --- gcc/testsuite/ChangeLog | 5 ++++ gcc/testsuite/g++.dg/cpp0x/nsdmi-template5.C | 38 ++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/nsdmi-template5.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 23928d4..1324a44 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-11-15 Paolo Carlini + + PR c++/58599 + * g++.dg/cpp0x/nsdmi-template5.C: New. + 2013-11-15 Aldy Hernandez * c-c++-common/cilk-plus/PS: New directory. diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-template5.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template5.C new file mode 100644 index 0000000..fdaf461 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template5.C @@ -0,0 +1,38 @@ +// PR c++/58599 +// { dg-do compile { target c++11 } } + +template struct A1; + +template<> struct A1<0> +{ + template struct B1 + { + template int foo1() {} + + int i1 = foo1(); + }; +}; + +template struct A2; + +template<> struct A2<0> +{ + template struct B2 + { + template int foo2() {} + + int i2 = foo2(); + }; +}; + +template struct A3; + +template<> struct A3<0> +{ + template struct B3 + { + template int foo3() {} + + int i3 = foo3(); + }; +}; -- 2.7.4