diff options
author | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
---|---|---|
committer | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
commit | 554fd8c5195424bdbcabf5de30fdc183aba391bd (patch) | |
tree | 976dc5ab7fddf506dadce60ae936f43f58787092 /libjava/testsuite/libjava.lang/SyncGlobal.java | |
download | cbb-gcc-4.6.4-upstream.tar.bz2 cbb-gcc-4.6.4-upstream.tar.xz |
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig;
imported gcc-4.6.4 source tree from verified upstream tarball.
downloading a git-generated archive based on the 'upstream' tag
should provide you with a source tree that is binary identical
to the one extracted from the above tarball.
if you have obtained the source via the command 'git clone',
however, do note that line-endings of files in your working
directory might differ from line-endings of the respective
files in the upstream repository.
Diffstat (limited to 'libjava/testsuite/libjava.lang/SyncGlobal.java')
-rw-r--r-- | libjava/testsuite/libjava.lang/SyncGlobal.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libjava/testsuite/libjava.lang/SyncGlobal.java b/libjava/testsuite/libjava.lang/SyncGlobal.java new file mode 100644 index 000000000..63613958e --- /dev/null +++ b/libjava/testsuite/libjava.lang/SyncGlobal.java @@ -0,0 +1,24 @@ +// Test suitability of alignment of statically-allocated Objects. +class SyncGlobal +{ + private static final byte[] global_1 = { 1 }; + private static final byte[] global_2 = { 2, 3 }; + private static final byte[] global_3 = { 4, 5, 6 }; + private static final byte[] global_4 = { 7, 8, 9, 10 }; + private static final byte[] global_5 = { 11, 12, 13, 14, 15 }; + private static final byte[] global_6 = { 16, 17, 18, 19, 20, 21 }; + private static final byte[] global_7 = { 22, 23, 24, 25, 26, 27, 28 }; + private static final byte[] global_8 = { 29, 30, 31, 32, 33, 34, 35, 36 }; + + public static void main (String args[]) + { + synchronized (global_1) { System.out.println ("PASS1"); } + synchronized (global_2) { System.out.println ("PASS2"); } + synchronized (global_3) { System.out.println ("PASS3"); } + synchronized (global_4) { System.out.println ("PASS4"); } + synchronized (global_5) { System.out.println ("PASS5"); } + synchronized (global_6) { System.out.println ("PASS6"); } + synchronized (global_7) { System.out.println ("PASS7"); } + synchronized (global_8) { System.out.println ("PASS8"); } + } +} |