From 687235522bc9e26d19573af83a4d31095536f97a Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 22 Sep 2016 10:54:41 +0000 Subject: [PATCH] class.c (push_super_field): Set DECL_CONTEXT. 2016-09-22 Richard Biener java/ * class.c (push_super_field): Set DECL_CONTEXT. From-SVN: r240346 --- gcc/java/ChangeLog | 5 +++++ gcc/java/class.c | 1 + 2 files changed, 6 insertions(+) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index acca8406a6c..20a6df2a4b8 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +2016-09-22 Richard Biener + + java/ + * class.c (push_super_field): Set DECL_CONTEXT. + 2016-09-01 Martin Sebor * decl.c (give_name_to_locals): Increase buffer size to guarantee diff --git a/gcc/java/class.c b/gcc/java/class.c index 35874867170..b4708bcbcdf 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -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);