Commit 23d87577 by Martin Liska Committed by Martin Liska

Clean up attribute value comparison in lto-symtab.c.

2018-04-11  Martin Liska  <mliska@suse.cz>

	* lto-symtab.c (lto_symtab_merge_p): Use attribute_value_equal
	function.

From-SVN: r259312
parent 5805b089
2018-04-11 Martin Liska <mliska@suse.cz>
* lto-symtab.c (lto_symtab_merge_p): Use attribute_value_equal
function.
2018-04-10 Martin Liska <mliska@suse.cz> 2018-04-10 Martin Liska <mliska@suse.cz>
PR lto/85248 PR lto/85248
......
...@@ -580,9 +580,7 @@ lto_symtab_merge_p (tree prevailing, tree decl) ...@@ -580,9 +580,7 @@ lto_symtab_merge_p (tree prevailing, tree decl)
tree prev_attr = lookup_attribute ("error", DECL_ATTRIBUTES (prevailing)); tree prev_attr = lookup_attribute ("error", DECL_ATTRIBUTES (prevailing));
tree attr = lookup_attribute ("error", DECL_ATTRIBUTES (decl)); tree attr = lookup_attribute ("error", DECL_ATTRIBUTES (decl));
if ((prev_attr == NULL) != (attr == NULL) if ((prev_attr == NULL) != (attr == NULL)
|| (prev_attr || (prev_attr && !attribute_value_equal (prev_attr, attr)))
&& TREE_VALUE (TREE_VALUE (prev_attr))
!= TREE_VALUE (TREE_VALUE (attr))))
{ {
if (symtab->dump_file) if (symtab->dump_file)
fprintf (symtab->dump_file, "Not merging decls; " fprintf (symtab->dump_file, "Not merging decls; "
...@@ -593,9 +591,7 @@ lto_symtab_merge_p (tree prevailing, tree decl) ...@@ -593,9 +591,7 @@ lto_symtab_merge_p (tree prevailing, tree decl)
prev_attr = lookup_attribute ("warning", DECL_ATTRIBUTES (prevailing)); prev_attr = lookup_attribute ("warning", DECL_ATTRIBUTES (prevailing));
attr = lookup_attribute ("warning", DECL_ATTRIBUTES (decl)); attr = lookup_attribute ("warning", DECL_ATTRIBUTES (decl));
if ((prev_attr == NULL) != (attr == NULL) if ((prev_attr == NULL) != (attr == NULL)
|| (prev_attr || (prev_attr && !attribute_value_equal (prev_attr, attr)))
&& TREE_VALUE (TREE_VALUE (prev_attr))
!= TREE_VALUE (TREE_VALUE (attr))))
{ {
if (symtab->dump_file) if (symtab->dump_file)
fprintf (symtab->dump_file, "Not merging decls; " fprintf (symtab->dump_file, "Not merging decls; "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment