diff options
author | Mark Mitchell <mark@codesourcery.com> | 2003-03-01 01:22:43 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2003-03-01 01:22:43 +0000 |
commit | 1d62c33ebd5cf50c19a015401ee02c6949f0b9df (patch) | |
tree | 7015d9667f130dd27abe80abdc59995dbed2c40e | |
parent | 9552a3e3426475e41f29ce6acaeefd25b6e12662 (diff) | |
download | gcc-1d62c33ebd5cf50c19a015401ee02c6949f0b9df.zip gcc-1d62c33ebd5cf50c19a015401ee02c6949f0b9df.tar.gz gcc-1d62c33ebd5cf50c19a015401ee02c6949f0b9df.tar.bz2 |
re PR c++/9892 (g++.old-deja/g++.pt/static9.C regression)
PR c++/9892
* pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
instantiating it.
From-SVN: r63601
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/pt.c | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 78d4f26..e4ccfb2 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2003-02-28 <mark@codesourcery.com> + + PR c++/9892 + * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when + instantiating it. + 2003-02-28 Aldy Hernandez <aldyh@redhat.com> * parser.c (cp_parser_init_declarator): Revert opaque diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index c0ec51d..ac5e4e1c 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -10825,7 +10825,7 @@ instantiate_decl (d, defer_ok) /* Regenerate the declaration in case the template has been modified by a subsequent redeclaration. */ regenerate_decl_from_template (d, td); - + /* We already set the file and line above. Reset them now in case they changed as a result of calling regenerate_decl_from_template. */ lineno = DECL_SOURCE_LINE (d); @@ -10833,6 +10833,10 @@ instantiate_decl (d, defer_ok) if (TREE_CODE (d) == VAR_DECL) { + /* Clear out DECL_RTL; whatever was there before may not be right + since we've reset the type of the declaration. */ + SET_DECL_RTL (d, NULL_RTX); + DECL_IN_AGGR_P (d) = 0; if (DECL_INTERFACE_KNOWN (d)) DECL_EXTERNAL (d) = ! DECL_NOT_REALLY_EXTERN (d); |