--- libgfortran/gfortran.map.jj	2010-11-17 10:13:20.000000000 +0100
+++ libgfortran/gfortran.map	2011-02-16 10:54:46.979897353 +0100
@@ -1122,16 +1122,46 @@ GFORTRAN_1.4 {
     _gfortran_iall_i4;
     _gfortran_iall_i8;
     _gfortran_iall_i16;
+    _gfortran_miall_i1;
+    _gfortran_miall_i2;
+    _gfortran_miall_i4;
+    _gfortran_miall_i8;
+    _gfortran_miall_i16;
+    _gfortran_siall_i1;
+    _gfortran_siall_i2;
+    _gfortran_siall_i4;
+    _gfortran_siall_i8;
+    _gfortran_siall_i16;
     _gfortran_iany_i1;
     _gfortran_iany_i2;
     _gfortran_iany_i4;
     _gfortran_iany_i8;
     _gfortran_iany_i16;
+    _gfortran_miany_i1;
+    _gfortran_miany_i2;
+    _gfortran_miany_i4;
+    _gfortran_miany_i8;
+    _gfortran_miany_i16;
+    _gfortran_siany_i1;
+    _gfortran_siany_i2;
+    _gfortran_siany_i4;
+    _gfortran_siany_i8;
+    _gfortran_siany_i16;
     _gfortran_iparity_i1;
     _gfortran_iparity_i2;
     _gfortran_iparity_i4;
     _gfortran_iparity_i8;
     _gfortran_iparity_i16;
+    _gfortran_miparity_i1;
+    _gfortran_miparity_i2;
+    _gfortran_miparity_i4;
+    _gfortran_miparity_i8;
+    _gfortran_miparity_i16;
+    _gfortran_siparity_i1;
+    _gfortran_siparity_i2;
+    _gfortran_siparity_i4;
+    _gfortran_siparity_i8;
+    _gfortran_siparity_i16;
     _gfortran_norm2_r4;
     _gfortran_norm2_r8;
     _gfortran_norm2_r10;
@@ -1154,6 +1184,9 @@ GFORTRAN_1.4 {
     _gfortran_transfer_real_write;
     _gfortran_transfer_real128;
     _gfortran_transfer_real128_write;
+    _gfortran_cshift0_16_char4;
+    _gfortran_eoshift0_16_char4;
+    _gfortran_eoshift2_16_char4;
 } GFORTRAN_1.3; 
 
 F2C_1.0 {
--- gcc/testsuite/gfortran.dg/pr47757-1.f90.jj	2011-02-16 10:32:59.273764520 +0100
+++ gcc/testsuite/gfortran.dg/pr47757-1.f90	2011-02-16 10:35:12.370402168 +0100
@@ -0,0 +1,40 @@
+! PR libfortran/47757
+! { dg-do run }
+
+  integer(1) :: a1(2,2)
+  integer(2) :: a2(2,2)
+  integer(4) :: a4(2,2)
+  integer(8) :: a8(2,2)
+  logical :: mask(2,2)
+  logical :: mask2
+  a1 = 0
+  a2 = 0
+  a3 = 0
+  a4 = 0
+  mask2 = .true.
+  mask = reshape([.true.,.true.,.false.,.true.],[2,2])
+  print *, iany(a1, dim=1, mask=mask)
+  print *, iany(a2, dim=1, mask=mask)
+  print *, iany(a4, dim=1, mask=mask)
+  print *, iany(a8, dim=1, mask=mask)
+  print *, iall(a1, dim=1, mask=mask)
+  print *, iall(a2, dim=1, mask=mask)
+  print *, iall(a4, dim=1, mask=mask)
+  print *, iall(a8, dim=1, mask=mask)
+  print *, iparity(a1, dim=1, mask=mask)
+  print *, iparity(a2, dim=1, mask=mask)
+  print *, iparity(a4, dim=1, mask=mask)
+  print *, iparity(a8, dim=1, mask=mask)
+  print *, iany(a1, dim=1, mask=mask2)
+  print *, iany(a2, dim=1, mask=mask2)
+  print *, iany(a4, dim=1, mask=mask2)
+  print *, iany(a8, dim=1, mask=mask2)
+  print *, iall(a1, dim=1, mask=mask2)
+  print *, iall(a2, dim=1, mask=mask2)
+  print *, iall(a4, dim=1, mask=mask2)
+  print *, iall(a8, dim=1, mask=mask2)
+  print *, iparity(a1, dim=1, mask=mask2)
+  print *, iparity(a2, dim=1, mask=mask2)
+  print *, iparity(a4, dim=1, mask=mask2)
+  print *, iparity(a8, dim=1, mask=mask2)
+end
--- gcc/testsuite/gfortran.dg/pr47757-2.f90.jj	2011-02-16 10:33:09.269420078 +0100
+++ gcc/testsuite/gfortran.dg/pr47757-2.f90	2011-02-16 10:50:30.057714582 +0100
@@ -0,0 +1,16 @@
+! PR libfortran/47757
+! { dg-do run { target fortran_large_int } }
+
+  integer(16) :: a16(2,2)
+  logical :: mask(2,2)
+  logical :: mask2
+  a16 = 0
+  mask2 = .true.
+  mask = reshape([.true.,.true.,.false.,.true.],[2,2])
+  print *, iany(a16, dim=1, mask=mask)
+  print *, iall(a16, dim=1, mask=mask)
+  print *, iparity(a16, dim=1, mask=mask)
+  print *, iany(a16, dim=1, mask=mask2)
+  print *, iall(a16, dim=1, mask=mask2)
+  print *, iparity(a16, dim=1, mask=mask2)
+end
--- gcc/testsuite/gfortran.dg/pr47757-3.f90.jj	2011-02-16 10:35:25.864388810 +0100
+++ gcc/testsuite/gfortran.dg/pr47757-3.f90	2011-02-16 10:50:41.550388829 +0100
@@ -0,0 +1,12 @@
+! PR libfortran/47757
+! { dg-do run { target fortran_large_int } }
+
+  character(kind=4):: str(3,3), s(3)
+  str(1,:) = [4_'A', 4_'b', 4_'C']
+  str(2,:) = [4_'A', 4_'b', 4_'C']
+  str(3,:) = [4_'A', 4_'b', 4_'C']
+  s = 4_'A'
+  print *, cshift(str, shift=2_16, dim=1_16)
+  print *, eoshift(str, shift=2_16, dim=1_16)
+  print *, eoshift(str, shift=2_16, boundary=s, dim=1_16)
+end
