aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/mangle.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-08-01 17:02:07 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-08-01 17:02:07 -0400
commit4bbff96e369cf96ee1c6bd3fd9f7728c08e05da8 (patch)
treee2466ac7db646acfd78689bc5c745b698c31ba6f /gcc/cp/mangle.c
parent3748a54ca39e4aa0d38cec50b8e8ee7b7a93df09 (diff)
downloadgcc-4bbff96e369cf96ee1c6bd3fd9f7728c08e05da8.zip
gcc-4bbff96e369cf96ee1c6bd3fd9f7728c08e05da8.tar.gz
gcc-4bbff96e369cf96ee1c6bd3fd9f7728c08e05da8.tar.bz2
re PR c++/49932 ([C++0x] ICE on instantiating decltype(expr)::type with template)
PR c++/49932 gcc/cp/ * mangle.c (write_prefix): Handle decltype. libiberty/ * cp-demangle.c (d_prefix): Handle decltype. From-SVN: r177074
Diffstat (limited to 'gcc/cp/mangle.c')
-rw-r--r--gcc/cp/mangle.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index 4a83c9a..eb3f144 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -952,6 +952,7 @@ write_nested_name (const tree decl)
/* <prefix> ::= <prefix> <unqualified-name>
::= <template-param>
::= <template-prefix> <template-args>
+ ::= <decltype>
::= # empty
::= <substitution> */
@@ -968,6 +969,12 @@ write_prefix (const tree node)
MANGLE_TRACE_TREE ("prefix", node);
+ if (TREE_CODE (node) == DECLTYPE_TYPE)
+ {
+ write_type (node);
+ return;
+ }
+
if (find_substitution (node))
return;