class.c (finish_struct): Call set_class_bindings for the template case too.
authorNathan Sidwell <nathan@acm.org>
Fri, 1 Sep 2017 18:10:42 +0000 (18:10 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Fri, 1 Sep 2017 18:10:42 +0000 (18:10 +0000)
* class.c (finish_struct): Call set_class_bindings for the
template case too.

From-SVN: r251608

gcc/cp/ChangeLog
gcc/cp/class.c

index bd6c33639acfb0ada2e9d1cdb06c3ba8a72b1268..650e766b767d9a2cba218219067a042adc0f4ca2 100644 (file)
@@ -1,6 +1,9 @@
 2017-09-01  Nathan Sidwell  <nathan@acm.org>
 
-       * class.c (finish_struct_methods): Done clear DECL_IN_AGGR_P here.
+       * class.c (finish_struct): Call set_class_bindings for the
+       template case too.
+
+       * class.c (finish_struct_methods): Dont clear DECL_IN_AGGR_P here.
        Don't call maybe_warn_about_overly_private_class here.
        (warn_hidden): Cleanup declarations and comments.
        (type_has_user_provided_constructor): No need to check
index 25ff9ed4046b6d6d6ad2c682e14ac6bbf3489875..0476ae8cc5b8d981f46578712cbd4e85e616fec0 100644 (file)
@@ -7188,6 +7188,7 @@ finish_struct (tree t, tree attributes)
       /* COMPLETE_TYPE_P is now true.  */
 
       finish_struct_methods (t);
+      set_class_bindings (t, TYPE_FIELDS (t));
 
       /* We need to emit an error message if this type was used as a parameter
         and it is an abstract type, even if it is a template. We construct