[Ada] Do not emit error in Relaxed_RM_Semantics mode
authorArnaud Charlet <charlet@adacore.com>
Tue, 22 May 2018 13:24:19 +0000 (13:24 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 22 May 2018 13:24:19 +0000 (13:24 +0000)
2018-05-22  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

* sem_ch8.adb (Check_Frozen_Renaming): Do not emit error in
Relaxed_RM_Semantics mode.

From-SVN: r260523

gcc/ada/ChangeLog
gcc/ada/sem_ch8.adb

index 659124a69e550010c789dbf079fb33acaed1e10a..bfbb562504599d70eac718e4305bfccc7de8c5c3 100644 (file)
@@ -1,3 +1,8 @@
+2018-05-22  Arnaud Charlet  <charlet@adacore.com>
+
+       * sem_ch8.adb (Check_Frozen_Renaming): Do not emit error in
+       Relaxed_RM_Semantics mode.
+
 2018-05-22  Arnaud Charlet  <charlet@adacore.com>
 
        * comperr.adb (Delete_SCIL_Files): Take into account
index 49b11835afc5ed1b1260fe8c1822e3a105813ff8..36172d075c4d4e7c457dd526abcd7e240cfa2e1e 100644 (file)
@@ -4322,7 +4322,10 @@ package body Sem_Ch8 is
                Analyze (B_Node);
             end if;
 
-            if Is_Intrinsic_Subprogram (Old_S) and then not In_Instance then
+            if Is_Intrinsic_Subprogram (Old_S)
+              and then not In_Instance
+              and then not Relaxed_RM_Semantics
+            then
                Error_Msg_N
                  ("subprogram used in renaming_as_body cannot be intrinsic",
                   Name (N));