summaryrefslogtreecommitdiff
path: root/gcc/ipa-cp.c
diff options
context:
space:
mode:
authorjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-23 16:35:52 +0000
committerjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-23 16:35:52 +0000
commit39882af6212143fe31be29ca1ea3513f9e629c1c (patch)
tree88e655d4e903cda4241d197623f3122679e67aa8 /gcc/ipa-cp.c
parenta0caa4a730da81d7688a0f1ed983e7043981126c (diff)
downloadgcc-39882af6212143fe31be29ca1ea3513f9e629c1c.tar.gz
2010-07-23 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/44915 * ipa-cp.c (cgraph_gate_cp): Also check that optimize is true. * ipa-inline.c (cgraph_mark_inline_edge): Likewise. (analyze_function): Likewise. * testsuite/g++.dg/torture/pr44915.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162469 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-cp.c')
-rw-r--r--gcc/ipa-cp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index be1956962a8..6918273cba6 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -1278,7 +1278,9 @@ ipcp_read_summary (void)
static bool
cgraph_gate_cp (void)
{
- return flag_ipa_cp;
+ /* FIXME: We should remove the optimize check after we ensure we never run
+ IPA passes when not optimizng. */
+ return flag_ipa_cp && optimize;
}
struct ipa_opt_pass_d pass_ipa_cp =