[Bug ada/126379] bogus error for 'Value invoked on function call with In Out parameter and -gnatVa
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Aug 2 12:14:08 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126379
--- Comment #16 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Eric Botcazou
<ebotcazou@gcc.gnu.org>:
https://gcc.gnu.org/g:75e1d682f3e623f413024b2693311113d4052da0
commit r15-11451-g75e1d682f3e623f413024b2693311113d4052da0
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Fri Jul 31 20:18:15 2026 +0200
Ada: Fix bogus error for 'Value invoked on function call and -gnatVa
This happens when the function takes an In Out or Out parameter, so only in
Ada 2012 and later. The mechanism used to implement the validity check for
the call, required by -gnatVa, inserts the copy-out statement incorrectly.
gcc/ada/
PR ada/126379
* exp_ch6.adb (Insert_Post_Call_Actions): Also deal with attribute
references as parent node.
gcc/testsuite/
* gnat.dg/validity_check3.adb: New test.
More information about the Gcc-bugs
mailing list