varasm.c (make_decl_rtl): Update the DECL_ASSEMBLER_NAME for a entity in a local...
authorMark Mitchell <mmitchell@usa.net>
Wed, 1 Apr 1998 13:45:40 +0000 (13:45 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Wed, 1 Apr 1998 13:45:40 +0000 (13:45 +0000)
* varasm.c (make_decl_rtl): Update the DECL_ASSEMBLER_NAME for a
entity in a local scope.
* fold-const.c (fold): Call truthvalue_conversion for values which
are folded to boolean type.

From-SVN: r18929

gcc/ChangeLog
gcc/fold-const.c
gcc/varasm.c

index 4ed42ee4ba6654358b17e46503b47c86a6f3d634..2ab4fa966e6412b4b2dc8f24d114a3c9b8ad2976 100644 (file)
@@ -1,3 +1,11 @@
+1998-04-01  Mark Mitchell  <mmitchell@usa.net>
+
+       * varasm.c (make_decl_rtl): Update the DECL_ASSEMBLER_NAME for a
+       entity in a local scope.
+
+       * fold-const.c (fold): Call truthvalue_conversion for values which
+       are folded to boolean type.
+
 Wed Apr  1 06:09:53 1998  Jeffrey A Law  (law@cygnus.com)
 
        * 1750a.md, arm.c, clipper.c, clipper.md: Use GEN_INT consistently.
index 4fcd7448303f258d93e79376510af56b1ae9ac41..537e2b201f44a5a6414f21dcbba9f5b32f5e3e2e 100644 (file)
@@ -5636,6 +5636,8 @@ fold (expr)
        TREE_INT_CST_LOW (t1) ^= 1;
 
       TREE_TYPE (t1) = type;
+      if (TREE_CODE (type) == BOOLEAN_TYPE)
+       return truthvalue_conversion (t1);
       return t1;
 
     case COND_EXPR:
index 42dca296f9ca12b150a847a6484fecb23f96ca86..634753ea6f257d5a856ee0f56875a4f02c316356 100644 (file)
@@ -734,6 +734,12 @@ make_decl_rtl (decl, asmspec, top_level)
              ASM_FORMAT_PRIVATE_NAME (label, name, var_labelno);
              name = obstack_copy0 (saveable_obstack, label, strlen (label));
              var_labelno++;
+
+             /* We've changed the name by which this entity is
+                known.  In order that we can generate 
+                correct references to it, we update its
+                DECL_ASSEMBLER_NAME.  */
+             DECL_ASSEMBLER_NAME (decl) = get_identifier (name);
            }
 
          if (name == 0)