diff -Nrcpad gcc-13-20260506/LAST_UPDATED gcc-13-20260513/LAST_UPDATED
*** gcc-13-20260506/LAST_UPDATED	Wed May  6 22:32:21 2026
--- gcc-13-20260513/LAST_UPDATED	Wed May 13 22:32:20 2026
***************
*** 1 ****
! Obtained from git: releases/gcc-13 revision 1d5e3c60a35ecb1c698b9e44b6de7247312be52c
--- 1 ----
! Obtained from git: releases/gcc-13 revision aaeb71da186ab1377b87c65206b13133c5fcf848
diff -Nrcpad gcc-13-20260506/MD5SUMS gcc-13-20260513/MD5SUMS
*** gcc-13-20260506/MD5SUMS	Wed May  6 22:32:25 2026
--- gcc-13-20260513/MD5SUMS	Wed May 13 22:32:24 2026
***************
*** 1,5 ****
  # This file contains the MD5 checksums of the files in the
! # gcc-13-20260506.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-20260513.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
! f3f001c0a1ce7e8b9e3b6f9137b927bb  LAST_UPDATED
  81b3330d422f3ce1ef8b720dfae35068  MAINTAINERS
  2b61ddbd876fa839639a7ca551773426  Makefile.def
  5d2d6a74f897f8158d37f5f2ec6877ce  Makefile.in
--- 21,27 ----
  fd4ecdf5d672efe2b0e409aca9cf9446  ChangeLog.jit
  09538b708302f1735f6fa05b622ecf5e  ChangeLog.tree-ssa
  24ab760126489e69436a43185dc3d202  INSTALL/README
! a33869536bd30a8fbd2cd0afdd9fe073  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
! 59ea4b405b257c7d0bff4ec4430fc38a  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
! ca191890d4a65a3c9a4a0b63ddd6eac2  gcc/DATESTAMP
  d41d8cd98f00b204e9800998ecf8427e  gcc/DEV-PHASE
  eb92e1ff5e982ca07e173e0eb286d243  gcc/FSFChangeLog
  30e1e33411566388b3164558482dc5e6  gcc/FSFChangeLog.10
*************** eba9d2541aa4aa5f8a8e7aa169c9d594  gcc/cp
*** 5162,5168 ****
  7037f63acd4161418cc8dcd1d86866e0  gcc/cp/optimize.cc
  7ce2758a3656c365608f6aab53de2f35  gcc/cp/parser.cc
  fbb3d4644cdc4c0c8d47620a0b3a8094  gcc/cp/parser.h
! c6002b159901d7a3c9888e60477393d8  gcc/cp/pt.cc
  d03dc5c4f806d6a6841801d7d7d0080c  gcc/cp/ptree.cc
  aba5829381a2a8991e36ebb8d4eb9761  gcc/cp/rtti.cc
  88eb1ceb39a66b26decf9af394a4f5c2  gcc/cp/search.cc
--- 5162,5168 ----
  7037f63acd4161418cc8dcd1d86866e0  gcc/cp/optimize.cc
  7ce2758a3656c365608f6aab53de2f35  gcc/cp/parser.cc
  fbb3d4644cdc4c0c8d47620a0b3a8094  gcc/cp/parser.h
! e7a3a21dcffac5266160a8db76985b79  gcc/cp/pt.cc
  d03dc5c4f806d6a6841801d7d7d0080c  gcc/cp/ptree.cc
  aba5829381a2a8991e36ebb8d4eb9761  gcc/cp/rtti.cc
  88eb1ceb39a66b26decf9af394a4f5c2  gcc/cp/search.cc
*************** c2dbf831f4bbc53553765214d1b2d674  gcc/fl
*** 5576,5582 ****
  46538296abcbd26df93f276f5974ec0f  gcc/fold-const-call.h
  e091b0ed4e31525d6d685d5e6f7a7fa0  gcc/fold-const.cc
  9dd2c87502c864095a8b942bea07b5f3  gcc/fold-const.h
! 0b461d46b66590e370f95bd573f4cec2  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
! a2933fd7c80a95cbe37f8359cfb51eb0  gcc/fortran/ChangeLog
  3330102ad3a0217cba963be6b5eefd58  gcc/fortran/ChangeLog-2002
  d000ab985b1eeb1ad5749f98b8fef99f  gcc/fortran/ChangeLog-2003
  bf42f94f0c51dcc7d8051cc7fda1efdc  gcc/fortran/ChangeLog-2004
*************** d1595b2ed8fb2a33f6ce0dc595f4f33c  gcc/fo
*** 5602,5608 ****
  a1031ddafa666ce3ade625f41c0dc3f8  gcc/fortran/Make-lang.in
  d5bee359d146b78cacb1cef09ac5102f  gcc/fortran/arith.cc
  d725b555490bb7f2cd61f6bcc2c3de67  gcc/fortran/arith.h
! bae3ddfd77897b5f94b83cad27576c0f  gcc/fortran/array.cc
  35e889b2dd5fcf9ccf78e37ed082d6e6  gcc/fortran/bbt.cc
  807fa70f21f149b3b3e27d9942f008b9  gcc/fortran/check.cc
  0d3a98abb785a18e1b0e25ca1315e27b  gcc/fortran/class.cc
--- 5602,5608 ----
  a1031ddafa666ce3ade625f41c0dc3f8  gcc/fortran/Make-lang.in
  d5bee359d146b78cacb1cef09ac5102f  gcc/fortran/arith.cc
  d725b555490bb7f2cd61f6bcc2c3de67  gcc/fortran/arith.h
! 3607fc12de5ffe78bdc4ba57118c97d2  gcc/fortran/array.cc
  35e889b2dd5fcf9ccf78e37ed082d6e6  gcc/fortran/bbt.cc
  807fa70f21f149b3b3e27d9942f008b9  gcc/fortran/check.cc
  0d3a98abb785a18e1b0e25ca1315e27b  gcc/fortran/class.cc
*************** dead8f794e0bc7ece3c9f46a4b9ead58  gcc/fo
*** 5614,5627 ****
  bc8a50172db20622023d7b83c31d7737  gcc/fortran/cpp.h
  d49d08bf3282ebea910b14cf88b1b5ee  gcc/fortran/data.cc
  86b2ebfc95645333cba0df8f79638b62  gcc/fortran/data.h
! 9925d7b3281ff3c6f6304682e50e8c8c  gcc/fortran/decl.cc
  03376b1f69cb12088fb0957658714aa3  gcc/fortran/dependency.cc
  528121f9fe625a6b314dd0e4e9601e70  gcc/fortran/dependency.h
  638a4c6c1f147853ccf44c5442c876f9  gcc/fortran/dump-parse-tree.cc
  75860b58e8a01aadbfb046789efa8a88  gcc/fortran/error.cc
  0af32ed33f5748db7e33876cb180cbb3  gcc/fortran/expr.cc
  012392c6483a51939022df7c6de22fbc  gcc/fortran/f95-lang.cc
