aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch12.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2016-06-16 11:44:04 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2016-06-16 11:44:04 +0200
commitfb757f7da43d13603d3d8b821f62076336e412a9 (patch)
tree053397ad0da456b40522b26baa0eeb0cfbf88e9e /gcc/ada/sem_ch12.adb
parent17d7bdd87dcafe86ec678cb22604e4aada008948 (diff)
downloadgcc-fb757f7da43d13603d3d8b821f62076336e412a9.zip
gcc-fb757f7da43d13603d3d8b821f62076336e412a9.tar.gz
gcc-fb757f7da43d13603d3d8b821f62076336e412a9.tar.bz2
[multiple changes]
2016-06-16 Hristian Kirtchev <kirtchev@adacore.com> * exp_attr.adb, inline.adb, sem_attr.adb, sem_elab.adb: Minor reformatting. 2016-06-16 Bob Duff <duff@adacore.com> * sem_util.adb (Collect): Avoid Empty Full_T. Otherwise Etype (Full_T) crashes when assertions are on. * sem_ch12.adb (Matching_Actual): Correctly handle the case where "others => <>" appears in a generic formal package, other than by itself. 2016-06-16 Arnaud Charlet <charlet@adacore.com> * usage.adb: Remove confusing comment in usage line. * bindgen.adb: Fix binder generated file in codepeer mode wrt recent additions. 2016-06-16 Javier Miranda <miranda@adacore.com> * restrict.adb (Check_Restriction_No_Use_Of_Entity): Avoid never-ending loop, code cleanup; adding also support for Text_IO. * sem_ch8.adb (Find_Expanded_Name): Invoke Check_Restriction_No_Use_Entity. 2016-06-16 Tristan Gingold <gingold@adacore.com> * exp_ch9.adb: Minor comment fix. * einfo.ads (Has_Protected): Clarify comment. * sem_ch9.adb (Analyze_Protected_Type_Declaration): Do not consider private protected types declared in the runtime for the No_Local_Protected_Types restriction. From-SVN: r237507
Diffstat (limited to 'gcc/ada/sem_ch12.adb')
-rw-r--r--gcc/ada/sem_ch12.adb13
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index 78c161f..f62c30f 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -1112,7 +1112,7 @@ package body Sem_Ch12 is
-- Find actual that corresponds to a given a formal parameter. If the
-- actuals are positional, return the next one, if any. If the actuals
-- are named, scan the parameter associations to find the right one.
- -- A_F is the corresponding entity in the analyzed generic,which is
+ -- A_F is the corresponding entity in the analyzed generic, which is
-- placed on the selector name for ASIS use.
--
-- In Ada 2005, a named association may be given with a box, in which
@@ -1257,7 +1257,7 @@ package body Sem_Ch12 is
elsif No (Selector_Name (Actual)) then
Found_Assoc := Actual;
- Act := Explicit_Generic_Actual_Parameter (Actual);
+ Act := Explicit_Generic_Actual_Parameter (Actual);
Num_Matched := Num_Matched + 1;
Next (Actual);
@@ -1271,12 +1271,17 @@ package body Sem_Ch12 is
Prev := Empty;
while Present (Actual) loop
- if Chars (Selector_Name (Actual)) = Chars (F) then
+ if Nkind (Actual) = N_Others_Choice then
+ Found_Assoc := Empty;
+ Act := Empty;
+
+ elsif Chars (Selector_Name (Actual)) = Chars (F) then
Set_Entity (Selector_Name (Actual), A_F);
Set_Etype (Selector_Name (Actual), Etype (A_F));
Generate_Reference (A_F, Selector_Name (Actual));
+
Found_Assoc := Actual;
- Act := Explicit_Generic_Actual_Parameter (Actual);
+ Act := Explicit_Generic_Actual_Parameter (Actual);
Num_Matched := Num_Matched + 1;
exit;
end if;