summaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r--gcc/cp/class.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 84ecf77f958..9761c5c41a7 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -5084,6 +5084,9 @@ finish_struct_1 (tree t)
DECL_SORTED_FIELDS (TYPE_MAIN_DECL (t)) = field_vec;
}
+ /* Complain if one of the field types requires lower visibility. */
+ constrain_class_visibility (t);
+
/* Make the rtl for any new vtables we have created, and unmark
the base types we marked. */
finish_vtbls (t);