aboutsummaryrefslogtreecommitdiff
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 2ab123d..bc0d3d6 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -6759,6 +6759,8 @@ layout_class_type (tree t, tree *virtuals_p)
TYPE_CONTEXT (base_t) = t;
DECL_CONTEXT (base_d) = t;
+ set_instantiating_module (base_d);
+
/* If the ABI version is not at least two, and the last
field was a bit-field, RLI may not be on a byte
boundary. In particular, rli_size_unit_so_far might
@@ -8738,6 +8740,7 @@ build_self_reference (void)
DECL_ARTIFICIAL (decl) = 1;
SET_DECL_SELF_REFERENCE_P (decl);
set_underlying_type (decl);
+ set_instantiating_module (decl);
if (processing_template_decl)
decl = push_template_decl (decl);