summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch13.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-08 10:51:09 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-08 10:51:09 +0000
commit7717ea00902734bd90371e34af23d0b73287f875 (patch)
tree60f102f8f0b02f960f1bcbd4b1514e0230d5465c /gcc/ada/sem_ch13.ads
parent7630a512e81ed887d2e13356955afc86854cd3d4 (diff)
downloadgcc-7717ea00902734bd90371e34af23d0b73287f875.tar.gz
2010-10-08 Robert Dewar <dewar@adacore.com>
* sem_ch6.adb: Minor reformatting. 2010-10-08 Robert Dewar <dewar@adacore.com> * gnat1drv.adb: Add call to Validate_Independence. * par-prag.adb: Add dummy entries for Independent, Independent_Componentsa. * sem_ch13.adb (Validate_Independence): New procedure (Initialize): Initialize address clause and independence check tables * sem_ch13.ads (Independence_Checks): New table (Validate_Independence): New procedure * sem_prag.adb: Add processing for pragma Independent[_Components] * snames.ads-tmpl: Add entries for pragma Independent[_Components] 2010-10-08 Ed Schonberg <schonberg@adacore.com> * sem_aggr.adb (Propagate_Discriminants): When expanding an aggregate component with box initialization, if the component is a variant record use the values of the discriminants to select the proper variant for further box initialization. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165162 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch13.ads')
-rw-r--r--gcc/ada/sem_ch13.ads41
1 files changed, 36 insertions, 5 deletions
diff --git a/gcc/ada/sem_ch13.ads b/gcc/ada/sem_ch13.ads
index b95eed60a92..5c960d7765e 100644
--- a/gcc/ada/sem_ch13.ads
+++ b/gcc/ada/sem_ch13.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -23,6 +23,7 @@
-- --
------------------------------------------------------------------------------
+with Table;
with Types; use Types;
with Uintp; use Uintp;
@@ -167,10 +168,10 @@ package Sem_Ch13 is
-- back end as required.
procedure Validate_Unchecked_Conversions;
- -- This routine is called after calling the backend to validate
- -- unchecked conversions for size and alignment appropriateness.
- -- The reason it is called that late is to take advantage of any
- -- back-annotation of size and alignment performed by the backend.
+ -- This routine is called after calling the backend to validate unchecked
+ -- conversions for size and alignment appropriateness. The reason it is
+ -- called that late is to take advantage of any back-annotation of size
+ -- and alignment performed by the backend.
procedure Validate_Address_Clauses;
-- This is called after the back end has been called (and thus after the
@@ -178,4 +179,34 @@ package Sem_Ch13 is
-- table of saved address clauses checking for suspicious alignments and
-- if necessary issuing warnings.
+ procedure Validate_Independence;
+ -- This is called after the back end has been called (and thus after the
+ -- layout of components has been back annotated). It goes through the
+ -- table of saved pragma Independent[_Component] entries, checking that
+ -- independence can be achieved, and if necessary issuing error mssags.
+
+ -------------------------------------
+ -- Table for Validate_Independence --
+ -------------------------------------
+
+ -- If a legal pragma Independent or Independent_Components is given for
+ -- an entity, then an entry is made in this table, to be checked by a
+ -- call to Validate_Independence after back annotation of layout is done.
+
+ type Independence_Check_Record is record
+ N : Node_Id;
+ -- The pragma Independent or Independent_Components
+
+ E : Entity_Id;
+ -- The entity to which it applies
+ end record;
+
+ package Independence_Checks is new Table.Table (
+ Table_Component_Type => Independence_Check_Record,
+ Table_Index_Type => Int,
+ Table_Low_Bound => 1,
+ Table_Initial => 20,
+ Table_Increment => 200,
+ Table_Name => "Independence_Checks");
+
end Sem_Ch13;