diff options
author | Jason Merrill <jason@redhat.com> | 2010-01-20 20:58:53 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2010-01-20 20:58:53 -0500 |
commit | 4d43dcdeb57d58ad5e3aade44b93fa48d051c770 (patch) | |
tree | 7f36d32b649117c432fd4d50913d0ac71b47d393 /libiberty/cp-demangle.c | |
parent | f827f65933319275c46eccf2aa1df4f1d21d6783 (diff) | |
download | gcc-4d43dcdeb57d58ad5e3aade44b93fa48d051c770.zip gcc-4d43dcdeb57d58ad5e3aade44b93fa48d051c770.tar.gz gcc-4d43dcdeb57d58ad5e3aade44b93fa48d051c770.tar.bz2 |
re PR c++/42338 ([c++0x] ICE on decltype usage with templates)
PR c++/42338
* mangle.c (write_expression): Handle tree codes that have extra
arguments in the middle-end.
* cp-demangle.c (d_print_comp): Fix array index printing.
From-SVN: r156103
Diffstat (limited to 'libiberty/cp-demangle.c')
-rw-r--r-- | libiberty/cp-demangle.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index d37c90e..f28e163 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -4037,9 +4037,18 @@ d_print_comp (struct d_print_info *dpi, d_append_char (dpi, '('); d_print_subexpr (dpi, d_left (d_right (dc))); - if (strcmp (d_left (dc)->u.s_operator.op->code, "cl") != 0) - d_print_expr_op (dpi, d_left (dc)); - d_print_subexpr (dpi, d_right (d_right (dc))); + if (strcmp (d_left (dc)->u.s_operator.op->code, "ix") == 0) + { + d_append_char (dpi, '['); + d_print_comp (dpi, d_right (d_right (dc))); + d_append_char (dpi, ']'); + } + else + { + if (strcmp (d_left (dc)->u.s_operator.op->code, "cl") != 0) + d_print_expr_op (dpi, d_left (dc)); + d_print_subexpr (dpi, d_right (d_right (dc))); + } if (d_left (dc)->type == DEMANGLE_COMPONENT_OPERATOR && d_left (dc)->u.s_operator.op->len == 1 |