[Ada] Use uniform type resolution for membership tests
authorEric Botcazou <ebotcazou@adacore.com>
Sun, 29 Mar 2020 13:42:31 +0000 (15:42 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 15 Jun 2020 08:04:17 +0000 (04:04 -0400)
commitba621931790224d5d4c060fa7bdaa5763c3202a2
tree2cc411074f03acc7c8751bda5dc8166ef0415a30
parent82a3008e56c620008b4575a97e459e2769df54db
[Ada] Use uniform type resolution for membership tests

2020-06-15  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* sem_res.adb (Resolve_Set_Membership): Remove local variable.
In the non-overloaded case, call Intersect_Types on the left
operand and the first alternative to get the resolution type.
But test the subtype of the left operand to give the warning.
gcc/ada/sem_res.adb