An assertion is code for static membership tests was failing on this
code:
subtype A is Integer with
predicate => A > 0;
subtype B is Integer with
predicate => B in P.A;
where a qualified type name "P.A" appears in the predicate of type B.
The fix is trivial and the problem didn't affect production builds.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-16 Piotr Trojanek <troja...@adacore.com>
gcc/ada/
* sem_ch13.adb (Membership_Entry): Relax assertion to also
recognize qualified identifiers.
--- gcc/ada/sem_ch13.adb
+++ gcc/ada/sem_ch13.adb
@@ -8566,7 +8566,7 @@ package body Sem_Ch13 is
-- Identifier (other than static expression) case
- else pragma Assert (Nkind (N) = N_Identifier);
+ else pragma Assert (Nkind_In (N, N_Expanded_Name, N_Identifier));
-- Type case