]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Wrong membership test computation for interface type
authorJavier Miranda <miranda@adacore.com>
Mon, 4 Jan 2021 14:58:51 +0000 (09:58 -0500)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 4 May 2021 09:17:28 +0000 (05:17 -0400)
gcc/ada/

* exp_ch4.adb (Tagged_Membership): Remove wrong condition that
is not consistent with the documentation of this subprogram.

gcc/ada/exp_ch4.adb

index 9d64ef7250df47e9a4beb74122ba9a45b681d5d2..35f870aeee18b7590a76aaabf29adfb78921d915 100644 (file)
@@ -15284,7 +15284,7 @@ package body Exp_Ch4 is
           Selector_Name =>
             New_Occurrence_Of (First_Tag_Component (Left_Type), Loc));
 
-      if Is_Class_Wide_Type (Right_Type) or else Is_Interface (Left_Type) then
+      if Is_Class_Wide_Type (Right_Type) then
 
          --  No need to issue a run-time check if we statically know that the
          --  result of this membership test is always true. For example,