[Ada] Incorrect accessibility checks on functions calls
authorJustin Squirek <squirek@adacore.com>
Wed, 4 Mar 2020 10:32:57 +0000 (05:32 -0500)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 10 Jun 2020 13:34:56 +0000 (09:34 -0400)
commit948590aa2838a8b77dc8e48eb225312865303ce9
treee600055d883a50880014f59af2140cbfd9d83c45
parent71c4a2b35600a1177542b293cf075d6cf6d4dae4
[Ada] Incorrect accessibility checks on functions calls

2020-06-10  Justin Squirek  <squirek@adacore.com>

gcc/ada/

* exp_ch3.adb (Expand_N_Object_Declaration): Add condition to
handle processing of objects initialized by a call to a function
return an anonymous access type.
* exp_ch6.adb, exp_ch6.ads
(Has_Unconstrained_Access_Discriminants): Moved to sem_util.adb
(Needs_Result_Accessibility_Level): Moved to sem_util.adb
* sem_util.adb, sem_util.ads
(Has_Unconstrained_Access_Discriminants): Moved from exp_ch6.adb
(Needs_Result_Accessibility_Level): Moved from exp_ch6.adb
* sem_res.adb (Valid_Conversion): Add condition for the special
case where the operand of a conversion is the result of an
anonymous access type
gcc/ada/exp_ch3.adb
gcc/ada/exp_ch6.adb
gcc/ada/exp_ch6.ads
gcc/ada/sem_res.adb
gcc/ada/sem_util.adb
gcc/ada/sem_util.ads