diff -Nrcpad gcc-13-20260715/LAST_UPDATED gcc-13-20260722/LAST_UPDATED
*** gcc-13-20260715/LAST_UPDATED	Wed Jul 15 22:32:21 2026
--- gcc-13-20260722/LAST_UPDATED	Wed Jul 22 22:32:23 2026
***************
*** 1 ****
! Obtained from git: releases/gcc-13 revision b8f6cf42cf8972e9ee7adf4150f06703a35b2eb6
--- 1 ----
! Obtained from git: releases/gcc-13 revision 911129c4c59a1d0603683d1dfc1756a3ded90d5c
diff -Nrcpad gcc-13-20260715/MD5SUMS gcc-13-20260722/MD5SUMS
*** gcc-13-20260715/MD5SUMS	Wed Jul 15 22:32:25 2026
--- gcc-13-20260722/MD5SUMS	Wed Jul 22 22:32:28 2026
***************
*** 1,5 ****
  # This file contains the MD5 checksums of the files in the
! # gcc-13-20260715.tar.xz tarball.
  #
  # Besides verifying that all files in the tarball were correctly expanded,
  # it also can be used to determine if any files have changed since the
--- 1,5 ----
  # This file contains the MD5 checksums of the files in the
! # gcc-13-20260722.tar.xz tarball.
  #
  # Besides verifying that all files in the tarball were correctly expanded,
  # it also can be used to determine if any files have changed since the
*************** d32239bcb673463ab874e80d47fae504  COPYIN
*** 21,27 ****
  fd4ecdf5d672efe2b0e409aca9cf9446  ChangeLog.jit
  09538b708302f1735f6fa05b622ecf5e  ChangeLog.tree-ssa
  24ab760126489e69436a43185dc3d202  INSTALL/README
! 1fe760a5ea121a550af1fb955333b912  LAST_UPDATED
  81b3330d422f3ce1ef8b720dfae35068  MAINTAINERS
  2b61ddbd876fa839639a7ca551773426  Makefile.def
  5d2d6a74f897f8158d37f5f2ec6877ce  Makefile.in
--- 21,27 ----
  fd4ecdf5d672efe2b0e409aca9cf9446  ChangeLog.jit
  09538b708302f1735f6fa05b622ecf5e  ChangeLog.tree-ssa
  24ab760126489e69436a43185dc3d202  INSTALL/README
! 6c6e17dfe7774dfdb9aa421447eaf2dd  LAST_UPDATED
  81b3330d422f3ce1ef8b720dfae35068  MAINTAINERS
  2b61ddbd876fa839639a7ca551773426  Makefile.def
  5d2d6a74f897f8158d37f5f2ec6877ce  Makefile.in
*************** fb3fadb88e1d2b3b640cfaaa5ff11780  gcc/Ch
*** 510,516 ****
  3eb07e0b2e542409bf73d359f7f65609  gcc/ChangeLog.ptr
  e13638e26743ba41e6011b76cc00d9a9  gcc/ChangeLog.tree-ssa
  739ab47f6425bcea1d05e4fc0542de54  gcc/ChangeLog.tuples
! b2fe402e4e134d0851eb02507afe88ac  gcc/DATESTAMP
  d41d8cd98f00b204e9800998ecf8427e  gcc/DEV-PHASE
  eb92e1ff5e982ca07e173e0eb286d243  gcc/FSFChangeLog
  30e1e33411566388b3164558482dc5e6  gcc/FSFChangeLog.10
--- 510,516 ----
  3eb07e0b2e542409bf73d359f7f65609  gcc/ChangeLog.ptr
  e13638e26743ba41e6011b76cc00d9a9  gcc/ChangeLog.tree-ssa
  739ab47f6425bcea1d05e4fc0542de54  gcc/ChangeLog.tuples
! 653cd0fea9c6d3b96a7ce0f6ab6ffde7  gcc/DATESTAMP
  d41d8cd98f00b204e9800998ecf8427e  gcc/DEV-PHASE
  eb92e1ff5e982ca07e173e0eb286d243  gcc/FSFChangeLog
  30e1e33411566388b3164558482dc5e6  gcc/FSFChangeLog.10
*************** c2dbf831f4bbc53553765214d1b2d674  gcc/fl
*** 5576,5582 ****
  46538296abcbd26df93f276f5974ec0f  gcc/fold-const-call.h
  e091b0ed4e31525d6d685d5e6f7a7fa0  gcc/fold-const.cc
  9dd2c87502c864095a8b942bea07b5f3  gcc/fold-const.h
