aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch3.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2015-03-04 10:54:19 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2015-03-04 10:54:19 +0100
commitb6a56408a630f3fe20b4664520302adab8bd10a6 (patch)
treec6ff97a61069fd55e6d95e3d19dc0adade7dbb7e /gcc/ada/exp_ch3.adb
parent2322588a7149e39ed808e586e3ec640e032b6e9e (diff)
downloadgcc-b6a56408a630f3fe20b4664520302adab8bd10a6.zip
gcc-b6a56408a630f3fe20b4664520302adab8bd10a6.tar.gz
gcc-b6a56408a630f3fe20b4664520302adab8bd10a6.tar.bz2
[multiple changes]
2015-03-04 Robert Dewar <dewar@adacore.com> * exp_ch7.adb: Minor reformatting. * exp_unst.adb (Build_Tables): Fix minor glitch for no separate spec case. * erroutc.adb (Delete_Msg): add missing decrement of info msg counter. 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress references to formal parameters subject to pragma Unreferenced. (Suppress_Reference): New routine. * sem_attr.adb (Analyze_Attribute): Reimplement the analysis of attribute 'Old. Attributes 'Old and 'Result now share common processing. (Analyze_Old_Result_Attribute): New routine. (Check_Placement_In_Check): Removed. (Check_Placement_In_Contract_Cases): Removed. (Check_Placement_In_Test_Case): Removed. (Check_Use_In_Contract_Cases): Removed. (Check_Use_In_Test_Case): Removed. (In_Refined_Post): Removed. (Is_Within): Removed. * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup. (Check_Low_Bound_Tested_For): New routine. 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch3.adb (Expand_N_Object_Declaration): Generate a runtime check to test the expression of pragma Default_Initial_Condition when the object is default initialized. From-SVN: r221176
Diffstat (limited to 'gcc/ada/exp_ch3.adb')
-rw-r--r--gcc/ada/exp_ch3.adb9
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb
index c2ba50a..0baa3f6 100644
--- a/gcc/ada/exp_ch3.adb
+++ b/gcc/ada/exp_ch3.adb
@@ -6138,11 +6138,9 @@ package body Exp_Ch3 is
end;
end if;
- -- At this point the object is fully initialized by either invoking the
- -- related type init proc, routine [Deep_]Initialize or performing in-
- -- place assingments for an array object. If the related type is subject
- -- to pragma Default_Initial_Condition, add a runtime check to verify
- -- the assumption of the pragma. Generate:
+ -- If the object is default initialized and its type is subject to
+ -- pragma Default_Initial_Condition, add a runtime check to verify
+ -- the assumption of the pragma (SPARK RM 7.3.3). Generate:
-- <Base_Typ>Default_Init_Cond (<Base_Typ> (Def_Id));
@@ -6152,6 +6150,7 @@ package body Exp_Ch3 is
and then (Has_Default_Init_Cond (Base_Typ)
or else
Has_Inherited_Default_Init_Cond (Base_Typ))
+ and then not Has_Init_Expression (N)
then
declare
DIC_Call : constant Node_Id :=