diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2010-07-23 19:37:40 +0000 |
---|---|---|
committer | H.J. Lu <hongjiu.lu@intel.com> | 2010-07-23 19:37:40 +0000 |
commit | e59b0ef2e7a1fb44791d473ee416aeb01fcb169c (patch) | |
tree | 437dca120093cc7b1f6debf6f6b31779526c7192 /gcc/testsuite/gnat.dg/atomic3.adb | |
parent | f25b023a0d9de6a6c1e1965d93ba6028cb03fc7d (diff) | |
parent | 92ac755201aad4366eaff2b75b3239637bee3590 (diff) |
Merged with trunk at revision 162480.ifunc
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/ifunc@162483 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gnat.dg/atomic3.adb')
-rw-r--r-- | gcc/testsuite/gnat.dg/atomic3.adb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/atomic3.adb b/gcc/testsuite/gnat.dg/atomic3.adb new file mode 100644 index 00000000000..592a856caef --- /dev/null +++ b/gcc/testsuite/gnat.dg/atomic3.adb @@ -0,0 +1,24 @@ +-- { dg-do compile } + +procedure Atomic3 is + + type Unsigned_32_T is mod 2 ** 32; + for Unsigned_32_T'Size use 32; + + type Id_T is (One, Two, Three); + + type Array_T is array (Id_T) of Unsigned_32_T; + pragma Atomic_Components (Array_T); + + A : Array_T := (others => 0); + + function Get_Array return Array_T is + begin + return A; + end; + + X : Array_T; + +begin + X := Get_Array; +end; |