! 34004fd4f6415f13606a50146900d942  gcc/fortran/ChangeLog
  3330102ad3a0217cba963be6b5eefd58  gcc/fortran/ChangeLog-2002
  d000ab985b1eeb1ad5749f98b8fef99f  gcc/fortran/ChangeLog-2003
  bf42f94f0c51dcc7d8051cc7fda1efdc  gcc/fortran/ChangeLog-2004
--- 5576,5582 ----
  46538296abcbd26df93f276f5974ec0f  gcc/fold-const-call.h
  e091b0ed4e31525d6d685d5e6f7a7fa0  gcc/fold-const.cc
  9dd2c87502c864095a8b942bea07b5f3  gcc/fold-const.h
! a24a88aab7cb423c80a2379481f9410f  gcc/fortran/ChangeLog
  3330102ad3a0217cba963be6b5eefd58  gcc/fortran/ChangeLog-2002
  d000ab985b1eeb1ad5749f98b8fef99f  gcc/fortran/ChangeLog-2003
  bf42f94f0c51dcc7d8051cc7fda1efdc  gcc/fortran/ChangeLog-2004
*************** d7be9766180ba9d84c17fe538c02907f  gcc/fo
*** 5659,5665 ****
  f517590a45dbb7448f8bdabbb424c775  gcc/fortran/symbol.cc
  e99e43daa5fef5f3d2c6dce6be81a683  gcc/fortran/target-memory.cc
  70445c82cc8c84eb76adf2a52acad00d  gcc/fortran/target-memory.h
! 58e546cf9b9d8cae6a139cd3aa0f2049  gcc/fortran/trans-array.cc
  23946ddd5d17c204402c44a0b9a00d75  gcc/fortran/trans-array.h
  4c2eb969dbee5d6b83074ed09773b70b  gcc/fortran/trans-common.cc
  45ab297b0b34853431ed0f3c09a63db3  gcc/fortran/trans-const.cc
--- 5659,5665 ----
  f517590a45dbb7448f8bdabbb424c775  gcc/fortran/symbol.cc
  e99e43daa5fef5f3d2c6dce6be81a683  gcc/fortran/target-memory.cc
  70445c82cc8c84eb76adf2a52acad00d  gcc/fortran/target-memory.h
! a0564053d153378bb6f52b60bd869d73  gcc/fortran/trans-array.cc
  23946ddd5d17c204402c44a0b9a00d75  gcc/fortran/trans-array.h
  4c2eb969dbee5d6b83074ed09773b70b  gcc/fortran/trans-common.cc
  45ab297b0b34853431ed0f3c09a63db3  gcc/fortran/trans-const.cc
*************** b829ed0032c899e107be2db349c913f3  gcc/ta
*** 7637,7643 ****
  811da275a2b9d3186a6decf96c01b0ed  gcc/targhooks.cc
  edb193a32070c4a7626fb75382def9b9  gcc/targhooks.h
  f39fcaa8197187283ccfed40107b426d  gcc/testsuite/.gitattributes
! f81542cf32b15b8f793761620fd0563b  gcc/testsuite/ChangeLog
  862f04afbd87da2cc6bc432c3f28430f  gcc/testsuite/ChangeLog-1993-2007
  029a5d8dacd25eb5d4711452ac448e5b  gcc/testsuite/ChangeLog-2008
  13ac28c41d51b66b4ec40dba6bd50f39  gcc/testsuite/ChangeLog-2009
--- 7637,7643 ----
  811da275a2b9d3186a6decf96c01b0ed  gcc/targhooks.cc
  edb193a32070c4a7626fb75382def9b9  gcc/targhooks.h
  f39fcaa8197187283ccfed40107b426d  gcc/testsuite/.gitattributes
! affad90f4580d639caaae77b864be112  gcc/testsuite/ChangeLog
  862f04afbd87da2cc6bc432c3f28430f  gcc/testsuite/ChangeLog-1993-2007
  029a5d8dacd25eb5d4711452ac448e5b  gcc/testsuite/ChangeLog-2008
  13ac28c41d51b66b4ec40dba6bd50f39  gcc/testsuite/ChangeLog-2009
*************** d679116c9da43355228e413e4d728bf6  gcc/te
*** 85957,85962 ****
--- 85957,85963 ----
  cb50185eaf87f5357dad5873642eec33  gcc/testsuite/gfortran.dg/contiguous_11.f90
  68eb9244ed2d584beb39fffd7e64f96d  gcc/testsuite/gfortran.dg/contiguous_12.f90
  8621637c284842966acb59cdbfe4e51a  gcc/testsuite/gfortran.dg/contiguous_15.f90
