+2019-07-31 Jason Merrill <jason@redhat.com>
+
+ Fix copy_node of 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.
+
2019-07-30 Martin Liska <mliska@suse.cz>
PR tree-optimization/91270
MARK_TS_COMMON (TEMPLATE_TYPE_PARM);
MARK_TS_COMMON (TEMPLATE_PARM_INDEX);
MARK_TS_COMMON (OVERLOAD);
- MARK_TS_COMMON (TEMPLATE_INFO);
MARK_TS_COMMON (TYPENAME_TYPE);
MARK_TS_COMMON (TYPEOF_TYPE);
MARK_TS_COMMON (UNDERLYING_TYPE);
(TREE_LANG_FLAG_1 (TEMPLATE_INFO_CHECK (NODE)))
struct GTY(()) tree_template_info {
- struct tree_common common;
+ struct tree_base base;
+ tree tmpl;
+ tree args;
vec<qualified_typedef_usage_t, va_gc> *typedefs_needing_access_checking;
};
? (TYPE_LANG_SLOT_1 (NODE) = (VAL)) \
: (DECL_TEMPLATE_INFO (TYPE_NAME (NODE)) = (VAL)))
-#define TI_TEMPLATE(NODE) TREE_TYPE (TEMPLATE_INFO_CHECK (NODE))
-#define TI_ARGS(NODE) TREE_CHAIN (TEMPLATE_INFO_CHECK (NODE))
+#define TI_TEMPLATE(NODE) \
+ ((struct tree_template_info*)TEMPLATE_INFO_CHECK (NODE))->tmpl
+#define TI_ARGS(NODE) \
+ ((struct tree_template_info*)TEMPLATE_INFO_CHECK (NODE))->args
#define TI_PENDING_TEMPLATE_FLAG(NODE) \
TREE_LANG_FLAG_1 (TEMPLATE_INFO_CHECK (NODE))
/* For a given TREE_VEC containing a template argument list,