]> git.ipfire.org Git - thirdparty/gcc.git/commit
Ada: Fix spurious visibility issue with qualified aggregate in instantiation
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 29 Oct 2025 23:33:36 +0000 (00:33 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Thu, 30 Oct 2025 00:38:29 +0000 (01:38 +0100)
commitc2b3d5e23ec92fca5852d607a4e2348fb011f3a7
treea6221816daaa1bb39e18429c166992aa02589777
parent28a10da664ee496b5c7f774b173100c8a22cbef3
Ada: Fix spurious visibility issue with qualified aggregate in instantiation

Aggregates used as actuals of formal object parameters are handled specially
by Instantiate_Object in Sem_Ch12 and qualifying them is sufficient to block
this special processing.

gcc/ada/
PR ada/54178
* sem_ch12.adb (Instantiate_Object): Strip qualification to detect
aggregates used as actuals.

gcc/testsuite/
* gnat.dg/aggr32.adb: New test.
* gnat.dg/aggr32_pkg.ads: New helper.
* gnat.dg/aggr32_pkg-child.ads: Likewise.
gcc/ada/sem_ch12.adb
gcc/testsuite/gnat.dg/aggr32.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/aggr32_pkg-child.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/aggr32_pkg.ads [new file with mode: 0644]