ada: Fix detection of non-static expressions in records with pragmas
commit70f609b01fde630141e683f9563545b8dff87ad6
authorPiotr Trojanek <trojanek@adacore.com>
Thu, 23 Mar 2023 17:46:08 +0000 (23 18:46 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Fri, 26 May 2023 07:29:18 +0000 (26 09:29 +0200)
tree9c9149d5a1d759c788dcbe7637c1c69562f66315
parent2688795b716b1ec75826e150c2d1dd04c88f3ad6
ada: Fix detection of non-static expressions in records with pragmas

When iterating over record components we must ignore pragmas.
Minor bug, as pragmas within record components do not appear often.

gcc/ada/

* sem_cat.adb (Check_Non_Static_Default_Expr): Detect components inside
loop, not in the loop condition itself.
gcc/ada/sem_cat.adb