aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_util.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2013-04-11 14:25:16 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2013-04-11 14:25:16 +0200
commit8bfbd380f2c411f1b264fa234b3beb9cde53752b (patch)
treeadd533dd995b0231de167243dc46dd6fa2c83c3e /gcc/ada/sem_util.adb
parent256f384717333836e09eb881ecbb787ee6916191 (diff)
downloadgcc-8bfbd380f2c411f1b264fa234b3beb9cde53752b.zip
gcc-8bfbd380f2c411f1b264fa234b3beb9cde53752b.tar.gz
gcc-8bfbd380f2c411f1b264fa234b3beb9cde53752b.tar.bz2
[multiple changes]
2013-04-11 Arnaud Charlet <charlet@adacore.com> * gnat1drv.adb: Minor code clean up. 2013-04-11 Arnaud Charlet <charlet@adacore.com> * debug.adb, sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enumeration rep clauses by default in CodePeer mode, unless -gnatd.I is specified. 2013-04-11 Ed Schonberg <schonberg@adacore.com> * sem_util.adb (Safe_To_Capture_Value): If the node belongs to an expression that has been attached to the else_actions of an if-expression, the capture is not safe. 2013-04-11 Yannick Moy <moy@adacore.com> * checks.adb (Apply_Type_Conversion_Checks): Put check mark on type conversion for arrays. 2013-04-11 Robert Dewar <dewar@adacore.com> * a-cdlili.adb, a-cidlli.adb, a-cbdlli.adb: Minor reformatting. 2013-04-11 Johannes Kanig <kanig@adacore.com> * adabkend.adb: Minor comment addition. From-SVN: r197773
Diffstat (limited to 'gcc/ada/sem_util.adb')
-rw-r--r--gcc/ada/sem_util.adb13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 2e05690..d964d0f 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -12984,6 +12984,19 @@ package body Sem_Util is
else
Desc := P;
P := Parent (P);
+
+ -- A special Ada 2012 case: the original node may be part
+ -- of the else_actions of a conditional expression, in which
+ -- case it might not have been expanded yet, and appears in
+ -- a non-syntactic list of actions. In that case it is clearly
+ -- not safe to save a value.
+
+ if No (P)
+ and then Is_List_Member (Desc)
+ and then No (Parent (List_Containing (Desc)))
+ then
+ return False;
+ end if;
end if;
end loop;
end;