diff -Nrcpad gcc-12-20250528/LAST_UPDATED gcc-12-20250604/LAST_UPDATED
*** gcc-12-20250528/LAST_UPDATED	Wed May 28 22:33:48 2025
--- gcc-12-20250604/LAST_UPDATED	Wed Jun  4 22:32:55 2025
***************
*** 1 ****
! Obtained from git: releases/gcc-12 revision 9cd936038de231b5541ae150ef2d815fec28015a
--- 1 ----
! Obtained from git: releases/gcc-12 revision 2c414af9fa1ac2142175919cfaf1bea9efffa0fc
diff -Nrcpad gcc-12-20250528/MD5SUMS gcc-12-20250604/MD5SUMS
*** gcc-12-20250528/MD5SUMS	Wed May 28 22:33:52 2025
--- gcc-12-20250604/MD5SUMS	Wed Jun  4 22:32:59 2025
***************
*** 1,5 ****
  # This file contains the MD5 checksums of the files in the
! # gcc-12-20250528.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-12-20250604.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
! b1b382ddd7b71ef0e59a8a70af99eefe  LAST_UPDATED
  e854cb1e639422e089031eba0c689e15  MAINTAINERS
  5b26d0dff99e7a528342ab4d77a284df  Makefile.def
  e2f1751d40a9663c173f048c1179539e  Makefile.in
--- 21,27 ----
  fd4ecdf5d672efe2b0e409aca9cf9446  ChangeLog.jit
  09538b708302f1735f6fa05b622ecf5e  ChangeLog.tree-ssa
  24ab760126489e69436a43185dc3d202  INSTALL/README
! f06914515b2fdb60f9efe5e3c8eecc10  LAST_UPDATED
  e854cb1e639422e089031eba0c689e15  MAINTAINERS
  5b26d0dff99e7a528342ab4d77a284df  Makefile.def
  e2f1751d40a9663c173f048c1179539e  Makefile.in
*************** a22e70b3f29292d0e628450f4bb11e62  fixinc
*** 471,477 ****
  a916467b91076e631dd8edb7424769c7  gcc/COPYING.LIB
  d32239bcb673463ab874e80d47fae504  gcc/COPYING3
  6a6a8e020838b23406c81b19c1d46df6  gcc/COPYING3.LIB
! b87c1146a417d0263485eb6efce4338f  gcc/ChangeLog
  a3b63c675afa7a655cc2bfa8a907af79  gcc/ChangeLog-1997
  d9a88529352a010253c2e8fb1ed6023b  gcc/ChangeLog-1998
  240f08f81cb4699e8b49347db38233db  gcc/ChangeLog-1999
--- 471,477 ----
  a916467b91076e631dd8edb7424769c7  gcc/COPYING.LIB
  d32239bcb673463ab874e80d47fae504  gcc/COPYING3
  6a6a8e020838b23406c81b19c1d46df6  gcc/COPYING3.LIB
! 186a9f722547e3695fc3f2a2a6fdda87  gcc/ChangeLog
  a3b63c675afa7a655cc2bfa8a907af79  gcc/ChangeLog-1997
  d9a88529352a010253c2e8fb1ed6023b  gcc/ChangeLog-1998
  240f08f81cb4699e8b49347db38233db  gcc/ChangeLog-1999
*************** fb3fadb88e1d2b3b640cfaaa5ff11780  gcc/Ch
*** 505,511 ****
  3eb07e0b2e542409bf73d359f7f65609  gcc/ChangeLog.ptr
  e13638e26743ba41e6011b76cc00d9a9  gcc/ChangeLog.tree-ssa
  739ab47f6425bcea1d05e4fc0542de54  gcc/ChangeLog.tuples
! aafbdd4019c4c7d1c6217673b49744b5  gcc/DATESTAMP
  d41d8cd98f00b204e9800998ecf8427e  gcc/DEV-PHASE
  eb92e1ff5e982ca07e173e0eb286d243  gcc/FSFChangeLog
  30e1e33411566388b3164558482dc5e6  gcc/FSFChangeLog.10
--- 505,511 ----
  3eb07e0b2e542409bf73d359f7f65609  gcc/ChangeLog.ptr
  e13638e26743ba41e6011b76cc00d9a9  gcc/ChangeLog.tree-ssa
  739ab47f6425bcea1d05e4fc0542de54  gcc/ChangeLog.tuples
! 917687cb048636972cb3eb229fea975c  gcc/DATESTAMP
  d41d8cd98f00b204e9800998ecf8427e  gcc/DEV-PHASE
  eb92e1ff5e982ca07e173e0eb286d243  gcc/FSFChangeLog
  30e1e33411566388b3164558482dc5e6  gcc/FSFChangeLog.10
