]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386.h (ENCODE_SECTION_INFO): Don't do anything if DECL is not a memory ref.
authorAndrew Haley <aph@cygnus.com>
Fri, 29 Oct 1999 17:34:54 +0000 (17:34 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Fri, 29 Oct 1999 17:34:54 +0000 (17:34 +0000)
Fri Oct 29 18:16:03 1999  Andrew Haley  <aph@cygnus.com>

       * config/i386/i386.h (ENCODE_SECTION_INFO): Don't do anything if
       DECL is not a memory ref.

From-SVN: r30261

gcc/ChangeLog
gcc/config/i386/i386.h

index dc3552f25a8738c54dfce843ca337fe25d5b1741..bb5e334a33bbc819a050769f7e1a5ff425aea0e7 100644 (file)
@@ -1,3 +1,8 @@
+Fri Oct 29 18:16:03 1999  Andrew Haley  <aph@cygnus.com>
+
+       * config/i386/i386.h (ENCODE_SECTION_INFO): Don't do anything if
+       DECL is not a memory ref.
 Fri Oct 29 09:05:34 1999  Catherine Moore  <clm@cygnus.com>
 
        * config/i386/i386.h (ix86_cpu): Remove extern attribute.
index b9a1e16fd1ea1cac1418f8b8dfec82891e0c80d4..88bed4b8dc8355d84ce775d309bbf026e3b8efea 100644 (file)
@@ -1578,27 +1578,30 @@ do {                                                            \
    On i386, if using PIC, mark a SYMBOL_REF for a non-global symbol
    so that we may access it directly in the GOT.  */
 
-#define ENCODE_SECTION_INFO(DECL) \
-do                                                                     \
-  {                                                                    \
-    if (flag_pic)                                                      \
-      {                                                                        \
-       rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd'            \
-                  ? TREE_CST_RTL (DECL) : DECL_RTL (DECL));            \
-                                                                       \
-       if (TARGET_DEBUG_ADDR                                           \
-           && TREE_CODE_CLASS (TREE_CODE (DECL)) == 'd')               \
-         {                                                             \
-           fprintf (stderr, "Encode %s, public = %d\n",                \
-                    IDENTIFIER_POINTER (DECL_NAME (DECL)),             \
-                    TREE_PUBLIC (DECL));                               \
-         }                                                             \
-                                                                       \
-       SYMBOL_REF_FLAG (XEXP (rtl, 0))                                 \
-         = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd'                  \
-            || ! TREE_PUBLIC (DECL));                                  \
-      }                                                                        \
-  }                                                                    \
+#define ENCODE_SECTION_INFO(DECL)                              \
+do                                                             \
+  {                                                            \
+    if (flag_pic)                                              \
+      {                                                                \
+       rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd'    \
+                  ? TREE_CST_RTL (DECL) : DECL_RTL (DECL));    \
+                                                               \
+       if (GET_CODE (rtl) == MEM)                              \
+         {                                                     \
+           if (TARGET_DEBUG_ADDR                               \
+               && TREE_CODE_CLASS (TREE_CODE (DECL)) == 'd')   \
+             {                                                 \
+               fprintf (stderr, "Encode %s, public = %d\n",    \
+                        IDENTIFIER_POINTER (DECL_NAME (DECL)), \
+                        TREE_PUBLIC (DECL));                   \
+             }                                                 \
+                                                               \
+           SYMBOL_REF_FLAG (XEXP (rtl, 0))                     \
+             = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd'      \
+                || ! TREE_PUBLIC (DECL));                      \
+         }                                                     \
+      }                                                                \
+  }                                                            \
 while (0)
 
 /* The `FINALIZE_PIC' macro serves as a hook to emit these special