public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Marc Poulhi?s <dkm@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-1986] ada: Fix crash on inlining in GNATprove Date: Tue, 20 Jun 2023 11:26:18 +0000 (GMT) [thread overview] Message-ID: <20230620112618.E55BF385841D@sourceware.org> (raw) https://gcc.gnu.org/g:c11ef75cb2cd60b0c4408aa8ed1898b69b8c946a commit r14-1986-gc11ef75cb2cd60b0c4408aa8ed1898b69b8c946a Author: Yannick Moy <moy@adacore.com> Date: Thu Jun 8 16:52:24 2023 +0200 ada: Fix crash on inlining in GNATprove After the recent change on detection of non-inlining, calls inside the iterator part of a quantified expression were not considered as preventing inlining anymore, leading to a crash later on inside GNATprove. Now fixed. gcc/ada/ * sem_res.adb (Resolve_Call): Fix change that replaced test for quantified expressions by the test for potentially unevaluated contexts. Both should be performed. Diff: --- gcc/ada/sem_res.adb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index f4dfc041cd6..2c8efec524b 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -7300,6 +7300,15 @@ package body Sem_Res is ("cannot inline & (in potentially unevaluated context)?", N, Nam_UA); + -- Calls are not inlined inside the loop_parameter_specification + -- or iterator_specification of the quantified expression, as they + -- are only preanalyzed. Calls in the predicate part are handled + -- by the previous test on potentially unevaluated expressions. + + elsif In_Quantified_Expression (N) then + Cannot_Inline + ("cannot inline & (in quantified expression)?", N, Nam_UA); + -- Inlining should not be performed during preanalysis elsif Full_Analysis then
reply other threads:[~2023-06-20 11:26 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230620112618.E55BF385841D@sourceware.org \ --to=dkm@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).