]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Fix glitch in handling of Atomic_Components on generic formal type
authorPiotr Trojanek <trojanek@adacore.com>
Mon, 17 Mar 2025 11:57:26 +0000 (12:57 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 9 Jun 2025 06:32:13 +0000 (08:32 +0200)
commiteedc24854259a0e804040cfcc50a9c20f761f382
treeb3b3a8b7c93b2ddd848ec9748a4769f36c84dce4
parent3280bce431be5afb260fe59d01ef1deee38704e8
ada: Fix glitch in handling of Atomic_Components on generic formal type

In Ada 2022 aspects Atomic_Components and Volatile_Components can be specified
for a formal array type, but then they need to be set on the base type entity.
Otherwise we get an assertion failure in debug build and wrong legality errors
in production builds.

gcc/ada/ChangeLog:

* sem_prag.adb (Analyze_Pragma): If pragmas apply to a formal array
type, then set the flags on the base type.
gcc/ada/sem_prag.adb