aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/utils.cc
diff options
context:
space:
mode:
authorGary Dismukes <dismukes@adacore.com>2022-09-28 13:22:26 -0400
committerMarc Poulhiès <poulhies@adacore.com>2022-10-06 11:22:48 +0200
commitf775d362aa73353ce07a51c259ca0a3e1f41ba3b (patch)
treef0d479cf5fa4f1fd678e4bd6967be04b44ab9b6a /gcc/ada/gcc-interface/utils.cc
parent3e7ff131f47f2a07c497af1c5b2df6bf1ba842fb (diff)
downloadgcc-f775d362aa73353ce07a51c259ca0a3e1f41ba3b.zip
gcc-f775d362aa73353ce07a51c259ca0a3e1f41ba3b.tar.gz
gcc-f775d362aa73353ce07a51c259ca0a3e1f41ba3b.tar.bz2
ada: Accessibility error incorrectly flagged on call within Pre'Class expression
The compiler was wrongly reporting an error on a function call within a Pre'Class expression when a formal of the aspect's subprogram was passed to an aliased formal. This occurred due to the call appearing with the return statement of the wrapper function created for the precondition, but the accessibility error check should only be done for return statements that appear in the source program. gcc/ada/ * sem_ch4.adb (Analyze_Call): Add test of Comes_From_Source on the enclosing subprogram's Entity_Id for determining whether to perform the compile-time accessibility check on actuals passed to aliased formals in a function call occurring within a return statement. That test excludes cases where the call occurs within the return statement of a Pre'Class wrapper function.
Diffstat (limited to 'gcc/ada/gcc-interface/utils.cc')
0 files changed, 0 insertions, 0 deletions