[Ada] Missing accessibility check on access discriminants
Pierre-Marie de Rodat
derodat@adacore.com
Wed Dec 18 07:28:00 GMT 2019
This patch fixes an issue whereby compile-time checks on return
aggregates with anonymous access discriminants were not performed when
multiple of such discriminants were present, the aggregate was within an
extended return statement, or the aggregate was within a qualified
expression.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-12-18 Justin Squirek <squirek@adacore.com>
gcc/ada/
* sem_ch6.adb (Analyze_Function_Return): Modify handling of
extended return statements to check accessibility of access
discriminants.
(Check_Aggregate_Accessibility): Removed.
(Check_Return_Obj_Accessibility): Added to centralize checking
of return aggregates and subtype indications in the case of an
extended return statement.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 10446 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20191218/9c8c2f2f/attachment.bin>
More information about the Gcc-patches
mailing list