diff options
author | Yannick Moy <moy@adacore.com> | 2020-10-12 17:32:45 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-11-25 08:22:28 -0500 |
commit | a8c229e14c4d6c5c6e2d1ff18741e89d7149d81d (patch) | |
tree | 357a9ff3f1da175476234f1c27aa42ae71ff180c | |
parent | 6d88dbdc5e33765ae481b57e5ed027fe1fb2e409 (diff) | |
download | gcc-a8c229e14c4d6c5c6e2d1ff18741e89d7149d81d.zip gcc-a8c229e14c4d6c5c6e2d1ff18741e89d7149d81d.tar.gz gcc-a8c229e14c4d6c5c6e2d1ff18741e89d7149d81d.tar.bz2 |
[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.
-rw-r--r-- | gcc/ada/sem_ch3.adb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index f5c7808..8085867 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -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. |