aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog12
-rw-r--r--gcc/ada/sem_ch13.adb14
-rw-r--r--gcc/ada/sem_ch3.adb12
3 files changed, 38 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index ef0c320..ecd16a2 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,15 @@
+2012-10-29 Steve Baird <baird@adacore.com>
+
+ * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If CodePeer_Mode
+ = True and we detect that an Address specification is used to overlay
+ another object, do not set that object's Treat_As_Volatile flag.
+
+2012-10-29 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch3.adb (Constant_Redeclaration): If the type of a
+ deferred constant has invariants, generate invariant call on
+ the initial value.
+
2012-10-29 Bob Duff <duff@adacore.com>
* sem_ch13.adb (Replace_Type_Reference): Use correct sloc for
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 94fd6a6..e67026d 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -2708,7 +2708,21 @@ package body Sem_Ch13 is
if Present (O_Ent)
and then Is_Object (O_Ent)
and then not Off
+
+ -- The following test is an expedient solution to what
+ -- is really a problem in CodePeer. Suppressing the
+ -- Set_Treat_As_Volatile call here prevents later
+ -- generation (in some cases) of trees that CodePeer
+ -- should, but currently does not, handle correctly.
+ -- This test should probably be removed when CodePeer
+ -- is improved, just because we want the tree CodePeer
+ -- analyzes to match the tree for which we generate code
+ -- as closely as is practical. ???
+
+ and then not CodePeer_Mode
then
+ -- ??? O_Ent might not be in current unit
+
Set_Treat_As_Volatile (O_Ent);
end if;
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 7dd808c..818bfd0 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -10656,6 +10656,18 @@ package body Sem_Ch3 is
then
Check_Recursive_Declaration (Designated_Type (T));
end if;
+
+ -- A deferred constant is a visible entity. If type has invariants,
+ -- verify that the initial value satisfies them.
+
+ if Expander_Active and then Has_Invariants (T) then
+ declare
+ Call : constant Node_Id :=
+ Make_Invariant_Call (New_Occurrence_Of (Prev, Sloc (N)));
+ begin
+ Insert_After (N, Call);
+ end;
+ end if;
end if;
end Constant_Redeclaration;