From: Martin Liska Date: Wed, 26 Aug 2020 11:18:14 +0000 (+0200) Subject: symver: fix attribute matching. X-Git-Tag: basepoints/gcc-12~5377 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2236c45479e4c01a6ac68547bcdfe3065481df0f;p=thirdparty%2Fgcc.git symver: fix attribute matching. gcc/ChangeLog: * cgraphunit.c (process_symver_attribute): Match only symver TREE_PURPOSE. --- diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index fa3aec79a48e..26d3995a0c0b 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -727,6 +727,9 @@ process_symver_attribute (symtab_node *n) .symver foo, bar@V1 .symver foo, baz@V2 */ + const char *purpose = IDENTIFIER_POINTER (TREE_PURPOSE (value)); + if (strcmp (purpose, "symver") != 0) + continue; tree symver = get_identifier_with_length (TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (value))),