[multiple changes]
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. From-SVN: r192917
This commit is contained in:
parent
415450ea8e
commit
2a8fcd43bd
3 changed files with 38 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue