summaryrefslogtreecommitdiff
path: root/gcc/ada/sinfo.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-29 12:44:34 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-07-29 12:44:34 +0000
commitcf580b1d5dd2578643bda082833a7a58e7ebbf8a (patch)
tree5b63d111086fa3f1a33066a40b49275d1befa3a0 /gcc/ada/sinfo.adb
parent7d4d0bef44c652104415537d4b81a3b3e8aa5006 (diff)
downloadgcc-cf580b1d5dd2578643bda082833a7a58e7ebbf8a.tar.gz
2014-07-29 Thomas Quinot <quinot@adacore.com>
* errout.adb (Set_Error_Posted): When propagating flag to an enclosing named association, also propagate to the parent of that node, so that named and positional associations are treated consistently. 2014-07-29 Ed Schonberg <schonberg@adacore.com> * sem_attr.adb (Resolve_Attribute, case 'Update): Set Do_Range_Check properly on array component expressions that have a scalar type. In GNATprove mode, only checks on scalar components must be marked by the front-end. 2014-07-29 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Resolve_Type_Conversion): If the type of the expression is a limited view, use the non-limited view when available. 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated case statement as coming from a conditional expression. (Expand_N_If_Expression): Mark the generated if statement as coming from a conditional expression. * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled objects found in case statement alternatives when the case statement is actually a case expression. (Expand_N_If_Statement): Do not process controlled objects found in an if statement when the if statement is actually an if expression. * sinfo.adb (From_Conditional_Expression): New routine. (Set_From_Conditional_Expression): New routine. * sinfo.ads Add new semantic flag From_Conditional_Expression and update related nodes. (From_Conditional_Expression): New routine along with pragma Inline. (Set_From_Conditional_Expression): New routine along with pragma Inline. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213156 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sinfo.adb')
-rw-r--r--gcc/ada/sinfo.adb18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ada/sinfo.adb b/gcc/ada/sinfo.adb
index 2d21669be92..232e0bc1ebb 100644
--- a/gcc/ada/sinfo.adb
+++ b/gcc/ada/sinfo.adb
@@ -1400,6 +1400,15 @@ package body Sinfo is
return Flag4 (N);
end From_At_Mod;
+ function From_Conditional_Expression
+ (N : Node_Id) return Boolean is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Case_Statement
+ or else NT (N).Nkind = N_If_Statement);
+ return Flag1 (N);
+ end From_Conditional_Expression;
+
function From_Default
(N : Node_Id) return Boolean is
begin
@@ -4574,6 +4583,15 @@ package body Sinfo is
Set_Flag4 (N, Val);
end Set_From_At_Mod;
+ procedure Set_From_Conditional_Expression
+ (N : Node_Id; Val : Boolean := True) is
+ begin
+ pragma Assert (False
+ or else NT (N).Nkind = N_Case_Statement
+ or else NT (N).Nkind = N_If_Statement);
+ Set_Flag1 (N, Val);
+ end Set_From_Conditional_Expression;
+
procedure Set_From_Default
(N : Node_Id; Val : Boolean := True) is
begin