summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch13.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-20 16:10:53 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-20 16:10:53 +0000
commitc4968aa29cbc07d8d8135459bd628af4144d8adb (patch)
treede2038d9772868c26e4ecc32ab0ca7550e3d1447 /gcc/ada/sem_ch13.adb
parent99971aaa7d0882f454a54e8c73ec50e8e69aee63 (diff)
downloadgcc-c4968aa29cbc07d8d8135459bd628af4144d8adb.tar.gz
2014-01-20 Robert Dewar <dewar@adacore.com>
* checks.adb: Check SPARK_Mode instead of GNATProve_Mode for converting warnings on inevitable exceptions to errors. * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for converting warnings on inevitable exceptions to errors. * opt.adb (SPARK_Mode_Config): Handled like other config flags * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config): New flag (Config_Switches_Type): Add SPARK_Mode field * sem.adb: Minor code reorganization (remove unnecessary with) * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for converting warnings on inevitable exceptions to errors. * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for converting warnings on inevitable exceptions to errors. * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for converting warnings on inevitable exceptions to errors. * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for converting warnings on inevitable exceptions to errors. * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode from spec if needed * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode from spec if needed * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope): Restore SPARK_Mode * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for converting warnings on inevitable exceptions to errors. * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name of Get_SPARK_Mode_Id * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for converting warnings on inevitable exceptions to errors. * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for converting warnings on inevitable exceptions to errors. * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed SPARK_Mode_Type 2014-01-20 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb: Add semantic information to rewritten type reference. 2014-01-20 Ed Schonberg <schonberg@adacore.com> * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides are of a type with unknown discriminants, convert both to the underlying view of the type, so that the proper constraint check can be applied to the right-hand side. 2014-01-20 Robert Dewar <dewar@adacore.com> * atree.adb (Copy_Node): Fix failure to copy last component (Exchange_Entities): Fix failure to exchange last entity 2014-01-20 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb: Code clean up. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206844 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch13.adb')
-rw-r--r--gcc/ada/sem_ch13.adb14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 9d452b13ea5..630892a4a9f 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -5939,6 +5939,20 @@ package body Sem_Ch13 is
procedure Replace_Type_Reference (N : Node_Id) is
begin
+
+ -- Add semantic information to node to be rewritten, for ASIS
+ -- navigation needs.
+
+ if Nkind (N) = N_Identifier then
+ Set_Entity (N, T);
+ Set_Etype (N, T);
+
+ elsif Nkind (N) = N_Selected_Component then
+ Analyze (Prefix (N));
+ Set_Entity (Selector_Name (N), T);
+ Set_Etype (Selector_Name (N), T);
+ end if;
+
-- Invariant'Class, replace with T'Class (obj)
if Class_Present (Ritem) then