aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-cp.c
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2019-12-18 17:08:09 +0100
committerMartin Jambor <jamborm@gcc.gnu.org>2019-12-18 17:08:09 +0100
commit8bda7ce8ec8b5c61b03082d76b5ce33b14a7288a (patch)
tree691975280b6886f40f90681dec07252e61b34eea /gcc/ipa-cp.c
parent15ef05444f18a9a690e4484f24a523c6aed59896 (diff)
downloadgcc-8bda7ce8ec8b5c61b03082d76b5ce33b14a7288a.zip
gcc-8bda7ce8ec8b5c61b03082d76b5ce33b14a7288a.tar.gz
gcc-8bda7ce8ec8b5c61b03082d76b5ce33b14a7288a.tar.bz2
IPA-CP: Remove bogus static keyword (PR 92971)
2019-12-18 Martin Jambor <mjambor@suse.cz> PR ipa/92971 * ipa-cp.c (cgraph_edge_brings_all_agg_vals_for_node): Fix definition of values, release memory on exit. testsuite/ * gcc.dg/ipa/ipcp-agg-12.c: New test. From-SVN: r279525
Diffstat (limited to 'gcc/ipa-cp.c')
-rw-r--r--gcc/ipa-cp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index 1a80ccb..243b064 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -5117,7 +5117,6 @@ cgraph_edge_brings_all_agg_vals_for_node (struct cgraph_edge *cs,
for (i = 0; i < count; i++)
{
- static vec<ipa_agg_value> values = vNULL;
class ipcp_param_lattices *plats;
bool interesting = false;
for (struct ipa_agg_replacement_value *av = aggval; av; av = av->next)
@@ -5133,7 +5132,7 @@ cgraph_edge_brings_all_agg_vals_for_node (struct cgraph_edge *cs,
if (plats->aggs_bottom)
return false;
- values = intersect_aggregates_with_edge (cs, i, values);
+ vec<ipa_agg_value> values = intersect_aggregates_with_edge (cs, i, vNULL);
if (!values.exists ())
return false;
@@ -5157,6 +5156,7 @@ cgraph_edge_brings_all_agg_vals_for_node (struct cgraph_edge *cs,
return false;
}
}
+ values.release ();
}
return true;
}