aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch5.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-07-29 15:10:48 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-07-29 15:10:48 +0200
commitb8b2d9829aa9c3caa053de687701de3ebb506b4c (patch)
tree50aacdff34afb91561ece2913f57947c52e42805 /gcc/ada/sem_ch5.adb
parent02bb07655823135ef3e8b06f63b201bc19f54758 (diff)
downloadgcc-b8b2d9829aa9c3caa053de687701de3ebb506b4c.zip
gcc-b8b2d9829aa9c3caa053de687701de3ebb506b4c.tar.gz
gcc-b8b2d9829aa9c3caa053de687701de3ebb506b4c.tar.bz2
[multiple changes]
2014-07-29 Robert Dewar <dewar@adacore.com> * exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb, a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed, and then use it when a stream operation is used from a library generic when the restriction (No_Streams) is active. 2014-07-29 Thomas Quinot <quinot@adacore.com> * projects.texi: Fix minor typo. 2014-07-29 Yannick Moy <moy@adacore.com> * sem_attr.adb (Analyze_Attribute): Fix generation of warning. 2014-07-29 Arnaud Charlet <charlet@adacore.com> * sem_ch5.adb (Check_Unreachable_Code): Do not remove code in CodePeer mode. 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch7.adb (Find_Last_Init): Add local variable Deep_Init_Found. Check the statement immediately following the declaration if [Deep_]Initialization was not found. 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com> * exp_util.adb (Is_Aliased): It appears that 'reference-d and renamed objects still play some role in Boolean expression with actions and cannot be finalized immediately. 2014-07-29 Ed Schonberg <schonberg@adacore.com> * exp_dbug.adb (Qualify_Needed): For debugging purposes, Loop names are not part of the full qualification of entity names. From-SVN: r213164
Diffstat (limited to 'gcc/ada/sem_ch5.adb')
-rw-r--r--gcc/ada/sem_ch5.adb10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index 265c2c7..3ac6e6b 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -3182,16 +3182,20 @@ package body Sem_Ch5 is
-- unreachable code, since it is useless and we don't
-- want to generate junk warnings.
- -- We skip this step if we are not in code generation mode.
+ -- We skip this step if we are not in code generation mode
+ -- or CodePeer mode.
-- This is the one case where we remove dead code in the
-- semantics as opposed to the expander, and we do not want
-- to remove code if we are not in code generation mode,
- -- since this messes up the ASIS trees.
+ -- since this messes up the ASIS trees or loses useful
+ -- information in the CodePeer tree.
-- Note that one might react by moving the whole circuit to
-- exp_ch5, but then we lose the warning in -gnatc mode.
- if Operating_Mode = Generate_Code then
+ if Operating_Mode = Generate_Code
+ and then not CodePeer_Mode
+ then
loop
Nxt := Next (N);