From c16833dc2c512e3be8ee7cf84d9fac9853bfcd89 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 10 Apr 2018 15:52:23 +0200 Subject: [PATCH] Fix obvious error in handling of error attribute (PR lto/85248). 2018-04-10 Martin Liska PR lto/85248 * lto-symtab.c (lto_symtab_merge_p): Do not check for TREE_VALUES of error attributes. From-SVN: r259274 --- gcc/lto/ChangeLog | 6 ++++++ gcc/lto/lto-symtab.c | 5 +---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 2c9c7bf..75a1d1c 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,9 @@ +2018-04-10 Martin Liska + + PR lto/85248 + * lto-symtab.c (lto_symtab_merge_p): Do not check for + TREE_VALUES of error attributes. + 2018-04-10 Richard Biener Martin Liska diff --git a/gcc/lto/lto-symtab.c b/gcc/lto/lto-symtab.c index 473c0d0..37c4f45 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.7.4