*************** d53d0fbc6526d523bedefd90ee66c697  gcc/co
*** 3293,3299 ****
  184968231b51aa8f6411c16f5b7617b7  gcc/config/aarch64/aarch64-tune.md
  6c7986c4d9051e8d2c655a393c08965a  gcc/config/aarch64/aarch64-tuning-flags.def
  4f60050851035039851c9bded03b452d  gcc/config/aarch64/aarch64-vxworks.h
! b42b9af8a01417e8f87080ce2465102b  gcc/config/aarch64/aarch64.cc
  c91f3bcf184147536b8712f1f259177a  gcc/config/aarch64/aarch64.h
  8caef4f52d1d9ea6813f3604e8dd5699  gcc/config/aarch64/aarch64.md
  3d8b1c6373873351739af54d209f8abe  gcc/config/aarch64/aarch64.opt
--- 3293,3299 ----
  184968231b51aa8f6411c16f5b7617b7  gcc/config/aarch64/aarch64-tune.md
  6c7986c4d9051e8d2c655a393c08965a  gcc/config/aarch64/aarch64-tuning-flags.def
  4f60050851035039851c9bded03b452d  gcc/config/aarch64/aarch64-vxworks.h
! ec43f00d32b6d79297618c576c49504e  gcc/config/aarch64/aarch64.cc
  c91f3bcf184147536b8712f1f259177a  gcc/config/aarch64/aarch64.h
  8caef4f52d1d9ea6813f3604e8dd5699  gcc/config/aarch64/aarch64.md
  3d8b1c6373873351739af54d209f8abe  gcc/config/aarch64/aarch64.opt
*************** b81f031d36161f2b75151b5503458623  gcc/co
*** 5072,5078 ****
  5f947cfa4f11adffe84f558e88a17922  gcc/coroutine-passes.cc
  0fa89640cf054df390ce1a7cc7f2a797  gcc/coverage.cc
  b0252895005c33390b86f406799d9e70  gcc/coverage.h
! c3b2c339cec4b0fa9d5a4d86f236942e  gcc/cp/ChangeLog
  d271e3663538ba1f3281cab3838e92cd  gcc/cp/ChangeLog-1993
  f5a44adbc05521162350ca409d1d95ce  gcc/cp/ChangeLog-1994
  ac55db48d964cb5469ff03c1cd3ee04d  gcc/cp/ChangeLog-1995
--- 5072,5078 ----
  5f947cfa4f11adffe84f558e88a17922  gcc/coroutine-passes.cc
  0fa89640cf054df390ce1a7cc7f2a797  gcc/coverage.cc
  b0252895005c33390b86f406799d9e70  gcc/coverage.h
! 1d1d6dbe6130a6e7b6be2554b1f0d39b  gcc/cp/ChangeLog
  d271e3663538ba1f3281cab3838e92cd  gcc/cp/ChangeLog-1993
  f5a44adbc05521162350ca409d1d95ce  gcc/cp/ChangeLog-1994
  ac55db48d964cb5469ff03c1cd3ee04d  gcc/cp/ChangeLog-1995
*************** b05e7f9587bf188168b525f48c7479f4  gcc/cp
*** 5134,5140 ****
  1a3ebbf7c0f22d963d7ba4a245ff205c  gcc/cp/friend.cc
  0f6900a5092d59c380273a15cc1e6995  gcc/cp/g++spec.cc
  180f96c767a8be30b0159ffb3308d628  gcc/cp/init.cc
! 070afdcd7a31bfd27df0dbdd7a063376  gcc/cp/lambda.cc
  2d025243c67abcccf63845127a051ce4  gcc/cp/lang-specs.h
  7fae35cf7f4dae942a3e4ba08e3fc077  gcc/cp/lex.cc
  759fe1cd255ae198380e59f3fe7c721f  gcc/cp/logic.cc
--- 5134,5140 ----
  1a3ebbf7c0f22d963d7ba4a245ff205c  gcc/cp/friend.cc
  0f6900a5092d59c380273a15cc1e6995  gcc/cp/g++spec.cc
  180f96c767a8be30b0159ffb3308d628  gcc/cp/init.cc
! 249c313a7d69e0ff37e383cdb01b0b03  gcc/cp/lambda.cc
  2d025243c67abcccf63845127a051ce4  gcc/cp/lang-specs.h
  7fae35cf7f4dae942a3e4ba08e3fc077  gcc/cp/lex.cc
  759fe1cd255ae198380e59f3fe7c721f  gcc/cp/logic.cc