! 2c46f4a85ebcd58b3bdb7f98f7d0b85c  gcc/fortran/frontend-passes.cc
  5d21a6b2bc38e36e9ce485f9b899cf5d  gcc/fortran/gfc-diagnostic.def
  d428ee96a4c880140da26aec0f107bda  gcc/fortran/gfc-internals.texi
  18f9a7bac53ec8c9ec3d6e189090e830  gcc/fortran/gfortran.h
--- 5614,5627 ----
  bc8a50172db20622023d7b83c31d7737  gcc/fortran/cpp.h
  d49d08bf3282ebea910b14cf88b1b5ee  gcc/fortran/data.cc
  86b2ebfc95645333cba0df8f79638b62  gcc/fortran/data.h
! e626fc9f74be348b19ed678ca99adfee  gcc/fortran/decl.cc
  03376b1f69cb12088fb0957658714aa3  gcc/fortran/dependency.cc
  528121f9fe625a6b314dd0e4e9601e70  gcc/fortran/dependency.h
  638a4c6c1f147853ccf44c5442c876f9  gcc/fortran/dump-parse-tree.cc
  75860b58e8a01aadbfb046789efa8a88  gcc/fortran/error.cc
  0af32ed33f5748db7e33876cb180cbb3  gcc/fortran/expr.cc
  012392c6483a51939022df7c6de22fbc  gcc/fortran/f95-lang.cc
! c72f76ffeb64c1f2c57f2a2cbe55c377  gcc/fortran/frontend-passes.cc
  5d21a6b2bc38e36e9ce485f9b899cf5d  gcc/fortran/gfc-diagnostic.def
  d428ee96a4c880140da26aec0f107bda  gcc/fortran/gfc-internals.texi
  18f9a7bac53ec8c9ec3d6e189090e830  gcc/fortran/gfortran.h
*************** c310fb2cf5f2bb20fbf7f911e7a5b2cc  gcc/fo
*** 5650,5656 ****
  47d8fa5113c1f84c750b8fa73bbc5cfa  gcc/fortran/options.cc
  c0c3bcf7a95794a179458f5f74c2d450  gcc/fortran/parse.cc
  b07d21325e9bf64201a6131a3dacb9e2  gcc/fortran/parse.h
! fa3d24a84a707b741a631f3c9eac180f  gcc/fortran/primary.cc
  209042c6f306fb2591745a1d48a78c8f  gcc/fortran/resolve.cc
  f1620f6af6f4d226dd7e0ee858f8bd10  gcc/fortran/scanner.cc
  0ea05c5f1f9c27f26a76525f5eed9380  gcc/fortran/scanner.h
--- 5650,5656 ----
  47d8fa5113c1f84c750b8fa73bbc5cfa  gcc/fortran/options.cc
  c0c3bcf7a95794a179458f5f74c2d450  gcc/fortran/parse.cc
  b07d21325e9bf64201a6131a3dacb9e2  gcc/fortran/parse.h
! 0b0dcac362edd98a98305776d6738ab4  gcc/fortran/primary.cc
  209042c6f306fb2591745a1d48a78c8f  gcc/fortran/resolve.cc
  f1620f6af6f4d226dd7e0ee858f8bd10  gcc/fortran/scanner.cc
  0ea05c5f1f9c27f26a76525f5eed9380  gcc/fortran/scanner.h
*************** b16988fb11ef93959450cfdd9eaa8825  gcc/fo
*** 5664,5670 ****
  4c2eb969dbee5d6b83074ed09773b70b  gcc/fortran/trans-common.cc
  45ab297b0b34853431ed0f3c09a63db3  gcc/fortran/trans-const.cc
  2825c959ade33ef2a6492d640b05ef8c  gcc/fortran/trans-const.h
! c15bfe2308615f6c0395efd6cdf7a3ae  gcc/fortran/trans-decl.cc
  a9f1ee4e35ea493d86fa56e00192e4d9  gcc/fortran/trans-expr.cc
  7a6a0f4f555cbc9df7d147a017fc7444  gcc/fortran/trans-intrinsic.cc
  f6db1c9d47520d97d86df27171bd0050  gcc/fortran/trans-io.cc
--- 5664,5670 ----
  4c2eb969dbee5d6b83074ed09773b70b  gcc/fortran/trans-common.cc
  45ab297b0b34853431ed0f3c09a63db3  gcc/fortran/trans-const.cc
  2825c959ade33ef2a6492d640b05ef8c  gcc/fortran/trans-const.h
! 13a5d3dd3c4bb9f7708081058f2745e4  gcc/fortran/trans-decl.cc
  a9f1ee4e35ea493d86fa56e00192e4d9  gcc/fortran/trans-expr.cc
  7a6a0f4f555cbc9df7d147a017fc7444  gcc/fortran/trans-intrinsic.cc
  f6db1c9d47520d97d86df27171bd0050  gcc/fortran/trans-io.cc
*************** b829ed0032c899e107be2db349c913f3  gcc/ta
*** 7637,7643 ****
  811da275a2b9d3186a6decf96c01b0ed  gcc/targhooks.cc
  edb193a32070c4a7626fb75382def9b9  gcc/targhooks.h
  f39fcaa8197187283ccfed40107b426d  gcc/testsuite/.gitattributes
! 1b27d6eb9aeb66e52632cfd10711ff7b  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
! 0e4e532deac54a567ef5d674286b728f  gcc/testsuite/ChangeLog
  862f04afbd87da2cc6bc432c3f28430f  gcc/testsuite/ChangeLog-1993-2007
  029a5d8dacd25eb5d4711452ac448e5b  gcc/testsuite/ChangeLog-2008
  13ac28c41d51b66b4ec40dba6bd50f39  gcc/testsuite/ChangeLog-2009
*************** e791b94844e59093ad5ec4175c3b673a  gcc/te
*** 16833,16838 ****
--- 16833,16839 ----
  86dff67be95912f694daebdd0aee911b  gcc/testsuite/g++.dg/cpp1y/auto-fn63.C
  f97d20d3d680128b6e125d1793e29b87  gcc/testsuite/g++.dg/cpp1y/auto-fn64.C
  a5fbd625e8b645b90b2755400e929e2b  gcc/testsuite/g++.dg/cpp1y/auto-fn65.C
+ 88309773bbf1feef7121ba73e86cc151  gcc/testsuite/g++.dg/cpp1y/auto-fn66.C
  03b6f2674c38c8f6ed9f7fc03583b1dc  gcc/testsuite/g++.dg/cpp1y/auto-fn7.C
  e9a317fa32e36cef4553b50965e48550  gcc/testsuite/g++.dg/cpp1y/auto-fn8.C
  d67958b896eb1dae6f8862fd59b01c62  gcc/testsuite/g++.dg/cpp1y/auto-fn9.C
*************** edeec1fe2488c7117f56e10734af03dc  gcc/te
*** 87679,87684 ****
--- 87680,87686 ----
  697c52a53eea166cade44a3f935b8caf  gcc/testsuite/gfortran.dg/gomp/pr107214-7.f90
  1474c5a5881d7047f1212bc8cfb8ef92  gcc/testsuite/gfortran.dg/gomp/pr107214-8.f90
  3beded12a494129bebcc732d85089896  gcc/testsuite/gfortran.dg/gomp/pr107214.f90
