From 82de09ab17cd3876134d46ad7a6d2c32235bf8f5 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Fri, 12 Nov 2021 16:54:29 +0100 Subject: [PATCH] Fix exit condition in ipa_make_function_pure gcc/ChangeLog: * ipa-pure-const.c (ipa_make_function_pure): Fix exit condition. --- gcc/ipa-pure-const.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index 550bdeded160..b831844afa68 100644 --- a/gcc/ipa-pure-const.c +++ b/gcc/ipa-pure-const.c @@ -1502,7 +1502,7 @@ ipa_make_function_pure (struct cgraph_node *node, bool looping, bool local) bool cdtor = false; if (DECL_PURE_P (node->decl) - && (looping || DECL_LOOPING_CONST_OR_PURE_P (node->decl))) + && (looping || !DECL_LOOPING_CONST_OR_PURE_P (node->decl))) return false; warn_function_pure (node->decl, !looping); if (local && skip_function_for_local_pure_const (node)) -- 2.47.2