diff --git a/gcc/cp/reflect.cc b/gcc/cp/reflect.cc index e0e34d38e13..3f5627b2cb4 100644 --- a/gcc/cp/reflect.cc +++ b/gcc/cp/reflect.cc @@ -5976,8 +5976,8 @@ eval_define_aggregate (location_t loc, const constexpr_ctx *ctx, return call; } iloc_sentinel ils = loc; - type = strip_typedefs (type); type = TYPE_MAIN_VARIANT (type); + type = strip_typedefs (type); tree cscope = NULL_TREE, tscope = NULL_TREE; for (tree c = TYPE_CONTEXT (CP_DECL_CONTEXT (consteval_block)); c; c = get_containing_scope (c))