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 r13-3726] ada: Cleanup comment about mapping parameters when inlining
Date: Mon,  7 Nov 2022 08:38:42 +0000 (GMT)	[thread overview]
Message-ID: <20221107083842.060A9385840A@sourceware.org> (raw)

https://gcc.gnu.org/g:76b35e7227f34e2ce18e50ca637c86d7a1c3ef49

commit r13-3726-g76b35e7227f34e2ce18e50ca637c86d7a1c3ef49
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Fri Aug 12 11:51:30 2022 +0200

    ada: Cleanup comment about mapping parameters when inlining
    
    Improve location of the comment about a special case for GNATprove mode.
    
    gcc/ada/
    
            * inline.adb (Establish_Actual_Mapping_For_Inlined_Call): Move
            comment next to a condition that it describes.

Diff:
---
 gcc/ada/inline.adb | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb
index e3f35daca09..a1ead98e67a 100644
--- a/gcc/ada/inline.adb
+++ b/gcc/ada/inline.adb
@@ -3013,14 +3013,10 @@ package body Inline is
             Temp_Typ := Etype (A);
          end if;
 
-         --  If the actual is a simple name or a literal, no need to
-         --  create a temporary, object can be used directly.
-
-         --  If the actual is a literal and the formal has its address taken,
-         --  we cannot pass the literal itself as an argument, so its value
-         --  must be captured in a temporary. Skip this optimization in
-         --  GNATprove mode, to make sure any check on a type conversion
-         --  will be issued.
+         --  If the actual is a simple name or a literal, no need to create a
+         --  temporary, object can be used directly. Skip this optimization in
+         --  GNATprove mode, to make sure any check on a type conversion will
+         --  be issued.
 
          if (Is_Entity_Name (A)
               and then
@@ -3039,6 +3035,10 @@ package body Inline is
                and then Formal_Is_Used_Once (F)
                and then not GNATprove_Mode)
 
+         --  If the actual is a literal and the formal has its address taken,
+         --  we cannot pass the literal itself as an argument, so its value
+         --  must be captured in a temporary.
+
            or else
              (Nkind (A) in
                 N_Real_Literal | N_Integer_Literal | N_Character_Literal

                 reply	other threads:[~2022-11-07  8:38 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=20221107083842.060A9385840A@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: link
Be 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).