public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-193] [Ada] Fix missing error on actual for In/Out parameter
@ 2022-05-09  9:31 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-05-09  9:31 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:f920ab029d9a742b5be4a52d5b9be19142c814ce

commit r13-193-gf920ab029d9a742b5be4a52d5b9be19142c814ce
Author: Eric Botcazou <ebotcazou@adacore.com>
Date:   Fri Jan 14 22:36:13 2022 +0100

    [Ada] Fix missing error on actual for In/Out parameter
    
    The compiler was failing to give an error on the result of a call to the
    Input attribute passed as actual for an In/Out parameter.
    
    gcc/ada/
    
            * sem_util.adb (Is_OK_Variable_For_Out_Formal): Remove test on
            Comes_From_Source in the condition dealing with the expression
            of an N_Unchecked_Type_Conversion node.

Diff:
---
 gcc/ada/sem_util.adb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 7f56ab496ed..86bd296faa5 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -19533,9 +19533,7 @@ package body Sem_Util is
          if Nkind (Original_Node (AV)) in N_Function_Call | N_Aggregate then
             return False;
 
-         elsif Comes_From_Source (AV)
-           and then Nkind (Original_Node (Expression (AV))) = N_Function_Call
-         then
+         elsif Nkind (Original_Node (Expression (AV))) = N_Function_Call then
             return False;
 
          elsif Nkind (Original_Node (AV)) = N_Type_Conversion then


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-09  9:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-09  9:31 [gcc r13-193] [Ada] Fix missing error on actual for In/Out parameter Pierre-Marie de Rodat

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).