From: Paolo Carlini Date: Mon, 9 May 2011 23:24:01 +0000 (+0000) Subject: re PR c++/48522 ([C++0x] decltype((object)) with templated classes crashes g++ 4... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0410e66d03a02577d65cd6a9337775c8f4c8e119;p=gcc.git re PR c++/48522 ([C++0x] decltype((object)) with templated classes crashes g++ 4.5.1.) 2011-05-09 Paolo Carlini PR c++/48522 * g++.dg/cpp0x/pr48522.C: New. From-SVN: r173598 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8279c6998b3..67799ec2bfb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-05-09 Paolo Carlini + + PR c++/48522 + * g++.dg/cpp0x/pr48522.C: New. + 2011-05-09 Paolo Carlini 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 index 00000000000..1543d8a281d --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/pr48522.C @@ -0,0 +1,24 @@ +// { dg-options "-std=c++0x" } + +template +struct Handle +{ + Handle(T& t); +}; + +template +struct Class { + struct Struct {} data; + void f(); + void g(); +}; + +template +void Class::f() { + Handle< decltype((data)) > handle(data); +} + +template +void Class::g() { + Handle< decltype((data)) > handle(data); +}