[Ada] Plug loophole in Possible_Type_For_Conditional_Expression
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 9 Feb 2022 16:16:09 +0000 (17:16 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 12 May 2022 12:38:36 +0000 (12:38 +0000)
commit9da379f1c220740c236ccfe223af5b435fe72284
tree4ce3a8e74d4ccd34afdd0b7f7a21d11a8b523178
parentbcbf83ec10e2ef19d01372ce21fefb3deb3ee8e6
[Ada] Plug loophole in Possible_Type_For_Conditional_Expression

We need to check that the designated subprograms of access-to-subprogram
types are subtype conformant before registering a common interpretation.

gcc/ada/

* sem_ch4.adb (Possible_Type_For_Conditional_Expression): Add
test for subtype conformance in the cases of
access-to-subprogram types.
gcc/ada/sem_ch4.adb