Re: [Ada] Fix bogus error for 'Value invoked on function call and -gnatVa
Richard Biener <[email protected]> Sat, 1 Aug 2026 08:10:13 +0200
| Newsgroups | gmane.comp.gcc.patches |
|---|---|
| Message-ID | <[email protected]> |
> Am 31.07.2026 um 22:55 schrieb Eric Botcazou <[email protected]>: > > 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. > > Tested on x86-64/Linux, applied on the mainline. > > Jakub or Richard, I'd like to backport it for the 16.2 release, since it's a > trivial 1-liner that cannot break anything, instead of waiting for 16.3. Ok Richard > > 2026-07-31 Eric Botcazou <[email protected]> > > PR ada/126379 > * exp_ch6.adb (Insert_Post_Call_Actions): Also deal with attribute > references as parent node. > > > 2026-07-31 Eric Botcazou <[email protected]> > > * gnat.dg/validity_check3.adb: New test. > > -- > Eric Botcazou > <pr126379.diff> > <validity_check3.adb>