From c651e1e08571fdf59da9289e9fd97c0be84ec6b4 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Wed, 1 Apr 1998 13:45:40 +0000 Subject: [PATCH] varasm.c (make_decl_rtl): Update the DECL_ASSEMBLER_NAME for a entity in a local scope. * 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 | 8 ++++++++ gcc/fold-const.c | 2 ++ gcc/varasm.c | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4ed42ee4ba66..2ab4fa966e64 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +1998-04-01 Mark Mitchell + + * 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. diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 4fcd7448303f..537e2b201f44 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -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: diff --git a/gcc/varasm.c b/gcc/varasm.c index 42dca296f9ca..634753ea6f25 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -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) -- 2.43.5