Swap TYPE_MAIN_VARIANT and strip_typedefs in eval_define_aggregate.

This commit is contained in:
Jakub Jelinek
2026-01-07 13:18:03 +01:00
committed by Marek Polacek
parent dc0c617e97
commit 3e796d828e

View File

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