From: Martin Liska Date: Wed, 11 Apr 2018 10:33:46 +0000 (+0200) Subject: Clean up attribute value comparison in lto-symtab.c. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=23d87577a3a02b11858c7de68313ebcc45445a13;p=gcc.git Clean up attribute value comparison in lto-symtab.c. 2018-04-11 Martin Liska * lto-symtab.c (lto_symtab_merge_p): Use attribute_value_equal function. From-SVN: r259312 --- diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 75a1d1ca807..d2b2511710c 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,8 @@ +2018-04-11 Martin Liska + + * lto-symtab.c (lto_symtab_merge_p): Use attribute_value_equal + function. + 2018-04-10 Martin Liska PR lto/85248 diff --git a/gcc/lto/lto-symtab.c b/gcc/lto/lto-symtab.c index 37c4f45eb0b..2660542300e 100644 --- a/gcc/lto/lto-symtab.c +++ b/gcc/lto/lto-symtab.c @@ -580,9 +580,7 @@ lto_symtab_merge_p (tree prevailing, tree decl) tree prev_attr = lookup_attribute ("error", DECL_ATTRIBUTES (prevailing)); tree attr = lookup_attribute ("error", DECL_ATTRIBUTES (decl)); if ((prev_attr == NULL) != (attr == NULL) - || (prev_attr - && TREE_VALUE (TREE_VALUE (prev_attr)) - != TREE_VALUE (TREE_VALUE (attr)))) + || (prev_attr && !attribute_value_equal (prev_attr, attr))) { if (symtab->dump_file) fprintf (symtab->dump_file, "Not merging decls; " @@ -593,9 +591,7 @@ lto_symtab_merge_p (tree prevailing, tree decl) prev_attr = lookup_attribute ("warning", DECL_ATTRIBUTES (prevailing)); attr = lookup_attribute ("warning", DECL_ATTRIBUTES (decl)); if ((prev_attr == NULL) != (attr == NULL) - || (prev_attr - && TREE_VALUE (TREE_VALUE (prev_attr)) - != TREE_VALUE (TREE_VALUE (attr)))) + || (prev_attr && !attribute_value_equal (prev_attr, attr))) { if (symtab->dump_file) fprintf (symtab->dump_file, "Not merging decls; "