aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/widechar_intrinsics_10.f90
diff options
context:
space:
mode:
authorBen Cheng <bccheng@google.com>2014-03-25 22:37:19 -0700
committerBen Cheng <bccheng@google.com>2014-03-25 22:37:19 -0700
commit1bc5aee63eb72b341f506ad058502cd0361f0d10 (patch)
treec607e8252f3405424ff15bc2d00aa38dadbb2518 /gcc-4.9/gcc/testsuite/gfortran.dg/widechar_intrinsics_10.f90
parent283a0bf58fcf333c58a2a92c3ebbc41fb9eb1fdb (diff)
downloadtoolchain_gcc-1bc5aee63eb72b341f506ad058502cd0361f0d10.tar.gz
toolchain_gcc-1bc5aee63eb72b341f506ad058502cd0361f0d10.tar.bz2
toolchain_gcc-1bc5aee63eb72b341f506ad058502cd0361f0d10.zip
Initial checkin of GCC 4.9.0 from trunk (r208799).
Change-Id: I48a3c08bb98542aa215912a75f03c0890e497dba
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gfortran.dg/widechar_intrinsics_10.f90')
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.dg/widechar_intrinsics_10.f9089
1 files changed, 89 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gfortran.dg/widechar_intrinsics_10.f90 b/gcc-4.9/gcc/testsuite/gfortran.dg/widechar_intrinsics_10.f90
new file mode 100644
index 000000000..c961d93cf
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gfortran.dg/widechar_intrinsics_10.f90
@@ -0,0 +1,89 @@
+! { dg-do run }
+! { dg-options "-fbackslash" }
+
+ implicit none
+ character(kind=1,len=3) :: s1(3)
+ character(kind=4,len=3) :: s4(3)
+
+ s1 = [ "abc", "def", "ghi" ]
+ s4 = s1
+ s4 = [ "abc", "def", "ghi" ]
+
+ if (any (cshift (s1, 0) /= s1)) call abort
+ if (any (cshift (s4, 0) /= s4)) call abort
+ if (any (cshift (s1, 3) /= s1)) call abort
+ if (any (cshift (s4, 3) /= s4)) call abort
+ if (any (cshift (s1, 6) /= s1)) call abort
+ if (any (cshift (s4, 6) /= s4)) call abort
+ if (any (cshift (s1, -3) /= s1)) call abort
+ if (any (cshift (s4, -3) /= s4)) call abort
+ if (any (cshift (s1, -6) /= s1)) call abort
+ if (any (cshift (s4, -6) /= s4)) call abort
+
+ if (any (cshift (s1, 1) /= [ s1(2:3), s1(1) ])) call abort
+ if (any (cshift (s1, -1) /= [ s1(3), s1(1:2) ])) call abort
+ if (any (cshift (s1, 4) /= [ s1(2:3), s1(1) ])) call abort
+ if (any (cshift (s1, -4) /= [ s1(3), s1(1:2) ])) call abort
+
+ if (any (cshift (s4, 1) /= [ s4(2:3), s4(1) ])) call abort
+ if (any (cshift (s4, -1) /= [ s4(3), s4(1:2) ])) call abort
+ if (any (cshift (s4, 4) /= [ s4(2:3), s4(1) ])) call abort
+ if (any (cshift (s4, -4) /= [ s4(3), s4(1:2) ])) call abort
+
+ if (any (cshift (s1, 2) /= [ s1(3), s1(1:2) ])) call abort
+ if (any (cshift (s1, -2) /= [ s1(2:3), s1(1) ])) call abort
+ if (any (cshift (s1, 5) /= [ s1(3), s1(1:2) ])) call abort
+ if (any (cshift (s1, -5) /= [ s1(2:3), s1(1) ])) call abort
+
+ if (any (cshift (s4, 2) /= [ s4(3), s4(1:2) ])) call abort
+ if (any (cshift (s4, -2) /= [ s4(2:3), s4(1) ])) call abort
+ if (any (cshift (s4, 5) /= [ s4(3), s4(1:2) ])) call abort
+ if (any (cshift (s4, -5) /= [ s4(2:3), s4(1) ])) call abort
+
+
+ if (any (eoshift (s1, 0) /= s1)) call abort
+ if (any (eoshift (s4, 0) /= s4)) call abort
+ if (any (eoshift (s1, 3) /= "")) call abort
+ if (any (eoshift (s4, 3) /= 4_"")) call abort
+ if (any (eoshift (s1, 3, " ") /= "")) call abort
+ if (any (eoshift (s4, 3, 4_" ") /= 4_"")) call abort
+ if (any (eoshift (s1, 3, " x ") /= " x")) call abort
+ if (any (eoshift (s4, 3, 4_" x ") /= 4_" x")) call abort
+ if (any (eoshift (s1, -3) /= "")) call abort
+ if (any (eoshift (s4, -3) /= 4_"")) call abort
+ if (any (eoshift (s1, -3, " ") /= "")) call abort
+ if (any (eoshift (s4, -3, 4_" ") /= 4_"")) call abort
+ if (any (eoshift (s1, -3, " x ") /= " x")) call abort
+ if (any (eoshift (s4, -3, 4_" x ") /= 4_" x")) call abort
+ if (any (eoshift (s1, 4) /= "")) call abort
+ if (any (eoshift (s4, 4) /= 4_"")) call abort
+ if (any (eoshift (s1, 4, " ") /= "")) call abort
+ if (any (eoshift (s4, 4, 4_" ") /= 4_"")) call abort
+ if (any (eoshift (s1, 4, " x ") /= " x")) call abort
+ if (any (eoshift (s4, 4, 4_" x ") /= 4_" x")) call abort
+ if (any (eoshift (s1, -4) /= "")) call abort
+ if (any (eoshift (s4, -4) /= 4_"")) call abort
+ if (any (eoshift (s1, -4, " ") /= "")) call abort
+ if (any (eoshift (s4, -4, 4_" ") /= 4_"")) call abort
+ if (any (eoshift (s1, -4, " x ") /= " x")) call abort
+ if (any (eoshift (s4, -4, 4_" x ") /= 4_" x")) call abort
+
+ if (any (eoshift (s1, 1) /= [ s1(2:3), " " ])) call abort
+ if (any (eoshift (s1, -1) /= [ " ", s1(1:2) ])) call abort
+ if (any (eoshift (s1, 1, " x ") /= [ s1(2:3), " x " ])) call abort
+ if (any (eoshift (s1, -1, " x ") /= [ " x ", s1(1:2) ])) call abort
+ if (any (eoshift (s4, 1) /= [ s4(2:3), 4_" " ])) call abort
+ if (any (eoshift (s4, -1) /= [ 4_" ", s4(1:2) ])) call abort
+ if (any (eoshift (s4, 1, 4_" x ") /= [ s4(2:3), 4_" x " ])) call abort
+ if (any (eoshift (s4, -1, 4_" x ") /= [ 4_" x ", s4(1:2) ])) call abort
+
+ if (any (eoshift (s1, 2) /= [ s1(3), " ", " " ])) call abort
+ if (any (eoshift (s1, -2) /= [ " ", " ", s1(1) ])) call abort
+ if (any (eoshift (s1, 2, " x ") /= [ s1(3), " x ", " x " ])) call abort
+ if (any (eoshift (s1, -2, " x ") /= [ " x ", " x ", s1(1) ])) call abort
+ if (any (eoshift (s4, 2) /= [ s4(3), 4_" ", 4_" " ])) call abort
+ if (any (eoshift (s4, -2) /= [ 4_" ", 4_" ", s4(1) ])) call abort
+ if (any (eoshift (s4, 2, 4_" x ") /= [ s4(3), 4_" x ", 4_" x " ])) call abort
+ if (any (eoshift (s4, -2, 4_" x ") /= [ 4_" x ", 4_" x ", s4(1) ])) call abort
+
+end