]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/cgraph.h
re PR middle-end/45307 (Stores expanding to no RTL not removed by tree optimizers...
authorJan Hubicka <jh@suse.cz>
Sat, 21 Aug 2010 09:46:15 +0000 (11:46 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 21 Aug 2010 09:46:15 +0000 (09:46 +0000)
commit508e475706c3560a86b08446e1bb764773b93ed9
treedd592015baf43a7ac0105edb4a35dc0cecd6d50f
parentf1395d4a6e0ea98b1fa3b72d40f02fcba9801500
re PR middle-end/45307 (Stores expanding to no RTL not removed by tree optimizers, Empty ctors/dtors not eliminated)

PR c++/45307
PR c++/17736
* cgraph.h (cgraph_only_called_directly_p,
cgraph_can_remove_if_no_direct_calls_and_refs_p): Handle
static cdtors.
* cgraphunit.c (cgraph_decide_is_function_needed): Static cdtors
are not needed.
(cgraph_finalize_function): Static cdtors are reachable.
(cgraph_mark_functions_to_output): Use cgraph_only_called_directly_p.

* gcc.dg/ipa/ctor-empty-1.c: Add testcase.
* g++.dg/tree-ssa/empty-2.C: Check that constructor got optimized out.

From-SVN: r163439
gcc/ChangeLog
gcc/cgraph.c
gcc/cgraph.h
gcc/cgraphunit.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/tree-ssa/empty-2.C
gcc/testsuite/gcc.dg/ipa/ctor-empty-1.c [new file with mode: 0644]