[Ada] Missing accessibility check when returning discriminated types

2021-10-20 Thread Pierre-Marie de Rodat via Gcc-patches
In some cases where a function result type has an access discriminant part, Ada requires that the execution of a return statement include a check that the access discriminant does not designate an object whose accessibility level is too deep (Ada RM 6.5(21)). This check was being incorrectly omitte

[Ada] Missing accessibility check on access discriminant in extended return

2020-06-04 Thread Pierre-Marie de Rodat
This patch fixes an issue whereby the compiler may fail to issue static accessibility errors on access discriminants within subtype indications within extended return statements. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-04 Justin Squirek gcc/ada/ * sem_ch6.adb (Check

[Ada] Missing accessibility check on access discriminants

2019-12-17 Thread Pierre-Marie de Rodat
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 x

[Ada] Missing accessibility check on discrim assignment

2019-09-18 Thread Pierre-Marie de Rodat
This patch fixes an issue whereby assignments from anonymous access descriminants which are part of stand alone objects of anonymous access did not have runtime checks generated based on the accessibility level of the object according to ARM 3.10.2 (12.5/3). Tested on x86_64-pc-linux-gnu, committe

[Ada] Missing accessibility check

2013-02-06 Thread Arnaud Charlet
This patch adds a missing case to the accessibility mechanism. The machinery can now recognize a rewritten interface conversion and properly extract the level of the operand. -- Source -- -- types.ads package Types is type Iface is limited interface; type Any_Ifa

[Ada] Missing accessibility check in anonymous access types

2011-08-02 Thread Arnaud Charlet
The compiler does not handle well the accessibility check of anonymous access types that are formals of anonymous access to subprogram components of record types. The execution of the program may crash or have unexpected behavior since the check is performed with an expected actual (the accessibili