diff options
author | Jakub Jelinek <jakub@redhat.com> | 2013-04-03 17:24:13 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2013-04-03 17:24:13 +0200 |
commit | 7349ed0585442aa54457ebdfc8c24b94080da2df (patch) | |
tree | 230c4adf7af28fc1d18274b32541361227e8781d /gcc/cp/tree.c | |
parent | 994a4cc03def40a27bd04085819f0c1dde266b3d (diff) | |
download | gcc-7349ed0585442aa54457ebdfc8c24b94080da2df.zip gcc-7349ed0585442aa54457ebdfc8c24b94080da2df.tar.gz gcc-7349ed0585442aa54457ebdfc8c24b94080da2df.tar.bz2 |
re PR c++/56819 (ICE: SIGSEGV in int_cst_value (tree.h:4013) with -fcompare-debug)
PR debug/56819
* tree.c (strip_typedefs): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT
from args to new_args.
(strip_typedefs_expr): Copy NON_DEFAULT_TEMPLATE_ARGS_COUNT from t to
r instead of doing {S,G}ET_NON_DEFAULT_TEMPLATE_ARGS_COUNT.
* g++.dg/debug/pr56819.C: New test.
From-SVN: r197420
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r-- | gcc/cp/tree.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 580b677..5117319 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -1255,8 +1255,13 @@ strip_typedefs (tree t) changed = true; } if (changed) - fullname = lookup_template_function (TREE_OPERAND (fullname, 0), - new_args); + { + NON_DEFAULT_TEMPLATE_ARGS_COUNT (new_args) + = NON_DEFAULT_TEMPLATE_ARGS_COUNT (args); + fullname + = lookup_template_function (TREE_OPERAND (fullname, 0), + new_args); + } else ggc_free (new_args); } @@ -1389,8 +1394,8 @@ strip_typedefs_expr (tree t) r = copy_node (t); for (i = 0; i < n; ++i) TREE_VEC_ELT (r, i) = (*vec)[i]; - SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT - (r, GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (t)); + NON_DEFAULT_TEMPLATE_ARGS_COUNT (r) + = NON_DEFAULT_TEMPLATE_ARGS_COUNT (t); } else r = t; |