ipa/92606 - properly handle no_icf attribute for variables
commiteee13a3730bd1d7aa7b40687b1ee49c17d95159f
authorRichard Biener <rguenther@suse.de>
Mon, 11 Dec 2023 09:08:24 +0000 (11 10:08 +0100)
committerRichard Biener <rguenther@suse.de>
Tue, 12 Dec 2023 14:25:24 +0000 (12 15:25 +0100)
tree54ccfb8771a04e75c16c269a9415d7e3990cc1c2
parent878cb5acf0c499702ffd315e273f55e8bd0970b8
ipa/92606 - properly handle no_icf attribute for variables

The following adds no_icf handling for variables where the attribute
was rejected.  It also fixes the check for no_icf by checking both
the source and the targets decl.

PR ipa/92606
gcc/c-family/
* c-attribs.cc (handle_noicf_attribute): Also allow the
attribute on global variables.

gcc/
* ipa-icf.cc (sem_item_optimizer::merge_classes): Check
both source and alias for the no_icf attribute.
* doc/extend.texi (no_icf): Document variable attribute.
gcc/c-family/c-attribs.cc
gcc/doc/extend.texi
gcc/ipa-icf.cc