re PR c++/48522 ([C++0x] decltype((object)) with templated classes crashes g++ 4...
authorPaolo Carlini <paolo.carlini@oracle.com>
Mon, 9 May 2011 23:24:01 +0000 (23:24 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 9 May 2011 23:24:01 +0000 (23:24 +0000)
2011-05-09  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/48522
* g++.dg/cpp0x/pr48522.C: New.

From-SVN: r173598

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/pr48522.C [new file with mode: 0644]

index 8279c6998b3a8da82652aa56e27c741ff595222d..67799ec2bfb358ad157a8ff33d2c0c2a53486b5f 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-09  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/48522
+       * g++.dg/cpp0x/pr48522.C: New.
+
 2011-05-09  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/48735
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr48522.C b/gcc/testsuite/g++.dg/cpp0x/pr48522.C
new file mode 100644 (file)
index 0000000..1543d8a
--- /dev/null
@@ -0,0 +1,24 @@
+// { dg-options "-std=c++0x" }
+
+template <typename T>
+struct Handle
+{
+    Handle(T& t);
+};
+
+template<class T>
+struct Class {
+    struct Struct {} data;
+    void f();
+    void g();
+};
+
+template<class T>
+void Class<T>::f() {
+    Handle< decltype((data)) > handle(data);
+}
+
+template<class T>
+void Class<T>::g() {
+    Handle< decltype((data)) > handle(data);
+}