summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_util.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/exp_util.adb')
-rw-r--r--gcc/ada/exp_util.adb5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index e675da82889..37a1be0e478 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -6710,8 +6710,13 @@ package body Exp_Util is
if Alfa_Mode then
New_Exp := E;
+
+ -- Otherwise generate reference, marking the value as non-null
+ -- since we know it cannot be null and we don't want a check.
+
else
New_Exp := Make_Reference (Loc, E);
+ Set_Is_Known_Non_Null (Def_Id);
end if;
end if;