No impact on compilation with GCC. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-07-09 Ed Schonberg gcc/ada/ * sem_util.adb (Scope_Within_Or_Same): Handle properly task bodies and protected bodies, so that local variables within have their proper scopes after these constructs have been rewritten during expansion. This patch resembles but is not identical to the code in Scope_Within.