*************** bdb7861240a719686c5923e70bd8347a  gcc/ta
*** 6419,6425 ****
  6149228cab283a1f92d51b26eb37646e  gcc/targhooks.cc
  008304bca4d8ea66f0c9bc8749e23bb5  gcc/targhooks.h
  f39fcaa8197187283ccfed40107b426d  gcc/testsuite/.gitattributes
! 2776724a00924c323cba7f203c772619  gcc/testsuite/ChangeLog
  862f04afbd87da2cc6bc432c3f28430f  gcc/testsuite/ChangeLog-1993-2007
  029a5d8dacd25eb5d4711452ac448e5b  gcc/testsuite/ChangeLog-2008
  13ac28c41d51b66b4ec40dba6bd50f39  gcc/testsuite/ChangeLog-2009
--- 6419,6425 ----
  6149228cab283a1f92d51b26eb37646e  gcc/targhooks.cc
  008304bca4d8ea66f0c9bc8749e23bb5  gcc/targhooks.h
  f39fcaa8197187283ccfed40107b426d  gcc/testsuite/.gitattributes
! e97a77b4d72abb3612a90c423b78fa4e  gcc/testsuite/ChangeLog
  862f04afbd87da2cc6bc432c3f28430f  gcc/testsuite/ChangeLog-1993-2007
  029a5d8dacd25eb5d4711452ac448e5b  gcc/testsuite/ChangeLog-2008
  13ac28c41d51b66b4ec40dba6bd50f39  gcc/testsuite/ChangeLog-2009
*************** a7e2f7d20a67204e43ab8b4439aa4e77  gcc/te
*** 16568,16573 ****
--- 16568,16574 ----
  db4d7afa9cc5c159bbf139e868fd3544  gcc/testsuite/g++.dg/cpp2a/concepts-lambda19.C
  c61f89754bf19eb066c90223050eb1d6  gcc/testsuite/g++.dg/cpp2a/concepts-lambda2.C
  2cdd3df6d70a6187c69e0b2e31916579  gcc/testsuite/g++.dg/cpp2a/concepts-lambda20.C
+ c5f62ec8bee71a828d47886f4bfb04dc  gcc/testsuite/g++.dg/cpp2a/concepts-lambda24.C
  f2b845034b89685c0074632f8a1947ff  gcc/testsuite/g++.dg/cpp2a/concepts-lambda3.C
  6f185f0a7016ab67c7f0d4ffa7012182  gcc/testsuite/g++.dg/cpp2a/concepts-lambda4.C
  86976d8466300862e381a2182c187b35  gcc/testsuite/g++.dg/cpp2a/concepts-lambda5.C
*************** fa23934e49741783f674026ff5030aff  gcc/te
*** 25464,25469 ****
--- 25465,25471 ----
  695916482bd1d276cc3c727b90232254  gcc/testsuite/g++.dg/torture/pr109724.C
  4b7c75dc51b97d5dc81c7e936ff3b460  gcc/testsuite/g++.dg/torture/pr111019.C
  f5cb8caa482838045861d5ee18445814  gcc/testsuite/g++.dg/torture/pr113896.C
+ 9df51f0b5a7e716286f2e97dfd28d477  gcc/testsuite/g++.dg/torture/pr119610.C
  161154ed9f6193a2a7da119e068c3f3f  gcc/testsuite/g++.dg/torture/pr27218.C
  a84e9fff95df4801f8e582fbc33303b8  gcc/testsuite/g++.dg/torture/pr30252.C
  e980bf95890544d46879b89f7aa98df6  gcc/testsuite/g++.dg/torture/pr30567.C
*************** f3ce91773bd0b4a3127c481ccd50f20e  gcc/te
*** 30709,30714 ****
--- 30711,30717 ----
  57a0aa7896383cbb0273342d58a4a7b5  gcc/testsuite/g++.target/aarch64/sve/max_1.C
  ab6c5e333d0a740ae5ecff69966813a2  gcc/testsuite/g++.target/aarch64/sve/min_1.C
  6bb662ee32d75fad86cbbcc07aab9998  gcc/testsuite/g++.target/aarch64/sve/pr102252.C
+ a36c6629cdaa92f5a41aa0c862cf5a54  gcc/testsuite/g++.target/aarch64/sve/pr119610-sve.C
  032fe0d5fa79aaf6c36c32fb19a50c00  gcc/testsuite/g++.target/aarch64/sve/pr96974.C
  6c0e94c363caf9e62df35ea98b4918ed  gcc/testsuite/g++.target/aarch64/sve/pr98177-1.C
  e64000c150bb204c31dca884ee33dd4f  gcc/testsuite/g++.target/aarch64/sve/pr98177-2.C
