]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix exit condition in ipa_make_function_pure
authorJan Hubicka <hubicka@ucw.cz>
Fri, 12 Nov 2021 15:54:29 +0000 (16:54 +0100)
committerJan Hubicka <hubicka@ucw.cz>
Fri, 12 Nov 2021 15:54:29 +0000 (16:54 +0100)
gcc/ChangeLog:

* ipa-pure-const.c (ipa_make_function_pure): Fix exit condition.

gcc/ipa-pure-const.c

index 550bdeded1609299c1dbc42ba48aeb1600ee37bf..b831844afa6808d8c592be965f9d29d1ce90f086 100644 (file)
@@ -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))