diff options
Diffstat (limited to 'gcc/ada/exp_ch5.adb')
-rw-r--r-- | gcc/ada/exp_ch5.adb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb index b6b23d0d18f..3f5a73b8a1b 100644 --- a/gcc/ada/exp_ch5.adb +++ b/gcc/ada/exp_ch5.adb @@ -1895,6 +1895,11 @@ package body Exp_Ch5 is -- the Then statements else + -- We do not delete the condition if constant condition + -- warnings are enabled, since otherwise we end up deleting + -- the desired warning. Of course the backend will get rid + -- of this True/False test anyway, so nothing is lost here. + if not Constant_Condition_Warnings then Kill_Dead_Code (Condition (N)); end if; |