This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Turn DECL_SECTION_NAME into string


Hi!

On Thu, 12 Jun 2014 06:33:25 +0200, Jan Hubicka <hubicka@ucw.cz> wrote:
> this lenghtly patch makes the legwork to put section names out of tree representation.
> Originally they were STRING_CST. I ended up implementing on-side reference counted
> string voclabulary that is done in bit baroque way to be GGC and PCH safe (uff).

As reported in <https://gcc.gnu.org/PR61508>, this causes a build failure
with --enable-checking=fold:

    /home/dimhen/src/gcc_current/gcc/fold-const.c: In function 'void fold_checksum_tree(const_tree, md5_ctx*, hash_table<pointer_hash<tree_node>)':
    /home/dimhen/src/gcc_current/gcc/fold-const.c:14863:55: error: cannot convert 'const char*' to 'const_tree {aka const tree_node*}' for argument '1' to 'void fold_checksum_tree(const_tree, md5_ctx*, hash_table<pointer_hash<tree_node> >)'
      fold_checksum_tree (DECL_SECTION_NAME (expr), ctx, ht);

From light testing the following seems to get around this -- is it the
appropriate fix?

diff --git gcc/fold-const.c gcc/fold-const.c
index 24daaa3..978b854 100644
--- gcc/fold-const.c
+++ gcc/fold-const.c
@@ -14859,8 +14859,6 @@ fold_checksum_tree (const_tree expr, struct md5_ctx *ctx,
 	  fold_checksum_tree (DECL_ABSTRACT_ORIGIN (expr), ctx, ht);
 	  fold_checksum_tree (DECL_ATTRIBUTES (expr), ctx, ht);
 	}
-      if (CODE_CONTAINS_STRUCT (TREE_CODE (expr), TS_DECL_WITH_VIS))
-	fold_checksum_tree (DECL_SECTION_NAME (expr), ctx, ht);
 
       if (CODE_CONTAINS_STRUCT (TREE_CODE (expr), TS_DECL_NON_COMMON))
 	{


GrÃÃe,
 Thomas

Attachment: pgpRptaXVvupr.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]