https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61190
--- Comment #5 from Bernd Edlinger <edlinger at gcc dot gnu.org> --- Author: edlinger Date: Wed Nov 26 18:10:29 2014 New Revision: 218091 URL: https://gcc.gnu.org/viewcvs?rev=218091&root=gcc&view=rev Log: 2014-11-26 Bernd Edlinger <bernd.edlin...@hotmail.de> PR ipa/61190 * cgraph.h (symtab_node::call_for_symbol_and_aliases): Fix comment. (cgraph_node::function_or_virtual_thunk_symbol): New function. (cgraph_node::call_for_symbol_and_aliases): Fix comment. (cgraph_node::call_for_symbol_thunks_and_aliases): Adjust comment. Add new optional parameter exclude_virtual_thunks. * cgraph.c (cgraph_node::call_for_symbol_thunks_and_aliases): Add new optional parameter exclude_virtual_thunks. (cgraph_node::set_const_flag): Don't propagate to virtual thunks. (cgraph_node::set_pure_flag): Likewise. (cgraph_node::function_symbol): Simplified. (cgraph_node::function_or_virtual_thunk_symbol): New function. * ipa-pure-const.c (analyze_function): For virtual thunks set pure_const_state to IPA_NEITHER. (propagate_pure_const): Use function_or_virtual_thunk_symbol. testsuite/ChangeLog: 2014-11-26 Bernd Edlinger <bernd.edlin...@hotmail.de> PR ipa/61190 * g++.old-deja/g++.mike/p4736b.C: Use -O2. Modified: trunk/gcc/ChangeLog trunk/gcc/cgraph.c trunk/gcc/cgraph.h trunk/gcc/ipa-pure-const.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/g++.old-deja/g++.mike/p4736b.C