*************** ed294cde0b27b346f37fa7a32bf91ea7  gcc/te
*** 83928,83934 ****
  bb19038b0b7c42c6403475e34570ae3d  gcc/testsuite/gfortran.dg/pr108527.f90
  a367beafff806aa88b45192d28091201  gcc/testsuite/gfortran.dg/pr108529.f90
  56971b3b5ba5a0aa6c2a3044027e0494  gcc/testsuite/gfortran.dg/pr108889.f90
! 78ada5d286128144e86af4a4c1aac9cc  gcc/testsuite/gfortran.dg/pr109345.f90
  898c3ea8360d1452c5f815b15dc6f6f8  gcc/testsuite/gfortran.dg/pr110221.f
  6176c5192c44068787a0e803e38dacbd  gcc/testsuite/gfortran.dg/pr111880.f90
  d3d77a4c149cf5358eb97935171795fb  gcc/testsuite/gfortran.dg/pr114739.f90
--- 83931,83937 ----
  bb19038b0b7c42c6403475e34570ae3d  gcc/testsuite/gfortran.dg/pr108527.f90
  a367beafff806aa88b45192d28091201  gcc/testsuite/gfortran.dg/pr108529.f90
  56971b3b5ba5a0aa6c2a3044027e0494  gcc/testsuite/gfortran.dg/pr108889.f90
! 1ba2d726e7fb19c75c89aeddd046ab55  gcc/testsuite/gfortran.dg/pr109345.f90
  898c3ea8360d1452c5f815b15dc6f6f8  gcc/testsuite/gfortran.dg/pr110221.f
  6176c5192c44068787a0e803e38dacbd  gcc/testsuite/gfortran.dg/pr111880.f90
  d3d77a4c149cf5358eb97935171795fb  gcc/testsuite/gfortran.dg/pr114739.f90
diff -Nrcpad gcc-12-20250528/gcc/ChangeLog gcc-12-20250604/gcc/ChangeLog
*** gcc-12-20250528/gcc/ChangeLog	Wed May 28 22:32:12 2025
--- gcc-12-20250604/gcc/ChangeLog	Wed Jun  4 22:32:11 2025
***************
*** 1,3 ****
--- 1,26 ----
+ 2025-05-30  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	Backported from master:
+ 	2025-04-24  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	PR target/119610
+ 	* config/aarch64/aarch64.cc (aarch64_allocate_and_probe_stack_space):
+ 	Add a bytes_below_sp parameter and use it to calculate the CFA
+ 	offsets.  Attach the first SVE CFA note to the move into the
+ 	associated temporary register.
+ 	(aarch64_allocate_and_probe_stack_space): Update calls accordingly.
+ 	Start out with bytes_per_sp set to the frame size and decrement
+ 	it after each allocation.
+ 
+ 2025-05-28  Andreas Krebbel  <krebbel@linux.ibm.com>
+ 
+ 	Backported from master:
+ 	2024-04-23  Andreas Krebbel  <krebbel@linux.ibm.com>
+ 
+ 	PR target/114676
+ 	* config/s390/s390-c.cc (s390_expand_overloaded_builtin): Use a
+ 	MEM_REF with an addend of type ptr_type_node.
+ 
  2025-05-27  Stefan Schulze Frielinghaus  <stefansf@gcc.gnu.org>
  
  	Backported from master:
