[Ada] Fix internal compilation error on circular type in SPARK code

gcc/ada/

	* sem_ch3.adb (Access_Type_Declaration): Set Etype before
	checking for volatility compatibility.
This commit is contained in:
Yannick Moy 2020-10-12 17:32:45 +02:00 committed by Pierre-Marie de Rodat
parent 6d88dbdc5e
commit a8c229e14c

View File

@ -1411,6 +1411,8 @@ package body Sem_Ch3 is
Set_Is_Tagged_Type (T, False);
end if;
Set_Etype (T, T);
-- For SPARK, check that the designated type is compatible with
-- respect to volatility with the access type.
@ -1431,8 +1433,6 @@ package body Sem_Ch3 is
Srcpos_Bearer => T);
end if;
Set_Etype (T, T);
-- If the type has appeared already in a with_type clause, it is frozen
-- and the pointer size is already set. Else, initialize.