[Ada] Rewrite extended names in derived class-wide expressions
authorPiotr Trojanek <trojanek@adacore.com>
Thu, 30 Sep 2021 10:54:28 +0000 (12:54 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 11 Oct 2021 13:38:10 +0000 (13:38 +0000)
gcc/ada/

* exp_util.adb (Build_Class_Wide_Expression): Replace entities
of both simple and extended names.

gcc/ada/exp_util.adb

index 11499e1..2ae3dd3 100644 (file)
@@ -1293,7 +1293,7 @@ package body Exp_Util is
             Adjust_Inherited_Pragma_Sloc (N);
          end if;
 
-         if Nkind (N) in N_Identifier | N_Operator_Symbol
+         if Nkind (N) in N_Identifier | N_Expanded_Name | N_Operator_Symbol
            and then Present (Entity (N))
            and then
              (Is_Formal (Entity (N)) or else Is_Subprogram (Entity (N)))