]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/ada/ChangeLog
[Ada] Wrong accessibility level under -gnat12
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 5 Jul 2019 07:02:46 +0000 (07:02 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 5 Jul 2019 07:02:46 +0000 (07:02 +0000)
commit0e6f6ee178d66285505351c27a73f4d39d0eed17
tree160dcd1b3ea263365e0e36844a46f56c5e69bbb5
parentf28a3d6c447309f05fd4031622e6d709058fa8cc
[Ada] Wrong accessibility level under -gnat12

For an anonymous allocator whose type is that of a stand-alone object of
an anonymous access-to-object type, the accessibility level is that of
the declaration of the stand-alone object; however it was incorrectly
computed as being library level compiling under -gnat12 mode.

2019-07-05  Javier Miranda  <miranda@adacore.com>

gcc/ada/

* exp_ch4.adb (Expand_N_Type_Conversion): Do not apply an
accessibility check when the conversion is an access to
class-wide interface type and it is an actual parameter.
* exp_ch6.adb (Expand_Call_Helper): Add documentation on the
accessibility level of an anonymous allocator defining the value
of an access parameter.
* sem_util.ads, sem_util.adb (Dynamic_Accessibility_Level): Add
support for an anonymous allocator whose type is that of a
stand-alone object of an anonymous access to object type.

gcc/testsuite/

* gnat.dg/access6.adb: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@273115 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/exp_ch4.adb
gcc/ada/exp_ch6.adb
gcc/ada/sem_util.adb
gcc/ada/sem_util.ads
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/access6.adb [new file with mode: 0644]