From: Piotr Trojanek <[email protected]>
When a main subprogram had its CPU or priority specified first by an aspect
specification and then by a corresponding pragma, then the pragma was silently
ignored. Now such a pragma is rejected.
gcc/ada/ChangeLog:
* sem_ch13.adb (Analyze_Aspect_Specifications): Record aspect CPU and
Priority applied to subprogram as a representation item.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/sem_ch13.adb | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 7c13299f85f..158bdb1c516 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -4275,6 +4275,11 @@ package body Sem_Ch13 is
Discard_Node (RTE (RE_Activate_Tasks));
end if;
+ -- Record aspect specification as a representation item
+ -- to detect pragmas that would duplicate it.
+
+ Record_Rep_Item (E, Aspect);
+
-- Handling for these aspects in subprograms is complete
goto Continue;
--
2.53.0