Fix copy_node of TEMPLATE_INFO.
authorJason Merrill <jason@redhat.com>
Wed, 31 Jul 2019 18:49:28 +0000 (14:49 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 31 Jul 2019 18:49:28 +0000 (14:49 -0400)
commitfc79fc4966060222486458e6b310203e4e8527a1
tree79846d033ee7f9e00704b5ddb53140725e54f3b0
parentb6de3028951bbc9982f7d5810981d5e911853cc0
Fix copy_node of TEMPLATE_INFO.

build_clone uses copy_node to duplicate the TEMPLATE_INFO for a clone, but
this clears TREE_CHAIN, which was TI_ARGS in a TEMPLATE_INFO.

* cp-tree.h (struct tree_template_info): Use tree_base instead of
tree_common.  Add tmpl and args fields.
(TI_TEMPLATE, TI_ARGS): Adjust.

From-SVN: r273943
gcc/cp/ChangeLog
gcc/cp/cp-objcp-common.c
gcc/cp/cp-tree.h