* Fix modref_tree::remap_params
@ 2021-11-10 9:28 Jan Hubicka
0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2021-11-10 9:28 UTC (permalink / raw)
To: gcc-patches
Hi,
this patch fixes wrong compare in remap_params which triggers a wrong
code with my followup patch. This needs backporting to gcc11 as well
which I plan to do tomorrow.
Bootstrapped/regtested x86_64-linux, comitted.
gcc/ChangeLog:
* ipa-modref-tree.h (modref_tree::remap_params): Fix off-by-one error.
diff --git a/gcc/ipa-modref-tree.h b/gcc/ipa-modref-tree.h
index be5efcbb68f..3e213b23d79 100644
--- a/gcc/ipa-modref-tree.h
+++ b/gcc/ipa-modref-tree.h
@@ -1139,7 +1139,7 @@ struct GTY((user)) modref_tree
size_t k;
modref_access_node *access_node;
FOR_EACH_VEC_SAFE_ELT (ref_node->accesses, k, access_node)
- if (access_node->parm_index > 0)
+ if (access_node->parm_index >= 0)
{
if (access_node->parm_index < (int)map->length ())
access_node->parm_index = (*map)[access_node->parm_index];
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-10 9:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-10 9:28 Fix modref_tree::remap_params Jan Hubicka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).