varasm.c (output_constant_def): Correct test for not calling ENCODE_SECTION_INFO...
authorHans-Peter Nilsson <hp@bitrange.com>
Mon, 29 Apr 2002 03:57:30 +0000 (03:57 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Mon, 29 Apr 2002 03:57:30 +0000 (03:57 +0000)
* varasm.c (output_constant_def): Correct test for not calling
ENCODE_SECTION_INFO for INTEGER_CST.

From-SVN: r52870

gcc/ChangeLog
gcc/varasm.c

index f4fcc8d..980edbe 100644 (file)
@@ -1,3 +1,8 @@
+2002-04-29  Hans-Peter Nilsson  <hp@bitrange.com>
+
+       * varasm.c (output_constant_def): Correct test for not calling
+       ENCODE_SECTION_INFO for INTEGER_CST.
+
 2002-04-29  Neil Booth  <neil@daikokuya.demon.co.uk>
 
        * cppexp.c (lex): Move some code to _cpp_parse_expr, but
index 4dbd09c..8b22e16 100644 (file)
@@ -3284,7 +3284,9 @@ output_constant_def (exp, defer)
      encoded in it.  */
   if (! found)
     {
-      if (TREE_CODE (exp) == INTEGER_CST)
+      /* Take care not to invoke ENCODE_SECTION_INFO for constants
+        which don't have a TREE_CST_RTL.  */
+      if (TREE_CODE (exp) != INTEGER_CST)
        ENCODE_SECTION_INFO (exp, true);
 
       desc->rtl = rtl;