re PR tree-optimization/59355 (ICE: SIGSEGV in hash_table::find_slot_with_hash() with -fno-devirtualize)
PR tree-optimization/59355 * ipa-devirt.c (gate_ipa_devirt): Return false if !flag_devirtualize. * opts.c (common_handle_option): Fix comment spelling. * g++.dg/ipa/pr59355.C: New test. From-SVN: r205656
This commit is contained in:
parent
96d75a2c8c
commit
a88bf70553
5 changed files with 31 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
|||
2013-12-04 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/59355
|
||||
* ipa-devirt.c (gate_ipa_devirt): Return false if
|
||||
!flag_devirtualize.
|
||||
* opts.c (common_handle_option): Fix comment spelling.
|
||||
|
||||
2013-12-04 Yufeng Zhang <yufeng.zhang@arm.com>
|
||||
|
||||
* gimple-ssa-strength-reduction.c: Include tree-affine.h.
|
||||
|
|
|
@ -1591,12 +1591,14 @@ ipa_devirt (void)
|
|||
return ndevirtualized ? TODO_remove_functions : 0;
|
||||
}
|
||||
|
||||
/* Gate for IPCP optimization. */
|
||||
/* Gate for speculative IPA devirtualization optimization. */
|
||||
|
||||
static bool
|
||||
gate_ipa_devirt (void)
|
||||
{
|
||||
return flag_devirtualize_speculatively && optimize;
|
||||
return (flag_devirtualize
|
||||
&& flag_devirtualize_speculatively
|
||||
&& optimize);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
|
|
@ -1709,7 +1709,7 @@ common_handle_option (struct gcc_options *opts,
|
|||
if (!opts_set->x_flag_tree_loop_distribute_patterns)
|
||||
opts->x_flag_tree_loop_distribute_patterns = value;
|
||||
/* Indirect call profiling should do all useful transformations
|
||||
speculative devirutalization does. */
|
||||
speculative devirtualization does. */
|
||||
if (!opts_set->x_flag_devirtualize_speculatively
|
||||
&& opts->x_flag_value_profile_transformations)
|
||||
opts->x_flag_devirtualize_speculatively = false;
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2013-12-04 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/59355
|
||||
* g++.dg/ipa/pr59355.C: New test.
|
||||
|
||||
2013-12-04 Yufeng Zhang <yufeng.zhang@arm.com>
|
||||
|
||||
* gcc.dg/tree-ssa/slsr-39.c: Update.
|
||||
|
|
14
gcc/testsuite/g++.dg/ipa/pr59355.C
Normal file
14
gcc/testsuite/g++.dg/ipa/pr59355.C
Normal file
|
@ -0,0 +1,14 @@
|
|||
// PR tree-optimization/59355
|
||||
// { dg-do compile }
|
||||
// { dg-options "-O2 -fno-devirtualize" }
|
||||
|
||||
struct S
|
||||
{
|
||||
virtual void bar ();
|
||||
};
|
||||
|
||||
void
|
||||
foo (S *s)
|
||||
{
|
||||
s->bar ();
|
||||
}
|
Loading…
Add table
Reference in a new issue