]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Visibility error on used enumerated type
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Nov 2018 11:41:09 +0000 (11:41 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Nov 2018 11:41:09 +0000 (11:41 +0000)
commit22fae0d1417c559b32384efadd151502cef2ee73
treeb276ce52e71a384ada6830fbeffcd3292664a52e
parent7bf769dfb3f8bd480cff575bfc7bd20caab122c5
[Ada] Visibility error on used enumerated type

This patch fixes an issue whereby the freezing of a nested package
containing an enumerated type declaration would cause visibility errors
on literals of such type when a use_all_type_clause for it appears
within the same declarative region.

2018-11-14  Justin Squirek  <squirek@adacore.com>

gcc/ada/

* sem_ch7.adb (Uninstall_Declarations): Add conditional to avoid
uninstalling potential visibility during freezing on enumeration
literals.

gcc/testsuite/

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

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