r260820 - in /trunk/gcc/ada: ChangeLog sem_prag...
pmderodat@gcc.gnu.org
pmderodat@gcc.gnu.org
Mon May 28 08:53:00 GMT 2018
Author: pmderodat
Date: Mon May 28 08:53:22 2018
New Revision: 260820
URL: https://gcc.gnu.org/viewcvs?rev=260820&root=gcc&view=rev
Log:
[Ada] Spurious error on aspect Volatile
This patch modifies the analysis of aspect/pragma Volatile to correct accept
the annotation when it applies to single protected and single task types, and
SPARK_Mode On is in effect.
------------
-- Source --
------------
-- pack.ads
package Pack with SPARK_Mode is
protected PO_Aspect with Volatile is end; -- OK
protected PO_Pragma is end;
pragma Volatile (PO_Pragma); -- OK
task TO_Aspect with Volatile; -- OK
task TO_Pragma;
pragma Volatile (TO_Pragma); -- OK
end Pack;
----------------------------
-- Compilation and output --
----------------------------
$ gcc -c pack.ads
$ gcc -c pack.ads -gnatd.F
cannot generate code for file pack.ads (package spec)
2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
gcc/ada/
* sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Include
the declarations of single concurrent types because they fall in the
category of full type and object declarations.
Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/sem_prag.adb
More information about the Gcc-cvs
mailing list