]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Minor potential bug in sem_ch6.adb
authorSteve Baird <baird@adacore.com>
Fri, 30 Sep 2022 18:14:20 +0000 (11:14 -0700)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 6 Oct 2022 09:22:49 +0000 (11:22 +0200)
In sem_ch6.adb, the procedure Analyze_Procedure_Call is preceded with a
comment:
   --  WARNING: This routine manages Ghost regions. Return statements must be
   --  replaced by gotos that jump to the end of the routine and restore the
   --  Ghost mode.

Correct a violation of this comment. This is a one-line change.

gcc/ada/

* sem_ch6.adb
(Analyze_Procedure_Call): Replace "return;" with "goto Leave;", as
per comment preceding body of Analyze_Procedure_Call.

gcc/ada/sem_ch6.adb

index 7db0cb7c08f7293f35e9788e54729ec0396c6818..7ad6408af81b3b8507216a235acf2192513b036e 100644 (file)
@@ -2398,7 +2398,7 @@ package body Sem_Ch6 is
                            Class_Wide_Type (Etype (First_Formal (Subp))) = Typ)
                  and then Try_Object_Operation (P)
                then
-                  return;
+                  goto Leave;
 
                else
                   Analyze_Call_And_Resolve;