diff options
Diffstat (limited to 'gcc/cp/pt.cc')
-rw-r--r-- | gcc/cp/pt.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc index 538ff22..39c0ee6 100644 --- a/gcc/cp/pt.cc +++ b/gcc/cp/pt.cc @@ -15920,6 +15920,11 @@ tsubst_decl (tree t, tree args, tsubst_flags_t complain, if (TYPE_USER_ALIGN (TREE_TYPE (t))) TREE_TYPE (r) = build_aligned_type (TREE_TYPE (r), TYPE_ALIGN (TREE_TYPE (t))); + + /* Preserve structural-ness of a partially instantiated typedef. */ + if (TYPE_STRUCTURAL_EQUALITY_P (TREE_TYPE (t)) + && dependent_type_p (TREE_TYPE (r))) + SET_TYPE_STRUCTURAL_EQUALITY (TREE_TYPE (r)); } layout_decl (r, 0); |