diff options
author | Javier Miranda <miranda@adacore.com> | 2021-01-04 09:58:51 -0500 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-05-04 05:17:28 -0400 |
commit | 6d326562ff4d6ee583123b24acf662a576ac54f6 (patch) | |
tree | b3b9e230b2a97635ec60d3606d5eee40a1bf922a | |
parent | 2175592bf784852b2f2256654b7b21aa9a3d8e27 (diff) | |
download | gcc-6d326562ff4d6ee583123b24acf662a576ac54f6.zip gcc-6d326562ff4d6ee583123b24acf662a576ac54f6.tar.gz gcc-6d326562ff4d6ee583123b24acf662a576ac54f6.tar.bz2 |
[Ada] Wrong membership test computation for interface type
gcc/ada/
* exp_ch4.adb (Tagged_Membership): Remove wrong condition that
is not consistent with the documentation of this subprogram.
-rw-r--r-- | gcc/ada/exp_ch4.adb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 9d64ef7..35f870a 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -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, |