diff options
Diffstat (limited to 'gcc/ada/exp_ch4.adb')
-rw-r--r-- | gcc/ada/exp_ch4.adb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 25f5de3..1fb35c1 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -6164,11 +6164,15 @@ package body Exp_Ch4 is -- messing especially in the packed case, but more importantly bypasses -- some problems in handling this peculiar case, for example, the issue -- of dealing specially with object renamings. - -- This optimization is disabled for CodePeer because it can transform - -- an index-check constraint_error into a range-check constraint_error - -- and CodePeer cares about that distinction. - if Nkind (P) = N_Slice and then not CodePeer_Mode then + if Nkind (P) = N_Slice + + -- This optimization is disabled for CodePeer because it can transform + -- an index-check constraint_error into a range-check constraint_error + -- and CodePeer cares about that distinction. + + and then not CodePeer_Mode + then Rewrite (N, Make_Indexed_Component (Loc, Prefix => Prefix (P), |