]> git.ipfire.org Git - thirdparty/gcc.git/commit
Ada: Fix prefixed-view notation rejected for discriminated private type
authorEric Botcazou <ebotcazou@adacore.com>
Sun, 1 Feb 2026 19:31:41 +0000 (20:31 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Sun, 1 Feb 2026 19:36:04 +0000 (20:36 +0100)
commite7853d31dd723eb8a1cb5ce34fad638fd255d9a8
tree4707e0d7121c30c338e4e4d8f73a664d368fa942
parent34217930444e0a7098cf7374bad0d5c41819c130
Ada: Fix prefixed-view notation rejected for discriminated private type

The problem comes from an oversight in Analyze_Selected_Component.

gcc/ada/
PR ada/123902
* sem_ch4.adb (Analyze_Selected_Component): Also test
Core_Extensions_Allowed for discriminated private types.
Rework and augment commentary throughout the procedure.

gcc/testsuite/
* gnat.dg/prefix4.adb: New test.
* gnat.dg/prefix4_pkg.ads: New helper.

Co-authored-by: Liam Powell <liam@liampwll.com>
gcc/ada/sem_ch4.adb
gcc/testsuite/gnat.dg/prefix4.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/prefix4_pkg.ads [new file with mode: 0644]