From bd8b8b5cae4541a5b968f6f507ac637d7e669411 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Wed, 4 Mar 2015 08:32:23 +0000 Subject: [PATCH] re PR c++/64398 (decltype in different contexts with similar expressions triggers segfault in GCC) 2015-03-04 Paolo Carlini PR c++/64398 * g++.dg/cpp0x/decltype62.C: New. From-SVN: r221174 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/decltype62.C | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/decltype62.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d38eb522768..8700a47a8c1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-03-04 Paolo Carlini + + PR c++/64398 + * g++.dg/cpp0x/decltype62.C: New. + 2015-03-03 Eric Botcazou * gnat.dg/object_overflow5.adb: New test. diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype62.C b/gcc/testsuite/g++.dg/cpp0x/decltype62.C new file mode 100644 index 00000000000..f2f16065435 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/decltype62.C @@ -0,0 +1,15 @@ +// PR c++/64398 +// { dg-do compile { target c++11 } } + +template struct template1; + +template // second param required +struct struct1{ + using type1 = decltype(T::x); + using type2 = template1; +}; + +template using alias1 = template1; + +// just for instantiation: +template using alias2 = alias1; -- 2.30.2