aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch6.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/exp_ch6.adb')
-rw-r--r--gcc/ada/exp_ch6.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index 993fa40..d609931 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -5679,10 +5679,14 @@ package body Exp_Ch6 is
end if;
-- If local-exception-to-goto optimization active, insert dummy push
- -- statements at start, and dummy pop statements at end.
+ -- statements at start, and dummy pop statements at end, but inhibit
+ -- this if we have No_Exception_Handlers, since they are useless and
+ -- intefere with analysis, e.g. by codepeer.
if (Debug_Flag_Dot_G
or else Restriction_Active (No_Exception_Propagation))
+ and then not Restriction_Active (No_Exception_Handlers)
+ and then not CodePeer_Mode
and then Is_Non_Empty_List (L)
then
declare