public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-4914] Workaround ICE in gimple_call_static_chain_flags
@ 2021-11-04 16:11 Jan Hubicka
0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2021-11-04 16:11 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:d3f7a2fa64f8777cb7eae1b99ff80fbe717095ac
commit r12-4914-gd3f7a2fa64f8777cb7eae1b99ff80fbe717095ac
Author: Jan Hubicka <jh@suse.cz>
Date: Thu Nov 4 17:07:44 2021 +0100
Workaround ICE in gimple_call_static_chain_flags
gcc/ChangeLog:
2021-11-04 Jan Hubicka <hubicka@ucw.cz>
PR ipa/103058
* gimple.c (gimple_call_static_chain_flags): Handle case when
nested function does not bind locally.
Diff:
---
gcc/gimple.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/gcc/gimple.c b/gcc/gimple.c
index 76768c19c8e..7a578f5113e 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -1666,7 +1666,18 @@ gimple_call_static_chain_flags (const gcall *stmt)
int modref_flags = summary->static_chain_flags;
/* We have possibly optimized out load. Be conservative here. */
- gcc_checking_assert (node->binds_to_current_def_p ());
+ if (!node->binds_to_current_def_p ())
+ {
+ if ((modref_flags & EAF_UNUSED) && !(flags & EAF_UNUSED))
+ {
+ modref_flags &= ~EAF_UNUSED;
+ modref_flags |= EAF_NOESCAPE;
+ }
+ if ((modref_flags & EAF_NOREAD) && !(flags & EAF_NOREAD))
+ modref_flags &= ~EAF_NOREAD;
+ if ((modref_flags & EAF_DIRECT) && !(flags & EAF_DIRECT))
+ modref_flags &= ~EAF_DIRECT;
+ }
if (dbg_cnt (ipa_mod_ref_pta))
flags |= modref_flags;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-04 16:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-04 16:11 [gcc r12-4914] Workaround ICE in gimple_call_static_chain_flags 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).