diff options
-rw-r--r-- | gcc/testsuite/ChangeLog | 15 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/nsdmi-template6.C | 13 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/nsdmi-template7.C | 15 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/nsdmi-template8.C | 27 |
4 files changed, 70 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1324a44..265b854 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,20 @@ 2013-11-15 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/58188 + * g++.dg/cpp0x/nsdmi-template8.C: New. + +2013-11-15 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/58725 + * g++.dg/cpp0x/nsdmi-template7.C: New. + +2013-11-15 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/58829 + * g++.dg/cpp0x/nsdmi-template6.C: New. + +2013-11-15 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/58599 * g++.dg/cpp0x/nsdmi-template5.C: New. diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-template6.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template6.C new file mode 100644 index 0000000..33ed82d --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template6.C @@ -0,0 +1,13 @@ +// PR c++/58829 +// { dg-do compile { target c++11 } } + +struct A { + int f() {return 0;} +} a; + +struct B { + template<int=0> struct C { + int i = a.f(); + }; +}; +B::C<> c; diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-template7.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template7.C new file mode 100644 index 0000000..cec7b7b --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template7.C @@ -0,0 +1,15 @@ +// PR c++/58725 +// { dg-do compile { target c++11 } } + +struct A { + template<int=0> + struct B { + struct C { + int x = 0; + double y = x; + } c; + }; +}; +int main() { + A::B<>(); +} diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-template8.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template8.C new file mode 100644 index 0000000..ef0dddd --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template8.C @@ -0,0 +1,27 @@ +// PR c++/58188 +// { dg-do compile { target c++11 } } + +struct B {}; +struct A +{ + A( B ); +}; + +struct Bar +{ + template< unsigned v > + struct Foo + { + A z = B(); + unsigned value; + Foo(): value( v ) {} + }; + + struct Baz + { + Foo< 8 > foo1; + Foo< 1 > foo3; + }; +}; + +Bar::Baz baz; |