+ dc2299cf4c7a62af39c55807bb5e6d36  gcc/testsuite/gfortran.dg/contiguous_17.f90
  9975df3f787a3eaea63dd5664ff235eb  gcc/testsuite/gfortran.dg/contiguous_2.f90
  a59d0430a52a3cf47c280856725dee23  gcc/testsuite/gfortran.dg/contiguous_3.f90
  b81d56e35fe81ed4c9f6f67cca8a0ab2  gcc/testsuite/gfortran.dg/contiguous_4.f90
diff -Nrcpad gcc-13-20260715/gcc/DATESTAMP gcc-13-20260722/gcc/DATESTAMP
*** gcc-13-20260715/gcc/DATESTAMP	Wed Jul 15 22:32:06 2026
--- gcc-13-20260722/gcc/DATESTAMP	Wed Jul 22 22:32:06 2026
***************
*** 1 ****
! 20260715
--- 1 ----
! 20260722
diff -Nrcpad gcc-13-20260715/gcc/fortran/ChangeLog gcc-13-20260722/gcc/fortran/ChangeLog
*** gcc-13-20260715/gcc/fortran/ChangeLog	Wed Jul 15 22:32:08 2026
--- gcc-13-20260722/gcc/fortran/ChangeLog	Wed Jul 22 22:32:08 2026
***************
*** 1,3 ****
--- 1,15 ----
+ 2026-07-20  Mikael Morin  <mikael@gcc.gnu.org>
+ 
+ 	Backported from master:
+ 	2026-07-03  Mikael Morin  <mikael@gcc.gnu.org>
+ 
+ 	PR fortran/97592
+ 	PR fortran/125998
+ 	* trans-array.cc (gfc_conv_array_parameter): Always create a new
+ 	descriptor.  Copy lbound and ubound from the original descriptor
+ 	using matching dimension indexes.  Recalculate stride and
+ 	offset.
+ 
  2026-07-09  Christopher Albert  <albert@tugraz.at>
  
  	Backported from master:
diff -Nrcpad gcc-13-20260715/gcc/fortran/trans-array.cc gcc-13-20260722/gcc/fortran/trans-array.cc
*** gcc-13-20260715/gcc/fortran/trans-array.cc	Wed Jul 15 22:32:08 2026
--- gcc-13-20260722/gcc/fortran/trans-array.cc	Wed Jul 22 22:32:08 2026
*************** gfc_conv_array_parameter (gfc_se * se, g
*** 8679,8727 ****
  	{
  	  tmp = build_fold_indirect_ref_loc (input_location, desc);
  
! 	  gfc_ss * ss = gfc_walk_expr (expr);
! 	  if (!transposed_dims (ss))
! 	    gfc_conv_descriptor_data_set (&se->pre, tmp, ptr);
! 	  else
  	    {
! 	      tree old_field, new_field;
  
! 	      /* The original descriptor has transposed dims so we can't reuse
! 		 it directly; we have to create a new one.  */
! 	      tree old_desc = tmp;
! 	      tree new_desc = gfc_create_var (TREE_TYPE (old_desc), "arg_desc");
  
! 	      old_field = gfc_conv_descriptor_dtype (old_desc);
! 	      new_field = gfc_conv_descriptor_dtype (new_desc);
! 	      gfc_add_modify (&se->pre, new_field, old_field);
  
! 	      old_field = gfc_conv_descriptor_offset (old_desc);
! 	      new_field = gfc_conv_descriptor_offset (new_desc);
! 	      gfc_add_modify (&se->pre, new_field, old_field);
  
! 	      for (int i = 0; i < expr->rank; i++)
! 		{
! 		  old_field = gfc_conv_descriptor_dimension (old_desc,
! 			gfc_rank_cst[get_array_ref_dim_for_loop_dim (ss, i)]);
! 		  new_field = gfc_conv_descriptor_dimension (new_desc,
! 			gfc_rank_cst[i]);
! 		  gfc_add_modify (&se->pre, new_field, old_field);
! 		}
  
! 	      if (flag_coarray == GFC_FCOARRAY_LIB
! 		  && GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (old_desc))
! 		  && GFC_TYPE_ARRAY_AKIND (TREE_TYPE (old_desc))
! 		     == GFC_ARRAY_ALLOCATABLE)
! 		{
! 		  old_field = gfc_conv_descriptor_token (old_desc);
! 		  new_field = gfc_conv_descriptor_token (new_desc);
! 		  gfc_add_modify (&se->pre, new_field, old_field);
! 		}
  
! 	      gfc_conv_descriptor_data_set (&se->pre, new_desc, ptr);
! 	      se->expr = gfc_build_addr_expr (NULL_TREE, new_desc);
  	    }
! 	  gfc_free_ss (ss);
  	}
  
        if (gfc_option.rtcheck & GFC_RTCHECK_ARRAY_TEMPS)
