This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
This patch corrects an oversight in the previous checkin for handling Atomic_Synchronization. This applies to types as well as to variables. 1. pragma Disable_Atomic_Synchronization; 2. procedure AtSyncT is 3. type Int is new Integer; 4. pragma Atomic (Int); 5. X : Int := 1; 6. Y : Int := 1; 7. 8. pragma Enable_Atomic_Synchronization (Int); 9. 10. begin 11. X := Y; 1 2 >>> info: atomic synchronization set for "X" >>> info: atomic synchronization set for "Y" 12. AtSyncT.Y := AtSyncT.X; 1 2 >>> info: atomic synchronization set for "Y" >>> info: atomic synchronization set for "X" 13. 14. declare 15. pragma Disable_Atomic_Synchronization (Int); 16. begin 17. X := Y; 18. end; 19. 20. X := Y; 1 2 >>> info: atomic synchronization set for "X" >>> info: atomic synchronization set for "Y" 21. end; Tested on x86_64-pc-linux-gnu, committed on trunk 2011-11-04 Robert Dewar <dewar@adacore.com> * exp_ch2.adb (Expand_Entity_Reference): Extend handling of atomic sync to type case. * sem_prag.adb (Process_Suppress_Unsuppress): Atomic Sync can apply to types.
Attachment:
difs
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |