winnt.c (i386_pe_mark_dllimport): Revert previous changes.
authorMark Mitchell <mark@codesourcery.com>
Mon, 21 Apr 2003 23:23:39 +0000 (23:23 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Mon, 21 Apr 2003 23:23:39 +0000 (23:23 +0000)
* config/i386/winnt.c (i386_pe_mark_dllimport): Revert previous
changes.

From-SVN: r65920

gcc/ChangeLog
gcc/config/i386/winnt.c

index e206768d61f1245ee1c0ade00b37b1eae949c839..faad4e5b0bc2dd4c64779caa168c7fb97e036669 100644 (file)
@@ -1,3 +1,8 @@
+2003-04-21  Mark Mitchell  <mark@codesourcery.com>
+
+       * config/i386/winnt.c (i386_pe_mark_dllimport): Revert previous
+       changes.
+
 2003-04-21  Aldy Hernandez  <aldyh@redhat.com>
 
         * config/rs6000/rs6000.c (rs6000_override_options): No SPE means
index dc2ac7a80a66c8d8e4ffe88745550d87af6cda26..c2eac3ac7e2dfbac53e376afc2ba8d27df48820a 100644 (file)
@@ -273,8 +273,7 @@ i386_pe_mark_dllimport (decl)
   const char *oldname;
   char  *newname;
   tree idp;
-  rtx rtlname;
-  rtx new_symbol;
+  rtx rtlname, newrtl;
 
   rtlname = XEXP (DECL_RTL (decl), 0);
   if (GET_CODE (rtlname) == SYMBOL_REF)
@@ -336,11 +335,10 @@ i386_pe_mark_dllimport (decl)
      identical.  */
   idp = get_identifier (newname);
 
-  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);
+  newrtl = gen_rtx (MEM, Pmode,
+                   gen_rtx (SYMBOL_REF, Pmode,
+                            IDENTIFIER_POINTER (idp)));
+  XEXP (DECL_RTL (decl), 0) = newrtl;
 
   /* Can't treat a pointer to this as a constant address */
   DECL_NON_ADDR_CONST_P (decl) = 1;