--- 8679,8753 ----
  	{
  	  tmp = build_fold_indirect_ref_loc (input_location, desc);
  
! 	  /* The original descriptor may have transposed dims so we
! 	     can't reuse it directly; we have to create a new one.  */
! 	  tree old_field, new_field;
! 
! 	  tree old_desc = tmp;
! 	  tree new_desc = gfc_create_var (TREE_TYPE (old_desc), "arg_desc");
! 
! 	  tree offset = gfc_index_zero_node;
! 
! 	  tree stride = gfc_index_one_node;
! 
! 	  for (int i = 0; i < expr->rank; i++)
  	    {
! 	      tree dim = gfc_rank_cst[i];
  
! 	      tree lbound = gfc_conv_descriptor_lbound_get (old_desc,
! 							    dim);
! 	      lbound = gfc_evaluate_now (lbound, &se->pre);
! 	      gfc_conv_descriptor_lbound_set (&se->pre, new_desc, dim,
! 					      lbound);
  
! 	      tree ubound = gfc_conv_descriptor_ubound_get (old_desc,
! 							    dim);
! 	      ubound = gfc_evaluate_now (ubound, &se->pre);
! 	      gfc_conv_descriptor_ubound_set (&se->pre, new_desc, dim,
! 					      ubound);
  
! 	      gfc_conv_descriptor_stride_set (&se->pre, new_desc, dim,
! 					      stride);
  
! 	      tree tmp = fold_build2_loc (input_location, MULT_EXPR,
! 					  gfc_array_index_type,
! 					  stride, lbound);
! 	      offset = fold_build2_loc (input_location, MINUS_EXPR,
! 					gfc_array_index_type,
! 					offset, tmp);
! 	      offset = gfc_evaluate_now (offset, &se->pre);
  
! 	      /* Now calculate the stride for next dimension, unless the
! 		 current dimension is the last one.  */
! 	      if (i == expr->rank - 1)
! 		break;
  
! 	      tmp = fold_build2_loc (input_location, MINUS_EXPR,
! 				     gfc_array_index_type,
! 				     lbound, gfc_index_one_node);
! 	      tree extent = fold_build2_loc (input_location, MINUS_EXPR,
! 					     gfc_array_index_type,
! 					     ubound, tmp);
! 	      stride = fold_build2_loc (input_location, MULT_EXPR,
! 					gfc_array_index_type,
! 					stride, extent);
! 	      stride = gfc_evaluate_now (stride, &se->pre);
  	    }
! 
! 	  gfc_conv_descriptor_offset_set (&se->pre, new_desc, offset);
! 
! 	  if (flag_coarray == GFC_FCOARRAY_LIB
! 	      && GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (old_desc))
! 	      && GFC_TYPE_ARRAY_AKIND (TREE_TYPE (old_desc))
! 		 == GFC_ARRAY_ALLOCATABLE)
! 	    {
! 	      old_field = gfc_conv_descriptor_token (old_desc);
! 	      new_field = gfc_conv_descriptor_token (new_desc);
! 	      gfc_add_modify (&se->pre, new_field, old_field);
! 	    }
! 
! 	  gfc_conv_descriptor_data_set (&se->pre, new_desc, ptr);
! 	  se->expr = gfc_build_addr_expr (NULL_TREE, new_desc);
  	}
  
        if (gfc_option.rtcheck & GFC_RTCHECK_ARRAY_TEMPS)
diff -Nrcpad gcc-13-20260715/gcc/testsuite/ChangeLog gcc-13-20260722/gcc/testsuite/ChangeLog
*** gcc-13-20260715/gcc/testsuite/ChangeLog	Wed Jul 15 22:32:10 2026
--- gcc-13-20260722/gcc/testsuite/ChangeLog	Wed Jul 22 22:32:10 2026
***************
*** 1,3 ****
--- 1,12 ----
+ 2026-07-20  Mikael Morin  <mikael@gcc.gnu.org>
+ 
+ 	Backported from master:
+ 	2026-07-03  Mikael Morin  <mikael@gcc.gnu.org>
+ 
+ 	PR fortran/97592
+ 	PR fortran/125998
+ 	* gfortran.dg/contiguous_17.f90: New test.
+ 
  2026-07-09  Christopher Albert  <albert@tugraz.at>
  
  	Backported from master:
