From 2a4141aa0d2c0a112f4b83535c9a857475e5ab05 Mon Sep 17 00:00:00 2001
From: Paolo Carlini <paolo.carlini@oracle.com>
Date: Tue, 1 Jul 2014 17:25:07 +0000
Subject: [PATCH] re PR c++/59637 ([c++11] ICE with decltype and destructor
 call in template)

2014-07-01  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/59637
	* g++.dg/cpp0x/decltype60.C: New.

From-SVN: r212205
---
 gcc/testsuite/ChangeLog                 | 5 +++++
 gcc/testsuite/g++.dg/cpp0x/decltype60.C | 7 +++++++
 2 files changed, 12 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/cpp0x/decltype60.C

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e0133116b91c..229b3c8d5904 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2014-07-01  Paolo Carlini  <paolo.carlini@oracle.com>
+
+	PR c++/59637
+	* g++.dg/cpp0x/decltype60.C: New.
+
 2014-07-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
 	* gcc.target/aarch64/simd/vcage_f64.c: New test.
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype60.C b/gcc/testsuite/g++.dg/cpp0x/decltype60.C
new file mode 100644
index 000000000000..504f5d1b623b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype60.C
@@ -0,0 +1,7 @@
+// PR c++/59637
+// { dg-do compile { target c++11 } }
+
+template<typename T> void foo(T* p)
+{
+  p->decltype(T{})::~X();
+}
-- 
GitLab