aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_spark.adb
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2019-07-22 13:57:31 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-07-22 13:57:31 +0000
commitff9d220ede29dc7d0d40933733180f12cba54f17 (patch)
tree3ec00f65614d971bf36399e4d7f7e854943b7a91 /gcc/ada/exp_spark.adb
parent78e92e11d4a96e0cd2ee9d9b1af9382133cd11b5 (diff)
downloadgcc-ff9d220ede29dc7d0d40933733180f12cba54f17.zip
gcc-ff9d220ede29dc7d0d40933733180f12cba54f17.tar.gz
gcc-ff9d220ede29dc7d0d40933733180f12cba54f17.tar.bz2
[Ada] Remove obsolete Is_For_Access_Subtype machinery
This change removes the Is_For_Access_Subtype machinery from the compiler. This machinery was devised a long time ago to deal with a peculiarity of the freezing for access-to-record subtypes but has been degenerate for quite some time now and does not seem to serve any useful purpose at this point. Morever it has an annoying side effect whereby it causes Underlying_Type to return the (unconstrained) base record type when invoked on the designated record subtype, which is very problematic for GNATprove. There should be no functional changes. 2019-07-22 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * einfo.ads (Is_For_Access_Subtype): Delete. (Set_Is_For_Access_Subtype): Likewise. * einfo.adb (Is_For_Access_Subtype): Likewise. (Set_Is_For_Access_Subtype): Likewise. (Write_Entity_Flags): Do not write Is_For_Access_Subtype. * exp_ch4.adb (Expand_N_Selected_Component): Do not deal with it. * exp_spark.adb (Expand_SPARK_N_Selected_Component): Likewise. * sem_ch4.adb (Analyze_Explicit_Dereference): Likewise. * sem_ch3.adb (Build_Discriminated_Subtype): Do not build a special private subtype for access-to-record subtypes. From-SVN: r273682
Diffstat (limited to 'gcc/ada/exp_spark.adb')
-rw-r--r--gcc/ada/exp_spark.adb6
1 files changed, 0 insertions, 6 deletions
diff --git a/gcc/ada/exp_spark.adb b/gcc/ada/exp_spark.adb
index 58f9243..63f2dad 100644
--- a/gcc/ada/exp_spark.adb
+++ b/gcc/ada/exp_spark.adb
@@ -522,12 +522,6 @@ package body Exp_SPARK is
Insert_Explicit_Dereference (Pref);
Analyze_And_Resolve (Pref, Designated_Type (Typ));
-
- if Ekind (Etype (Pref)) = E_Private_Subtype
- and then Is_For_Access_Subtype (Etype (Pref))
- then
- Set_Etype (Pref, Base_Type (Etype (Pref)));
- end if;
end if;
end Expand_SPARK_N_Selected_Component;