sem_ch12.adb (Instantiate_Formal_Subprogram): Do not apply AI05-296 if the actual...
authorEd Schonberg <schonberg@adacore.com>
Tue, 12 Jun 2012 12:07:11 +0000 (12:07 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 12 Jun 2012 12:07:11 +0000 (14:07 +0200)
2012-06-12  Ed Schonberg  <schonberg@adacore.com>

* sem_ch12.adb (Instantiate_Formal_Subprogram): Do not apply
AI05-296 if the actual is overloaded. In this case The rule must
be applied after resolution, in Analyze_Subprogram_Renaming.

From-SVN: r188450

gcc/ada/ChangeLog
gcc/ada/sem_ch12.adb

index 5944186..b4a3477 100644 (file)
@@ -1,3 +1,9 @@
+2012-06-12  Ed Schonberg  <schonberg@adacore.com>
+
+       * sem_ch12.adb (Instantiate_Formal_Subprogram): Do not apply
+       AI05-296 if the actual is overloaded. In this case The rule must
+       be applied after resolution, in Analyze_Subprogram_Renaming.
+
 2012-06-12  Robert Dewar  <dewar@adacore.com>
 
        * stringt.adb: Minor reformatting.
index edca338..fb9a451 100644 (file)
@@ -9450,6 +9450,7 @@ package body Sem_Ch12 is
             end if;
 
             if Is_Entity_Name (Actual)
+              and then not Is_Overloaded (Actual)
               and then not Has_Untagged_Inc
             then
                F := First_Formal (Entity (Actual));