diff -Nrcpad gcc-12-20250528/gcc/DATESTAMP gcc-12-20250604/gcc/DATESTAMP
*** gcc-12-20250528/gcc/DATESTAMP	Wed May 28 22:32:12 2025
--- gcc-12-20250604/gcc/DATESTAMP	Wed Jun  4 22:32:12 2025
***************
*** 1 ****
! 20250528
--- 1 ----
! 20250604
diff -Nrcpad gcc-12-20250528/gcc/config/aarch64/aarch64.cc gcc-12-20250604/gcc/config/aarch64/aarch64.cc
*** gcc-12-20250528/gcc/config/aarch64/aarch64.cc	Wed May 28 22:32:14 2025
--- gcc-12-20250604/gcc/config/aarch64/aarch64.cc	Wed Jun  4 22:32:12 2025
*************** aarch64_stack_clash_protection_alloca_pr
*** 9392,9404 ****
  
  
  /* Allocate POLY_SIZE bytes of stack space using TEMP1 and TEMP2 as scratch
!    registers.  If POLY_SIZE is not large enough to require a probe this function
!    will only adjust the stack.  When allocating the stack space
!    FRAME_RELATED_P is then used to indicate if the allocation is frame related.
!    FINAL_ADJUSTMENT_P indicates whether we are allocating the area below
!    the saved registers.  If we are then we ensure that any allocation
!    larger than the ABI defined buffer needs a probe so that the
!    invariant of having a 1KB buffer is maintained.
  
     We emit barriers after each stack adjustment to prevent optimizations from
     breaking the invariant that we never drop the stack more than a page.  This
--- 9392,9407 ----
  
  
  /* Allocate POLY_SIZE bytes of stack space using TEMP1 and TEMP2 as scratch
!    registers, given that the stack pointer is currently BYTES_BELOW_SP bytes
!    above the bottom of the static frame.
! 
!    If POLY_SIZE is not large enough to require a probe this function will only
!    adjust the stack.  When allocating the stack space FRAME_RELATED_P is then
!    used to indicate if the allocation is frame related.  FINAL_ADJUSTMENT_P
!    indicates whether we are allocating the area below the saved registers.
!    If we are then we ensure that any allocation larger than the ABI defined
!    buffer needs a probe so that the invariant of having a 1KB buffer is
!    maintained.
  
     We emit barriers after each stack adjustment to prevent optimizations from
     breaking the invariant that we never drop the stack more than a page.  This
*************** aarch64_stack_clash_protection_alloca_pr
*** 9411,9416 ****
--- 9414,9420 ----
  static void
  aarch64_allocate_and_probe_stack_space (rtx temp1, rtx temp2,
  					poly_int64 poly_size,
+ 					poly_int64 bytes_below_sp,
  					bool frame_related_p,
  					bool final_adjustment_p)
  {
*************** aarch64_allocate_and_probe_stack_space (
*** 9471,9478 ****
        aarch64_add_offset (Pmode, temp1, CONST0_RTX (Pmode),
  			  poly_size, temp1, temp2, false, true);
  
!       rtx_insn *insn = get_last_insn ();
! 
        if (frame_related_p)
  	{
  	  /* This is done to provide unwinding information for the stack
--- 9475,9482 ----
        aarch64_add_offset (Pmode, temp1, CONST0_RTX (Pmode),
  			  poly_size, temp1, temp2, false, true);
  
!       auto initial_cfa_offset = frame.frame_size - bytes_below_sp;
!       auto final_cfa_offset = initial_cfa_offset + poly_size;
        if (frame_related_p)
  	{
  	  /* This is done to provide unwinding information for the stack
*************** aarch64_allocate_and_probe_stack_space (
*** 9482,9509 ****
  	     The tie will expand to nothing but the optimizers will not touch
  	     the instruction.  */
  	  rtx stack_ptr_copy = gen_rtx_REG (Pmode, STACK_CLASH_SVE_CFA_REGNUM);
! 	  emit_move_insn (stack_ptr_copy, stack_pointer_rtx);
  	  emit_insn (gen_stack_tie (stack_ptr_copy, stack_pointer_rtx));
  
  	  /* We want the CFA independent of the stack pointer for the
  	     duration of the loop.  */
! 	  add_reg_note (insn, REG_CFA_DEF_CFA, stack_ptr_copy);
  	  RTX_FRAME_RELATED_P (insn) = 1;
  	}
  
        rtx probe_const = gen_int_mode (min_probe_threshold, Pmode);
        rtx guard_const = gen_int_mode (guard_size, Pmode);
  
!       insn = emit_insn (gen_probe_sve_stack_clash (Pmode, stack_pointer_rtx,
! 						   stack_pointer_rtx, temp1,
! 						   probe_const, guard_const));
  
        /* Now reset the CFA register if needed.  */
        if (frame_related_p)
  	{
  	  add_reg_note (insn, REG_CFA_DEF_CFA,
! 			gen_rtx_PLUS (Pmode, stack_pointer_rtx,
! 				      gen_int_mode (poly_size, Pmode)));
  	  RTX_FRAME_RELATED_P (insn) = 1;
  	}
  
--- 9486,9516 ----
  	     The tie will expand to nothing but the optimizers will not touch
  	     the instruction.  */
  	  rtx stack_ptr_copy = gen_rtx_REG (Pmode, STACK_CLASH_SVE_CFA_REGNUM);
! 	  auto *insn = emit_move_insn (stack_ptr_copy, stack_pointer_rtx);
  	  emit_insn (gen_stack_tie (stack_ptr_copy, stack_pointer_rtx));
  
  	  /* We want the CFA independent of the stack pointer for the
  	     duration of the loop.  */
