tree-optimization/99165 - fix ICE in store-merging w/ non-call EH
This adds a missing accumulation to ret. 2021-02-22 Richard Biener <rguenther@suse.de> PR tree-optimization/99165 * gimple-ssa-store-merging.c (pass_store_merging::process_store): Accumulate changed to ret. * g++.dg/pr99165.C: New testcase.
This commit is contained in:
parent
60b99ee3bc
commit
8a8eee6bdb
@ -5230,7 +5230,7 @@ pass_store_merging::process_store (gimple *stmt)
|
|||||||
if (idx >= (unsigned)param_max_store_chains_to_track
|
if (idx >= (unsigned)param_max_store_chains_to_track
|
||||||
|| (n_stores + (*e)->m_store_info.length ()
|
|| (n_stores + (*e)->m_store_info.length ()
|
||||||
> (unsigned)param_max_stores_to_track))
|
> (unsigned)param_max_stores_to_track))
|
||||||
terminate_and_process_chain (*e);
|
ret |= terminate_and_process_chain (*e);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
n_stores += (*e)->m_store_info.length ();
|
n_stores += (*e)->m_store_info.length ();
|
||||||
|
7
gcc/testsuite/g++.dg/pr99165.C
Normal file
7
gcc/testsuite/g++.dg/pr99165.C
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
// { dg-do compile }
|
||||||
|
// { dg-options "-O2 -fnon-call-exceptions --param=max-stores-to-track=2" }
|
||||||
|
|
||||||
|
struct A {
|
||||||
|
A() : i() {}
|
||||||
|
int i;
|
||||||
|
} *ap2 = new A[3];
|
Loading…
Reference in New Issue
Block a user