diff mbox series

[Ada] Fix location of errors about volatile compatibility

Message ID 20210707162528.GA2543114@adacore.com
State New
Headers show
Series [Ada] Fix location of errors about volatile compatibility | expand

Commit Message

Pierre-Marie de Rodat July 7, 2021, 4:25 p.m. UTC
Ada 2022 errors about volatile compatibility between generic actual and
formal types were emitted on type declaration; now they are emitted at
the actual type within the generic instance.

Tested on x86_64-pc-linux-gnu, committed on trunk

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.
diff mbox series

Patch

diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -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;