re PR c++/70018 (Possible issue around IPO and C++ comdats discovered as pure/const)
authorJan Hubicka <jh@suse.cz>
Sun, 17 Apr 2016 16:04:05 +0000 (18:04 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sun, 17 Apr 2016 16:04:05 +0000 (16:04 +0000)
commit69a4e898c8f508f0c56c72c791a38bc432e9fa69
treedab34f7a272189308734eab631e4f507410d806b
parentb3de2446458bf8c61a8e54d6bd424bafe7ab479e
re PR c++/70018 (Possible issue around IPO and C++ comdats discovered as pure/const)

PR ipa/70018
* cgraph.h (cgraph_node::set_const_flag,
cgraph_node::set_pure_flag): Update prototype to return bool;
update comment.
* cgraph.c (cgraph_node::call_for_symbol_thunks_and_aliases): Thunks
of interposable symbol are interposable, too.
(cgraph_set_const_flag_1): Rename to ...
(set_const_flag_1): ... this one; change to self recursive function
instead of call_for_symbol_thunks_and_aliases. Handle correctly
clearnig the flag in all variants and also virtual thunks of const
functions are pure; track if any change was done.
(cgraph_node::set_const_flag): Update.
(struct set_pure_flag_info): New struct.
(cgraph_set_pure_flag_1): Rename to ...
(set_pure_flag_1): ... this one; take set_pure_flag_info parameter
rather than pointer encoded flags; track if any changes was done;
handle correctly clearning flag and setting flag of aliases already
declared const.
(cgraph_node::set_pure_flag): Update.
(cgraph_node::set_nothrow_flag): Handle correctly clearning the flag.

From-SVN: r235081
gcc/ChangeLog
gcc/cgraph.c
gcc/cgraph.h