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
This commit is contained in:
Jason Merrill 2015-07-02 20:45:34 -04:00 committed by Jason Merrill
parent a3d8e94a1f
commit a426f31afb
3 changed files with 16 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2015-07-02 Jason Merrill <jason@redhat.com>
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 <andrew.n.sutton@gmail.com>
* pt.c (type_dependent_expression_p): Handle expressions

View File

@ -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;

View File

@ -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)>;