From: Jan Hubicka Date: Fri, 12 Nov 2021 15:54:29 +0000 (+0100) Subject: Fix exit condition in ipa_make_function_pure X-Git-Tag: basepoints/gcc-13~3111 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=82de09ab17cd3876134d46ad7a6d2c32235bf8f5;p=thirdparty%2Fgcc.git Fix exit condition in ipa_make_function_pure gcc/ChangeLog: * ipa-pure-const.c (ipa_make_function_pure): Fix exit condition. --- 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))