! 	  add_reg_note (insn, REG_CFA_DEF_CFA,
! 			plus_constant (Pmode, stack_ptr_copy,
! 				       initial_cfa_offset));
  	  RTX_FRAME_RELATED_P (insn) = 1;
  	}
  
        rtx probe_const = gen_int_mode (min_probe_threshold, Pmode);
        rtx guard_const = gen_int_mode (guard_size, Pmode);
  
!       auto *insn
! 	= emit_insn (gen_probe_sve_stack_clash (Pmode, stack_pointer_rtx,
! 						stack_pointer_rtx, temp1,
! 						probe_const, guard_const));
  
        /* Now reset the CFA register if needed.  */
        if (frame_related_p)
  	{
  	  add_reg_note (insn, REG_CFA_DEF_CFA,
! 			plus_constant (Pmode, stack_pointer_rtx,
! 				       final_cfa_offset));
  	  RTX_FRAME_RELATED_P (insn) = 1;
  	}
  
*************** aarch64_allocate_and_probe_stack_space (
*** 9549,9560 ****
  	 We can determine which allocation we are doing by looking at
  	 the value of FRAME_RELATED_P since the final allocations are not
  	 frame related.  */
        if (frame_related_p)
  	{
  	  /* We want the CFA independent of the stack pointer for the
  	     duration of the loop.  */
  	  add_reg_note (insn, REG_CFA_DEF_CFA,
! 			plus_constant (Pmode, temp1, rounded_size));
  	  RTX_FRAME_RELATED_P (insn) = 1;
  	}
  
--- 9556,9568 ----
  	 We can determine which allocation we are doing by looking at
  	 the value of FRAME_RELATED_P since the final allocations are not
  	 frame related.  */
+       auto cfa_offset = frame.frame_size - (bytes_below_sp - rounded_size);
        if (frame_related_p)
  	{
  	  /* We want the CFA independent of the stack pointer for the
  	     duration of the loop.  */
  	  add_reg_note (insn, REG_CFA_DEF_CFA,
! 			plus_constant (Pmode, temp1, cfa_offset));
  	  RTX_FRAME_RELATED_P (insn) = 1;
  	}
  
*************** aarch64_allocate_and_probe_stack_space (
*** 9576,9582 ****
        if (frame_related_p)
  	{
  	  add_reg_note (insn, REG_CFA_DEF_CFA,
! 			plus_constant (Pmode, stack_pointer_rtx, rounded_size));
  	  RTX_FRAME_RELATED_P (insn) = 1;
  	}
  
--- 9584,9590 ----
        if (frame_related_p)
  	{
  	  add_reg_note (insn, REG_CFA_DEF_CFA,
! 			plus_constant (Pmode, stack_pointer_rtx, cfa_offset));
  	  RTX_FRAME_RELATED_P (insn) = 1;
  	}
  
*************** aarch64_expand_prologue (void)
*** 9792,9808 ****
       code below does not handle it for -fstack-clash-protection.  */
    gcc_assert (known_eq (initial_adjust, 0) || callee_adjust == 0);
  
    /* Will only probe if the initial adjustment is larger than the guard
       less the amount of the guard reserved for use by the caller's
       outgoing args.  */
    aarch64_allocate_and_probe_stack_space (tmp0_rtx, tmp1_rtx, initial_adjust,
! 					  true, false);
  
    if (callee_adjust != 0)
!     aarch64_push_regs (reg1, reg2, callee_adjust);
! 
!   /* The offset of the current SP from the bottom of the static frame.  */
!   poly_int64 bytes_below_sp = frame_size - initial_adjust - callee_adjust;
  
    if (emit_frame_chain)
      {
--- 9800,9820 ----
       code below does not handle it for -fstack-clash-protection.  */
    gcc_assert (known_eq (initial_adjust, 0) || callee_adjust == 0);
  
+   /* The offset of the current SP from the bottom of the static frame.  */
+   poly_int64 bytes_below_sp = frame_size;
+ 
    /* Will only probe if the initial adjustment is larger than the guard
       less the amount of the guard reserved for use by the caller's
       outgoing args.  */
    aarch64_allocate_and_probe_stack_space (tmp0_rtx, tmp1_rtx, initial_adjust,
! 					  bytes_below_sp, true, false);
!   bytes_below_sp -= initial_adjust;
  
    if (callee_adjust != 0)
!     {
!       aarch64_push_regs (reg1, reg2, callee_adjust);
!       bytes_below_sp -= callee_adjust;
!     }
  
    if (emit_frame_chain)
      {
*************** aarch64_expand_prologue (void)
*** 9864,9869 ****
--- 9876,9882 ----
  		  || known_eq (initial_adjust, 0));
        aarch64_allocate_and_probe_stack_space (tmp1_rtx, tmp0_rtx,
  					      sve_callee_adjust,
+ 					      bytes_below_sp,
  					      !frame_pointer_needed, false);
        bytes_below_sp -= sve_callee_adjust;
      }
*************** aarch64_expand_prologue (void)
*** 9875,9883 ****
  
    /* We may need to probe the final adjustment if it is larger than the guard
       that is assumed by the called.  */
-   gcc_assert (known_eq (bytes_below_sp, final_adjust));
    aarch64_allocate_and_probe_stack_space (tmp1_rtx, tmp0_rtx, final_adjust,
  					  !frame_pointer_needed, true);
    if (emit_frame_chain && maybe_ne (final_adjust, 0))
      emit_insn (gen_stack_tie (stack_pointer_rtx, hard_frame_pointer_rtx));
  }
--- 9888,9898 ----
  
    /* We may need to probe the final adjustment if it is larger than the guard
       that is assumed by the called.  */
    aarch64_allocate_and_probe_stack_space (tmp1_rtx, tmp0_rtx, final_adjust,
+ 					  bytes_below_sp,
  					  !frame_pointer_needed, true);
+   bytes_below_sp -= final_adjust;
+   gcc_assert (known_eq (bytes_below_sp, 0));
    if (emit_frame_chain && maybe_ne (final_adjust, 0))
      emit_insn (gen_stack_tie (stack_pointer_rtx, hard_frame_pointer_rtx));
  }
