[Ada] Fix location of errors about volatile compatibility
authorPiotr Trojanek <trojanek@adacore.com>
Wed, 19 May 2021 13:18:54 +0000 (15:18 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 7 Jul 2021 16:23:16 +0000 (16:23 +0000)
gcc/ada/

* sem_ch12.adb (Check_Shared_Variable_Control_Aspects): Errors
emitted via Check_Volatility_Compatibility are now emitted at
Actual, just like other errors emitted by
Check_Shared_Variable_Control_Aspects.

gcc/ada/sem_ch12.adb

index 339bb42..1c8f64e 100644 (file)
@@ -12825,7 +12825,7 @@ package body Sem_Ch12 is
             Check_Volatility_Compatibility
               (Act_T, A_Gen_T,
                "actual type", "its corresponding formal type",
-               Srcpos_Bearer => Act_T);
+               Srcpos_Bearer => Actual);
          end if;
       end Check_Shared_Variable_Control_Aspects;