From: Jason Merrill Date: Fri, 3 Jul 2015 00:45:34 +0000 (-0400) Subject: re PR c++/66743 (ICE: tree check: expected record_type or union_type or qual_union_ty... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a426f31afb36abf86c161ecd47b5d8e873fe068e;p=gcc.git re PR c++/66743 (ICE: tree check: expected record_type or union_type or qual_union_type, have underlying_type in for_each_template_parm_r, at cp/pt.c:8234) PR c++/66743 * pt.c (for_each_template_parm_r) [UNDERLYING_TYPE]: Use TYPE_VALUES_RAW rather than TYPE_FIELDS. From-SVN: r225365 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 12640af60a1..c72954dd82e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2015-07-02 Jason Merrill + + PR c++/66743 + * pt.c (for_each_template_parm_r) [UNDERLYING_TYPE]: Use + TYPE_VALUES_RAW rather than TYPE_FIELDS. + 2015-07-02 Andrew Sutton * pt.c (type_dependent_expression_p): Handle expressions diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 12feeee3f54..e819b69ede3 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -8255,7 +8255,7 @@ for_each_template_parm_r (tree *tp, int *walk_subtrees, void *d) case TYPEOF_TYPE: case UNDERLYING_TYPE: if (pfd->include_nondeduced_p - && for_each_template_parm (TYPE_FIELDS (t), fn, data, + && for_each_template_parm (TYPE_VALUES_RAW (t), fn, data, pfd->visited, pfd->include_nondeduced_p)) return error_mark_node; diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-51.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-51.C new file mode 100644 index 00000000000..cef3715845b --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-51.C @@ -0,0 +1,9 @@ +// PR c++/66743 +// { dg-do compile { target c++11 } } + +template< class T > +struct + type_is { using type = T; }; + +template< class T > + using underlying_type = type_is<__underlying_type(T)>;