aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2015-03-04 08:32:23 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2015-03-04 08:32:23 +0000
commitbd8b8b5cae4541a5b968f6f507ac637d7e669411 (patch)
tree65da6683e9ed31c43ee56e991c9d23fb43e622ca /gcc
parent670654ef11ee2e0c2be59e4a28acc3117de7a003 (diff)
downloadgcc-bd8b8b5cae4541a5b968f6f507ac637d7e669411.zip
gcc-bd8b8b5cae4541a5b968f6f507ac637d7e669411.tar.gz
gcc-bd8b8b5cae4541a5b968f6f507ac637d7e669411.tar.bz2
re PR c++/64398 (decltype in different contexts with similar expressions triggers segfault in GCC)
2015-03-04 Paolo Carlini <paolo.carlini@oracle.com> PR c++/64398 * g++.dg/cpp0x/decltype62.C: New. From-SVN: r221174
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype62.C15
2 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index d38eb52..8700a47 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/64398
+ * g++.dg/cpp0x/decltype62.C: New.
+
2015-03-03 Eric Botcazou <ebotcazou@adacore.com>
* 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 0000000..f2f1606
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype62.C
@@ -0,0 +1,15 @@
+// PR c++/64398
+// { dg-do compile { target c++11 } }
+
+template<typename T> struct template1;
+
+template<typename T, typename> // second param required
+struct struct1{
+ using type1 = decltype(T::x);
+ using type2 = template1<type1>;
+};
+
+template<typename T> using alias1 = template1<decltype(T::x)>;
+
+// just for instantiation:
+template<typename T> using alias2 = alias1<T>;