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
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
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
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
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
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