+ 9413acb66d424e7e859e5b387d479808  gcc/testsuite/gfortran.dg/gomp/pr107425.f90
  616305573acc701769497c1eee637edc  gcc/testsuite/gfortran.dg/gomp/pr114825.f90
  9a6817790a272cd8153d4303d324c00f  gcc/testsuite/gfortran.dg/gomp/pr26224.f
  d2c74a71f2bea0005d853821e6f0142c  gcc/testsuite/gfortran.dg/gomp/pr27573.f90
*************** f166fdd0a6158ee4997aa03d50735f03  gcc/te
*** 90039,90044 ****
--- 90041,90047 ----
  5b2aa5e5d8aa97b69f0cc98bc9709f3f  gcc/testsuite/gfortran.dg/pr78741.f90
  18ef55c7791c30ff0793ca246df65036  gcc/testsuite/gfortran.dg/pr78758.f90
  ee35970003b8954b57c5ce45c7fd506c  gcc/testsuite/gfortran.dg/pr79315.f90
+ 76b2c561e2cc2dffb48457fae519ab01  gcc/testsuite/gfortran.dg/pr79524.f90
  7dde52ec5dffa2ae8586c577cf97f742  gcc/testsuite/gfortran.dg/pr79886.f90
  c0b10ae015725070f4297a1ba8927463  gcc/testsuite/gfortran.dg/pr79966.f90
  21b5f06229f04696cc787b63748c5de0  gcc/testsuite/gfortran.dg/pr80494.f90
*************** f9cd7fe0c8cb7be5b0846aa6c3eb0b93  gcc/te
*** 90282,90288 ****
--- 90285,90294 ----
  9a2df63b77cda57168f292b09bde71b3  gcc/testsuite/gfortran.dg/pr93686_4.f90
  0636d4a049257c8e3f6c32b4b7309697  gcc/testsuite/gfortran.dg/pr93714_1.f90
  93b8b244bce4583a43c29d892e177744  gcc/testsuite/gfortran.dg/pr93714_2.f90
+ 9a8647e0b1ef01e06d45cc2715ae05e8  gcc/testsuite/gfortran.dg/pr93715.f90
  4d2e245917c39b1bcaeea6010bcb6284  gcc/testsuite/gfortran.dg/pr93792.f90
+ 1c1c17dce5c14eb846c34e6f6eba3b12  gcc/testsuite/gfortran.dg/pr93814.f90
+ 5494bfcb0d61c11d34ea0b6e4e610c45  gcc/testsuite/gfortran.dg/pr93832.f90
  8b7bf068692a6a31b63dd4963c050e98  gcc/testsuite/gfortran.dg/pr93835.f08
  6736173bcc319bca35f5453a7bca947b  gcc/testsuite/gfortran.dg/pr94030_1.f90
  b0f8acfae3746c459e5af7bcca222814  gcc/testsuite/gfortran.dg/pr94030_2.f90
*************** b0f8acfae3746c459e5af7bcca222814  gcc/te
*** 90290,90295 ****
--- 90296,90302 ----
  f17ab40b1ca95ac01da77049baa72103  gcc/testsuite/gfortran.dg/pr94329.f90
  b9faba8aac0e0dd38443caeb527db93d  gcc/testsuite/gfortran.dg/pr94397.F90
  16d161f7900dd36eabcbaea6cd9c1b6e  gcc/testsuite/gfortran.dg/pr94708.f90
+ e49db1fd07a952483324884a3682a4e8  gcc/testsuite/gfortran.dg/pr94978.f90
  b3aa92652c768e489db71c4bdec58492  gcc/testsuite/gfortran.dg/pr95053.f
  4643a453de4a8df5432d833cf8bfa122  gcc/testsuite/gfortran.dg/pr95053_2.f90
  9a887ac1c462736f729ec4ec967c8be2  gcc/testsuite/gfortran.dg/pr95053_3.f90
