diff options
author | Mark Mitchell <mark@codesourcery.com> | 2003-04-21 15:20:39 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2003-04-21 15:20:39 +0000 |
commit | 3819b963dc052accf5bcd51f16ac763b168901b0 (patch) | |
tree | 54754347d3d5c02f3a4a9561aabe54cfdef79b21 | |
parent | b33ee5f132f3519da290e14fec0f18487f2f80c6 (diff) | |
download | gcc-3819b963dc052accf5bcd51f16ac763b168901b0.zip gcc-3819b963dc052accf5bcd51f16ac763b168901b0.tar.gz gcc-3819b963dc052accf5bcd51f16ac763b168901b0.tar.bz2 |
winnt.c (i386_pe_mark_dllimport): Make the new RTL have the same form as the old RTL.
* config/i386/winnt.c (i386_pe_mark_dllimport): Make the new RTL
have the same form as the old RTL.
From-SVN: r65885
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/i386/winnt.c | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ef0ad87..fecac21 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-04-21 Mark Mitchell <mark@codesourcery.com> + + * config/i386/winnt.c (i386_pe_mark_dllimport): Make the new RTL + have the same form as the old RTL. + 2003-04-21 Andreas Jaeger <aj@suse.de> * cppcharset.c (_cpp_valid_ucn): Cast field precision to int. diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c index ee3448d..dc2ac7a 100644 --- a/gcc/config/i386/winnt.c +++ b/gcc/config/i386/winnt.c @@ -274,6 +274,7 @@ i386_pe_mark_dllimport (decl) char *newname; tree idp; rtx rtlname; + rtx new_symbol; rtlname = XEXP (DECL_RTL (decl), 0); if (GET_CODE (rtlname) == SYMBOL_REF) @@ -335,8 +336,11 @@ i386_pe_mark_dllimport (decl) identical. */ idp = get_identifier (newname); - XEXP (DECL_RTL (decl), 0) - = gen_rtx_SYMBOL_REF (Pmode, IDENTIFIER_POINTER (idp)); + new_symbol = gen_rtx_SYMBOL_REF (Pmode, IDENTIFIER_POINTER (idp)); + XEXP (DECL_RTL (decl), 0) + = ((GET_CODE (XEXP (DECL_RTL (decl), 0)) == MEM) + ? gen_rtx (MEM, Pmode, new_symbol) + : new_symbol); /* Can't treat a pointer to this as a constant address */ DECL_NON_ADDR_CONST_P (decl) = 1; |