]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Rewrite operator entity in derived class-wide expressions
authorPiotr Trojanek <trojanek@adacore.com>
Fri, 10 Sep 2021 20:29:27 +0000 (22:29 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 5 Oct 2021 08:20:02 +0000 (08:20 +0000)
gcc/ada/

* exp_util.adb (Build_Class_Wide_Expression): Replace entities
of both identifiers and operator symbols.

gcc/ada/exp_util.adb

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