re PR ipa/83506 (ICE: Segmentation fault in force_nonfallthru_and_redirect)
authorJakub Jelinek <jakub@gcc.gnu.org>
Wed, 20 Dec 2017 19:41:38 +0000 (20:41 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 20 Dec 2017 19:41:38 +0000 (20:41 +0100)
commit442db27632e461ace26b61e968dfd8e7ab085e38
tree1ea9330f0c107d992164ebdf556f86e90bdcccd7
parent76a2bcdcd82326736301cba35250bb1a7fa841c1
re PR ipa/83506 (ICE: Segmentation fault in force_nonfallthru_and_redirect)

PR ipa/83506
* ipa-fnsummary.c (pass_data_ipa_free_fn_summary): Use 0 for
todo_flags_finish.
(pass_ipa_free_fn_summary): Add small_p private data member,
initialize to false in the ctor.
(pass_ipa_free_fn_summary::clone,
pass_ipa_free_fn_summary::set_pass_param,
pass_ipa_free_fn_summary::gate): New methods.
(pass_ipa_free_fn_summary::execute): Return TODO_remove_functions
| TODO_dump_symtab if small_p.
* passes.def: Add true parm for the existing pass_ipa_free_fn_summary
entry and add another instance of the pass with false parm after
ipa-pure-const.
* ipa-pure-const.c (pass_ipa_pure_const): Don't call
ipa_free_fn_summary here.

* gcc.dg/pr83506.c: New test.
* gcc.dg/ipa/ctor-empty-1.c: Use -fdump-ipa-free-fnsummary1 instead
of -fdump-ipa-free-fnsummary and scan in free-fnsummary1 instead of
free-fnsummary dump.

From-SVN: r255901
gcc/ChangeLog
gcc/ipa-fnsummary.c
gcc/ipa-pure-const.c
gcc/passes.def
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/ipa/ctor-empty-1.c
gcc/testsuite/gcc.dg/pr83506.c [new file with mode: 0644]