The new condition added for scalar types in the previous change for
the sake of consistency with array types is apparently problematic
for LLVM so this change removes it.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-17 Eric Botcazou <ebotca...@adacore.com>
gcc/ada/
* exp_attr.adb (Expand_N_Attribute_Reference) <Attribute_First>:
Remove condition added for scalar types.
--- gcc/ada/exp_attr.adb
+++ gcc/ada/exp_attr.adb
@@ -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;