diff -Nrcpad gcc-12-20250528/gcc/cp/ChangeLog gcc-12-20250604/gcc/cp/ChangeLog
*** gcc-12-20250528/gcc/cp/ChangeLog	Wed May 28 22:32:14 2025
--- gcc-12-20250604/gcc/cp/ChangeLog	Wed Jun  4 22:32:13 2025
***************
*** 1,3 ****
--- 1,9 ----
+ 2025-06-02  Jason Merrill  <jason@redhat.com>
+ 
+ 	PR c++/120123
+ 	* lambda.cc (nonlambda_method_basetype): Look through lambdas
+ 	even when current_class_ref is null.
+ 
  2025-04-23  Jason Merrill  <jason@redhat.com>
  
  	Backported from master:
diff -Nrcpad gcc-12-20250528/gcc/cp/lambda.cc gcc-12-20250604/gcc/cp/lambda.cc
*** gcc-12-20250528/gcc/cp/lambda.cc	Wed May 28 22:32:14 2025
--- gcc-12-20250604/gcc/cp/lambda.cc	Wed Jun  4 22:32:13 2025
*************** current_nonlambda_function (void)
*** 975,986 ****
  tree
  nonlambda_method_basetype (void)
  {
-   if (!current_class_ref)
-     return NULL_TREE;
- 
    tree type = current_class_type;
    if (!type || !LAMBDA_TYPE_P (type))
!     return type;
  
    while (true)
      {
--- 975,983 ----
  tree
  nonlambda_method_basetype (void)
  {
    tree type = current_class_type;
    if (!type || !LAMBDA_TYPE_P (type))
!     return current_class_ref ? type : NULL_TREE;
  
    while (true)
      {
diff -Nrcpad gcc-12-20250528/gcc/testsuite/ChangeLog gcc-12-20250604/gcc/testsuite/ChangeLog
*** gcc-12-20250528/gcc/testsuite/ChangeLog	Wed May 28 22:32:15 2025
--- gcc-12-20250604/gcc/testsuite/ChangeLog	Wed Jun  4 22:32:15 2025
***************
*** 1,3 ****
--- 1,30 ----
+ 2025-06-02  Jason Merrill  <jason@redhat.com>
+ 
+ 	PR c++/120123
+ 	* g++.dg/cpp2a/concepts-lambda24.C: New test.
+ 
+ 2025-06-02  Paul Thomas  <pault@gcc.gnu.org>
+ 
+ 	PR fortran/109345
+ 	* gfortran.dg/pr109345.f90: Comment out test of component refs.
+ 
+ 2025-05-30  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	Backported from master:
+ 	2025-04-24  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	PR target/119610
+ 	* g++.dg/torture/pr119610.C: New test.
+ 	* g++.target/aarch64/sve/pr119610-sve.C: Likewise.
+ 
+ 2025-05-28  Andreas Krebbel  <krebbel@linux.ibm.com>
+ 
+ 	Backported from master:
+ 	2024-04-23  Andreas Krebbel  <krebbel@linux.ibm.com>
+ 
+ 	PR target/114676
+ 	* gcc.target/s390/zvector/pr114676.c: New test.
+ 
  2025-05-01  Alex Coplan  <alex.coplan@arm.com>
  
  	Backported from master:
diff -Nrcpad gcc-12-20250528/gcc/testsuite/g++.dg/cpp2a/concepts-lambda24.C gcc-12-20250604/gcc/testsuite/g++.dg/cpp2a/concepts-lambda24.C
*** gcc-12-20250528/gcc/testsuite/g++.dg/cpp2a/concepts-lambda24.C	Thu Jan  1 00:00:00 1970
--- gcc-12-20250604/gcc/testsuite/g++.dg/cpp2a/concepts-lambda24.C	Wed Jun  4 22:32:16 2025
***************
*** 0 ****
--- 1,13 ----
+ // PR c++/120123
+ // { dg-do compile { target c++20 } }
+ 
+ struct H {
+     void member(int) {}
+     void call() {
+         [this]() {
+             [this](const auto& v)
+                 requires requires { /*this->*/member(v); }
+             { return member(v); }(0);
+         };
+     }
+ };
diff -Nrcpad gcc-12-20250528/gcc/testsuite/g++.dg/torture/pr119610.C gcc-12-20250604/gcc/testsuite/g++.dg/torture/pr119610.C
*** gcc-12-20250528/gcc/testsuite/g++.dg/torture/pr119610.C	Thu Jan  1 00:00:00 1970
--- gcc-12-20250604/gcc/testsuite/g++.dg/torture/pr119610.C	Wed Jun  4 22:32:18 2025
***************
*** 0 ****
--- 1,18 ----
+ // { dg-do run }
+ // { dg-additional-options "-fstack-protector-strong" { target fstack_protector } }
+ // { dg-additional-options "-fstack-clash-protection" { target supports_stack_clash_protection } }
+ 
+ int *ptr;
+ void foo() {
+   int c[1024*128];
+   ptr = c;
+   throw 1;
+ }
+ int main()
+ {
+   try {
+     foo();
+   } catch(int x) {
+     return 0;
+   }
+ }
diff -Nrcpad gcc-12-20250528/gcc/testsuite/g++.target/aarch64/sve/pr119610-sve.C gcc-12-20250604/gcc/testsuite/g++.target/aarch64/sve/pr119610-sve.C
*** gcc-12-20250528/gcc/testsuite/g++.target/aarch64/sve/pr119610-sve.C	Thu Jan  1 00:00:00 1970
--- gcc-12-20250604/gcc/testsuite/g++.target/aarch64/sve/pr119610-sve.C	Wed Jun  4 22:32:19 2025
***************
*** 0 ****
--- 1,20 ----
+ // { dg-do run { target aarch64_sve_hw } }
+ // { dg-additional-options "-fstack-protector-strong" { target fstack_protector } }
+ // { dg-additional-options "-fstack-clash-protection" { target supports_stack_clash_protection } }
+ 
+ void *a_ptr, *b_ptr;
+ void foo() {
+   __SVInt32_t a;
+   int b[1024*128];
+   a_ptr = &a;
+   b_ptr = b;
+   throw 1;
+ }
+ int main()
+ {
+   try {
+     foo();
+   } catch(int x) {
+     return 0;
+   }
+ }
diff -Nrcpad gcc-12-20250528/gcc/testsuite/gfortran.dg/pr109345.f90 gcc-12-20250604/gcc/testsuite/gfortran.dg/pr109345.f90
*** gcc-12-20250528/gcc/testsuite/gfortran.dg/pr109345.f90	Wed May 28 22:33:25 2025
--- gcc-12-20250604/gcc/testsuite/gfortran.dg/pr109345.f90	Wed Jun  4 22:32:37 2025
*************** program test
*** 29,37 ****
  ! Test character(kind=4)
    call foo (str_t(2)%str_array)
  ! Test component references
!   call foo (str_t%str_array(1), .true.)
  ! Test component references and that array offset is correct.
!   call foo (str_t(2:3)%i)
  
  contains
    subroutine foo (var, flag)
--- 29,37 ----
  ! Test character(kind=4)
    call foo (str_t(2)%str_array)
  ! Test component references
! !  call foo (str_t%str_array(1), .true.) ! Does not work in 12-/13-branches
  ! Test component references and that array offset is correct.
! !  call foo (str_t(2:3)%i)               ! Does not work in 12-/13-branches
  
  contains
    subroutine foo (var, flag)
