class.c (push_super_field): Set DECL_CONTEXT.
authorRichard Biener <rguenther@suse.de>
Thu, 22 Sep 2016 10:54:41 +0000 (10:54 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 22 Sep 2016 10:54:41 +0000 (10:54 +0000)
2016-09-22  Richard Biener  <rguenther@suse.de>

java/
* class.c (push_super_field): Set DECL_CONTEXT.

From-SVN: r240346

gcc/java/ChangeLog
gcc/java/class.c

index acca840..20a6df2 100644 (file)
@@ -1,3 +1,8 @@
+2016-09-22  Richard Biener  <rguenther@suse.de>
+
+       java/
+       * class.c (push_super_field): Set DECL_CONTEXT.
+
 2016-09-01  Martin Sebor  <msebor@redhat.com>
 
        * decl.c (give_name_to_locals): Increase buffer size to guarantee
index 3587486..b4708bc 100644 (file)
@@ -2365,6 +2365,7 @@ push_super_field (tree this_class, tree super_class)
   base_decl = build_decl (input_location,
                          FIELD_DECL, NULL_TREE, super_class);
   DECL_IGNORED_P (base_decl) = 1;
+  DECL_CONTEXT (base_decl) = this_class;
   DECL_CHAIN (base_decl) = TYPE_FIELDS (this_class);
   TYPE_FIELDS (this_class) = base_decl;
   DECL_SIZE (base_decl) = TYPE_SIZE (super_class);