summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_eval.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-01-21 09:01:05 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2014-01-21 09:01:05 +0100
commit8d81fb4ea24ba78622991141b9ad2f36bea1ec84 (patch)
treefb8bbd826828d0725d3c0eee2dbf21fdf86f3ebc /gcc/ada/sem_eval.adb
parent6b6041ec651c69871cc4c8d0ba3621c575b97e75 (diff)
downloadgcc-8d81fb4ea24ba78622991141b9ad2f36bea1ec84.tar.gz
[multiple changes]
2014-01-21 Javier Miranda <miranda@adacore.com> * exp_ch3.adb (Build_Init_Procedure): For derivations of interfaces, do not move the the initialization of the _parent field since such assignment is not generated. 2014-01-21 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity with the operator it renames if we are within an expression of a pre/postcondition, because the expression will be reanalyzed at a later point, and the analysis of the renaming may affect the visibility of the operator when in an instance. 2014-01-21 Robert Dewar <dewar@adacore.com> * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1. Add this flag to type conversion nodes and assignment nodes. * treepr.adb: Deal properly with Flag 1,2,3. * treeprs.adt: Minor comment update. 2014-01-21 Robert Dewar <dewar@adacore.com> * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT parameter. * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT parameter, completely rewrite spec. 2014-01-21 Ed Schonberg <schonberg@adacore.com> * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram instance that is inlined, it may have been rewritten as a wrapper package. In that case the unit that must be made visible is the related instance of the package. 2014-01-21 Arnaud Charlet <charlet@adacore.com> * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine previous change in codepeer mode. From-SVN: r206874
Diffstat (limited to 'gcc/ada/sem_eval.adb')
-rw-r--r--gcc/ada/sem_eval.adb10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/ada/sem_eval.adb b/gcc/ada/sem_eval.adb
index 5ee8ecc0cc6..d69c3414cef 100644
--- a/gcc/ada/sem_eval.adb
+++ b/gcc/ada/sem_eval.adb
@@ -1287,7 +1287,10 @@ package body Sem_Eval is
-- Compile_Time_Known_Value --
------------------------------
- function Compile_Time_Known_Value (Op : Node_Id) return Boolean is
+ function Compile_Time_Known_Value
+ (Op : Node_Id;
+ Ignore_CRT : Boolean := False) return Boolean
+ is
K : constant Node_Kind := Nkind (Op);
CV_Ent : CV_Entry renames CV_Cache (Nat (Op) mod CV_Cache_Size);
@@ -1311,9 +1314,9 @@ package body Sem_Eval is
-- time. This avoids anomalies where whether something is allowed with a
-- given configurable run-time library depends on how good the compiler
-- is at optimizing and knowing that things are constant when they are
- -- nonstatic.
+ -- nonstatic. This check is suppressed if Ignore_CRT is True
- if Configurable_Run_Time_Mode
+ if (Configurable_Run_Time_Mode and not Ignore_CRT)
and then K /= N_Null
and then not Is_Static_Expression (Op)
then
@@ -1326,7 +1329,6 @@ package body Sem_Eval is
and then Etype (Entity (Op)) = Standard_Boolean
then
null;
-
else
return False;
end if;