diff -Nrcpad gcc-13-20260506/gcc/DATESTAMP gcc-13-20260513/gcc/DATESTAMP
*** gcc-13-20260506/gcc/DATESTAMP	Wed May  6 22:32:05 2026
--- gcc-13-20260513/gcc/DATESTAMP	Wed May 13 22:32:05 2026
***************
*** 1 ****
! 20260506
--- 1 ----
! 20260513
diff -Nrcpad gcc-13-20260506/gcc/cp/pt.cc gcc-13-20260513/gcc/cp/pt.cc
*** gcc-13-20260506/gcc/cp/pt.cc	Wed May  6 22:32:07 2026
--- gcc-13-20260513/gcc/cp/pt.cc	Wed May 13 22:32:07 2026
*************** tsubst_copy (tree t, tree args, tsubst_f
*** 17922,17933 ****
  
      case OFFSET_REF:
        {
! 	tree type = tsubst (TREE_TYPE (t), args, complain, in_decl);
  	tree op0 = tsubst_copy (TREE_OPERAND (t, 0), args, complain, in_decl);
  	tree op1 = tsubst_copy (TREE_OPERAND (t, 1), args, complain, in_decl);
  	r = build2 (code, type, op0, op1);
  	PTRMEM_OK_P (r) = PTRMEM_OK_P (t);
! 	if (!mark_used (TREE_OPERAND (r, 1), complain)
  	    && !(complain & tf_error))
  	  return error_mark_node;
  	return r;
--- 17922,17937 ----
  
      case OFFSET_REF:
        {
! 	/* We should only get here for an OFFSET_REF like A::m; a .* in a
! 	   template is represented as a DOTSTAR_EXPR.  */
! 	gcc_checking_assert
! 	  (same_type_p (TREE_TYPE (t), TREE_TYPE (TREE_OPERAND (t, 1))));
  	tree op0 = tsubst_copy (TREE_OPERAND (t, 0), args, complain, in_decl);
  	tree op1 = tsubst_copy (TREE_OPERAND (t, 1), args, complain, in_decl);
+ 	tree type = TREE_TYPE (op1);
  	r = build2 (code, type, op0, op1);
  	PTRMEM_OK_P (r) = PTRMEM_OK_P (t);
! 	if (!mark_used (op1, complain)
  	    && !(complain & tf_error))
  	  return error_mark_node;
  	return r;
diff -Nrcpad gcc-13-20260506/gcc/fortran/ChangeLog gcc-13-20260513/gcc/fortran/ChangeLog
*** gcc-13-20260506/gcc/fortran/ChangeLog	Wed May  6 22:32:07 2026
--- gcc-13-20260513/gcc/fortran/ChangeLog	Wed May 13 22:32:07 2026
***************
*** 1,3 ****
--- 1,29 ----
+ 2026-05-09  Christopher Albert  <albert@tugraz.at>
+ 
+ 	Backported from master:
+ 	2026-04-07  Paul Thomas  <pault@gcc.gnu.org>
+ 
+ 	PR fortran/107425
+ 	* trans-decl.cc (gfc_finish_var_decl): Check for
+ 	omp_affinity_iterators namespace before FL_LABEL BLOCK check.
+ 	Only route actual iterator variables through add_decl_as_local;
+ 	add other variables to the enclosing function.
+ 
+ 2026-05-09  Christopher Albert  <albert@tugraz.at>
+ 
+ 	Backported from master:
+ 	2026-04-06  Christopher Albert  <albert@tugraz.at>
+ 
+ 	PR fortran/79524
+ 	PR fortran/79524
+ 	* decl.cc (discard_pending_charlens): New helper.
+ 	(add_init_expr_to_sym): Drop statement-local charlens when
+ 	rejecting variable-length parameter arrays.
+ 	(variable_decl, do_parm, enumerator_decl): Save the current
+ 	namespace charlen list before parsing declarations with
+ 	initializers.
+ 	(match_procedure_decl): Adjust call to add_init_expr_to_sym.
+ 
  2026-04-17  Paul Thomas  <pault@gcc.gnu.org>
  
  	Backported from master:
diff -Nrcpad gcc-13-20260506/gcc/fortran/array.cc gcc-13-20260513/gcc/fortran/array.cc
*** gcc-13-20260506/gcc/fortran/array.cc	Wed May  6 22:32:07 2026
--- gcc-13-20260513/gcc/fortran/array.cc	Wed May 13 22:32:07 2026
*************** resolve_array_bound (gfc_expr *e, int ch
*** 382,387 ****
--- 382,394 ----
    if (e == NULL)
      return true;
  
+   if (e->ts.type == BT_DERIVED || e->ts.type == BT_CLASS)
+     {
+       gfc_error ("Derived type or class expression for array bound at %L",
+ 		 &e->where);
+       return false;
+     }
+ 
    if (!gfc_resolve_expr (e)
        || !gfc_specification_expr (e))
      return false;
diff -Nrcpad gcc-13-20260506/gcc/fortran/decl.cc gcc-13-20260513/gcc/fortran/decl.cc
*** gcc-13-20260506/gcc/fortran/decl.cc	Wed May  6 22:32:07 2026
--- gcc-13-20260513/gcc/fortran/decl.cc	Wed May 13 22:32:07 2026
*************** discard_pending_charlen (gfc_charlen *cl
*** 130,135 ****
--- 130,156 ----
    free (cl);
  }
  
+ /* Drop the charlen nodes created while matching a declaration that is about
+    to be rejected.  Callers must clear any surviving owners before using this
+    helper, so only the statement-local nodes remain on the namespace list.  */
+ 
+ static void
+ discard_pending_charlens (gfc_charlen *saved_cl)
+ {
+   if (!gfc_current_ns)
+     return;
+ 
+   while (gfc_current_ns->cl_list != saved_cl)
+     {
+       gfc_charlen *cl = gfc_current_ns->cl_list;
+ 
+       gcc_assert (cl);
+       gfc_current_ns->cl_list = cl->next;
+       gfc_free_expr (cl->length);
+       free (cl);
+     }
+ }
+ 
  /********************* DATA statement subroutines *********************/
  
  static bool in_match_data = false;
*************** fix_initializer_charlen (gfc_typespec *t
*** 2033,2039 ****
     expression to a symbol.  */
  
  static bool
! add_init_expr_to_sym (const char *name, gfc_expr **initp, locus *var_locus)
  {
    symbol_attribute attr;
    gfc_symbol *sym;
--- 2054,2061 ----
     expression to a symbol.  */
  
  static bool
! add_init_expr_to_sym (const char *name, gfc_expr **initp, locus *var_locus,
! 		      gfc_charlen *saved_cl_list)
  {
    symbol_attribute attr;
    gfc_symbol *sym;
*************** add_init_expr_to_sym (const char *name,
*** 2121,2126 ****
--- 2143,2158 ----
  					 "at %L "
  					 "with variable length elements",
  					 &sym->declared_at);
+ 
+ 			      /* This rejection path can leave several
+ 				 declaration-local charlens on cl_list,
+ 				 including the replacement symbol charlen and
+ 				 the array-constructor typespec charlen.
+ 				 Clear the surviving owners first, then drop
+ 				 only the nodes created by this declaration.  */
+ 			      sym->ts.u.cl = NULL;
+ 			      init->ts.u.cl = NULL;
+ 			      discard_pending_charlens (saved_cl_list);
  			      return false;
  			    }
  			  clen = mpz_get_si (length->value.integer);
*************** variable_decl (int elem)
*** 2637,2642 ****
--- 2669,2675 ----
    gfc_array_spec *as;
    gfc_array_spec *cp_as; /* Extra copy for Cray Pointees.  */
    gfc_charlen *cl;
+   gfc_charlen *saved_cl_list;
    bool cl_deferred;
    locus var_locus;
    match m;
*************** variable_decl (int elem)
*** 2647,2652 ****
--- 2680,2686 ----
    initializer = NULL;
    as = NULL;
    cp_as = NULL;
+   saved_cl_list = gfc_current_ns->cl_list;
  
    /* When we get here, we've just matched a list of attributes and
       maybe a type and a double colon.  The next thing we expect to see
*************** variable_decl (int elem)
*** 3185,3191 ****
       NULL here, because we sometimes also need to check if a
       declaration *must* have an initialization expression.  */
    if (!gfc_comp_struct (gfc_current_state ()))
!     t = add_init_expr_to_sym (name, &initializer, &var_locus);
    else
      {
        if (current_ts.type == BT_DERIVED
--- 3219,3226 ----
       NULL here, because we sometimes also need to check if a
       declaration *must* have an initialization expression.  */
    if (!gfc_comp_struct (gfc_current_state ()))
!     t = add_init_expr_to_sym (name, &initializer, &var_locus,
! 			      saved_cl_list);
    else
      {
        if (current_ts.type == BT_DERIVED
*************** match_procedure_decl (void)
*** 7290,7296 ****
  	  if (m != MATCH_YES)
  	    goto cleanup;
  
! 	  if (!add_init_expr_to_sym (sym->name, &initializer, &gfc_current_locus))
  	    goto cleanup;
  
  	}
--- 7325,7333 ----
  	  if (m != MATCH_YES)
  	    goto cleanup;
  
! 	  if (!add_init_expr_to_sym (sym->name, &initializer,
! 				     &gfc_current_locus,
! 				     gfc_current_ns->cl_list))
  	    goto cleanup;
  
  	}
*************** do_parm (void)
*** 9520,9528 ****
--- 9557,9568 ----
  {
    gfc_symbol *sym;
    gfc_expr *init;
+   gfc_charlen *saved_cl_list;
    match m;
    bool t;
  
+   saved_cl_list = gfc_current_ns->cl_list;
+ 
    m = gfc_match_symbol (&sym, 0);
    if (m == MATCH_NO)
      gfc_error ("Expected variable name at %C in PARAMETER statement");
*************** do_parm (void)
*** 9563,9569 ****
        goto cleanup;
      }
  
!   t = add_init_expr_to_sym (sym->name, &init, &gfc_current_locus);
    return (t) ? MATCH_YES : MATCH_ERROR;
  
  cleanup:
--- 9603,9610 ----
        goto cleanup;
      }
  
!   t = add_init_expr_to_sym (sym->name, &init, &gfc_current_locus,
! 			    saved_cl_list);
    return (t) ? MATCH_YES : MATCH_ERROR;
  
  cleanup:
*************** enumerator_decl (void)
*** 10974,10979 ****
--- 11015,11021 ----
    char name[GFC_MAX_SYMBOL_LEN + 1];
    gfc_expr *initializer;
    gfc_array_spec *as = NULL;
+   gfc_charlen *saved_cl_list;
    gfc_symbol *sym;
    locus var_locus;
    match m;
*************** enumerator_decl (void)
*** 10981,10986 ****
--- 11023,11029 ----
    locus old_locus;
  
    initializer = NULL;
+   saved_cl_list = gfc_current_ns->cl_list;
    old_locus = gfc_current_locus;
  
    /* When we get here, we've just matched a list of attributes and
*************** enumerator_decl (void)
*** 11037,11043 ****
       to be parsed.  add_init_expr_to_sym() zeros initializer, so we
       use last_initializer below.  */
    last_initializer = initializer;
!   t = add_init_expr_to_sym (name, &initializer, &var_locus);
  
    /* Maintain enumerator history.  */
    gfc_find_symbol (name, NULL, 0, &sym);
--- 11080,11087 ----
       to be parsed.  add_init_expr_to_sym() zeros initializer, so we
       use last_initializer below.  */
    last_initializer = initializer;
!   t = add_init_expr_to_sym (name, &initializer, &var_locus,
! 			    saved_cl_list);
  
    /* Maintain enumerator history.  */
    gfc_find_symbol (name, NULL, 0, &sym);
diff -Nrcpad gcc-13-20260506/gcc/fortran/frontend-passes.cc gcc-13-20260513/gcc/fortran/frontend-passes.cc
*** gcc-13-20260506/gcc/fortran/frontend-passes.cc	Wed May  6 22:32:07 2026
--- gcc-13-20260513/gcc/fortran/frontend-passes.cc	Wed May 13 22:32:07 2026
*************** insert_index (gfc_expr *e, gfc_symbol *s
*** 2784,2789 ****
--- 2784,2849 ----
  
  }
  
+ static bool
+ evaluate_loop_bound (gfc_expr *e, gfc_symbol *sym, mpz_t val, mpz_t ret)
+ {
+   if (e->expr_type == EXPR_CONSTANT)
+     {
+       mpz_init_set (ret, e->value.integer);
+       return true;
+     }
+ 
+   return insert_index (e, sym, val, ret);
+ }
+ 
+ /* Return true if any loop nested inside LOOP_INDEX is not provably entered
+    after substituting OUTER_VAL for OUTER_SYM.  In that case the guarded array
+    reference may never be evaluated, so do not warn from the outer loop alone.  */
+ 
+ static bool
+ inner_loop_may_be_skipped (int loop_index, gfc_symbol *outer_sym, mpz_t outer_val)
+ {
+   int k;
+   do_t *lp;
+ 
+   FOR_EACH_VEC_ELT_FROM (doloop_list, k, lp, loop_index + 1)
+     {
+       gfc_code *loop = lp->c;
+       int sgn, cmp;
+       mpz_t do_start, do_end, do_step;
+ 
+       if (loop == NULL || loop->ext.iterator == NULL || loop->ext.iterator->var == NULL)
+ 	return true;
+ 
+       if (!evaluate_loop_bound (loop->ext.iterator->step, outer_sym, outer_val, do_step))
+ 	return true;
+ 
+       sgn = mpz_cmp_ui (do_step, 0);
+       if (sgn == 0)
+ 	{
+ 	  mpz_clear (do_step);
+ 	  return true;
+ 	}
+ 
+       if (!evaluate_loop_bound (loop->ext.iterator->start, outer_sym, outer_val, do_start)
+ 	  || !evaluate_loop_bound (loop->ext.iterator->end, outer_sym, outer_val, do_end))
+ 	{
+ 	  mpz_clear (do_step);
+ 	  return true;
+ 	}
+ 
+       cmp = mpz_cmp (do_end, do_start);
+       mpz_clear (do_start);
+       mpz_clear (do_end);
+       mpz_clear (do_step);
+ 
+       if ((sgn > 0 && cmp < 0) || (sgn < 0 && cmp > 0))
+ 	return true;
+     }
+ 
+   return false;
+ }
+ 
  /* Check array subscripts for possible out-of-bounds accesses in DO
     loops with constant bounds.  */
  
*************** do_subscript (gfc_expr **e)
*** 2918,2927 ****
  		  mpz_clear (rem);
  		}
  
  	      for (i = 0; i< ar->dimen; i++)
  		{
  		  mpz_t val;
! 		  if (ar->dimen_type[i] == DIMEN_ELEMENT && have_do_start
  		      && insert_index (ar->start[i], do_sym, do_start, val))
  		    {
  		      if (ar->as->lower[i]
--- 2978,2992 ----
  		  mpz_clear (rem);
  		}
  
+ 	      bool skip_start = have_do_start
+ 				&& inner_loop_may_be_skipped (j, do_sym, do_start);
+ 	      bool skip_end = have_do_end
+ 			      && inner_loop_may_be_skipped (j, do_sym, do_end);
+ 
  	      for (i = 0; i< ar->dimen; i++)
  		{
  		  mpz_t val;
! 		  if (ar->dimen_type[i] == DIMEN_ELEMENT && have_do_start && !skip_start
  		      && insert_index (ar->start[i], do_sym, do_start, val))
  		    {
  		      if (ar->as->lower[i]
*************** do_subscript (gfc_expr **e)
*** 2947,2953 ****
  		      mpz_clear (val);
  		    }
  
! 		  if (ar->dimen_type[i] == DIMEN_ELEMENT && have_do_end
  		      && insert_index (ar->start[i], do_sym, do_end, val))
  		    {
  		      if (ar->as->lower[i]
--- 3012,3018 ----
  		      mpz_clear (val);
  		    }
  
! 		  if (ar->dimen_type[i] == DIMEN_ELEMENT && have_do_end && !skip_end
  		      && insert_index (ar->start[i], do_sym, do_end, val))
  		    {
  		      if (ar->as->lower[i]
diff -Nrcpad gcc-13-20260506/gcc/fortran/primary.cc gcc-13-20260513/gcc/fortran/primary.cc
*** gcc-13-20260506/gcc/fortran/primary.cc	Wed May  6 22:32:07 2026
--- gcc-13-20260513/gcc/fortran/primary.cc	Wed May 13 22:32:07 2026
*************** gfc_convert_to_structure_constructor (gf
*** 3232,3237 ****
--- 3232,3238 ----
  	  && this_comp->ts.u.cl && this_comp->ts.u.cl->length
  	  && this_comp->ts.u.cl->length->expr_type == EXPR_CONSTANT
  	  && this_comp->ts.u.cl->length->ts.type == BT_INTEGER
+ 	  && actual->expr
  	  && actual->expr->ts.type == BT_CHARACTER
  	  && actual->expr->expr_type == EXPR_CONSTANT)
  	{
*************** gfc_convert_to_structure_constructor (gf
*** 3296,3322 ****
  	  goto cleanup;
  	}
  
!           /* If not explicitly a parent constructor, gather up the components
!              and build one.  */
!           if (comp && comp == sym->components
!                 && sym->attr.extension
! 		&& comp_tail->val
!                 && (!gfc_bt_struct (comp_tail->val->ts.type)
!                       ||
!                     comp_tail->val->ts.u.derived != this_comp->ts.u.derived))
!             {
!               bool m;
  	      gfc_actual_arglist *arg_null = NULL;
  
  	      actual->expr = comp_tail->val;
  	      comp_tail->val = NULL;
  
!               m = gfc_convert_to_structure_constructor (NULL,
! 					comp->ts.u.derived, &comp_tail->val,
! 					comp->ts.u.derived->attr.zero_comp
! 					  ? &arg_null : &actual, true);
!               if (!m)
!                 goto cleanup;
  
  	      if (comp->ts.u.derived->attr.zero_comp)
  		{
--- 3297,3323 ----
  	  goto cleanup;
  	}
  
! 	  /* If not explicitly a parent constructor, gather up the components
! 	     and build one.  */
! 	  if (comp && comp == sym->components
! 	      && sym->attr.extension
! 	      && comp_tail->val
! 	      && (!gfc_bt_struct (comp_tail->val->ts.type)
! 		  || comp_tail->val->ts.u.derived != this_comp->ts.u.derived))
! 	    {
! 	      bool m;
  	      gfc_actual_arglist *arg_null = NULL;
  
  	      actual->expr = comp_tail->val;
  	      comp_tail->val = NULL;
+ #define shorter gfc_convert_to_structure_constructor
+ 	      m = shorter (NULL, comp->ts.u.derived, &comp_tail->val,
+ 			   comp->ts.u.derived->attr.zero_comp ? &arg_null :
+ 								&actual, true);
+ #undef shorter
  
! 	      if (!m)
! 		goto cleanup;
  
  	      if (comp->ts.u.derived->attr.zero_comp)
  		{
diff -Nrcpad gcc-13-20260506/gcc/fortran/trans-decl.cc gcc-13-20260513/gcc/fortran/trans-decl.cc
*** gcc-13-20260506/gcc/fortran/trans-decl.cc	Wed May  6 22:32:07 2026
--- gcc-13-20260513/gcc/fortran/trans-decl.cc	Wed May 13 22:32:07 2026
*************** gfc_finish_var_decl (tree decl, gfc_symb
*** 643,655 ****
  	  && (sym->ns->proc_name->backend_decl == current_function_decl
  	      || sym->result == sym))
  	gfc_add_decl_to_function (decl);
        else if (sym->ns->proc_name
  	       && sym->ns->proc_name->attr.flavor == FL_LABEL)
  	/* This is a BLOCK construct.  */
  	add_decl_as_local (decl);
-       else if (sym->ns->omp_affinity_iterators)
- 	/* This is a block-local iterator.  */
- 	add_decl_as_local (decl);
        else
  	gfc_add_decl_to_parent_function (decl);
      }
--- 643,668 ----
  	  && (sym->ns->proc_name->backend_decl == current_function_decl
  	      || sym->result == sym))
  	gfc_add_decl_to_function (decl);
+       else if (sym->ns->omp_affinity_iterators)
+ 	{
+ 	  /* Iterator variables are block-local; other variables in the
+ 	     iterator namespace (e.g. implicitly typed host-associated
+ 	     ones used in locator expressions) belong in the enclosing
+ 	     function.  */
+ 	  gfc_symbol *iter;
+ 	  for (iter = sym->ns->omp_affinity_iterators; iter;
+ 	       iter = iter->tlink)
+ 	    if (iter == sym)
+ 	      break;
+ 	  if (iter)
+ 	    add_decl_as_local (decl);
+ 	  else
+ 	    gfc_add_decl_to_function (decl);
+ 	}
        else if (sym->ns->proc_name
  	       && sym->ns->proc_name->attr.flavor == FL_LABEL)
  	/* This is a BLOCK construct.  */
  	add_decl_as_local (decl);
        else
  	gfc_add_decl_to_parent_function (decl);
      }
*************** build_entry_thunks (gfc_namespace * ns,
*** 2975,2989 ****
        tmp = build_int_cst (gfc_array_index_type, el->id);
        vec_safe_push (args, tmp);
  
!       if (thunk_sym->attr.function)
  	{
! 	  if (gfc_return_by_reference (ns->proc_name))
  	    {
  	      tree ref = DECL_ARGUMENTS (current_function_decl);
  	      vec_safe_push (args, ref);
  	      if (ns->proc_name->ts.type == BT_CHARACTER)
  		vec_safe_push (args, DECL_CHAIN (ref));
  	    }
  	}
  
        for (formal = gfc_sym_get_dummy_args (ns->proc_name); formal;
--- 2988,3047 ----
        tmp = build_int_cst (gfc_array_index_type, el->id);
        vec_safe_push (args, tmp);
  
!       /* When the master returns by reference, pass the result reference
! 	 and (for CHARACTER) the string length to the master call.  If the
! 	 thunk itself also returns by reference these are forwarded from
! 	 its own argument list; otherwise (bind(c) CHARACTER entry) we
! 	 create local temporaries and load the value after the call.  */
!       tree result_ref = NULL_TREE;
!       if (thunk_sym->attr.function
! 	  && gfc_return_by_reference (ns->proc_name))
  	{
! 	  if (gfc_return_by_reference (thunk_sym))
  	    {
  	      tree ref = DECL_ARGUMENTS (current_function_decl);
  	      vec_safe_push (args, ref);
  	      if (ns->proc_name->ts.type == BT_CHARACTER)
  		vec_safe_push (args, DECL_CHAIN (ref));
  	    }
+ 	  else
+ 	    {
+ 	      /* The thunk is bind(c) and returns CHARACTER by value, but
+ 		 the master returns by reference.  Create a local buffer
+ 		 and length to pass to the master call.  */
+ 	      tree chartype = gfc_get_char_type (thunk_sym->ts.kind);
+ 	      tree len;
+ 
+ 	      if (thunk_sym->ts.u.cl && thunk_sym->ts.u.cl->length)
+ 		{
+ 		  gfc_se se;
+ 		  gfc_init_se (&se, NULL);
+ 		  gfc_conv_expr (&se, thunk_sym->ts.u.cl->length);
+ 		  gfc_add_block_to_block (&body, &se.pre);
+ 		  len = se.expr;
+ 		  gfc_add_block_to_block (&body, &se.post);
+ 		}
+ 	      else
+ 		len = build_int_cst (gfc_charlen_type_node, 1);
+ 
+ 	      result_ref = build_decl (input_location, VAR_DECL,
+ 				       get_identifier ("__entry_result"),
+ 				       build_array_type (chartype,
+ 					 build_range_type (gfc_array_index_type,
+ 					   gfc_index_one_node,
+ 					   fold_convert (gfc_array_index_type,
+ 							 len))));
+ 	      DECL_ARTIFICIAL (result_ref) = 1;
+ 	      TREE_USED (result_ref) = 1;
+ 	      DECL_CONTEXT (result_ref) = current_function_decl;
+ 	      layout_decl (result_ref, 0);
+ 	      pushdecl (result_ref);
+ 
+ 	      vec_safe_push (args,
+ 			     build_fold_addr_expr_loc (input_location,
+ 						       result_ref));
+ 	      vec_safe_push (args, len);
+ 	    }
  	}
  
        for (formal = gfc_sym_get_dummy_args (ns->proc_name); formal;
*************** build_entry_thunks (gfc_namespace * ns,
*** 3030,3036 ****
        vec_safe_splice (args, string_args);
        tmp = ns->proc_name->backend_decl;
        tmp = build_call_expr_loc_vec (input_location, tmp, args);
!       if (ns->proc_name->attr.mixed_entry_master)
  	{
  	  tree union_decl, field;
  	  tree master_type = TREE_TYPE (ns->proc_name->backend_decl);
--- 3088,3111 ----
        vec_safe_splice (args, string_args);
        tmp = ns->proc_name->backend_decl;
        tmp = build_call_expr_loc_vec (input_location, tmp, args);
!       if (result_ref != NULL_TREE)
! 	{
! 	  /* The master returns by reference (void) but the bind(c) thunk
! 	     returns CHARACTER by value.  Execute the master call, then
! 	     load the first character from the local buffer.  */
! 	  gfc_add_expr_to_block (&body, tmp);
! 	  tmp = build4_loc (input_location, ARRAY_REF,
! 			    TREE_TYPE (TREE_TYPE (result_ref)),
! 			    result_ref, gfc_index_one_node,
! 			    NULL_TREE, NULL_TREE);
! 	  tmp = fold_convert (TREE_TYPE (DECL_RESULT (current_function_decl)),
! 			      tmp);
! 	  tmp = fold_build2_loc (input_location, MODIFY_EXPR,
! 			     TREE_TYPE (DECL_RESULT (current_function_decl)),
! 			     DECL_RESULT (current_function_decl), tmp);
! 	  tmp = build1_v (RETURN_EXPR, tmp);
! 	}
!       else if (ns->proc_name->attr.mixed_entry_master)
  	{
  	  tree union_decl, field;
  	  tree master_type = TREE_TYPE (ns->proc_name->backend_decl);
*************** gfc_trans_deferred_vars (gfc_symbol * pr
*** 4811,4816 ****
--- 4886,4896 ----
  					NULL_TREE);
  		  continue;
  		}
+ 	      else if (sym->attr.codimension && !sym->attr.dimension)
+ 		{
+ 		  /* Scalar coarrays do not need array allocation.  */
+ 		  continue;
+ 		}
  	      else
  		{
  		  gfc_save_backend_locus (&loc);
diff -Nrcpad gcc-13-20260506/gcc/testsuite/ChangeLog gcc-13-20260513/gcc/testsuite/ChangeLog
*** gcc-13-20260506/gcc/testsuite/ChangeLog	Wed May  6 22:32:08 2026
--- gcc-13-20260513/gcc/testsuite/ChangeLog	Wed May 13 22:32:08 2026
***************
*** 1,3 ****
--- 1,20 ----
+ 2026-05-09  Christopher Albert  <albert@tugraz.at>
+ 
+ 	Backported from master:
+ 	2026-04-07  Paul Thomas  <pault@gcc.gnu.org>
+ 
+ 	PR fortran/107425
+ 	* gfortran.dg/gomp/pr107425.f90: New test.
+ 
+ 2026-05-09  Christopher Albert  <albert@tugraz.at>
+ 
+ 	Backported from master:
+ 	2026-04-06  Christopher Albert  <albert@tugraz.at>
+ 
+ 	PR fortran/79524
+ 	PR fortran/79524
+ 	* gfortran.dg/pr79524.f90: New test.
+ 
  2026-05-05  Iain Buclaw  <ibuclaw@gdcproject.org>
  
  	Backported from master:
diff -Nrcpad gcc-13-20260506/gcc/testsuite/g++.dg/cpp1y/auto-fn66.C gcc-13-20260513/gcc/testsuite/g++.dg/cpp1y/auto-fn66.C
*** gcc-13-20260506/gcc/testsuite/g++.dg/cpp1y/auto-fn66.C	Thu Jan  1 00:00:00 1970
--- gcc-13-20260513/gcc/testsuite/g++.dg/cpp1y/auto-fn66.C	Wed May 13 22:32:09 2026
***************
*** 0 ****
--- 1,20 ----
+ // PR c++/120757
+ // { dg-do compile { target c++14 } }
+ 
+ template <typename> struct A
+ {
+   auto foo() {}
+ };
+ 
+ auto bar(void (A<int>::*)()) {}
+ 
+ template <int> auto baz()
+ {
+   bar(&A<int>::foo);
+ }
+ 
+ int main()
+ {
+   baz<0>();
+   return 0;
+ }
diff -Nrcpad gcc-13-20260506/gcc/testsuite/gfortran.dg/gomp/pr107425.f90 gcc-13-20260513/gcc/testsuite/gfortran.dg/gomp/pr107425.f90
*** gcc-13-20260506/gcc/testsuite/gfortran.dg/gomp/pr107425.f90	Thu Jan  1 00:00:00 1970
--- gcc-13-20260513/gcc/testsuite/gfortran.dg/gomp/pr107425.f90	Wed May 13 22:32:14 2026
***************
*** 0 ****
--- 1,11 ----
+ ! { dg-do compile }
+ ! { dg-options "-fopenmp" }
+ !
+ ! PR fortran/107425
+ ! ICE in gimplify_var_or_parm_decl when an implicitly typed variable
+ ! is used as a subscript in an iterator depend clause.
+ 
+ program p
+    integer :: x(8)
+    !$omp taskwait depend(iterator(i=1:8), in:x(j))
+ end
diff -Nrcpad gcc-13-20260506/gcc/testsuite/gfortran.dg/pr79524.f90 gcc-13-20260513/gcc/testsuite/gfortran.dg/pr79524.f90
*** gcc-13-20260506/gcc/testsuite/gfortran.dg/pr79524.f90	Thu Jan  1 00:00:00 1970
--- gcc-13-20260513/gcc/testsuite/gfortran.dg/pr79524.f90	Wed May 13 22:32:14 2026
***************
*** 0 ****
--- 1,9 ----
+ ! { dg-do compile }
+ ! { dg-set-target-env-var MALLOC_PERTURB_ "165" }
+ ! PR fortran/79524
+ ! Reject parameter arrays with variable-length CHARACTER elements without
+ ! leaving the temporary charlen from the failed declaration on cl_list.
+ program p
+   character(*), parameter :: z(2) = [character(n) :: 'x', 'y'] ! { dg-error "Cannot initialize parameter array" }
+   character(*), parameter :: w(2) = [character(n+1) :: 'a', 'b'] ! { dg-error "Cannot initialize parameter array" }
+ end
diff -Nrcpad gcc-13-20260506/gcc/testsuite/gfortran.dg/pr93715.f90 gcc-13-20260513/gcc/testsuite/gfortran.dg/pr93715.f90
*** gcc-13-20260506/gcc/testsuite/gfortran.dg/pr93715.f90	Thu Jan  1 00:00:00 1970
--- gcc-13-20260513/gcc/testsuite/gfortran.dg/pr93715.f90	Wed May 13 22:32:14 2026
***************
*** 0 ****
--- 1,11 ----
+ ! { dg-do compile }
+ ! { dg-options "-fcoarray=single" }
+ !
+ ! PR fortran/93715
+ ! A scalar coarray used in asynchronous I/O caused an ICE in
+ ! gfc_trans_auto_array_allocation.
+ 
+ program p
+    integer :: a, b[*]
+    read (1, *, asynchronous='yes') a, b
+ end
diff -Nrcpad gcc-13-20260506/gcc/testsuite/gfortran.dg/pr93814.f90 gcc-13-20260513/gcc/testsuite/gfortran.dg/pr93814.f90
*** gcc-13-20260506/gcc/testsuite/gfortran.dg/pr93814.f90	Thu Jan  1 00:00:00 1970
--- gcc-13-20260513/gcc/testsuite/gfortran.dg/pr93814.f90	Wed May 13 22:32:14 2026
***************
*** 0 ****
--- 1,99 ----
+ ! { dg-do run }
+ !
+ ! PR fortran/93814 - ICE in build_entry_thunks with CHARACTER ENTRY
+ ! and bind(c).
+ !
+ ! Verify that CHARACTER function results with ENTRY and bind(c) compile
+ ! and execute correctly, covering all combinations of bind(c) on the
+ ! function and its entries.
+ 
+ ! Both function and entry have bind(c).
+ function f1() bind(c)
+   character :: f1, g1
+   f1 = "a"
+   return
+   entry g1() bind(c)
+   g1 = "b"
+ end
+ 
+ ! Only function has bind(c), entry does not.
+ function f2() bind(c)
+   character(1) :: f2, g2
+   f2 = "c"
+   return
+   entry g2()
+   g2 = "d"
+ end function
+ 
+ ! Only entry has bind(c), function does not.
+ function f3()
+   character(1) :: f3, g3
+   f3 = "e"
+   return
+   entry g3() bind(c)
+   g3 = "f"
+ end function
+ 
+ ! Neither function nor entry have bind(c) (baseline).
+ function f4()
+   character :: f4, g4
+   f4 = "g"
+   return
+   entry g4()
+   g4 = "h"
+ end
+ 
+ ! Integer with bind(c) (should still work).
+ function f5() bind(c)
+   integer :: f5, g5
+   f5 = 42
+   return
+   entry g5() bind(c)
+   g5 = 84
+ end
+ 
+ program p
+   interface
+     function f1() bind(c)
+       character :: f1
+     end
+     function g1() bind(c)
+       character :: g1
+     end
+     function f2() bind(c)
+       character(1) :: f2
+     end
+     function g2()
+       character(1) :: g2
+     end
+     function f3()
+       character(1) :: f3
+     end
+     function g3() bind(c)
+       character(1) :: g3
+     end
+     function f4()
+       character :: f4
+     end
+     function g4()
+       character :: g4
+     end
+     function f5() bind(c)
+       integer :: f5
+     end
+     function g5() bind(c)
+       integer :: g5
+     end
+   end interface
+ 
+   if (f1() /= "a") stop 1
+   if (g1() /= "b") stop 2
+   if (f2() /= "c") stop 3
+   if (g2() /= "d") stop 4
+   if (f3() /= "e") stop 5
+   if (g3() /= "f") stop 6
+   if (f4() /= "g") stop 7
+   if (g4() /= "h") stop 8
+   if (f5() /= 42)  stop 9
+   if (g5() /= 84)  stop 10
+ end
diff -Nrcpad gcc-13-20260506/gcc/testsuite/gfortran.dg/pr93832.f90 gcc-13-20260513/gcc/testsuite/gfortran.dg/pr93832.f90
*** gcc-13-20260506/gcc/testsuite/gfortran.dg/pr93832.f90	Thu Jan  1 00:00:00 1970
--- gcc-13-20260513/gcc/testsuite/gfortran.dg/pr93832.f90	Wed May 13 22:32:14 2026
***************
*** 0 ****
--- 1,37 ----
+ module m
+ contains
+    subroutine comment0
+       type t
+          character :: a
+          integer :: b
+          integer :: c(t(1))            ! { dg-error "No initializer for component .b." }
+       end type
+       type(t) :: z = t('a', 2, [3])    ! { dg-error "Bad array spec of component .c." }
+    end
+ 
+    subroutine comment3a
+       type t
+          character :: a
+          integer :: b
+          integer :: c(t(1, "rubbish")) ! { dg-error "No initializer for component .c." }
+       end type
+       type(t) :: z = t('a', 2, [3])    ! { dg-error "Bad array spec of component .c." }
+    end
+ 
+    subroutine comment3b
+       type t
+          character :: a
+          integer :: b
+          integer :: c(t(1, "rubbish", [7])) ! { dg-error "Derived type or class expression" }
+       end type
+       type(t) :: z = t('a', 2, [3])    ! { dg-error "Bad array spec of component .c." }
+    end
+ 
+    subroutine comment9
+       type t
+          character :: a
+          integer :: b(t(1))            ! { dg-error "No initializer for component .b." }
+       end type
+       type(t) :: x = t('a', 2)
+    end
+ end module
diff -Nrcpad gcc-13-20260506/gcc/testsuite/gfortran.dg/pr94978.f90 gcc-13-20260513/gcc/testsuite/gfortran.dg/pr94978.f90
*** gcc-13-20260506/gcc/testsuite/gfortran.dg/pr94978.f90	Thu Jan  1 00:00:00 1970
--- gcc-13-20260513/gcc/testsuite/gfortran.dg/pr94978.f90	Wed May 13 22:32:14 2026
***************
*** 0 ****
--- 1,24 ----
+ ! { dg-do compile }
+ ! { dg-options "-Wdo-subscript" }
+ 
+ implicit none
+ 
+ integer(4) :: i, j
+ integer(4) :: pascal(0:8, 0:8)
+ 
+ do i = 0, 8
+   pascal(i, 0) = 1
+   do j = 1, i - 1
+     pascal(i, j) = pascal(i - 1, j) + pascal(i - 1, j - 1) ! { dg-bogus "Array reference at \\(1\\) out of bounds" }
+   end do
+   do j = i, 8
+     pascal(i, j) = 0
+   end do
+   pascal(i, i) = 1
+ end do
+ 
+ do i = 0, 8
+   print '(9I4)', pascal(i, :)
+ end do
+ 
+ end
