From: Justin Squirek Date: Fri, 23 Oct 2020 15:31:07 +0000 (-0400) Subject: [Ada] Incorrect runtime accessibility check on access discriminant X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b6735a100492c020a27b31b11152630d04420d93;p=gcc.git [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. --- diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 102f7ae6bd6..6899e620763 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