aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-05 16:24:40 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-05 16:24:40 +0200
commit5f9cdefe6b406caec538bb764c4da78751037bed (patch)
tree5362e5f179fb36694f2348474e8ce0cb0d242fe6
parent822868aa564816380d7928a6ead984524abc8259 (diff)
downloadgcc-5f9cdefe6b406caec538bb764c4da78751037bed.zip
gcc-5f9cdefe6b406caec538bb764c4da78751037bed.tar.gz
gcc-5f9cdefe6b406caec538bb764c4da78751037bed.tar.bz2
[multiple changes]
2011-08-05 Yannick Moy <moy@adacore.com> * sem_ch12.adb (Analyze_Package_Instantiation, Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA mode. 2011-08-05 Ed Schonberg <schonberg@adacore.com> * sem_type.adb (Specific_Type): in an instance, the type-specific operand of an equality check that involves null may have a private type. Use full view to determine legality of construct. From-SVN: r177444
-rw-r--r--gcc/ada/ChangeLog12
-rw-r--r--gcc/ada/sem_ch12.adb2
-rw-r--r--gcc/ada/sem_type.adb11
3 files changed, 25 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 14db29d..e9b409c 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,15 @@
+2011-08-05 Yannick Moy <moy@adacore.com>
+
+ * sem_ch12.adb (Analyze_Package_Instantiation,
+ Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
+ mode.
+
+2011-08-05 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_type.adb (Specific_Type): in an instance, the type-specific
+ operand of an equality check that involves null may have a private
+ type. Use full view to determine legality of construct.
+
2011-08-05 Vincent Celier <celier@adacore.com>
* gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index 278552d..c25e2e9 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -3400,6 +3400,7 @@ package body Sem_Ch12 is
or else Might_Inline_Subp)
and then not Is_Actual_Pack
and then not Inline_Now
+ and then not ALFA_Mode
and then (Operating_Mode = Generate_Code
or else (Operating_Mode = Check_Semantics
and then ASIS_Mode));
@@ -4015,6 +4016,7 @@ package body Sem_Ch12 is
if (Is_In_Main_Unit (N)
or else Is_Inlined (Subp)
or else Is_Inlined (Alias (Subp)))
+ and then not ALFA_Mode
and then (Operating_Mode = Generate_Code
or else (Operating_Mode = Check_Semantics
and then ASIS_Mode))
diff --git a/gcc/ada/sem_type.adb b/gcc/ada/sem_type.adb
index 3d99e18..d11767b 100644
--- a/gcc/ada/sem_type.adb
+++ b/gcc/ada/sem_type.adb
@@ -3198,6 +3198,17 @@ package body Sem_Type is
then
return T1;
+ -- In an instance, the specific type may have a private view. Use full
+ -- view to check legality.
+
+ elsif T2 = Any_Access
+ and then Is_Private_Type (T1)
+ and then Present (Full_View (T1))
+ and then Is_Access_Type (Full_View (T1))
+ and then In_Instance
+ then
+ return T1;
+
elsif T2 = Any_Composite
and then Is_Aggregate_Type (T1)
then