re PR c++/70018 (Possible issue around IPO and C++ comdats discovered as pure/const)
authorJan Hubicka <jh@suse.cz>
Thu, 21 Apr 2016 09:05:07 +0000 (11:05 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 21 Apr 2016 09:05:07 +0000 (09:05 +0000)
commita2b056a364e622aac29160bb21fe637d5f6c9519
treedd1fa989c4b9cbacc321b6ccd5f44964b611f58f
parent9b7924dd177330167865a83f5696a9ae34554972
re PR c++/70018 (Possible issue around IPO and C++ comdats discovered as pure/const)

PR ipa/70018
* cgraph.c (cgraph_set_nothrow_flag_1): Rename to ...
(set_nothrow_flag_1): ... this; handle interposition correctly;
recurse on aliases and thunks.
(cgraph_node::set_nothrow_flag): New.
* ipa-pure-const.c (ignore_edge_for_nothrow): Ignore calls to
functions compiled with non-call exceptions that binds to current
def.
(propagate_nothrow): Be safe WRT interposition.
* cgraph.h (set_nothrow_flag): Update prototype.

* g++.dg/ipa/nothrow-1.C: New testcase.

From-SVN: r235318
gcc/ChangeLog
gcc/cgraph.c
gcc/cgraph.h
gcc/ipa-pure-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ipa/nothrow-1.C [new file with mode: 0644]