[Ada] Incorrect accessibility check on return of discriminated type

2022-07-04 Thread Pierre-Marie de Rodat via Gcc-patches
This patch corrects an error in the compiler whereby the presence of a call to a function returning a type with an access discriminant within an expanded loop condition caused the wrong value to be supplied for the extra- accessibility-of-result actual, thus causing incorrect checks within the call

[Ada] Incorrect accessibility check

2019-07-05 Thread Pierre-Marie de Rodat
This patch fixes an issue whereby anonymous access result types were treated as having the same accessibility level as typed results instead of having the level determined by the "master of the call" as per RM 3.10.2 (10). -- Source -- -- main.adb with Pack_12; use Pac