From b6735a100492c020a27b31b11152630d04420d93 Mon Sep 17 00:00:00 2001 From: Justin Squirek Date: Fri, 23 Oct 2020 11:31:07 -0400 Subject: [PATCH] [Ada] Incorrect runtime accessibility check on access discriminant gcc/ada/ * exp_ch4.adb (Expand_N_Type_Conversion): Use the unexpanded operand when generating accessibility checks. --- gcc/ada/exp_ch4.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 102f7ae..6899e62 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -12258,7 +12258,7 @@ package body Exp_Ch4 is else Apply_Accessibility_Check - (Operand_Acc, Target_Type, Insert_Node => Operand); + (Operand, Target_Type, Insert_Node => Operand); end if; -- If the level of the operand type is statically deeper than the -- 2.7.4