]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Avoid marking a ghost pragma twice
authorViljar Indus <indus@adacore.com>
Fri, 1 Aug 2025 10:20:38 +0000 (13:20 +0300)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 9 Sep 2025 12:39:55 +0000 (14:39 +0200)
commit43b631530d4e2d4be9bcebb70848aea50c535e6d
treebb0332e5055a311deb36be4d4bcbabe7f8209430
parentdb243f7f414828ff35ff53fa11c718394fe76522
ada: Avoid marking a ghost pragma twice

Previously all assertion level pragmas were marked based on the
current scope. Additionally some pragmas were marked afterwards
based on the relevant entity e.g. Pre. This would lead to cases
where a pragma was marked as both ignored and checked ghost pragma.

Each pragma should get marked only once based on their individual
semantics.

gcc/ada/ChangeLog:

* sem_prag.adb (Analyze_Pragma): Set Mark_Ghost_Code individually
based on the semantics of each pragma.
gcc/ada/sem_prag.adb