[Ada] Remove new problematic condition for LLVM
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 14 Apr 2020 21:49:22 +0000 (23:49 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 17 Jun 2020 08:14:13 +0000 (04:14 -0400)
2020-06-17  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* exp_attr.adb (Expand_N_Attribute_Reference) <Attribute_First>:
Remove condition added for scalar types.

gcc/ada/exp_attr.adb

index 888b112d80ed0cf94a26da0131b46c5815891c3e..785ed25aed2d2b05c8f0e4768216d7f04a26fa0d 100644 (file)
@@ -3470,9 +3470,7 @@ package body Exp_Attr is
                   Bnd := Type_High_Bound (Ptyp);
                end if;
 
-               if Is_Entity_Name (Bnd)
-                 and then Ekind (Entity (Bnd)) /= E_Discriminant
-               then
+               if Is_Entity_Name (Bnd) then
                   Rewrite (N, New_Occurrence_Of (Entity (Bnd), Loc));
                end if;
             end;