diff -Nrcpad gcc-13-20260715/gcc/testsuite/gfortran.dg/contiguous_17.f90 gcc-13-20260722/gcc/testsuite/gfortran.dg/contiguous_17.f90
*** gcc-13-20260715/gcc/testsuite/gfortran.dg/contiguous_17.f90	Thu Jan  1 00:00:00 1970
--- gcc-13-20260722/gcc/testsuite/gfortran.dg/contiguous_17.f90	Wed Jul 22 22:32:16 2026
***************
*** 0 ****
--- 1,229 ----
+ ! { dg-do run }
+ !
+ ! PR fortran/125998
+ ! Check the correct passing of a transposed array to an assumed-shape dummy
+ ! having the contiguous and target attributes.
+ !
+ ! Original testcase from Federico Perini <federico.perini@gmail.com>
+ 
+ subroutine original
+     real(8) :: a(3,4)
+     integer :: dims(2)           
+     character(48) :: iomsg  
+     call show(transpose(a),dims)
+     if (any(dims/=shape(transpose(a)))) then 
+         write(iomsg,1) 'invalid a^T dims',dims, &
+                        ' should be',shape(transpose(a))
+         error stop iomsg
+     endif
+     1 format(*(a,' [',i0,',',i0,']'))
+ 
+ contains
+ 
+     subroutine show(x,dims)
+         ! "3 4" with `contiguous` (BUG); "4 3" without
+         real(8), intent(in), target, contiguous :: x(:,:)
+         integer, intent(out) :: dims(2)    
+         dims = [size(x,1),size(x,2)]
+     end 
+ 
+ end
+ 
+ module m
+     implicit none
+     private
+     public :: check_all
+ 
+ contains
+ 
+     subroutine abort_different(lx,x,ly,y,code)
+         character(*), intent(in) :: lx, ly
+         integer, intent(in) :: x(..), y(..), code
+         write(6,'(a," /= ",a)') lx, ly
+         select rank(x)
+             rank(1)
+                 write(6,3) lx
+                 write(6,*) x
+             rank(2)
+                 write(6,3) lx
+                 write(6,*) x
+             rank default
+         end select
+         select rank(y)
+             rank(1)
+                 write(6,3) ly
+                 write(6,*) y
+             rank(2)
+                 write(6,3) ly
+                 write(6,*) y
+             rank default
+         end select
+         error stop code
+       3 format(a,":")
+     end subroutine
+ 
+     subroutine check_target(x,expected,num_error)
+         integer, intent(in), target, contiguous :: x(:,:)
+         integer, intent(in) :: num_error, expected(:,:)
+         if (any(shape(x) /= shape(expected))) then
+             call abort_different( &
+                     "shape(x)",shape(x), &
+                     "shape(expected)",shape(expected), &
+                     num_error*10+1 &
+             )
+         end if
+         if (any(x /= expected)) then
+             call abort_different("x",x,"expected",expected,num_error*10+2)
+         end if
+         if (x(2,2) /= expected(2,2)) then
+             call abort_different( &
+                 "x(2,2)",x(2,2), &
+                 "expected(2,2)",expected(2,2), &
+                 num_error*10+3 &
+             )
+         end if
+     end 
+ 
+     subroutine check_non_target(x,expected,num_error)
+         integer, intent(in), contiguous :: x(:,:)
+         integer, intent(in) :: num_error, expected(:,:)
+         if (any(shape(x) /= shape(expected))) then
+             call abort_different( &
+                     "shape(x)",shape(x), &
+                     "shape(expected)",shape(expected), &
+                     num_error*10+1 &
+             )
+         end if
+         if (any(x /= expected)) then
+             call abort_different("x",x,"expected",expected,num_error*10+2)
+         end if
+         if (x(2,2) /= expected(2,2)) then
+             call abort_different( &
+                 "x(2,2)",x(2,2), &
+                 "expected(2,2)",expected(2,2), &
+                 num_error*10+3 &
+             )
+         end if
+     end 
+ 
+     subroutine wrapper_target(x,expected,num_error)
+         integer, intent(in), target :: x(:,:)
+         integer, intent(in) :: expected(:,:)
+         integer, intent(in) :: num_error
+         call check_target(x,expected,num_error)
+     end subroutine
+ 
+     subroutine wrapper_non_target(x,expected,num_error)
+         integer, intent(in) :: x(:,:), expected(:,:)
+         integer, intent(in) :: num_error
+         call check_non_target(x,expected,num_error)
+     end subroutine
+ 
+     subroutine wrapper_transpose_target(x,expected,num_error)
+         integer, intent(in), target :: x(:,:)
+         integer, intent(in) :: expected(:,:)
+         integer, intent(in) :: num_error
+         call check_target(transpose(x),expected,num_error)
+     end subroutine
+ 
+     subroutine wrapper_transpose_non_target(x,expected,num_error)
+         integer, intent(in) :: x(:,:), expected(:,:)
+         integer, intent(in) :: num_error
+         call check_non_target(transpose(x),expected,num_error)
+     end subroutine
+ 
+     subroutine check_all
+         integer :: a(3,4)
+ 
+         a = reshape([0,1,1,2,3,5,8,13,21,34,55,89],shape(a))
+         call check_target( &
+                 transpose(a), &
+                 reshape([0,2,8,34,1,3,13,55,1,5,21,89],[4,3]), &
+                 1 &
+         )
+ 
+         a = reshape([0,1,1,2,3,5,8,13,21,34,55,89],shape(a))
+         call check_non_target( &
+                 transpose(a), &
+                 reshape([0,2,8,34,1,3,13,55,1,5,21,89],[4,3]), &
+                 2 &
+         )
+ 
+         a = reshape([0,1,1,2,3,5,8,13,21,34,55,89],shape(a))
+         call wrapper_target( &
+                 transpose(a), &
+                 reshape([0,2,8,34,1,3,13,55,1,5,21,89],[4,3]), &
+                 3 &
+         )
+ 
+         a = reshape([0,1,1,2,3,5,8,13,21,34,55,89],shape(a))
+         call wrapper_non_target( &
+                 transpose(a), &
+                 reshape([0,2,8,34,1,3,13,55,1,5,21,89],[4,3]), &
+                 4 &
+         )
+ 
+         a = reshape([0,1,1,2,3,5,8,13,21,34,55,89],shape(a))
+         call wrapper_transpose_target( &
+                 a, &
+                 reshape([0,2,8,34,1,3,13,55,1,5,21,89],[4,3]), &
+                 5 &
+         )
+ 
+         a = reshape([0,1,1,2,3,5,8,13,21,34,55,89],shape(a))
+         call wrapper_transpose_non_target( &
+                 a, &
+                 reshape([0,2,8,34,1,3,13,55,1,5,21,89],[4,3]), &
+                 6 &
+         )
+ 
+         a = reshape([0,1,1,2,3,5,8,13,21,34,55,89],shape(a))
+         call wrapper_transpose_target( &
+                 transpose(a), &
+                 reshape([0,1,1,2,3,5,8,13,21,34,55,89],[3,4]), &
+                 7 &
+         )
+ 
+         a = reshape([0,1,1,2,3,5,8,13,21,34,55,89],shape(a))
+         call wrapper_transpose_non_target( &
+                 transpose(a), &
+                 reshape([0,1,1,2,3,5,8,13,21,34,55,89],[3,4]), &
+                 8 &
+         )
+ 
+         a = reshape([0,1,1,2,3,5,8,13,21,34,55,89],shape(a))
+         call check_target( &
+                 a(::2,::2), &
+                 reshape([0,1,8,21],[2,2]), &
+                 9 &
+         )
+ 
+         a = reshape([0,1,1,2,3,5,8,13,21,34,55,89],shape(a))
+         call check_non_target( &
+                 a(::2,::2), &
+                 reshape([0,1,8,21],[2,2]), &
+                 10 &
+         )
+ 
+         a = reshape([0,1,1,2,3,5,8,13,21,34,55,89],shape(a))
+         call wrapper_target( &
+                 a(::2,::2), &
+                 reshape([0,1,8,21],[2,2]), &
+                 11 &
+         )
+ 
+         a = reshape([0,1,1,2,3,5,8,13,21,34,55,89],shape(a))
+         call wrapper_non_target( &
+                 a(::2,::2), &
+                 reshape([0,1,8,21],[2,2]), &
+                 12 &
+         )
+ 
+     end subroutine
+ 
+ end module
+ 
+ use m
+ call original
+ call check_all
+ end
