diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-04-07 06:09:27 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-04-07 06:09:27 +0000 |
commit | 242fc35cceaa8f16b20e10b03da279fc04794ee5 (patch) | |
tree | ee0530774216b52056190f27b4f1d7190346ac3d /gcc/stor-layout.c | |
parent | c1d86bcd4050b51cf2a4bf80efd55f56f8c04c3f (diff) | |
download | gcc-242fc35cceaa8f16b20e10b03da279fc04794ee5.tar.gz |
PR c++/5571
* stor-layout.c (layout_decl): Reset the RTL for the decl.
* class.c (layout_class_type): Remember incomplete static
variables.
(finish_struct_1): Call complete_vars, not
hack_incomplete_structures.
* cp-tree.h (hack_incomplete_structures): Rename to ...
(complete_vars): ... this.
(struct saved_scope): Remove incomplete.
(namespace_scope_incomplete): Remove.
* decl.c (struct binding_level): Remove incomplete.
(incomplete_vars): New variable.
(mark_binding_level): Don't mark incomplete.
(print_binding_level): Don't print it.
(mark_saved_scope): Don't mark incomplete.
(pushdecl): Use maybe_register_incopmlete_var.
(cxx_init_decl_processing): Register incomplete_vars for GC.
(start_decl_1): Clarify error message.
(hack_incomplete_vars): Remove.
(maybe_register_incomplete_var): New function.
(complete_vars): Likewise.
* g++.dg/opt/static2.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51978 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index baf26dddba1..fbf5e4f42ad 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -461,6 +461,11 @@ layout_decl (decl, known_align) larger_than_size); } } + + /* If there was already RTL for this DECL, as for a variable with an + incomplete type whose type is completed later, update the RTL. */ + if (DECL_RTL_SET_P (decl)) + make_decl_rtl (decl, NULL); } /* Hook for a front-end function that can modify the record layout as needed |