Hi. I'm sending obvious follow-up patch that I've just tested on x86_64-linux-gnu.
Martin
>From 5ceff747f5a55fb28ae1e4ef87fc7e39344ae11f Mon Sep 17 00:00:00 2001 From: marxin <mli...@suse.cz> Date: Tue, 10 Apr 2018 14:36:40 +0200 Subject: [PATCH] Fix obvious error in handling of error attribute (PR lto/85248). gcc/lto/ChangeLog: 2018-04-10 Martin Liska <mli...@suse.cz> PR lto/85248 * lto-symtab.c (lto_symtab_merge_p): Do not check for TREE_VALUES of error attributes. --- gcc/lto/lto-symtab.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gcc/lto/lto-symtab.c b/gcc/lto/lto-symtab.c index 473c0d0b5af..37c4f45eb0b 100644 --- a/gcc/lto/lto-symtab.c +++ b/gcc/lto/lto-symtab.c @@ -605,10 +605,7 @@ lto_symtab_merge_p (tree prevailing, tree decl) prev_attr = lookup_attribute ("noreturn", DECL_ATTRIBUTES (prevailing)); attr = lookup_attribute ("noreturn", DECL_ATTRIBUTES (decl)); - if ((prev_attr == NULL) != (attr == NULL) - || (prev_attr - && TREE_VALUE (TREE_VALUE (prev_attr)) - != TREE_VALUE (TREE_VALUE (attr)))) + if ((prev_attr == NULL) != (attr == NULL)) { if (symtab->dump_file) fprintf (symtab->dump_file, "Not merging decls; " -- 2.16.3