[Ada] Missing accessibility check on access discriminant in extended return
2020-06-04 Justin Squirek <squirek@adacore.com>
gcc/ada/
* sem_ch6.adb (Check_Return_Obj_Accessibility): Change to
Check_Return_Construct_Accessibility to better reflect its
purpose. Add loop to properly obtain the object declaration
from an expanded extended return statement and add calls to get
the original node for associated values. Also, avoid checks when
the return statement being examined comes from an internally
generated function.