diff -Nrcpad gcc-16-20250803/.gitignore gcc-16-20250810/.gitignore
*** gcc-16-20250803/.gitignore	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/.gitignore	Sun Aug 10 22:32:05 2025
*************** stamp-*
*** 71,76 ****
  /gmp*
  /isl*
  /gettext*
- 
- # ADDITIONS from GCCRS front-end
- libgrust/*/target/
--- 71,73 ----
diff -Nrcpad gcc-16-20250803/ChangeLog gcc-16-20250810/ChangeLog
*** gcc-16-20250803/ChangeLog	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/ChangeLog	Sun Aug 10 22:32:05 2025
***************
*** 1,3 ****
--- 1,15 ----
+ 2025-08-08  Andrew Pinski  <andrew.pinski@oss.qualcomm.com>
+ 
+ 	* MAINTAINERS (Andrew Pinski): Update email address.
+ 
+ 2025-08-07  Pengfei Li  <Pengfei.Li2@arm.com>
+ 
+ 	* MAINTAINERS: Add myself.
+ 
+ 2025-08-05  Thomas Schwinge  <tschwinge@baylibre.com>
+ 
+ 	* .gitignore: Remove 'libgrust/*/target/'.
+ 
  2025-08-01  Luis Machado  <luis.machado.foss@gmail.com>
  
  	* MAINTAINERS: Update my e-mail address.
diff -Nrcpad gcc-16-20250803/LAST_UPDATED gcc-16-20250810/LAST_UPDATED
*** gcc-16-20250803/LAST_UPDATED	Sun Aug  3 22:34:14 2025
--- gcc-16-20250810/LAST_UPDATED	Sun Aug 10 22:33:28 2025
***************
*** 1 ****
! Obtained from git: master revision 625d5776f9cd0b09512d7b5e403737ad944f33d3
--- 1 ----
! Obtained from git: master revision 767f65cf82b516656dda95802a83bf905550f0b3
diff -Nrcpad gcc-16-20250803/MAINTAINERS gcc-16-20250810/MAINTAINERS
*** gcc-16-20250803/MAINTAINERS	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/MAINTAINERS	Sun Aug 10 22:32:05 2025
*************** check in changes outside of the parts of
*** 276,282 ****
                          Reviewers
  
  aarch64 port            Alex Coplan             <alex.coplan@arm.com>
! aarch64 port            Andrew Pinski           <pinskia@gmail.com>
  arm port (MVE)          Christophe Lyon         <christophe.lyon@arm.com>
  callgraph               Martin Jambor           <mjambor@suse.cz>
  C front end             Marek Polacek           <polacek@redhat.com>
--- 276,282 ----
                          Reviewers
  
  aarch64 port            Alex Coplan             <alex.coplan@arm.com>
! aarch64 port            Andrew Pinski           <andrew.pinski@oss.qualcomm.com>
  arm port (MVE)          Christophe Lyon         <christophe.lyon@arm.com>
  callgraph               Martin Jambor           <mjambor@suse.cz>
  C front end             Marek Polacek           <polacek@redhat.com>
*************** James Lemke                     jwlemke
*** 628,633 ****
--- 628,634 ----
  Ilya Leoshkevich                iii             <iii@linux.ibm.com>
  Kriang Lerdsuwanakij            lerdsuwa        <lerdsuwa@users.sourceforge.net>
  Pan Li                          -               <pan2.li@intel.com>
+ Pengfei Li                      pfustc          <pengfei.li2@arm.com>
  Renlin Li                       renlin          <renlin.li@arm.com>
  Xinliang David Li               davidxl         <davidxl@google.com>
  Kewen Lin                       linkw           <linkw@gcc.gnu.org>
*************** Sebastian Peryt                 speryt
*** 733,739 ****
  Johannes Pfau                   jpfau           <johannespfau@gmail.com>
  Gerald Pfeifer                  gerald          <gerald@pfeifer.com>
  Kaushik Phatak                  kaushikp        <kaushik.phatak@kpitcummins.com>
! Andrew Pinski                   pinskia         <pinskia@gmail.com>
  Nicolas Pitre                   nico            <nico@cam.org>
  Michael Ploujnikov              plouj           <michael.ploujnikov@oracle.com>
  Paul Pluzhnikov                 ppluzhnikov     <ppluzhnikov@google.com>
--- 734,740 ----
  Johannes Pfau                   jpfau           <johannespfau@gmail.com>
  Gerald Pfeifer                  gerald          <gerald@pfeifer.com>
  Kaushik Phatak                  kaushikp        <kaushik.phatak@kpitcummins.com>
! Andrew Pinski                   pinskia         <andrew.pinski@qualcomm.com>
  Nicolas Pitre                   nico            <nico@cam.org>
  Michael Ploujnikov              plouj           <michael.ploujnikov@oracle.com>
  Paul Pluzhnikov                 ppluzhnikov     <ppluzhnikov@google.com>
*************** Immad Mir
*** 958,963 ****
--- 959,965 ----
  Gaius Mulley                                    <gaiusmod2@gmail.com>
  Szabolcs Nagy                                   <nsz@gcc.gnu.org>
  Andrew Pinski                                   <quic_apinski@quicinc.com>
+ Andrew Pinski                                   <andrew.pinski@oss.qualcomm.com>
  Siddhesh Poyarekar                              <siddhesh@gotplt.org>
  Ramana Radhakrishnan                            <ramanara@nvidia.com>
  Navid Rahimi                                    <navidr@gcc.gnu.org>
diff -Nrcpad gcc-16-20250803/MD5SUMS gcc-16-20250810/MD5SUMS
*** gcc-16-20250803/MD5SUMS	Sun Aug  3 22:34:19 2025
--- gcc-16-20250810/MD5SUMS	Sun Aug 10 22:33:42 2025
***************
*** 1,5 ****
  # This file contains the MD5 checksums of the files in the
! # gcc-16-20250803.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-16-20250810.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
*************** b91d600742b62d1860809cb184055a3d  .forge
*** 14,32 ****
  5b296b32e07d2a84f4ac051ed7f95b91  .gitattributes
  426ab4ae9cc194b71b388a6471471772  .github/CONTRIBUTING.md
  b8acb527560fc760209d200fcfab8ff4  .github/PULL_REQUEST_TEMPLATE.md
! 2d0007f1121f1290ae240115684553d9  .gitignore
  8c00452ef1e298846493ec8b239f93e2  ABOUT-NLS
  59530bdf33659b29e73d4adb9f9f6552  COPYING
  2d5025d4aa3495befef8f17206a5b0a1  COPYING.LIB
  fe60d87048567d4fe8c8a0ed2448bcc8  COPYING.RUNTIME
  d32239bcb673463ab874e80d47fae504  COPYING3
  6a6a8e020838b23406c81b19c1d46df6  COPYING3.LIB
! 7cb40731c060612967bac7d232a73e30  ChangeLog
  fd4ecdf5d672efe2b0e409aca9cf9446  ChangeLog.jit
  09538b708302f1735f6fa05b622ecf5e  ChangeLog.tree-ssa
  24ab760126489e69436a43185dc3d202  INSTALL/README
! 2637a34d71f20a87fcb36bbb9712b31a  LAST_UPDATED
! 384994e3b7ae9dae8f13f2c588d24116  MAINTAINERS
  95166ed050922b15d201d1fa647b5872  Makefile.def
  7dcc983bfbcda6838b504185562b60a3  Makefile.in
  2c81c9de7da119a00341d5e9529e629f  Makefile.tpl
--- 14,32 ----
  5b296b32e07d2a84f4ac051ed7f95b91  .gitattributes
  426ab4ae9cc194b71b388a6471471772  .github/CONTRIBUTING.md
  b8acb527560fc760209d200fcfab8ff4  .github/PULL_REQUEST_TEMPLATE.md
! ac5a8807f431d3dab46a7425b96379e4  .gitignore
  8c00452ef1e298846493ec8b239f93e2  ABOUT-NLS
  59530bdf33659b29e73d4adb9f9f6552  COPYING
  2d5025d4aa3495befef8f17206a5b0a1  COPYING.LIB
  fe60d87048567d4fe8c8a0ed2448bcc8  COPYING.RUNTIME
  d32239bcb673463ab874e80d47fae504  COPYING3
  6a6a8e020838b23406c81b19c1d46df6  COPYING3.LIB
! e0f2aaf90010c585520a9a2f0c154f6e  ChangeLog
  fd4ecdf5d672efe2b0e409aca9cf9446  ChangeLog.jit
  09538b708302f1735f6fa05b622ecf5e  ChangeLog.tree-ssa
  24ab760126489e69436a43185dc3d202  INSTALL/README
! f0cec58f68019807332673bbd1763b64  LAST_UPDATED
! 7ed0728d115aa4cf63b87bd3146a2ee2  MAINTAINERS
  95166ed050922b15d201d1fa647b5872  Makefile.def
  7dcc983bfbcda6838b504185562b60a3  Makefile.in
  2c81c9de7da119a00341d5e9529e629f  Makefile.tpl
*************** f8cc157a22bc4fae23cee0f7da613154  config
*** 102,108 ****
  cbcbd9977ef1239ccac0c5c54d214302  config/ld-symbolic.m4
  1cbbc8830601bf43a3c42ee10a01eecd  config/lead-dot.m4
  d9835512bc6d5a706cfd0cfa62810e86  config/lib-ld.m4
! 0a70244d959a1a5320a786bc0fa37268  config/lib-link.m4
  4455537cdae70977a1283180062a2d8d  config/lib-prefix.m4
  b75e527c5a9b8dcbcfb1ac321fa244eb  config/libstdc++-raw-cxx.m4
  534dce34ae221e73e2d67d3ba07f00a3  config/lthostflags.m4
--- 102,108 ----
  cbcbd9977ef1239ccac0c5c54d214302  config/ld-symbolic.m4
  1cbbc8830601bf43a3c42ee10a01eecd  config/lead-dot.m4
  d9835512bc6d5a706cfd0cfa62810e86  config/lib-ld.m4
! 387d452a4a5a98ccf22f47cfad69d89f  config/lib-link.m4
  4455537cdae70977a1283180062a2d8d  config/lib-prefix.m4
  b75e527c5a9b8dcbcfb1ac321fa244eb  config/libstdc++-raw-cxx.m4
  534dce34ae221e73e2d67d3ba07f00a3  config/lthostflags.m4
*************** e2dc6b4fd62b77bff96b7951ef74f78f  config
*** 154,160 ****
  db74a73c3c9c3cc71edec37c2436e082  config/zstd.m4
  9d9c5508a65175be5f9e10721e55ebbc  configure
  82e46c5338f6449fa0a149b6adf12797  configure.ac
! 972d706476a3b4755386b476262040d0  contrib/ChangeLog
  5fc435c7928f858246df931ea3f3ece7  contrib/ChangeLog.jit
  7af8d2979bf1a7cfa88e30d05fa22be2  contrib/ChangeLog.tree-ssa
  13605e5ba7b533ecbe3a902b8ebe4079  contrib/analyze_brprob.py
--- 154,160 ----
  db74a73c3c9c3cc71edec37c2436e082  config/zstd.m4
  9d9c5508a65175be5f9e10721e55ebbc  configure
  82e46c5338f6449fa0a149b6adf12797  configure.ac
! 21751c43e795dd59f465b4bc791ca671  contrib/ChangeLog
  5fc435c7928f858246df931ea3f3ece7  contrib/ChangeLog.jit
  7af8d2979bf1a7cfa88e30d05fa22be2  contrib/ChangeLog.tree-ssa
  13605e5ba7b533ecbe3a902b8ebe4079  contrib/analyze_brprob.py
*************** c3217001bd26d7357f97d76467773e6d  contri
*** 186,192 ****
  5366c5961ca00049e66387009ac4311e  contrib/dg-out-generator.pl
  8d11d67047d66e5a932dfc9ff91893fa  contrib/dglib.pm
  1a43c19edffafd7cca44c23265ada323  contrib/diffsummary.py
! 5bda781277a8bf1ae8288d346a92cece  contrib/download_prerequisites
  c031cdd918e93a5780aab350a42591d8  contrib/filter-clang-warnings.py
  332fd0835826d637b5b6cf8db14358a5  contrib/filter_gcc_for_doxygen
  db03e57377f9eb202b7b783eb81fe40d  contrib/filter_knr2ansi.pl
--- 186,192 ----
  5366c5961ca00049e66387009ac4311e  contrib/dg-out-generator.pl
  8d11d67047d66e5a932dfc9ff91893fa  contrib/dglib.pm
  1a43c19edffafd7cca44c23265ada323  contrib/diffsummary.py
! a3e118e3f5c4e111a9db3e8b48a452cf  contrib/download_prerequisites
  c031cdd918e93a5780aab350a42591d8  contrib/filter-clang-warnings.py
  332fd0835826d637b5b6cf8db14358a5  contrib/filter_gcc_for_doxygen
  db03e57377f9eb202b7b783eb81fe40d  contrib/filter_knr2ansi.pl
*************** c5572589247d96d3a50b4dab8f7bcd46  contri
*** 253,260 ****
  56f5ae231f8677575e2be3afe11f0bf3  contrib/patch_tester.sh
  d97ecb8328de32bbaeeb213a0d8d3af7  contrib/prepare-commit-msg
  54a8a1946d9e81a805292deef2e16064  contrib/prepare_patch.sh
! 2809fb88a72709fdece476dcdcb841a4  contrib/prerequisites.md5
! 17fac6b39df387ffce2f399bf24a4193  contrib/prerequisites.sha512
  f6d7aacca35d091b5c304edef3e4472f  contrib/regenerate-sarif-spec-index.py
  1bfdcf534875228aa24e1d6d8223a406  contrib/reghunt/ChangeLog
  2f6b6802701c14f9274e2103987932d6  contrib/reghunt/bin/gcc-build-full
--- 253,260 ----
  56f5ae231f8677575e2be3afe11f0bf3  contrib/patch_tester.sh
  d97ecb8328de32bbaeeb213a0d8d3af7  contrib/prepare-commit-msg
  54a8a1946d9e81a805292deef2e16064  contrib/prepare_patch.sh
! 1e0f018552766cabbeae5f6f182bf99e  contrib/prerequisites.md5
! ace5565a36009a7978462fa9d727bea3  contrib/prerequisites.sha512
  f6d7aacca35d091b5c304edef3e4472f  contrib/regenerate-sarif-spec-index.py
  1bfdcf534875228aa24e1d6d8223a406  contrib/reghunt/ChangeLog
  2f6b6802701c14f9274e2103987932d6  contrib/reghunt/bin/gcc-build-full
*************** a22e70b3f29292d0e628450f4bb11e62  fixinc
*** 516,522 ****
  a916467b91076e631dd8edb7424769c7  gcc/COPYING.LIB
  d32239bcb673463ab874e80d47fae504  gcc/COPYING3
  6a6a8e020838b23406c81b19c1d46df6  gcc/COPYING3.LIB
! 331e2035c7757991ad7ac47f5b064d83  gcc/ChangeLog
  51281e73aa07fb62394bd72f3c9299ba  gcc/ChangeLog-1997
  f77af8c9ac412064886b00c5506123b5  gcc/ChangeLog-1998
  00a2e4ead1b289bf69bca0196fed6f9f  gcc/ChangeLog-1999
--- 516,522 ----
  a916467b91076e631dd8edb7424769c7  gcc/COPYING.LIB
  d32239bcb673463ab874e80d47fae504  gcc/COPYING3
  6a6a8e020838b23406c81b19c1d46df6  gcc/COPYING3.LIB
! 1ce078976bf26cc510fb688f82e8665f  gcc/ChangeLog
  51281e73aa07fb62394bd72f3c9299ba  gcc/ChangeLog-1997
  f77af8c9ac412064886b00c5506123b5  gcc/ChangeLog-1998
  00a2e4ead1b289bf69bca0196fed6f9f  gcc/ChangeLog-1999
*************** fb3fadb88e1d2b3b640cfaaa5ff11780  gcc/Ch
*** 553,571 ****
  3eb07e0b2e542409bf73d359f7f65609  gcc/ChangeLog.ptr
  e13638e26743ba41e6011b76cc00d9a9  gcc/ChangeLog.tree-ssa
  739ab47f6425bcea1d05e4fc0542de54  gcc/ChangeLog.tuples
! ce8cfb866d9fcdce35425c0cdb2d5715  gcc/DATESTAMP
  deb513e591f23901188e22323bd3b1d4  gcc/DEV-PHASE
  eb92e1ff5e982ca07e173e0eb286d243  gcc/FSFChangeLog
  30e1e33411566388b3164558482dc5e6  gcc/FSFChangeLog.10
  36698274bb69e2ada20f5cc434f3caa5  gcc/FSFChangeLog.11
  4dc2573d948287a3722ce977490b026c  gcc/LANGUAGES
! b7d7c0a6ff0961de8c0c78f3fff90367  gcc/Makefile.in
  ec6799501b2eb2923d5de6a66169dbd2  gcc/ONEWS
  15d6908b4409b0925d9f1c72b56b5cb7  gcc/README.Portability
  cd96bf34cb76c97f86704a59b9ddb18a  gcc/acinclude.m4
  18db4664d7e31002aac43ebcf20e075f  gcc/aclocal.m4
  16a499934b71eb6cf7c0d6899cd6006a  gcc/ada/.gitignore
! c93bc17e93a8cef4f7497773053aa3d7  gcc/ada/ChangeLog
  c2094c0d3135f9ac89917f162046ee04  gcc/ada/ChangeLog-2001
  fa410b57f5d814d5d3ac3b45f486cdcf  gcc/ada/ChangeLog-2002
  2dbefa7bdc8dc28ec746002028861278  gcc/ada/ChangeLog-2003
--- 553,571 ----
  3eb07e0b2e542409bf73d359f7f65609  gcc/ChangeLog.ptr
  e13638e26743ba41e6011b76cc00d9a9  gcc/ChangeLog.tree-ssa
  739ab47f6425bcea1d05e4fc0542de54  gcc/ChangeLog.tuples
! 96080bcb5a51e2c865fcb008e4c04db2  gcc/DATESTAMP
  deb513e591f23901188e22323bd3b1d4  gcc/DEV-PHASE
  eb92e1ff5e982ca07e173e0eb286d243  gcc/FSFChangeLog
  30e1e33411566388b3164558482dc5e6  gcc/FSFChangeLog.10
  36698274bb69e2ada20f5cc434f3caa5  gcc/FSFChangeLog.11
  4dc2573d948287a3722ce977490b026c  gcc/LANGUAGES
! 7cc30ea9e3c9a382de68ec18b1137ab8  gcc/Makefile.in
  ec6799501b2eb2923d5de6a66169dbd2  gcc/ONEWS
  15d6908b4409b0925d9f1c72b56b5cb7  gcc/README.Portability
  cd96bf34cb76c97f86704a59b9ddb18a  gcc/acinclude.m4
  18db4664d7e31002aac43ebcf20e075f  gcc/aclocal.m4
  16a499934b71eb6cf7c0d6899cd6006a  gcc/ada/.gitignore
! 10e845a8aa8bae6f04a6cc58c449fca2  gcc/ada/ChangeLog
  c2094c0d3135f9ac89917f162046ee04  gcc/ada/ChangeLog-2001
  fa410b57f5d814d5d3ac3b45f486cdcf  gcc/ada/ChangeLog-2002
  2dbefa7bdc8dc28ec746002028861278  gcc/ada/ChangeLog-2003
*************** f8207765beac36c54d43698a11140afa  gcc/ad
*** 614,620 ****
  5470386a6301c0323b6ee66cf06c1e42  gcc/ada/argv.c
  f2493dd09ce42a8a76ba82606b9e20e3  gcc/ada/aspects.adb
  e2eaeeeffdac88a55132441a8de89c4a  gcc/ada/aspects.ads
! 96017e82d14823563a6f140bb84ab657  gcc/ada/atree.adb
  14d6b3ce6a60df74711e12144f5f85a2  gcc/ada/atree.ads
  1a5f952bcb9d3c3529147729f3c4ef61  gcc/ada/atree.h
  557d2d802d51833ba752f2b05e30c591  gcc/ada/aux-io.c
--- 614,620 ----
  5470386a6301c0323b6ee66cf06c1e42  gcc/ada/argv.c
  f2493dd09ce42a8a76ba82606b9e20e3  gcc/ada/aspects.adb
  e2eaeeeffdac88a55132441a8de89c4a  gcc/ada/aspects.ads
! d3970e0239fad08abd145f22829980bf  gcc/ada/atree.adb
  14d6b3ce6a60df74711e12144f5f85a2  gcc/ada/atree.ads
  1a5f952bcb9d3c3529147729f3c4ef61  gcc/ada/atree.h
  557d2d802d51833ba752f2b05e30c591  gcc/ada/aux-io.c
*************** f963647952269416533799c6a5117ea3  gcc/ad
*** 663,669 ****
  8c73593e7f221d2f965d45654a94a636  gcc/ada/comperr.adb
  b819ca6fd93695993d2656d2edc4cc8c  gcc/ada/comperr.ads
  7f9ac0dab1302fd2696f52755a30ca56  gcc/ada/config-lang.in
! be457e4923d2083550c66061c7e4d1e9  gcc/ada/contracts.adb
  08509704a245c7fb15ecf43481261825  gcc/ada/contracts.ads
  09a5213fb46479fc00bc1e507f07c02d  gcc/ada/csets.adb
  c8fc2a7d00b9bdf2dfb05cf0fc1c945f  gcc/ada/csets.ads
--- 663,669 ----
  8c73593e7f221d2f965d45654a94a636  gcc/ada/comperr.adb
  b819ca6fd93695993d2656d2edc4cc8c  gcc/ada/comperr.ads
  7f9ac0dab1302fd2696f52755a30ca56  gcc/ada/config-lang.in
! 0738f6221f00e89a133066ef572b4111  gcc/ada/contracts.adb
  08509704a245c7fb15ecf43481261825  gcc/ada/contracts.ads
  09a5213fb46479fc00bc1e507f07c02d  gcc/ada/csets.adb
  c8fc2a7d00b9bdf2dfb05cf0fc1c945f  gcc/ada/csets.ads
*************** fce186389d317dec9c580f569a2a845a  gcc/ad
*** 762,774 ****
  c6728830f0888dc3385e474b5925c01f  gcc/ada/exp_ch13.ads
  d037443d1b61c02110e124f3c701b449  gcc/ada/exp_ch2.adb
  476e299ea88b583859604d0071046143  gcc/ada/exp_ch2.ads
! f21e17620da6dec2cf524ed22e35caa7  gcc/ada/exp_ch3.adb
  53e0d855cd76aedff48a9e6266db49e8  gcc/ada/exp_ch3.ads
  5ed207f23c17d3b5d6d3569d9a37e46c  gcc/ada/exp_ch4.adb
  ef982b9647c35560ae7ff386e547bd16  gcc/ada/exp_ch4.ads
  d8ee1a2097135d84f7788fd2ece2f305  gcc/ada/exp_ch5.adb
  f0c7dc0ade3f9639e946e709a9288f31  gcc/ada/exp_ch5.ads
! 9cddce09930e7179c134da0bdddbe8d0  gcc/ada/exp_ch6.adb
  54a1ff576d38d91bbd44c24ee1a6a5ff  gcc/ada/exp_ch6.ads
  74b1c0c8de6d21525f546baf9d52d9c3  gcc/ada/exp_ch7.adb
  31ee5e50c565d4788d9b794acb5bfebb  gcc/ada/exp_ch7.ads
--- 762,774 ----
  c6728830f0888dc3385e474b5925c01f  gcc/ada/exp_ch13.ads
  d037443d1b61c02110e124f3c701b449  gcc/ada/exp_ch2.adb
  476e299ea88b583859604d0071046143  gcc/ada/exp_ch2.ads
! c8d1200221e8c4f8aac632eac7c76637  gcc/ada/exp_ch3.adb
  53e0d855cd76aedff48a9e6266db49e8  gcc/ada/exp_ch3.ads
  5ed207f23c17d3b5d6d3569d9a37e46c  gcc/ada/exp_ch4.adb
  ef982b9647c35560ae7ff386e547bd16  gcc/ada/exp_ch4.ads
  d8ee1a2097135d84f7788fd2ece2f305  gcc/ada/exp_ch5.adb
  f0c7dc0ade3f9639e946e709a9288f31  gcc/ada/exp_ch5.ads
! 3532d419e14634f719ed9b561064eac8  gcc/ada/exp_ch6.adb
  54a1ff576d38d91bbd44c24ee1a6a5ff  gcc/ada/exp_ch6.ads
  74b1c0c8de6d21525f546baf9d52d9c3  gcc/ada/exp_ch7.adb
  31ee5e50c565d4788d9b794acb5bfebb  gcc/ada/exp_ch7.ads
*************** f47ce79d25dbb4d2f5cc6c375ee8c103  gcc/ad
*** 780,786 ****
  983664237ff0b38442a164f60d531514  gcc/ada/exp_code.ads
  c5f46927bfde5cfdba7070186c0a3890  gcc/ada/exp_dbug.adb
  7d55b512bc6b963b537cd44b692b8a54  gcc/ada/exp_dbug.ads
! 822f3c96f37d1727a89b5db88b16f1e2  gcc/ada/exp_disp.adb
  7151f16c23b394a2f2eef990ebee4e20  gcc/ada/exp_disp.ads
  f8d7c73c2eb136405382e9f889d15683  gcc/ada/exp_dist.adb
  116919038aa6e7d0ec9ce9ab609f0bc2  gcc/ada/exp_dist.ads
--- 780,786 ----
  983664237ff0b38442a164f60d531514  gcc/ada/exp_code.ads
  c5f46927bfde5cfdba7070186c0a3890  gcc/ada/exp_dbug.adb
  7d55b512bc6b963b537cd44b692b8a54  gcc/ada/exp_dbug.ads
! 51e31af76a3ea7f661ce619e1314fc98  gcc/ada/exp_disp.adb
  7151f16c23b394a2f2eef990ebee4e20  gcc/ada/exp_disp.ads
  f8d7c73c2eb136405382e9f889d15683  gcc/ada/exp_dist.adb
  116919038aa6e7d0ec9ce9ab609f0bc2  gcc/ada/exp_dist.ads
*************** c48a8396237679c48ceef2c507661e1a  gcc/ad
*** 792,798 ****
  923affd79668e065bae4808313b11bf9  gcc/ada/exp_intr.ads
  6161c718f4bd4f605642bedae6f6642f  gcc/ada/exp_pakd.adb
  0e4de6363c3876604fc8fa97e180ddcf  gcc/ada/exp_pakd.ads
! be32a682413bacdc827334ec3f62973a  gcc/ada/exp_prag.adb
  b971e56ee00efc31bd07e4f49eb4e97e  gcc/ada/exp_prag.ads
  6983963a291a366b979e48c5a8edaf02  gcc/ada/exp_put_image.adb
  c0f39ee1d515a13193e5726a49291c99  gcc/ada/exp_put_image.ads
--- 792,798 ----
  923affd79668e065bae4808313b11bf9  gcc/ada/exp_intr.ads
  6161c718f4bd4f605642bedae6f6642f  gcc/ada/exp_pakd.adb
  0e4de6363c3876604fc8fa97e180ddcf  gcc/ada/exp_pakd.ads
! 5b7dff93ba872a742a11fc88058deae6  gcc/ada/exp_prag.adb
  b971e56ee00efc31bd07e4f49eb4e97e  gcc/ada/exp_prag.ads
  6983963a291a366b979e48c5a8edaf02  gcc/ada/exp_put_image.adb
  c0f39ee1d515a13193e5726a49291c99  gcc/ada/exp_put_image.ads
*************** e224b65ac653dc73160c1665f825b557  gcc/ad
*** 800,806 ****
  adda0da8d4f449351c0486c3277f39bd  gcc/ada/exp_sel.ads
  624e684a9e8c068e4ad7dc5d3a3eb244  gcc/ada/exp_smem.adb
  5eb50023abeda9a76f66518671ad1d05  gcc/ada/exp_smem.ads
! e0237c4fffac107d40eb312c5be606db  gcc/ada/exp_spark.adb
  0365865a8be979f0a1db6a61cadbe940  gcc/ada/exp_spark.ads
  c545b78124b9df301cdeef2979c79209  gcc/ada/exp_strm.adb
  772292d8d5c1417fcb3279f7ac312e3a  gcc/ada/exp_strm.ads
--- 800,806 ----
  adda0da8d4f449351c0486c3277f39bd  gcc/ada/exp_sel.ads
  624e684a9e8c068e4ad7dc5d3a3eb244  gcc/ada/exp_smem.adb
  5eb50023abeda9a76f66518671ad1d05  gcc/ada/exp_smem.ads
! 6089fb5771e4cd54334f73ef36cfe220  gcc/ada/exp_spark.adb
  0365865a8be979f0a1db6a61cadbe940  gcc/ada/exp_spark.ads
  c545b78124b9df301cdeef2979c79209  gcc/ada/exp_strm.adb
  772292d8d5c1417fcb3279f7ac312e3a  gcc/ada/exp_strm.ads
*************** c545b78124b9df301cdeef2979c79209  gcc/ad
*** 808,816 ****
  52a5741c37559d0398594d7baa1c99ac  gcc/ada/exp_tss.ads
  a55ae41c0e68be209828e4229c2bbae3  gcc/ada/exp_unst.adb
  d2f34876e61000e49299ef9b2569cbbf  gcc/ada/exp_unst.ads
! 620fcc032d227b06cedd5ace6d46dc37  gcc/ada/exp_util.adb
  f38c33811ff4495921f4fab803f1b045  gcc/ada/exp_util.ads
! d12050aeac4d9f87dd69e7ae55d6dfce  gcc/ada/expander.adb
  53bb0eb5c4feebf8b5fbef639f5827bd  gcc/ada/expander.ads
  b38851c9b7a0167a71b96e69b7c86fb1  gcc/ada/expect.c
  ec920df5545ce1582319f1bfda3c5a19  gcc/ada/fe.h
--- 808,816 ----
  52a5741c37559d0398594d7baa1c99ac  gcc/ada/exp_tss.ads
  a55ae41c0e68be209828e4229c2bbae3  gcc/ada/exp_unst.adb
  d2f34876e61000e49299ef9b2569cbbf  gcc/ada/exp_unst.ads
! 7d09f69be735e84962feb8b42c74adf0  gcc/ada/exp_util.adb
  f38c33811ff4495921f4fab803f1b045  gcc/ada/exp_util.ads
! 46d0480b64db4c72cf1f08b18e3c33cf  gcc/ada/expander.adb
  53bb0eb5c4feebf8b5fbef639f5827bd  gcc/ada/expander.ads
  b38851c9b7a0167a71b96e69b7c86fb1  gcc/ada/expect.c
  ec920df5545ce1582319f1bfda3c5a19  gcc/ada/fe.h
*************** fdb9382a8288a3a5b805910a0a3615e8  gcc/ad
*** 823,831 ****
  576d7463667fc4c859a05f9e19146427  gcc/ada/fname-uf.ads
  ec7cf235c00294fe67198b9bf264f3d9  gcc/ada/fname.adb
  5ef403dc7e6540ad58ec4ccec10de65c  gcc/ada/fname.ads
! 545e902233226ec4090c2c6ac65dd8b1  gcc/ada/freeze.adb
  0cfb73b82bc6277eb801329c392229d2  gcc/ada/freeze.ads
! 498bb16c341cb753da6cbb10f928fb0f  gcc/ada/frontend.adb
  6f776be1d84e9d8c996b576c19a4349f  gcc/ada/frontend.ads
  4c71fe1c01f1248f7bc0a69b8a6315e6  gcc/ada/gcc-interface/Make-lang.in
  c9363baf654f7376690ac9ea9b9c33d3  gcc/ada/gcc-interface/Makefile.in
--- 823,831 ----
  576d7463667fc4c859a05f9e19146427  gcc/ada/fname-uf.ads
  ec7cf235c00294fe67198b9bf264f3d9  gcc/ada/fname.adb
  5ef403dc7e6540ad58ec4ccec10de65c  gcc/ada/fname.ads
! 26901331fec65afaf064fe92c4a61b4a  gcc/ada/freeze.adb
  0cfb73b82bc6277eb801329c392229d2  gcc/ada/freeze.ads
! 78dfce82b053fc553450c7ce6ee486d2  gcc/ada/frontend.adb
  6f776be1d84e9d8c996b576c19a4349f  gcc/ada/frontend.ads
  4c71fe1c01f1248f7bc0a69b8a6315e6  gcc/ada/gcc-interface/Make-lang.in
  c9363baf654f7376690ac9ea9b9c33d3  gcc/ada/gcc-interface/Makefile.in
*************** a1d2619ccca21c06754f3cdd326876e1  gcc/ad
*** 864,873 ****
  0930ee3acae3e581cd90b4ea71d36c46  gcc/ada/get_scos.ads
  c30d04e8e72b6ecb391a5f74ed43baa6  gcc/ada/get_targ.adb
  1033bc14018eca0ac6056a8955c8e228  gcc/ada/get_targ.ads
! 529f0489c77f6bacb07d0c20d34ba541  gcc/ada/ghost.adb
! 169c6bef83eb7711cececa07b3485c6f  gcc/ada/ghost.ads
  6f5b1925a8a5b030703dd62acb3e37cc  gcc/ada/gnat-style.texi
! 93a79ce6199f9950aed6b980e31bd48d  gcc/ada/gnat1drv.adb
  9ed317231a93f12d370f13f5070cdaab  gcc/ada/gnat1drv.ads
  917ea7311a30ec4c5cec3e610ca640c2  gcc/ada/gnat2.gpr
  49c5329fd360e2bf4e549bc7de93aab7  gcc/ada/gnat_cuda.adb
--- 864,873 ----
  0930ee3acae3e581cd90b4ea71d36c46  gcc/ada/get_scos.ads
  c30d04e8e72b6ecb391a5f74ed43baa6  gcc/ada/get_targ.adb
  1033bc14018eca0ac6056a8955c8e228  gcc/ada/get_targ.ads
! af88f36df7deb1b438126a4adbde3925  gcc/ada/ghost.adb
! c51cf753b6030a84065c5ae3ff7b4212  gcc/ada/ghost.ads
  6f5b1925a8a5b030703dd62acb3e37cc  gcc/ada/gnat-style.texi
! ebef4e0f05d0f0094f32bcd32535d620  gcc/ada/gnat1drv.adb
  9ed317231a93f12d370f13f5070cdaab  gcc/ada/gnat1drv.ads
  917ea7311a30ec4c5cec3e610ca640c2  gcc/ada/gnat2.gpr
  49c5329fd360e2bf4e549bc7de93aab7  gcc/ada/gnat_cuda.adb
*************** abb502e358163dc5e01633496a0013fc  gcc/ad
*** 925,934 ****
  201c53c6d3da32513befd9354402706e  gcc/ada/lib-sort.adb
  1700161465ece50ec303564c1d488050  gcc/ada/lib-util.adb
  1cbf7ce71e82c406e945d0a1195bd1e1  gcc/ada/lib-util.ads
! 7c40c7e02bfd219fdacaf79deacf4f36  gcc/ada/lib-writ.adb
  b6ab6aa41e1a35af588f7ac62bd68af4  gcc/ada/lib-writ.ads
  d1852c8e168ded223730761c0854b44f  gcc/ada/lib-xref-spark_specific.adb
! c46c7909c69914753823cfbfb23fa8a4  gcc/ada/lib-xref.adb
  2011d6e281dc4b4ce8a65a6fbc96b843  gcc/ada/lib-xref.ads
  e15b36c98a01c7093ce126c5b2a938e6  gcc/ada/lib.adb
  acdce12dbd25ab577720670c9d1732e9  gcc/ada/lib.ads
--- 925,934 ----
  201c53c6d3da32513befd9354402706e  gcc/ada/lib-sort.adb
  1700161465ece50ec303564c1d488050  gcc/ada/lib-util.adb
  1cbf7ce71e82c406e945d0a1195bd1e1  gcc/ada/lib-util.ads
! 6b70911496d7f99ec7eaea7aff3cdfdc  gcc/ada/lib-writ.adb
  b6ab6aa41e1a35af588f7ac62bd68af4  gcc/ada/lib-writ.ads
  d1852c8e168ded223730761c0854b44f  gcc/ada/lib-xref-spark_specific.adb
! ec836ec1d277ea32256e18e07e29b00f  gcc/ada/lib-xref.adb
  2011d6e281dc4b4ce8a65a6fbc96b843  gcc/ada/lib-xref.ads
  e15b36c98a01c7093ce126c5b2a938e6  gcc/ada/lib.adb
  acdce12dbd25ab577720670c9d1732e9  gcc/ada/lib.ads
*************** a4956470ecf7bd2e59eb59dae80d58c7  gcc/ad
*** 2809,2816 ****
  cd6c342cc127610beca7bb72cbcc907a  gcc/ada/nlists.adb
  aef70af2835279de8e33b52eb8375d45  gcc/ada/nlists.ads
  276eb125c0df313227d9ecfb3f38866d  gcc/ada/nlists.h
! e3945121c34a6169efa63d13c280b7e7  gcc/ada/opt.adb
! b5c786110682a76d01aad78a2c5e4d43  gcc/ada/opt.ads
  fcbd079f712fd349c109f5ecd640096b  gcc/ada/osint-b.adb
  2604c4a51297a9867c69ce9985c3fb8b  gcc/ada/osint-b.ads
  4f31614f93bd69a85fe6c1f144e04b37  gcc/ada/osint-c.adb
--- 2809,2816 ----
  cd6c342cc127610beca7bb72cbcc907a  gcc/ada/nlists.adb
  aef70af2835279de8e33b52eb8375d45  gcc/ada/nlists.ads
  276eb125c0df313227d9ecfb3f38866d  gcc/ada/nlists.h
! 9ce5e0762672a4136ff3130c472711ce  gcc/ada/opt.adb
! 0eea91a5fbfadbddde2f2594e7ed6de3  gcc/ada/opt.ads
  fcbd079f712fd349c109f5ecd640096b  gcc/ada/osint-b.adb
  2604c4a51297a9867c69ce9985c3fb8b  gcc/ada/osint-b.ads
  4f31614f93bd69a85fe6c1f144e04b37  gcc/ada/osint-c.adb
*************** b9fd1f536d8f1c867c911cbe2996ebeb  gcc/ad
*** 2825,2837 ****
  57985da6ee6f2d437d610b1b9249f436  gcc/ada/output.ads
  3f5b95b8fa96ad05275062ec5d9a000e  gcc/ada/par-ch10.adb
  90ae3c6fcf255101ea0bd2dfc118762f  gcc/ada/par-ch11.adb
! 6af8e838ba0bf469b705a7db82601093  gcc/ada/par-ch12.adb
  726417eeba8f4e1ae6310601195b55e4  gcc/ada/par-ch13.adb
  ed9e0f33947385dfddd6c98bc7c51a92  gcc/ada/par-ch2.adb
! a5b0bb97ff5d0883ff6ae65776076e78  gcc/ada/par-ch3.adb
  bc9ca61ef7f5b2dd590c60a8e0bbec6b  gcc/ada/par-ch4.adb
  e80166837acac8e9697a90e447e06871  gcc/ada/par-ch5.adb
! 9a6d14cbda19963ebbe77a942d8886c2  gcc/ada/par-ch6.adb
  2b201234474be782ce30a79ebe674e81  gcc/ada/par-ch7.adb
  349dda80fe39ecf9d2b818ec0e769d80  gcc/ada/par-ch8.adb
  3d5733e116665c179c26e9939a59395e  gcc/ada/par-ch9.adb
--- 2825,2837 ----
  57985da6ee6f2d437d610b1b9249f436  gcc/ada/output.ads
  3f5b95b8fa96ad05275062ec5d9a000e  gcc/ada/par-ch10.adb
  90ae3c6fcf255101ea0bd2dfc118762f  gcc/ada/par-ch11.adb
! afd801107ba26f9e5063a6bb14ce6f15  gcc/ada/par-ch12.adb
  726417eeba8f4e1ae6310601195b55e4  gcc/ada/par-ch13.adb
  ed9e0f33947385dfddd6c98bc7c51a92  gcc/ada/par-ch2.adb
! e217a758d0c6281f98fe54a436d834a3  gcc/ada/par-ch3.adb
  bc9ca61ef7f5b2dd590c60a8e0bbec6b  gcc/ada/par-ch4.adb
  e80166837acac8e9697a90e447e06871  gcc/ada/par-ch5.adb
! fc92bd947be0bf674e13d13156f4d7d5  gcc/ada/par-ch6.adb
  2b201234474be782ce30a79ebe674e81  gcc/ada/par-ch7.adb
  349dda80fe39ecf9d2b818ec0e769d80  gcc/ada/par-ch8.adb
  3d5733e116665c179c26e9939a59395e  gcc/ada/par-ch9.adb
*************** c803fb1c38583722fc95714e14ad4da1  gcc/ad
*** 2841,2848 ****
  8113cc08a49b97128e8b42b9756bae35  gcc/ada/par-prag.adb
  ee1279472214ff7ca5b61685a2ada15f  gcc/ada/par-sync.adb
  47b402373c995a1c6df9226ae6e02ff2  gcc/ada/par-tchk.adb
! f7fab42e1a1d4d9474c2cb72a9d95e3b  gcc/ada/par-util.adb
! 5fce07cb20ef0ed82cdb209d07bca682  gcc/ada/par.adb
  cc0b4ae85eb0edbcce886d13c925cbf3  gcc/ada/par.ads
  b0a53260cce47acbd0de8d046175c63f  gcc/ada/par_sco.adb
  2674a374e947c03703d34f6603994424  gcc/ada/par_sco.ads
--- 2841,2848 ----
  8113cc08a49b97128e8b42b9756bae35  gcc/ada/par-prag.adb
  ee1279472214ff7ca5b61685a2ada15f  gcc/ada/par-sync.adb
  47b402373c995a1c6df9226ae6e02ff2  gcc/ada/par-tchk.adb
! 4604f1e5c60129438742f4320d848ce8  gcc/ada/par-util.adb
! 9fe0e08026ee8b61b2f1d91d83f03cee  gcc/ada/par.adb
  cc0b4ae85eb0edbcce886d13c925cbf3  gcc/ada/par.ads
  b0a53260cce47acbd0de8d046175c63f  gcc/ada/par_sco.adb
  2674a374e947c03703d34f6603994424  gcc/ada/par_sco.ads
*************** ee42403c9984dd389a6e7c3046178b10  gcc/ad
*** 2867,2873 ****
  9d12840e7f4b919f1f71a18a65b3463c  gcc/ada/rident.ads
  32312ab752a2a0382c9276e387b389e1  gcc/ada/rtfinal.c
  01263778e97af0ecb135164f1bbfd6ad  gcc/ada/rtinit.c
! dbaacbc6137249e74a2f6564812aebf9  gcc/ada/rtsfind.adb
  e4e5cf29682458c5890157bcbd67e0c1  gcc/ada/rtsfind.ads
  66e987f268458746a6afb190c151af7a  gcc/ada/runtime.h
  3ba3797c77ab11da135266710dd26c4a  gcc/ada/s-oscons-tmplt.c
--- 2867,2873 ----
  9d12840e7f4b919f1f71a18a65b3463c  gcc/ada/rident.ads
  32312ab752a2a0382c9276e387b389e1  gcc/ada/rtfinal.c
  01263778e97af0ecb135164f1bbfd6ad  gcc/ada/rtinit.c
! 5b5f9b24729652540384b482515eccfa  gcc/ada/rtsfind.adb
  e4e5cf29682458c5890157bcbd67e0c1  gcc/ada/rtsfind.ads
  66e987f268458746a6afb190c151af7a  gcc/ada/runtime.h
  3ba3797c77ab11da135266710dd26c4a  gcc/ada/s-oscons-tmplt.c
*************** c34ee64559a764f063b49301a7504e82  gcc/ad
*** 2885,2895 ****
  cbf1143b39dba16ccff2bad507662b80  gcc/ada/scos.ads
  1e9843bd9ac3288c126ec7d6727ea8e6  gcc/ada/sdefault.ads
  3bf01e026b494a442389a5d3541785b8  gcc/ada/seh_init.c
! b58c1b9f5b963c617e489cf6a637242a  gcc/ada/sem.adb
  852fbcc89a3ed10b6c00d4f9686d1405  gcc/ada/sem.ads
  56077675be6cdea397a7c913a87672b6  gcc/ada/sem_aggr.adb
  d9e9e67a1e6554ab3bc7e11269dd3763  gcc/ada/sem_aggr.ads
! 3b4c4d9018fc314a05c87deb2e5f04c3  gcc/ada/sem_attr.adb
  825e191d7eee72ea4718b1fc2ba02824  gcc/ada/sem_attr.ads
  cac7c47e492012f0e61000bebe5ae037  gcc/ada/sem_aux.adb
  e15b069fa2ff472febda85c8b9cacb81  gcc/ada/sem_aux.ads
--- 2885,2895 ----
  cbf1143b39dba16ccff2bad507662b80  gcc/ada/scos.ads
  1e9843bd9ac3288c126ec7d6727ea8e6  gcc/ada/sdefault.ads
  3bf01e026b494a442389a5d3541785b8  gcc/ada/seh_init.c
! b2bb1b9cca2ee7a53e385763a3ec4eee  gcc/ada/sem.adb
  852fbcc89a3ed10b6c00d4f9686d1405  gcc/ada/sem.ads
  56077675be6cdea397a7c913a87672b6  gcc/ada/sem_aggr.adb
  d9e9e67a1e6554ab3bc7e11269dd3763  gcc/ada/sem_aggr.ads
! 6edd60412567d4816d78ab61ea5d4b59  gcc/ada/sem_attr.adb
  825e191d7eee72ea4718b1fc2ba02824  gcc/ada/sem_attr.ads
  cac7c47e492012f0e61000bebe5ae037  gcc/ada/sem_aux.adb
  e15b069fa2ff472febda85c8b9cacb81  gcc/ada/sem_aux.ads
*************** e364f4e3ae92066699cc93a8f7b828c1  gcc/ad
*** 2901,2921 ****
  6e34ce648cfc10b24c12b68e0e59dcb8  gcc/ada/sem_ch10.ads
  5980a02146588bf0e31ced2382290670  gcc/ada/sem_ch11.adb
  1b6f89866a5d427002df059be3847d62  gcc/ada/sem_ch11.ads
! 48c5facaaa28a3043abd59c4f9122f9b  gcc/ada/sem_ch12.adb
  b0a3315dce9de8e3bbbb3682c8b0e2ff  gcc/ada/sem_ch12.ads
! 088ce0a61eea7a82bf9c5fd0f5ebc51c  gcc/ada/sem_ch13.adb
  42a7b1073e168e8be85f2203fbddd148  gcc/ada/sem_ch13.ads
  14326c522718c8cb8415b13a79c07972  gcc/ada/sem_ch2.adb
  2471d629be4739ff5135aa87a2ec9166  gcc/ada/sem_ch2.ads
! 524f99aea0ed3f321230fdcaa1d6c5d2  gcc/ada/sem_ch3.adb
  a9694f8bc09b47075cae226e570e02f0  gcc/ada/sem_ch3.ads
  904f36c9a9bf09c65759cab2728c22c7  gcc/ada/sem_ch4.adb
  adba03aae1f439b9e9db8cea05d8e03f  gcc/ada/sem_ch4.ads
! f5c661468bc72925e2297ff32e812702  gcc/ada/sem_ch5.adb
  ec8d5a42c27c46e4969c16d6e18ed276  gcc/ada/sem_ch5.ads
! 2e84010f6396d898ab407bd3a3ae5435  gcc/ada/sem_ch6.adb
  e243030a8b8486f145f0544a7e0d6f47  gcc/ada/sem_ch6.ads
! 3c7c6e6b95a9cddb1d6f1a42a5962379  gcc/ada/sem_ch7.adb
  24a1265e6a25756265643858abcf7ded  gcc/ada/sem_ch7.ads
  7aca9207bf76039a345f39c73664adf9  gcc/ada/sem_ch8.adb
  f0b4e317e5d5515a6ec337bc5acf5fe0  gcc/ada/sem_ch8.ads
--- 2901,2921 ----
  6e34ce648cfc10b24c12b68e0e59dcb8  gcc/ada/sem_ch10.ads
  5980a02146588bf0e31ced2382290670  gcc/ada/sem_ch11.adb
  1b6f89866a5d427002df059be3847d62  gcc/ada/sem_ch11.ads
! 5b3f0861d9b65b02827da7373a639cb8  gcc/ada/sem_ch12.adb
  b0a3315dce9de8e3bbbb3682c8b0e2ff  gcc/ada/sem_ch12.ads
! 486bc46649cac1475f2823c198e7357f  gcc/ada/sem_ch13.adb
  42a7b1073e168e8be85f2203fbddd148  gcc/ada/sem_ch13.ads
  14326c522718c8cb8415b13a79c07972  gcc/ada/sem_ch2.adb
  2471d629be4739ff5135aa87a2ec9166  gcc/ada/sem_ch2.ads
! 70d7bad2efbc828d887d189f7d5e974a  gcc/ada/sem_ch3.adb
  a9694f8bc09b47075cae226e570e02f0  gcc/ada/sem_ch3.ads
  904f36c9a9bf09c65759cab2728c22c7  gcc/ada/sem_ch4.adb
  adba03aae1f439b9e9db8cea05d8e03f  gcc/ada/sem_ch4.ads
! 36dc076d1e2c973e4ffd11d38fccafec  gcc/ada/sem_ch5.adb
  ec8d5a42c27c46e4969c16d6e18ed276  gcc/ada/sem_ch5.ads
! ca44af1398ff6d7cd7280e49d6ee9598  gcc/ada/sem_ch6.adb
  e243030a8b8486f145f0544a7e0d6f47  gcc/ada/sem_ch6.ads
! b44f28d35b10668afc610f16a7f068df  gcc/ada/sem_ch7.adb
  24a1265e6a25756265643858abcf7ded  gcc/ada/sem_ch7.ads
  7aca9207bf76039a345f39c73664adf9  gcc/ada/sem_ch8.adb
  f0b4e317e5d5515a6ec337bc5acf5fe0  gcc/ada/sem_ch8.ads
*************** e8e79e2a818321d7816e27eed8d17404  gcc/ad
*** 2937,2943 ****
  66ccba8e3b77fa8d6e0e13f6368d804a  gcc/ada/sem_intr.ads
  4a954a685009a9b0bcf72a8517dc3bdf  gcc/ada/sem_mech.adb
  bcb22deebc83b966e7be367087d9fd7b  gcc/ada/sem_mech.ads
! e2f3633d170142979d7ed46d67a83b5b  gcc/ada/sem_prag.adb
  77d07a6ae20be77457587ee20ba32423  gcc/ada/sem_prag.ads
  a79509888717bcca5b84e0ba62619eb6  gcc/ada/sem_res.adb
  bb01f11ceaa352a8b99f95fcbcfe97d9  gcc/ada/sem_res.ads
--- 2937,2943 ----
  66ccba8e3b77fa8d6e0e13f6368d804a  gcc/ada/sem_intr.ads
  4a954a685009a9b0bcf72a8517dc3bdf  gcc/ada/sem_mech.adb
  bcb22deebc83b966e7be367087d9fd7b  gcc/ada/sem_mech.ads
! c92d715713f6b716f55c7d9d97bcc1f5  gcc/ada/sem_prag.adb
  77d07a6ae20be77457587ee20ba32423  gcc/ada/sem_prag.ads
  a79509888717bcca5b84e0ba62619eb6  gcc/ada/sem_res.adb
  bb01f11ceaa352a8b99f95fcbcfe97d9  gcc/ada/sem_res.ads
*************** db6f5a37bd59fd83ff3286e71ab985fe  gcc/ad
*** 2947,2954 ****
  89d73c108bd8921f6d6cd84d98726ea5  gcc/ada/sem_smem.ads
  d0a2f5b2f65a874363f7fbe2b9a79f8b  gcc/ada/sem_type.adb
  dee50852181adfada17fb5b7423ed973  gcc/ada/sem_type.ads
! 555923a1d35ea906b85837d23fcfbf0e  gcc/ada/sem_util.adb
! a5c6b19173c26bbe5e7fd3d54ee4895e  gcc/ada/sem_util.ads
  9668d6a37fe84f41a81a7ffcb66d5ecc  gcc/ada/sem_warn.adb
  441e0f80657ef72324e40dd20cebfc82  gcc/ada/sem_warn.ads
  239ca67ac9aa430abfe5120a8d4302d9  gcc/ada/set_targ.adb
--- 2947,2954 ----
  89d73c108bd8921f6d6cd84d98726ea5  gcc/ada/sem_smem.ads
  d0a2f5b2f65a874363f7fbe2b9a79f8b  gcc/ada/sem_type.adb
  dee50852181adfada17fb5b7423ed973  gcc/ada/sem_type.ads
! a3d3aa0f6ee464924b504666e45655e7  gcc/ada/sem_util.adb
! dbfd621d6a1581e8338091bdfcbe9573  gcc/ada/sem_util.ads
  9668d6a37fe84f41a81a7ffcb66d5ecc  gcc/ada/sem_warn.adb
  441e0f80657ef72324e40dd20cebfc82  gcc/ada/sem_warn.ads
  239ca67ac9aa430abfe5120a8d4302d9  gcc/ada/set_targ.adb
*************** ceaa52edf6355622601cd30f7c096b06  gcc/ad
*** 3007,3014 ****
  7e7afcf1b2687d2270ec21617a7bb854  gcc/ada/switch.adb
  3ce7cd08e301dd2487e065308c9e9fe9  gcc/ada/switch.ads
  1c5f4065ed9bfb55ca7167c50baf2159  gcc/ada/sysdep.c
! bef209f16c0106f0a9c5255fb6bf96bb  gcc/ada/table.adb
! b1eaff871eb559b799ef7fe2960e86f9  gcc/ada/table.ads
  9f45bf3ee4cf0a6b06c0b5cc6a4830a7  gcc/ada/targext.c
  452605cc8bfabb79cb2938ed48290217  gcc/ada/targparm.adb
  d9d7a0f9b8ac29d8f1e477d6b53076c1  gcc/ada/targparm.ads
--- 3007,3014 ----
  7e7afcf1b2687d2270ec21617a7bb854  gcc/ada/switch.adb
  3ce7cd08e301dd2487e065308c9e9fe9  gcc/ada/switch.ads
  1c5f4065ed9bfb55ca7167c50baf2159  gcc/ada/sysdep.c
! 66a18e98cd30d5801e1325734844df88  gcc/ada/table.adb
! e8d9b41a7175ccacacbfccec989ad758  gcc/ada/table.ads
  9f45bf3ee4cf0a6b06c0b5cc6a4830a7  gcc/ada/targext.c
  452605cc8bfabb79cb2938ed48290217  gcc/ada/targparm.adb
  d9d7a0f9b8ac29d8f1e477d6b53076c1  gcc/ada/targparm.ads
*************** d9d7a0f9b8ac29d8f1e477d6b53076c1  gcc/ad
*** 3018,3024 ****
  6f122fca818bdd0608fc8391dbb411ba  gcc/ada/tempdir.ads
  fb2dbb46dab058293bcd11b4ec94c26f  gcc/ada/terminals.c
  90388b2ce8b02dc01b5f589caaff07ec  gcc/ada/tracebak.c
! 495a4fb8e90c60175f460291a9186bb8  gcc/ada/treepr.adb
  fffc3c236eb600b5b36d78fbe10f489d  gcc/ada/treepr.ads
  6f3fd20323108cb95757cc42a1514191  gcc/ada/ttypes.ads
  e02948c9347a91c37c4f24e7d4356a02  gcc/ada/types.adb
--- 3018,3024 ----
  6f122fca818bdd0608fc8391dbb411ba  gcc/ada/tempdir.ads
  fb2dbb46dab058293bcd11b4ec94c26f  gcc/ada/terminals.c
  90388b2ce8b02dc01b5f589caaff07ec  gcc/ada/tracebak.c
! 3481ede86832043e7a78bbe06938e0ae  gcc/ada/treepr.adb
  fffc3c236eb600b5b36d78fbe10f489d  gcc/ada/treepr.ads
  6f3fd20323108cb95757cc42a1514191  gcc/ada/ttypes.ads
  e02948c9347a91c37c4f24e7d4356a02  gcc/ada/types.adb
*************** c77616ec7ed7ec81357de9544f955910  gcc/at
*** 3170,3176 ****
  c25bbcb70f43e3c72a329043adf2c6c2  gcc/auto-obstack.h
  c93dbe4a6db404ba92eae5773bf14bd5  gcc/auto-profile.cc
  750f46d563af89307c9b19bbb4a2dd18  gcc/auto-profile.h
! a5ca47f783ba3b724b0cc91974ce7e77  gcc/avoid-store-forwarding.cc
  b187aaef50f37afeeee1f8239d5aa033  gcc/avoid-store-forwarding.h
  db748cbed8c442a442779d8d857a3ae4  gcc/backend.h
  d6b885b0c4ea7cf856ba4b84021613ce  gcc/basic-block.h
--- 3170,3176 ----
  c25bbcb70f43e3c72a329043adf2c6c2  gcc/auto-obstack.h
  c93dbe4a6db404ba92eae5773bf14bd5  gcc/auto-profile.cc
  750f46d563af89307c9b19bbb4a2dd18  gcc/auto-profile.h
! 1fd4de40d068f0ae7857fb0c2e22e46e  gcc/avoid-store-forwarding.cc
  b187aaef50f37afeeee1f8239d5aa033  gcc/avoid-store-forwarding.h
  db748cbed8c442a442779d8d857a3ae4  gcc/backend.h
  d6b885b0c4ea7cf856ba4b84021613ce  gcc/basic-block.h
*************** fe292df4b7f3e3ef7c0b8305084b6844  gcc/bi
*** 3185,3209 ****
  9519cf786b112194737e7d0c3534a854  gcc/builtins.cc
  4928906d86168cbc863e309bdb3ec391  gcc/builtins.def
  bd61b50b47560dc1324bf507bea5d87e  gcc/builtins.h
! b64af88452a2045a4c2a7443a36700a1  gcc/c-family/ChangeLog
  ea3fa1f4d7390a105fa3caab4f79aaf7  gcc/c-family/ChangeLog.gimple-classes
  823fe168bb0f63a39de62d9f0251a1b5  gcc/c-family/c-ada-spec.cc
  4e83011bee68d9607834ed5335191d65  gcc/c-family/c-ada-spec.h
! 24d0dda070aaa8582277cc303e344894  gcc/c-family/c-attribs.cc
  78c56cfdab4bb19086143ab771281aa3  gcc/c-family/c-common.cc
  c273c4ad95ccdbfe677146505900c62e  gcc/c-family/c-common.def
! e26b8d36ab6e21fadddb5a570de25ee4  gcc/c-family/c-common.h
! d1a713f57fff4077ba78dc3e61668454  gcc/c-family/c-cppbuiltin.cc
  01db2d5cca29943c49bb372f2137d874  gcc/c-family/c-dump.cc
  19059a85545bb95b391e68da0cbc670c  gcc/c-family/c-format.cc
  c8d86c12bc259d3a335f338ce3a10304  gcc/c-family/c-format.h
  33e75548501d8294a77fd654bc8d4d39  gcc/c-family/c-gimplify.cc
! 15ee0a70aef7b52e6e17c009e2b8ccfa  gcc/c-family/c-indentation.cc
  a4b7179d2e948bb7586a9143fbe05593  gcc/c-family/c-indentation.h
  c80c4d6e16ab46358143d22a8a146725  gcc/c-family/c-lex.cc
  c880dc584a0fd4908e5df33dd81137b8  gcc/c-family/c-objc.h
  ff101b60d9a9ba25502bca2f5713b2a3  gcc/c-family/c-omp.cc
! 6bf83c8332e0c624cc1aa91ac3a1e3f5  gcc/c-family/c-opts.cc
  2f1a14531d3a436ca9f4aad2812c3898  gcc/c-family/c-pch.cc
  6e53d008a0c4738339154c353a50ff0a  gcc/c-family/c-ppoutput.cc
  cfc760e3be8b3db6dfc8fef49282c0aa  gcc/c-family/c-pragma.cc
--- 3185,3209 ----
  9519cf786b112194737e7d0c3534a854  gcc/builtins.cc
  4928906d86168cbc863e309bdb3ec391  gcc/builtins.def
  bd61b50b47560dc1324bf507bea5d87e  gcc/builtins.h
! 07d6a01543bcc40db77ef432e5bac371  gcc/c-family/ChangeLog
  ea3fa1f4d7390a105fa3caab4f79aaf7  gcc/c-family/ChangeLog.gimple-classes
  823fe168bb0f63a39de62d9f0251a1b5  gcc/c-family/c-ada-spec.cc
  4e83011bee68d9607834ed5335191d65  gcc/c-family/c-ada-spec.h
! 2edbfbadcfc0f9ee8b45bc73442f10ad  gcc/c-family/c-attribs.cc
  78c56cfdab4bb19086143ab771281aa3  gcc/c-family/c-common.cc
  c273c4ad95ccdbfe677146505900c62e  gcc/c-family/c-common.def
! f77783cbe676d9dce4f6f2dccab141f0  gcc/c-family/c-common.h
! e03ccf084c2ee13d88a916bf1b084b71  gcc/c-family/c-cppbuiltin.cc
  01db2d5cca29943c49bb372f2137d874  gcc/c-family/c-dump.cc
  19059a85545bb95b391e68da0cbc670c  gcc/c-family/c-format.cc
  c8d86c12bc259d3a335f338ce3a10304  gcc/c-family/c-format.h
  33e75548501d8294a77fd654bc8d4d39  gcc/c-family/c-gimplify.cc
! 4aa18091dd5fa15d7060527eb55571d0  gcc/c-family/c-indentation.cc
  a4b7179d2e948bb7586a9143fbe05593  gcc/c-family/c-indentation.h
  c80c4d6e16ab46358143d22a8a146725  gcc/c-family/c-lex.cc
  c880dc584a0fd4908e5df33dd81137b8  gcc/c-family/c-objc.h
  ff101b60d9a9ba25502bca2f5713b2a3  gcc/c-family/c-omp.cc
! fa75a627653e32708fb43cab7ad5c929  gcc/c-family/c-opts.cc
  2f1a14531d3a436ca9f4aad2812c3898  gcc/c-family/c-pch.cc
  6e53d008a0c4738339154c353a50ff0a  gcc/c-family/c-ppoutput.cc
  cfc760e3be8b3db6dfc8fef49282c0aa  gcc/c-family/c-pragma.cc
*************** fc808567009babd00ebcf49b5b985691  gcc/c-
*** 3221,3249 ****
  2012b44c59e574c36b82149a7d19a455  gcc/c-family/c-ubsan.cc
  a28f2477c85a17e42026521322b3649a  gcc/c-family/c-ubsan.h
  47faafdef0d76034184e171880096959  gcc/c-family/c-warn.cc
! 17455f6a048d561960ad726b2c9c8104  gcc/c-family/c.opt
! 3de9bdf85b7d9f6b213e8dbcb9672fa5  gcc/c-family/c.opt.urls
  22bd7478421befafcfbd805e3ca373ac  gcc/c-family/cppspec.cc
  801075b0f2da341a38f761b3b7ffd7cd  gcc/c-family/known-headers.cc
  ac5daa4f7d7788a3f68dde7fe7a25316  gcc/c-family/known-headers.h
  f09c431056b5138e7cfe8376e05de9a6  gcc/c-family/name-hint.h
  d71f74b5b48d9ec5e4e6463e7330121d  gcc/c-family/stub-objc.cc
! 5744567cf79d183ad49e9a7bd7b29f7a  gcc/c/ChangeLog
  b1fc09d2244c8e8a72b4df9bc9af30d7  gcc/c/Make-lang.in
  f1e5593aebd5cffb4b3cbffe6bd0860a  gcc/c/c-aux-info.cc
  178d24653bb20936d73bad078e70763c  gcc/c/c-convert.cc
! eb7633844b1736940fda414309a9bc55  gcc/c/c-decl.cc
  10e620f790089957c832097206d0d6d6  gcc/c/c-errors.cc
  d9b5dea1631cefab5fe5ca3602db30f0  gcc/c/c-fold.cc
  d9c0725d061adffdf400457d91be3aed  gcc/c/c-lang.cc
  4be9de2ca25340adb8f350478db6a3d8  gcc/c/c-lang.h
  e0b7650de772103a6ae330552c1960bc  gcc/c/c-objc-common.cc
  757f583d06a3ec98336adbfc92b4e6a8  gcc/c/c-objc-common.h
! 2421baf964ca38c8c75f0382ee9b600a  gcc/c/c-parser.cc
  9c122bd6feb8ae4a94420c890e654801  gcc/c/c-parser.h
  9179f46b6a06c7d734278f5ce2c55883  gcc/c/c-tree.def
! bba523ee762447fbd666f594326b08e2  gcc/c/c-tree.h
! 8a451e6a63d92d9cecbd3f097bc3a9d2  gcc/c/c-typeck.cc
  cd371895d730dd64e947066b2e4378f8  gcc/c/config-lang.in
  1bd76a24d1322659f048abe2272a6f34  gcc/c/gccspec.cc
  c169f2d94910060e76c333db12b960b9  gcc/c/gimple-parser.cc
--- 3221,3249 ----
  2012b44c59e574c36b82149a7d19a455  gcc/c-family/c-ubsan.cc
  a28f2477c85a17e42026521322b3649a  gcc/c-family/c-ubsan.h
  47faafdef0d76034184e171880096959  gcc/c-family/c-warn.cc
! ef5e34ed320acbd5f9e76228ad91c0c9  gcc/c-family/c.opt
! 0476e49f0a7a7542b0dc4f9aaf085bf6  gcc/c-family/c.opt.urls
  22bd7478421befafcfbd805e3ca373ac  gcc/c-family/cppspec.cc
  801075b0f2da341a38f761b3b7ffd7cd  gcc/c-family/known-headers.cc
  ac5daa4f7d7788a3f68dde7fe7a25316  gcc/c-family/known-headers.h
  f09c431056b5138e7cfe8376e05de9a6  gcc/c-family/name-hint.h
  d71f74b5b48d9ec5e4e6463e7330121d  gcc/c-family/stub-objc.cc
! 05dc3bb79b7fb3e4251ee63b9b7216ee  gcc/c/ChangeLog
  b1fc09d2244c8e8a72b4df9bc9af30d7  gcc/c/Make-lang.in
  f1e5593aebd5cffb4b3cbffe6bd0860a  gcc/c/c-aux-info.cc
  178d24653bb20936d73bad078e70763c  gcc/c/c-convert.cc
! 1ee3472affc74ae6f50fe95c38e315e8  gcc/c/c-decl.cc
  10e620f790089957c832097206d0d6d6  gcc/c/c-errors.cc
  d9b5dea1631cefab5fe5ca3602db30f0  gcc/c/c-fold.cc
  d9c0725d061adffdf400457d91be3aed  gcc/c/c-lang.cc
  4be9de2ca25340adb8f350478db6a3d8  gcc/c/c-lang.h
  e0b7650de772103a6ae330552c1960bc  gcc/c/c-objc-common.cc
  757f583d06a3ec98336adbfc92b4e6a8  gcc/c/c-objc-common.h
! 7c59819277cd67e1b8b91b454363d786  gcc/c/c-parser.cc
  9c122bd6feb8ae4a94420c890e654801  gcc/c/c-parser.h
  9179f46b6a06c7d734278f5ce2c55883  gcc/c/c-tree.def
! 24f12d39dd89628cefc94d21f4dca728  gcc/c/c-tree.h
! 6d7fd9aa4057e9da0c8f856de07f5402  gcc/c/c-typeck.cc
  cd371895d730dd64e947066b2e4378f8  gcc/c/config-lang.in
  1bd76a24d1322659f048abe2272a6f34  gcc/c/gccspec.cc
  c169f2d94910060e76c333db12b960b9  gcc/c/gimple-parser.cc
*************** e8aea35c3537127601ec95f65a09591c  gcc/cg
*** 3279,3288 ****
  b87eab2b04054f0d3cd20768be99c655  gcc/cgraphclones.cc
  0f66c996f10f0bf02ea42e4e3088d9e7  gcc/cgraphunit.cc
  70fa61377ff65ad3f25778a40159f510  gcc/cif-code.def
! e043c82989b2b91df8bf5d29955bd23c  gcc/cobol/ChangeLog
  38de2f3ba3eff58bbacc8dcdbdcd5be7  gcc/cobol/Make-lang.in
  0a84e784d2bc4066654d2377fc6a2930  gcc/cobol/TODO
! 977a541f93bcbcf8fa032593bdbeb68c  gcc/cobol/cbldiag.h
  030342886cc720f11f17d7691f6f24ae  gcc/cobol/cdf-copy.cc
  b7033ccad4ae579d60141168fb904aa8  gcc/cobol/cdf.y
  b916ef498fa1cc9821e56ab612f00f3a  gcc/cobol/cdfval.h
--- 3279,3288 ----
  b87eab2b04054f0d3cd20768be99c655  gcc/cgraphclones.cc
  0f66c996f10f0bf02ea42e4e3088d9e7  gcc/cgraphunit.cc
  70fa61377ff65ad3f25778a40159f510  gcc/cif-code.def
! fcfe95190b966b0aa9c5e13e04137e8e  gcc/cobol/ChangeLog
  38de2f3ba3eff58bbacc8dcdbdcd5be7  gcc/cobol/Make-lang.in
  0a84e784d2bc4066654d2377fc6a2930  gcc/cobol/TODO
! b5d944951cc226cf4f33fdd1494aa7e7  gcc/cobol/cbldiag.h
  030342886cc720f11f17d7691f6f24ae  gcc/cobol/cdf-copy.cc
  b7033ccad4ae579d60141168fb904aa8  gcc/cobol/cdf.y
  b916ef498fa1cc9821e56ab612f00f3a  gcc/cobol/cdfval.h
*************** d44e8c86d57fb704b6c1fbab3464fb9a  gcc/co
*** 3313,3325 ****
  746a2d46b3bc2a5f5663a9d64a78a674  gcc/cobol/lang.opt.urls
  7bab28df69a22be2ad0a8d95ec263e2d  gcc/cobol/lexio.cc
  5953c820cdc03feb815bfbf28c10730c  gcc/cobol/lexio.h
! 6f72fe62d52bdf04a90c9b8bc44e5ada  gcc/cobol/parse.y
  86fab272aa025f60db4c44ca52316ffe  gcc/cobol/parse_ante.h
  e141e23293fb343e7ccbaa2fe6bcef33  gcc/cobol/parse_util.h
! 94b5781d94b7ba0530899d52a0f19209  gcc/cobol/scan.l
! d9874b906704c972a877368656942a2d  gcc/cobol/scan_ante.h
  20dead6c32b0fb6b826220e76ae691a8  gcc/cobol/scan_post.h
! b1fcf3cab39d3874200f92620f2a54e9  gcc/cobol/show_parse.h
  d75653f25ec3b747265e4ab78aa71521  gcc/cobol/structs.cc
  be06e098e0c2eb8f8ac2f0094bf53181  gcc/cobol/structs.h
  6a630a891fb905f936b3b90aa9f35143  gcc/cobol/symbols.cc
--- 3313,3325 ----
  746a2d46b3bc2a5f5663a9d64a78a674  gcc/cobol/lang.opt.urls
  7bab28df69a22be2ad0a8d95ec263e2d  gcc/cobol/lexio.cc
  5953c820cdc03feb815bfbf28c10730c  gcc/cobol/lexio.h
! 474efac0104ac60ca10e8144f1dec9f5  gcc/cobol/parse.y
  86fab272aa025f60db4c44ca52316ffe  gcc/cobol/parse_ante.h
  e141e23293fb343e7ccbaa2fe6bcef33  gcc/cobol/parse_util.h
! 5c3ca092c39ab1b973417e3ea01ed1b6  gcc/cobol/scan.l
! d5f8cc9842e0f1f1648dc07251b7e682  gcc/cobol/scan_ante.h
  20dead6c32b0fb6b826220e76ae691a8  gcc/cobol/scan_post.h
! 197fd99a62b2440c1460f4ffbf664806  gcc/cobol/show_parse.h
  d75653f25ec3b747265e4ab78aa71521  gcc/cobol/structs.cc
  be06e098e0c2eb8f8ac2f0094bf53181  gcc/cobol/structs.h
  6a630a891fb905f936b3b90aa9f35143  gcc/cobol/symbols.cc
*************** be06e098e0c2eb8f8ac2f0094bf53181  gcc/co
*** 3327,3333 ****
  de4928630bb37aa4064841c89cdf22a2  gcc/cobol/symfind.cc
  27218e3639557e7e74246aa4982f089c  gcc/cobol/token_names.h
  434f4899280e27d0717b2e56d5bf12f2  gcc/cobol/udf/stored-char-length.cbl
! ad2607fcbabf1236dcc734dcb7146435  gcc/cobol/util.cc
  ed3f467605b997678af9e5189497d41b  gcc/cobol/util.h
  0f3dba102a04da8ca1e45b9b16741bde  gcc/collect-utils.cc
  6e6685d60444844fecf36350b5956f77  gcc/collect-utils.h
--- 3327,3333 ----
  de4928630bb37aa4064841c89cdf22a2  gcc/cobol/symfind.cc
  27218e3639557e7e74246aa4982f089c  gcc/cobol/token_names.h
  434f4899280e27d0717b2e56d5bf12f2  gcc/cobol/udf/stored-char-length.cbl
! ce38963e7ad5e58b892c971cab3d2628  gcc/cobol/util.cc
  ed3f467605b997678af9e5189497d41b  gcc/cobol/util.h
  0f3dba102a04da8ca1e45b9b16741bde  gcc/collect-utils.cc
  6e6685d60444844fecf36350b5956f77  gcc/collect-utils.h
*************** f55010fab8b9aabea82c3ac50d031028  gcc/co
*** 3339,3346 ****
  7041e62f0f582b09331732fef4bb9545  gcc/combine-stack-adj.cc
  5d00831740184b5f4f8f133a3a1ffc16  gcc/combine.cc
  2b9ccf7fc2473ef7e36aee9bcf170843  gcc/common.md
! f7321dff057cc0da7292ef7eaecbab11  gcc/common.opt
! 0c7e2b88581be53c82638531823fff61  gcc/common.opt.urls
  26050db921f73fd87b026dc950bde97b  gcc/common/common-target-def.h
  dae02ebe59cdaaf21611ad354e939ca5  gcc/common/common-target.def
  4a00b1cedd9d15d93e32920b16b3c292  gcc/common/common-target.h
--- 3339,3346 ----
  7041e62f0f582b09331732fef4bb9545  gcc/combine-stack-adj.cc
  5d00831740184b5f4f8f133a3a1ffc16  gcc/combine.cc
  2b9ccf7fc2473ef7e36aee9bcf170843  gcc/common.md
! a5ae19d33b64cda675bf9d7240925904  gcc/common.opt
! 1fb7327884adfe65e2d9b1c9f2ffaa06  gcc/common.opt.urls
  26050db921f73fd87b026dc950bde97b  gcc/common/common-target-def.h
  dae02ebe59cdaaf21611ad354e939ca5  gcc/common/common-target.def
  4a00b1cedd9d15d93e32920b16b3c292  gcc/common/common-target.h
*************** f842f1b8595f3ac795ba92c2b07085e6  gcc/co
*** 3385,3391 ****
  03a53ecd36b397fbe0846ead66505e2d  gcc/common/config/pa/pa-common.cc
  1fbcfc1a92bb13e4405bc75767cf8a36  gcc/common/config/pdp11/pdp11-common.cc
  7ee5967300d3c96a608eea63008aa893  gcc/common/config/pru/pru-common.cc
! 41af886d914b155a47fdeae76ebff58a  gcc/common/config/riscv/riscv-common.cc
  8a5a4ee26b110f44497208d1b31e3503  gcc/common/config/riscv/riscv-ext-bitmask.def
  08537bef63b33fd56aeb2a292c9a207a  gcc/common/config/rs6000/rs6000-common.cc
  9ddaceac9f81b4798f64241b273f8e1c  gcc/common/config/rx/rx-common.cc
--- 3385,3391 ----
  03a53ecd36b397fbe0846ead66505e2d  gcc/common/config/pa/pa-common.cc
  1fbcfc1a92bb13e4405bc75767cf8a36  gcc/common/config/pdp11/pdp11-common.cc
  7ee5967300d3c96a608eea63008aa893  gcc/common/config/pru/pru-common.cc
! d57abd034dc0faab0c82b658374d5121  gcc/common/config/riscv/riscv-common.cc
  8a5a4ee26b110f44497208d1b31e3503  gcc/common/config/riscv/riscv-ext-bitmask.def
  08537bef63b33fd56aeb2a292c9a207a  gcc/common/config/rs6000/rs6000-common.cc
  9ddaceac9f81b4798f64241b273f8e1c  gcc/common/config/rx/rx-common.cc
*************** f931bc8e97c2f1358ad3ad91e902d553  gcc/co
*** 3436,3472 ****
  601c97a8470cb68f7a1a09205fa06352  gcc/config/aarch64/aarch64-option-extensions.def
  eb901cf32e942a31db5999eda012dc00  gcc/config/aarch64/aarch64-opts.h
  b14ff14af09e35148ebaceacc90e59a7  gcc/config/aarch64/aarch64-passes.def
! 7b0e4ea5c12541346eff8419ae2fc9ce  gcc/config/aarch64/aarch64-protos.h
  7cfa3d0cdd28cdcd73a29c2c8a925548  gcc/config/aarch64/aarch64-simd-builtin-types.def
  8f28d55d0c7fc64387352822e99a37ff  gcc/config/aarch64/aarch64-simd-builtins.def
  33ce4a896b77324d9be6448637daf9ca  gcc/config/aarch64/aarch64-simd-pragma-builtins.def
  7548b5fd45bc2e7a87bf4a23ca02ab1f  gcc/config/aarch64/aarch64-simd.md
  e0075c928ffd752177eab9c7ace7018e  gcc/config/aarch64/aarch64-sme.md
  fa6672290fdf9366d9919defcb7e41d7  gcc/config/aarch64/aarch64-speculation.cc
! 9ab182bab4cc10bb9676b1309abb562f  gcc/config/aarch64/aarch64-sve-builtins-base.cc
  35bb69e0b38657d068d103a2da1b8a16  gcc/config/aarch64/aarch64-sve-builtins-base.def
  cdcf6636402c3c91eb0010325542b491  gcc/config/aarch64/aarch64-sve-builtins-base.h
! 7bf84ccc784bb8957d9a6174156cd087  gcc/config/aarch64/aarch64-sve-builtins-functions.h
  089932b501cb5cd94383201ef2002478  gcc/config/aarch64/aarch64-sve-builtins-shapes.cc
  88653955c7c15c0ac1d6f1bd1b827641  gcc/config/aarch64/aarch64-sve-builtins-shapes.h
  e055c97bc39ff21701576ecf45b3a7a0  gcc/config/aarch64/aarch64-sve-builtins-sme.cc
  d2df4505e1ba73f2a8f28738e16adf4f  gcc/config/aarch64/aarch64-sve-builtins-sme.def
  020b06065c22c51e5b289ef55b54a5b5  gcc/config/aarch64/aarch64-sve-builtins-sme.h
! dec9c12a93bd77974e3b80d3a15432ed  gcc/config/aarch64/aarch64-sve-builtins-sve2.cc
  5249e3dd61e8bd70c85a23c5711f3ca2  gcc/config/aarch64/aarch64-sve-builtins-sve2.def
  e2d80b89552da0c6b4cb6bede3b2e573  gcc/config/aarch64/aarch64-sve-builtins-sve2.h
! 1385bd3fa5c5d6f752db5a3c5c56279e  gcc/config/aarch64/aarch64-sve-builtins.cc
  30d08305d5bc784af521254aea449949  gcc/config/aarch64/aarch64-sve-builtins.def
  5ef25fd86c1c16a4a6fb3f74e12802b4  gcc/config/aarch64/aarch64-sve-builtins.h
! c088f7c692c8d8ddfa8734eab214e108  gcc/config/aarch64/aarch64-sve.md
! f2b95a40ce1d1fd85b5a5d0b5dfad86e  gcc/config/aarch64/aarch64-sve2.md
  85eca95263cb099f09b18daca655f091  gcc/config/aarch64/aarch64-sys-regs.def
  b301dc231a69a28202d2b7d79ea75f5d  gcc/config/aarch64/aarch64-tune.md
  d10a350a80f8f12ee435c64d236e2767  gcc/config/aarch64/aarch64-tuning-flags.def
  a5cfcce7c9dd86a597161f8bde3497bc  gcc/config/aarch64/aarch64-vxworks.h
! f5bc89ad00ceb2e9038789ef4017fb88  gcc/config/aarch64/aarch64.cc
  97fd54a20ac88d76171e744940efd8ba  gcc/config/aarch64/aarch64.h
! 58defab70a0bc4fb2f3fb6d61eee40d7  gcc/config/aarch64/aarch64.md
  ae13780a8296e9c52f9e9b8cd95dc312  gcc/config/aarch64/aarch64.opt
  21fd50b19307096b8be37549ae0f6f77  gcc/config/aarch64/aarch64.opt.urls
  7b468a20f0362cbe02c7699720a962fa  gcc/config/aarch64/arm_acle.h
--- 3436,3472 ----
  601c97a8470cb68f7a1a09205fa06352  gcc/config/aarch64/aarch64-option-extensions.def
  eb901cf32e942a31db5999eda012dc00  gcc/config/aarch64/aarch64-opts.h
  b14ff14af09e35148ebaceacc90e59a7  gcc/config/aarch64/aarch64-passes.def
! 8d3edbbd8847b764aa28fe184ac467ea  gcc/config/aarch64/aarch64-protos.h
  7cfa3d0cdd28cdcd73a29c2c8a925548  gcc/config/aarch64/aarch64-simd-builtin-types.def
  8f28d55d0c7fc64387352822e99a37ff  gcc/config/aarch64/aarch64-simd-builtins.def
  33ce4a896b77324d9be6448637daf9ca  gcc/config/aarch64/aarch64-simd-pragma-builtins.def
  7548b5fd45bc2e7a87bf4a23ca02ab1f  gcc/config/aarch64/aarch64-simd.md
  e0075c928ffd752177eab9c7ace7018e  gcc/config/aarch64/aarch64-sme.md
  fa6672290fdf9366d9919defcb7e41d7  gcc/config/aarch64/aarch64-speculation.cc
! 9311f63fb41454e9c423862057e8eb6b  gcc/config/aarch64/aarch64-sve-builtins-base.cc
  35bb69e0b38657d068d103a2da1b8a16  gcc/config/aarch64/aarch64-sve-builtins-base.def
  cdcf6636402c3c91eb0010325542b491  gcc/config/aarch64/aarch64-sve-builtins-base.h
! 993ce6c82fa9fb849e689abc42a6b57d  gcc/config/aarch64/aarch64-sve-builtins-functions.h
  089932b501cb5cd94383201ef2002478  gcc/config/aarch64/aarch64-sve-builtins-shapes.cc
  88653955c7c15c0ac1d6f1bd1b827641  gcc/config/aarch64/aarch64-sve-builtins-shapes.h
  e055c97bc39ff21701576ecf45b3a7a0  gcc/config/aarch64/aarch64-sve-builtins-sme.cc
  d2df4505e1ba73f2a8f28738e16adf4f  gcc/config/aarch64/aarch64-sve-builtins-sme.def
  020b06065c22c51e5b289ef55b54a5b5  gcc/config/aarch64/aarch64-sve-builtins-sme.h
! 590c9c2e2c6855697cef84761c420b80  gcc/config/aarch64/aarch64-sve-builtins-sve2.cc
  5249e3dd61e8bd70c85a23c5711f3ca2  gcc/config/aarch64/aarch64-sve-builtins-sve2.def
  e2d80b89552da0c6b4cb6bede3b2e573  gcc/config/aarch64/aarch64-sve-builtins-sve2.h
! ddf6a04395c39345a0781804ad22f83f  gcc/config/aarch64/aarch64-sve-builtins.cc
  30d08305d5bc784af521254aea449949  gcc/config/aarch64/aarch64-sve-builtins.def
  5ef25fd86c1c16a4a6fb3f74e12802b4  gcc/config/aarch64/aarch64-sve-builtins.h
! 6cfb41032d8e192bd3ac338e745066b4  gcc/config/aarch64/aarch64-sve.md
! 22e46b0f0125a4df3106ce29ae1e6be7  gcc/config/aarch64/aarch64-sve2.md
  85eca95263cb099f09b18daca655f091  gcc/config/aarch64/aarch64-sys-regs.def
  b301dc231a69a28202d2b7d79ea75f5d  gcc/config/aarch64/aarch64-tune.md
  d10a350a80f8f12ee435c64d236e2767  gcc/config/aarch64/aarch64-tuning-flags.def
  a5cfcce7c9dd86a597161f8bde3497bc  gcc/config/aarch64/aarch64-vxworks.h
! f0bea08f9a1d53bcda89a06b85b20965  gcc/config/aarch64/aarch64.cc
  97fd54a20ac88d76171e744940efd8ba  gcc/config/aarch64/aarch64.h
! e87a5d66a950b92fe898b059a60cb262  gcc/config/aarch64/aarch64.md
  ae13780a8296e9c52f9e9b8cd95dc312  gcc/config/aarch64/aarch64.opt
  21fd50b19307096b8be37549ae0f6f77  gcc/config/aarch64/aarch64.opt.urls
  7b468a20f0362cbe02c7699720a962fa  gcc/config/aarch64/arm_acle.h
*************** f7165d62ef852e1929a8fc9a85c01ab2  gcc/co
*** 3491,3498 ****
  dfcdbda4a3bb64a86fdf64ce6fce0ae3  gcc/config/aarch64/geniterators.sh
  bc3b4ebfac8bfd42d3e9098f33585afd  gcc/config/aarch64/gentune.sh
  86eaf33edeb885c2c9ae2a9825879e59  gcc/config/aarch64/host-aarch64-darwin.cc
! a305511a7acc73201c8c7ce521e52136  gcc/config/aarch64/iterators.md
! a1fcb0b7e687756c781537faf6a229b9  gcc/config/aarch64/predicates.md
  a4e902ee1494ba5eee811ea46ecdf995  gcc/config/aarch64/rtems.h
  311b65ba9e415ee9bec122a44389ec72  gcc/config/aarch64/t-aarch64
  5a6fa47ba2bb65a12cd953f8edee028d  gcc/config/aarch64/t-aarch64-freebsd
--- 3491,3498 ----
  dfcdbda4a3bb64a86fdf64ce6fce0ae3  gcc/config/aarch64/geniterators.sh
  bc3b4ebfac8bfd42d3e9098f33585afd  gcc/config/aarch64/gentune.sh
  86eaf33edeb885c2c9ae2a9825879e59  gcc/config/aarch64/host-aarch64-darwin.cc
! c77388ed1d80a3154e2baba3daf5ed92  gcc/config/aarch64/iterators.md
! 657fad68071586ed0e459f6a59f8880c  gcc/config/aarch64/predicates.md
  a4e902ee1494ba5eee811ea46ecdf995  gcc/config/aarch64/rtems.h
  311b65ba9e415ee9bec122a44389ec72  gcc/config/aarch64/t-aarch64
  5a6fa47ba2bb65a12cd953f8edee028d  gcc/config/aarch64/t-aarch64-freebsd
*************** eafc8a2abc331243ea846fab22b8aec4  gcc/co
*** 3640,3648 ****
  5d895a88bb2048a83e3ccc08d50f3151  gcc/config/arm/arm-tables.opt
  f805d118929dd79f6bd4dc75c77c968b  gcc/config/arm/arm-tables.opt.urls
  1f1a55560eb97e283125003609418bce  gcc/config/arm/arm-tune.md
! c1881e55e466689b125a3029d6086ba0  gcc/config/arm/arm.cc
  4b4c240869c2413c542f051e20fc26d1  gcc/config/arm/arm.h
! 5f7e052e197e5f93418cf111af042afe  gcc/config/arm/arm.md
  6438602120f5212434b003b5018064ec  gcc/config/arm/arm.opt
  d96083967a30e6eb0f75d624af2d831a  gcc/config/arm/arm.opt.urls
  ccbf8aa9582c7ea8db0ed6a70d1dd691  gcc/config/arm/arm1020e.md
--- 3640,3648 ----
  5d895a88bb2048a83e3ccc08d50f3151  gcc/config/arm/arm-tables.opt
  f805d118929dd79f6bd4dc75c77c968b  gcc/config/arm/arm-tables.opt.urls
  1f1a55560eb97e283125003609418bce  gcc/config/arm/arm-tune.md
! 1aedf72f99e2ada0c3250930f2381c56  gcc/config/arm/arm.cc
  4b4c240869c2413c542f051e20fc26d1  gcc/config/arm/arm.h
! 9c9e788e42297282f4f5e5e90a907fc4  gcc/config/arm/arm.md
  6438602120f5212434b003b5018064ec  gcc/config/arm/arm.opt
  d96083967a30e6eb0f75d624af2d831a  gcc/config/arm/arm.opt.urls
  ccbf8aa9582c7ea8db0ed6a70d1dd691  gcc/config/arm/arm1020e.md
*************** e1ce38b9aa9fc3c0d48ad0b487e89539  gcc/co
*** 3725,3732 ****
  dc8e1ff924dd1f2699f60837b792825a  gcc/config/arm/t-rtems
  b6434dfdcd32f4ab54f4e1e867cca4d4  gcc/config/arm/t-symbian
  1484dd700dca665c8ec9c7b42f260359  gcc/config/arm/t-vxworks
! 84d24ab216855ebac94722b5968426ab  gcc/config/arm/thumb1.md
! 03d6418be346af0c0f2c9bf32787ef02  gcc/config/arm/thumb2.md
  1b2a050934935f92fdd15721b5d736ec  gcc/config/arm/types.md
  22e6583951db6a19df7c215758f2ffbf  gcc/config/arm/uclinux-eabi.h
  764ee6f9b6836a3b69036da6a49da57e  gcc/config/arm/uclinux-elf.h
--- 3725,3732 ----
  dc8e1ff924dd1f2699f60837b792825a  gcc/config/arm/t-rtems
  b6434dfdcd32f4ab54f4e1e867cca4d4  gcc/config/arm/t-symbian
  1484dd700dca665c8ec9c7b42f260359  gcc/config/arm/t-vxworks
! d3a2939d4adfa469cb15075e8bd8e689  gcc/config/arm/thumb1.md
! 65ad814dde3fff785e01b783b85ec5b0  gcc/config/arm/thumb2.md
  1b2a050934935f92fdd15721b5d736ec  gcc/config/arm/types.md
  22e6583951db6a19df7c215758f2ffbf  gcc/config/arm/uclinux-eabi.h
  764ee6f9b6836a3b69036da6a49da57e  gcc/config/arm/uclinux-elf.h
*************** ad0769e595277d36f17947f5c5ac4550  gcc/co
*** 3746,3764 ****
  fc218940ab265ae323b54d5f007d0d98  gcc/config/avr/avr-devices.cc
  98f0885d00f05d443b653a409d430892  gcc/config/avr/avr-dimode.md
  9a2b84c46488af6472dd771432afe065  gcc/config/avr/avr-fixed.md
! f43b68e01b2d61fffb5336ef45fa1e7f  gcc/config/avr/avr-log.cc
  117bbef05f3fb7ba16a92cee51e0064c  gcc/config/avr/avr-mcus.def
  1db4fe94056a22e92de33b6d365176c6  gcc/config/avr/avr-modes.def
  d37f092206fc4c0379cee5e5fc01b654  gcc/config/avr/avr-passes-fuse-move.h
  627df811141f10a317b8ff56208c13b8  gcc/config/avr/avr-passes.cc
  6b425f8df921557284017d42be8efc3c  gcc/config/avr/avr-passes.def
! abc10e0c20095159dd8a8194c64e24dd  gcc/config/avr/avr-protos.h
  eb753641e5bf09dbcc2be97e61be8767  gcc/config/avr/avr-stdint.h
! 3bc9b2f41f43aa765828c961d0d0f836  gcc/config/avr/avr.cc
! 08a0b2010b152c01b9bb5883c3d62b7f  gcc/config/avr/avr.h
! 96619f4b79a3bd1f3c0bcfe8e76c1c11  gcc/config/avr/avr.md
! 3930ec4193adf946fcc8e301b922ec8c  gcc/config/avr/avr.opt
! 6010f6699565f81df0cf2aa3c7e89ba4  gcc/config/avr/avr.opt.urls
  e6d58e7505c28a23d3cd4e70e534521e  gcc/config/avr/avrlibc.h
  441eaa03acda9ba9c8febfe4aab09aaf  gcc/config/avr/builtins.def
  66196007356392102d57b2751db19590  gcc/config/avr/constraints.md
--- 3746,3764 ----
  fc218940ab265ae323b54d5f007d0d98  gcc/config/avr/avr-devices.cc
  98f0885d00f05d443b653a409d430892  gcc/config/avr/avr-dimode.md
  9a2b84c46488af6472dd771432afe065  gcc/config/avr/avr-fixed.md
! a05a37166e94a56a2d7d2be632dbab55  gcc/config/avr/avr-log.cc
  117bbef05f3fb7ba16a92cee51e0064c  gcc/config/avr/avr-mcus.def
  1db4fe94056a22e92de33b6d365176c6  gcc/config/avr/avr-modes.def
  d37f092206fc4c0379cee5e5fc01b654  gcc/config/avr/avr-passes-fuse-move.h
  627df811141f10a317b8ff56208c13b8  gcc/config/avr/avr-passes.cc
  6b425f8df921557284017d42be8efc3c  gcc/config/avr/avr-passes.def
! 65447cdb57d64c621846dbfaece9c7f6  gcc/config/avr/avr-protos.h
  eb753641e5bf09dbcc2be97e61be8767  gcc/config/avr/avr-stdint.h
! 3680c2dc8dbc7526f896f864c609ac9e  gcc/config/avr/avr.cc
! bee0e6e1aecf816b3bc39ba11e67566f  gcc/config/avr/avr.h
! f902d0305680c99b1d2a1aaee845d0ac  gcc/config/avr/avr.md
! 9b16afc684b8a6d301aa731ed7683f93  gcc/config/avr/avr.opt
! eadbd4a61fec0122a6773c41bee01200  gcc/config/avr/avr.opt.urls
  e6d58e7505c28a23d3cd4e70e534521e  gcc/config/avr/avrlibc.h
  441eaa03acda9ba9c8febfe4aab09aaf  gcc/config/avr/builtins.def
  66196007356392102d57b2751db19590  gcc/config/avr/constraints.md
*************** a46b54a8716fb1a2a2bd542f2bfc433f  gcc/co
*** 3889,3896 ****
  8c4a62d056940f746dc7f1d2bec5d593  gcc/config/darwin-protos.h
  6b3e8e137075b05d643ef7f3dfcc2ca3  gcc/config/darwin-rust.cc
  eea8df8e72788e523a0ef86b62316db3  gcc/config/darwin-sections.def
! cd72f21aae1fd2cf92d25c2d921ba1f6  gcc/config/darwin.cc
! 050f9a4fa3824ceb9aecdab92f03d602  gcc/config/darwin.h
  9163d8af5a9b48d24237f1dc7cf67e2d  gcc/config/darwin.opt
  7c6d1c1425e31bca754e3318d5b15d32  gcc/config/darwin.opt.urls
  3902f6d033f77d702a66827bef035d43  gcc/config/default-c.cc
--- 3889,3896 ----
  8c4a62d056940f746dc7f1d2bec5d593  gcc/config/darwin-protos.h
  6b3e8e137075b05d643ef7f3dfcc2ca3  gcc/config/darwin-rust.cc
  eea8df8e72788e523a0ef86b62316db3  gcc/config/darwin-sections.def
! b26fee5eb5651a0facbaf320441edea3  gcc/config/darwin.cc
! d58da048cd33cea47182a26057ff30b5  gcc/config/darwin.h
  9163d8af5a9b48d24237f1dc7cf67e2d  gcc/config/darwin.opt
  7c6d1c1425e31bca754e3318d5b15d32  gcc/config/darwin.opt.urls
  3902f6d033f77d702a66827bef035d43  gcc/config/default-c.cc
*************** d3fb594d11281112ff8d8f304a000c4e  gcc/co
*** 4163,4171 ****
  a4a1a27264871bfba9de0f4fbdb4f3ac  gcc/config/i386/i386-c.cc
  54909bb70e074c14dcf4499a5baedc54  gcc/config/i386/i386-d.cc
  172dcd61afc5800b61ebb688838d9adc  gcc/config/i386/i386-d.h
! 80474a4f7efc29f38a427cc8082691f8  gcc/config/i386/i386-expand.cc
  c9c3969c00808c9b6809fbeab3e4a1d2  gcc/config/i386/i386-expand.h
! 5f1998d1f3f031f0021021656fc02eb3  gcc/config/i386/i386-features.cc
  1ee34fa5f2ae92fd7d48419d8fc529f8  gcc/config/i386/i386-features.h
  66732512f01bad0bbb26cb3c09ec773e  gcc/config/i386/i386-isa.def
  09f791543c9ad5918bde13160f0de1df  gcc/config/i386/i386-modes.def
--- 4163,4171 ----
  a4a1a27264871bfba9de0f4fbdb4f3ac  gcc/config/i386/i386-c.cc
  54909bb70e074c14dcf4499a5baedc54  gcc/config/i386/i386-d.cc
  172dcd61afc5800b61ebb688838d9adc  gcc/config/i386/i386-d.h
! 79e270a5c2733b8bd3a9842ddb597340  gcc/config/i386/i386-expand.cc
  c9c3969c00808c9b6809fbeab3e4a1d2  gcc/config/i386/i386-expand.h
! ad15e1c4c060f8a65101d092e3171fc5  gcc/config/i386/i386-features.cc
  1ee34fa5f2ae92fd7d48419d8fc529f8  gcc/config/i386/i386-features.h
  66732512f01bad0bbb26cb3c09ec773e  gcc/config/i386/i386-isa.def
  09f791543c9ad5918bde13160f0de1df  gcc/config/i386/i386-modes.def
*************** d3f1231c1140289c94f3eba541d8f356  gcc/co
*** 4178,4185 ****
  b19c27e8a900f9eeb7d73e2bb4b8d313  gcc/config/i386/i386-rust.cc
  24065393854cd1e08e3285bd707210fe  gcc/config/i386/i386-rust.h
  645c56a82148d24a32dcebec1c1e9474  gcc/config/i386/i386.cc
! 9b20906d8a7d93f706d1a2e855678ee6  gcc/config/i386/i386.h
! ae703fad47703205e11b61a630d0bca1  gcc/config/i386/i386.md
  23985b411cb15228b631691265bfefe9  gcc/config/i386/i386.opt
  59cb9adff8fe9d24eed1cfac0c5bf62c  gcc/config/i386/i386.opt.urls
  f22876926ff4a2cb67b105ac266c72ea  gcc/config/i386/i386elf.h
--- 4178,4185 ----
  b19c27e8a900f9eeb7d73e2bb4b8d313  gcc/config/i386/i386-rust.cc
  24065393854cd1e08e3285bd707210fe  gcc/config/i386/i386-rust.h
  645c56a82148d24a32dcebec1c1e9474  gcc/config/i386/i386.cc
! a682bb6d26e4c798bc445510a6eacabb  gcc/config/i386/i386.h
! 60dd63df1ce14b9e1c7b489ebc95524d  gcc/config/i386/i386.md
  23985b411cb15228b631691265bfefe9  gcc/config/i386/i386.opt
  59cb9adff8fe9d24eed1cfac0c5bf62c  gcc/config/i386/i386.opt.urls
  f22876926ff4a2cb67b105ac266c72ea  gcc/config/i386/i386elf.h
*************** fc41e4ebf77dd1f54ddeec4e60428d5e  gcc/co
*** 4224,4230 ****
  1d9e8c2f64fa31f36bfe9ac83a296943  gcc/config/i386/pmmintrin.h
  62337355ef8c4334a0cc9c1db0cfc0da  gcc/config/i386/popcntintrin.h
  d17b84bc85c341e7f386b3b24b231070  gcc/config/i386/ppro.md
! 0c4aad3cd19c609454f2934551a88f24  gcc/config/i386/predicates.md
  e10e34eef814ce6c5e09777d378d36d3  gcc/config/i386/prfchiintrin.h
  eed7a3601ce61f497dcfc5655e5da7a6  gcc/config/i386/prfchwintrin.h
  bc11b09d2de8ba6b9ec2392f1cebdbd9  gcc/config/i386/raointintrin.h
--- 4224,4230 ----
  1d9e8c2f64fa31f36bfe9ac83a296943  gcc/config/i386/pmmintrin.h
  62337355ef8c4334a0cc9c1db0cfc0da  gcc/config/i386/popcntintrin.h
  d17b84bc85c341e7f386b3b24b231070  gcc/config/i386/ppro.md
! bb216f3ca71406f417220510f7748f71  gcc/config/i386/predicates.md
  e10e34eef814ce6c5e09777d378d36d3  gcc/config/i386/prfchiintrin.h
  eed7a3601ce61f497dcfc5655e5da7a6  gcc/config/i386/prfchwintrin.h
  bc11b09d2de8ba6b9ec2392f1cebdbd9  gcc/config/i386/raointintrin.h
*************** beaf066ed06870bef361adf40e122f78  gcc/co
*** 4600,4608 ****
  453ffe6fe7bd722fe86fcbd20ad8c571  gcc/config/mips/mips-tables.opt
  216c87627424d946f6245f736be7b5f1  gcc/config/mips/mips-tables.opt.urls
  ada8015fb5b7a28ae8e6000f7cff5ba5  gcc/config/mips/mips.cc
! 88dd001644c78b094085e14e139cfa6c  gcc/config/mips/mips.h
  e60b3aa2a8b65b4efe7979085ee6e9ad  gcc/config/mips/mips.md
! fe191aedf5f44f1529c770fa027b02bf  gcc/config/mips/mips.opt
  1f687c2ccb6cc2541cbbbe637fca085e  gcc/config/mips/mips.opt.urls
  d89c4346d4e58dfefe64a850c4bfdbdb  gcc/config/mips/msa.h
  99697dba04763fc661a97d98e8e8e580  gcc/config/mips/mti-elf.h
--- 4600,4608 ----
  453ffe6fe7bd722fe86fcbd20ad8c571  gcc/config/mips/mips-tables.opt
  216c87627424d946f6245f736be7b5f1  gcc/config/mips/mips-tables.opt.urls
  ada8015fb5b7a28ae8e6000f7cff5ba5  gcc/config/mips/mips.cc
! 5390074a96bd88c37709897a13163810  gcc/config/mips/mips.h
  e60b3aa2a8b65b4efe7979085ee6e9ad  gcc/config/mips/mips.md
! b0ee02ac417ab7f573eb8399f8c88228  gcc/config/mips/mips.opt
  1f687c2ccb6cc2541cbbbe637fca085e  gcc/config/mips/mips.opt.urls
  d89c4346d4e58dfefe64a850c4bfdbdb  gcc/config/mips/msa.h
  99697dba04763fc661a97d98e8e8e580  gcc/config/mips/mti-elf.h
*************** d6a3fdc3ae6584fd2346ec32920baaa8  gcc/co
*** 4873,4879 ****
  d6da8f84e5835bd14f146fc765bcb39d  gcc/config/pru/pru.opt
  cd13b51383c99c08d86250b61fed3805  gcc/config/pru/pru.opt.urls
  540013c309ceb3efb2b16d728b1fc726  gcc/config/pru/t-pru
! b2c65c060f10aaf4b8e8c8185b1d7189  gcc/config/riscv/arch-canonicalize
  0673612816114db21fa7d56be315a067  gcc/config/riscv/autovec-opt.md
  0a8d3bb5c92b40519d869bae882cf263  gcc/config/riscv/autovec.md
  40e0e0684e3c3a934587129211c4674c  gcc/config/riscv/bitmanip.md
--- 4873,4879 ----
  d6da8f84e5835bd14f146fc765bcb39d  gcc/config/pru/pru.opt
  cd13b51383c99c08d86250b61fed3805  gcc/config/pru/pru.opt.urls
  540013c309ceb3efb2b16d728b1fc726  gcc/config/pru/t-pru
! 1922852b24475409980b64ed5192a86e  gcc/config/riscv/arch-canonicalize
  0673612816114db21fa7d56be315a067  gcc/config/riscv/autovec-opt.md
  0a8d3bb5c92b40519d869bae882cf263  gcc/config/riscv/autovec.md
  40e0e0684e3c3a934587129211c4674c  gcc/config/riscv/bitmanip.md
*************** f51037a9e437f8e9ce7215b2da5ad4e2  gcc/co
*** 4947,4954 ****
  5a1dc434073ed565843a91456f836a9a  gcc/config/riscv/riscv-vsetvl.cc
  d120ed6eb2847b636271b3a1ef82ecbf  gcc/config/riscv/riscv-vsetvl.def
  7082a18dbfc574d47bf71f4d50dd30f9  gcc/config/riscv/riscv-zicfilp.cc
! ceb0aaef76af1f27856694ab36bc93e2  gcc/config/riscv/riscv.cc
! 1e6d5c3cff4825c434ac203d43f0b5ab  gcc/config/riscv/riscv.h
  e6c7d018aa0c0a73c813aae4ce9c6b50  gcc/config/riscv/riscv.md
  fec1c87bba727131a45d4ec4a9ae5490  gcc/config/riscv/riscv.opt
  d1d34490d8b53ec20d70ed9e2e56e3ab  gcc/config/riscv/riscv.opt.urls
--- 4947,4954 ----
  5a1dc434073ed565843a91456f836a9a  gcc/config/riscv/riscv-vsetvl.cc
  d120ed6eb2847b636271b3a1ef82ecbf  gcc/config/riscv/riscv-vsetvl.def
  7082a18dbfc574d47bf71f4d50dd30f9  gcc/config/riscv/riscv-zicfilp.cc
! 3758c173c14f207481ea71f46b6c3f83  gcc/config/riscv/riscv.cc
! 9990ffadc7ae9eebe73f28c47634c143  gcc/config/riscv/riscv.h
  e6c7d018aa0c0a73c813aae4ce9c6b50  gcc/config/riscv/riscv.md
  fec1c87bba727131a45d4ec4a9ae5490  gcc/config/riscv/riscv.opt
  d1d34490d8b53ec20d70ed9e2e56e3ab  gcc/config/riscv/riscv.opt.urls
*************** d7112093049d4abbc421609d032b7358  gcc/co
*** 5212,5218 ****
  6fdfe66fdde3f81b83dc16c27ac7df3f  gcc/config/s390/s390-opts.h
  87bca0c72260bdf7b32cbe797e607999  gcc/config/s390/s390-passes.def
  b6426b7457d4617875547be76bb5112d  gcc/config/s390/s390-protos.h
! 1de6580a7e94dae5df674834ce01a983  gcc/config/s390/s390.cc
  f162b44703353c72956061efcbe580d7  gcc/config/s390/s390.h
  a258f22c710ab1d864e7a1ff01d8a13d  gcc/config/s390/s390.md
  fa4475320c7a3767bf9accfa736efcc6  gcc/config/s390/s390.opt
--- 5212,5218 ----
  6fdfe66fdde3f81b83dc16c27ac7df3f  gcc/config/s390/s390-opts.h
  87bca0c72260bdf7b32cbe797e607999  gcc/config/s390/s390-passes.def
  b6426b7457d4617875547be76bb5112d  gcc/config/s390/s390-protos.h
! f50b15f050dbe1375d1faf2d9b0b2a4e  gcc/config/s390/s390.cc
  f162b44703353c72956061efcbe580d7  gcc/config/s390/s390.h
  a258f22c710ab1d864e7a1ff01d8a13d  gcc/config/s390/s390.md
  fa4475320c7a3767bf9accfa736efcc6  gcc/config/s390/s390.opt
*************** d21f09c47f24bd26a51424057a3b5e34  gcc/co
*** 5463,5469 ****
  17f9168a86db5596e32e2a9091f99d7f  gcc/config/x-netbsd
  622a11bb30d8162bffd0e70d8e546b5e  gcc/config/x-openbsd
  60c44ffe57cc1280e854dc1840adc766  gcc/config/x-solaris
! 7c8b0ac3dd0d44b0cb0ad12655327da6  gcc/config/xtensa/constraints.md
  ef292bd063751273e93912005054621c  gcc/config/xtensa/elf.h
  784e78d129e667eb51b57cd3bb4cf498  gcc/config/xtensa/elf.opt
  f140d72c4f00aa6f39295fedb6f6fc92  gcc/config/xtensa/elf.opt.urls
--- 5463,5469 ----
  17f9168a86db5596e32e2a9091f99d7f  gcc/config/x-netbsd
  622a11bb30d8162bffd0e70d8e546b5e  gcc/config/x-openbsd
  60c44ffe57cc1280e854dc1840adc766  gcc/config/x-solaris
! f03bbaf799ed57e64c11e3a4187bca97  gcc/config/xtensa/constraints.md
  ef292bd063751273e93912005054621c  gcc/config/xtensa/elf.h
  784e78d129e667eb51b57cd3bb4cf498  gcc/config/xtensa/elf.opt
  f140d72c4f00aa6f39295fedb6f6fc92  gcc/config/xtensa/elf.opt.urls
*************** f378c965e5e289a389bbf48d20867d48  gcc/co
*** 5481,5488 ****
  79ea7a5d4eebe3e5ee624db15dfe6499  gcc/config/xtensa/xtensa.md
  f0452ea712955ce21c9c149136850780  gcc/config/xtensa/xtensa.opt
  db57d7603312357e8c0cfb21c32353d1  gcc/config/xtensa/xtensa.opt.urls
! f68072ed087e51553c85876765be1ebe  gcc/configure
! 25b00d6f2854fbefe0d865f7d6e9ab3a  gcc/configure.ac
  ec3aa966ca3fe9c6f84d4378160541b6  gcc/context.cc
  d1bde52b8dee0c0c5506d7e320b1bb61  gcc/context.h
  a9c3cddee4e237141062720b72fe38cd  gcc/convert.cc
--- 5481,5488 ----
  79ea7a5d4eebe3e5ee624db15dfe6499  gcc/config/xtensa/xtensa.md
  f0452ea712955ce21c9c149136850780  gcc/config/xtensa/xtensa.opt
  db57d7603312357e8c0cfb21c32353d1  gcc/config/xtensa/xtensa.opt.urls
! f512b07d631256e2b028c92178d52b31  gcc/configure
! c55d53e37460401225c81aaf7770f3ee  gcc/configure.ac
  ec3aa966ca3fe9c6f84d4378160541b6  gcc/context.cc
  d1bde52b8dee0c0c5506d7e320b1bb61  gcc/context.h
  a9c3cddee4e237141062720b72fe38cd  gcc/convert.cc
*************** fa062fdcbed6412a676fa477d87ba334  gcc/co
*** 5492,5498 ****
  5d31df44fc0a5b17beb74ce0ff38e214  gcc/coroutine-passes.cc
  02796caeaa2f14f72dc3c9c23cc97dfc  gcc/coverage.cc
  722fb5fda78e55c5af5da72cad78751f  gcc/coverage.h
! 68d1f61a739bc947d7058bbbaa168e67  gcc/cp/ChangeLog
  70c059f2b75a2fc1bb95a526b21b8cd7  gcc/cp/ChangeLog-1993
  7cbd106e10a0ba7c052bee3fe20671c2  gcc/cp/ChangeLog-1994
  3b1e3ed23ad4363f75e6fd2fbb583dee  gcc/cp/ChangeLog-1995
--- 5492,5498 ----
  5d31df44fc0a5b17beb74ce0ff38e214  gcc/coroutine-passes.cc
  02796caeaa2f14f72dc3c9c23cc97dfc  gcc/coverage.cc
  722fb5fda78e55c5af5da72cad78751f  gcc/coverage.h
! 887cec4b54ebfdaf686bb4fe39d17a50  gcc/cp/ChangeLog
  70c059f2b75a2fc1bb95a526b21b8cd7  gcc/cp/ChangeLog-1993
  7cbd106e10a0ba7c052bee3fe20671c2  gcc/cp/ChangeLog-1994
  3b1e3ed23ad4363f75e6fd2fbb583dee  gcc/cp/ChangeLog-1995
*************** bcf7c5d02934e40f17edeb18d58c4d4d  gcc/cp
*** 5528,5539 ****
  c1c7801b9b0f379e702a4f6cb83972e7  gcc/cp/ChangeLog.ptr
  9aa3cd9f75c785de9f51446e3f295515  gcc/cp/ChangeLog.tree-ssa
  2315f072c416e98144559bbdb5312c21  gcc/cp/Make-lang.in
! 4ffb9a058a3b363c2346f08341cb1333  gcc/cp/call.cc
  fce8de27014c109814b3f69be6a5d4f6  gcc/cp/cfns.gperf
  68fc21d4889b1c70ccf89747b98b1fb4  gcc/cp/cfns.h
! 7f0529acba840882ae2d5681da795c85  gcc/cp/class.cc
  ee3fb2cc9b9557d3895f527353160bd4  gcc/cp/config-lang.in
! e3ae26db3f8679eea9f2e03bebac5998  gcc/cp/constexpr.cc
  0dd4c05a9cf7cb160958d7780c3f620a  gcc/cp/constraint.cc
  613233facbf4b0f1cff770ed6c49c666  gcc/cp/contracts.cc
  1f1cd3a021a2cd25741e252145ee8282  gcc/cp/contracts.h
--- 5528,5539 ----
  c1c7801b9b0f379e702a4f6cb83972e7  gcc/cp/ChangeLog.ptr
  9aa3cd9f75c785de9f51446e3f295515  gcc/cp/ChangeLog.tree-ssa
  2315f072c416e98144559bbdb5312c21  gcc/cp/Make-lang.in
! e2b37a179d9db738fbd5f8775f0ad481  gcc/cp/call.cc
  fce8de27014c109814b3f69be6a5d4f6  gcc/cp/cfns.gperf
  68fc21d4889b1c70ccf89747b98b1fb4  gcc/cp/cfns.h
! c8d9ca2edc2724faaa2f5457ab27c6f9  gcc/cp/class.cc
  ee3fb2cc9b9557d3895f527353160bd4  gcc/cp/config-lang.in
! ab1463167c20bfd215ab351553bc6001  gcc/cp/constexpr.cc
  0dd4c05a9cf7cb160958d7780c3f620a  gcc/cp/constraint.cc
  613233facbf4b0f1cff770ed6c49c666  gcc/cp/contracts.cc
  1f1cd3a021a2cd25741e252145ee8282  gcc/cp/contracts.h
*************** b7ae95468b0150bbe2b3cba351e96a2c  gcc/cp
*** 5552,5573 ****
  28a2733b7abed60b2b102105bb7cebaf  gcc/cp/cxx-pretty-print.cc
  955ecfa636599a39229757737e271819  gcc/cp/cxx-pretty-print.h
  c1cc5dac36866c611933c037cc1d6f2f  gcc/cp/cxxapi-data.csv
! 490c082f15a6b8772dee5e04e8fa03bb  gcc/cp/decl.cc
  7f116fdc50b24dcb13cdcf096636aef9  gcc/cp/decl.h
  a8747e45489cb64f2f4528a1973fcacf  gcc/cp/decl2.cc
  691a10b3246d19925433648ba9a4ea9a  gcc/cp/dump.cc
! 69badb4c3f76c9dbd270a2c2d56ee401  gcc/cp/error.cc
  856ffef082c6d62b43386d99e03e94b0  gcc/cp/except.cc
  73d53be529221aad38fb412e9e7d1ee3  gcc/cp/expr.cc
  3b7c086cfb4ed89e6ae40a09ca796704  gcc/cp/friend.cc
  3d079dd21f8a1ab95fb2d1f96d799283  gcc/cp/g++spec.cc
  30b9ed40d39cf78b95792ef5dca2aebb  gcc/cp/gen-cxxapi-file.py
! 142701672ecfe15addb5c0d02c027f7b  gcc/cp/init.cc
  9d0b0c61a14ab3e2ab39e94ed5671f67  gcc/cp/lambda.cc
  ac5d78393361c1bcb930119a896a14ca  gcc/cp/lang-specs.h
! 1352d53c83446655a7fcab07fcdeddc1  gcc/cp/lex.cc
  aaf76a9b03fd0532d2904aef004fd66a  gcc/cp/logic.cc
! 422826d547b58d3ba757dfd5a0276ccb  gcc/cp/mangle.cc
  936bd061907a7a899c3285cf17b17674  gcc/cp/mapper-client.cc
  6c77b1fab5f6d146677090285a202a50  gcc/cp/mapper-client.h
  44e22b51797f89c9da996523a6d97f1c  gcc/cp/mapper-resolver.cc
--- 5552,5573 ----
  28a2733b7abed60b2b102105bb7cebaf  gcc/cp/cxx-pretty-print.cc
  955ecfa636599a39229757737e271819  gcc/cp/cxx-pretty-print.h
  c1cc5dac36866c611933c037cc1d6f2f  gcc/cp/cxxapi-data.csv
! a505cfd26ec60c73dc302bf81292c06a  gcc/cp/decl.cc
  7f116fdc50b24dcb13cdcf096636aef9  gcc/cp/decl.h
  a8747e45489cb64f2f4528a1973fcacf  gcc/cp/decl2.cc
  691a10b3246d19925433648ba9a4ea9a  gcc/cp/dump.cc
! 92ff37818f6d40bbea721a3c300cb3be  gcc/cp/error.cc
  856ffef082c6d62b43386d99e03e94b0  gcc/cp/except.cc
  73d53be529221aad38fb412e9e7d1ee3  gcc/cp/expr.cc
  3b7c086cfb4ed89e6ae40a09ca796704  gcc/cp/friend.cc
  3d079dd21f8a1ab95fb2d1f96d799283  gcc/cp/g++spec.cc
  30b9ed40d39cf78b95792ef5dca2aebb  gcc/cp/gen-cxxapi-file.py
! c9c9e9532763a552999ab9955200dcbd  gcc/cp/init.cc
  9d0b0c61a14ab3e2ab39e94ed5671f67  gcc/cp/lambda.cc
  ac5d78393361c1bcb930119a896a14ca  gcc/cp/lang-specs.h
! dd1f980b60b9b3515a74ca72c5512514  gcc/cp/lex.cc
  aaf76a9b03fd0532d2904aef004fd66a  gcc/cp/logic.cc
! f721568d672e78d92caaadd491427497  gcc/cp/mangle.cc
  936bd061907a7a899c3285cf17b17674  gcc/cp/mapper-client.cc
  6c77b1fab5f6d146677090285a202a50  gcc/cp/mapper-client.h
  44e22b51797f89c9da996523a6d97f1c  gcc/cp/mapper-resolver.cc
*************** eed0876afd8c67b71fbaa0f71b1ad615  gcc/cp
*** 5577,5589 ****
  6e376c0a7ec6c4a14de40885e3b1a0cb  gcc/cp/name-lookup.h
  e7fe06956aada61bcaae5168ad47a9c1  gcc/cp/operators.def
  813c253a000ee20d8d6598f56edc400e  gcc/cp/optimize.cc
! 3540adfa04fbab89aed66ceb1a94481b  gcc/cp/parser.cc
  e8a3a03873c6294ff25a783941b8d8af  gcc/cp/parser.h
! 619615d6d2299afbdebad0e3e94014b2  gcc/cp/pt.cc
  a121c0a45933b618832614be1fbfd5c7  gcc/cp/ptree.cc
  ee1ddf1e1b9554bb1a10109ce8c6dee5  gcc/cp/rtti.cc
  a4930c49ed8f9e6b019399bd1faf86d0  gcc/cp/search.cc
! f6e71aa9edb05114787b4207be1a5500  gcc/cp/semantics.cc
  b58bf61fbfed45af179b7104e72a9486  gcc/cp/std-name-hint.gperf
  2425db76c32085977eff047c982cebab  gcc/cp/std-name-hint.h
  bb59c5ae196f831747fd7fc38c0999cd  gcc/cp/tree.cc
--- 5577,5589 ----
  6e376c0a7ec6c4a14de40885e3b1a0cb  gcc/cp/name-lookup.h
  e7fe06956aada61bcaae5168ad47a9c1  gcc/cp/operators.def
  813c253a000ee20d8d6598f56edc400e  gcc/cp/optimize.cc
! f862fa2c67faba7d910864c518f4172e  gcc/cp/parser.cc
  e8a3a03873c6294ff25a783941b8d8af  gcc/cp/parser.h
! 0c8bb6096ad717de6fa53ef097bfc65a  gcc/cp/pt.cc
  a121c0a45933b618832614be1fbfd5c7  gcc/cp/ptree.cc
  ee1ddf1e1b9554bb1a10109ce8c6dee5  gcc/cp/rtti.cc
  a4930c49ed8f9e6b019399bd1faf86d0  gcc/cp/search.cc
! f2a627322ea7636dc76073af4f7fe3f6  gcc/cp/semantics.cc
  b58bf61fbfed45af179b7104e72a9486  gcc/cp/std-name-hint.gperf
  2425db76c32085977eff047c982cebab  gcc/cp/std-name-hint.h
  bb59c5ae196f831747fd7fc38c0999cd  gcc/cp/tree.cc
*************** ec1e9c9456a8530e241079823e2fc126  gcc/cr
*** 5605,5611 ****
  15aef1bfc1d9935a8df200d3827b59c6  gcc/ctfc.cc
  3df123e84e7c118eb423425f2100e3b5  gcc/ctfc.h
  aec0cd5251de880945c96eb21e97eac9  gcc/ctfout.cc
! 1c32fb925d7f70209db05b72fad25716  gcc/d/ChangeLog
  94dbce564aba342900829d11192f8905  gcc/d/ChangeLog-2006
  1a0536d6571bca334bb5c00dbdf257ab  gcc/d/ChangeLog-2007
  362a026d745031260b2e4dd8eba9becc  gcc/d/ChangeLog-2008
--- 5605,5611 ----
  15aef1bfc1d9935a8df200d3827b59c6  gcc/ctfc.cc
  3df123e84e7c118eb423425f2100e3b5  gcc/ctfc.h
  aec0cd5251de880945c96eb21e97eac9  gcc/ctfout.cc
! 002ca166156da9bb2ef27fe296265909  gcc/d/ChangeLog
  94dbce564aba342900829d11192f8905  gcc/d/ChangeLog-2006
  1a0536d6571bca334bb5c00dbdf257ab  gcc/d/ChangeLog-2007
  362a026d745031260b2e4dd8eba9becc  gcc/d/ChangeLog-2008
*************** e432bfc5c605ae0b1beedf0492ad40d1  gcc/d/
*** 5625,5631 ****
  4c5437f5e539631a8d148cc332eb2c2f  gcc/d/ChangeLog-2022
  4c7bd4d8dfadc612e88b52f720d6557a  gcc/d/ChangeLog-2023
  515b6760ee63421bed220a6d374a6795  gcc/d/ChangeLog-2024
! bea890f9a34a3828dac2371f1f1796bf  gcc/d/Make-lang.in
  426254b45d40584d0597c63f3fd1f889  gcc/d/README.gcc
  477218c51620c217d3332559ce436248  gcc/d/config-lang.in
  09eb2aeb6f4b5107b4a75f4d41928cf1  gcc/d/d-attribs.cc
--- 5625,5631 ----
  4c5437f5e539631a8d148cc332eb2c2f  gcc/d/ChangeLog-2022
  4c7bd4d8dfadc612e88b52f720d6557a  gcc/d/ChangeLog-2023
  515b6760ee63421bed220a6d374a6795  gcc/d/ChangeLog-2024
! ef89998b130adfb6f71d429c96e96bed  gcc/d/Make-lang.in
  426254b45d40584d0597c63f3fd1f889  gcc/d/README.gcc
  477218c51620c217d3332559ce436248  gcc/d/config-lang.in
  09eb2aeb6f4b5107b4a75f4d41928cf1  gcc/d/d-attribs.cc
*************** c941c742c1dd89806e98bbaae2f3d552  gcc/dd
*** 5866,5872 ****
  f37a4f98bbb2210fd8e8fe68925aab73  gcc/ddg.h
  a4c54450630ab4406b2e21b4baa912e2  gcc/debug.cc
  d6389bf409aaa3f1caa9dbe8c1dd3e86  gcc/debug.h
! e4d89cb5b2193b73b577d8871e0d8f3e  gcc/defaults.h
  5942b7e5a9008e79df837738f0150e56  gcc/df-core.cc
  b9d078b88658c87d713e175705b687be  gcc/df-problems.cc
  151d675229ec23b6da3f2cc6ee3d7367  gcc/df-scan.cc
--- 5866,5872 ----
  f37a4f98bbb2210fd8e8fe68925aab73  gcc/ddg.h
  a4c54450630ab4406b2e21b4baa912e2  gcc/debug.cc
  d6389bf409aaa3f1caa9dbe8c1dd3e86  gcc/debug.h
! 93f1c614df7d70911bff7bfcfb94d36f  gcc/defaults.h
  5942b7e5a9008e79df837738f0150e56  gcc/df-core.cc
  b9d078b88658c87d713e175705b687be  gcc/df-problems.cc
  151d675229ec23b6da3f2cc6ee3d7367  gcc/df-scan.cc
*************** b24ae235869e8ddfde6c45d41923f7ef  gcc/df
*** 5876,5922 ****
  93b73dbd9036edc5371e50289303ddde  gcc/diagnostic-core.h
  a94dd5f1cfd3551d976846dfd5627f4e  gcc/diagnostic-global-context.cc
  ddb5e19e6f3ff8224aedd1a60eaad23e  gcc/diagnostic-highlight-colors.h
! 77d6cba3ed8490570085b919ef8aeb2c  gcc/diagnostic.h
! 09716b3c4ca28b81c3b06a044696555a  gcc/diagnostics/buffering.cc
! aea647fc04e00e3ca00c0f4c70f50ae1  gcc/diagnostics/buffering.h
  40fd6d86656b819f4c830d0d493b0d88  gcc/diagnostics/changes.cc
  ff66e6baa4830cf18c7b97e2eb383ac5  gcc/diagnostics/changes.h
  edcbcad65269c8bfebcac2def7bc9cc1  gcc/diagnostics/client-data-hooks.h
  c9250b15349fce5a608b769043f111e5  gcc/diagnostics/color.cc
  d29ddcb032cf35e525663d8b857fe46b  gcc/diagnostics/color.h
  feea31e8e6eec9c1403f01df95d221d4  gcc/diagnostics/context-options.h
! 5e5b73b8fd90f187a65a8acfa978941d  gcc/diagnostics/context.cc
! b5bd8b05f581d65cf7f13eaef0721745  gcc/diagnostics/context.h
  6eb2e40f405d950a9e9f3c089680a899  gcc/diagnostics/diagnostic-info.h
  fd87cae7d2e8cfdbfe401ce78e684593  gcc/diagnostics/diagnostics-selftests.cc
  1ca1218e8ad79ba30925b61d63e7c5b0  gcc/diagnostics/diagnostics-selftests.h
  b1a342ed1575b6a45df5f31d699e73c8  gcc/diagnostics/diagram.h
  f2f7f2e44f68617193d688191fd08395  gcc/diagnostics/digraphs.cc
  2b7bbaecee26ffad2cf1ec52058566bf  gcc/diagnostics/digraphs.h
  cff4c3f5d806ef5fa9ea2a9776fcc922  gcc/diagnostics/event-id.h
! 8664e7fd52051d76308c83d24d86c7b6  gcc/diagnostics/file-cache.cc
  4e3d1fe87ad0979f552310facbc2e534  gcc/diagnostics/file-cache.h
! 2b681d4c71228aa8581e54ced1230400  gcc/diagnostics/html-sink.cc
! 1fe5721d92cff8138e2730e9fd8839ae  gcc/diagnostics/html-sink.h
  e5801529f87f5812381a450d52efaebf  gcc/diagnostics/kinds.def
  0e7b7ba2494e5650473c71225e47feb5  gcc/diagnostics/kinds.h
! 8fa4ac986e2a5fb33b9feaf7a3090bc8  gcc/diagnostics/lazy-paths.cc
  4ed6c990f3102512e3c60c6c5069dd21  gcc/diagnostics/lazy-paths.h
  c131a194acbb9d5e4682e19f1a759181  gcc/diagnostics/logical-locations.h
  ed9e23a6a190e966a47730d652613dd2  gcc/diagnostics/macro-unwinding.cc
  1a1b13e68ed47b8eb0342caa0caee17b  gcc/diagnostics/macro-unwinding.h
! f25b62af6fdde6c09fc4ebaa5ef69f94  gcc/diagnostics/metadata.h
  625181add33d5bfe0e9fbec59bff16f5  gcc/diagnostics/option-classifier.cc
  3df9c58d5592c4781758cda2f751adb8  gcc/diagnostics/option-classifier.h
  ee46d9f24ee418300e1cb8af08ce0e7c  gcc/diagnostics/option-id.h
  f5d7b6b5a0da4617c6298991d76432f3  gcc/diagnostics/output-file.h
! c295ea017b37f35932234f3a66411863  gcc/diagnostics/output-spec.cc
  3eec925c74669a3ab2099a0428b64b64  gcc/diagnostics/output-spec.h
  cefbba8b03685fbfd838e1f457bb843a  gcc/diagnostics/paths-output.cc
  e60ad2d99ee160a6acce95a85c4f5884  gcc/diagnostics/paths.cc
  ab20f8a7e64efd9ea6670e6447014d6f  gcc/diagnostics/paths.h
! 78c5fffa6b0eec805792adaa51b498da  gcc/diagnostics/sarif-sink.cc
! 9fda361308b90adaea42525d93f3772e  gcc/diagnostics/sarif-sink.h
  ee068b3f8fd2d449eee5a70ef6dad518  gcc/diagnostics/selftest-context.cc
  0c9931582348dcf2e668dad28878e073  gcc/diagnostics/selftest-context.h
  380b1d9e0cb480756d7490c2ff04e99b  gcc/diagnostics/selftest-logical-locations.cc
--- 5876,5927 ----
  93b73dbd9036edc5371e50289303ddde  gcc/diagnostic-core.h
  a94dd5f1cfd3551d976846dfd5627f4e  gcc/diagnostic-global-context.cc
  ddb5e19e6f3ff8224aedd1a60eaad23e  gcc/diagnostic-highlight-colors.h
! 03317dcb68edc20739a39d6cdd14723d  gcc/diagnostic.h
! e5c0a507efdbc3f4b46838590abf4cfb  gcc/diagnostics/buffering.cc
! 47de19fd41c4322b6be98c4f8c0d4617  gcc/diagnostics/buffering.h
  40fd6d86656b819f4c830d0d493b0d88  gcc/diagnostics/changes.cc
  ff66e6baa4830cf18c7b97e2eb383ac5  gcc/diagnostics/changes.h
  edcbcad65269c8bfebcac2def7bc9cc1  gcc/diagnostics/client-data-hooks.h
  c9250b15349fce5a608b769043f111e5  gcc/diagnostics/color.cc
  d29ddcb032cf35e525663d8b857fe46b  gcc/diagnostics/color.h
+ 3e3d9b398652afcc049d57d6ebcb4d1b  gcc/diagnostics/column-options.h
  feea31e8e6eec9c1403f01df95d221d4  gcc/diagnostics/context-options.h
! d4171bd3121ee5d3efde09e364b0e9b2  gcc/diagnostics/context.cc
! fb340621b50a922aa77126e66975cebf  gcc/diagnostics/context.h
! 3f0f4bd88c2110afde540ec51f32ce6b  gcc/diagnostics/counters.h
  6eb2e40f405d950a9e9f3c089680a899  gcc/diagnostics/diagnostic-info.h
  fd87cae7d2e8cfdbfe401ce78e684593  gcc/diagnostics/diagnostics-selftests.cc
  1ca1218e8ad79ba30925b61d63e7c5b0  gcc/diagnostics/diagnostics-selftests.h
  b1a342ed1575b6a45df5f31d699e73c8  gcc/diagnostics/diagram.h
  f2f7f2e44f68617193d688191fd08395  gcc/diagnostics/digraphs.cc
  2b7bbaecee26ffad2cf1ec52058566bf  gcc/diagnostics/digraphs.h
+ 460bd98eea9e2859684238f3fcfd28c7  gcc/diagnostics/dumping.cc
+ d60716b4d04276f95205c6f8d2140f90  gcc/diagnostics/dumping.h
  cff4c3f5d806ef5fa9ea2a9776fcc922  gcc/diagnostics/event-id.h
! 9ba917dd5ceec0dd361cd811174136d3  gcc/diagnostics/file-cache.cc
  4e3d1fe87ad0979f552310facbc2e534  gcc/diagnostics/file-cache.h
! 182ab4fc86062daf3c379fb001a34a90  gcc/diagnostics/html-sink.cc
! 4b8362b8dc9d0407e250775c344c387a  gcc/diagnostics/html-sink.h
  e5801529f87f5812381a450d52efaebf  gcc/diagnostics/kinds.def
  0e7b7ba2494e5650473c71225e47feb5  gcc/diagnostics/kinds.h
! 9c9f1df85c4ab3a3e0b7d60a87966af2  gcc/diagnostics/lazy-paths.cc
  4ed6c990f3102512e3c60c6c5069dd21  gcc/diagnostics/lazy-paths.h
  c131a194acbb9d5e4682e19f1a759181  gcc/diagnostics/logical-locations.h
  ed9e23a6a190e966a47730d652613dd2  gcc/diagnostics/macro-unwinding.cc
  1a1b13e68ed47b8eb0342caa0caee17b  gcc/diagnostics/macro-unwinding.h
! f6d38b3a59fedd8d4664f2f9da2dc780  gcc/diagnostics/metadata.h
  625181add33d5bfe0e9fbec59bff16f5  gcc/diagnostics/option-classifier.cc
  3df9c58d5592c4781758cda2f751adb8  gcc/diagnostics/option-classifier.h
+ aa4ae9b850b3b556ebb4ac4ba4849e4b  gcc/diagnostics/option-id-manager.h
  ee46d9f24ee418300e1cb8af08ce0e7c  gcc/diagnostics/option-id.h
  f5d7b6b5a0da4617c6298991d76432f3  gcc/diagnostics/output-file.h
! adef9465fe18b51dd626b1340c794cb2  gcc/diagnostics/output-spec.cc
  3eec925c74669a3ab2099a0428b64b64  gcc/diagnostics/output-spec.h
  cefbba8b03685fbfd838e1f457bb843a  gcc/diagnostics/paths-output.cc
  e60ad2d99ee160a6acce95a85c4f5884  gcc/diagnostics/paths.cc
  ab20f8a7e64efd9ea6670e6447014d6f  gcc/diagnostics/paths.h
! 29d9044181100c95cc1ad444668db93b  gcc/diagnostics/sarif-sink.cc
! 2e5b6abdac74dd6e43e3985e6a54b648  gcc/diagnostics/sarif-sink.h
  ee068b3f8fd2d449eee5a70ef6dad518  gcc/diagnostics/selftest-context.cc
  0c9931582348dcf2e668dad28878e073  gcc/diagnostics/selftest-context.h
  380b1d9e0cb480756d7490c2ff04e99b  gcc/diagnostics/selftest-logical-locations.cc
*************** ee068b3f8fd2d449eee5a70ef6dad518  gcc/di
*** 5924,5937 ****
  112984df670b9db84c11f891b9d5b94b  gcc/diagnostics/selftest-paths.cc
  24e9e37ce7832be5c6807735b79cb487  gcc/diagnostics/selftest-paths.h
  7cdb74e1f66d5f344d0902bc7ca9c28d  gcc/diagnostics/selftest-source-printing.h
! 23b873a5a360cfeb44c280cac2b3e38f  gcc/diagnostics/sink.h
  83cfb383914a3b5f56ce7cf9222d2389  gcc/diagnostics/source-printing-effects.h
! e0f36673d93e0bff33a430aef98b4884  gcc/diagnostics/source-printing.cc
  c7ddef71ac29eb2a389042f195e3b325  gcc/diagnostics/state-graphs-to-dot.cc
  725af6438f327bd6aa23464c8fc3653a  gcc/diagnostics/state-graphs.cc
  fd0a458b50e99299115a0f8f2f59dd9d  gcc/diagnostics/state-graphs.h
! 04bb2de48a7ef980f68f889970311006  gcc/diagnostics/text-sink.cc
! e7cfa8c355bd53afc9f9504161d44986  gcc/diagnostics/text-sink.h
  b882c3ac372bd1a3c12cb702a5bdf197  gcc/diagnostics/url.h
  e2ff50cf5215e2299270f0da4d4d60d0  gcc/digraph.cc
  18e73120a6e21ceac1adce40777000cf  gcc/digraph.h
--- 5929,5943 ----
  112984df670b9db84c11f891b9d5b94b  gcc/diagnostics/selftest-paths.cc
  24e9e37ce7832be5c6807735b79cb487  gcc/diagnostics/selftest-paths.h
  7cdb74e1f66d5f344d0902bc7ca9c28d  gcc/diagnostics/selftest-source-printing.h
! 077dbad2afda8f7b579b4a8b27302000  gcc/diagnostics/sink.h
  83cfb383914a3b5f56ce7cf9222d2389  gcc/diagnostics/source-printing-effects.h
! 32405413e6ea2511c6e8bd5f66689ac2  gcc/diagnostics/source-printing-options.h
! 7ef5bdd49854458958c5c1ca32a221e8  gcc/diagnostics/source-printing.cc
  c7ddef71ac29eb2a389042f195e3b325  gcc/diagnostics/state-graphs-to-dot.cc
  725af6438f327bd6aa23464c8fc3653a  gcc/diagnostics/state-graphs.cc
  fd0a458b50e99299115a0f8f2f59dd9d  gcc/diagnostics/state-graphs.h
! e9db31a0632fe3094378dafb5242a6cd  gcc/diagnostics/text-sink.cc
! 59de35a57a51077e80939e29ebfbc93a  gcc/diagnostics/text-sink.h
  b882c3ac372bd1a3c12cb702a5bdf197  gcc/diagnostics/url.h
  e2ff50cf5215e2299270f0da4d4d60d0  gcc/digraph.cc
  18e73120a6e21ceac1adce40777000cf  gcc/digraph.h
*************** ee4c7654f733cefcb73d4fd24f3e1b82  gcc/do
*** 5973,5988 ****
  9512a9fe27682edff7dd2ed171bbb853  gcc/doc/include/gcc-common.texi
  95c90bf85d3eab67f348ee3ce0bf4050  gcc/doc/include/gpl_v3.texi
  e9b8122841fbfbbc30fee8ed6613c399  gcc/doc/include/texinfo.tex
! d4da6dc42e3ada55035994e95b2dde28  gcc/doc/install.texi
  0f98706361e63fac2c35c2c4491eaac4  gcc/doc/install.texi2html
! 6fed0d355951151b0d71f9d186fe47d5  gcc/doc/invoke.texi
  47f1f55b3595acf670eb6193a0cbd933  gcc/doc/languages.texi
  5200cc28a2ab912efe66f0944995c45b  gcc/doc/libgcc.texi
  ef4f00c423089323edef1d3cff31a4a2  gcc/doc/libgdiagnostics/Makefile
  8258127c283eb86e07e4235453e8f336  gcc/doc/libgdiagnostics/conf.py
  ad0e2d047092c8659655e677a43966ee  gcc/doc/libgdiagnostics/index.rst
  642a964912e66e816e321e71891b81ec  gcc/doc/libgdiagnostics/make.bat
! 3dbbc5e211bf46b54037d94121cfc68a  gcc/doc/libgdiagnostics/topics/compatibility.rst
  4761a880e4b1105b0fdcdc91ec2a42a9  gcc/doc/libgdiagnostics/topics/diagnostic-manager.rst
  d4f064f41d2354a7c3b85b373c9ac47d  gcc/doc/libgdiagnostics/topics/diagnostics.rst
  4bc5e362e544520246f160590ccbe6e0  gcc/doc/libgdiagnostics/topics/execution-paths.rst
--- 5979,5994 ----
  9512a9fe27682edff7dd2ed171bbb853  gcc/doc/include/gcc-common.texi
  95c90bf85d3eab67f348ee3ce0bf4050  gcc/doc/include/gpl_v3.texi
  e9b8122841fbfbbc30fee8ed6613c399  gcc/doc/include/texinfo.tex
! 4bde3e2fafe6a845c6f58e300a194dad  gcc/doc/install.texi
  0f98706361e63fac2c35c2c4491eaac4  gcc/doc/install.texi2html
! e0824525cb8f3e02853c09ff681616a2  gcc/doc/invoke.texi
  47f1f55b3595acf670eb6193a0cbd933  gcc/doc/languages.texi
  5200cc28a2ab912efe66f0944995c45b  gcc/doc/libgcc.texi
  ef4f00c423089323edef1d3cff31a4a2  gcc/doc/libgdiagnostics/Makefile
  8258127c283eb86e07e4235453e8f336  gcc/doc/libgdiagnostics/conf.py
  ad0e2d047092c8659655e677a43966ee  gcc/doc/libgdiagnostics/index.rst
  642a964912e66e816e321e71891b81ec  gcc/doc/libgdiagnostics/make.bat
! 3942e6c2efaed7566fa62e036b8f62dc  gcc/doc/libgdiagnostics/topics/compatibility.rst
  4761a880e4b1105b0fdcdc91ec2a42a9  gcc/doc/libgdiagnostics/topics/diagnostic-manager.rst
  d4f064f41d2354a7c3b85b373c9ac47d  gcc/doc/libgdiagnostics/topics/diagnostics.rst
  4bc5e362e544520246f160590ccbe6e0  gcc/doc/libgdiagnostics/topics/execution-paths.rst
*************** d1893dd33c0eff5611e2d5074c4bcdf5  gcc/do
*** 5993,5999 ****
  628d5ff1e2f48f6c201e0e1c5eeb0e2c  gcc/doc/libgdiagnostics/topics/message-buffers.rst
  0752956422ba087dd7516beb7b222566  gcc/doc/libgdiagnostics/topics/message-formatting.rst
  40685321954d4fa5d32a979167f6cb18  gcc/doc/libgdiagnostics/topics/metadata.rst
! 67d8d400035479fd942d4446374cd27e  gcc/doc/libgdiagnostics/topics/physical-locations.rst
  534ab14553cfa381509e11ccaff7c1e7  gcc/doc/libgdiagnostics/topics/retrofitting.rst
  9bc72c12625c40dd6808a39a5c45edd7  gcc/doc/libgdiagnostics/topics/sarif.rst
  88d9f17024ba6da5d5e27b7d2e7103e5  gcc/doc/libgdiagnostics/topics/text-output.rst
--- 5999,6005 ----
  628d5ff1e2f48f6c201e0e1c5eeb0e2c  gcc/doc/libgdiagnostics/topics/message-buffers.rst
  0752956422ba087dd7516beb7b222566  gcc/doc/libgdiagnostics/topics/message-formatting.rst
  40685321954d4fa5d32a979167f6cb18  gcc/doc/libgdiagnostics/topics/metadata.rst
! 4e429c858b21d4a26fc4c8da2b77a3b4  gcc/doc/libgdiagnostics/topics/physical-locations.rst
  534ab14553cfa381509e11ccaff7c1e7  gcc/doc/libgdiagnostics/topics/retrofitting.rst
  9bc72c12625c40dd6808a39a5c45edd7  gcc/doc/libgdiagnostics/topics/sarif.rst
  88d9f17024ba6da5d5e27b7d2e7103e5  gcc/doc/libgdiagnostics/topics/text-output.rst
*************** ee33d902cd60afae792843ff15ad6706  gcc/do
*** 6028,6035 ****
  bd20fd07c5ee8f444bf1d3f5e64e066a  gcc/doc/service.texi
  cdeab873fffaddbd520f6837429ae728  gcc/doc/sourcebuild.texi
  324bbfba4e1ce0b6019ce86e466edde0  gcc/doc/standards.texi
! 812463d40e342dc1e883c29b45795d92  gcc/doc/tm.texi
! f147fb274edc8e28232537655eb0aa6e  gcc/doc/tm.texi.in
  c4168f9f01adf4dd8adc647c04107142  gcc/doc/tree-ssa.texi
  5f62752970e47d350c8cbce47123d1cf  gcc/doc/trouble.texi
  7f44041407f24d2851135ae497914475  gcc/doc/ux.texi
--- 6034,6041 ----
  bd20fd07c5ee8f444bf1d3f5e64e066a  gcc/doc/service.texi
  cdeab873fffaddbd520f6837429ae728  gcc/doc/sourcebuild.texi
  324bbfba4e1ce0b6019ce86e466edde0  gcc/doc/standards.texi
! 7a897a31baa6ad53c7006ebe54974a3a  gcc/doc/tm.texi
! 071dc35ed010659e96c88597c891fa6e  gcc/doc/tm.texi.in
  c4168f9f01adf4dd8adc647c04107142  gcc/doc/tree-ssa.texi
  5f62752970e47d350c8cbce47123d1cf  gcc/doc/trouble.texi
  7f44041407f24d2851135ae497914475  gcc/doc/ux.texi
*************** c2aaa943f52a93ac601eb2571747ce3f  gcc/do
*** 6042,6049 ****
  6ae0851ed68d2cc21f533a4af7284561  gcc/double-int.cc
  36e421802c745ad35ea5d36bb0f28dce  gcc/double-int.h
  702d5294f135996079afd0c8fbff9e40  gcc/dse.cc
! af0971ba9c5420512d37fa9e39c93077  gcc/dump-context.h
! 5ccd6da562821d5e9409303de179ca23  gcc/dumpfile.cc
  8670da1568e881564969be1aa91c7260  gcc/dumpfile.h
  4adb99499107732ee645c169e7165605  gcc/dwarf2asm.cc
  e518c37d94908385da07142b92ea8cdb  gcc/dwarf2asm.h
--- 6048,6055 ----
  6ae0851ed68d2cc21f533a4af7284561  gcc/double-int.cc
  36e421802c745ad35ea5d36bb0f28dce  gcc/double-int.h
  702d5294f135996079afd0c8fbff9e40  gcc/dse.cc
! 38b794a107ce439f2c11e7f896773365  gcc/dump-context.h
! 894e6073e36c2a1d76b2fb23eda17413  gcc/dumpfile.cc
  8670da1568e881564969be1aa91c7260  gcc/dumpfile.h
  4adb99499107732ee645c169e7165605  gcc/dwarf2asm.cc
  e518c37d94908385da07142b92ea8cdb  gcc/dwarf2asm.h
*************** e67bf1a2587fc7f7361e841145ff4cfb  gcc/es
*** 6065,6076 ****
  03148e811fc71488faa55587eee9e692  gcc/except.cc
  9c6b987629f8664ff2e311b59a7b90cd  gcc/except.h
  29b821359071c4aa7e30220d5cb2d580  gcc/exec-tool.in
! 92c5c2d83c0f493838752cabc5c5cb40  gcc/explow.cc
  b5fa845ff578d70e8ceae655d6affc51  gcc/explow.h
  a4ee0bae47797ce73f05daef7a07edd4  gcc/expmed.cc
  dee0d85cc89e81b4cc185f1c3102811e  gcc/expmed.h
! 64d2bae30b15234ee9552b30b5ff753f  gcc/expr.cc
! 5480b0f834e382e22c92192d7f5a4744  gcc/expr.h
  7117d2d0dde87eaf1ab2853b5bfd62e2  gcc/ext-dce.cc
  2ecf474a8f5380e5027c5b7a745cd736  gcc/fibonacci_heap.cc
  4e78fbbdb0a8c835b984d732a6d97a7b  gcc/fibonacci_heap.h
--- 6071,6082 ----
  03148e811fc71488faa55587eee9e692  gcc/except.cc
  9c6b987629f8664ff2e311b59a7b90cd  gcc/except.h
  29b821359071c4aa7e30220d5cb2d580  gcc/exec-tool.in
! de4a03cd382601071e81e57cc6c2a7e1  gcc/explow.cc
  b5fa845ff578d70e8ceae655d6affc51  gcc/explow.h
  a4ee0bae47797ce73f05daef7a07edd4  gcc/expmed.cc
  dee0d85cc89e81b4cc185f1c3102811e  gcc/expmed.h
! e266b09e8dba3a9139dd84e825907c4c  gcc/expr.cc
! dfa85539f017784504ec3d884e09901f  gcc/expr.h
  7117d2d0dde87eaf1ab2853b5bfd62e2  gcc/ext-dce.cc
  2ecf474a8f5380e5027c5b7a745cd736  gcc/fibonacci_heap.cc
  4e78fbbdb0a8c835b984d732a6d97a7b  gcc/fibonacci_heap.h
*************** ada0afb884a142f8214291990679be13  gcc/fo
*** 6088,6094 ****
  6dd1484a5224f1070c3b6065080cb93d  gcc/fold-const.cc
  f23dec03425a07611492fa2c061cd7d2  gcc/fold-const.h
  cd4e6baf5d162fbd41160606055f8297  gcc/fold-mem-offsets.cc
! e57b959944b0fe4a3921c6a6af27708d  gcc/fortran/ChangeLog
  083c53fadafdcf3be46713838a51e36c  gcc/fortran/ChangeLog-2002
  2a4ca18d211fb2603139354fd16398ed  gcc/fortran/ChangeLog-2003
  e7462609ebd0dd7c874e0fc00e2833aa  gcc/fortran/ChangeLog-2004
--- 6094,6100 ----
  6dd1484a5224f1070c3b6065080cb93d  gcc/fold-const.cc
  f23dec03425a07611492fa2c061cd7d2  gcc/fold-const.h
  cd4e6baf5d162fbd41160606055f8297  gcc/fold-mem-offsets.cc
! e180364c55b3edfa3efab399a88085e0  gcc/fortran/ChangeLog
  083c53fadafdcf3be46713838a51e36c  gcc/fortran/ChangeLog-2002
  2a4ca18d211fb2603139354fd16398ed  gcc/fortran/ChangeLog-2003
  e7462609ebd0dd7c874e0fc00e2833aa  gcc/fortran/ChangeLog-2004
*************** aed3aedb6378a970055dff9e11eedc2d  gcc/fo
*** 6129,6135 ****
  b7e224f665bb5044ce35ed09435bd4fb  gcc/fortran/cpp.h
  a232f4d280ad08511e2718281b3d1ab6  gcc/fortran/data.cc
  d85e2f2fc3ee4721563bd47719063fb6  gcc/fortran/data.h
! 0bc81dcceecfd364e3a394dcf7d7a1ba  gcc/fortran/decl.cc
  c33e2c4c7527bec8a125dd093dc59f2a  gcc/fortran/dependency.cc
  70111b1c7592e650c281b513c3cf2f47  gcc/fortran/dependency.h
  b6cce6988f87edda182aec1b6c3cd291  gcc/fortran/dump-parse-tree.cc
--- 6135,6141 ----
  b7e224f665bb5044ce35ed09435bd4fb  gcc/fortran/cpp.h
  a232f4d280ad08511e2718281b3d1ab6  gcc/fortran/data.cc
  d85e2f2fc3ee4721563bd47719063fb6  gcc/fortran/data.h
! 05dfc44b11f4a9328f84fb49c30afb48  gcc/fortran/decl.cc
  c33e2c4c7527bec8a125dd093dc59f2a  gcc/fortran/dependency.cc
  70111b1c7592e650c281b513c3cf2f47  gcc/fortran/dependency.h
  b6cce6988f87edda182aec1b6c3cd291  gcc/fortran/dump-parse-tree.cc
*************** fd79207ab6491c890f9be301a1b291ed  gcc/fo
*** 6164,6170 ****
  3b3c13f513e2236a6456d1d3b112404c  gcc/fortran/module.cc
  055cdc9c702c67c02729328aedac6553  gcc/fortran/openmp.cc
  5b63ee69316bceb14ed8172adcfedf6b  gcc/fortran/options.cc
! f9dfcfe624705f792e9784bfbd2020f8  gcc/fortran/parse.cc
  c1b40e866a8bbe611aa65278fe2508d3  gcc/fortran/parse.h
  8282ea5f4e00d5c64da552ea2f31dcc6  gcc/fortran/primary.cc
  16389ecb7ba7112a7bf2b5e4ccc9ee97  gcc/fortran/resolve.cc
--- 6170,6176 ----
  3b3c13f513e2236a6456d1d3b112404c  gcc/fortran/module.cc
  055cdc9c702c67c02729328aedac6553  gcc/fortran/openmp.cc
  5b63ee69316bceb14ed8172adcfedf6b  gcc/fortran/options.cc
! 8568f4044671d0228c44aa078809579f  gcc/fortran/parse.cc
  c1b40e866a8bbe611aa65278fe2508d3  gcc/fortran/parse.h
  8282ea5f4e00d5c64da552ea2f31dcc6  gcc/fortran/primary.cc
  16389ecb7ba7112a7bf2b5e4ccc9ee97  gcc/fortran/resolve.cc
*************** d78cc6d6b48b8228757fb8b674f6ad9b  gcc/fo
*** 6175,6203 ****
  7fc6fb7f159830fc0d98a9cd72e5cdf9  gcc/fortran/symbol.cc
  c9238712914e77b971fde08221a31bf7  gcc/fortran/target-memory.cc
  50451f5a575ab606948f8e72d8cc4721  gcc/fortran/target-memory.h
! e42972d044bcf60dba3c72c3b0c22052  gcc/fortran/trans-array.cc
! 5af04b397926a3d3ad105d478838e328  gcc/fortran/trans-array.h
  134a72b3349d427eccb35198acc48a71  gcc/fortran/trans-common.cc
  d555f911945a83db335013815934e941  gcc/fortran/trans-const.cc
  857805820c2a6ac77d2652c610d23de8  gcc/fortran/trans-const.h
! bac97e270018608f2a077de063d9dcf2  gcc/fortran/trans-decl.cc
! 17ab9b404054fa99ebb7f1755107a56b  gcc/fortran/trans-expr.cc
  adba91b90083d70a27467a05043fec6c  gcc/fortran/trans-intrinsic.cc
  9cf7c294c06fdaea67dcd2b9ff2cf5ad  gcc/fortran/trans-io.cc
  ec953a4922656d79301eb36337b9d297  gcc/fortran/trans-openmp.cc
! 8305e049764e4f99844543dccfe7dd62  gcc/fortran/trans-stmt.cc
  9caf8a2f93e6cf5e2a567a3aa18f957c  gcc/fortran/trans-stmt.h
  23c951c4924ba8a16582a8b9e5065a87  gcc/fortran/trans-types.cc
  422959ab20fd75df3766a03597227fd2  gcc/fortran/trans-types.h
! 50e5919b17872bccb0564a8d46c33449  gcc/fortran/trans.cc
! be93d1eb71a3a1b058c8189c3dac5b4e  gcc/fortran/trans.h
  6f893e67fc7e5f247079bd418e61d1e2  gcc/fortran/trigd_fe.inc
  2ddfa7f2ac232123d67959795d85aaa6  gcc/fortran/types.def
  f574663ce227d0be2e77015c008d708b  gcc/fp-test.cc
  7d49ef8f960daad31201f864eb1933d9  gcc/function-abi.cc
  12d3c07e3c878f7237f904820da28c93  gcc/function-abi.h
  6e9698e4411a03357b6e2b60bc91c827  gcc/function-tests.cc
! dfdecc354c7e8c25aafb6cdbf17fc6c9  gcc/function.cc
  da5d04420f440a4a085dc91d92c6bfbb  gcc/function.h
  3c08c56c1de3b165b954ab5c185284c5  gcc/fwprop.cc
  261433f3124bfa2a1421c42d657e0560  gcc/gcc-ar.cc
--- 6181,6209 ----
  7fc6fb7f159830fc0d98a9cd72e5cdf9  gcc/fortran/symbol.cc
  c9238712914e77b971fde08221a31bf7  gcc/fortran/target-memory.cc
  50451f5a575ab606948f8e72d8cc4721  gcc/fortran/target-memory.h
! ef4fd0b8b9886de61174f6a5f9d54c14  gcc/fortran/trans-array.cc
! 682d93b7e921d709d88b7e5219a69d53  gcc/fortran/trans-array.h
  134a72b3349d427eccb35198acc48a71  gcc/fortran/trans-common.cc
  d555f911945a83db335013815934e941  gcc/fortran/trans-const.cc
  857805820c2a6ac77d2652c610d23de8  gcc/fortran/trans-const.h
! 922b757c0f93e1766ead4176399219a3  gcc/fortran/trans-decl.cc
! ce8403d10aa544117adb37fc027dd076  gcc/fortran/trans-expr.cc
  adba91b90083d70a27467a05043fec6c  gcc/fortran/trans-intrinsic.cc
  9cf7c294c06fdaea67dcd2b9ff2cf5ad  gcc/fortran/trans-io.cc
  ec953a4922656d79301eb36337b9d297  gcc/fortran/trans-openmp.cc
! ef3436c60285865c7e4a611b65ebca7d  gcc/fortran/trans-stmt.cc
  9caf8a2f93e6cf5e2a567a3aa18f957c  gcc/fortran/trans-stmt.h
  23c951c4924ba8a16582a8b9e5065a87  gcc/fortran/trans-types.cc
  422959ab20fd75df3766a03597227fd2  gcc/fortran/trans-types.h
! 47d7a4f95fe5f62d3f8d58763509ad3d  gcc/fortran/trans.cc
! 8dbeba5c80acef1d2d30f9a3e998a9b2  gcc/fortran/trans.h
  6f893e67fc7e5f247079bd418e61d1e2  gcc/fortran/trigd_fe.inc
  2ddfa7f2ac232123d67959795d85aaa6  gcc/fortran/types.def
  f574663ce227d0be2e77015c008d708b  gcc/fp-test.cc
  7d49ef8f960daad31201f864eb1933d9  gcc/function-abi.cc
  12d3c07e3c878f7237f904820da28c93  gcc/function-abi.h
  6e9698e4411a03357b6e2b60bc91c827  gcc/function-tests.cc
! 69a21b42c94c44d00d46067a5b8337da  gcc/function.cc
  da5d04420f440a4a085dc91d92c6bfbb  gcc/function.h
  3c08c56c1de3b165b954ab5c185284c5  gcc/fwprop.cc
  261433f3124bfa2a1421c42d657e0560  gcc/gcc-ar.cc
*************** d9439dc48b1689d02df9d1ee357d9eb7  gcc/ge
*** 6246,6252 ****
  a5a23bee543191529294d325e1de0424  gcc/genextract.cc
  695bcd280c318a44bbd0db995e59d905  gcc/genflags.cc
  6292d2f9eac0b030e4ea58e89ebd40a2  gcc/gengenrtl.cc
! f08758617a3d032ae009840210c23753  gcc/gengtype-lex.l
  8b99c04e54d5d4377c4fbf3dcab54659  gcc/gengtype-parse.cc
  fc2add74b25837de88ed3c40f4f1193d  gcc/gengtype-state.cc
  1e163a15894754209927f6da377f7eb3  gcc/gengtype.cc
--- 6252,6258 ----
  a5a23bee543191529294d325e1de0424  gcc/genextract.cc
  695bcd280c318a44bbd0db995e59d905  gcc/genflags.cc
  6292d2f9eac0b030e4ea58e89ebd40a2  gcc/gengenrtl.cc
! 505f802b42b5e0fab91876db24fed173  gcc/gengtype-lex.l
  8b99c04e54d5d4377c4fbf3dcab54659  gcc/gengtype-parse.cc
  fc2add74b25837de88ed3c40f4f1193d  gcc/gengtype-state.cc
  1e163a15894754209927f6da377f7eb3  gcc/gengtype.cc
*************** a0c225f8a1deb41873e5984a058b0f45  gcc/gi
*** 6293,6299 ****
  9d283d6d05cc10c386454e9c6a25e22a  gcc/gimple-loop-versioning.cc
  de516dc4a59882c258bf01584c25b2de  gcc/gimple-low.cc
  a507a70e7f4b0dd99e594d15a5a9a89b  gcc/gimple-low.h
! e43fafe86b4bb2bf4ce755e533b29a1b  gcc/gimple-lower-bitint.cc
  bb02db160d1eb3a985d3b5dfa8e0566c  gcc/gimple-lower-bitint.h
  0b6c89d0a615bf5016f4e84ab164a6ca  gcc/gimple-match-exports.cc
  144911a83796283e587e0c84378e118d  gcc/gimple-match-head.cc
--- 6299,6305 ----
  9d283d6d05cc10c386454e9c6a25e22a  gcc/gimple-loop-versioning.cc
  de516dc4a59882c258bf01584c25b2de  gcc/gimple-low.cc
  a507a70e7f4b0dd99e594d15a5a9a89b  gcc/gimple-low.h
! 7616263dd6d6db18b7fa76bdc532890c  gcc/gimple-lower-bitint.cc
  bb02db160d1eb3a985d3b5dfa8e0566c  gcc/gimple-lower-bitint.h
  0b6c89d0a615bf5016f4e84ab164a6ca  gcc/gimple-match-exports.cc
  144911a83796283e587e0c84378e118d  gcc/gimple-match-head.cc
*************** bb02db160d1eb3a985d3b5dfa8e0566c  gcc/gi
*** 6301,6307 ****
  471bfcfc60f0edc8a89b0152f115f7fb  gcc/gimple-predicate-analysis.cc
  642ffb039cf24eee2646936e4a143135  gcc/gimple-predicate-analysis.h
  ef8cac8c03c6284903df21f3faba7014  gcc/gimple-predict.h
! eceaf6fecb6df7f838b427bf4f70eade  gcc/gimple-pretty-print.cc
  1d0e0766111d9af10f6785e9ad0b3675  gcc/gimple-pretty-print.h
  446371913731af0105484445053116d7  gcc/gimple-range-cache.cc
  8c426458ee77fbac2c6b8f813f84b230  gcc/gimple-range-cache.h
--- 6307,6313 ----
  471bfcfc60f0edc8a89b0152f115f7fb  gcc/gimple-predicate-analysis.cc
  642ffb039cf24eee2646936e4a143135  gcc/gimple-predicate-analysis.h
  ef8cac8c03c6284903df21f3faba7014  gcc/gimple-predict.h
! 3dbb096fa4399516b9bcc02603da229d  gcc/gimple-pretty-print.cc
  1d0e0766111d9af10f6785e9ad0b3675  gcc/gimple-pretty-print.h
  446371913731af0105484445053116d7  gcc/gimple-range-cache.cc
  8c426458ee77fbac2c6b8f813f84b230  gcc/gimple-range-cache.h
*************** c46e71acb17764a720ac6a68007b7298  gcc/gi
*** 6343,6356 ****
  469e775c51a02638e22300d5645b22ce  gcc/gimple-streamer.h
  b5b13ba4f92b3ef5294cee911b571925  gcc/gimple-walk.cc
  898d5f9cd9c732cb06cb7e84ca28c99b  gcc/gimple-walk.h
! 19e41ad97511268bfc78109e4dbf8065  gcc/gimple-warn-recursion.cc
! b42b320008114fef074bfc7fdb234491  gcc/gimple.cc
! 2b31c9448b3ca4914742ffde943425c0  gcc/gimple.def
! 0d2ea6d085781aa930769ca37d5d3a08  gcc/gimple.h
  69057cf60d71bd04ced5e457138629e1  gcc/gimplify-me.cc
  84814cb09300f3db388dd0d22133ccb4  gcc/gimplify-me.h
! 026a1d7476de3f8ac1dfff54fe5d301d  gcc/gimplify.cc
! 06f2b5470f6bc6f77e9b7966e34e5785  gcc/gimplify.h
  ba3039c0ed9645080c52c0d4bc46096f  gcc/gimplify_reg_info.h
  7df17d7c2bcdff0a474d633a02195544  gcc/ginclude/float.h
  d22f0a286107015428c4b28c0d17abda  gcc/ginclude/iso646.h
--- 6349,6362 ----
  469e775c51a02638e22300d5645b22ce  gcc/gimple-streamer.h
  b5b13ba4f92b3ef5294cee911b571925  gcc/gimple-walk.cc
  898d5f9cd9c732cb06cb7e84ca28c99b  gcc/gimple-walk.h
! b5ed1ca4ba5f0f56cd7e3ec1d2a1d01f  gcc/gimple-warn-recursion.cc
! 88214ebd3ca28a6fdc7fdacd301ce526  gcc/gimple.cc
! ed9c9a9b8efbcca1621cb38f6a7f739b  gcc/gimple.def
! dfd0fd15cae5add54db799ed747559ef  gcc/gimple.h
  69057cf60d71bd04ced5e457138629e1  gcc/gimplify-me.cc
  84814cb09300f3db388dd0d22133ccb4  gcc/gimplify-me.h
! a1212b203cedafb0d909405d2e5ab550  gcc/gimplify.cc
! 08a911f7f8b65840f9b57e0e76a2061c  gcc/gimplify.h
  ba3039c0ed9645080c52c0d4bc46096f  gcc/gimplify_reg_info.h
  7df17d7c2bcdff0a474d633a02195544  gcc/ginclude/float.h
  d22f0a286107015428c4b28c0d17abda  gcc/ginclude/iso646.h
*************** b31732d7a4fe3de8e26b483ab3a44651  gcc/gr
*** 6449,6455 ****
  45dd7a89fa9dfea44c791863924d08f0  gcc/graphite.h
  5350a023d7ce0f199771e7e9e23a3afc  gcc/graphviz.cc
  274811a3ab49e53c7aa41e489035077e  gcc/graphviz.h
! c8d4eed5e54638b86c75a8e0332077bc  gcc/gsstruct.def
  4f9ffef63d4b3ae5c0c7cafc11816ac2  gcc/gsyms.h
  8585d36b3917e41144ca7ee8a6b5e065  gcc/gsyslimits.h
  053ee4a84e4593c88c088f25e153d1a5  gcc/gtm-builtins.def
--- 6455,6461 ----
  45dd7a89fa9dfea44c791863924d08f0  gcc/graphite.h
  5350a023d7ce0f199771e7e9e23a3afc  gcc/graphviz.cc
  274811a3ab49e53c7aa41e489035077e  gcc/graphviz.h
! 9a0e351c0872c227c7d49c30eace52f4  gcc/gsstruct.def
  4f9ffef63d4b3ae5c0c7cafc11816ac2  gcc/gsyms.h
  8585d36b3917e41144ca7ee8a6b5e065  gcc/gsyslimits.h
  053ee4a84e4593c88c088f25e153d1a5  gcc/gtm-builtins.def
*************** de8c4845432dd4e64d6fa53d34cb4a09  gcc/la
*** 6644,6656 ****
  82e3d15b2545a4e7a7397d6396eb74fe  gcc/lcm.cc
  bdf8ae675ae5000d854fe2874116b2f8  gcc/lcm.h
  027270d0be504f25a7efb49e1e3179bb  gcc/libfuncs.h
! 4934dab1d3161ae645ccdd3dac3052e5  gcc/libgdiagnostics++.h
! bce08e1b835bdbc920273360f191e171  gcc/libgdiagnostics-private.h
! b31bd4d16ac593d8cc91a8dee4e41f82  gcc/libgdiagnostics.cc
! ca1796ca207d8fcda43cdef3d49a39fb  gcc/libgdiagnostics.h
! 02da43cd6bde252a34ecb0feb6468592  gcc/libgdiagnostics.map
! a612b9f7ada478641e333f1730120dfc  gcc/libsarifreplay.cc
! 5e320a3249f5b8b266e2c69c6282315e  gcc/libsarifreplay.h
  5c6a6e21474ca46c652e3149d4068fe3  gcc/limitx.h
  83de5c6450456e215a5484083afcd32a  gcc/limity.h
  115df2988fa3827586282702360e4b71  gcc/lists.cc
--- 6650,6662 ----
  82e3d15b2545a4e7a7397d6396eb74fe  gcc/lcm.cc
  bdf8ae675ae5000d854fe2874116b2f8  gcc/lcm.h
  027270d0be504f25a7efb49e1e3179bb  gcc/libfuncs.h
! 4e1a358f06cfcd4fd7934618b4e0269f  gcc/libgdiagnostics++.h
! a6416f2352ff08b056cfe7e686e72530  gcc/libgdiagnostics-private.h
! 795ddae14ab30f1af0f4d2dfd154367d  gcc/libgdiagnostics.cc
! 9a7e8185546f10794b5df84097aab2d1  gcc/libgdiagnostics.h
! 5782c76c63f9b197be394bad361b8824  gcc/libgdiagnostics.map
! c9172b932523f381ffa415f3e81f4517  gcc/libsarifreplay.cc
! 929dad8dfdf9b331af635ed614b205ee  gcc/libsarifreplay.h
  5c6a6e21474ca46c652e3149d4068fe3  gcc/limitx.h
  83de5c6450456e215a5484083afcd32a  gcc/limity.h
  115df2988fa3827586282702360e4b71  gcc/lists.cc
*************** f2a9985147f87fd566d4ae2dd8fceabc  gcc/lt
*** 6688,6694 ****
  295f167dcf44ebe2d16bceae99571c42  gcc/lto-streamer-out.cc
  8caf9a68892d64dc294b20c27291b749  gcc/lto-streamer.cc
  89440b8d71857e40c8fa12dd9aa25491  gcc/lto-streamer.h
! b5a651e1f0e9206664f446c212ff89c9  gcc/lto-wrapper.cc
  480bc7be0cd5b12023154916672aeb69  gcc/lto/ChangeLog
  e33b56ae6d73ecb6b658dd2ffff4202a  gcc/lto/Make-lang.in
  705d8eaa74b456d79367c2c42b7a2fef  gcc/lto/common.cc
--- 6694,6700 ----
  295f167dcf44ebe2d16bceae99571c42  gcc/lto-streamer-out.cc
  8caf9a68892d64dc294b20c27291b749  gcc/lto-streamer.cc
  89440b8d71857e40c8fa12dd9aa25491  gcc/lto-streamer.h
! 4b39d90bb231d099b0fc04c8ded93cee  gcc/lto-wrapper.cc
  480bc7be0cd5b12023154916672aeb69  gcc/lto/ChangeLog
  e33b56ae6d73ecb6b658dd2ffff4202a  gcc/lto/Make-lang.in
  705d8eaa74b456d79367c2c42b7a2fef  gcc/lto/common.cc
*************** f9608e9005487c369e6c38949ab36fa1  gcc/m2
*** 7669,7675 ****
  88e10618d6f39a411b34e2245b93307b  gcc/machmode.def
  550bdb35d0e034ca0050c574ba896d61  gcc/machmode.h
  486412acbbb6de10b080e31410a14f33  gcc/main.cc
! f43e23f6302bb12bddd31553a5382176  gcc/match.pd
  63bf182c7c3a100e101b2129976be89b  gcc/mcf.cc
  795fbbc034a60f5af7e79dbe3bac65a0  gcc/mem-stats-traits.h
  295dcd7618653c13dcf063266752d06f  gcc/mem-stats.h
--- 7675,7681 ----
  88e10618d6f39a411b34e2245b93307b  gcc/machmode.def
  550bdb35d0e034ca0050c574ba896d61  gcc/machmode.h
  486412acbbb6de10b080e31410a14f33  gcc/main.cc
! 7c43be31f41dec5b7470279f72e060fa  gcc/match.pd
  63bf182c7c3a100e101b2129976be89b  gcc/mcf.cc
  795fbbc034a60f5af7e79dbe3bac65a0  gcc/mem-stats-traits.h
  295dcd7618653c13dcf063266752d06f  gcc/mem-stats.h
*************** f441ac6601a5a1f6ba5ca39bef20c13a  gcc/om
*** 7715,7721 ****
  286190bcce78c62804516df6cd0d1684  gcc/omp-expand.h
  9bd34ac7da102efa7529b0da01a4627e  gcc/omp-general.cc
  cb2a8c86939322e491658cba12c21c2f  gcc/omp-general.h
! 1324f8a540660f2cbdb237493c886d56  gcc/omp-low.cc
  73fb62acbdd74e28aff8cc147ee7fa11  gcc/omp-low.h
  bf774332919d8fc6ad76372ccefd0aa2  gcc/omp-oacc-kernels-decompose.cc
  51e7c46004876244d3f23ab786112c1a  gcc/omp-oacc-neuter-broadcast.cc
--- 7721,7727 ----
  286190bcce78c62804516df6cd0d1684  gcc/omp-expand.h
  9bd34ac7da102efa7529b0da01a4627e  gcc/omp-general.cc
  cb2a8c86939322e491658cba12c21c2f  gcc/omp-general.h
! 035f2acf7b5aa60b9db0b1a5f8993a9d  gcc/omp-low.cc
  73fb62acbdd74e28aff8cc147ee7fa11  gcc/omp-low.h
  bf774332919d8fc6ad76372ccefd0aa2  gcc/omp-oacc-kernels-decompose.cc
  51e7c46004876244d3f23ab786112c1a  gcc/omp-oacc-neuter-broadcast.cc
*************** c82a0618eb76ff551736f55281d0c66c  gcc/om
*** 7727,7733 ****
  f0f50bc7c73f3271a51064cf4a007466  gcc/opt-functions.awk
  613f0b49d06b4fd00699b149b1da03a0  gcc/opt-gather.awk
  e66af2a40499b3c7a18910f9d607615e  gcc/opt-include.awk
! 725e32c9ceb14432837b7feaf9e22a30  gcc/opt-problem.cc
  e6dc0a9a9ae7f37bbd800ebc53cbbfb8  gcc/opt-problem.h
  18be0bf1ec0a8a8a04e10a1689eb2e9f  gcc/opt-read.awk
  b8f8b627140b8daf237cdd93d7acd698  gcc/opt-suggestions.cc
--- 7733,7739 ----
  f0f50bc7c73f3271a51064cf4a007466  gcc/opt-functions.awk
  613f0b49d06b4fd00699b149b1da03a0  gcc/opt-gather.awk
  e66af2a40499b3c7a18910f9d607615e  gcc/opt-include.awk
! ac15bbb6547258fc3166aa3f3edeb3b7  gcc/opt-problem.cc
  e6dc0a9a9ae7f37bbd800ebc53cbbfb8  gcc/opt-problem.h
  18be0bf1ec0a8a8a04e10a1689eb2e9f  gcc/opt-read.awk
  b8f8b627140b8daf237cdd93d7acd698  gcc/opt-suggestions.cc
*************** fe27687b66727b0800e152caad7a6829  gcc/op
*** 7744,7764 ****
  4b8341a8e70bcb44afdbe2e4be1dcc46  gcc/optc-gen.awk
  5c54b7f4a00895eb1ecfb4f8c209dcef  gcc/optc-save-gen.awk
  7e73ab7724d88cc330124e05331fe3e2  gcc/opth-gen.awk
! 735656dff2a0bd83f378c9e8756e0d1a  gcc/optinfo-emit-json.cc
  fcb5b7227342c442bcddbcc06eaddcdc  gcc/optinfo-emit-json.h
! 040a2f6d1fb908c9fb9879dca90e4516  gcc/optinfo.cc
! 58f02a8817c05c6681ba150251b166e8  gcc/optinfo.h
  1c30e8950551cbe97bda991d288b7bb7  gcc/options-urls-cc-gen.awk
! cbc8e9dfe7d33c6f0f99c2440bab2595  gcc/opts-common.cc
  5ccf682ebfbb9afdfc7f972ea6ef51fe  gcc/opts-diagnostic.cc
! 4b4c361908a7ba89bc981ee699a6e9fd  gcc/opts-diagnostic.h
  dd6379e65503d93b6eb08844e8bf2d09  gcc/opts-global.cc
  079a115ae417106f3e7f42b0272b866d  gcc/opts-jobserver.h
! 4c597f95761d061e08a4a92c6a2b990c  gcc/opts.cc
  e77c0b4ff21959cc040b49d1945bbc5b  gcc/opts.h
  b7a4b3edfca283f972cdeb23102a28a4  gcc/ordered-hash-map-tests.cc
  fccd951e3de91d49d3824e482c12e070  gcc/ordered-hash-map.h
! aef59ff5cf90779e48804da6687df739  gcc/output.h
  c9e6163e1eaa8f82c57f03f76e86da75  gcc/pair-fusion.cc
  b2f692287d25760afcef126c010f7078  gcc/pair-fusion.h
  7755f94f41ee95ae76c88651559ebc6e  gcc/params.opt
--- 7750,7770 ----
  4b8341a8e70bcb44afdbe2e4be1dcc46  gcc/optc-gen.awk
  5c54b7f4a00895eb1ecfb4f8c209dcef  gcc/optc-save-gen.awk
  7e73ab7724d88cc330124e05331fe3e2  gcc/opth-gen.awk
! de97b1f0f9c6c4938b81a0d4ef458cbe  gcc/optinfo-emit-json.cc
  fcb5b7227342c442bcddbcc06eaddcdc  gcc/optinfo-emit-json.h
! 79cdb91fae5008327a4a19e7f49fb42e  gcc/optinfo.cc
! bdacbcb932eb0c2db8707e3727f574dd  gcc/optinfo.h
  1c30e8950551cbe97bda991d288b7bb7  gcc/options-urls-cc-gen.awk
! 09395c50b5992609f34cd388cc3257c0  gcc/opts-common.cc
  5ccf682ebfbb9afdfc7f972ea6ef51fe  gcc/opts-diagnostic.cc
! 6d624f6fea144bbb8e71378935b84abd  gcc/opts-diagnostic.h
  dd6379e65503d93b6eb08844e8bf2d09  gcc/opts-global.cc
  079a115ae417106f3e7f42b0272b866d  gcc/opts-jobserver.h
! 0031e50e90748fb1caabd856c36c9250  gcc/opts.cc
  e77c0b4ff21959cc040b49d1945bbc5b  gcc/opts.h
  b7a4b3edfca283f972cdeb23102a28a4  gcc/ordered-hash-map-tests.cc
  fccd951e3de91d49d3824e482c12e070  gcc/ordered-hash-map.h
! 673ce61076fa80e959fe72ae50291616  gcc/output.h
  c9e6163e1eaa8f82c57f03f76e86da75  gcc/pair-fusion.cc
  b2f692287d25760afcef126c010f7078  gcc/pair-fusion.h
  7755f94f41ee95ae76c88651559ebc6e  gcc/params.opt
*************** a4c4b609df2262702bd9691ce3ef1b39  gcc/pr
*** 7810,7816 ****
  8b012f60c9f103ffb724c1b1d376f543  gcc/pretty-print-format-impl.h
  632683d988f73b65e11e73cc27d8fa3b  gcc/pretty-print-markup.h
  445beb21a2f28b79808b2eebd0fe4856  gcc/pretty-print-urlifier.h
! dac7c1e2da55e7c5dae0c389e16a8247  gcc/pretty-print.cc
  a7b954c4a7bcd0141c6405a59ac196b7  gcc/pretty-print.h
  3612c0ba4344ce8d21ab5bab244d397b  gcc/prime-paths.cc
  a6e4e4fab174379976dcb09269c8de98  gcc/print-rtl-function.cc
--- 7816,7822 ----
  8b012f60c9f103ffb724c1b1d376f543  gcc/pretty-print-format-impl.h
  632683d988f73b65e11e73cc27d8fa3b  gcc/pretty-print-markup.h
  445beb21a2f28b79808b2eebd0fe4856  gcc/pretty-print-urlifier.h
! 58eef20b24ac0cfae49e2ec154e10668  gcc/pretty-print.cc
  a7b954c4a7bcd0141c6405a59ac196b7  gcc/pretty-print.h
  3612c0ba4344ce8d21ab5bab244d397b  gcc/prime-paths.cc
  a6e4e4fab174379976dcb09269c8de98  gcc/print-rtl-function.cc
*************** c08edc659010d9072c249418c1be7fe6  gcc/rt
*** 7900,7989 ****
  ecb31a48caf7998f695601ec7350bdc0  gcc/run-rtl-passes.cc
  c4bc204b62fdb61848c09abf05a60a9d  gcc/run-rtl-passes.h
  add9bd82fcec23469a4d0f7df03d9589  gcc/rust/CONTRIBUTING.md
! 66777b962f75627837d020247260b560  gcc/rust/ChangeLog
! c2a8648800b13beaa7b2efef8e94ea6f  gcc/rust/Make-lang.in
  f3527e161e6e2827d299c1a928ebe1c6  gcc/rust/README.md
! 1bde08bec2946c34ff76bc8cdc25d05c  gcc/rust/ast/rust-ast-builder-type.cc
! 94509d0cc6a70ebadc202f4b2e33ce75  gcc/rust/ast/rust-ast-builder-type.h
! 8d09fe09bee63f4b435cf560a27a1d3b  gcc/rust/ast/rust-ast-builder.cc
! 1dfe41df8bd8578fa0259cc94a95f503  gcc/rust/ast/rust-ast-builder.h
! 2307bb8f482bab97979f7ff719af39b9  gcc/rust/ast/rust-ast-collector.cc
! 1ee17bdb056ae39a5d739cf6499a71f0  gcc/rust/ast/rust-ast-collector.h
  494672e10e3cd2a3c29f72147b6e42e8  gcc/rust/ast/rust-ast-dump.cc
! 5d47bbb94f2cf0f16b83fb4054240465  gcc/rust/ast/rust-ast-dump.h
  4b956fa2250010f85282d2ea3339d66f  gcc/rust/ast/rust-ast-formatting.cc
! 78c6042c3319b6662dbb8f1b92501826  gcc/rust/ast/rust-ast-formatting.h
  1520397870a21ed323db6c2e5d64107e  gcc/rust/ast/rust-ast-fragment.cc
  f419aa5c0c96c075ac096b7fc99ba81a  gcc/rust/ast/rust-ast-fragment.h
! 9963bb21ebe47acb03bb14b68f901ab2  gcc/rust/ast/rust-ast-full-decls.h
  629186b05e52e76e5b8194df9669607d  gcc/rust/ast/rust-ast-full.h
! 08b08d9d3f95fc194dd15688ad9a801d  gcc/rust/ast/rust-ast-visitor.cc
! 1e9ab7a51386fea8595962672822bf26  gcc/rust/ast/rust-ast-visitor.h
! d115152b8cd911f3b1f3fe4e59c0638c  gcc/rust/ast/rust-ast.cc
! e9cd0896d85ea521082dea57768f075a  gcc/rust/ast/rust-ast.h
! b23481ae65d252dc744d6dcf8f792b22  gcc/rust/ast/rust-builtin-ast-nodes.h
! c61139312203210cd2cc8b77a5b9c3e0  gcc/rust/ast/rust-collect-lang-items.cc
! 3a21424b4375cc9f88cc9e3c4f57f551  gcc/rust/ast/rust-collect-lang-items.h
! 5da8bf90d2270ced3c1e9508cf375444  gcc/rust/ast/rust-cond-compilation.h
! 79730a68327bd58994e60f6788e3c04c  gcc/rust/ast/rust-desugar-for-loops.cc
! 35656b2b58f4df7b37f64084a2d9d51a  gcc/rust/ast/rust-desugar-for-loops.h
! 4c0f95ff296a9ea9fd96a32301c5d461  gcc/rust/ast/rust-desugar-question-mark.cc
! 7b084a88cc7ef4a737a87d80ddc81728  gcc/rust/ast/rust-desugar-question-mark.h
! 24af3eb43af313147fc10cf00e8247f8  gcc/rust/ast/rust-expr.h
  8431184a8fe616547ba53c4bec69e873  gcc/rust/ast/rust-fmt.cc
! 409a1f7884761d17ab0e43134c206cca  gcc/rust/ast/rust-fmt.h
! b58ddbd1c6babd9c1ab4b4299e7d3f10  gcc/rust/ast/rust-item.h
! a0add5d46488d90a642dd121d6a5676b  gcc/rust/ast/rust-macro.cc
! 91a744d824011f311337b006ddc9379e  gcc/rust/ast/rust-macro.h
! 3291e0d425ce54ddc8beb09d6ae45831  gcc/rust/ast/rust-path.cc
! 345b0a238c1329d8b7267acb0ae3757d  gcc/rust/ast/rust-path.h
! 50ca776a43c52ab30ed3242021cc6720  gcc/rust/ast/rust-pattern.cc
! c5bb52b763e5556a23de4e286b591d3e  gcc/rust/ast/rust-pattern.h
  ed6c0cb758442b73c02cd2e9b2d457e0  gcc/rust/ast/rust-stmt.h
! a0ff0595e9fa7931ff898d70fb0029a9  gcc/rust/ast/rust-type.h
  39774c8ec83393047e843c9b8dff6822  gcc/rust/backend/rust-builtins.cc
  064ce3571a08f20977f4980b508ce086  gcc/rust/backend/rust-builtins.h
! c9183d8c73a3a1a64479849189ded0fe  gcc/rust/backend/rust-compile-asm.cc
  cfc6dfa694ca09488dbc704e558daa0d  gcc/rust/backend/rust-compile-asm.h
! 7f0d9137cb532f69614fe4f7f6d7b0ea  gcc/rust/backend/rust-compile-base.cc
! 5674eb1368c65d73a832194252ee92b7  gcc/rust/backend/rust-compile-base.h
! 0f15d9ff8da83339f9271db2192d960c  gcc/rust/backend/rust-compile-block.cc
! 54086118ac4c4f49bcf58a103724ee54  gcc/rust/backend/rust-compile-block.h
! a25938c81b60a7f8f6e33bf3c686761f  gcc/rust/backend/rust-compile-context.cc
! edbc1aef169c9cd16810b1ed3d347834  gcc/rust/backend/rust-compile-context.h
! 4495fc680456039cdd5d7fca9b1231a4  gcc/rust/backend/rust-compile-expr.cc
! 0bd938958aca5991a02032eba9bdcd26  gcc/rust/backend/rust-compile-expr.h
  bdd9c27c46d5b67cee4389fee210f33a  gcc/rust/backend/rust-compile-extern.h
  96023f10d704a5f5aa3aa2126eac4219  gcc/rust/backend/rust-compile-fnparam.cc
  e525943b8d7380cbc76915f9e460adab  gcc/rust/backend/rust-compile-fnparam.h
! 5e852dd899fb991ce93414871ae4df97  gcc/rust/backend/rust-compile-implitem.cc
  ee0054c15512a93ccc6bec6718c95863  gcc/rust/backend/rust-compile-implitem.h
! 8962f46679e95178ebe078779850335e  gcc/rust/backend/rust-compile-intrinsic.cc
  a1fb8689400958af8126ae9c477c873e  gcc/rust/backend/rust-compile-intrinsic.h
! a74b4c7722d676c2b3834c8b7bfbd5bb  gcc/rust/backend/rust-compile-item.cc
! a07b7b58496fec94267e6e16d5511ad7  gcc/rust/backend/rust-compile-item.h
! d145db1014d8176792934905959520a6  gcc/rust/backend/rust-compile-pattern.cc
! cbf73d710f41db2e4ab45ff69859e3b1  gcc/rust/backend/rust-compile-pattern.h
  cd711182d62e81ac9cb36e89d0ab5062  gcc/rust/backend/rust-compile-proc-macro.cc
! 4ac6dde4db7921d9e22e10c954c62588  gcc/rust/backend/rust-compile-resolve-path.cc
  a02df3439a425a492f39168431dbf58b  gcc/rust/backend/rust-compile-resolve-path.h
! db14e90dc56947a84d499e117133e786  gcc/rust/backend/rust-compile-stmt.cc
  8d042d63efac54929399df3c7b8741f9  gcc/rust/backend/rust-compile-stmt.h
  943e800783a5c6e0e934066fe1478b65  gcc/rust/backend/rust-compile-struct-field-expr.cc
  3b61313140b254e7402b2ab5ed53d760  gcc/rust/backend/rust-compile-struct-field-expr.h
! 9bc65a6328d3195fb4601dcbef8c79af  gcc/rust/backend/rust-compile-type.cc
! de64579bb929a578863d6e12c24bf03b  gcc/rust/backend/rust-compile-type.h
! 341ef22504ebd5da76cd4d4e31e4d071  gcc/rust/backend/rust-compile-var-decl.h
  bd5a2dcc98c2d6d545a18d5dc44734f1  gcc/rust/backend/rust-compile.cc
  0de4696fca9f7f20e245ed49dbd8bed7  gcc/rust/backend/rust-compile.h
! 9b0dd451553fca932db862dafd6865ee  gcc/rust/backend/rust-constexpr.cc
! 3778b6c3ad2a1fad766013bb9e1d8ea3  gcc/rust/backend/rust-constexpr.h
  bef8332d7c99228e46b17e35e62ab385  gcc/rust/backend/rust-mangle-legacy.cc
! fd3249cd86e1c67112cdeed5a5067b18  gcc/rust/backend/rust-mangle-v0.cc
  21b6254246aa6d0468462df2e633b78b  gcc/rust/backend/rust-mangle.cc
! 512554d11e53c000f4acc53f4b5c960a  gcc/rust/backend/rust-mangle.h
! c21238b47104a4ecee47baf9192cdb4d  gcc/rust/backend/rust-tree.cc
! 2df16cbe6a4b532bc5bb1888b908578d  gcc/rust/backend/rust-tree.h
  675e019161664f914b95bbc7799e517c  gcc/rust/checks/errors/borrowck/bir-design-notes.md
  eee383c6d924f06fa96c8f58f21fc6af  gcc/rust/checks/errors/borrowck/dev-notes.md
  280db2cd4a7844c95895b2a0a282b858  gcc/rust/checks/errors/borrowck/ffi-polonius/Cargo.lock
--- 7906,8000 ----
  ecb31a48caf7998f695601ec7350bdc0  gcc/run-rtl-passes.cc
  c4bc204b62fdb61848c09abf05a60a9d  gcc/run-rtl-passes.h
  add9bd82fcec23469a4d0f7df03d9589  gcc/rust/CONTRIBUTING.md
! bebc744c355a021715bb48758eee5455  gcc/rust/ChangeLog
! 02ba89c4ee11e8c39d7b0d815e7d8ab9  gcc/rust/Make-lang.in
  f3527e161e6e2827d299c1a928ebe1c6  gcc/rust/README.md
! 6dd49c79cdf3440e03fd178e413b6fb8  gcc/rust/ast/rust-ast-builder.cc
! 3714514495ced2204392eef66c900c13  gcc/rust/ast/rust-ast-builder.h
! c46e463062d522330bab1d75fb8ec726  gcc/rust/ast/rust-ast-collector.cc
! 4ab6dac0cf511cddc30cafb435f87896  gcc/rust/ast/rust-ast-collector.h
  494672e10e3cd2a3c29f72147b6e42e8  gcc/rust/ast/rust-ast-dump.cc
! e21cd4002e965dd8e32f6afb373d6ead  gcc/rust/ast/rust-ast-dump.h
  4b956fa2250010f85282d2ea3339d66f  gcc/rust/ast/rust-ast-formatting.cc
! b7a6c36df2259a9397bfe9376d14915c  gcc/rust/ast/rust-ast-formatting.h
  1520397870a21ed323db6c2e5d64107e  gcc/rust/ast/rust-ast-fragment.cc
  f419aa5c0c96c075ac096b7fc99ba81a  gcc/rust/ast/rust-ast-fragment.h
! cc7a07d0d92e6a12688528dcfbfc6511  gcc/rust/ast/rust-ast-full-decls.h
  629186b05e52e76e5b8194df9669607d  gcc/rust/ast/rust-ast-full.h
! 6ad0a6bdd47abe0267ee7e73f6f63e19  gcc/rust/ast/rust-ast-visitor.cc
! 5d8eb4bd1c324efc64e5c004d70ec172  gcc/rust/ast/rust-ast-visitor.h
! 1b87dabc22715aa5b7d2d9cf7d7d662b  gcc/rust/ast/rust-ast.cc
! 75df25fe036e3e684c533cf82f530efb  gcc/rust/ast/rust-ast.h
! 3b6b8b59b34d5d60d0c046849c558b0d  gcc/rust/ast/rust-builtin-ast-nodes.h
! 1373253305e2b8a61c239759a676b523  gcc/rust/ast/rust-collect-lang-items.cc
! d526cc472464ac531167ac67e9139d7e  gcc/rust/ast/rust-collect-lang-items.h
! 95b468bc6271487302f9ad083cd8e191  gcc/rust/ast/rust-cond-compilation.h
! 6b78d507d548189212b807fdb988df88  gcc/rust/ast/rust-desugar-apit.cc
! fdb5fa620d782dcd2f969d2037c87a9c  gcc/rust/ast/rust-desugar-apit.h
! 6b822f8ae7c6287c708f10f60c2d7814  gcc/rust/ast/rust-desugar-for-loops.cc
! 483d32cf56cee90ffee11f256666d42e  gcc/rust/ast/rust-desugar-for-loops.h
! 284cff78e8d3fe7d06886f825f449d4c  gcc/rust/ast/rust-desugar-question-mark.cc
! f7fb24547286c1046273fae16bc3b40c  gcc/rust/ast/rust-desugar-question-mark.h
! ce782a41f25cb7bab408fb56d3691217  gcc/rust/ast/rust-desugar-try-block.cc
! 7f083f8b90958b45346c1ede8236b34b  gcc/rust/ast/rust-desugar-try-block.h
! e6d36246282c627ce4935b5006882cde  gcc/rust/ast/rust-desugar-while-let.cc
! 8962928afafa7cdb402e49863510fee6  gcc/rust/ast/rust-desugar-while-let.h
! 6f510b3675ab7c56f4c5878e63d181a5  gcc/rust/ast/rust-expr.h
! 485ff71543c8db0d90612be264d91cff  gcc/rust/ast/rust-expression-yeast.cc
! 7436289b8a48b84ec5d75c138cab6f3d  gcc/rust/ast/rust-expression-yeast.h
  8431184a8fe616547ba53c4bec69e873  gcc/rust/ast/rust-fmt.cc
! 223a56a9cf64e5cd5cecd9735dfc92a8  gcc/rust/ast/rust-fmt.h
! 133eafd80f42be86d15e705ead7d2c0c  gcc/rust/ast/rust-item.h
! d422ca6fdef486f353c824585452e285  gcc/rust/ast/rust-macro.h
! 2711fdcec6da8db426e0ea2e044495eb  gcc/rust/ast/rust-path.cc
! 4a222d00e99ecb0e326bcc4d210edfdc  gcc/rust/ast/rust-path.h
! 4f49a09546ffc2166449496e2fd3958d  gcc/rust/ast/rust-pattern.cc
! 130a56d2d2f22b1b01328a951f989095  gcc/rust/ast/rust-pattern.h
  ed6c0cb758442b73c02cd2e9b2d457e0  gcc/rust/ast/rust-stmt.h
! d18348e9a6d3fc5f6aaee83e7614aa1c  gcc/rust/ast/rust-type.h
  39774c8ec83393047e843c9b8dff6822  gcc/rust/backend/rust-builtins.cc
  064ce3571a08f20977f4980b508ce086  gcc/rust/backend/rust-builtins.h
! f2be38c1f6b741ba160f5ddb9b550a10  gcc/rust/backend/rust-compile-asm.cc
  cfc6dfa694ca09488dbc704e558daa0d  gcc/rust/backend/rust-compile-asm.h
! cdb09ea37a7b683604774e233f5f9047  gcc/rust/backend/rust-compile-base.cc
! 1611735a729c8d6134121714be392d07  gcc/rust/backend/rust-compile-base.h
! 2d5e409c84aba45bd3a18bd49fc296ef  gcc/rust/backend/rust-compile-block.cc
! d0a4f7913bccafe98174b5e4b5cebfa6  gcc/rust/backend/rust-compile-block.h
! 8d754665d1c624cb4d92e1417e4b1235  gcc/rust/backend/rust-compile-context.cc
! 7faf26e77f48f6a4c342c27b2d884eeb  gcc/rust/backend/rust-compile-context.h
! c4eefe7770375970d7997afdd2a0c737  gcc/rust/backend/rust-compile-expr.cc
! 5fa9d206f637b2f442ddd04db0d88346  gcc/rust/backend/rust-compile-expr.h
  bdd9c27c46d5b67cee4389fee210f33a  gcc/rust/backend/rust-compile-extern.h
  96023f10d704a5f5aa3aa2126eac4219  gcc/rust/backend/rust-compile-fnparam.cc
  e525943b8d7380cbc76915f9e460adab  gcc/rust/backend/rust-compile-fnparam.h
! 1bb9958624b1c18507129a60e9be23e5  gcc/rust/backend/rust-compile-implitem.cc
  ee0054c15512a93ccc6bec6718c95863  gcc/rust/backend/rust-compile-implitem.h
! 89a46194ac8b4c2f2f2eb7c998a7fbf8  gcc/rust/backend/rust-compile-intrinsic.cc
  a1fb8689400958af8126ae9c477c873e  gcc/rust/backend/rust-compile-intrinsic.h
! baa1a06481456fc6c8d5809aa7185fc7  gcc/rust/backend/rust-compile-item.cc
! 3ce37ad182e3bedbc0013ae3dcb6b0ed  gcc/rust/backend/rust-compile-item.h
! 45d1c706d5310e0c6bb1658ed5981409  gcc/rust/backend/rust-compile-pattern.cc
! cd4b0541904d2e28f01b23b2a117508e  gcc/rust/backend/rust-compile-pattern.h
  cd711182d62e81ac9cb36e89d0ab5062  gcc/rust/backend/rust-compile-proc-macro.cc
! 4a0f5bc07f53f93525bed74c33141f73  gcc/rust/backend/rust-compile-resolve-path.cc
  a02df3439a425a492f39168431dbf58b  gcc/rust/backend/rust-compile-resolve-path.h
! 1146a28a080b99e199ba9103e1629866  gcc/rust/backend/rust-compile-stmt.cc
  8d042d63efac54929399df3c7b8741f9  gcc/rust/backend/rust-compile-stmt.h
  943e800783a5c6e0e934066fe1478b65  gcc/rust/backend/rust-compile-struct-field-expr.cc
  3b61313140b254e7402b2ab5ed53d760  gcc/rust/backend/rust-compile-struct-field-expr.h
! 4c7460409dbe5316108e5df693942b98  gcc/rust/backend/rust-compile-type.cc
! b509fbe19ec81374f434934bf7f1db59  gcc/rust/backend/rust-compile-type.h
! 4d8be376e4c5ea806bd47639bb857efd  gcc/rust/backend/rust-compile-var-decl.h
  bd5a2dcc98c2d6d545a18d5dc44734f1  gcc/rust/backend/rust-compile.cc
  0de4696fca9f7f20e245ed49dbd8bed7  gcc/rust/backend/rust-compile.h
! a2a3196d3c79aeb5c9cc5214db45a039  gcc/rust/backend/rust-constexpr.cc
! 8b7d1489d3387b799f0272f52df62581  gcc/rust/backend/rust-constexpr.h
  bef8332d7c99228e46b17e35e62ab385  gcc/rust/backend/rust-mangle-legacy.cc
! ded63052cb7097de9c2443746c403f00  gcc/rust/backend/rust-mangle-v0.cc
  21b6254246aa6d0468462df2e633b78b  gcc/rust/backend/rust-mangle.cc
! dcbba0779b1eca1b210c23b8ef3dcc5d  gcc/rust/backend/rust-mangle.h
! 6df730b8f6538c702c0a91c9981a8adf  gcc/rust/backend/rust-tree.cc
! 578359539443d855402690166a1ff889  gcc/rust/backend/rust-tree.h
  675e019161664f914b95bbc7799e517c  gcc/rust/checks/errors/borrowck/bir-design-notes.md
  eee383c6d924f06fa96c8f58f21fc6af  gcc/rust/checks/errors/borrowck/dev-notes.md
  280db2cd4a7844c95895b2a0a282b858  gcc/rust/checks/errors/borrowck/ffi-polonius/Cargo.lock
*************** b377b220f43d747efdec40d69fcaa69d  gcc/ru
*** 8042,8191 ****
  bca09e7439e4187f0ea4c60c867580fc  gcc/rust/checks/errors/borrowck/ffi-polonius/vendor/rustc-hash/src/lib.rs
  63a3c0a3552e5013aac45fb236f9ff6c  gcc/rust/checks/errors/borrowck/polonius/rust-polonius-ffi.h
  ad886f79708dd374dbc6a3e224533e14  gcc/rust/checks/errors/borrowck/polonius/rust-polonius.cc
! eeb84944060c4a1dcb454cd0b5f95123  gcc/rust/checks/errors/borrowck/polonius/rust-polonius.h
! 5e11f30ce36849f4a1a614eaa51f410c  gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
! 694aa90e6245655daa5db2c51ebb82a3  gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.h
! 24551879cd8a2bc4dd3dac9cf0291ddf  gcc/rust/checks/errors/borrowck/rust-bir-builder-internal.h
! 1110afe1e631eb1255818bdd3361ca1f  gcc/rust/checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h
! aa968f61fed8bd18300146f8fb379145  gcc/rust/checks/errors/borrowck/rust-bir-builder-pattern.cc
  bbb6b401287aeefeddf82860e011dd85  gcc/rust/checks/errors/borrowck/rust-bir-builder-pattern.h
! a4929acbbb54f85defddfde3ce72f2a1  gcc/rust/checks/errors/borrowck/rust-bir-builder-struct.h
  38cef03aee9d5c550a78c56952b2791e  gcc/rust/checks/errors/borrowck/rust-bir-builder.h
! c191f60cd765582e6056c6e2f13b906a  gcc/rust/checks/errors/borrowck/rust-bir-dump.cc
  3d1d580931425b21ef771bb7fbc06269  gcc/rust/checks/errors/borrowck/rust-bir-dump.h
! ac4645a6b64765a8b1a069123b36a51d  gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h
  7bad83dd9989404f07d5e701e33f41bc  gcc/rust/checks/errors/borrowck/rust-bir-free-region.h
! 63a28af321731b1ddb6fd4a779bfa851  gcc/rust/checks/errors/borrowck/rust-bir-place.h
! c155995ce485ce0e9a21876183c1a9bb  gcc/rust/checks/errors/borrowck/rust-bir-visitor.h
  7333a5b4ee8d7bed652435c73523a459  gcc/rust/checks/errors/borrowck/rust-bir.h
  c62ad0b7d7912fb0902b5edd26c0239a  gcc/rust/checks/errors/borrowck/rust-borrow-checker-diagnostics.cc
  e30cd7ae36132321a16ee23e46ef569d  gcc/rust/checks/errors/borrowck/rust-borrow-checker-diagnostics.h
  8a4b180b21798e53955cc8d26ee08af1  gcc/rust/checks/errors/borrowck/rust-borrow-checker.cc
  6998d3562ab4b5a22db0a644a774bf34  gcc/rust/checks/errors/borrowck/rust-borrow-checker.h
! a4ffaaec2ec881a3107edc10ac3407a5  gcc/rust/checks/errors/borrowck/rust-function-collector.h
! 2b02281b7fb4677b31135f5f48ecd435  gcc/rust/checks/errors/privacy/rust-privacy-check.cc
  3da657013b217061fe50f867abad385d  gcc/rust/checks/errors/privacy/rust-privacy-check.h
  41958e3868642abaa915c9f7ce14838f  gcc/rust/checks/errors/privacy/rust-privacy-common.h
  3a65622c9ada7db251b7cece7376f02b  gcc/rust/checks/errors/privacy/rust-privacy-ctx.cc
! b315059bb0141d7effc2dd66a34088ec  gcc/rust/checks/errors/privacy/rust-privacy-ctx.h
! ebd2c033816fc6276a6ce3cd21bf8c83  gcc/rust/checks/errors/privacy/rust-privacy-reporter.cc
! c7658a3aefd19aa58f569cc1b66771dc  gcc/rust/checks/errors/privacy/rust-privacy-reporter.h
  7afd2e64866a93982cf63a617444202d  gcc/rust/checks/errors/privacy/rust-pub-restricted-visitor.cc
  e089325331566be03e4a844c454d02c9  gcc/rust/checks/errors/privacy/rust-pub-restricted-visitor.h
! 58208890f92170e89665f57fd9d807f2  gcc/rust/checks/errors/privacy/rust-reachability.cc
  63ebea218badc639cc7db7df1d604e12  gcc/rust/checks/errors/privacy/rust-reachability.h
! 30ed1a03fdfb65f6b1632f674b10b333  gcc/rust/checks/errors/privacy/rust-visibility-resolver.cc
  faaa6683b382177d7e39c93079648e98  gcc/rust/checks/errors/privacy/rust-visibility-resolver.h
  58e655e2eb795a961d43bad8c29f47cb  gcc/rust/checks/errors/rust-ast-validation.cc
  8b2205953da2f181b2d51187aefbffab  gcc/rust/checks/errors/rust-ast-validation.h
! e6cd5fc288a50d798c88cf4d1b8051a0  gcc/rust/checks/errors/rust-const-checker.cc
! 8177dae78a8ef607861a6be571bc574f  gcc/rust/checks/errors/rust-const-checker.h
  770d1eaeae7a9fc7f04ef62e6f33859e  gcc/rust/checks/errors/rust-feature-gate.cc
  5a932cefc939038ecbf29a5e10b317d5  gcc/rust/checks/errors/rust-feature-gate.h
! 1969763e94159850613cb3a0763e3c21  gcc/rust/checks/errors/rust-feature.cc
  94ec63b6dec3b278430e4623056b27c0  gcc/rust/checks/errors/rust-feature.h
! 0a4bfee25beb31410de638681743d234  gcc/rust/checks/errors/rust-hir-pattern-analysis.cc
! 9dbb0afa0b291c52c072f21f211f28ad  gcc/rust/checks/errors/rust-hir-pattern-analysis.h
  e030624767cd717222d3626d9d62d9a9  gcc/rust/checks/errors/rust-readonly-check.cc
  3d9c9e625336a7785ee74c5dc9dbe5db  gcc/rust/checks/errors/rust-readonly-check.h
! 0d502a117c115dce88575ba528aa4160  gcc/rust/checks/errors/rust-unsafe-checker.cc
! 49fed94f702b604e2c5fe46f26650930  gcc/rust/checks/errors/rust-unsafe-checker.h
  daeb95fb25e32d1dba7a700a5dd542ed  gcc/rust/checks/lints/rust-lint-marklive-base.h
  372ef6c64dc848ca737e4f258d2e9f32  gcc/rust/checks/lints/rust-lint-marklive.cc
  1014cd28f28fb3ce945cb34ad0190d8d  gcc/rust/checks/lints/rust-lint-marklive.h
  3d12ce22fc794ea9c3de54e7ab40bdb9  gcc/rust/checks/lints/rust-lint-scan-deadcode.h
! 4bef68035bce9fbce70787d7b698c305  gcc/rust/checks/lints/rust-lint-unused-var.cc
  31a28464a707538b3feb2cca81d0baca  gcc/rust/checks/lints/rust-lint-unused-var.h
  fa5872ac507a48a11a82370b396b9110  gcc/rust/config-lang.in
! 52c048f669ce2c7aba467b5d1771e9b4  gcc/rust/expand/rust-cfg-strip.cc
! c9bd9ae0734a5ce623f1f997eb83e551  gcc/rust/expand/rust-cfg-strip.h
  5bf105dcc7a5563508ce8afd6d5477a8  gcc/rust/expand/rust-derive-clone.cc
! 0f5f46fbf1d84057b2f5c9675beb103d  gcc/rust/expand/rust-derive-clone.h
  09be27af0eb6fd26f67529031ae051d6  gcc/rust/expand/rust-derive-copy.cc
! 0184eab6033831cdebc05a747075c108  gcc/rust/expand/rust-derive-copy.h
  0abf66b4f0b5209cf69bf9a9528b2f46  gcc/rust/expand/rust-derive-debug.cc
  c3e6cc7662d1ef8947fb988077f97569  gcc/rust/expand/rust-derive-debug.h
! 41935d4a796c10ec44c95b51fa744ca7  gcc/rust/expand/rust-derive-default.cc
  df56b23b19c01cfc70d4a9da2069fa56  gcc/rust/expand/rust-derive-default.h
! bdd81cb310436f41c05b43b2080cb63e  gcc/rust/expand/rust-derive-eq.cc
! a62bc3396d4a43c0fa61076121b0ff9f  gcc/rust/expand/rust-derive-eq.h
! 07d3b883d4a122f67c19fc1b8eb2e0de  gcc/rust/expand/rust-derive-hash.cc
! 689d4442cb46daaecafb102576b7dce1  gcc/rust/expand/rust-derive-hash.h
! bb3bce1440cee58a726b2419a9255eaf  gcc/rust/expand/rust-derive-partial-eq.cc
! 41288c848ad18b972a338a5c52966503  gcc/rust/expand/rust-derive-partial-eq.h
! 0bae3bed37f64868ed82da0b13b8dbae  gcc/rust/expand/rust-derive.cc
! 0aa5baae783e8ccdd11ecf5457f05d53  gcc/rust/expand/rust-derive.h
! ec2b71b0087617d699660612ff25a081  gcc/rust/expand/rust-expand-format-args.cc
  3212518ba7ade95bb86b3581ea623f4f  gcc/rust/expand/rust-expand-format-args.h
! 3ecadcbd483b7bc5a9cf5d1d227e5ee1  gcc/rust/expand/rust-expand-visitor.cc
! c3fed0b6e0546fa753ce93ae999c99c9  gcc/rust/expand/rust-expand-visitor.h
! c93bff935c681488342c65c291d65e62  gcc/rust/expand/rust-macro-builtins-asm.cc
! 3b8759bfc0b88f4d3668309e7e5eae24  gcc/rust/expand/rust-macro-builtins-asm.h
! b9023dcf0359d829ece388161af6f414  gcc/rust/expand/rust-macro-builtins-format-args.cc
! 8276fd75598fedaaac9ef533cff23c55  gcc/rust/expand/rust-macro-builtins-helpers.cc
! ea2352973a1587815a8411266f98c016  gcc/rust/expand/rust-macro-builtins-helpers.h
  f813ef580dce9d9b6c9a75e9577bdbe0  gcc/rust/expand/rust-macro-builtins-include.cc
  cfe6beb6d729f4b555ffc6493de34a20  gcc/rust/expand/rust-macro-builtins-location.cc
  7d4293c5bb91064c3bb11e2ec9bd1893  gcc/rust/expand/rust-macro-builtins-log-debug.cc
  277542c684eada894583030cf02b7424  gcc/rust/expand/rust-macro-builtins-test-bench.cc
  277542c684eada894583030cf02b7424  gcc/rust/expand/rust-macro-builtins-trait.cc
  e253e39de6ea2a67018f97fc8e838ef5  gcc/rust/expand/rust-macro-builtins-utility.cc
! b71d4f0e88112294a2ebd77c5f4d37b9  gcc/rust/expand/rust-macro-builtins.cc
! 8c86f94c425dbd464408382cbfab8a80  gcc/rust/expand/rust-macro-builtins.h
! bad6678ecb2befc5f02d38142ed85307  gcc/rust/expand/rust-macro-expand.cc
  e0f7a029dbe434c8fc935166b193348f  gcc/rust/expand/rust-macro-expand.h
  b4b31e238293e868394fdf9247353b30  gcc/rust/expand/rust-macro-invoc-lexer.cc
  df22bd0c18e9d6037a1dbfbd733f009a  gcc/rust/expand/rust-macro-invoc-lexer.h
! 541cc1dc79b19819eb6d74033a8225bc  gcc/rust/expand/rust-macro-substitute-ctx.cc
  fbf525cd3b3ec9396b8c278d2a098d4e  gcc/rust/expand/rust-macro-substitute-ctx.h
  49dc46efca0e56504ad8787e4548f25f  gcc/rust/expand/rust-proc-macro-invoc-lexer.cc
  9a7011cdfca3c1d04ffe7ca8cd3a2537  gcc/rust/expand/rust-proc-macro-invoc-lexer.h
  7faead690d4bd47de7b4b5fe0c4fb7d7  gcc/rust/expand/rust-proc-macro.cc
! 0fc794873a4275b45265cfc97fd85f06  gcc/rust/expand/rust-proc-macro.h
! eaa2130ec2dc05936485fdde9dc46178  gcc/rust/expand/rust-token-tree-desugar.cc
! 1dfc5519eea2efbd3f88fa4a265bace7  gcc/rust/expand/rust-token-tree-desugar.h
! cb38235ccd66ec5d79eb6e3a4c547dee  gcc/rust/hir/rust-ast-lower-base.cc
! 435f6591063e93165b65048e9282e940  gcc/rust/hir/rust-ast-lower-base.h
! 49ee67f4b7dbf57d3dcc6cc238e66eb1  gcc/rust/hir/rust-ast-lower-block.h
  aad603a39b27fdfad3cc2614aff9e4e4  gcc/rust/hir/rust-ast-lower-enumitem.h
! 9305f2f3b9e9cf5ec16886d08275dfa7  gcc/rust/hir/rust-ast-lower-expr.cc
! 536f252a042cdefe26f215458b8db97b  gcc/rust/hir/rust-ast-lower-expr.h
! ca7b9bf7967f386832b1348f16c194b5  gcc/rust/hir/rust-ast-lower-extern.h
  b4d59b1df9f1d6e27671a9e166c77abb  gcc/rust/hir/rust-ast-lower-format-args.cc
  1c9070543940e6d4a4dbb4d601d853ae  gcc/rust/hir/rust-ast-lower-format-args.h
! 20b3e5dbdac8bc4474e3c4e641ec9312  gcc/rust/hir/rust-ast-lower-implitem.cc
  5e7a1a73e8bcdecc0d93cade34ba477b  gcc/rust/hir/rust-ast-lower-implitem.h
! 58388c90013118baa4eb3a6763f11b4e  gcc/rust/hir/rust-ast-lower-item.cc
! bd784e40b163161f50bb84d2cf3d8372  gcc/rust/hir/rust-ast-lower-item.h
! 9ed6a1d743745a3dcef8d01ede5e9953  gcc/rust/hir/rust-ast-lower-pattern.cc
  9ed55743496bcf0607042817cfa4b0d8  gcc/rust/hir/rust-ast-lower-pattern.h
  5b0f3b0dffc07b108851141d7b749598  gcc/rust/hir/rust-ast-lower-stmt.cc
  af09b97c0baeff87520d8face05b8f05  gcc/rust/hir/rust-ast-lower-stmt.h
  b86ab6b1f3ddb71091146e2d7265bd7f  gcc/rust/hir/rust-ast-lower-struct-field-expr.h
! 77ac871225144338ed5b694ec101c28f  gcc/rust/hir/rust-ast-lower-type.cc
! 65a140ce1d80b5f6b1a988af1826981a  gcc/rust/hir/rust-ast-lower-type.h
! 9dfa377d9de5f51b39db1f9d48f2cd44  gcc/rust/hir/rust-ast-lower.cc
! 1556cff9ac2adb6d49ea18702b64a1d6  gcc/rust/hir/rust-ast-lower.h
! 52368456c879ea2450b0d2e8349d9a92  gcc/rust/hir/rust-hir-dump.cc
! 8552f40ed253fbf99787f4581e8bfa22  gcc/rust/hir/rust-hir-dump.h
  9ae488c2548387541bb760eaff79fbe9  gcc/rust/hir/tree/rust-hir-attrs.h
  7703b12f41d395a71eb5420f6c0a7ba7  gcc/rust/hir/tree/rust-hir-bound-abstract.h
  8f81aae1c3676476d16c5c42bfdc499a  gcc/rust/hir/tree/rust-hir-bound.h
! a61d82a4698c8ab3f5da02dc1e2bb225  gcc/rust/hir/tree/rust-hir-expr-abstract.h
! c817d098305e694a04da84539c2cb36f  gcc/rust/hir/tree/rust-hir-expr.cc
! fdc5ec3a68d48bfbd18991eb50df9b80  gcc/rust/hir/tree/rust-hir-expr.h
! b6623d48cc17c1923acca999f7789b78  gcc/rust/hir/tree/rust-hir-full-decls.h
  e872fd48a9851c4ec4c3171c007d112d  gcc/rust/hir/tree/rust-hir-full.h
  cf64af347e4de1f3259e0ba179d8e53b  gcc/rust/hir/tree/rust-hir-generic-param.cc
! a603bdf4347024ad0958004ae5e1a7fa  gcc/rust/hir/tree/rust-hir-generic-param.h
! d3de8a6802ef88cf0eed5c84357302ad  gcc/rust/hir/tree/rust-hir-item.cc
! 925c7a0b9ee0501cff8243260a13a0ad  gcc/rust/hir/tree/rust-hir-item.h
  9f4e7a70392e148fe75decd40598a2d9  gcc/rust/hir/tree/rust-hir-literal.h
  f40fe76efdee3810473f09205ea63119  gcc/rust/hir/tree/rust-hir-node.h
  46af2c5116f73b3da4d0bc13d9cd86f8  gcc/rust/hir/tree/rust-hir-path.cc
! a830ffa39d8a57080e5768cc2d925911  gcc/rust/hir/tree/rust-hir-path.h
  ee67550806e0bdf8bb66f8d3be82d6fa  gcc/rust/hir/tree/rust-hir-pattern-abstract.h
! 3f30461ef5744eb1db26b7be92030012  gcc/rust/hir/tree/rust-hir-pattern.h
  e55c4f7404915fb3515e09a7441125a5  gcc/rust/hir/tree/rust-hir-simple-path.h
  22283c03c1dc5ac012096d395c9414c2  gcc/rust/hir/tree/rust-hir-stmt.cc
  d231530a896626f20475091e1168963d  gcc/rust/hir/tree/rust-hir-stmt.h
--- 8053,8209 ----
  bca09e7439e4187f0ea4c60c867580fc  gcc/rust/checks/errors/borrowck/ffi-polonius/vendor/rustc-hash/src/lib.rs
  63a3c0a3552e5013aac45fb236f9ff6c  gcc/rust/checks/errors/borrowck/polonius/rust-polonius-ffi.h
  ad886f79708dd374dbc6a3e224533e14  gcc/rust/checks/errors/borrowck/polonius/rust-polonius.cc
! fa3c76359487ca3f3346e24a4f3358e4  gcc/rust/checks/errors/borrowck/polonius/rust-polonius.h
! c2d95a91701508d9113ae71c2719d897  gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
! 47464bc7c6a9c9362cc5bbcbbdff5a91  gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.h
! 40032b8fc84237812877c47f2bfa8666  gcc/rust/checks/errors/borrowck/rust-bir-builder-internal.h
! 0737404663c96140b303fcbe15c27282  gcc/rust/checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h
! 9e40df5f42f7638a4a7604cf8c30b83c  gcc/rust/checks/errors/borrowck/rust-bir-builder-pattern.cc
  bbb6b401287aeefeddf82860e011dd85  gcc/rust/checks/errors/borrowck/rust-bir-builder-pattern.h
! 72bcf7ce5f56655c03f587db8e16c745  gcc/rust/checks/errors/borrowck/rust-bir-builder-struct.h
  38cef03aee9d5c550a78c56952b2791e  gcc/rust/checks/errors/borrowck/rust-bir-builder.h
! 0f58055d50d4bdb56acf9a07bdf55913  gcc/rust/checks/errors/borrowck/rust-bir-dump.cc
  3d1d580931425b21ef771bb7fbc06269  gcc/rust/checks/errors/borrowck/rust-bir-dump.h
! 65d744b60a313ab6036d2997e0276549  gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h
  7bad83dd9989404f07d5e701e33f41bc  gcc/rust/checks/errors/borrowck/rust-bir-free-region.h
! 3fdee10a46911d365453825ba978cab9  gcc/rust/checks/errors/borrowck/rust-bir-place.h
! 71d8a42cc31df3a63534d403d9a8919a  gcc/rust/checks/errors/borrowck/rust-bir-visitor.h
  7333a5b4ee8d7bed652435c73523a459  gcc/rust/checks/errors/borrowck/rust-bir.h
  c62ad0b7d7912fb0902b5edd26c0239a  gcc/rust/checks/errors/borrowck/rust-borrow-checker-diagnostics.cc
  e30cd7ae36132321a16ee23e46ef569d  gcc/rust/checks/errors/borrowck/rust-borrow-checker-diagnostics.h
  8a4b180b21798e53955cc8d26ee08af1  gcc/rust/checks/errors/borrowck/rust-borrow-checker.cc
  6998d3562ab4b5a22db0a644a774bf34  gcc/rust/checks/errors/borrowck/rust-borrow-checker.h
! f0e51dff89e63151b239454037feab78  gcc/rust/checks/errors/borrowck/rust-function-collector.h
! 32e213dff722426f97836eef4e58c492  gcc/rust/checks/errors/privacy/rust-privacy-check.cc
  3da657013b217061fe50f867abad385d  gcc/rust/checks/errors/privacy/rust-privacy-check.h
  41958e3868642abaa915c9f7ce14838f  gcc/rust/checks/errors/privacy/rust-privacy-common.h
  3a65622c9ada7db251b7cece7376f02b  gcc/rust/checks/errors/privacy/rust-privacy-ctx.cc
! 17e10c312b595af4abcf477a5c0d25e0  gcc/rust/checks/errors/privacy/rust-privacy-ctx.h
! 1ce41f26165355a622514d8edc3aa575  gcc/rust/checks/errors/privacy/rust-privacy-reporter.cc
! 9469ab4d718e27ca81d8ac937c1889b6  gcc/rust/checks/errors/privacy/rust-privacy-reporter.h
  7afd2e64866a93982cf63a617444202d  gcc/rust/checks/errors/privacy/rust-pub-restricted-visitor.cc
  e089325331566be03e4a844c454d02c9  gcc/rust/checks/errors/privacy/rust-pub-restricted-visitor.h
! b3185e47f2d21f00afc3dc4a8dd2d11b  gcc/rust/checks/errors/privacy/rust-reachability.cc
  63ebea218badc639cc7db7df1d604e12  gcc/rust/checks/errors/privacy/rust-reachability.h
! 314a6d18587c6c94672ded1df3988ead  gcc/rust/checks/errors/privacy/rust-visibility-resolver.cc
  faaa6683b382177d7e39c93079648e98  gcc/rust/checks/errors/privacy/rust-visibility-resolver.h
  58e655e2eb795a961d43bad8c29f47cb  gcc/rust/checks/errors/rust-ast-validation.cc
  8b2205953da2f181b2d51187aefbffab  gcc/rust/checks/errors/rust-ast-validation.h
! a27ec1958b2cca6d3529a75f0d5e2d78  gcc/rust/checks/errors/rust-const-checker.cc
! 2139e14d0a70f35f63b8f61b22e87a62  gcc/rust/checks/errors/rust-const-checker.h
  770d1eaeae7a9fc7f04ef62e6f33859e  gcc/rust/checks/errors/rust-feature-gate.cc
  5a932cefc939038ecbf29a5e10b317d5  gcc/rust/checks/errors/rust-feature-gate.h
! e76320268e1edd88b6449c7e90ab12a9  gcc/rust/checks/errors/rust-feature.cc
  94ec63b6dec3b278430e4623056b27c0  gcc/rust/checks/errors/rust-feature.h
! 601bc807ce8d648e606fc15f6676a421  gcc/rust/checks/errors/rust-hir-pattern-analysis.cc
! f68d8cfaf0a2c51ecbc91235794b43a8  gcc/rust/checks/errors/rust-hir-pattern-analysis.h
  e030624767cd717222d3626d9d62d9a9  gcc/rust/checks/errors/rust-readonly-check.cc
  3d9c9e625336a7785ee74c5dc9dbe5db  gcc/rust/checks/errors/rust-readonly-check.h
! f22cff707283c92f3a6391ba91656e5e  gcc/rust/checks/errors/rust-readonly-check2.cc
! df77b7829b2693ebd70aee0a0ff751d7  gcc/rust/checks/errors/rust-readonly-check2.h
! 78a630d62c16e5c14d8d49a378ae921a  gcc/rust/checks/errors/rust-unsafe-checker.cc
! 386a646f3d0d23d8bc3a1da122499d01  gcc/rust/checks/errors/rust-unsafe-checker.h
  daeb95fb25e32d1dba7a700a5dd542ed  gcc/rust/checks/lints/rust-lint-marklive-base.h
  372ef6c64dc848ca737e4f258d2e9f32  gcc/rust/checks/lints/rust-lint-marklive.cc
  1014cd28f28fb3ce945cb34ad0190d8d  gcc/rust/checks/lints/rust-lint-marklive.h
  3d12ce22fc794ea9c3de54e7ab40bdb9  gcc/rust/checks/lints/rust-lint-scan-deadcode.h
! 59a3222b3a126357249024c71380305a  gcc/rust/checks/lints/rust-lint-unused-var.cc
  31a28464a707538b3feb2cca81d0baca  gcc/rust/checks/lints/rust-lint-unused-var.h
  fa5872ac507a48a11a82370b396b9110  gcc/rust/config-lang.in
! 8f262f58f5d827757f0260cd79fdcc7c  gcc/rust/expand/rust-cfg-strip.cc
! bba00957626d1998cf329a5b0f7a60b4  gcc/rust/expand/rust-cfg-strip.h
  5bf105dcc7a5563508ce8afd6d5477a8  gcc/rust/expand/rust-derive-clone.cc
! f9e74c7fa1a07a3ba930fb235c9b6000  gcc/rust/expand/rust-derive-clone.h
! 1c98aff64589f97a1709c2ddb46d3ef4  gcc/rust/expand/rust-derive-cmp-common.cc
! 95468c29b0802383dba6c20505022ee6  gcc/rust/expand/rust-derive-cmp-common.h
  09be27af0eb6fd26f67529031ae051d6  gcc/rust/expand/rust-derive-copy.cc
! 53d56dcba9c607680c3d23f6f39edf1e  gcc/rust/expand/rust-derive-copy.h
  0abf66b4f0b5209cf69bf9a9528b2f46  gcc/rust/expand/rust-derive-debug.cc
  c3e6cc7662d1ef8947fb988077f97569  gcc/rust/expand/rust-derive-debug.h
! 26a6ab59cd92661a07dc019de28a2144  gcc/rust/expand/rust-derive-default.cc
  df56b23b19c01cfc70d4a9da2069fa56  gcc/rust/expand/rust-derive-default.h
! bd18141c7f4dcb2d2ad455dcfb51dad1  gcc/rust/expand/rust-derive-eq.cc
! a49bed8382a0e447351a98fa8d1d5c31  gcc/rust/expand/rust-derive-eq.h
! dc1403097e3cdf2b51ad17931dda537a  gcc/rust/expand/rust-derive-hash.cc
! 15af7b16e8b9a6a8a4359622ece14733  gcc/rust/expand/rust-derive-hash.h
! 026aef1a3c89ebeb05ff3dd4719ac9fb  gcc/rust/expand/rust-derive-ord.cc
! 8717276cd5b4ffe5cd71e8b31217d4aa  gcc/rust/expand/rust-derive-ord.h
! cb6f746db41b7c98e3e053b8b60436ff  gcc/rust/expand/rust-derive-partial-eq.cc
! 4c08872aac729ae411f86212487397e0  gcc/rust/expand/rust-derive-partial-eq.h
! 73015c96d99d7296b592097c82981cec  gcc/rust/expand/rust-derive.cc
! 92d2e637edb856cc6872b140b26419ec  gcc/rust/expand/rust-derive.h
! 2bf0b3ec8f96214e9e951a12aa0a2bb8  gcc/rust/expand/rust-expand-format-args.cc
  3212518ba7ade95bb86b3581ea623f4f  gcc/rust/expand/rust-expand-format-args.h
! 7cd200a87aff0dd4e005749ad8ee94e7  gcc/rust/expand/rust-expand-visitor.cc
! 882c99f39e6433db6c589ae49942d134  gcc/rust/expand/rust-expand-visitor.h
! edaa046e3090c352298e289c0984a0f2  gcc/rust/expand/rust-macro-builtins-asm.cc
! 48269c7df7dead67e4185d80b217a76a  gcc/rust/expand/rust-macro-builtins-asm.h
! 48b3412b093621cd496f89698ee0f7b0  gcc/rust/expand/rust-macro-builtins-format-args.cc
! 470ca31c9edf1792290a63da0ae3bdd7  gcc/rust/expand/rust-macro-builtins-helpers.cc
! 133f4f9b4be8b1d10da06c9ad20fe373  gcc/rust/expand/rust-macro-builtins-helpers.h
  f813ef580dce9d9b6c9a75e9577bdbe0  gcc/rust/expand/rust-macro-builtins-include.cc
  cfe6beb6d729f4b555ffc6493de34a20  gcc/rust/expand/rust-macro-builtins-location.cc
  7d4293c5bb91064c3bb11e2ec9bd1893  gcc/rust/expand/rust-macro-builtins-log-debug.cc
+ a95cbaa800890b7f85cda477c6f40ce7  gcc/rust/expand/rust-macro-builtins-offset-of.cc
  277542c684eada894583030cf02b7424  gcc/rust/expand/rust-macro-builtins-test-bench.cc
  277542c684eada894583030cf02b7424  gcc/rust/expand/rust-macro-builtins-trait.cc
  e253e39de6ea2a67018f97fc8e838ef5  gcc/rust/expand/rust-macro-builtins-utility.cc
! d4f255f36b3a31c8b84d946c30dad96c  gcc/rust/expand/rust-macro-builtins.cc
! b0344bc54018de3abfa44322f6262176  gcc/rust/expand/rust-macro-builtins.h
! 0df5134d9f8c1b6565ae15f794e4b8e2  gcc/rust/expand/rust-macro-expand.cc
  e0f7a029dbe434c8fc935166b193348f  gcc/rust/expand/rust-macro-expand.h
  b4b31e238293e868394fdf9247353b30  gcc/rust/expand/rust-macro-invoc-lexer.cc
  df22bd0c18e9d6037a1dbfbd733f009a  gcc/rust/expand/rust-macro-invoc-lexer.h
! 5187e6a0563468c057d344c8935aa5b9  gcc/rust/expand/rust-macro-substitute-ctx.cc
  fbf525cd3b3ec9396b8c278d2a098d4e  gcc/rust/expand/rust-macro-substitute-ctx.h
  49dc46efca0e56504ad8787e4548f25f  gcc/rust/expand/rust-proc-macro-invoc-lexer.cc
  9a7011cdfca3c1d04ffe7ca8cd3a2537  gcc/rust/expand/rust-proc-macro-invoc-lexer.h
  7faead690d4bd47de7b4b5fe0c4fb7d7  gcc/rust/expand/rust-proc-macro.cc
! 9568c3923de491cd646cd621c423458a  gcc/rust/expand/rust-proc-macro.h
! 41d25dfc4b39b0ca6a0c9422ea1acdc1  gcc/rust/expand/rust-token-tree-desugar.cc
! 35a7953321666f4ad8526473ae2a8db1  gcc/rust/expand/rust-token-tree-desugar.h
! c090da771aeaeb5ac71a9cdf772da9ed  gcc/rust/hir/rust-ast-lower-base.cc
! dbf0fe3e4bc1fd56bfb0ea1518ea47e4  gcc/rust/hir/rust-ast-lower-base.h
! 2eecfd7677a55d9d177b5226d9a6aec1  gcc/rust/hir/rust-ast-lower-block.h
  aad603a39b27fdfad3cc2614aff9e4e4  gcc/rust/hir/rust-ast-lower-enumitem.h
! 2ccdfdbe6c49584fe194fe0a620e5a35  gcc/rust/hir/rust-ast-lower-expr.cc
! 0bea9637721f19beb7661ba8cbc0eae6  gcc/rust/hir/rust-ast-lower-expr.h
! 1042b2d1a40021ea30d79101c9bd074a  gcc/rust/hir/rust-ast-lower-extern.h
  b4d59b1df9f1d6e27671a9e166c77abb  gcc/rust/hir/rust-ast-lower-format-args.cc
  1c9070543940e6d4a4dbb4d601d853ae  gcc/rust/hir/rust-ast-lower-format-args.h
! 9c43081abad3a71641876f29fb5d7786  gcc/rust/hir/rust-ast-lower-implitem.cc
  5e7a1a73e8bcdecc0d93cade34ba477b  gcc/rust/hir/rust-ast-lower-implitem.h
! 2161e9e6d7b3686871aa9052c441b44a  gcc/rust/hir/rust-ast-lower-item.cc
! 4692f2513fc1cf935117a527388b3633  gcc/rust/hir/rust-ast-lower-item.h
! de0e9f3e558d5ceb386969e6332e0a96  gcc/rust/hir/rust-ast-lower-pattern.cc
  9ed55743496bcf0607042817cfa4b0d8  gcc/rust/hir/rust-ast-lower-pattern.h
  5b0f3b0dffc07b108851141d7b749598  gcc/rust/hir/rust-ast-lower-stmt.cc
  af09b97c0baeff87520d8face05b8f05  gcc/rust/hir/rust-ast-lower-stmt.h
  b86ab6b1f3ddb71091146e2d7265bd7f  gcc/rust/hir/rust-ast-lower-struct-field-expr.h
! a3f9b9d71a7b0a056ea2218035dd8dad  gcc/rust/hir/rust-ast-lower-type.cc
! 2144c5ed50fecb7465bad4f0676110be  gcc/rust/hir/rust-ast-lower-type.h
! 9bce9060147bee95c6d2d421d68f2d45  gcc/rust/hir/rust-ast-lower.cc
! dfd71f28a4e33f88e4f9f845a85eff57  gcc/rust/hir/rust-ast-lower.h
! 75212e5860b67e1da1360e70b8b1be09  gcc/rust/hir/rust-hir-dump.cc
! 7f5b736fe50fc6c1ace35c6a1826e007  gcc/rust/hir/rust-hir-dump.h
  9ae488c2548387541bb760eaff79fbe9  gcc/rust/hir/tree/rust-hir-attrs.h
  7703b12f41d395a71eb5420f6c0a7ba7  gcc/rust/hir/tree/rust-hir-bound-abstract.h
  8f81aae1c3676476d16c5c42bfdc499a  gcc/rust/hir/tree/rust-hir-bound.h
! ef8ae85d1fae88e345d454cc9cd6be61  gcc/rust/hir/tree/rust-hir-expr-abstract.h
! 335d221837d49923d80289f790780f10  gcc/rust/hir/tree/rust-hir-expr.cc
! 5d4cbccd2f59ef41fc3dd84351775480  gcc/rust/hir/tree/rust-hir-expr.h
! 25d013cecd36a5d8059cfb74631d80f5  gcc/rust/hir/tree/rust-hir-full-decls.h
  e872fd48a9851c4ec4c3171c007d112d  gcc/rust/hir/tree/rust-hir-full.h
  cf64af347e4de1f3259e0ba179d8e53b  gcc/rust/hir/tree/rust-hir-generic-param.cc
! 43725b1aeba18092d28ebd33a73e4462  gcc/rust/hir/tree/rust-hir-generic-param.h
! 605269fb7d6c0f38be45a552e2446d9b  gcc/rust/hir/tree/rust-hir-item.cc
! 0d1546380caf6d49ab67c59a7bae7d7c  gcc/rust/hir/tree/rust-hir-item.h
  9f4e7a70392e148fe75decd40598a2d9  gcc/rust/hir/tree/rust-hir-literal.h
  f40fe76efdee3810473f09205ea63119  gcc/rust/hir/tree/rust-hir-node.h
  46af2c5116f73b3da4d0bc13d9cd86f8  gcc/rust/hir/tree/rust-hir-path.cc
! d1fbad563a9af986959aeb87f576564e  gcc/rust/hir/tree/rust-hir-path.h
  ee67550806e0bdf8bb66f8d3be82d6fa  gcc/rust/hir/tree/rust-hir-pattern-abstract.h
! 881d14cd309e9397caa1f94982548a4a  gcc/rust/hir/tree/rust-hir-pattern.h
  e55c4f7404915fb3515e09a7441125a5  gcc/rust/hir/tree/rust-hir-simple-path.h
  22283c03c1dc5ac012096d395c9414c2  gcc/rust/hir/tree/rust-hir-stmt.cc
  d231530a896626f20475091e1168963d  gcc/rust/hir/tree/rust-hir-stmt.h
*************** d231530a896626f20475091e1168963d  gcc/ru
*** 8195,8374 ****
  807eed2e2680f94f8f1dcc296c33f695  gcc/rust/hir/tree/rust-hir-type-no-bounds.h
  c143cea24f5c3be477e96312dd276c58  gcc/rust/hir/tree/rust-hir-type.cc
  ba332eda5c2e84ae8a3591891ae7adcd  gcc/rust/hir/tree/rust-hir-type.h
! 06d2fd0a583780c83aad574397d7edc3  gcc/rust/hir/tree/rust-hir-visibility.h
  a9ce4bb18277085ac0f36fce0ab7f87f  gcc/rust/hir/tree/rust-hir-visitable.h
! 0d63cb0c41155f39e50f910f1ecc3593  gcc/rust/hir/tree/rust-hir-visitor.h
! 692023b87772065bf46a67c23f57da97  gcc/rust/hir/tree/rust-hir.cc
  6ea149cdd32444b93f142193c19c3930  gcc/rust/hir/tree/rust-hir.h
  fa7c267c70f0094382b7b3df35e83412  gcc/rust/lang-specs.h
! ab7027b96b1ba20f2df5ee18fce35421  gcc/rust/lang.opt
  19c784c2297961588e002876d94ceea4  gcc/rust/lang.opt.urls
  4f1a01d5a1d9c4db6498642d7194185e  gcc/rust/lex/rust-input-source.h
! bf2d177d2b45b2a33b8b8bb35b034cc0  gcc/rust/lex/rust-lex.cc
! 8905d55a4c4195b8e0317c53d3ae868a  gcc/rust/lex/rust-lex.h
! 154e23941e19751252a592ca74df8d2f  gcc/rust/lex/rust-token.cc
! 8e9cfb15c4d8bf060d797a7195e08417  gcc/rust/lex/rust-token.h
  fe40f8618a9f5a5f007bc1a81fe45d3a  gcc/rust/logo.png
! 4f9fe56fdacb6adaadc51d2f5c45ee38  gcc/rust/metadata/rust-export-metadata.cc
  12ec7837566ee621427ed56d94422509  gcc/rust/metadata/rust-export-metadata.h
  2edf1c3452ec2edc627904170818d7fe  gcc/rust/metadata/rust-extern-crate.cc
  998f5953d66b13c97f7488faa8c315ac  gcc/rust/metadata/rust-extern-crate.h
! 2367a051f65bc9a16ef69d32a8d72b42  gcc/rust/metadata/rust-import-archive.cc
  8e402bbcc2d35dcfc7d619bb67a37551  gcc/rust/metadata/rust-imports.cc
! 0b8b8d52e0311e31fc3bfa30129004bf  gcc/rust/metadata/rust-imports.h
  6157b499aceab0b9b632eea936bc0f0d  gcc/rust/parse/rust-cfg-parser.cc
! e0d1b97260228c2544bb509ee36eb811  gcc/rust/parse/rust-cfg-parser.h
! ac035bc655eef0f0bb02d11545319bef  gcc/rust/parse/rust-parse-impl.h
! 6731431d9398ba1cb6737e8f226363cc  gcc/rust/parse/rust-parse.cc
! 13ffaa13f0d7c2b381a7fffc394abc00  gcc/rust/parse/rust-parse.h
! 904bb5961d18d0251b99c1c8ed546a98  gcc/rust/resolve/rust-ast-resolve-base.cc
! 270643c7f92b72895cd7064f274a4941  gcc/rust/resolve/rust-ast-resolve-base.h
! 85a3f360ec46392a302c089405d3f801  gcc/rust/resolve/rust-ast-resolve-expr.cc
! 71d5f4ade83a5f8c494a92ef12023446  gcc/rust/resolve/rust-ast-resolve-expr.h
  8f68f019c34cda122cc27f3b94c06274  gcc/rust/resolve/rust-ast-resolve-implitem.h
! 7b1233dbdd87d481a440efd33735d4b5  gcc/rust/resolve/rust-ast-resolve-item.cc
! 2a354a8ebb6ace97ec01a9d5e6d32972  gcc/rust/resolve/rust-ast-resolve-item.h
  8cb99c5ae5b41ce08b5970a0a95c086c  gcc/rust/resolve/rust-ast-resolve-path.cc
  a8c2cd13a9e17fcd77075f298ece9bbc  gcc/rust/resolve/rust-ast-resolve-path.h
! ef7e2ecdd75710e6563c88788b5a3e0a  gcc/rust/resolve/rust-ast-resolve-pattern.cc
  cc6a86d6d4f3b82cb0c90909786f72d0  gcc/rust/resolve/rust-ast-resolve-pattern.h
  6fb9870e2dc236966f72710990ede295  gcc/rust/resolve/rust-ast-resolve-stmt.cc
! 12700483683bf4982843f45e0cbb789d  gcc/rust/resolve/rust-ast-resolve-stmt.h
  469f217b1a5f7e8b64533a460dd7d1b5  gcc/rust/resolve/rust-ast-resolve-struct-expr-field.cc
  d6e1a39ea6b2856a3ceb1f1ad21da843  gcc/rust/resolve/rust-ast-resolve-struct-expr-field.h
  ef9539cd1ebecb0d7b169dbc11cd1bda  gcc/rust/resolve/rust-ast-resolve-toplevel.h
! b0c9712302482b70feb37d64a5f35911  gcc/rust/resolve/rust-ast-resolve-type.cc
  50092e99e4c7ac9c221561d170b60ad2  gcc/rust/resolve/rust-ast-resolve-type.h
! a67cd4aa554b1ba1e3df44a3b11eb284  gcc/rust/resolve/rust-ast-resolve.cc
  d5113906116ffd33fb4c45243a97fb67  gcc/rust/resolve/rust-ast-resolve.h
! c2f6abadd8a38a60ba254195faa3973f  gcc/rust/resolve/rust-default-resolver.cc
! 39290abdf8a618707ba87735d65cc63d  gcc/rust/resolve/rust-default-resolver.h
! 2bfdb9f91e9e5ed2671f46185add94c0  gcc/rust/resolve/rust-early-name-resolver-2.0.cc
! c3593ee85dcf03e8a200ce3d20275ccf  gcc/rust/resolve/rust-early-name-resolver-2.0.h
! 431fa1500f72db06b9c673038bdbeafc  gcc/rust/resolve/rust-early-name-resolver.cc
! 79f2c9be2fa7e7d9048777ba338a721f  gcc/rust/resolve/rust-early-name-resolver.h
! c30be58eae1b02f0b1deaea06b03d101  gcc/rust/resolve/rust-finalize-imports-2.0.cc
! f181c944f9bbea9c2954427b2334c87a  gcc/rust/resolve/rust-finalize-imports-2.0.h
  dec0e54b8d4239c44cd88b409b7e74c3  gcc/rust/resolve/rust-forever-stack.cc
! c13aecea9c8a8b70e55edcb8735f7fec  gcc/rust/resolve/rust-forever-stack.h
! 3270da3abfe88fffc0089adc897f69ed  gcc/rust/resolve/rust-forever-stack.hxx
  c37894be52ba5cc4406613a60ba6b289  gcc/rust/resolve/rust-ice-finalizer.cc
  f022a4ee2cba026a3593bb6b701ae2f8  gcc/rust/resolve/rust-ice-finalizer.h
  98f1d330caf4f27bd13e2a60d632182b  gcc/rust/resolve/rust-immutable-name-resolution-context.cc
  927471efaee1f85624e6e7eb00584819  gcc/rust/resolve/rust-immutable-name-resolution-context.h
! d26a3f8dd06a0d59396272c4f64e176e  gcc/rust/resolve/rust-late-name-resolver-2.0.cc
! 452ab0fe9c6f9e1e259d45df8004a3c0  gcc/rust/resolve/rust-late-name-resolver-2.0.h
! 4bb779fc95a8d132060b01520618c019  gcc/rust/resolve/rust-name-resolution-context.cc
! 4bca16219d1f43f47810f63532118616  gcc/rust/resolve/rust-name-resolution-context.h
  b6983f07d81272720902833f46969469  gcc/rust/resolve/rust-name-resolver.cc
  be000221300e27326827abc1e0cad277  gcc/rust/resolve/rust-name-resolver.h
  5bd00178d4bbda0cedb3410c06aa647b  gcc/rust/resolve/rust-rib.cc
! df264ba2847fb2a38b3bb3b4033a197d  gcc/rust/resolve/rust-rib.h
! 17fa20807e1cbef4cbd12a8870107db1  gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc
! d779ac3d5d0f6ee1b5f47a4ce0cf1e60  gcc/rust/resolve/rust-toplevel-name-resolver-2.0.h
! e49a12846f730d069c04127857f8d468  gcc/rust/rust-attribs.cc
! 55479ad90a5fe7884edef780c31833b9  gcc/rust/rust-backend.h
! d37141631e779efc27f48019136756d4  gcc/rust/rust-diagnostics.cc
! 5aaf7f890efa698d89b6c1785288f84d  gcc/rust/rust-diagnostics.h
  a29710a52aae45b7a844ae73c125e33f  gcc/rust/rust-error-codes.def
! 658ebc1dc7af53db42dbe35be128a3d3  gcc/rust/rust-gcc.cc
  65922743531bd0f8eff57efd205900a9  gcc/rust/rust-gcc.h
! 7e5d8d78ae91ade4523ca87447fedfd0  gcc/rust/rust-lang.cc
  bcf57cedfa84f01311473b51a88f932c  gcc/rust/rust-linemap.cc
  a591947189b9249649cd9d0d05bb6f3b  gcc/rust/rust-linemap.h
  44c864a134b8524b6fd7e36dc13b1d12  gcc/rust/rust-location.h
  b45417b3f3262f4edcbe101bd348c5a0  gcc/rust/rust-object-export.cc
! 1b26bed54fa5b3bb2c772f7a6da34d38  gcc/rust/rust-object-export.h
! 941bc35d26a27390ef5e9d6d6601d95b  gcc/rust/rust-session-manager.cc
! a7af0a1bf8bdd047d3f547dc06025a7c  gcc/rust/rust-session-manager.h
! a9fda4ada51904c14187c1a3946d14db  gcc/rust/rust-system.h
  ac420eeb07d0fa93baebb7cfaafe3a69  gcc/rust/rust-target-def.h
  079faeff0bcbd134ce19509fd4a7c49c  gcc/rust/rust-target.def
! 63679c7eca307c9c18f49e9a3354179e  gcc/rust/rust-target.h
  969d20d0da5b3346de516605617a3bfd  gcc/rust/rustspec.cc
! 9eaa64e5091962b1045f85bddc63b38d  gcc/rust/typecheck/rust-autoderef.cc
  5e6eda346fc227aa5e228ac35cda0962  gcc/rust/typecheck/rust-autoderef.h
! 27e888a9f2e000d67b390f25f144d6b4  gcc/rust/typecheck/rust-casts.cc
! 822424b8843ea48f9970a1958aa1c573  gcc/rust/typecheck/rust-casts.h
! c3d3d9e9a951f0768e898841a6be73dc  gcc/rust/typecheck/rust-coercion.cc
  e26acd7744fd715da289a7b3b2bd9238  gcc/rust/typecheck/rust-coercion.h
! 71a27a1333be3763aa4f4380e6155757  gcc/rust/typecheck/rust-hir-dot-operator.cc
! 1773e84737ed02ec11bbe4f87fe4a337  gcc/rust/typecheck/rust-hir-dot-operator.h
! d331d3128928728fa7025c2c434fa401  gcc/rust/typecheck/rust-hir-inherent-impl-overlap.h
! b71d1894aee9f6af868a3aef0d8d0031  gcc/rust/typecheck/rust-hir-path-probe.cc
! b661f0e6dfd014248c222b72a297ff16  gcc/rust/typecheck/rust-hir-path-probe.h
! 590ce1abda648d337b04888e4a64df7d  gcc/rust/typecheck/rust-hir-trait-reference.cc
! 3964dbf6fad421c23e77d64191079052  gcc/rust/typecheck/rust-hir-trait-reference.h
! c97f4d78aea36b0d75dc4fc4074f85fd  gcc/rust/typecheck/rust-hir-trait-resolve.cc
  50b4be7ea23eb179a814bfd833fefdf1  gcc/rust/typecheck/rust-hir-trait-resolve.h
! eec3e59a2683fb56b65c91f690e4e3ff  gcc/rust/typecheck/rust-hir-type-bounds.h
! aaececaebcee3c386257099aec459b4b  gcc/rust/typecheck/rust-hir-type-check-base.cc
! c596645605903d78c9cea752caa5cdfd  gcc/rust/typecheck/rust-hir-type-check-base.h
! 3d225677bee70890559491e7d40ae60f  gcc/rust/typecheck/rust-hir-type-check-enumitem.cc
  14b730fba367cec7b80f769e886344ae  gcc/rust/typecheck/rust-hir-type-check-enumitem.h
! 468b2bc2738162754c20c02da9cf4b1e  gcc/rust/typecheck/rust-hir-type-check-expr.cc
! 4cf1c3b9f9b63532ee12deb4b721ce2e  gcc/rust/typecheck/rust-hir-type-check-expr.h
! 828a94d166508b9f4c30516e90b3b91e  gcc/rust/typecheck/rust-hir-type-check-implitem.cc
  ebae3826def3f8d019935ea950afaf9a  gcc/rust/typecheck/rust-hir-type-check-implitem.h
! 51bf8adb53d4265de90ba6f7c80cab33  gcc/rust/typecheck/rust-hir-type-check-item.cc
! d54dafd540ca9b9653d2118f81154a3c  gcc/rust/typecheck/rust-hir-type-check-item.h
! 9df01c334e282c40904fdbb525b0fa60  gcc/rust/typecheck/rust-hir-type-check-path.cc
! 098baa621eea0b01c2a3dea4f600eab5  gcc/rust/typecheck/rust-hir-type-check-pattern.cc
  f442f3356acfa69e70087f4d0a915461  gcc/rust/typecheck/rust-hir-type-check-pattern.h
! 4df5a5ce21e1c0d7a39339334871cddc  gcc/rust/typecheck/rust-hir-type-check-stmt.cc
  8cf233a69b1af8083328209d200778c1  gcc/rust/typecheck/rust-hir-type-check-stmt.h
  0817c84983af9fc42e486f3832232669  gcc/rust/typecheck/rust-hir-type-check-struct-field.h
! 6e67425de19d69fef927363f8a1989c0  gcc/rust/typecheck/rust-hir-type-check-struct.cc
! 6439b4faecca80aa4bf8c7757eea3423  gcc/rust/typecheck/rust-hir-type-check-type.cc
  4e713ea4973fa9fb07c655c889db01ce  gcc/rust/typecheck/rust-hir-type-check-type.h
! 3d24d22de71b428e0bdf521ca8abe5d4  gcc/rust/typecheck/rust-hir-type-check.cc
! 40ef43d0dc29022475cca03aa08af379  gcc/rust/typecheck/rust-hir-type-check.h
! ba87acd03224b566834708c42b2169c1  gcc/rust/typecheck/rust-substitution-mapper.cc
! 37b3e4dac47e3a433a147442253de982  gcc/rust/typecheck/rust-substitution-mapper.h
! 662bd6ed70977d44ce877576a8c8c7a4  gcc/rust/typecheck/rust-type-util.cc
! d3b79fb01a0fd4bb19b73ee1c016d112  gcc/rust/typecheck/rust-type-util.h
! 70471dc7a8359e001f3683dc9cbc5634  gcc/rust/typecheck/rust-typecheck-context.cc
! 8f217f625ae41436df063f5031c97269  gcc/rust/typecheck/rust-tyty-bounds.cc
  888c9672c03e4f2a8315512a173265b6  gcc/rust/typecheck/rust-tyty-bounds.h
! 329562ca27b88aee957457b0d5d392a6  gcc/rust/typecheck/rust-tyty-call.cc
! a8f872bb92a2e8a8a702a090668861ea  gcc/rust/typecheck/rust-tyty-call.h
! 30e1a1ba1e6b793720fb14578b21999b  gcc/rust/typecheck/rust-tyty-cmp.h
  a38838838003c6551067e8b34f582208  gcc/rust/typecheck/rust-tyty-region.h
! 0f50d31f0e682ccef5641dc2efb43677  gcc/rust/typecheck/rust-tyty-subst.cc
! 9e117dd771f2b30b525f8a564caa522f  gcc/rust/typecheck/rust-tyty-subst.h
! 4d7d0f4a3bba36d4c21e9caa1c1ac6eb  gcc/rust/typecheck/rust-tyty-util.cc
! 620399e8e1661caca2e2b04745fafe2c  gcc/rust/typecheck/rust-tyty-util.h
! 2d3f92f6487ecb09f07c1fd6acde77bd  gcc/rust/typecheck/rust-tyty-variance-analysis-private.h
! c6badc37da1332bf42bbddb61c5d450f  gcc/rust/typecheck/rust-tyty-variance-analysis.cc
! f6cdbe15ca9ec0060eb65770bd676761  gcc/rust/typecheck/rust-tyty-variance-analysis.h
! 3a8c3ea0e23f92381ea99572cccb9fb6  gcc/rust/typecheck/rust-tyty-visitor.h
! 92c0f31015e14f8cd101c86fd277276b  gcc/rust/typecheck/rust-tyty.cc
! 22867664fe48722d3ebd546ecb390811  gcc/rust/typecheck/rust-tyty.h
! c3208d6c13aecf6b4e214b68f867d845  gcc/rust/typecheck/rust-unify.cc
! a4e6d921b501bb5cd0da6b450fe1fa06  gcc/rust/typecheck/rust-unify.h
  0d030f94fc3d0037a80c12aee3829760  gcc/rust/util/bi-map.h
  2293b9580441efb8471b45881435c279  gcc/rust/util/expected.h
  a3d3418d24c9d7a6b012a5f0244c1cc5  gcc/rust/util/fnv-hash.h
  75694e0b09110145bd844f6fc79dded8  gcc/rust/util/make-rust-unicode.py
! 57af0f7f5350b1109cbe06ab044a60a7  gcc/rust/util/optional.h
  28960566056dffb6dd86b0c3ad60bf39  gcc/rust/util/rust-abi.cc
! 11f0015cc8736c6f93529f83c406a684  gcc/rust/util/rust-abi.h
! a483117363100e08a3762c90562bad45  gcc/rust/util/rust-attribute-values.h
! ba3e9bab6e6a2bc05e5a27124216587b  gcc/rust/util/rust-attributes.cc
! 15adcd4e073744d16653cab74ced227a  gcc/rust/util/rust-attributes.h
  bca452f773154b078653dfe7acf7df6d  gcc/rust/util/rust-base62.cc
! 4a905a6aca319c88269b29d059013e4b  gcc/rust/util/rust-base62.h
  52e606eb44d3f26e1fa4e3701bf1ffe8  gcc/rust/util/rust-buffered-queue.h
! 0384207135b7589e52ab79705bc659a5  gcc/rust/util/rust-canonical-path.h
  c07d4ef244db3f6ca995d16a97dde4a4  gcc/rust/util/rust-codepoint.h
  17f2c1b0a221d2381d5fa03056c86a2a  gcc/rust/util/rust-common.h
  dd3df9586c87ea18be777db0bf7d0cf2  gcc/rust/util/rust-dir-owner.cc
! 56ee8a6fca03a3c26055287185afe008  gcc/rust/util/rust-dir-owner.h
  48ccf41bdee2df34cf4c36f1b046ff3a  gcc/rust/util/rust-dump.h
  82c8d06a3e8bcf1b97510bdac619ec0a  gcc/rust/util/rust-edition.cc
! 11e1ff46cabba89ca474d38cdc46bfd0  gcc/rust/util/rust-edition.h
! faa4bb0ae3a88634c57259f525ed8d16  gcc/rust/util/rust-hir-map.cc
! 8774c6d7a9827c9dc74806428dbd9036  gcc/rust/util/rust-hir-map.h
  88c8ae4d133ecd3a043fc12f4fe69091  gcc/rust/util/rust-identifier.h
  b886fd2a84b8b974a759d58aa85f9868  gcc/rust/util/rust-inline-visitor.h
  c8834665fd10b27b0d346b0feb8e0c75  gcc/rust/util/rust-keyword-values.cc
--- 8213,8398 ----
  807eed2e2680f94f8f1dcc296c33f695  gcc/rust/hir/tree/rust-hir-type-no-bounds.h
  c143cea24f5c3be477e96312dd276c58  gcc/rust/hir/tree/rust-hir-type.cc
  ba332eda5c2e84ae8a3591891ae7adcd  gcc/rust/hir/tree/rust-hir-type.h
! 32f0297511ca35b0e5d9d95841b7cb38  gcc/rust/hir/tree/rust-hir-visibility.h
  a9ce4bb18277085ac0f36fce0ab7f87f  gcc/rust/hir/tree/rust-hir-visitable.h
! 34acb21cd59a431d4670fe986d6d9167  gcc/rust/hir/tree/rust-hir-visitor.cc
! 3b9ccf4f4b6915dc29b145025d06e7ba  gcc/rust/hir/tree/rust-hir-visitor.h
! 94d18a53e8657c71cc604eb2fc540205  gcc/rust/hir/tree/rust-hir.cc
  6ea149cdd32444b93f142193c19c3930  gcc/rust/hir/tree/rust-hir.h
  fa7c267c70f0094382b7b3df35e83412  gcc/rust/lang-specs.h
! e090436833a0ec80b591d0e2b8d0276b  gcc/rust/lang.opt
  19c784c2297961588e002876d94ceea4  gcc/rust/lang.opt.urls
  4f1a01d5a1d9c4db6498642d7194185e  gcc/rust/lex/rust-input-source.h
! 682147a2ca256e569556246c3ea54e11  gcc/rust/lex/rust-lex.cc
! dff64547611254963c80197402f43560  gcc/rust/lex/rust-lex.h
! da111ac050690bd95b3f9b56dd882300  gcc/rust/lex/rust-token.cc
! 58a3e77a4ef61311f6264c776402bed6  gcc/rust/lex/rust-token.h
  fe40f8618a9f5a5f007bc1a81fe45d3a  gcc/rust/logo.png
! 8d4263de9b0c6741befffe1392cfacca  gcc/rust/metadata/rust-export-metadata.cc
  12ec7837566ee621427ed56d94422509  gcc/rust/metadata/rust-export-metadata.h
  2edf1c3452ec2edc627904170818d7fe  gcc/rust/metadata/rust-extern-crate.cc
  998f5953d66b13c97f7488faa8c315ac  gcc/rust/metadata/rust-extern-crate.h
! 3c95bac9fe222be525b70cdb0ef90efb  gcc/rust/metadata/rust-import-archive.cc
  8e402bbcc2d35dcfc7d619bb67a37551  gcc/rust/metadata/rust-imports.cc
! 659356fda258855d3d26c1eff1e24215  gcc/rust/metadata/rust-imports.h
  6157b499aceab0b9b632eea936bc0f0d  gcc/rust/parse/rust-cfg-parser.cc
! dcbc600defe89f418c72fb56de980c97  gcc/rust/parse/rust-cfg-parser.h
! d32fa6f6e6b4f85681679a48b9143b49  gcc/rust/parse/rust-parse-impl-lexer.cc
! 512507c7858c53e9bcb25b431891ced3  gcc/rust/parse/rust-parse-impl-macro.cc
! eadcb6e38b643a9b344ba845b7eaa4b0  gcc/rust/parse/rust-parse-impl-proc-macro.cc
! 8a84eada600c46c52a0667578ffdb87e  gcc/rust/parse/rust-parse-impl.h
! d60ac257492f0b2d13c8c305707dd04a  gcc/rust/parse/rust-parse.cc
! 1332d77a3ddb2a72987ee982207eabfd  gcc/rust/parse/rust-parse.h
! 2231a11c214aca73dc0b818d237de36c  gcc/rust/resolve/rust-ast-resolve-base.cc
! c8435e00d605125b87b1c2c9c259013c  gcc/rust/resolve/rust-ast-resolve-base.h
! 2e415cfc9ca6fde25ae39390cb3e87f4  gcc/rust/resolve/rust-ast-resolve-expr.cc
! 3be4db578f405ef5c2461ab8809d5144  gcc/rust/resolve/rust-ast-resolve-expr.h
  8f68f019c34cda122cc27f3b94c06274  gcc/rust/resolve/rust-ast-resolve-implitem.h
! 8127df5d45208feade1828d4b5efba3b  gcc/rust/resolve/rust-ast-resolve-item.cc
! 8bd4783820bdf932104dde419edee6cb  gcc/rust/resolve/rust-ast-resolve-item.h
  8cb99c5ae5b41ce08b5970a0a95c086c  gcc/rust/resolve/rust-ast-resolve-path.cc
  a8c2cd13a9e17fcd77075f298ece9bbc  gcc/rust/resolve/rust-ast-resolve-path.h
! f3b459c1c08e12f8aa4336938eef2339  gcc/rust/resolve/rust-ast-resolve-pattern.cc
  cc6a86d6d4f3b82cb0c90909786f72d0  gcc/rust/resolve/rust-ast-resolve-pattern.h
  6fb9870e2dc236966f72710990ede295  gcc/rust/resolve/rust-ast-resolve-stmt.cc
! a01c8629827de508030d8ec5ada0f4f6  gcc/rust/resolve/rust-ast-resolve-stmt.h
  469f217b1a5f7e8b64533a460dd7d1b5  gcc/rust/resolve/rust-ast-resolve-struct-expr-field.cc
  d6e1a39ea6b2856a3ceb1f1ad21da843  gcc/rust/resolve/rust-ast-resolve-struct-expr-field.h
  ef9539cd1ebecb0d7b169dbc11cd1bda  gcc/rust/resolve/rust-ast-resolve-toplevel.h
! 1ee9649dda0c5d95044ed73901dd5def  gcc/rust/resolve/rust-ast-resolve-type.cc
  50092e99e4c7ac9c221561d170b60ad2  gcc/rust/resolve/rust-ast-resolve-type.h
! 9813e61543cff199a353ad5f127144d7  gcc/rust/resolve/rust-ast-resolve.cc
  d5113906116ffd33fb4c45243a97fb67  gcc/rust/resolve/rust-ast-resolve.h
! b6b01419e9dcc7774b5791b9a708466a  gcc/rust/resolve/rust-default-resolver.cc
! 4320f2346a3c6f9c6e6bdec7e1901019  gcc/rust/resolve/rust-default-resolver.h
! 0346cc6ed444b1ef153fd6afeebcc812  gcc/rust/resolve/rust-early-name-resolver-2.0.cc
! 12c6430a3b99faca5ec6224c5b3fe509  gcc/rust/resolve/rust-early-name-resolver-2.0.h
! 30e0ef18177e2657adfd032c3c7eb9a3  gcc/rust/resolve/rust-early-name-resolver.cc
! a3a4b63c71c3919a1459476032f0252e  gcc/rust/resolve/rust-early-name-resolver.h
! edbd1bb79c5413f7f12c3a446bce05c1  gcc/rust/resolve/rust-finalize-imports-2.0.cc
! 86cd9479354d4646ddd9942a1920cb86  gcc/rust/resolve/rust-finalize-imports-2.0.h
  dec0e54b8d4239c44cd88b409b7e74c3  gcc/rust/resolve/rust-forever-stack.cc
! 17b4b5467848eca6a46985d6947d3b64  gcc/rust/resolve/rust-forever-stack.h
! 8656851b6c36eebeebd4f794157501e7  gcc/rust/resolve/rust-forever-stack.hxx
  c37894be52ba5cc4406613a60ba6b289  gcc/rust/resolve/rust-ice-finalizer.cc
  f022a4ee2cba026a3593bb6b701ae2f8  gcc/rust/resolve/rust-ice-finalizer.h
  98f1d330caf4f27bd13e2a60d632182b  gcc/rust/resolve/rust-immutable-name-resolution-context.cc
  927471efaee1f85624e6e7eb00584819  gcc/rust/resolve/rust-immutable-name-resolution-context.h
! 0cdc6d842684ce862280799d4214712e  gcc/rust/resolve/rust-late-name-resolver-2.0.cc
! b502be2edccb38a6d04184c085c753c1  gcc/rust/resolve/rust-late-name-resolver-2.0.h
! dac37149763dc8ccca753d54554514f6  gcc/rust/resolve/rust-name-resolution-context.cc
! 3ea0376c3b22933ac67896d7cba8ad16  gcc/rust/resolve/rust-name-resolution-context.h
  b6983f07d81272720902833f46969469  gcc/rust/resolve/rust-name-resolver.cc
  be000221300e27326827abc1e0cad277  gcc/rust/resolve/rust-name-resolver.h
  5bd00178d4bbda0cedb3410c06aa647b  gcc/rust/resolve/rust-rib.cc
! 37ca9c7e7f101104c8a4921c7898d613  gcc/rust/resolve/rust-rib.h
! ab968ccec019fc6559d933331d01cff5  gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc
! fd3aa9a65643d53243d4e7204b4ea8c7  gcc/rust/resolve/rust-toplevel-name-resolver-2.0.h
! 0a58d9dc2d9b5af1e354373e521b07c2  gcc/rust/rust-attribs.cc
! 43e541eaec11c49ae48529cf820511da  gcc/rust/rust-backend.h
! 3cb9032dbd0f19a697c1bab7cda98bfa  gcc/rust/rust-diagnostics.cc
! 26cc49e4c91f569fdcc4be2e38e4cc63  gcc/rust/rust-diagnostics.h
  a29710a52aae45b7a844ae73c125e33f  gcc/rust/rust-error-codes.def
! 04ad67c9ff5f3b84d4ecb5d6390dd6f8  gcc/rust/rust-gcc.cc
  65922743531bd0f8eff57efd205900a9  gcc/rust/rust-gcc.h
! 86094a916caa45171c1b82fc09254027  gcc/rust/rust-lang.cc
  bcf57cedfa84f01311473b51a88f932c  gcc/rust/rust-linemap.cc
  a591947189b9249649cd9d0d05bb6f3b  gcc/rust/rust-linemap.h
  44c864a134b8524b6fd7e36dc13b1d12  gcc/rust/rust-location.h
  b45417b3f3262f4edcbe101bd348c5a0  gcc/rust/rust-object-export.cc
! c4892cc98a9ac5c00fb35b20592c0a82  gcc/rust/rust-object-export.h
! dcde5fb487c3b15b0d4dce6ae15d1c98  gcc/rust/rust-session-manager.cc
! 036d9a7a214c0a73976981f212ca0866  gcc/rust/rust-session-manager.h
! 567d0d8fd5f4f8ae4496a4212922201d  gcc/rust/rust-system.h
  ac420eeb07d0fa93baebb7cfaafe3a69  gcc/rust/rust-target-def.h
  079faeff0bcbd134ce19509fd4a7c49c  gcc/rust/rust-target.def
! 78f9905f32e418612f7e3b9f0557217f  gcc/rust/rust-target.h
  969d20d0da5b3346de516605617a3bfd  gcc/rust/rustspec.cc
! ef695df53407f5a9855af773c34bb2a1  gcc/rust/typecheck/rust-autoderef.cc
  5e6eda346fc227aa5e228ac35cda0962  gcc/rust/typecheck/rust-autoderef.h
! fdf38e077e6653efdc043cf9a602b4d7  gcc/rust/typecheck/rust-casts.cc
! d33794099c6af3bc0595dbb4e77e415f  gcc/rust/typecheck/rust-casts.h
! f50fa03161a82a2216a1bc1cebf988d3  gcc/rust/typecheck/rust-coercion.cc
  e26acd7744fd715da289a7b3b2bd9238  gcc/rust/typecheck/rust-coercion.h
! ae46867451d353ef46bbee575dc8e949  gcc/rust/typecheck/rust-hir-dot-operator.cc
! 858b677b5acaadf89c3a6804d0e80178  gcc/rust/typecheck/rust-hir-dot-operator.h
! f072dca1aa4f27216c23a457a9199152  gcc/rust/typecheck/rust-hir-inherent-impl-overlap.h
! 4bfda607fe6897e2fb51660447f6e53a  gcc/rust/typecheck/rust-hir-path-probe.cc
! 1fada070804e23a951644edf6b3c1d3d  gcc/rust/typecheck/rust-hir-path-probe.h
! ecf75c0b1fe9d0c8d8ea76beb7724553  gcc/rust/typecheck/rust-hir-trait-reference.cc
! d66ea5137022ea56053a46e7c3704397  gcc/rust/typecheck/rust-hir-trait-reference.h
! 0d6b05a8bb3b1bef6e8ffcddb4184764  gcc/rust/typecheck/rust-hir-trait-resolve.cc
  50b4be7ea23eb179a814bfd833fefdf1  gcc/rust/typecheck/rust-hir-trait-resolve.h
! 13aca537eec3f98b3aa8f3e9657adc17  gcc/rust/typecheck/rust-hir-type-bounds.h
! 5b5ffd193a34ba7f25c8cf7c26628522  gcc/rust/typecheck/rust-hir-type-check-base.cc
! 288c2e01e024cba4622c46ac6c6f9bad  gcc/rust/typecheck/rust-hir-type-check-base.h
! 3f733188e36db57e34d01019aad0aeac  gcc/rust/typecheck/rust-hir-type-check-enumitem.cc
  14b730fba367cec7b80f769e886344ae  gcc/rust/typecheck/rust-hir-type-check-enumitem.h
! 2aad25141e49cda9d718edd833ace841  gcc/rust/typecheck/rust-hir-type-check-expr.cc
! 59f5cb0ba8dac0fa595b930d70f6a0b4  gcc/rust/typecheck/rust-hir-type-check-expr.h
! 645f4c08aad98d36cf930e47187efced  gcc/rust/typecheck/rust-hir-type-check-implitem.cc
  ebae3826def3f8d019935ea950afaf9a  gcc/rust/typecheck/rust-hir-type-check-implitem.h
! 0f569c086f1097da36429cdb05305fc3  gcc/rust/typecheck/rust-hir-type-check-item.cc
! b884a7eb4628421bd0b7c31329258b8c  gcc/rust/typecheck/rust-hir-type-check-item.h
! 3d2df003e91abb13c3a18145e32e4d72  gcc/rust/typecheck/rust-hir-type-check-path.cc
! e9430b2db11e4359fff753494f256121  gcc/rust/typecheck/rust-hir-type-check-pattern.cc
  f442f3356acfa69e70087f4d0a915461  gcc/rust/typecheck/rust-hir-type-check-pattern.h
! 7dfde3f8d5f8afa537706a47a4204575  gcc/rust/typecheck/rust-hir-type-check-stmt.cc
  8cf233a69b1af8083328209d200778c1  gcc/rust/typecheck/rust-hir-type-check-stmt.h
  0817c84983af9fc42e486f3832232669  gcc/rust/typecheck/rust-hir-type-check-struct-field.h
! 496abbb2c8ac224ee6d58cbbef9c98b3  gcc/rust/typecheck/rust-hir-type-check-struct.cc
! c1b97fbe32b215ed40fc8c25aa2ff09e  gcc/rust/typecheck/rust-hir-type-check-type.cc
  4e713ea4973fa9fb07c655c889db01ce  gcc/rust/typecheck/rust-hir-type-check-type.h
! 333a8adbeeb9d4d88d61c265879e022a  gcc/rust/typecheck/rust-hir-type-check.cc
! 56e01e94dbff3e8636e68e613618fec8  gcc/rust/typecheck/rust-hir-type-check.h
! 33e4a0f496a3ac195ab6532776b73153  gcc/rust/typecheck/rust-substitution-mapper.cc
! 28e39401e4d451291f369daf16612439  gcc/rust/typecheck/rust-substitution-mapper.h
! 32573a56c5a5d7e0661b10cd21d3e538  gcc/rust/typecheck/rust-type-util.cc
! c6009c201c635a534e03f9537d7f6156  gcc/rust/typecheck/rust-type-util.h
! f3f8d312b8f24b905036fe9b3613e8a2  gcc/rust/typecheck/rust-typecheck-context.cc
! bb9ce416c059f4c4bced027eadacd003  gcc/rust/typecheck/rust-tyty-bounds.cc
  888c9672c03e4f2a8315512a173265b6  gcc/rust/typecheck/rust-tyty-bounds.h
! 77c50800976863232115ea757e68388b  gcc/rust/typecheck/rust-tyty-call.cc
! d47d47af969d983460e32db4067a011d  gcc/rust/typecheck/rust-tyty-call.h
! 781f9faa81a60d3ee7ea2982c31f938a  gcc/rust/typecheck/rust-tyty-cmp.h
  a38838838003c6551067e8b34f582208  gcc/rust/typecheck/rust-tyty-region.h
! 2626471a9937776d3505f3779d298d3b  gcc/rust/typecheck/rust-tyty-subst.cc
! 54973ca4009bf6087ad1cacc97a3dc36  gcc/rust/typecheck/rust-tyty-subst.h
! 377a200ab9d0c9f1d110b0b775d157db  gcc/rust/typecheck/rust-tyty-util.cc
! 367d76a00d05a82f8c2b5599cf359900  gcc/rust/typecheck/rust-tyty-util.h
! 543855741d700098d942ba3d9231301f  gcc/rust/typecheck/rust-tyty-variance-analysis-private.h
! fef0a04b266e8a726799600ba5d638fb  gcc/rust/typecheck/rust-tyty-variance-analysis.cc
! d745c17e84fc1621534e477f38dac840  gcc/rust/typecheck/rust-tyty-variance-analysis.h
! e02fb0ccc693b57556ac2a79632d7d2f  gcc/rust/typecheck/rust-tyty-visitor.h
! c61b7e2b2dac72bc77bd590cbac9d014  gcc/rust/typecheck/rust-tyty.cc
! 8cd3ccdac2b89488f2413b34d46cc8dd  gcc/rust/typecheck/rust-tyty.h
! 3efef3f29985e7eb4eda25f7338a232a  gcc/rust/typecheck/rust-unify.cc
! 0bb7a11b4bd0200fc019721dc3f2667d  gcc/rust/typecheck/rust-unify.h
  0d030f94fc3d0037a80c12aee3829760  gcc/rust/util/bi-map.h
  2293b9580441efb8471b45881435c279  gcc/rust/util/expected.h
  a3d3418d24c9d7a6b012a5f0244c1cc5  gcc/rust/util/fnv-hash.h
  75694e0b09110145bd844f6fc79dded8  gcc/rust/util/make-rust-unicode.py
! 5fab4ccaa5f132cbe9ca8f09047732ad  gcc/rust/util/optional.h
  28960566056dffb6dd86b0c3ad60bf39  gcc/rust/util/rust-abi.cc
! a85e112c6426c604dd9a3a9af712e53b  gcc/rust/util/rust-abi.h
! 1c751a64890b3cec625f216844b15e77  gcc/rust/util/rust-attribute-values.h
! da558d995f51e32383a86e153a061ecd  gcc/rust/util/rust-attributes.cc
! b218d550ab3e001996e0a6e5ff280e81  gcc/rust/util/rust-attributes.h
  bca452f773154b078653dfe7acf7df6d  gcc/rust/util/rust-base62.cc
! 487f155c2b6c6e0bd786e45db927798e  gcc/rust/util/rust-base62.h
  52e606eb44d3f26e1fa4e3701bf1ffe8  gcc/rust/util/rust-buffered-queue.h
! 94ab22ffac2d84b52bdfa80c35617b64  gcc/rust/util/rust-canonical-path.h
  c07d4ef244db3f6ca995d16a97dde4a4  gcc/rust/util/rust-codepoint.h
  17f2c1b0a221d2381d5fa03056c86a2a  gcc/rust/util/rust-common.h
  dd3df9586c87ea18be777db0bf7d0cf2  gcc/rust/util/rust-dir-owner.cc
! fec387d494bc210ce15deb542e9f7aa1  gcc/rust/util/rust-dir-owner.h
  48ccf41bdee2df34cf4c36f1b046ff3a  gcc/rust/util/rust-dump.h
  82c8d06a3e8bcf1b97510bdac619ec0a  gcc/rust/util/rust-edition.cc
! 312caaf1a11f85ba3561fcdc63801d54  gcc/rust/util/rust-edition.h
! 1f3238d0a4045f91fbdffd311f703e08  gcc/rust/util/rust-ggc.cc
! 1e0f4eb2eb63dc12ad40eb168f58141f  gcc/rust/util/rust-ggc.h
! 4ac3dc708bf421d1499e952f62377a3c  gcc/rust/util/rust-hir-map.cc
! a4737c9f24f28d26263a0aa5525aed09  gcc/rust/util/rust-hir-map.h
  88c8ae4d133ecd3a043fc12f4fe69091  gcc/rust/util/rust-identifier.h
  b886fd2a84b8b974a759d58aa85f9868  gcc/rust/util/rust-inline-visitor.h
  c8834665fd10b27b0d346b0feb8e0c75  gcc/rust/util/rust-keyword-values.cc
*************** f1156b2925b7a7097ec4094d5b461ec8  gcc/ru
*** 8378,8396 ****
  aeeace423f6e82b5140b307df087a853  gcc/rust/util/rust-mapping-common.h
  8efe8f2ae6c529f6e8a316637b23263c  gcc/rust/util/rust-operators.h
  3ab599b73cd39c762daa8c80df124efe  gcc/rust/util/rust-punycode.cc
! 68b71ecccbabadda5d32ac0934a0e34e  gcc/rust/util/rust-punycode.h
  2c0a250a95fecf31988f998f7aac2872  gcc/rust/util/rust-stacked-contexts.h
! 720815a5538cf011b1cdddb23abb4042  gcc/rust/util/rust-token-converter.cc
! 93b250f2f1d1017ab24eebe5321bd9ab  gcc/rust/util/rust-token-converter.h
  e9a5e546c32155ec1d162baf906b3173  gcc/rust/util/rust-unicode-data.h
  160750d9c11bf6ee2c07a88f6b10326f  gcc/rust/util/rust-unicode.cc
! 4373f635e04e2dd97d27f20b91b8cb58  gcc/rust/util/rust-unicode.h
  27b9ac229553b9349504ebe465280523  gcc/rust/util/rust-unwrap-segment.cc
! 2d5ca2bf8e53a79096bc14f28759c005  gcc/rust/util/rust-unwrap-segment.h
  1157834f858df87f4cff12c780fe7030  gcc/sancov.cc
  f47b1babbf39168c2829bbc0997f6b9b  gcc/sanitizer.def
  1c4a31054492029cadf12999aee53d81  gcc/sanopt.cc
! 9ecda8b89aeddbb95a665a7fc6a575e2  gcc/sarif-replay.cc
  a92419791c8e8d842c6ef029d4537463  gcc/sarif-spec-urls.def
  31050442ff986af301d1822bb48a2dc0  gcc/sbitmap.cc
  17496ea3285b5b8563702a8c44caa8bd  gcc/sbitmap.h
--- 8402,8420 ----
  aeeace423f6e82b5140b307df087a853  gcc/rust/util/rust-mapping-common.h
  8efe8f2ae6c529f6e8a316637b23263c  gcc/rust/util/rust-operators.h
  3ab599b73cd39c762daa8c80df124efe  gcc/rust/util/rust-punycode.cc
! cd4867be3dbfc626ab4ed34546e60a13  gcc/rust/util/rust-punycode.h
  2c0a250a95fecf31988f998f7aac2872  gcc/rust/util/rust-stacked-contexts.h
! 1409fd43392d130dc77c0b64b6e43724  gcc/rust/util/rust-token-converter.cc
! 44fad7e6f643cffd77b625c32c20515c  gcc/rust/util/rust-token-converter.h
  e9a5e546c32155ec1d162baf906b3173  gcc/rust/util/rust-unicode-data.h
  160750d9c11bf6ee2c07a88f6b10326f  gcc/rust/util/rust-unicode.cc
! b4f0c77852dde185d8745c16c0f82ac0  gcc/rust/util/rust-unicode.h
  27b9ac229553b9349504ebe465280523  gcc/rust/util/rust-unwrap-segment.cc
! 3ead66d97169e8f089cbf8ddbeb43d4e  gcc/rust/util/rust-unwrap-segment.h
  1157834f858df87f4cff12c780fe7030  gcc/sancov.cc
  f47b1babbf39168c2829bbc0997f6b9b  gcc/sanitizer.def
  1c4a31054492029cadf12999aee53d81  gcc/sanopt.cc
! 8aa1f45fafd5efda7a2a1b244fca6aaa  gcc/sarif-replay.cc
  a92419791c8e8d842c6ef029d4537463  gcc/sarif-spec-urls.def
  31050442ff986af301d1822bb48a2dc0  gcc/sbitmap.cc
  17496ea3285b5b8563702a8c44caa8bd  gcc/sbitmap.h
*************** fdc04e5af7ee387dce07c6ba9a99eaa8  gcc/se
*** 8421,8427 ****
  50d9999185408bcae454174489317b68  gcc/signop.h
  97a13c24fa48c474198b5767f228fd93  gcc/simple-diagnostic-path.cc
  4daee3acc61f789d9c4c04a27a5bb351  gcc/simple-diagnostic-path.h
! 92e54e2f224e944ad238cd2219927fd0  gcc/simplify-rtx.cc
  456e0937ae4b3a0f49fd44fb0d05eb52  gcc/sort.cc
  599fc125220850c86939202313a6f733  gcc/sparseset.cc
  430469e71b555502fe14de847bb52093  gcc/sparseset.h
--- 8445,8451 ----
  50d9999185408bcae454174489317b68  gcc/signop.h
  97a13c24fa48c474198b5767f228fd93  gcc/simple-diagnostic-path.cc
  4daee3acc61f789d9c4c04a27a5bb351  gcc/simple-diagnostic-path.h
! 3d487989075638dbe2a319d9a58d84c9  gcc/simplify-rtx.cc
  456e0937ae4b3a0f49fd44fb0d05eb52  gcc/sort.cc
  599fc125220850c86939202313a6f733  gcc/sparseset.cc
  430469e71b555502fe14de847bb52093  gcc/sparseset.h
*************** c880657161e4078ba5e385691b6c5328  gcc/ta
*** 8475,8481 ****
  143ba02938f6a6df9b9495eb6bce4be1  gcc/targhooks.cc
  7b362870a640a56a8b05ca807b02f07d  gcc/targhooks.h
  f39fcaa8197187283ccfed40107b426d  gcc/testsuite/.gitattributes
! 01bd8e20fb4588f26b700c9e5154a406  gcc/testsuite/ChangeLog
  47e8e29b649ead73b8a1e4797da470ed  gcc/testsuite/ChangeLog-1993-2007
  35198a9e4fd31b935de8789faabf3351  gcc/testsuite/ChangeLog-2008
  0f19934540750356d1b91595cebfd9a8  gcc/testsuite/ChangeLog-2009
--- 8499,8505 ----
  143ba02938f6a6df9b9495eb6bce4be1  gcc/targhooks.cc
  7b362870a640a56a8b05ca807b02f07d  gcc/targhooks.h
  f39fcaa8197187283ccfed40107b426d  gcc/testsuite/.gitattributes
! a4b94cc44a9fda9036596133de072037  gcc/testsuite/ChangeLog
  47e8e29b649ead73b8a1e4797da470ed  gcc/testsuite/ChangeLog-1993-2007
  35198a9e4fd31b935de8789faabf3351  gcc/testsuite/ChangeLog-2008
  0f19934540750356d1b91595cebfd9a8  gcc/testsuite/ChangeLog-2009
*************** fabe4f563e2a6b04ace68b9b7e010e6b  gcc/te
*** 17712,17717 ****
--- 17736,17745 ----
  a81fada6339487ed882e8189aae31718  gcc/testsuite/c-c++-common/asan/pr120608-2.c
  4bf79f26fda6692969b7b7acd3996a01  gcc/testsuite/c-c++-common/asan/pr120608-3.c
  bfeb7c22d0f9799de47d33dd1bcdde09  gcc/testsuite/c-c++-common/asan/pr120608-4.c
+ b3355bfb51e6a87d724e18d36b9ac8b6  gcc/testsuite/c-c++-common/asan/pr121389-1.c
+ eb77e0bf098a564e4879891993b2971a  gcc/testsuite/c-c++-common/asan/pr121389-2.c
+ deda343ed2f61c0d2a95534b8cfcec30  gcc/testsuite/c-c++-common/asan/pr121389-3.c
+ c4e5247a7ee4e73d4190e5abea3941e0  gcc/testsuite/c-c++-common/asan/pr121389-4.c
  9a0dd3dcef02945c8967f40a29316496  gcc/testsuite/c-c++-common/asan/pr56330.c
  202bae43b2843228776d43c8d07c92c8  gcc/testsuite/c-c++-common/asan/pr59029.c
  65128b17436f6406d9e224257030e000  gcc/testsuite/c-c++-common/asan/pr59063-1.c
*************** bcc545fe674e92adb4edf8ad7ebde228  gcc/te
*** 17920,17925 ****
--- 17948,17955 ----
  da9cfacd3cd947bf06e294ae11bb194d  gcc/testsuite/c-c++-common/cpp/Wtrailing-whitespace-8.c
  8347983d23503f18cfe1e5bbcbc2c205  gcc/testsuite/c-c++-common/cpp/Wtrailing-whitespace-9.c
  687c1e4592b3188bd13763778302028a  gcc/testsuite/c-c++-common/cpp/Wunknown-pragmas-1.c
+ d09c1c089759278bdfd2d4397db48a76  gcc/testsuite/c-c++-common/cpp/comment-ff-1.c
+ 64545725d37815cd7805d4c1f385df1d  gcc/testsuite/c-c++-common/cpp/comment-vtab-1.c
  61603a4b8db7dc3eda2fff1611da19b9  gcc/testsuite/c-c++-common/cpp/counter-2.c
  8685d36e43046dc3ae7ce373aa03821c  gcc/testsuite/c-c++-common/cpp/counter-3.c
  c1ad8045fa5ff78965e7e9224f86ee93  gcc/testsuite/c-c++-common/cpp/delimited-escape-seq-1.c
*************** f2e2a6171e51d284aef6b4356f338ad3  gcc/te
*** 18074,18080 ****
  adb3860eef253c75b743827724ba1bbc  gcc/testsuite/c-c++-common/cpp/va-opt-3.c
  ffa7f1250b7f00a641ad13c5836e4f01  gcc/testsuite/c-c++-common/cpp/va-opt-4.c
  fd40571567f01233bfa44fa08bec2d16  gcc/testsuite/c-c++-common/cpp/va-opt-5.c
! 859e4cbbaa532f1f681adefb00392657  gcc/testsuite/c-c++-common/cpp/va-opt-6.c
  f62e2cb62fbc47a02df1795460d7bdf6  gcc/testsuite/c-c++-common/cpp/va-opt-7.c
  b94572e342c8ff13a560de9051372bae  gcc/testsuite/c-c++-common/cpp/va-opt-8.c
  2afcba443f0dcc8170bbf6957a6f9cad  gcc/testsuite/c-c++-common/cpp/va-opt-9.c
--- 18104,18110 ----
  adb3860eef253c75b743827724ba1bbc  gcc/testsuite/c-c++-common/cpp/va-opt-3.c
  ffa7f1250b7f00a641ad13c5836e4f01  gcc/testsuite/c-c++-common/cpp/va-opt-4.c
  fd40571567f01233bfa44fa08bec2d16  gcc/testsuite/c-c++-common/cpp/va-opt-5.c
! 3099ea13587eb3f02611d0a5ef7106ce  gcc/testsuite/c-c++-common/cpp/va-opt-6.c
  f62e2cb62fbc47a02df1795460d7bdf6  gcc/testsuite/c-c++-common/cpp/va-opt-7.c
  b94572e342c8ff13a560de9051372bae  gcc/testsuite/c-c++-common/cpp/va-opt-8.c
  2afcba443f0dcc8170bbf6957a6f9cad  gcc/testsuite/c-c++-common/cpp/va-opt-9.c
*************** bbbe92047177151542b6ff825d52c4e4  gcc/te
*** 18745,18751 ****
  84b32011b7cc61bdab96dc5182d6fa16  gcc/testsuite/c-c++-common/gomp/map-3.c
  f26a9793012d174bb469a5a2bbe88ed8  gcc/testsuite/c-c++-common/gomp/map-4.c
  277cedbcd2effa8734f83ed409ddc325  gcc/testsuite/c-c++-common/gomp/map-5.c
! 75e7977485d7d1918eed75db729711af  gcc/testsuite/c-c++-common/gomp/map-6.c
  b8e110ebbec9c6db80b28e633ae2f67e  gcc/testsuite/c-c++-common/gomp/map-7.c
  44f82c91ea0443cfcfe48ff2e2ad3f49  gcc/testsuite/c-c++-common/gomp/map-8.c
  3e29caf558ff43e0252f11af669e8da4  gcc/testsuite/c-c++-common/gomp/map-9.c
--- 18775,18781 ----
  84b32011b7cc61bdab96dc5182d6fa16  gcc/testsuite/c-c++-common/gomp/map-3.c
  f26a9793012d174bb469a5a2bbe88ed8  gcc/testsuite/c-c++-common/gomp/map-4.c
  277cedbcd2effa8734f83ed409ddc325  gcc/testsuite/c-c++-common/gomp/map-5.c
! 35c2af5e502ebab7ba925e704838b547  gcc/testsuite/c-c++-common/gomp/map-6.c
  b8e110ebbec9c6db80b28e633ae2f67e  gcc/testsuite/c-c++-common/gomp/map-7.c
  44f82c91ea0443cfcfe48ff2e2ad3f49  gcc/testsuite/c-c++-common/gomp/map-8.c
  3e29caf558ff43e0252f11af669e8da4  gcc/testsuite/c-c++-common/gomp/map-9.c
*************** e5def8b0431262a97550aa7141a818a1  gcc/te
*** 18975,18982 ****
--- 19005,19019 ----
  add511064b968c5d11ab265fa90ad3bc  gcc/testsuite/c-c++-common/gomp/target-in-reduction-1.c
  1a46b3c3357de4a3d24943d0266026f3  gcc/testsuite/c-c++-common/gomp/target-is-device-ptr-1.c
  2cfdfdc278ef7c85c5e2ad7e2f1e95be  gcc/testsuite/c-c++-common/gomp/target-is-device-ptr-2.c
+ 9fcbd53e219a66a6627bb77e876fd400  gcc/testsuite/c-c++-common/gomp/target-map-iterators-1.c
+ a6be8d491b81e2bd5a132e54885fb1c2  gcc/testsuite/c-c++-common/gomp/target-map-iterators-2.c
+ 3da757001e7ade895add1b6bd2bc09bc  gcc/testsuite/c-c++-common/gomp/target-map-iterators-3.c
+ d290e10563b5dcd9cbe022f9ce9d118d  gcc/testsuite/c-c++-common/gomp/target-map-iterators-4.c
  b1764366c6f492a5e181e374576a2120  gcc/testsuite/c-c++-common/gomp/target-teams-1.c
  ecaf3261edcbdf06b45669d051546ad3  gcc/testsuite/c-c++-common/gomp/target-update-1.c
+ 08dede3478568650d9a1541988278932  gcc/testsuite/c-c++-common/gomp/target-update-iterators-1.c
+ 0f6b04454d158c1ca276ecc2763de98f  gcc/testsuite/c-c++-common/gomp/target-update-iterators-2.c
+ 6407850cdd605714e99d03892b83dc92  gcc/testsuite/c-c++-common/gomp/target-update-iterators-3.c
  25d48772fc72e3c1f8e2192ec44ffb95  gcc/testsuite/c-c++-common/gomp/task-detach-1.c
  1bc40a217ad51b17433b0b59c1491757  gcc/testsuite/c-c++-common/gomp/task-detach-2.c
  f1e648ba677e52a9fa9d8897002b52a4  gcc/testsuite/c-c++-common/gomp/task-detach-3.c
*************** b26a3cc670cf83b0f26114e5683de2f6  gcc/te
*** 20700,20705 ****
--- 20737,20752 ----
  2e90769bacb797d8f60d5dcf229e2e60  gcc/testsuite/g++.dg/DRs/dr2521.C
  0d6aefe51ff95b342b96bda7d98a079a  gcc/testsuite/g++.dg/DRs/dr2530.C
  ae5152333dd60b40ffb5f5e2fdf63afc  gcc/testsuite/g++.dg/DRs/dr2543.C
+ 803da1cbe1ce6b09731d1f9a4cedbcca  gcc/testsuite/g++.dg/DRs/dr2575.C
+ 4ce41dc0e3633d42c08db70c8a2d365a  gcc/testsuite/g++.dg/DRs/dr2576.C
+ f96dba703a15690700a5070767822a60  gcc/testsuite/g++.dg/DRs/dr2577-1.C
+ 34c61b67e97b68c3d89fceb25398ed2a  gcc/testsuite/g++.dg/DRs/dr2577-2.C
+ b026324c6904b2a9cb4b88d6d61c81d1  gcc/testsuite/g++.dg/DRs/dr2577-2.h
+ bd92bb263ce3f4e8ba38942b69777545  gcc/testsuite/g++.dg/DRs/dr2577-3.C
+ 71f51a3c42f4a3f78b93b06d648b6315  gcc/testsuite/g++.dg/DRs/dr2577-3.h
+ 8fb8f015a13dbb924ae0963f603ff37a  gcc/testsuite/g++.dg/DRs/dr2578.C
+ 69abd62027a5c141b392afc212fa4271  gcc/testsuite/g++.dg/DRs/dr2579.C
+ 578ff8885e47476743d05b756870ddb1  gcc/testsuite/g++.dg/DRs/dr2580.C
  b0dfa04b7b53aefdac18e143994883bd  gcc/testsuite/g++.dg/DRs/dr2583.C
  f2f3b031e1cbc5967efb4a8bda8a5660  gcc/testsuite/g++.dg/DRs/dr2604.C
  725e812bcb1bb89bd0a89930ca5524eb  gcc/testsuite/g++.dg/DRs/dr2627.C
*************** d987b63109ee0eb4b7f916f91d8d24be  gcc/te
*** 20991,20996 ****
--- 21038,21044 ----
  eeee984fc971f0592acc52efb13ea93e  gcc/testsuite/g++.dg/abi/mangle8.C
  91fe59f4b908b8f1ebd09487c43147d8  gcc/testsuite/g++.dg/abi/mangle80.C
  243b5d1d894302a08529e7e4300eea4b  gcc/testsuite/g++.dg/abi/mangle81.C
+ 4023501102c8e0f81d65b42d89188330  gcc/testsuite/g++.dg/abi/mangle82.C
  8c95c7ea3760b8a1e7954b3da9f45a16  gcc/testsuite/g++.dg/abi/mangle9.C
  d85264fae2b4c2eb4d8629cb29c42e90  gcc/testsuite/g++.dg/abi/no-linkage-expr1.C
  0cccf158230e7bf1d438169164c8020a  gcc/testsuite/g++.dg/abi/no-weak1.C
*************** c3d50386d0fb64d527719c9a7fb90858  gcc/te
*** 21499,21507 ****
  982539c6c2d20eba09c93519124c691e  gcc/testsuite/g++.dg/concepts/locations1.C
  5fe65ef24a2ed537beccd1e8bc64c63b  gcc/testsuite/g++.dg/concepts/missing-header.C
  6833db79ddf4a861fbaf5159fa7341d9  gcc/testsuite/g++.dg/concepts/misspelled-concept.C
! fb13a9a9d435756a710424762e0bbafa  gcc/testsuite/g++.dg/concepts/nested-diagnostics-1-truncated.C
! 429863d41ff66e9a27606bfffdf1c28c  gcc/testsuite/g++.dg/concepts/nested-diagnostics-1.C
! 99b54bab865aa98ffcbba14a82aaae85  gcc/testsuite/g++.dg/concepts/nested-diagnostics-2.C
  8167dac3599949519b5c414584b01961  gcc/testsuite/g++.dg/concepts/no-bool1.C
  a0d717a73a9e41d16aea89209cfa3945  gcc/testsuite/g++.dg/concepts/pack-1.C
  6fe8fe1052352091537091b7f0d70080  gcc/testsuite/g++.dg/concepts/partial-concept-id1.C
--- 21547,21555 ----
  982539c6c2d20eba09c93519124c691e  gcc/testsuite/g++.dg/concepts/locations1.C
  5fe65ef24a2ed537beccd1e8bc64c63b  gcc/testsuite/g++.dg/concepts/missing-header.C
  6833db79ddf4a861fbaf5159fa7341d9  gcc/testsuite/g++.dg/concepts/misspelled-concept.C
! f1e699c2d174c8c1fc03f3e1ca320d40  gcc/testsuite/g++.dg/concepts/nested-diagnostics-1-truncated.C
! 75fce22fa78c09dfa315c5a036197b33  gcc/testsuite/g++.dg/concepts/nested-diagnostics-1.C
! ab1e591a56588e10a1313eb9ada9c8e3  gcc/testsuite/g++.dg/concepts/nested-diagnostics-2.C
  8167dac3599949519b5c414584b01961  gcc/testsuite/g++.dg/concepts/no-bool1.C
  a0d717a73a9e41d16aea89209cfa3945  gcc/testsuite/g++.dg/concepts/pack-1.C
  6fe8fe1052352091537091b7f0d70080  gcc/testsuite/g++.dg/concepts/partial-concept-id1.C
*************** a011dde0f4c814f1acdce0dc1c196b85  gcc/te
*** 26831,26838 ****
  dc502eef9ceb703b539a3e2b2b75a0b1  gcc/testsuite/g++.dg/cpp26/constexpr-eh9.C
  c3a9b6852b1f09d9ece1fdf2078d65c2  gcc/testsuite/g++.dg/cpp26/constexpr-new1.C
  92cd7c8e3355d7acc8819940fc96bc7d  gcc/testsuite/g++.dg/cpp26/constexpr-new2.C
! dbe4cf9df545b2cb75b00993e494cc66  gcc/testsuite/g++.dg/cpp26/constexpr-new3.C
  de9765a13f0dc8289ae4d66360d163f6  gcc/testsuite/g++.dg/cpp26/constexpr-new4.C
  354260f99fd60e96c277a56929f1d6e9  gcc/testsuite/g++.dg/cpp26/constexpr-virt-inherit1.C
  00668a798f242a6125673c04eb06a10e  gcc/testsuite/g++.dg/cpp26/constexpr-virt-inherit2.C
  9bbb24eae9cc5e4431f138520f489213  gcc/testsuite/g++.dg/cpp26/constexpr-virt-inherit3.C
--- 26879,26887 ----
  dc502eef9ceb703b539a3e2b2b75a0b1  gcc/testsuite/g++.dg/cpp26/constexpr-eh9.C
  c3a9b6852b1f09d9ece1fdf2078d65c2  gcc/testsuite/g++.dg/cpp26/constexpr-new1.C
  92cd7c8e3355d7acc8819940fc96bc7d  gcc/testsuite/g++.dg/cpp26/constexpr-new2.C
! 8afcbabb4d5a71f6b965bf5cff4ebd59  gcc/testsuite/g++.dg/cpp26/constexpr-new3.C
  de9765a13f0dc8289ae4d66360d163f6  gcc/testsuite/g++.dg/cpp26/constexpr-new4.C
+ 4c3096115645eaf70a48e5be49b31002  gcc/testsuite/g++.dg/cpp26/constexpr-new5.C
  354260f99fd60e96c277a56929f1d6e9  gcc/testsuite/g++.dg/cpp26/constexpr-virt-inherit1.C
  00668a798f242a6125673c04eb06a10e  gcc/testsuite/g++.dg/cpp26/constexpr-virt-inherit2.C
  9bbb24eae9cc5e4431f138520f489213  gcc/testsuite/g++.dg/cpp26/constexpr-virt-inherit3.C
*************** e6cd912bf923af3add3056c0b7235bab  gcc/te
*** 26845,26851 ****
--- 26894,26909 ----
  6404fe1c41bc0435baaae5bf82009d36  gcc/testsuite/g++.dg/cpp26/decomp10.C
  0c6fcbc76ec6471803e93062f104892d  gcc/testsuite/g++.dg/cpp26/decomp11.C
  d01e805b9f6fdb44547d559f5b04ea4a  gcc/testsuite/g++.dg/cpp26/decomp12.C
+ 88acff64b0922759b136ba93eac6ed0b  gcc/testsuite/g++.dg/cpp26/decomp13.C
+ f1d13de23ea9a3bba72c099df16d0488  gcc/testsuite/g++.dg/cpp26/decomp14.C
+ 51c2c48d440225158c8134ad5f83b650  gcc/testsuite/g++.dg/cpp26/decomp15.C
+ e50ef6879fd77fa451a304fa6b752d92  gcc/testsuite/g++.dg/cpp26/decomp16.C
+ 2b4e0df8744a05194531491cc8c05fd6  gcc/testsuite/g++.dg/cpp26/decomp17.C
+ 9f1d07228302dff9f66c8dc26130d78a  gcc/testsuite/g++.dg/cpp26/decomp18.C
+ f51fa71215c1761e8565e3ef357bd86a  gcc/testsuite/g++.dg/cpp26/decomp19.C
  70cb6b928ead9bbcb58e49f48aac09a0  gcc/testsuite/g++.dg/cpp26/decomp2.C
+ 9f93677ac517423638d9bafaca9e849f  gcc/testsuite/g++.dg/cpp26/decomp20.C
+ abac21de83ec6f3c8535a8e4fde29e90  gcc/testsuite/g++.dg/cpp26/decomp21.C
  7e2d9cc3e71d52c36118900b7f09ea64  gcc/testsuite/g++.dg/cpp26/decomp22.C
  7ef0ff9bc2a7cfb1ea71f3e0248b6a66  gcc/testsuite/g++.dg/cpp26/decomp23.C
  f462246786df8652f2409939354d0c38  gcc/testsuite/g++.dg/cpp26/decomp24.C
*************** d0519edbdf7be9b73cadd101aebf0d60  gcc/te
*** 26863,26869 ****
  63db9f67d075960d87cf10ec80c8c798  gcc/testsuite/g++.dg/cpp26/delete2.C
  fcd9d0d666c1c3882f154900cd8e57fb  gcc/testsuite/g++.dg/cpp26/delete3.C
  b835b9bb00c8b448e2ac56df5e6cae60  gcc/testsuite/g++.dg/cpp26/enum-conv1.C
! 00412f40d36f1e2f02d8a6dc2f9ea915  gcc/testsuite/g++.dg/cpp26/feat-cxx26.C
  e439504634b8fdea668e10d9fc930c63  gcc/testsuite/g++.dg/cpp26/literals1.C
  24ebebb3be412c0e507595cb8c7458f5  gcc/testsuite/g++.dg/cpp26/literals2.C
  8f5e59e0f7c8cbf6a6ab946370b7128b  gcc/testsuite/g++.dg/cpp26/name-independent-decl1.C
--- 26921,26927 ----
  63db9f67d075960d87cf10ec80c8c798  gcc/testsuite/g++.dg/cpp26/delete2.C
  fcd9d0d666c1c3882f154900cd8e57fb  gcc/testsuite/g++.dg/cpp26/delete3.C
  b835b9bb00c8b448e2ac56df5e6cae60  gcc/testsuite/g++.dg/cpp26/enum-conv1.C
! c330b6e5a757999f7cfcb58b6c40ec4c  gcc/testsuite/g++.dg/cpp26/feat-cxx26.C
  e439504634b8fdea668e10d9fc930c63  gcc/testsuite/g++.dg/cpp26/literals1.C
  24ebebb3be412c0e507595cb8c7458f5  gcc/testsuite/g++.dg/cpp26/literals2.C
  8f5e59e0f7c8cbf6a6ab946370b7128b  gcc/testsuite/g++.dg/cpp26/name-independent-decl1.C
*************** b06aea4ef34a1015ed525413558ddac0  gcc/te
*** 27398,27403 ****
--- 27456,27464 ----
  a95dbf28241ffec87fb48912ed83e629  gcc/testsuite/g++.dg/cpp2a/concepts-using2.C
  8d75a7bd1dff1e92992b77d66deb889b  gcc/testsuite/g++.dg/cpp2a/concepts-using3.C
  1c0b6956abb6cc9d451cbad9763665e0  gcc/testsuite/g++.dg/cpp2a/concepts-using4.C
+ 10200cb73b1bb6443f53044708cc6c85  gcc/testsuite/g++.dg/cpp2a/concepts-using5.C
+ d413557ac25b939174ec565ccf9ef3a8  gcc/testsuite/g++.dg/cpp2a/concepts-using5a.C
+ fb1ad2ac5b658a4cc71bda178e736608  gcc/testsuite/g++.dg/cpp2a/concepts-using6.C
  eb51a2e88a343491b3a0676b4ff623cf  gcc/testsuite/g++.dg/cpp2a/concepts-var-templ1.C
  c344a88e2fb58ca9d19beb62602dabc5  gcc/testsuite/g++.dg/cpp2a/concepts-var-templ1a.C
  d29bcca633bb639bebf16b846292cebc  gcc/testsuite/g++.dg/cpp2a/concepts-var-templ1b.C
*************** bf5c28c84619a07f8720e84cdefac3a6  gcc/te
*** 27523,27528 ****
--- 27584,27591 ----
  1a30baf82f09866d37d6e96a76379f47  gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic16.C
  b64753c380df7428569f8befeb1510e8  gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic17.C
  059480bbf20fee51e8eee26d0acf767f  gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic18.C
+ ba2b3d3cd6f23028bc237ee7025256fb  gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic19.C
+ dd98bfd651ed53723db105ea6def894e  gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic1a.C
  6a856dd4720aaf5ca7ba6e7422f849a9  gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic2.C
  6ddf97a1878f89c02ca0c76de5f0f08f  gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic3.C
  643405358f97b14e4cee0ed8a7e52bac  gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic4.C
*************** c78f774590fd68025c389ab4361f5714  gcc/te
*** 27989,27994 ****
--- 28052,28058 ----
  8ea1668bc02fe42ef11298d02a28bb91  gcc/testsuite/g++.dg/cpp2a/nontype-class70.C
  506f070d3467e5b0df571bcdbd69aad8  gcc/testsuite/g++.dg/cpp2a/nontype-class71.C
  4a2f2d8385e6b854507e3edd81bfde1e  gcc/testsuite/g++.dg/cpp2a/nontype-class72.C
+ 5026844e08700f623ba7b14a5b49f436  gcc/testsuite/g++.dg/cpp2a/nontype-class73.C
  44a04e768668501da12fed78805a7d70  gcc/testsuite/g++.dg/cpp2a/nontype-class8.C
  bae1c36e9d9dcb762070154c47a6b3c3  gcc/testsuite/g++.dg/cpp2a/nontype-class9.C
  be21ab07ff4b8655deffc37a85075c52  gcc/testsuite/g++.dg/cpp2a/nontype-complex1.C
*************** ff6388df65ce7040fcb3fed7c265c6b3  gcc/te
*** 32027,32033 ****
  6a377a656bec55ca6faa7f5c34a54514  gcc/testsuite/g++.dg/modules/atom-preamble-2_d.C
  78b6cd37597e8bead1d104e4543b02fe  gcc/testsuite/g++.dg/modules/atom-preamble-2_e.C
  cc18a8174c21f77ee9e229f9f7197320  gcc/testsuite/g++.dg/modules/atom-preamble-2_f.C
! f401bc7b53e7de843d517ee0ad528749  gcc/testsuite/g++.dg/modules/atom-preamble-3.C
  b22d2b6e547d595e6f203ba3eea35a3b  gcc/testsuite/g++.dg/modules/atom-preamble-4.C
  b792de1e3ae7c85a9e3e74862c4efdaf  gcc/testsuite/g++.dg/modules/atom-preamble-5.C
  470282a3350ba66647c007c3e5b6ac50  gcc/testsuite/g++.dg/modules/attrib-1_a.C
--- 32091,32097 ----
  6a377a656bec55ca6faa7f5c34a54514  gcc/testsuite/g++.dg/modules/atom-preamble-2_d.C
  78b6cd37597e8bead1d104e4543b02fe  gcc/testsuite/g++.dg/modules/atom-preamble-2_e.C
  cc18a8174c21f77ee9e229f9f7197320  gcc/testsuite/g++.dg/modules/atom-preamble-2_f.C
! 40c5192e3a088764276f7089f9bd3b6a  gcc/testsuite/g++.dg/modules/atom-preamble-3.C
  b22d2b6e547d595e6f203ba3eea35a3b  gcc/testsuite/g++.dg/modules/atom-preamble-4.C
  b792de1e3ae7c85a9e3e74862c4efdaf  gcc/testsuite/g++.dg/modules/atom-preamble-5.C
  470282a3350ba66647c007c3e5b6ac50  gcc/testsuite/g++.dg/modules/attrib-1_a.C
*************** e7d806e1771c11cb72e41af12e6d57e4  gcc/te
*** 32114,32121 ****
  cedd15f6c5ea2087db7309f8e58574a4  gcc/testsuite/g++.dg/modules/circ-1_d.C
  188cf637178b71d74de58bdbada43b0d  gcc/testsuite/g++.dg/modules/class-10_a.H
  de9e83ce6d7d5406399b3d0d434e98a7  gcc/testsuite/g++.dg/modules/class-10_b.C
! 2d2d40d084c51151cfc02241e3690bf0  gcc/testsuite/g++.dg/modules/class-11_a.H
! 70dc327c941ed93d4c7fbbe0ddbfae6a  gcc/testsuite/g++.dg/modules/class-11_b.C
  86586d456dae6a665b6dc0eea845c1d2  gcc/testsuite/g++.dg/modules/class-1_a.C
  52c0c896346bdeeeb006d315251b80a8  gcc/testsuite/g++.dg/modules/class-1_b.C
  10b7bdfdbc0bf357572444729f4dafc4  gcc/testsuite/g++.dg/modules/class-1_c.C
--- 32178,32185 ----
  cedd15f6c5ea2087db7309f8e58574a4  gcc/testsuite/g++.dg/modules/circ-1_d.C
  188cf637178b71d74de58bdbada43b0d  gcc/testsuite/g++.dg/modules/class-10_a.H
  de9e83ce6d7d5406399b3d0d434e98a7  gcc/testsuite/g++.dg/modules/class-10_b.C
! d8b54e769d5e4f89f678697259efc656  gcc/testsuite/g++.dg/modules/class-11_a.H
! 79afa0ded90289d49c947dd874c0f345  gcc/testsuite/g++.dg/modules/class-11_b.C
  86586d456dae6a665b6dc0eea845c1d2  gcc/testsuite/g++.dg/modules/class-1_a.C
  52c0c896346bdeeeb006d315251b80a8  gcc/testsuite/g++.dg/modules/class-1_b.C
  10b7bdfdbc0bf357572444729f4dafc4  gcc/testsuite/g++.dg/modules/class-1_c.C
*************** a9fbf233b631f1d45170b9aacad1f922  gcc/te
*** 34059,34065 ****
  97574f7cfa38ba2094043dc3a7f02589  gcc/testsuite/g++.dg/opt/pr81715.C
  2b4d4f8e6529784b4ac0ea783ee0f03d  gcc/testsuite/g++.dg/opt/pr82159-2.C
  2ef205fc60b004319bdd85aaab41122a  gcc/testsuite/g++.dg/opt/pr82159.C
! de2c75d60389e1ec0cbe062c8582d2d9  gcc/testsuite/g++.dg/opt/pr82577.C
  d30ca1c821e579353187057dde122039  gcc/testsuite/g++.dg/opt/pr82778.C
  3b97830b162c62ccdbddf6d88cdf1f24  gcc/testsuite/g++.dg/opt/pr82929.C
  51275b1dfdc4bd6a07a6ff88ac8d81c3  gcc/testsuite/g++.dg/opt/pr83084.C
--- 34123,34129 ----
  97574f7cfa38ba2094043dc3a7f02589  gcc/testsuite/g++.dg/opt/pr81715.C
  2b4d4f8e6529784b4ac0ea783ee0f03d  gcc/testsuite/g++.dg/opt/pr82159-2.C
  2ef205fc60b004319bdd85aaab41122a  gcc/testsuite/g++.dg/opt/pr82159.C
! f12629545bd704e0e749e77fc392aa50  gcc/testsuite/g++.dg/opt/pr82577.C
  d30ca1c821e579353187057dde122039  gcc/testsuite/g++.dg/opt/pr82778.C
  3b97830b162c62ccdbddf6d88cdf1f24  gcc/testsuite/g++.dg/opt/pr82929.C
  51275b1dfdc4bd6a07a6ff88ac8d81c3  gcc/testsuite/g++.dg/opt/pr83084.C
*************** fd186f6ad5502f92e5c2137c6fc41c9a  gcc/te
*** 37007,37013 ****
  737c3ec214ee800394d0e74a09b6bcd0  gcc/testsuite/g++.dg/template/sfinae14.C
  342781775b0e1a80ce495730cb3c43ce  gcc/testsuite/g++.dg/template/sfinae15.C
  37aa08b679e2bc731dc1f5806f3107dc  gcc/testsuite/g++.dg/template/sfinae16.C
! 2bc096ac62072d7fefd78642d341f372  gcc/testsuite/g++.dg/template/sfinae17.C
  c69bb3273ce27c4b44754551d50caaf4  gcc/testsuite/g++.dg/template/sfinae18.C
  defcae158cfa0bf28425c808da6cab35  gcc/testsuite/g++.dg/template/sfinae19.C
  70f01340c8cb2308848032098ae3f7e7  gcc/testsuite/g++.dg/template/sfinae2.C
--- 37071,37077 ----
  737c3ec214ee800394d0e74a09b6bcd0  gcc/testsuite/g++.dg/template/sfinae14.C
  342781775b0e1a80ce495730cb3c43ce  gcc/testsuite/g++.dg/template/sfinae15.C
  37aa08b679e2bc731dc1f5806f3107dc  gcc/testsuite/g++.dg/template/sfinae16.C
! a26a3322687a3e937c15c250206107c5  gcc/testsuite/g++.dg/template/sfinae17.C
  c69bb3273ce27c4b44754551d50caaf4  gcc/testsuite/g++.dg/template/sfinae18.C
  defcae158cfa0bf28425c808da6cab35  gcc/testsuite/g++.dg/template/sfinae19.C
  70f01340c8cb2308848032098ae3f7e7  gcc/testsuite/g++.dg/template/sfinae2.C
*************** b931a980765738dfeb91c55227e1c3c3  gcc/te
*** 37559,37564 ****
--- 37623,37629 ----
  fab1470d87fc879a4a285622c057b736  gcc/testsuite/g++.dg/torture/init-list1.C
  4054dd6c177ca7971902e3ac60e34695  gcc/testsuite/g++.dg/torture/ipa-cp-1.C
  bd0969231961b642349fe4e7a69ad17b  gcc/testsuite/g++.dg/torture/musttail1.C
+ 9bca72f220e2ebe6bac6f4067678e4a9  gcc/testsuite/g++.dg/torture/noncall-eh-1.C
  f7837cd1e7b0fe610ef272ba2fc3896b  gcc/testsuite/g++.dg/torture/phi-1.C
  dd60ebe4e09cf5edd91dd360bcbcba8e  gcc/testsuite/g++.dg/torture/ppc-ldst-array.C
  3a32f1508211597859da662863730a83  gcc/testsuite/g++.dg/torture/pr100303.C
*************** c84bc79847f1966edf2b1f4b3b013e19  gcc/te
*** 38934,38939 ****
--- 38999,39014 ----
  f1360330e2c03adfb9e1efd9136d3f31  gcc/testsuite/g++.dg/warn/Winterference.H
  617b1baf48ffae995c6198567500b3c3  gcc/testsuite/g++.dg/warn/Winvalid-memory-model-2.C
  6cb792f5a5a29a4931676fce151db135  gcc/testsuite/g++.dg/warn/Winvalid-memory-model.C
+ 9892866e93065c63d21a041bed018786  gcc/testsuite/g++.dg/warn/Wkeyword-macro-1.C
+ 69a95375f9ec90d0ea882d5b38667092  gcc/testsuite/g++.dg/warn/Wkeyword-macro-10.C
+ d70f40bbe3de45d02b3b9464dd2fd1a2  gcc/testsuite/g++.dg/warn/Wkeyword-macro-2.C
+ 31939dacc894b83bf87b967919a9307f  gcc/testsuite/g++.dg/warn/Wkeyword-macro-3.C
+ 23c2089facf44efd5fc0c5edf0cf2dfa  gcc/testsuite/g++.dg/warn/Wkeyword-macro-4.C
+ bfa867728f422f80e3d3773e323397f7  gcc/testsuite/g++.dg/warn/Wkeyword-macro-5.C
+ a3c8283eeafbf13da92766551f2fd977  gcc/testsuite/g++.dg/warn/Wkeyword-macro-6.C
+ fb683f88dc4c6bdfdf0b0aa526feddde  gcc/testsuite/g++.dg/warn/Wkeyword-macro-7.C
+ 6dc7f34b4c1d6df03dd513c387f40fa7  gcc/testsuite/g++.dg/warn/Wkeyword-macro-8.C
+ 5c8da833822a96e0b85ee873b7e5a048  gcc/testsuite/g++.dg/warn/Wkeyword-macro-9.C
  90a871726cae9dea93ce0da4b5bb7b2c  gcc/testsuite/g++.dg/warn/Wlogical-op-1.C
  13ee95f1cd2836b595541e2a9917c06d  gcc/testsuite/g++.dg/warn/Wlogical-op-2.C
  73a4aa4570ee8ec2a83f04a672162a02  gcc/testsuite/g++.dg/warn/Wlogical-op-3.C
*************** ab6c5e333d0a740ae5ecff69966813a2  gcc/te
*** 43134,43139 ****
--- 43209,43215 ----
  420c5e0492e7721ea27176c74cff65f5  gcc/testsuite/g++.target/aarch64/sve/pr116595.C
  a36c6629cdaa92f5a41aa0c862cf5a54  gcc/testsuite/g++.target/aarch64/sve/pr119610-sve.C
  48b79fc3f836bb02ceace04c37ddd7c4  gcc/testsuite/g++.target/aarch64/sve/pr119706.C
+ 81119ead1d39599a647b5c79f9d21a85  gcc/testsuite/g++.target/aarch64/sve/pr121449.C
  29fcc7f7695fcab2e4779698100f3053  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
*************** c01d908b8b1ca87be88f727b6cd6e491  gcc/te
*** 48160,48165 ****
--- 48236,48250 ----
  74e00c0632715138d6110d495d44182c  gcc/testsuite/gcc.dg/Wjump-misses-init-1.c
  afe3ee2ad32e9663adf1bf0ad0d91263  gcc/testsuite/gcc.dg/Wjump-misses-init-2.c
  7725ba86cd3bf4ec82b60cda265eced4  gcc/testsuite/gcc.dg/Wjump-misses-init-3.c
+ 04b32f13004526dbf872680cca245159  gcc/testsuite/gcc.dg/Wkeyword-macro-1.c
+ f38e314ca07f2035de420a4ef6e6a924  gcc/testsuite/gcc.dg/Wkeyword-macro-2.c
+ 11351ab3b65b72bf6179db0f8b3aede0  gcc/testsuite/gcc.dg/Wkeyword-macro-3.c
+ 8e6100bf5a58b9c84250bed2df638073  gcc/testsuite/gcc.dg/Wkeyword-macro-4.c
+ a68215e1de9a9666d29d37cc2a7d30d0  gcc/testsuite/gcc.dg/Wkeyword-macro-5.c
+ c4c56b2925ef8fa79daa1767570b503e  gcc/testsuite/gcc.dg/Wkeyword-macro-6.c
+ 8b2378f73a6d71acdfffa1c6751cdcb1  gcc/testsuite/gcc.dg/Wkeyword-macro-7.c
+ 4b72eba1083e13406366f9a294a69de0  gcc/testsuite/gcc.dg/Wkeyword-macro-8.c
+ a128a0eb3ee39014c9c4d33c95610b74  gcc/testsuite/gcc.dg/Wkeyword-macro-9.c
  623d989fba31af9cb3c8d7eab5cb6b66  gcc/testsuite/gcc.dg/Wlarger-than.c
  6f7f5aa958b936dbca6e4316ef2ba901  gcc/testsuite/gcc.dg/Wlarger-than2.c
  9323a6a92dcf4c5b25b6c5bbd0d9345b  gcc/testsuite/gcc.dg/Wlarger-than3.c
*************** c9481d742a48253660d16743a6beecf9  gcc/te
*** 49074,49085 ****
  bcbbadd260cb26dea44e22620dc945b0  gcc/testsuite/gcc.dg/asm-a.c
  854712dcdce9c518846f9d22895c1fff  gcc/testsuite/gcc.dg/asm-b.c
  e370903640e76bf4ef407aafe0286689  gcc/testsuite/gcc.dg/asm-fs-1.c
! eb1745cbc57b196ac34cc1aa088f8ce5  gcc/testsuite/gcc.dg/asm-hard-reg-1.c
! 325832a9cf0ca182b0a51d48a9a9d098  gcc/testsuite/gcc.dg/asm-hard-reg-2.c
  f60c7b0f361b02f30b6eca3c14c7a5ed  gcc/testsuite/gcc.dg/asm-hard-reg-3.c
! 19553371b048e81f63e602bb709f9bcd  gcc/testsuite/gcc.dg/asm-hard-reg-4.c
! 68e110aa154448d95f0634f0b8537cbc  gcc/testsuite/gcc.dg/asm-hard-reg-5.c
! 61c0d51996da17f2618f52628326324d  gcc/testsuite/gcc.dg/asm-hard-reg-6.c
  1a27715b4b755fb46b13300fd15e4690  gcc/testsuite/gcc.dg/asm-hard-reg-7.c
  518c17261bb078d2460f83de54b6ca4e  gcc/testsuite/gcc.dg/asm-hard-reg-8.c
  6efc44e8421733f17459df29fad822ab  gcc/testsuite/gcc.dg/asm-hard-reg-error-1.c
--- 49159,49170 ----
  bcbbadd260cb26dea44e22620dc945b0  gcc/testsuite/gcc.dg/asm-a.c
  854712dcdce9c518846f9d22895c1fff  gcc/testsuite/gcc.dg/asm-b.c
  e370903640e76bf4ef407aafe0286689  gcc/testsuite/gcc.dg/asm-fs-1.c
! 07cb8a84fb1dba58e6281a0a8e32a59f  gcc/testsuite/gcc.dg/asm-hard-reg-1.c
! fcd16a3b4752fbbf0e1c77740e687fbd  gcc/testsuite/gcc.dg/asm-hard-reg-2.c
  f60c7b0f361b02f30b6eca3c14c7a5ed  gcc/testsuite/gcc.dg/asm-hard-reg-3.c
! 2f768329ce61a446b23469b37b58e3d8  gcc/testsuite/gcc.dg/asm-hard-reg-4.c
! 5570e0994cf3a287da4b422fdc9395e9  gcc/testsuite/gcc.dg/asm-hard-reg-5.c
! cc74ad07bc21697eab1ac4bdbb25f0f5  gcc/testsuite/gcc.dg/asm-hard-reg-6.c
  1a27715b4b755fb46b13300fd15e4690  gcc/testsuite/gcc.dg/asm-hard-reg-7.c
  518c17261bb078d2460f83de54b6ca4e  gcc/testsuite/gcc.dg/asm-hard-reg-8.c
  6efc44e8421733f17459df29fad822ab  gcc/testsuite/gcc.dg/asm-hard-reg-error-1.c
*************** d217543f954eb3f31e246355824f653a  gcc/te
*** 49511,49516 ****
--- 49596,49602 ----
  43db7c5f800ce763fcf885501389882a  gcc/testsuite/gcc.dg/bitint-122.c
  7d02ff9539e664bbbcfc85b464d916c1  gcc/testsuite/gcc.dg/bitint-123.c
  11e6d8eaf7b16f3f8aeaf1c2e626996f  gcc/testsuite/gcc.dg/bitint-124.c
+ c446cf331d60d19eea3950d7f444f8b3  gcc/testsuite/gcc.dg/bitint-125.c
  aa6e262f1d508ec048e76ac4af6675a4  gcc/testsuite/gcc.dg/bitint-13.c
  e6db29256563268a3c327706e78c79a4  gcc/testsuite/gcc.dg/bitint-14.c
  c748706240385773f27caba61cbbcbd8  gcc/testsuite/gcc.dg/bitint-15.c
*************** e20f46b6e703ff1284f1cfe79f6c7f15  gcc/te
*** 49606,49612 ****
  727f3fa86769627fd757f9544ec5e9a4  gcc/testsuite/gcc.dg/bitint-97.c
  a22b186996615c2d8eb05ea8bf3fbf0f  gcc/testsuite/gcc.dg/bitint-98.c
  fb2deb63f2c015cb881ba1519e9cf788  gcc/testsuite/gcc.dg/bitint-99.c
! c5bef339fb8b3eb78a29a8e428bd4afc  gcc/testsuite/gcc.dg/bitintext.h
  6453b594ca416ac818e19554b58e489e  gcc/testsuite/gcc.dg/boolcomplex-1.c
  29dee620c099065fec233358259a8a12  gcc/testsuite/gcc.dg/bss.c
  7cf86654b95ba4af389e830b28a868e1  gcc/testsuite/gcc.dg/builtin-addc-1.c
--- 49692,49698 ----
  727f3fa86769627fd757f9544ec5e9a4  gcc/testsuite/gcc.dg/bitint-97.c
  a22b186996615c2d8eb05ea8bf3fbf0f  gcc/testsuite/gcc.dg/bitint-98.c
  fb2deb63f2c015cb881ba1519e9cf788  gcc/testsuite/gcc.dg/bitint-99.c
! f6b070f438786af36c363a2ba1229aef  gcc/testsuite/gcc.dg/bitintext.h
  6453b594ca416ac818e19554b58e489e  gcc/testsuite/gcc.dg/boolcomplex-1.c
  29dee620c099065fec233358259a8a12  gcc/testsuite/gcc.dg/bss.c
  7cf86654b95ba4af389e830b28a868e1  gcc/testsuite/gcc.dg/builtin-addc-1.c
*************** e8f58dbbfb83be247111a3f5787823b9  gcc/te
*** 49976,49982 ****
  eaec7e8d3dab1a92f077a291b2a45008  gcc/testsuite/gcc.dg/c23-attr-syntax-3.c
  cd50c105926a1e51a64176d2120e47f2  gcc/testsuite/gcc.dg/c23-attr-syntax-4.c
  f0cb85efadba331ca2d15c7afc61de69  gcc/testsuite/gcc.dg/c23-attr-syntax-5.c
! 8d8bd6b11899a4d0c712a623707fb636  gcc/testsuite/gcc.dg/c23-attr-syntax-6.c
  269bd414ba4d7be15bc3a152cb9cb3bd  gcc/testsuite/gcc.dg/c23-attr-syntax-7.c
  1f0cc4ddd44ec4024c75890aef2076e2  gcc/testsuite/gcc.dg/c23-attr-syntax-8.c
  bdd1f3beb5b450c2acc292424c3871f5  gcc/testsuite/gcc.dg/c23-attr-unsequenced-1.c
--- 50062,50068 ----
  eaec7e8d3dab1a92f077a291b2a45008  gcc/testsuite/gcc.dg/c23-attr-syntax-3.c
  cd50c105926a1e51a64176d2120e47f2  gcc/testsuite/gcc.dg/c23-attr-syntax-4.c
  f0cb85efadba331ca2d15c7afc61de69  gcc/testsuite/gcc.dg/c23-attr-syntax-5.c
! 13084ae1021fc48606f66549943e2cf7  gcc/testsuite/gcc.dg/c23-attr-syntax-6.c
  269bd414ba4d7be15bc3a152cb9cb3bd  gcc/testsuite/gcc.dg/c23-attr-syntax-7.c
  1f0cc4ddd44ec4024c75890aef2076e2  gcc/testsuite/gcc.dg/c23-attr-syntax-8.c
  bdd1f3beb5b450c2acc292424c3871f5  gcc/testsuite/gcc.dg/c23-attr-unsequenced-1.c
*************** e9e7b9fd51bf1a0bc663ce351365c3dc  gcc/te
*** 51186,51196 ****
  114af49c7f0ebbbf1b2b6dfe7d7533fe  gcc/testsuite/gcc.dg/cpp/paste1.c
  94e0adf57f2b5278d73eb9a32e60922c  gcc/testsuite/gcc.dg/cpp/paste10.c
  9d96877703c996f27d65edaad60a6bb4  gcc/testsuite/gcc.dg/cpp/paste11.c
! 2fe98a7a1ae2662014d620877db58205  gcc/testsuite/gcc.dg/cpp/paste12-2.c
! 5fec141019612b7401c48ada6c30f5c2  gcc/testsuite/gcc.dg/cpp/paste12.c
  5b69fbb204585bf861b3297b852698f5  gcc/testsuite/gcc.dg/cpp/paste13.c
! eb4d5790e82cf57b54d62067446c3fab  gcc/testsuite/gcc.dg/cpp/paste14-2.c
! 632eb9a18d60be74ca546d99563ac50a  gcc/testsuite/gcc.dg/cpp/paste14.c
  92d4208f409847f43e4f44c65e8e9cf9  gcc/testsuite/gcc.dg/cpp/paste15.c
  73cb9dc770d371315e506c932e447978  gcc/testsuite/gcc.dg/cpp/paste16.c
  b3476c801fefa2be844c46391e92a98b  gcc/testsuite/gcc.dg/cpp/paste17.c
--- 51272,51282 ----
  114af49c7f0ebbbf1b2b6dfe7d7533fe  gcc/testsuite/gcc.dg/cpp/paste1.c
  94e0adf57f2b5278d73eb9a32e60922c  gcc/testsuite/gcc.dg/cpp/paste10.c
  9d96877703c996f27d65edaad60a6bb4  gcc/testsuite/gcc.dg/cpp/paste11.c
! c4bbc17abe4963012b98d97dffb741da  gcc/testsuite/gcc.dg/cpp/paste12-2.c
! b64fd12c84e85e98ef9bd8a023cc5033  gcc/testsuite/gcc.dg/cpp/paste12.c
  5b69fbb204585bf861b3297b852698f5  gcc/testsuite/gcc.dg/cpp/paste13.c
! 1306bae1e993904ba29b34711f5e9963  gcc/testsuite/gcc.dg/cpp/paste14-2.c
! 7aad28db47f8b4d819497890cf051a1e  gcc/testsuite/gcc.dg/cpp/paste14.c
  92d4208f409847f43e4f44c65e8e9cf9  gcc/testsuite/gcc.dg/cpp/paste15.c
  73cb9dc770d371315e506c932e447978  gcc/testsuite/gcc.dg/cpp/paste16.c
  b3476c801fefa2be844c46391e92a98b  gcc/testsuite/gcc.dg/cpp/paste17.c
*************** ab9b438d79da41ae2faa25073b1f68ff  gcc/te
*** 55030,55036 ****
  703aa583a7e531e21f36720dc5060a1a  gcc/testsuite/gcc.dg/plugin/diagnostic-path-format-separate-events.c
  82d440b1e4dce5930ce8d0eb753b41e8  gcc/testsuite/gcc.dg/plugin/diagnostic-test-expressions-1.c
  f26f1bf96796d8b24031806c06a0f052  gcc/testsuite/gcc.dg/plugin/diagnostic-test-graphs-html.c
! 9c0156b76580d428ed706fa8dedb79a5  gcc/testsuite/gcc.dg/plugin/diagnostic-test-graphs-html.py
  9fd38029a33519cf7e44d1f8653aa738  gcc/testsuite/gcc.dg/plugin/diagnostic-test-graphs-sarif.c
  c9a71bb22094924ec0c655c680eae543  gcc/testsuite/gcc.dg/plugin/diagnostic-test-graphs-sarif.py
  d2f6a008f3f994524a314168ca293bec  gcc/testsuite/gcc.dg/plugin/diagnostic-test-graphs.c
--- 55116,55122 ----
  703aa583a7e531e21f36720dc5060a1a  gcc/testsuite/gcc.dg/plugin/diagnostic-path-format-separate-events.c
  82d440b1e4dce5930ce8d0eb753b41e8  gcc/testsuite/gcc.dg/plugin/diagnostic-test-expressions-1.c
  f26f1bf96796d8b24031806c06a0f052  gcc/testsuite/gcc.dg/plugin/diagnostic-test-graphs-html.c
! 8e3f36ccd34f3a01727845d526a29ee6  gcc/testsuite/gcc.dg/plugin/diagnostic-test-graphs-html.py
  9fd38029a33519cf7e44d1f8653aa738  gcc/testsuite/gcc.dg/plugin/diagnostic-test-graphs-sarif.c
  c9a71bb22094924ec0c655c680eae543  gcc/testsuite/gcc.dg/plugin/diagnostic-test-graphs-sarif.py
  d2f6a008f3f994524a314168ca293bec  gcc/testsuite/gcc.dg/plugin/diagnostic-test-graphs.c
*************** c206914683a80689e3bf23af3c671f70  gcc/te
*** 55043,55053 ****
  6efed2ab62fc17f3db08dc04e528fe7a  gcc/testsuite/gcc.dg/plugin/diagnostic-test-metadata-sarif.c
  ee3ed621610bc5bdf108f395f4789d4e  gcc/testsuite/gcc.dg/plugin/diagnostic-test-metadata-sarif.py
  ce81f72fcd363c22f9fce9cd0b0c76b1  gcc/testsuite/gcc.dg/plugin/diagnostic-test-metadata.c
  8bb6f1549a3f246f5d74433c28016694  gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-sarif.c
  8ca83dcbe01e2a05522660abb59deb5b  gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-sarif.py
! d4d4725b28cf4bff5882038f4e68b588  gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-text-indented-show-levels.c
! bbfef80ea240ea4caf713082caf0f5d2  gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-text-indented-unicode.c
! df5927e5a5b0b123f415b49583084acd  gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-text-indented.c
  a7db561cc35fce636b1dca4e7394ba77  gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-text-plain.c
  a6a63e4d673f32d534d3afc18a7f8218  gcc/testsuite/gcc.dg/plugin/diagnostic-test-paths-1.c
  aa01caff792d42166912b838479f96af  gcc/testsuite/gcc.dg/plugin/diagnostic-test-paths-2.c
--- 55129,55143 ----
  6efed2ab62fc17f3db08dc04e528fe7a  gcc/testsuite/gcc.dg/plugin/diagnostic-test-metadata-sarif.c
  ee3ed621610bc5bdf108f395f4789d4e  gcc/testsuite/gcc.dg/plugin/diagnostic-test-metadata-sarif.py
  ce81f72fcd363c22f9fce9cd0b0c76b1  gcc/testsuite/gcc.dg/plugin/diagnostic-test-metadata.c
+ e3280433d09f2752901f5709a219ebab  gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-html.c
+ 1218b1fa70d7150133462f6f97c066d8  gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-html.py
+ 4927941c268e926a9856721912e38127  gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-no-show-nesting.c
  8bb6f1549a3f246f5d74433c28016694  gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-sarif.c
  8ca83dcbe01e2a05522660abb59deb5b  gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-sarif.py
! 62fe65e08a13c8b5fe7fe645bf13d10c  gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-show-nesting.c
! 90d02e26265104b35a62094a1842fab3  gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-text-indented-show-levels.c
! 24004ab98159bde7df9754ff9705b69e  gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-text-indented-unicode.c
! 3d9dfecb01570e6bb939c3e1ea646af1  gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-text-indented.c
  a7db561cc35fce636b1dca4e7394ba77  gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-text-plain.c
  a6a63e4d673f32d534d3afc18a7f8218  gcc/testsuite/gcc.dg/plugin/diagnostic-test-paths-1.c
  aa01caff792d42166912b838479f96af  gcc/testsuite/gcc.dg/plugin/diagnostic-test-paths-2.c
*************** c323b7b4ac0cf2caa641c6bb31350375  gcc/te
*** 55136,55142 ****
  4905199fc259967af414db22821f7f74  gcc/testsuite/gcc.dg/plugin/must_tail_call_plugin.cc
  adbc6d60d6e1474ca93af3b50208e741  gcc/testsuite/gcc.dg/plugin/one_time-test-1.c
  91500c30c78de7048ecb72b86a431e80  gcc/testsuite/gcc.dg/plugin/one_time_plugin.cc
! 98c77ce3cd0f78364bf7d63c9ee141d8  gcc/testsuite/gcc.dg/plugin/plugin.exp
  10b87cc378ff8b6e30ae77af8c669e4b  gcc/testsuite/gcc.dg/plugin/plugindir1.c
  770fbe5bf2a65884c6120dab4b13a1d4  gcc/testsuite/gcc.dg/plugin/plugindir2.c
  5be673fb13573d3689c3cc3dff9f5a2e  gcc/testsuite/gcc.dg/plugin/plugindir3.c
--- 55226,55232 ----
  4905199fc259967af414db22821f7f74  gcc/testsuite/gcc.dg/plugin/must_tail_call_plugin.cc
  adbc6d60d6e1474ca93af3b50208e741  gcc/testsuite/gcc.dg/plugin/one_time-test-1.c
  91500c30c78de7048ecb72b86a431e80  gcc/testsuite/gcc.dg/plugin/one_time_plugin.cc
! 72338b8a35dcb4d507380723c1451b56  gcc/testsuite/gcc.dg/plugin/plugin.exp
  10b87cc378ff8b6e30ae77af8c669e4b  gcc/testsuite/gcc.dg/plugin/plugindir1.c
  770fbe5bf2a65884c6120dab4b13a1d4  gcc/testsuite/gcc.dg/plugin/plugindir2.c
  5be673fb13573d3689c3cc3dff9f5a2e  gcc/testsuite/gcc.dg/plugin/plugindir3.c
*************** b5e7a407f14fa4279d446639d6cf4794  gcc/te
*** 55756,55761 ****
--- 55846,55852 ----
  d08452d24c97493e2434ecdd8c5310c4  gcc/testsuite/gcc.dg/pr118817.c
  2b2d20742f9707962adb7ed6abf1aaff  gcc/testsuite/gcc.dg/pr118860.c
  000c93ab2283d35bc8262ea9d115e9b4  gcc/testsuite/gcc.dg/pr118895.c
+ b9759ceecb4f9361feb7576740cd7ba6  gcc/testsuite/gcc.dg/pr118946-1.c
  2bc77a865f5ed044c609c7e4633d1a53  gcc/testsuite/gcc.dg/pr118947-1.c
  eaa8bc67e566af882ae8ca653097943c  gcc/testsuite/gcc.dg/pr118948-1.c
  cccc06652033bffb0ed73a8f12d234c2  gcc/testsuite/gcc.dg/pr119001-1.c
*************** d2c0f87695635c09b6a893cd2d5c5478  gcc/te
*** 55802,55807 ****
--- 55893,55899 ----
  c57884e34f257e33d206372fc675b716  gcc/testsuite/gcc.dg/pr121035.c
  d602fec0c129037ce49acd7cccfd6266  gcc/testsuite/gcc.dg/pr121202.c
  942ef1841a793e5e296b868a6cfed912  gcc/testsuite/gcc.dg/pr121216.c
+ f3420ae2cec7581a0ad483e1abb174f2  gcc/testsuite/gcc.dg/pr121217.c
  7032b52dc2dd1e6cab514293c2d0b276  gcc/testsuite/gcc.dg/pr121322.c
  bc5ddfbbc46f4e0cce1629d1b58d3090  gcc/testsuite/gcc.dg/pr12603.c
  72a2fca76cb69617ae36bab93c7ec0d7  gcc/testsuite/gcc.dg/pr12625-1.c
*************** cf2a2337cf009457d836bd48e49c0af3  gcc/te
*** 58859,58864 ****
--- 58951,58959 ----
  fa228ee9fbe53472bf0fbc0d82dbf06c  gcc/testsuite/gcc.dg/torture/bitint-80.c
  8ccddc7d4c25a0d622af001f456097fb  gcc/testsuite/gcc.dg/torture/bitint-81.c
  c04a5c86281fcb981a8f28043fe2b87d  gcc/testsuite/gcc.dg/torture/bitint-82.c
+ 25ae478f26e4b1f0fbc9427fc6d848a3  gcc/testsuite/gcc.dg/torture/bitint-83.c
+ 823a8546c0d347f9693e09831afe36d3  gcc/testsuite/gcc.dg/torture/bitint-84.c
+ 368a2f51dfadfa4e9fbd0017065b6a83  gcc/testsuite/gcc.dg/torture/bitint-85.c
  4d03bd57dac0507a44cc15b9afacd8a3  gcc/testsuite/gcc.dg/torture/bitint-9.c
  cf9904d4026e69bddaf745011bbaaab3  gcc/testsuite/gcc.dg/torture/builtin-attr-1.c
  c3c39411545c83e500562780b71883b6  gcc/testsuite/gcc.dg/torture/builtin-complex-1.c
*************** b5ce592010c8698105487afa7089b8b1  gcc/te
*** 59123,59128 ****
--- 59218,59224 ----
  ff646b4bbd5d24fb83db416b6482d625  gcc/testsuite/gcc.dg/torture/ftrapv-1.c
  9479cb5c7a5a2913427912c1cb622377  gcc/testsuite/gcc.dg/torture/ftrapv-2.c
  e4726c7b6c2132e9442ce94f5e871ee3  gcc/testsuite/gcc.dg/torture/hardbool-5a.c
+ 84d8315f76ebb27e0bd2171e1f7f505b  gcc/testsuite/gcc.dg/torture/hardbool-ai.c
  37f39797ffb910048aa5846da3a00a56  gcc/testsuite/gcc.dg/torture/hardbool-i-5a.c
  a513263f77c45368937762cf8bc80e24  gcc/testsuite/gcc.dg/torture/hardbool-i.c
  c66f8eb3ff74118b0efdd2d7f2e831b2  gcc/testsuite/gcc.dg/torture/hardbool-ll-5a.c
*************** a060cc3d6f98bac643c4fd7ad707692c  gcc/te
*** 59133,59139 ****
  919b3972807507a9e338f8d2ea8b829b  gcc/testsuite/gcc.dg/torture/hardbool-ul.c
  37bdb2715c8275f99b5dce763a3c4f9d  gcc/testsuite/gcc.dg/torture/hardbool-us-5a.c
  c607e9ba043b49a404bff7052c271656  gcc/testsuite/gcc.dg/torture/hardbool-us.c
! 2acab4e0e224902eccaeb4589df83bea  gcc/testsuite/gcc.dg/torture/hardbool.c
  2904f806acee7b2db769318625116a2e  gcc/testsuite/gcc.dg/torture/harden-cfr-noret-no-nothrow.c
  0325deb2602e09ab66f57245ebc297d1  gcc/testsuite/gcc.dg/torture/harden-cfr-tail-ub.c
  72c30616e7a675fb40374e4d3d6015ef  gcc/testsuite/gcc.dg/torture/ifcmb-1.c
--- 59229,59236 ----
  919b3972807507a9e338f8d2ea8b829b  gcc/testsuite/gcc.dg/torture/hardbool-ul.c
  37bdb2715c8275f99b5dce763a3c4f9d  gcc/testsuite/gcc.dg/torture/hardbool-us-5a.c
  c607e9ba043b49a404bff7052c271656  gcc/testsuite/gcc.dg/torture/hardbool-us.c
! f9b043c76d29a6e8c8952961769cdd35  gcc/testsuite/gcc.dg/torture/hardbool-vi.c
! 96978b22f397d05509906206940cef34  gcc/testsuite/gcc.dg/torture/hardbool.c
  2904f806acee7b2db769318625116a2e  gcc/testsuite/gcc.dg/torture/harden-cfr-noret-no-nothrow.c
  0325deb2602e09ab66f57245ebc297d1  gcc/testsuite/gcc.dg/torture/harden-cfr-tail-ub.c
  72c30616e7a675fb40374e4d3d6015ef  gcc/testsuite/gcc.dg/torture/ifcmb-1.c
*************** e0878b10bf90cdd28ee181056e4566f9  gcc/te
*** 59551,59556 ****
--- 59648,59657 ----
  a0f8ab77c0d77ef71974e1bd49ecec66  gcc/testsuite/gcc.dg/torture/pr121194.c
  d2430d6556dc52a9bbbe49c5c2c11a91  gcc/testsuite/gcc.dg/torture/pr121236-1.c
  caef6a7d552fd1a8c6eb337dabda5f59  gcc/testsuite/gcc.dg/torture/pr121295-1.c
+ d41266e6594db1994e416e7a7353751e  gcc/testsuite/gcc.dg/torture/pr121370.c
+ 95b4b751532b50f7c9ba478b05d5f9a3  gcc/testsuite/gcc.dg/torture/pr121382.c
+ 577eaa64c9beb28198ba6b01b4065b0a  gcc/testsuite/gcc.dg/torture/pr121422-1.c
+ c06f548f435382c42c50e8e66b702266  gcc/testsuite/gcc.dg/torture/pr121422-2.c
  ded4330fd1cd52783bd9b1761db038ef  gcc/testsuite/gcc.dg/torture/pr16104-1.c
  fc265ee05da2f29f0e92804661cd1f28  gcc/testsuite/gcc.dg/torture/pr17526.c
  01c583edb41b632b835aa892b9c1cb14  gcc/testsuite/gcc.dg/torture/pr17933-1.c
*************** e38a8e54b4ea0d0d8fd4e9176e26de28  gcc/te
*** 62813,62818 ****
--- 62914,62922 ----
  4c8f24912f15202c6672c6017ec6d769  gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-101.c
  c00143ba60133588bfbe318454aa251f  gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-102.c
  1c953f589e84249a6420f207f2c26c21  gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-104.c
+ 4877d0c4dfb0947d295fd9245fd0be9a  gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-105.c
+ c696d7723e6935b64e8868efdada71d9  gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-106.c
+ 69437e124b7cceb5fdc45c11f735ad4d  gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-107.c
  5561c38451474a42839647e4e156c010  gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-11.c
  5561c38451474a42839647e4e156c010  gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-12.c
  b95088c9ed88a484349d681f36871312  gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-13.c
*************** d0c3ebc940ef2c059fe594b3393e984f  gcc/te
*** 64437,64443 ****
  6cf90bb7c9e5ccaa4e444f8754fef4d5  gcc/testsuite/gcc.dg/vect/pr59591-2.c
  8e9ca825271ad66a6369d2c08958f324  gcc/testsuite/gcc.dg/vect/pr59594.c
  5d6830edc1bc232319270056d2e1b51a  gcc/testsuite/gcc.dg/vect/pr59651.c
! 8c139ed20f643904b9b1975ab1815c1b  gcc/testsuite/gcc.dg/vect/pr59984.c
  bce45b63e374b50d341f0fc6164eed56  gcc/testsuite/gcc.dg/vect/pr60012.c
  f2202cae0d8b24fc77b7ee1599bba372  gcc/testsuite/gcc.dg/vect/pr60092-2.c
  58539c47f3dda9c13c058356ee38eb2e  gcc/testsuite/gcc.dg/vect/pr60092.c
--- 64541,64547 ----
  6cf90bb7c9e5ccaa4e444f8754fef4d5  gcc/testsuite/gcc.dg/vect/pr59591-2.c
  8e9ca825271ad66a6369d2c08958f324  gcc/testsuite/gcc.dg/vect/pr59594.c
  5d6830edc1bc232319270056d2e1b51a  gcc/testsuite/gcc.dg/vect/pr59651.c
! a532c9d824ff11aecdc18a9301f8fcc9  gcc/testsuite/gcc.dg/vect/pr59984.c
  bce45b63e374b50d341f0fc6164eed56  gcc/testsuite/gcc.dg/vect/pr60012.c
  f2202cae0d8b24fc77b7ee1599bba372  gcc/testsuite/gcc.dg/vect/pr60092-2.c
  58539c47f3dda9c13c058356ee38eb2e  gcc/testsuite/gcc.dg/vect/pr60092.c
*************** f7641c61bbf333053e42be5bfa67d8e4  gcc/te
*** 65414,65420 ****
  beb6b00a289da33c6502147b465dbdfd  gcc/testsuite/gcc.dg/vect/vect-fncall-mask-math.c
  ddb5b38696ce380776208fd63305431f  gcc/testsuite/gcc.dg/vect/vect-fncall-mask.c
  e41338bfbaaf9c5f7d3e7394fd0720c0  gcc/testsuite/gcc.dg/vect/vect-fold-1.c
! d19ffdb745a89b901fd8e4ee54b8e7fe  gcc/testsuite/gcc.dg/vect/vect-gather-1.c
  9d3331ca82d56cf3f0e897bf6046e902  gcc/testsuite/gcc.dg/vect/vect-gather-2.c
  259a09d807f29b1b0eeae54b0f4391aa  gcc/testsuite/gcc.dg/vect/vect-gather-3.c
  8852986b8c82db3ccec3d5f808cc2de7  gcc/testsuite/gcc.dg/vect/vect-gather-4.c
--- 65518,65524 ----
  beb6b00a289da33c6502147b465dbdfd  gcc/testsuite/gcc.dg/vect/vect-fncall-mask-math.c
  ddb5b38696ce380776208fd63305431f  gcc/testsuite/gcc.dg/vect/vect-fncall-mask.c
  e41338bfbaaf9c5f7d3e7394fd0720c0  gcc/testsuite/gcc.dg/vect/vect-fold-1.c
! 611a3e22c9ed05ba2a4659c9bb8d7292  gcc/testsuite/gcc.dg/vect/vect-gather-1.c
  9d3331ca82d56cf3f0e897bf6046e902  gcc/testsuite/gcc.dg/vect/vect-gather-2.c
  259a09d807f29b1b0eeae54b0f4391aa  gcc/testsuite/gcc.dg/vect/vect-gather-3.c
  8852986b8c82db3ccec3d5f808cc2de7  gcc/testsuite/gcc.dg/vect/vect-gather-4.c
*************** c0730f5ee0eb1bf371cc3a1221de8789  gcc/te
*** 65938,65943 ****
--- 66042,66048 ----
  748ee2e2a4c0cc944dd2c73fdb89639c  gcc/testsuite/gcc.dg/vla-stexp-7.c
  4fdda7517bab551abdccdbb2c0bfa91e  gcc/testsuite/gcc.dg/vla-stexp-8.c
  63edc5c02ff6dbde1e6ad24652084b7e  gcc/testsuite/gcc.dg/vla-stexp-9.c
+ 5e398abe4b9def996f9a4439513432dd  gcc/testsuite/gcc.dg/vla-tert-1.c
  b6e4ad0c2b06bc17958fb57b495b011f  gcc/testsuite/gcc.dg/vmx/1b-01.c
  192ca75d85cf89c0dbaa4e9b66bf8ce1  gcc/testsuite/gcc.dg/vmx/1b-02.c
  26ad98ef01158cbabae0393a498f540a  gcc/testsuite/gcc.dg/vmx/1b-03.c
*************** a5ca6cfb5312a89436fc398835b5c66c  gcc/te
*** 67968,67973 ****
--- 68073,68079 ----
  55d3d2a44c366471b3a5bc5c2b176169  gcc/testsuite/gcc.target/aarch64/pr118348_1.c
  cf174bb4218a2ff6650d0ab674702881  gcc/testsuite/gcc.target/aarch64/pr118348_2.c
  5afea9764e794ec9500d7840136687e8  gcc/testsuite/gcc.target/aarch64/pr119046.c
+ 4fb924f3ca58066d57cd648491945933  gcc/testsuite/gcc.target/aarch64/pr120986-1.c
  64cb9b1e14577523fd3ff2306b1eaa44  gcc/testsuite/gcc.target/aarch64/pr121300.c
  9adb42733d9f5e2b1f2dbb364b62100d  gcc/testsuite/gcc.target/aarch64/pr37780_1.c
  e668fb9e0d32efadd671247467dc90db  gcc/testsuite/gcc.target/aarch64/pr58460.c
*************** e41817248a56088fa5916baafe036a84  gcc/te
*** 68835,68840 ****
--- 68941,68947 ----
  7f0a2bc5b5ada7add64168ea0a4c5b53  gcc/testsuite/gcc.target/aarch64/sme/nonlocal_goto_6.c
  cea477cbfc0138870da19d13a6f78a5c  gcc/testsuite/gcc.target/aarch64/sme/nonlocal_goto_7.c
  adb1015c9aa632296ceca120cacf20e3  gcc/testsuite/gcc.target/aarch64/sme/pr121028.c
+ 7d97d6a94b7d56da78720f808e65bcff  gcc/testsuite/gcc.target/aarch64/sme/pr121414_1.c
  b4e79a733b5f7121eaeed1af03f9454b  gcc/testsuite/gcc.target/aarch64/sme/sibcall_1.c
  e1bebbe2531d4c2ec4fb9cfa4437f1cb  gcc/testsuite/gcc.target/aarch64/sme/sibcall_2.c
  fab5f8d90e717b628f306df26d55a4c6  gcc/testsuite/gcc.target/aarch64/sme/sibcall_3.c
*************** e37e98d223ef60324ab8c4926f9e4a45  gcc/te
*** 71765,71770 ****
--- 71872,71881 ----
  81fe8732bf6c29692f13d3d91ba83d4d  gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/write_za_1.c
  de2e59eeec9cea88f8e1125fdec8d66d  gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/write_za_m_1.c
  3467808faea5fc2ec3e4034bf0a03de8  gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/write_za_slice_1.c
+ 3a75de126814667dab64643f6698ab61  gcc/testsuite/gcc.target/aarch64/sve/acle/general/acge_1.c
+ e332cb9bc1c571ee1bf10410a78a2d5b  gcc/testsuite/gcc.target/aarch64/sve/acle/general/acgt_1.c
+ 76daaa14c4e1e4bff596d8f18116d560  gcc/testsuite/gcc.target/aarch64/sve/acle/general/acle_1.c
+ f1244fcb32ddc0f3d61678f9cd118ff3  gcc/testsuite/gcc.target/aarch64/sve/acle/general/aclt_1.c
  aa357d405e2f83cc3b5b21d3513c1281  gcc/testsuite/gcc.target/aarch64/sve/acle/general/add_1.c
  e40e4d129ea43829ee4a75365eb50265  gcc/testsuite/gcc.target/aarch64/sve/acle/general/amin_1.c
  171242c36c5137cac47934923813a672  gcc/testsuite/gcc.target/aarch64/sve/acle/general/and_1.c
*************** f05f061869c6f335b6395f5250ec83ee  gcc/te
*** 71785,71800 ****
  649722b7feeb54ead3f4ff347e8ef4db  gcc/testsuite/gcc.target/aarch64/sve/acle/general/brkn_2.c
  3e4d3053ca7b442dbfeb54e8df14d433  gcc/testsuite/gcc.target/aarch64/sve/acle/general/brkpa_1.c
  41715679da86b4845c2da3233725d0f2  gcc/testsuite/gcc.target/aarch64/sve/acle/general/brkpb_1.c
! 4e7a3ff45a72f35e2476f4e660886eb0  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_1.c
! 60577eb222495e42c0d4e2d7e2ce19a3  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_2.c
  890d0907288d2b72f9ec70456e205a4c  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_3.c
  493d587eaeaa014288091839539ed594  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cnot_1.c
  8670785b5e7c8b75fb219f0ddae33190  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cntb_1.c
  9e41721b4dcb606909b3efa814293f4e  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cntb_pat_1.c
  60a6cb5f3583610557e9b4dde6cd5453  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cntd_pat_1.c
  2279605ca76a398874fa5ee6664d3d52  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cnth_pat_1.c
  ccec270f903888ca00fe8baba907fa5f  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cntw_pat_1.c
! adff197d6435e0a1e9ec2dcd172e75f4  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cops.c
  fb0b99833eb0c168abc014e0554a156c  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cpy_1.c
  75a2cc5eaade2a1a499200b05ae5f53c  gcc/testsuite/gcc.target/aarch64/sve/acle/general/debug_1.c
  16c8b0fa40139dcbb0edba6873a09834  gcc/testsuite/gcc.target/aarch64/sve/acle/general/debug_2.c
--- 71896,71956 ----
  649722b7feeb54ead3f4ff347e8ef4db  gcc/testsuite/gcc.target/aarch64/sve/acle/general/brkn_2.c
  3e4d3053ca7b442dbfeb54e8df14d433  gcc/testsuite/gcc.target/aarch64/sve/acle/general/brkpa_1.c
  41715679da86b4845c2da3233725d0f2  gcc/testsuite/gcc.target/aarch64/sve/acle/general/brkpb_1.c
! 4eb0e7c06a697f064ea648ace047b292  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_1.c
! 720ac1a84f70325302706073ebb6655d  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_2.c
  890d0907288d2b72f9ec70456e205a4c  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_3.c
+ 3f5b590fcce499c04831d6d89361a82d  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_4.c
+ 355cd9c7b126e5ce98c67b41ab629fbc  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_5.c
+ 9988bd59ae63dc72f419d1e01f3d616d  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_6.c
+ c20afc79e7f8b6b17c9d14d4560ec1c0  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_1.c
+ 6a870012de90ce05192e5d39a9726b84  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_2.c
+ cdd1b380c78f3f784258c553ef99a76c  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_3.c
+ 219ddba67537efe970cb71d1a45e9399  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_4.c
+ 83bae7bff318b52e06c850b9ef6d59e3  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_5.c
+ 6cd856b0f5f1baddfb519cbc1c17d2f7  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_6.c
+ eeaab42434d364218d68629977844155  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_7.c
+ 273f1a5439f75799d23ddf9f8b3f45ab  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_8.c
+ 91587f90325f8b91b4b8242d80db3dc7  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_9.c
+ 0d8a1ad5360c6fe1275670822c868f84  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_1.c
+ 67c8aebd2ef13fc6934764ad4de82009  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_2.c
+ 607765e12a3d2df430b6313e2c618000  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_3.c
+ a904fb991b59aa2f1851fba221df1885  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_4.c
+ c2287eaa773bcdcf4443fbd6af2d08af  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_5.c
+ 1aab4b59d03a0f203de95ab68a886885  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_6.c
+ 4f4029f8dc00309094f0ccd52a0c08f1  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_7.c
+ 841cd31f439fd562bd03ea81f3dfdb69  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_8.c
+ 9b1a5aa8c93ccf875898beb74a98c2c5  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_9.c
+ a95940f33925e4f48d92a4a039ee6b0b  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_1.c
+ f9b6afb9c9e16299fcf6e171942e83e2  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_2.c
+ bdee712feab801031936f61c7702f048  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_3.c
+ 1ea04730da7cd3886bd6d88f6fdabd45  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_4.c
+ 7243e79c0737b415b989a95858bae339  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_5.c
+ 569b5c57bbce11aeaee95ae6b4b8b46b  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_6.c
+ d4bbca47ba6f9fc2b817a970eb1018d8  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_7.c
+ 600aed17c4fe18af3b6fbc9d40f78e65  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_8.c
+ c1fc5391b53cc8ed6ecff62d1dbeb760  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_9.c
+ b5b345df346635e51d632ffe787933a7  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_1.c
+ 67867137345bce28b02c7c87f2c260a4  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_2.c
+ 3983f534370aa742e754cd6f7a0f79c0  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_3.c
+ ef9ca26ad273052560a22d52c196a52c  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_4.c
+ 0e50fb1aed1ceb2775e01b02d79c3961  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_5.c
+ 670ab1f4730bc4e39c44008f30a1c753  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_6.c
+ d8e996627e7276bbf99faa67f191620b  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_7.c
+ 9bd8ac014cb18163bbafbc4beffc9f33  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_8.c
+ ec8a7da374188dae71eb4c42ebc62329  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_9.c
+ 379102598fc19a39762409568385274a  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_1.c
+ a70dec2465dfc8bb2755f51f9a976ca7  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_2.c
+ e4c79814a0ed1be7872913ffa1b07a94  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_3.c
+ 5d237e884c540653cbf5ffface56c09d  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_4.c
+ a1f49719a6a2f5d52bed7574b5f19664  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_5.c
+ 20338404eea8edc0ba93110522fbcddc  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpuo_1.c
  493d587eaeaa014288091839539ed594  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cnot_1.c
  8670785b5e7c8b75fb219f0ddae33190  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cntb_1.c
  9e41721b4dcb606909b3efa814293f4e  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cntb_pat_1.c
  60a6cb5f3583610557e9b4dde6cd5453  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cntd_pat_1.c
  2279605ca76a398874fa5ee6664d3d52  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cnth_pat_1.c
  ccec270f903888ca00fe8baba907fa5f  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cntw_pat_1.c
! 2c4b75f5af375e44324610f217676d50  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cops.c
  fb0b99833eb0c168abc014e0554a156c  gcc/testsuite/gcc.target/aarch64/sve/acle/general/cpy_1.c
  75a2cc5eaade2a1a499200b05ae5f53c  gcc/testsuite/gcc.target/aarch64/sve/acle/general/debug_1.c
  16c8b0fa40139dcbb0edba6873a09834  gcc/testsuite/gcc.target/aarch64/sve/acle/general/debug_2.c
*************** fb0b99833eb0c168abc014e0554a156c  gcc/te
*** 71803,71812 ****
--- 71959,71970 ----
  32e318b075de813ba0e3537f2b23f26a  gcc/testsuite/gcc.target/aarch64/sve/acle/general/deref_1.c
  e46654fee58cc18d1ac01ba2cdb41732  gcc/testsuite/gcc.target/aarch64/sve/acle/general/deref_2.c
  091e427422cbb47ec0b2dcc6afb999d1  gcc/testsuite/gcc.target/aarch64/sve/acle/general/double_pragma_1.c
+ 72d5b2d98c0d3d52b3e368f448ebdddc  gcc/testsuite/gcc.target/aarch64/sve/acle/general/dup_1.c
  fbcf30f134e1f525bca176a6f7f969ad  gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_1.c
  031b72e29159a4e91bbc8c052d96d350  gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_10.c
  60aaa4e9d487bd6a45aa3bf0af5e8a64  gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_11.c
  745fd0887732daddba57f4a7433ad4d1  gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_12.c
+ 81ab5371a6242cf223a814b0a9885f98  gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_13.c
  114ed394614bf74c8e525a8cb9b78390  gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_2.c
  0936add06a30e2393cebcf86fef22d59  gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_3.c
  22a321f22dfb836a546f0c91f6823e8a  gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_4.c
*************** fe2921ebbd482cc73ae92d1bf808ade5  gcc/te
*** 71823,71828 ****
--- 71981,71987 ----
  f3ee29e74dc3e46b11b221f1f9979758  gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_lane_6.c
  b9ed110da6cf263fcc856e58cf1348f0  gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_lane_7.c
  df183dee14d76baa105e0554407121c8  gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_lane_8.c
+ 1596906da0f1b4eeebd026b9684b9897  gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_lane_9.c
  4a00b5ab16a909e72cf55e18b2a5429b  gcc/testsuite/gcc.target/aarch64/sve/acle/general/eor_1.c
  c41c67f44c22e68000696077b274f5ac  gcc/testsuite/gcc.target/aarch64/sve/acle/general/eqne_dup_1.c
  68be4a7d9fc95686fd0f20ee08808483  gcc/testsuite/gcc.target/aarch64/sve/acle/general/inline_1.c
*************** ae44d68f203e7d5a17d19738cfbc53a0  gcc/te
*** 71850,71858 ****
--- 72009,72024 ----
  618eed08c799209fcc7e876e7bc1f5a9  gcc/testsuite/gcc.target/aarch64/sve/acle/general/orn_1.c
  c43619dc0345cb75df63193d4ecf32a5  gcc/testsuite/gcc.target/aarch64/sve/acle/general/orr_1.c
  f467f9ddc87398511c12147760e80eb4  gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_1.c
+ 0a35f14f6f82735e897ca461fd10bd66  gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_2.c
+ acdd75031b126bdb8ede449a87a8b4c8  gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_3.c
+ eb5400f39cf4b8034ce9bf768b42f01e  gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_4.c
+ dc5cc4bd54f699543e29d49d190cf7f3  gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_5.c
+ 4505bd757cf0718372154e481c4a2da0  gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_6.c
+ 453c5ef83bc5137397e38e9f3c9d6da9  gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_7.c
  bb3a7f2587d8584d185738649f93a6f6  gcc/testsuite/gcc.target/aarch64/sve/acle/general/pfirst_1.c
  4a5457bf98a3061b6c949b777ceca410  gcc/testsuite/gcc.target/aarch64/sve/acle/general/pnext_1.c
  6d3b0cbb6b0b88e0030fbf0003faa4c9  gcc/testsuite/gcc.target/aarch64/sve/acle/general/pnext_2.c
+ 0d1a441abf9343b89608d4826b9155f7  gcc/testsuite/gcc.target/aarch64/sve/acle/general/pnext_3.c
  9ff121474de72b7f1e7df15e02d1fcbf  gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr104092.c
  e376d54074cb770c4949e830690ed08f  gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr106326_1.c
  c4e807392dbe7079bb88acf040351299  gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr106326_2.c
*************** c4e807392dbe7079bb88acf040351299  gcc/te
*** 71862,71867 ****
--- 72028,72035 ----
  b47de1519a1ea6d899c2a6cd56b65cba  gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr114577_2.c
  4be435ec882c5745457b0a6378296096  gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c
  a37d20c2585b9553233fb42e281e9b03  gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c
+ 89320642fc28eb425a70fa1fc222f0b2  gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr120718.c
+ c1f0d92266055a62f8c3a0b32cffca32  gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr121118_1.c
  cd84e485b3fa7a0d50f2ee5113eca33d  gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr94683.c
  111a35b5bdbe877086a99d29b13dc65b  gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr94700.c
  dd9873ff910539b000561a51ccc3a52f  gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr96146.c
*************** bf328a0ed3cadaf01cdcd516cb16a2eb  gcc/te
*** 71877,71891 ****
--- 72045,72063 ----
  21cf8f26265cb4080b1703c09d296dc5  gcc/testsuite/gcc.target/aarch64/sve/acle/general/ptrue_pat_5.c
  ef386f442776c7325a9c4120d5f0f1cd  gcc/testsuite/gcc.target/aarch64/sve/acle/general/qincb_1.c
  884f0309ada7f457179926eca68ecf14  gcc/testsuite/gcc.target/aarch64/sve/acle/general/rev-1.c
+ 52959d72e6279c53e3e28e80ecb896fe  gcc/testsuite/gcc.target/aarch64/sve/acle/general/rev_2.c
  b73d2b4b9aeaceb7898b89f8e147cc04  gcc/testsuite/gcc.target/aarch64/sve/acle/general/stack_vars_1.c
  a60971180940fb9126dc3f2440073c3a  gcc/testsuite/gcc.target/aarch64/sve/acle/general/struct_1.c
  9404c4e4b822b81b48891a1fe0625266  gcc/testsuite/gcc.target/aarch64/sve/acle/general/temporaries_1.c
  01c228bca66f0def69756fae10d3ddbf  gcc/testsuite/gcc.target/aarch64/sve/acle/general/undef_1.c
  de2f1d6ff8c05a5ea5ffb81b8ce61ce2  gcc/testsuite/gcc.target/aarch64/sve/acle/general/unoptimized_1.c
+ fd677c49e04614f005b51ddc46291259  gcc/testsuite/gcc.target/aarch64/sve/acle/general/unpkhi_1.c
+ 3cecabd6642340418348a991676fa78b  gcc/testsuite/gcc.target/aarch64/sve/acle/general/unpklo_1.c
  129d25d3f8de8545837b08910c736d81  gcc/testsuite/gcc.target/aarch64/sve/acle/general/whilele_1.c
  c6678960d749be98b106a4f7b03c6107  gcc/testsuite/gcc.target/aarch64/sve/acle/general/whilele_10.c
  b32f166240692ad09eeb88e4c41a0584  gcc/testsuite/gcc.target/aarch64/sve/acle/general/whilele_11.c
  3773293a3c03a36cfc6110e54ac5b251  gcc/testsuite/gcc.target/aarch64/sve/acle/general/whilele_12.c
+ daa82a42e977306c4d1764e7fced8896  gcc/testsuite/gcc.target/aarch64/sve/acle/general/whilele_13.c
  2af690a7706f6a510d3d0b49d8bcbc92  gcc/testsuite/gcc.target/aarch64/sve/acle/general/whilele_2.c
  786ef1b1105a4d7d76e8259890eddb76  gcc/testsuite/gcc.target/aarch64/sve/acle/general/whilele_3.c
  32aacb55289afea049bef27ee3e43b32  gcc/testsuite/gcc.target/aarch64/sve/acle/general/whilele_4.c
*************** f4c9f8f5a8d604bc447fb7d463e7735f  gcc/te
*** 71899,71904 ****
--- 72071,72077 ----
  14793ed2e5397935138c3dfaf3068f34  gcc/testsuite/gcc.target/aarch64/sve/acle/general/whilelt_3.c
  0806391c016c8debb474b7d2ccb7f9e1  gcc/testsuite/gcc.target/aarch64/sve/acle/general/whilelt_4.c
  a01ecfddff6a97f8ab51ac44399e1b21  gcc/testsuite/gcc.target/aarch64/sve/acle/general/whilelt_5.c
+ 8d27746de2e197744e83115819fe44f7  gcc/testsuite/gcc.target/aarch64/sve/acle/general/whilelt_6.c
  961cd5bf40c30fe194d6c5a5bb165705  gcc/testsuite/gcc.target/aarch64/sve/addsub_1.c
  56d4c411c942789ba83621762b5183d3  gcc/testsuite/gcc.target/aarch64/sve/addsub_2.c
  b55e3f8dc6c4519bfc6514735054694b  gcc/testsuite/gcc.target/aarch64/sve/adr_1.c
*************** c4376c1119d32edd62dbdbdd08e49357  gcc/te
*** 72639,72644 ****
--- 72812,72823 ----
  64e601a6c086feed3d6f413ecf0cde2b  gcc/testsuite/gcc.target/aarch64/sve/peel_ind_1.c
  700c78d8823bf7739fa28027793d9f21  gcc/testsuite/gcc.target/aarch64/sve/peel_ind_10.c
  97cb7e7106f61ce2e128ef8e2b287a5c  gcc/testsuite/gcc.target/aarch64/sve/peel_ind_10_run.c
+ d141727b8a1b53a9cbf9b00826bb536b  gcc/testsuite/gcc.target/aarch64/sve/peel_ind_11.c
+ c7be3d386d00158fa4fd485f85997a4a  gcc/testsuite/gcc.target/aarch64/sve/peel_ind_11_run.c
+ 65b33903cff93dfc21d5c710b1251789  gcc/testsuite/gcc.target/aarch64/sve/peel_ind_12.c
+ cf5911e80d16a3e85670a00b9b169a70  gcc/testsuite/gcc.target/aarch64/sve/peel_ind_12_run.c
+ d3421111b9d0c71bb816a189ca9c6c62  gcc/testsuite/gcc.target/aarch64/sve/peel_ind_13.c
+ 218cc357e6fab35253ba0c9af84d11b1  gcc/testsuite/gcc.target/aarch64/sve/peel_ind_13_run.c
  554f0eec3d39895e8e465acc9954378d  gcc/testsuite/gcc.target/aarch64/sve/peel_ind_1_run.c
  11928fb92734ba578ca3c71362426cd8  gcc/testsuite/gcc.target/aarch64/sve/peel_ind_2.c
  40ef61fe1aa9144c65314b0f7a98fa78  gcc/testsuite/gcc.target/aarch64/sve/peel_ind_2_run.c
*************** a866cb5b08078d8fe7c2f8ead2f55150  gcc/te
*** 72777,72785 ****
  e96a492f889ca21f0d94c0f7863bccd3  gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-2.c
  1c82ca31e6643e7150d5be264a0b3f0b  gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-3.c
  e84d1cb8e3ce67d9fc555c73dccf9a6f  gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-4.c
! 662fb333762728a29373e5642e6de83c  gcc/testsuite/gcc.target/aarch64/sve/pred_clobber_1.c
! 1d6cb14b7c2d68b6b336fdff29330f8a  gcc/testsuite/gcc.target/aarch64/sve/pred_clobber_2.c
! 0ebf2ddc621f6ded67d44e392cbdfe02  gcc/testsuite/gcc.target/aarch64/sve/pred_clobber_3.c
  4ea492d400a838a23f3f4e9d1e830c73  gcc/testsuite/gcc.target/aarch64/sve/pred_clobber_4.c
  e9e92c2ec92da9f29261bd9d1a3cace4  gcc/testsuite/gcc.target/aarch64/sve/pred_elim_1.c
  bc00a0e0dea7500ecba0544bd58c0277  gcc/testsuite/gcc.target/aarch64/sve/pred_elim_2.c
--- 72956,72964 ----
  e96a492f889ca21f0d94c0f7863bccd3  gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-2.c
  1c82ca31e6643e7150d5be264a0b3f0b  gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-3.c
  e84d1cb8e3ce67d9fc555c73dccf9a6f  gcc/testsuite/gcc.target/aarch64/sve/pred-not-gen-4.c
! 8d3c229f6dadd0c3f09f5f06ee9cc573  gcc/testsuite/gcc.target/aarch64/sve/pred_clobber_1.c
! 5a60ebd350ae5163b8b5cad1a672c63f  gcc/testsuite/gcc.target/aarch64/sve/pred_clobber_2.c
! 4f3511b8c284631ce25bfb4ac9aa76d3  gcc/testsuite/gcc.target/aarch64/sve/pred_clobber_3.c
  4ea492d400a838a23f3f4e9d1e830c73  gcc/testsuite/gcc.target/aarch64/sve/pred_clobber_4.c
  e9e92c2ec92da9f29261bd9d1a3cace4  gcc/testsuite/gcc.target/aarch64/sve/pred_elim_1.c
  bc00a0e0dea7500ecba0544bd58c0277  gcc/testsuite/gcc.target/aarch64/sve/pred_elim_2.c
*************** f6109ccab2b862ae05ae03274ecbfd7d  gcc/te
*** 74579,74592 ****
--- 74758,74777 ----
  5dc288c453fe0628ecb1c0a4e662e89e  gcc/testsuite/gcc.target/aarch64/sve2/acle/general/match_1.c
  78c6211a3aa4a4e23f2ee812b07b8d9c  gcc/testsuite/gcc.target/aarch64/sve2/acle/general/match_2.c
  0fc7b1a5f8b8b2048a528f0ec6633f88  gcc/testsuite/gcc.target/aarch64/sve2/acle/general/match_3.c
+ 8bf3d04737f437db862d5854d48f19cf  gcc/testsuite/gcc.target/aarch64/sve2/acle/general/match_4.c
+ d3b59161e9e7ae37491fe223a994fac0  gcc/testsuite/gcc.target/aarch64/sve2/acle/general/nmatch_1.c
+ 154437619908e96189d38f8f31309e80  gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilege_1.c
+ f36e48ee61c65b8a5d0abe23195edad3  gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilegt_1.c
  2ae9a0dc7a880248710c83f875b9a887  gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilerw_1.c
  3b4778b66c8585691c1190455d3cfc91  gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilerw_2.c
  c05da7ef1a9d9198333ab71234110681  gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilerw_3.c
  f19d9cab518ade5054964a9a86ed21d6  gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilerw_4.c
+ 40a21210ee791320557629e69bdc0435  gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilerw_5.c
  e1b15e476877c8f2c744653c81c512d9  gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilewr_1.c
  3c6c761c7accb7f9f34bf069acb29c14  gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilewr_2.c
  aef04c78854b1edddae98ae00659cd01  gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilewr_3.c
  a08e078470cc1c37a2df43e2e585497e  gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilewr_4.c
+ 2a2b498a0361dc0091118bd23a46b41c  gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilewr_5.c
  f23df8d77bb63840931d1aee39d47578  gcc/testsuite/gcc.target/aarch64/sve2/average_1.c
  21204d3f95cbab44767f0443370c95b4  gcc/testsuite/gcc.target/aarch64/sve2/bcax_1.c
  74c3605a720149110e52ba4d1a65faa9  gcc/testsuite/gcc.target/aarch64/sve2/bitsel_1.c
*************** fc2eb8ac52faed5fba0a017b858d4ae4  gcc/te
*** 74726,74731 ****
--- 74911,74917 ----
  963d140aad02af938776268e2a209386  gcc/testsuite/gcc.target/aarch64/torture/aarch64-torture.exp
  4036d83a59b4adcf9e8a4cf5a291d22e  gcc/testsuite/gcc.target/aarch64/torture/pr111677.c
  8ba6cf5317762b2b89350d4f652efa53  gcc/testsuite/gcc.target/aarch64/torture/pr116564.c
+ 626bb6bb64c1bbe8eb5e2b92bf925aeb  gcc/testsuite/gcc.target/aarch64/torture/pr120986-2.c
  5266ac107a73e3ee1d1f44e1cda7d9f2  gcc/testsuite/gcc.target/aarch64/torture/simd-abi-1.c
  9c3416db2fc04c3f91b03ecae15e943e  gcc/testsuite/gcc.target/aarch64/torture/simd-abi-10.c
  df55bfe2c1ce46074b19b4566cedeef4  gcc/testsuite/gcc.target/aarch64/torture/simd-abi-11.c
*************** ebdb15be89bef0e9c175a92e85f05897  gcc/te
*** 75572,75578 ****
  025ddb61ae05cb8eff987c8cec961244  gcc/testsuite/gcc.target/arm/cmse/cmse-15.c
  5ff0a15a5a399d7d0fafcad196691899  gcc/testsuite/gcc.target/arm/cmse/cmse-16.c
  ec0c70b5899b431b52c53aba7a25843f  gcc/testsuite/gcc.target/arm/cmse/cmse-17.c
! a0cc973b6770567d9ae9d0d7e19290d3  gcc/testsuite/gcc.target/arm/cmse/cmse-18.c
  d307e00dde7714d2f353a08b08451b57  gcc/testsuite/gcc.target/arm/cmse/cmse-1c99.c
  aee7e08137af9ad5cb0dc780a0c319de  gcc/testsuite/gcc.target/arm/cmse/cmse-20.c
  266f2af407dee9fa3bf85b781282684c  gcc/testsuite/gcc.target/arm/cmse/cmse-3.c
--- 75758,75765 ----
  025ddb61ae05cb8eff987c8cec961244  gcc/testsuite/gcc.target/arm/cmse/cmse-15.c
  5ff0a15a5a399d7d0fafcad196691899  gcc/testsuite/gcc.target/arm/cmse/cmse-16.c
  ec0c70b5899b431b52c53aba7a25843f  gcc/testsuite/gcc.target/arm/cmse/cmse-17.c
! 2b929af00dad162524dec248d1b72aa3  gcc/testsuite/gcc.target/arm/cmse/cmse-18.c
! a5e3d47fdebe7e5dea4aaa5a6dbfbfa6  gcc/testsuite/gcc.target/arm/cmse/cmse-19.c
  d307e00dde7714d2f353a08b08451b57  gcc/testsuite/gcc.target/arm/cmse/cmse-1c99.c
  aee7e08137af9ad5cb0dc780a0c319de  gcc/testsuite/gcc.target/arm/cmse/cmse-20.c
  266f2af407dee9fa3bf85b781282684c  gcc/testsuite/gcc.target/arm/cmse/cmse-3.c
*************** e6f8c16f16933f4321616345f9504093  gcc/te
*** 79290,79297 ****
  e4a3459589124a7656ce0cc1ace448d3  gcc/testsuite/gcc.target/avr/torture/pr116407-4.c
  f5f0a4821b45497a6a7311f96ebbd9bc  gcc/testsuite/gcc.target/avr/torture/pr116953.c
  8f59464224740dd6b42a62b264f2a8e2  gcc/testsuite/gcc.target/avr/torture/pr117191.c
! 638eda82e4fd2d1174d9924cb8f85205  gcc/testsuite/gcc.target/avr/torture/pr118591-1.c
! b0760735b41e884b68592d2f55b5906f  gcc/testsuite/gcc.target/avr/torture/pr118591-2.c
  3c4063e4c9576c55f40ea4144444e462  gcc/testsuite/gcc.target/avr/torture/pr118878.c
  eba4fe077050371bba16b0a0151a38e5  gcc/testsuite/gcc.target/avr/torture/pr119421-sreg.c
  4c0fa0954da76b8e5a21293cd6818d53  gcc/testsuite/gcc.target/avr/torture/pr119989-flashx-1.c
--- 79477,79484 ----
  e4a3459589124a7656ce0cc1ace448d3  gcc/testsuite/gcc.target/avr/torture/pr116407-4.c
  f5f0a4821b45497a6a7311f96ebbd9bc  gcc/testsuite/gcc.target/avr/torture/pr116953.c
  8f59464224740dd6b42a62b264f2a8e2  gcc/testsuite/gcc.target/avr/torture/pr117191.c
! aff142ef3e2a10cb9a2057fe0de70eff  gcc/testsuite/gcc.target/avr/torture/pr118591-1.c
! 06c9fed732ed8e65dced7b85d5645223  gcc/testsuite/gcc.target/avr/torture/pr118591-2.c
  3c4063e4c9576c55f40ea4144444e462  gcc/testsuite/gcc.target/avr/torture/pr118878.c
  eba4fe077050371bba16b0a0151a38e5  gcc/testsuite/gcc.target/avr/torture/pr119421-sreg.c
  4c0fa0954da76b8e5a21293cd6818d53  gcc/testsuite/gcc.target/avr/torture/pr119989-flashx-1.c
*************** cca7e10ee55fb1f96e6f6f5962a52b47  gcc/te
*** 80359,80365 ****
  12e90c2a4e4c615ce5067b4215a5d18b  gcc/testsuite/gcc.target/i386/asm-flag-6.c
  c9e95a50e4c08ce058a523de15b6c8fd  gcc/testsuite/gcc.target/i386/asm-flag-7.c
  9f878b07bed3798501be7940ffac2844  gcc/testsuite/gcc.target/i386/asm-hard-reg-1.c
! 317a07e8b56b299b99f2de47c7dada42  gcc/testsuite/gcc.target/i386/asm-hard-reg-2.c
  837d6eb699db50d462ddc69fd4d051c2  gcc/testsuite/gcc.target/i386/asm-mem.c
  4ae3c20d33728cb22ef071075de01013  gcc/testsuite/gcc.target/i386/asm-raw-symbol.c
  60b9c38ffe8be2c784e795ea98607891  gcc/testsuite/gcc.target/i386/asm-redzone-1.c
--- 80546,80552 ----
  12e90c2a4e4c615ce5067b4215a5d18b  gcc/testsuite/gcc.target/i386/asm-flag-6.c
  c9e95a50e4c08ce058a523de15b6c8fd  gcc/testsuite/gcc.target/i386/asm-flag-7.c
  9f878b07bed3798501be7940ffac2844  gcc/testsuite/gcc.target/i386/asm-hard-reg-1.c
! 015b6f5d9bfe5601f3d2f1cb938f63d2  gcc/testsuite/gcc.target/i386/asm-hard-reg-2.c
  837d6eb699db50d462ddc69fd4d051c2  gcc/testsuite/gcc.target/i386/asm-mem.c
  4ae3c20d33728cb22ef071075de01013  gcc/testsuite/gcc.target/i386/asm-raw-symbol.c
  60b9c38ffe8be2c784e795ea98607891  gcc/testsuite/gcc.target/i386/asm-redzone-1.c
*************** dc16be3575b02803198cc00eac4f0ffe  gcc/te
*** 86405,86410 ****
--- 86592,86598 ----
  e46459a506a641702fdeaa8713b478db  gcc/testsuite/gcc.target/i386/pr120936-7.c
  b56b7319ec16cc733aa742b3020839be  gcc/testsuite/gcc.target/i386/pr120936-8.c
  c76df20d01878e92fcfede59dff4d377  gcc/testsuite/gcc.target/i386/pr120936-9.c
+ 7aab49fe981257c8717fc97ce53ade31  gcc/testsuite/gcc.target/i386/pr120941-1.c
  56e6214e78411271065383bb6b1486a7  gcc/testsuite/gcc.target/i386/pr121015.c
  515b72df52c2bf5b6d8e75709651af68  gcc/testsuite/gcc.target/i386/pr121062-1.c
  5652a3df7a8eedd930822cda2fa45a36  gcc/testsuite/gcc.target/i386/pr121062-2.c
*************** a4179457b9ba1ad12db00f23a8ca52b4  gcc/te
*** 86422,86427 ****
--- 86610,86617 ----
  d4ebe08b4cb963582547d8bb5712e712  gcc/testsuite/gcc.target/i386/pr121208-3a.c
  5064c3ab2b92e2f20dcd604d557d738c  gcc/testsuite/gcc.target/i386/pr121208-3b.c
  12e796120a8d76792772ddd159f57f3f  gcc/testsuite/gcc.target/i386/pr121274.c
+ 9e5e7825e0736b7812bd1fc447f5443f  gcc/testsuite/gcc.target/i386/pr121303.c
+ 284de263b19344a83d99ed3bcd71381a  gcc/testsuite/gcc.target/i386/pr121410.c
  f99f88a6e994ad6e55e065e41bc58f8f  gcc/testsuite/gcc.target/i386/pr12329.c
  8951a1fa31f2d45ef9eacfff6a733f77  gcc/testsuite/gcc.target/i386/pr13366.c
  9a752a4b3b77930d91d3c8b0c8897b90  gcc/testsuite/gcc.target/i386/pr13685.c
*************** e848ec23a6a21441ce72a346a0736a69  gcc/te
*** 87929,87935 ****
  79825d8e4562ba47624b18d80f41d52b  gcc/testsuite/gcc.target/i386/pr90510.c
  71daed2fce58de22bfa193c1d29d8205  gcc/testsuite/gcc.target/i386/pr90547.c
  cd32b51927f32216f74b09c3940931d8  gcc/testsuite/gcc.target/i386/pr90552.c
! 131fcfea3c839d23cb34af1cb8402815  gcc/testsuite/gcc.target/i386/pr90579.c
  3333c9fab61d2b0a85919c2f2bcabcf7  gcc/testsuite/gcc.target/i386/pr90693-2.c
  abe8a59c26b149ad14f8d4056fbcad42  gcc/testsuite/gcc.target/i386/pr90693-3.c
  922e080c15dbf15c45236be5280d0b63  gcc/testsuite/gcc.target/i386/pr90693-4.c
--- 88119,88125 ----
  79825d8e4562ba47624b18d80f41d52b  gcc/testsuite/gcc.target/i386/pr90510.c
  71daed2fce58de22bfa193c1d29d8205  gcc/testsuite/gcc.target/i386/pr90547.c
  cd32b51927f32216f74b09c3940931d8  gcc/testsuite/gcc.target/i386/pr90552.c
! daaf5dca7f0bcaff7df841628e698088  gcc/testsuite/gcc.target/i386/pr90579.c
  3333c9fab61d2b0a85919c2f2bcabcf7  gcc/testsuite/gcc.target/i386/pr90693-2.c
  abe8a59c26b149ad14f8d4056fbcad42  gcc/testsuite/gcc.target/i386/pr90693-3.c
  922e080c15dbf15c45236be5280d0b63  gcc/testsuite/gcc.target/i386/pr90693-4.c
*************** b5b81669c4bd638c4b3b2a03da3402c7  gcc/te
*** 94400,94405 ****
--- 94590,94600 ----
  747803496e0db732a7ac3c8b93f70c1f  gcc/testsuite/gcc.target/riscv/arch-sstvala.c
  12abb6568b8040d0ee34155127879caf  gcc/testsuite/gcc.target/riscv/arch-sstvecd.c
  e3b6089c5a49102f5c6487e6f6d34f73  gcc/testsuite/gcc.target/riscv/arch-ssu64xl.c
+ ff7fbac41990f8bf42295b600d22c33d  gcc/testsuite/gcc.target/riscv/arch-unset-1.c
+ 3a4fbdb774bb76449e7cf8623a121214  gcc/testsuite/gcc.target/riscv/arch-unset-2.c
+ c7b45bc32e4a79b9e13b5b44d05d2e24  gcc/testsuite/gcc.target/riscv/arch-unset-3.c
+ 85de41fcf6ff9844281db0ea95e87d0b  gcc/testsuite/gcc.target/riscv/arch-unset-4.c
+ 9268e7392f71c9469c8d277852e033f8  gcc/testsuite/gcc.target/riscv/arch-unset-5.c
  7e53fcd0c393d0469b2cf1b3dd12ede9  gcc/testsuite/gcc.target/riscv/arch-zilsd-1.c
  558e0806ff5d2460170aa161b8130f20  gcc/testsuite/gcc.target/riscv/arch-zilsd-2.c
  1ea95cf57e0971954e5c964450d8b009  gcc/testsuite/gcc.target/riscv/arch-zilsd-3.c
*************** ba1ba99efa0d2f13ca8024109af75348  gcc/te
*** 99576,99583 ****
  821e094056be5457ca15b88e19089dcf  gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-1-u16-from-u32.c
  f2859d2015a9ff09b82d77fb7eb788dc  gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-1-u16-from-u64.c
  58655b9331e61fadd96bcc0c4c763f03  gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-1-u32-from-u128.c
! c441c75179a57721800e9edb28ad383a  gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-1-u32-from-u64.c
! 210deb5f55d5109d72ae02fb9c8a4d1d  gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-1-u64-from-u128.c
  0ab5a9ba4e2a4a91ebda3290517e4de7  gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-1-u8-from-u128.c
  88f7e512a5ea7d2342403292b9b1e63c  gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-1-u8-from-u16.c
  705eba5d5ba747ca0ed8d33d118caa0a  gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-1-u8-from-u32.c
--- 99771,99778 ----
  821e094056be5457ca15b88e19089dcf  gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-1-u16-from-u32.c
  f2859d2015a9ff09b82d77fb7eb788dc  gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-1-u16-from-u64.c
  58655b9331e61fadd96bcc0c4c763f03  gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-1-u32-from-u128.c
! c3255dd535e583c1c4e685cbcd5b897e  gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-1-u32-from-u64.c
! e9bcdbd172215088daea1a3b507b73b3  gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-1-u64-from-u128.c
  0ab5a9ba4e2a4a91ebda3290517e4de7  gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-1-u8-from-u128.c
  88f7e512a5ea7d2342403292b9b1e63c  gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-1-u8-from-u16.c
  705eba5d5ba747ca0ed8d33d118caa0a  gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-1-u8-from-u32.c
*************** bf08d8ae3952e5a9f6d75de6c60a3a5f  gcc/te
*** 100275,100280 ****
--- 100470,100479 ----
  4ac155357942947a9caec612263831f1  gcc/testsuite/gcc.target/s390/asm-machine-4.c
  705a9e97aaf2d837c67542509852ce62  gcc/testsuite/gcc.target/s390/atomic-align-1.c
  acb0386d8fc9ec46feddca150e92bbeb  gcc/testsuite/gcc.target/s390/atomic-align-2.c
+ 8ddeb7085aada11eb00c5b2a7387a8aa  gcc/testsuite/gcc.target/s390/bitint-1.c
+ abe0623b0841a0bdbc34b281de0dd0d0  gcc/testsuite/gcc.target/s390/bitint-2.c
+ e89e24e20f008ad8effa9e3f2fd9d042  gcc/testsuite/gcc.target/s390/bitint-3.c
+ cdfaf0f556535d7f3ffb05c59924a233  gcc/testsuite/gcc.target/s390/bitint-4.c
  381808a4590567090c1e800f04ae55f5  gcc/testsuite/gcc.target/s390/bswap-1.c
  2750052bc05f059828b76c05a2a7da2e  gcc/testsuite/gcc.target/s390/bswaphi-1.c
  6837d1a6d1d448c21031e10330351313  gcc/testsuite/gcc.target/s390/builtin-constant-p-threading.c
*************** f1171b22010cb5ffdc5f3d7a3370bdcf  gcc/te
*** 107721,107733 ****
  29c532057814482ac15d86376b90909b  gcc/testsuite/gfortran.dg/c_f_pointer_logical.f03
  714b95efbc27be7c9d3a1476268dd317  gcc/testsuite/gfortran.dg/c_f_pointer_logical_driver.c
  3f1850aff3d8555d7f9a5c35024e4640  gcc/testsuite/gfortran.dg/c_f_pointer_shape_test.f90
! 315077a613b8102e36f21e22539cc788  gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_2.f03
! 0137a0eb0d17c670894c279c5bdc08dd  gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_2_driver.c
  79ad65a07c5fba41141d69b8eb8101eb  gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_3.f03
! 7157afa87951c0b05ed794a1539bfd38  gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_4.f03
! 0137a0eb0d17c670894c279c5bdc08dd  gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_4_driver.c
  6292043fad207297ab75ed0d1f1422be  gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_5.f90
  e63e1cb2a2a983de3e177c8704129d32  gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_6.f90
  0aa6e86dc29b145c26a1e0c9347d3b44  gcc/testsuite/gfortran.dg/c_f_pointer_tests.f90
  bcf9cbe8f6dcade38e751db85acbf9b4  gcc/testsuite/gfortran.dg/c_f_pointer_tests_2.f03
  3fe88d45ed4469bd39dc91bac863922d  gcc/testsuite/gfortran.dg/c_f_pointer_tests_3.f90
--- 107920,107931 ----
  29c532057814482ac15d86376b90909b  gcc/testsuite/gfortran.dg/c_f_pointer_logical.f03
  714b95efbc27be7c9d3a1476268dd317  gcc/testsuite/gfortran.dg/c_f_pointer_logical_driver.c
  3f1850aff3d8555d7f9a5c35024e4640  gcc/testsuite/gfortran.dg/c_f_pointer_shape_test.f90
! dd6d080e21728a151261b9ccacc3479d  gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_2.f03
  79ad65a07c5fba41141d69b8eb8101eb  gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_3.f03
! 9f42b19f33c52ed6bc1590e9c84ca76b  gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_4.f03
  6292043fad207297ab75ed0d1f1422be  gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_5.f90
  e63e1cb2a2a983de3e177c8704129d32  gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_6.f90
+ dace97a128875a29cc4162e799166d4b  gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_driver.c
  0aa6e86dc29b145c26a1e0c9347d3b44  gcc/testsuite/gfortran.dg/c_f_pointer_tests.f90
  bcf9cbe8f6dcade38e751db85acbf9b4  gcc/testsuite/gfortran.dg/c_f_pointer_tests_2.f03
  3fe88d45ed4469bd39dc91bac863922d  gcc/testsuite/gfortran.dg/c_f_pointer_tests_3.f90
*************** dc5927a86c1c614c2ff8285c60cf86f9  gcc/te
*** 109742,109747 ****
--- 109940,109949 ----
  0693d36931aa7cbf93670c0a9b2ef1ae  gcc/testsuite/gfortran.dg/generic_8.f90
  a82f9f84e4990bbf61e77c1d4b17a059  gcc/testsuite/gfortran.dg/generic_9.f90
  db58873e32f4e2d9ac682fe5fd7f61ec  gcc/testsuite/gfortran.dg/generic_actual_arg.f90
+ f711e9e62535439d0e7e08ab609a1fd7  gcc/testsuite/gfortran.dg/generic_stmt_1.f90
+ 2b2b5797afa37c866edb2144f8cd0708  gcc/testsuite/gfortran.dg/generic_stmt_2.f90
+ 92d54294107fbf2867f0877f11e0296c  gcc/testsuite/gfortran.dg/generic_stmt_3.f90
+ 272e94ec47ba95ef136b55b8ccf82544  gcc/testsuite/gfortran.dg/generic_stmt_4.f90
  fae23b41460270e976cf93da0fa8c1ca  gcc/testsuite/gfortran.dg/generic_typebound_operator_1.f90
  dde1a2efd44a1842615d10e590968dd6  gcc/testsuite/gfortran.dg/getenv_1.f90
  c0e505ce7e71351fb9249932cf5da47d  gcc/testsuite/gfortran.dg/global_references_1.f90
*************** d3ff5b316cd12c550dcd3a53eb6f9f8a  gcc/te
*** 112264,112269 ****
--- 112466,112472 ----
  00d9a53a9858ef445138e77a1d29a1a0  gcc/testsuite/gfortran.dg/pointer_assign_12.f90
  ffdb03e59c952fefddde0fe00786a386  gcc/testsuite/gfortran.dg/pointer_assign_14.f90
  31e6165ecfe4f550ef7881351986d7f5  gcc/testsuite/gfortran.dg/pointer_assign_15.f90
+ 2dfed32902e7ce844ad19f8bd2170a38  gcc/testsuite/gfortran.dg/pointer_assign_16.f90
  8716a372c931ca96cb06c0d77f6b27b1  gcc/testsuite/gfortran.dg/pointer_assign_2.f90
  9ff66a633865089dac5ced6229e1b3ba  gcc/testsuite/gfortran.dg/pointer_assign_3.f90
  7d74d21e75c683b97fd68d13a54b02a1  gcc/testsuite/gfortran.dg/pointer_assign_4.f90
*************** e79a5fff5c4841ba8e2da41f54be1c1c  gcc/te
*** 112548,112553 ****
--- 112751,112757 ----
  05457962d41eef6a41a3de889144d78a  gcc/testsuite/gfortran.dg/pr120191_3.f90
  b1cb2c9a52574c2df5df49bd13ee7e5d  gcc/testsuite/gfortran.dg/pr120196.f90
  94f286710243a0388de6f82a32d72ca5  gcc/testsuite/gfortran.dg/pr120743.f90
+ 9a63937be6d5e03574fd9c46968454c5  gcc/testsuite/gfortran.dg/pr121234.f90
  984f8307f36d56a0b48b5acce2dd5eb5  gcc/testsuite/gfortran.dg/pr12884.f
  64075248b9d1bffd6f380bb4e2a6eae0  gcc/testsuite/gfortran.dg/pr15129.f90
  e9cbd51db4e16292fc5dd1fead2e5a49  gcc/testsuite/gfortran.dg/pr15140.f90
*************** a658e6e3511698723b87be3277ba706d  gcc/te
*** 122214,122220 ****
  645e8af17b334c4e279636a7b47dacbe  gcc/testsuite/lib/mike-g++.exp
  b2d617c3a17f3ed4084a60722369c3a8  gcc/testsuite/lib/mike-gcc.exp
  bf783dcd14ad74babc1bf3e91cc46055  gcc/testsuite/lib/modules.exp
! 97bc4436b04d543c4739c11a3f4c7c79  gcc/testsuite/lib/multiline.exp
  1c00843e9346dc308c9c3779eb8ca531  gcc/testsuite/lib/obj-c++-dg.exp
  e7c501da98d4a79a382f65d5a172d7b5  gcc/testsuite/lib/obj-c++.exp
  19cb4fa8eed364c6b80adb42c6765a11  gcc/testsuite/lib/objc-dg.exp
--- 122418,122424 ----
  645e8af17b334c4e279636a7b47dacbe  gcc/testsuite/lib/mike-g++.exp
  b2d617c3a17f3ed4084a60722369c3a8  gcc/testsuite/lib/mike-gcc.exp
  bf783dcd14ad74babc1bf3e91cc46055  gcc/testsuite/lib/modules.exp
! 3b0fe32f6824bdeabec33f57d9935ba8  gcc/testsuite/lib/multiline.exp
  1c00843e9346dc308c9c3779eb8ca531  gcc/testsuite/lib/obj-c++-dg.exp
  e7c501da98d4a79a382f65d5a172d7b5  gcc/testsuite/lib/obj-c++.exp
  19cb4fa8eed364c6b80adb42c6765a11  gcc/testsuite/lib/objc-dg.exp
*************** e7c501da98d4a79a382f65d5a172d7b5  gcc/te
*** 122226,122232 ****
  4e295ef8c79574b6d01edf397fa2ba08  gcc/testsuite/lib/profopt.exp
  d7307d6eecb64fbf8475c3fba44ea3ee  gcc/testsuite/lib/prune.exp
  430635d56dfe6d0f15cb8aaf2de52cdd  gcc/testsuite/lib/rust-dg.exp
! d13a537e9f50905986ddedd8e2b67459  gcc/testsuite/lib/rust.exp
  a447115837a98ea4ab8390ca3c1d400a  gcc/testsuite/lib/sarif-replay-dg.exp
  2d0f3bd65b46db089989d897e60ee550  gcc/testsuite/lib/sarif-replay.exp
  cdfac88acd33dec95625eb0cca4bc571  gcc/testsuite/lib/sarif-schema-2.1.0.json
--- 122430,122436 ----
  4e295ef8c79574b6d01edf397fa2ba08  gcc/testsuite/lib/profopt.exp
  d7307d6eecb64fbf8475c3fba44ea3ee  gcc/testsuite/lib/prune.exp
  430635d56dfe6d0f15cb8aaf2de52cdd  gcc/testsuite/lib/rust-dg.exp
! 379c5cfaf969df57b70bc235b35a68e5  gcc/testsuite/lib/rust.exp
  a447115837a98ea4ab8390ca3c1d400a  gcc/testsuite/lib/sarif-replay-dg.exp
  2d0f3bd65b46db089989d897e60ee550  gcc/testsuite/lib/sarif-replay.exp
  cdfac88acd33dec95625eb0cca4bc571  gcc/testsuite/lib/sarif-schema-2.1.0.json
*************** d57fc2a0f3c7008b2d60cefb8625c318  gcc/te
*** 122283,122289 ****
  f1a0e78f1b655e672939cd8c3f01139b  gcc/testsuite/libgdiagnostics.dg/test-metadata-c.py
  8908b5e3eb88ff5a3ef9785ff3ac6bb8  gcc/testsuite/libgdiagnostics.dg/test-metadata.c
  95d9cf174141475f2b01e734e9a5b240  gcc/testsuite/libgdiagnostics.dg/test-multiple-lines-c.py
! 9c1ae4d6de3ac35f5a21098a72e3349d  gcc/testsuite/libgdiagnostics.dg/test-multiple-lines.c
  835720a23698d89b73c5e6cf6081b8cf  gcc/testsuite/libgdiagnostics.dg/test-nested-logical-locations-json-c.py
  d99e58b0d09b00c936b9bd4f82c99516  gcc/testsuite/libgdiagnostics.dg/test-nested-logical-locations-json.c
  a70977ae05d2dfba2c8cc4b60fe94109  gcc/testsuite/libgdiagnostics.dg/test-no-column-c.py
--- 122487,122493 ----
  f1a0e78f1b655e672939cd8c3f01139b  gcc/testsuite/libgdiagnostics.dg/test-metadata-c.py
  8908b5e3eb88ff5a3ef9785ff3ac6bb8  gcc/testsuite/libgdiagnostics.dg/test-metadata.c
  95d9cf174141475f2b01e734e9a5b240  gcc/testsuite/libgdiagnostics.dg/test-multiple-lines-c.py
! cf17d819d0790440744ffd04fca02cc5  gcc/testsuite/libgdiagnostics.dg/test-multiple-lines.c
  835720a23698d89b73c5e6cf6081b8cf  gcc/testsuite/libgdiagnostics.dg/test-nested-logical-locations-json-c.py
  d99e58b0d09b00c936b9bd4f82c99516  gcc/testsuite/libgdiagnostics.dg/test-nested-logical-locations-json.c
  a70977ae05d2dfba2c8cc4b60fe94109  gcc/testsuite/libgdiagnostics.dg/test-no-column-c.py
*************** c28b3534baed5649e532dc6b8d82a0fa  gcc/te
*** 123336,123348 ****
  d6cef0e2a9876718ef7a3fd4beeb6a17  gcc/testsuite/rust/compile/abi-vardaic.rs
  464bc566186bb15868c776c6af427545  gcc/testsuite/rust/compile/additional-trait-bounds1.rs
  91d6766e611dc0b1a16a54962732e6d9  gcc/testsuite/rust/compile/additional-trait-bounds2.rs
! 3d2cc4961107a117ce3dd0e454714ec3  gcc/testsuite/rust/compile/additional-trait-bounds2nr2.rs
! 6e019d4b8b35700f65898fed199587a1  gcc/testsuite/rust/compile/all-cast.rs
  901b9d713edac630ba6ea674c4450902  gcc/testsuite/rust/compile/array3.rs
  d2c5ff8cb3d6990bbfd11e406cca6a23  gcc/testsuite/rust/compile/array4.rs
  ec15ff347aa69c536e7e791163bb9e73  gcc/testsuite/rust/compile/array_empty_list.rs
  4d9cb4f27492d0e9e7915172cfa058d1  gcc/testsuite/rust/compile/arrays1.rs
! 1dfa98b92fcad6c7f618d10b415bef6b  gcc/testsuite/rust/compile/arrays2.rs
  07cc7e7ee38e972eb2ab6058ab910205  gcc/testsuite/rust/compile/assume.rs
  6d43a3c855de9a784b5daf14d332bb2c  gcc/testsuite/rust/compile/attr-mismatch-crate-name.rs
  e3c9ec33d7df70539fa80809be2ce0c9  gcc/testsuite/rust/compile/attr_cold.rs
--- 123540,123552 ----
  d6cef0e2a9876718ef7a3fd4beeb6a17  gcc/testsuite/rust/compile/abi-vardaic.rs
  464bc566186bb15868c776c6af427545  gcc/testsuite/rust/compile/additional-trait-bounds1.rs
  91d6766e611dc0b1a16a54962732e6d9  gcc/testsuite/rust/compile/additional-trait-bounds2.rs
! 91d6766e611dc0b1a16a54962732e6d9  gcc/testsuite/rust/compile/additional-trait-bounds2nr2.rs
! d132a3113ba9a617edbc414edce9fa3d  gcc/testsuite/rust/compile/all-cast.rs
  901b9d713edac630ba6ea674c4450902  gcc/testsuite/rust/compile/array3.rs
  d2c5ff8cb3d6990bbfd11e406cca6a23  gcc/testsuite/rust/compile/array4.rs
  ec15ff347aa69c536e7e791163bb9e73  gcc/testsuite/rust/compile/array_empty_list.rs
  4d9cb4f27492d0e9e7915172cfa058d1  gcc/testsuite/rust/compile/arrays1.rs
! a50f83c7d5e7ebc8dba9c772baf38b47  gcc/testsuite/rust/compile/arrays2.rs
  07cc7e7ee38e972eb2ab6058ab910205  gcc/testsuite/rust/compile/assume.rs
  6d43a3c855de9a784b5daf14d332bb2c  gcc/testsuite/rust/compile/attr-mismatch-crate-name.rs
  e3c9ec33d7df70539fa80809be2ce0c9  gcc/testsuite/rust/compile/attr_cold.rs
*************** d9be47bf725d64b4d76c4e5de43dd2da  gcc/te
*** 123353,123362 ****
  10958953946fbdde105431e2937a1695  gcc/testsuite/rust/compile/auto_trait_super_trait.rs
  32fbddcb2f485e6e1367e04a37536c61  gcc/testsuite/rust/compile/auto_trait_valid.rs
  001db0fdcde4867110a5bb0dfede22b6  gcc/testsuite/rust/compile/auto_traits1.rs
! 082ab8a4de2b630b4c2f44df2e6536c7  gcc/testsuite/rust/compile/auto_traits2.rs
  274440970f2f3850e87dbb1f309f82db  gcc/testsuite/rust/compile/auto_traits4.rs
  7673a55108cb36ca1835b653cd9d9d0d  gcc/testsuite/rust/compile/bad-crate-name1.rs
  c8c58ec31af772aad429da99744fea8c  gcc/testsuite/rust/compile/bad-crate-name2.rs
  c7ba9642fee029930b93bde0be0044d4  gcc/testsuite/rust/compile/bad=file-name.rs
  74543bdf60d90fdb77b3d59541bb46b8  gcc/testsuite/rust/compile/bad_as_bool_char.rs
  02b466f42629715260cc948eeaf75e56  gcc/testsuite/rust/compile/bad_file_name.txt.rs
--- 123557,123567 ----
  10958953946fbdde105431e2937a1695  gcc/testsuite/rust/compile/auto_trait_super_trait.rs
  32fbddcb2f485e6e1367e04a37536c61  gcc/testsuite/rust/compile/auto_trait_valid.rs
  001db0fdcde4867110a5bb0dfede22b6  gcc/testsuite/rust/compile/auto_traits1.rs
! 90d8638c8b4530c0068e01003e72d1b4  gcc/testsuite/rust/compile/auto_traits2.rs
  274440970f2f3850e87dbb1f309f82db  gcc/testsuite/rust/compile/auto_traits4.rs
  7673a55108cb36ca1835b653cd9d9d0d  gcc/testsuite/rust/compile/bad-crate-name1.rs
  c8c58ec31af772aad429da99744fea8c  gcc/testsuite/rust/compile/bad-crate-name2.rs
+ 83fcd1b6d25b090e24e9a9f8d52fadf2  gcc/testsuite/rust/compile/bad-rpit1.rs
  c7ba9642fee029930b93bde0be0044d4  gcc/testsuite/rust/compile/bad=file-name.rs
  74543bdf60d90fdb77b3d59541bb46b8  gcc/testsuite/rust/compile/bad_as_bool_char.rs
  02b466f42629715260cc948eeaf75e56  gcc/testsuite/rust/compile/bad_file_name.txt.rs
*************** aee0d6e5e5a54d891b1d4faa7e35d45f  gcc/te
*** 123384,123389 ****
--- 123589,123595 ----
  238450e11ba7966838b9e4286ef1e145  gcc/testsuite/rust/compile/break_continue_outside_loop.rs
  9b99112d2f118c58acb61f3703144ecf  gcc/testsuite/rust/compile/break_with_value_inside_loop.rs
  3089e5cf84922d853bd7c44b22155de5  gcc/testsuite/rust/compile/broken_utf8.rs
+ 03467bc827bb9fd9b7bb85d8e18a4589  gcc/testsuite/rust/compile/bug-with-default-generic.rs
  629afb83d10bc6fdc75861d3b03b34ae  gcc/testsuite/rust/compile/bytecharstring.rs
  32883bd2cd57b15b0d562d5fc0a60332  gcc/testsuite/rust/compile/canonical_paths1.rs
  bbb7a81f895315976bb3b8975d3f3319  gcc/testsuite/rust/compile/cast1.rs
*************** dcf8b8a8ff1f9675ee275b77209cc26a  gcc/te
*** 123412,123418 ****
  35b2389068cb824405eb2d9143bcbaf5  gcc/testsuite/rust/compile/const1.rs
  20a071af13cc659f510fa8e507de1155  gcc/testsuite/rust/compile/const10.rs
  7e8914522c5084bfdf3d535d03eceba9  gcc/testsuite/rust/compile/const2.rs
! 855ac0599ce037105c7396a1d029191b  gcc/testsuite/rust/compile/const3.rs
  dfa3b2217fe0156c62492956eee3bcf4  gcc/testsuite/rust/compile/const4.rs
  5add53f8414bc2b7767a350b5f3d3a02  gcc/testsuite/rust/compile/const5.rs
  6f09394721c26be6597f0ff04ead414b  gcc/testsuite/rust/compile/const6.rs
--- 123618,123624 ----
  35b2389068cb824405eb2d9143bcbaf5  gcc/testsuite/rust/compile/const1.rs
  20a071af13cc659f510fa8e507de1155  gcc/testsuite/rust/compile/const10.rs
  7e8914522c5084bfdf3d535d03eceba9  gcc/testsuite/rust/compile/const2.rs
! 45ac4e1764cb3070c6ce387823ac239c  gcc/testsuite/rust/compile/const3.rs
  dfa3b2217fe0156c62492956eee3bcf4  gcc/testsuite/rust/compile/const4.rs
  5add53f8414bc2b7767a350b5f3d3a02  gcc/testsuite/rust/compile/const5.rs
  6f09394721c26be6597f0ff04ead414b  gcc/testsuite/rust/compile/const6.rs
*************** f39e120a441c7e4182741b883f1ef05d  gcc/te
*** 123421,123433 ****
  dd04212a2e511e939aedac8b2ea59543  gcc/testsuite/rust/compile/const9.rs
  e03f96eb1b1abbe5563a1a760fe06b10  gcc/testsuite/rust/compile/const_async_function.rs
  d5d062233962271057388d4ed79aa6de  gcc/testsuite/rust/compile/const_generics_1.rs
  843f362a8c63f610af0a4ac77f309065  gcc/testsuite/rust/compile/const_generics_2.rs
! 54f3ea5a9694144631b4f4e84ad02453  gcc/testsuite/rust/compile/const_generics_3.rs
  d24f122dbd7d6bbdb3f7b2c688004a72  gcc/testsuite/rust/compile/const_generics_4.rs
! 38f18fe55c05240c48888d461dd7cf8d  gcc/testsuite/rust/compile/const_generics_5.rs
  132116f02eae6c44e8198bc85dd53d08  gcc/testsuite/rust/compile/const_generics_6.rs
  50d13f94376e902f21bb959742a78950  gcc/testsuite/rust/compile/const_generics_7.rs
! 7523ea428464817a67f476fe689fe871  gcc/testsuite/rust/compile/const_generics_8.rs
  d1bc715bfb792187c8752b3676e946f0  gcc/testsuite/rust/compile/const_trait_fn.rs
  4258f4d6f84473191c981e8a84f06d70  gcc/testsuite/rust/compile/continue1.rs
  9b2eb55272cc3c00b679874344485545  gcc/testsuite/rust/compile/crate-metavar1.rs
--- 123627,123647 ----
  dd04212a2e511e939aedac8b2ea59543  gcc/testsuite/rust/compile/const9.rs
  e03f96eb1b1abbe5563a1a760fe06b10  gcc/testsuite/rust/compile/const_async_function.rs
  d5d062233962271057388d4ed79aa6de  gcc/testsuite/rust/compile/const_generics_1.rs
+ 84a700ea403987f1a362cfd5b536f2d3  gcc/testsuite/rust/compile/const_generics_10.rs
+ 23a092ac088305a169b61b57e2c79315  gcc/testsuite/rust/compile/const_generics_11.rs
+ 8c5973f57c2342d0590a5494cef65b82  gcc/testsuite/rust/compile/const_generics_12.rs
+ fc179d4ff1b21540f01410432558749f  gcc/testsuite/rust/compile/const_generics_13.rs
+ 8011a02c904a433ae271b2ab49466382  gcc/testsuite/rust/compile/const_generics_14.rs
+ 7bf871ed70532f23a7592250b9ec3a99  gcc/testsuite/rust/compile/const_generics_15.rs
+ f06601430db6d4d3e822b66306a9a04c  gcc/testsuite/rust/compile/const_generics_16.rs
  843f362a8c63f610af0a4ac77f309065  gcc/testsuite/rust/compile/const_generics_2.rs
! bca4ef052240a6deeee772ed615526ee  gcc/testsuite/rust/compile/const_generics_3.rs
  d24f122dbd7d6bbdb3f7b2c688004a72  gcc/testsuite/rust/compile/const_generics_4.rs
! 9e5ea10b505dd0d5220533aa94807a47  gcc/testsuite/rust/compile/const_generics_5.rs
  132116f02eae6c44e8198bc85dd53d08  gcc/testsuite/rust/compile/const_generics_6.rs
  50d13f94376e902f21bb959742a78950  gcc/testsuite/rust/compile/const_generics_7.rs
! c885c15fe10b1a7fbd9858ca29c0e85e  gcc/testsuite/rust/compile/const_generics_8.rs
! ec1474566f4e7a18e47fefded3a8a34b  gcc/testsuite/rust/compile/const_generics_9.rs
  d1bc715bfb792187c8752b3676e946f0  gcc/testsuite/rust/compile/const_trait_fn.rs
  4258f4d6f84473191c981e8a84f06d70  gcc/testsuite/rust/compile/continue1.rs
  9b2eb55272cc3c00b679874344485545  gcc/testsuite/rust/compile/crate-metavar1.rs
*************** bbb07a308e077d8068c1a25e119fce9c  gcc/te
*** 123444,123451 ****
  bc73b541d5043286cba7b09aa1d609e9  gcc/testsuite/rust/compile/decl_macro6.rs
  d23eb70e5ff707e3d1a8c4ea21224d84  gcc/testsuite/rust/compile/decl_macro7.rs
  9c18098b4b1ce502c531f0caab668d43  gcc/testsuite/rust/compile/default_not_a_kw.rs
  3e0da36322a6350ce7cc4cb303e29f2f  gcc/testsuite/rust/compile/deprecated-fn.rs
! 375589e6c244aa80de5e97be5239c2ef  gcc/testsuite/rust/compile/derive-debug1.rs
  0ab48e5e5524f0f16decf66eb0ee6058  gcc/testsuite/rust/compile/derive-default1.rs
  f27c0f8016e5452644a979e8d9fedbe2  gcc/testsuite/rust/compile/derive-eq-invalid.rs
  656338f1895ac7d6976ce493bd8beab2  gcc/testsuite/rust/compile/derive-hash1.rs
--- 123658,123666 ----
  bc73b541d5043286cba7b09aa1d609e9  gcc/testsuite/rust/compile/decl_macro6.rs
  d23eb70e5ff707e3d1a8c4ea21224d84  gcc/testsuite/rust/compile/decl_macro7.rs
  9c18098b4b1ce502c531f0caab668d43  gcc/testsuite/rust/compile/default_not_a_kw.rs
+ 9b8818615fe9018d9b7d04b5b8d43daf  gcc/testsuite/rust/compile/deferred_const_inference.rs
  3e0da36322a6350ce7cc4cb303e29f2f  gcc/testsuite/rust/compile/deprecated-fn.rs
! 68902fd33be245c60fc188726265fdd0  gcc/testsuite/rust/compile/derive-debug1.rs
  0ab48e5e5524f0f16decf66eb0ee6058  gcc/testsuite/rust/compile/derive-default1.rs
  f27c0f8016e5452644a979e8d9fedbe2  gcc/testsuite/rust/compile/derive-eq-invalid.rs
  656338f1895ac7d6976ce493bd8beab2  gcc/testsuite/rust/compile/derive-hash1.rs
*************** f27c0f8016e5452644a979e8d9fedbe2  gcc/te
*** 123454,123465 ****
  e797f4d3af22dc6cf71b9b9a2a923b84  gcc/testsuite/rust/compile/derive_clone_enum2.rs
  e5cdf3b0ad6be5748c19f12931430a7c  gcc/testsuite/rust/compile/derive_clone_enum3.rs
  b00bfad5fda1037ecfd9712632089f7e  gcc/testsuite/rust/compile/derive_empty.rs
! 28afb887305318fd6f40823cd02c5e28  gcc/testsuite/rust/compile/derive_macro1.rs
  5630c5f16411daca0b41a9ef3bd19eca  gcc/testsuite/rust/compile/derive_macro3.rs
  5056e4a6aedacdb7dd1deacd08445e37  gcc/testsuite/rust/compile/derive_macro4.rs
  afaef91e5656013d7f5a1abc7320e182  gcc/testsuite/rust/compile/derive_macro6.rs
  25b35d97f1f4704f338d8b66fe6694d9  gcc/testsuite/rust/compile/derive_macro7.rs
  4f18dc206a2145c8cb8d98c62f0d8751  gcc/testsuite/rust/compile/derive_macro8.rs
  0ee7c26dcdc8fb1d25de4eee521bb29e  gcc/testsuite/rust/compile/diagnostic_underline.rs
  9f4c15c76e3e3e3dd4ebd6f61e8db065  gcc/testsuite/rust/compile/doc_isolated_cr_block_comment.rs
  d4173b37d75e489fc580f69e4c6666c9  gcc/testsuite/rust/compile/doc_isolated_cr_inner_block_comment.rs
--- 123669,123681 ----
  e797f4d3af22dc6cf71b9b9a2a923b84  gcc/testsuite/rust/compile/derive_clone_enum2.rs
  e5cdf3b0ad6be5748c19f12931430a7c  gcc/testsuite/rust/compile/derive_clone_enum3.rs
  b00bfad5fda1037ecfd9712632089f7e  gcc/testsuite/rust/compile/derive_empty.rs
! 51c60723711b435d3d90f4f7f3184357  gcc/testsuite/rust/compile/derive_macro1.rs
  5630c5f16411daca0b41a9ef3bd19eca  gcc/testsuite/rust/compile/derive_macro3.rs
  5056e4a6aedacdb7dd1deacd08445e37  gcc/testsuite/rust/compile/derive_macro4.rs
  afaef91e5656013d7f5a1abc7320e182  gcc/testsuite/rust/compile/derive_macro6.rs
  25b35d97f1f4704f338d8b66fe6694d9  gcc/testsuite/rust/compile/derive_macro7.rs
  4f18dc206a2145c8cb8d98c62f0d8751  gcc/testsuite/rust/compile/derive_macro8.rs
+ df6f5764d7ba30e758ff7738015c9737  gcc/testsuite/rust/compile/derive_partial_ord1.rs
  0ee7c26dcdc8fb1d25de4eee521bb29e  gcc/testsuite/rust/compile/diagnostic_underline.rs
  9f4c15c76e3e3e3dd4ebd6f61e8db065  gcc/testsuite/rust/compile/doc_isolated_cr_block_comment.rs
  d4173b37d75e489fc580f69e4c6666c9  gcc/testsuite/rust/compile/doc_isolated_cr_inner_block_comment.rs
*************** d41d8cd98f00b204e9800998ecf8427e  gcc/te
*** 123474,123480 ****
  46fa9cf76f8ad21f88d3360570229a80  gcc/testsuite/rust/compile/empty_union.rs
  1dcf6277650dd744a3d566444a316aa0  gcc/testsuite/rust/compile/enum_discriminant1.rs
  83a2384c9b68e56f0376e65eb9c9e6bc  gcc/testsuite/rust/compile/enum_discriminant2.rs
! 0865aa437fe2a71bb321902bab995f70  gcc/testsuite/rust/compile/enum_variant_name.rs
  6db02af4f7c9eb1367785df801782bbc  gcc/testsuite/rust/compile/exclusive_range_pattern.rs
  9c04cedc1f1c9ec425a75c21dbaff743  gcc/testsuite/rust/compile/exclusive_range_pattern_feature_gate.rs
  113f6a76ce7638f6de23fddfbf922104  gcc/testsuite/rust/compile/exhaustiveness1.rs
--- 123690,123696 ----
  46fa9cf76f8ad21f88d3360570229a80  gcc/testsuite/rust/compile/empty_union.rs
  1dcf6277650dd744a3d566444a316aa0  gcc/testsuite/rust/compile/enum_discriminant1.rs
  83a2384c9b68e56f0376e65eb9c9e6bc  gcc/testsuite/rust/compile/enum_discriminant2.rs
! 43d08354ccf563eb58fe9931afc4a3a6  gcc/testsuite/rust/compile/enum_variant_name.rs
  6db02af4f7c9eb1367785df801782bbc  gcc/testsuite/rust/compile/exclusive_range_pattern.rs
  9c04cedc1f1c9ec425a75c21dbaff743  gcc/testsuite/rust/compile/exclusive_range_pattern_feature_gate.rs
  113f6a76ce7638f6de23fddfbf922104  gcc/testsuite/rust/compile/exhaustiveness1.rs
*************** aac26abcc55ee5aff6d422cb19c5a251  gcc/te
*** 123497,123504 ****
  b129c59cb9340d86c151685156da3f0c  gcc/testsuite/rust/compile/for-loop2.rs
  5ee6657185ec67299ef2ace853f873b7  gcc/testsuite/rust/compile/for_expr.rs
  e41c2cabd63dba549da749a8fed6ca7a  gcc/testsuite/rust/compile/for_lifetimes.rs
! c521ce3fdce4f9ebd1a3522601b5c43e  gcc/testsuite/rust/compile/format_args_basic_expansion.rs
! ed8a4f7d14023b90cff628e85878ec31  gcc/testsuite/rust/compile/format_args_extra_comma.rs
  9c06b22a10dcf3a218bb690997175a3f  gcc/testsuite/rust/compile/found_struct.rs
  03ce7bc2c5e3478be586fcc302a8200f  gcc/testsuite/rust/compile/frust-compile-until.rs
  4ce5431fd288fab0e00a74049003aeaf  gcc/testsuite/rust/compile/func-const-unsafe.rs
--- 123713,123720 ----
  b129c59cb9340d86c151685156da3f0c  gcc/testsuite/rust/compile/for-loop2.rs
  5ee6657185ec67299ef2ace853f873b7  gcc/testsuite/rust/compile/for_expr.rs
  e41c2cabd63dba549da749a8fed6ca7a  gcc/testsuite/rust/compile/for_lifetimes.rs
! 3121e6022ec6fd6781b3bb2218a41bee  gcc/testsuite/rust/compile/format_args_basic_expansion.rs
! 444951ca92739bdbdc74317738c2a855  gcc/testsuite/rust/compile/format_args_extra_comma.rs
  9c06b22a10dcf3a218bb690997175a3f  gcc/testsuite/rust/compile/found_struct.rs
  03ce7bc2c5e3478be586fcc302a8200f  gcc/testsuite/rust/compile/frust-compile-until.rs
  4ce5431fd288fab0e00a74049003aeaf  gcc/testsuite/rust/compile/func-const-unsafe.rs
*************** eb85bcea53e38d14f7bcc7f982cc4140  gcc/te
*** 123521,123532 ****
  39acef99a4b058e012b0f00726f2b442  gcc/testsuite/rust/compile/generics5.rs
  4b98df244d094a7e12bd9d36ceb0071c  gcc/testsuite/rust/compile/generics6.rs
  682cc29e7af5ea3a8f6b71c92d5e180b  gcc/testsuite/rust/compile/generics7.rs
! 4ecc7198ef296e1aa4376fc2da4ed09d  gcc/testsuite/rust/compile/generics8.rs
! 68148d9285c7c61239b0d57557233113  gcc/testsuite/rust/compile/generics9.rs
  2e2238492198d9ef7c0141722cead0a3  gcc/testsuite/rust/compile/if-without-else.rs
  bc84abac17812c46c39363b8ae9a8ad9  gcc/testsuite/rust/compile/if_let_expr.rs
  bcb7125cf04603fb905af55075f3c8b9  gcc/testsuite/rust/compile/if_let_expr_simple.rs
  b38301cec7d4b035fa6efa8eb15100bf  gcc/testsuite/rust/compile/iflet.rs
  c7d60400964e3621102e44ba4cef69f9  gcc/testsuite/rust/compile/implicit_returns_err1.rs
  effa05530ec2bc9508c522bddd5e2b38  gcc/testsuite/rust/compile/implicit_returns_err2.rs
  4f820dabf53d65a41cbe62abc9094e12  gcc/testsuite/rust/compile/implicit_returns_err3.rs
--- 123737,123751 ----
  39acef99a4b058e012b0f00726f2b442  gcc/testsuite/rust/compile/generics5.rs
  4b98df244d094a7e12bd9d36ceb0071c  gcc/testsuite/rust/compile/generics6.rs
  682cc29e7af5ea3a8f6b71c92d5e180b  gcc/testsuite/rust/compile/generics7.rs
! 060d22d6e7f679a78be3e794571d067f  gcc/testsuite/rust/compile/generics8.rs
! 9aa765e066290dc262e89eb48abc6f28  gcc/testsuite/rust/compile/generics9.rs
! 9e631ea0ca0d4c58b5f20bdf78414c7e  gcc/testsuite/rust/compile/glob_import_enum.rs
  2e2238492198d9ef7c0141722cead0a3  gcc/testsuite/rust/compile/if-without-else.rs
  bc84abac17812c46c39363b8ae9a8ad9  gcc/testsuite/rust/compile/if_let_expr.rs
  bcb7125cf04603fb905af55075f3c8b9  gcc/testsuite/rust/compile/if_let_expr_simple.rs
  b38301cec7d4b035fa6efa8eb15100bf  gcc/testsuite/rust/compile/iflet.rs
+ 8eae850c4702b6718eaaa35c514b1457  gcc/testsuite/rust/compile/impl_trait_diag.rs
+ f3d4caa9d92a54f8a1417df4bd0823d6  gcc/testsuite/rust/compile/impl_trait_generic_arg.rs
  c7d60400964e3621102e44ba4cef69f9  gcc/testsuite/rust/compile/implicit_returns_err1.rs
  effa05530ec2bc9508c522bddd5e2b38  gcc/testsuite/rust/compile/implicit_returns_err2.rs
  4f820dabf53d65a41cbe62abc9094e12  gcc/testsuite/rust/compile/implicit_returns_err3.rs
*************** af5e396a6998b643c871345238c68e95  gcc/te
*** 123546,123552 ****
  003715abebaa791ae716d6107c1e264c  gcc/testsuite/rust/compile/inline_asm_parse_operand.rs
  1d7c73f0088ba93a4508fb08f39cb663  gcc/testsuite/rust/compile/inline_asm_parse_output_operand.rs
  7077d1fa449d27fa9e4995b32d37ede2  gcc/testsuite/rust/compile/inline_asm_typecheck.rs
! 1c7425b8d9b325d3d921f4b9bccca83d  gcc/testsuite/rust/compile/invalid_label_name.rs
  e66597d1435db8c97820eae8edf34298  gcc/testsuite/rust/compile/invalid_variadics.rs
  f263d9837667ee8d8c4b9f6ec4718cca  gcc/testsuite/rust/compile/issue-1005.rs
  ca2c27602daf9dadcc9d976aa4131edc  gcc/testsuite/rust/compile/issue-1006.rs
--- 123765,123771 ----
  003715abebaa791ae716d6107c1e264c  gcc/testsuite/rust/compile/inline_asm_parse_operand.rs
  1d7c73f0088ba93a4508fb08f39cb663  gcc/testsuite/rust/compile/inline_asm_parse_output_operand.rs
  7077d1fa449d27fa9e4995b32d37ede2  gcc/testsuite/rust/compile/inline_asm_typecheck.rs
! 3d666bf870705cc14ea9d72d74a9046d  gcc/testsuite/rust/compile/invalid_label_name.rs
  e66597d1435db8c97820eae8edf34298  gcc/testsuite/rust/compile/invalid_variadics.rs
  f263d9837667ee8d8c4b9f6ec4718cca  gcc/testsuite/rust/compile/issue-1005.rs
  ca2c27602daf9dadcc9d976aa4131edc  gcc/testsuite/rust/compile/issue-1006.rs
*************** d59e1a706f4d5ecf85ccc8929983dda4  gcc/te
*** 123554,123559 ****
--- 123773,123779 ----
  8a6b6780af800c7792766eb1ad1c2bc2  gcc/testsuite/rust/compile/issue-1023.rs
  7a5ff9315269435c4fb1fd09aa42022a  gcc/testsuite/rust/compile/issue-1031.rs
  8b4a10a57fa50214c30abf33d38f3a66  gcc/testsuite/rust/compile/issue-1034.rs
+ b077488d31789b68da09002a8334d8bb  gcc/testsuite/rust/compile/issue-1048.rs
  755da4cdeb7d21c007a7642f64d68f9f  gcc/testsuite/rust/compile/issue-1073.rs
  3170bfed67ee0e280928743013eff0bb  gcc/testsuite/rust/compile/issue-1089.rs
  fa137bc0614a02dafb820751293a47c7  gcc/testsuite/rust/compile/issue-1089/test_mod.rs
*************** ad1f8c80e2b6dd5a82e5d235b59e8e7d  gcc/te
*** 123582,123587 ****
--- 123802,123809 ----
  02fcd65b5c0f6695c55954d97165249e  gcc/testsuite/rust/compile/issue-1446.rs
  1aad0b48f4326d09f4e7b086d33d1863  gcc/testsuite/rust/compile/issue-1447.rs
  70540dd29e7b0706827350dab2fb8358  gcc/testsuite/rust/compile/issue-1483.rs
+ e5211d9e0329f03b539f52e739afef91  gcc/testsuite/rust/compile/issue-1485.rs
+ c5fa22f9b64f1ed3638ff08ee2604990  gcc/testsuite/rust/compile/issue-1487.rs
  94b3e95b0146b31cf5c3ed953d8aa56d  gcc/testsuite/rust/compile/issue-1524.rs
  95b616180b39bcdf627de4a88d7f6b8c  gcc/testsuite/rust/compile/issue-1525.rs
  b436c410b33bf1a4a8345bcc091c9a93  gcc/testsuite/rust/compile/issue-1589.rs
*************** f15fc0ff6bc5cd17c8072f7c136a8c86  gcc/te
*** 123597,123603 ****
  1c73e99b3deaa294d0e71a2485b2a8c3  gcc/testsuite/rust/compile/issue-1901.rs
  68e4e03ac47f3cd8e3923653ee133be6  gcc/testsuite/rust/compile/issue-1930.rs
  f7f5972063e57689a5651a368ec69e76  gcc/testsuite/rust/compile/issue-1981.rs
! 78a948348edaabaa5cdb103c1bbbcb6d  gcc/testsuite/rust/compile/issue-2015.rs
  dea2255d500ac0b825f926116060eed6  gcc/testsuite/rust/compile/issue-2019-1.rs
  ae81890397358d0988779ae417ff81b4  gcc/testsuite/rust/compile/issue-2019-2.rs
  487f46cb43b6c6f08b18379178708d7b  gcc/testsuite/rust/compile/issue-2019-3.rs
--- 123819,123825 ----
  1c73e99b3deaa294d0e71a2485b2a8c3  gcc/testsuite/rust/compile/issue-1901.rs
  68e4e03ac47f3cd8e3923653ee133be6  gcc/testsuite/rust/compile/issue-1930.rs
  f7f5972063e57689a5651a368ec69e76  gcc/testsuite/rust/compile/issue-1981.rs
! 6f18feb12e0b8b4f50dd770de0a8f3a5  gcc/testsuite/rust/compile/issue-2015.rs
  dea2255d500ac0b825f926116060eed6  gcc/testsuite/rust/compile/issue-2019-1.rs
  ae81890397358d0988779ae417ff81b4  gcc/testsuite/rust/compile/issue-2019-2.rs
  487f46cb43b6c6f08b18379178708d7b  gcc/testsuite/rust/compile/issue-2019-3.rs
*************** fe9158f762e004b8016cd4a108a6f99d  gcc/te
*** 123608,123614 ****
  d967f05a8763ae6a1051fc0feda841be  gcc/testsuite/rust/compile/issue-2039.rs
  71ddc9537accfcbd06be474ee0fbcf50  gcc/testsuite/rust/compile/issue-2040.rs
  89b0d4e232b08d023e1100161cb559db  gcc/testsuite/rust/compile/issue-2042.rs
! 82af822ebfeef07e952cdec1a5b9f713  gcc/testsuite/rust/compile/issue-2043.rs
  ca0d7bd0e4d6edab91eb3295f5243e78  gcc/testsuite/rust/compile/issue-2070.rs
  f7a4c3ed09ab45e1c096495fc9d675c6  gcc/testsuite/rust/compile/issue-2105.rs
  5c9cb53adc5a191a5cdfb0c5eea5267f  gcc/testsuite/rust/compile/issue-2106.rs
--- 123830,123836 ----
  d967f05a8763ae6a1051fc0feda841be  gcc/testsuite/rust/compile/issue-2039.rs
  71ddc9537accfcbd06be474ee0fbcf50  gcc/testsuite/rust/compile/issue-2040.rs
  89b0d4e232b08d023e1100161cb559db  gcc/testsuite/rust/compile/issue-2042.rs
! a58aad2633348ab9b4661de229a89748  gcc/testsuite/rust/compile/issue-2043.rs
  ca0d7bd0e4d6edab91eb3295f5243e78  gcc/testsuite/rust/compile/issue-2070.rs
  f7a4c3ed09ab45e1c096495fc9d675c6  gcc/testsuite/rust/compile/issue-2105.rs
  5c9cb53adc5a191a5cdfb0c5eea5267f  gcc/testsuite/rust/compile/issue-2106.rs
*************** f677239cb2f1a8fc0b98b677dc10622c  gcc/te
*** 123619,123625 ****
  c3eb1a72b4023b45dfd5148bc5d0e7a5  gcc/testsuite/rust/compile/issue-2139.rs
  b1331689a90b28eba6a364bd355124d0  gcc/testsuite/rust/compile/issue-2142.rs
  176f6f3432e7bbbbef12eec2f4b0b07c  gcc/testsuite/rust/compile/issue-2165.rs
! 719daee73aad302e472c21c06bd97edb  gcc/testsuite/rust/compile/issue-2166.rs
  dd3f2a097c79b709dd16483c4a1e248c  gcc/testsuite/rust/compile/issue-2178.rs
  da2420dd88aae313552959890eda2887  gcc/testsuite/rust/compile/issue-2187.rs
  88ea8b6193ca0e9b0446deb7155ef254  gcc/testsuite/rust/compile/issue-2188.rs
--- 123841,123847 ----
  c3eb1a72b4023b45dfd5148bc5d0e7a5  gcc/testsuite/rust/compile/issue-2139.rs
  b1331689a90b28eba6a364bd355124d0  gcc/testsuite/rust/compile/issue-2142.rs
  176f6f3432e7bbbbef12eec2f4b0b07c  gcc/testsuite/rust/compile/issue-2165.rs
! 2d7b679b5a2fe9db7b71da8238c8b003  gcc/testsuite/rust/compile/issue-2166.rs
  dd3f2a097c79b709dd16483c4a1e248c  gcc/testsuite/rust/compile/issue-2178.rs
  da2420dd88aae313552959890eda2887  gcc/testsuite/rust/compile/issue-2187.rs
  88ea8b6193ca0e9b0446deb7155ef254  gcc/testsuite/rust/compile/issue-2188.rs
*************** c7146c7bbd602763cefd91f32994c7da  gcc/te
*** 123630,123636 ****
  c2eb5d990301dac994badf43bde882fb  gcc/testsuite/rust/compile/issue-2203.rs
  fcc95aaf32f2b6ae3c6e60a0a1f03a6b  gcc/testsuite/rust/compile/issue-2207.rs
  d45c1549ece0e49f041848d45eb5e799  gcc/testsuite/rust/compile/issue-2225.rs
! b9333ea7cc7759ad18a1aa30d3580d52  gcc/testsuite/rust/compile/issue-2238.rs
  49a5fb24ab1fb010fb697b5455f9589a  gcc/testsuite/rust/compile/issue-2304.rs
  db6a4e59c56318982047d6257d74551c  gcc/testsuite/rust/compile/issue-2323.rs
  5459c28a30b51155c436fcceae10a7b4  gcc/testsuite/rust/compile/issue-2324-1.rs
--- 123852,123858 ----
  c2eb5d990301dac994badf43bde882fb  gcc/testsuite/rust/compile/issue-2203.rs
  fcc95aaf32f2b6ae3c6e60a0a1f03a6b  gcc/testsuite/rust/compile/issue-2207.rs
  d45c1549ece0e49f041848d45eb5e799  gcc/testsuite/rust/compile/issue-2225.rs
! 7ce5181951a5db8f80b326d8ed2886bc  gcc/testsuite/rust/compile/issue-2238.rs
  49a5fb24ab1fb010fb697b5455f9589a  gcc/testsuite/rust/compile/issue-2304.rs
  db6a4e59c56318982047d6257d74551c  gcc/testsuite/rust/compile/issue-2323.rs
  5459c28a30b51155c436fcceae10a7b4  gcc/testsuite/rust/compile/issue-2324-1.rs
*************** a0c18661a189417b07a4cd0a4fb67eea  gcc/te
*** 123656,123661 ****
--- 123878,123884 ----
  fdbe4cdf6d53cb91027b26821708f199  gcc/testsuite/rust/compile/issue-2650-2.rs
  ad5a6af6cd00b5ff7c2f1e8f4e9358f4  gcc/testsuite/rust/compile/issue-266.rs
  77f0f6ac41c2a0cddd898d2cfc6f7e80  gcc/testsuite/rust/compile/issue-2665.rs
+ 4017457d27e9f9977845471749481d07  gcc/testsuite/rust/compile/issue-2680.rs
  67b26e16d2c6f04c185cf6bd1629141e  gcc/testsuite/rust/compile/issue-2709.rs
  79e64442dc413769cd1a9df190ac987a  gcc/testsuite/rust/compile/issue-2723-1.rs
  fa80bafd4421fc7cb407eb34ec8bdad8  gcc/testsuite/rust/compile/issue-2723-2.rs
*************** a1c3a349606e6b480d37913f89e3264b  gcc/te
*** 123675,123681 ****
  cff5ead45fa38818e49938695714423b  gcc/testsuite/rust/compile/issue-2905-1.rs
  f1c76067d9e0cda95c5be153a4510aca  gcc/testsuite/rust/compile/issue-2905-2.rs
  c64c6ee37c57875f223a31b7ca93c937  gcc/testsuite/rust/compile/issue-2906.rs
! 29f455f6d8a69e4dedbfd14f6cea8fe4  gcc/testsuite/rust/compile/issue-2907.rs
  f2f24b0eb27617d825844e2829f32d87  gcc/testsuite/rust/compile/issue-2951.rs
  0f4b417ad1dbbee856ffcf29764a6095  gcc/testsuite/rust/compile/issue-2953-1.rs
  8cf82fdc1957a7bffe9429abe6c09187  gcc/testsuite/rust/compile/issue-2953-2.rs
--- 123898,123904 ----
  cff5ead45fa38818e49938695714423b  gcc/testsuite/rust/compile/issue-2905-1.rs
  f1c76067d9e0cda95c5be153a4510aca  gcc/testsuite/rust/compile/issue-2905-2.rs
  c64c6ee37c57875f223a31b7ca93c937  gcc/testsuite/rust/compile/issue-2906.rs
! c2b5ca1d3dd6482af494c76a69af5c54  gcc/testsuite/rust/compile/issue-2907.rs
  f2f24b0eb27617d825844e2829f32d87  gcc/testsuite/rust/compile/issue-2951.rs
  0f4b417ad1dbbee856ffcf29764a6095  gcc/testsuite/rust/compile/issue-2953-1.rs
  8cf82fdc1957a7bffe9429abe6c09187  gcc/testsuite/rust/compile/issue-2953-2.rs
*************** d011f3635f0520cf2a1144a59d7c6608  gcc/te
*** 123699,123709 ****
  c38187cc4d1a6720dc603eb3669e31f5  gcc/testsuite/rust/compile/issue-3139-3.rs
  a6c4e09411ae93ff227eb14a963775c4  gcc/testsuite/rust/compile/issue-3140.rs
  c8e07b1cfb5d32ed3c3a5a05f124a2ed  gcc/testsuite/rust/compile/issue-3141.rs
  aa60d24031a6a312c48347476819a5ff  gcc/testsuite/rust/compile/issue-3174.rs
  59f153890a52fe84e386d4af8805989d  gcc/testsuite/rust/compile/issue-3231.rs
  a35346c925efb8045f613c169242de67  gcc/testsuite/rust/compile/issue-3242.rs
  ef77cbeacb4bb028849a7f89d4dcb697  gcc/testsuite/rust/compile/issue-3261.rs
! 12b0068486aa6b3c1b259dbceb354694  gcc/testsuite/rust/compile/issue-3304.rs
  5453b0240082435ff75d85bff8ea271e  gcc/testsuite/rust/compile/issue-3315-1.rs
  e1e2b037bd7ec5aac8a6dad93adccb88  gcc/testsuite/rust/compile/issue-3315-2.rs
  9d6b81fb00c4df2bd274f6a6d5fa4964  gcc/testsuite/rust/compile/issue-3350.rs
--- 123922,123933 ----
  c38187cc4d1a6720dc603eb3669e31f5  gcc/testsuite/rust/compile/issue-3139-3.rs
  a6c4e09411ae93ff227eb14a963775c4  gcc/testsuite/rust/compile/issue-3140.rs
  c8e07b1cfb5d32ed3c3a5a05f124a2ed  gcc/testsuite/rust/compile/issue-3141.rs
+ 15c2456cd82a62e94caa9932043382df  gcc/testsuite/rust/compile/issue-3144.rs
  aa60d24031a6a312c48347476819a5ff  gcc/testsuite/rust/compile/issue-3174.rs
  59f153890a52fe84e386d4af8805989d  gcc/testsuite/rust/compile/issue-3231.rs
  a35346c925efb8045f613c169242de67  gcc/testsuite/rust/compile/issue-3242.rs
  ef77cbeacb4bb028849a7f89d4dcb697  gcc/testsuite/rust/compile/issue-3261.rs
! 005e4210e8196770b648b0ec08dfa682  gcc/testsuite/rust/compile/issue-3304.rs
  5453b0240082435ff75d85bff8ea271e  gcc/testsuite/rust/compile/issue-3315-1.rs
  e1e2b037bd7ec5aac8a6dad93adccb88  gcc/testsuite/rust/compile/issue-3315-2.rs
  9d6b81fb00c4df2bd274f6a6d5fa4964  gcc/testsuite/rust/compile/issue-3350.rs
*************** baf4c5a7f39ae8295d20943ad1b6b1d1  gcc/te
*** 123711,123721 ****
--- 123935,123950 ----
  8885e6ac801d06f4ec4e0c7cf79ae111  gcc/testsuite/rust/compile/issue-3402-1.rs
  ea87eb5dd98fc440678cbfc183368898  gcc/testsuite/rust/compile/issue-3402-2.rs
  0b6c85cbbc277ebf5846c921c4aa341b  gcc/testsuite/rust/compile/issue-3403.rs
+ 6d6b8de1cbf4400ca282314b261c2352  gcc/testsuite/rust/compile/issue-3454.rs
+ 78a0259ad0533c8b1195164452e3f760  gcc/testsuite/rust/compile/issue-3524.rs
+ d1eacc10be9cd3eb212ceee0226cf0bb  gcc/testsuite/rust/compile/issue-3525.rs
  9c32fb3d820cc1289bd30f7b91250129  gcc/testsuite/rust/compile/issue-3530-1.rs
  c7919a109aede82f1914922ecb4e4c91  gcc/testsuite/rust/compile/issue-3530-2.rs
  51368e372b4ae4949ed42a12880375bc  gcc/testsuite/rust/compile/issue-3541-1.rs
  a16fac448d52ecc36f845f158322f7b4  gcc/testsuite/rust/compile/issue-3541-2.rs
+ 6c43194fbbe3e88e45c70087448b280d  gcc/testsuite/rust/compile/issue-3546.rs
  5d5147c212936353cb8e89a7fe5a53d5  gcc/testsuite/rust/compile/issue-3549.rs
+ cccfe17fac6ad050f5a21f250c83d9bc  gcc/testsuite/rust/compile/issue-3551.rs
  8641e5480371b80c6b5ec39645d00aea  gcc/testsuite/rust/compile/issue-3552.rs
  844e28af629e8aaa74e31dca339d140c  gcc/testsuite/rust/compile/issue-3553.rs
  2e9e39ce283620e50ccd623e5758e6fd  gcc/testsuite/rust/compile/issue-3554-1.rs
*************** c03fabc8909fdf74b1e0ac91674acf95  gcc/te
*** 123728,123741 ****
--- 123957,123973 ----
  27be33d9e4815f94f0759d60b77c8b14  gcc/testsuite/rust/compile/issue-3581-1.rs
  b790a48d62804a4138b4fbcdf0e2d96b  gcc/testsuite/rust/compile/issue-3581-2.rs
  3cd26856f36e846540fccbbf818b4684  gcc/testsuite/rust/compile/issue-3588.rs
+ bd3f5f5421f7412556d571aaed504e87  gcc/testsuite/rust/compile/issue-3599.rs
  397a757997946ab15af47e9fad31284c  gcc/testsuite/rust/compile/issue-3605.rs
  61beaa24a09b8012dce7ddadbce604a1  gcc/testsuite/rust/compile/issue-3606.rs
  78f95bd6fc771d76393c4fef5338f991  gcc/testsuite/rust/compile/issue-3612.rs
  c68fac7e04fd77c1639ea1fd3277409c  gcc/testsuite/rust/compile/issue-3613.rs
  29d806495de48063ed6be53b85c6a0c0  gcc/testsuite/rust/compile/issue-3614.rs
  084f37585e5f1aabd068014b3d37c129  gcc/testsuite/rust/compile/issue-3615.rs
+ 1a6f0cc305232f28ce0ea14763a11060  gcc/testsuite/rust/compile/issue-3618.rs
  068bea38ad05bd2a911347bbe3993c6d  gcc/testsuite/rust/compile/issue-3625.rs
  b73bff1144b326261fd3bce5eddb22d3  gcc/testsuite/rust/compile/issue-3628.rs
+ 806d9b49fd25931d59857f798a217248  gcc/testsuite/rust/compile/issue-3642.rs
  5953d50711d31ae6f6b26e3727986881  gcc/testsuite/rust/compile/issue-3643.rs
  d690a668cb1a4d9fe94ee30b4e2a967b  gcc/testsuite/rust/compile/issue-3646.rs
  67240263fa4bb8b82dfc90d1836012aa  gcc/testsuite/rust/compile/issue-3647.rs
*************** d690a668cb1a4d9fe94ee30b4e2a967b  gcc/te
*** 123745,123757 ****
  2f2f9aaf2ea9530b005352b48dbde809  gcc/testsuite/rust/compile/issue-3654.rs
  e61604d626a48912503f179b2f698a76  gcc/testsuite/rust/compile/issue-3656.rs
  18b03d5238900eccd4c41898bd1dae1e  gcc/testsuite/rust/compile/issue-3657.rs
  a9f0b6f3ed20af1732d5abab04fce3bf  gcc/testsuite/rust/compile/issue-3662.rs
  394bee8b53d175f742d074f2f5446d39  gcc/testsuite/rust/compile/issue-3663.rs
  b113df233110ae39a95700fc1d50b75f  gcc/testsuite/rust/compile/issue-3664.rs
  a82f3bb8e730a6249c2d9d547940590a  gcc/testsuite/rust/compile/issue-3665.rs
  10cacd69cdbb198a37f27ed27a03a585  gcc/testsuite/rust/compile/issue-3667.rs
! 376bd1a3290ed7925f9d8f7c3122857e  gcc/testsuite/rust/compile/issue-3671.rs
  157c904f67c2f79161fef218c5808562  gcc/testsuite/rust/compile/issue-3711.rs
  89033d8c6cdd3bc5792c06ce52a288f2  gcc/testsuite/rust/compile/issue-402.rs
  b614f59c05840eb45c25f4c6455c316d  gcc/testsuite/rust/compile/issue-407-2.rs
  a96ecff7ebddf1b3d15a3e3eed146c07  gcc/testsuite/rust/compile/issue-407.rs
--- 123977,124000 ----
  2f2f9aaf2ea9530b005352b48dbde809  gcc/testsuite/rust/compile/issue-3654.rs
  e61604d626a48912503f179b2f698a76  gcc/testsuite/rust/compile/issue-3656.rs
  18b03d5238900eccd4c41898bd1dae1e  gcc/testsuite/rust/compile/issue-3657.rs
+ fda2184844fb3890033e703c7377098c  gcc/testsuite/rust/compile/issue-3660.rs
+ 205c72d05f3be2ee7941724321625b94  gcc/testsuite/rust/compile/issue-3661.rs
  a9f0b6f3ed20af1732d5abab04fce3bf  gcc/testsuite/rust/compile/issue-3662.rs
  394bee8b53d175f742d074f2f5446d39  gcc/testsuite/rust/compile/issue-3663.rs
  b113df233110ae39a95700fc1d50b75f  gcc/testsuite/rust/compile/issue-3664.rs
  a82f3bb8e730a6249c2d9d547940590a  gcc/testsuite/rust/compile/issue-3665.rs
  10cacd69cdbb198a37f27ed27a03a585  gcc/testsuite/rust/compile/issue-3667.rs
! d7a0aa61ac6ea480aa470031428550d2  gcc/testsuite/rust/compile/issue-3671.rs
  157c904f67c2f79161fef218c5808562  gcc/testsuite/rust/compile/issue-3711.rs
+ 7113190e90e883d0006ceaeb866eeb73  gcc/testsuite/rust/compile/issue-3836.rs
+ f70238abf05e340d48ee9e6ab5020409  gcc/testsuite/rust/compile/issue-3874.rs
+ 94a2cfe870fb37b0f022125bd7ab65bf  gcc/testsuite/rust/compile/issue-3876.rs
+ 34b52236ae1c3de76ae9436257bdb690  gcc/testsuite/rust/compile/issue-3885.rs
+ 95ccc1677372d00599c0fc411c72c3c8  gcc/testsuite/rust/compile/issue-3915.rs
+ 34fad78a84e55b89af8044a8b659a986  gcc/testsuite/rust/compile/issue-3916.rs
+ 29c99b4246eb0ef9079be8d65e0eb0c3  gcc/testsuite/rust/compile/issue-3960.rs
+ d4479cd16fd0fe4348b1bdbfb2f4d527  gcc/testsuite/rust/compile/issue-3978.rs
+ b600c0395dbcbda7eda163bb57bf1b72  gcc/testsuite/rust/compile/issue-4006.rs
  89033d8c6cdd3bc5792c06ce52a288f2  gcc/testsuite/rust/compile/issue-402.rs
  b614f59c05840eb45c25f4c6455c316d  gcc/testsuite/rust/compile/issue-407-2.rs
  a96ecff7ebddf1b3d15a3e3eed146c07  gcc/testsuite/rust/compile/issue-407.rs
*************** f8081650b54fddb51d3b34b840dafcdb  gcc/te
*** 123768,123773 ****
--- 124011,124017 ----
  1d1da8d13d0b65abc363fa272c1bbd7d  gcc/testsuite/rust/compile/let_alt.rs
  83a6908517e92139d7d9cbd6244e4b51  gcc/testsuite/rust/compile/lifetime_name_validation.rs
  9afdcde455c4f144c4385b9d67323cb3  gcc/testsuite/rust/compile/lookup_err1.rs
+ e1f539e4bedf717d10b3950694757e15  gcc/testsuite/rust/compile/loop_constant_context.rs
  efd93d54e933def690c5f068247aaaf0  gcc/testsuite/rust/compile/macros/builtin/builtin_macro.exp
  88a6658f178584c62de6eb5f4a61322e  gcc/testsuite/rust/compile/macros/builtin/compile_error.rs
  5d3c149e12159ffe7e47852c1735ad30  gcc/testsuite/rust/compile/macros/builtin/concat.rs
*************** b3311e2d0b414c3607d49989521d8ca0  gcc/te
*** 123790,123796 ****
  9bded92347ec06fc7e68a76dd000a99d  gcc/testsuite/rust/compile/macros/builtin/option_env1.rs
  703ac4ca4c9b4d0d667f2da2b681660b  gcc/testsuite/rust/compile/macros/builtin/option_env2.rs
  6b2e8e5e8dae6280e5d88f4bba34af94  gcc/testsuite/rust/compile/macros/builtin/option_env3.rs
! d1ee37330dbb32aa5f73764744a449b0  gcc/testsuite/rust/compile/macros/builtin/recurse2.rs
  2c1fa92db46d19b9ccd0a1b1896725df  gcc/testsuite/rust/compile/macros/mbe/macro-delim.rs
  2799bbd1db374643b2e0ad41120b9a72  gcc/testsuite/rust/compile/macros/mbe/macro-expand-module.rs
  ab010cddb1155cc9e700ce547b463174  gcc/testsuite/rust/compile/macros/mbe/macro-issue1053-2.rs
--- 124034,124040 ----
  9bded92347ec06fc7e68a76dd000a99d  gcc/testsuite/rust/compile/macros/builtin/option_env1.rs
  703ac4ca4c9b4d0d667f2da2b681660b  gcc/testsuite/rust/compile/macros/builtin/option_env2.rs
  6b2e8e5e8dae6280e5d88f4bba34af94  gcc/testsuite/rust/compile/macros/builtin/option_env3.rs
! 046776b3496ba2789e3f3c8909c6ec4b  gcc/testsuite/rust/compile/macros/builtin/recurse2.rs
  2c1fa92db46d19b9ccd0a1b1896725df  gcc/testsuite/rust/compile/macros/mbe/macro-delim.rs
  2799bbd1db374643b2e0ad41120b9a72  gcc/testsuite/rust/compile/macros/mbe/macro-expand-module.rs
  ab010cddb1155cc9e700ce547b463174  gcc/testsuite/rust/compile/macros/mbe/macro-issue1053-2.rs
*************** df1b8a97ae68cf8e9eac8408a743fa64  gcc/te
*** 123811,123819 ****
  0fb684b40daad17a61596f80938a52bc  gcc/testsuite/rust/compile/macros/mbe/macro-issue2653.rs
  92aabd663e1074ae6360f66e208ee5f4  gcc/testsuite/rust/compile/macros/mbe/macro-issue2983_2984.rs
  5f52281927c41a8a2db3f5f874ff92f3  gcc/testsuite/rust/compile/macros/mbe/macro-issue3693.rs
! 5bf2306290f27dd5f22a6148f4082213  gcc/testsuite/rust/compile/macros/mbe/macro-issue3708.rs
  135abba02ca556e90f3518bbc2322024  gcc/testsuite/rust/compile/macros/mbe/macro-issue3709-1.rs
! 28ece352a7318c23761407063f74831c  gcc/testsuite/rust/compile/macros/mbe/macro-issue3709-2.rs
  bc850c4ba48b08af8788867050a975a6  gcc/testsuite/rust/compile/macros/mbe/macro1.rs
  ac95e4402432bd69656d1ee0d52210ab  gcc/testsuite/rust/compile/macros/mbe/macro10.rs
  43306e2bad2235ff677beff538262cbb  gcc/testsuite/rust/compile/macros/mbe/macro11.rs
--- 124055,124063 ----
  0fb684b40daad17a61596f80938a52bc  gcc/testsuite/rust/compile/macros/mbe/macro-issue2653.rs
  92aabd663e1074ae6360f66e208ee5f4  gcc/testsuite/rust/compile/macros/mbe/macro-issue2983_2984.rs
  5f52281927c41a8a2db3f5f874ff92f3  gcc/testsuite/rust/compile/macros/mbe/macro-issue3693.rs
! 43dad45281aa225d0529ba4d322586eb  gcc/testsuite/rust/compile/macros/mbe/macro-issue3708.rs
  135abba02ca556e90f3518bbc2322024  gcc/testsuite/rust/compile/macros/mbe/macro-issue3709-1.rs
! ca2dbfd2a07a0ca57a96128dd762d8d5  gcc/testsuite/rust/compile/macros/mbe/macro-issue3709-2.rs
  bc850c4ba48b08af8788867050a975a6  gcc/testsuite/rust/compile/macros/mbe/macro1.rs
  ac95e4402432bd69656d1ee0d52210ab  gcc/testsuite/rust/compile/macros/mbe/macro10.rs
  43306e2bad2235ff677beff538262cbb  gcc/testsuite/rust/compile/macros/mbe/macro11.rs
*************** a57477ce9d60aea59edc946b7c399d07  gcc/te
*** 123876,123881 ****
--- 124120,124126 ----
  fa3e0646a7b030bb430b127da2900675  gcc/testsuite/rust/compile/macros/mbe/macro_rules_macro_rules.rs
  a4fd702d54b6ee9ebfb2e6e9ad7d9588  gcc/testsuite/rust/compile/macros/mbe/macro_use1.rs
  efd93d54e933def690c5f068247aaaf0  gcc/testsuite/rust/compile/macros/mbe/mbe_macro.exp
+ 2f2b93268b8cb4819bacde3ee6a4fd59  gcc/testsuite/rust/compile/macros/mbe/meta-param.rs
  f6fd463372ec927d737a6adce056d704  gcc/testsuite/rust/compile/macros/proc/attribute_crate_type.rs
  680383e3d3dd395778b06b8f6df40202  gcc/testsuite/rust/compile/macros/proc/attribute_non_function.rs
  6be6ba4392564e325bf2988c9d512b03  gcc/testsuite/rust/compile/macros/proc/attribute_non_root_function.rs
*************** ea64ffc41b9add950fc498f76a5a0c36  gcc/te
*** 123898,123906 ****
--- 124143,124158 ----
  efd93d54e933def690c5f068247aaaf0  gcc/testsuite/rust/compile/macros/proc/proc_macro.exp
  1f5fa1c45a54f678ab64ca244c1fe6fe  gcc/testsuite/rust/compile/macros/proc/pub_function.rs
  1dd70ad3ec7121f165133c76244a824e  gcc/testsuite/rust/compile/macros/proc/pub_module.rs
+ bd366fc8f1bd48183a8bfedda516d321  gcc/testsuite/rust/compile/match-identifierpattern-enum.rs
+ 37b654d01127bec9b7163081d19a2340  gcc/testsuite/rust/compile/match-identifierpattern.rs
  56babc1a270c84c7fe8f842795fb05c1  gcc/testsuite/rust/compile/match-never-ltype.rs
  4c1f3e032cba1a8adcc4e4b4d3a0e352  gcc/testsuite/rust/compile/match-never-rtype.rs
+ 93aa60a819a01d6ee3828cca5219d7d8  gcc/testsuite/rust/compile/match-restpattern-tuple-1.rs
+ fc9b7d2d4bb9963302a68226e9c08458  gcc/testsuite/rust/compile/match-restpattern-tuple-2.rs
+ 2e43a4d187d7e27aa06e3927e65a583f  gcc/testsuite/rust/compile/match-slicepattern-array.rs
+ cfb7e6aa9801425986a22d8e15a8a528  gcc/testsuite/rust/compile/match-slicepattern-slice.rs
  afef148eac95e4333a352ea481e9a27e  gcc/testsuite/rust/compile/match-struct-path.rs
+ 74bb15616e5ded212bf30b18162ffbd8  gcc/testsuite/rust/compile/match-tuplestructpattern.rs
  72c0d2982b1ab36cffb0350603371eca  gcc/testsuite/rust/compile/match1.rs
  1b91ba46251a89048af8618b291df12e  gcc/testsuite/rust/compile/match2.rs
  28e5112c752d27c58ea4a15b7f2e415c  gcc/testsuite/rust/compile/match3.rs
*************** b30867c131b27bce830a37c41459788b  gcc/te
*** 123914,123920 ****
  7d4c7e4767a351c3039ac6d7255452d8  gcc/testsuite/rust/compile/may_dangle.rs
  a8880487be46564c8633ddd3863cec15  gcc/testsuite/rust/compile/method1.rs
  666db39f8c8467f03f866b4d2b574494  gcc/testsuite/rust/compile/method2.rs
! c5a1c5d82cd1e0edf6172efc6a4a567f  gcc/testsuite/rust/compile/min_specialization1.rs
  81fa68fc39cbeed3ddda23fc166d2f17  gcc/testsuite/rust/compile/mismatch-crate-name.rs
  cea8fc6391958ad7dfaf3c9c0fae6d86  gcc/testsuite/rust/compile/mismatched-types.rs
  e231e538febe2b589a3f0eaacc8ed989  gcc/testsuite/rust/compile/missing_closing_paren.rs
--- 124166,124172 ----
  7d4c7e4767a351c3039ac6d7255452d8  gcc/testsuite/rust/compile/may_dangle.rs
  a8880487be46564c8633ddd3863cec15  gcc/testsuite/rust/compile/method1.rs
  666db39f8c8467f03f866b4d2b574494  gcc/testsuite/rust/compile/method2.rs
! 477f92da078aef1d3d46394db5527a6b  gcc/testsuite/rust/compile/min_specialization1.rs
  81fa68fc39cbeed3ddda23fc166d2f17  gcc/testsuite/rust/compile/mismatch-crate-name.rs
  cea8fc6391958ad7dfaf3c9c0fae6d86  gcc/testsuite/rust/compile/mismatched-types.rs
  e231e538febe2b589a3f0eaacc8ed989  gcc/testsuite/rust/compile/missing_closing_paren.rs
*************** e7e40a55fdf47f28c89ad061c6470378  gcc/te
*** 123933,123965 ****
  f31b2774759388ed35dc4269f901b27b  gcc/testsuite/rust/compile/multiple_bindings2.rs
  545146ab7461b26f54326e81d45da595  gcc/testsuite/rust/compile/mutability_checks1.rs
  5347e97f6abe755953017f56901ed5cd  gcc/testsuite/rust/compile/name_resolution1.rs
! b8f825ac42c7e54fea373f78bd007073  gcc/testsuite/rust/compile/name_resolution10.rs
! d197c6d0845a807c88d2377ae9e39bfa  gcc/testsuite/rust/compile/name_resolution11.rs
! 7db500b7b9b00b506cdd69f1ffcd5740  gcc/testsuite/rust/compile/name_resolution12.rs
! 0fbdea51d41b917f2bd3d1d4c9424e33  gcc/testsuite/rust/compile/name_resolution13.rs
! 3077820f18cc13c5b10211f95d1d677c  gcc/testsuite/rust/compile/name_resolution14.rs
! 5bf56282369abcf952ae77c7b14a4a41  gcc/testsuite/rust/compile/name_resolution15.rs
! cec72c889db8044e885ce5634aa79453  gcc/testsuite/rust/compile/name_resolution16.rs
! c8d3763d1d1f89b68ac07d32cf792c33  gcc/testsuite/rust/compile/name_resolution17.rs
! 36463e537ef5b199b087c5260a8c05a4  gcc/testsuite/rust/compile/name_resolution18.rs
  70d45e5882b11c1911384ffceb9b85aa  gcc/testsuite/rust/compile/name_resolution19.rs
! 08857bb42431e383df7b82428816b19a  gcc/testsuite/rust/compile/name_resolution2.rs
! 3ee4c5af70e7fae93e50118ca5681e5c  gcc/testsuite/rust/compile/name_resolution20.rs
! f1b2b71c114e252b5f9e0262d030701c  gcc/testsuite/rust/compile/name_resolution22.rs
! 2cfd1ef9281ea198efe4ddcb939f247a  gcc/testsuite/rust/compile/name_resolution23.rs
! f8f7b3a594b9b35227c277a279b213e3  gcc/testsuite/rust/compile/name_resolution24.rs
! bef2809f3fa6391fef5421613e66bfe1  gcc/testsuite/rust/compile/name_resolution25.rs
  4451e4aed7aa23af2e35ef923e109c43  gcc/testsuite/rust/compile/name_resolution3.rs
! 4b74edfb7c386573ae3d930b56a7058f  gcc/testsuite/rust/compile/name_resolution4.rs
  a28faf8494eeae9637209b6141cf803a  gcc/testsuite/rust/compile/name_resolution5.rs
! bc40419d4e6c370ac53314f49208b4dc  gcc/testsuite/rust/compile/name_resolution6.rs
! 702d1b326baea9ee4f2d0c7cd2304fd4  gcc/testsuite/rust/compile/name_resolution7.rs
! 4556c16d8845a57bf94d639395f64284  gcc/testsuite/rust/compile/name_resolution8.rs
! 8e2163afd06a4bab7736f772bef4d780  gcc/testsuite/rust/compile/name_resolution9.rs
  819e3c226231807099efa2f38b27eff3  gcc/testsuite/rust/compile/negative_impls.rs
  fda9dc3567123e4f04a16ea5f5b364bf  gcc/testsuite/rust/compile/negative_impls_2.rs
  a2a2d0395b94225c5109187761c0e213  gcc/testsuite/rust/compile/nested_generic.rs
! 25ca4de3f40354d73966cfdb692dfeee  gcc/testsuite/rust/compile/nested_macro_definition.rs
  5cbc00140bae9d06617f7e444baaf508  gcc/testsuite/rust/compile/nested_macro_use1.rs
  da671ca390cc71e31d1a13e83175ed07  gcc/testsuite/rust/compile/nested_macro_use2.rs
  3b2626cfdc7db1273eb3ace63fc4ebf3  gcc/testsuite/rust/compile/nested_macro_use3.rs
--- 124185,124217 ----
  f31b2774759388ed35dc4269f901b27b  gcc/testsuite/rust/compile/multiple_bindings2.rs
  545146ab7461b26f54326e81d45da595  gcc/testsuite/rust/compile/mutability_checks1.rs
  5347e97f6abe755953017f56901ed5cd  gcc/testsuite/rust/compile/name_resolution1.rs
! 743b3c7d94d1a70912d425f8bac1ae53  gcc/testsuite/rust/compile/name_resolution10.rs
! a164f1cba0737a0efc72e6d0b8086cf4  gcc/testsuite/rust/compile/name_resolution11.rs
! 3aea675b670c6fc1968021e8f886e9be  gcc/testsuite/rust/compile/name_resolution12.rs
! d12142ecee0739004c6a7eaf3da4e801  gcc/testsuite/rust/compile/name_resolution13.rs
! b74a88f3505f4ab74ee4419ab30a545d  gcc/testsuite/rust/compile/name_resolution14.rs
! d1aa80f28f441526968cec28fc11de80  gcc/testsuite/rust/compile/name_resolution15.rs
! 498761703ecfad413b5ca67e81542618  gcc/testsuite/rust/compile/name_resolution16.rs
! a0aef1e7093ca4dfce49de36d2060b44  gcc/testsuite/rust/compile/name_resolution17.rs
! fc649a5b1f764ce93abfd30ddf4a2d9f  gcc/testsuite/rust/compile/name_resolution18.rs
  70d45e5882b11c1911384ffceb9b85aa  gcc/testsuite/rust/compile/name_resolution19.rs
! c71704128738d4623f4b272ee6c7b29f  gcc/testsuite/rust/compile/name_resolution2.rs
! f24c77e37d12a39151522184ec9c2535  gcc/testsuite/rust/compile/name_resolution20.rs
! e3378f39620c55df82b0e48b399140e3  gcc/testsuite/rust/compile/name_resolution22.rs
! a9fd512c90e6a51f37c1b610f86743a9  gcc/testsuite/rust/compile/name_resolution23.rs
! eb0042f3563840da7ab1442f5de0b28b  gcc/testsuite/rust/compile/name_resolution24.rs
! 2119574871ad31844d95df71c6c5340a  gcc/testsuite/rust/compile/name_resolution25.rs
  4451e4aed7aa23af2e35ef923e109c43  gcc/testsuite/rust/compile/name_resolution3.rs
! e29dcb718d3b9c163b663fa28126a6a8  gcc/testsuite/rust/compile/name_resolution4.rs
  a28faf8494eeae9637209b6141cf803a  gcc/testsuite/rust/compile/name_resolution5.rs
! 5abd468cbdeb6307385cc9b4af7f7d12  gcc/testsuite/rust/compile/name_resolution6.rs
! d65f39df14ef5e966e39a8cbcba42198  gcc/testsuite/rust/compile/name_resolution7.rs
! 52218c5bb7a22b29ef059c1a83caf9d0  gcc/testsuite/rust/compile/name_resolution8.rs
! d58e76df4ab13357ec81802a54ebd973  gcc/testsuite/rust/compile/name_resolution9.rs
  819e3c226231807099efa2f38b27eff3  gcc/testsuite/rust/compile/negative_impls.rs
  fda9dc3567123e4f04a16ea5f5b364bf  gcc/testsuite/rust/compile/negative_impls_2.rs
  a2a2d0395b94225c5109187761c0e213  gcc/testsuite/rust/compile/nested_generic.rs
! 8d3bdeb4554325413f034d9caa5d45c4  gcc/testsuite/rust/compile/nested_macro_definition.rs
  5cbc00140bae9d06617f7e444baaf508  gcc/testsuite/rust/compile/nested_macro_use1.rs
  da671ca390cc71e31d1a13e83175ed07  gcc/testsuite/rust/compile/nested_macro_use2.rs
  3b2626cfdc7db1273eb3ace63fc4ebf3  gcc/testsuite/rust/compile/nested_macro_use3.rs
*************** da671ca390cc71e31d1a13e83175ed07  gcc/te
*** 123970,123977 ****
  cd02e5ae651b681a19fcaf8376afcbf5  gcc/testsuite/rust/compile/not_a_float_literal_tuple_index.rs
  295d3f361dc7ebc9f93d3f2553623849  gcc/testsuite/rust/compile/not_find_value_in_scope.rs
  44807d1ba47e379ce9115ce45743697e  gcc/testsuite/rust/compile/not_raw_ref_op.rs
! e1276ff6c1d3f1fc6fdfb0a1e3812efd  gcc/testsuite/rust/compile/nr2/compile.exp
! b20a463cead70185552c3a19fc886742  gcc/testsuite/rust/compile/nr2/exclude
  6030c60f7b74c803068d451cb9ced7e5  gcc/testsuite/rust/compile/parse_associated_type_as_generic_arg.rs
  090d2f2bf747a624502f3ee033467544  gcc/testsuite/rust/compile/parse_associated_type_as_generic_arg2.rs
  938014f84c9261ed6b113bc617d40919  gcc/testsuite/rust/compile/parse_associated_type_as_generic_arg3.rs
--- 124222,124229 ----
  cd02e5ae651b681a19fcaf8376afcbf5  gcc/testsuite/rust/compile/not_a_float_literal_tuple_index.rs
  295d3f361dc7ebc9f93d3f2553623849  gcc/testsuite/rust/compile/not_find_value_in_scope.rs
  44807d1ba47e379ce9115ce45743697e  gcc/testsuite/rust/compile/not_raw_ref_op.rs
! 8b92c67b77b0a8b9220595331bfd0354  gcc/testsuite/rust/compile/offset_of1.rs
! a10eb4517b48647e195976dbe08ce7d3  gcc/testsuite/rust/compile/offset_of2.rs
  6030c60f7b74c803068d451cb9ced7e5  gcc/testsuite/rust/compile/parse_associated_type_as_generic_arg.rs
  090d2f2bf747a624502f3ee033467544  gcc/testsuite/rust/compile/parse_associated_type_as_generic_arg2.rs
  938014f84c9261ed6b113bc617d40919  gcc/testsuite/rust/compile/parse_associated_type_as_generic_arg3.rs
*************** ac7d528f48d6a84b3e60f20a514d6cf7  gcc/te
*** 123984,123989 ****
--- 124236,124243 ----
  fa1b080c05380ac0134d408be302d780  gcc/testsuite/rust/compile/parse_item_default_macro.rs
  7db46b087a9339ddd439310cfee25358  gcc/testsuite/rust/compile/parse_pub_unit_type.rs
  114e68344ffd8da36992cebba2f47a5f  gcc/testsuite/rust/compile/parse_range.rs
+ 02ce01b76aa86e37e9477312f31c07c0  gcc/testsuite/rust/compile/parse_simple_path_fail_1.rs
+ 0e0f8831d04267d4a04c218e34dd1abe  gcc/testsuite/rust/compile/parse_simple_path_fail_2.rs
  9d33d486f2d0ec95adbc86fda39b9f62  gcc/testsuite/rust/compile/parse_specialization.rs
  1278a63dcebf6ac473bf094b98ea0db2  gcc/testsuite/rust/compile/parse_variadic_function.rs
  334e926cb04db5e55dd49c65ded14065  gcc/testsuite/rust/compile/path_as_generic_arg.rs
*************** b1b0e52c874721c0a325366a7bc0642e  gcc/te
*** 124001,124008 ****
  9b7219e724eac9e35cd9d2fd18e153ba  gcc/testsuite/rust/compile/privacy8.rs
  f6b2d1b1b35b33dcdddd3bb19e17981a  gcc/testsuite/rust/compile/privacy9.rs
  d69b6343a6c7750c2337a30c294c90df  gcc/testsuite/rust/compile/ptr_int_cast.rs
! 90a3931a025c23dc07fbc9e12bc26144  gcc/testsuite/rust/compile/pub_restricted_1.rs
! d741a0191dd04a79a7edaaf116ec4f12  gcc/testsuite/rust/compile/pub_restricted_2.rs
  6bd1b5dbdfe5f30de51ab30015c5be78  gcc/testsuite/rust/compile/pub_restricted_3.rs
  8556679d5fb3f07093c6b5c029196057  gcc/testsuite/rust/compile/range_from_expr_for_loop.rs
  b60dce123d1d0e89fd2184843fe60b35  gcc/testsuite/rust/compile/raw-byte-string-loc.rs
--- 124255,124262 ----
  9b7219e724eac9e35cd9d2fd18e153ba  gcc/testsuite/rust/compile/privacy8.rs
  f6b2d1b1b35b33dcdddd3bb19e17981a  gcc/testsuite/rust/compile/privacy9.rs
  d69b6343a6c7750c2337a30c294c90df  gcc/testsuite/rust/compile/ptr_int_cast.rs
! fd275066587b6af6683b95664515141e  gcc/testsuite/rust/compile/pub_restricted_1.rs
! 54a93cbd04b5c2939e425c1c94314bfb  gcc/testsuite/rust/compile/pub_restricted_2.rs
  6bd1b5dbdfe5f30de51ab30015c5be78  gcc/testsuite/rust/compile/pub_restricted_3.rs
  8556679d5fb3f07093c6b5c029196057  gcc/testsuite/rust/compile/range_from_expr_for_loop.rs
  b60dce123d1d0e89fd2184843fe60b35  gcc/testsuite/rust/compile/raw-byte-string-loc.rs
*************** c864259519a663ecdb9ce794228363de  gcc/te
*** 124028,124043 ****
  2cb7dfbccc813bbbcd257a0425122660  gcc/testsuite/rust/compile/rustc_attr1.rs
  3acc29ade7325a48cac2cf1759440f1b  gcc/testsuite/rust/compile/rustc_const_stable.rs
  116db942d7d2214d6873939def9410fc  gcc/testsuite/rust/compile/rustc_const_unstable.rs
  2ef2e5399d947093c2b82f36e833a5bd  gcc/testsuite/rust/compile/self-path1.rs
  716d25499361417164ec827f9ebb0ac6  gcc/testsuite/rust/compile/self-path2.rs
  ce60d6c14138123e0c27ee626b14c1b2  gcc/testsuite/rust/compile/self_const_ptr.rs
! e09a5e854adf0225a4550c8310a41ec5  gcc/testsuite/rust/compile/self_import_namespace.rs
  345a25d5121fd2dbda8b949098005f58  gcc/testsuite/rust/compile/self_mut_ptr.rs
  08fba70febee1d69b9e95726a05aaed4  gcc/testsuite/rust/compile/self_ptr.rs
  2aefabea5e9340b0dc31cfb0816e5d24  gcc/testsuite/rust/compile/shadow1.rs
  26a750cf312f91f5f35658b8da415d03  gcc/testsuite/rust/compile/sized-stub.rs
  b9677fdb68fdeadc3f105590b7fe34c9  gcc/testsuite/rust/compile/sizeof-stray-infer-var-bug.rs
  cc55ba48071b2e36726a272bec14ac7e  gcc/testsuite/rust/compile/slice_rest_pattern.rs
  c76cd68ebcf9bb89b67b55d54a10cee5  gcc/testsuite/rust/compile/specify-crate-name.rs
  f0310c328b1fddc85d5bebedce0cf769  gcc/testsuite/rust/compile/static_var1.rs
  4d03e64527f8bdfbe648b8d3d0d8a3e8  gcc/testsuite/rust/compile/stmt_with_block_dot.rs
--- 124282,124301 ----
  2cb7dfbccc813bbbcd257a0425122660  gcc/testsuite/rust/compile/rustc_attr1.rs
  3acc29ade7325a48cac2cf1759440f1b  gcc/testsuite/rust/compile/rustc_const_stable.rs
  116db942d7d2214d6873939def9410fc  gcc/testsuite/rust/compile/rustc_const_unstable.rs
+ 214990bb0eee4de3b51f5e7fdde12b53  gcc/testsuite/rust/compile/same_field_name.rs
+ be4c338c6c29710796489914493d8665  gcc/testsuite/rust/compile/self-in-impl.rs
  2ef2e5399d947093c2b82f36e833a5bd  gcc/testsuite/rust/compile/self-path1.rs
  716d25499361417164ec827f9ebb0ac6  gcc/testsuite/rust/compile/self-path2.rs
  ce60d6c14138123e0c27ee626b14c1b2  gcc/testsuite/rust/compile/self_const_ptr.rs
! 58ba7dc4246e62f932699bc5160f9c39  gcc/testsuite/rust/compile/self_import_namespace.rs
  345a25d5121fd2dbda8b949098005f58  gcc/testsuite/rust/compile/self_mut_ptr.rs
  08fba70febee1d69b9e95726a05aaed4  gcc/testsuite/rust/compile/self_ptr.rs
  2aefabea5e9340b0dc31cfb0816e5d24  gcc/testsuite/rust/compile/shadow1.rs
+ 078f0a4edb2fd7624f70f3c53250431f  gcc/testsuite/rust/compile/silly-order-bug.rs
  26a750cf312f91f5f35658b8da415d03  gcc/testsuite/rust/compile/sized-stub.rs
  b9677fdb68fdeadc3f105590b7fe34c9  gcc/testsuite/rust/compile/sizeof-stray-infer-var-bug.rs
  cc55ba48071b2e36726a272bec14ac7e  gcc/testsuite/rust/compile/slice_rest_pattern.rs
+ 3d9403599fa65b5b6f55bf030e5f937c  gcc/testsuite/rust/compile/slicepattern-size-mismatch.rs
  c76cd68ebcf9bb89b67b55d54a10cee5  gcc/testsuite/rust/compile/specify-crate-name.rs
  f0310c328b1fddc85d5bebedce0cf769  gcc/testsuite/rust/compile/static_var1.rs
  4d03e64527f8bdfbe648b8d3d0d8a3e8  gcc/testsuite/rust/compile/stmt_with_block_dot.rs
*************** d1a4004c5a6ded0d144af392d0cd79ed  gcc/te
*** 124113,124119 ****
  9052e782c6bd21ebdeacd2ef37c971db  gcc/testsuite/rust/compile/torture/enum1.rs
  36c2a8fd2c29ef6fb5566c975128b2f4  gcc/testsuite/rust/compile/torture/extern_mod1.rs
  8278937d0cc6eda70c0ed9f40ea2d918  gcc/testsuite/rust/compile/torture/extern_mod1/modules/mod.rs
! 4c781d2c921d6401c22d96d426d243de  gcc/testsuite/rust/compile/torture/extern_mod2.rs
  1490d84b237737cb823c9217c7c951a1  gcc/testsuite/rust/compile/torture/float1.rs
  648d8471d92dd7e628efe64b7fe0cca3  gcc/testsuite/rust/compile/torture/float_types.rs
  785a9da1467d65ab0f9ceccec94af674  gcc/testsuite/rust/compile/torture/forward_decl_1.rs
--- 124371,124377 ----
  9052e782c6bd21ebdeacd2ef37c971db  gcc/testsuite/rust/compile/torture/enum1.rs
  36c2a8fd2c29ef6fb5566c975128b2f4  gcc/testsuite/rust/compile/torture/extern_mod1.rs
  8278937d0cc6eda70c0ed9f40ea2d918  gcc/testsuite/rust/compile/torture/extern_mod1/modules/mod.rs
! 030d54d2117f07f146e8a9732b4474c8  gcc/testsuite/rust/compile/torture/extern_mod2.rs
  1490d84b237737cb823c9217c7c951a1  gcc/testsuite/rust/compile/torture/float1.rs
  648d8471d92dd7e628efe64b7fe0cca3  gcc/testsuite/rust/compile/torture/float_types.rs
  785a9da1467d65ab0f9ceccec94af674  gcc/testsuite/rust/compile/torture/forward_decl_1.rs
*************** d1019e1ecc6b6bb4492444918e309ac6  gcc/te
*** 124149,124157 ****
  5aa5968e934404978f5864bc1db0b051  gcc/testsuite/rust/compile/torture/generics26.rs
  a68de14d9507aaeceb6657f4512e3638  gcc/testsuite/rust/compile/torture/generics27.rs
  e993964b19f3868f0e783d56b28cb59c  gcc/testsuite/rust/compile/torture/generics28.rs
! 1b2718ceda8c540bebdcf901cec2d17f  gcc/testsuite/rust/compile/torture/generics29.rs
  133ba33a6bb38cd49660c3969da8c5b1  gcc/testsuite/rust/compile/torture/generics3.rs
! 7f886438800de6006de15f375b5a81a1  gcc/testsuite/rust/compile/torture/generics30.rs
  182632540dd7df72ff8b5c42353f40c0  gcc/testsuite/rust/compile/torture/generics31.rs
  1f9762fbcf921d6b0f6ca48d605a477a  gcc/testsuite/rust/compile/torture/generics32.rs
  9a77e5d1b23834a3c0d1b4e8ccc935c9  gcc/testsuite/rust/compile/torture/generics4.rs
--- 124407,124415 ----
  5aa5968e934404978f5864bc1db0b051  gcc/testsuite/rust/compile/torture/generics26.rs
  a68de14d9507aaeceb6657f4512e3638  gcc/testsuite/rust/compile/torture/generics27.rs
  e993964b19f3868f0e783d56b28cb59c  gcc/testsuite/rust/compile/torture/generics28.rs
! c297a0f1607e6d59bef590c037e85fce  gcc/testsuite/rust/compile/torture/generics29.rs
  133ba33a6bb38cd49660c3969da8c5b1  gcc/testsuite/rust/compile/torture/generics3.rs
! e927c0533d7d3dae91b895a4f4c546c6  gcc/testsuite/rust/compile/torture/generics30.rs
  182632540dd7df72ff8b5c42353f40c0  gcc/testsuite/rust/compile/torture/generics31.rs
  1f9762fbcf921d6b0f6ca48d605a477a  gcc/testsuite/rust/compile/torture/generics32.rs
  9a77e5d1b23834a3c0d1b4e8ccc935c9  gcc/testsuite/rust/compile/torture/generics4.rs
*************** c8c47f8e55013811bc4996f575619fbc  gcc/te
*** 124285,124295 ****
  de6056a9a0306d6a5caade358268bf8e  gcc/testsuite/rust/compile/torture/traits18.rs
  af0a278cecf22cabd9cce06c4aaba2bf  gcc/testsuite/rust/compile/torture/traits19.rs
  47505dfdbb68c3690cb03333aaa75fd7  gcc/testsuite/rust/compile/torture/traits2.rs
! 24a0048b71276f60c8a283e46d795534  gcc/testsuite/rust/compile/torture/traits3.rs
  4b4c1672882620f4efe5b069ce7a7e70  gcc/testsuite/rust/compile/torture/traits4.rs
  5dcbe7a312d4506f459c969c4c583bb5  gcc/testsuite/rust/compile/torture/traits5.rs
  c17e5e7936f9df88e607fa6b4b726d9d  gcc/testsuite/rust/compile/torture/traits6.rs
! 1891c06965274b07cc26630bf8c29c7a  gcc/testsuite/rust/compile/torture/traits7.rs
  78bf33f383e889d5d7cb76a7e423cff8  gcc/testsuite/rust/compile/torture/traits8.rs
  717619eb6814a0bc1eab099a41d59e05  gcc/testsuite/rust/compile/torture/traits9.rs
  5cd369727475a28a479f3aaa8eb8006c  gcc/testsuite/rust/compile/torture/transmute-size-check-1.rs
--- 124543,124553 ----
  de6056a9a0306d6a5caade358268bf8e  gcc/testsuite/rust/compile/torture/traits18.rs
  af0a278cecf22cabd9cce06c4aaba2bf  gcc/testsuite/rust/compile/torture/traits19.rs
  47505dfdbb68c3690cb03333aaa75fd7  gcc/testsuite/rust/compile/torture/traits2.rs
! 94f7f580613d012a7069fcfd01519f60  gcc/testsuite/rust/compile/torture/traits3.rs
  4b4c1672882620f4efe5b069ce7a7e70  gcc/testsuite/rust/compile/torture/traits4.rs
  5dcbe7a312d4506f459c969c4c583bb5  gcc/testsuite/rust/compile/torture/traits5.rs
  c17e5e7936f9df88e607fa6b4b726d9d  gcc/testsuite/rust/compile/torture/traits6.rs
! 898719dcc8d8f15581396a0ea53e214b  gcc/testsuite/rust/compile/torture/traits7.rs
  78bf33f383e889d5d7cb76a7e423cff8  gcc/testsuite/rust/compile/torture/traits8.rs
  717619eb6814a0bc1eab099a41d59e05  gcc/testsuite/rust/compile/torture/traits9.rs
  5cd369727475a28a479f3aaa8eb8006c  gcc/testsuite/rust/compile/torture/transmute-size-check-1.rs
*************** ec86251919e467ab5186531cd6a92662  gcc/te
*** 124317,124322 ****
--- 124575,124581 ----
  a7106ab3e5a08e2b58b4f3d59f6c16bb  gcc/testsuite/rust/compile/torture/undended-string-1.rs
  b681f040c3d1e80af3f41d1b267db483  gcc/testsuite/rust/compile/torture/undended-string-2.rs
  7496356346ddb12a707c608a7ca122d5  gcc/testsuite/rust/compile/torture/underscore_id.rs
+ 4f3b8153204513c624e2394abb19a0d1  gcc/testsuite/rust/compile/torture/unended-raw-byte-string.rs
  1cfc5ea87d2735462d0268a4484cd5ad  gcc/testsuite/rust/compile/torture/uninit-intrinsic-1.rs
  97a2905e8fd8b85c8fe64e4b83babb3e  gcc/testsuite/rust/compile/torture/union.rs
  103a196af16a2550139988edb7794ae8  gcc/testsuite/rust/compile/torture/union_union.rs
*************** a225b4c57ba672661c1d29da450cefc9  gcc/te
*** 124354,124367 ****
  70d0cd3be0d16286ab28eb106f68408d  gcc/testsuite/rust/compile/traits6.rs
  54b50841460752b7d17613381fc20a75  gcc/testsuite/rust/compile/traits7.rs
  4efe1f3a0f41279a076b223dbaa6c7a4  gcc/testsuite/rust/compile/traits8.rs
! 154a3e003fdef84da9a064f040d14be0  gcc/testsuite/rust/compile/traits9.rs
  e5ba2705e4db9becf9b15f55ae4c2045  gcc/testsuite/rust/compile/try-catch-unwind-new.rs
  058f6afaf86db22b30feb1bbcc49eff8  gcc/testsuite/rust/compile/try-catch-unwind-old.rs
  3261dfa33f8c6dfb0a1d95afd1c89a1e  gcc/testsuite/rust/compile/try-expr1.rs
  9ffde65558275c1bc1fccaa8d3d303ad  gcc/testsuite/rust/compile/try-trait.rs
  d0dd22fa3a3a512431403c19da377d75  gcc/testsuite/rust/compile/tuple1.rs
  3e11ad929fc91de98602e9b2a827b85c  gcc/testsuite/rust/compile/tuple_float_index.rs
! 0d156fbb6d1a73ffa9c48a5d8bffb99a  gcc/testsuite/rust/compile/tuple_mismatch.rs
  a1ac7edeb898356a609ab5f448f8106d  gcc/testsuite/rust/compile/tuple_struct1.rs
  3a1197db3bd55512ebf6f3f6c9cc82b4  gcc/testsuite/rust/compile/tuple_struct2.rs
  0b343c17e414c8d5569ccaf48abff3c6  gcc/testsuite/rust/compile/tuple_struct3.rs
--- 124613,124627 ----
  70d0cd3be0d16286ab28eb106f68408d  gcc/testsuite/rust/compile/traits6.rs
  54b50841460752b7d17613381fc20a75  gcc/testsuite/rust/compile/traits7.rs
  4efe1f3a0f41279a076b223dbaa6c7a4  gcc/testsuite/rust/compile/traits8.rs
! 67e4aedb74b951612d083061e0dfc9d0  gcc/testsuite/rust/compile/traits9.rs
  e5ba2705e4db9becf9b15f55ae4c2045  gcc/testsuite/rust/compile/try-catch-unwind-new.rs
  058f6afaf86db22b30feb1bbcc49eff8  gcc/testsuite/rust/compile/try-catch-unwind-old.rs
  3261dfa33f8c6dfb0a1d95afd1c89a1e  gcc/testsuite/rust/compile/try-expr1.rs
  9ffde65558275c1bc1fccaa8d3d303ad  gcc/testsuite/rust/compile/try-trait.rs
+ 418f71863496e6a7341ca0b843e40f1c  gcc/testsuite/rust/compile/try_block1.rs
  d0dd22fa3a3a512431403c19da377d75  gcc/testsuite/rust/compile/tuple1.rs
  3e11ad929fc91de98602e9b2a827b85c  gcc/testsuite/rust/compile/tuple_float_index.rs
! 59c04689778748d13166c52f19d04f8f  gcc/testsuite/rust/compile/tuple_mismatch.rs
  a1ac7edeb898356a609ab5f448f8106d  gcc/testsuite/rust/compile/tuple_struct1.rs
  3a1197db3bd55512ebf6f3f6c9cc82b4  gcc/testsuite/rust/compile/tuple_struct2.rs
  0b343c17e414c8d5569ccaf48abff3c6  gcc/testsuite/rust/compile/tuple_struct3.rs
*************** a1ac7edeb898356a609ab5f448f8106d  gcc/te
*** 124375,124380 ****
--- 124635,124641 ----
  0bc89f0cfd095fc4c59f1e85d6966681  gcc/testsuite/rust/compile/undeclared_label.rs
  6895f64e4c1c706d09e540e4b97751d5  gcc/testsuite/rust/compile/unicode_escape.rs
  a823af26e85a962948de60f4b33d559e  gcc/testsuite/rust/compile/unicode_norm1.rs
+ 714e7339f62ee7f473cd2b034a07b6b1  gcc/testsuite/rust/compile/unify-errors1.rs
  e61fc0f33dc5620379eacfb49627f713  gcc/testsuite/rust/compile/unknown-associated-item.rs
  c0f3b70f1f30585a1ddb81a01cd7784b  gcc/testsuite/rust/compile/unsafe1.rs
  7decff6d514eeddac35d6e93c14d4490  gcc/testsuite/rust/compile/unsafe10.rs
*************** f840f4287f5740ac4854b2f4195dbfbe  gcc/te
*** 124390,124407 ****
  1eda1b7673de43c07e2c48bd01367d7c  gcc/testsuite/rust/compile/unsafe_module.rs
  82c88b596e5dd7e19c5c2febfa49a9e8  gcc/testsuite/rust/compile/unstable-fn.rs
  7c830dd0a2ec3525c6da4bc67b44f331  gcc/testsuite/rust/compile/unterminated_c_comment.rs
! 0762e0d3d723a8c2995f0e7324d30fa8  gcc/testsuite/rust/compile/use_1.rs
  9fc32e79fcf7466f1df1c8e1f5615b56  gcc/testsuite/rust/compile/use_2.rs
! f605e4e474930481f2179649d22239a1  gcc/testsuite/rust/compile/usize1.rs
  4ba93adcc306a982a169bf9d8fc0e09c  gcc/testsuite/rust/compile/v0-mangle1.rs
  63dc292fd1579604dc888db846d521f6  gcc/testsuite/rust/compile/v0-mangle2.rs
  ffeacc1dda452d94122d6a2cea6d601a  gcc/testsuite/rust/compile/variadic.rs
  d328500e54be92447ee10f2591d11017  gcc/testsuite/rust/compile/while_break_expr.rs
  a924b01bbc1d263aa1409bc3be20babb  gcc/testsuite/rust/compile/while_let_expr.rs
  ecd1b51f089be2835ada173bc06aaa41  gcc/testsuite/rust/compile/wrong_lhs_assignment.rs
  5004765615d7d0e03d77473e2e06aa0f  gcc/testsuite/rust/compile/wrong_no_of_parameters.rs
  c7d793e2850d119364ecbefff6f25e6a  gcc/testsuite/rust/compile/xfail/lifetime_param.rs
! f2e1eda302a70dfade900cd8843caed2  gcc/testsuite/rust/compile/xfail/name_resolution21.rs
  f219c902f8bbb7747064aa57b2247406  gcc/testsuite/rust/compile/xfail/struct_field_vis.rs
  6cac77bead9a159370fe05c2e4be2550  gcc/testsuite/rust/compile/xfail/xfail.exp
  3218ecaec34cb9248c2d6ea5e9a19e62  gcc/testsuite/rust/compile/zero_sized_slice.rs
--- 124651,124670 ----
  1eda1b7673de43c07e2c48bd01367d7c  gcc/testsuite/rust/compile/unsafe_module.rs
  82c88b596e5dd7e19c5c2febfa49a9e8  gcc/testsuite/rust/compile/unstable-fn.rs
  7c830dd0a2ec3525c6da4bc67b44f331  gcc/testsuite/rust/compile/unterminated_c_comment.rs
! 4be9ad073e00747e5ffe46175988b56e  gcc/testsuite/rust/compile/use_1.rs
  9fc32e79fcf7466f1df1c8e1f5615b56  gcc/testsuite/rust/compile/use_2.rs
! bb66b71d9e02e842378a5f1a6113a4de  gcc/testsuite/rust/compile/usize1.rs
  4ba93adcc306a982a169bf9d8fc0e09c  gcc/testsuite/rust/compile/v0-mangle1.rs
  63dc292fd1579604dc888db846d521f6  gcc/testsuite/rust/compile/v0-mangle2.rs
  ffeacc1dda452d94122d6a2cea6d601a  gcc/testsuite/rust/compile/variadic.rs
  d328500e54be92447ee10f2591d11017  gcc/testsuite/rust/compile/while_break_expr.rs
+ 4e05133cd51875241639b30cbd212b32  gcc/testsuite/rust/compile/while_let1.rs
  a924b01bbc1d263aa1409bc3be20babb  gcc/testsuite/rust/compile/while_let_expr.rs
+ c6edc136ff5d22dbaf22a81eafe9061f  gcc/testsuite/rust/compile/while_let_without_label.rs
  ecd1b51f089be2835ada173bc06aaa41  gcc/testsuite/rust/compile/wrong_lhs_assignment.rs
  5004765615d7d0e03d77473e2e06aa0f  gcc/testsuite/rust/compile/wrong_no_of_parameters.rs
  c7d793e2850d119364ecbefff6f25e6a  gcc/testsuite/rust/compile/xfail/lifetime_param.rs
! 5eea6de8565b8d2af82fa407a8a5e912  gcc/testsuite/rust/compile/xfail/name_resolution21.rs
  f219c902f8bbb7747064aa57b2247406  gcc/testsuite/rust/compile/xfail/struct_field_vis.rs
  6cac77bead9a159370fe05c2e4be2550  gcc/testsuite/rust/compile/xfail/xfail.exp
  3218ecaec34cb9248c2d6ea5e9a19e62  gcc/testsuite/rust/compile/zero_sized_slice.rs
*************** faa029c0320aae395036255789ed154c  gcc/te
*** 124414,124427 ****
  4f4406b9c3ea1e1d1fe142e73f7d81dc  gcc/testsuite/rust/debug/oldlang.rs
  533df5d9904c8efee02c94532338efc2  gcc/testsuite/rust/debug/tuple.rs
  d5d8788f3a670487fb051714384ab2a1  gcc/testsuite/rust/debug/win64-abi.rs
! e7dadddc450e95dac1b696cede42238c  gcc/testsuite/rust/execute/black_box.rs
  36f6ff07e76f000052781ec6324b4dff  gcc/testsuite/rust/execute/crate-metavar1.rs
! 5c09d4f755cc413edff8ea1879dc50d2  gcc/testsuite/rust/execute/same_field_name.rs
  94c13baa4b458105f3e2204c8d4d1e17  gcc/testsuite/rust/execute/torture/arrays.rs
  eca15726fcabf7e7620037e020ee686f  gcc/testsuite/rust/execute/torture/atomic_load.rs
  08a045beac132b26b7d1b09ee02a7bd4  gcc/testsuite/rust/execute/torture/atomic_store.rs
  64ec49dcf61c1ec23016e5eb7627a5b7  gcc/testsuite/rust/execute/torture/block_expr1.rs
! 28dbae897d625ca0f50d65ca43deed01  gcc/testsuite/rust/execute/torture/builtin_abort.rs
  c1b657c2acee7d237da8a2cd240c44a8  gcc/testsuite/rust/execute/torture/builtin_macro_cfg.rs
  ae3d7e4a5d743ef3c619b5f6b7cc9bfb  gcc/testsuite/rust/execute/torture/builtin_macro_concat.rs
  cfad0d9f56bfc596e57015384c27d0c9  gcc/testsuite/rust/execute/torture/builtin_macro_env.rs
--- 124677,124694 ----
  4f4406b9c3ea1e1d1fe142e73f7d81dc  gcc/testsuite/rust/debug/oldlang.rs
  533df5d9904c8efee02c94532338efc2  gcc/testsuite/rust/debug/tuple.rs
  d5d8788f3a670487fb051714384ab2a1  gcc/testsuite/rust/debug/win64-abi.rs
! 252f7f8fd334d8f3d2cc69a2b8b31c2e  gcc/testsuite/rust/execute/black_box.rs
  36f6ff07e76f000052781ec6324b4dff  gcc/testsuite/rust/execute/crate-metavar1.rs
! a955f443b22ec1f728412795c6504609  gcc/testsuite/rust/execute/execute.exp
! 8e47a1bc8e9935068eb4dde0883aea17  gcc/testsuite/rust/execute/inline_asm_inout_ident.rs
! ea10404403216cd1d1ddc7a404ac401a  gcc/testsuite/rust/execute/inline_asm_inout_var.rs
  94c13baa4b458105f3e2204c8d4d1e17  gcc/testsuite/rust/execute/torture/arrays.rs
  eca15726fcabf7e7620037e020ee686f  gcc/testsuite/rust/execute/torture/atomic_load.rs
  08a045beac132b26b7d1b09ee02a7bd4  gcc/testsuite/rust/execute/torture/atomic_store.rs
+ 5674a4df48636339ce6b004b16b52a52  gcc/testsuite/rust/execute/torture/basic_partial_ord1.rs
+ d26050080ee67ef52dfd4c9c3be4f9c7  gcc/testsuite/rust/execute/torture/basic_partial_ord2.rs
  64ec49dcf61c1ec23016e5eb7627a5b7  gcc/testsuite/rust/execute/torture/block_expr1.rs
! 95c683b978067e1f39177adfa6ce02ae  gcc/testsuite/rust/execute/torture/builtin_abort.rs
  c1b657c2acee7d237da8a2cd240c44a8  gcc/testsuite/rust/execute/torture/builtin_macro_cfg.rs
  ae3d7e4a5d743ef3c619b5f6b7cc9bfb  gcc/testsuite/rust/execute/torture/builtin_macro_concat.rs
  cfad0d9f56bfc596e57015384c27d0c9  gcc/testsuite/rust/execute/torture/builtin_macro_env.rs
*************** e81ff8419c8b0085aa761fb8da969227  gcc/te
*** 124445,124450 ****
--- 124712,124719 ----
  68b76cd79b817b8e9315c05cd60c81f6  gcc/testsuite/rust/execute/torture/coercion1.rs
  27dd0332fd73b2accf878d9b7db118d3  gcc/testsuite/rust/execute/torture/coercion2.rs
  497b0c18909c49a30e2b53c15f8fc527  gcc/testsuite/rust/execute/torture/coercion3.rs
+ 8446b8757d4d2c85db0aa361ce166b12  gcc/testsuite/rust/execute/torture/const-generics-1.rs
+ 744aef37751c0985c87a0e8de312c015  gcc/testsuite/rust/execute/torture/const_block1.rs
  16aaa17474f319d84939e58bd3191fe6  gcc/testsuite/rust/execute/torture/const_fold1.rs
  241a2be1d8747c41bb6696abef8fca56  gcc/testsuite/rust/execute/torture/const_fold2.rs
  fd85d0412a3b44dc18646d7a2f23ed44  gcc/testsuite/rust/execute/torture/copy_nonoverlapping1.rs
*************** fd85d0412a3b44dc18646d7a2f23ed44  gcc/te
*** 124454,124459 ****
--- 124723,124729 ----
  b9d5acfe96556f242a09a6982797cd8b  gcc/testsuite/rust/execute/torture/decl_macro4.rs
  3f57cd6a0818ef995e11884429993020  gcc/testsuite/rust/execute/torture/derive-default1.rs
  1a151d0002782fe81774c2ef9d91474d  gcc/testsuite/rust/execute/torture/derive-partialeq1.rs
+ 5c6c2c51b40ad8d290fe6a4690c81481  gcc/testsuite/rust/execute/torture/derive-partialeq2.rs
  48caa2872d3bb7f0e1b8ee4fb1849acc  gcc/testsuite/rust/execute/torture/derive_clone_enum1.rs
  88c52a8112f07c24a800321dac704c65  gcc/testsuite/rust/execute/torture/derive_macro1.rs
  9093dd2dd5d6d17cfab71c38028cb7b3  gcc/testsuite/rust/execute/torture/derive_macro3.rs
*************** e9009eb5eaed800d5f556dd9eb81d1b8  gcc/te
*** 124465,124476 ****
  c579ac738ba95f67c2c7d8a745f30d74  gcc/testsuite/rust/execute/torture/exit_error.rs
  ab6af2afb853cd3748a8320e0f4d16f3  gcc/testsuite/rust/execute/torture/extern_mod4.rs
  deec28fbd0fd7d5a890d0905cbfa3d3a  gcc/testsuite/rust/execute/torture/extern_mod4/modules/mod.rs
! ada44c943de3146b4f90cf9d871c3929  gcc/testsuite/rust/execute/torture/for-loop1.rs
! 4321c56006fb7b8bc0406a58bc935686  gcc/testsuite/rust/execute/torture/for-loop2.rs
  51c98fe37862ab18dafa4be9e1fcc95e  gcc/testsuite/rust/execute/torture/func1.rs
  fab98ca34ae058c9972166c501a700ec  gcc/testsuite/rust/execute/torture/helloworld1.rs
  dd9d5a465f08d85c74f79bf57191b889  gcc/testsuite/rust/execute/torture/helloworld2.rs
  ab0eadcf833fcbd08d9b7fdc9778ed10  gcc/testsuite/rust/execute/torture/iflet.rs
  d1bf4d03901b291d3115f4895ffb2fb7  gcc/testsuite/rust/execute/torture/include.txt
  62a41b75b7c5ffea1195d0d9ae0a0292  gcc/testsuite/rust/execute/torture/index1.rs
  101931feb6b9121176b08e5394b8f10c  gcc/testsuite/rust/execute/torture/inline_asm_mov_x_5_ARM.rs
--- 124735,124755 ----
  c579ac738ba95f67c2c7d8a745f30d74  gcc/testsuite/rust/execute/torture/exit_error.rs
  ab6af2afb853cd3748a8320e0f4d16f3  gcc/testsuite/rust/execute/torture/extern_mod4.rs
  deec28fbd0fd7d5a890d0905cbfa3d3a  gcc/testsuite/rust/execute/torture/extern_mod4/modules/mod.rs
! 3dac9bc33a1617b2a7bc49d3025058aa  gcc/testsuite/rust/execute/torture/for-loop1.rs
! 5a1213e2a96611248a95776205c33912  gcc/testsuite/rust/execute/torture/for-loop2.rs
  51c98fe37862ab18dafa4be9e1fcc95e  gcc/testsuite/rust/execute/torture/func1.rs
  fab98ca34ae058c9972166c501a700ec  gcc/testsuite/rust/execute/torture/helloworld1.rs
  dd9d5a465f08d85c74f79bf57191b889  gcc/testsuite/rust/execute/torture/helloworld2.rs
  ab0eadcf833fcbd08d9b7fdc9778ed10  gcc/testsuite/rust/execute/torture/iflet.rs
+ cf7a3a950600b05c687aa68cddfdcb25  gcc/testsuite/rust/execute/torture/impl_desugar-2.rs
+ 4eb6c5b481a2150428f4740a114e6f65  gcc/testsuite/rust/execute/torture/impl_desugar.rs
+ 1390651fd9eeb96b9b0c73f0213b4e3f  gcc/testsuite/rust/execute/torture/impl_rpit1.rs
+ 0bae05b8784cf8dda71e182067857c9a  gcc/testsuite/rust/execute/torture/impl_rpit2.rs
+ f5fd0e4151ad6b4b62e17501a7f76ede  gcc/testsuite/rust/execute/torture/impl_rpit3.rs
+ 499b5dc450a898e8c08caa8a06da71dd  gcc/testsuite/rust/execute/torture/impl_trait1.rs
+ d8e168754d6d6c3afe53ac2c50e92b9a  gcc/testsuite/rust/execute/torture/impl_trait2.rs
+ a3ff73b45a6aab3f498fd241adc10a45  gcc/testsuite/rust/execute/torture/impl_trait3.rs
+ cc3e37b2162ed9a0de72784a803dbbbf  gcc/testsuite/rust/execute/torture/impl_trait4.rs
  d1bf4d03901b291d3115f4895ffb2fb7  gcc/testsuite/rust/execute/torture/include.txt
  62a41b75b7c5ffea1195d0d9ae0a0292  gcc/testsuite/rust/execute/torture/index1.rs
  101931feb6b9121176b08e5394b8f10c  gcc/testsuite/rust/execute/torture/inline_asm_mov_x_5_ARM.rs
*************** fd2a4838eb014285bc8f567e8bd70ceb  gcc/te
*** 124482,124492 ****
--- 124761,124774 ----
  12c716ab70323de0af63a9c0f99aea03  gcc/testsuite/rust/execute/torture/issue-1232.rs
  e4c50a85ec53e7486479e75929f741e7  gcc/testsuite/rust/execute/torture/issue-1249.rs
  69c87f9ecf59a43749bed79606fb35a2  gcc/testsuite/rust/execute/torture/issue-1436.rs
+ 4879ae61e1c23fbaeed3b1d870e783ab  gcc/testsuite/rust/execute/torture/issue-1481.rs
+ 277f816167dbef8aeb1a4f3e957f1302  gcc/testsuite/rust/execute/torture/issue-1482.rs
  0fe3cb9aefa642b3ad5d66b03236eebc  gcc/testsuite/rust/execute/torture/issue-1496.rs
  d6cecf6e8b59b318ec6239b5a61bee14  gcc/testsuite/rust/execute/torture/issue-1720-2.rs
  d4fd8ea0044840c76ddeff882c4cd32b  gcc/testsuite/rust/execute/torture/issue-1720.rs
  b6b074a8a691f6f9edb8191b820c0ad6  gcc/testsuite/rust/execute/torture/issue-1852-1.rs
  da3f6f2847d41be5c388e50b18051e12  gcc/testsuite/rust/execute/torture/issue-1852.rs
+ 0372216e15b2d9a78d4954513b094088  gcc/testsuite/rust/execute/torture/issue-2005.rs
  ca9c7c4413199f843e3b51677965b5b4  gcc/testsuite/rust/execute/torture/issue-2052.rs
  8becbf6525cbbde4782e84b68f602396  gcc/testsuite/rust/execute/torture/issue-2080.rs
  d8ad8f9578efd13f8656c31449e77bf0  gcc/testsuite/rust/execute/torture/issue-2179.rs
*************** b00ed11eddbb45f2d076fbabb9980dc0  gcc/te
*** 124498,124510 ****
  06cdf97de4a0f302b366e6bd9e2c0b51  gcc/testsuite/rust/execute/torture/issue-3126.rs
  63b786f5f35c6c87d722646f2d91b209  gcc/testsuite/rust/execute/torture/issue-3381.rs
  a96b0644743e8e241da6558cbb2c2fba  gcc/testsuite/rust/execute/torture/issue-3502.rs
  ba2cc9caa5cf695dabb5e09de31fcceb  gcc/testsuite/rust/execute/torture/issue-647.rs
  9aebf168cfdac6b4ffcb96d19980fa72  gcc/testsuite/rust/execute/torture/issue-845.rs
  063e1d1686f93b29ba383722fc51dbed  gcc/testsuite/rust/execute/torture/issue-851.rs
  f7a4dec5c495bdc2a5580c6b2ff9a054  gcc/testsuite/rust/execute/torture/issue-858.rs
  449e42630eb5fd571755658ebbb341c4  gcc/testsuite/rust/execute/torture/issue-976.rs
  a7f4a565f46d8c8589434308e7968386  gcc/testsuite/rust/execute/torture/issue-995.rs
! 1c32d69ae48847a7750476692b1dc899  gcc/testsuite/rust/execute/torture/iter1.rs
  e5d4fd47103c9b2ec08ec98416082eb9  gcc/testsuite/rust/execute/torture/let-pattern-1.rs
  b9e7dd193296598753c75fbfaae447bd  gcc/testsuite/rust/execute/torture/loop-condition-eval.rs
  d7e1088b7c9ae3714d6c9ac6aeb13b18  gcc/testsuite/rust/execute/torture/macro-issue1426.rs
--- 124780,124793 ----
  06cdf97de4a0f302b366e6bd9e2c0b51  gcc/testsuite/rust/execute/torture/issue-3126.rs
  63b786f5f35c6c87d722646f2d91b209  gcc/testsuite/rust/execute/torture/issue-3381.rs
  a96b0644743e8e241da6558cbb2c2fba  gcc/testsuite/rust/execute/torture/issue-3502.rs
+ bed350f339543e64906d16b02e9f5183  gcc/testsuite/rust/execute/torture/issue-3836.rs
  ba2cc9caa5cf695dabb5e09de31fcceb  gcc/testsuite/rust/execute/torture/issue-647.rs
  9aebf168cfdac6b4ffcb96d19980fa72  gcc/testsuite/rust/execute/torture/issue-845.rs
  063e1d1686f93b29ba383722fc51dbed  gcc/testsuite/rust/execute/torture/issue-851.rs
  f7a4dec5c495bdc2a5580c6b2ff9a054  gcc/testsuite/rust/execute/torture/issue-858.rs
  449e42630eb5fd571755658ebbb341c4  gcc/testsuite/rust/execute/torture/issue-976.rs
  a7f4a565f46d8c8589434308e7968386  gcc/testsuite/rust/execute/torture/issue-995.rs
! 372b5ab0b0565ead0b200dc760731544  gcc/testsuite/rust/execute/torture/iter1.rs
  e5d4fd47103c9b2ec08ec98416082eb9  gcc/testsuite/rust/execute/torture/let-pattern-1.rs
  b9e7dd193296598753c75fbfaae447bd  gcc/testsuite/rust/execute/torture/loop-condition-eval.rs
  d7e1088b7c9ae3714d6c9ac6aeb13b18  gcc/testsuite/rust/execute/torture/macro-issue1426.rs
*************** f987c9a3d4082272d0fdffecda3a5982  gcc/te
*** 124539,124544 ****
--- 124822,124832 ----
  52d5a486adcbb425f6b447d97cd3d1a2  gcc/testsuite/rust/execute/torture/macros7.rs
  addb70cf1de08173fd0c2abd2b1b0aff  gcc/testsuite/rust/execute/torture/macros8.rs
  a162d48d44f2ab3e7366e4fcd9aba1d3  gcc/testsuite/rust/execute/torture/macros9.rs
+ 689951c24d422ee0af8a391bac29de71  gcc/testsuite/rust/execute/torture/match-identifierpattern.rs
+ 5176a660e070f5219983faf6aade8bb1  gcc/testsuite/rust/execute/torture/match-restpattern-tuple.rs
+ 6fe41f4e67a073ce971d39a214f170ee  gcc/testsuite/rust/execute/torture/match-slicepattern-array-1.rs
+ fc16bd0ec2ec1f434c04a9734eb6cd06  gcc/testsuite/rust/execute/torture/match-slicepattern-slice-1.rs
+ 01b927e144874f1d853a6daba14b5212  gcc/testsuite/rust/execute/torture/match-tuplestructpattern.rs
  14d4601e2d037806196aad97cb37c69f  gcc/testsuite/rust/execute/torture/match1.rs
  bc6b669a3a8b1821d1dd4520934053ef  gcc/testsuite/rust/execute/torture/match2.rs
  bb8cc04aaa6e095f9c9dab335699a42e  gcc/testsuite/rust/execute/torture/match3.rs
*************** bd1d405cfc6bdbadc0c47d3aab4b794b  gcc/te
*** 124555,124566 ****
  d5dc0260dfa3bbf3e347b8e56945fa1e  gcc/testsuite/rust/execute/torture/method2.rs
  d19bc56fc070b84e1ca39de0f28a852e  gcc/testsuite/rust/execute/torture/method3.rs
  8f2351f701c6ec39cf992f060166dfb7  gcc/testsuite/rust/execute/torture/method4.rs
! a8df67c6375fe32f63d5f5799c80c61e  gcc/testsuite/rust/execute/torture/min_specialization2.rs
  e007cd93facba6b11ec1ba055a220e75  gcc/testsuite/rust/execute/torture/min_specialization3.rs
  3f13ddef20c0f036bfffdb2d02bc5334  gcc/testsuite/rust/execute/torture/mod1.rs
  d4b094ee76b23fbfd1be6f64c23f0041  gcc/testsuite/rust/execute/torture/multiline-string.rs
! c8ee9c51b08901bb75fc90317a691039  gcc/testsuite/rust/execute/torture/name_resolution.rs
  533763469b219f004d5d73c7642553c9  gcc/testsuite/rust/execute/torture/named_variadic.rs
  dda9820471c4dc11cd335034d35e5ccf  gcc/testsuite/rust/execute/torture/operator_overload_1.rs
  4e5ed0e919b2c59a3b848e46a7384626  gcc/testsuite/rust/execute/torture/operator_overload_10.rs
  6a53583664982c8979b58e254484e47c  gcc/testsuite/rust/execute/torture/operator_overload_11.rs
--- 124843,124855 ----
  d5dc0260dfa3bbf3e347b8e56945fa1e  gcc/testsuite/rust/execute/torture/method2.rs
  d19bc56fc070b84e1ca39de0f28a852e  gcc/testsuite/rust/execute/torture/method3.rs
  8f2351f701c6ec39cf992f060166dfb7  gcc/testsuite/rust/execute/torture/method4.rs
! c744a77a54b5b3c0d239cd6452eab119  gcc/testsuite/rust/execute/torture/min_specialization2.rs
  e007cd93facba6b11ec1ba055a220e75  gcc/testsuite/rust/execute/torture/min_specialization3.rs
  3f13ddef20c0f036bfffdb2d02bc5334  gcc/testsuite/rust/execute/torture/mod1.rs
  d4b094ee76b23fbfd1be6f64c23f0041  gcc/testsuite/rust/execute/torture/multiline-string.rs
! e957051762f4d5dabfb1d25f0630864d  gcc/testsuite/rust/execute/torture/name_resolution.rs
  533763469b219f004d5d73c7642553c9  gcc/testsuite/rust/execute/torture/named_variadic.rs
+ b387fd12ecb9c7890bdc7ee742312285  gcc/testsuite/rust/execute/torture/offset_of1.rs
  dda9820471c4dc11cd335034d35e5ccf  gcc/testsuite/rust/execute/torture/operator_overload_1.rs
  4e5ed0e919b2c59a3b848e46a7384626  gcc/testsuite/rust/execute/torture/operator_overload_10.rs
  6a53583664982c8979b58e254484e47c  gcc/testsuite/rust/execute/torture/operator_overload_11.rs
*************** fbcd41be2b08da7908ab89e54b177cfd  gcc/te
*** 124574,124592 ****
  888c1a26ac2690b214ed602ad5f13bdb  gcc/testsuite/rust/execute/torture/operator_overload_8.rs
  590e9f21c9a0ed350404c74654ae9d37  gcc/testsuite/rust/execute/torture/operator_overload_9.rs
  b1bd8293d4d79d471bcee8c9628e98f8  gcc/testsuite/rust/execute/torture/overflow1.rs
  0263ed17cb91d2e5c2d8bcbbb76a0202  gcc/testsuite/rust/execute/torture/prefetch_data.rs
  5988fffedf274ba8d07caa5e3d9d12d4  gcc/testsuite/rust/execute/torture/ref-pattern1.rs
  dd58e1082f60a5368ebe81642f8cc0f0  gcc/testsuite/rust/execute/torture/ref-pattern2.rs
  5835ff2a0ce23dfa254a210e8c01c3f0  gcc/testsuite/rust/execute/torture/slice-magic.rs
  059de3f8e1a277e43310a9ccdc1749a9  gcc/testsuite/rust/execute/torture/slice-magic2.rs
  afc782817d48f2259095dafb108d9f80  gcc/testsuite/rust/execute/torture/slice1.rs
  7f58cd080e9071bf9aa8b7a9da902ff4  gcc/testsuite/rust/execute/torture/str-layout1.rs
  d45464967a452ff175b27ff3b0890b31  gcc/testsuite/rust/execute/torture/str-zero.rs
  219f89de9c1c232ed85025aff0b4f1dc  gcc/testsuite/rust/execute/torture/trait1.rs
! a6af7c4b862f663d2b386821ea87e7d4  gcc/testsuite/rust/execute/torture/trait10.rs
! a45a805860546c66843c31d69913a98e  gcc/testsuite/rust/execute/torture/trait11.rs
! fd99531024c486b4e7f0dde93a680052  gcc/testsuite/rust/execute/torture/trait12.rs
! 639b558f31b8be14bc6fa6d2ac156825  gcc/testsuite/rust/execute/torture/trait13.rs
  a24dd83293f855e40f210dbb907f65d0  gcc/testsuite/rust/execute/torture/trait14.rs
  c4e5fbc1550bb9894f84877fbb5a0bd8  gcc/testsuite/rust/execute/torture/trait15.rs
  621c4e646d592dde3efc00a32873545b  gcc/testsuite/rust/execute/torture/trait16.rs
--- 124863,124894 ----
  888c1a26ac2690b214ed602ad5f13bdb  gcc/testsuite/rust/execute/torture/operator_overload_8.rs
  590e9f21c9a0ed350404c74654ae9d37  gcc/testsuite/rust/execute/torture/operator_overload_9.rs
  b1bd8293d4d79d471bcee8c9628e98f8  gcc/testsuite/rust/execute/torture/overflow1.rs
+ ace2ab3c1ce74a48ed297da336519a7a  gcc/testsuite/rust/execute/torture/partial-eq-1.rs
+ 7f73ef0b8fade6a91eac04a7da93f272  gcc/testsuite/rust/execute/torture/partial-eq-2.rs
+ 9a83c866b27c0c30b61806ea63d6f55c  gcc/testsuite/rust/execute/torture/partial-eq-3.rs
+ f78278d9f8fad7c99e5ea083d544cb61  gcc/testsuite/rust/execute/torture/partial-eq-4.rs
+ aab77de5851ce017a67940fea1caa9ae  gcc/testsuite/rust/execute/torture/partial-ord-1.rs
+ b994ed9ce989e14ccadbdf906df04d7c  gcc/testsuite/rust/execute/torture/partial-ord-2.rs
+ d92f010abfc6a0a554d4ddb1822b2f3d  gcc/testsuite/rust/execute/torture/partial-ord-3.rs
+ 85224be8222346cb96ffc42a275717f7  gcc/testsuite/rust/execute/torture/partial-ord-4.rs
+ 98c769ff628fd851a4879052feed6195  gcc/testsuite/rust/execute/torture/partial-ord-5.rs
+ 6ce121e27f170ceba4a0e46f40551864  gcc/testsuite/rust/execute/torture/partial-ord-6.rs
  0263ed17cb91d2e5c2d8bcbbb76a0202  gcc/testsuite/rust/execute/torture/prefetch_data.rs
  5988fffedf274ba8d07caa5e3d9d12d4  gcc/testsuite/rust/execute/torture/ref-pattern1.rs
  dd58e1082f60a5368ebe81642f8cc0f0  gcc/testsuite/rust/execute/torture/ref-pattern2.rs
+ a6c6f34cfdbdb4f4cef812852fec8f17  gcc/testsuite/rust/execute/torture/sip-hasher.rs
  5835ff2a0ce23dfa254a210e8c01c3f0  gcc/testsuite/rust/execute/torture/slice-magic.rs
  059de3f8e1a277e43310a9ccdc1749a9  gcc/testsuite/rust/execute/torture/slice-magic2.rs
  afc782817d48f2259095dafb108d9f80  gcc/testsuite/rust/execute/torture/slice1.rs
  7f58cd080e9071bf9aa8b7a9da902ff4  gcc/testsuite/rust/execute/torture/str-layout1.rs
  d45464967a452ff175b27ff3b0890b31  gcc/testsuite/rust/execute/torture/str-zero.rs
+ f69bfb2937d07310ce98001e8938fe72  gcc/testsuite/rust/execute/torture/struct-pattern-match.rs
+ fe8d09c5e3db9666f4831da3d247b28b  gcc/testsuite/rust/execute/torture/struct_pattern1.rs
  219f89de9c1c232ed85025aff0b4f1dc  gcc/testsuite/rust/execute/torture/trait1.rs
! 7ccb805ffe7885efab539189726d54d5  gcc/testsuite/rust/execute/torture/trait10.rs
! a60a0abe5e8f50ac9c0b8b4f683c7f35  gcc/testsuite/rust/execute/torture/trait11.rs
! 312bacbb64cf19b9cd3f778ce0fd6424  gcc/testsuite/rust/execute/torture/trait12.rs
! bf777904ba4c07bc57fac1fa0f684448  gcc/testsuite/rust/execute/torture/trait13.rs
  a24dd83293f855e40f210dbb907f65d0  gcc/testsuite/rust/execute/torture/trait14.rs
  c4e5fbc1550bb9894f84877fbb5a0bd8  gcc/testsuite/rust/execute/torture/trait15.rs
  621c4e646d592dde3efc00a32873545b  gcc/testsuite/rust/execute/torture/trait16.rs
*************** d04fe352d2cbe0aafd0191cf7e5e0793  gcc/te
*** 124599,124609 ****
  863ec14b61b319481d8a4c9967cd2f9f  gcc/testsuite/rust/execute/torture/trait6.rs
  cc2cdb763843ab4c3244cd4ac3003bc6  gcc/testsuite/rust/execute/torture/trait7.rs
  ecafe513273e63e71cd928b53b02d5c9  gcc/testsuite/rust/execute/torture/trait8.rs
! c11d46231911975a133e7067ada8776b  gcc/testsuite/rust/execute/torture/trait9.rs
  7d523840107b55fa60669f67bdb6e437  gcc/testsuite/rust/execute/torture/transmute1.rs
  4c0cc5cc1c3416c7d8ae0e009be50ebe  gcc/testsuite/rust/execute/torture/wrapping_op1.rs
  0191f519c13fb014fd21afe64ac4b7c6  gcc/testsuite/rust/execute/torture/wrapping_op2.rs
  0e0f3ebabd8be7fe40d5e8bc054bf19d  gcc/testsuite/rust/execute/xfail/macro1.rs
  ffa2bd6f2a9efb48af0e98e648eef6ac  gcc/testsuite/rust/link/generic_function_0.rs
  f2a777658cea0585f5d5a1d20ec2d40e  gcc/testsuite/rust/link/generic_function_1.rs
  df61a5f5576463f4e163f1364e8c63df  gcc/testsuite/rust/link/link.exp
--- 124901,124912 ----
  863ec14b61b319481d8a4c9967cd2f9f  gcc/testsuite/rust/execute/torture/trait6.rs
  cc2cdb763843ab4c3244cd4ac3003bc6  gcc/testsuite/rust/execute/torture/trait7.rs
  ecafe513273e63e71cd928b53b02d5c9  gcc/testsuite/rust/execute/torture/trait8.rs
! 6934bf3f42c3e3d95de6d9091cf95cec  gcc/testsuite/rust/execute/torture/trait9.rs
  7d523840107b55fa60669f67bdb6e437  gcc/testsuite/rust/execute/torture/transmute1.rs
  4c0cc5cc1c3416c7d8ae0e009be50ebe  gcc/testsuite/rust/execute/torture/wrapping_op1.rs
  0191f519c13fb014fd21afe64ac4b7c6  gcc/testsuite/rust/execute/torture/wrapping_op2.rs
  0e0f3ebabd8be7fe40d5e8bc054bf19d  gcc/testsuite/rust/execute/xfail/macro1.rs
+ fabc20160a01c0fa1e0c900262de3997  gcc/testsuite/rust/execute/xfail/match-identifierpattern-enum.rs
  ffa2bd6f2a9efb48af0e98e648eef6ac  gcc/testsuite/rust/link/generic_function_0.rs
  f2a777658cea0585f5d5a1d20ec2d40e  gcc/testsuite/rust/link/generic_function_1.rs
  df61a5f5576463f4e163f1364e8c63df  gcc/testsuite/rust/link/link.exp
*************** a5f27c1dd2784330c1b584360a486c85  gcc/te
*** 124634,124647 ****
  4234e9442988f3b10195df51ecbb9f02  gcc/testsuite/sarif-replay.dg/2.1.0-valid/3.28.6-annotations-1.sarif
  e70f2852bac8d2f4f94124af298eb001  gcc/testsuite/sarif-replay.dg/2.1.0-valid/3.33.7-json-example.sarif
  f7226a417a6156e62d6cb64ecfbb3853  gcc/testsuite/sarif-replay.dg/2.1.0-valid/3.33.7-xml-example.sarif
! dddd09e297eb5d576285cc24738e03bc  gcc/testsuite/sarif-replay.dg/2.1.0-valid/embedded-links-check-html.py
  e2b63c4d2b76163b1f31857690b5e899  gcc/testsuite/sarif-replay.dg/2.1.0-valid/embedded-links-check-sarif-roundtrip.py
  d857a4331f097987a1bb7433f321c1c0  gcc/testsuite/sarif-replay.dg/2.1.0-valid/error-with-note.sarif
  eb63c8ccd144fcb7c3f54ce6920d725c  gcc/testsuite/sarif-replay.dg/2.1.0-valid/escaped-braces.sarif
! 3d28ddde7894713de062c1eb3d93e320  gcc/testsuite/sarif-replay.dg/2.1.0-valid/graphs-check-html.py
  c9a71bb22094924ec0c655c680eae543  gcc/testsuite/sarif-replay.dg/2.1.0-valid/graphs-check-sarif-roundtrip.py
  c40d79f9c6a5eb2e2d3401b73c6dee1e  gcc/testsuite/sarif-replay.dg/2.1.0-valid/graphs.sarif
  0cc960ceb5aae05d1918cf826e8a2d24  gcc/testsuite/sarif-replay.dg/2.1.0-valid/malloc-vs-local-4.c.sarif
  58ef936e0f61e7fcd03fa86d5bb33ad5  gcc/testsuite/sarif-replay.dg/2.1.0-valid/null-runs.sarif
  e1207cfbffed1df00d3b4847dcf55ac9  gcc/testsuite/sarif-replay.dg/2.1.0-valid/signal-1-check-html.py
  dc142daa06fc4684b34c027dc0d07c37  gcc/testsuite/sarif-replay.dg/2.1.0-valid/signal-1-check-sarif-roundtrip.py
--- 124937,124951 ----
  4234e9442988f3b10195df51ecbb9f02  gcc/testsuite/sarif-replay.dg/2.1.0-valid/3.28.6-annotations-1.sarif
  e70f2852bac8d2f4f94124af298eb001  gcc/testsuite/sarif-replay.dg/2.1.0-valid/3.33.7-json-example.sarif
  f7226a417a6156e62d6cb64ecfbb3853  gcc/testsuite/sarif-replay.dg/2.1.0-valid/3.33.7-xml-example.sarif
! 6a8d404c5928169266e8028c674f68ea  gcc/testsuite/sarif-replay.dg/2.1.0-valid/embedded-links-check-html.py
  e2b63c4d2b76163b1f31857690b5e899  gcc/testsuite/sarif-replay.dg/2.1.0-valid/embedded-links-check-sarif-roundtrip.py
  d857a4331f097987a1bb7433f321c1c0  gcc/testsuite/sarif-replay.dg/2.1.0-valid/error-with-note.sarif
  eb63c8ccd144fcb7c3f54ce6920d725c  gcc/testsuite/sarif-replay.dg/2.1.0-valid/escaped-braces.sarif
! 64c6115dde79342ac42e205f3f37d700  gcc/testsuite/sarif-replay.dg/2.1.0-valid/graphs-check-html.py
  c9a71bb22094924ec0c655c680eae543  gcc/testsuite/sarif-replay.dg/2.1.0-valid/graphs-check-sarif-roundtrip.py
  c40d79f9c6a5eb2e2d3401b73c6dee1e  gcc/testsuite/sarif-replay.dg/2.1.0-valid/graphs.sarif
  0cc960ceb5aae05d1918cf826e8a2d24  gcc/testsuite/sarif-replay.dg/2.1.0-valid/malloc-vs-local-4.c.sarif
+ 795f81ae7fe7ff3b7e2050ce50109741  gcc/testsuite/sarif-replay.dg/2.1.0-valid/nested-diagnostics-1.sarif
  58ef936e0f61e7fcd03fa86d5bb33ad5  gcc/testsuite/sarif-replay.dg/2.1.0-valid/null-runs.sarif
  e1207cfbffed1df00d3b4847dcf55ac9  gcc/testsuite/sarif-replay.dg/2.1.0-valid/signal-1-check-html.py
  dc142daa06fc4684b34c027dc0d07c37  gcc/testsuite/sarif-replay.dg/2.1.0-valid/signal-1-check-sarif-roundtrip.py
*************** edcd6b4cfe25a7233b7c7b59f0889ef4  gcc/te
*** 124708,124714 ****
  00cbafca76647e207526939f6ce782be  gcc/timevar.cc
  a88c03e35b27a898cfa4d6810d58410a  gcc/timevar.def
  d1eee141f10cb25a673cf78888396745  gcc/timevar.h
! 45227f72caff92050d1ba91d6a550322  gcc/toplev.cc
  1720dc69e58e480830de71ecb3eb364d  gcc/toplev.h
  cbb8fb6fcd7138a90fc489b10fe3c862  gcc/tracer.cc
  a58a166bda01c9a970218d3f6c5e330f  gcc/tracer.h
--- 125012,125018 ----
  00cbafca76647e207526939f6ce782be  gcc/timevar.cc
  a88c03e35b27a898cfa4d6810d58410a  gcc/timevar.def
  d1eee141f10cb25a673cf78888396745  gcc/timevar.h
! 80cf4135bb8174b38a51c364a9924c4b  gcc/toplev.cc
  1720dc69e58e480830de71ecb3eb364d  gcc/toplev.h
  cbb8fb6fcd7138a90fc489b10fe3c862  gcc/tracer.cc
  a58a166bda01c9a970218d3f6c5e330f  gcc/tracer.h
*************** e43a555cdaab9a97ba3910364910f865  gcc/tr
*** 124731,124737 ****
  f01aeac56dffd44808096094e2bf76c1  gcc/tree-dfa.cc
  7ccb47a2df405aa08b45cb7f5fca6385  gcc/tree-dfa.h
  ecbe7be63385b38e3cb9eca4ac949cbc  gcc/tree-diagnostic-client-data-hooks.cc
! b3f30c6854e7d3fdeb9ebe11a87888ac  gcc/tree-diagnostic.cc
  3140b41a1c9dc80dbc2b6881fa0f9e15  gcc/tree-diagnostic.h
  061a86cf1b2c01bdde3dc32a0701f5b5  gcc/tree-dump.cc
  f9731b5179d6c364587220c2aea59a3e  gcc/tree-dump.h
--- 125035,125041 ----
  f01aeac56dffd44808096094e2bf76c1  gcc/tree-dfa.cc
  7ccb47a2df405aa08b45cb7f5fca6385  gcc/tree-dfa.h
  ecbe7be63385b38e3cb9eca4ac949cbc  gcc/tree-diagnostic-client-data-hooks.cc
! 1ce118b7bd081056153ba3747e8f145d  gcc/tree-diagnostic.cc
  3140b41a1c9dc80dbc2b6881fa0f9e15  gcc/tree-diagnostic.h
  061a86cf1b2c01bdde3dc32a0701f5b5  gcc/tree-dump.cc
  f9731b5179d6c364587220c2aea59a3e  gcc/tree-dump.h
*************** ef1cb0fba517532ecda9f4e0dd5218f7  gcc/tr
*** 124751,124757 ****
  4c932cc6b576a53aa0f5dd611b468413  gcc/tree-logical-location.cc
  c28ee18072affadaa4bdca56d51c3389  gcc/tree-logical-location.h
  809e077fea6aa1e38be693ae0a16dee1  gcc/tree-loop-distribution.cc
! 62502d6fd9aa927353d7437dc2a6da17  gcc/tree-nested.cc
  b9bad013f5186a6cf78fe8adbe457945  gcc/tree-nested.h
  45fa4d8e792d6ddd01efa95b7e6dd98e  gcc/tree-nrv.cc
  1dd1d922d71834adfa7e4b7ab10e24a3  gcc/tree-object-size.cc
--- 125055,125061 ----
  4c932cc6b576a53aa0f5dd611b468413  gcc/tree-logical-location.cc
  c28ee18072affadaa4bdca56d51c3389  gcc/tree-logical-location.h
  809e077fea6aa1e38be693ae0a16dee1  gcc/tree-loop-distribution.cc
! 87cc8ab545fc5cfef7174e99c72a407a  gcc/tree-nested.cc
  b9bad013f5186a6cf78fe8adbe457945  gcc/tree-nested.h
  45fa4d8e792d6ddd01efa95b7e6dd98e  gcc/tree-nrv.cc
  1dd1d922d71834adfa7e4b7ab10e24a3  gcc/tree-object-size.cc
*************** ebea01b285bb347999736a8da2d7eb94  gcc/tr
*** 124765,124774 ****
  460fc341cb2d78f53e0a27c81de36a7d  gcc/tree-phinodes.h
  10ba4bea4c7470735678acc6088c06d5  gcc/tree-predcom.cc
  529cb4117fb3ff7fd899c570bd97e944  gcc/tree-pretty-print-markup.h
! 263c40144a5ce12ffaf254b09ed4c5b8  gcc/tree-pretty-print.cc
  fd4dd1219acc650a4f7855faa0097964  gcc/tree-pretty-print.h
  7c11aa147a6d02acce5170cb35aed445  gcc/tree-profile.cc
! 985d86fcc4c88e8e0b4532b175b34739  gcc/tree-scalar-evolution.cc
  dddd950fe463803c41bc0c7cddf0fe44  gcc/tree-scalar-evolution.h
  dc509816aacd28d6762f601c4d655972  gcc/tree-sra.cc
  c022e816e38c8f399e6a16163c56d6db  gcc/tree-sra.h
--- 125069,125078 ----
  460fc341cb2d78f53e0a27c81de36a7d  gcc/tree-phinodes.h
  10ba4bea4c7470735678acc6088c06d5  gcc/tree-predcom.cc
  529cb4117fb3ff7fd899c570bd97e944  gcc/tree-pretty-print-markup.h
! 75f7536de821e165a3a39bbd1cdfe9d8  gcc/tree-pretty-print.cc
  fd4dd1219acc650a4f7855faa0097964  gcc/tree-pretty-print.h
  7c11aa147a6d02acce5170cb35aed445  gcc/tree-profile.cc
! c54df23d9e75fb700659dcfac6bcff97  gcc/tree-scalar-evolution.cc
  dddd950fe463803c41bc0c7cddf0fe44  gcc/tree-scalar-evolution.h
  dc509816aacd28d6762f601c4d655972  gcc/tree-sra.cc
  c022e816e38c8f399e6a16163c56d6db  gcc/tree-sra.h
*************** adfc498b0c97a8123c02d418757df496  gcc/tr
*** 124788,124801 ****
  0046e212ff1b9f3f4d27d055aa299c47  gcc/tree-ssa-dom.h
  6ddd79e7a349847a539144d422bf5a49  gcc/tree-ssa-dse.cc
  a6d83be241a72da1740cf6c5b2ce7d52  gcc/tree-ssa-dse.h
! 6a5ebdd0005d4dd833c3d785309929c5  gcc/tree-ssa-forwprop.cc
  0915c4bbeb42abdda8799c2b27e5db12  gcc/tree-ssa-ifcombine.cc
  edab16a20512b0146482bb2120696d6a  gcc/tree-ssa-live.cc
  cf4bde43ab3b843eff45bac243d4116d  gcc/tree-ssa-live.h
  02e9a1bf25d500979aa57640611d72bc  gcc/tree-ssa-loop-ch.cc
  19ecf917f4744e78f79919216eef6388  gcc/tree-ssa-loop-im.cc
  21088fa37f899ccd0056bf3486157db9  gcc/tree-ssa-loop-ivcanon.cc
! 74221532a8b710d205ba0dfda1a3b2df  gcc/tree-ssa-loop-ivopts.cc
  1f70c217ef5bd5f655512b9232754870  gcc/tree-ssa-loop-ivopts.h
  71ebf1f6c8d82b1fdbca6c7aa3bd14cb  gcc/tree-ssa-loop-manip.cc
  fbcc93539b376489c1256eb8cf2d4800  gcc/tree-ssa-loop-manip.h
--- 125092,125105 ----
  0046e212ff1b9f3f4d27d055aa299c47  gcc/tree-ssa-dom.h
  6ddd79e7a349847a539144d422bf5a49  gcc/tree-ssa-dse.cc
  a6d83be241a72da1740cf6c5b2ce7d52  gcc/tree-ssa-dse.h
! 39b5d06cb84a6a3283ef2101b4818a04  gcc/tree-ssa-forwprop.cc
  0915c4bbeb42abdda8799c2b27e5db12  gcc/tree-ssa-ifcombine.cc
  edab16a20512b0146482bb2120696d6a  gcc/tree-ssa-live.cc
  cf4bde43ab3b843eff45bac243d4116d  gcc/tree-ssa-live.h
  02e9a1bf25d500979aa57640611d72bc  gcc/tree-ssa-loop-ch.cc
  19ecf917f4744e78f79919216eef6388  gcc/tree-ssa-loop-im.cc
  21088fa37f899ccd0056bf3486157db9  gcc/tree-ssa-loop-ivcanon.cc
! 9cce8a17ba6b687d346928cb6a482b63  gcc/tree-ssa-loop-ivopts.cc
  1f70c217ef5bd5f655512b9232754870  gcc/tree-ssa-loop-ivopts.h
  71ebf1f6c8d82b1fdbca6c7aa3bd14cb  gcc/tree-ssa-loop-manip.cc
  fbcc93539b376489c1256eb8cf2d4800  gcc/tree-ssa-loop-manip.h
*************** da72a60de8a6f51a635ead26120d3cc7  gcc/tr
*** 124817,124823 ****
  fc4f0e674e345822394ee5645ce22429  gcc/tree-ssa-propagate.h
  128e45b0a401ad495d13d7de1062bd6e  gcc/tree-ssa-reassoc.cc
  258492cd7ef04be49374ea1e670f3b5b  gcc/tree-ssa-reassoc.h
! 99a265c5509b4741bd8b695e15f400e5  gcc/tree-ssa-sccvn.cc
  952cb2484413ce2cf094a52b596dc078  gcc/tree-ssa-sccvn.h
  a27c58eccc3d8929767feb76dc99399f  gcc/tree-ssa-scopedtables.cc
  aa25adbcb019dd38a66ce237df54ae1d  gcc/tree-ssa-scopedtables.h
--- 125121,125127 ----
  fc4f0e674e345822394ee5645ce22429  gcc/tree-ssa-propagate.h
  128e45b0a401ad495d13d7de1062bd6e  gcc/tree-ssa-reassoc.cc
  258492cd7ef04be49374ea1e670f3b5b  gcc/tree-ssa-reassoc.h
! 7da41f2cbee0d4293c3f4b864f76d7ea  gcc/tree-ssa-sccvn.cc
  952cb2484413ce2cf094a52b596dc078  gcc/tree-ssa-sccvn.h
  a27c58eccc3d8929767feb76dc99399f  gcc/tree-ssa-scopedtables.cc
  aa25adbcb019dd38a66ce237df54ae1d  gcc/tree-ssa-scopedtables.h
*************** af4c63760c432f66b1c6c8e7e7666699  gcc/tr
*** 124846,124871 ****
  629c2d175128efb2809d4ed7e08f1a18  gcc/tree-streamer-out.cc
  22cddc57dea71a3e5c57e033b6f86476  gcc/tree-streamer.cc
  6714826bb9cd5f171a08cbabcb1da8e6  gcc/tree-streamer.h
! 9b5ea78869fae20d06e062922bd8380e  gcc/tree-switch-conversion.cc
  ebb8ac3717c1bf5db4371da2f3cf6af7  gcc/tree-switch-conversion.h
! 324fa6ae10c2436c091c4c968318d653  gcc/tree-tailcall.cc
! 94df1b2d7fd0875abd8d31a739c4a9b8  gcc/tree-vect-data-refs.cc
  5d8bb0df796ceea958fd65c5aedb5bce  gcc/tree-vect-generic.cc
! bdc1ecf003986cf1b1ae62e5031cbe0f  gcc/tree-vect-loop-manip.cc
! 82eee3ad16d0f48648c1e7b37df58f41  gcc/tree-vect-loop.cc
  ea6f2e555394e56509b4354907519988  gcc/tree-vect-patterns.cc
  c6943415b45e06de6924e0c93b06b502  gcc/tree-vect-slp-patterns.cc
! adf3308b448289fc0eff4a6e7fe7c41e  gcc/tree-vect-slp.cc
! 17485b77b02eda28dbc4be8f272bac79  gcc/tree-vect-stmts.cc
  c8efeee600d612c4bae8dda4bd45ee54  gcc/tree-vector-builder.cc
  258611ff1e83cc7680e8c9f033499665  gcc/tree-vector-builder.h
! aea72b873d207fce38a531336571cdf2  gcc/tree-vectorizer.cc
! 9aac60ab5b894faf206d3ec419c6691c  gcc/tree-vectorizer.h
  1bed475667cbd8dee00c3b7da964ca5b  gcc/tree-vrp.cc
  a19edad681d27130bd2a0d83768ac946  gcc/tree-vrp.h
! 56e573528b356925dac2888cf34cf030  gcc/tree.cc
  2b3067f4ee14760d08fdfee4eb6b8a00  gcc/tree.def
! 2dd77a778860625f3fd3b6d077a94b4a  gcc/tree.h
  b642c83968cda285afc700da2fb276d5  gcc/treestruct.def
  84205f5a5b424f30ce8c527b234e3f94  gcc/tristate.cc
  ea37ace5dddab6f4b2b9608516bebc35  gcc/tristate.h
--- 125150,125175 ----
  629c2d175128efb2809d4ed7e08f1a18  gcc/tree-streamer-out.cc
  22cddc57dea71a3e5c57e033b6f86476  gcc/tree-streamer.cc
  6714826bb9cd5f171a08cbabcb1da8e6  gcc/tree-streamer.h
! cda9b6c51259b3b8087d19187bfcdae0  gcc/tree-switch-conversion.cc
  ebb8ac3717c1bf5db4371da2f3cf6af7  gcc/tree-switch-conversion.h
! c98debbdc978c10e8934f3b4fb7e2504  gcc/tree-tailcall.cc
! 3d55660ed171cb398d0dfdab5c4eb121  gcc/tree-vect-data-refs.cc
  5d8bb0df796ceea958fd65c5aedb5bce  gcc/tree-vect-generic.cc
! 85da4c00e7d6a5189816a152d673da4f  gcc/tree-vect-loop-manip.cc
! 2994afdf1535bb5e4d4b13f54c3701b1  gcc/tree-vect-loop.cc
  ea6f2e555394e56509b4354907519988  gcc/tree-vect-patterns.cc
  c6943415b45e06de6924e0c93b06b502  gcc/tree-vect-slp-patterns.cc
! ea0feefb4a9d693600afab8b99d9cb78  gcc/tree-vect-slp.cc
! 34d1a939783f4e8c7b93bf6ff76887a9  gcc/tree-vect-stmts.cc
  c8efeee600d612c4bae8dda4bd45ee54  gcc/tree-vector-builder.cc
  258611ff1e83cc7680e8c9f033499665  gcc/tree-vector-builder.h
! 2dff33ce3586bcf6de00f8938e321e58  gcc/tree-vectorizer.cc
! e62bf8eac38400f64352b5a8a4a2d06c  gcc/tree-vectorizer.h
  1bed475667cbd8dee00c3b7da964ca5b  gcc/tree-vrp.cc
  a19edad681d27130bd2a0d83768ac946  gcc/tree-vrp.h
! a43a8504b18bc25787957a8624990218  gcc/tree.cc
  2b3067f4ee14760d08fdfee4eb6b8a00  gcc/tree.def
! 7327dce30bcd28dca57d4353152de806  gcc/tree.h
  b642c83968cda285afc700da2fb276d5  gcc/treestruct.def
  84205f5a5b424f30ce8c527b234e3f94  gcc/tristate.cc
  ea37ace5dddab6f4b2b9608516bebc35  gcc/tristate.h
*************** df85736a75a28f2d961a417c6edbbeeb  gcc/va
*** 124895,124901 ****
  4fcfb97f5fdee9686317186a141f2b4b  gcc/value-relation.cc
  cd4e6196ea1c7eb134b4d7cbadb9dcb3  gcc/value-relation.h
  db99ee82ab71b58820d60f9863e62aac  gcc/var-tracking.cc
! 3f25225aa8ac37eb3f1a2fe3baa7b7b4  gcc/varasm.cc
  69f8e035a8548037bc8c8f7f854253c4  gcc/varasm.h
  e96ee31ef62fd5574909f9328fb29af9  gcc/varpool.cc
  5958f38d462c8e23023f7b272b8b969c  gcc/vec-perm-indices.cc
--- 125199,125205 ----
  4fcfb97f5fdee9686317186a141f2b4b  gcc/value-relation.cc
  cd4e6196ea1c7eb134b4d7cbadb9dcb3  gcc/value-relation.h
  db99ee82ab71b58820d60f9863e62aac  gcc/var-tracking.cc
! 63e6a64533514c36d9e6e1bd510a2c21  gcc/varasm.cc
  69f8e035a8548037bc8c8f7f854253c4  gcc/varasm.h
  e96ee31ef62fd5574909f9328fb29af9  gcc/varpool.cc
  5958f38d462c8e23023f7b272b8b969c  gcc/vec-perm-indices.cc
*************** cffdeae41b78da05839b193e90188f55  libcod
*** 125197,125218 ****
  6419dfc879387358e95288142e569914  libcody/packet.cc
  688ece05c8b9d378b3df186808162e76  libcody/resolver.cc
  b1f3850fc5ac62999d1e124aa6f76531  libcody/server.cc
! b533bb6b2ea9548a1735895d1dc7d702  libcpp/ChangeLog
  2bd831b17997584e38305782cebe6948  libcpp/ChangeLog.jit
  e80a909ca87015a009bee9588bb84a64  libcpp/Makefile.in
  b07c7863f0e7ad4e6a0915d66fc9e582  libcpp/aclocal.m4
  8f57460d8c70595e235ec3ec53127378  libcpp/charset.cc
  5b2f9d37e91d01eed5bf420a47dc8046  libcpp/combining-chars.inc
  4c25fc38f2b9d20ca1fbefba9ad34b45  libcpp/config.in
! 25fc63b1c46544e2d10d49555b022624  libcpp/configure
  6352fad15318314000f7748c445b7e8f  libcpp/configure.ac
! ea784e8b4e934b5966c1fa9ff3767729  libcpp/directives.cc
  fe94628a876ca876eb1ac6dc396c0068  libcpp/errors.cc
  a80d04c82bb4afb7bdb159103298ecd0  libcpp/expr.cc
  ce74c78c2cb27bcdeac8a9b0400712cd  libcpp/files.cc
  97faf9e969cb255f2a2a91e0e7ac3c32  libcpp/generated_cpp_wcwidth.h
  c496c50691c37464e0aacc985cc3ab1e  libcpp/identifiers.cc
! 2e36892d11f14ea2fa11aa1028995411  libcpp/include/cpplib.h
  ac88522f7fec46badcd2623d11a4b61e  libcpp/include/label-text.h
  7bab1640ddcf15772a1a51f0315a3099  libcpp/include/line-map.h
  4779aaa10e24fd2398a105e78bdd88a5  libcpp/include/mkdeps.h
--- 125501,125522 ----
  6419dfc879387358e95288142e569914  libcody/packet.cc
  688ece05c8b9d378b3df186808162e76  libcody/resolver.cc
  b1f3850fc5ac62999d1e124aa6f76531  libcody/server.cc
! 119030ff87b9801648830adb0b270487  libcpp/ChangeLog
  2bd831b17997584e38305782cebe6948  libcpp/ChangeLog.jit
  e80a909ca87015a009bee9588bb84a64  libcpp/Makefile.in
  b07c7863f0e7ad4e6a0915d66fc9e582  libcpp/aclocal.m4
  8f57460d8c70595e235ec3ec53127378  libcpp/charset.cc
  5b2f9d37e91d01eed5bf420a47dc8046  libcpp/combining-chars.inc
  4c25fc38f2b9d20ca1fbefba9ad34b45  libcpp/config.in
! 1f35bde4e477ffcd3dbcc37983f37384  libcpp/configure
  6352fad15318314000f7748c445b7e8f  libcpp/configure.ac
! 3e319880a38d6686ad771d50c14b592f  libcpp/directives.cc
  fe94628a876ca876eb1ac6dc396c0068  libcpp/errors.cc
  a80d04c82bb4afb7bdb159103298ecd0  libcpp/expr.cc
  ce74c78c2cb27bcdeac8a9b0400712cd  libcpp/files.cc
  97faf9e969cb255f2a2a91e0e7ac3c32  libcpp/generated_cpp_wcwidth.h
  c496c50691c37464e0aacc985cc3ab1e  libcpp/identifiers.cc
! 90060498232387b3c6426703646a9fc0  libcpp/include/cpplib.h
  ac88522f7fec46badcd2623d11a4b61e  libcpp/include/label-text.h
  7bab1640ddcf15772a1a51f0315a3099  libcpp/include/line-map.h
  4779aaa10e24fd2398a105e78bdd88a5  libcpp/include/mkdeps.h
*************** d516a30568fd33a5e69be4374f27812f  libcpp
*** 125223,125229 ****
  ec163df1522f3c30aeaeffb9937faa9d  libcpp/lex.cc
  4db7eb22b48b044d4c574217d110732b  libcpp/line-map.cc
  46a07100f95f5e354c7e25cd19d26884  libcpp/location-example.txt
! 9ca45c4c9e1829d625f4cc03b82debd1  libcpp/macro.cc
  b4c085899eca6fc0e5ddc81d15fc2e67  libcpp/makeucnid.cc
  f6299826ad91c3ae3e8be64e87bb7d20  libcpp/makeuname2c.cc
  15ffbe55bf3e5cc75e66cfb1125773a8  libcpp/mkdeps.cc
--- 125527,125533 ----
  ec163df1522f3c30aeaeffb9937faa9d  libcpp/lex.cc
  4db7eb22b48b044d4c574217d110732b  libcpp/line-map.cc
  46a07100f95f5e354c7e25cd19d26884  libcpp/location-example.txt
! 6682759d73a1fce47c09938c58d1133e  libcpp/macro.cc
  b4c085899eca6fc0e5ddc81d15fc2e67  libcpp/makeucnid.cc
  f6299826ad91c3ae3e8be64e87bb7d20  libcpp/makeuname2c.cc
  15ffbe55bf3e5cc75e66cfb1125773a8  libcpp/mkdeps.cc
*************** a3eb5dee2788fe0a6c42502ba658eddd  libffi
*** 125721,125729 ****
  0f3c94e520870e194cf525de7ec404dc  libffi/testsuite/libffi.go/ffitest.h
  6cfb66c1c00023abb2c2276d85f16e77  libffi/testsuite/libffi.go/go.exp
  189dc193fd0e627a2d55b2e84871edc5  libffi/testsuite/libffi.go/static-chain.h
! cec8bbddc33d1b3bd55d7b55ccd3422d  libgcc/ChangeLog
! af65b9adf392a893ec06c38e7b8e9866  libgcc/Makefile.in
! 66cc3d23127b54e932766f13d603ec3d  libgcc/config.host
  46412830a2ee8a02503ccc921912c3cf  libgcc/config.in
  9e6d8ec4ff0470579444dbe0a1287f05  libgcc/config/aarch64/__aarch64_have_sme.c
  97101a2593de8c7ed58292fa105ea72f  libgcc/config/aarch64/__arm_sme_state.S
--- 126025,126033 ----
  0f3c94e520870e194cf525de7ec404dc  libffi/testsuite/libffi.go/ffitest.h
  6cfb66c1c00023abb2c2276d85f16e77  libffi/testsuite/libffi.go/go.exp
  189dc193fd0e627a2d55b2e84871edc5  libffi/testsuite/libffi.go/static-chain.h
! a1ccaf2e7a64afdcafced51eb097432c  libgcc/ChangeLog
! e63b544f83f9b69bd08ddb095b34235a  libgcc/Makefile.in
! cb4137c7a2cca9276fb2b16adf5515c9  libgcc/config.host
  46412830a2ee8a02503ccc921912c3cf  libgcc/config.in
  9e6d8ec4ff0470579444dbe0a1287f05  libgcc/config/aarch64/__aarch64_have_sme.c
  97101a2593de8c7ed58292fa105ea72f  libgcc/config/aarch64/__arm_sme_state.S
*************** b2e6d3e9e2af6d58aa7d4238e49990fa  libgcc
*** 125748,125754 ****
  13e78e11bd6d056fd80598bac695009c  libgcc/config/aarch64/sfp-exceptions.c
  cc33fb6e397b63312a061b58f7bfa444  libgcc/config/aarch64/sfp-machine.h
  f56ac8f274604cf79ef262d4057d5987  libgcc/config/aarch64/sync-cache.c
! be71a3964258dd4b0434ff3c68b4be1d  libgcc/config/aarch64/t-aarch64
  5711e1b4b7c7ceabdfb54e3632fcd89c  libgcc/config/aarch64/t-heap-trampoline
  f5b7f4fb8a38b4ab16da22e90fdb1343  libgcc/config/aarch64/t-lse
  c6e6cbb6c43ce130d0d7f7f64a205fd8  libgcc/config/aarch64/t-mingw
--- 126052,126058 ----
  13e78e11bd6d056fd80598bac695009c  libgcc/config/aarch64/sfp-exceptions.c
  cc33fb6e397b63312a061b58f7bfa444  libgcc/config/aarch64/sfp-machine.h
  f56ac8f274604cf79ef262d4057d5987  libgcc/config/aarch64/sync-cache.c
! 7e2cd63ccfd0af5494f9cbf73eba8058  libgcc/config/aarch64/t-aarch64
  5711e1b4b7c7ceabdfb54e3632fcd89c  libgcc/config/aarch64/t-heap-trampoline
  f5b7f4fb8a38b4ab16da22e90fdb1343  libgcc/config/aarch64/t-lse
  c6e6cbb6c43ce130d0d7f7f64a205fd8  libgcc/config/aarch64/t-mingw
*************** aae394eec29b8ce87e46d9fea11f2769  libgcc
*** 126902,126912 ****
  35ffd385fc68cbed68e47cec4e59c46b  libgcc/config/s390/32/_fixunstfdi.c
  6101649604e2b3fdd6179e1aa53066bf  libgcc/config/s390/32/t-floattodi
  5ede8bfdefd00d2faf52a8c960a79d50  libgcc/config/s390/gthr-tpf.h
! d37b59e577d6bdd253ed91f84a950fa9  libgcc/config/s390/libgcc-glibc.ver
  74c3a7231641ee7bb8f045e5b51979b2  libgcc/config/s390/linux-unwind.h
  892aedb296eed00bf7516bdba3790fae  libgcc/config/s390/morestack.S
  c150e28c734710584eba8e77d2ff5105  libgcc/config/s390/t-crtstuff
  35a77f8c50ecf16802e00e647ad94026  libgcc/config/s390/t-linux
  26d353eea9229af01124cc46b2e0cebd  libgcc/config/s390/t-stack-s390
  a5218871642ae69c55b0e826c41f3798  libgcc/config/s390/t-tpf
  c06c11db33a4129e60e075061e8c9326  libgcc/config/s390/tpf-unwind.h
--- 127206,127219 ----
  35ffd385fc68cbed68e47cec4e59c46b  libgcc/config/s390/32/_fixunstfdi.c
  6101649604e2b3fdd6179e1aa53066bf  libgcc/config/s390/32/t-floattodi
  5ede8bfdefd00d2faf52a8c960a79d50  libgcc/config/s390/gthr-tpf.h
! 0136ab84ab5c8b1f693a41bb2bacfc6c  libgcc/config/s390/libgcc-glibc.ver
  74c3a7231641ee7bb8f045e5b51979b2  libgcc/config/s390/linux-unwind.h
  892aedb296eed00bf7516bdba3790fae  libgcc/config/s390/morestack.S
+ 3278717ab9e8d68c4c4d8484265d7963  libgcc/config/s390/sfp-exceptions.c
+ da40d620e884fdd43eb5ecf301bcf034  libgcc/config/s390/sfp-machine.h
  c150e28c734710584eba8e77d2ff5105  libgcc/config/s390/t-crtstuff
  35a77f8c50ecf16802e00e647ad94026  libgcc/config/s390/t-linux
+ 97387de8a73c5cdb34bb694660b7fb9e  libgcc/config/s390/t-softfp
  26d353eea9229af01124cc46b2e0cebd  libgcc/config/s390/t-stack-s390
  a5218871642ae69c55b0e826c41f3798  libgcc/config/s390/t-tpf
  c06c11db33a4129e60e075061e8c9326  libgcc/config/s390/tpf-unwind.h
*************** ce614fa17d52c2d7121d7e2d6f80b02d  libgcc
*** 127052,127066 ****
  dca6d35465143e4a68b87cc9c4e803ee  libgcc/config/xtensa/unwind-dw2-xtensa.c
  b99cc01380166f4692e0732bbc912212  libgcc/config/xtensa/unwind-dw2-xtensa.h
  19ec14444518e397fc90d9fdb8667783  libgcc/config/xtensa/xtensa-config-builtin.h
! 5af73994c8475b4dc0103863bf096541  libgcc/configure
! 5f9f0e725d87d433ed6e08aad0d7bfb8  libgcc/configure.ac
  67c2374dbad34029ec8371ef10329bcd  libgcc/crtstuff.c
  ab5a8eda1cc5a04c100d837a67f3c0c3  libgcc/dfp-bit.c
  20a8155e167830f65cf1b081393e5207  libgcc/dfp-bit.h
  e0c38f07703dc61bfebd2a2c6a78b202  libgcc/divmod.c
  aad3268e63f00c54ab3e8d27ec6e4722  libgcc/emutls.c
  aa52a8f7cb881c00c125ed5fd04ed4df  libgcc/enable-execute-stack-empty.c
! 820142918672e2d0cf97f95269f4b8d7  libgcc/enable-execute-stack-mprotect.c
  03a9946dfd8d23580378d51e3a9c8d9e  libgcc/find-symver.awk
  af848e3012c66af753c4dc8c779b360c  libgcc/fixed-bit.c
  d6af87c5413eead4bfffd8250d932a7e  libgcc/fixed-bit.h
--- 127359,127373 ----
  dca6d35465143e4a68b87cc9c4e803ee  libgcc/config/xtensa/unwind-dw2-xtensa.c
  b99cc01380166f4692e0732bbc912212  libgcc/config/xtensa/unwind-dw2-xtensa.h
  19ec14444518e397fc90d9fdb8667783  libgcc/config/xtensa/xtensa-config-builtin.h
! d1d7e66dc7e2d23b6835f3ce6a88a5da  libgcc/configure
! b0189d76af1ccb1db32084120fda87f6  libgcc/configure.ac
  67c2374dbad34029ec8371ef10329bcd  libgcc/crtstuff.c
  ab5a8eda1cc5a04c100d837a67f3c0c3  libgcc/dfp-bit.c
  20a8155e167830f65cf1b081393e5207  libgcc/dfp-bit.h
  e0c38f07703dc61bfebd2a2c6a78b202  libgcc/divmod.c
  aad3268e63f00c54ab3e8d27ec6e4722  libgcc/emutls.c
  aa52a8f7cb881c00c125ed5fd04ed4df  libgcc/enable-execute-stack-empty.c
! 373e892404bf5461836944ee06780a12  libgcc/enable-execute-stack-mprotect.c
  03a9946dfd8d23580378d51e3a9c8d9e  libgcc/find-symver.awk
  af848e3012c66af753c4dc8c779b360c  libgcc/fixed-bit.c
  d6af87c5413eead4bfffd8250d932a7e  libgcc/fixed-bit.h
*************** f017ba40c4699f1549cd341ad688007f  libgcc
*** 127279,127288 ****
  804399bda5c6c23cd3e0cd78c21bc2fd  libgcc/vtv_end_preinit.c
  407de23229097d9b9a4d00e2e9c60c70  libgcc/vtv_start.c
  ba13e8c1385837f9a736ead153be6251  libgcc/vtv_start_preinit.c
! b6cbc59babac0e749a570426d700fed0  libgcobol/ChangeLog
  b227feb8ac8df349788743a8ade3e840  libgcobol/LICENSE
! 573e7a1dee0641f56d9b797b23dff44b  libgcobol/Makefile.am
! 23cf4646d213d05645a0bf48209b374d  libgcobol/Makefile.in
  ff016a65ce3c24bdd22207044f2a126e  libgcobol/README
  8c9140838556aedbca129aeaedf0855b  libgcobol/acinclude.m4
  0bf6afe766a6886d2ac1f175300477f2  libgcobol/aclocal.m4
--- 127586,127595 ----
  804399bda5c6c23cd3e0cd78c21bc2fd  libgcc/vtv_end_preinit.c
  407de23229097d9b9a4d00e2e9c60c70  libgcc/vtv_start.c
  ba13e8c1385837f9a736ead153be6251  libgcc/vtv_start_preinit.c
! 4433e11d33ccab42f619bbe315803868  libgcobol/ChangeLog
  b227feb8ac8df349788743a8ade3e840  libgcobol/LICENSE
! e5a4ad84e4fa547c96f01437e14de6aa  libgcobol/Makefile.am
! db13e8bd0049adad97c22f1066ab8e2c  libgcobol/Makefile.in
  ff016a65ce3c24bdd22207044f2a126e  libgcobol/README
  8c9140838556aedbca129aeaedf0855b  libgcobol/acinclude.m4
  0bf6afe766a6886d2ac1f175300477f2  libgcobol/aclocal.m4
*************** ff016a65ce3c24bdd22207044f2a126e  libgco
*** 127290,127296 ****
  08bac5426c592bca32b87e76cd4a87a1  libgcobol/charmaps.h
  22bb2a7ba78f63e95702f5b92a8f8856  libgcobol/common-defs.h
  6a3b66323eab3b40a9c109aafd9f27c6  libgcobol/config.h.in
! 7c39e3ffa421728393475f0c1e747e59  libgcobol/configure
  faf06b9fb823d12e0ec967db524ba97e  libgcobol/configure.ac
  5aec96a7dfdb0d6e7b10cc13d65c53a3  libgcobol/configure.tgt
  dc7dba3ea14b23da0b28124acfa2ca32  libgcobol/constants.cc
--- 127597,127603 ----
  08bac5426c592bca32b87e76cd4a87a1  libgcobol/charmaps.h
  22bb2a7ba78f63e95702f5b92a8f8856  libgcobol/common-defs.h
  6a3b66323eab3b40a9c109aafd9f27c6  libgcobol/config.h.in
! 5d258f446afad49c8f86f2fe4ca9a700  libgcobol/configure
  faf06b9fb823d12e0ec967db524ba97e  libgcobol/configure.ac
  5aec96a7dfdb0d6e7b10cc13d65c53a3  libgcobol/configure.tgt
  dc7dba3ea14b23da0b28124acfa2ca32  libgcobol/constants.cc
*************** ef8b11373d27f5ca4df73f09c6ccab75  libgco
*** 127305,127316 ****
  0cf9ce2863c11a8fd875185c371fe6e6  libgcobol/io.cc
  b054056cc4fe4de7a78d34e43f2f3bab  libgcobol/io.h
  6fa2e26d11c71898dae520939b992484  libgcobol/libgcobol-fp.h
! 8a2f491e4c4bea77a47fd9697ba6639f  libgcobol/libgcobol.cc
  9d6654e5bf93e5b028f7a514320a7ede  libgcobol/libgcobol.h
  469e0f6e21e357ff8b53b9d17373a6c8  libgcobol/libgcobol.spec.in
  7921a81e3cbf784d960d70db7bc6e242  libgcobol/valconv.cc
  c7d27fb7e36a42567d7cc4d14e7ed3fe  libgcobol/valconv.h
! 33d35605cd9518e65bb8e54b3b230fbb  libgfortran/ChangeLog
  d99469a76bfe825683f8d94fe07b508c  libgfortran/ChangeLog-2002
  522fdb2df6cefe6bcaed3c7c7311eae1  libgfortran/ChangeLog-2003
  5a3a93e76d878d063aba66079340cfe0  libgfortran/ChangeLog-2004
--- 127612,127625 ----
  0cf9ce2863c11a8fd875185c371fe6e6  libgcobol/io.cc
  b054056cc4fe4de7a78d34e43f2f3bab  libgcobol/io.h
  6fa2e26d11c71898dae520939b992484  libgcobol/libgcobol-fp.h
! 51fb121c00d18ba7255136f189575c35  libgcobol/libgcobol.cc
  9d6654e5bf93e5b028f7a514320a7ede  libgcobol/libgcobol.h
  469e0f6e21e357ff8b53b9d17373a6c8  libgcobol/libgcobol.spec.in
+ 894ab7b0f691562b43f10f33736ddde4  libgcobol/stringbin.cc
+ acae26d18faea51aafd6c72f656dd53e  libgcobol/stringbin.h
  7921a81e3cbf784d960d70db7bc6e242  libgcobol/valconv.cc
  c7d27fb7e36a42567d7cc4d14e7ed3fe  libgcobol/valconv.h
! b7fa2973ed09a213512f68adc9ebf5e4  libgfortran/ChangeLog
  d99469a76bfe825683f8d94fe07b508c  libgfortran/ChangeLog-2002
  522fdb2df6cefe6bcaed3c7c7311eae1  libgfortran/ChangeLog-2003
  5a3a93e76d878d063aba66079340cfe0  libgfortran/ChangeLog-2004
*************** c7169b01bb969daf7e30948005f39988  libgfo
*** 128228,128234 ****
  2c879686a9c5431b13c4d3a9323e5fed  libgfortran/io/inquire.c
  9a1581b774b6fa5ddc5861750824984f  libgfortran/io/intrinsics.c
  68b0f7c5c62320c0b053455824877d6e  libgfortran/io/io.h
! 1c54bed7757f4af9f4ad352a00614fd9  libgfortran/io/list_read.c
  bc0fa60eac17837b1c762e97a8c08673  libgfortran/io/lock.c
  d043bdbc42f0d079e46ba78d36d7d784  libgfortran/io/open.c
  d48a4345efa3ebd21fbcc13f864cb82c  libgfortran/io/read.c
--- 128537,128543 ----
  2c879686a9c5431b13c4d3a9323e5fed  libgfortran/io/inquire.c
  9a1581b774b6fa5ddc5861750824984f  libgfortran/io/intrinsics.c
  68b0f7c5c62320c0b053455824877d6e  libgfortran/io/io.h
! b95dff39f8b38e33ccf895ccf509a3a6  libgfortran/io/list_read.c
  bc0fa60eac17837b1c762e97a8c08673  libgfortran/io/lock.c
  d043bdbc42f0d079e46ba78d36d7d784  libgfortran/io/open.c
  d48a4345efa3ebd21fbcc13f864cb82c  libgfortran/io/read.c
*************** a3a7e9ca6057da9ca42e03e41e1c73f7  libgo/
*** 133873,133879 ****
  dcdf1b680b15b372bdb64cc5107d51b6  libgo/testsuite/libgo-test-support.exp.in
  bf162aa572f7b96b25dbd2b027845d32  libgo/testsuite/libgo.testmain/testmain.exp
  cc9d2a0e34e31ba866a8caf9f46f48f3  libgomp/.gitattributes
! fdbe903a8bed012c8c444334f8309f1b  libgomp/ChangeLog
  0d55aa862aee66efdc5f8d62c94ff8fb  libgomp/ChangeLog.graphite
  883cfea6de23904b83d6bd58a729c866  libgomp/Makefile.am
  54c7bc8277669e3bf5f1a3db179ae206  libgomp/Makefile.in
--- 134182,134188 ----
  dcdf1b680b15b372bdb64cc5107d51b6  libgo/testsuite/libgo-test-support.exp.in
  bf162aa572f7b96b25dbd2b027845d32  libgo/testsuite/libgo.testmain/testmain.exp
  cc9d2a0e34e31ba866a8caf9f46f48f3  libgomp/.gitattributes
! 53043f6b62a922117b036ac537cc097e  libgomp/ChangeLog
  0d55aa862aee66efdc5f8d62c94ff8fb  libgomp/ChangeLog.graphite
  883cfea6de23904b83d6bd58a729c866  libgomp/Makefile.am
  54c7bc8277669e3bf5f1a3db179ae206  libgomp/Makefile.in
*************** f1eee47026bb1c516cd1b3a9b9c1c5fa  libgom
*** 134056,134062 ****
  6562eda8ef1a1fd0a2a0a9e5621f684b  libgomp/splay-tree.h
  1775f6ebbed5a9aef1882e66136d9e2b  libgomp/target-cxa-dso-dtor.c
  a8a23ca7c25ca51062b636b0c099096a  libgomp/target-indirect.c
! 1e9a27934c58150f118aea09efb258d4  libgomp/target.c
  8f03749b5187ce4fb4dce3f7d5b2d9f7  libgomp/task.c
  865cdfdff84a15247efff279e8aca77f  libgomp/taskloop.c
  f540431686cf02c11ae33b1cd66e01ca  libgomp/team.c
--- 134365,134371 ----
  6562eda8ef1a1fd0a2a0a9e5621f684b  libgomp/splay-tree.h
  1775f6ebbed5a9aef1882e66136d9e2b  libgomp/target-cxa-dso-dtor.c
  a8a23ca7c25ca51062b636b0c099096a  libgomp/target-indirect.c
! 7e62e13c6b8754a60716c147f91f8b24  libgomp/target.c
  8f03749b5187ce4fb4dce3f7d5b2d9f7  libgomp/task.c
  865cdfdff84a15247efff279e8aca77f  libgomp/taskloop.c
  f540431686cf02c11ae33b1cd66e01ca  libgomp/team.c
*************** e4ae276ba05cf2521872c73349458117  libgom
*** 134763,134768 ****
--- 135072,135080 ----
  d04c3cda0f5d9481f26ad3a000f4b3d3  libgomp/testsuite/libgomp.c-c++-common/target-link-2.c
  9ff30abde078f26fb73508314a1a4c1e  libgomp/testsuite/libgomp.c-c++-common/target-link-3.c
  f050a6f90c7d48e4c829975976ab7e71  libgomp/testsuite/libgomp.c-c++-common/target-link-4.c
+ fc544eb50238edd10811c83c41f204ea  libgomp/testsuite/libgomp.c-c++-common/target-map-iterators-1.c
+ 28505bf24857445ac4c001a62050aad2  libgomp/testsuite/libgomp.c-c++-common/target-map-iterators-2.c
+ 5015bcaa498fcad3360eebacb71885dd  libgomp/testsuite/libgomp.c-c++-common/target-map-iterators-3.c
  4f49f4526eb91412060d42cdf5c84f65  libgomp/testsuite/libgomp.c-c++-common/target-map-zlas-1.c
  d989443106e2a262436792d18fb2f23b  libgomp/testsuite/libgomp.c-c++-common/target-memcpy-async-1.c
  3737e3b4823c33573762510eb88c0f0f  libgomp/testsuite/libgomp.c-c++-common/target-memcpy-async-2.c
*************** d4069bee4bb64a7b1bc7c9545219e88c  libgom
*** 134774,134779 ****
--- 135086,135094 ----
  400c5830e8dd2f17214d8d23477755de  libgomp/testsuite/libgomp.c-c++-common/target-same-name-1-a.c
  469b004815365e46140bcd8b826170ce  libgomp/testsuite/libgomp.c-c++-common/target-same-name-1-b.c
  b85430592a96b021a6f4ab81d5c35eb9  libgomp/testsuite/libgomp.c-c++-common/target-same-name-1.c
+ 63ffab94d551fbf9388ecee9e9a0c87e  libgomp/testsuite/libgomp.c-c++-common/target-update-iterators-1.c
+ 842ed9cb6491c8226fde6d76bc7724f4  libgomp/testsuite/libgomp.c-c++-common/target-update-iterators-2.c
+ b37235de89591e276171bfe08a6e961c  libgomp/testsuite/libgomp.c-c++-common/target-update-iterators-3.c
  5232d615b2109b50002b7e6eb8301a84  libgomp/testsuite/libgomp.c-c++-common/task-detach-1.c
  7f2f3a630783e68a54ffcd18a73085b2  libgomp/testsuite/libgomp.c-c++-common/task-detach-10.c
  bf2a6ba66b2350c597a56727abd53608  libgomp/testsuite/libgomp.c-c++-common/task-detach-11.c
*************** e8a3245c095430c8ef2413afe2ee4c48  libgom
*** 136622,136628 ****
  1d2e2e1ab9f0d92351625f2c5661dbb8  libgomp/testsuite/libgomp.oacc-fortran/update-dt-array.f90
  989e6535f20045be32e9e91643a0b08f  libgomp/testsuite/libgomp.oacc-fortran/vector-routine.f90
  9b8b2dd0e3a57784ab6771591edb6c3b  libgomp/work.c
! 6931aaf2de5e1ef81b73195e17a5ab55  libgrust/ChangeLog
  e61ce18b1a86e6764b3436d0638ec4d2  libgrust/Makefile.am
  d670b72d54b9c3daeabf87ef1a8f629b  libgrust/Makefile.in
  ec9513341b9bd1ba3b60bf6fec70f852  libgrust/aclocal.m4
--- 136937,136943 ----
  1d2e2e1ab9f0d92351625f2c5661dbb8  libgomp/testsuite/libgomp.oacc-fortran/update-dt-array.f90
  989e6535f20045be32e9e91643a0b08f  libgomp/testsuite/libgomp.oacc-fortran/vector-routine.f90
  9b8b2dd0e3a57784ab6771591edb6c3b  libgomp/work.c
! 35987bd001c4f39ec26050c7fc532ffa  libgrust/ChangeLog
  e61ce18b1a86e6764b3436d0638ec4d2  libgrust/Makefile.am
  d670b72d54b9c3daeabf87ef1a8f629b  libgrust/Makefile.in
  ec9513341b9bd1ba3b60bf6fec70f852  libgrust/aclocal.m4
*************** e8e9e09fb8c492e89bece7a03c1cc174  libgru
*** 136912,136938 ****
  a26f7470639f9b790e0a7d65e9b034e9  libgrust/libproc_macro_internal/Makefile.in
  dcc40e0fb277ebcfd4af1ac479ac47a6  libgrust/libproc_macro_internal/bridge.h
  483dca7c6b78d72286cc5c9a2f5d2332  libgrust/libproc_macro_internal/ffistring.cc
! 8f8b5fda55344b7121f30a1445b6bc6c  libgrust/libproc_macro_internal/ffistring.h
  49b1c84743174f8a3911a06c6371acf3  libgrust/libproc_macro_internal/group.cc
  5d63f55f3bf328bdcce4b751680847e3  libgrust/libproc_macro_internal/group.h
  b64681404eb9bc3236d293169257151d  libgrust/libproc_macro_internal/ident.cc
! d4103534c444d749d1ecd3d406d7e5f7  libgrust/libproc_macro_internal/ident.h
  13b0179dcfd218c8424a0fb3ace021a6  libgrust/libproc_macro_internal/literal.cc
! 0a76b8d74c36e6a55acd51fd2d46809d  libgrust/libproc_macro_internal/literal.h
  31ae71099334eebf7e75327cf83a97d9  libgrust/libproc_macro_internal/proc_macro.cc
! 0a59a7bf6d1e481a1173737382d47345  libgrust/libproc_macro_internal/proc_macro.h
  9d23b821e4ab7bb8a0b208f833b0fa5d  libgrust/libproc_macro_internal/punct.cc
  e0bc0d8477e0603a2c80a967992194c2  libgrust/libproc_macro_internal/punct.h
  c49b63cdc24879aa018ce1b5c7c61a0f  libgrust/libproc_macro_internal/registration.h
  3e88f86781bd732ef63b970894b9d229  libgrust/libproc_macro_internal/span.cc
  c446d3459d2c18f8c3b7e9523a64042e  libgrust/libproc_macro_internal/span.h
  7caf107c8a275a1043e15fc1f8b3b444  libgrust/libproc_macro_internal/tokenstream.cc
! d310c3612a920f243d62620f007dec94  libgrust/libproc_macro_internal/tokenstream.h
  7c20b6718d183fdde5dfb2d8af4aec23  libgrust/libproc_macro_internal/tokentree.cc
  4d27195db5805ea05b982a2971711c94  libgrust/libproc_macro_internal/tokentree.h
  99c2e5e712b990ee07be10f53e41f3fb  libiberty/.gitignore
  a916467b91076e631dd8edb7424769c7  libiberty/COPYING.LIB
! 4a2f54fcc0299d6e0f104f4b4842e8de  libiberty/ChangeLog
  347c31392973de6a4872d540c1718dc1  libiberty/ChangeLog.jit
  65c8c72721eb29b2e2b42968dc6aaee6  libiberty/Makefile.in
  8b93d0e0369daed24e2260ccfd102eb3  libiberty/README
--- 137227,137253 ----
  a26f7470639f9b790e0a7d65e9b034e9  libgrust/libproc_macro_internal/Makefile.in
  dcc40e0fb277ebcfd4af1ac479ac47a6  libgrust/libproc_macro_internal/bridge.h
  483dca7c6b78d72286cc5c9a2f5d2332  libgrust/libproc_macro_internal/ffistring.cc
! c2b8c2ce134c8e5f5009aa19237ed37d  libgrust/libproc_macro_internal/ffistring.h
  49b1c84743174f8a3911a06c6371acf3  libgrust/libproc_macro_internal/group.cc
  5d63f55f3bf328bdcce4b751680847e3  libgrust/libproc_macro_internal/group.h
  b64681404eb9bc3236d293169257151d  libgrust/libproc_macro_internal/ident.cc
! fe4775c5d3f54e1d2ca9703b98a40872  libgrust/libproc_macro_internal/ident.h
  13b0179dcfd218c8424a0fb3ace021a6  libgrust/libproc_macro_internal/literal.cc
! a27c776732588fab66732bbd5cb532a6  libgrust/libproc_macro_internal/literal.h
  31ae71099334eebf7e75327cf83a97d9  libgrust/libproc_macro_internal/proc_macro.cc
! fcef140697f36fa7d06d5a4d85fc6d65  libgrust/libproc_macro_internal/proc_macro.h
  9d23b821e4ab7bb8a0b208f833b0fa5d  libgrust/libproc_macro_internal/punct.cc
  e0bc0d8477e0603a2c80a967992194c2  libgrust/libproc_macro_internal/punct.h
  c49b63cdc24879aa018ce1b5c7c61a0f  libgrust/libproc_macro_internal/registration.h
  3e88f86781bd732ef63b970894b9d229  libgrust/libproc_macro_internal/span.cc
  c446d3459d2c18f8c3b7e9523a64042e  libgrust/libproc_macro_internal/span.h
  7caf107c8a275a1043e15fc1f8b3b444  libgrust/libproc_macro_internal/tokenstream.cc
! c3634c948119513d0f58255c48992ca2  libgrust/libproc_macro_internal/tokenstream.h
  7c20b6718d183fdde5dfb2d8af4aec23  libgrust/libproc_macro_internal/tokentree.cc
  4d27195db5805ea05b982a2971711c94  libgrust/libproc_macro_internal/tokentree.h
  99c2e5e712b990ee07be10f53e41f3fb  libiberty/.gitignore
  a916467b91076e631dd8edb7424769c7  libiberty/COPYING.LIB
! 10e20277418cb9c951250acbf1af3b5c  libiberty/ChangeLog
  347c31392973de6a4872d540c1718dc1  libiberty/ChangeLog.jit
  65c8c72721eb29b2e2b42968dc6aaee6  libiberty/Makefile.in
  8b93d0e0369daed24e2260ccfd102eb3  libiberty/README
*************** cd082485429b6f621f45522499e0b1d2  libibe
*** 137077,137083 ****
  15e87a0456616ed192999f007babf098  libiberty/testsuite/demangler-fuzzer.c
  3a9dd86d23e50ad55b3af57e17c41a44  libiberty/testsuite/rust-demangle-expected
  6af82d6fdd18f9a7558eb9e74759ab04  libiberty/testsuite/test-demangle.c
! da213482f4786e595f79a8cba3b2f758  libiberty/testsuite/test-doubly-linked-list.c
  f55a96de94210cb5e1f9c117c5056a48  libiberty/testsuite/test-expandargv.c
  61e549265d767ba329babb1a85f4bc5e  libiberty/testsuite/test-pexecute.c
  2535350a5d4a6615d96f724a79f88cd9  libiberty/testsuite/test-strtol.c
--- 137392,137398 ----
  15e87a0456616ed192999f007babf098  libiberty/testsuite/demangler-fuzzer.c
  3a9dd86d23e50ad55b3af57e17c41a44  libiberty/testsuite/rust-demangle-expected
  6af82d6fdd18f9a7558eb9e74759ab04  libiberty/testsuite/test-demangle.c
! 86d489a5709599b300fad980b610128c  libiberty/testsuite/test-doubly-linked-list.c
  f55a96de94210cb5e1f9c117c5056a48  libiberty/testsuite/test-expandargv.c
  61e549265d767ba329babb1a85f4bc5e  libiberty/testsuite/test-pexecute.c
  2535350a5d4a6615d96f724a79f88cd9  libiberty/testsuite/test-strtol.c
*************** d680e7307fb59fe24f8431e179191f16  libssp
*** 138928,138934 ****
  534c3fb4a88e5c1f70db35c12b7742c3  libssp/vsnprintf-chk.c
  34daeb04a522ee796098df4446d6ce61  libssp/vsprintf-chk.c
  9e2de2e1f20ab0ffa2201164de02824f  libstdc++-v3/.editorconfig
! e8d53ce18c7043a76710e83144fffd24  libstdc++-v3/ChangeLog
  7aa6c40440a44fcf5ec94c066160c2f8  libstdc++-v3/ChangeLog-1998
  7aff86600b6a1ed3fa87305075a92db0  libstdc++-v3/ChangeLog-1999
  a6f28e8fc9bb07696a9e068b439a3a87  libstdc++-v3/ChangeLog-2000
--- 139243,139249 ----
  534c3fb4a88e5c1f70db35c12b7742c3  libssp/vsnprintf-chk.c
  34daeb04a522ee796098df4446d6ce61  libssp/vsprintf-chk.c
  9e2de2e1f20ab0ffa2201164de02824f  libstdc++-v3/.editorconfig
! af2483ec64c028a93268636dc41fb355  libstdc++-v3/ChangeLog
  7aa6c40440a44fcf5ec94c066160c2f8  libstdc++-v3/ChangeLog-1998
  7aff86600b6a1ed3fa87305075a92db0  libstdc++-v3/ChangeLog-1999
  a6f28e8fc9bb07696a9e068b439a3a87  libstdc++-v3/ChangeLog-2000
*************** ed199f6700a016816d625b286bf25ead  libstd
*** 139153,139159 ****
  8913cf14e458f9cfae745a0d939c97e4  libstdc++-v3/config/os/vxworks/ctype_configure_char.cc
  e29a526ec89ed09bf39b0aa4fd4c5d79  libstdc++-v3/config/os/vxworks/ctype_inline.h
  788b66dfe66c25c24ff60bf253c9c7ff  libstdc++-v3/config/os/vxworks/os_defines.h
! b2fbd0f6a63be76d6d8548dba1d8bf8f  libstdc++-v3/configure
  315146bda822dcbf6f5677aac62442a6  libstdc++-v3/configure.ac
  22c2981483d92dbe80dc732e50bfdbcd  libstdc++-v3/configure.host
  450cc52f6f6f0abf59940662504c450e  libstdc++-v3/crossconfig.m4
--- 139468,139474 ----
  8913cf14e458f9cfae745a0d939c97e4  libstdc++-v3/config/os/vxworks/ctype_configure_char.cc
  e29a526ec89ed09bf39b0aa4fd4c5d79  libstdc++-v3/config/os/vxworks/ctype_inline.h
  788b66dfe66c25c24ff60bf253c9c7ff  libstdc++-v3/config/os/vxworks/os_defines.h
! 4031026e2d51bd98a0a16329167bf732  libstdc++-v3/configure
  315146bda822dcbf6f5677aac62442a6  libstdc++-v3/configure.ac
  22c2981483d92dbe80dc732e50bfdbcd  libstdc++-v3/configure.host
  450cc52f6f6f0abf59940662504c450e  libstdc++-v3/crossconfig.m4
*************** e5a690ded485bd276ae2fa367fc1fd13  libstd
*** 139258,139264 ****
  23038a3eb57967596dd7dc4f944e55e6  libstdc++-v3/doc/html/manual/appendix_free.html
  7bedd2c8f6a4683546db552dc3e8261f  libstdc++-v3/doc/html/manual/appendix_gfdl.html
  502f9b7267830b21cb88745d060faacf  libstdc++-v3/doc/html/manual/appendix_gpl.html
! c36e284f58b3d8922d39b812359e087e  libstdc++-v3/doc/html/manual/appendix_porting.html
  ac3612f72ad76b3796526d161b19db59  libstdc++-v3/doc/html/manual/associative.html
  b8ac9fc2f2cfcaed0450c79e2fb01569  libstdc++-v3/doc/html/manual/atomics.html
  d30e8a474595941b24a6493ad08f78d9  libstdc++-v3/doc/html/manual/backwards.html
--- 139573,139579 ----
  23038a3eb57967596dd7dc4f944e55e6  libstdc++-v3/doc/html/manual/appendix_free.html
  7bedd2c8f6a4683546db552dc3e8261f  libstdc++-v3/doc/html/manual/appendix_gfdl.html
  502f9b7267830b21cb88745d060faacf  libstdc++-v3/doc/html/manual/appendix_gpl.html
! 22bf3d13eebc216c66da3fb0f8743d34  libstdc++-v3/doc/html/manual/appendix_porting.html
  ac3612f72ad76b3796526d161b19db59  libstdc++-v3/doc/html/manual/associative.html
  b8ac9fc2f2cfcaed0450c79e2fb01569  libstdc++-v3/doc/html/manual/atomics.html
  d30e8a474595941b24a6493ad08f78d9  libstdc++-v3/doc/html/manual/backwards.html
*************** b860270b35e04a2ad4da73d0c27f710e  libstd
*** 139542,139548 ****
  c3d24d92dc2ae1e99149164f60e80337  libstdc++-v3/doc/xml/manual/auto_ptr.xml
  18ecbccd2db2605dc093780d7b72799b  libstdc++-v3/doc/xml/manual/backwards_compatibility.xml
  b84cb983bda244285e1314327a420e66  libstdc++-v3/doc/xml/manual/bitmap_allocator.xml
! cf5fda68829b2e0e24598f1693638f0b  libstdc++-v3/doc/xml/manual/build_hacking.xml
  8f13cae7ea80bc018b87b4ff8de7e3cf  libstdc++-v3/doc/xml/manual/codecvt.xml
  af3361d0d0af961859ec0346c38ac8c8  libstdc++-v3/doc/xml/manual/concurrency.xml
  9da4610e32c81714e9188c6852c8dc93  libstdc++-v3/doc/xml/manual/concurrency_extensions.xml
--- 139857,139863 ----
  c3d24d92dc2ae1e99149164f60e80337  libstdc++-v3/doc/xml/manual/auto_ptr.xml
  18ecbccd2db2605dc093780d7b72799b  libstdc++-v3/doc/xml/manual/backwards_compatibility.xml
  b84cb983bda244285e1314327a420e66  libstdc++-v3/doc/xml/manual/bitmap_allocator.xml
! 3eb30ee2fd7ecfdfc996c37e9c542e24  libstdc++-v3/doc/xml/manual/build_hacking.xml
  8f13cae7ea80bc018b87b4ff8de7e3cf  libstdc++-v3/doc/xml/manual/codecvt.xml
  af3361d0d0af961859ec0346c38ac8c8  libstdc++-v3/doc/xml/manual/concurrency.xml
  9da4610e32c81714e9188c6852c8dc93  libstdc++-v3/doc/xml/manual/concurrency_extensions.xml
*************** f656180781457f5f36a26b5902da4b6f  libstd
*** 139644,139650 ****
  a94b98a38c3eb27aa6644a5fb468c9de  libstdc++-v3/include/bits/gslice_array.h
  df03a6e1a88ea69759bc32441b171cb9  libstdc++-v3/include/bits/hashtable.h
  bafd340e02d232fc7ced1eb5f68967ce  libstdc++-v3/include/bits/hashtable_policy.h
! 1be2d01c9ba2c6e4ce4ee6f013de80b7  libstdc++-v3/include/bits/indirect.h
  473034b12d8308be48d4a3b85fe19d83  libstdc++-v3/include/bits/indirect_array.h
  ab0c92c57c5ec5cb9d0bfb3a7963d00c  libstdc++-v3/include/bits/invoke.h
  11d329b94f374c9cc8f95f7e5a958ee5  libstdc++-v3/include/bits/ios_base.h
--- 139959,139965 ----
  a94b98a38c3eb27aa6644a5fb468c9de  libstdc++-v3/include/bits/gslice_array.h
  df03a6e1a88ea69759bc32441b171cb9  libstdc++-v3/include/bits/hashtable.h
  bafd340e02d232fc7ced1eb5f68967ce  libstdc++-v3/include/bits/hashtable_policy.h
! 7dc64d28a42a553ad311f179e7c364f9  libstdc++-v3/include/bits/indirect.h
  473034b12d8308be48d4a3b85fe19d83  libstdc++-v3/include/bits/indirect_array.h
  ab0c92c57c5ec5cb9d0bfb3a7963d00c  libstdc++-v3/include/bits/invoke.h
  11d329b94f374c9cc8f95f7e5a958ee5  libstdc++-v3/include/bits/ios_base.h
*************** d85f3a53465585d54b96880e79456c79  libstd
*** 140690,140696 ****
  ea41b659ccf9f3e1850802e2fddaba52  libstdc++-v3/src/c++23/print.cc
  15f6b28b71ad24bc5b6d33c21048e59a  libstdc++-v3/src/c++23/stacktrace.cc
  c319163994652e23066095eded5869f0  libstdc++-v3/src/c++23/std-clib.cc.in
! 77478669a59f12d6423ce70ab538f885  libstdc++-v3/src/c++23/std.cc.in
  ef2786c62e1aa27a5405d7bf70e5212c  libstdc++-v3/src/c++23/std.compat.cc.in
  97527213996a1ca6a0910b1ab5f6c3a3  libstdc++-v3/src/c++26/Makefile.am
  5dd6b2acd5d63f897ba1545bb9a07d25  libstdc++-v3/src/c++26/Makefile.in
--- 141005,141011 ----
  ea41b659ccf9f3e1850802e2fddaba52  libstdc++-v3/src/c++23/print.cc
  15f6b28b71ad24bc5b6d33c21048e59a  libstdc++-v3/src/c++23/stacktrace.cc
  c319163994652e23066095eded5869f0  libstdc++-v3/src/c++23/std-clib.cc.in
! 89a296506f97a1803ec63ee860aba9b8  libstdc++-v3/src/c++23/std.cc.in
  ef2786c62e1aa27a5405d7bf70e5212c  libstdc++-v3/src/c++23/std.compat.cc.in
  97527213996a1ca6a0910b1ab5f6c3a3  libstdc++-v3/src/c++26/Makefile.am
  5dd6b2acd5d63f897ba1545bb9a07d25  libstdc++-v3/src/c++26/Makefile.in
*************** fdca82ddd8e353e70075872cb27926c2  libstd
*** 149940,149945 ****
--- 150255,150261 ----
  c400d0d58ad702f461b28668dc629c09  libstdc++-v3/testsuite/std/format/string.cc
  7c654edf02fc2f7793fb1f549b890993  libstdc++-v3/testsuite/std/format/string_neg.cc
  a554040cee1e3b564ea9bf0188ddf8da  libstdc++-v3/testsuite/std/format/tuple.cc
+ f69347ccb773103796767f24914c4c96  libstdc++-v3/testsuite/std/memory/indirect/access.cc
  1ee4f09d4811a5b094ebc85dd48142f9  libstdc++-v3/testsuite/std/memory/indirect/copy.cc
  2b0944a1839541995d0521288e45e718  libstdc++-v3/testsuite/std/memory/indirect/copy_alloc.cc
  b66acde099f00f183d242567d716ce77  libstdc++-v3/testsuite/std/memory/indirect/ctor.cc
*************** b66acde099f00f183d242567d716ce77  libstd
*** 149948,149953 ****
--- 150264,150270 ----
  47d2f6e77c7a9f2340bdb3f3d4b87adb  libstdc++-v3/testsuite/std/memory/indirect/move.cc
  f7f913b9b36585aa320d330e01a6161e  libstdc++-v3/testsuite/std/memory/indirect/move_alloc.cc
  bd53b7a3045c16d0fa75e9a8be586efe  libstdc++-v3/testsuite/std/memory/indirect/relops.cc
+ 268ca7c7aea9fe1a7800f1e24de9064e  libstdc++-v3/testsuite/std/memory/polymorphic/access.cc
  903cd9d083a7483a17a37e37f0cbf23b  libstdc++-v3/testsuite/std/memory/polymorphic/copy.cc
  74a07b93bb4cfda7416d07fa87ee3aef  libstdc++-v3/testsuite/std/memory/polymorphic/copy_alloc.cc
  7fb928d35c89f294587a06af2af7d42d  libstdc++-v3/testsuite/std/memory/polymorphic/ctor.cc
diff -Nrcpad gcc-16-20250803/config/lib-link.m4 gcc-16-20250810/config/lib-link.m4
*** gcc-16-20250803/config/lib-link.m4	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/config/lib-link.m4	Sun Aug 10 22:32:05 2025
*************** AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
*** 126,131 ****
--- 126,132 ----
  [
    define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
                                 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+   define([Name],[translit([$1],[./-], [___])])
    dnl By default, look in $includedir and $libdir.
    use_additional=yes
    AC_LIB_WITH_FINAL_PREFIX([
*************** AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
*** 152,159 ****
  ])
    AC_LIB_ARG_WITH([lib$1-type],
  [  --with-lib$1-type=TYPE     type of library to search for (auto/static/shared) ],
!   [ with_lib$1_type=$withval ], [ with_lib$1_type=auto ])
!   lib_type=`eval echo \$with_lib$1_type`
  
    dnl Search the library and its dependencies in $additional_libdir and
    dnl $LDFLAGS. Using breadth-first-seach.
--- 153,160 ----
  ])
    AC_LIB_ARG_WITH([lib$1-type],
  [  --with-lib$1-type=TYPE     type of library to search for (auto/static/shared) ],
!   [ with_lib[]Name[]_type=$withval ], [ with_lib[]Name[]_type=auto ])
!   lib_type=`eval echo \$with_lib[]Name[]_type`
  
    dnl Search the library and its dependencies in $additional_libdir and
    dnl $LDFLAGS. Using breadth-first-seach.
diff -Nrcpad gcc-16-20250803/contrib/ChangeLog gcc-16-20250810/contrib/ChangeLog
*** gcc-16-20250803/contrib/ChangeLog	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/contrib/ChangeLog	Sun Aug 10 22:32:05 2025
***************
*** 1,3 ****
--- 1,11 ----
+ 2025-08-07  Tobias Burnus  <tburnus@baylibre.com>
+ 
+ 	PR other/120237
+ 	* download_prerequisites: Update to download GMP 6.3.0 (before 6.2.1),
+ 	MPFR 4.2.2 (before 4.1.0), and MPC 1.3.1 (before 1.2.1).
+ 	* prerequisites.md5: Update hash.
+ 	* prerequisites.sha512: Likewise.
+ 
  2025-07-28  David Malcolm  <dmalcolm@redhat.com>
  
  	* gcc-changelog/git_commit.py: Add "diagnostics" to bug
diff -Nrcpad gcc-16-20250803/contrib/download_prerequisites gcc-16-20250810/contrib/download_prerequisites
*** gcc-16-20250803/contrib/download_prerequisites	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/contrib/download_prerequisites	Sun Aug 10 22:32:05 2025
*************** version='(unversioned)'
*** 27,35 ****
  # remember to also update the files `contrib/prerequisites.sha512` and
  # `contrib/prerequisites.md5` with the new checksums.
  
! gmp='gmp-6.2.1.tar.bz2'
! mpfr='mpfr-4.1.0.tar.bz2'
! mpc='mpc-1.2.1.tar.gz'
  isl='isl-0.24.tar.bz2'
  gettext='gettext-0.22.tar.gz'
  
--- 27,35 ----
  # remember to also update the files `contrib/prerequisites.sha512` and
  # `contrib/prerequisites.md5` with the new checksums.
  
! gmp='gmp-6.3.0.tar.bz2'
! mpfr='mpfr-4.2.2.tar.bz2'
! mpc='mpc-1.3.1.tar.gz'
  isl='isl-0.24.tar.bz2'
  gettext='gettext-0.22.tar.gz'
  
diff -Nrcpad gcc-16-20250803/contrib/prerequisites.md5 gcc-16-20250810/contrib/prerequisites.md5
*** gcc-16-20250803/contrib/prerequisites.md5	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/contrib/prerequisites.md5	Sun Aug 10 22:32:05 2025
***************
*** 1,5 ****
! 28971fc21cf028042d4897f02fd355ea  gmp-6.2.1.tar.bz2
! 44b892bc5a45bafb4294d134e13aad1d  mpfr-4.1.0.tar.bz2
! 9f16c976c25bb0f76b50be749cd7a3a8  mpc-1.2.1.tar.gz
  dd2f7b78e118c25bd96134a52aae7f4d  isl-0.24.tar.bz2
  c092102240f8f66134d22718421d5115  gettext-0.22.tar.gz
--- 1,5 ----
! c1cd6ef33085e9cb818b9b08371f9000  gmp-6.3.0.tar.bz2
! afe8268360bc8702fbc8297d351c8b5e  mpfr-4.2.2.tar.bz2
! 5c9bc658c9fd0f940e8e3e0f09530c62  mpc-1.3.1.tar.gz
  dd2f7b78e118c25bd96134a52aae7f4d  isl-0.24.tar.bz2
  c092102240f8f66134d22718421d5115  gettext-0.22.tar.gz
diff -Nrcpad gcc-16-20250803/contrib/prerequisites.sha512 gcc-16-20250810/contrib/prerequisites.sha512
*** gcc-16-20250803/contrib/prerequisites.sha512	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/contrib/prerequisites.sha512	Sun Aug 10 22:32:05 2025
***************
*** 1,5 ****
! 8904334a3bcc5c896ececabc75cda9dec642e401fb5397c4992c4fabea5e962c9ce8bd44e8e4233c34e55c8010cc28db0545f5f750cbdbb5f00af538dc763be9  gmp-6.2.1.tar.bz2
! 410208ee0d48474c1c10d3d4a59decd2dfa187064183b09358ec4c4666e34d74383128436b404123b831e585d81a9176b24c7ced9d913967c5fce35d4040a0b4  mpfr-4.1.0.tar.bz2
! 3279f813ab37f47fdcc800e4ac5f306417d07f539593ca715876e43e04896e1d5bceccfb288ef2908a3f24b760747d0dbd0392a24b9b341bc3e12082e5c836ee  mpc-1.2.1.tar.gz
  aab3bddbda96b801d0f56d2869f943157aad52a6f6e6a61745edd740234c635c38231af20bc3f1a08d416a5e973a90e18249078ed8e4ae2f1d5de57658738e95  isl-0.24.tar.bz2
  e2a58dde1cae3e6b79c03e7ef3d888f7577c1f4cba283b3b0f31123ceea8c33d7c9700e83de57104644de23e5f5c374868caa0e091f9c45edbbe87b98ee51c04  gettext-0.22.tar.gz
--- 1,5 ----
! 3b684c9bcb9ede2b7e54d0ba4c9764bfa17c20d4f3000017c553b6f1e135b536949580ff37341680c25dc236cfe0ba1db8cfdfe619ce013656189ef0871b89f8  gmp-6.3.0.tar.bz2
! 0176e50808dcc07afbf5bc3e38bf9b7b21918e5f194aa0bfd860d99b00c470630aef149776c4be814a61c44269c3a5b9a4b0b1c0fcd4c9feb1459d8466452da8  mpfr-4.2.2.tar.bz2
! 4bab4ef6076f8c5dfdc99d810b51108ced61ea2942ba0c1c932d624360a5473df20d32b300fc76f2ba4aa2a97e1f275c9fd494a1ba9f07c4cb2ad7ceaeb1ae97  mpc-1.3.1.tar.gz
  aab3bddbda96b801d0f56d2869f943157aad52a6f6e6a61745edd740234c635c38231af20bc3f1a08d416a5e973a90e18249078ed8e4ae2f1d5de57658738e95  isl-0.24.tar.bz2
  e2a58dde1cae3e6b79c03e7ef3d888f7577c1f4cba283b3b0f31123ceea8c33d7c9700e83de57104644de23e5f5c374868caa0e091f9c45edbbe87b98ee51c04  gettext-0.22.tar.gz
diff -Nrcpad gcc-16-20250803/gcc/ChangeLog gcc-16-20250810/gcc/ChangeLog
*** gcc-16-20250803/gcc/ChangeLog	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/gcc/ChangeLog	Sun Aug 10 22:32:05 2025
***************
*** 1,3 ****
--- 1,1062 ----
+ 2025-08-09  Iain Sandoe  <iain@sandoe.co.uk>
+ 
+ 	* config/darwin.cc (darwin_encode_section_info): Do not
+ 	make anchored symbols linker-visible.
+ 	(darwin_use_anchors_for_symbol_p): Disallow anchoring on
+ 	symbols that must be linker-visible (or external), even
+ 	if the definitions are in this TU.
+ 
+ 2025-08-09  Iain Sandoe  <iain@sandoe.co.uk>
+ 
+ 	* config/darwin.h (ASM_GENERATE_INTERNAL_LABEL): New
+ 	entry for LANCHOR.
+ 
+ 2025-08-09  David Malcolm  <dmalcolm@redhat.com>
+ 
+ 	* diagnostics/context.cc (context::dump): Bulletproof against
+ 	m_reference_printer being null.
+ 	* diagnostics/dumping.cc (emit_field<const char *>): Replace
+ 	with...
+ 	(emit_string_field): ...this.
+ 	(emit_field<char *>): Eliminate.
+ 	(emit_field<bool>): Replace with...
+ 	(emit_bool_field): ...this.
+ 	(emit_field<size_t>): Replace with...
+ 	(emit_size_t_field): ...this, and use HOST_SIZE_T_PRINT_DEC rather
+ 	than %zi in fprintf call.
+ 	(emit_field<int>): Replace with...
+ 	(emit_int_field): ...this.
+ 	(emit_field<unsigned>): Replace with...
+ 	(emit_unsigned_field): ...this.
+ 	* diagnostics/dumping.h (emit_field): Replace this template decl
+ 	with...
+ 	(emit_string_field): ...this,
+ 	(emit_bool_field): ...this,
+ 	(emit_size_t_field): ...this,
+ 	(emit_int_field): ...this,
+ 	(emit_unsigned_field): ... and this.
+ 	(DIAGNOSTICS_DUMPING_EMIT_FIELD): Rename to...
+ 	(DIAGNOSTICS_DUMPING_EMIT_BOOL_FIELD): ...this and update for
+ 	above change.
+ 	* diagnostics/file-cache.cc (file_cache_slot::dump): Replace
+ 	emit_field calls with calls that explicitly state the type.  Fix
+ 	type of dump of m_missing_trailing_newline to use bool.
+ 	(file_cache_slot::dump): Use HOST_SIZE_T_PRINT_DEC rather than
+ 	%zi in fprintf call.
+ 	* diagnostics/html-sink.cc (html_generation_options::dump): Update
+ 	for macro renaming.
+ 	* diagnostics/sarif-sink.cc
+ 	(sarif_serialization_format_json::dump): Likewise.
+ 	(sarif_generation_options::dump): Likewise, and for function
+ 	renaming.
+ 	* diagnostics/text-sink.cc (text_sink::dump): Update for macro
+ 	renaming.
+ 	* libgdiagnostics.cc (diagnostic_manager_debug_dump_file): Use
+ 	HOST_SIZE_T_PRINT_DEC rather than %zi in fprintf call.
+ 	* pretty-print.cc: Include "diagnostics/dumping.h".
+ 	(pp_formatted_chunks::dump): Use it.
+ 	(get_url_format_as_string): New.
+ 	(pretty_printer::dump): Use diagnostics::dumping.  Bulletproof
+ 	against m_buffer being null.
+ 
+ 2025-08-09  Takayuki 'January June' Suwa  <jjsuwa_sys3175@yahoo.co.jp>
+ 
+ 	* config/xtensa/constraints.md (T):
+ 	Change define_memory_constraint to define_special_memory_constraint.
+ 
+ 2025-08-08  Andrew Pinski  <quic_apinski@quicinc.com>
+ 
+ 	PR tree-optimization/120599
+ 	* tree-ssa-forwprop.cc (optimize_agr_copyprop): Don't try to copy
+ 	from statements that throw.
+ 
+ 2025-08-08  Andrew Pinski  <quic_apinski@quicinc.com>
+ 
+ 	PR tree-optimization/118946
+ 	PR tree-optimization/121422
+ 	* tree-ssa-forwprop.cc (optimize_memcpy_to_memset): Remove.
+ 	(optimize_aggr_zeroprop_1): New function.
+ 	(optimize_aggr_zeroprop): New function.
+ 	(simplify_builtin_call): Don't call optimize_memcpy_to_memset
+ 	for memcpy but call optimize_aggr_zeroprop for memset.
+ 	(pass_forwprop::execute): Don't call optimize_memcpy_to_memset
+ 	for aggregate copies but rather call optimize_aggr_zeroprop
+ 	for aggregate stores.
+ 
+ 2025-08-08  Andrew Pinski  <quic_apinski@quicinc.com>
+ 
+ 	* tree-ssa-forwprop.cc (optimize_agr_copyprop): Change into a
+ 	forward looking (looking at vdef's uses) instead of a back
+ 	looking (vuse's def).
+ 
+ 2025-08-08  David Malcolm  <dmalcolm@redhat.com>
+ 
+ 	PR diagnostics/116253
+ 	* common.opt (fdiagnostics-show-nesting): New option.
+ 	(fdiagnostics-show-nesting-locations): New option.
+ 	(fdiagnostics-show-nesting-levels): New option.
+ 	* common.opt.urls: Regenerate.
+ 	* diagnostics/context.cc (context::set_show_nesting): New.
+ 	(context::set_show_nesting_locations): New.
+ 	(context::set_show_nesting_levels): New.
+ 	* diagnostics/context.h (context::set_show_nesting): New decl.
+ 	(context::set_show_nesting_locations): New decl.
+ 	(context::set_show_nesting_levels): New decl.
+ 	* diagnostics/html-sink.cc: Tweak comment.
+ 	* diagnostics/output-spec.cc (text_scheme_handler::make_sink):
+ 	Rename "experimental-nesting" to "show-nesting" and enable by
+ 	default.  Rename "experimental-nesting-show-locations" to
+ 	"show-nesting-locations".  Rename
+ 	"experimental-nesting-show-levels" to "show-nesting-levels".
+ 	* diagnostics/sink.h (sink::dyn_cast_text_sink): New.
+ 	* diagnostics/text-sink.h (text_sink::dyn_cast_text_sink): New.
+ 	* doc/invoke.texi: Add -fdiagnostics-show-nesting,
+ 	-fdiagnostics-show-nesting-locations, and
+ 	-fdiagnostics-show-nesting-levels.  Update for changes to
+ 	output-spec.cc above.
+ 	* lto-wrapper.cc (merge_and_complain): Ignore
+ 	OPT_fdiagnostics_show_nesting,
+ 	OPT_fdiagnostics_show_nesting_locations, and
+ 	OPT_fdiagnostics_show_nesting_levels.
+ 	(append_compiler_options): Likewise.
+ 	(append_diag_options): Likewise.
+ 	* opts-common.cc (decode_cmdline_options_to_array): Add
+ 	"-fno-diagnostics-show-nesting" to -fdiagnostics-plain-output.
+ 	* opts.cc (common_handle_option): Handle the new options.
+ 	(gen_command_line_string): Ignore the new options.
+ 	* toplev.cc (general_init): Call set_show_nesting,
+ 	set_show_nesting_locations, and set_show_nesting_levels on
+ 	global_dc.
+ 
+ 2025-08-08  David Malcolm  <dmalcolm@redhat.com>
+ 
+ 	* Makefile.in (OBJS-libcommon): Add diagnostics/dumping.o.
+ 	* diagnostics/buffering.cc: Include "diagnostics/dumping.h".
+ 	(buffer::dump): Reimplement using diagnostics::dumping.
+ 	* diagnostics/context.cc: Include "diagnostics/dumping.h".
+ 	(context::dump): Reimplement using diagnostics::dumping.
+ 	Use sink::dump_kind when listing the sinks.
+ 	(sink::dump): Reimplement using diagnostics::dumping.
+ 	(counters::dump): Likewise.
+ 	* diagnostics/dumping.cc: New file.
+ 	* diagnostics/dumping.h: New file.
+ 	* diagnostics/file-cache.cc: Include "diagnostics/dumping.h".
+ 	(file_cache::dump): Reimplement using diagnostics::dumping.
+ 	(file_cache_slot::dump): Likewise.
+ 	* diagnostics/html-sink.cc: Include "diagnostics/dumping.h".
+ 	(html_generation_options::dump): New.
+ 	(html_sink_buffer::dump): Reimplement using diagnostics::dumping.
+ 	(html_builder::dump): New.
+ 	(html_sink::dump): Reimplement using diagnostics::dumping.
+ 	Add dump of the html_builder.
+ 	(html_file_sink::dump): Replace with...
+ 	(html_file_sink::dump_kind): ...this.
+ 	(html_buffered_sink::dump_kind): New.
+ 	* diagnostics/html-sink.h (html_generation_options::dump): New
+ 	decl.
+ 	* diagnostics/sarif-sink.cc: Include "diagnostics/dumping.h".
+ 	(sarif_serialization_format_json::dump): New.
+ 	(sarif_builder::dump): New.
+ 	(sarif_sink_buffer::dump): Reimplement using diagnostics::dumping.
+ 	(sarif_sink::dump): Likewise.  Add dump of the sarif_builder.
+ 	(sarif_stream_sink::dump_kind): New.
+ 	(sarif_file_sink::dump): Replace with...
+ 	(sarif_file_sink::dump_kind): ...this.
+ 	(get_dump_string_for_sarif_version): New.
+ 	(sarif_generation_options::dump): New.
+ 	(class buffered_sink): Rename to...
+ 	(class sarif_buffered_sink): ...this.
+ 	(sarif_buffered_sink::dump_kind): New.
+ 	* diagnostics/sarif-sink.h (sarif_serialization_format::dump):
+ 	New.
+ 	(sarif_serialization_format_json::dump): New decl.
+ 	(sarif_generation_options::dump): New decl.
+ 	* diagnostics/sink.h (sink::dump_kind): New.
+ 	* diagnostics/text-sink.cc: Include "diagnostics/dumping.h".
+ 	(text_sink_buffer::dump): Reimplement using diagnostics::dumping.
+ 	(text_sink::dump): Likewise.  Emit fields m_show_nesting,
+ 	m_show_locations_in_nesting, and m_show_nesting_levels.
+ 	* diagnostics/text-sink.h (text_sink::dump_kind): New.
+ 
+ 2025-08-08  David Malcolm  <dmalcolm@redhat.com>
+ 
+ 	* diagnostic.h (diagnostics::get_cwe_url): Move decl to
+ 	diagnostics/metadata.h.
+ 	(diagnostics::maybe_line_and_column): Move into
+ 	diagnostics::text_sink.
+ 	* diagnostics/context.cc: Update for maybe_line_and_column
+ 	becoming a static member of text_sink.
+ 	* diagnostics/metadata.h (diagnostics::get_cwe_url): Move decl
+ 	here from diagnostic.h.
+ 	* diagnostics/text-sink.cc (maybe_line_and_column): Convert to...
+ 	(text_sink::maybe_line_and_column): ...this.
+ 	* diagnostics/text-sink.h (text_sink::maybe_line_and_column): Move
+ 	here from diagnostic.h.
+ 
+ 2025-08-08  David Malcolm  <dmalcolm@redhat.com>
+ 
+ 	* diagnostics/context.cc (context::get_any_inlining_info): Convert
+ 	"context" arg of m_set_locations_cb from ptr to const &.
+ 	(context::report_diagnostic): Convert "context" arg of
+ 	m_adjust_diagnostic_info from ptr to const &.
+ 	* diagnostics/context.h (context::set_locations_callback_t):
+ 	Likewise.
+ 	(context::set_adjust_diagnostic_info_callback): Likewise.
+ 	(context::m_adjust_diagnostic_info): Likewise.
+ 	* tree-diagnostic.cc (set_inlining_locations): Likewise.
+ 
+ 2025-08-08  David Malcolm  <dmalcolm@redhat.com>
+ 
+ 	* diagnostics/column-options.h: New file, adding struct
+ 	diagnostics::column_options, taken from fields in
+ 	diagnostics::context and diagnostics::column_policy.
+ 	* diagnostics/context.cc (context::initialize): Update for moving
+ 	fields of diagnostics::context into diagnostics::column_options.
+ 	(column_policy::column_policy): Likewise.
+ 	(column_policy::converted_column): Move implementation to...
+ 	(column_options::convert_column): ...this new function.
+ 	(context::report_diagnostic): Update for moving fields of
+ 	diagnostics::context into diagnostics::column_options.
+ 	(assert_location_text): Likewise.
+ 	* diagnostics/context.h: Include "diagnostics/column-options.h".
+ 	(class column_policy): Replace fields m_column_unit,
+ 	m_column_origin, and m_tabstop with m_column_options.
+ 	(context::get_column_options): New accessors.
+ 	(context::m_column_unit): Move to struct column_options and
+ 	replace with m_column_options.
+ 	(context::m_column_origin): Likewise.
+ 	(context::m_tabstop): Likewise.
+ 	* diagnostics/sarif-sink.cc (sarif_builder::sarif_builder): Update
+ 	for moving fields of diagnostics::context into
+ 	diagnostics::column_options.
+ 	* diagnostics/source-printing.cc: Likewise.
+ 	* opts.cc (common_handle_option): Likewise.
+ 
+ 2025-08-08  Christophe Lyon  <christophe.lyon@linaro.org>
+ 
+ 	PR target/120977
+ 	* config/arm/arm.md (call): Move unspec parameter to parallel.
+ 	(nonsecure_call_internal): Likewise.
+ 	(call_value): Likewise.
+ 	(nonsecure_call_value_internal): Likewise.
+ 	* config/arm/thumb1.md (nonsecure_call_reg_thumb1_v5): Likewise.
+ 	(nonsecure_call_value_reg_thumb1_v5): Likewise.
+ 	* config/arm/thumb2.md (nonsecure_call_reg_thumb2_fpcxt):
+ 	Likewise.
+ 	(nonsecure_call_reg_thumb2): Likewise.
+ 	(nonsecure_call_value_reg_thumb2_fpcxt): Likewise.
+ 	(nonsecure_call_value_reg_thumb2): Likewise.
+ 	* config/arm/arm.cc (cmse_nonsecure_call_inline_register_clear):
+ 	Likewise.
+ 
+ 2025-08-08  Pengfei Li  <Pengfei.Li2@arm.com>
+ 
+ 	PR target/121449
+ 	* config/aarch64/aarch64-sve.md
+ 	(mask_gather_load<mode><v_int_container>): Use vg<Vesize>
+ 	constraints for alternatives with immediate offset.
+ 	(mask_scatter_store<mode><v_int_container>): Likewise.
+ 
+ 2025-08-08  Richard Biener  <rguenther@suse.de>
+ 
+ 	* doc/tm.texi.in: Add Vectorization and OpenMP and OpenACC
+ 	sub-sections to the list of target macros and functions.
+ 	* doc/tm.texi: Re-generate.
+ 
+ 2025-08-08  Richard Biener  <rguenther@suse.de>
+ 
+ 	* tree-vect-loop.cc (vect_determine_vectype_for_stmt_1): Remove.
+ 	(vect_determine_vectype_for_stmt): Likewise.
+ 	(vect_set_stmts_vectype): Likewise.
+ 	(vect_analyze_loop_2): Do not call vect_set_stmts_vectype.
+ 	* tree-vect-stmts.cc (vect_mark_stmts_to_be_vectorized): Detect
+ 	irregular stmts early here.
+ 
+ 2025-08-08  Alex Coplan  <alex.coplan@arm.com>
+ 
+ 	PR target/120986
+ 	* config/aarch64/aarch64-sve-builtins.cc
+ 	(function_expander::expand): Relax fpm_t assert to allow
+ 	modeless const_ints.
+ 
+ 2025-08-08  Alex Coplan  <alex.coplan@arm.com>
+ 
+ 	PR target/120986
+ 	* config/aarch64/aarch64-sve2.md (@aarch64_sve_dot<mode>):
+ 	Switch mode iterator from SVE_FULL_HSF to new iterator;
+ 	remove insn predicate as this is now taken care of by conditions
+ 	in the mode iterator.
+ 	(@aarch64_sve_dot_lane<mode>): Likewise.
+ 	* config/aarch64/iterators.md (SVE_FULL_HSF_FP8_FDOT): New.
+ 
+ 2025-08-08  Richard Biener  <rguenther@suse.de>
+ 
+ 	PR tree-optimization/121454
+ 	* tree-ssa-sccvn.cc (visit_nary_op): Avoid unexpected
+ 	BIT_FIELD_REFs.
+ 
+ 2025-08-08  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR middle-end/121389
+ 	* tree-tailcall.cc (find_tail_calls): For finally_tmp.N
+ 	handle not just GIMPLE_CONDs with EQ_EXPR/NE_EXPR and only
+ 	values 0 and 1, but arbitrary non-negative values, arbitrary
+ 	comparisons in conditions and also GIMPLE_SWITCH next to
+ 	GIMPLE_CONDs.
+ 
+ 2025-08-08  Richard Biener  <rguenther@suse.de>
+ 
+ 	* tree-vect-loop.cc (vect_is_emulated_mixed_dot_prod): Get
+ 	the SLP node rather than the stmt_info.
+ 	(vectorizable_lane_reducing): Adjust, pass SLP node to costing.
+ 	(vect_transform_reduction): Adjust.
+ 
+ 2025-08-08  Richard Biener  <rguenther@suse.de>
+ 
+ 	* tree-vect-stmts.cc (vect_model_promotion_demotion_cost): Pass
+ 	in SLP node and drop unused dr argument.  Use SLP node for
+ 	costing, drop costing of constant/external operands.
+ 	(vectorizable_conversion): Adjust.
+ 
+ 2025-08-08  Richard Biener  <rguenther@suse.de>
+ 
+ 	* tree-vect-stmts.cc (vectorizable_store): Apply SLP_TREE_VECTYPE
+ 	to slp_node rather than stmt_info.
+ 
+ 2025-08-07  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	PR target/121414
+ 	* config/aarch64/aarch64.cc (aarch64_is_variant_pcs): New function,
+ 	split out from...
+ 	(aarch64_asm_output_variant_pcs): ...here.  Handle various types
+ 	of SME function type.
+ 
+ 2025-08-07  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	PR rtl-optimization/120718
+ 	* simplify-rtx.cc (simplify_context::simplify_gen_subreg):
+ 	Remove MODE_COMPOSITE_P condition.
+ 
+ 2025-08-07  Richard Biener  <rguenther@suse.de>
+ 
+ 	PR tree-optimization/121405
+ 	* tree-ssa-sccvn.cc (visit_nary_op): Handle BIT_FIELD_REF
+ 	with reference def by looking up a combination of both.
+ 
+ 2025-08-07  Pengfei Li  <Pengfei.Li2@arm.com>
+ 
+ 	* tree-vect-data-refs.cc (vect_compute_data_ref_alignment):
+ 	Allow DR target alignment to be a poly_int.
+ 	(vect_enhance_data_refs_alignment): Support peeling and
+ 	versioning for VLA modes.
+ 	* tree-vect-loop-manip.cc (get_misalign_in_elems): Remove
+ 	power-of-two rounding in peeling.
+ 	(vect_create_cond_for_align_checks): Update alignment check
+ 	logic for poly_int mask.
+ 	(vect_create_cond_for_vla_spec_read): New runtime checks.
+ 	(vect_loop_versioning): Support new runtime checks.
+ 	* tree-vect-loop.cc (_loop_vec_info::_loop_vec_info): Add a new
+ 	loop_vinfo field.
+ 	(vectorizable_induction): Fix wrong IV offset issue.
+ 	* tree-vect-stmts.cc (get_load_store_type): Refactor
+ 	vectorizable checks for speculative loads.
+ 	* tree-vectorizer.h (LOOP_VINFO_MAX_SPEC_READ_AMOUNT): New
+ 	macro for new runtime checks.
+ 	(LOOP_REQUIRES_VERSIONING_FOR_SPEC_READ): Likewise
+ 	(LOOP_REQUIRES_VERSIONING): Update macro for new runtime checks.
+ 
+ 2025-08-07  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR preprocessor/120778
+ 	* doc/invoke.texi (Wkeyword-macro): Document.
+ 
+ 2025-08-07  Stefan Schulze Frielinghaus  <stefansf@gcc.gnu.org>
+ 
+ 	* config/s390/s390.cc (print_operand): Allow arbitrary wide_int
+ 	constants for _BitInt.
+ 	(s390_bitint_type_info): Implement target hook
+ 	TARGET_C_BITINT_TYPE_INFO.
+ 
+ 2025-08-06  Uros Bizjak  <ubizjak@gmail.com>
+ 
+ 	PR target/96226
+ 	* config/i386/predicates.md (and_operator): New operator.
+ 	* config/i386/i386.md (splitter after *<rotate_insn><mode>3_mask):
+ 	Use and_operator to match AND RTX and use its mode
+ 	in the split pattern.
+ 
+ 2025-08-06  Gerald Pfeifer  <gerald@pfeifer.com>
+ 
+ 	PR target/69374
+ 	* doc/install.texi (Prerequisites): Replace bzip2 by xz.
+ 
+ 2025-08-06  Yangyu Chen  <cyy@cyyself.name>
+ 
+ 	* config/i386/i386.h (PTA_BDVER1):
+ 	Add missing PTA_POPCNT and PTA_LZCNT with PTA_ABM.
+ 	(PTA_ZNVER1): Ditto.
+ 	(PTA_BTVER1): Ditto.
+ 	(PTA_LUJIAZUI): Ditto.
+ 	(PTA_YONGFENG): Do not include extra PTA_LZCNT.
+ 
+ 2025-08-06  Sam James  <sam@gentoo.org>
+ 
+ 	PR libstdc++/29286
+ 	* Makefile.in (ALIASING_FLAGS): Drop.
+ 	* configure: Regenerate.
+ 	* configure.ac: Drop -fno-strict-aliasing workaround for < GCC 4.3.
+ 
+ 2025-08-06  Richard Biener  <rguenther@suse.de>
+ 
+ 	* tree-vect-data-refs.cc (vect_supportable_dr_alignment):
+ 	Prune dead code.
+ 
+ 2025-08-06  Patrick Palka  <ppalka@redhat.com>
+ 
+ 	PR c++/121231
+ 	PR c++/119688
+ 	PR c++/94511
+ 	* common.opt: Document additional ABI version 21 change.
+ 	* doc/invoke.texi: Likewise.
+ 
+ 2025-08-06  Richard Biener  <rguenther@suse.de>
+ 
+ 	* tree-vectorizer.h (_slp_tree::gs_scale): New.
+ 	(_slp_tree::gs_base): Likewise.
+ 	(SLP_TREE_GS_SCALE): Likewise.
+ 	(SLP_TREE_GS_BASE): Likewise.
+ 	(vect_describe_gather_scatter_call): Declare.
+ 	* tree-vect-slp.cc (_slp_tree::_slp_tree): Initialize
+ 	new members.
+ 	(vect_build_slp_tree_2): Record gather/scatter base and scale.
+ 	(vect_get_and_check_slp_defs): For gather/scatter IFNs
+ 	describe the call to first_gs_info.
+ 	* tree-vect-data-refs.cc (vect_gather_scatter_fn_p): Add
+ 	mode of operation with fixed offset vector type.
+ 	(vect_describe_gather_scatter_call): Export.
+ 	* tree-vect-stmts.cc (get_load_store_type): Do not call
+ 	vect_check_gather_scatter to fill gs_info, instead populate
+ 	from the SLP tree.  Check which of, IFN, decl or fallback
+ 	is supported and record that decision.
+ 
+ 2025-08-06  Richard Biener  <rguenther@suse.de>
+ 
+ 	* tree-vect-stmts.cc (vectorizable_store): Build proper
+ 	alias + align pointer value for gather/scatter and SLP
+ 	and use it.
+ 	(vectorizable_load): Likewise.
+ 
+ 2025-08-06  Richard Biener  <rguenther@suse.de>
+ 
+ 	* tree-vect-stmts.cc (check_load_store_for_partial_vectors):
+ 	Remove redundant gather/scatter target support check, instead
+ 	check the recorded ifns.  Also allow legacy gather/scatter
+ 	with loop masking.
+ 
+ 2025-08-06  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR tree-optimization/121413
+ 	* gimple-lower-bitint.cc (gimple_lower_bitint): Fix up last
+ 	commit, cast limb_prec to unsigned before comparison.
+ 
+ 2025-08-06  Yang Yujie  <yangyujie@loongson.cn>
+ 
+ 	* match.pd: Preserve conversion to _BitInt before a VCE
+ 	if the _BitInt is extended.
+ 
+ 2025-08-06  Yang Yujie  <yangyujie@loongson.cn>
+ 
+ 	* gimple-lower-bitint.cc (bitint_large_huge::lower_mergeable_stmt):
+ 	Zero-extend the partial limb of any unsigned _BitInt LHS assigned
+ 	with a widening sign-extension.
+ 
+ 2025-08-06  Yang Yujie  <yangyujie@loongson.cn>
+ 
+ 	* gimple-lower-bitint.cc (bitint_large_huge::limb_access):
+ 	Add a parameter abi_load_p.  If set, load a limb directly
+ 	in its actual precision without casting from m_limb_type.
+ 	(struct bitint_large_huge): Same.
+ 	(bitint_large_huge::handle_load): Use.
+ 
+ 2025-08-06  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR tree-optimization/121413
+ 	* gimple-lower-bitint.cc (abi_limb_prec): New variable
+ 	(bitint_precision_kind): Initialize it.
+ 	(gimple_lower_bitint): Clear it at the start.  For
+ 	min_prec > limb_prec descreased precision vars for
+ 	INTEGER_CST PHI arguments ensure min_prec is either
+ 	prec or multiple of abi_limb_prec.
+ 
+ 2025-08-06  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR tree-optimization/121127
+ 	* gimple-lower-bitint.cc (bitint_large_huge::handle_operand_addr): For
+ 	uninitialized SSA_NAME, set *prec_stored to 0 rather than *prec.
+ 	Handle that case in narrowing casts.  If prec_stored is non-NULL,
+ 	set *prec_stored to prec_stored_val.
+ 
+ 2025-08-06  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR bootstrap/121386
+ 	* Makefile.in (gengtype-lex.cc): Append #define FLEX_SCANNER,
+ 	#include "system.h" and #undef FLEX_SCANNER to the prepended lines.
+ 	* gengtype-lex.l: Remove inclusion of config.h or bconfig.h, system.h
+ 	and definition of malloc/realloc from %{} section.
+ 
+ 2025-08-06  Kito Cheng  <kito.cheng@sifive.com>
+ 
+ 	* config/riscv/arch-canonicalize: Read extension data from
+ 	riscv-ext*.def and adding unittest.
+ 
+ 2025-08-06  Kito Cheng  <kito.cheng@sifive.com>
+ 
+ 	* common/config/riscv/riscv-common.cc (riscv_expand_arch):
+ 	Ignore `unset`.
+ 	* config/riscv/riscv.h (OPTION_DEFAULT_SPECS): Handle
+ 	`-march=unset`.
+ 	(ARCH_UNSET_CLEANUP_SPECS): New.
+ 	(DRIVER_SELF_SPECS): Handle -march=unset.
+ 	* doc/invoke.texi (RISC-V Options): Update documentation for
+ 	`-march=unset`.
+ 
+ 2025-08-06  Kwok Cheung Yeung  <kcyeung@baylibre.com>
+ 
+ 	* gimplify.cc (remove_unused_omp_iterator_vars): Display unused
+ 	variable warning for 'to' and 'from' clauses.
+ 	(gimplify_scan_omp_clauses): Add argument for iterator loop sequence.
+ 	Gimplify the clause decl and size into the iterator loop if iterators
+ 	are used.
+ 	(gimplify_omp_workshare): Add argument for iterator loops sequence
+ 	in call to gimplify_scan_omp_clauses.
+ 	(gimplify_omp_target_update): Call remove_unused_omp_iterator_vars and
+ 	build_omp_iterators_loops.  Add loop sequence as argument when calling
+ 	gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses and building
+ 	the Gimple statement.
+ 	* tree-pretty-print.cc (dump_omp_clause): Call dump_omp_iterators
+ 	for to/from clauses with iterators.
+ 	* tree.cc (omp_clause_num_ops): Add extra operand for OMP_CLAUSE_FROM
+ 	and OMP_CLAUSE_TO.
+ 	* tree.h (OMP_CLAUSE_HAS_ITERATORS): Add check for OMP_CLAUSE_TO and
+ 	OMP_CLAUSE_FROM.
+ 	(OMP_CLAUSE_ITERATORS): Likewise.
+ 
+ 2025-08-06  Kwok Cheung Yeung  <kcyeung@baylibre.com>
+ 	    Andrew Stubbs  <ams@baylibre.com>
+ 
+ 	* gimple-pretty-print.cc (dump_gimple_omp_target): Print expanded
+ 	iterator loops.
+ 	* gimple.cc (gimple_build_omp_target): Add argument for iterator
+ 	loops sequence.  Initialize iterator loops field.
+ 	* gimple.def (GIMPLE_OMP_TARGET): Set GSS symbol to GSS_OMP_TARGET.
+ 	* gimple.h (gomp_target): Set GSS symbol to GSS_OMP_TARGET.  Add extra
+ 	field for iterator loops.
+ 	(gimple_build_omp_target): Add argument for iterator loops sequence.
+ 	(gimple_omp_target_iterator_loops): New.
+ 	(gimple_omp_target_iterator_loops_ptr): New.
+ 	(gimple_omp_target_set_iterator_loops): New.
+ 	* gimplify.cc (find_var_decl): New.
+ 	(copy_omp_iterator): New.
+ 	(remap_omp_iterator_var_1): New.
+ 	(remap_omp_iterator_var): New.
+ 	(remove_unused_omp_iterator_vars): New.
+ 	(struct iterator_loop_info_t): New type.
+ 	(iterator_loop_info_map_t): New type.
+ 	(build_omp_iterators_loops): New.
+ 	(enter_omp_iterator_loop_context_1): New.
+ 	(enter_omp_iterator_loop_context): New.
+ 	(enter_omp_iterator_loop_context): New.
+ 	(exit_omp_iterator_loop_context): New.
+ 	(gimplify_adjust_omp_clauses): Add argument for iterator loop
+ 	sequence.  Gimplify the clause decl and size into the iterator
+ 	loop if iterators are used.
+ 	(gimplify_omp_workshare): Call remove_unused_omp_iterator_vars and
+ 	build_omp_iterators_loops for OpenMP target expressions.  Add
+ 	loop sequence as argument when calling gimplify_adjust_omp_clauses
+ 	and building the Gimple statement.
+ 	* gimplify.h (enter_omp_iterator_loop_context): New prototype.
+ 	(exit_omp_iterator_loop_context): New prototype.
+ 	* gsstruct.def (GSS_OMP_TARGET): New.
+ 	* omp-low.cc (lower_omp_map_iterator_expr): New.
+ 	(lower_omp_map_iterator_size): New.
+ 	(finish_omp_map_iterators): New.
+ 	(lower_omp_target): Add sorry if iterators used with deep mapping.
+ 	Call lower_omp_map_iterator_expr before assigning to sender ref.
+ 	Call lower_omp_map_iterator_size before setting the size.  Insert
+ 	iterator loop sequence before the statements for the target clause.
+ 	* tree-nested.cc (convert_nonlocal_reference_stmt): Walk the iterator
+ 	loop sequence of OpenMP target statements.
+ 	(convert_local_reference_stmt): Likewise.
+ 	(convert_tramp_reference_stmt): Likewise.
+ 	* tree-pretty-print.cc (dump_omp_iterators): Dump extra iterator
+ 	information if present.
+ 	(dump_omp_clause): Call dump_omp_iterators for iterators in map
+ 	clauses.
+ 	* tree.cc (omp_clause_num_ops): Add operand for OMP_CLAUSE_MAP.
+ 	(walk_tree_1): Do not walk last operand of OMP_CLAUSE_MAP.
+ 	* tree.h (OMP_CLAUSE_HAS_ITERATORS): New.
+ 	(OMP_CLAUSE_ITERATORS): New.
+ 
+ 2025-08-05  H.J. Lu  <hjl.tools@gmail.com>
+ 
+ 	PR target/121410
+ 	* config/i386/i386-expand.cc (ix86_expand_set_or_cpymem): Use
+ 	STORE_MAX_PIECES to get the widest vector mode in vector loop
+ 	for memset.
+ 
+ 2025-08-05  Georg-Johann Lay  <avr@gjlay.de>
+ 
+ 	* config/avr/avr.cc (avr_rtx_costs_1) [SIGN_EXTEND]: Adjust cost.
+ 	* config/avr/avr.md (*sext.ashift<QIPSI:mode><HISI:mode>2): New
+ 	insn and a cc split.
+ 
+ 2025-08-05  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	PR target/121306
+ 	* config/i386/predicates.md (extract_operator): Replace with...
+ 	(extract_high_operator): ...this new predicate.
+ 	* config/i386/i386.md (*cmpqi_ext<mode>_1, *cmpqi_ext<mode>_2)
+ 	(*cmpqi_ext<mode>_3, *cmpqi_ext<mode>_4, *movstrictqi_ext<mode>_1)
+ 	(*extzv<mode>, *insvqi_2, *extendqi<SWI24:mode>_ext_1)
+ 	(*addqi_ext<mode>_1_slp, *addqi_ext<mode>_1_slp, *addqi_ext<mode>_0)
+ 	(*addqi_ext2<mode>_0, *addqi_ext<mode>_1, *<insn>qi_ext<mode>_2)
+ 	(*subqi_ext<mode>_1_slp, *subqi_ext<mode>_2_slp, *subqi_ext<mode>_0)
+ 	(*subqi_ext2<mode>_0, *subqi_ext<mode>_1, *testqi_ext<mode>_1)
+ 	(*testqi_ext<mode>_2, *<code>qi_ext<mode>_1_slp)
+ 	(*<code>qi_ext<mode>_2_slp. *<code>qi_ext<mode>_0)
+ 	(*<code>qi_ext2<mode>_0, *<code>qi_ext<mode>_1)
+ 	(*<code>qi_ext<mode>_1_cc, *<code>qi_ext<mode>_1_cc)
+ 	(*<code>qi_ext<mode>_2, *<code>qi_ext<mode>_3, *negqi_ext<mode>_1)
+ 	(*one_cmplqi_ext<mode>_1, *ashlqi_ext<mode>_1, *<insn>qi_ext<mode>_1)
+ 	(define_peephole2): Replace uses of extract_operator with
+ 	extract_high_operator, matching only the first operand.
+ 	Use zero_extract rather than match_op_dup when splitting.
+ 
+ 2025-08-05  Richard Biener  <rguenther@suse.de>
+ 
+ 	* tree-vectorizer.h (vect_relevant::hybrid): Remove.
+ 	* tree-vect-loop.cc (vect_analyze_loop_2): Do not call
+ 	vect_detect_hybrid_slp.
+ 	* tree-vect-slp.cc (maybe_push_to_hybrid_worklist): Remove.
+ 	(vect_detect_hybrid_slp): Likewise.
+ 
+ 2025-08-05  Georg-Johann Lay  <avr@gjlay.de>
+ 
+ 	PR target/121359
+ 	* config/avr/avr.h: Remove -mlra and remains of reload.
+ 	* config/avr/avr.cc: Same.
+ 	* config/avr/avr.md: Same.
+ 	* config/avr/avr-log.cc: Same.
+ 	* config/avr/avr-protos.h: Same.
+ 	* config/avr/avr.opt: Same.
+ 	* config/avr/avr.opt.urls: Same.
+ 
+ 2025-08-05  H.J. Lu  <hjl.tools@gmail.com>
+ 
+ 	PR target/121306
+ 	* config/i386/i386.md (*one_cmplqi_ext<mode>_1): Updated to
+ 	support the new pattern.
+ 
+ 2025-08-05  Richard Biener  <rguenther@suse.de>
+ 
+ 	PR tree-optimization/121395
+ 	* tree-vectorizer.h (_loop_vec_info::alternate_defs): New member.
+ 	(LOOP_VINFO_ALTERNATE_DEFS): New.
+ 	* tree-vect-stmts.cc (vect_stmt_relevant_p): Populate it.
+ 	(vectorizable_simd_clone_call): Do not register a SLP def
+ 	when there is none.
+ 	* tree-vect-slp.cc (vect_build_slp_tree_1): Allow a NULL
+ 	vectype when there's no LHS.  Allow all calls w/o LHS.
+ 	(vect_analyze_slp): Process LOOP_VINFO_ALTERNATE_DEFS as
+ 	SLP graph entries.
+ 	(vect_make_slp_decision): Handle a NULL SLP_TREE_VECTYPE.
+ 	(vect_slp_analyze_node_operations_1): Likewise.
+ 	(vect_schedule_slp_node): Likewise.
+ 
+ 2025-08-05  Richard Biener  <rguenther@suse.de>
+ 
+ 	* tree-vectorizer.h (enum slp_vect_type): Rename loop_vect
+ 	to not_vect, clarify docs.
+ 	(HYBRID_SLP_STMT): Remove.
+ 	* tree-vectorizer.cc (vec_info::new_stmt_vec_info): Adjust.
+ 	* tree-vect-loop.cc (vect_analyze_loop_2): Likewise.
+ 
+ 2025-08-05  Richard Biener  <rguenther@suse.de>
+ 
+ 	* tree-vect-data-refs.cc (vect_get_data_access_cost): Use
+ 	ncopies == 1.
+ 	* tree-vect-slp.cc (vect_remove_slp_scalar_calls): Remove
+ 	hybrid/loop SLP skip.
+ 	* tree-vect-stmts.cc (vectorizable_store): Remove pure SLP assert.
+ 
+ 2025-08-05  Richard Biener  <rguenther@suse.de>
+ 
+ 	PR tree-optimization/121382
+ 	* tree-ssa-loop-ivopts.cc (create_new_iv): Rewrite the IV
+ 	step to defined form.
+ 
+ 2025-08-05  Richard Biener  <rguenther@suse.de>
+ 
+ 	PR tree-optimization/121370
+ 	* tree-scalar-evolution.cc (scev_dfs::add_to_evolution_1):
+ 	Avoid UB integer overflow in accumulating CHREC_RIGHT.
+ 
+ 2025-08-05  Yang Yujie  <yangyujie@loongson.cn>
+ 
+ 	* expr.cc (expand_expr_real_1): Do not call
+ 	reduce_to_bit_field_precision if the target assumes the _BitInt
+ 	results to be already extended.
+ 	(EXTEND_BITINT): Same.
+ 	* expr.h (bitint_extended): Declare the cache variable.
+ 	* function.cc (prepare_function_start): Initialize it.
+ 
+ 2025-08-05  Yang Yujie  <yangyujie@loongson.cn>
+ 
+ 	* explow.cc (promote_function_mode): Add a case for
+ 	small/medium _BitInts.
+ 	(promote_mode): Same.
+ 
+ 2025-08-05  Gerald Pfeifer  <gerald@pfeifer.com>
+ 
+ 	PR target/69374
+ 	* doc/install.texi (Configuration): Mark up atexit as code.
+ 
+ 2025-08-05  Pan Li  <pan2.li@intel.com>
+ 
+ 	* config/riscv/riscv.cc (riscv_expand_xmode_usmul): Take
+ 	umulhu for high bits mul result.
+ 
+ 2025-08-04  Hans-Peter Nilsson  <hp@bitrange.com>
+ 
+ 	* defaults.h (MAX_FIXED_MODE_SIZE): Default to 2 * BITS_PER_WORD
+ 	for larger-than-32-bitters.
+ 	* doc/tm.texi.in (MAX_FIXED_MODE_SIZE): Adjust accordingly.  Tweak
+ 	wording.
+ 	* doc/tm.texi: Regenerate.
+ 
+ 2025-08-04  David Malcolm  <dmalcolm@redhat.com>
+ 
+ 	* dump-context.h: Convert "enum optinfo_item_kind" into
+ 	"enum class kind" within class optinfo_item.
+ 	* dumpfile.cc: Likewise.  Use "auto" in a few places.
+ 	Convert "enum optinfo_kind" to "enum class kind" within
+ 	class optinfo.
+ 	* opt-problem.cc: Likewise.
+ 	* optinfo-emit-json.cc: Likewise.
+ 	* optinfo.cc: Likewise.
+ 	* optinfo.h: Likewise.
+ 
+ 2025-08-04  David Malcolm  <dmalcolm@redhat.com>
+ 
+ 	PR diagnostics/116253
+ 	* diagnostics/context.cc (context::set_nesting_level): New.
+ 	* diagnostics/context.h (context::set_nesting_level): New decl.
+ 	* doc/libgdiagnostics/topics/compatibility.rst
+ 	(LIBGDIAGNOSTICS_ABI_5): New.
+ 	* doc/libgdiagnostics/topics/physical-locations.rst
+ 	(diagnostic_manager_set_debug_physical_locations): New.
+ 	* libgdiagnostics++.h (manager::set_debug_physical_locations):
+ 	New.
+ 	* libgdiagnostics-private.h
+ 	(private_diagnostic_set_nesting_level): New decl.
+ 	* libgdiagnostics.cc (diagnostic_manager::diagnostic_manager):
+ 	Initialize m_debug_physical_locations.
+ 	(diagnostic_manager::new_location_from_file_and_line): Add debug
+ 	printing.
+ 	(diagnostic_manager::new_location_from_file_line_column):
+ 	Likewise.
+ 	(diagnostic_manager::new_location_from_range): Likewise.
+ 	(diagnostic_manager::set_debug_physical_locations): New.
+ 	(diagnostic_manager::ensure_linemap_for_file_and_line): Avoid
+ 	redundant calls to linemap_add.
+ 	(diagnostic_manager::new_location): Add debug printing.
+ 	(diagnostic_manager::m_debug_physical_locations): New field.
+ 	(diagnostic::diagnostic): Initialize m_nesting_level.
+ 	(diagnostic::get_nesting_level): New accessor.
+ 	(diagnostic::set_nesting_level): New.
+ 	(diagnostic::m_nesting_level): New field.
+ 	(diagnostic_manager::emit_va): Set and reset the nesting level
+ 	of the context from that of the diagnostic.
+ 	(diagnostic_manager_set_debug_physical_locations): New.
+ 	(private_diagnostic_set_nesting_level): New.
+ 	* libgdiagnostics.h
+ 	(diagnostic_manager_set_debug_physical_locations): New decl.
+ 	* libgdiagnostics.map (LIBGDIAGNOSTICS_ABI_5): New.
+ 	* libsarifreplay.cc (sarif_replayer::handle_result_obj): Support
+ 	the "nestingLevel" property.
+ 	* libsarifreplay.h (replay_options::m_debug_physical_locations):
+ 	New field.
+ 	* sarif-replay.cc: Add -fdebug-physical-locations.
+ 
+ 2025-08-04  David Malcolm  <dmalcolm@redhat.com>
+ 
+ 	PR diagnostics/116792
+ 	* diagnostics/html-sink.cc
+ 	(html_builder::make_element_for_diagnostic): Don't add the
+ 	metadata element if it's empty.
+ 	(html_builder::make_element_for_metadata): Return null rather than
+ 	an empty element.
+ 
+ 2025-08-04  David Malcolm  <dmalcolm@redhat.com>
+ 
+ 	* diagnostics/context.h: Move struct counters to its own header
+ 	and include it.
+ 	* diagnostics/counters.h: New file, from the above.
+ 
+ 2025-08-04  David Malcolm  <dmalcolm@redhat.com>
+ 
+ 	* diagnostics/context.h: Split struct source_printing_options out
+ 	into "diagnostics/source-printing-options.h" and include it.
+ 	* diagnostics/source-printing-options.h: New file, from the above.
+ 
+ 2025-08-04  David Malcolm  <dmalcolm@redhat.com>
+ 
+ 	* diagnostics/context.cc: Update for renaming of option_manager to
+ 	option_id_manager and of context::m_option_mgr to
+ 	context::m_option_id_mgr.
+ 	* diagnostics/context.h: Likewise, moving class declaration to a
+ 	new diagnostics/option-id-manager.h.
+ 	* diagnostics/lazy-paths.cc: Likewise.
+ 	* diagnostics/option-id-manager.h: New file, from material in
+ 	diagnostics/context.h.
+ 	* lto-wrapper.cc: Update for renaming of option_manager to
+ 	option_id_manager.
+ 	* opts-common.cc: Likewise.
+ 	* opts-diagnostic.h: Likewise.
+ 	* opts.cc: Likewise.
+ 	* toplev.cc: Likewise.
+ 
+ 2025-08-04  David Malcolm  <dmalcolm@redhat.com>
+ 
+ 	* diagnostics/buffering.h: Update comment to refer to output sinks
+ 	rather than output formats.
+ 
+ 2025-08-04  David Malcolm  <dmalcolm@redhat.com>
+ 
+ 	* gimple-warn-recursion.cc (pass_warn_recursion::execute): Add
+ 	missing auto_diagnostic_group.
+ 
+ 2025-08-04  Konstantinos Eleftheriou  <konstantinos.eleftheriou@vrull.eu>
+ 
+ 	PR rtl-optimization/121303
+ 	* avoid-store-forwarding.cc (is_store_forwarding): Add check
+ 	for `off_val` in `is_store_forwarding`.
+ 
+ 2025-08-04  Richard Biener  <rguenther@suse.de>
+ 
+ 	* tree-vect-slp.cc (vect_analyze_slp): When analyzing a loop
+ 	and slp instance discovery fails, immediately fail the whole
+ 	process.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	* config/aarch64/aarch64-sve-builtins.cc
+ 	(function_expander::expand): Assert that the return value
+ 	has an appropriate mode.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	* config/aarch64/aarch64-protos.h
+ 	(aarch64_convert_sve_data_to_pred): Remove the mode argument.
+ 	* config/aarch64/aarch64.cc
+ 	(aarch64_sve_emit_int_cmp): Allow PRED_MODE to be VNx16BI or
+ 	the natural predicate mode for the data mode.
+ 	(aarch64_convert_sve_data_to_pred): Remove the mode argument
+ 	and instead always create a VNx16BI result.
+ 	(aarch64_expand_sve_const_pred): Update call accordingly.
+ 	* config/aarch64/aarch64-sve-builtins-base.cc
+ 	(svdupq_impl::expand): Likewise, ensuring that the result
+ 	has mode VNx16BI.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	* config/aarch64/aarch64-protos.h
+ 	(aarch64_emit_sve_pred_vec_duplicate): Declare.
+ 	* config/aarch64/aarch64.cc
+ 	(aarch64_emit_sve_pred_vec_duplicate): New function.
+ 	* config/aarch64/aarch64-sve.md (vec_duplicate<PRED_ALL:mode>): Use it.
+ 	* config/aarch64/aarch64-sve-builtins-base.cc
+ 	(svdup_impl::expand): Handle boolean values specially.  Check for
+ 	constants and fall back on aarch64_emit_sve_pred_vec_duplicate
+ 	for the variable case, ensuring that the result has mode VNx16BI.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	* config/aarch64/iterators.md (PNEXT_ONLY): New int iterator.
+ 	* config/aarch64/aarch64-sve.md
+ 	(@aarch64_sve_<sve_pred_op><mode>): Restrict SVE_PITER pattern
+ 	to VNx16BI_ONLY.
+ 	(@aarch64_sve_<sve_pred_op><mode>): New PNEXT_ONLY pattern for
+ 	PRED_HSD.
+ 	(*aarch64_sve_<sve_pred_op><mode>): Likewise.
+ 	(*aarch64_sve_<sve_pred_op><mode>_cc): Likewise.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	* config/aarch64/aarch64-sve2.md (@aarch64_pred_<sve_int_op><mode>):
+ 	Split SVE2_MATCH pattern into a VNx16QI_ONLY define_ins and a
+ 	VNx8HI_ONLY define_expand.  Use a VNx16BI destination for the latter.
+ 	(*aarch64_pred_<sve_int_op><mode>): New SVE2_MATCH pattern for
+ 	VNx8HI_ONLY.
+ 	(*aarch64_pred_<sve_int_op><mode>_cc): Likewise.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	* config/aarch64/aarch64-sve.md (@aarch64_pred_fac<cmp_op><mode>):
+ 	Replace with...
+ 	(@aarch64_pred_fac<cmp_op><mode>_acle): ...this new expander.
+ 	(*aarch64_pred_fac<cmp_op><mode>_strict_acle): New pattern.
+ 	* config/aarch64/aarch64-sve-builtins-base.cc
+ 	(svac_impl::expand): Update accordingly.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	* config/aarch64/aarch64-sve.md (@aarch64_pred_fcm<cmp_op><mode>_acle)
+ 	(*aarch64_pred_fcm<cmp_op><mode>_acle, @aarch64_pred_fcmuo<mode>_acle)
+ 	(*aarch64_pred_fcmuo<mode>_acle): New patterns.
+ 	* config/aarch64/aarch64-sve-builtins-base.cc
+ 	(svcmp_impl::expand, svcmpuo_impl::expand): Use them.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	* config/aarch64/aarch64-sve.md (@aarch64_pred_cmp<cmp_op><mode>_wide):
+ 	Split into VNx16QI_ONLY and SVE_FULL_HSI patterns.  Use VNx16BI
+ 	results for both.
+ 	(*aarch64_pred_cmp<cmp_op><mode>_wide): New pattern.
+ 	(*aarch64_pred_cmp<cmp_op><mode>_wide_cc): Likewise.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	* config/aarch64/aarch64-sve.md
+ 	(*aarch64_pred_cmp<cmp_op><mode>_wide_cc): Turn into a
+ 	define_insn_and_rewrite and rewrite the governing predicate
+ 	of the comparison so that it is identical to the PTEST's.
+ 	(*aarch64_pred_cmp<cmp_op><mode>_wide_ptest): Likewise.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	* config/aarch64/aarch64-sve.md (@aarch64_pred_cmp<cmp_op><mode>_wide)
+ 	(*aarch64_pred_cmp<cmp_op><mode>_wide_cc): Use <VPRED> instead of
+ 	VNx16BI for the governing predicate.
+ 	(*aarch64_pred_cmp<cmp_op><mode>_wide_ptest): Likewise.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	* config/aarch64/aarch64-sve.md (@aarch64_pred_cmp<cmp_op><mode>_acle)
+ 	(*aarch64_pred_cmp<cmp_op><mode>_acle, *cmp<cmp_op><mode>_acle_cc)
+ 	(*cmp<cmp_op><mode>_acle_and): New patterns that yield VNx16BI
+ 	results for all element types.
+ 	* config/aarch64/aarch64-sve-builtins-base.cc
+ 	(svcmp_impl::expand): Use them.
+ 	(svcmp_wide_impl::expand): Likewise when implementing an svcmp_wide
+ 	against an in-range constant.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	* config/aarch64/aarch64-sve.md (@aarch64_sve_punpk<perm_hilo>_acle)
+ 	(*aarch64_sve_punpk<perm_hilo>_acle): New patterns.
+ 	* config/aarch64/aarch64-sve-builtins-base.cc
+ 	(svunpk_impl::expand): Use them for boolean svunpk*.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	PR target/121294
+ 	* config/aarch64/aarch64.md (UNSPEC_REV_PRED): New unspec.
+ 	* config/aarch64/aarch64-sve.md (@aarch64_sve_rev<mode>_acle)
+ 	(*aarch64_sve_rev<mode>_acle): New patterns.
+ 	* config/aarch64/aarch64-sve-builtins-base.cc
+ 	(svrev_impl::expand): Use the new patterns for boolean svrev.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	PR target/121294
+ 	* config/aarch64/iterators.md (UNSPEC_TRN1_CONV): Delete.
+ 	(UNSPEC_PERMUTE_PRED): New unspec.
+ 	* config/aarch64/aarch64-sve.md (@aarch64_sve_trn1_conv<mode>):
+ 	Replace with...
+ 	(@aarch64_sve_<perm_insn><mode>_acle)
+ 	(*aarch64_sve_<perm_insn><mode>_acle): ...these new patterns.
+ 	* config/aarch64/aarch64.cc (aarch64_expand_sve_const_pred_trn):
+ 	Update accordingly.
+ 	* config/aarch64/aarch64-sve-builtins-functions.h
+ 	(binary_permute::expand): Use the new _acle patterns for
+ 	predicate operations.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	PR testsuite/121118
+ 	* config/aarch64/iterators.md (VNx16BI_ONLY): New mode iterator.
+ 	* config/aarch64/predicates.md (aarch64_ptrue_all_operand): New
+ 	predicate.
+ 	* config/aarch64/aarch64-sve.md
+ 	(@aarch64_sve_while_<while_optab_cmp><GPI:mode><VNx16BI_ONLY:mode>_acle)
+ 	(@aarch64_sve_while_<while_optab_cmp><GPI:mode><PRED_HSD:mode>_acle)
+ 	(*aarch64_sve_while_<while_optab_cmp><GPI:mode><PRED_HSD:mode>_acle)
+ 	(*while_<while_optab_cmp><GPI:mode><PRED_HSD:mode>_acle_cc): New
+ 	patterns.
+ 	* config/aarch64/aarch64-sve-builtins-functions.h
+ 	(while_comparison::expand): Use the new _acle patterns that
+ 	always return a VNx16BI.
+ 	* config/aarch64/aarch64-sve-builtins-sve2.cc
+ 	(svwhilerw_svwhilewr_impl::expand): Likewise.
+ 	* config/aarch64/aarch64.cc
+ 	(aarch64_sve_move_pred_via_while): Likewise.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	PR target/121293
+ 	* config/aarch64/aarch64-sve-builtins-base.cc (svdupq_lane::expand):
+ 	Use aarch64_sve_reinterpret instead of subregs.  Explicitly
+ 	reinterpret the result back to the required mode, rather than
+ 	leaving the caller to take a subreg.
+ 
+ 2025-08-04  Richard Biener  <rguenther@suse.de>
+ 
+ 	PR tree-optimization/121362
+ 	* tree-ssa-sccvn.cc (vn_reference_lookup_3): Generalize
+ 	aggregate copy handling.
+ 
+ 2025-08-04  Filip Kastl  <fkastl@suse.cz>
+ 
+ 	* doc/invoke.texi: Add remark about -options being documented
+ 	under -fdump-tree.  Remove remark about -graph working only for
+ 	RTL.
+ 
+ 2025-08-04  H.J. Lu  <hjl.tools@gmail.com>
+ 
+ 	PR target/120941
+ 	* config/i386/i386-features.cc (x86_cse_kind): Moved before
+ 	ix86_place_single_vector_set.
+ 	(redundant_load): Likewise.
+ 	(ix86_place_single_vector_set): Replace the last argument to the
+ 	pointer to redundant_load.  For X86_CSE_VEC_DUP, don't place the
+ 	vector set outside of the loop to avoid extra spills.
+ 	(remove_redundant_vector_load): Pass load to
+ 	ix86_place_single_vector_set.
+ 
+ 2025-08-03  Georg-Johann Lay  <avr@gjlay.de>
+ 
+ 	* config/avr/avr.md (define_insn_and_split) [reload_completed]:
+ 	For splits that just append a (clobber (reg:CC REG_CC)) to
+ 	the pattern, use avr_add_ccclobber (curr_insn) instead of
+ 	repeating the original pattern.
+ 	* config/avr/avr-dimode.md: Same.
+ 	* config/avr/avr-fixed.md: Same.
+ 
+ 2025-08-03  Georg-Johann Lay  <avr@gjlay.de>
+ 
+ 	* config/avr/avr.cc (avr_add_ccclobber): New function.
+ 	* config/avr/avr-protos.h (avr_add_ccclobber): New proto.
+ 	(DONE_ADD_CCC): New define.
+ 
+ 2025-08-03  Richard Biener  <rguenther@suse.de>
+ 
+ 	PR tree-optimization/90242
+ 	* tree-ssa-sccvn.cc (vn_reference_compute_hash): Use
+ 	poly_offset_int for offset accumulation.  For hashing
+ 	truncate to 64 bits and also hash 64 bits.
+ 	(vn_reference_eq): Likewise.
+ 
  2025-08-02  Gerald Pfeifer  <gerald@pfeifer.com>
  
  	PR target/69374
diff -Nrcpad gcc-16-20250803/gcc/DATESTAMP gcc-16-20250810/gcc/DATESTAMP
*** gcc-16-20250803/gcc/DATESTAMP	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/gcc/DATESTAMP	Sun Aug 10 22:32:06 2025
***************
*** 1 ****
! 20250803
--- 1 ----
! 20250810
diff -Nrcpad gcc-16-20250803/gcc/Makefile.in gcc-16-20250810/gcc/Makefile.in
*** gcc-16-20250803/gcc/Makefile.in	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/gcc/Makefile.in	Sun Aug 10 22:32:06 2025
*************** C_STRICT_WARN = @c_strict_warn@
*** 187,194 ****
  
  NOEXCEPTION_FLAGS = @noexception_flags@
  
- ALIASING_FLAGS = @aliasing_flags@
- 
  # This is set by --disable-maintainer-mode (default) to "#"
  # FIXME: 'MAINT' will always be set to an empty string, no matter if
  # --disable-maintainer-mode is used or not.  This is because the
--- 187,192 ----
*************** OBJS-libcommon = \
*** 1858,1863 ****
--- 1856,1862 ----
  	diagnostics/color.o \
  	diagnostics/context.o \
  	diagnostics/digraphs.o \
+ 	diagnostics/dumping.o \
  	diagnostics/file-cache.o \
  	diagnostics/output-spec.o \
  	diagnostics/html-sink.o \
*************** gengtype-lex.cc : gengtype-lex.l
*** 3402,3407 ****
--- 3401,3409 ----
  	  echo '#else'                     >> $@.tmp; \
  	  echo '#include "bconfig.h"'      >> $@.tmp; \
  	  echo '#endif'                    >> $@.tmp; \
+ 	  echo '#define FLEX_SCANNER'      >> $@.tmp; \
+ 	  echo '#include "system.h"'       >> $@.tmp; \
+ 	  echo '#undef FLEX_SCANNER'       >> $@.tmp; \
  	  cat $@ >> $@.tmp; \
  	  mv $@.tmp $@; \
  	}
diff -Nrcpad gcc-16-20250803/gcc/ada/ChangeLog gcc-16-20250810/gcc/ada/ChangeLog
*** gcc-16-20250803/gcc/ada/ChangeLog	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/gcc/ada/ChangeLog	Sun Aug 10 22:32:06 2025
***************
*** 1,3 ****
--- 1,118 ----
+ 2025-08-04  Viljar Indus  <indus@adacore.com>
+ 
+ 	* contracts.adb: Use Is_Ignored_In_Codegen instead of just
+ 	using Is_Ignored.
+ 	* exp_ch6.adb: Likewise.
+ 	* exp_prag.adb: Likewise.
+ 	* exp_util.adb: Likewise.
+ 	* frontend.adb: Avoid removal of ignored nodes in GNATProve_Mode.
+ 	* gnat1drv.adb: Avoid forcing Assertions_Enabled in GNATProve_Mode.
+ 	* lib-writ.adb (Write_With_File_Names): Avoid early exit
+ 	with ignored entities in GNATProve_Mode.
+ 	* lib-xref.adb: Likewise.
+ 	* opt.adb: Remove check for Assertions_Enabled.
+ 	* sem_attr.adb: Use Is_Ignored_In_Codegen instead of Is_Ignored.
+ 	* sem_ch13.adb: Likewise. Additionally always add predicates in
+ 	GNATProve_Mode.
+ 	* sem_prag.adb: Likewise. Additionally remove modifications
+ 	to applied policies in GNATProve_Mode.
+ 	* sem_util.adb (Is_Ignored_In_Codegen): New function that overrides
+ 	Is_Ignored in GNATProve_Mode and Codepeer_Mode.
+ 	(Is_Ignored_Ghost_Pragma_In_Codegen): Likewise for
+ 	Is_Ignored_Ghost_Pragma.
+ 	(Is_Ignored_Ghost_Entity_In_Codegen): Likewise for
+ 	Is_Ignored_Ghost_Entity.
+ 	(Policy_In_List): Remove overriding of policies in GNATProve_Mode.
+ 	* sem_util.ads: Add specs for new functions.
+ 	* (Predicates_Enabled): Always generate predicates in
+ 	GNATProve_Mode.
+ 
+ 2025-08-04  Bob Duff  <duff@adacore.com>
+ 
+ 	* treepr.adb (Print_Node_Ref): Protect against
+ 	Entity (N) being empty before calling
+ 	Compile_Time_Known_Value.
+ 
+ 2025-08-04  Viljar Indus  <indus@adacore.com>
+ 
+ 	* sem_prag.adb (Validate_Compile_Time_Warning_Errors):
+ 	Check if the original compile time pragma was replaced and
+ 	validate the original node instead.
+ 
+ 2025-08-04  Viljar Indus  <indus@adacore.com>
+ 
+ 	* sem_prag.adb (Validate_Compile_Time_Warning_Or_Error):
+ 	simplify the implementation.
+ 
+ 2025-08-04  Steve Baird  <baird@adacore.com>
+ 
+ 	* exp_ch6.adb (Apply_Access_Discrims_Accessibility_Check): If the
+ 	accessibility level being checked is known statically, then
+ 	statically check it against the level of the function being
+ 	returned from.
+ 
+ 2025-08-04  Viljar Indus  <indus@adacore.com>
+ 
+ 	* atree.adb: update references to Ghost_Mode.
+ 	* exp_ch3.adb: use a structure type to store all of the existing
+ 	ghost mode related state variables.
+ 	* exp_disp.adb: Likewise.
+ 	* exp_spark.adb: Likewise.
+ 	* exp_util.adb: Likewise.
+ 	* expander.adb: Likewise.
+ 	* freeze.adb: Likewise and replace references to existing ghost
+ 	mode variables.
+ 	* ghost.adb (Install_Ghost_Region): install the changes of
+ 	the region in to the new Ghost_Config structure.
+ 	(Restore_Ghost_Region): Use the new Ghost_Config instead.
+ 	In general replace all references to the existing ghost mode
+ 	variables with the new structure equivalent.
+ 	* ghost.ads (Restore_Ghost_Region): update the spec.
+ 	* opt.ads (Ghost_Config_Type): A new type that has two of the
+ 	previous ghost code related global variables as memembers -
+ 	Ghost_Mode and Ignored_Ghost_Region.
+ 	(Ghost_Config) New variable to store the previous Ghost_Mode and
+ 	Ignored_Ghost_Region info.
+ 	* rtsfind.adb: Replace references to existing ghost mode variables.
+ 	* sem.adb: Likewise.
+ 	* sem_ch12.adb: Likewise.
+ 	* sem_ch13.adb: Likewise.
+ 	* sem_ch3.adb: Likewise.
+ 	* sem_ch5.adb: Likewise.
+ 	* sem_ch6.adb: Likewise.
+ 	* sem_ch7.adb: Likewise.
+ 	* sem_prag.adb: Likewise.
+ 	* sem_util.adb: Likewise.
+ 
+ 2025-08-04  Steve Baird  <baird@adacore.com>
+ 
+ 	* freeze.adb (Freeze_Profile): Do not emit a warning stating that
+ 	a formal parameter's size is 8 if the parameter's size is not 8.
+ 
+ 2025-08-04  Viljar Indus  <indus@adacore.com>
+ 
+ 	* table.adb (Max): Move variable to the body and initialize
+ 	it with the same value as in the Init function.
+ 	* table.ads (Max): Likewise.
+ 
+ 2025-08-04  Bob Duff  <duff@adacore.com>
+ 
+ 	* par.adb: Move and rewrite some comments.
+ 	(Util): Shared code and comments for dealing with
+ 	defining_identifier_lists.
+ 	* par-util.adb (Append): Shared code for appending
+ 	one identifier onto Defining_Identifiers.
+ 	(P_Def_Ids): Shared code for parsing a defining_identifier_list.
+ 	Unfortunately, this is not used in all cases, because some of
+ 	them mix in sophisticated error recovery, which we do not
+ 	modify here.
+ 	* par-ch12.adb (P_Formal_Object_Declarations):
+ 	Use Defining_Identifiers and related code.
+ 	* par-ch3.adb (P_Identifier_Declarations): Likewise.
+ 	(P_Known_Discriminant_Part_Opt): Likewise.
+ 	(P_Component_Items): Likewise.
+ 	* par-ch6.adb (P_Formal_Part): Likewise.
+ 
  2025-07-31  Eric Botcazou  <ebotcazou@gcc.gnu.org>
  
  	Revert:
diff -Nrcpad gcc-16-20250803/gcc/ada/atree.adb gcc-16-20250810/gcc/ada/atree.adb
*** gcc-16-20250803/gcc/ada/atree.adb	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/gcc/ada/atree.adb	Sun Aug 10 22:32:06 2025
*************** package body Atree is
*** 1802,1813 ****
  
        --  The Ghost node is created within a Ghost region
  
!       if Ghost_Mode = Check then
           if Nkind (N) in N_Entity then
              Set_Is_Checked_Ghost_Entity (N);
           end if;
  
!       elsif Ghost_Mode = Ignore then
           if Nkind (N) in N_Entity then
              Set_Is_Ignored_Ghost_Entity (N);
           end if;
--- 1802,1813 ----
  
        --  The Ghost node is created within a Ghost region
  
!       if Ghost_Config.Ghost_Mode = Check then
           if Nkind (N) in N_Entity then
              Set_Is_Checked_Ghost_Entity (N);
           end if;
  
!       elsif Ghost_Config.Ghost_Mode = Ignore then
           if Nkind (N) in N_Entity then
              Set_Is_Ignored_Ghost_Entity (N);
           end if;
diff -Nrcpad gcc-16-20250803/gcc/ada/contracts.adb gcc-16-20250810/gcc/ada/contracts.adb
*** gcc-16-20250803/gcc/ada/contracts.adb	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/gcc/ada/contracts.adb	Sun Aug 10 22:32:06 2025
*************** package body Contracts is
*** 2714,2723 ****
  
        procedure Append_Enabled_Item (Item : Node_Id; List : in out List_Id) is
        begin
!          --  Do not chain ignored or disabled pragmas
  
           if Nkind (Item) = N_Pragma
!            and then (Is_Ignored (Item) or else Is_Disabled (Item))
           then
              null;
  
--- 2714,2724 ----
  
        procedure Append_Enabled_Item (Item : Node_Id; List : in out List_Id) is
        begin
!          --  Do not chain ignored or disabled pragmas. Note that disabled
!          --  pragmas are also considered ignored.
  
           if Nkind (Item) = N_Pragma
!            and then Is_Ignored_In_Codegen (Item)
           then
              null;
  
diff -Nrcpad gcc-16-20250803/gcc/ada/exp_ch3.adb gcc-16-20250810/gcc/ada/exp_ch3.adb
*** gcc-16-20250803/gcc/ada/exp_ch3.adb	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/gcc/ada/exp_ch3.adb	Sun Aug 10 22:32:06 2025
*************** package body Exp_Ch3 is
*** 9601,9608 ****
  
        Def_Id : constant Entity_Id := Entity (N);
  
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
        Result : Boolean := False;
--- 9601,9607 ----
  
        Def_Id : constant Entity_Id := Entity (N);
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
        Result : Boolean := False;
*************** package body Exp_Ch3 is
*** 9956,9968 ****
           end if;
        end if;
  
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
  
        return Result;
  
     exception
        when RE_Not_Available =>
!          Restore_Ghost_Region (Saved_GM, Saved_IGR);
  
           return False;
     end Freeze_Type;
--- 9955,9967 ----
           end if;
        end if;
  
!       Restore_Ghost_Region (Saved_Ghost_Config);
  
        return Result;
  
     exception
        when RE_Not_Available =>
!          Restore_Ghost_Region (Saved_Ghost_Config);
  
           return False;
     end Freeze_Type;
diff -Nrcpad gcc-16-20250803/gcc/ada/exp_ch6.adb gcc-16-20250810/gcc/ada/exp_ch6.adb
*** gcc-16-20250803/gcc/ada/exp_ch6.adb	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/gcc/ada/exp_ch6.adb	Sun Aug 10 22:32:06 2025
*************** package body Exp_Ch6 is
*** 921,927 ****
       --  in accessibility.adb (which can cause the extra formal parameter
       --  needed for the check(s) generated here to be missing in the case
       --  of a tagged result type); this is a workaround and can
!      --  prevent generation of a required check.
  
        if No (Extra_Accessibility_Of_Result (Func)) then
           return;
--- 921,928 ----
       --  in accessibility.adb (which can cause the extra formal parameter
       --  needed for the check(s) generated here to be missing in the case
       --  of a tagged result type); this is a workaround and can
!      --  prevent generation of a required check (or even a required
!      --  legality check - see "statically too deep" check below).
  
        if No (Extra_Accessibility_Of_Result (Func)) then
           return;
*************** package body Exp_Ch6 is
*** 969,974 ****
--- 970,984 ----
                      Accessibility_Level (Discr_Exp, Level => Dynamic_Level);
                    Analyze (Discrim_Level);
  
+                   if Nkind (Discrim_Level) = N_Integer_Literal
+                     and then Intval (Discrim_Level) > Scope_Depth (Func)
+                   then
+                      Error_Msg_N
+                         ("level of type of access discriminant value of "
+                          & "return expression is statically too deep",
+                          Enclosing_Declaration_Or_Statement (Exp));
+                   end if;
+ 
                    Insert_Action (Exp,
                      Make_Raise_Program_Error (Loc,
                        Condition =>
*************** package body Exp_Ch6 is
*** 8089,8095 ****
                Get_Class_Wide_Pragma (Id, Pragma_Precondition);
  
           begin
!             if No (Prag) or else Is_Ignored (Prag) then
                 return;
              end if;
  
--- 8099,8105 ----
                Get_Class_Wide_Pragma (Id, Pragma_Precondition);
  
           begin
!             if No (Prag) or else Is_Ignored_In_Codegen (Prag) then
                 return;
              end if;
  
diff -Nrcpad gcc-16-20250803/gcc/ada/exp_disp.adb gcc-16-20250810/gcc/ada/exp_disp.adb
*** gcc-16-20250803/gcc/ada/exp_disp.adb	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/gcc/ada/exp_disp.adb	Sun Aug 10 22:32:06 2025
*************** package body Exp_Disp is
*** 4593,4600 ****
        Name_TSD          : constant Name_Id :=
                              New_External_Name (Tname, 'B', Suffix_Index => -1);
  
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
        AI                 : Elmt_Id;
--- 4593,4599 ----
        Name_TSD          : constant Name_Id :=
                              New_External_Name (Tname, 'B', Suffix_Index => -1);
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
        AI                 : Elmt_Id;
*************** package body Exp_Disp is
*** 6526,6532 ****
        Register_CG_Node (Typ);
  
     <<Leave>>
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
  
        return Result;
     end Make_DT;
--- 6525,6531 ----
        Register_CG_Node (Typ);
  
     <<Leave>>
!       Restore_Ghost_Region (Saved_Ghost_Config);
  
        return Result;
     end Make_DT;
diff -Nrcpad gcc-16-20250803/gcc/ada/exp_prag.adb gcc-16-20250810/gcc/ada/exp_prag.adb
*** gcc-16-20250803/gcc/ada/exp_prag.adb	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/gcc/ada/exp_prag.adb	Sun Aug 10 22:32:06 2025
*************** package body Exp_Prag is
*** 134,140 ****
        --      Analyze_xxx_In_Decl_Part). The second part of the analysis will
        --      not happen if the pragma is rewritten.
  
!       if Assertion_Expression_Pragma (Prag_Id) and then Is_Ignored (N) then
           return;
  
        --  Rewrite the pragma into a null statement when it is ignored using
--- 134,142 ----
        --      Analyze_xxx_In_Decl_Part). The second part of the analysis will
        --      not happen if the pragma is rewritten.
  
!       if Assertion_Expression_Pragma (Prag_Id)
!         and then Is_Ignored_In_Codegen (N)
!       then
           return;
  
        --  Rewrite the pragma into a null statement when it is ignored using
*************** package body Exp_Prag is
*** 143,149 ****
  
        elsif Should_Ignore_Pragma_Sem (N)
          or else (Prag_Id = Pragma_Default_Scalar_Storage_Order
!                   and then Ignore_Rep_Clauses)
        then
           Rewrite (N, Make_Null_Statement (Sloc (N)));
           return;
--- 145,151 ----
  
        elsif Should_Ignore_Pragma_Sem (N)
          or else (Prag_Id = Pragma_Default_Scalar_Storage_Order
!                  and then Ignore_Rep_Clauses)
        then
           Rewrite (N, Make_Null_Statement (Sloc (N)));
           return;
*************** package body Exp_Prag is
*** 480,486 ****
     begin
        --  Nothing to do if pragma is ignored
  
!       if Is_Ignored (N) then
           return;
        end if;
  
--- 482,488 ----
     begin
        --  Nothing to do if pragma is ignored
  
!       if Is_Ignored_In_Codegen (N) then
           return;
        end if;
  
*************** package body Exp_Prag is
*** 1837,1843 ****
        --  Do nothing if pragma is not enabled. If pragma is disabled, it has
        --  already been rewritten as a Null statement.
  
!       if Is_Ignored (CCs) then
           return;
  
        --  Guard against malformed contract cases
--- 1839,1845 ----
        --  Do nothing if pragma is not enabled. If pragma is disabled, it has
        --  already been rewritten as a Null statement.
  
!       if Is_Ignored_In_Codegen (CCs) then
           return;
  
        --  Guard against malformed contract cases
*************** package body Exp_Prag is
*** 2538,2544 ****
        --  Nothing to do when the pragma is ignored because its semantics are
        --  suppressed.
  
!       if Is_Ignored (IC_Prag) then
           return;
  
        --  Nothing to do when the pragma or its argument are illegal because
--- 2540,2546 ----
        --  Nothing to do when the pragma is ignored because its semantics are
        --  suppressed.
  
!       if Is_Ignored_In_Codegen (IC_Prag) then
           return;
  
        --  Nothing to do when the pragma or its argument are illegal because
*************** package body Exp_Prag is
*** 3001,3007 ****
        --  Also do this in CodePeer mode, because the expanded code is too
        --  complicated for CodePeer to analyse.
  
!       if Is_Ignored (N)
          or else Chars (Last_Var) = Name_Structural
          or else CodePeer_Mode
        then
--- 3003,3009 ----
        --  Also do this in CodePeer mode, because the expanded code is too
        --  complicated for CodePeer to analyse.
  
!       if Is_Ignored_In_Codegen (N)
          or else Chars (Last_Var) = Name_Structural
          or else CodePeer_Mode
        then
*************** package body Exp_Prag is
*** 3391,3397 ****
        --  Do nothing if pragma is not present or is disabled.
        --  Also ignore structural variants for execution.
  
!       if Is_Ignored (Prag)
          or else Chars (Nlists.Last (Choices (Last_Variant))) = Name_Structural
        then
           return;
--- 3393,3399 ----
        --  Do nothing if pragma is not present or is disabled.
        --  Also ignore structural variants for execution.
  
!       if Is_Ignored_In_Codegen (Prag)
          or else Chars (Nlists.Last (Choices (Last_Variant))) = Name_Structural
        then
           return;
diff -Nrcpad gcc-16-20250803/gcc/ada/exp_spark.adb gcc-16-20250810/gcc/ada/exp_spark.adb
*** gcc-16-20250803/gcc/ada/exp_spark.adb	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/gcc/ada/exp_spark.adb	Sun Aug 10 22:32:06 2025
*************** package body Exp_SPARK is
*** 1128,1135 ****
        Wrapper_Decl_List : List_Id;
        Wrapper_Body_List : List_Id := No_List;
  
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
     begin
--- 1128,1134 ----
        Wrapper_Decl_List : List_Id;
        Wrapper_Body_List : List_Id := No_List;
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
     begin
*************** package body Exp_SPARK is
*** 1253,1259 ****
           end if;
        end if;
  
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
     end SPARK_Freeze_Type;
  
  end Exp_SPARK;
--- 1252,1258 ----
           end if;
        end if;
  
!       Restore_Ghost_Region (Saved_Ghost_Config);
     end SPARK_Freeze_Type;
  
  end Exp_SPARK;
diff -Nrcpad gcc-16-20250803/gcc/ada/exp_util.adb gcc-16-20250810/gcc/ada/exp_util.adb
*** gcc-16-20250803/gcc/ada/exp_util.adb	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/gcc/ada/exp_util.adb	Sun Aug 10 22:32:06 2025
*************** package body Exp_Util is
*** 1903,1909 ****
        begin
           --  The DIC pragma is ignored, nothing left to do
  
!          if Is_Ignored (DIC_Prag) then
              null;
  
           --  Otherwise the DIC expression must be checked at run time.
--- 1903,1909 ----
        begin
           --  The DIC pragma is ignored, nothing left to do
  
!          if Is_Ignored_In_Codegen (DIC_Prag) then
              null;
  
           --  Otherwise the DIC expression must be checked at run time.
*************** package body Exp_Util is
*** 2311,2318 ****
  
        Loc : constant Source_Ptr := Sloc (Typ);
  
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
        DIC_Prag     : Node_Id;
--- 2311,2317 ----
  
        Loc : constant Source_Ptr := Sloc (Typ);
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
        DIC_Prag     : Node_Id;
*************** package body Exp_Util is
*** 2558,2564 ****
        end if;
  
     <<Leave>>
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
     end Build_DIC_Procedure_Body;
  
     -------------------------------------
--- 2557,2563 ----
        end if;
  
     <<Leave>>
!       Restore_Ghost_Region (Saved_Ghost_Config);
     end Build_DIC_Procedure_Body;
  
     -------------------------------------
*************** package body Exp_Util is
*** 2575,2582 ****
     is
        Loc : constant Source_Ptr := Sloc (Typ);
  
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
        DIC_Prag  : Node_Id;
--- 2574,2580 ----
     is
        Loc : constant Source_Ptr := Sloc (Typ);
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
        DIC_Prag  : Node_Id;
*************** package body Exp_Util is
*** 2783,2789 ****
        end if;
  
     <<Leave>>
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
     end Build_DIC_Procedure_Declaration;
  
     ------------------------------------
--- 2781,2787 ----
        end if;
  
     <<Leave>>
!       Restore_Ghost_Region (Saved_Ghost_Config);
     end Build_DIC_Procedure_Declaration;
  
     ------------------------------------
*************** package body Exp_Util is
*** 3237,3243 ****
        begin
           --  The invariant is ignored, nothing left to do
  
!          if Is_Ignored (Prag) then
              null;
  
           --  Otherwise the invariant is checked. Build a pragma Check to verify
--- 3235,3241 ----
        begin
           --  The invariant is ignored, nothing left to do
  
!          if Is_Ignored_In_Codegen (Prag) then
              null;
  
           --  Otherwise the invariant is checked. Build a pragma Check to verify
*************** package body Exp_Util is
*** 3709,3716 ****
  
        --  Local variables
  
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
        Dummy        : Entity_Id;
--- 3707,3713 ----
  
        --  Local variables
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
        Dummy        : Entity_Id;
*************** package body Exp_Util is
*** 4058,4064 ****
        end if;
  
     <<Leave>>
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
     end Build_Invariant_Procedure_Body;
  
     -------------------------------------------
--- 4055,4061 ----
        end if;
  
     <<Leave>>
!       Restore_Ghost_Region (Saved_Ghost_Config);
     end Build_Invariant_Procedure_Body;
  
     -------------------------------------------
*************** package body Exp_Util is
*** 4075,4082 ****
     is
        Loc : constant Source_Ptr := Sloc (Typ);
  
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
        Proc_Decl : Node_Id;
--- 4072,4078 ----
     is
        Loc : constant Source_Ptr := Sloc (Typ);
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
        Proc_Decl : Node_Id;
*************** package body Exp_Util is
*** 4292,4298 ****
        end if;
  
     <<Leave>>
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
     end Build_Invariant_Procedure_Declaration;
  
     ------------------------
--- 4288,4294 ----
        end if;
  
     <<Leave>>
!       Restore_Ghost_Region (Saved_Ghost_Config);
     end Build_Invariant_Procedure_Declaration;
  
     ------------------------
*************** package body Exp_Util is
*** 10640,10647 ****
     is
        Loc : constant Source_Ptr := Sloc (Expr);
  
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
        Call         : Node_Id;
--- 10636,10642 ----
     is
        Loc : constant Source_Ptr := Sloc (Expr);
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
        Call         : Node_Id;
*************** package body Exp_Util is
*** 10685,10691 ****
            Name                   => New_Occurrence_Of (Func_Id, Loc),
            Parameter_Associations => Param_Assocs);
  
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
  
        return Call;
     end Make_Predicate_Call;
--- 10680,10686 ----
            Name                   => New_Occurrence_Of (Func_Id, Loc),
            Parameter_Associations => Param_Assocs);
  
!       Restore_Ghost_Region (Saved_Ghost_Config);
  
        return Call;
     end Make_Predicate_Call;
diff -Nrcpad gcc-16-20250803/gcc/ada/expander.adb gcc-16-20250810/gcc/ada/expander.adb
*** gcc-16-20250803/gcc/ada/expander.adb	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/gcc/ada/expander.adb	Sun Aug 10 22:32:06 2025
*************** package body Expander is
*** 84,91 ****
     --  Ghost mode.
  
     procedure Expand (N : Node_Id) is
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
     begin
--- 84,90 ----
     --  Ghost mode.
  
     procedure Expand (N : Node_Id) is
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
     begin
*************** package body Expander is
*** 559,565 ****
        end if;
  
     <<Leave>>
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
     end Expand;
  
     ---------------------------
--- 558,564 ----
        end if;
  
     <<Leave>>
!       Restore_Ghost_Region (Saved_Ghost_Config);
     end Expand;
  
     ---------------------------
diff -Nrcpad gcc-16-20250803/gcc/ada/freeze.adb gcc-16-20250810/gcc/ada/freeze.adb
*** gcc-16-20250803/gcc/ada/freeze.adb	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/gcc/ada/freeze.adb	Sun Aug 10 22:32:06 2025
*************** package body Freeze is
*** 2878,2885 ****
     is
        Loc : constant Source_Ptr := Sloc (N);
  
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
        Atype  : Entity_Id;
--- 2878,2884 ----
     is
        Loc : constant Source_Ptr := Sloc (N);
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
        Atype  : Entity_Id;
*************** package body Freeze is
*** 4813,4818 ****
--- 4812,4819 ----
                   and then Convention (F_Type) = Convention_Ada
                   and then not Has_Warnings_Off (F_Type)
                   and then not Has_Size_Clause (F_Type)
+                  and then Present (Esize (F_Type))
+                  and then Esize (F_Type) = 8
                 then
                    Error_Msg_N
                      ("& is an 8-bit Ada Boolean?x?", Formal);
*************** package body Freeze is
*** 8358,8369 ****
        --  and Per-Object Expressions" will suppress the insertion, and the
        --  freeze node will be dropped on the floor.
  
!       if Saved_GM = Ignore
!         and then Ghost_Mode /= Ignore
!         and then Present (Ignored_Ghost_Region)
        then
           Insert_Actions
!            (Assoc_Node   => Ignored_Ghost_Region,
              Ins_Actions  => Result,
              Spec_Expr_OK => True);
  
--- 8359,8370 ----
        --  and Per-Object Expressions" will suppress the insertion, and the
        --  freeze node will be dropped on the floor.
  
!       if Saved_Ghost_Config.Ghost_Mode = Ignore
!         and then Ghost_Config.Ghost_Mode /= Ignore
!         and then Present (Ghost_Config.Ignored_Ghost_Region)
        then
           Insert_Actions
!            (Assoc_Node   => Ghost_Config.Ignored_Ghost_Region,
              Ins_Actions  => Result,
              Spec_Expr_OK => True);
  
*************** package body Freeze is
*** 8371,8377 ****
        end if;
  
     <<Leave>>
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
  
        return Result;
     end Freeze_Entity;
--- 8372,8378 ----
        end if;
  
     <<Leave>>
!       Restore_Ghost_Region (Saved_Ghost_Config);
  
        return Result;
     end Freeze_Entity;
diff -Nrcpad gcc-16-20250803/gcc/ada/frontend.adb gcc-16-20250810/gcc/ada/frontend.adb
*** gcc-16-20250803/gcc/ada/frontend.adb	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/gcc/ada/frontend.adb	Sun Aug 10 22:32:06 2025
*************** begin
*** 477,483 ****
              --  executable. This action must be performed very late because it
              --  heavily alters the tree.
  
!             if Operating_Mode = Generate_Code or else GNATprove_Mode then
                 Remove_Ignored_Ghost_Code;
              end if;
  
--- 477,483 ----
              --  executable. This action must be performed very late because it
              --  heavily alters the tree.
  
!             if Operating_Mode = Generate_Code and not CodePeer_Mode then
                 Remove_Ignored_Ghost_Code;
              end if;
  
diff -Nrcpad gcc-16-20250803/gcc/ada/ghost.adb gcc-16-20250810/gcc/ada/ghost.adb
*** gcc-16-20250803/gcc/ada/ghost.adb	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/gcc/ada/ghost.adb	Sun Aug 10 22:32:06 2025
*************** package body Ghost is
*** 447,453 ****
           --  The context is Ghost when it appears within a Ghost package or
           --  subprogram.
  
!          if Ghost_Mode > None then
              return True;
  
           --  Routine Expand_Record_Extension creates a parent subtype without
--- 447,453 ----
           --  The context is Ghost when it appears within a Ghost package or
           --  subprogram.
  
!          if Ghost_Config.Ghost_Mode > None then
              return True;
  
           --  Routine Expand_Record_Extension creates a parent subtype without
*************** package body Ghost is
*** 719,725 ****
        --  The context is ghost when it appears within a Ghost package or
        --  subprogram.
  
!       if Ghost_Mode > None then
           return;
  
        --  The context is ghost if Formal is explicitly marked as ghost
--- 719,725 ----
        --  The context is ghost when it appears within a Ghost package or
        --  subprogram.
  
!       if Ghost_Config.Ghost_Mode > None then
           return;
  
        --  The context is ghost if Formal is explicitly marked as ghost
*************** package body Ghost is
*** 1130,1151 ****
        --  The context is already within an ignored Ghost region. Maintain the
        --  start of the outermost ignored Ghost region.
  
!       if Present (Ignored_Ghost_Region) then
           null;
  
        --  The current region is the outermost ignored Ghost region. Save its
        --  starting node.
  
        elsif Present (N) and then Mode = Ignore then
!          Ignored_Ghost_Region := N;
  
        --  Otherwise the current region is not ignored, nothing to save
  
        else
!          Ignored_Ghost_Region := Empty;
        end if;
  
!       Ghost_Mode := Mode;
     end Install_Ghost_Region;
  
     procedure Install_Ghost_Region (Mode : Name_Id; N : Node_Id) is
--- 1130,1151 ----
        --  The context is already within an ignored Ghost region. Maintain the
        --  start of the outermost ignored Ghost region.
  
!       if Present (Ghost_Config.Ignored_Ghost_Region) then
           null;
  
        --  The current region is the outermost ignored Ghost region. Save its
        --  starting node.
  
        elsif Present (N) and then Mode = Ignore then
!          Ghost_Config.Ignored_Ghost_Region := N;
  
        --  Otherwise the current region is not ignored, nothing to save
  
        else
!          Ghost_Config.Ignored_Ghost_Region := Empty;
        end if;
  
!       Ghost_Config.Ghost_Mode := Mode;
     end Install_Ghost_Region;
  
     procedure Install_Ghost_Region (Mode : Name_Id; N : Node_Id) is
*************** package body Ghost is
*** 1504,1513 ****
        --  A body declared within a Ghost region is automatically Ghost
        --  (SPARK RM 6.9(2)).
  
!       elsif Ghost_Mode = Check then
           Policy := Name_Check;
  
!       elsif Ghost_Mode = Ignore then
           Policy := Name_Ignore;
  
        --  Inherit the "ghostness" of the previous declaration when the body
--- 1504,1513 ----
        --  A body declared within a Ghost region is automatically Ghost
        --  (SPARK RM 6.9(2)).
  
!       elsif Ghost_Config.Ghost_Mode = Check then
           Policy := Name_Check;
  
!       elsif Ghost_Config.Ghost_Mode = Ignore then
           Policy := Name_Ignore;
  
        --  Inherit the "ghostness" of the previous declaration when the body
*************** package body Ghost is
*** 1553,1562 ****
        --  A completion elaborated in a Ghost region is automatically Ghost
        --  (SPARK RM 6.9(2)).
  
!       if Ghost_Mode = Check then
           Policy := Name_Check;
  
!       elsif Ghost_Mode = Ignore then
           Policy := Name_Ignore;
  
        --  The completion becomes Ghost when its initial declaration is also
--- 1553,1562 ----
        --  A completion elaborated in a Ghost region is automatically Ghost
        --  (SPARK RM 6.9(2)).
  
!       if Ghost_Config.Ghost_Mode = Check then
           Policy := Name_Check;
  
!       elsif Ghost_Config.Ghost_Mode = Ignore then
           Policy := Name_Ignore;
  
        --  The completion becomes Ghost when its initial declaration is also
*************** package body Ghost is
*** 1603,1612 ****
        --  A declaration elaborated in a Ghost region is automatically Ghost
        --  (SPARK RM 6.9(2)).
  
!       elsif Ghost_Mode = Check then
           Policy := Name_Check;
  
!       elsif Ghost_Mode = Ignore then
           Policy := Name_Ignore;
  
        --  A child package or subprogram declaration becomes Ghost when its
--- 1603,1612 ----
        --  A declaration elaborated in a Ghost region is automatically Ghost
        --  (SPARK RM 6.9(2)).
  
!       elsif Ghost_Config.Ghost_Mode = Check then
           Policy := Name_Check;
  
!       elsif Ghost_Config.Ghost_Mode = Ignore then
           Policy := Name_Ignore;
  
        --  A child package or subprogram declaration becomes Ghost when its
*************** package body Ghost is
*** 1698,1707 ****
        --  An instantiation declaration within a Ghost region is automatically
        --  Ghost (SPARK RM 6.9(2)).
  
!       elsif Ghost_Mode = Check then
           Policy := Name_Check;
  
!       elsif Ghost_Mode = Ignore then
           Policy := Name_Ignore;
  
        --  Inherit the "ghostness" of the generic unit, but the current Ghost
--- 1698,1707 ----
        --  An instantiation declaration within a Ghost region is automatically
        --  Ghost (SPARK RM 6.9(2)).
  
!       elsif Ghost_Config.Ghost_Mode = Check then
           Policy := Name_Check;
  
!       elsif Ghost_Config.Ghost_Mode = Ignore then
           Policy := Name_Ignore;
  
        --  Inherit the "ghostness" of the generic unit, but the current Ghost
*************** package body Ghost is
*** 2018,2027 ****
     -- Restore_Ghost_Region --
     --------------------------
  
!    procedure Restore_Ghost_Region (Mode : Ghost_Mode_Type; N : Node_Id) is
     begin
!       Ghost_Mode           := Mode;
!       Ignored_Ghost_Region := N;
     end Restore_Ghost_Region;
  
     --------------------
--- 2018,2026 ----
     -- Restore_Ghost_Region --
     --------------------------
  
!    procedure Restore_Ghost_Region (Config : Ghost_Config_Type) is
     begin
!       Ghost_Config := Config;
     end Restore_Ghost_Region;
  
     --------------------
diff -Nrcpad gcc-16-20250803/gcc/ada/ghost.ads gcc-16-20250810/gcc/ada/ghost.ads
*** gcc-16-20250803/gcc/ada/ghost.ads	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/gcc/ada/ghost.ads	Sun Aug 10 22:32:06 2025
*************** package Ghost is
*** 243,249 ****
     --  WARNING: this is a separate front end pass, care should be taken to keep
     --  it optimized.
  
!    procedure Restore_Ghost_Region (Mode : Ghost_Mode_Type; N : Node_Id);
     pragma Inline (Restore_Ghost_Region);
     --  Restore a Ghost region to a previous state described by mode Mode and
     --  ignored region start node N. This routine must be used in conjunction
--- 243,249 ----
     --  WARNING: this is a separate front end pass, care should be taken to keep
     --  it optimized.
  
!    procedure Restore_Ghost_Region (Config : Ghost_Config_Type);
     pragma Inline (Restore_Ghost_Region);
     --  Restore a Ghost region to a previous state described by mode Mode and
     --  ignored region start node N. This routine must be used in conjunction
diff -Nrcpad gcc-16-20250803/gcc/ada/gnat1drv.adb gcc-16-20250810/gcc/ada/gnat1drv.adb
*** gcc-16-20250803/gcc/ada/gnat1drv.adb	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/gcc/ada/gnat1drv.adb	Sun Aug 10 22:32:06 2025
*************** procedure Gnat1drv is
*** 503,513 ****
  
           Operating_Mode := Check_Semantics;
  
-          --  Enable assertions, since they give valuable extra information for
-          --  formal verification.
- 
-          Assertions_Enabled := True;
- 
           --  Disable validity checks, since it generates code raising
           --  exceptions for invalid data, which confuses GNATprove. Invalid
           --  data is directly detected by GNATprove's flow analysis.
--- 503,508 ----
diff -Nrcpad gcc-16-20250803/gcc/ada/lib-writ.adb gcc-16-20250810/gcc/ada/lib-writ.adb
*** gcc-16-20250803/gcc/ada/lib-writ.adb	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/gcc/ada/lib-writ.adb	Sun Aug 10 22:32:06 2025
*************** package body Lib.Writ is
*** 905,911 ****
              --  Do not generate a with line for an ignored Ghost unit because
              --  the unit does not have an ALI file.
  
!             if Is_Ignored_Ghost_Entity (Cunit_Entity (Unum)) then
                 goto Next_With_Line;
              end if;
  
--- 905,911 ----
              --  Do not generate a with line for an ignored Ghost unit because
              --  the unit does not have an ALI file.
  
!             if Is_Ignored_Ghost_Entity_In_Codegen (Cunit_Entity (Unum)) then
                 goto Next_With_Line;
              end if;
  
diff -Nrcpad gcc-16-20250803/gcc/ada/lib-xref.adb gcc-16-20250810/gcc/ada/lib-xref.adb
*** gcc-16-20250803/gcc/ada/lib-xref.adb	Sun Aug  3 22:32:17 2025
--- gcc-16-20250810/gcc/ada/lib-xref.adb	Sun Aug 10 22:32:06 2025
*************** package body Lib.Xref is
*** 1729,1735 ****
              --  entity because neither the entity nor its references will
              --  appear in the final tree.
  
!             if Is_Ignored_Ghost_Entity (Ent) then
                 goto Orphan_Continue;
              end if;
  
--- 1729,1735 ----
              --  entity because neither the entity nor its references will
              --  appear in the final tree.
  
!             if Is_Ignored_Ghost_Entity_In_Codegen (Ent) then
                 goto Orphan_Continue;
              end if;
  
*************** package body Lib.Xref is
*** 2190,2196 ****
                 --  entity because neither the entity nor its references will
                 --  appear in the final tree.
  
!                if Is_Ignored_Ghost_Entity (Ent) then
                    goto Continue;
                 end if;
  
--- 2190,2196 ----
                 --  entity because neither the entity nor its references will
                 --  appear in the final tree.
  
!                if Is_Ignored_Ghost_Entity_In_Codegen (Ent) then
                    goto Continue;
                 end if;
  
diff -Nrcpad gcc-16-20250803/gcc/ada/opt.adb gcc-16-20250810/gcc/ada/opt.adb
*** gcc-16-20250803/gcc/ada/opt.adb	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/ada/opt.adb	Sun Aug 10 22:32:06 2025
*************** package body Opt is
*** 204,217 ****
              SPARK_Mode_Pragma        := SPARK_Mode_Pragma_Config;
  
           else
!             --  In GNATprove mode assertions should be always enabled, even
!             --  when analysing internal units.
! 
!             if GNATprove_Mode then
!                pragma Assert (Assertions_Enabled);
!                null;
! 
!             elsif GNAT_Mode_Config then
                 Assertions_Enabled    := Assertions_Enabled_Config;
              else
                 Assertions_Enabled    := False;
--- 204,210 ----
              SPARK_Mode_Pragma        := SPARK_Mode_Pragma_Config;
  
           else
!             if GNAT_Mode_Config then
                 Assertions_Enabled    := Assertions_Enabled_Config;
              else
                 Assertions_Enabled    := False;
diff -Nrcpad gcc-16-20250803/gcc/ada/opt.ads gcc-16-20250810/gcc/ada/opt.ads
*** gcc-16-20250803/gcc/ada/opt.ads	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/ada/opt.ads	Sun Aug 10 22:32:06 2025
*************** package Opt is
*** 746,754 ****
     --  Possible legal modes that can be set by aspect/pragma Ghost as well as
     --  value None, which indicates that no such aspect/pragma applies.
  
!    Ghost_Mode : Ghost_Mode_Type := None;
     --  GNAT
!    --  The current Ghost mode in effect
  
     Global_Discard_Names : Boolean := False;
     --  GNAT, GNATBIND
--- 746,765 ----
     --  Possible legal modes that can be set by aspect/pragma Ghost as well as
     --  value None, which indicates that no such aspect/pragma applies.
  
!    type Ghost_Config_Type is record
!       Ghost_Mode : Ghost_Mode_Type := None;
!       --  The current Ghost mode in effect
! 
!       Ignored_Ghost_Region : Node_Id := Empty;
!       --  The start of the current ignored Ghost region. This value must always
!       --  reflect the starting node of the outermost ignored Ghost region. If a
!       --  nested ignored Ghost region is entered, the value must remain
!       --  unchanged.
!    end record;
! 
!    Ghost_Config : Ghost_Config_Type;
     --  GNAT
!    --  All relevant Ghost mode settings
  
     Global_Discard_Names : Boolean := False;
     --  GNAT, GNATBIND
*************** package Opt is
*** 810,821 ****
     --  use of -gnateu, causing subsequent unrecognized switches to result in
     --  a warning rather than an error.
  
-    Ignored_Ghost_Region : Node_Id := Empty;
-    --  GNAT
-    --  The start of the current ignored Ghost region. This value must always
-    --  reflect the starting node of the outermost ignored Ghost region. If a
-    --  nested ignored Ghost region is entered, the value must remain unchanged.
- 
     Implicit_Packing : Boolean := False;
     --  GNAT
     --  If set True, then a Size attribute clause on an array is allowed to
--- 821,826 ----
diff -Nrcpad gcc-16-20250803/gcc/ada/par-ch12.adb gcc-16-20250810/gcc/ada/par-ch12.adb
*** gcc-16-20250803/gcc/ada/par-ch12.adb	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/ada/par-ch12.adb	Sun Aug 10 22:32:06 2025
*************** package body Ch12 is
*** 420,451 ****
  
     procedure P_Formal_Object_Declarations (Decls : List_Id) is
        Decl_Node        : Node_Id;
-       Ident            : Pos;
        Not_Null_Present : Boolean := False;
-       Num_Idents       : Pos;
        Scan_State       : Saved_Scan_State;
  
!       Idents : array (Pos range 1 .. 4096) of Entity_Id;
!       --  This array holds the list of defining identifiers. The upper bound
!       --  of 4096 is intended to be essentially infinite, and we do not even
!       --  bother to check for it being exceeded.
  
     begin
!       Idents (1) := P_Defining_Identifier (C_Comma_Colon);
!       Num_Idents := 1;
!       while Comma_Present loop
!          Num_Idents := Num_Idents + 1;
!          Idents (Num_Idents) := P_Defining_Identifier (C_Comma_Colon);
!       end loop;
! 
        T_Colon;
  
!       --  If there are multiple identifiers, we repeatedly scan the
!       --  type and initialization expression information by resetting
!       --  the scan pointer (so that we get completely separate trees
!       --  for each occurrence).
! 
!       if Num_Idents > 1 then
           Save_Scan_State (Scan_State);
        end if;
  
--- 420,436 ----
  
     procedure P_Formal_Object_Declarations (Decls : List_Id) is
        Decl_Node        : Node_Id;
        Not_Null_Present : Boolean := False;
        Scan_State       : Saved_Scan_State;
  
!       Def_Ids : Defining_Identifiers;
!       Ident   : Pos;
  
     begin
!       P_Def_Ids (Def_Ids);
        T_Colon;
  
!       if Def_Ids.Num_Idents > 1 then
           Save_Scan_State (Scan_State);
        end if;
  
*************** package body Ch12 is
*** 454,460 ****
        Ident := 1;
        Ident_Loop : loop
           Decl_Node := New_Node (N_Formal_Object_Declaration, Token_Ptr);
!          Set_Defining_Identifier (Decl_Node, Idents (Ident));
           P_Mode (Decl_Node);
  
           Not_Null_Present := P_Null_Exclusion;  --  Ada 2005 (AI-423)
--- 439,445 ----
        Ident := 1;
        Ident_Loop : loop
           Decl_Node := New_Node (N_Formal_Object_Declaration, Token_Ptr);
!          Set_Defining_Identifier (Decl_Node, Def_Ids.Idents (Ident));
           P_Mode (Decl_Node);
  
           Not_Null_Present := P_Null_Exclusion;  --  Ada 2005 (AI-423)
*************** package body Ch12 is
*** 488,500 ****
              Set_Prev_Ids (Decl_Node, True);
           end if;
  
!          if Ident < Num_Idents then
              Set_More_Ids (Decl_Node, True);
           end if;
  
           Append (Decl_Node, Decls);
  
!          exit Ident_Loop when Ident = Num_Idents;
           Ident := Ident + 1;
           Restore_Scan_State (Scan_State);
        end loop Ident_Loop;
--- 473,485 ----
              Set_Prev_Ids (Decl_Node, True);
           end if;
  
!          if Ident < Def_Ids.Num_Idents then
              Set_More_Ids (Decl_Node, True);
           end if;
  
           Append (Decl_Node, Decls);
  
!          exit Ident_Loop when Ident = Def_Ids.Num_Idents;
           Ident := Ident + 1;
           Restore_Scan_State (Scan_State);
        end loop Ident_Loop;
diff -Nrcpad gcc-16-20250803/gcc/ada/par-ch3.adb gcc-16-20250810/gcc/ada/par-ch3.adb
*** gcc-16-20250803/gcc/ada/par-ch3.adb	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/ada/par-ch3.adb	Sun Aug 10 22:32:06 2025
*************** package body Ch3 is
*** 1302,1320 ****
        Ident_Sloc       : Source_Ptr;
        Scan_State       : Saved_Scan_State;
        List_OK          : Boolean := True;
-       Ident            : Nat;
        Init_Expr        : Node_Id;
        Init_Loc         : Source_Ptr;
        Con_Loc          : Source_Ptr;
        Not_Null_Present : Boolean := False;
  
!       Idents : array (Int range 1 .. 4096) of Entity_Id;
!       --  Used to save identifiers in the identifier list. The upper bound
!       --  of 4096 is expected to be infinite in practice, and we do not even
!       --  bother to check if this upper bound is exceeded.
! 
!       Num_Idents : Nat := 1;
!       --  Number of identifiers stored in Idents
  
        function Identifier_Starts_Statement return Boolean;
        --  Called with Token being an identifier that might start a declaration
--- 1302,1314 ----
        Ident_Sloc       : Source_Ptr;
        Scan_State       : Saved_Scan_State;
        List_OK          : Boolean := True;
        Init_Expr        : Node_Id;
        Init_Loc         : Source_Ptr;
        Con_Loc          : Source_Ptr;
        Not_Null_Present : Boolean := False;
  
!       Def_Ids : Defining_Identifiers;
!       Ident   : Pos;
  
        function Identifier_Starts_Statement return Boolean;
        --  Called with Token being an identifier that might start a declaration
*************** package body Ch3 is
*** 1389,1398 ****
  
        procedure No_List is
        begin
!          if Num_Idents > 1 then
              Error_Msg_N
!               ("identifier list not allowed for RENAMES",
!                Idents (2));
           end if;
  
           List_OK := False;
--- 1383,1391 ----
  
        procedure No_List is
        begin
!          if Def_Ids.Num_Idents > 1 then
              Error_Msg_N
!               ("identifier list not allowed for RENAMES", Def_Ids.Idents (2));
           end if;
  
           List_OK := False;
*************** package body Ch3 is
*** 1443,1449 ****
  
        Ident_Sloc := Token_Ptr;
        Save_Scan_State (Scan_State); -- at first identifier
!       Idents (1) := P_Defining_Identifier (C_Comma_Colon);
  
        --  If we have a colon after the identifier, then we can assume that
        --  this is in fact a valid identifier declaration and can steam ahead.
--- 1436,1442 ----
  
        Ident_Sloc := Token_Ptr;
        Save_Scan_State (Scan_State); -- at first identifier
!       Append (Def_Ids, P_Defining_Identifier (C_Comma_Colon));
  
        --  If we have a colon after the identifier, then we can assume that
        --  this is in fact a valid identifier declaration and can steam ahead.
*************** package body Ch3 is
*** 1455,1462 ****
  
        elsif Token = Tok_Comma then
           while Comma_Present loop
!             Num_Idents := Num_Idents + 1;
!             Idents (Num_Idents) := P_Defining_Identifier (C_Comma_Colon);
           end loop;
  
           Save_Scan_State (Scan_State); -- at colon
--- 1448,1454 ----
  
        elsif Token = Tok_Comma then
           while Comma_Present loop
!             Append (Def_Ids, P_Defining_Identifier (C_Comma_Colon));
           end loop;
  
           Save_Scan_State (Scan_State); -- at colon
*************** package body Ch3 is
*** 1510,1516 ****
           Decl_Node :=
             New_Node (N_Object_Renaming_Declaration, Ident_Sloc);
           Set_Name (Decl_Node, P_Name);
!          Set_Defining_Identifier (Decl_Node, Idents (1));
  
           P_Aspect_Specifications (Decl_Node, Semicolon => False);
  
--- 1502,1508 ----
           Decl_Node :=
             New_Node (N_Object_Renaming_Declaration, Ident_Sloc);
           Set_Name (Decl_Node, P_Name);
!          Set_Defining_Identifier (Decl_Node, Def_Ids.Idents (1));
  
           P_Aspect_Specifications (Decl_Node, Semicolon => False);
  
*************** package body Ch3 is
*** 1917,1923 ****
              end if;
           end if;
  
!          Set_Defining_Identifier (Decl_Node, Idents (Ident));
           P_Aspect_Specifications (Decl_Node, Semicolon => False);
  
           --  Allow initialization expression to follow aspects (note that in
--- 1909,1915 ----
              end if;
           end if;
  
!          Set_Defining_Identifier (Decl_Node, Def_Ids.Idents (Ident));
           P_Aspect_Specifications (Decl_Node, Semicolon => False);
  
           --  Allow initialization expression to follow aspects (note that in
*************** package body Ch3 is
*** 1945,1961 ****
           T_Semicolon;
  
           if List_OK then
-             if Ident < Num_Idents then
-                Set_More_Ids (Decl_Node, True);
-             end if;
- 
              if Ident > 1 then
                 Set_Prev_Ids (Decl_Node, True);
              end if;
           end if;
  
           Append (Decl_Node, Decls);
!          exit Ident_Loop when Ident = Num_Idents;
           Restore_Scan_State (Scan_State);
           T_Colon;
           Ident := Ident + 1;
--- 1937,1953 ----
           T_Semicolon;
  
           if List_OK then
              if Ident > 1 then
                 Set_Prev_Ids (Decl_Node, True);
              end if;
+ 
+             if Ident < Def_Ids.Num_Idents then
+                Set_More_Ids (Decl_Node, True);
+             end if;
           end if;
  
           Append (Decl_Node, Decls);
!          exit Ident_Loop when Ident = Def_Ids.Num_Idents;
           Restore_Scan_State (Scan_State);
           T_Colon;
           Ident := Ident + 1;
*************** package body Ch3 is
*** 3191,3204 ****
        Specification_List : List_Id;
        Ident_Sloc         : Source_Ptr;
        Scan_State         : Saved_Scan_State;
-       Num_Idents         : Nat;
        Not_Null_Present   : Boolean;
-       Ident              : Nat;
- 
-       Idents : array (Int range 1 .. 4096) of Entity_Id;
-       --  This array holds the list of defining identifiers. The upper bound
-       --  of 4096 is intended to be essentially infinite, and we do not even
-       --  bother to check for it being exceeded.
  
     begin
        if Token = Tok_Left_Paren then
--- 3183,3189 ----
*************** package body Ch3 is
*** 3207,3303 ****
           P_Pragmas_Misplaced;
  
           Specification_Loop : loop
  
!             Ident_Sloc := Token_Ptr;
!             Idents (1) := P_Defining_Identifier (C_Comma_Colon);
!             Num_Idents := 1;
! 
!             while Comma_Present loop
!                Num_Idents := Num_Idents + 1;
!                Idents (Num_Idents) := P_Defining_Identifier (C_Comma_Colon);
!             end loop;
! 
!             --  If there are multiple identifiers, we repeatedly scan the
!             --  type and initialization expression information by resetting
!             --  the scan pointer (so that we get completely separate trees
!             --  for each occurrence).
  
!             if Num_Idents > 1 then
!                Save_Scan_State (Scan_State);
!             end if;
  
!             T_Colon;
  
!             --  Loop through defining identifiers in list
  
!             Ident := 1;
!             Ident_Loop : loop
!                Specification_Node :=
!                  New_Node (N_Discriminant_Specification, Ident_Sloc);
!                Set_Defining_Identifier (Specification_Node, Idents (Ident));
!                Not_Null_Present :=  --  Ada 2005 (AI-231, AI-447)
!                  P_Null_Exclusion (Allow_Anonymous_In_95 => True);
  
!                if Token = Tok_Access then
!                   if Ada_Version = Ada_83 then
!                      Error_Msg_SC
!                        ("(Ada 83) access discriminant not allowed!");
!                   end if;
  
!                   Set_Discriminant_Type
!                     (Specification_Node,
!                      P_Access_Definition (Not_Null_Present));
  
!                --  Catch ouf-of-order keywords
  
!                elsif Token = Tok_Constant then
!                   Scan;
  
!                   if Token = Tok_Access then
!                      Error_Msg_SC -- CODEFIX
!                        ("ACCESS must come before CONSTANT");
!                      Set_Discriminant_Type
!                        (Specification_Node,
!                         P_Access_Definition (Not_Null_Present));
  
                    else
!                      Error_Msg_SC ("misplaced CONSTANT");
                    end if;
  
!                else
!                   Set_Discriminant_Type
!                     (Specification_Node, P_Subtype_Mark);
!                   No_Constraint;
!                   Set_Null_Exclusion_Present  -- Ada 2005 (AI-231)
!                     (Specification_Node, Not_Null_Present);
!                end if;
! 
!                Set_Expression
!                  (Specification_Node, Init_Expr_Opt (True));
  
!                if Token = Tok_With then
!                   P_Aspect_Specifications
!                     (Specification_Node, Semicolon => False);
!                end if;
  
!                if Ident > 1 then
!                   Set_Prev_Ids (Specification_Node, True);
!                end if;
  
!                if Ident < Num_Idents then
!                   Set_More_Ids (Specification_Node, True);
!                end if;
  
!                Append (Specification_Node, Specification_List);
!                exit Ident_Loop when Ident = Num_Idents;
!                Ident := Ident + 1;
!                Restore_Scan_State (Scan_State);
!                T_Colon;
!             end loop Ident_Loop;
  
!             exit Specification_Loop when Token /= Tok_Semicolon;
!             Scan; -- past ;
!             P_Pragmas_Misplaced;
           end loop Specification_Loop;
  
           T_Right_Paren;
--- 3192,3282 ----
           P_Pragmas_Misplaced;
  
           Specification_Loop : loop
+             declare
+                Def_Ids : Defining_Identifiers;
+                Ident   : Pos;
+             begin
+                Ident_Sloc := Token_Ptr;
+                P_Def_Ids (Def_Ids);
  
!                if Def_Ids.Num_Idents > 1 then
!                   Save_Scan_State (Scan_State);
!                end if;
  
!                T_Colon;
  
!                --  Loop through defining identifiers in list
  
!                Ident := 1;
!                Ident_Loop : loop
!                   Specification_Node :=
!                     New_Node (N_Discriminant_Specification, Ident_Sloc);
!                   Set_Defining_Identifier
!                     (Specification_Node, Def_Ids.Idents (Ident));
!                   Not_Null_Present :=  --  Ada 2005 (AI-231, AI-447)
!                     P_Null_Exclusion (Allow_Anonymous_In_95 => True);
  
!                   if Token = Tok_Access then
!                      if Ada_Version = Ada_83 then
!                         Error_Msg_SC
!                           ("(Ada 83) access discriminant not allowed!");
!                      end if;
  
!                      Set_Discriminant_Type
!                        (Specification_Node,
!                         P_Access_Definition (Not_Null_Present));
  
!                   --  Catch ouf-of-order keywords
  
!                   elsif Token = Tok_Constant then
!                      Scan;
  
!                      if Token = Tok_Access then
!                         Error_Msg_SC -- CODEFIX
!                           ("ACCESS must come before CONSTANT");
!                         Set_Discriminant_Type
!                           (Specification_Node,
!                            P_Access_Definition (Not_Null_Present));
  
!                      else
!                         Error_Msg_SC ("misplaced CONSTANT");
!                      end if;
  
                    else
!                      Set_Discriminant_Type
!                        (Specification_Node, P_Subtype_Mark);
!                      No_Constraint;
!                      Set_Null_Exclusion_Present  -- Ada 2005 (AI-231)
!                        (Specification_Node, Not_Null_Present);
                    end if;
  
!                   Set_Expression
!                     (Specification_Node, Init_Expr_Opt (True));
  
!                   if Token = Tok_With then
!                      P_Aspect_Specifications
!                        (Specification_Node, Semicolon => False);
!                   end if;
  
!                   if Ident > 1 then
!                      Set_Prev_Ids (Specification_Node, True);
!                   end if;
  
!                   if Ident < Def_Ids.Num_Idents then
!                      Set_More_Ids (Specification_Node, True);
!                   end if;
  
!                   Append (Specification_Node, Specification_List);
!                   exit Ident_Loop when Ident = Def_Ids.Num_Idents;
!                   Ident := Ident + 1;
!                   Restore_Scan_State (Scan_State);
!                   T_Colon;
!                end loop Ident_Loop;
  
!                exit Specification_Loop when Token /= Tok_Semicolon;
!                Scan; -- past ;
!                P_Pragmas_Misplaced;
!             end;
           end loop Specification_Loop;
  
           T_Right_Paren;
*************** package body Ch3 is
*** 3770,3783 ****
        Decl_Node        : Node_Id := Empty;  -- initialize to prevent warning
        Scan_State       : Saved_Scan_State;
        Not_Null_Present : Boolean := False;
-       Num_Idents       : Nat;
-       Ident            : Nat;
        Ident_Sloc       : Source_Ptr;
  
!       Idents : array (Int range 1 .. 4096) of Entity_Id;
!       --  This array holds the list of defining identifiers. The upper bound
!       --  of 4096 is intended to be essentially infinite, and we do not even
!       --  bother to check for it being exceeded.
  
     begin
        if Token /= Tok_Identifier then
--- 3749,3758 ----
        Decl_Node        : Node_Id := Empty;  -- initialize to prevent warning
        Scan_State       : Saved_Scan_State;
        Not_Null_Present : Boolean := False;
        Ident_Sloc       : Source_Ptr;
  
!       Def_Ids : Defining_Identifiers;
!       Ident   : Pos;
  
     begin
        if Token /= Tok_Identifier then
*************** package body Ch3 is
*** 3788,3807 ****
  
        Ident_Sloc := Token_Ptr;
        Check_Bad_Layout;
!       Idents (1) := P_Defining_Identifier (C_Comma_Colon);
!       Num_Idents := 1;
! 
!       while Comma_Present loop
!          Num_Idents := Num_Idents + 1;
!          Idents (Num_Idents) := P_Defining_Identifier (C_Comma_Colon);
!       end loop;
! 
!       --  If there are multiple identifiers, we repeatedly scan the
!       --  type and initialization expression information by resetting
!       --  the scan pointer (so that we get completely separate trees
!       --  for each occurrence).
  
!       if Num_Idents > 1 then
           Save_Scan_State (Scan_State);
        end if;
  
--- 3763,3771 ----
  
        Ident_Sloc := Token_Ptr;
        Check_Bad_Layout;
!       P_Def_Ids (Def_Ids);
  
!       if Def_Ids.Num_Idents > 1 then
           Save_Scan_State (Scan_State);
        end if;
  
*************** package body Ch3 is
*** 3817,3823 ****
  
           begin
              Decl_Node := New_Node (N_Component_Declaration, Ident_Sloc);
!             Set_Defining_Identifier (Decl_Node, Idents (Ident));
  
              if Token = Tok_Constant then
                 Error_Msg_SC ("constant component not permitted");
--- 3781,3787 ----
  
           begin
              Decl_Node := New_Node (N_Component_Declaration, Ident_Sloc);
!             Set_Defining_Identifier (Decl_Node, Def_Ids.Idents (Ident));
  
              if Token = Tok_Constant then
                 Error_Msg_SC ("constant component not permitted");
*************** package body Ch3 is
*** 3876,3882 ****
                 Set_Prev_Ids (Decl_Node, True);
              end if;
  
!             if Ident < Num_Idents then
                 Set_More_Ids (Decl_Node, True);
              end if;
  
--- 3840,3846 ----
                 Set_Prev_Ids (Decl_Node, True);
              end if;
  
!             if Ident < Def_Ids.Num_Idents then
                 Set_More_Ids (Decl_Node, True);
              end if;
  
*************** package body Ch3 is
*** 3890,3896 ****
                 end if;
           end;
  
!          exit Ident_Loop when Ident = Num_Idents;
           Ident := Ident + 1;
           Restore_Scan_State (Scan_State);
           T_Colon;
--- 3854,3860 ----
                 end if;
           end;
  
!          exit Ident_Loop when Ident = Def_Ids.Num_Idents;
           Ident := Ident + 1;
           Restore_Scan_State (Scan_State);
           T_Colon;
diff -Nrcpad gcc-16-20250803/gcc/ada/par-ch6.adb gcc-16-20250810/gcc/ada/par-ch6.adb
*** gcc-16-20250803/gcc/ada/par-ch6.adb	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/ada/par-ch6.adb	Sun Aug 10 22:32:06 2025
*************** package body Ch6 is
*** 1384,1403 ****
        Specification_List : List_Id;
        Specification_Node : Node_Id;
        Scan_State         : Saved_Scan_State;
-       Num_Idents         : Nat;
-       Ident              : Nat;
        Ident_Sloc         : Source_Ptr;
        Not_Null_Present   : Boolean := False;
        Not_Null_Sloc      : Source_Ptr;
  
-       Idents : array (Int range 1 .. 4096) of Entity_Id;
-       --  This array holds the list of defining identifiers. The upper bound
-       --  of 4096 is intended to be essentially infinite, and we do not even
-       --  bother to check for it being exceeded.
- 
     begin
        Specification_List := New_List;
        Specification_Loop : loop
           begin
              if Token = Tok_Pragma then
                 Error_Msg_SC ("pragma not allowed in formal part");
--- 1384,1399 ----
        Specification_List : List_Id;
        Specification_Node : Node_Id;
        Scan_State         : Saved_Scan_State;
        Ident_Sloc         : Source_Ptr;
        Not_Null_Present   : Boolean := False;
        Not_Null_Sloc      : Source_Ptr;
  
     begin
        Specification_List := New_List;
        Specification_Loop : loop
+          declare
+             Def_Ids : Defining_Identifiers;
+             Ident   : Pos;
           begin
              if Token = Tok_Pragma then
                 Error_Msg_SC ("pragma not allowed in formal part");
*************** package body Ch6 is
*** 1406,1413 ****
  
              Ignore (Tok_Left_Paren);
              Ident_Sloc := Token_Ptr;
!             Idents (1) := P_Defining_Identifier (C_Comma_Colon);
!             Num_Idents := 1;
  
              Ident_Loop : loop
                 exit Ident_Loop when Token = Tok_Colon;
--- 1402,1408 ----
  
              Ignore (Tok_Left_Paren);
              Ident_Sloc := Token_Ptr;
!             Append (Def_Ids, P_Defining_Identifier (C_Comma_Colon));
  
              Ident_Loop : loop
                 exit Ident_Loop when Token = Tok_Colon;
*************** package body Ch6 is
*** 1457,1464 ****
                 --  Here if a comma is present, or to be assumed
  
                 T_Comma;
!                Num_Idents := Num_Idents + 1;
!                Idents (Num_Idents) := P_Defining_Identifier (C_Comma_Colon);
              end loop Ident_Loop;
  
              --  Fall through the loop on encountering a colon, or deciding
--- 1452,1458 ----
                 --  Here if a comma is present, or to be assumed
  
                 T_Comma;
!                Append (Def_Ids, P_Defining_Identifier (C_Comma_Colon));
              end loop Ident_Loop;
  
              --  Fall through the loop on encountering a colon, or deciding
*************** package body Ch6 is
*** 1466,1477 ****
  
              T_Colon;
  
!             --  If there are multiple identifiers, we repeatedly scan the
!             --  type and initialization expression information by resetting
!             --  the scan pointer (so that we get completely separate trees
!             --  for each occurrence).
! 
!             if Num_Idents > 1 then
                 Save_Scan_State (Scan_State);
              end if;
  
--- 1460,1466 ----
  
              T_Colon;
  
!             if Def_Ids.Num_Idents > 1 then
                 Save_Scan_State (Scan_State);
              end if;
  
*************** package body Ch6 is
*** 1482,1488 ****
              Ident_List_Loop : loop
                 Specification_Node :=
                   New_Node (N_Parameter_Specification, Ident_Sloc);
!                Set_Defining_Identifier (Specification_Node, Idents (Ident));
  
                 --  Scan possible ALIASED for Ada 2012 (AI-142)
  
--- 1471,1478 ----
              Ident_List_Loop : loop
                 Specification_Node :=
                   New_Node (N_Parameter_Specification, Ident_Sloc);
!                Set_Defining_Identifier
!                  (Specification_Node, Def_Ids.Idents (Ident));
  
                 --  Scan possible ALIASED for Ada 2012 (AI-142)
  
*************** package body Ch6 is
*** 1574,1585 ****
                    Set_Prev_Ids (Specification_Node, True);
                 end if;
  
!                if Ident < Num_Idents then
                    Set_More_Ids (Specification_Node, True);
                 end if;
  
                 Append (Specification_Node, Specification_List);
!                exit Ident_List_Loop when Ident = Num_Idents;
                 Ident := Ident + 1;
                 Restore_Scan_State (Scan_State);
              end loop Ident_List_Loop;
--- 1564,1575 ----
                    Set_Prev_Ids (Specification_Node, True);
                 end if;
  
!                if Ident < Def_Ids.Num_Idents then
                    Set_More_Ids (Specification_Node, True);
                 end if;
  
                 Append (Specification_Node, Specification_List);
!                exit Ident_List_Loop when Ident = Def_Ids.Num_Idents;
                 Ident := Ident + 1;
                 Restore_Scan_State (Scan_State);
              end loop Ident_List_Loop;
diff -Nrcpad gcc-16-20250803/gcc/ada/par-util.adb gcc-16-20250810/gcc/ada/par-util.adb
*** gcc-16-20250803/gcc/ada/par-util.adb	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/ada/par-util.adb	Sun Aug 10 22:32:06 2025
*************** with GNAT.Spelling_Checker; use GNAT.Spe
*** 34,39 ****
--- 34,55 ----
  separate (Par)
  package body Util is
  
+    ------------
+    -- Append --
+    ------------
+ 
+    procedure Append
+      (Def_Ids : in out Defining_Identifiers; Def_Id : Entity_Id)
+    is
+    begin
+       if Def_Ids.Num_Idents >= Defining_Identifiers_Array'Last then
+          raise Program_Error;
+       end if;
+ 
+       Def_Ids.Num_Idents := Def_Ids.Num_Idents + 1;
+       Def_Ids.Idents (Def_Ids.Num_Idents) := Def_Id;
+    end Append;
+ 
     ---------------------
     -- Bad_Spelling_Of --
     ---------------------
*************** package body Util is
*** 691,696 ****
--- 707,725 ----
        end if;
     end No_Constraint;
  
+    ---------------
+    -- P_Def_Ids --
+    ---------------
+ 
+    procedure P_Def_Ids (Def_Ids : out Defining_Identifiers) is
+       pragma Assert (Def_Ids.Num_Idents = 0);
+    begin
+       loop
+          Append (Def_Ids, P_Defining_Identifier (C_Comma_Colon));
+          exit when not Comma_Present;
+       end loop;
+    end P_Def_Ids;
+ 
     ---------------------
     -- Pop_Scope_Stack --
     ---------------------
diff -Nrcpad gcc-16-20250803/gcc/ada/par.adb gcc-16-20250810/gcc/ada/par.adb
*** gcc-16-20250803/gcc/ada/par.adb	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/ada/par.adb	Sun Aug 10 22:32:06 2025
*************** function Par (Configuration_Pragmas : Bo
*** 227,232 ****
--- 227,295 ----
     --   that there is a missing body, but it seems more reasonable to let the
     --   later semantic checking discover this.
  
+    --------------------------------------------
+    -- Handling IS Used in Place of Semicolon --
+    --------------------------------------------
+ 
+    --  This is a somewhat trickier situation, and we can't catch it in all
+    --  cases, but we do our best to detect common situations resulting from
+    --  a "cut and paste" operation which forgets to change the IS to semicolon.
+    --  Consider the following example:
+ 
+    --    package body X is
+    --      procedure A;
+    --      procedure B is -- Error: IS should be semicolon
+    --      procedure C;
+    --      ...
+    --      procedure D is
+    --      begin
+    --         ...
+    --      end;
+    --    begin
+    --      ...
+    --    end; -- end of B?
+ 
+    --  The trouble is that the section of text from PROCEDURE B through the
+    --  END; marked "-- end of B?" constitutes a valid procedure body, and the
+    --  danger is that we find out far too late that something is wrong.
+ 
+    --  We have two approaches to helping to control this situation. First we
+    --  make every attempt to avoid swallowing the last END; if we can be sure
+    --  that some error will result from doing so. In particular, we won't
+    --  accept the END; unless it is exactly correct (in particular it must not
+    --  have incorrect name tokens), and we won't accept it if it is immediately
+    --  followed by end of file, WITH or SEPARATE (tokens that unmistakeably
+    --  signal the start of a compilation unit, and which therefore allow us to
+    --  reserve the END; for the outer level.) For more details on this aspect
+    --  of the handling, see package Par.Endh.
+ 
+    --  If we can avoid eating up the END; then the result in the absence of
+    --  any additional steps would be to post a missing END referring back to
+    --  the subprogram with the bogus IS. Similarly, if the enclosing package
+    --  has no BEGIN, then the result is a missing BEGIN message, which again
+    --  refers back to the subprogram header.
+ 
+    --  Such an error message is not too bad, but it's not ideal, because
+    --  the declarations following the IS have been absorbed into the wrong
+    --  scope. In the above case, this could result for example in a bogus
+    --  complaint that the body of D was missing from the package.
+ 
+    --  To catch at least some of these cases, we take the following additional
+    --  steps. First, a subprogram body is marked as having a suspicious IS if
+    --  the declaration line is followed by a line that starts with a symbol
+    --  that can start a declaration in the same column, or to the left of the
+    --  column in which the FUNCTION or PROCEDURE starts (normal style is to
+    --  indent any declarations that really belong a subprogram). If such a
+    --  subprogram encounters a missing BEGIN or missing END, then we decide
+    --  that the IS should have been a semicolon, and the subprogram body node
+    --  is marked (by setting the Bad_Is_Detected flag true. Note that we do
+    --  not do this for library level procedures, only for nested procedures,
+    --  since for library level procedures, we must have a body.
+ 
+    --  The processing for a declarative part checks to see if the last
+    --  declaration scanned is marked in this way, and if it is, the tree
+    --  is modified to reflect the IS being interpreted as a semicolon.
+ 
     ----------------------------------------------------
     -- Handling of Reserved Words Used as Identifiers --
     ----------------------------------------------------
*************** function Par (Configuration_Pragmas : Bo
*** 294,364 ****
        C_Vertical_Bar_Arrow);
        --  Consider as identifier if followed by | or =>
  
-    --------------------------------------------
-    -- Handling IS Used in Place of Semicolon --
-    --------------------------------------------
- 
-    --  This is a somewhat trickier situation, and we can't catch it in all
-    --  cases, but we do our best to detect common situations resulting from
-    --  a "cut and paste" operation which forgets to change the IS to semicolon.
-    --  Consider the following example:
- 
-    --    package body X is
-    --      procedure A;
-    --      procedure B is
-    --      procedure C;
-    --      ...
-    --      procedure D is
-    --      begin
-    --         ...
-    --      end;
-    --    begin
-    --      ...
-    --    end;
- 
-    --  The trouble is that the section of text from PROCEDURE B through END;
-    --  constitutes a valid procedure body, and the danger is that we find out
-    --  far too late that something is wrong (indeed most compilers will behave
-    --  uncomfortably on the above example).
- 
-    --  We have two approaches to helping to control this situation. First we
-    --  make every attempt to avoid swallowing the last END; if we can be sure
-    --  that some error will result from doing so. In particular, we won't
-    --  accept the END; unless it is exactly correct (in particular it must not
-    --  have incorrect name tokens), and we won't accept it if it is immediately
-    --  followed by end of file, WITH or SEPARATE (all tokens that unmistakeably
-    --  signal the start of a compilation unit, and which therefore allow us to
-    --  reserve the END; for the outer level.) For more details on this aspect
-    --  of the handling, see package Par.Endh.
- 
-    --  If we can avoid eating up the END; then the result in the absence of
-    --  any additional steps would be to post a missing END referring back to
-    --  the subprogram with the bogus IS. Similarly, if the enclosing package
-    --  has no BEGIN, then the result is a missing BEGIN message, which again
-    --  refers back to the subprogram header.
- 
-    --  Such an error message is not too bad (it's already a big improvement
-    --  over what many parsers do), but it's not ideal, because the declarations
-    --  following the IS have been absorbed into the wrong scope. In the above
-    --  case, this could result for example in a bogus complaint that the body
-    --  of D was missing from the package.
- 
-    --  To catch at least some of these cases, we take the following additional
-    --  steps. First, a subprogram body is marked as having a suspicious IS if
-    --  the declaration line is followed by a line which starts with a symbol
-    --  that can start a declaration in the same column, or to the left of the
-    --  column in which the FUNCTION or PROCEDURE starts (normal style is to
-    --  indent any declarations which really belong a subprogram). If such a
-    --  subprogram encounters a missing BEGIN or missing END, then we decide
-    --  that the IS should have been a semicolon, and the subprogram body node
-    --  is marked (by setting the Bad_Is_Detected flag true. Note that we do
-    --  not do this for library level procedures, only for nested procedures,
-    --  since for library level procedures, we must have a body.
- 
-    --  The processing for a declarative part checks to see if the last
-    --  declaration scanned is marked in this way, and if it is, the tree
-    --  is modified to reflect the IS being interpreted as a semicolon.
- 
     ---------------------------------------------------
     -- Parser Type Definitions and Control Variables --
     ---------------------------------------------------
--- 357,362 ----
*************** function Par (Configuration_Pragmas : Bo
*** 1450,1455 ****
--- 1448,1494 ----
        --  the Node N (which is a Defining_Identifier node with the Chars field
        --  set) is a renaming of an entity in package Standard.
  
+       -----------------------------------
+       -- Multiple defining identifiers --
+       -----------------------------------
+ 
+       --  RM-3.3.1(7) says:
+       --
+       --    Any declaration that includes a defining_identifier_list with
+       --    more than one defining_identifier is equivalent to a series of
+       --    declarations each containing one defining_identifier from the list,
+       --    with the rest of the text of the declaration copied for each
+       --    declaration in the series, in the same order as the list.
+       --
+       --  We parse such declarations by first calling P_Def_Ids (see below).
+       --  Then, if there are multiple identifiers, we repeatedly scan the
+       --  type and initialization expression information by resetting the
+       --  scan pointer (so that we get completely separate trees for each
+       --  occurrence).
+ 
+       --  Defining_Identifiers is a sequence of identifiers parsed by
+       --  P_Def_Ids. Idents holds the identifiers, and Num_Idents
+       --  points to the last-used array elements. The upper bound
+       --  is intended to be essentially infinite, so we don't bother
+       --  giving a good error message when it is exceeded -- we
+       --  simply raise an exception.
+ 
+       type Defining_Identifiers_Array is
+         array (Pos range 1 .. 4096) of Entity_Id;
+ 
+       type Defining_Identifiers is record
+          Num_Idents : Nat := 0;
+          Idents     : Defining_Identifiers_Array;
+       end record;
+ 
+       procedure Append
+         (Def_Ids : in out Defining_Identifiers; Def_Id : Entity_Id);
+       --  Append one defining identifier onto Def_Ids.
+ 
+       procedure P_Def_Ids (Def_Ids : out Defining_Identifiers);
+       --  Parse a defining_identifier_list, appending the identifiers
+       --  onto Def_Ids, which should be initially empty.
+ 
     end Util;
  
     --------------
diff -Nrcpad gcc-16-20250803/gcc/ada/rtsfind.adb gcc-16-20250810/gcc/ada/rtsfind.adb
*** gcc-16-20250803/gcc/ada/rtsfind.adb	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/ada/rtsfind.adb	Sun Aug 10 22:32:06 2025
*************** package body Rtsfind is
*** 1030,1037 ****
        U        : RT_Unit_Table_Record renames RT_Unit_Table (U_Id);
        Priv_Par : constant Elist_Id := New_Elmt_List;
        Lib_Unit : Node_Id;
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        Saved_ISMP : constant Boolean        :=
                       Ignore_SPARK_Mode_Pragmas_In_Instance;
        Saved_SM  : constant SPARK_Mode_Type := SPARK_Mode;
--- 1030,1036 ----
        U        : RT_Unit_Table_Record renames RT_Unit_Table (U_Id);
        Priv_Par : constant Elist_Id := New_Elmt_List;
        Lib_Unit : Node_Id;
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        Saved_ISMP : constant Boolean        :=
                       Ignore_SPARK_Mode_Pragmas_In_Instance;
        Saved_SM  : constant SPARK_Mode_Type := SPARK_Mode;
*************** package body Rtsfind is
*** 1099,1105 ****
        procedure Restore_SPARK_Context is
        begin
           Ignore_SPARK_Mode_Pragmas_In_Instance := Saved_ISMP;
!          Restore_Ghost_Region (Saved_GM, Saved_IGR);
           Restore_SPARK_Mode   (Saved_SM, Saved_SMP);
        end Restore_SPARK_Context;
  
--- 1098,1104 ----
        procedure Restore_SPARK_Context is
        begin
           Ignore_SPARK_Mode_Pragmas_In_Instance := Saved_ISMP;
!          Restore_Ghost_Region (Saved_Ghost_Config);
           Restore_SPARK_Mode   (Saved_SM, Saved_SMP);
        end Restore_SPARK_Context;
  
*************** package body Rtsfind is
*** 1289,1295 ****
  
        declare
           LibUnit  : constant Node_Id         := Unit (Cunit (U.Unum));
!          Saved_GM : constant Ghost_Mode_Type := Ghost_Mode;
           Clause   : Node_Id;
           Withn    : Node_Id;
  
--- 1288,1294 ----
  
        declare
           LibUnit  : constant Node_Id         := Unit (Cunit (U.Unum));
!          Saved_GM : constant Ghost_Mode_Type := Ghost_Config.Ghost_Mode;
           Clause   : Node_Id;
           Withn    : Node_Id;
  
*************** package body Rtsfind is
*** 1308,1320 ****
           --  later, after ignored ghost code is converted to a null
           --  statement.
  
!          Ghost_Mode := None;
           Withn :=
             Make_With_Clause (Standard_Location,
               Name =>
                 Make_Unit_Name
                   (U, Defining_Unit_Name (Specification (LibUnit))));
!          Ghost_Mode := Saved_GM;
  
           Set_Corresponding_Spec  (Withn, U.Entity);
           Set_First_Name          (Withn);
--- 1307,1319 ----
           --  later, after ignored ghost code is converted to a null
           --  statement.
  
!          Ghost_Config.Ghost_Mode := None;
           Withn :=
             Make_With_Clause (Standard_Location,
               Name =>
                 Make_Unit_Name
                   (U, Defining_Unit_Name (Specification (LibUnit))));
!          Ghost_Config.Ghost_Mode := Saved_GM;
  
           Set_Corresponding_Spec  (Withn, U.Entity);
           Set_First_Name          (Withn);
*************** package body Rtsfind is
*** 1627,1633 ****
        --  is pulled within an ignored Ghost context because all this code will
        --  disappear.
  
!       if U_Id = System_Secondary_Stack and then Ghost_Mode /= Ignore then
           Sec_Stack_Used := True;
        end if;
  
--- 1626,1634 ----
        --  is pulled within an ignored Ghost context because all this code will
        --  disappear.
  
!       if U_Id = System_Secondary_Stack
!         and then Ghost_Config.Ghost_Mode /= Ignore
!       then
           Sec_Stack_Used := True;
        end if;
  
diff -Nrcpad gcc-16-20250803/gcc/ada/sem.adb gcc-16-20250810/gcc/ada/sem.adb
*** gcc-16-20250803/gcc/ada/sem.adb	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/ada/sem.adb	Sun Aug 10 22:32:06 2025
*************** package body Sem is
*** 104,111 ****
     --  Ghost mode.
  
     procedure Analyze (N : Node_Id) is
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
     begin
--- 104,110 ----
     --  Ghost mode.
  
     procedure Analyze (N : Node_Id) is
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
     begin
*************** package body Sem is
*** 842,848 ****
           Expand_SPARK_Potential_Renaming (N);
        end if;
  
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
     end Analyze;
  
     --  Version with check(s) suppressed
--- 841,847 ----
           Expand_SPARK_Potential_Renaming (N);
        end if;
  
!       Restore_Ghost_Region (Saved_Ghost_Config);
     end Analyze;
  
     --  Version with check(s) suppressed
*************** package body Sem is
*** 1440,1447 ****
        --  the Ghost mode.
  
        procedure Do_Analyze is
!          Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!          Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
           Saved_ISMP : constant Boolean        :=
                          Ignore_SPARK_Mode_Pragmas_In_Instance;
           --  Save Ghost and SPARK mode-related data to restore on exit
--- 1439,1445 ----
        --  the Ghost mode.
  
        procedure Do_Analyze is
!          Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
           Saved_ISMP : constant Boolean        :=
                          Ignore_SPARK_Mode_Pragmas_In_Instance;
           --  Save Ghost and SPARK mode-related data to restore on exit
*************** package body Sem is
*** 1489,1495 ****
           Style_Max_Line_Length := Saved_ML;
           Style_Check_Max_Line_Length := Saved_CML;
  
!          Restore_Ghost_Region (Saved_GM, Saved_IGR);
           Ignore_SPARK_Mode_Pragmas_In_Instance := Saved_ISMP;
        end Do_Analyze;
  
--- 1487,1493 ----
           Style_Max_Line_Length := Saved_ML;
           Style_Check_Max_Line_Length := Saved_CML;
  
!          Restore_Ghost_Region (Saved_Ghost_Config);
           Ignore_SPARK_Mode_Pragmas_In_Instance := Saved_ISMP;
        end Do_Analyze;
  
diff -Nrcpad gcc-16-20250803/gcc/ada/sem_attr.adb gcc-16-20250810/gcc/ada/sem_attr.adb
*** gcc-16-20250803/gcc/ada/sem_attr.adb	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/ada/sem_attr.adb	Sun Aug 10 22:32:06 2025
*************** package body Sem_Attr is
*** 5092,5098 ****
           --  early transformation also avoids the generation of a useless loop
           --  entry constant.
  
!          if Present (Encl_Prag) and then Is_Ignored (Encl_Prag) then
              Rewrite (N, Relocate_Node (P));
              Preanalyze_And_Resolve (N);
  
--- 5092,5098 ----
           --  early transformation also avoids the generation of a useless loop
           --  entry constant.
  
!          if Present (Encl_Prag) and then Is_Ignored_In_Codegen (Encl_Prag) then
              Rewrite (N, Relocate_Node (P));
              Preanalyze_And_Resolve (N);
  
diff -Nrcpad gcc-16-20250803/gcc/ada/sem_ch12.adb gcc-16-20250810/gcc/ada/sem_ch12.adb
*** gcc-16-20250803/gcc/ada/sem_ch12.adb	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/ada/sem_ch12.adb	Sun Aug 10 22:32:06 2025
*************** package body Sem_Ch12 is
*** 4900,4907 ****
        Loc        : constant Source_Ptr := Sloc (N);
        Is_Abbrev  : constant Boolean    :=
                       Is_Abbreviated_Instance (Defining_Entity (N));
!       Saved_GM   : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR  : constant Node_Id         := Ignored_Ghost_Region;
        Saved_ISMP : constant Boolean         :=
                       Ignore_SPARK_Mode_Pragmas_In_Instance;
        Saved_SM   : constant SPARK_Mode_Type := SPARK_Mode;
--- 4900,4906 ----
        Loc        : constant Source_Ptr := Sloc (N);
        Is_Abbrev  : constant Boolean    :=
                       Is_Abbreviated_Instance (Defining_Entity (N));
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        Saved_ISMP : constant Boolean         :=
                       Ignore_SPARK_Mode_Pragmas_In_Instance;
        Saved_SM   : constant SPARK_Mode_Type := SPARK_Mode;
*************** package body Sem_Ch12 is
*** 5680,5686 ****
        end if;
  
        Ignore_SPARK_Mode_Pragmas_In_Instance := Saved_ISMP;
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
        Restore_SPARK_Mode   (Saved_SM, Saved_SMP);
        Style_Check := Saved_Style_Check;
  
--- 5679,5685 ----
        end if;
  
        Ignore_SPARK_Mode_Pragmas_In_Instance := Saved_ISMP;
!       Restore_Ghost_Region (Saved_Ghost_Config);
        Restore_SPARK_Mode   (Saved_SM, Saved_SMP);
        Style_Check := Saved_Style_Check;
  
*************** package body Sem_Ch12 is
*** 5695,5701 ****
           end if;
  
           Ignore_SPARK_Mode_Pragmas_In_Instance := Saved_ISMP;
!          Restore_Ghost_Region (Saved_GM, Saved_IGR);
           Restore_SPARK_Mode   (Saved_SM, Saved_SMP);
           Style_Check := Saved_Style_Check;
     end Analyze_Package_Instantiation;
--- 5694,5700 ----
           end if;
  
           Ignore_SPARK_Mode_Pragmas_In_Instance := Saved_ISMP;
!          Restore_Ghost_Region (Saved_Ghost_Config);
           Restore_SPARK_Mode   (Saved_SM, Saved_SMP);
           Style_Check := Saved_Style_Check;
     end Analyze_Package_Instantiation;
*************** package body Sem_Ch12 is
*** 6340,6347 ****
  
        --  Local variables
  
!       Saved_GM   : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR  : constant Node_Id         := Ignored_Ghost_Region;
        Saved_ISMP : constant Boolean         :=
                       Ignore_SPARK_Mode_Pragmas_In_Instance;
        Saved_SM   : constant SPARK_Mode_Type := SPARK_Mode;
--- 6339,6345 ----
  
        --  Local variables
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        Saved_ISMP : constant Boolean         :=
                       Ignore_SPARK_Mode_Pragmas_In_Instance;
        Saved_SM   : constant SPARK_Mode_Type := SPARK_Mode;
*************** package body Sem_Ch12 is
*** 6736,6742 ****
        end if;
  
        Ignore_SPARK_Mode_Pragmas_In_Instance := Saved_ISMP;
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
        Restore_SPARK_Mode   (Saved_SM, Saved_SMP);
  
     exception
--- 6734,6740 ----
        end if;
  
        Ignore_SPARK_Mode_Pragmas_In_Instance := Saved_ISMP;
!       Restore_Ghost_Region (Saved_Ghost_Config);
        Restore_SPARK_Mode   (Saved_SM, Saved_SMP);
  
     exception
*************** package body Sem_Ch12 is
*** 6750,6756 ****
           end if;
  
           Ignore_SPARK_Mode_Pragmas_In_Instance := Saved_ISMP;
!          Restore_Ghost_Region (Saved_GM, Saved_IGR);
           Restore_SPARK_Mode   (Saved_SM, Saved_SMP);
     end Analyze_Subprogram_Instantiation;
  
--- 6748,6754 ----
           end if;
  
           Ignore_SPARK_Mode_Pragmas_In_Instance := Saved_ISMP;
!          Restore_Ghost_Region (Saved_Ghost_Config);
           Restore_SPARK_Mode   (Saved_SM, Saved_SMP);
     end Analyze_Subprogram_Instantiation;
  
*************** package body Sem_Ch12 is
*** 12874,12881 ****
        --  the package body.
  
        Saved_CS   : constant Config_Switches_Type     := Save_Config_Switches;
!       Saved_GM   : constant Ghost_Mode_Type          := Ghost_Mode;
!       Saved_IGR  : constant Node_Id                  := Ignored_Ghost_Region;
        Saved_ISMP : constant Boolean                  :=
                       Ignore_SPARK_Mode_Pragmas_In_Instance;
        Saved_LSST : constant Suppress_Stack_Entry_Ptr :=
--- 12872,12878 ----
        --  the package body.
  
        Saved_CS   : constant Config_Switches_Type     := Save_Config_Switches;
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        Saved_ISMP : constant Boolean                  :=
                       Ignore_SPARK_Mode_Pragmas_In_Instance;
        Saved_LSST : constant Suppress_Stack_Entry_Ptr :=
*************** package body Sem_Ch12 is
*** 13405,13411 ****
  
        Expander_Mode_Restore;
        Restore_Config_Switches (Saved_CS);
!       Restore_Ghost_Region    (Saved_GM, Saved_IGR);
        Restore_SPARK_Mode      (Saved_SM, Saved_SMP);
        Restore_Warnings        (Saved_Warn);
     end Instantiate_Package_Body;
--- 13402,13408 ----
  
        Expander_Mode_Restore;
        Restore_Config_Switches (Saved_CS);
!       Restore_Ghost_Region    (Saved_Ghost_Config);
        Restore_SPARK_Mode      (Saved_SM, Saved_SMP);
        Restore_Warnings        (Saved_Warn);
     end Instantiate_Package_Body;
*************** package body Sem_Ch12 is
*** 13436,13443 ****
        --  the subprogram body.
  
        Saved_CS   : constant Config_Switches_Type     := Save_Config_Switches;
!       Saved_GM   : constant Ghost_Mode_Type          := Ghost_Mode;
!       Saved_IGR  : constant Node_Id                  := Ignored_Ghost_Region;
        Saved_ISMP : constant Boolean                  :=
                       Ignore_SPARK_Mode_Pragmas_In_Instance;
        Saved_LSST : constant Suppress_Stack_Entry_Ptr :=
--- 13433,13439 ----
        --  the subprogram body.
  
        Saved_CS   : constant Config_Switches_Type     := Save_Config_Switches;
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        Saved_ISMP : constant Boolean                  :=
                       Ignore_SPARK_Mode_Pragmas_In_Instance;
        Saved_LSST : constant Suppress_Stack_Entry_Ptr :=
*************** package body Sem_Ch12 is
*** 13740,13746 ****
  
        Expander_Mode_Restore;
        Restore_Config_Switches (Saved_CS);
!       Restore_Ghost_Region    (Saved_GM, Saved_IGR);
        Restore_SPARK_Mode      (Saved_SM, Saved_SMP);
        Restore_Warnings        (Saved_Warn);
     end Instantiate_Subprogram_Body;
--- 13736,13742 ----
  
        Expander_Mode_Restore;
        Restore_Config_Switches (Saved_CS);
!       Restore_Ghost_Region    (Saved_Ghost_Config);
        Restore_SPARK_Mode      (Saved_SM, Saved_SMP);
        Restore_Warnings        (Saved_Warn);
     end Instantiate_Subprogram_Body;
diff -Nrcpad gcc-16-20250803/gcc/ada/sem_ch13.adb gcc-16-20250810/gcc/ada/sem_ch13.adb
*** gcc-16-20250803/gcc/ada/sem_ch13.adb	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/ada/sem_ch13.adb	Sun Aug 10 22:32:06 2025
*************** package body Sem_Ch13 is
*** 4799,4805 ****
                      and then not Is_Ignored_Ghost_Entity (E)
                    then
                       if A_Id = Aspect_Pre then
!                         if Is_Ignored (Aspect) then
                             Set_Ignored_Class_Preconditions (E,
                               New_Copy_Tree (Expr));
                          else
--- 4799,4805 ----
                      and then not Is_Ignored_Ghost_Entity (E)
                    then
                       if A_Id = Aspect_Pre then
!                         if Is_Ignored_In_Codegen (Aspect) then
                             Set_Ignored_Class_Preconditions (E,
                               New_Copy_Tree (Expr));
                          else
*************** package body Sem_Ch13 is
*** 4813,4819 ****
                       elsif No (Class_Postconditions (E))
                         and then No (Ignored_Class_Postconditions (E))
                       then
!                         if Is_Ignored (Aspect) then
                             Set_Ignored_Class_Postconditions (E,
                               New_Copy_Tree (Expr));
                          else
--- 4813,4819 ----
                       elsif No (Class_Postconditions (E))
                         and then No (Ignored_Class_Postconditions (E))
                       then
!                         if Is_Ignored_In_Codegen (Aspect) then
                             Set_Ignored_Class_Postconditions (E,
                               New_Copy_Tree (Expr));
                          else
*************** package body Sem_Ch13 is
*** 10282,10289 ****
     procedure Build_Predicate_Function (Typ : Entity_Id; N : Node_Id) is
        Loc : constant Source_Ptr := Sloc (Typ);
  
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
        Expr : Node_Id;
--- 10282,10288 ----
     procedure Build_Predicate_Function (Typ : Entity_Id; N : Node_Id) is
        Loc : constant Source_Ptr := Sloc (Typ);
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
        Expr : Node_Id;
*************** package body Sem_Ch13 is
*** 10449,10455 ****
              --  which is needed to generate the corresponding predicate
              --  function.
  
!             if Is_Ignored_Ghost_Pragma (Prag) then
                 Add_Condition (New_Occurrence_Of (Standard_True, Sloc (Prag)));
  
              else
--- 10448,10454 ----
              --  which is needed to generate the corresponding predicate
              --  function.
  
!             if Is_Ignored_Ghost_Pragma_In_Codegen (Prag) then
                 Add_Condition (New_Occurrence_Of (Standard_True, Sloc (Prag)));
  
              else
*************** package body Sem_Ch13 is
*** 10490,10496 ****
  
                    --  "and"-in the Arg2 condition to evolving expression
  
!                   if not Is_Ignored_Ghost_Pragma (Prag) then
                       Add_Condition (Arg2_Copy);
                    end if;
                 end;
--- 10489,10496 ----
  
                    --  "and"-in the Arg2 condition to evolving expression
  
!                   if not Is_Ignored_Ghost_Pragma_In_Codegen (Prag)
!                   then
                       Add_Condition (Arg2_Copy);
                    end if;
                 end;
*************** package body Sem_Ch13 is
*** 11090,11096 ****
           end;
        end if;
  
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
  
        if Restore_Scope then
           Pop_Scope;
--- 11090,11096 ----
           end;
        end if;
  
!       Restore_Ghost_Region (Saved_Ghost_Config);
  
        if Restore_Scope then
           Pop_Scope;
*************** package body Sem_Ch13 is
*** 11110,11117 ****
     is
        Loc : constant Source_Ptr := Sloc (Typ);
  
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
        Func_Decl : Node_Id;
--- 11110,11116 ----
     is
        Loc : constant Source_Ptr := Sloc (Typ);
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
        Func_Decl : Node_Id;
*************** package body Sem_Ch13 is
*** 11192,11198 ****
        Insert_After (Parent (Typ), Func_Decl);
        Analyze (Func_Decl);
  
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
  
        return Func_Decl;
     end Build_Predicate_Function_Declaration;
--- 11191,11197 ----
        Insert_After (Parent (Typ), Func_Decl);
        Analyze (Func_Decl);
  
!       Restore_Ghost_Region (Saved_Ghost_Config);
  
        return Func_Decl;
     end Build_Predicate_Function_Declaration;
diff -Nrcpad gcc-16-20250803/gcc/ada/sem_ch3.adb gcc-16-20250810/gcc/ada/sem_ch3.adb
*** gcc-16-20250803/gcc/ada/sem_ch3.adb	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/ada/sem_ch3.adb	Sun Aug 10 22:32:06 2025
*************** package body Sem_Ch3 is
*** 4386,4393 ****
  
        --  Local variables
  
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
        Prev_Entity       : Entity_Id := Empty;
--- 4386,4392 ----
  
        --  Local variables
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
        Prev_Entity       : Entity_Id := Empty;
*************** package body Sem_Ch3 is
*** 5475,5481 ****
           Check_No_Hidden_State (Id);
        end if;
  
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
     end Analyze_Object_Declaration;
  
     ---------------------------
--- 5474,5480 ----
           Check_No_Hidden_State (Id);
        end if;
  
!       Restore_Ghost_Region (Saved_Ghost_Config);
     end Analyze_Object_Declaration;
  
     ---------------------------
*************** package body Sem_Ch3 is
*** 21707,21714 ****
  
        --  Local variables
  
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
        Full_Indic  : Node_Id;
--- 21706,21712 ----
  
        --  Local variables
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
        Full_Indic  : Node_Id;
*************** package body Sem_Ch3 is
*** 22401,22407 ****
        end if;
  
     <<Leave>>
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
     end Process_Full_View;
  
     -----------------------------------
--- 22399,22405 ----
        end if;
  
     <<Leave>>
!       Restore_Ghost_Region (Saved_Ghost_Config);
     end Process_Full_View;
  
     -----------------------------------
diff -Nrcpad gcc-16-20250803/gcc/ada/sem_ch5.adb gcc-16-20250810/gcc/ada/sem_ch5.adb
*** gcc-16-20250803/gcc/ada/sem_ch5.adb	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/ada/sem_ch5.adb	Sun Aug 10 22:32:06 2025
*************** package body Sem_Ch5 is
*** 385,392 ****
  
        --  Local variables
  
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
        T1 : Entity_Id;
--- 385,391 ----
  
        --  Local variables
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
        T1 : Entity_Id;
*************** package body Sem_Ch5 is
*** 1193,1199 ****
        Analyze_Dimension (N);
  
     <<Leave>>
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
  
        --  If the right-hand side contains target names, expansion has been
        --  disabled to prevent expansion that might move target names out of
--- 1192,1198 ----
        Analyze_Dimension (N);
  
     <<Leave>>
!       Restore_Ghost_Region (Saved_Ghost_Config);
  
        --  If the right-hand side contains target names, expansion has been
        --  disabled to prevent expansion that might move target names out of
*************** package body Sem_Ch5 is
*** 2108,2114 ****
        --  A label declared within a Ghost region becomes Ghost (SPARK RM
        --  6.9(2)).
  
!       if Ghost_Mode > None then
           Set_Is_Ghost_Entity (Id);
        end if;
     end Analyze_Implicit_Label_Declaration;
--- 2107,2113 ----
        --  A label declared within a Ghost region becomes Ghost (SPARK RM
        --  6.9(2)).
  
!       if Ghost_Config.Ghost_Mode > None then
           Set_Is_Ghost_Entity (Id);
        end if;
     end Analyze_Implicit_Label_Declaration;
diff -Nrcpad gcc-16-20250803/gcc/ada/sem_ch6.adb gcc-16-20250810/gcc/ada/sem_ch6.adb
*** gcc-16-20250803/gcc/ada/sem_ch6.adb	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/ada/sem_ch6.adb	Sun Aug 10 22:32:06 2025
*************** package body Sem_Ch6 is
*** 1372,1379 ****
        Loc  : constant Source_Ptr := Sloc (N);
        Spec : constant Node_Id    := Specification (N);
  
!       Saved_GM   : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR  : constant Node_Id         := Ignored_Ghost_Region;
        Saved_ISMP : constant Boolean         :=
                       Ignore_SPARK_Mode_Pragmas_In_Instance;
        --  Save the Ghost and SPARK mode-related data to restore on exit
--- 1372,1378 ----
        Loc  : constant Source_Ptr := Sloc (N);
        Spec : constant Node_Id    := Specification (N);
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        Saved_ISMP : constant Boolean         :=
                       Ignore_SPARK_Mode_Pragmas_In_Instance;
        --  Save the Ghost and SPARK mode-related data to restore on exit
*************** package body Sem_Ch6 is
*** 1529,1535 ****
  
     <<Leave>>
        Ignore_SPARK_Mode_Pragmas_In_Instance := Saved_ISMP;
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
     end Analyze_Null_Procedure;
  
     -----------------------------
--- 1528,1534 ----
  
     <<Leave>>
        Ignore_SPARK_Mode_Pragmas_In_Instance := Saved_ISMP;
!       Restore_Ghost_Region (Saved_Ghost_Config);
     end Analyze_Null_Procedure;
  
     -----------------------------
*************** package body Sem_Ch6 is
*** 1624,1631 ****
        Loc     : constant Source_Ptr := Sloc (N);
        P       : constant Node_Id    := Name (N);
  
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
        Actual : Node_Id;
--- 1623,1629 ----
        Loc     : constant Source_Ptr := Sloc (N);
        P       : constant Node_Id    := Name (N);
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
        Actual : Node_Id;
*************** package body Sem_Ch6 is
*** 1890,1896 ****
        end if;
  
     <<Leave>>
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
     end Analyze_Procedure_Call;
  
     ------------------------------
--- 1888,1894 ----
        end if;
  
     <<Leave>>
!       Restore_Ghost_Region (Saved_Ghost_Config);
     end Analyze_Procedure_Call;
  
     ------------------------------
*************** package body Sem_Ch6 is
*** 3608,3615 ****
  
        --  Local variables
  
!       Saved_GM   : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR  : constant Node_Id         := Ignored_Ghost_Region;
        Saved_EA   : constant Boolean         := Expander_Active;
        Saved_ISMP : constant Boolean         :=
                       Ignore_SPARK_Mode_Pragmas_In_Instance;
--- 3606,3612 ----
  
        --  Local variables
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        Saved_EA   : constant Boolean         := Expander_Active;
        Saved_ISMP : constant Boolean         :=
                       Ignore_SPARK_Mode_Pragmas_In_Instance;
*************** package body Sem_Ch6 is
*** 3836,3842 ****
        --  user entities, as internally generated entitities might still need
        --  to be expanded (e.g. those generated for types).
  
!       if Present (Ignored_Ghost_Region)
          and then Comes_From_Source (Body_Id)
        then
           Expander_Active := False;
--- 3833,3839 ----
        --  user entities, as internally generated entitities might still need
        --  to be expanded (e.g. those generated for types).
  
!       if Present (Ghost_Config.Ignored_Ghost_Region)
          and then Comes_From_Source (Body_Id)
        then
           Expander_Active := False;
*************** package body Sem_Ch6 is
*** 5022,5033 ****
        end if;
  
     <<Leave>>
!       if Present (Ignored_Ghost_Region) then
           Expander_Active := Saved_EA;
        end if;
  
        Ignore_SPARK_Mode_Pragmas_In_Instance := Saved_ISMP;
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
     end Analyze_Subprogram_Body_Helper;
  
     ------------------------------------
--- 5019,5030 ----
        end if;
  
     <<Leave>>
!       if Present (Ghost_Config.Ignored_Ghost_Region) then
           Expander_Active := Saved_EA;
        end if;
  
        Ignore_SPARK_Mode_Pragmas_In_Instance := Saved_ISMP;
!       Restore_Ghost_Region (Saved_Ghost_Config);
     end Analyze_Subprogram_Body_Helper;
  
     ------------------------------------
diff -Nrcpad gcc-16-20250803/gcc/ada/sem_ch7.adb gcc-16-20250810/gcc/ada/sem_ch7.adb
*** gcc-16-20250803/gcc/ada/sem_ch7.adb	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/ada/sem_ch7.adb	Sun Aug 10 22:32:06 2025
*************** package body Sem_Ch7 is
*** 714,721 ****
  
        --  Local variables
  
!       Saved_GM   : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR  : constant Node_Id         := Ignored_Ghost_Region;
        Saved_EA   : constant Boolean         := Expander_Active;
        Saved_ISMP : constant Boolean         :=
                       Ignore_SPARK_Mode_Pragmas_In_Instance;
--- 714,720 ----
  
        --  Local variables
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        Saved_EA   : constant Boolean         := Expander_Active;
        Saved_ISMP : constant Boolean         :=
                       Ignore_SPARK_Mode_Pragmas_In_Instance;
*************** package body Sem_Ch7 is
*** 836,842 ****
        --  user entities, as internally generated entities might still need
        --  to be expanded (e.g. those generated for types).
  
!       if Present (Ignored_Ghost_Region)
          and then Comes_From_Source (Body_Id)
        then
           Expander_Active := False;
--- 835,841 ----
        --  user entities, as internally generated entities might still need
        --  to be expanded (e.g. those generated for types).
  
!       if Present (Ghost_Config.Ignored_Ghost_Region)
          and then Comes_From_Source (Body_Id)
        then
           Expander_Active := False;
*************** package body Sem_Ch7 is
*** 1149,1160 ****
           end if;
        end if;
  
!       if Present (Ignored_Ghost_Region) then
           Expander_Active := Saved_EA;
        end if;
  
        Ignore_SPARK_Mode_Pragmas_In_Instance := Saved_ISMP;
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
     end Analyze_Package_Body_Helper;
  
     ---------------------------------
--- 1148,1159 ----
           end if;
        end if;
  
!       if Present (Ghost_Config.Ignored_Ghost_Region) then
           Expander_Active := Saved_EA;
        end if;
  
        Ignore_SPARK_Mode_Pragmas_In_Instance := Saved_ISMP;
!       Restore_Ghost_Region (Saved_Ghost_Config);
     end Analyze_Package_Body_Helper;
  
     ---------------------------------
diff -Nrcpad gcc-16-20250803/gcc/ada/sem_prag.adb gcc-16-20250810/gcc/ada/sem_prag.adb
*** gcc-16-20250803/gcc/ada/sem_prag.adb	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/ada/sem_prag.adb	Sun Aug 10 22:32:06 2025
*************** package body Sem_Prag is
*** 436,443 ****
        Arg1      : constant Node_Id   :=
          First (Pragma_Argument_Associations (N));
  
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
        Errors        : Nat;
--- 436,442 ----
        Arg1      : constant Node_Id   :=
          First (Pragma_Argument_Associations (N));
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
        Errors        : Nat;
*************** package body Sem_Prag is
*** 492,498 ****
              End_Scope;
           end if;
  
!          Restore_Ghost_Region (Saved_GM, Saved_IGR);
        end if;
  
        Set_Is_Analyzed_Pragma (N);
--- 491,497 ----
              End_Scope;
           end if;
  
!          Restore_Ghost_Region (Saved_Ghost_Config);
        end if;
  
        Set_Is_Analyzed_Pragma (N);
*************** package body Sem_Prag is
*** 607,614 ****
  
        CCases : constant Node_Id := Expression (Get_Argument (N, Spec_Id));
  
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
        CCase         : Node_Id;
--- 606,612 ----
  
        CCases : constant Node_Id := Expression (Get_Argument (N, Spec_Id));
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
        CCase         : Node_Id;
*************** package body Sem_Prag is
*** 695,701 ****
  
        Set_Is_Analyzed_Pragma (N);
  
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
     end Analyze_Contract_Cases_In_Decl_Part;
  
     ----------------------------------
--- 693,699 ----
  
        Set_Is_Analyzed_Pragma (N);
  
!       Restore_Ghost_Region (Saved_Ghost_Config);
     end Analyze_Contract_Cases_In_Decl_Part;
  
     ----------------------------------
*************** package body Sem_Prag is
*** 2464,2471 ****
        Exceptional_Contracts : constant Node_Id :=
          Expression (Get_Argument (N, Spec_Id));
  
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
        Exceptional_Contract : Node_Id;
--- 2462,2468 ----
        Exceptional_Contracts : constant Node_Id :=
          Expression (Get_Argument (N, Spec_Id));
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
        Exceptional_Contract : Node_Id;
*************** package body Sem_Prag is
*** 2556,2562 ****
  
        Set_Is_Analyzed_Pragma (N);
  
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
     end Analyze_Exceptional_Cases_In_Decl_Part;
  
     -------------------------------------
--- 2553,2559 ----
  
        Set_Is_Analyzed_Pragma (N);
  
!       Restore_Ghost_Region (Saved_Ghost_Config);
     end Analyze_Exceptional_Cases_In_Decl_Part;
  
     -------------------------------------
*************** package body Sem_Prag is
*** 2772,2779 ****
        Exit_Contracts : constant Node_Id :=
          Expression (Get_Argument (N, Spec_Id));
  
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
        Exit_Contract : Node_Id;
--- 2769,2775 ----
        Exit_Contracts : constant Node_Id :=
          Expression (Get_Argument (N, Spec_Id));
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
        Exit_Contract : Node_Id;
*************** package body Sem_Prag is
*** 2863,2869 ****
  
        Set_Is_Analyzed_Pragma (N);
  
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
     end Analyze_Exit_Cases_In_Decl_Part;
  
     --------------------------------------------
--- 2859,2865 ----
  
        Set_Is_Analyzed_Pragma (N);
  
!       Restore_Ghost_Region (Saved_Ghost_Config);
     end Analyze_Exit_Cases_In_Decl_Part;
  
     --------------------------------------------
*************** package body Sem_Prag is
*** 3688,3695 ****
        Pack_Id   : constant Entity_Id := Defining_Entity (Pack_Decl);
        Expr      : constant Node_Id   := Expression (Get_Argument (N, Pack_Id));
  
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
     begin
--- 3684,3690 ----
        Pack_Id   : constant Entity_Id := Defining_Entity (Pack_Decl);
        Expr      : constant Node_Id   := Expression (Get_Argument (N, Pack_Id));
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
     begin
*************** package body Sem_Prag is
*** 3713,3719 ****
        Preanalyze_And_Resolve (Expr, Standard_Boolean);
        Set_Is_Analyzed_Pragma (N);
  
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
     end Analyze_Initial_Condition_In_Decl_Part;
  
     --------------------------------------
--- 3708,3714 ----
        Preanalyze_And_Resolve (Expr, Standard_Boolean);
        Set_Is_Analyzed_Pragma (N);
  
!       Restore_Ghost_Region (Saved_Ghost_Config);
     end Analyze_Initial_Condition_In_Decl_Part;
  
     --------------------------------------
*************** package body Sem_Prag is
*** 5766,5772 ****
  
              begin
                 if Pname = Name_Pre_Class then
!                   if Is_Ignored (N) then
                       Set_Ignored_Class_Preconditions (Subp_Id,
                         New_Copy_Tree (Expr));
                    else
--- 5761,5767 ----
  
              begin
                 if Pname = Name_Pre_Class then
!                   if Is_Ignored_In_Codegen (N) then
                       Set_Ignored_Class_Preconditions (Subp_Id,
                         New_Copy_Tree (Expr));
                    else
*************** package body Sem_Prag is
*** 5774,5780 ****
                    end if;
  
                 else
!                   if Is_Ignored (N) then
                       Set_Ignored_Class_Postconditions (Subp_Id,
                         New_Copy_Tree (Expr));
                    else
--- 5769,5775 ----
                    end if;
  
                 else
!                   if Is_Ignored_In_Codegen (N) then
                       Set_Ignored_Class_Postconditions (Subp_Id,
                         New_Copy_Tree (Expr));
                    else
*************** package body Sem_Prag is
*** 12987,12993 ****
                    --  An abstract state declared within a Ghost region becomes
                    --  Ghost (SPARK RM 6.9(2)).
  
!                   if Ghost_Mode > None or else Is_Ghost_Entity (Pack_Id) then
                       Set_Is_Ghost_Entity (State_Id);
                    end if;
  
--- 12982,12990 ----
                    --  An abstract state declared within a Ghost region becomes
                    --  Ghost (SPARK RM 6.9(2)).
  
!                   if Ghost_Config.Ghost_Mode > None
!                     or else Is_Ghost_Entity (Pack_Id)
!                   then
                       Set_Is_Ghost_Entity (State_Id);
                    end if;
  
*************** package body Sem_Prag is
*** 14302,14308 ****
                       --  cannot occur within a Ghost subprogram or package
                       --  (SPARK RM 6.9(16)).
  
!                      if Ghost_Mode > None then
                          Error_Pragma
                            ("pragma % cannot appear within ghost subprogram or "
                             & "package");
--- 14299,14305 ----
                       --  cannot occur within a Ghost subprogram or package
                       --  (SPARK RM 6.9(16)).
  
!                      if Ghost_Config.Ghost_Mode > None then
                          Error_Pragma
                            ("pragma % cannot appear within ghost subprogram or "
                             & "package");
*************** package body Sem_Prag is
*** 14871,14895 ****
                    Set_Is_Ignored (N, False);
  
                 else
!                   --  In CodePeer mode and GNATprove mode, we need to
!                   --  consider all assertions, unless they are disabled,
!                   --  because transformations of the AST may depend on
!                   --  assertions being checked.
  
-                   if CodePeer_Mode or GNATprove_Mode then
-                      Set_Is_Checked (N, True);
-                      Set_Is_Ignored (N, False);
-                   else
-                      Set_Is_Checked (N, False);
-                      Set_Is_Ignored (N, True);
-                   end if;
                 end if;
              end Handle_Dynamic_Predicate_Check;
  
              --  Local variables
  
!             Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!             Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
              --  Save the Ghost-related attributes to restore on exit
  
              Cname : Name_Id;
--- 14868,14882 ----
                    Set_Is_Ignored (N, False);
  
                 else
!                   Set_Is_Checked (N, False);
!                   Set_Is_Ignored (N, True);
  
                 end if;
              end Handle_Dynamic_Predicate_Check;
  
              --  Local variables
  
!             Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
              --  Save the Ghost-related attributes to restore on exit
  
              Cname : Name_Id;
*************** package body Sem_Prag is
*** 15047,15053 ****
              --  False at compile time, and we do not want to delete this
              --  warning when we delete the if statement.
  
!             if Expander_Active and Is_Ignored (N) then
                 Eloc := Sloc (Expr);
  
                 Rewrite (N,
--- 15034,15040 ----
              --  False at compile time, and we do not want to delete this
              --  warning when we delete the if statement.
  
!             if Expander_Active and Is_Ignored_In_Codegen (N) then
                 Eloc := Sloc (Expr);
  
                 Rewrite (N,
*************** package body Sem_Prag is
*** 15100,15106 ****
                 In_Assertion_Expr := In_Assertion_Expr - 1;
              end if;
  
!             Restore_Ghost_Region (Saved_GM, Saved_IGR);
           end Check;
  
           --------------------------
--- 15087,15093 ----
                 In_Assertion_Expr := In_Assertion_Expr - 1;
              end if;
  
!             Restore_Ghost_Region (Saved_Ghost_Config);
           end Check;
  
           --------------------------
*************** package body Sem_Prag is
*** 16246,16255 ****
              Cond :=
                New_Occurrence_Of
                  (Boolean_Literals
!                   (Expander_Active and then not Is_Ignored (N)),
                   Loc);
  
!             if not Is_Ignored (N) then
                 Set_SCO_Pragma_Enabled (Loc);
              end if;
  
--- 16233,16242 ----
              Cond :=
                New_Occurrence_Of
                  (Boolean_Literals
!                   (Expander_Active and then not Is_Ignored_In_Codegen (N)),
                   Loc);
  
!             if not Is_Ignored_In_Codegen (N) then
                 Set_SCO_Pragma_Enabled (Loc);
              end if;
  
*************** package body Sem_Prag is
*** 18720,18726 ****
                    --  region (SPARK RM 6.9(6)).
  
                    if Is_False (Expr_Value (Expr))
!                     and then Ghost_Mode > None
                    then
                       Error_Pragma
                         ("pragma % with value False cannot appear in enabled "
--- 18707,18713 ----
                    --  region (SPARK RM 6.9(6)).
  
                    if Is_False (Expr_Value (Expr))
!                      and then Ghost_Config.Ghost_Mode > None
                    then
                       Error_Pragma
                         ("pragma % with value False cannot appear in enabled "
*************** package body Sem_Prag is
*** 28323,28330 ****
  
        Expr : constant Node_Id := Expression (Get_Argument (N, Spec_Id));
  
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
        Errors        : Nat;
--- 28310,28316 ----
  
        Expr : constant Node_Id := Expression (Get_Argument (N, Spec_Id));
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
        Errors        : Nat;
*************** package body Sem_Prag is
*** 28417,28423 ****
        Check_Postcondition_Use_In_Inlined_Subprogram (N, Spec_Id);
        Set_Is_Analyzed_Pragma (N);
  
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
     end Analyze_Pre_Post_Condition_In_Decl_Part;
  
     ---------------------------------------
--- 28403,28409 ----
        Check_Postcondition_Use_In_Inlined_Subprogram (N, Spec_Id);
        Set_Is_Analyzed_Pragma (N);
  
!       Restore_Ghost_Region (Saved_Ghost_Config);
     end Analyze_Pre_Post_Condition_In_Decl_Part;
  
     ---------------------------------------
*************** package body Sem_Prag is
*** 28437,28444 ****
        Arg1      : constant Node_Id   :=
          First (Pragma_Argument_Associations (N));
  
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
        Errors        : Nat;
--- 28423,28429 ----
        Arg1      : constant Node_Id   :=
          First (Pragma_Argument_Associations (N));
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
        Errors        : Nat;
*************** package body Sem_Prag is
*** 28561,28567 ****
  
           Check_Postcondition_Use_In_Inlined_Subprogram (N, Spec_Id);
  
!          Restore_Ghost_Region (Saved_GM, Saved_IGR);
        end if;
  
        Set_Is_Analyzed_Pragma (N);
--- 28546,28552 ----
  
           Check_Postcondition_Use_In_Inlined_Subprogram (N, Spec_Id);
  
!          Restore_Ghost_Region (Saved_Ghost_Config);
        end if;
  
        Set_Is_Analyzed_Pragma (N);
*************** package body Sem_Prag is
*** 31803,31810 ****
  
        Variants : constant Node_Id := Expression (Get_Argument (N, Spec_Id));
  
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
        Variant       : Node_Id;
--- 31788,31794 ----
  
        Variants : constant Node_Id := Expression (Get_Argument (N, Spec_Id));
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
        Variant       : Node_Id;
*************** package body Sem_Prag is
*** 31899,31905 ****
  
        Set_Is_Analyzed_Pragma (N);
  
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
     end Analyze_Subprogram_Variant_In_Decl_Part;
  
     ------------------------------------
--- 31883,31889 ----
  
        Set_Is_Analyzed_Pragma (N);
  
!       Restore_Ghost_Region (Saved_Ghost_Config);
     end Analyze_Subprogram_Variant_In_Decl_Part;
  
     ------------------------------------
*************** package body Sem_Prag is
*** 32195,32214 ****
                    when Name_Ignore
                       | Name_Off
                    =>
!                      --  In CodePeer mode and GNATprove mode, we need to
!                      --  consider all assertions, unless they are disabled.
!                      --  Force Is_Checked on ignored assertions, in particular
!                      --  because transformations of the AST may depend on
!                      --  assertions being checked (e.g. the translation of
!                      --  attribute 'Loop_Entry).
! 
!                      if CodePeer_Mode or GNATprove_Mode then
!                         Set_Is_Checked (N, True);
!                         Set_Is_Ignored (N, False);
!                      else
!                         Set_Is_Checked (N, False);
!                         Set_Is_Ignored (N, True);
!                      end if;
  
                    when Name_Check
                       | Name_On
--- 32179,32186 ----
                    when Name_Ignore
                       | Name_Off
                    =>
!                      Set_Is_Checked (N, False);
!                      Set_Is_Ignored (N, True);
  
                    when Name_Check
                       | Name_On
*************** package body Sem_Prag is
*** 34270,34382 ****
       (N     : Node_Id;
        Eloc  : Source_Ptr)
     is
!       Arg1  : constant Node_Id := First (Pragma_Argument_Associations (N));
!       Arg1x : constant Node_Id := Get_Pragma_Arg (Arg1);
!       Arg2  : constant Node_Id := Next (Arg1);
  
!       Pname   : constant Name_Id   := Pragma_Name_Unmapped (N);
!       Prag_Id : constant Pragma_Id := Get_Pragma_Id (Pname);
  
!    begin
!       Analyze_And_Resolve (Arg1x, Standard_Boolean);
  
!       if Compile_Time_Known_Value (Arg1x) then
!          if Is_True (Expr_Value (Arg1x)) then
  
!             --  We have already verified that the second argument is a static
!             --  string expression. Its string value must be retrieved
!             --  explicitly if it is a declared constant, otherwise it has
!             --  been constant-folded previously.
  
!             declare
!                Cent    : constant Entity_Id := Cunit_Entity (Current_Sem_Unit);
!                Str     : constant String_Id :=
!                            Strval (Expr_Value_S (Get_Pragma_Arg (Arg2)));
!                Str_Len : constant Nat       := String_Length (Str);
  
!                Force : constant Boolean :=
!                          Prag_Id = Pragma_Compile_Time_Warning
!                            and then Is_Spec_Name (Unit_Name (Current_Sem_Unit))
!                            and then (Ekind (Cent) /= E_Package
!                                       or else not In_Private_Part (Cent));
!                --  Set True if this is the warning case, and we are in the
!                --  visible part of a package spec, or in a subprogram spec,
!                --  in which case we want to force the client to see the
!                --  warning, even though it is not in the main unit.
  
!                C    : Character;
!                CC   : Char_Code;
!                Cont : Boolean;
!                Ptr  : Nat;
  
!             begin
!                --  Loop through segments of message separated by line feeds.
!                --  We output these segments as separate messages with
!                --  continuation marks for all but the first.
  
!                Cont := False;
!                Ptr  := 1;
!                loop
!                   Error_Msg_Strlen := 0;
  
!                   --  Loop to copy characters from argument to error message
!                   --  string buffer.
  
!                   loop
!                      exit when Ptr > Str_Len;
!                      CC := Get_String_Char (Str, Ptr);
!                      Ptr := Ptr + 1;
  
!                      --  Ignore wide chars ??? else store character
  
!                      if In_Character_Range (CC) then
!                         C := Get_Character (CC);
!                         exit when C = ASCII.LF;
!                         Error_Msg_Strlen := Error_Msg_Strlen + 1;
!                         Error_Msg_String (Error_Msg_Strlen) := C;
!                      end if;
!                   end loop;
  
!                   --  Here with one line ready to go
  
!                   Error_Msg_Warn := Prag_Id = Pragma_Compile_Time_Warning;
  
!                   --  If this is a warning in a spec, then we want clients
!                   --  to see the warning, so mark the message with the
!                   --  special sequence !! to force the warning. In the case
!                   --  of a package spec, we do not force this if we are in
!                   --  the private part of the spec.
  
!                   if Force then
!                      if Cont = False then
!                         Error_Msg
!                            ("<<~!!", Eloc, N, Is_Compile_Time_Pragma => True);
!                         Cont := True;
!                      else
!                         Error_Msg
!                            ("\<<~!!", Eloc, N, Is_Compile_Time_Pragma => True);
!                      end if;
  
!                   --  Error, rather than warning, or in a body, so we do not
!                   --  need to force visibility for client (error will be
!                   --  output in any case, and this is the situation in which
!                   --  we do not want a client to get a warning, since the
!                   --  warning is in the body or the spec private part).
  
!                   else
!                      if Cont = False then
!                         Error_Msg
!                            ("<<~", Eloc, N, Is_Compile_Time_Pragma => True);
!                         Cont := True;
!                      else
!                         Error_Msg
!                            ("\<<~", Eloc, N, Is_Compile_Time_Pragma => True);
!                      end if;
!                   end if;
  
!                   exit when Ptr > Str_Len;
!                end loop;
!             end;
           end if;
  
        --  Arg1x is not known at compile time, so possibly issue an error
--- 34242,34364 ----
       (N     : Node_Id;
        Eloc  : Source_Ptr)
     is
!       Arg1    : constant Node_Id := First (Pragma_Argument_Associations (N));
!       Arg1x   : constant Node_Id := Get_Pragma_Arg (Arg1);
!       Prag_Id : constant Pragma_Id := Get_Pragma_Id (N);
  
!       procedure Emit_Compile_Time_Message (Msg_Arg : Node_Id);
!       --  Emit the pragma a as diagnostic message. New_Line characters are
!       --  considered separators for those messages where the following lines
!       --  are considered as continuation messages for the same diagnostic.
  
!       -------------------------------
!       -- Emit_Compile_Time_Message --
!       -------------------------------
  
!       procedure Emit_Compile_Time_Message (Msg_Arg : Node_Id) is
!          --  We have already verified that the Msg_Arg is a static
!          --  string expression. Its string value must be retrieved
!          --  explicitly if it is a declared constant, otherwise it has
!          --  been constant-folded previously.
  
!          Cent    : constant Entity_Id := Cunit_Entity (Current_Sem_Unit);
!          Str     : constant String_Id :=
!            Strval (Expr_Value_S (Get_Pragma_Arg (Msg_Arg)));
!          Str_Len : constant Nat := String_Length (Str);
  
!          Force : constant Boolean :=
!            Prag_Id = Pragma_Compile_Time_Warning
!            and then Is_Spec_Name (Unit_Name (Current_Sem_Unit))
!            and then (Ekind (Cent) /= E_Package
!                      or else not In_Private_Part (Cent));
!          --  Set True if this is the warning case, and we are in the
!          --  visible part of a package spec, or in a subprogram spec,
!          --  in which case we want to force the client to see the
!          --  warning, even though it is not in the main unit.
  
!          Msg_Ctrl : Bounded_String (6);
!          --  Control characters for the message.
!          --  The longest value contains 6 characters: "\<<~!!"
  
!          C    : Character;
!          CC   : Char_Code;
!          Cont : Boolean;
!          Ptr  : Nat;
  
!       begin
!          --  Loop through segments of message separated by line feeds.
!          --  We output these segments as separate messages with
!          --  continuation marks for all but the first.
  
!          Cont := False;
!          Ptr := 1;
!          loop
!             Error_Msg_Strlen := 0;
!             Msg_Ctrl.Length := 0;
  
!             --  Loop to copy characters from argument to error message
!             --  string buffer.
  
!             loop
!                exit when Ptr > Str_Len;
!                CC := Get_String_Char (Str, Ptr);
!                Ptr := Ptr + 1;
  
!                --  Ignore wide chars ??? else store character
  
!                if In_Character_Range (CC) then
!                   C := Get_Character (CC);
!                   exit when C = ASCII.LF;
!                   Error_Msg_Strlen := Error_Msg_Strlen + 1;
!                   Error_Msg_String (Error_Msg_Strlen) := C;
!                end if;
!             end loop;
  
!             --  Here with one line ready to go
  
!             Error_Msg_Warn := Prag_Id = Pragma_Compile_Time_Warning;
  
!             if Cont then
!                Append (Msg_Ctrl, "\");
!             end if;
  
!             Append (Msg_Ctrl, "<<~");
  
!             --  If this is a warning in a spec, then we want clients
!             --  to see the warning, so mark the message with the
!             --  special sequence !! to force the warning. In the case
!             --  of a package spec, we do not force this if we are in
!             --  the private part of the spec.
  
!             if Force then
!                Append (Msg_Ctrl, "!!");
!             end if;
  
!             --  Error, rather than warning, or in a body, so we do not
!             --  need to force visibility for client (error will be
!             --  output in any case, and this is the situation in which
!             --  we do not want a client to get a warning, since the
!             --  warning is in the body or the spec private part).
! 
!             Error_Msg
!               (To_String (Msg_Ctrl), Eloc, N, Is_Compile_Time_Pragma => True);
! 
!             --  The next lines are considered continuation messages
! 
!             Cont := True;
! 
!             exit when Ptr > Str_Len;
!          end loop;
!       end Emit_Compile_Time_Message;
! 
!    --  Start of processing for Validate_Compile_Time_Warning_Or_Error
! 
!    begin
!       Analyze_And_Resolve (Arg1x, Standard_Boolean);
! 
!       if Compile_Time_Known_Value (Arg1x) then
!          if Is_True (Expr_Value (Arg1x)) then
!             Emit_Compile_Time_Message (Next (Arg1));
           end if;
  
        --  Arg1x is not known at compile time, so possibly issue an error
*************** package body Sem_Prag is
*** 35101,35107 ****
           begin
              Set_Scope (T.Scope);
              Reset_Analyzed_Flags (T.Prag);
!             Validate_Compile_Time_Warning_Or_Error (T.Prag, T.Eloc);
              Unset_Scope (T.Scope);
           end;
        end loop;
--- 35083,35099 ----
           begin
              Set_Scope (T.Scope);
              Reset_Analyzed_Flags (T.Prag);
!             if Nkind (T.Prag) = N_Pragma then
!                Validate_Compile_Time_Warning_Or_Error (T.Prag, T.Eloc);
!             else
!                pragma Assert (Nkind (Original_Node (T.Prag)) = N_Pragma);
! 
!                --  The pragma was likely removed in ignored ghost code. Check
!                --  the original node instead.
! 
!                Validate_Compile_Time_Warning_Or_Error
!                  (Original_Node (T.Prag), T.Eloc);
!             end if;
              Unset_Scope (T.Scope);
           end;
        end loop;
diff -Nrcpad gcc-16-20250803/gcc/ada/sem_util.adb gcc-16-20250810/gcc/ada/sem_util.adb
*** gcc-16-20250803/gcc/ada/sem_util.adb	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/ada/sem_util.adb	Sun Aug 10 22:32:06 2025
*************** package body Sem_Util is
*** 1963,1970 ****
  
        --  Local variables
  
!       Saved_GM  : constant Ghost_Mode_Type := Ghost_Mode;
!       Saved_IGR : constant Node_Id         := Ignored_Ghost_Region;
        --  Save the Ghost-related attributes to restore on exit
  
     --  Start of processing for Build_Elaboration_Entity
--- 1963,1969 ----
  
        --  Local variables
  
!       Saved_Ghost_Config : constant Ghost_Config_Type := Ghost_Config;
        --  Save the Ghost-related attributes to restore on exit
  
     --  Start of processing for Build_Elaboration_Entity
*************** package body Sem_Util is
*** 2060,2066 ****
        Set_Has_Qualified_Name       (Elab_Ent);
        Set_Has_Fully_Qualified_Name (Elab_Ent);
  
!       Restore_Ghost_Region (Saved_GM, Saved_IGR);
     end Build_Elaboration_Entity;
  
     --------------------------------
--- 2059,2065 ----
        Set_Has_Qualified_Name       (Elab_Ent);
        Set_Has_Fully_Qualified_Name (Elab_Ent);
  
!       Restore_Ghost_Region (Saved_Ghost_Config);
     end Build_Elaboration_Entity;
  
     --------------------------------
*************** package body Sem_Util is
*** 12473,12478 ****
--- 12472,12512 ----
        end if;
     end Is_Extended_Access_Type;
  
+    ----------------------------------------
+    -- Is_Ignored_Ghost_Entity_In_Codegen --
+    ----------------------------------------
+ 
+    function Is_Ignored_Ghost_Entity_In_Codegen (N : Entity_Id) return Boolean
+    is
+    begin
+       return
+         Is_Ignored_Ghost_Entity (N)
+         and then not GNATprove_Mode
+         and then not CodePeer_Mode;
+    end Is_Ignored_Ghost_Entity_In_Codegen;
+ 
+    ----------------------------------------
+    -- Is_Ignored_Ghost_Pragma_In_Codegen --
+    ----------------------------------------
+ 
+    function Is_Ignored_Ghost_Pragma_In_Codegen (N : Node_Id) return Boolean is
+    begin
+       return
+         Is_Ignored_Ghost_Pragma (N)
+         and then not GNATprove_Mode
+         and then not CodePeer_Mode;
+    end Is_Ignored_Ghost_Pragma_In_Codegen;
+ 
+    ---------------------------
+    -- Is_Ignored_In_Codegen --
+    ---------------------------
+ 
+    function Is_Ignored_In_Codegen (N : Node_Id) return Boolean is
+    begin
+       return
+         Is_Ignored (N) and then not GNATprove_Mode and then not CodePeer_Mode;
+    end Is_Ignored_In_Codegen;
+ 
     ---------------------------------
     -- Side_Effect_Free_Statements --
     ---------------------------------
*************** package body Sem_Util is
*** 22574,22580 ****
           --  Mark the Ghost and SPARK mode in effect
  
           if Modes then
!             if Ghost_Mode = Ignore then
                 Set_Is_Ignored_Ghost_Node (N);
              end if;
  
--- 22608,22614 ----
           --  Mark the Ghost and SPARK mode in effect
  
           if Modes then
!             if Ghost_Config.Ghost_Mode = Ignore then
                 Set_Is_Ignored_Ghost_Node (N);
              end if;
  
*************** package body Sem_Util is
*** 26439,26454 ****
           end if;
        end if;
  
-       --  In CodePeer mode and GNATprove mode, we need to consider all
-       --  assertions, unless they are disabled. Force Name_Check on
-       --  ignored assertions.
- 
-       if Kind in Name_Ignore | Name_Off
-         and then (CodePeer_Mode or GNATprove_Mode)
-       then
-          Kind := Name_Check;
-       end if;
- 
        return Kind;
     end Policy_In_Effect;
  
--- 26473,26478 ----
*************** package body Sem_Util is
*** 26482,26490 ****
  
     function Predicate_Enabled (Typ : Entity_Id) return Boolean is
     begin
!       return Present (Predicate_Function (Typ))
!         and then not Predicates_Ignored (Typ)
!         and then not Predicate_Checks_Suppressed (Empty);
     end Predicate_Enabled;
  
     ----------------------------------
--- 26506,26516 ----
  
     function Predicate_Enabled (Typ : Entity_Id) return Boolean is
     begin
!       return
!         Present (Predicate_Function (Typ))
!         and then (GNATprove_Mode
!                   or else (not Predicates_Ignored (Typ)
!                            and then not Predicate_Checks_Suppressed (Empty)));
     end Predicate_Enabled;
  
     ----------------------------------
diff -Nrcpad gcc-16-20250803/gcc/ada/sem_util.ads gcc-16-20250810/gcc/ada/sem_util.ads
*** gcc-16-20250803/gcc/ada/sem_util.ads	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/ada/sem_util.ads	Sun Aug 10 22:32:06 2025
*************** package Sem_Util is
*** 2079,2084 ****
--- 2079,2096 ----
     --  . machine_emax = 2**14
     --  . machine_emin = 3 - machine_emax
  
+    function Is_Ignored_Ghost_Entity_In_Codegen (N : Node_Id) return Boolean;
+    --  True if N Is_Ignored_Ghost_Entity and GNATProve_mode and Codepeer_Mode
+    --  are not active.
+ 
+    function Is_Ignored_Ghost_Pragma_In_Codegen (N : Node_Id) return Boolean;
+    --  True if N Is_Ignored_Ghost_Pragma and GNATProve_mode and Codepeer_Mode
+    --  are not active.
+ 
+    function Is_Ignored_In_Codegen (N : Node_Id) return Boolean;
+    --  True if N Is_Ignored and GNATProve_mode and Codepeer_Mode are not
+    --  active.
+ 
     function Is_EVF_Expression (N : Node_Id) return Boolean;
     --  Determine whether node N denotes a reference to a formal parameter of
     --  a specific tagged type whose related subprogram is subject to pragma
diff -Nrcpad gcc-16-20250803/gcc/ada/table.adb gcc-16-20250810/gcc/ada/table.adb
*** gcc-16-20250803/gcc/ada/table.adb	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/ada/table.adb	Sun Aug 10 22:32:06 2025
*************** package body Table is
*** 40,45 ****
--- 40,48 ----
        Min : constant Int := Int (Table_Low_Bound);
        --  Subscript of the minimum entry in the currently allocated table
  
+       Max : Int := Min + (Table_Initial * Table_Factor) - 1;
+       --  Subscript of the maximum entry in the currently allocated table
+ 
        Length : Int := 0;
        --  Number of entries in currently allocated table. The value of zero
        --  ensures that we initially allocate the table.
diff -Nrcpad gcc-16-20250803/gcc/ada/table.ads gcc-16-20250810/gcc/ada/table.ads
*** gcc-16-20250803/gcc/ada/table.ads	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/ada/table.ads	Sun Aug 10 22:32:06 2025
*************** package Table is
*** 223,231 ****
        --  the official interfaces (since a modification to Last may require a
        --  reallocation of the table).
  
-       Max : Int;
-       --  Subscript of the maximum entry in the currently allocated table
- 
        type Saved_Table is record
           Last_Val : Int;
           Max      : Int;
--- 223,228 ----
diff -Nrcpad gcc-16-20250803/gcc/ada/treepr.adb gcc-16-20250810/gcc/ada/treepr.adb
*** gcc-16-20250803/gcc/ada/treepr.adb	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/ada/treepr.adb	Sun Aug 10 22:32:06 2025
*************** package body Treepr is
*** 1600,1618 ****
           --  If this is a discrete expression whose value is known, print that
           --  value.
  
!          if Nkind (N) in N_Subexpr
             and then Compile_Time_Known_Value (N)
             and then Present (Etype (N))
             and then Is_Discrete_Type (Etype (N))
           then
!             if Is_Entity_Name (N) -- e.g. enumeration literal
!               or else Nkind (N) in N_Integer_Literal
!                                  | N_Character_Literal
!                                  | N_Unchecked_Type_Conversion
!             then
!                Print_Str (" val = ");
!                UI_Write (Expr_Value (N));
!             end if;
           end if;
  
           if Nkind (N) in N_Entity then
--- 1600,1616 ----
           --  If this is a discrete expression whose value is known, print that
           --  value.
  
!          if ((Is_Entity_Name (N) -- e.g. enumeration literal
!                and then Present (Entity (N)))
!               or else Nkind (N) in N_Integer_Literal
!                                  | N_Character_Literal
!                                  | N_Unchecked_Type_Conversion)
             and then Compile_Time_Known_Value (N)
             and then Present (Etype (N))
             and then Is_Discrete_Type (Etype (N))
           then
!             Print_Str (" val = ");
!             UI_Write (Expr_Value (N));
           end if;
  
           if Nkind (N) in N_Entity then
diff -Nrcpad gcc-16-20250803/gcc/avoid-store-forwarding.cc gcc-16-20250810/gcc/avoid-store-forwarding.cc
*** gcc-16-20250803/gcc/avoid-store-forwarding.cc	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/avoid-store-forwarding.cc	Sun Aug 10 22:32:06 2025
*************** is_store_forwarding (rtx store_mem, rtx
*** 145,155 ****
    poly_int64 load_offset, store_offset;
    rtx load_base = strip_offset (XEXP (load_mem, 0), &load_offset);
    rtx store_base = strip_offset (XEXP (store_mem, 0), &store_offset);
    return (MEM_SIZE (load_mem).is_constant ()
  	  && rtx_equal_p (load_base, store_base)
  	  && known_subrange_p (store_offset, MEM_SIZE (store_mem),
  			       load_offset, MEM_SIZE (load_mem))
! 	  && (store_offset - load_offset).is_constant (off_val));
  }
  
  /* Given a list of small stores that are forwarded to LOAD_INSN, try to
--- 145,162 ----
    poly_int64 load_offset, store_offset;
    rtx load_base = strip_offset (XEXP (load_mem, 0), &load_offset);
    rtx store_base = strip_offset (XEXP (store_mem, 0), &store_offset);
+   poly_int64 off_diff = store_offset - load_offset;
+ 
+   HOST_WIDE_INT off_val_tmp = 0;
+   bool is_off_diff_constant = off_diff.is_constant (&off_val_tmp);
+   if (off_val)
+     *off_val = off_val_tmp;
+ 
    return (MEM_SIZE (load_mem).is_constant ()
  	  && rtx_equal_p (load_base, store_base)
  	  && known_subrange_p (store_offset, MEM_SIZE (store_mem),
  			       load_offset, MEM_SIZE (load_mem))
! 	  && is_off_diff_constant);
  }
  
  /* Given a list of small stores that are forwarded to LOAD_INSN, try to
diff -Nrcpad gcc-16-20250803/gcc/c/ChangeLog gcc-16-20250810/gcc/c/ChangeLog
*** gcc-16-20250803/gcc/c/ChangeLog	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/c/ChangeLog	Sun Aug 10 22:32:06 2025
***************
*** 1,3 ****
--- 1,51 ----
+ 2025-08-07  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR preprocessor/120778
+ 	* c-decl.cc (c_init_decl_processing): Mark cpp nodes corresponding
+ 	to keywords as NODE_WARN if warn_keyword_macro.
+ 
+ 2025-08-06  Alexandre Oliva  <oliva@adacore.com>
+ 
+ 	* c-tree.h (C_BOOLEAN_TYPE_P): Cover hardbools as well.
+ 	* c-typeck.cc (convert_lvalue_to_rvalue): New overload and
+ 	wrapper.
+ 	(build_atomic_assign, build_modify_expr): Use it.
+ 	(build_asm_expr, handle_omp-array_sections_1): Simplify with
+ 	it.
+ 	(build_unary_op): Handle hardbools.
+ 
+ 2025-08-06  Martin Uecker  <uecker@tugraz.at>
+ 
+ 	PR c/108931
+ 	* c-typeck.cc (composite_type_cond): Renamed from
+ 	composite_type with argument for condition
+ 	(composite_type): New function.
+ 	(composite_type_internal): Implement new logic.
+ 	(build_conditional_expr): Pass condition.
+ 	(common_pointer_type): Adapt.
+ 	(pointer_diff): Adapt.
+ 	(build_binary_op): Adapt.
+ 
+ 2025-08-06  Martin Uecker  <uecker@tugraz.at>
+ 
+ 	PR c/121217
+ 	* c-typeck.cc (tagged_types_tu_compatible_p): Add check.
+ 
+ 2025-08-06  Kwok Cheung Yeung  <kcyeung@baylibre.com>
+ 
+ 	* c-parser.cc (c_parser_omp_clause_from_to): Parse 'iterator' modifier.
+ 	* c-typeck.cc (c_finish_omp_clauses): Finish iterators for to/from
+ 	clauses.
+ 
+ 2025-08-06  Kwok Cheung Yeung  <kcyeung@baylibre.com>
+ 	    Andrew Stubbs  <ams@baylibre.com>
+ 
+ 	* c-parser.cc (c_parser_omp_variable_list): Use location of the
+ 	map expression as the clause location.
+ 	(c_parser_omp_clause_map): Parse 'iterator' modifier.
+ 	* c-typeck.cc (c_finish_omp_clauses): Finish iterators.  Apply
+ 	iterators to generated clauses.
+ 
  2025-08-02  Martin Uecker  <uecker@tugraz.at>
  
  	* c-decl.cc (get_parm_array_spec): Remove.
diff -Nrcpad gcc-16-20250803/gcc/c/c-decl.cc gcc-16-20250810/gcc/c/c-decl.cc
*** gcc-16-20250803/gcc/c/c-decl.cc	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/c/c-decl.cc	Sun Aug 10 22:32:06 2025
*************** c_init_decl_processing (void)
*** 4825,4830 ****
--- 4825,4853 ----
  
    make_fname_decl = c_make_fname_decl;
    start_fname_decls ();
+ 
+   if (warn_keyword_macro)
+     {
+       for (unsigned int i = 0; i < num_c_common_reswords; ++i)
+ 	/* For C register keywords which don't start with underscore
+ 	   or start with just single underscore.  Don't complain about
+ 	   ObjC or Transactional Memory keywords.  */
+ 	if (c_common_reswords[i].word[0] == '_'
+ 	    && c_common_reswords[i].word[1] == '_')
+ 	  continue;
+ 	else if (c_common_reswords[i].disable
+ 		 & (D_TRANSMEM | D_OBJC | D_CXX_OBJC))
+ 	  continue;
+ 	else
+ 	  {
+ 	    tree id = get_identifier (c_common_reswords[i].word);
+ 	    if (C_IS_RESERVED_WORD (id)
+ 		&& C_RID_CODE (id) != RID_CXX_COMPAT_WARN)
+ 	      cpp_lookup (parse_in,
+ 			  (const unsigned char *) IDENTIFIER_POINTER (id),
+ 			  IDENTIFIER_LENGTH (id))->flags |= NODE_WARN;
+ 	  }
+     }
  }
  
  /* Create the VAR_DECL at LOC for __FUNCTION__ etc. ID is the name to
diff -Nrcpad gcc-16-20250803/gcc/c/c-parser.cc gcc-16-20250810/gcc/c/c-parser.cc
*** gcc-16-20250803/gcc/c/c-parser.cc	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/c/c-parser.cc	Sun Aug 10 22:32:06 2025
*************** c_parser_omp_variable_list (c_parser *pa
*** 16659,16665 ****
  		   || CONVERT_EXPR_P (decl))
  	    decl = TREE_OPERAND (decl, 0);
  
! 	  tree u = build_omp_clause (clause_loc, kind);
  	  OMP_CLAUSE_DECL (u) = decl;
  	  OMP_CLAUSE_CHAIN (u) = list;
  	  list = u;
--- 16659,16665 ----
  		   || CONVERT_EXPR_P (decl))
  	    decl = TREE_OPERAND (decl, 0);
  
! 	  tree u = build_omp_clause (loc, kind);
  	  OMP_CLAUSE_DECL (u) = decl;
  	  OMP_CLAUSE_CHAIN (u) = list;
  	  list = u;
*************** c_parser_omp_clause_doacross (c_parser *
*** 20072,20078 ****
     map ( [map-type-modifier[,] ...] map-kind: variable-list )
  
     map-type-modifier:
!      always | close */
  
  static tree
  c_parser_omp_clause_map (c_parser *parser, tree list, bool declare_mapper_p)
--- 20072,20078 ----
     map ( [map-type-modifier[,] ...] map-kind: variable-list )
  
     map-type-modifier:
!      always | close | present | iterator (iterators-definition)  */
  
  static tree
  c_parser_omp_clause_map (c_parser *parser, tree list, bool declare_mapper_p)
*************** c_parser_omp_clause_map (c_parser *parse
*** 20087,20101 ****
  
    int pos = 1;
    int map_kind_pos = 0;
!   while (c_parser_peek_nth_token_raw (parser, pos)->type == CPP_NAME)
      {
!       if (c_parser_peek_nth_token_raw (parser, pos + 1)->type == CPP_COLON)
  	{
  	  map_kind_pos = pos;
  	  break;
  	}
  
!       if (c_parser_peek_nth_token_raw (parser, pos + 1)->type == CPP_COMMA)
  	pos++;
        else if (c_parser_peek_nth_token_raw (parser, pos + 1)->type
  	       == CPP_OPEN_PAREN)
--- 20087,20121 ----
  
    int pos = 1;
    int map_kind_pos = 0;
!   int iterator_length = 0;
!   for (;;)
      {
!       c_token *tok = c_parser_peek_nth_token_raw (parser, pos);
!       if (tok->type != CPP_NAME)
! 	break;
! 
!       const char *p = IDENTIFIER_POINTER (tok->value);
!       c_token *next_tok = c_parser_peek_nth_token_raw (parser, pos + 1);
!       if (strcmp (p, "iterator") == 0 && next_tok->type == CPP_OPEN_PAREN)
! 	{
! 	  unsigned n = pos + 2;
! 	  if (c_parser_check_balanced_raw_token_sequence (parser, &n)
! 	      && c_parser_peek_nth_token_raw (parser, n)->type
! 		 == CPP_CLOSE_PAREN)
! 	    {
! 	      iterator_length = n - pos + 1;
! 	      pos = n;
! 	      next_tok = c_parser_peek_nth_token_raw (parser, pos + 1);
! 	    }
! 	}
! 
!       if (next_tok->type == CPP_COLON)
  	{
  	  map_kind_pos = pos;
  	  break;
  	}
  
!       if (next_tok->type == CPP_COMMA)
  	pos++;
        else if (c_parser_peek_nth_token_raw (parser, pos + 1)->type
  	       == CPP_OPEN_PAREN)
*************** c_parser_omp_clause_map (c_parser *parse
*** 20117,20122 ****
--- 20137,20143 ----
    int present_modifier = 0;
    int mapper_modifier = 0;
    tree mapper_name = NULL_TREE;
+   tree iterators = NULL_TREE;
    for (int pos = 1; pos < map_kind_pos; ++pos)
      {
        c_token *tok = c_parser_peek_token (parser);
*************** c_parser_omp_clause_map (c_parser *parse
*** 20150,20155 ****
--- 20171,20187 ----
  	  close_modifier++;
  	  c_parser_consume_token (parser);
  	}
+       else if (strcmp ("iterator", p) == 0)
+ 	{
+ 	  if (iterators)
+ 	    {
+ 	      c_parser_error (parser, "too many %<iterator%> modifiers");
+ 	      parens.skip_until_found_close (parser);
+ 	      return list;
+ 	    }
+ 	  iterators = c_parser_omp_iterators (parser);
+ 	  pos += iterator_length - 1;
+ 	}
        else if (strcmp ("mapper", p) == 0)
  	{
  	  c_parser_consume_token (parser);
*************** c_parser_omp_clause_map (c_parser *parse
*** 20223,20230 ****
        else
  	{
  	  c_parser_error (parser, "%<map%> clause with map-type modifier other "
! 				  "than %<always%>, %<close%>, %<mapper%> or "
! 				  "%<present%>");
  	  parens.skip_until_found_close (parser);
  	  return list;
  	}
--- 20255,20262 ----
        else
  	{
  	  c_parser_error (parser, "%<map%> clause with map-type modifier other "
! 				  "than %<always%>, %<close%>, %<iterator%>, "
! 				  "%<mapper%> or %<present%>");
  	  parens.skip_until_found_close (parser);
  	  return list;
  	}
*************** c_parser_omp_clause_map (c_parser *parse
*** 20273,20281 ****
--- 20305,20323 ----
  
    tree last_new = NULL_TREE;
  
+   if (iterators)
+     {
+       tree block = pop_scope ();
+       if (iterators == error_mark_node)
+ 	iterators = NULL_TREE;
+       else
+ 	TREE_VEC_ELT (iterators, 5) = block;
+     }
+ 
    for (c = nl; c != list; c = OMP_CLAUSE_CHAIN (c))
      {
        OMP_CLAUSE_SET_MAP_KIND (c, kind);
+       OMP_CLAUSE_ITERATORS (c) = iterators;
        last_new = c;
      }
  
*************** c_parser_omp_clause_device_type (c_parse
*** 20534,20541 ****
     to ( variable-list )
  
     OpenMP 5.1:
!    from ( [present :] variable-list )
!    to ( [present :] variable-list ) */
  
  static tree
  c_parser_omp_clause_from_to (c_parser *parser, enum omp_clause_code kind,
--- 20576,20586 ----
     to ( variable-list )
  
     OpenMP 5.1:
!    from ( [motion-modifier[,] [motion-modifier[,]...]:] variable-list )
!    to ( [motion-modifier[,] [motion-modifier[,]...]:] variable-list )
! 
!    motion-modifier:
!      present | iterator (iterators-definition)  */
  
  static tree
  c_parser_omp_clause_from_to (c_parser *parser, enum omp_clause_code kind,
*************** c_parser_omp_clause_from_to (c_parser *p
*** 20546,20563 ****
    if (!parens.require_open (parser))
      return list;
  
    bool present = false;
!   c_token *token = c_parser_peek_token (parser);
  
!   if (token->type == CPP_NAME
!       && strcmp (IDENTIFIER_POINTER (token->value), "present") == 0
!       && c_parser_peek_2nd_token (parser)->type == CPP_COLON)
      {
!       present = true;
!       c_parser_consume_token (parser);
!       c_parser_consume_token (parser);
      }
  
    tree nl = c_parser_omp_variable_list (parser, loc, kind, list);
    parens.skip_until_found_close (parser);
  
--- 20591,20675 ----
    if (!parens.require_open (parser))
      return list;
  
+   int pos = 1, colon_pos = 0;
+   int iterator_length = 0;
+ 
+   while (c_parser_peek_nth_token_raw (parser, pos)->type == CPP_NAME)
+     {
+       const char *identifier =
+ 	IDENTIFIER_POINTER (c_parser_peek_nth_token_raw (parser, pos)->value);
+       if (c_parser_peek_nth_token_raw (parser, pos + 1)->type
+ 	  == CPP_OPEN_PAREN)
+ 	{
+ 	  unsigned int npos = pos + 2;
+ 	  if (c_parser_check_balanced_raw_token_sequence (parser, &npos)
+ 	      && (c_parser_peek_nth_token_raw (parser, npos)->type
+ 		  == CPP_CLOSE_PAREN))
+ 	    {
+ 	      if (strcmp (identifier, "iterator") == 0)
+ 		iterator_length = npos - pos + 1;
+ 	      pos = npos;
+ 	    }
+ 	}
+       if (c_parser_peek_nth_token_raw (parser, pos + 1)->type == CPP_COMMA)
+ 	pos += 2;
+       else
+ 	pos++;
+       if (c_parser_peek_nth_token_raw (parser, pos)->type == CPP_COLON)
+ 	{
+ 	  colon_pos = pos;
+ 	  break;
+ 	}
+     }
+ 
    bool present = false;
!   tree iterators = NULL_TREE;
  
!   for (int pos = 1; pos < colon_pos; ++pos)
      {
!       c_token *token = c_parser_peek_token (parser);
!       if (token->type == CPP_COMMA)
! 	{
! 	  c_parser_consume_token (parser);
! 	  continue;
! 	}
!       const char *p = IDENTIFIER_POINTER (token->value);
!       if (strcmp ("present", p) == 0)
! 	{
! 	  if (present)
! 	    {
! 	      c_parser_error (parser, "too many %<present%> modifiers");
! 	      parens.skip_until_found_close (parser);
! 	      return list;
! 	    }
! 	  present = true;
! 	  c_parser_consume_token (parser);
! 	}
!       else if (strcmp ("iterator", p) == 0)
! 	{
! 	  if (iterators)
! 	    {
! 	      c_parser_error (parser, "too many %<iterator%> modifiers");
! 	      parens.skip_until_found_close (parser);
! 	      return list;
! 	    }
! 	  iterators = c_parser_omp_iterators (parser);
! 	  pos += iterator_length - 1;
! 	}
!       else
! 	{
! 	  error_at (token->location,
! 		    "%qs clause with modifier other than %<iterator%> or "
! 		    "%<present%>",
! 		    kind == OMP_CLAUSE_TO ? "to" : "from");
! 	  parens.skip_until_found_close (parser);
! 	  return list;
! 	}
      }
  
+   if (colon_pos)
+     c_parser_require (parser, CPP_COLON, "expected %<:%>");
+ 
    tree nl = c_parser_omp_variable_list (parser, loc, kind, list);
    parens.skip_until_found_close (parser);
  
*************** c_parser_omp_clause_from_to (c_parser *p
*** 20565,20570 ****
--- 20677,20695 ----
      for (tree c = nl; c != list; c = OMP_CLAUSE_CHAIN (c))
        OMP_CLAUSE_MOTION_PRESENT (c) = 1;
  
+   if (iterators)
+     {
+       tree block = pop_scope ();
+       if (iterators == error_mark_node)
+ 	iterators = NULL_TREE;
+       else
+ 	TREE_VEC_ELT (iterators, 5) = block;
+     }
+ 
+   if (iterators)
+     for (tree c = nl; c != list; c = OMP_CLAUSE_CHAIN (c))
+       OMP_CLAUSE_ITERATORS (c) = iterators;
+ 
    return nl;
  }
  
diff -Nrcpad gcc-16-20250803/gcc/c/c-tree.h gcc-16-20250810/gcc/c/c-tree.h
*** gcc-16-20250803/gcc/c/c-tree.h	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/c/c-tree.h	Sun Aug 10 22:32:06 2025
*************** along with GCC; see the file COPYING3.
*** 163,169 ****
    (TREE_CODE (TYPE) == BOOLEAN_TYPE					\
     || (TREE_CODE (TYPE) == ENUMERAL_TYPE				\
         && ENUM_UNDERLYING_TYPE (TYPE) != NULL_TREE			\
!        && TREE_CODE (ENUM_UNDERLYING_TYPE (TYPE)) == BOOLEAN_TYPE))
  
  /* Record parser information about an expression that is irrelevant
     for code generation alongside a tree representing its value.  */
--- 163,170 ----
    (TREE_CODE (TYPE) == BOOLEAN_TYPE					\
     || (TREE_CODE (TYPE) == ENUMERAL_TYPE				\
         && ENUM_UNDERLYING_TYPE (TYPE) != NULL_TREE			\
!        && (TREE_CODE (ENUM_UNDERLYING_TYPE (TYPE)) == BOOLEAN_TYPE	\
! 	   || c_hardbool_type_attr (TYPE))))
  
  /* Record parser information about an expression that is irrelevant
     for code generation alongside a tree representing its value.  */
diff -Nrcpad gcc-16-20250803/gcc/c/c-typeck.cc gcc-16-20250810/gcc/c/c-typeck.cc
*** gcc-16-20250803/gcc/c/c-typeck.cc	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/c/c-typeck.cc	Sun Aug 10 22:32:06 2025
*************** struct composite_cache {
*** 641,647 ****
  };
  
  tree
! composite_type_internal (tree t1, tree t2, struct composite_cache* cache)
  {
    enum tree_code code1;
    enum tree_code code2;
--- 641,648 ----
  };
  
  tree
! composite_type_internal (tree t1, tree t2, tree cond,
! 			 struct composite_cache* cache)
  {
    enum tree_code code1;
    enum tree_code code2;
*************** composite_type_internal (tree t1, tree t
*** 686,693 ****
        {
  	tree pointed_to_1 = TREE_TYPE (t1);
  	tree pointed_to_2 = TREE_TYPE (t2);
! 	tree target = composite_type_internal (pointed_to_1,
! 					       pointed_to_2, cache);
  	t1 = c_build_pointer_type_for_mode (target, TYPE_MODE (t1), false);
  	t1 = c_build_type_attribute_variant (t1, attributes);
  	return qualify_type (t1, t2);
--- 687,694 ----
        {
  	tree pointed_to_1 = TREE_TYPE (t1);
  	tree pointed_to_2 = TREE_TYPE (t2);
! 	tree target = composite_type_internal (pointed_to_1, pointed_to_2,
! 					       cond, cache);
  	t1 = c_build_pointer_type_for_mode (target, TYPE_MODE (t1), false);
  	t1 = c_build_type_attribute_variant (t1, attributes);
  	return qualify_type (t1, t2);
*************** composite_type_internal (tree t1, tree t
*** 695,719 ****
  
      case ARRAY_TYPE:
        {
- 	tree elt = composite_type_internal (TREE_TYPE (t1), TREE_TYPE (t2),
- 					    cache);
- 	int quals;
- 	tree unqual_elt;
  	tree d1 = TYPE_DOMAIN (t1);
  	tree d2 = TYPE_DOMAIN (t2);
- 	bool d1_variable, d2_variable;
- 	bool d1_zero, d2_zero;
- 	bool t1_complete, t2_complete;
  
  	/* We should not have any type quals on arrays at all.  */
  	gcc_assert (!TYPE_QUALS_NO_ADDR_SPACE (t1)
  		    && !TYPE_QUALS_NO_ADDR_SPACE (t2));
  
! 	t1_complete = COMPLETE_TYPE_P (t1);
! 	t2_complete = COMPLETE_TYPE_P (t2);
  
! 	d1_zero = d1 == NULL_TREE || !TYPE_MAX_VALUE (d1);
! 	d2_zero = d2 == NULL_TREE || !TYPE_MAX_VALUE (d2);
  
  	d1_variable = (!d1_zero
  		       && (TREE_CODE (TYPE_MIN_VALUE (d1)) != INTEGER_CST
--- 696,715 ----
  
      case ARRAY_TYPE:
        {
  	tree d1 = TYPE_DOMAIN (t1);
  	tree d2 = TYPE_DOMAIN (t2);
  
  	/* We should not have any type quals on arrays at all.  */
  	gcc_assert (!TYPE_QUALS_NO_ADDR_SPACE (t1)
  		    && !TYPE_QUALS_NO_ADDR_SPACE (t2));
  
! 	bool t1_complete = COMPLETE_TYPE_P (t1);
! 	bool t2_complete = COMPLETE_TYPE_P (t2);
  
! 	bool d1_zero = d1 == NULL_TREE || !TYPE_MAX_VALUE (d1);
! 	bool d2_zero = d2 == NULL_TREE || !TYPE_MAX_VALUE (d2);
! 
! 	bool d1_variable, d2_variable;
  
  	d1_variable = (!d1_zero
  		       && (TREE_CODE (TYPE_MIN_VALUE (d1)) != INTEGER_CST
*************** composite_type_internal (tree t1, tree t
*** 722,731 ****
  		       && (TREE_CODE (TYPE_MIN_VALUE (d2)) != INTEGER_CST
  			   || TREE_CODE (TYPE_MAX_VALUE (d2)) != INTEGER_CST));
  
! 	bool use1 = TYPE_DOMAIN (t1)
! 		    && (d2_variable || d2_zero || !d1_variable);
! 	bool use2 = TYPE_DOMAIN (t2)
! 		    && (d1_variable || d1_zero || !d2_variable);
  
  	/* If the first is an unspecified size pick the other one.  */
  	if (d2_variable && c_type_unspecified_p (t1))
--- 718,725 ----
  		       && (TREE_CODE (TYPE_MIN_VALUE (d2)) != INTEGER_CST
  			   || TREE_CODE (TYPE_MAX_VALUE (d2)) != INTEGER_CST));
  
! 	bool use1 = d1 && (d2_variable || d2_zero || !d1_variable);
! 	bool use2 = d2 && (d1_variable || d1_zero || !d2_variable);
  
  	/* If the first is an unspecified size pick the other one.  */
  	if (d2_variable && c_type_unspecified_p (t1))
*************** composite_type_internal (tree t1, tree t
*** 734,758 ****
  	    use1 = false;
  	  }
  
! 	/* Save space: see if the result is identical to one of the args.  */
! 	if (elt == TREE_TYPE (t1) && use1)
! 	  return c_build_type_attribute_variant (t1, attributes);
! 	if (elt == TREE_TYPE (t2) && use2)
! 	  return c_build_type_attribute_variant (t2, attributes);
  
! 	if (elt == TREE_TYPE (t1) && !TYPE_DOMAIN (t2) && !TYPE_DOMAIN (t1))
! 	  return c_build_type_attribute_variant (t1, attributes);
! 	if (elt == TREE_TYPE (t2) && !TYPE_DOMAIN (t2) && !TYPE_DOMAIN (t1))
! 	  return c_build_type_attribute_variant (t2, attributes);
  
  	/* Merge the element types, and have a size if either arg has
  	   one.  We may have qualifiers on the element types.  To set
  	   up TYPE_MAIN_VARIANT correctly, we need to form the
  	   composite of the unqualified types and add the qualifiers
  	   back at the end.  */
! 	quals = TYPE_QUALS (strip_array_types (elt));
! 	unqual_elt = c_build_qualified_type (elt, TYPE_UNQUALIFIED);
! 	t1 = c_build_array_type (unqual_elt, TYPE_DOMAIN (use1 ? t1 : t2));
  
  	/* Check that a type which has a varying outermost dimension
  	   got marked has having a variable size.  */
--- 728,780 ----
  	    use1 = false;
  	  }
  
! 	/* If both are VLAs but not unspecified and we are in the
! 	   conditional operator, we create a conditional to select
! 	   the size of the active branch.  */
! 	bool use0 = cond && d1_variable && !c_type_unspecified_p (t1)
! 			 && d2_variable && !c_type_unspecified_p (t2);
  
! 	tree td;
! 	tree elt = composite_type_internal (TREE_TYPE (t1), TREE_TYPE (t2),
! 					    cond, cache);
! 
! 	if (!use0)
! 	  {
! 	    /* Save space: see if the result is identical to one of the args.  */
! 	    if (elt == TREE_TYPE (t1) && use1)
! 	      return c_build_type_attribute_variant (t1, attributes);
! 	    if (elt == TREE_TYPE (t2) && use2)
! 	      return c_build_type_attribute_variant (t2, attributes);
! 
! 	    if (elt == TREE_TYPE (t1) && !TYPE_DOMAIN (t2) && !TYPE_DOMAIN (t1))
! 	      return c_build_type_attribute_variant (t1, attributes);
! 	    if (elt == TREE_TYPE (t2) && !TYPE_DOMAIN (t2) && !TYPE_DOMAIN (t1))
! 	      return c_build_type_attribute_variant (t2, attributes);
! 
! 	    td = TYPE_DOMAIN (use1 ? t1 : t2);
! 	  }
! 	else
! 	  {
! 	    /* Not used in C.  */
! 	    gcc_assert (size_zero_node == TYPE_MIN_VALUE (d1));
! 	    gcc_assert (size_zero_node == TYPE_MIN_VALUE (d2));
! 
! 	    tree d = fold_build3_loc (UNKNOWN_LOCATION, COND_EXPR, sizetype,
! 				      cond, TYPE_MAX_VALUE (d1),
! 				      TYPE_MAX_VALUE (d2));
! 
! 	    td = build_index_type (d);
! 	  }
  
  	/* Merge the element types, and have a size if either arg has
  	   one.  We may have qualifiers on the element types.  To set
  	   up TYPE_MAIN_VARIANT correctly, we need to form the
  	   composite of the unqualified types and add the qualifiers
  	   back at the end.  */
! 	int quals = TYPE_QUALS (strip_array_types (elt));
! 	tree unqual_elt = c_build_qualified_type (elt, TYPE_UNQUALIFIED);
! 
! 	t1 = c_build_array_type (unqual_elt, td);
  
  	/* Check that a type which has a varying outermost dimension
  	   got marked has having a variable size.  */
*************** composite_type_internal (tree t1, tree t
*** 819,825 ****
  	      gcc_assert (DECL_NAME (a) == DECL_NAME (b));
  	      gcc_checking_assert (!DECL_NAME (a) || comptypes (ta, tb));
  
! 	      tree t = composite_type_internal (ta, tb, cache);
  	      tree f = build_decl (input_location, FIELD_DECL, DECL_NAME (a), t);
  
  	      DECL_PACKED (f) = DECL_PACKED (a);
--- 841,847 ----
  	      gcc_assert (DECL_NAME (a) == DECL_NAME (b));
  	      gcc_checking_assert (!DECL_NAME (a) || comptypes (ta, tb));
  
! 	      tree t = composite_type_internal (ta, tb, cond, cache);
  	      tree f = build_decl (input_location, FIELD_DECL, DECL_NAME (a), t);
  
  	      DECL_PACKED (f) = DECL_PACKED (a);
*************** composite_type_internal (tree t1, tree t
*** 876,883 ****
        /* Function types: prefer the one that specified arg types.
  	 If both do, merge the arg types.  Also merge the return types.  */
        {
! 	tree valtype = composite_type_internal (TREE_TYPE (t1),
! 						TREE_TYPE (t2), cache);
  	tree p1 = TYPE_ARG_TYPES (t1);
  	tree p2 = TYPE_ARG_TYPES (t2);
  	int len;
--- 898,905 ----
        /* Function types: prefer the one that specified arg types.
  	 If both do, merge the arg types.  Also merge the return types.  */
        {
! 	tree valtype = composite_type_internal (TREE_TYPE (t1), TREE_TYPE (t2),
! 						cond, cache);
  	tree p1 = TYPE_ARG_TYPES (t1);
  	tree p2 = TYPE_ARG_TYPES (t2);
  	int len;
*************** composite_type_internal (tree t1, tree t
*** 956,962 ****
  		      {
  			TREE_VALUE (n) = composite_type_internal (TREE_TYPE (memb),
  								  TREE_VALUE (p2),
! 								  cache);
  			pedwarn (input_location, OPT_Wpedantic,
  				 "function types not truly compatible in ISO C");
  			goto parm_done;
--- 978,984 ----
  		      {
  			TREE_VALUE (n) = composite_type_internal (TREE_TYPE (memb),
  								  TREE_VALUE (p2),
! 								  cond, cache);
  			pedwarn (input_location, OPT_Wpedantic,
  				 "function types not truly compatible in ISO C");
  			goto parm_done;
*************** composite_type_internal (tree t1, tree t
*** 979,992 ****
  			TREE_VALUE (n)
  				= composite_type_internal (TREE_TYPE (memb),
  							   TREE_VALUE (p1),
! 							   cache);
  			pedwarn (input_location, OPT_Wpedantic,
  				 "function types not truly compatible in ISO C");
  			goto parm_done;
  		      }
  		  }
  	      }
! 	    TREE_VALUE (n) = composite_type_internal (mv1, mv2, cache);
  	  parm_done: ;
  	  }
  
--- 1001,1014 ----
  			TREE_VALUE (n)
  				= composite_type_internal (TREE_TYPE (memb),
  							   TREE_VALUE (p1),
! 							   cond, cache);
  			pedwarn (input_location, OPT_Wpedantic,
  				 "function types not truly compatible in ISO C");
  			goto parm_done;
  		      }
  		  }
  	      }
! 	    TREE_VALUE (n) = composite_type_internal (mv1, mv2, cond, cache);
  	  parm_done: ;
  	  }
  
*************** composite_type_internal (tree t1, tree t
*** 1001,1018 ****
  }
  
  tree
! composite_type (tree t1, tree t2)
  {
    gcc_checking_assert (comptypes_check_for_composite (t1, t2));
  
    struct composite_cache cache = { };
!   tree n = composite_type_internal (t1, t2, &cache);
  
    gcc_checking_assert (comptypes_check_for_composite (n, t1));
    gcc_checking_assert (comptypes_check_for_composite (n, t2));
    return n;
  }
  
  /* Return the type of a conditional expression between pointers to
     possibly differently qualified versions of compatible types.
  
--- 1023,1047 ----
  }
  
  tree
! composite_type_cond (tree t1, tree t2, tree cond)
  {
    gcc_checking_assert (comptypes_check_for_composite (t1, t2));
  
    struct composite_cache cache = { };
!   tree n = composite_type_internal (t1, t2, cond, &cache);
  
    gcc_checking_assert (comptypes_check_for_composite (n, t1));
    gcc_checking_assert (comptypes_check_for_composite (n, t2));
    return n;
  }
  
+ 
+ tree
+ composite_type (tree t1, tree t2)
+ {
+   return composite_type_cond (t1, t2, NULL_TREE);
+ }
+ 
  /* Return the type of a conditional expression between pointers to
     possibly differently qualified versions of compatible types.
  
*************** composite_type (tree t1, tree t2)
*** 1020,1026 ****
     true; if that isn't so, this may crash.  */
  
  static tree
! common_pointer_type (tree t1, tree t2)
  {
    tree attributes;
    unsigned target_quals;
--- 1049,1055 ----
     true; if that isn't so, this may crash.  */
  
  static tree
! common_pointer_type (tree t1, tree t2, tree cond)
  {
    tree attributes;
    unsigned target_quals;
*************** common_pointer_type (tree t1, tree t2)
*** 1047,1054 ****
       qualifiers of the two types' targets.  */
    tree pointed_to_1 = TREE_TYPE (t1);
    tree pointed_to_2 = TREE_TYPE (t2);
!   tree target = composite_type (TYPE_MAIN_VARIANT (pointed_to_1),
! 				TYPE_MAIN_VARIANT (pointed_to_2));
  
    /* Strip array types to get correct qualifier for pointers to arrays */
    quals1 = TYPE_QUALS_NO_ADDR_SPACE (strip_array_types (pointed_to_1));
--- 1076,1083 ----
       qualifiers of the two types' targets.  */
    tree pointed_to_1 = TREE_TYPE (t1);
    tree pointed_to_2 = TREE_TYPE (t2);
!   tree target = composite_type_cond (TYPE_MAIN_VARIANT (pointed_to_1),
! 				     TYPE_MAIN_VARIANT (pointed_to_2), cond);
  
    /* Strip array types to get correct qualifier for pointers to arrays */
    quals1 = TYPE_QUALS_NO_ADDR_SPACE (strip_array_types (pointed_to_1));
*************** tagged_types_tu_compatible_p (const_tree
*** 1970,1975 ****
--- 1999,2007 ----
  		ft2 = DECL_BIT_FIELD_TYPE (s2);
  	      }
  
+ 	    if (!ft1 || !ft2)
+ 	      return false;
+ 
  	    if (TREE_CODE (ft1) == ERROR_MARK || TREE_CODE (ft2) == ERROR_MARK)
  	      return false;
  
*************** convert_lvalue_to_rvalue (location_t loc
*** 2648,2653 ****
--- 2680,2699 ----
    return exp;
  }
  
+ /* Wrapper for the overload above, same arguments but for tree rather than
+    c_expr.  This is important for hardbools to decay to bools.  */
+ 
+ static inline tree
+ convert_lvalue_to_rvalue (location_t loc, tree val,
+ 			  bool convert_p, bool read_p, bool for_init = false)
+ {
+   struct c_expr expr;
+   memset (&expr, 0, sizeof (expr));
+   expr.value = val;
+   expr = convert_lvalue_to_rvalue (loc, expr, convert_p, read_p, for_init);
+   return expr.value;
+ }
+ 
  /* EXP is an expression of integer type.  Apply the integer promotions
     to it and return the promoted value.  */
  
*************** pointer_diff (location_t loc, tree op0,
*** 4926,4932 ****
        if (!addr_space_superset (as0, as1, &as_common))
  	gcc_unreachable ();
  
!       common_type = common_pointer_type (TREE_TYPE (op0), TREE_TYPE (op1));
        op0 = convert (common_type, op0);
        op1 = convert (common_type, op1);
      }
--- 4972,4978 ----
        if (!addr_space_superset (as0, as1, &as_common))
  	gcc_unreachable ();
  
!       common_type = common_pointer_type (TREE_TYPE (op0), TREE_TYPE (op1), NULL_TREE);
        op0 = convert (common_type, op0);
        op1 = convert (common_type, op1);
      }
*************** cas_loop:
*** 5271,5277 ****
    /* newval = old + val;  */
    if (rhs_type != rhs_semantic_type)
      val = build1 (EXCESS_PRECISION_EXPR, nonatomic_rhs_semantic_type, val);
!   rhs = build_binary_op (loc, modifycode, old, val, true);
    if (TREE_CODE (rhs) == EXCESS_PRECISION_EXPR)
      {
        tree eptype = TREE_TYPE (rhs);
--- 5317,5325 ----
    /* newval = old + val;  */
    if (rhs_type != rhs_semantic_type)
      val = build1 (EXCESS_PRECISION_EXPR, nonatomic_rhs_semantic_type, val);
!   rhs = build_binary_op (loc, modifycode,
! 			 convert_lvalue_to_rvalue (loc, old, true, true),
! 			 val, true);
    if (TREE_CODE (rhs) == EXCESS_PRECISION_EXPR)
      {
        tree eptype = TREE_TYPE (rhs);
*************** build_unary_op (location_t location, enu
*** 5727,5733 ****
  	    goto return_build_unary_op;
  	  }
  
! 	if (C_BOOLEAN_TYPE_P (TREE_TYPE (arg)))
  	  val = boolean_increment (code, arg);
  	else
  	  val = build2 (code, TREE_TYPE (arg), arg, inc);
--- 5775,5822 ----
  	    goto return_build_unary_op;
  	  }
  
! 	tree true_res;
! 	if (c_hardbool_type_attr (TREE_TYPE (arg), NULL, &true_res))
! 	  {
! 	    tree larg = stabilize_reference (arg);
! 	    tree sarg = save_expr (larg);
! 	    switch (code)
! 	      {
! 	      case PREINCREMENT_EXPR:
! 		val = build2 (MODIFY_EXPR, TREE_TYPE (larg), larg, true_res);
! 		val = build2 (COMPOUND_EXPR, TREE_TYPE (larg), sarg, val);
! 		break;
! 	      case POSTINCREMENT_EXPR:
! 		val = build2 (MODIFY_EXPR, TREE_TYPE (larg), larg, true_res);
! 		val = build2 (COMPOUND_EXPR, TREE_TYPE (larg), val, sarg);
! 		val = build2 (COMPOUND_EXPR, TREE_TYPE (larg), sarg, val);
! 		break;
! 	      case PREDECREMENT_EXPR:
! 		{
! 		  tree rarg = convert_lvalue_to_rvalue (location, sarg,
! 							true, true);
! 		  rarg = invert_truthvalue_loc (location, rarg);
! 		  rarg = convert (TREE_TYPE (sarg), rarg);
! 		  val = build2 (MODIFY_EXPR, TREE_TYPE (larg), larg, rarg);
! 		}
! 		break;
! 	      case POSTDECREMENT_EXPR:
! 		{
! 		  tree rarg = convert_lvalue_to_rvalue (location, sarg,
! 							true, true);
! 		  rarg = invert_truthvalue_loc (location, rarg);
! 		  tree iarg = convert (TREE_TYPE (larg), rarg);
! 		  val = build2 (MODIFY_EXPR, TREE_TYPE (larg), larg, iarg);
! 		  val = build2 (COMPOUND_EXPR, TREE_TYPE (larg), val, sarg);
! 		  val = build2 (COMPOUND_EXPR, TREE_TYPE (larg), sarg, val);
! 		}
! 		break;
! 	      default:
! 		gcc_unreachable ();
! 	      }
! 	    TREE_SIDE_EFFECTS (val) = 1;
! 	  }
! 	else if (C_BOOLEAN_TYPE_P (TREE_TYPE (arg)))
  	  val = boolean_increment (code, arg);
  	else
  	  val = build2 (code, TREE_TYPE (arg), arg, inc);
*************** build_conditional_expr (location_t colon
*** 6380,6386 ****
        addr_space_t as_common;
  
        if (comp_target_types (colon_loc, type1, type2))
! 	result_type = common_pointer_type (type1, type2);
        else if (null_pointer_constant_p (orig_op1))
  	result_type = type2;
        else if (null_pointer_constant_p (orig_op2))
--- 6469,6478 ----
        addr_space_t as_common;
  
        if (comp_target_types (colon_loc, type1, type2))
! 	{
! 	  ifexp = save_expr (ifexp);
! 	  result_type = common_pointer_type (type1, type2, ifexp);
! 	}
        else if (null_pointer_constant_p (orig_op1))
  	result_type = type2;
        else if (null_pointer_constant_p (orig_op2))
*************** build_modify_expr (location_t location,
*** 7337,7344 ****
  		clear_decl_read = true;
  	    }
  
! 	  newrhs = build_binary_op (location,
! 				    modifycode, lhs, newrhs, true);
  	  if (clear_decl_read)
  	    DECL_READ_P (lhs) = 0;
  
--- 7429,7438 ----
  		clear_decl_read = true;
  	    }
  
! 	  newrhs = build_binary_op (location, modifycode,
! 				    convert_lvalue_to_rvalue (location, lhs,
! 							      true, true),
! 				    newrhs, true);
  	  if (clear_decl_read)
  	    DECL_READ_P (lhs) = 0;
  
*************** build_asm_expr (location_t loc, tree str
*** 12730,12740 ****
  	    }
  	  else
  	    {
! 	      struct c_expr expr;
! 	      memset (&expr, 0, sizeof (expr));
! 	      expr.value = input;
! 	      expr = convert_lvalue_to_rvalue (loc, expr, true, false);
! 	      input = c_fully_fold (expr.value, false, NULL);
  
  	      if (input != error_mark_node && VOID_TYPE_P (TREE_TYPE (input)))
  		{
--- 12824,12832 ----
  	    }
  	  else
  	    {
! 	      input = c_fully_fold (convert_lvalue_to_rvalue (loc, input,
! 							      true, false),
! 				    false, NULL);
  
  	      if (input != error_mark_node && VOID_TYPE_P (TREE_TYPE (input)))
  		{
*************** build_binary_op (location_t location, en
*** 14390,14396 ****
  	     Otherwise, the targets must be compatible
  	     and both must be object or both incomplete.  */
  	  if (comp_target_types (location, type0, type1))
! 	    result_type = common_pointer_type (type0, type1);
  	  else if (!addr_space_superset (as0, as1, &as_common))
  	    {
  	      error_at (location, "comparison of pointers to "
--- 14482,14488 ----
  	     Otherwise, the targets must be compatible
  	     and both must be object or both incomplete.  */
  	  if (comp_target_types (location, type0, type1))
! 	    result_type = common_pointer_type (type0, type1, NULL_TREE);
  	  else if (!addr_space_superset (as0, as1, &as_common))
  	    {
  	      error_at (location, "comparison of pointers to "
*************** build_binary_op (location_t location, en
*** 14529,14535 ****
  
  	  if (comp_target_types (location, type0, type1))
  	    {
! 	      result_type = common_pointer_type (type0, type1);
  	      if (!COMPLETE_TYPE_P (TREE_TYPE (type0))
  		  != !COMPLETE_TYPE_P (TREE_TYPE (type1)))
  		pedwarn_c99 (location, OPT_Wpedantic,
--- 14621,14627 ----
  
  	  if (comp_target_types (location, type0, type1))
  	    {
! 	      result_type = common_pointer_type (type0, type1, NULL_TREE);
  	      if (!COMPLETE_TYPE_P (TREE_TYPE (type0))
  		  != !COMPLETE_TYPE_P (TREE_TYPE (type1)))
  		pedwarn_c99 (location, OPT_Wpedantic,
*************** handle_omp_array_sections_1 (tree c, tre
*** 15356,15367 ****
  	  /* If the array section is pointer based and the pointer
  	     itself is _Atomic qualified, we need to atomically load
  	     the pointer.  */
! 	  c_expr expr;
! 	  memset (&expr, 0, sizeof (expr));
! 	  expr.value = ret;
! 	  expr = convert_lvalue_to_rvalue (OMP_CLAUSE_LOCATION (c),
! 					   expr, false, false);
! 	  ret = expr.value;
  	}
        return ret;
      }
--- 15448,15455 ----
  	  /* If the array section is pointer based and the pointer
  	     itself is _Atomic qualified, we need to atomically load
  	     the pointer.  */
! 	  ret = convert_lvalue_to_rvalue (OMP_CLAUSE_LOCATION (c),
! 					  ret, false, false);
  	}
        return ret;
      }
*************** c_finish_omp_clauses (tree clauses, enum
*** 16204,16210 ****
        /* We've reached the end of a list of expanded nodes.  Reset the group
  	 start pointer.  */
        if (c == grp_sentinel)
! 	grp_start_p = NULL;
  
        switch (OMP_CLAUSE_CODE (c))
  	{
--- 16292,16305 ----
        /* We've reached the end of a list of expanded nodes.  Reset the group
  	 start pointer.  */
        if (c == grp_sentinel)
! 	{
! 	  if (grp_start_p
! 	      && OMP_CLAUSE_HAS_ITERATORS (*grp_start_p))
! 	    for (tree gc = *grp_start_p; gc != grp_sentinel;
! 		 gc = OMP_CLAUSE_CHAIN (gc))
! 	      OMP_CLAUSE_ITERATORS (gc) = OMP_CLAUSE_ITERATORS (*grp_start_p);
! 	  grp_start_p = NULL;
! 	}
  
        switch (OMP_CLAUSE_CODE (c))
  	{
*************** c_finish_omp_clauses (tree clauses, enum
*** 16962,16967 ****
--- 17057,17069 ----
  	  /* FALLTHRU */
  	case OMP_CLAUSE_TO:
  	case OMP_CLAUSE_FROM:
+ 	  if (OMP_CLAUSE_ITERATORS (c)
+ 	      && c_omp_finish_iterators (OMP_CLAUSE_ITERATORS (c)))
+ 	    {
+ 	      t = error_mark_node;
+ 	      break;
+ 	    }
+ 	  /* FALLTHRU */
  	case OMP_CLAUSE__CACHE_:
  	  {
  	    using namespace omp_addr_tokenizer;
*************** c_finish_omp_clauses (tree clauses, enum
*** 17690,17695 ****
--- 17792,17802 ----
  	pc = &OMP_CLAUSE_CHAIN (c);
      }
  
+   if (grp_start_p
+       && OMP_CLAUSE_HAS_ITERATORS (*grp_start_p))
+     for (tree gc = *grp_start_p; gc; gc = OMP_CLAUSE_CHAIN (gc))
+       OMP_CLAUSE_ITERATORS (gc) = OMP_CLAUSE_ITERATORS (*grp_start_p);
+ 
    if (simdlen
        && safelen
        && tree_int_cst_lt (OMP_CLAUSE_SAFELEN_EXPR (safelen),
diff -Nrcpad gcc-16-20250803/gcc/c-family/ChangeLog gcc-16-20250810/gcc/c-family/ChangeLog
*** gcc-16-20250803/gcc/c-family/ChangeLog	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/c-family/ChangeLog	Sun Aug 10 22:32:06 2025
***************
*** 1,3 ****
--- 1,31 ----
+ 2025-08-08  David Malcolm  <dmalcolm@redhat.com>
+ 
+ 	* c-indentation.cc (should_warn_for_misleading_indentation):
+ 	Update for moving diagnostics::context::m_tabstop into
+ 	diagnostics::column_options.
+ 	* c-opts.cc (c_common_post_options): Likewise.
+ 
+ 2025-08-07  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR c++/117783
+ 	* c-cppbuiltin.cc (c_cpp_builtins): Change __cpp_structured_bindings
+ 	predefined value for C++26 from 202403L to 202411L.
+ 
+ 2025-08-07  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR preprocessor/120778
+ 	* c.opt (Wkeyword-macro): New option.
+ 	* c.opt.urls: Regenerate.
+ 	* c-common.h (cxx_dialect): Comment formatting fix.
+ 	* c-opts.cc (c_common_post_options): Default to
+ 	-Wkeyword-macro for C++26 if pedantic.
+ 
+ 2025-08-06  Alexandre Oliva  <oliva@adacore.com>
+ 
+ 	* c-attribs.cc (handle_hardbool_attribute): Create distinct
+ 	enumeration types, with structural equality.  Handle
+ 	base type qualifiers.
+ 
  2025-08-02  Martin Uecker  <uecker@tugraz.at>
  
  	* c-attribs.cc (handle_argspec_attribute): Update.
diff -Nrcpad gcc-16-20250803/gcc/c-family/c-attribs.cc gcc-16-20250810/gcc/c-family/c-attribs.cc
*** gcc-16-20250803/gcc/c-family/c-attribs.cc	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/c-family/c-attribs.cc	Sun Aug 10 22:32:06 2025
*************** handle_hardbool_attribute (tree *node, t
*** 1128,1138 ****
      }
  
    tree orig = *node;
!   *node = build_duplicate_type (orig);
  
    TREE_SET_CODE (*node, ENUMERAL_TYPE);
!   ENUM_UNDERLYING_TYPE (*node) = orig;
!   TYPE_CANONICAL (*node) = TYPE_CANONICAL (orig);
  
    tree false_value;
    if (args)
--- 1128,1143 ----
      }
  
    tree orig = *node;
!   /* Drop qualifiers from the base type.  Keep attributes, so that, in the odd
!      chance attributes are applicable and relevant to the base type, if they
!      are specified first, or through a typedef, they wouldn't be dropped on the
!      floor here.  */
!   tree unqual = build_qualified_type (orig, TYPE_UNQUALIFIED);
!   *node = build_distinct_type_copy (unqual);
  
    TREE_SET_CODE (*node, ENUMERAL_TYPE);
!   ENUM_UNDERLYING_TYPE (*node) = unqual;
!   SET_TYPE_STRUCTURAL_EQUALITY (*node);
  
    tree false_value;
    if (args)
*************** handle_hardbool_attribute (tree *node, t
*** 1191,1197 ****
  
    gcc_checking_assert (!TYPE_CACHED_VALUES_P (*node));
    TYPE_VALUES (*node) = values;
!   TYPE_NAME (*node) = orig;
  
    return NULL_TREE;
  }
--- 1196,1208 ----
  
    gcc_checking_assert (!TYPE_CACHED_VALUES_P (*node));
    TYPE_VALUES (*node) = values;
!   TYPE_NAME (*node) = unqual;
! 
!   if (TYPE_QUALS (orig) != TYPE_QUALS (*node))
!     {
!       *node = build_qualified_type (*node, TYPE_QUALS (orig));
!       TYPE_NAME (*node) = orig;
!     }
  
    return NULL_TREE;
  }
diff -Nrcpad gcc-16-20250803/gcc/c-family/c-common.h gcc-16-20250810/gcc/c-family/c-common.h
*** gcc-16-20250803/gcc/c-family/c-common.h	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/c-family/c-common.h	Sun Aug 10 22:32:06 2025
*************** enum cxx_dialect {
*** 747,753 ****
    cxx26
  };
  
! /* The C++ dialect being used. C++98 is the default.  */
  extern enum cxx_dialect cxx_dialect;
  
  /* Maximum template instantiation depth.  This limit is rather
--- 747,753 ----
    cxx26
  };
  
! /* The C++ dialect being used.  C++17 is the default.  */
  extern enum cxx_dialect cxx_dialect;
  
  /* Maximum template instantiation depth.  This limit is rather
diff -Nrcpad gcc-16-20250803/gcc/c-family/c-cppbuiltin.cc gcc-16-20250810/gcc/c-family/c-cppbuiltin.cc
*** gcc-16-20250803/gcc/c-family/c-cppbuiltin.cc	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/c-family/c-cppbuiltin.cc	Sun Aug 10 22:32:06 2025
*************** c_cpp_builtins (cpp_reader *pfile)
*** 1090,1096 ****
  	  cpp_define (pfile, "__cpp_constexpr_exceptions=202411L");
  	  cpp_define (pfile, "__cpp_static_assert=202306L");
  	  cpp_define (pfile, "__cpp_placeholder_variables=202306L");
! 	  cpp_define (pfile, "__cpp_structured_bindings=202403L");
  	  cpp_define (pfile, "__cpp_deleted_function=202403L");
  	  cpp_define (pfile, "__cpp_variadic_friend=202403L");
  	  cpp_define (pfile, "__cpp_pack_indexing=202311L");
--- 1090,1096 ----
  	  cpp_define (pfile, "__cpp_constexpr_exceptions=202411L");
  	  cpp_define (pfile, "__cpp_static_assert=202306L");
  	  cpp_define (pfile, "__cpp_placeholder_variables=202306L");
! 	  cpp_define (pfile, "__cpp_structured_bindings=202411L");
  	  cpp_define (pfile, "__cpp_deleted_function=202403L");
  	  cpp_define (pfile, "__cpp_variadic_friend=202403L");
  	  cpp_define (pfile, "__cpp_pack_indexing=202311L");
diff -Nrcpad gcc-16-20250803/gcc/c-family/c-indentation.cc gcc-16-20250810/gcc/c-family/c-indentation.cc
*** gcc-16-20250803/gcc/c-family/c-indentation.cc	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/c-family/c-indentation.cc	Sun Aug 10 22:32:06 2025
*************** should_warn_for_misleading_indentation (
*** 330,336 ****
    if (guard_loc == body_loc || body_loc == next_stmt_loc)
      return false;
  
!   const unsigned int tab_width = global_dc->m_tabstop;
  
    /* They must be in the same file.  */
    if (next_stmt_exploc.file != body_exploc.file)
--- 330,336 ----
    if (guard_loc == body_loc || body_loc == next_stmt_loc)
      return false;
  
!   const unsigned int tab_width = global_dc->get_column_options ().m_tabstop;
  
    /* They must be in the same file.  */
    if (next_stmt_exploc.file != body_exploc.file)
diff -Nrcpad gcc-16-20250803/gcc/c-family/c-opts.cc gcc-16-20250810/gcc/c-family/c-opts.cc
*** gcc-16-20250803/gcc/c-family/c-opts.cc	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/c-family/c-opts.cc	Sun Aug 10 22:32:06 2025
*************** c_common_post_options (const char **pfil
*** 959,964 ****
--- 959,973 ----
    if (warn_enum_compare == -1)
      warn_enum_compare = c_dialect_cxx () ? 1 : 0;
  
+   /* For C++26 default to -Wkeyword-macro if -Wpedantic.  */
+   if (cxx_dialect >= cxx26 && pedantic)
+     {
+       SET_OPTION_IF_UNSET (&global_options, &global_options_set,
+ 			   warn_keyword_macro, 1);
+       if (warn_keyword_macro)
+ 	cpp_opts->cpp_warn_keyword_macro = warn_keyword_macro;
+     }
+ 
    /* -Wpacked-bitfield-compat is on by default for the C languages.  The
       warning is issued in stor-layout.cc which is not part of the front-end so
       we need to selectively turn it on here.  */
*************** c_common_post_options (const char **pfil
*** 1191,1197 ****
      flag_char8_t = (cxx_dialect >= cxx20) || flag_isoc23;
    cpp_opts->unsigned_utf8char = flag_char8_t ? 1 : cpp_opts->unsigned_char;
  
!   cpp_opts->cpp_tabstop = global_dc->m_tabstop;
  
    if (flag_extern_tls_init)
      {
--- 1200,1206 ----
      flag_char8_t = (cxx_dialect >= cxx20) || flag_isoc23;
    cpp_opts->unsigned_utf8char = flag_char8_t ? 1 : cpp_opts->unsigned_char;
  
!   cpp_opts->cpp_tabstop = global_dc->get_column_options ().m_tabstop;
  
    if (flag_extern_tls_init)
      {
diff -Nrcpad gcc-16-20250803/gcc/c-family/c.opt gcc-16-20250810/gcc/c-family/c.opt
*** gcc-16-20250803/gcc/c-family/c.opt	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/c-family/c.opt	Sun Aug 10 22:32:06 2025
*************** Enum(warn_leading_whitespace_kind) Strin
*** 964,969 ****
--- 964,973 ----
  EnumValue
  Enum(warn_leading_whitespace_kind) String(blanks) Value(3)
  
+ Wkeyword-macro
+ C ObjC C++ ObjC++ CPP(cpp_warn_keyword_macro) CppReason(CPP_W_KEYWORD_MACRO) Var(warn_keyword_macro) Init(0) Warning
+ Warn about defining or undefining macros with identifiers equal to keywords (or for C++ conditional keywords or standard attribute names).
+ 
  Wleading-whitespace=
  C ObjC C++ ObjC++ CPP(cpp_warn_leading_whitespace) CppReason(CPP_W_LEADING_WHITESPACE) Enum(warn_leading_whitespace_kind) Joined RejectNegative Var(warn_leading_whitespace) Init(0) Warning
  Warn about leading whitespace style issues on lines except when in raw string literals.
diff -Nrcpad gcc-16-20250803/gcc/c-family/c.opt.urls gcc-16-20250810/gcc/c-family/c.opt.urls
*** gcc-16-20250803/gcc/c-family/c.opt.urls	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/c-family/c.opt.urls	Sun Aug 10 22:32:06 2025
*************** UrlSuffix(gcc/Warning-Options.html#index
*** 508,513 ****
--- 508,516 ----
  Wjump-misses-init
  UrlSuffix(gcc/Warning-Options.html#index-Wjump-misses-init)
  
+ Wkeyword-macro
+ UrlSuffix(gcc/Warning-Options.html#index-Wkeyword-macro)
+ 
  Wleading-whitespace=
  UrlSuffix(gcc/Warning-Options.html#index-Wleading-whitespace_003d)
  
diff -Nrcpad gcc-16-20250803/gcc/cobol/ChangeLog gcc-16-20250810/gcc/cobol/ChangeLog
*** gcc-16-20250803/gcc/cobol/ChangeLog	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/cobol/ChangeLog	Sun Aug 10 22:32:06 2025
***************
*** 1,3 ****
--- 1,13 ----
+ 2025-08-07  Robert Dubner  <rdubner@symas.com>
+ 
+ 	* cbldiag.h (location_dump): Source code formatting.
+ 	* parse.y: error_msg formatting.
+ 	* scan.l: Remove UTF-8 character from regex pattern.
+ 	* scan_ante.h (numstr_of): error_msg formatting.
+ 	* show_parse.h (class ANALYZE): Suppress cppcheck error.
+ 	* util.cc (cbl_field_t::report_invalid_initial_value):
+ 	error_msg formatting.
+ 
  2025-08-02  Jakub Jelinek  <jakub@redhat.com>
  
  	* parse.y (intrinsic): Use %td format specifier with no cast on
diff -Nrcpad gcc-16-20250803/gcc/cobol/cbldiag.h gcc-16-20250810/gcc/cobol/cbldiag.h
*** gcc-16-20250803/gcc/cobol/cbldiag.h	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/cobol/cbldiag.h	Sun Aug 10 22:32:06 2025
*************** static void
*** 122,129 ****
  location_dump( const char func[], int line, const char tag[], const LOC& loc) {
    extern int yy_flex_debug; // cppcheck-suppress shadowVariable
    if( yy_flex_debug ) {
!     const char *detail = gcobol_getenv("update_location"); // cppcheck-suppress knownConditionTrueFalse
!     if( detail ) {
        fprintf(stderr, "%s:%d: %s location (%d,%d) to (%d,%d)\n",
                func, line, tag,
                loc.first_line, loc.first_column, loc.last_line, loc.last_column);
--- 122,129 ----
  location_dump( const char func[], int line, const char tag[], const LOC& loc) {
    extern int yy_flex_debug; // cppcheck-suppress shadowVariable
    if( yy_flex_debug ) {
!     const char *detail = gcobol_getenv("update_location");
!     if( detail ) { // cppcheck-suppress knownConditionTrueFalse
        fprintf(stderr, "%s:%d: %s location (%d,%d) to (%d,%d)\n",
                func, line, tag,
                loc.first_line, loc.first_column, loc.last_line, loc.last_column);
diff -Nrcpad gcc-16-20250803/gcc/cobol/parse.y gcc-16-20250810/gcc/cobol/parse.y
*** gcc-16-20250803/gcc/cobol/parse.y	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/cobol/parse.y	Sun Aug 10 22:32:07 2025
*************** intrinsic:      function_udf
*** 10336,10343 ****
                    if( p != NULL ) {
  		    auto loc = symbol_field_location(field_index(p->field));
                      error_msg(loc, "FUNCTION %qs has "
!                               "inconsistent parameter type %td (%qs)",
!                               keyword_str($1), p - args.data(), name_of(p->field) );
                      YYERROR;
                    }
                    $$ = is_numeric(args[0].field)?
--- 10336,10343 ----
                    if( p != NULL ) {
  		    auto loc = symbol_field_location(field_index(p->field));
                      error_msg(loc, "FUNCTION %qs has "
!                               "inconsistent parameter type %ld (%qs)",
!                               keyword_str($1), (long)(p - args.data()), name_of(p->field) );
                      YYERROR;
                    }
                    $$ = is_numeric(args[0].field)?
diff -Nrcpad gcc-16-20250803/gcc/cobol/scan.l gcc-16-20250810/gcc/cobol/scan.l
*** gcc-16-20250803/gcc/cobol/scan.l	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/cobol/scan.l	Sun Aug 10 22:32:07 2025
*************** NUMEDCHAR  [BPVZ90/,]+{COUNT}?
*** 123,129 ****
  NUMEDCHARS {NUMEDCHAR}([.]?{NUMEDCHAR})*
  NUMED     ([+-]{NUMEDCHARS}+)|({NUMEDCHARS}+[+-])
  CURRENCY [A-Zfhijklmoqtuwy\x80-\xFF]{-}[ABCDEGNPRSVXZ]
! NUMEDCUR (([.]?[-$0B/Z*+,P9()V+–]|{CURRENCY}+|{COUNT})+([.][$0B/Z*+P9()V+\–])*)+
  
  NUMEDITED         {NUMED}|{NUMEDCUR}
  EDITED   {ALPHED}|{NUMED}|{NUMEDCUR}
--- 123,129 ----
  NUMEDCHARS {NUMEDCHAR}([.]?{NUMEDCHAR})*
  NUMED     ([+-]{NUMEDCHARS}+)|({NUMEDCHARS}+[+-])
  CURRENCY [A-Zfhijklmoqtuwy\x80-\xFF]{-}[ABCDEGNPRSVXZ]
! NUMEDCUR (([.]?[$0B/Z*+,P9()V+-]|{CURRENCY}+|{COUNT})+([.][$0B/Z*+P9()V+-])*)+
  
  NUMEDITED         {NUMED}|{NUMEDCUR}
  EDITED   {ALPHED}|{NUMED}|{NUMEDCUR}
diff -Nrcpad gcc-16-20250803/gcc/cobol/scan_ante.h gcc-16-20250810/gcc/cobol/scan_ante.h
*** gcc-16-20250803/gcc/cobol/scan_ante.h	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/cobol/scan_ante.h	Sun Aug 10 22:32:07 2025
*************** numstr_of( const char string[], radix_t
*** 149,155 ****
      }
      auto nx = std::count_if(input, p, fisdigit);
      if( 36 < nx ) {
!       error_msg(yylloc, "significand of %s has more than 36 digits (%td)", input, nx);
        return NO_CONDITION;
      }
  
--- 149,155 ----
      }
      auto nx = std::count_if(input, p, fisdigit);
      if( 36 < nx ) {
!       error_msg(yylloc, "significand of %s has more than 36 digits (%ld)", input, (long)nx);
        return NO_CONDITION;
      }
  
diff -Nrcpad gcc-16-20250803/gcc/cobol/show_parse.h gcc-16-20250810/gcc/cobol/show_parse.h
*** gcc-16-20250803/gcc/cobol/show_parse.h	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/cobol/show_parse.h	Sun Aug 10 22:32:07 2025
*************** class ANALYZE
*** 500,506 ****
      int level;
      inline static int analyze_level=1;
    public:
!     ANALYZE(const char *func_) : func(func_)
        {
        level = 0;
        if( getenv("Analyze") )
--- 500,506 ----
      int level;
      inline static int analyze_level=1;
    public:
!     ANALYZE(const char *func_) : func(func_) // cppcheck-suppress noExplicitConstructor
        {
        level = 0;
        if( getenv("Analyze") )
diff -Nrcpad gcc-16-20250803/gcc/cobol/util.cc gcc-16-20250810/gcc/cobol/util.cc
*** gcc-16-20250803/gcc/cobol/util.cc	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/cobol/util.cc	Sun Aug 10 22:32:07 2025
*************** cbl_field_t::report_invalid_initial_valu
*** 1049,1056 ****
                                                   return TOUPPER(ch) == 'E';
                                                 } );
                if( !has_exponent && data.precision() < pend - p ) {
!                 error_msg(loc, "%s cannot represent VALUE %qs exactly (max %c%td)",
!                           name, data.initial, '.', pend - p);
                }
              }
            }
--- 1049,1056 ----
                                                   return TOUPPER(ch) == 'E';
                                                 } );
                if( !has_exponent && data.precision() < pend - p ) {
!                 error_msg(loc, "%s cannot represent VALUE %qs exactly (max %c%ld)",
!                           name, data.initial, '.', (long)(pend - p));
                }
              }
            }
diff -Nrcpad gcc-16-20250803/gcc/common/config/riscv/riscv-common.cc gcc-16-20250810/gcc/common/config/riscv/riscv-common.cc
*** gcc-16-20250803/gcc/common/config/riscv/riscv-common.cc	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/common/config/riscv/riscv-common.cc	Sun Aug 10 22:32:07 2025
*************** riscv_expand_arch (int argc,
*** 1758,1763 ****
--- 1758,1768 ----
  {
    gcc_assert (argc == 1);
    location_t loc = UNKNOWN_LOCATION;
+ 
+   /* Filter out -march=unset, it will expand from -mcpu later.  */
+   if (strcmp (argv[0], "unset") == 0)
+     return "";
+ 
    /* Try to interpret the arch as CPU first.  */
    const char *arch_str = riscv_expand_arch_from_cpu (argc, argv);
    if (!strlen (arch_str))
diff -Nrcpad gcc-16-20250803/gcc/common.opt gcc-16-20250810/gcc/common.opt
*** gcc-16-20250803/gcc/common.opt	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/common.opt	Sun Aug 10 22:32:07 2025
*************** Driver Undocumented
*** 1067,1072 ****
--- 1067,1074 ----
  ;
  ; 21: Fix noexcept lambda capture pruning.
  ;     Fix C++20 layout of base with all explicitly defaulted constructors.
+ ;     Fix mangling of class and array objects with implicitly
+ ;     zero-initialized non-trailing subojects.
  ;     Default in G++ 16.
  ;
  ; Additional positive integers will be assigned as new versions of
*************** fdiagnostics-minimum-margin-width=
*** 1618,1623 ****
--- 1620,1637 ----
  Common Joined UInteger Var(diagnostics_minimum_margin_width) Init(6)
  Set minimum width of left margin of source code when showing source.
  
+ fdiagnostics-show-nesting
+ Common Var(flag_diagnostics_show_nesting) Init(1)
+ Use indentation to show nesting of diagnostics in text output.
+ 
+ fdiagnostics-show-nesting-locations
+ Common Var(flag_diagnostics_show_nesting_locations) Init(1)
+ Show location information when showing nested diagnostics.
+ 
+ fdiagnostics-show-nesting-levels
+ Common Var(flag_diagnostics_show_nesting_levels) Init(0)
+ Show nesting levels as numbers when showing nested diagnostics.
+ 
  fdisable-
  Common Joined RejectNegative Var(common_deferred_options) Defer
  -fdisable-[tree|rtl|ipa]-<pass>=range1+range2	Disable an optimization pass.
diff -Nrcpad gcc-16-20250803/gcc/common.opt.urls gcc-16-20250810/gcc/common.opt.urls
*** gcc-16-20250803/gcc/common.opt.urls	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/common.opt.urls	Sun Aug 10 22:32:07 2025
*************** UrlSuffix(gcc/Diagnostic-Message-Formatt
*** 640,645 ****
--- 640,654 ----
  fdiagnostics-minimum-margin-width=
  UrlSuffix(gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-minimum-margin-width)
  
+ fdiagnostics-show-nesting
+ UrlSuffix(gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-show-nesting)
+ 
+ fdiagnostics-show-nesting-locations
+ UrlSuffix(gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-show-nesting-locations)
+ 
+ fdiagnostics-show-nesting-levels
+ UrlSuffix(gcc/Diagnostic-Message-Formatting-Options.html#index-fdiagnostics-show-nesting-levels)
+ 
  fdisable-
  UrlSuffix(gcc/Developer-Options.html#index-fdisable-)
  
diff -Nrcpad gcc-16-20250803/gcc/config/aarch64/aarch64-protos.h gcc-16-20250810/gcc/config/aarch64/aarch64-protos.h
*** gcc-16-20250803/gcc/config/aarch64/aarch64-protos.h	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/config/aarch64/aarch64-protos.h	Sun Aug 10 22:32:07 2025
*************** void aarch64_err_no_fpadvsimd (machine_m
*** 1020,1026 ****
  void aarch64_expand_epilogue (rtx_call_insn *);
  rtx aarch64_ptrue_all (unsigned int);
  opt_machine_mode aarch64_ptrue_all_mode (rtx);
! rtx aarch64_convert_sve_data_to_pred (rtx, machine_mode, rtx);
  rtx aarch64_expand_sve_dupq (rtx, machine_mode, rtx);
  void aarch64_expand_mov_immediate (rtx, rtx);
  rtx aarch64_stack_protect_canary_mem (machine_mode, rtx, aarch64_salt_type);
--- 1020,1026 ----
  void aarch64_expand_epilogue (rtx_call_insn *);
  rtx aarch64_ptrue_all (unsigned int);
  opt_machine_mode aarch64_ptrue_all_mode (rtx);
! rtx aarch64_convert_sve_data_to_pred (rtx, rtx);
  rtx aarch64_expand_sve_dupq (rtx, machine_mode, rtx);
  void aarch64_expand_mov_immediate (rtx, rtx);
  rtx aarch64_stack_protect_canary_mem (machine_mode, rtx, aarch64_salt_type);
*************** void aarch64_expand_sve_mem_move (rtx, r
*** 1039,1044 ****
--- 1039,1045 ----
  bool aarch64_maybe_expand_sve_subreg_move (rtx, rtx);
  rtx aarch64_replace_reg_mode (rtx, machine_mode);
  void aarch64_split_sve_subreg_move (rtx, rtx, rtx);
+ void aarch64_emit_sve_pred_vec_duplicate (machine_mode, rtx, rtx);
  void aarch64_expand_prologue (void);
  void aarch64_decompose_vec_struct_index (machine_mode, rtx *, rtx *, bool);
  void aarch64_expand_vector_init (rtx, rtx);
diff -Nrcpad gcc-16-20250803/gcc/config/aarch64/aarch64-sve-builtins-base.cc gcc-16-20250810/gcc/config/aarch64/aarch64-sve-builtins-base.cc
*** gcc-16-20250803/gcc/config/aarch64/aarch64-sve-builtins-base.cc	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/config/aarch64/aarch64-sve-builtins-base.cc	Sun Aug 10 22:32:07 2025
*************** public:
*** 214,220 ****
    expand (function_expander &e) const override
    {
      e.add_ptrue_hint (0, e.gp_mode (0));
!     insn_code icode = code_for_aarch64_pred_fac (m_unspec, e.vector_mode (0));
      return e.use_exact_insn (icode);
    }
  
--- 214,221 ----
    expand (function_expander &e) const override
    {
      e.add_ptrue_hint (0, e.gp_mode (0));
!     insn_code icode = code_for_aarch64_pred_fac_acle (m_unspec,
! 						      e.vector_mode (0));
      return e.use_exact_insn (icode);
    }
  
*************** public:
*** 497,506 ****
        {
  	bool unsigned_p = e.type_suffix (0).unsigned_p;
  	rtx_code code = get_rtx_code (m_code, unsigned_p);
! 	return e.use_exact_insn (code_for_aarch64_pred_cmp (code, mode));
        }
  
!     insn_code icode = code_for_aarch64_pred_fcm (m_unspec_for_fp, mode);
      return e.use_exact_insn (icode);
    }
  
--- 498,507 ----
        {
  	bool unsigned_p = e.type_suffix (0).unsigned_p;
  	rtx_code code = get_rtx_code (m_code, unsigned_p);
! 	return e.use_exact_insn (code_for_aarch64_pred_cmp_acle (code, mode));
        }
  
!     insn_code icode = code_for_aarch64_pred_fcm_acle (m_unspec_for_fp, mode);
      return e.use_exact_insn (icode);
    }
  
*************** public:
*** 542,548 ****
  
      /* If the argument is a constant that the unwidened comparisons
         can handle directly, use them instead.  */
!     insn_code icode = code_for_aarch64_pred_cmp (code, mode);
      rtx op2 = unwrap_const_vec_duplicate (e.args[3]);
      if (CONSTANT_P (op2)
  	&& insn_data[icode].operand[4].predicate (op2, DImode))
--- 543,549 ----
  
      /* If the argument is a constant that the unwidened comparisons
         can handle directly, use them instead.  */
!     insn_code icode = code_for_aarch64_pred_cmp_acle (code, mode);
      rtx op2 = unwrap_const_vec_duplicate (e.args[3]);
      if (CONSTANT_P (op2)
  	&& insn_data[icode].operand[4].predicate (op2, DImode))
*************** public:
*** 581,587 ****
    expand (function_expander &e) const override
    {
      e.add_ptrue_hint (0, e.gp_mode (0));
!     return e.use_exact_insn (code_for_aarch64_pred_fcmuo (e.vector_mode (0)));
    }
  };
  
--- 582,589 ----
    expand (function_expander &e) const override
    {
      e.add_ptrue_hint (0, e.gp_mode (0));
!     auto mode = e.vector_mode (0);
!     return e.use_exact_insn (code_for_aarch64_pred_fcmuo_acle (mode));
    }
  };
  
*************** public:
*** 1048,1053 ****
--- 1050,1072 ----
    rtx
    expand (function_expander &e) const override
    {
+     machine_mode mode = e.vector_mode (0);
+     if (GET_MODE_CLASS (mode) == MODE_VECTOR_BOOL)
+       {
+ 	gcc_assert (e.pred == PRED_none);
+ 
+ 	rtx src = e.args[0];
+ 	if (GET_CODE (src) == CONST_INT)
+ 	  return (src == const0_rtx
+ 		  ? CONST0_RTX (VNx16BImode)
+ 		  : aarch64_ptrue_all (e.type_suffix (0).element_bytes));
+ 
+ 	rtx dest = e.get_reg_target ();
+ 	src = force_reg (GET_MODE (src), src);
+ 	aarch64_emit_sve_pred_vec_duplicate (mode, dest, src);
+ 	return dest;
+       }
+ 
      if (e.pred == PRED_none || e.pred == PRED_x)
        /* There's no benefit to using predicated instructions for _x here.  */
        return e.use_unpred_insn (e.direct_optab_handler (vec_duplicate_optab));
*************** public:
*** 1056,1062 ****
         the duplicate of the function argument and the "false" value
         is the value of inactive lanes.  */
      insn_code icode;
-     machine_mode mode = e.vector_mode (0);
      if (valid_for_const_vector_p (GET_MODE_INNER (mode), e.args.last ()))
        /* Duplicate the constant to fill a vector.  The pattern optimizes
  	 various cases involving constant operands, falling back to SEL
--- 1075,1080 ----
*************** public:
*** 1197,1204 ****
      if (mode != e.vector_mode (0))
        {
  	rtx data_dupq = aarch64_expand_sve_dupq (NULL, mode, vq_reg);
! 	return aarch64_convert_sve_data_to_pred (e.possible_target,
! 						 e.vector_mode (0), data_dupq);
        }
  
      return aarch64_expand_sve_dupq (e.possible_target, mode, vq_reg);
--- 1215,1221 ----
      if (mode != e.vector_mode (0))
        {
  	rtx data_dupq = aarch64_expand_sve_dupq (NULL, mode, vq_reg);
! 	return aarch64_convert_sve_data_to_pred (e.possible_target, data_dupq);
        }
  
      return aarch64_expand_sve_dupq (e.possible_target, mode, vq_reg);
*************** public:
*** 1259,1267 ****
  	index = target;
        }
  
!     e.args[0] = gen_lowpart (VNx2DImode, e.args[0]);
      e.args[1] = index;
!     return e.use_exact_insn (CODE_FOR_aarch64_sve_tblvnx2di);
    }
  };
  
--- 1276,1285 ----
  	index = target;
        }
  
!     e.args[0] = aarch64_sve_reinterpret (VNx2DImode, e.args[0]);
      e.args[1] = index;
!     rtx res = e.use_exact_insn (CODE_FOR_aarch64_sve_tblvnx2di);
!     return aarch64_sve_reinterpret (mode, res);
    }
  };
  
*************** public:
*** 2857,2863 ****
    rtx
    expand (function_expander &e) const override
    {
!     return e.use_exact_insn (code_for_aarch64_sve_rev (e.vector_mode (0)));
    }
  };
  
--- 2875,2884 ----
    rtx
    expand (function_expander &e) const override
    {
!     auto mode = e.vector_mode (0);
!     return e.use_exact_insn (e.type_suffix (0).bool_p
! 			     ? code_for_aarch64_sve_rev_acle (mode)
! 			     : code_for_aarch64_sve_rev (mode));
    }
  };
  
*************** public:
*** 3248,3254 ****
      unsigned int unpacks = m_high_p ? UNSPEC_UNPACKSHI : UNSPEC_UNPACKSLO;
      insn_code icode;
      if (GET_MODE_CLASS (mode) == MODE_VECTOR_BOOL)
!       icode = code_for_aarch64_sve_punpk (unpacku, mode);
      else
        {
  	int unspec = e.type_suffix (0).unsigned_p ? unpacku : unpacks;
--- 3269,3275 ----
      unsigned int unpacks = m_high_p ? UNSPEC_UNPACKSHI : UNSPEC_UNPACKSLO;
      insn_code icode;
      if (GET_MODE_CLASS (mode) == MODE_VECTOR_BOOL)
!       icode = code_for_aarch64_sve_punpk_acle (unpacku);
      else
        {
  	int unspec = e.type_suffix (0).unsigned_p ? unpacku : unpacks;
diff -Nrcpad gcc-16-20250803/gcc/config/aarch64/aarch64-sve-builtins-functions.h gcc-16-20250810/gcc/config/aarch64/aarch64-sve-builtins-functions.h
*** gcc-16-20250803/gcc/config/aarch64/aarch64-sve-builtins-functions.h	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/config/aarch64/aarch64-sve-builtins-functions.h	Sun Aug 10 22:32:07 2025
*************** public:
*** 630,636 ****
    rtx
    expand (function_expander &e) const override
    {
!     insn_code icode = code_for_aarch64_sve (m_unspec, e.vector_mode (0));
      return e.use_exact_insn (icode);
    }
  
--- 630,639 ----
    rtx
    expand (function_expander &e) const override
    {
!     auto mode = e.vector_mode (0);
!     insn_code icode = (e.type_suffix (0).bool_p
! 		       ? code_for_aarch64_sve_acle (m_unspec, mode)
! 		       : code_for_aarch64_sve (m_unspec, mode));
      return e.use_exact_insn (icode);
    }
  
*************** public:
*** 838,844 ****
  
      machine_mode pred_mode = e.vector_mode (0);
      scalar_mode reg_mode = GET_MODE_INNER (e.vector_mode (1));
!     return e.use_exact_insn (code_for_while (unspec, reg_mode, pred_mode));
    }
  
    /* The unspec codes associated with signed and unsigned operations
--- 841,848 ----
  
      machine_mode pred_mode = e.vector_mode (0);
      scalar_mode reg_mode = GET_MODE_INNER (e.vector_mode (1));
!     auto icode = code_for_aarch64_sve_while_acle (unspec, reg_mode, pred_mode);
!     return e.use_exact_insn (icode);
    }
  
    /* The unspec codes associated with signed and unsigned operations
diff -Nrcpad gcc-16-20250803/gcc/config/aarch64/aarch64-sve-builtins-sve2.cc gcc-16-20250810/gcc/config/aarch64/aarch64-sve-builtins-sve2.cc
*** gcc-16-20250803/gcc/config/aarch64/aarch64-sve-builtins-sve2.cc	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/config/aarch64/aarch64-sve-builtins-sve2.cc	Sun Aug 10 22:32:07 2025
*************** public:
*** 881,887 ****
    {
      for (unsigned int i = 0; i < 2; ++i)
        e.args[i] = e.convert_to_pmode (e.args[i]);
!     return e.use_exact_insn (code_for_while (m_unspec, Pmode, e.gp_mode (0)));
    }
  
    int m_unspec;
--- 881,889 ----
    {
      for (unsigned int i = 0; i < 2; ++i)
        e.args[i] = e.convert_to_pmode (e.args[i]);
!     auto icode = code_for_aarch64_sve_while_acle (m_unspec, Pmode,
! 						  e.gp_mode (0));
!     return e.use_exact_insn (icode);
    }
  
    int m_unspec;
diff -Nrcpad gcc-16-20250803/gcc/config/aarch64/aarch64-sve-builtins.cc gcc-16-20250810/gcc/config/aarch64/aarch64-sve-builtins.cc
*** gcc-16-20250803/gcc/config/aarch64/aarch64-sve-builtins.cc	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/config/aarch64/aarch64-sve-builtins.cc	Sun Aug 10 22:32:07 2025
*************** function_expander::expand ()
*** 4590,4599 ****
      {
        /* The last element of these functions is always an fpm_t that must be
           written to FPMR before the call to the instruction itself. */
!       gcc_assert (args.last ()->mode == DImode);
!       emit_move_insn (gen_rtx_REG (DImode, FPM_REGNUM), args.last ());
      }
!   return base->expand (*this);
  }
  
  /* Return a structure type that contains a single field of type FIELD_TYPE.
--- 4590,4620 ----
      {
        /* The last element of these functions is always an fpm_t that must be
           written to FPMR before the call to the instruction itself. */
!       rtx fpm = args.last ();
!       gcc_assert (CONST_INT_P (fpm) || GET_MODE (fpm) == DImode);
!       emit_move_insn (gen_rtx_REG (DImode, FPM_REGNUM), fpm);
      }
!   rtx result = base->expand (*this);
!   if (function_returns_void_p ())
!     gcc_assert (result == const0_rtx);
!   else
!     {
!       auto expected_mode = result_mode ();
!       if (GET_MODE_CLASS (expected_mode) == MODE_INT)
! 	/* Scalar integer constants don't store a mode.
! 
! 	   It's OK for a variable result to have a different mode from the
! 	   function return type.  In particular, some functions that return int
! 	   expand into instructions that have a DImode result, with all 64 bits
! 	   of the DImode being well-defined (usually zero).  */
! 	gcc_assert (CONST_SCALAR_INT_P (result)
! 		    || GET_MODE_CLASS (GET_MODE (result)) == MODE_INT);
!       else
! 	/* In other cases, the return value should have the same mode
! 	   as the return type.  */
! 	gcc_assert (GET_MODE (result) == expected_mode);
!     }
!   return result;
  }
  
  /* Return a structure type that contains a single field of type FIELD_TYPE.
diff -Nrcpad gcc-16-20250803/gcc/config/aarch64/aarch64-sve.md gcc-16-20250810/gcc/config/aarch64/aarch64-sve.md
*** gcc-16-20250803/gcc/config/aarch64/aarch64-sve.md	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/config/aarch64/aarch64-sve.md	Sun Aug 10 22:32:07 2025
***************
*** 1542,1559 ****
  	  UNSPEC_LD1_GATHER))]
    "TARGET_SVE && TARGET_NON_STREAMING"
    {@ [cons: =0, 1, 2, 3, 4, 5  ]
!      [&w, Z,   w, Ui1, Ui1, Upl] ld1<Vesize>\t%0.s, %5/z, [%2.s]
!      [?w, Z,   0, Ui1, Ui1, Upl] ^
!      [&w, vgw, w, Ui1, Ui1, Upl] ld1<Vesize>\t%0.s, %5/z, [%2.s, #%1]
!      [?w, vgw, 0, Ui1, Ui1, Upl] ^
!      [&w, rk,  w, Z,   Ui1, Upl] ld1<Vesize>\t%0.s, %5/z, [%1, %2.s, sxtw]
!      [?w, rk,  0, Z,   Ui1, Upl] ^
!      [&w, rk,  w, Ui1, Ui1, Upl] ld1<Vesize>\t%0.s, %5/z, [%1, %2.s, uxtw]
!      [?w, rk,  0, Ui1, Ui1, Upl] ^
!      [&w, rk,  w, Z,   i,   Upl] ld1<Vesize>\t%0.s, %5/z, [%1, %2.s, sxtw %p4]
!      [?w, rk,  0, Z,   i,   Upl] ^
!      [&w, rk,  w, Ui1, i,   Upl] ld1<Vesize>\t%0.s, %5/z, [%1, %2.s, uxtw %p4]
!      [?w, rk,  0, Ui1, i,   Upl] ^
    }
  )
  
--- 1542,1559 ----
  	  UNSPEC_LD1_GATHER))]
    "TARGET_SVE && TARGET_NON_STREAMING"
    {@ [cons: =0, 1, 2, 3, 4, 5  ]
!      [&w, Z,          w, Ui1, Ui1, Upl] ld1<Vesize>\t%0.s, %5/z, [%2.s]
!      [?w, Z,          0, Ui1, Ui1, Upl] ^
!      [&w, vg<Vesize>, w, Ui1, Ui1, Upl] ld1<Vesize>\t%0.s, %5/z, [%2.s, #%1]
!      [?w, vg<Vesize>, 0, Ui1, Ui1, Upl] ^
!      [&w, rk,         w, Z,   Ui1, Upl] ld1<Vesize>\t%0.s, %5/z, [%1, %2.s, sxtw]
!      [?w, rk,         0, Z,   Ui1, Upl] ^
!      [&w, rk,         w, Ui1, Ui1, Upl] ld1<Vesize>\t%0.s, %5/z, [%1, %2.s, uxtw]
!      [?w, rk,         0, Ui1, Ui1, Upl] ^
!      [&w, rk,         w, Z,   i,   Upl] ld1<Vesize>\t%0.s, %5/z, [%1, %2.s, sxtw %p4]
!      [?w, rk,         0, Z,   i,   Upl] ^
!      [&w, rk,         w, Ui1, i,   Upl] ld1<Vesize>\t%0.s, %5/z, [%1, %2.s, uxtw %p4]
!      [?w, rk,         0, Ui1, i,   Upl] ^
    }
  )
  
***************
*** 1572,1585 ****
  	  UNSPEC_LD1_GATHER))]
    "TARGET_SVE && TARGET_NON_STREAMING"
    {@ [cons: =0, 1, 2, 3, 4, 5]
!      [&w, Z,   w, i, Ui1, Upl] ld1<Vesize>\t%0.d, %5/z, [%2.d]
!      [?w, Z,   0, i, Ui1, Upl] ^
!      [&w, vgd, w, i, Ui1, Upl] ld1<Vesize>\t%0.d, %5/z, [%2.d, #%1]
!      [?w, vgd, 0, i, Ui1, Upl] ^
!      [&w, rk,  w, i, Ui1, Upl] ld1<Vesize>\t%0.d, %5/z, [%1, %2.d]
!      [?w, rk,  0, i, Ui1, Upl] ^
!      [&w, rk,  w, i, i,   Upl] ld1<Vesize>\t%0.d, %5/z, [%1, %2.d, lsl %p4]
!      [?w, rk,  0, i, i,   Upl] ^
    }
  )
  
--- 1572,1585 ----
  	  UNSPEC_LD1_GATHER))]
    "TARGET_SVE && TARGET_NON_STREAMING"
    {@ [cons: =0, 1, 2, 3, 4, 5]
!      [&w, Z,          w, i, Ui1, Upl] ld1<Vesize>\t%0.d, %5/z, [%2.d]
!      [?w, Z,          0, i, Ui1, Upl] ^
!      [&w, vg<Vesize>, w, i, Ui1, Upl] ld1<Vesize>\t%0.d, %5/z, [%2.d, #%1]
!      [?w, vg<Vesize>, 0, i, Ui1, Upl] ^
!      [&w, rk,         w, i, Ui1, Upl] ld1<Vesize>\t%0.d, %5/z, [%1, %2.d]
!      [?w, rk,         0, i, Ui1, Upl] ^
!      [&w, rk,         w, i, i,   Upl] ld1<Vesize>\t%0.d, %5/z, [%1, %2.d, lsl %p4]
!      [?w, rk,         0, i, i,   Upl] ^
    }
  )
  
***************
*** 2488,2500 ****
  	   (match_operand:SVE_4 4 "register_operand")]
  	  UNSPEC_ST1_SCATTER))]
    "TARGET_SVE && TARGET_NON_STREAMING"
!   {@ [ cons: 0 , 1 , 2   , 3   , 4 , 5    ]
!      [ Z       , w , Ui1 , Ui1 , w , Upl  ] st1<Vesize>\t%4.s, %5, [%1.s]
!      [ vgw     , w , Ui1 , Ui1 , w , Upl  ] st1<Vesize>\t%4.s, %5, [%1.s, #%0]
!      [ rk      , w , Z   , Ui1 , w , Upl  ] st1<Vesize>\t%4.s, %5, [%0, %1.s, sxtw]
!      [ rk      , w , Ui1 , Ui1 , w , Upl  ] st1<Vesize>\t%4.s, %5, [%0, %1.s, uxtw]
!      [ rk      , w , Z   , i   , w , Upl  ] st1<Vesize>\t%4.s, %5, [%0, %1.s, sxtw %p3]
!      [ rk      , w , Ui1 , i   , w , Upl  ] st1<Vesize>\t%4.s, %5, [%0, %1.s, uxtw %p3]
    }
  )
  
--- 2488,2500 ----
  	   (match_operand:SVE_4 4 "register_operand")]
  	  UNSPEC_ST1_SCATTER))]
    "TARGET_SVE && TARGET_NON_STREAMING"
!   {@ [ cons: 0    , 1 , 2   , 3   , 4 , 5    ]
!      [ Z          , w , Ui1 , Ui1 , w , Upl  ] st1<Vesize>\t%4.s, %5, [%1.s]
!      [ vg<Vesize> , w , Ui1 , Ui1 , w , Upl  ] st1<Vesize>\t%4.s, %5, [%1.s, #%0]
!      [ rk         , w , Z   , Ui1 , w , Upl  ] st1<Vesize>\t%4.s, %5, [%0, %1.s, sxtw]
!      [ rk         , w , Ui1 , Ui1 , w , Upl  ] st1<Vesize>\t%4.s, %5, [%0, %1.s, uxtw]
!      [ rk         , w , Z   , i   , w , Upl  ] st1<Vesize>\t%4.s, %5, [%0, %1.s, sxtw %p3]
!      [ rk         , w , Ui1 , i   , w , Upl  ] st1<Vesize>\t%4.s, %5, [%0, %1.s, uxtw %p3]
    }
  )
  
***************
*** 2511,2521 ****
  	   (match_operand:SVE_2 4 "register_operand")]
  	  UNSPEC_ST1_SCATTER))]
    "TARGET_SVE && TARGET_NON_STREAMING"
!   {@ [ cons: 0 , 1 , 3   , 4 , 5    ]
!      [ Z       , w , Ui1 , w , Upl  ] st1<Vesize>\t%4.d, %5, [%1.d]
!      [ vgd     , w , Ui1 , w , Upl  ] st1<Vesize>\t%4.d, %5, [%1.d, #%0]
!      [ rk      , w , Ui1 , w , Upl  ] st1<Vesize>\t%4.d, %5, [%0, %1.d]
!      [ rk      , w , i   , w , Upl  ] st1<Vesize>\t%4.d, %5, [%0, %1.d, lsl %p3]
    }
  )
  
--- 2511,2521 ----
  	   (match_operand:SVE_2 4 "register_operand")]
  	  UNSPEC_ST1_SCATTER))]
    "TARGET_SVE && TARGET_NON_STREAMING"
!   {@ [ cons: 0    , 1 , 3   , 4 , 5    ]
!      [ Z          , w , Ui1 , w , Upl  ] st1<Vesize>\t%4.d, %5, [%1.d]
!      [ vg<Vesize> , w , Ui1 , w , Upl  ] st1<Vesize>\t%4.d, %5, [%1.d, #%0]
!      [ rk         , w , Ui1 , w , Upl  ] st1<Vesize>\t%4.d, %5, [%0, %1.d]
!      [ rk         , w , i   , w , Upl  ] st1<Vesize>\t%4.d, %5, [%0, %1.d, lsl %p3]
    }
  )
  
***************
*** 2990,2999 ****
  	(vec_duplicate:PRED_ALL (match_operand:QI 1 "register_operand")))]
    "TARGET_SVE"
    {
!     rtx tmp = gen_reg_rtx (DImode);
!     rtx op1 = gen_lowpart (DImode, operands[1]);
!     emit_insn (gen_ashldi3 (tmp, op1, gen_int_mode (63, DImode)));
!     emit_insn (gen_while_ultdi<mode> (operands[0], const0_rtx, tmp));
      DONE;
    }
  )
--- 2990,2996 ----
  	(vec_duplicate:PRED_ALL (match_operand:QI 1 "register_operand")))]
    "TARGET_SVE"
    {
!     aarch64_emit_sve_pred_vec_duplicate (<MODE>mode, operands[0], operands[1]);
      DONE;
    }
  )
***************
*** 8361,8366 ****
--- 8358,8428 ----
    }
  )
  
+ ;; Likewise, but yield a VNx16BI result regardless of the element width.
+ ;; The .b case is equivalent to the above.
+ (define_expand "@aarch64_pred_cmp<cmp_op><mode>_acle"
+   [(parallel
+      [(set (match_operand:<VPRED> 0 "register_operand")
+ 	   (unspec:<VPRED>
+ 	     [(match_operand:<VPRED> 1 "register_operand")
+ 	      (match_operand:SI 2 "aarch64_sve_ptrue_flag")
+ 	      (SVE_INT_CMP:<VPRED>
+ 		(match_operand:VNx16QI_ONLY 3 "register_operand")
+ 		(match_operand:VNx16QI_ONLY 4 "aarch64_sve_cmp_<sve_imm_con>_operand"))]
+ 	     UNSPEC_PRED_Z))
+       (clobber (reg:CC_NZC CC_REGNUM))])]
+   "TARGET_SVE"
+ )
+ 
+ ;; For wider elements, bitcast the predicate result to a VNx16BI and use
+ ;; an (and ...) to indicate that only every second, fourth, or eighth bit
+ ;; is set.
+ (define_expand "@aarch64_pred_cmp<cmp_op><mode>_acle"
+   [(parallel
+      [(set (match_operand:VNx16BI 0 "register_operand")
+ 	   (and:VNx16BI
+ 	     (subreg:VNx16BI
+ 	       (unspec:<VPRED>
+ 		 [(match_operand:<VPRED> 1 "register_operand")
+ 		  (match_operand:SI 2 "aarch64_sve_ptrue_flag")
+ 		  (SVE_INT_CMP:<VPRED>
+ 		    (match_operand:SVE_FULL_HSDI 3 "register_operand")
+ 		    (match_operand:SVE_FULL_HSDI 4 "aarch64_sve_cmp_<sve_imm_con>_operand"))]
+ 		 UNSPEC_PRED_Z)
+ 	       0)
+ 	     (match_dup 5)))
+       (clobber (reg:CC_NZC CC_REGNUM))])]
+   "TARGET_SVE"
+   {
+     operands[5] = aarch64_ptrue_all (GET_MODE_UNIT_SIZE (<MODE>mode));
+   }
+ )
+ 
+ (define_insn "*aarch64_pred_cmp<cmp_op><mode>_acle"
+   [(set (match_operand:VNx16BI 0 "register_operand")
+ 	(and:VNx16BI
+ 	  (subreg:VNx16BI
+ 	    (unspec:<VPRED>
+ 	      [(match_operand:<VPRED> 1 "register_operand")
+ 	       (match_operand:SI 2 "aarch64_sve_ptrue_flag")
+ 	       (SVE_INT_CMP:<VPRED>
+ 		 (match_operand:SVE_FULL_HSDI 3 "register_operand")
+ 		 (match_operand:SVE_FULL_HSDI 4 "aarch64_sve_cmp_<sve_imm_con>_operand"))]
+ 	      UNSPEC_PRED_Z)
+ 	    0)
+ 	  (match_operand:<VPRED> 5 "aarch64_ptrue_all_operand")))
+    (clobber (reg:CC_NZC CC_REGNUM))]
+   "TARGET_SVE"
+   {@ [ cons: =0 , 1  , 3 , 4            ; attrs: pred_clobber ]
+      [ &Upa     , Upl, w , <sve_imm_con>; yes                 ] cmp<cmp_op>\t%0.<Vetype>, %1/z, %3.<Vetype>, #%4
+      [ ?Upl     , 0  , w , <sve_imm_con>; yes                 ] ^
+      [ Upa      , Upl, w , <sve_imm_con>; no                  ] ^
+      [ &Upa     , Upl, w , w            ; yes                 ] cmp<cmp_op>\t%0.<Vetype>, %1/z, %3.<Vetype>, %4.<Vetype>
+      [ ?Upl     , 0  , w , w            ; yes                 ] ^
+      [ Upa      , Upl, w , w            ; no                  ] ^
+   }
+ )
+ 
  ;; Predicated integer comparisons in which both the flag and predicate
  ;; results are interesting.
  (define_insn_and_rewrite "*cmp<cmp_op><mode>_cc"
***************
*** 8402,8407 ****
--- 8464,8512 ----
    }
  )
  
+ (define_insn_and_rewrite "*cmp<cmp_op><mode>_acle_cc"
+   [(set (reg:CC_NZC CC_REGNUM)
+ 	(unspec:CC_NZC
+ 	  [(match_operand:VNx16BI 1 "register_operand")
+ 	   (match_operand 4)
+ 	   (match_operand:SI 5 "aarch64_sve_ptrue_flag")
+ 	   (unspec:<VPRED>
+ 	     [(match_operand 6)
+ 	      (match_operand:SI 7 "aarch64_sve_ptrue_flag")
+ 	      (SVE_INT_CMP:<VPRED>
+ 		(match_operand:SVE_FULL_HSDI 2 "register_operand")
+ 		(match_operand:SVE_FULL_HSDI 3 "aarch64_sve_cmp_<sve_imm_con>_operand"))]
+ 	     UNSPEC_PRED_Z)]
+ 	  UNSPEC_PTEST))
+    (set (match_operand:VNx16BI 0 "register_operand")
+ 	(and:VNx16BI
+ 	  (subreg:VNx16BI
+ 	    (unspec:<VPRED>
+ 	      [(match_dup 6)
+ 	       (match_dup 7)
+ 	       (SVE_INT_CMP:<VPRED>
+ 		 (match_dup 2)
+ 		 (match_dup 3))]
+ 	      UNSPEC_PRED_Z)
+ 	    0)
+ 	  (match_operand:<VPRED> 8 "aarch64_ptrue_all_operand")))]
+   "TARGET_SVE
+    && aarch64_sve_same_pred_for_ptest_p (&operands[4], &operands[6])"
+   {@ [ cons: =0 , 1   , 2 , 3            ; attrs: pred_clobber ]
+      [ &Upa     ,  Upl, w , <sve_imm_con>; yes                 ] cmp<cmp_op>\t%0.<Vetype>, %1/z, %2.<Vetype>, #%3
+      [ ?Upl     ,  0  , w , <sve_imm_con>; yes                 ] ^
+      [ Upa      ,  Upl, w , <sve_imm_con>; no                  ] ^
+      [ &Upa     ,  Upl, w , w            ; yes                 ] cmp<cmp_op>\t%0.<Vetype>, %1/z, %2.<Vetype>, %3.<Vetype>
+      [ ?Upl     ,  0  , w , w            ; yes                 ] ^
+      [ Upa      ,  Upl, w , w            ; no                  ] ^
+   }
+   "&& !rtx_equal_p (operands[4], operands[6])"
+   {
+     operands[6] = copy_rtx (operands[4]);
+     operands[7] = operands[5];
+   }
+ )
+ 
  ;; Predicated integer comparisons in which only the flags result is
  ;; interesting.
  (define_insn_and_rewrite "*cmp<cmp_op><mode>_ptest"
***************
*** 8467,8480 ****
        (clobber (reg:CC_NZC CC_REGNUM))])]
  )
  
  ;; Predicated integer wide comparisons.
  (define_insn "@aarch64_pred_cmp<cmp_op><mode>_wide"
    [(set (match_operand:<VPRED> 0 "register_operand")
  	(unspec:<VPRED>
! 	  [(match_operand:VNx16BI 1 "register_operand")
  	   (match_operand:SI 2 "aarch64_sve_ptrue_flag")
  	   (unspec:<VPRED>
! 	     [(match_operand:SVE_FULL_BHSI 3 "register_operand")
  	      (match_operand:VNx2DI 4 "register_operand")]
  	     SVE_COND_INT_CMP_WIDE)]
  	  UNSPEC_PRED_Z))
--- 8572,8623 ----
        (clobber (reg:CC_NZC CC_REGNUM))])]
  )
  
+ (define_insn_and_split "*cmp<cmp_op><mode>_acle_and"
+   [(set (match_operand:VNx16BI 0 "register_operand" "=Upa, Upa")
+ 	(and:VNx16BI
+ 	  (and:VNx16BI
+ 	    (subreg:VNx16BI
+ 	      (unspec:<VPRED>
+ 		[(match_operand 4)
+ 		 (const_int SVE_KNOWN_PTRUE)
+ 		 (SVE_INT_CMP:<VPRED>
+ 		   (match_operand:SVE_FULL_HSDI 2 "register_operand" "w, w")
+ 		   (match_operand:SVE_FULL_HSDI 3 "aarch64_sve_cmp_<sve_imm_con>_operand" "<sve_imm_con>, w"))]
+ 		UNSPEC_PRED_Z)
+ 	      0)
+ 	    (match_operand:VNx16BI 1 "register_operand" "Upl, Upl"))
+           (match_operand:<VPRED> 5 "aarch64_ptrue_all_operand")))
+    (clobber (reg:CC_NZC CC_REGNUM))]
+   "TARGET_SVE"
+   "#"
+   "&& 1"
+   [(parallel
+      [(set (match_dup 0)
+ 	   (and:VNx16BI
+ 	     (subreg:VNx16BI
+ 	       (unspec:<VPRED>
+ 		 [(match_dup 1)
+ 		  (const_int SVE_MAYBE_NOT_PTRUE)
+ 		  (SVE_INT_CMP:<VPRED>
+ 		    (match_dup 2)
+ 		    (match_dup 3))]
+ 		 UNSPEC_PRED_Z)
+ 	       0)
+ 	     (match_dup 5)))
+       (clobber (reg:CC_NZC CC_REGNUM))])]
+   {
+     operands[1] = gen_lowpart (<VPRED>mode, operands[1]);
+   }
+ )
+ 
  ;; Predicated integer wide comparisons.
  (define_insn "@aarch64_pred_cmp<cmp_op><mode>_wide"
    [(set (match_operand:<VPRED> 0 "register_operand")
  	(unspec:<VPRED>
! 	  [(match_operand:<VPRED> 1 "register_operand")
  	   (match_operand:SI 2 "aarch64_sve_ptrue_flag")
  	   (unspec:<VPRED>
! 	     [(match_operand:VNx16QI_ONLY 3 "register_operand")
  	      (match_operand:VNx2DI 4 "register_operand")]
  	     SVE_COND_INT_CMP_WIDE)]
  	  UNSPEC_PRED_Z))
***************
*** 8487,8502 ****
    }
  )
  
  ;; Predicated integer wide comparisons in which both the flag and
  ;; predicate results are interesting.
! (define_insn "*aarch64_pred_cmp<cmp_op><mode>_wide_cc"
    [(set (reg:CC_NZC CC_REGNUM)
  	(unspec:CC_NZC
  	  [(match_operand:VNx16BI 1 "register_operand")
  	   (match_operand 4)
  	   (match_operand:SI 5 "aarch64_sve_ptrue_flag")
  	   (unspec:<VPRED>
! 	     [(match_operand:VNx16BI 6 "register_operand")
  	      (match_operand:SI 7 "aarch64_sve_ptrue_flag")
  	      (unspec:<VPRED>
  		[(match_operand:SVE_FULL_BHSI 2 "register_operand")
--- 8630,8690 ----
    }
  )
  
+ (define_expand "@aarch64_pred_cmp<cmp_op><mode>_wide"
+   [(parallel
+      [(set (match_operand:VNx16BI 0 "register_operand")
+ 	   (and:VNx16BI
+ 	     (subreg:VNx16BI
+ 	       (unspec:<VPRED>
+ 		 [(match_operand:<VPRED> 1 "register_operand")
+ 		  (match_operand:SI 2 "aarch64_sve_ptrue_flag")
+ 		  (unspec:<VPRED>
+ 		    [(match_operand:SVE_FULL_HSI 3 "register_operand")
+ 		     (match_operand:VNx2DI 4 "register_operand")]
+ 		    SVE_COND_INT_CMP_WIDE)]
+ 		 UNSPEC_PRED_Z)
+ 	       0)
+ 	     (match_dup 5)))
+       (clobber (reg:CC_NZC CC_REGNUM))])]
+   "TARGET_SVE"
+   {
+     operands[5] = aarch64_ptrue_all (GET_MODE_UNIT_SIZE (<MODE>mode));
+   }
+ )
+ 
+ (define_insn "*aarch64_pred_cmp<cmp_op><mode>_wide"
+   [(set (match_operand:VNx16BI 0 "register_operand")
+ 	(and:VNx16BI
+ 	  (subreg:VNx16BI
+ 	    (unspec:<VPRED>
+ 	      [(match_operand:<VPRED> 1 "register_operand")
+ 	       (match_operand:SI 2 "aarch64_sve_ptrue_flag")
+ 	       (unspec:<VPRED>
+ 		 [(match_operand:SVE_FULL_HSI 3 "register_operand")
+ 		  (match_operand:VNx2DI 4 "register_operand")]
+ 		 SVE_COND_INT_CMP_WIDE)]
+ 	      UNSPEC_PRED_Z)
+ 	    0)
+ 	  (match_operand:<VPRED> 5 "aarch64_ptrue_all_operand")))
+    (clobber (reg:CC_NZC CC_REGNUM))]
+   "TARGET_SVE"
+   {@ [ cons: =0, 1   , 2, 3, 4; attrs: pred_clobber ]
+      [ &Upa    ,  Upl,  , w, w; yes                 ] cmp<cmp_op>\t%0.<Vetype>, %1/z, %3.<Vetype>, %4.d
+      [ ?Upl    ,  0  ,  , w, w; yes                 ] ^
+      [ Upa     ,  Upl,  , w, w; no                  ] ^
+   }
+ )
+ 
  ;; Predicated integer wide comparisons in which both the flag and
  ;; predicate results are interesting.
! (define_insn_and_rewrite "*aarch64_pred_cmp<cmp_op><mode>_wide_cc"
    [(set (reg:CC_NZC CC_REGNUM)
  	(unspec:CC_NZC
  	  [(match_operand:VNx16BI 1 "register_operand")
  	   (match_operand 4)
  	   (match_operand:SI 5 "aarch64_sve_ptrue_flag")
  	   (unspec:<VPRED>
! 	     [(match_operand:<VPRED> 6 "register_operand")
  	      (match_operand:SI 7 "aarch64_sve_ptrue_flag")
  	      (unspec:<VPRED>
  		[(match_operand:SVE_FULL_BHSI 2 "register_operand")
***************
*** 8520,8537 ****
       [ ?Upl    ,  0  , w, w, Upl; yes                 ] ^
       [ Upa     ,  Upl, w, w, Upl; no                  ] ^
    }
  )
  
  ;; Predicated integer wide comparisons in which only the flags result
  ;; is interesting.
! (define_insn "*aarch64_pred_cmp<cmp_op><mode>_wide_ptest"
    [(set (reg:CC_NZC CC_REGNUM)
  	(unspec:CC_NZC
  	  [(match_operand:VNx16BI 1 "register_operand")
  	   (match_operand 4)
  	   (match_operand:SI 5 "aarch64_sve_ptrue_flag")
  	   (unspec:<VPRED>
! 	     [(match_operand:VNx16BI 6 "register_operand")
  	      (match_operand:SI 7 "aarch64_sve_ptrue_flag")
  	      (unspec:<VPRED>
  		[(match_operand:SVE_FULL_BHSI 2 "register_operand")
--- 8708,8772 ----
       [ ?Upl    ,  0  , w, w, Upl; yes                 ] ^
       [ Upa     ,  Upl, w, w, Upl; no                  ] ^
    }
+   "&& !rtx_equal_p (operands[4], operands[6])"
+   {
+     operands[6] = copy_rtx (operands[4]);
+     operands[7] = operands[5];
+   }
+ )
+ 
+ (define_insn_and_rewrite "*aarch64_pred_cmp<cmp_op><mode>_wide_cc"
+   [(set (reg:CC_NZC CC_REGNUM)
+ 	(unspec:CC_NZC
+ 	  [(match_operand:VNx16BI 1 "register_operand")
+ 	   (match_operand 4)
+ 	   (match_operand:SI 5 "aarch64_sve_ptrue_flag")
+ 	   (unspec:<VPRED>
+ 	     [(match_operand:<VPRED> 6 "register_operand")
+ 	      (match_operand:SI 7 "aarch64_sve_ptrue_flag")
+ 	      (unspec:<VPRED>
+ 		[(match_operand:SVE_FULL_HSI 2 "register_operand")
+ 		 (match_operand:VNx2DI 3 "register_operand")]
+ 		SVE_COND_INT_CMP_WIDE)]
+ 	     UNSPEC_PRED_Z)]
+ 	  UNSPEC_PTEST))
+    (set (match_operand:VNx16BI 0 "register_operand")
+ 	(and:VNx16BI
+ 	  (subreg:VNx16BI
+ 	    (unspec:<VPRED>
+ 	      [(match_dup 6)
+ 	       (match_dup 7)
+ 	       (unspec:<VPRED>
+ 		 [(match_dup 2)
+ 		  (match_dup 3)]
+ 		 SVE_COND_INT_CMP_WIDE)]
+ 	      UNSPEC_PRED_Z)
+ 	    0)
+ 	  (match_operand:<VPRED> 8 "aarch64_ptrue_all_operand")))]
+   "TARGET_SVE
+    && aarch64_sve_same_pred_for_ptest_p (&operands[4], &operands[6])"
+   {@ [ cons: =0, 1   , 2, 3, 6  ; attrs: pred_clobber ]
+      [ &Upa    ,  Upl, w, w, Upl; yes                 ] cmp<cmp_op>\t%0.<Vetype>, %1/z, %2.<Vetype>, %3.d
+      [ ?Upl    ,  0  , w, w, Upl; yes                 ] ^
+      [ Upa     ,  Upl, w, w, Upl; no                  ] ^
+   }
+   "&& !rtx_equal_p (operands[4], operands[6])"
+   {
+     operands[6] = copy_rtx (operands[4]);
+     operands[7] = operands[5];
+   }
  )
  
  ;; Predicated integer wide comparisons in which only the flags result
  ;; is interesting.
! (define_insn_and_rewrite "*aarch64_pred_cmp<cmp_op><mode>_wide_ptest"
    [(set (reg:CC_NZC CC_REGNUM)
  	(unspec:CC_NZC
  	  [(match_operand:VNx16BI 1 "register_operand")
  	   (match_operand 4)
  	   (match_operand:SI 5 "aarch64_sve_ptrue_flag")
  	   (unspec:<VPRED>
! 	     [(match_operand:<VPRED> 6 "register_operand")
  	      (match_operand:SI 7 "aarch64_sve_ptrue_flag")
  	      (unspec:<VPRED>
  		[(match_operand:SVE_FULL_BHSI 2 "register_operand")
***************
*** 8547,8552 ****
--- 8782,8792 ----
       [ ?Upl     ,  0  , w, w, Upl; yes                 ] ^
       [ Upa      ,  Upl, w, w, Upl; no                  ] ^
    }
+   "&& !rtx_equal_p (operands[4], operands[6])"
+   {
+     operands[6] = copy_rtx (operands[4]);
+     operands[7] = operands[5];
+   }
  )
  
  ;; -------------------------------------------------------------------------
***************
*** 8584,8589 ****
--- 8824,8881 ----
    "while<cmp_op>\t%0.<PRED_ALL:Vetype>, %<w>1, %<w>2"
  )
  
+ ;; Likewise, but yield a VNx16BI result regardless of the element width.
+ ;; The .b case is equivalent to the above.
+ (define_expand "@aarch64_sve_while_<while_optab_cmp><GPI:mode><VNx16BI_ONLY:mode>_acle"
+   [(parallel
+      [(set (match_operand:VNx16BI_ONLY 0 "register_operand")
+ 	   (unspec:VNx16BI_ONLY
+ 	     [(const_int SVE_WHILE_B)
+ 	      (match_operand:GPI 1 "aarch64_reg_or_zero")
+ 	      (match_operand:GPI 2 "aarch64_reg_or_zero")]
+ 	     SVE_WHILE))
+       (clobber (reg:CC_NZC CC_REGNUM))])]
+   "TARGET_SVE"
+ )
+ 
+ ;; For wider elements, bitcast the predicate result to a VNx16BI and use
+ ;; an (and ...) to indicate that only every second, fourth, or eighth bit
+ ;; is set.
+ (define_expand "@aarch64_sve_while_<while_optab_cmp><GPI:mode><PRED_HSD:mode>_acle"
+   [(parallel
+      [(set (match_operand:VNx16BI 0 "register_operand")
+ 	   (and:VNx16BI
+ 	     (subreg:VNx16BI
+ 	       (unspec:PRED_HSD
+ 		 [(const_int SVE_WHILE_B)
+ 		  (match_operand:GPI 1 "aarch64_reg_or_zero")
+ 		  (match_operand:GPI 2 "aarch64_reg_or_zero")]
+ 		 SVE_WHILE)
+ 	       0)
+ 	     (match_dup 3)))
+       (clobber (reg:CC_NZC CC_REGNUM))])]
+   "TARGET_SVE"
+   {
+     operands[3] = aarch64_ptrue_all (<data_bytes>);
+   }
+ )
+ 
+ (define_insn "*aarch64_sve_while_<while_optab_cmp><GPI:mode><PRED_HSD:mode>_acle"
+   [(set (match_operand:VNx16BI 0 "register_operand" "=Upa")
+ 	(and:VNx16BI
+ 	  (subreg:VNx16BI
+ 	    (unspec:PRED_HSD
+ 	      [(const_int SVE_WHILE_B)
+ 	       (match_operand:GPI 1 "aarch64_reg_or_zero" "rZ")
+ 	       (match_operand:GPI 2 "aarch64_reg_or_zero" "rZ")]
+ 	      SVE_WHILE)
+ 	    0)
+ 	  (match_operand:PRED_HSD 3 "aarch64_ptrue_all_operand")))
+    (clobber (reg:CC_NZC CC_REGNUM))]
+   "TARGET_SVE"
+   "while<cmp_op>\t%0.<PRED_HSD:Vetype>, %<w>1, %<w>2"
+ )
+ 
  ;; The WHILE instructions set the flags in the same way as a PTEST with
  ;; a PTRUE GP.  Handle the case in which both results are useful.  The GP
  ;; operands to the PTEST aren't needed, so we allow them to be anything.
***************
*** 8615,8620 ****
--- 8907,8944 ----
    }
  )
  
+ (define_insn_and_rewrite "*while_<while_optab_cmp><GPI:mode><PRED_HSD:mode>_acle_cc"
+   [(set (reg:CC_NZC CC_REGNUM)
+ 	(unspec:CC_NZC
+ 	  [(match_operand 3)
+ 	   (match_operand 4)
+ 	   (const_int SVE_KNOWN_PTRUE)
+ 	   (unspec:PRED_HSD
+ 	     [(const_int SVE_WHILE_B)
+ 	      (match_operand:GPI 1 "aarch64_reg_or_zero" "rZ")
+ 	      (match_operand:GPI 2 "aarch64_reg_or_zero" "rZ")]
+ 	     SVE_WHILE)]
+ 	  UNSPEC_PTEST))
+    (set (match_operand:VNx16BI 0 "register_operand" "=Upa")
+ 	(and:VNx16BI
+ 	  (subreg:VNx16BI
+ 	    (unspec:PRED_HSD [(const_int SVE_WHILE_B)
+ 			      (match_dup 1)
+ 			      (match_dup 2)]
+ 			     SVE_WHILE)
+ 	    0)
+ 	  (match_operand:PRED_HSD 5 "aarch64_ptrue_all_operand")))]
+   "TARGET_SVE"
+   "while<cmp_op>\t%0.<PRED_HSD:Vetype>, %<w>1, %<w>2"
+   ;; Force the compiler to drop the unused predicate operand, so that we
+   ;; don't have an unnecessary PTRUE.
+   "&& (!CONSTANT_P (operands[3]) || !CONSTANT_P (operands[4]))"
+   {
+     operands[3] = CONSTM1_RTX (VNx16BImode);
+     operands[4] = CONSTM1_RTX (<PRED_HSD:MODE>mode);
+   }
+ )
+ 
  ;; Same, but handle the case in which only the flags result is useful.
  (define_insn_and_rewrite "@while_<while_optab_cmp><GPI:mode><PRED_ALL:mode>_ptest"
    [(set (reg:CC_NZC CC_REGNUM)
***************
*** 8685,8690 ****
--- 9009,9051 ----
    }
  )
  
+ (define_expand "@aarch64_pred_fcm<cmp_op><mode>_acle"
+   [(set (match_operand:VNx16BI 0 "register_operand")
+ 	(and:VNx16BI
+ 	  (subreg:VNx16BI
+ 	    (unspec:<VPRED>
+ 	      [(match_operand:<VPRED> 1 "aarch64_predicate_operand")
+ 	       (match_operand:SI 2 "aarch64_sve_ptrue_flag")
+ 	       (match_operand:SVE_F 3 "register_operand")
+ 	       (match_operand:SVE_F 4 "aarch64_simd_reg_or_zero")]
+ 	      SVE_COND_FP_CMP_I0)
+ 	    0)
+ 	  (match_dup 5)))]
+   "TARGET_SVE"
+   {
+     operands[5] = aarch64_ptrue_all (GET_MODE_UNIT_SIZE (<MODE>mode));
+   }
+ )
+ 
+ (define_insn "*aarch64_pred_fcm<cmp_op><mode>_acle"
+   [(set (match_operand:VNx16BI 0 "register_operand")
+ 	(and:VNx16BI
+ 	  (subreg:VNx16BI
+ 	    (unspec:<VPRED>
+ 	      [(match_operand:<VPRED> 1 "aarch64_predicate_operand")
+ 	       (match_operand:SI 2 "aarch64_sve_ptrue_flag")
+ 	       (match_operand:SVE_F 3 "register_operand")
+ 	       (match_operand:SVE_F 4 "aarch64_simd_reg_or_zero")]
+ 	      SVE_COND_FP_CMP_I0)
+ 	    0)
+ 	  (match_operand:<VPRED> 5 "aarch64_ptrue_all_operand")))]
+   "TARGET_SVE"
+   {@ [ cons: =0 , 1   , 3 , 4   ]
+      [ Upa      , Upl , w , Dz  ] fcm<cmp_op>\t%0.<Vetype>, %1/z, %3.<Vetype>, #0.0
+      [ Upa      , Upl , w , w   ] fcm<cmp_op>\t%0.<Vetype>, %1/z, %3.<Vetype>, %4.<Vetype>
+   }
+ )
+ 
  ;; Same for unordered comparisons.
  (define_insn "@aarch64_pred_fcmuo<mode>"
    [(set (match_operand:<VPRED> 0 "register_operand" "=Upa")
***************
*** 8698,8703 ****
--- 9059,9098 ----
    "fcmuo\t%0.<Vetype>, %1/z, %3.<Vetype>, %4.<Vetype>"
  )
  
+ (define_expand "@aarch64_pred_fcmuo<mode>_acle"
+   [(set (match_operand:VNx16BI 0 "register_operand")
+ 	(and:VNx16BI
+ 	  (subreg:VNx16BI
+ 	    (unspec:<VPRED>
+ 	      [(match_operand:<VPRED> 1 "aarch64_predicate_operand")
+ 	       (match_operand:SI 2 "aarch64_sve_ptrue_flag")
+ 	       (match_operand:SVE_F 3 "register_operand")
+ 	       (match_operand:SVE_F 4 "register_operand")]
+ 	      UNSPEC_COND_FCMUO)
+ 	    0)
+ 	  (match_dup 5)))]
+   "TARGET_SVE"
+   {
+     operands[5] = aarch64_ptrue_all (GET_MODE_UNIT_SIZE (<MODE>mode));
+   }
+ )
+ 
+ (define_insn "*aarch64_pred_fcmuo<mode>_acle"
+   [(set (match_operand:VNx16BI 0 "register_operand" "=Upa")
+ 	(and:VNx16BI
+ 	  (subreg:VNx16BI
+ 	    (unspec:<VPRED>
+ 	      [(match_operand:<VPRED> 1 "aarch64_predicate_operand" "Upl")
+ 	       (match_operand:SI 2 "aarch64_sve_ptrue_flag")
+ 	       (match_operand:SVE_F 3 "register_operand" "w")
+ 	       (match_operand:SVE_F 4 "register_operand" "w")]
+ 	      UNSPEC_COND_FCMUO)
+ 	    0)
+ 	  (match_operand:<VPRED> 5 "aarch64_ptrue_all_operand")))]
+   "TARGET_SVE"
+   "fcmuo\t%0.<Vetype>, %1/z, %3.<Vetype>, %4.<Vetype>"
+ )
+ 
  ;; Floating-point comparisons predicated on a PTRUE, with the results ANDed
  ;; with another predicate P.  This does not have the same trapping behavior
  ;; as predicating the comparison itself on P, but it's a legitimate fold,
***************
*** 8916,8938 ****
  ;; -------------------------------------------------------------------------
  
  ;; Predicated floating-point absolute comparisons.
! (define_expand "@aarch64_pred_fac<cmp_op><mode>"
!   [(set (match_operand:<VPRED> 0 "register_operand")
! 	(unspec:<VPRED>
! 	  [(match_operand:<VPRED> 1 "register_operand")
! 	   (match_operand:SI 2 "aarch64_sve_ptrue_flag")
! 	   (unspec:SVE_FULL_F
! 	     [(match_dup 1)
! 	      (match_dup 2)
! 	      (match_operand:SVE_FULL_F 3 "register_operand")]
! 	     UNSPEC_COND_FABS)
! 	   (unspec:SVE_FULL_F
! 	     [(match_dup 1)
! 	      (match_dup 2)
! 	      (match_operand:SVE_FULL_F 4 "register_operand")]
! 	     UNSPEC_COND_FABS)]
! 	  SVE_COND_FP_ABS_CMP))]
    "TARGET_SVE"
  )
  
  (define_insn_and_rewrite "*aarch64_pred_fac<cmp_op><mode>_relaxed"
--- 9311,9340 ----
  ;; -------------------------------------------------------------------------
  
  ;; Predicated floating-point absolute comparisons.
! (define_expand "@aarch64_pred_fac<cmp_op><mode>_acle"
!   [(set (match_operand:VNx16BI 0 "register_operand")
! 	(and:VNx16BI
! 	  (subreg:VNx16BI
! 	    (unspec:<VPRED>
! 	      [(match_operand:<VPRED> 1 "register_operand")
! 	       (match_operand:SI 2 "aarch64_sve_ptrue_flag")
! 	       (unspec:SVE_FULL_F
! 		 [(match_dup 1)
! 		  (match_dup 2)
! 		  (match_operand:SVE_FULL_F 3 "register_operand")]
! 		 UNSPEC_COND_FABS)
! 	       (unspec:SVE_FULL_F
! 		 [(match_dup 1)
! 		  (match_dup 2)
! 		  (match_operand:SVE_FULL_F 4 "register_operand")]
! 		 UNSPEC_COND_FABS)]
! 	      SVE_COND_FP_ABS_CMP)
! 	    0)
! 	  (match_dup 5)))]
    "TARGET_SVE"
+   {
+     operands[5] = aarch64_ptrue_all (GET_MODE_UNIT_SIZE (<MODE>mode));
+   }
  )
  
  (define_insn_and_rewrite "*aarch64_pred_fac<cmp_op><mode>_relaxed"
***************
*** 8981,8986 ****
--- 9383,9412 ----
    "fac<cmp_op>\t%0.<Vetype>, %1/z, %2.<Vetype>, %3.<Vetype>"
  )
  
+ (define_insn "*aarch64_pred_fac<cmp_op><mode>_strict_acle"
+   [(set (match_operand:VNx16BI 0 "register_operand" "=Upa")
+ 	(and:VNx16BI
+ 	  (subreg:VNx16BI
+ 	    (unspec:<VPRED>
+ 	      [(match_operand:<VPRED> 1 "register_operand" "Upl")
+ 	       (match_operand:SI 4 "aarch64_sve_ptrue_flag")
+ 	       (unspec:SVE_FULL_F
+ 		 [(match_dup 1)
+ 		  (match_operand:SI 5 "aarch64_sve_gp_strictness")
+ 		  (match_operand:SVE_FULL_F 2 "register_operand" "w")]
+ 		 UNSPEC_COND_FABS)
+ 	       (unspec:SVE_FULL_F
+ 		 [(match_dup 1)
+ 		  (match_operand:SI 6 "aarch64_sve_gp_strictness")
+ 		  (match_operand:SVE_FULL_F 3 "register_operand" "w")]
+ 		 UNSPEC_COND_FABS)]
+ 	      SVE_COND_FP_ABS_CMP)
+ 	    0)
+ 	  (match_operand:<VPRED> 7 "aarch64_ptrue_all_operand")))]
+   "TARGET_SVE"
+   "fac<cmp_op>\t%0.<Vetype>, %1/z, %2.<Vetype>, %3.<Vetype>"
+ )
+ 
  ;; -------------------------------------------------------------------------
  ;; ---- [PRED] Select
  ;; -------------------------------------------------------------------------
***************
*** 9429,9435 ****
  	(unspec:PRED_ALL [(match_operand:PRED_ALL 1 "register_operand" "Upa")]
  			 UNSPEC_REV))]
    "TARGET_SVE"
!   "rev\t%0.<Vetype>, %1.<Vetype>")
  
  ;; -------------------------------------------------------------------------
  ;; ---- [PRED] Special-purpose binary permutes
--- 9855,9884 ----
  	(unspec:PRED_ALL [(match_operand:PRED_ALL 1 "register_operand" "Upa")]
  			 UNSPEC_REV))]
    "TARGET_SVE"
!   "rev\t%0.<Vetype>, %1.<Vetype>"
! )
! 
! (define_expand "@aarch64_sve_rev<mode>_acle"
!   [(set (match_operand:VNx16BI 0 "register_operand")
! 	(unspec:VNx16BI
! 	  [(match_operand:VNx16BI 1 "register_operand")
! 	   (match_dup:PRED_ALL 2)]
! 	  UNSPEC_REV_PRED))]
!   "TARGET_SVE"
!   {
!     operands[2] = CONST0_RTX (<MODE>mode);
!   }
! )
! 
! (define_insn "*aarch64_sve_rev<mode>_acle"
!   [(set (match_operand:VNx16BI 0 "register_operand" "=Upa")
! 	(unspec:VNx16BI
! 	  [(match_operand:VNx16BI 1 "register_operand" "Upa")
! 	   (match_operand:PRED_ALL 2 "aarch64_simd_imm_zero")]
! 	  UNSPEC_REV_PRED))]
!   "TARGET_SVE"
!   "rev\t%0.<Vetype>, %1.<Vetype>"
! )
  
  ;; -------------------------------------------------------------------------
  ;; ---- [PRED] Special-purpose binary permutes
***************
*** 9454,9471 ****
    "<perm_insn>\t%0.<Vetype>, %1.<Vetype>, %2.<Vetype>"
  )
  
! ;; Special purpose permute used by the predicate generation instructions.
! ;; Unlike the normal permute patterns, these instructions operate on VNx16BI
! ;; regardless of the element size, so that all input and output bits are
! ;; well-defined.  Operand 3 then indicates the size of the permute.
! (define_insn "@aarch64_sve_trn1_conv<mode>"
    [(set (match_operand:VNx16BI 0 "register_operand" "=Upa")
  	(unspec:VNx16BI [(match_operand:VNx16BI 1 "register_operand" "Upa")
  			 (match_operand:VNx16BI 2 "register_operand" "Upa")
! 			 (match_operand:PRED_ALL 3 "aarch64_simd_imm_zero")]
! 			UNSPEC_TRN1_CONV))]
    "TARGET_SVE"
!   "trn1\t%0.<PRED_ALL:Vetype>, %1.<PRED_ALL:Vetype>, %2.<PRED_ALL:Vetype>"
  )
  
  ;; =========================================================================
--- 9903,9941 ----
    "<perm_insn>\t%0.<Vetype>, %1.<Vetype>, %2.<Vetype>"
  )
  
! ;; Special-purpose permutes used by the ACLE intrinsics and predicate
! ;; generation instructions.  Unlike the normal permute patterns, these
! ;; instructions operate on VNx16BI regardless of the element size, so that
! ;; all input and output bits are well-defined.  Operand 3 then indicates
! ;; the size of the permute.
! ;;
! ;; To make generation easier, this pattern embeds the permute type as the
! ;; fourth operand to the unspec.  On the one hand, this avoids overloading
! ;; unspecs like UNSPEC_ZIP1 to represent two different operations.  On the
! ;; other hand, it avoids having a separate unspec for each variant, and
! ;; having to map from one kind of unspec to the other.
! (define_expand "@aarch64_sve_<perm_insn><mode>_acle"
!   [(set (match_operand:VNx16BI 0 "register_operand")
! 	(unspec:VNx16BI [(match_operand:VNx16BI 1 "register_operand")
! 			 (match_operand:VNx16BI 2 "register_operand")
! 			 (match_dup:PRED_ALL 3)
! 			 (const_int PERMUTE)]
! 			UNSPEC_PERMUTE_PRED))]
!   "TARGET_SVE"
!   {
!     operands[3] = CONST0_RTX (<MODE>mode);
!   }
! )
! 
! (define_insn "*aarch64_sve_<perm_insn><mode>_acle"
    [(set (match_operand:VNx16BI 0 "register_operand" "=Upa")
  	(unspec:VNx16BI [(match_operand:VNx16BI 1 "register_operand" "Upa")
  			 (match_operand:VNx16BI 2 "register_operand" "Upa")
! 			 (match_operand:PRED_ALL 3 "aarch64_simd_imm_zero")
! 			 (const_int PERMUTE)]
! 			UNSPEC_PERMUTE_PRED))]
    "TARGET_SVE"
!   "<perm_insn>\t%0.<PRED_ALL:Vetype>, %1.<PRED_ALL:Vetype>, %2.<PRED_ALL:Vetype>"
  )
  
  ;; =========================================================================
***************
*** 10454,10459 ****
--- 10924,10957 ----
    "punpk<perm_hilo>\t%0.h, %1.b"
  )
  
+ (define_expand "@aarch64_sve_punpk<perm_hilo>_acle"
+   [(set (match_operand:VNx16BI 0 "register_operand")
+ 	(and:VNx16BI
+ 	  (subreg:VNx16BI
+ 	    (unspec:VNx8BI
+ 	      [(match_operand:VNx16BI 1 "register_operand")]
+ 	      UNPACK_UNSIGNED)
+ 	    0)
+ 	  (match_dup 2)))]
+   "TARGET_SVE"
+   {
+     operands[2] = aarch64_ptrue_all (2);
+   }
+ )
+ 
+ (define_insn "*aarch64_sve_punpk<perm_hilo>_acle"
+   [(set (match_operand:VNx16BI 0 "register_operand" "=Upa")
+ 	(and:VNx16BI
+ 	  (subreg:VNx16BI
+ 	    (unspec:VNx8BI
+ 	      [(match_operand:VNx16BI 1 "register_operand" "Upa")]
+ 	      UNPACK_UNSIGNED)
+ 	    0)
+ 	  (match_operand:VNx8BI 2 "aarch64_ptrue_all_operand")))]
+   "TARGET_SVE"
+   "punpk<perm_hilo>\t%0.h, %1.b"
+ )
+ 
  ;; =========================================================================
  ;; == Vector partitioning
  ;; =========================================================================
***************
*** 10678,10691 ****
  ;; -------------------------------------------------------------------------
  
  (define_insn "@aarch64_sve_<sve_pred_op><mode>"
!   [(set (match_operand:PRED_ALL 0 "register_operand" "=Upa")
! 	(unspec:PRED_ALL
! 	  [(match_operand:PRED_ALL 1 "register_operand" "Upa")
  	   (match_operand:SI 2 "aarch64_sve_ptrue_flag")
! 	   (match_operand:PRED_ALL 3 "register_operand" "0")]
  	  SVE_PITER))
     (clobber (reg:CC_NZC CC_REGNUM))]
!   "TARGET_SVE && <max_elem_bits> >= <elem_bits>"
    "<sve_pred_op>\t%0.<Vetype>, %1, %0.<Vetype>"
  )
  
--- 11176,11224 ----
  ;; -------------------------------------------------------------------------
  
  (define_insn "@aarch64_sve_<sve_pred_op><mode>"
!   [(set (match_operand:VNx16BI_ONLY 0 "register_operand" "=Upa")
! 	(unspec:VNx16BI_ONLY
! 	  [(match_operand:VNx16BI_ONLY 1 "register_operand" "Upa")
  	   (match_operand:SI 2 "aarch64_sve_ptrue_flag")
! 	   (match_operand:VNx16BI_ONLY 3 "register_operand" "0")]
  	  SVE_PITER))
     (clobber (reg:CC_NZC CC_REGNUM))]
!   "TARGET_SVE"
!   "<sve_pred_op>\t%0.<Vetype>, %1, %0.<Vetype>"
! )
! 
! (define_expand "@aarch64_sve_<sve_pred_op><mode>"
!   [(parallel
!      [(set (match_operand:VNx16BI 0 "register_operand")
! 	   (and:VNx16BI
! 	     (subreg:VNx16BI
! 	       (unspec:PRED_HSD
! 		 [(match_operand:PRED_HSD 1 "register_operand")
! 		  (match_operand:SI 2 "aarch64_sve_ptrue_flag")
! 		  (match_operand:PRED_HSD 3 "register_operand")]
! 		 PNEXT_ONLY)
! 	       0)
! 	     (match_dup 4)))
!       (clobber (reg:CC_NZC CC_REGNUM))])]
!   "TARGET_SVE"
!   {
!     operands[4] = aarch64_ptrue_all (<data_bytes>);
!   }
! )
! 
! (define_insn "*aarch64_sve_<sve_pred_op><mode>"
!   [(set (match_operand:VNx16BI 0 "register_operand" "=Upa")
! 	(and:VNx16BI
! 	  (subreg:VNx16BI
! 	    (unspec:PRED_HSD
! 	      [(match_operand:PRED_HSD 1 "register_operand" "Upa")
! 	       (match_operand:SI 2 "aarch64_sve_ptrue_flag")
! 	       (match_operand:PRED_HSD 3 "register_operand" "0")]
! 	      PNEXT_ONLY)
! 	    0)
! 	  (match_operand:PRED_HSD 4 "aarch64_ptrue_all_operand")))
!    (clobber (reg:CC_NZC CC_REGNUM))]
!   "TARGET_SVE"
    "<sve_pred_op>\t%0.<Vetype>, %1, %0.<Vetype>"
  )
  
***************
*** 10713,10718 ****
--- 11246,11283 ----
     && aarch64_sve_same_pred_for_ptest_p (&operands[2], &operands[4])"
    "<sve_pred_op>\t%0.<Vetype>, %1, %0.<Vetype>"
    "&& !rtx_equal_p (operands[2], operands[4])"
+   {
+     operands[4] = operands[2];
+     operands[5] = operands[3];
+   }
+ )
+ 
+ (define_insn_and_rewrite "*aarch64_sve_<sve_pred_op><mode>_cc"
+   [(set (reg:CC_NZC CC_REGNUM)
+ 	(unspec:CC_NZC
+ 	  [(match_operand:VNx16BI 1 "register_operand" "Upa")
+ 	   (match_operand 2)
+ 	   (match_operand:SI 3 "aarch64_sve_ptrue_flag")
+ 	   (unspec:PRED_HSD
+ 	     [(match_operand 4)
+ 	      (match_operand:SI 5 "aarch64_sve_ptrue_flag")
+ 	      (match_operand:PRED_HSD 6 "register_operand" "0")]
+ 	     PNEXT_ONLY)]
+ 	  UNSPEC_PTEST))
+    (set (match_operand:VNx16BI 0 "register_operand" "=Upa")
+ 	(and:VNx16BI
+ 	  (subreg:VNx16BI
+ 	    (unspec:PRED_HSD
+ 	      [(match_dup 4)
+ 	       (match_dup 5)
+ 	       (match_dup 6)]
+ 	      PNEXT_ONLY)
+ 	    0)
+ 	  (match_operand:PRED_HSD 7 "aarch64_ptrue_all_operand")))]
+   "TARGET_SVE
+    && aarch64_sve_same_pred_for_ptest_p (&operands[2], &operands[4])"
+   "<sve_pred_op>\t%0.<Vetype>, %1, %0.<Vetype>"
+   "&& !rtx_equal_p (operands[2], operands[4])"
    {
      operands[4] = operands[2];
      operands[5] = operands[3];
diff -Nrcpad gcc-16-20250803/gcc/config/aarch64/aarch64-sve2.md gcc-16-20250810/gcc/config/aarch64/aarch64-sve2.md
*** gcc-16-20250803/gcc/config/aarch64/aarch64-sve2.md	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/config/aarch64/aarch64-sve2.md	Sun Aug 10 22:32:07 2025
***************
*** 2211,2224 ****
  ;; - FDOT (2-way, indexed) (FP8DOT2)
  ;; -------------------------------------------------------------------------
  (define_insn "@aarch64_sve_dot<mode>"
!   [(set (match_operand:SVE_FULL_HSF 0 "register_operand")
! 	(unspec:SVE_FULL_HSF
! 	  [(match_operand:SVE_FULL_HSF 1 "register_operand")
  	   (match_operand:VNx16QI 2 "register_operand")
  	   (match_operand:VNx16QI 3 "register_operand")
  	   (reg:DI FPM_REGNUM)]
  	  UNSPEC_DOT_FP8))]
!   "TARGET_SSVE_FP8DOT4 && !(<MODE>mode == VNx8HFmode && !TARGET_SSVE_FP8DOT2)"
    {@ [ cons: =0 , 1 , 2 , 3 ; attrs: movprfx ]
       [ w        , 0 , w , w ; *              ] fdot\t%0.<Vetype>, %2.b, %3.b
       [ ?&w      , w , w , w ; yes            ] movprfx\t%0, %1\;fdot\t%0.<Vetype>, %2.b, %3.b
--- 2211,2224 ----
  ;; - FDOT (2-way, indexed) (FP8DOT2)
  ;; -------------------------------------------------------------------------
  (define_insn "@aarch64_sve_dot<mode>"
!   [(set (match_operand:SVE_FULL_HSF_FP8_FDOT 0 "register_operand")
! 	(unspec:SVE_FULL_HSF_FP8_FDOT
! 	  [(match_operand:SVE_FULL_HSF_FP8_FDOT 1 "register_operand")
  	   (match_operand:VNx16QI 2 "register_operand")
  	   (match_operand:VNx16QI 3 "register_operand")
  	   (reg:DI FPM_REGNUM)]
  	  UNSPEC_DOT_FP8))]
!   ""
    {@ [ cons: =0 , 1 , 2 , 3 ; attrs: movprfx ]
       [ w        , 0 , w , w ; *              ] fdot\t%0.<Vetype>, %2.b, %3.b
       [ ?&w      , w , w , w ; yes            ] movprfx\t%0, %1\;fdot\t%0.<Vetype>, %2.b, %3.b
***************
*** 2226,2240 ****
  )
  
  (define_insn "@aarch64_sve_dot_lane<mode>"
!   [(set (match_operand:SVE_FULL_HSF 0 "register_operand")
! 	(unspec:SVE_FULL_HSF
! 	  [(match_operand:SVE_FULL_HSF 1 "register_operand")
  	   (match_operand:VNx16QI 2 "register_operand")
  	   (match_operand:VNx16QI 3 "register_operand")
  	   (match_operand:SI 4 "const_int_operand")
  	   (reg:DI FPM_REGNUM)]
  	  UNSPEC_DOT_LANE_FP8))]
!   "TARGET_SSVE_FP8DOT4 && !(<MODE>mode == VNx8HFmode && !TARGET_SSVE_FP8DOT2)"
    {@ [ cons: =0 , 1 , 2 , 3 ; attrs: movprfx ]
       [ w        , 0 , w , y ; *              ] fdot\t%0.<Vetype>, %2.b, %3.b[%4]
       [ ?&w      , w , w , y ; yes            ] movprfx\t%0, %1\;fdot\t%0.<Vetype>, %2.b, %3.b[%4]
--- 2226,2240 ----
  )
  
  (define_insn "@aarch64_sve_dot_lane<mode>"
!   [(set (match_operand:SVE_FULL_HSF_FP8_FDOT 0 "register_operand")
! 	(unspec:SVE_FULL_HSF_FP8_FDOT
! 	  [(match_operand:SVE_FULL_HSF_FP8_FDOT 1 "register_operand")
  	   (match_operand:VNx16QI 2 "register_operand")
  	   (match_operand:VNx16QI 3 "register_operand")
  	   (match_operand:SI 4 "const_int_operand")
  	   (reg:DI FPM_REGNUM)]
  	  UNSPEC_DOT_LANE_FP8))]
!   ""
    {@ [ cons: =0 , 1 , 2 , 3 ; attrs: movprfx ]
       [ w        , 0 , w , y ; *              ] fdot\t%0.<Vetype>, %2.b, %3.b[%4]
       [ ?&w      , w , w , y ; yes            ] movprfx\t%0, %1\;fdot\t%0.<Vetype>, %2.b, %3.b[%4]
***************
*** 4068,4075 ****
  	  [(match_operand:<VPRED> 1 "register_operand")
  	   (match_operand:SI 2 "aarch64_sve_ptrue_flag")
  	   (unspec:<VPRED>
! 	     [(match_operand:SVE_FULL_BHI 3 "register_operand")
! 	      (match_operand:SVE_FULL_BHI 4 "register_operand")]
  	     SVE2_MATCH)]
  	  UNSPEC_PRED_Z))
     (clobber (reg:CC_NZC CC_REGNUM))]
--- 4068,4075 ----
  	  [(match_operand:<VPRED> 1 "register_operand")
  	   (match_operand:SI 2 "aarch64_sve_ptrue_flag")
  	   (unspec:<VPRED>
! 	     [(match_operand:VNx16QI_ONLY 3 "register_operand")
! 	      (match_operand:VNx16QI_ONLY 4 "register_operand")]
  	     SVE2_MATCH)]
  	  UNSPEC_PRED_Z))
     (clobber (reg:CC_NZC CC_REGNUM))]
***************
*** 4081,4086 ****
--- 4081,4131 ----
    }
  )
  
+ (define_expand "@aarch64_pred_<sve_int_op><mode>"
+   [(parallel
+      [(set (match_operand:VNx16BI 0 "register_operand")
+ 	   (and:VNx16BI
+ 	     (subreg:VNx16BI
+ 	       (unspec:<VPRED>
+ 		 [(match_operand:<VPRED> 1 "register_operand")
+ 		  (match_operand:SI 2 "aarch64_sve_ptrue_flag")
+ 		  (unspec:<VPRED>
+ 		    [(match_operand:VNx8HI_ONLY 3 "register_operand")
+ 		     (match_operand:VNx8HI_ONLY 4 "register_operand")]
+ 		    SVE2_MATCH)]
+ 		 UNSPEC_PRED_Z)
+ 	       0)
+ 	     (match_dup 5)))
+       (clobber (reg:CC_NZC CC_REGNUM))])]
+   "TARGET_SVE2 && TARGET_NON_STREAMING"
+   {
+     operands[5] = aarch64_ptrue_all (GET_MODE_UNIT_SIZE (<MODE>mode));
+   }
+ )
+ 
+ (define_insn "*aarch64_pred_<sve_int_op><mode>"
+   [(set (match_operand:VNx16BI 0 "register_operand")
+ 	(and:VNx16BI
+ 	  (subreg:VNx16BI
+ 	    (unspec:<VPRED>
+ 	      [(match_operand:<VPRED> 1 "register_operand")
+ 	       (match_operand:SI 2 "aarch64_sve_ptrue_flag")
+ 	       (unspec:<VPRED>
+ 		 [(match_operand:VNx8HI_ONLY 3 "register_operand")
+ 		  (match_operand:VNx8HI_ONLY 4 "register_operand")]
+ 		 SVE2_MATCH)]
+ 	      UNSPEC_PRED_Z)
+ 	    0)
+ 	  (match_operand:<VPRED> 5 "aarch64_ptrue_all_operand")))
+    (clobber (reg:CC_NZC CC_REGNUM))]
+   "TARGET_SVE2 && TARGET_NON_STREAMING"
+   {@ [ cons: =0, 1  , 3, 4; attrs: pred_clobber ]
+      [ &Upa    , Upl, w, w; yes                 ] <sve_int_op>\t%0.<Vetype>, %1/z, %3.<Vetype>, %4.<Vetype>
+      [ ?Upl    , 0  , w, w; yes                 ] ^
+      [ Upa     , Upl, w, w; no                  ] ^
+   }
+ )
+ 
  ;; Predicated string matching in which both the flag and predicate results
  ;; are interesting.
  (define_insn_and_rewrite "*aarch64_pred_<sve_int_op><mode>_cc"
***************
*** 4110,4115 ****
--- 4155,4199 ----
    "TARGET_SVE2
     && TARGET_NON_STREAMING
     && aarch64_sve_same_pred_for_ptest_p (&operands[4], &operands[6])"
+   "<sve_int_op>\t%0.<Vetype>, %1/z, %2.<Vetype>, %3.<Vetype>"
+   "&& !rtx_equal_p (operands[4], operands[6])"
+   {
+     operands[6] = copy_rtx (operands[4]);
+     operands[7] = operands[5];
+   }
+ )
+ 
+ (define_insn_and_rewrite "*aarch64_pred_<sve_int_op><mode>_cc"
+   [(set (reg:CC_NZC CC_REGNUM)
+ 	(unspec:CC_NZC
+ 	  [(match_operand:VNx16BI 1 "register_operand" "Upl")
+ 	   (match_operand 4)
+ 	   (match_operand:SI 5 "aarch64_sve_ptrue_flag")
+ 	   (unspec:<VPRED>
+ 	     [(match_operand 6)
+ 	      (match_operand:SI 7 "aarch64_sve_ptrue_flag")
+ 	      (unspec:<VPRED>
+ 		[(match_operand:VNx8HI_ONLY 2 "register_operand" "w")
+ 		 (match_operand:VNx8HI_ONLY 3 "register_operand" "w")]
+ 		SVE2_MATCH)]
+ 	     UNSPEC_PRED_Z)]
+ 	  UNSPEC_PTEST))
+    (set (match_operand:VNx16BI 0 "register_operand" "=Upa")
+ 	(and:VNx16BI
+ 	  (subreg:VNx16BI
+ 	    (unspec:<VPRED>
+ 	      [(match_dup 6)
+ 	       (match_dup 7)
+ 	       (unspec:<VPRED>
+ 		 [(match_dup 2)
+ 		  (match_dup 3)]
+ 		 SVE2_MATCH)]
+ 	      UNSPEC_PRED_Z)
+ 	    0)
+ 	  (match_operand:<VPRED> 8 "aarch64_ptrue_all_operand")))]
+   "TARGET_SVE2
+    && TARGET_NON_STREAMING
+    && aarch64_sve_same_pred_for_ptest_p (&operands[4], &operands[6])"
    "<sve_int_op>\t%0.<Vetype>, %1/z, %2.<Vetype>, %3.<Vetype>"
    "&& !rtx_equal_p (operands[4], operands[6])"
    {
diff -Nrcpad gcc-16-20250803/gcc/config/aarch64/aarch64.cc gcc-16-20250810/gcc/config/aarch64/aarch64.cc
*** gcc-16-20250803/gcc/config/aarch64/aarch64.cc	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/config/aarch64/aarch64.cc	Sun Aug 10 22:32:07 2025
*************** aarch64_sve_emit_masked_fp_pred (machine
*** 3962,3977 ****
  
  /* Emit a comparison CMP between OP0 and OP1, both of which have mode
     DATA_MODE, and return the result in a predicate of mode PRED_MODE.
!    Use TARGET as the target register if nonnull and convenient.  */
  
  static rtx
  aarch64_sve_emit_int_cmp (rtx target, machine_mode pred_mode, rtx_code cmp,
  			  machine_mode data_mode, rtx op1, rtx op2)
  {
!   insn_code icode = code_for_aarch64_pred_cmp (cmp, data_mode);
    expand_operand ops[5];
    create_output_operand (&ops[0], target, pred_mode);
!   create_input_operand (&ops[1], CONSTM1_RTX (pred_mode), pred_mode);
    create_integer_operand (&ops[2], SVE_KNOWN_PTRUE);
    create_input_operand (&ops[3], op1, data_mode);
    create_input_operand (&ops[4], op2, data_mode);
--- 3962,3985 ----
  
  /* Emit a comparison CMP between OP0 and OP1, both of which have mode
     DATA_MODE, and return the result in a predicate of mode PRED_MODE.
!    Use TARGET as the target register if nonnull and convenient.
! 
!    PRED_MODE can be either VNx16BI or the natural predicate mode for
!    DATA_MODE.  */
  
  static rtx
  aarch64_sve_emit_int_cmp (rtx target, machine_mode pred_mode, rtx_code cmp,
  			  machine_mode data_mode, rtx op1, rtx op2)
  {
!   auto src_pred_mode = aarch64_sve_pred_mode (data_mode);
!   insn_code icode;
!   if (known_eq (GET_MODE_NUNITS (pred_mode), GET_MODE_NUNITS (data_mode)))
!     icode = code_for_aarch64_pred_cmp (cmp, data_mode);
!   else
!     icode = code_for_aarch64_pred_cmp_acle (cmp, data_mode);
    expand_operand ops[5];
    create_output_operand (&ops[0], target, pred_mode);
!   create_input_operand (&ops[1], CONSTM1_RTX (src_pred_mode), src_pred_mode);
    create_integer_operand (&ops[2], SVE_KNOWN_PTRUE);
    create_input_operand (&ops[3], op1, data_mode);
    create_input_operand (&ops[4], op2, data_mode);
*************** aarch64_sve_emit_int_cmp (rtx target, ma
*** 3979,3993 ****
    return ops[0].value;
  }
  
! /* Use a comparison to convert integer vector SRC into MODE, which is
!    the corresponding SVE predicate mode.  Use TARGET for the result
!    if it's nonnull and convenient.  */
  
  rtx
! aarch64_convert_sve_data_to_pred (rtx target, machine_mode mode, rtx src)
  {
    machine_mode src_mode = GET_MODE (src);
!   return aarch64_sve_emit_int_cmp (target, mode, NE, src_mode,
  				   src, CONST0_RTX (src_mode));
  }
  
--- 3987,4000 ----
    return ops[0].value;
  }
  
! /* Use a comparison to convert integer vector SRC into VNx16BI.
!    Use TARGET for the result if it's nonnull and convenient.  */
  
  rtx
! aarch64_convert_sve_data_to_pred (rtx target, rtx src)
  {
    machine_mode src_mode = GET_MODE (src);
!   return aarch64_sve_emit_int_cmp (target, VNx16BImode, NE, src_mode,
  				   src, CONST0_RTX (src_mode));
  }
  
*************** aarch64_sve_move_pred_via_while (rtx tar
*** 6069,6077 ****
  				 unsigned int vl)
  {
    rtx limit = force_reg (DImode, gen_int_mode (vl, DImode));
!   target = aarch64_target_reg (target, mode);
!   emit_insn (gen_while (UNSPEC_WHILELO, DImode, mode,
! 			target, const0_rtx, limit));
    return target;
  }
  
--- 6076,6084 ----
  				 unsigned int vl)
  {
    rtx limit = force_reg (DImode, gen_int_mode (vl, DImode));
!   target = aarch64_target_reg (target, VNx16BImode);
!   emit_insn (gen_aarch64_sve_while_acle (UNSPEC_WHILELO, DImode, mode,
! 					 target, const0_rtx, limit));
    return target;
  }
  
*************** aarch64_expand_sve_const_pred_trn (rtx t
*** 6217,6224 ****
       operands but permutes them as though they had mode MODE.  */
    machine_mode mode = aarch64_sve_pred_mode (permute_size).require ();
    target = aarch64_target_reg (target, GET_MODE (a));
!   rtx type_reg = CONST0_RTX (mode);
!   emit_insn (gen_aarch64_sve_trn1_conv (mode, target, a, b, type_reg));
    return target;
  }
  
--- 6224,6230 ----
       operands but permutes them as though they had mode MODE.  */
    machine_mode mode = aarch64_sve_pred_mode (permute_size).require ();
    target = aarch64_target_reg (target, GET_MODE (a));
!   emit_insn (gen_aarch64_sve_acle (UNSPEC_TRN1, mode, target, a, b));
    return target;
  }
  
*************** aarch64_expand_sve_const_pred (rtx targe
*** 6300,6307 ****
    for (unsigned int i = 0; i < builder.encoded_nelts (); ++i)
      int_builder.quick_push (INTVAL (builder.elt (i))
  			    ? constm1_rtx : const0_rtx);
!   return aarch64_convert_sve_data_to_pred (target, VNx16BImode,
! 					   int_builder.build ());
  }
  
  /* Set DEST to immediate IMM.  */
--- 6306,6312 ----
    for (unsigned int i = 0; i < builder.encoded_nelts (); ++i)
      int_builder.quick_push (INTVAL (builder.elt (i))
  			    ? constm1_rtx : const0_rtx);
!   return aarch64_convert_sve_data_to_pred (target, int_builder.build ());
  }
  
  /* Set DEST to immediate IMM.  */
*************** aarch64_split_sve_subreg_move (rtx dest,
*** 6753,6758 ****
--- 6758,6784 ----
  			       dest, ptrue, src));
  }
  
+ /* Set predicate register DEST such that every element has the scalar
+    boolean value in SRC, with any nonzero source counting as "true".
+    MODE is a MODE_VECTOR_BOOL that determines the element size;
+    DEST can have this mode or VNx16BImode.  In the latter case,
+    the upper bits of each element are defined to be zero, as for
+    the .H, .S, and .D forms of PTRUE.  */
+ 
+ void
+ aarch64_emit_sve_pred_vec_duplicate (machine_mode mode, rtx dest, rtx src)
+ {
+   rtx tmp = gen_reg_rtx (DImode);
+   emit_insn (gen_ashldi3 (tmp, gen_lowpart (DImode, src),
+ 			  gen_int_mode (63, DImode)));
+   if (GET_MODE (dest) == VNx16BImode)
+     emit_insn (gen_aarch64_sve_while_acle (UNSPEC_WHILELO, DImode, mode,
+ 					   dest, const0_rtx, tmp));
+   else
+     emit_insn (gen_while (UNSPEC_WHILELO, DImode, mode,
+ 			  dest, const0_rtx, tmp));
+ }
+ 
  static bool
  aarch64_function_ok_for_sibcall (tree, tree exp)
  {
*************** aarch64_asm_preferred_eh_data_format (in
*** 25409,25428 ****
     return (global ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | type;
  }
  
  /* Output .variant_pcs for aarch64_vector_pcs function symbols.  */
  
  static void
  aarch64_asm_output_variant_pcs (FILE *stream, const tree decl, const char* name)
  {
!   if (TREE_CODE (decl) == FUNCTION_DECL)
      {
!       arm_pcs pcs = (arm_pcs) fndecl_abi (decl).id ();
!       if (pcs == ARM_PCS_SIMD || pcs == ARM_PCS_SVE)
! 	{
! 	  fprintf (stream, "\t.variant_pcs\t");
! 	  assemble_name (stream, name);
! 	  fprintf (stream, "\n");
! 	}
      }
  }
  
--- 25435,25475 ----
     return (global ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | type;
  }
  
+ /* Return true if function declaration FNDECL needs to be marked as
+    having a variant PCS.  */
+ 
+ static bool
+ aarch64_is_variant_pcs (tree fndecl)
+ {
+   /* Check for ABIs that preserve more registers than usual.  */
+   arm_pcs pcs = (arm_pcs) fndecl_abi (fndecl).id ();
+   if (pcs == ARM_PCS_SIMD || pcs == ARM_PCS_SVE)
+     return true;
+ 
+   /* Check for ABIs that allow PSTATE.SM to be 1 on entry.  */
+   tree fntype = TREE_TYPE (fndecl);
+   if (aarch64_fntype_pstate_sm (fntype) != AARCH64_ISA_MODE_SM_OFF)
+     return true;
+ 
+   /* Check for ABIs that require PSTATE.ZA to be 1 on entry, either because
+      of ZA or ZT0.  */
+   if (aarch64_fntype_pstate_za (fntype) != 0)
+     return true;
+ 
+   return false;
+ }
+ 
  /* Output .variant_pcs for aarch64_vector_pcs function symbols.  */
  
  static void
  aarch64_asm_output_variant_pcs (FILE *stream, const tree decl, const char* name)
  {
!   if (TREE_CODE (decl) == FUNCTION_DECL
!       && aarch64_is_variant_pcs (decl))
      {
!       fprintf (stream, "\t.variant_pcs\t");
!       assemble_name (stream, name);
!       fprintf (stream, "\n");
      }
  }
  
diff -Nrcpad gcc-16-20250803/gcc/config/aarch64/aarch64.md gcc-16-20250810/gcc/config/aarch64/aarch64.md
*** gcc-16-20250803/gcc/config/aarch64/aarch64.md	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/config/aarch64/aarch64.md	Sun Aug 10 22:32:07 2025
***************
*** 280,285 ****
--- 280,286 ----
      UNSPEC_PACIBSP
      UNSPEC_PRLG_STK
      UNSPEC_REV
+     UNSPEC_REV_PRED
      UNSPEC_SADALP
      UNSPEC_SCVTF
      UNSPEC_SET_LANE
diff -Nrcpad gcc-16-20250803/gcc/config/aarch64/iterators.md gcc-16-20250810/gcc/config/aarch64/iterators.md
*** gcc-16-20250803/gcc/config/aarch64/iterators.md	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/config/aarch64/iterators.md	Sun Aug 10 22:32:07 2025
***************
*** 455,460 ****
--- 455,461 ----
  (define_mode_iterator VCVTFPM [V4HF V8HF V4SF])
  
  ;; Iterators for single modes, for "@" patterns.
+ (define_mode_iterator VNx16BI_ONLY [VNx16BI])
  (define_mode_iterator VNx16QI_ONLY [VNx16QI])
  (define_mode_iterator VNx16SI_ONLY [VNx16SI])
  (define_mode_iterator VNx8HI_ONLY [VNx8HI])
***************
*** 542,547 ****
--- 543,554 ----
  ;; elements.
  (define_mode_iterator SVE_FULL_HSF [VNx8HF VNx4SF])
  
+ ;; Like SVE_FULL_HSF, but selectively enables those modes that are valid
+ ;; for the variant of the SVE2 FP8 FDOT instruction associated with that
+ ;; mode.
+ (define_mode_iterator SVE_FULL_HSF_FP8_FDOT [(VNx4SF "TARGET_SSVE_FP8DOT4")
+ 					     (VNx8HF "TARGET_SSVE_FP8DOT2")])
+ 
  ;; Partial SVE floating-point vector modes that have 16-bit or 32-bit
  ;; elements.
  (define_mode_iterator SVE_PARTIAL_HSF [VNx2HF VNx4HF VNx2SF])
***************
*** 930,936 ****
      UNSPEC_UZP2Q	; Used in aarch64-sve.md.
      UNSPEC_ZIP1Q	; Used in aarch64-sve.md.
      UNSPEC_ZIP2Q	; Used in aarch64-sve.md.
-     UNSPEC_TRN1_CONV	; Used in aarch64-sve.md.
      UNSPEC_COND_CMPEQ_WIDE ; Used in aarch64-sve.md.
      UNSPEC_COND_CMPGE_WIDE ; Used in aarch64-sve.md.
      UNSPEC_COND_CMPGT_WIDE ; Used in aarch64-sve.md.
--- 937,942 ----
***************
*** 1185,1190 ****
--- 1191,1199 ----
      UNSPEC_LUTI2	; Used in aarch64-simd.md.
      UNSPEC_LUTI4	; Used in aarch64-simd.md.
  
+     ;; All used in aarch64-sve.md
+     UNSPEC_PERMUTE_PRED
+ 
      ;; All used in aarch64-sve2.md
      UNSPEC_ADDQV
      UNSPEC_ANDQV
***************
*** 3877,3882 ****
--- 3886,3893 ----
  
  (define_int_iterator SVE_PITER [UNSPEC_PFIRST UNSPEC_PNEXT])
  
+ (define_int_iterator PNEXT_ONLY [UNSPEC_PNEXT])
+ 
  (define_int_iterator MATMUL [UNSPEC_SMATMUL UNSPEC_UMATMUL
  			     UNSPEC_USMATMUL])
  
diff -Nrcpad gcc-16-20250803/gcc/config/aarch64/predicates.md gcc-16-20250810/gcc/config/aarch64/predicates.md
*** gcc-16-20250803/gcc/config/aarch64/predicates.md	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/config/aarch64/predicates.md	Sun Aug 10 22:32:07 2025
***************
*** 1078,1080 ****
--- 1078,1086 ----
  (define_predicate "aarch64_maskload_else_operand"
    (and (match_code "const_vector")
         (match_test "op == CONST0_RTX (GET_MODE (op))")))
+ 
+ ;; Check for a VNx16BI predicate that is a canonical PTRUE for the given
+ ;; predicate mode.
+ (define_special_predicate "aarch64_ptrue_all_operand"
+   (and (match_code "const_vector")
+        (match_test "aarch64_ptrue_all_mode (op) == mode")))
diff -Nrcpad gcc-16-20250803/gcc/config/arm/arm.cc gcc-16-20250810/gcc/config/arm/arm.cc
*** gcc-16-20250803/gcc/config/arm/arm.cc	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/config/arm/arm.cc	Sun Aug 10 22:32:07 2025
*************** cmse_nonsecure_call_inline_register_clea
*** 18983,18989 ****
  	      call = SET_SRC (call);
  
  	  /* Check if it is a cmse_nonsecure_call.  */
! 	  unspec = XEXP (call, 0);
  	  if (GET_CODE (unspec) != UNSPEC
  	      || XINT (unspec, 1) != UNSPEC_NONSECURE_MEM)
  	    continue;
--- 18983,18990 ----
  	      call = SET_SRC (call);
  
  	  /* Check if it is a cmse_nonsecure_call.  */
! 	  unspec = XVECEXP (pat, 0, 2);
! 
  	  if (GET_CODE (unspec) != UNSPEC
  	      || XINT (unspec, 1) != UNSPEC_NONSECURE_MEM)
  	    continue;
*************** cmse_nonsecure_call_inline_register_clea
*** 19010,19016 ****
  
  	  /* Make sure the register used to hold the function address is not
  	     cleared.  */
! 	  address = RTVEC_ELT (XVEC (unspec, 0), 0);
  	  gcc_assert (MEM_P (address));
  	  gcc_assert (REG_P (XEXP (address, 0)));
  	  address_regnum = REGNO (XEXP (address, 0));
--- 19011,19017 ----
  
  	  /* Make sure the register used to hold the function address is not
  	     cleared.  */
! 	  address = XEXP (call, 0);
  	  gcc_assert (MEM_P (address));
  	  gcc_assert (REG_P (XEXP (address, 0)));
  	  address_regnum = REGNO (XEXP (address, 0));
diff -Nrcpad gcc-16-20250803/gcc/config/arm/arm.md gcc-16-20250810/gcc/config/arm/arm.md
*** gcc-16-20250803/gcc/config/arm/arm.md	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/config/arm/arm.md	Sun Aug 10 22:32:07 2025
***************
*** 8623,8629 ****
      if (detect_cmse_nonsecure_call (addr))
        {
  	pat = gen_nonsecure_call_internal (operands[0], operands[1],
! 					   operands[2]);
  	emit_call_insn (pat);
        }
      else
--- 8623,8629 ----
      if (detect_cmse_nonsecure_call (addr))
        {
  	pat = gen_nonsecure_call_internal (operands[0], operands[1],
! 					   operands[2], const0_rtx);
  	emit_call_insn (pat);
        }
      else
***************
*** 8665,8674 ****
  	      (clobber (reg:SI LR_REGNUM))])])
  
  (define_expand "nonsecure_call_internal"
!   [(parallel [(call (unspec:SI [(match_operand 0 "memory_operand")]
! 			       UNSPEC_NONSECURE_MEM)
  		    (match_operand 1 "general_operand"))
  	      (use (match_operand 2 "" ""))
  	      (clobber (reg:SI LR_REGNUM))])]
    "use_cmse"
    {
--- 8665,8674 ----
  	      (clobber (reg:SI LR_REGNUM))])])
  
  (define_expand "nonsecure_call_internal"
!   [(parallel [(call (match_operand 0 "memory_operand")
  		    (match_operand 1 "general_operand"))
  	      (use (match_operand 2 "" ""))
+ 	      (unspec:SI [(match_operand 3)] UNSPEC_NONSECURE_MEM)
  	      (clobber (reg:SI LR_REGNUM))])]
    "use_cmse"
    {
***************
*** 8745,8751 ****
      if (detect_cmse_nonsecure_call (addr))
        {
  	pat = gen_nonsecure_call_value_internal (operands[0], operands[1],
! 						 operands[2], operands[3]);
  	emit_call_insn (pat);
        }
      else
--- 8745,8752 ----
      if (detect_cmse_nonsecure_call (addr))
        {
  	pat = gen_nonsecure_call_value_internal (operands[0], operands[1],
! 						 operands[2], operands[3],
! 						 const0_rtx);
  	emit_call_insn (pat);
        }
      else
***************
*** 8779,8788 ****
  
  (define_expand "nonsecure_call_value_internal"
    [(parallel [(set (match_operand       0 "" "")
! 		   (call (unspec:SI [(match_operand 1 "memory_operand")]
! 				    UNSPEC_NONSECURE_MEM)
  			 (match_operand 2 "general_operand")))
  	      (use (match_operand 3 "" ""))
  	      (clobber (reg:SI LR_REGNUM))])]
    "use_cmse"
    "
--- 8780,8789 ----
  
  (define_expand "nonsecure_call_value_internal"
    [(parallel [(set (match_operand       0 "" "")
! 		   (call (match_operand 1 "memory_operand")
  			 (match_operand 2 "general_operand")))
  	      (use (match_operand 3 "" ""))
+ 	      (unspec:SI [(match_operand 4)] UNSPEC_NONSECURE_MEM)
  	      (clobber (reg:SI LR_REGNUM))])]
    "use_cmse"
    "
diff -Nrcpad gcc-16-20250803/gcc/config/arm/thumb1.md gcc-16-20250810/gcc/config/arm/thumb1.md
*** gcc-16-20250803/gcc/config/arm/thumb1.md	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/config/arm/thumb1.md	Sun Aug 10 22:32:07 2025
***************
*** 1874,1883 ****
  )
  
  (define_insn "*nonsecure_call_reg_thumb1_v5"
!   [(call (unspec:SI [(mem:SI (reg:SI R4_REGNUM))]
! 		    UNSPEC_NONSECURE_MEM)
  	 (match_operand 0 "" ""))
     (use (match_operand 1 "" ""))
     (clobber (reg:SI LR_REGNUM))]
    "TARGET_THUMB1 && use_cmse && !SIBLING_CALL_P (insn)"
    "bl\\t__gnu_cmse_nonsecure_call"
--- 1874,1883 ----
  )
  
  (define_insn "*nonsecure_call_reg_thumb1_v5"
!   [(call (mem:SI (reg:SI R4_REGNUM))
  	 (match_operand 0 "" ""))
     (use (match_operand 1 "" ""))
+    (unspec:SI [(match_operand 2)]UNSPEC_NONSECURE_MEM)
     (clobber (reg:SI LR_REGNUM))]
    "TARGET_THUMB1 && use_cmse && !SIBLING_CALL_P (insn)"
    "bl\\t__gnu_cmse_nonsecure_call"
***************
*** 1919,1929 ****
  
  (define_insn "*nonsecure_call_value_reg_thumb1_v5"
    [(set (match_operand 0 "" "")
! 	(call (unspec:SI
! 	       [(mem:SI (reg:SI R4_REGNUM))]
! 	       UNSPEC_NONSECURE_MEM)
  	      (match_operand 1 "" "")))
     (use (match_operand 2 "" ""))
     (clobber (reg:SI LR_REGNUM))]
    "TARGET_THUMB1 && use_cmse"
    "bl\\t__gnu_cmse_nonsecure_call"
--- 1919,1928 ----
  
  (define_insn "*nonsecure_call_value_reg_thumb1_v5"
    [(set (match_operand 0 "" "")
! 	(call (mem:SI (reg:SI R4_REGNUM))
  	      (match_operand 1 "" "")))
     (use (match_operand 2 "" ""))
+    (unspec:SI [(match_operand 3)] UNSPEC_NONSECURE_MEM)
     (clobber (reg:SI LR_REGNUM))]
    "TARGET_THUMB1 && use_cmse"
    "bl\\t__gnu_cmse_nonsecure_call"
diff -Nrcpad gcc-16-20250803/gcc/config/arm/thumb2.md gcc-16-20250810/gcc/config/arm/thumb2.md
*** gcc-16-20250803/gcc/config/arm/thumb2.md	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/config/arm/thumb2.md	Sun Aug 10 22:32:07 2025
***************
*** 537,546 ****
  )
  
  (define_insn "*nonsecure_call_reg_thumb2_fpcxt"
!   [(call (unspec:SI [(mem:SI (match_operand:SI 0 "s_register_operand" "l*r"))]
! 		    UNSPEC_NONSECURE_MEM)
  	 (match_operand 1 "" ""))
     (use (match_operand 2 "" ""))
     (clobber (reg:SI LR_REGNUM))]
    "TARGET_THUMB2 && use_cmse && TARGET_HAVE_FPCXT_CMSE"
    "blxns\\t%0"
--- 537,546 ----
  )
  
  (define_insn "*nonsecure_call_reg_thumb2_fpcxt"
!   [(call (mem:SI (match_operand:SI 0 "s_register_operand" "l*r"))
  	 (match_operand 1 "" ""))
     (use (match_operand 2 "" ""))
+    (unspec:SI [(match_operand 3)] UNSPEC_NONSECURE_MEM)
     (clobber (reg:SI LR_REGNUM))]
    "TARGET_THUMB2 && use_cmse && TARGET_HAVE_FPCXT_CMSE"
    "blxns\\t%0"
***************
*** 549,558 ****
  )
  
  (define_insn "*nonsecure_call_reg_thumb2"
!   [(call (unspec:SI [(mem:SI (reg:SI R4_REGNUM))]
! 		    UNSPEC_NONSECURE_MEM)
  	 (match_operand 0 "" ""))
     (use (match_operand 1 "" ""))
     (clobber (reg:SI LR_REGNUM))]
    "TARGET_THUMB2 && use_cmse && !TARGET_HAVE_FPCXT_CMSE"
    "bl\\t__gnu_cmse_nonsecure_call"
--- 549,558 ----
  )
  
  (define_insn "*nonsecure_call_reg_thumb2"
!   [(call (mem:SI (reg:SI R4_REGNUM))
  	 (match_operand 0 "" ""))
     (use (match_operand 1 "" ""))
+    (unspec:SI [(match_operand 2)] UNSPEC_NONSECURE_MEM)
     (clobber (reg:SI LR_REGNUM))]
    "TARGET_THUMB2 && use_cmse && !TARGET_HAVE_FPCXT_CMSE"
    "bl\\t__gnu_cmse_nonsecure_call"
***************
*** 573,583 ****
  
  (define_insn "*nonsecure_call_value_reg_thumb2_fpcxt"
    [(set (match_operand 0 "" "")
! 	(call
! 	 (unspec:SI [(mem:SI (match_operand:SI 1 "register_operand" "l*r"))]
! 		    UNSPEC_NONSECURE_MEM)
! 	 (match_operand 2 "" "")))
     (use (match_operand 3 "" ""))
     (clobber (reg:SI LR_REGNUM))]
    "TARGET_THUMB2 && use_cmse && TARGET_HAVE_FPCXT_CMSE"
    "blxns\\t%1"
--- 573,582 ----
  
  (define_insn "*nonsecure_call_value_reg_thumb2_fpcxt"
    [(set (match_operand 0 "" "")
! 	(call (mem:SI (match_operand:SI 1 "register_operand" "l*r"))
! 	(match_operand 2 "" "")))
     (use (match_operand 3 "" ""))
+    (unspec:SI [(match_operand 4)] UNSPEC_NONSECURE_MEM)
     (clobber (reg:SI LR_REGNUM))]
    "TARGET_THUMB2 && use_cmse && TARGET_HAVE_FPCXT_CMSE"
    "blxns\\t%1"
***************
*** 587,596 ****
  
  (define_insn "*nonsecure_call_value_reg_thumb2"
    [(set (match_operand 0 "" "")
! 	(call
! 	 (unspec:SI [(mem:SI (reg:SI R4_REGNUM))] UNSPEC_NONSECURE_MEM)
! 	 (match_operand 1 "" "")))
     (use (match_operand 2 "" ""))
     (clobber (reg:SI LR_REGNUM))]
    "TARGET_THUMB2 && use_cmse && !TARGET_HAVE_FPCXT_CMSE"
    "bl\\t__gnu_cmse_nonsecure_call"
--- 586,595 ----
  
  (define_insn "*nonsecure_call_value_reg_thumb2"
    [(set (match_operand 0 "" "")
! 	(call (mem:SI (reg:SI R4_REGNUM))
! 	      (match_operand 1 "" "")))
     (use (match_operand 2 "" ""))
+    (unspec:SI [(match_operand 3)] UNSPEC_NONSECURE_MEM)
     (clobber (reg:SI LR_REGNUM))]
    "TARGET_THUMB2 && use_cmse && !TARGET_HAVE_FPCXT_CMSE"
    "bl\\t__gnu_cmse_nonsecure_call"
diff -Nrcpad gcc-16-20250803/gcc/config/avr/avr-log.cc gcc-16-20250810/gcc/config/avr/avr-log.cc
*** gcc-16-20250803/gcc/config/avr/avr-log.cc	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/config/avr/avr-log.cc	Sun Aug 10 22:32:07 2025
*************** avr_log_set_avr_log (void)
*** 373,379 ****
        SET_DUMP_DETAIL (insn_addresses);
        SET_DUMP_DETAIL (legitimate_address_p);
        SET_DUMP_DETAIL (legitimize_address);
-       SET_DUMP_DETAIL (legitimize_reload_address);
        SET_DUMP_DETAIL (progmem);
        SET_DUMP_DETAIL (rtx_costs);
  
--- 373,378 ----
diff -Nrcpad gcc-16-20250803/gcc/config/avr/avr-protos.h gcc-16-20250810/gcc/config/avr/avr-protos.h
*** gcc-16-20250803/gcc/config/avr/avr-protos.h	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/config/avr/avr-protos.h	Sun Aug 10 22:32:07 2025
*************** extern void out_shift_with_cnt (const ch
*** 146,152 ****
  extern enum reg_class avr_mode_code_base_reg_class (machine_mode, addr_space_t, rtx_code, rtx_code);
  extern bool avr_regno_mode_code_ok_for_base_p (int, machine_mode, addr_space_t, rtx_code, rtx_code);
  extern rtx avr_incoming_return_addr_rtx (void);
- extern rtx avr_legitimize_reload_address (rtx*, machine_mode, int, int, int, int, rtx (*)(rtx,int));
  extern bool avr_adiw_reg_p (rtx);
  extern bool avr_mem_flash_p (rtx);
  extern bool avr_mem_flashx_p (rtx);
--- 146,151 ----
*************** typedef struct
*** 241,247 ****
    unsigned insn_addresses :1;
    unsigned legitimate_address_p :1;
    unsigned legitimize_address :1;
-   unsigned legitimize_reload_address :1;
    unsigned progmem :1;
    unsigned rtx_costs :1;
  } avr_log_t;
--- 240,245 ----
diff -Nrcpad gcc-16-20250803/gcc/config/avr/avr.cc gcc-16-20250810/gcc/config/avr/avr.cc
*** gcc-16-20250803/gcc/config/avr/avr.cc	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/config/avr/avr.cc	Sun Aug 10 22:32:07 2025
*************** avr_ld_regno_p (int regno)
*** 453,465 ****
  }
  
  
- static bool
- ra_in_progress ()
- {
-   return avropt_lra_p ? lra_in_progress : reload_in_progress;
- }
- 
- 
  /* Set `avr_arch' as specified by `-mmcu='.
     Return true on success.  */
  
--- 453,458 ----
*************** avr_legitimate_address_p (machine_mode m
*** 2347,2354 ****
    if (avr_log.legitimate_address_p)
      {
        avr_edump ("\n%?: ret=%d, mode=%m strict=%d "
! 		 "reload_completed=%d ra_in_progress=%d %s:",
! 		 ok, mode, strict, reload_completed, ra_in_progress (),
  		 reg_renumber ? "(reg_renumber)" : "");
  
        if (GET_CODE (x) == PLUS
--- 2340,2347 ----
    if (avr_log.legitimate_address_p)
      {
        avr_edump ("\n%?: ret=%d, mode=%m strict=%d "
! 		 "reload_completed=%d lra_in_progress=%d %s:",
! 		 ok, mode, strict, reload_completed, lra_in_progress,
  		 reg_renumber ? "(reg_renumber)" : "");
  
        if (GET_CODE (x) == PLUS
*************** avr_legitimize_address (rtx x, rtx oldx,
*** 2418,2505 ****
  }
  
  
- /* Implement `LEGITIMIZE_RELOAD_ADDRESS'.  */
- /* This will allow register R26/27 to be used where it is no worse than normal
-    base pointers R28/29 or R30/31.  For example, if base offset is greater
-    than 63 bytes or for R++ or --R addressing.  */
- 
- rtx
- avr_legitimize_reload_address (rtx *px, machine_mode mode, int opnum,
- 			       int type, int addr_type, int /*ind_levels*/,
- 			       rtx (*mk_memloc)(rtx,int))
- {
-   rtx x = *px;
- 
-   if (avr_log.legitimize_reload_address)
-     avr_edump ("\n%?:%m %r\n", mode, x);
- 
-   if (1 && (GET_CODE (x) == POST_INC
- 	    || GET_CODE (x) == PRE_DEC))
-     {
-       push_reload (XEXP (x, 0), XEXP (x, 0), &XEXP (x, 0), &XEXP (x, 0),
- 		   POINTER_REGS, GET_MODE (x), GET_MODE (x), 0, 0,
- 		   opnum, RELOAD_OTHER);
- 
-       if (avr_log.legitimize_reload_address)
- 	avr_edump (" RCLASS.1 = %R\n IN = %r\n OUT = %r\n",
- 		   POINTER_REGS, XEXP (x, 0), XEXP (x, 0));
- 
-       return x;
-     }
- 
-   if (GET_CODE (x) == PLUS
-       && REG_P (XEXP (x, 0))
-       && reg_equiv_constant (REGNO (XEXP (x, 0))) == 0
-       && CONST_INT_P (XEXP (x, 1))
-       && INTVAL (XEXP (x, 1)) >= 1)
-     {
-       bool fit = INTVAL (XEXP (x, 1)) <= MAX_LD_OFFSET (mode);
- 
-       if (fit)
- 	{
- 	  if (reg_equiv_address (REGNO (XEXP (x, 0))) != 0)
- 	    {
- 	      int regno = REGNO (XEXP (x, 0));
- 	      rtx mem = mk_memloc (x, regno);
- 
- 	      push_reload (XEXP (mem, 0), NULL_RTX, &XEXP (mem, 0), NULL,
- 			   POINTER_REGS, Pmode, VOIDmode, 0, 0,
- 			   1, (enum reload_type) addr_type);
- 
- 	      if (avr_log.legitimize_reload_address)
- 		avr_edump (" RCLASS.2 = %R\n IN = %r\n OUT = %r\n",
- 			   POINTER_REGS, XEXP (mem, 0), NULL_RTX);
- 
- 	      push_reload (mem, NULL_RTX, &XEXP (x, 0), NULL,
- 			   BASE_POINTER_REGS, GET_MODE (x), VOIDmode, 0, 0,
- 			   opnum, (enum reload_type) type);
- 
- 	      if (avr_log.legitimize_reload_address)
- 		avr_edump (" RCLASS.2 = %R\n IN = %r\n OUT = %r\n",
- 			   BASE_POINTER_REGS, mem, NULL_RTX);
- 
- 	      return x;
- 	    }
- 	}
-       else if (! (frame_pointer_needed
- 		  && XEXP (x, 0) == frame_pointer_rtx))
- 	{
- 	  push_reload (x, NULL_RTX, px, NULL,
- 		       POINTER_REGS, GET_MODE (x), VOIDmode, 0, 0,
- 		       opnum, (enum reload_type) type);
- 
- 	  if (avr_log.legitimize_reload_address)
- 	    avr_edump (" RCLASS.3 = %R\n IN = %r\n OUT = %r\n",
- 		       POINTER_REGS, x, NULL_RTX);
- 
- 	  return x;
- 	}
-     }
- 
-   return NULL_RTX;
- }
- 
- 
  /* Helper function to print assembler resp. track instruction
     sequence lengths.  Always return "".
  
--- 2411,2416 ----
*************** avr_rtx_costs_1 (rtx x, machine_mode mod
*** 12847,12852 ****
--- 12758,12773 ----
        return true;
  
      case SIGN_EXTEND:
+       if (GET_CODE (XEXP (x, 0)) == ASHIFT
+ 	  && CONST_INT_P (XEXP (XEXP (x, 0), 1)))
+ 	{
+ 	  // "*sext.ashift<QIPSI:mode><HISI:mode>2_split"
+ 	  int m0 = GET_MODE_SIZE (GET_MODE (XEXP (x, 0)));
+ 	  int m1 = GET_MODE_SIZE (mode);
+ 	  *total = COSTS_N_INSNS (m0 * INTVAL (XEXP (XEXP (x, 0), 1))
+ 				  + m1 - m0);
+ 	  return true;
+ 	}
        *total = COSTS_N_INSNS (n_bytes + 2
  			      - GET_MODE_SIZE (GET_MODE (XEXP (x, 0))));
        *total += avr_operand_rtx_cost (XEXP (x, 0), GET_MODE (XEXP (x, 0)),
*************** extra_constraint_Q (rtx x)
*** 13959,13966 ****
  	    || xx == arg_pointer_rtx);
  
        if (avr_log.constraints)
! 	avr_edump ("\n%?=%d reload_completed=%d ra_in_progress=%d\n %r\n",
! 		   ok, reload_completed, ra_in_progress (), x);
      }
  
    return ok;
--- 13880,13887 ----
  	    || xx == arg_pointer_rtx);
  
        if (avr_log.constraints)
! 	avr_edump ("\n%?=%d reload_completed=%d lra_in_progress=%d\n %r\n",
! 		   ok, reload_completed, lra_in_progress, x);
      }
  
    return ok;
*************** avr_hard_regno_mode_ok (unsigned int reg
*** 14165,14181 ****
    if (GET_MODE_SIZE (mode) == 1)
      return true;
  
-   /* FIXME: Ideally, the following test is not needed.
- 	However, it turned out that it can reduce the number
- 	of spill fails.  AVR and it's poor endowment with
- 	address registers is extreme stress test for reload.  */
- 
-   if (GET_MODE_SIZE (mode) >= 4
-       && regno + GET_MODE_SIZE (mode) >= REG_30
-       // This problem only concerned the old reload.
-       && ! avropt_lra_p)
-     return false;
- 
    /* All modes larger than 8 bits should start in an even register.  */
  
    return !(regno & 1);
--- 14086,14091 ----
*************** avr_addr_space_legitimate_address_p (mac
*** 14937,14944 ****
    if (avr_log.legitimate_address_p)
      {
        avr_edump ("\n%?: ret=%b, mode=%m strict=%d "
! 		 "reload_completed=%d ra_in_progress=%d %s:",
! 		 ok, mode, strict, reload_completed, ra_in_progress (),
  		 reg_renumber ? "(reg_renumber)" : "");
  
        if (GET_CODE (x) == PLUS
--- 14847,14854 ----
    if (avr_log.legitimate_address_p)
      {
        avr_edump ("\n%?: ret=%b, mode=%m strict=%d "
! 		 "reload_completed=%d lra_in_progress=%d %s:",
! 		 ok, mode, strict, reload_completed, lra_in_progress,
  		 reg_renumber ? "(reg_renumber)" : "");
  
        if (GET_CODE (x) == PLUS
*************** avr_unwind_word_mode ()
*** 16716,16730 ****
    return Pmode;
  }
  
- 
- /* Implement `TARGET_LRA_P'.  */
- 
- static bool
- avr_use_lra_p ()
- {
-   return avropt_lra_p;
- }
- 
  
  
  /* Initialize the GCC target structure.  */
--- 16626,16631 ----
*************** avr_use_lra_p ()
*** 16866,16874 ****
  #undef  TARGET_CONVERT_TO_TYPE
  #define TARGET_CONVERT_TO_TYPE avr_convert_to_type
  
- #undef TARGET_LRA_P
- #define TARGET_LRA_P avr_use_lra_p
- 
  #undef  TARGET_ADDR_SPACE_SUBSET_P
  #define TARGET_ADDR_SPACE_SUBSET_P avr_addr_space_subset_p
  
--- 16767,16772 ----
diff -Nrcpad gcc-16-20250803/gcc/config/avr/avr.h gcc-16-20250810/gcc/config/avr/avr.h
*** gcc-16-20250803/gcc/config/avr/avr.h	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/config/avr/avr.h	Sun Aug 10 22:32:07 2025
*************** enum reg_class {
*** 309,320 ****
  
  #define STATIC_CHAIN_REGNUM ((AVR_TINY) ? 18 :2)
  
- #define RELOAD_ELIMINABLE_REGS {				\
-     { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM },               \
-     { ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM },               \
-     { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM },             \
-     { FRAME_POINTER_REGNUM + 1, STACK_POINTER_REGNUM + 1 } }
- 
  #define ELIMINABLE_REGS						\
    {								\
      { ARG_POINTER_REGNUM, STACK_POINTER_REGNUM },		\
--- 309,314 ----
*************** typedef struct avr_args
*** 358,375 ****
  
  #define MAX_REGS_PER_ADDRESS 1
  
- #define LEGITIMIZE_RELOAD_ADDRESS(X,MODE,OPNUM,TYPE,IND_L,WIN)          \
-   do {                                                                  \
-     rtx new_x = avr_legitimize_reload_address (&(X), MODE, OPNUM, TYPE, \
-                                                ADDR_TYPE (TYPE),        \
-                                                IND_L, make_memloc);     \
-     if (new_x)                                                          \
-       {                                                                 \
-         X = new_x;                                                      \
-         goto WIN;                                                       \
-       }                                                                 \
-   } while (0)
- 
  /* We increase branch costs after reload in order to keep basic-block
     reordering from introducing out-of-line jumps and to prefer fall-through
     edges instead.  The default branch costs are 0, mainly because otherwise
--- 352,357 ----
diff -Nrcpad gcc-16-20250803/gcc/config/avr/avr.md gcc-16-20250810/gcc/config/avr/avr.md
*** gcc-16-20250803/gcc/config/avr/avr.md	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/config/avr/avr.md	Sun Aug 10 22:32:07 2025
***************
*** 2943,2949 ****
    [(set (match_operand:HI 0 "register_operand"                           "=r,*r")
          (ashift:HI (sign_extend:HI (match_operand:QI 1 "register_operand" "0,r"))
                     (const_int 1)))
!    (clobber (reg:CC REG_CC)) ]
    "reload_completed"
    "@
  	lsl %A0\;sbc %B0,%B0
--- 2943,2949 ----
    [(set (match_operand:HI 0 "register_operand"                           "=r,*r")
          (ashift:HI (sign_extend:HI (match_operand:QI 1 "register_operand" "0,r"))
                     (const_int 1)))
!    (clobber (reg:CC REG_CC))]
    "reload_completed"
    "@
  	lsl %A0\;sbc %B0,%B0
***************
*** 3004,3009 ****
--- 3004,3044 ----
      operands[2] = gen_int_mode (1 << INTVAL (operands[2]), QImode);
    })
  
+ (define_insn_and_split "*sext.ashift<QIPSI:mode><HISI:mode>2_split"
+   [(set (match_operand:HISI 0 "register_operand"                                 "=r")
+         (sign_extend:HISI (ashift:QIPSI (match_operand:QIPSI 1 "register_operand" "0")
+                                         (match_operand:QI 2 "const_int_operand" "PKC03"))))]
+   "<HISI:SIZE> > <QIPSI:SIZE>
+    && IN_RANGE (INTVAL (operands[2]), 1, 2 + (<QIPSI:SIZE> <= 2))"
+   "#"
+   "&& reload_completed"
+   [(scratch)]
+   { DONE_ADD_CCC })
+ 
+ (define_insn "*sext.ashift<QIPSI:mode><HISI:mode>2"
+   [(set (match_operand:HISI 0 "register_operand"                                 "=r")
+         (sign_extend:HISI (ashift:QIPSI (match_operand:QIPSI 1 "register_operand" "0")
+                                         (match_operand:QI 2 "const_int_operand" "PKC03"))))
+    (clobber (reg:CC REG_CC))]
+   "reload_completed
+    && <HISI:SIZE> > <QIPSI:SIZE>
+    && IN_RANGE (INTVAL (operands[2]), 1, 2 + (<QIPSI:SIZE> <= 2))"
+   {
+     const int regno = REGNO (operands[0]);
+     // The shift.
+     for (int s = 0; s < (int) INTVAL (operands[2]); ++s)
+       for (int b = 0; b < <QIPSI:SIZE>; ++b)
+         output_asm_insn (b == 0 ? "lsl %0" : "rol %0",
+                          &all_regs_rtx[regno + b]);
+     // Sign-extend can use carry.
+     for (int b = <QIPSI:SIZE>; b < <HISI:SIZE>; ++b)
+       output_asm_insn ("sbc %0,%0", &all_regs_rtx[regno + b]);
+     return "";
+   }
+   [(set (attr "length")
+         (plus (symbol_ref "<QIPSI:SIZE> * INTVAL (operands[2])")
+               (symbol_ref "<HISI:SIZE> - <QIPSI:SIZE>")))])
+ 
  ;******************************************************************************
  ; mul HI: $1 = sign-/zero-/one-extend, $2 = reg
  ;******************************************************************************
***************
*** 5009,5049 ****
  ;;<< << << << << << << << << << << << << << << << << << << << << << << << << <<
  ;; arithmetic shift left
  
- ;; Work around PR120423: Transform left shift of a paradoxical subreg
- ;; into left shift of the zero-extended entity.
- (define_split ; PR120423
-   [(set (match_operand:HISI 0 "register_operand")
-         (ashift:HISI (subreg:HISI (match_operand:QIPSI 1 "nonimmediate_operand")
-                                   0)
-                      (match_operand:QI 2 "const_int_operand")))]
-   "!reload_completed
-    && !avropt_lra_p
-    && <HISI:SIZE> > <QIPSI:SIZE>"
-   [(set (match_dup 4)
-         (zero_extend:HISI (match_dup 5)))
-    (set (match_dup 0)
-         (ashift:HISI (match_dup 4)
-                      (match_dup 2)))]
-   {
-     operands[4] = gen_reg_rtx (<HISI:MODE>mode);
-     operands[5] = force_reg (<QIPSI:MODE>mode, operands[1]);
-   })
- 
- ;; Similar happens for PR116389.
- (define_split ; PR116389
-   [(set (match_operand:HISI 0 "register_operand")
-         (subreg:HISI (match_operand:QIPSI 1 "nonimmediate_operand")
-                      0))]
-   "!reload_completed
-    && !avropt_lra_p
-    && <HISI:SIZE> > <QIPSI:SIZE>"
-   [(set (match_dup 0)
-         (zero_extend:HISI (match_dup 2)))]
-   {
-     operands[2] = force_reg (<QIPSI:MODE>mode, operands[1]);
-   })
- 
- 
  ;; "ashlqi3"
  ;; "ashlqq3"  "ashluqq3"
  (define_expand "ashl<mode>3"
--- 5044,5049 ----
diff -Nrcpad gcc-16-20250803/gcc/config/avr/avr.opt gcc-16-20250810/gcc/config/avr/avr.opt
*** gcc-16-20250803/gcc/config/avr/avr.opt	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/config/avr/avr.opt	Sun Aug 10 22:32:07 2025
***************
*** 18,27 ****
  ; along with GCC; see the file COPYING3.  If not see
  ; <http://www.gnu.org/licenses/>.
  
- mlra
- Target Var(avropt_lra_p) UInteger Init(1) Optimization Undocumented
- Usa LRA for reload instead of the old reload framework.  This option is experimental, on per default, and it may be removed in future versions of the compiler.
- 
  mcall-prologues
  Target Mask(CALL_PROLOGUES) Optimization
  Optimization. Use subroutines for function prologues and epilogues.
--- 18,23 ----
diff -Nrcpad gcc-16-20250803/gcc/config/avr/avr.opt.urls gcc-16-20250810/gcc/config/avr/avr.opt.urls
*** gcc-16-20250803/gcc/config/avr/avr.opt.urls	Sun Aug  3 22:32:18 2025
--- gcc-16-20250810/gcc/config/avr/avr.opt.urls	Sun Aug 10 22:32:07 2025
***************
*** 1,7 ****
  ; Autogenerated by regenerate-opt-urls.py from gcc/config/avr/avr.opt and generated HTML
  
- ; skipping UrlSuffix for 'mlra' due to finding no URLs
- 
  mcall-prologues
  UrlSuffix(gcc/AVR-Options.html#index-mcall-prologues)
  
--- 1,5 ----
diff -Nrcpad gcc-16-20250803/gcc/config/darwin.cc gcc-16-20250810/gcc/config/darwin.cc
*** gcc-16-20250803/gcc/config/darwin.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/config/darwin.cc	Sun Aug 10 22:32:07 2025
*************** darwin_encode_section_info (tree decl, r
*** 1298,1303 ****
--- 1298,1326 ----
       SYMBOL_FLAG_EXTERNAL.  */
    default_encode_section_info (decl, rtl, first);
  
+   if (CONSTANT_CLASS_P (decl))
+     {
+       bool is_str = TREE_CODE (decl) == STRING_CST;
+       rtx sym_ref = XEXP (rtl, 0);
+ 
+       /* If this is a string cst or not anchored we have nothing to do.  */
+       if (is_str || !SYMBOL_REF_HAS_BLOCK_INFO_P (sym_ref))
+ 	return;
+ 
+       tree sym_decl = SYMBOL_REF_DECL (sym_ref);
+       const char *name = XSTR (sym_ref, 0);
+       gcc_checking_assert (strncmp ("*lC", name, 3) == 0);
+ 
+       char *buf;
+       /* Lets identify anchored constants with a different prefix, for the
+ 	  sake of inspection only.  */
+       buf = xasprintf ("*LaC%s", &name[3]);
+       if (sym_decl)
+ 	DECL_NAME (sym_decl) = get_identifier (buf);
+       XSTR (sym_ref, 0) = ggc_strdup (buf);
+       free (buf);
+     }
+ 
    if (! VAR_OR_FUNCTION_DECL_P (decl))
      return;
  
*************** darwin_use_anchors_for_symbol_p (const_r
*** 3297,3307 ****
  {
    if (DARWIN_SECTION_ANCHORS && flag_section_anchors)
      {
!       section *sect;
!       /* If the section contains a zero-sized object it's ineligible.  */
!       sect = SYMBOL_REF_BLOCK (symbol)->sect;
!       /* This should have the effect of disabling anchors for vars that follow
!          any zero-sized one, in a given section.  */
        if (sect->common.flags & SECTION_NO_ANCHOR)
  	return false;
  
--- 3320,3335 ----
  {
    if (DARWIN_SECTION_ANCHORS && flag_section_anchors)
      {
!       tree decl = SYMBOL_REF_DECL (symbol);
!       /* If the symbol would be linker-visible, then it can split at that
! 	 so we must disallow.  This is more strict than the default impl.
! 	 TODO: add other cases.  */
!       if (decl && DECL_P (decl)
! 	  && (TREE_PUBLIC (decl) || !DECL_ARTIFICIAL (decl)))
! 	return false;
! 
!       /* We mark sections containing unsuitable entries.  */
!       section *sect = SYMBOL_REF_BLOCK (symbol)->sect;
        if (sect->common.flags & SECTION_NO_ANCHOR)
  	return false;
  
diff -Nrcpad gcc-16-20250803/gcc/config/darwin.h gcc-16-20250810/gcc/config/darwin.h
*** gcc-16-20250803/gcc/config/darwin.h	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/config/darwin.h	Sun Aug 10 22:32:07 2025
*************** extern GTY(()) section * darwin_sections
*** 1005,1010 ****
--- 1005,1012 ----
        sprintf (LABEL, "*%s%ld", "lASAN", (long)(NUM));\
      else if (strcmp ("LTRAMP", PREFIX) == 0)	\
        sprintf (LABEL, "*%s%ld", "lTRAMP", (long)(NUM));\
+     else if (strncmp ("LANCHOR", PREFIX, 7) == 0)	\
+       sprintf (LABEL, "*%s%ld", "lANCHOR", (long)(NUM));\
      else						\
        sprintf (LABEL, "*%s%ld", PREFIX, (long)(NUM));	\
    } while (0)
diff -Nrcpad gcc-16-20250803/gcc/config/i386/i386-expand.cc gcc-16-20250810/gcc/config/i386/i386-expand.cc
*** gcc-16-20250803/gcc/config/i386/i386-expand.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/config/i386/i386-expand.cc	Sun Aug 10 22:32:07 2025
*************** ix86_expand_set_or_cpymem (rtx dst, rtx
*** 9574,9581 ****
      case vector_loop:
        need_zero_guard = true;
        unroll_factor = 4;
!       /* Get the vector mode to move MOVE_MAX bytes.  */
!       nunits = MOVE_MAX / GET_MODE_SIZE (word_mode);
        if (nunits > 1)
  	{
  	  move_mode = mode_for_vector (word_mode, nunits).require ();
--- 9574,9582 ----
      case vector_loop:
        need_zero_guard = true;
        unroll_factor = 4;
!       /* Get the vector mode to move STORE_MAX_PIECES/MOVE_MAX bytes.  */
!       nunits = issetmem ? STORE_MAX_PIECES : MOVE_MAX;
!       nunits /= GET_MODE_SIZE (word_mode);
        if (nunits > 1)
  	{
  	  move_mode = mode_for_vector (word_mode, nunits).require ();
diff -Nrcpad gcc-16-20250803/gcc/config/i386/i386-features.cc gcc-16-20250810/gcc/config/i386/i386-features.cc
*** gcc-16-20250803/gcc/config/i386/i386-features.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/config/i386/i386-features.cc	Sun Aug 10 22:32:07 2025
*************** ix86_rpad_gate ()
*** 3085,3105 ****
  	  && optimize_function_for_speed_p (cfun));
  }
  
  /* Generate a vector set, DEST = SRC, at entry of the nearest dominator
     for basic block map BBS, which is in the fake loop that contains the
     whole function, so that there is only a single vector set in the
!    whole function.  If not nullptr, INNER_SCALAR is the inner scalar of
!    SRC, as (reg:SI 99) in (vec_duplicate:V4SI (reg:SI 99)).  */
  
  static void
  ix86_place_single_vector_set (rtx dest, rtx src, bitmap bbs,
! 			      rtx inner_scalar = nullptr)
  {
    basic_block bb = nearest_common_dominator_for_set (CDI_DOMINATORS, bbs);
!   while (bb->loop_father->latch
! 	 != EXIT_BLOCK_PTR_FOR_FN (cfun))
!     bb = get_immediate_dominator (CDI_DOMINATORS,
! 				  bb->loop_father->header);
  
    rtx set = gen_rtx_SET (dest, src);
  
--- 3085,3147 ----
  	  && optimize_function_for_speed_p (cfun));
  }
  
+ enum x86_cse_kind
+ {
+   X86_CSE_CONST0_VECTOR,
+   X86_CSE_CONSTM1_VECTOR,
+   X86_CSE_VEC_DUP
+ };
+ 
+ struct redundant_load
+ {
+   /* Bitmap of basic blocks with broadcast instructions.  */
+   auto_bitmap bbs;
+   /* Bitmap of broadcast instructions.  */
+   auto_bitmap insns;
+   /* The broadcast inner scalar.  */
+   rtx val;
+   /* The inner scalar mode.  */
+   machine_mode mode;
+   /* The instruction which sets the inner scalar.  Nullptr if the inner
+      scalar is applied to the whole function, instead of within the same
+      block.  */
+   rtx_insn *def_insn;
+   /* The widest broadcast source.  */
+   rtx broadcast_source;
+   /* The widest broadcast register.  */
+   rtx broadcast_reg;
+   /* The basic block of the broadcast instruction.  */
+   basic_block bb;
+   /* The number of broadcast instructions with the same inner scalar.  */
+   unsigned HOST_WIDE_INT count;
+   /* The threshold of broadcast instructions with the same inner
+      scalar.  */
+   unsigned int threshold;
+   /* The widest broadcast size in bytes.  */
+   unsigned int size;
+   /* Load kind.  */
+   x86_cse_kind kind;
+ };
+ 
  /* Generate a vector set, DEST = SRC, at entry of the nearest dominator
     for basic block map BBS, which is in the fake loop that contains the
     whole function, so that there is only a single vector set in the
!    whole function.  If not nullptr, LOAD is a pointer to the load.  */
  
  static void
  ix86_place_single_vector_set (rtx dest, rtx src, bitmap bbs,
! 			      redundant_load *load = nullptr)
  {
    basic_block bb = nearest_common_dominator_for_set (CDI_DOMINATORS, bbs);
!   /* For X86_CSE_VEC_DUP, don't place the vector set outside of the loop
!      to avoid extra spills.  */
!   if (!load || load->kind != X86_CSE_VEC_DUP)
!     {
!       while (bb->loop_father->latch
! 	     != EXIT_BLOCK_PTR_FOR_FN (cfun))
! 	bb = get_immediate_dominator (CDI_DOMINATORS,
! 				      bb->loop_father->header);
!     }
  
    rtx set = gen_rtx_SET (dest, src);
  
*************** ix86_place_single_vector_set (rtx dest,
*** 3141,3148 ****
  	}
      }
  
!   if (inner_scalar)
      {
        /* Set the source in (vec_duplicate:V4SI (reg:SI 99)).  */
        rtx reg = XEXP (src, 0);
        if ((REG_P (inner_scalar) || MEM_P (inner_scalar))
--- 3183,3196 ----
  	}
      }
  
!   if (load && load->kind == X86_CSE_VEC_DUP)
      {
+       /* Get the source from LOAD as (reg:SI 99) in
+ 
+ 	 (vec_duplicate:V4SI (reg:SI 99))
+ 
+        */
+       rtx inner_scalar = load->val;
        /* Set the source in (vec_duplicate:V4SI (reg:SI 99)).  */
        rtx reg = XEXP (src, 0);
        if ((REG_P (inner_scalar) || MEM_P (inner_scalar))
*************** replace_vector_const (machine_mode vecto
*** 3489,3532 ****
      }
  }
  
- enum x86_cse_kind
- {
-   X86_CSE_CONST0_VECTOR,
-   X86_CSE_CONSTM1_VECTOR,
-   X86_CSE_VEC_DUP
- };
- 
- struct redundant_load
- {
-   /* Bitmap of basic blocks with broadcast instructions.  */
-   auto_bitmap bbs;
-   /* Bitmap of broadcast instructions.  */
-   auto_bitmap insns;
-   /* The broadcast inner scalar.  */
-   rtx val;
-   /* The inner scalar mode.  */
-   machine_mode mode;
-   /* The instruction which sets the inner scalar.  Nullptr if the inner
-      scalar is applied to the whole function, instead of within the same
-      block.  */
-   rtx_insn *def_insn;
-   /* The widest broadcast source.  */
-   rtx broadcast_source;
-   /* The widest broadcast register.  */
-   rtx broadcast_reg;
-   /* The basic block of the broadcast instruction.  */
-   basic_block bb;
-   /* The number of broadcast instructions with the same inner scalar.  */
-   unsigned HOST_WIDE_INT count;
-   /* The threshold of broadcast instructions with the same inner
-      scalar.  */
-   unsigned int threshold;
-   /* The widest broadcast size in bytes.  */
-   unsigned int size;
-   /* Load kind.  */
-   x86_cse_kind kind;
- };
- 
  /* Return the inner scalar if OP is a broadcast, else return nullptr.  */
  
  static rtx
--- 3537,3542 ----
*************** remove_redundant_vector_load (void)
*** 3872,3881 ****
  	    else
  	      ix86_place_single_vector_set (load->broadcast_reg,
  					    load->broadcast_source,
! 					    load->bbs,
! 					    (load->kind == X86_CSE_VEC_DUP
! 					     ? load->val
! 					     : nullptr));
  	  }
  
        loop_optimizer_finalize ();
--- 3882,3888 ----
  	    else
  	      ix86_place_single_vector_set (load->broadcast_reg,
  					    load->broadcast_source,
! 					    load->bbs, load);
  	  }
  
        loop_optimizer_finalize ();
diff -Nrcpad gcc-16-20250803/gcc/config/i386/i386.h gcc-16-20250810/gcc/config/i386/i386.h
*** gcc-16-20250803/gcc/config/i386/i386.h	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/config/i386/i386.h	Sun Aug 10 22:32:07 2025
*************** constexpr wide_int_bitmask PTA_DIAMONDRA
*** 2477,2485 ****
    | PTA_MOVRS | PTA_AMX_MOVRS | PTA_USER_MSR;
  
  constexpr wide_int_bitmask PTA_BDVER1 = PTA_64BIT | PTA_MMX | PTA_SSE
!   | PTA_SSE2 | PTA_SSE3 | PTA_SSE4A | PTA_CX16 | PTA_ABM | PTA_SSSE3
!   | PTA_SSE4_1 | PTA_SSE4_2 | PTA_AES | PTA_PCLMUL | PTA_AVX | PTA_FMA4
!   | PTA_XOP | PTA_LWP | PTA_PRFCHW | PTA_FXSR | PTA_XSAVE;
  constexpr wide_int_bitmask PTA_BDVER2 = PTA_BDVER1 | PTA_BMI | PTA_TBM
    | PTA_F16C | PTA_FMA;
  constexpr wide_int_bitmask PTA_BDVER3 = PTA_BDVER2 | PTA_XSAVEOPT
--- 2477,2485 ----
    | PTA_MOVRS | PTA_AMX_MOVRS | PTA_USER_MSR;
  
  constexpr wide_int_bitmask PTA_BDVER1 = PTA_64BIT | PTA_MMX | PTA_SSE
!   | PTA_SSE2 | PTA_SSE3 | PTA_SSE4A | PTA_CX16 | PTA_POPCNT | PTA_LZCNT
!   | PTA_ABM | PTA_SSSE3 | PTA_SSE4_1 | PTA_SSE4_2 | PTA_AES | PTA_PCLMUL
!   | PTA_AVX | PTA_FMA4 | PTA_XOP | PTA_LWP | PTA_PRFCHW | PTA_FXSR | PTA_XSAVE;
  constexpr wide_int_bitmask PTA_BDVER2 = PTA_BDVER1 | PTA_BMI | PTA_TBM
    | PTA_F16C | PTA_FMA;
  constexpr wide_int_bitmask PTA_BDVER3 = PTA_BDVER2 | PTA_XSAVEOPT
*************** constexpr wide_int_bitmask PTA_BDVER3 =
*** 2487,2499 ****
  constexpr wide_int_bitmask PTA_BDVER4 = PTA_BDVER3 | PTA_AVX2 | PTA_BMI2
    | PTA_RDRND | PTA_MOVBE | PTA_MWAITX;
  
! constexpr wide_int_bitmask PTA_ZNVER1 = PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2
!   | PTA_SSE3 | PTA_SSE4A | PTA_CX16 | PTA_ABM | PTA_SSSE3 | PTA_SSE4_1
!   | PTA_SSE4_2 | PTA_AES | PTA_PCLMUL | PTA_AVX | PTA_AVX2 | PTA_BMI | PTA_BMI2
!   | PTA_F16C | PTA_FMA | PTA_PRFCHW | PTA_FXSR | PTA_XSAVE | PTA_XSAVEOPT
!   | PTA_FSGSBASE | PTA_RDRND | PTA_MOVBE | PTA_MWAITX | PTA_ADX | PTA_RDSEED
!   | PTA_CLZERO | PTA_CLFLUSHOPT | PTA_XSAVEC | PTA_XSAVES | PTA_SHA | PTA_LZCNT
!   | PTA_POPCNT;
  constexpr wide_int_bitmask PTA_ZNVER2 = PTA_ZNVER1 | PTA_CLWB | PTA_RDPID
    | PTA_WBNOINVD;
  constexpr wide_int_bitmask PTA_ZNVER3 = PTA_ZNVER2 | PTA_VAES | PTA_VPCLMULQDQ
--- 2487,2499 ----
  constexpr wide_int_bitmask PTA_BDVER4 = PTA_BDVER3 | PTA_AVX2 | PTA_BMI2
    | PTA_RDRND | PTA_MOVBE | PTA_MWAITX;
  
! constexpr wide_int_bitmask PTA_ZNVER1 = PTA_64BIT | PTA_MMX | PTA_SSE
!   | PTA_SSE2 | PTA_SSE3 | PTA_SSE4A | PTA_CX16 |  PTA_POPCNT | PTA_LZCNT
!   | PTA_ABM | PTA_SSSE3 | PTA_SSE4_1 | PTA_SSE4_2 | PTA_AES | PTA_PCLMUL
!   | PTA_AVX | PTA_AVX2 | PTA_BMI | PTA_BMI2 | PTA_F16C | PTA_FMA | PTA_PRFCHW
!   | PTA_FXSR | PTA_XSAVE | PTA_XSAVEOPT | PTA_FSGSBASE | PTA_RDRND | PTA_MOVBE
!   | PTA_MWAITX | PTA_ADX | PTA_RDSEED | PTA_CLZERO | PTA_CLFLUSHOPT
!   | PTA_XSAVEC | PTA_XSAVES | PTA_SHA;
  constexpr wide_int_bitmask PTA_ZNVER2 = PTA_ZNVER1 | PTA_CLWB | PTA_RDPID
    | PTA_WBNOINVD;
  constexpr wide_int_bitmask PTA_ZNVER3 = PTA_ZNVER2 | PTA_VAES | PTA_VPCLMULQDQ
*************** constexpr wide_int_bitmask PTA_ZNVER5 =
*** 2506,2524 ****
    | PTA_MOVDIRI | PTA_MOVDIR64B | PTA_AVX512VP2INTERSECT | PTA_PREFETCHI;
  
  constexpr wide_int_bitmask PTA_BTVER1 = PTA_64BIT | PTA_MMX | PTA_SSE
!   | PTA_SSE2 | PTA_SSE3 | PTA_SSSE3 | PTA_SSE4A | PTA_ABM | PTA_CX16
!   | PTA_PRFCHW | PTA_FXSR | PTA_XSAVE;
  constexpr wide_int_bitmask PTA_BTVER2 = PTA_BTVER1 | PTA_SSE4_1 | PTA_SSE4_2
    | PTA_AES | PTA_PCLMUL | PTA_AVX | PTA_BMI | PTA_F16C | PTA_MOVBE
    | PTA_XSAVEOPT;
  
  constexpr wide_int_bitmask PTA_LUJIAZUI = PTA_64BIT | PTA_MMX | PTA_SSE
!   | PTA_SSE2 | PTA_SSE3 | PTA_CX16 | PTA_ABM | PTA_SSSE3 | PTA_SSE4_1
!   | PTA_SSE4_2 | PTA_AES | PTA_PCLMUL | PTA_BMI | PTA_BMI2 | PTA_PRFCHW
!   | PTA_FXSR | PTA_XSAVE | PTA_XSAVEOPT | PTA_FSGSBASE | PTA_RDRND | PTA_MOVBE
!   | PTA_ADX | PTA_RDSEED | PTA_POPCNT;
  constexpr wide_int_bitmask PTA_YONGFENG = PTA_LUJIAZUI | PTA_AVX | PTA_AVX2
!   | PTA_F16C | PTA_FMA | PTA_SHA | PTA_LZCNT;
  
  #ifndef GENERATOR_FILE
  
--- 2506,2524 ----
    | PTA_MOVDIRI | PTA_MOVDIR64B | PTA_AVX512VP2INTERSECT | PTA_PREFETCHI;
  
  constexpr wide_int_bitmask PTA_BTVER1 = PTA_64BIT | PTA_MMX | PTA_SSE
!   | PTA_SSE2 | PTA_SSE3 | PTA_SSSE3 | PTA_SSE4A | PTA_LZCNT | PTA_POPCNT
!   | PTA_ABM | PTA_CX16 | PTA_PRFCHW | PTA_FXSR | PTA_XSAVE;
  constexpr wide_int_bitmask PTA_BTVER2 = PTA_BTVER1 | PTA_SSE4_1 | PTA_SSE4_2
    | PTA_AES | PTA_PCLMUL | PTA_AVX | PTA_BMI | PTA_F16C | PTA_MOVBE
    | PTA_XSAVEOPT;
  
  constexpr wide_int_bitmask PTA_LUJIAZUI = PTA_64BIT | PTA_MMX | PTA_SSE
!   | PTA_SSE2 | PTA_SSE3 | PTA_CX16 | PTA_LZCNT | PTA_POPCNT | PTA_ABM
!   | PTA_SSSE3 | PTA_SSE4_1 | PTA_SSE4_2 | PTA_AES | PTA_PCLMUL | PTA_BMI
!   | PTA_BMI2 | PTA_PRFCHW | PTA_FXSR | PTA_XSAVE | PTA_XSAVEOPT | PTA_FSGSBASE
!   | PTA_RDRND | PTA_MOVBE | PTA_ADX | PTA_RDSEED;
  constexpr wide_int_bitmask PTA_YONGFENG = PTA_LUJIAZUI | PTA_AVX | PTA_AVX2
!   | PTA_F16C | PTA_FMA | PTA_SHA;
  
  #ifndef GENERATOR_FILE
  
diff -Nrcpad gcc-16-20250803/gcc/config/i386/i386.md gcc-16-20250810/gcc/config/i386/i386.md
*** gcc-16-20250803/gcc/config/i386/i386.md	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/config/i386/i386.md	Sun Aug 10 22:32:07 2025
***************
*** 1618,1627 ****
  	(compare
  	  (match_operand:QI 0 "nonimmediate_operand" "QBn")
  	  (subreg:QI
! 	    (match_operator:SWI248 2 "extract_operator"
! 	      [(match_operand 1 "int248_register_operand" "Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0)))]
    "ix86_match_ccmode (insn, CCmode)"
    "cmp{b}\t{%h1, %0|%0, %h1}"
    [(set_attr "addr" "gpr8")
--- 1618,1625 ----
  	(compare
  	  (match_operand:QI 0 "nonimmediate_operand" "QBn")
  	  (subreg:QI
! 	    (match_operator:SWI248 2 "extract_high_operator"
! 	      [(match_operand 1 "int248_register_operand" "Q")]) 0)))]
    "ix86_match_ccmode (insn, CCmode)"
    "cmp{b}\t{%h1, %0|%0, %h1}"
    [(set_attr "addr" "gpr8")
***************
*** 1632,1641 ****
    [(set (reg FLAGS_REG)
  	(compare
  	  (subreg:QI
! 	    (match_operator:SWI248 2 "extract_operator"
! 	      [(match_operand 0 "int248_register_operand" "Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0)
  	  (match_operand:QI 1 "const0_operand")))]
    "ix86_match_ccmode (insn, CCNOmode)"
    "test{b}\t%h0, %h0"
--- 1630,1637 ----
    [(set (reg FLAGS_REG)
  	(compare
  	  (subreg:QI
! 	    (match_operator:SWI248 2 "extract_high_operator"
! 	      [(match_operand 0 "int248_register_operand" "Q")]) 0)
  	  (match_operand:QI 1 "const0_operand")))]
    "ix86_match_ccmode (insn, CCNOmode)"
    "test{b}\t%h0, %h0"
***************
*** 1657,1666 ****
    [(set (reg FLAGS_REG)
  	(compare
  	  (subreg:QI
! 	    (match_operator:SWI248 2 "extract_operator"
! 	      [(match_operand 0 "int248_register_operand" "Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0)
  	  (match_operand:QI 1 "general_operand" "QnBn")))]
    "ix86_match_ccmode (insn, CCmode)"
    "cmp{b}\t{%1, %h0|%h0, %1}"
--- 1653,1660 ----
    [(set (reg FLAGS_REG)
  	(compare
  	  (subreg:QI
! 	    (match_operator:SWI248 2 "extract_high_operator"
! 	      [(match_operand 0 "int248_register_operand" "Q")]) 0)
  	  (match_operand:QI 1 "general_operand" "QnBn")))]
    "ix86_match_ccmode (insn, CCmode)"
    "cmp{b}\t{%1, %h0|%h0, %1}"
***************
*** 1672,1686 ****
    [(set (reg FLAGS_REG)
  	(compare
  	  (subreg:QI
! 	    (match_operator:SWI248 2 "extract_operator"
! 	      [(match_operand 0 "int248_register_operand" "Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0)
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_operator"
! 	      [(match_operand 1 "int248_register_operand" "Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0)))]
    "ix86_match_ccmode (insn, CCmode)"
    "cmp{b}\t{%h1, %h0|%h0, %h1}"
    [(set_attr "type" "icmp")
--- 1666,1676 ----
    [(set (reg FLAGS_REG)
  	(compare
  	  (subreg:QI
! 	    (match_operator:SWI248 2 "extract_high_operator"
! 	      [(match_operand 0 "int248_register_operand" "Q")]) 0)
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_high_operator"
! 	      [(match_operand 1 "int248_register_operand" "Q")]) 0)))]
    "ix86_match_ccmode (insn, CCmode)"
    "cmp{b}\t{%h1, %h0|%h0, %h1}"
    [(set_attr "type" "icmp")
***************
*** 3480,3489 ****
    [(set (strict_low_part
  	  (match_operand:QI 0 "register_operand" "+Q"))
  	  (subreg:QI
! 	    (match_operator:SWI248 2 "extract_operator"
! 	      [(match_operand 1 "int248_register_operand" "Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0))]
    "!TARGET_PARTIAL_REG_STALL || optimize_function_for_size_p (cfun)"
    "mov{b}\t{%h1, %0|%0, %h1}"
    [(set_attr "type" "imov")
--- 3470,3477 ----
    [(set (strict_low_part
  	  (match_operand:QI 0 "register_operand" "+Q"))
  	  (subreg:QI
! 	    (match_operator:SWI248 2 "extract_high_operator"
! 	      [(match_operand 1 "int248_register_operand" "Q")]) 0))]
    "!TARGET_PARTIAL_REG_STALL || optimize_function_for_size_p (cfun)"
    "mov{b}\t{%h1, %0|%0, %h1}"
    [(set_attr "type" "imov")
***************
*** 3566,3575 ****
  (define_insn "*extzvqi"
    [(set (match_operand:QI 0 "nonimmediate_operand" "=QBn,?R")
  	(subreg:QI
! 	  (match_operator:SWI248 2 "extract_operator"
! 	    [(match_operand 1 "int248_register_operand" "Q,Q")
! 	     (const_int 8)
! 	     (const_int 8)]) 0))]
    ""
  {
    switch (get_attr_type (insn))
--- 3554,3561 ----
  (define_insn "*extzvqi"
    [(set (match_operand:QI 0 "nonimmediate_operand" "=QBn,?R")
  	(subreg:QI
! 	  (match_operator:SWI248 2 "extract_high_operator"
! 	    [(match_operand 1 "int248_register_operand" "Q,Q")]) 0))]
    ""
  {
    switch (get_attr_type (insn))
***************
*** 3690,3699 ****
  	  (match_operand 0 "int248_register_operand" "+Q")
  	  (const_int 8)
  	  (const_int 8))
! 	(match_operator:SWI248 2 "extract_operator"
! 	  [(match_operand 1 "int248_register_operand" "Q")
! 	   (const_int 8)
! 	   (const_int 8)]))]
    ""
    "mov{b}\t{%h1, %h0|%h0, %h1}"
    [(set_attr "type" "imov")
--- 3676,3683 ----
  	  (match_operand 0 "int248_register_operand" "+Q")
  	  (const_int 8)
  	  (const_int 8))
! 	(match_operator:SWI248 2 "extract_high_operator"
! 	  [(match_operand 1 "int248_register_operand" "Q")]))]
    ""
    "mov{b}\t{%h1, %h0|%h0, %h1}"
    [(set_attr "type" "imov")
***************
*** 5260,5269 ****
    [(set (match_operand:SWI24 0 "register_operand" "=R")
  	(sign_extend:SWI24
  	  (subreg:QI
! 	    (match_operator:SWI248 2 "extract_operator"
! 	      [(match_operand 1 "int248_register_operand" "Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0)))]
    ""
    "movs{b<SWI24:imodesuffix>|x}\t{%h1, %0|%0, %h1}"
     [(set_attr "type" "imovx")
--- 5244,5251 ----
    [(set (match_operand:SWI24 0 "register_operand" "=R")
  	(sign_extend:SWI24
  	  (subreg:QI
! 	    (match_operator:SWI248 2 "extract_high_operator"
! 	      [(match_operand 1 "int248_register_operand" "Q")]) 0)))]
    ""
    "movs{b<SWI24:imodesuffix>|x}\t{%h1, %0|%0, %h1}"
     [(set_attr "type" "imovx")
***************
*** 7009,7018 ****
    [(set (strict_low_part (match_operand:QI 0 "register_operand" "+Q,&Q"))
  	(plus:QI
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_operator"
! 	      [(match_operand 2 "int248_register_operand" "Q,Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0)
  	  (match_operand:QI 1 "nonimmediate_operand" "0,!qm")))
     (clobber (reg:CC FLAGS_REG))]
    "!TARGET_PARTIAL_REG_STALL || optimize_function_for_size_p (cfun)"
--- 6991,6998 ----
    [(set (strict_low_part (match_operand:QI 0 "register_operand" "+Q,&Q"))
  	(plus:QI
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_high_operator"
! 	      [(match_operand 2 "int248_register_operand" "Q,Q")]) 0)
  	  (match_operand:QI 1 "nonimmediate_operand" "0,!qm")))
     (clobber (reg:CC FLAGS_REG))]
    "!TARGET_PARTIAL_REG_STALL || optimize_function_for_size_p (cfun)"
***************
*** 7026,7033 ****
       [(set (strict_low_part (match_dup 0))
  	   (plus:QI
  	     (subreg:QI
! 	       (match_op_dup 3
! 		 [(match_dup 2) (const_int 8) (const_int 8)]) 0)
  	     (match_dup 0)))
        (clobber (reg:CC FLAGS_REG))])]
    ""
--- 7006,7013 ----
       [(set (strict_low_part (match_dup 0))
  	   (plus:QI
  	     (subreg:QI
! 	       (zero_extract:SWI248
! 		 (match_dup 2) (const_int 8) (const_int 8)) 0)
  	     (match_dup 0)))
        (clobber (reg:CC FLAGS_REG))])]
    ""
***************
*** 7038,7066 ****
    [(set (strict_low_part (match_operand:QI 0 "register_operand" "+&Q"))
  	(plus:QI
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_operator"
! 	      [(match_operand 1 "int248_register_operand" "Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0)
  	  (subreg:QI
! 	    (match_operator:SWI248 4 "extract_operator"
! 	      [(match_operand 2 "int248_register_operand" "Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0)))
     (clobber (reg:CC FLAGS_REG))]
    "!TARGET_PARTIAL_REG_STALL || optimize_function_for_size_p (cfun)"
    "#"
    "&& reload_completed"
    [(set (strict_low_part (match_dup 0))
  	(subreg:QI
! 	  (match_op_dup 4
! 	    [(match_dup 2) (const_int 8) (const_int 8)]) 0))
     (parallel
       [(set (strict_low_part (match_dup 0))
  	   (plus:QI
  	     (subreg:QI
! 	       (match_op_dup 3
! 		 [(match_dup 1) (const_int 8) (const_int 8)]) 0)
  	     (match_dup 0)))
        (clobber (reg:CC FLAGS_REG))])]
    ""
--- 7018,7042 ----
    [(set (strict_low_part (match_operand:QI 0 "register_operand" "+&Q"))
  	(plus:QI
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_high_operator"
! 	      [(match_operand 1 "int248_register_operand" "Q")]) 0)
  	  (subreg:QI
! 	    (match_operator:SWI248 4 "extract_high_operator"
! 	      [(match_operand 2 "int248_register_operand" "Q")]) 0)))
     (clobber (reg:CC FLAGS_REG))]
    "!TARGET_PARTIAL_REG_STALL || optimize_function_for_size_p (cfun)"
    "#"
    "&& reload_completed"
    [(set (strict_low_part (match_dup 0))
  	(subreg:QI
! 	  (zero_extract:SWI248
! 	    (match_dup 2) (const_int 8) (const_int 8)) 0))
     (parallel
       [(set (strict_low_part (match_dup 0))
  	   (plus:QI
  	     (subreg:QI
! 	       (zero_extract:SWI248
! 		 (match_dup 1) (const_int 8) (const_int 8)) 0)
  	     (match_dup 0)))
        (clobber (reg:CC FLAGS_REG))])]
    ""
***************
*** 7475,7484 ****
    [(set (match_operand:QI 0 "nonimmediate_operand" "=QBn")
  	(plus:QI
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_operator"
! 	      [(match_operand 2 "int248_register_operand" "Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0)
  	  (match_operand:QI 1 "nonimmediate_operand" "0")))
     (clobber (reg:CC FLAGS_REG))]
    ""
--- 7451,7458 ----
    [(set (match_operand:QI 0 "nonimmediate_operand" "=QBn")
  	(plus:QI
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_high_operator"
! 	      [(match_operand 2 "int248_register_operand" "Q")]) 0)
  	  (match_operand:QI 1 "nonimmediate_operand" "0")))
     (clobber (reg:CC FLAGS_REG))]
    ""
***************
*** 7491,7519 ****
    [(set (match_operand:QI 0 "register_operand" "=&Q")
  	(plus:QI
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_operator"
! 	      [(match_operand 1 "int248_register_operand" "Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0)
  	  (subreg:QI
! 	    (match_operator:SWI248 4 "extract_operator"
! 	      [(match_operand 2 "int248_register_operand" "Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0)))
     (clobber (reg:CC FLAGS_REG))]
    ""
    "#"
    "&& reload_completed"
    [(set (match_dup 0)
  	(subreg:QI
! 	  (match_op_dup 4
! 	    [(match_dup 2) (const_int 8) (const_int 8)]) 0))
     (parallel
       [(set (match_dup 0)
  	   (plus:QI
  	     (subreg:QI
! 	       (match_op_dup 3
! 		 [(match_dup 1) (const_int 8) (const_int 8)]) 0)
  	   (match_dup 0)))
        (clobber (reg:CC FLAGS_REG))])]
    ""
--- 7465,7489 ----
    [(set (match_operand:QI 0 "register_operand" "=&Q")
  	(plus:QI
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_high_operator"
! 	      [(match_operand 1 "int248_register_operand" "Q")]) 0)
  	  (subreg:QI
! 	    (match_operator:SWI248 4 "extract_high_operator"
! 	      [(match_operand 2 "int248_register_operand" "Q")]) 0)))
     (clobber (reg:CC FLAGS_REG))]
    ""
    "#"
    "&& reload_completed"
    [(set (match_dup 0)
  	(subreg:QI
! 	  (zero_extract:SWI248
! 	    (match_dup 2) (const_int 8) (const_int 8)) 0))
     (parallel
       [(set (match_dup 0)
  	   (plus:QI
  	     (subreg:QI
! 	       (zero_extract:SWI248
! 		 (match_dup 1) (const_int 8) (const_int 8)) 0)
  	   (match_dup 0)))
        (clobber (reg:CC FLAGS_REG))])]
    ""
***************
*** 7543,7552 ****
  	(subreg:SWI248
  	  (plus:QI
  	    (subreg:QI
! 	      (match_operator:SWI248 3 "extract_operator"
! 		[(match_operand 1 "int248_register_operand" "0,!Q")
! 		 (const_int 8)
! 		 (const_int 8)]) 0)
  	    (match_operand:QI 2 "general_operand" "QnBn,QnBn")) 0))
     (clobber (reg:CC FLAGS_REG))]
    ""
--- 7513,7520 ----
  	(subreg:SWI248
  	  (plus:QI
  	    (subreg:QI
! 	      (match_operator:SWI248 3 "extract_high_operator"
! 		[(match_operand 1 "int248_register_operand" "0,!Q")]) 0)
  	    (match_operand:QI 2 "general_operand" "QnBn,QnBn")) 0))
     (clobber (reg:CC FLAGS_REG))]
    ""
***************
*** 7581,7588 ****
  	   (subreg:SWI248
  	     (plus:QI
  	       (subreg:QI
! 		 (match_op_dup 3
! 		   [(match_dup 0) (const_int 8) (const_int 8)]) 0)
  	       (match_dup 2)) 0))
        (clobber (reg:CC FLAGS_REG))])]
    ""
--- 7549,7556 ----
  	   (subreg:SWI248
  	     (plus:QI
  	       (subreg:QI
! 		 (zero_extract:SWI248
! 		   (match_dup 0) (const_int 8) (const_int 8)) 0)
  	       (match_dup 2)) 0))
        (clobber (reg:CC FLAGS_REG))])]
    ""
***************
*** 7602,7616 ****
  	(subreg:SWI248
  	  (plusminus:QI
  	    (subreg:QI
! 	      (match_operator:SWI248 3 "extract_operator"
! 		[(match_operand 1 "int248_register_operand" "<comm>0,!Q")
! 		 (const_int 8)
! 		 (const_int 8)]) 0)
  	    (subreg:QI
! 	      (match_operator:SWI248 4 "extract_operator"
! 		[(match_operand 2 "int248_register_operand" "Q,Q")
! 		 (const_int 8)
! 		 (const_int 8)]) 0)) 0))
     (clobber (reg:CC FLAGS_REG))]
    ""
    "@
--- 7570,7580 ----
  	(subreg:SWI248
  	  (plusminus:QI
  	    (subreg:QI
! 	      (match_operator:SWI248 3 "extract_high_operator"
! 		[(match_operand 1 "int248_register_operand" "<comm>0,!Q")]) 0)
  	    (subreg:QI
! 	      (match_operator:SWI248 4 "extract_high_operator"
! 		[(match_operand 2 "int248_register_operand" "Q,Q")]) 0)) 0))
     (clobber (reg:CC FLAGS_REG))]
    ""
    "@
***************
*** 7629,7639 ****
  	   (subreg:SWI248
  	     (plusminus:QI
  	       (subreg:QI
! 		 (match_op_dup 3
! 		   [(match_dup 0) (const_int 8) (const_int 8)]) 0)
  	       (subreg:QI
! 		 (match_op_dup 4
! 		   [(match_dup 2) (const_int 8) (const_int 8)]) 0)) 0))
        (clobber (reg:CC FLAGS_REG))])]
    ""
    [(set_attr "type" "alu")
--- 7593,7603 ----
  	   (subreg:SWI248
  	     (plusminus:QI
  	       (subreg:QI
! 		 (zero_extract:SWI248
! 		   (match_dup 0) (const_int 8) (const_int 8)) 0)
  	       (subreg:QI
! 		 (zero_extract:SWI248
! 		   (match_dup 2) (const_int 8) (const_int 8)) 0)) 0))
        (clobber (reg:CC FLAGS_REG))])]
    ""
    [(set_attr "type" "alu")
***************
*** 8230,8239 ****
  	(minus:QI
  	  (match_operand:QI 1 "nonimmediate_operand" "0,!qm")
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_operator"
! 	      [(match_operand 2 "int248_register_operand" "Q,Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0)))
     (clobber (reg:CC FLAGS_REG))]
    "!TARGET_PARTIAL_REG_STALL || optimize_function_for_size_p (cfun)"
    "@
--- 8194,8201 ----
  	(minus:QI
  	  (match_operand:QI 1 "nonimmediate_operand" "0,!qm")
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_high_operator"
! 	      [(match_operand 2 "int248_register_operand" "Q,Q")]) 0)))
     (clobber (reg:CC FLAGS_REG))]
    "!TARGET_PARTIAL_REG_STALL || optimize_function_for_size_p (cfun)"
    "@
***************
*** 8247,8254 ****
  	   (minus:QI
  	     (match_dup 0)
  	     (subreg:QI
! 	       (match_op_dup 3
! 		 [(match_dup 2) (const_int 8) (const_int 8)]) 0)))
        (clobber (reg:CC FLAGS_REG))])]
    ""
    [(set_attr "type" "alu")
--- 8209,8216 ----
  	   (minus:QI
  	     (match_dup 0)
  	     (subreg:QI
! 	       (zero_extract:SWI248
! 		 (match_dup 2) (const_int 8) (const_int 8)) 0)))
        (clobber (reg:CC FLAGS_REG))])]
    ""
    [(set_attr "type" "alu")
***************
*** 8258,8287 ****
    [(set (strict_low_part (match_operand:QI 0 "register_operand" "+&Q"))
  	(minus:QI
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_operator"
! 	      [(match_operand 1 "int248_register_operand" "Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0)
  	  (subreg:QI
! 	    (match_operator:SWI248 4 "extract_operator"
! 	      [(match_operand 2 "int248_register_operand" "Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0)))
     (clobber (reg:CC FLAGS_REG))]
    "!TARGET_PARTIAL_REG_STALL || optimize_function_for_size_p (cfun)"
    "#"
    "&& reload_completed"
    [(set (strict_low_part (match_dup 0))
  	(subreg:QI
! 	  (match_op_dup 3
! 	    [(match_dup 1) (const_int 8) (const_int 8)]) 0))
     (parallel
       [(set (strict_low_part (match_dup 0))
  	   (minus:QI
  	   (match_dup 0)
  	     (subreg:QI
! 	       (match_op_dup 4
! 		 [(match_dup 2) (const_int 8) (const_int 8)]) 0)))
        (clobber (reg:CC FLAGS_REG))])]
    ""
    [(set_attr "type" "alu")
--- 8220,8245 ----
    [(set (strict_low_part (match_operand:QI 0 "register_operand" "+&Q"))
  	(minus:QI
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_high_operator"
! 	      [(match_operand 1 "int248_register_operand" "Q")]) 0)
  	  (subreg:QI
! 	    (match_operator:SWI248 4 "extract_high_operator"
! 	      [(match_operand 2 "int248_register_operand" "Q")]) 0)))
     (clobber (reg:CC FLAGS_REG))]
    "!TARGET_PARTIAL_REG_STALL || optimize_function_for_size_p (cfun)"
    "#"
    "&& reload_completed"
    [(set (strict_low_part (match_dup 0))
  	(subreg:QI
! 	  (zero_extract:SWI248
! 	    (match_dup 1) (const_int 8) (const_int 8)) 0))
     (parallel
       [(set (strict_low_part (match_dup 0))
  	   (minus:QI
  	   (match_dup 0)
  	     (subreg:QI
! 	       (zero_extract:SWI248
! 		 (match_dup 2) (const_int 8) (const_int 8)) 0)))
        (clobber (reg:CC FLAGS_REG))])]
    ""
    [(set_attr "type" "alu")
***************
*** 8332,8341 ****
  	(minus:QI
  	  (match_operand:QI 1 "nonimmediate_operand" "0")
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_operator"
! 	      [(match_operand 2 "int248_register_operand" "Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0)))
     (clobber (reg:CC FLAGS_REG))]
    ""
    "sub{b}\t{%h2, %0|%0, %h2}"
--- 8290,8297 ----
  	(minus:QI
  	  (match_operand:QI 1 "nonimmediate_operand" "0")
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_high_operator"
! 	      [(match_operand 2 "int248_register_operand" "Q")]) 0)))
     (clobber (reg:CC FLAGS_REG))]
    ""
    "sub{b}\t{%h2, %0|%0, %h2}"
***************
*** 8347,8376 ****
    [(set (match_operand:QI 0 "register_operand" "=&Q")
  	(minus:QI
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_operator"
! 	      [(match_operand 1 "int248_register_operand" "Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0)
  	  (subreg:QI
! 	    (match_operator:SWI248 4 "extract_operator"
! 	      [(match_operand 2 "int248_register_operand" "Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0)))
     (clobber (reg:CC FLAGS_REG))]
    ""
    "#"
    "&& reload_completed"
    [(set (match_dup 0)
  	(subreg:QI
! 	  (match_op_dup 3
! 	    [(match_dup 1) (const_int 8) (const_int 8)]) 0))
     (parallel
       [(set (match_dup 0)
  	   (minus:QI
  	     (match_dup 0)
  	     (subreg:QI
! 	       (match_op_dup 4
! 		 [(match_dup 2) (const_int 8) (const_int 8)]) 0)))
        (clobber (reg:CC FLAGS_REG))])]
    ""
    [(set_attr "type" "alu")
--- 8303,8328 ----
    [(set (match_operand:QI 0 "register_operand" "=&Q")
  	(minus:QI
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_high_operator"
! 	      [(match_operand 1 "int248_register_operand" "Q")]) 0)
  	  (subreg:QI
! 	    (match_operator:SWI248 4 "extract_high_operator"
! 	      [(match_operand 2 "int248_register_operand" "Q")]) 0)))
     (clobber (reg:CC FLAGS_REG))]
    ""
    "#"
    "&& reload_completed"
    [(set (match_dup 0)
  	(subreg:QI
! 	  (zero_extract:SWI248
! 	    (match_dup 1) (const_int 8) (const_int 8)) 0))
     (parallel
       [(set (match_dup 0)
  	   (minus:QI
  	     (match_dup 0)
  	     (subreg:QI
! 	       (zero_extract:SWI248
! 		 (match_dup 2) (const_int 8) (const_int 8)) 0)))
        (clobber (reg:CC FLAGS_REG))])]
    ""
    [(set_attr "type" "alu")
***************
*** 8385,8394 ****
  	(subreg:SWI248
  	  (minus:QI
  	    (subreg:QI
! 	      (match_operator:SWI248 3 "extract_operator"
! 		[(match_operand 1 "int248_register_operand" "0,!Q")
! 		 (const_int 8)
! 		 (const_int 8)]) 0)
  	    (match_operand:QI 2 "general_operand" "QnBn,QnBn")) 0))
     (clobber (reg:CC FLAGS_REG))]
    ""
--- 8337,8344 ----
  	(subreg:SWI248
  	  (minus:QI
  	    (subreg:QI
! 	      (match_operator:SWI248 3 "extract_high_operator"
! 		[(match_operand 1 "int248_register_operand" "0,!Q")]) 0)
  	    (match_operand:QI 2 "general_operand" "QnBn,QnBn")) 0))
     (clobber (reg:CC FLAGS_REG))]
    ""
***************
*** 8407,8414 ****
  	   (subreg:SWI248
  	     (minus:QI
  	       (subreg:QI
! 		 (match_op_dup 3
! 		   [(match_dup 0) (const_int 8) (const_int 8)]) 0)
  	       (match_dup 2)) 0))
        (clobber (reg:CC FLAGS_REG))])]
    ""
--- 8357,8364 ----
  	   (subreg:SWI248
  	     (minus:QI
  	       (subreg:QI
! 		 (zero_extract:SWI248
! 		   (match_dup 0) (const_int 8) (const_int 8)) 0)
  	       (match_dup 2)) 0))
        (clobber (reg:CC FLAGS_REG))])]
    ""
***************
*** 12356,12365 ****
  	(compare
  	  (and:QI
  	    (subreg:QI
! 	      (match_operator:SWI248 2 "extract_operator"
! 		[(match_operand 0 "int248_register_operand" "Q")
! 		 (const_int 8)
! 		 (const_int 8)]) 0)
  	    (match_operand:QI 1 "general_operand" "QnBn"))
  	  (const_int 0)))]
    "ix86_match_ccmode (insn, CCNOmode)"
--- 12306,12313 ----
  	(compare
  	  (and:QI
  	    (subreg:QI
! 	      (match_operator:SWI248 2 "extract_high_operator"
! 		[(match_operand 0 "int248_register_operand" "Q")]) 0)
  	    (match_operand:QI 1 "general_operand" "QnBn"))
  	  (const_int 0)))]
    "ix86_match_ccmode (insn, CCNOmode)"
***************
*** 12373,12387 ****
  	(compare
  	  (and:QI
  	    (subreg:QI
! 	      (match_operator:SWI248 2 "extract_operator"
! 		[(match_operand 0 "int248_register_operand" "Q")
! 		 (const_int 8)
! 		 (const_int 8)]) 0)
  	    (subreg:QI
! 	      (match_operator:SWI248 3 "extract_operator"
! 		[(match_operand 1 "int248_register_operand" "Q")
! 		 (const_int 8)
! 		 (const_int 8)]) 0))
  	  (const_int 0)))]
    "ix86_match_ccmode (insn, CCNOmode)"
    "test{b}\t{%h1, %h0|%h0, %h1}"
--- 12321,12331 ----
  	(compare
  	  (and:QI
  	    (subreg:QI
! 	      (match_operator:SWI248 2 "extract_high_operator"
! 		[(match_operand 0 "int248_register_operand" "Q")]) 0)
  	    (subreg:QI
! 	      (match_operator:SWI248 3 "extract_high_operator"
! 		[(match_operand 1 "int248_register_operand" "Q")]) 0))
  	  (const_int 0)))]
    "ix86_match_ccmode (insn, CCNOmode)"
    "test{b}\t{%h1, %h0|%h0, %h1}"
***************
*** 12970,12979 ****
    [(set (strict_low_part (match_operand:QI 0 "register_operand" "+Q,&Q"))
  	(any_logic:QI
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_operator"
! 	      [(match_operand 2 "int248_register_operand" "Q,Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0)
  	  (match_operand:QI 1 "nonimmediate_operand" "0,!qm")))
     (clobber (reg:CC FLAGS_REG))]
    "!TARGET_PARTIAL_REG_STALL || optimize_function_for_size_p (cfun)"
--- 12914,12921 ----
    [(set (strict_low_part (match_operand:QI 0 "register_operand" "+Q,&Q"))
  	(any_logic:QI
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_high_operator"
! 	      [(match_operand 2 "int248_register_operand" "Q,Q")]) 0)
  	  (match_operand:QI 1 "nonimmediate_operand" "0,!qm")))
     (clobber (reg:CC FLAGS_REG))]
    "!TARGET_PARTIAL_REG_STALL || optimize_function_for_size_p (cfun)"
***************
*** 12987,12994 ****
       [(set (strict_low_part (match_dup 0))
  	   (any_logic:QI
  	     (subreg:QI
! 	       (match_op_dup 3
! 		 [(match_dup 2) (const_int 8) (const_int 8)]) 0)
  	     (match_dup 0)))
        (clobber (reg:CC FLAGS_REG))])]
    ""
--- 12929,12936 ----
       [(set (strict_low_part (match_dup 0))
  	   (any_logic:QI
  	     (subreg:QI
! 	       (zero_extract:SWI248
! 		 (match_dup 2) (const_int 8) (const_int 8)) 0)
  	     (match_dup 0)))
        (clobber (reg:CC FLAGS_REG))])]
    ""
***************
*** 12999,13027 ****
    [(set (strict_low_part (match_operand:QI 0 "register_operand" "+&Q"))
  	(any_logic:QI
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_operator"
! 	      [(match_operand 1 "int248_register_operand" "Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0)
  	  (subreg:QI
! 	    (match_operator:SWI248 4 "extract_operator"
! 	      [(match_operand 2 "int248_register_operand" "Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0)))
     (clobber (reg:CC FLAGS_REG))]
    "!TARGET_PARTIAL_REG_STALL || optimize_function_for_size_p (cfun)"
    "#"
    "&& reload_completed"
    [(set (strict_low_part (match_dup 0))
  	(subreg:QI
! 	  (match_op_dup 4
! 	    [(match_dup 2) (const_int 8) (const_int 8)]) 0))
     (parallel
       [(set (strict_low_part (match_dup 0))
  	   (any_logic:QI
  	     (subreg:QI
! 	       (match_op_dup 3
! 		 [(match_dup 1) (const_int 8) (const_int 8)]) 0)
  	     (match_dup 0)))
        (clobber (reg:CC FLAGS_REG))])]
    ""
--- 12941,12965 ----
    [(set (strict_low_part (match_operand:QI 0 "register_operand" "+&Q"))
  	(any_logic:QI
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_high_operator"
! 	      [(match_operand 1 "int248_register_operand" "Q")]) 0)
  	  (subreg:QI
! 	    (match_operator:SWI248 4 "extract_high_operator"
! 	      [(match_operand 2 "int248_register_operand" "Q")]) 0)))
     (clobber (reg:CC FLAGS_REG))]
    "!TARGET_PARTIAL_REG_STALL || optimize_function_for_size_p (cfun)"
    "#"
    "&& reload_completed"
    [(set (strict_low_part (match_dup 0))
  	(subreg:QI
! 	  (zero_extract:SWI248
! 	    (match_dup 2) (const_int 8) (const_int 8)) 0))
     (parallel
       [(set (strict_low_part (match_dup 0))
  	   (any_logic:QI
  	     (subreg:QI
! 	       (zero_extract:SWI248
! 		 (match_dup 1) (const_int 8) (const_int 8)) 0)
  	     (match_dup 0)))
        (clobber (reg:CC FLAGS_REG))])]
    ""
***************
*** 13224,13233 ****
    [(set (match_operand:QI 0 "nonimmediate_operand" "=QBn")
  	(any_logic:QI
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_operator"
! 	      [(match_operand 2 "int248_register_operand" "Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0)
  	  (match_operand:QI 1 "nonimmediate_operand" "0")))
     (clobber (reg:CC FLAGS_REG))]
    ""
--- 13162,13169 ----
    [(set (match_operand:QI 0 "nonimmediate_operand" "=QBn")
  	(any_logic:QI
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_high_operator"
! 	      [(match_operand 2 "int248_register_operand" "Q")]) 0)
  	  (match_operand:QI 1 "nonimmediate_operand" "0")))
     (clobber (reg:CC FLAGS_REG))]
    ""
***************
*** 13240,13268 ****
    [(set (match_operand:QI 0 "register_operand" "=&Q")
  	(any_logic:QI
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_operator"
! 	      [(match_operand 1 "int248_register_operand" "Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0)
  	  (subreg:QI
! 	    (match_operator:SWI248 4 "extract_operator"
! 	      [(match_operand 2 "int248_register_operand" "Q")
! 	       (const_int 8)
! 	       (const_int 8)]) 0)))
     (clobber (reg:CC FLAGS_REG))]
    ""
    "#"
    "&& reload_completed"
    [(set (match_dup 0)
  	(subreg:QI
! 	  (match_op_dup 4
! 	    [(match_dup 2) (const_int 8) (const_int 8)]) 0))
     (parallel
       [(set (match_dup 0)
  	   (any_logic:QI
  	     (subreg:QI
! 	       (match_op_dup 3
! 		 [(match_dup 1) (const_int 8) (const_int 8)]) 0)
  	   (match_dup 0)))
        (clobber (reg:CC FLAGS_REG))])]
    ""
--- 13176,13200 ----
    [(set (match_operand:QI 0 "register_operand" "=&Q")
  	(any_logic:QI
  	  (subreg:QI
! 	    (match_operator:SWI248 3 "extract_high_operator"
! 	      [(match_operand 1 "int248_register_operand" "Q")]) 0)
  	  (subreg:QI
! 	    (match_operator:SWI248 4 "extract_high_operator"
! 	      [(match_operand 2 "int248_register_operand" "Q")]) 0)))
     (clobber (reg:CC FLAGS_REG))]
    ""
    "#"
    "&& reload_completed"
    [(set (match_dup 0)
  	(subreg:QI
! 	  (zero_extract:SWI248
! 	    (match_dup 2) (const_int 8) (const_int 8)) 0))
     (parallel
       [(set (match_dup 0)
  	   (any_logic:QI
  	     (subreg:QI
! 	       (zero_extract:SWI248
! 		 (match_dup 1) (const_int 8) (const_int 8)) 0)
  	   (match_dup 0)))
        (clobber (reg:CC FLAGS_REG))])]
    ""
***************
*** 13292,13301 ****
  	(subreg:SWI248
  	  (any_logic:QI
  	    (subreg:QI
! 	      (match_operator:SWI248 3 "extract_operator"
! 		[(match_operand 1 "int248_register_operand" "0,!Q")
! 		 (const_int 8)
! 		 (const_int 8)]) 0)
  	    (match_operand:QI 2 "general_operand" "QnBn,QnBn")) 0))
     (clobber (reg:CC FLAGS_REG))]
    ""
--- 13224,13231 ----
  	(subreg:SWI248
  	  (any_logic:QI
  	    (subreg:QI
! 	      (match_operator:SWI248 3 "extract_high_operator"
! 		[(match_operand 1 "int248_register_operand" "0,!Q")]) 0)
  	    (match_operand:QI 2 "general_operand" "QnBn,QnBn")) 0))
     (clobber (reg:CC FLAGS_REG))]
    ""
***************
*** 13314,13321 ****
  	   (subreg:SWI248
  	     (any_logic:QI
  	       (subreg:QI
! 		 (match_op_dup 3
! 		   [(match_dup 0) (const_int 8) (const_int 8)]) 0)
  	       (match_dup 2)) 0))
        (clobber (reg:CC FLAGS_REG))])]
    ""
--- 13244,13251 ----
  	   (subreg:SWI248
  	     (any_logic:QI
  	       (subreg:QI
! 		 (zero_extract:SWI248
! 		   (match_dup 0) (const_int 8) (const_int 8)) 0)
  	       (match_dup 2)) 0))
        (clobber (reg:CC FLAGS_REG))])]
    ""
***************
*** 13329,13338 ****
  	(match_operator 5 "compare_operator"
  	  [(any_logic:QI
  	     (subreg:QI
! 	       (match_operator:SWI248 3 "extract_operator"
! 		 [(match_operand 1 "int248_register_operand" "0,!Q")
! 		  (const_int 8)
! 		  (const_int 8)]) 0)
  	     (match_operand:QI 2 "general_operand" "QnBn,QnBn"))
  	  (const_int 0)]))
     (set (zero_extract:SWI248
--- 13259,13266 ----
  	(match_operator 5 "compare_operator"
  	  [(any_logic:QI
  	     (subreg:QI
! 	       (match_operator:SWI248 3 "extract_high_operator"
! 		 [(match_operand 1 "int248_register_operand" "0,!Q")]) 0)
  	     (match_operand:QI 2 "general_operand" "QnBn,QnBn"))
  	  (const_int 0)]))
     (set (zero_extract:SWI248
***************
*** 13342,13349 ****
  	(subreg:SWI248
  	  (any_logic:QI
  	    (subreg:QI
! 	      (match_op_dup 3
! 		[(match_dup 0) (const_int 8) (const_int 8)]) 0)
  	    (match_dup 2)) 0))]
    "ix86_match_ccmode (insn, CCNOmode)"
    "@
--- 13270,13277 ----
  	(subreg:SWI248
  	  (any_logic:QI
  	    (subreg:QI
! 	      (zero_extract:SWI248
! 		(match_dup 0) (const_int 8) (const_int 8)) 0)
  	    (match_dup 2)) 0))]
    "ix86_match_ccmode (insn, CCNOmode)"
    "@
***************
*** 13359,13367 ****
       [(set (match_dup 4)
  	   (match_op_dup 5
  	     [(any_logic:QI
! 	        (subreg:QI
! 		  (match_op_dup 3
! 		    [(match_dup 0) (const_int 8) (const_int 8)]) 0)
  		(match_dup 2))
  	      (const_int 0)]))
        (set (zero_extract:SWI248
--- 13287,13295 ----
       [(set (match_dup 4)
  	   (match_op_dup 5
  	     [(any_logic:QI
! 		(subreg:QI
! 		  (zero_extract:SWI248
! 		    (match_dup 0) (const_int 8) (const_int 8)) 0)
  		(match_dup 2))
  	      (const_int 0)]))
        (set (zero_extract:SWI248
***************
*** 13369,13376 ****
  	   (subreg:SWI248
  	     (any_logic:QI
  	       (subreg:QI
! 		 (match_op_dup 3
! 		   [(match_dup 1) (const_int 8) (const_int 8)]) 0)
  	       (match_dup 2)) 0))])]
    ""
    [(set_attr "addr" "gpr8")
--- 13297,13304 ----
  	   (subreg:SWI248
  	     (any_logic:QI
  	       (subreg:QI
! 		 (zero_extract:SWI248
! 		   (match_dup 1) (const_int 8) (const_int 8)) 0)
  	       (match_dup 2)) 0))])]
    ""
    [(set_attr "addr" "gpr8")
***************
*** 13386,13400 ****
  	(subreg:SWI248
  	  (any_logic:QI
  	    (subreg:QI
! 	      (match_operator:SWI248 3 "extract_operator"
! 		[(match_operand 1 "int248_register_operand" "%0,!Q")
! 		 (const_int 8)
! 		 (const_int 8)]) 0)
  	    (subreg:QI
! 	      (match_operator:SWI248 4 "extract_operator"
! 		[(match_operand 2 "int248_register_operand" "Q,Q")
! 		 (const_int 8)
! 		 (const_int 8)]) 0)) 0))
     (clobber (reg:CC FLAGS_REG))]
    ""
    "@
--- 13314,13324 ----
  	(subreg:SWI248
  	  (any_logic:QI
  	    (subreg:QI
! 	      (match_operator:SWI248 3 "extract_high_operator"
! 		[(match_operand 1 "int248_register_operand" "%0,!Q")]) 0)
  	    (subreg:QI
! 	      (match_operator:SWI248 4 "extract_high_operator"
! 		[(match_operand 2 "int248_register_operand" "Q,Q")]) 0)) 0))
     (clobber (reg:CC FLAGS_REG))]
    ""
    "@
***************
*** 13413,13423 ****
  	   (subreg:SWI248
  	     (any_logic:QI
  	       (subreg:QI
! 		 (match_op_dup 3
! 		   [(match_dup 0) (const_int 8) (const_int 8)]) 0)
  	       (subreg:QI
! 		 (match_op_dup 4
! 		   [(match_dup 2) (const_int 8) (const_int 8)]) 0)) 0))
        (clobber (reg:CC FLAGS_REG))])]
    ""
    [(set_attr "type" "alu")
--- 13337,13347 ----
  	   (subreg:SWI248
  	     (any_logic:QI
  	       (subreg:QI
! 		 (zero_extract:SWI248
! 		   (match_dup 0) (const_int 8) (const_int 8)) 0)
  	       (subreg:QI
! 		 (zero_extract:SWI248
! 		   (match_dup 2) (const_int 8) (const_int 8)) 0)) 0))
        (clobber (reg:CC FLAGS_REG))])]
    ""
    [(set_attr "type" "alu")
***************
*** 13429,13440 ****
  	  (match_operand 0 "int248_register_operand" "+Q,&Q")
  	  (const_int 8)
  	  (const_int 8))
! 	(match_operator:SWI248 3 "extract_operator"
  	  [(any_logic
  	     (match_operand 1 "int248_register_operand" "%0,!Q")
! 	     (match_operand 2 "int248_register_operand" "Q,Q"))
! 	   (const_int 8)
! 	   (const_int 8)]))
     (clobber (reg:CC FLAGS_REG))]
    "GET_MODE (operands[1]) == GET_MODE (operands[2])"
    "@
--- 13353,13362 ----
  	  (match_operand 0 "int248_register_operand" "+Q,&Q")
  	  (const_int 8)
  	  (const_int 8))
! 	(match_operator:SWI248 3 "extract_high_operator"
  	  [(any_logic
  	     (match_operand 1 "int248_register_operand" "%0,!Q")
! 	     (match_operand 2 "int248_register_operand" "Q,Q"))]))
     (clobber (reg:CC FLAGS_REG))]
    "GET_MODE (operands[1]) == GET_MODE (operands[2])"
    "@
***************
*** 13450,13458 ****
     (parallel
       [(set (zero_extract:SWI248
  	     (match_dup 0) (const_int 8) (const_int 8))
! 	   (match_op_dup 3
! 	     [(any_logic (match_dup 4) (match_dup 2))
! 	      (const_int 8) (const_int 8)]))
        (clobber (reg:CC FLAGS_REG))])]
    "operands[4] = gen_lowpart (GET_MODE (operands[1]), operands[0]);"
    [(set_attr "type" "alu")
--- 13372,13380 ----
     (parallel
       [(set (zero_extract:SWI248
  	     (match_dup 0) (const_int 8) (const_int 8))
! 	   (zero_extract:SWI248
! 	     (any_logic (match_dup 4) (match_dup 2))
! 	     (const_int 8) (const_int 8)))
        (clobber (reg:CC FLAGS_REG))])]
    "operands[4] = gen_lowpart (GET_MODE (operands[1]), operands[0]);"
    [(set_attr "type" "alu")
***************
*** 14697,14706 ****
  	(subreg:SWI248
  	  (neg:QI
  	    (subreg:QI
! 	      (match_operator:SWI248 2 "extract_operator"
! 		[(match_operand 1 "int248_register_operand" "0,!Q")
! 		 (const_int 8)
! 		 (const_int 8)]) 0)) 0))
     (clobber (reg:CC FLAGS_REG))]
    ""
    "@
--- 14619,14626 ----
  	(subreg:SWI248
  	  (neg:QI
  	    (subreg:QI
! 	      (match_operator:SWI248 2 "extract_high_operator"
! 		[(match_operand 1 "int248_register_operand" "0,!Q")]) 0)) 0))
     (clobber (reg:CC FLAGS_REG))]
    ""
    "@
***************
*** 14718,14725 ****
  	   (subreg:SWI248
  	     (neg:QI
  	       (subreg:QI
! 		 (match_op_dup 2
! 		   [(match_dup 0) (const_int 8) (const_int 8)]) 0)) 0))
        (clobber (reg:CC FLAGS_REG))])]
    ""
    [(set_attr "type" "negnot")
--- 14638,14645 ----
  	   (subreg:SWI248
  	     (neg:QI
  	       (subreg:QI
! 		 (zero_extract:SWI248
! 		   (match_dup 0) (const_int 8) (const_int 8)) 0)) 0))
        (clobber (reg:CC FLAGS_REG))])]
    ""
    [(set_attr "type" "negnot")
***************
*** 15351,15363 ****
  	  (match_operand 0 "int248_register_operand" "+Q,&Q")
  	  (const_int 8)
  	  (const_int 8))
! 	(subreg:SWI248
! 	  (not:QI
! 	    (subreg:QI
! 	      (match_operator:SWI248 2 "extract_operator"
! 		[(match_operand 1 "int248_register_operand" "0,!Q")
! 		 (const_int 8)
! 		 (const_int 8)]) 0)) 0))]
    ""
    "@
     not{b}\t%h0
--- 15271,15279 ----
  	  (match_operand 0 "int248_register_operand" "+Q,&Q")
  	  (const_int 8)
  	  (const_int 8))
! 	(not:SWI248
! 	  (match_operator:SWI248 2 "extract_high_operator"
! 	    [(match_operand 1 "int248_register_operand" "0,!Q")])))]
    ""
    "@
     not{b}\t%h0
***************
*** 15370,15380 ****
  	  (match_dup 1) (const_int 8) (const_int 8)))
     (set (zero_extract:SWI248
  	  (match_dup 0) (const_int 8) (const_int 8))
! 	(subreg:SWI248
! 	  (not:QI
! 	    (subreg:QI
! 	      (match_op_dup 2
! 		[(match_dup 0) (const_int 8) (const_int 8)]) 0)) 0))]
    ""
    [(set_attr "type" "negnot")
     (set_attr "mode" "QI")])
--- 15286,15293 ----
  	  (match_dup 1) (const_int 8) (const_int 8)))
     (set (zero_extract:SWI248
  	  (match_dup 0) (const_int 8) (const_int 8))
! 	(not:SWI248
! 	  (zero_extract:SWI248 (match_dup 0) (const_int 8) (const_int 8))))]
    ""
    [(set_attr "type" "negnot")
     (set_attr "mode" "QI")])
***************
*** 16721,16730 ****
  	(subreg:SWI248
  	  (ashift:QI
  	    (subreg:QI
! 	      (match_operator:SWI248 3 "extract_operator"
! 		[(match_operand 1 "int248_register_operand" "0,!Q")
! 		 (const_int 8)
! 		 (const_int 8)]) 0)
  	    (match_operand:QI 2 "nonmemory_operand" "cI,cI")) 0))
     (clobber (reg:CC FLAGS_REG))]
    ""
--- 16634,16641 ----
  	(subreg:SWI248
  	  (ashift:QI
  	    (subreg:QI
! 	      (match_operator:SWI248 3 "extract_high_operator"
! 		[(match_operand 1 "int248_register_operand" "0,!Q")]) 0)
  	    (match_operand:QI 2 "nonmemory_operand" "cI,cI")) 0))
     (clobber (reg:CC FLAGS_REG))]
    ""
***************
*** 16758,16765 ****
  	   (subreg:SWI248
  	     (ashift:QI
  	       (subreg:QI
! 		 (match_op_dup 3
! 		   [(match_dup 0) (const_int 8) (const_int 8)]) 0)
  	       (match_dup 2)) 0))
        (clobber (reg:CC FLAGS_REG))])]
    ""
--- 16669,16676 ----
  	   (subreg:SWI248
  	     (ashift:QI
  	       (subreg:QI
! 		 (zero_extract:SWI248
! 		   (match_dup 0) (const_int 8) (const_int 8)) 0)
  	       (match_dup 2)) 0))
        (clobber (reg:CC FLAGS_REG))])]
    ""
***************
*** 18005,18014 ****
  	(subreg:SWI248
  	  (any_shiftrt:QI
  	    (subreg:QI
! 	      (match_operator:SWI248 3 "extract_operator"
! 		[(match_operand 1 "int248_register_operand" "0,!Q")
! 		 (const_int 8)
! 		 (const_int 8)]) 0)
  	    (match_operand:QI 2 "nonmemory_operand" "cI,cI")) 0))
     (clobber (reg:CC FLAGS_REG))]
    ""
--- 17916,17923 ----
  	(subreg:SWI248
  	  (any_shiftrt:QI
  	    (subreg:QI
! 	      (match_operator:SWI248 3 "extract_high_operator"
! 		[(match_operand 1 "int248_register_operand" "0,!Q")]) 0)
  	    (match_operand:QI 2 "nonmemory_operand" "cI,cI")) 0))
     (clobber (reg:CC FLAGS_REG))]
    ""
***************
*** 18034,18041 ****
  	   (subreg:SWI248
  	     (any_shiftrt:QI
  	       (subreg:QI
! 		 (match_op_dup 3
! 		   [(match_dup 0) (const_int 8) (const_int 8)]) 0)
  	       (match_dup 2)) 0))
        (clobber (reg:CC FLAGS_REG))])]
    ""
--- 17943,17950 ----
  	   (subreg:SWI248
  	     (any_shiftrt:QI
  	       (subreg:QI
! 		 (zero_extract:SWI248
! 		   (match_dup 0) (const_int 8) (const_int 8)) 0)
  	       (match_dup 2)) 0))
        (clobber (reg:CC FLAGS_REG))])]
    ""
***************
*** 18389,18405 ****
  	(any_rotate:SWI
  	  (match_operand:SWI 1 "const_int_operand")
  	  (subreg:QI
! 	    (and
! 	      (match_operand 2 "int248_register_operand")
! 	      (match_operand 3 "const_int_operand")) 0)))]
   "(INTVAL (operands[3]) & (GET_MODE_BITSIZE (<MODE>mode) - 1))
     == GET_MODE_BITSIZE (<MODE>mode) - 1"
!  [(set (match_dup 4) (match_dup 1))
    (set (match_dup 0)
!        (any_rotate:SWI (match_dup 4)
  		       (subreg:QI
! 			 (and:SI (match_dup 2) (match_dup 3)) 0)))]
!  "operands[4] = gen_reg_rtx (<MODE>mode);")
  
  (define_insn_and_split "*<insn><mode>3_mask_1"
    [(set (match_operand:SWI 0 "nonimmediate_operand")
--- 18298,18314 ----
  	(any_rotate:SWI
  	  (match_operand:SWI 1 "const_int_operand")
  	  (subreg:QI
! 	    (match_operator 4 "and_operator"
! 	      [(match_operand 2 "int248_register_operand")
! 	       (match_operand 3 "const_int_operand")]) 0)))]
   "(INTVAL (operands[3]) & (GET_MODE_BITSIZE (<MODE>mode) - 1))
     == GET_MODE_BITSIZE (<MODE>mode) - 1"
!  [(set (match_dup 5) (match_dup 1))
    (set (match_dup 0)
!        (any_rotate:SWI (match_dup 5)
  		       (subreg:QI
! 			 (match_op_dup 4 [(match_dup 2) (match_dup 3)]) 0)))]
!  "operands[5] = gen_reg_rtx (<MODE>mode);")
  
  (define_insn_and_split "*<insn><mode>3_mask_1"
    [(set (match_operand:SWI 0 "nonimmediate_operand")
***************
*** 28252,28261 ****
  	(match_operator 1 "compare_operator"
  	  [(and:QI
  	     (subreg:QI
! 	       (match_operator:SWI248 4 "extract_operator"
! 		 [(match_operand 2 "int248_register_operand")
! 		  (const_int 8)
! 		  (const_int 8)]) 0)
  	     (match_operand 3 "const_int_operand"))
  	   (const_int 0)]))]
    "! TARGET_PARTIAL_REG_STALL
--- 28161,28168 ----
  	(match_operator 1 "compare_operator"
  	  [(and:QI
  	     (subreg:QI
! 	       (match_operator:SWI248 4 "extract_high_operator"
! 		 [(match_operand 2 "int248_register_operand")]) 0)
  	     (match_operand 3 "const_int_operand"))
  	   (const_int 0)]))]
    "! TARGET_PARTIAL_REG_STALL
***************
*** 28267,28275 ****
  	   (match_op_dup 1
  	     [(and:QI
  		(subreg:QI
! 		  (match_op_dup 4 [(match_dup 2)
! 				   (const_int 8)
! 				   (const_int 8)]) 0)
  		(match_dup 3))
  	      (const_int 0)]))
        (set (zero_extract:SWI248 (match_dup 2)
--- 28174,28182 ----
  	   (match_op_dup 1
  	     [(and:QI
  		(subreg:QI
! 		  (zero_extract:SWI248 (match_dup 2)
! 				       (const_int 8)
! 				       (const_int 8)) 0)
  		(match_dup 3))
  	      (const_int 0)]))
        (set (zero_extract:SWI248 (match_dup 2)
***************
*** 28278,28286 ****
  	   (subreg:SWI248
  	     (and:QI
  	       (subreg:QI
! 		 (match_op_dup 4 [(match_dup 2)
! 				  (const_int 8)
! 				  (const_int 8)]) 0)
  	       (match_dup 3)) 0))])])
  
  ;; Don't do logical operations with memory inputs.
--- 28185,28193 ----
  	   (subreg:SWI248
  	     (and:QI
  	       (subreg:QI
! 		 (zero_extract:SWI248 (match_dup 2)
! 				      (const_int 8)
! 				      (const_int 8)) 0)
  	       (match_dup 3)) 0))])])
  
  ;; Don't do logical operations with memory inputs.
diff -Nrcpad gcc-16-20250803/gcc/config/i386/predicates.md gcc-16-20250810/gcc/config/i386/predicates.md
*** gcc-16-20250803/gcc/config/i386/predicates.md	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/config/i386/predicates.md	Sun Aug 10 22:32:07 2025
***************
*** 1714,1723 ****
  (define_predicate "div_operator"
    (match_code "div"))
  
! ;; Return true if this is a and, ior or xor operation.
  (define_predicate "logic_operator"
    (match_code "and,ior,xor"))
  
  ;; Return true if this is a plus, minus, and, ior or xor operation.
  (define_predicate "plusminuslogic_operator"
    (match_code "plus,minus,and,ior,xor"))
--- 1714,1727 ----
  (define_predicate "div_operator"
    (match_code "div"))
  
! ;; Return true if this is an and, ior or xor operation.
  (define_predicate "logic_operator"
    (match_code "and,ior,xor"))
  
+ ;; Return true if this is an and operation.
+ (define_predicate "and_operator"
+   (match_code "and"))
+ 
  ;; Return true if this is a plus, minus, and, ior or xor operation.
  (define_predicate "plusminuslogic_operator"
    (match_code "plus,minus,and,ior,xor"))
***************
*** 1740,1747 ****
  (define_predicate "compare_operator"
    (match_code "compare"))
  
! (define_predicate "extract_operator"
!   (match_code "zero_extract,sign_extract"))
  
  ;; Return true if OP is a memory operand, aligned to
  ;; less than its natural alignment.
--- 1744,1755 ----
  (define_predicate "compare_operator"
    (match_code "compare"))
  
! (define_predicate "extract_high_operator"
!   (match_code "zero_extract,sign_extract,ashiftrt,lshiftrt")
! {
!   return (const8_operand (XEXP (op, 1), VOIDmode)
! 	  && (BINARY_P (op) || const8_operand (XEXP (op, 2), VOIDmode)));
! })
  
  ;; Return true if OP is a memory operand, aligned to
  ;; less than its natural alignment.
diff -Nrcpad gcc-16-20250803/gcc/config/mips/mips.h gcc-16-20250810/gcc/config/mips/mips.h
*** gcc-16-20250803/gcc/config/mips/mips.h	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/config/mips/mips.h	Sun Aug 10 22:32:07 2025
*************** enum reg_class
*** 2363,2370 ****
  
  #define STACK_GROWS_DOWNWARD 1
  
! #define FRAME_GROWS_DOWNWARD (flag_stack_protect != 0			\
! 			      || (flag_sanitize & SANITIZE_ADDRESS) != 0)
  
  /* Size of the area allocated in the frame to save the GP.  */
  
--- 2363,2376 ----
  
  #define STACK_GROWS_DOWNWARD 1
  
! /* Growing the frame downwards allows us to put spills closest to
!    the stack pointer which is good as they are likely to be accessed
!    frequently.  We can also arrange for normal stack usage to place
!    scalars last so that they too are close to the stack pointer.  */
! #define FRAME_GROWS_DOWNWARD ((TARGET_MIPS16			    \
! 			       && TARGET_FRAME_GROWS_DOWNWARDS)     \
! 			      || (flag_stack_protect != 0	    \
! 				  || (flag_sanitize & SANITIZE_ADDRESS) != 0))
  
  /* Size of the area allocated in the frame to save the GP.  */
  
diff -Nrcpad gcc-16-20250803/gcc/config/mips/mips.opt gcc-16-20250810/gcc/config/mips/mips.opt
*** gcc-16-20250803/gcc/config/mips/mips.opt	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/config/mips/mips.opt	Sun Aug 10 22:32:07 2025
*************** mframe-header-opt
*** 473,478 ****
--- 473,482 ----
  Target Var(flag_frame_header_optimization) Optimization
  Optimize frame header.
  
+ mgrow-frame-downwards
+ Target Var(TARGET_FRAME_GROWS_DOWNWARDS) Init(1) Undocumented
+ Change the behaviour to grow the frame downwards.
+ 
  noasmopt
  Driver
  
diff -Nrcpad gcc-16-20250803/gcc/config/riscv/arch-canonicalize gcc-16-20250810/gcc/config/riscv/arch-canonicalize
*** gcc-16-20250803/gcc/config/riscv/arch-canonicalize	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/config/riscv/arch-canonicalize	Sun Aug 10 22:32:07 2025
***************
*** 20,96 ****
  # along with GCC; see the file COPYING3.  If not see
  # <http://www.gnu.org/licenses/>.
  
- # TODO: Extract riscv_subset_t from riscv-common.cc and make it can be compiled
- #       standalone to replace this script, that also prevents us implementing
- #       that twice and keep sync again and again.
- 
  from __future__ import print_function
  import sys
  import argparse
  import collections
  import itertools
  from functools import reduce
  
  SUPPORTED_ISA_SPEC = ["2.2", "20190608", "20191213"]
  CANONICAL_ORDER = "imafdqlcbkjtpvnh"
  LONG_EXT_PREFIXES = ['z', 's', 'h', 'x']
  
! #
! # IMPLIED_EXT(ext) -> implied extension list.
! #
! IMPLIED_EXT = {
!   "d" : ["f", "zicsr"],
  
!   "a" : ["zaamo", "zalrsc"],
!   "zabha" : ["zaamo"],
!   "zacas" : ["zaamo"],
  
!   "f" : ["zicsr"],
!   "b" : ["zba", "zbb", "zbs"],
!   "zdinx" : ["zfinx", "zicsr"],
!   "zfinx" : ["zicsr"],
!   "zhinx" : ["zhinxmin", "zfinx", "zicsr"],
!   "zhinxmin" : ["zfinx", "zicsr"],
  
!   "zk" : ["zkn", "zkr", "zkt"],
!   "zkn" : ["zbkb", "zbkc", "zbkx", "zkne", "zknd", "zknh"],
!   "zks" : ["zbkb", "zbkc", "zbkx", "zksed", "zksh"],
  
!   "v" : ["zvl128b", "zve64d"],
!   "zve32x" : ["zvl32b"],
!   "zve64x" : ["zve32x", "zvl64b"],
!   "zve32f" : ["f", "zve32x"],
!   "zve64f" : ["f", "zve32f", "zve64x"],
!   "zve64d" : ["d", "zve64f"],
  
!   "zvl64b" : ["zvl32b"],
!   "zvl128b" : ["zvl64b"],
!   "zvl256b" : ["zvl128b"],
!   "zvl512b" : ["zvl256b"],
!   "zvl1024b" : ["zvl512b"],
!   "zvl2048b" : ["zvl1024b"],
!   "zvl4096b" : ["zvl2048b"],
!   "zvl8192b" : ["zvl4096b"],
!   "zvl16384b" : ["zvl8192b"],
!   "zvl32768b" : ["zvl16384b"],
!   "zvl65536b" : ["zvl32768b"],
  
!   "zvkn"   : ["zvkned", "zvknhb", "zvkb", "zvkt"],
!   "zvknc"  : ["zvkn", "zvbc"],
!   "zvkng"  : ["zvkn", "zvkg"],
!   "zvks"   : ["zvksed", "zvksh", "zvkb", "zvkt"],
!   "zvksc"  : ["zvks", "zvbc"],
!   "zvksg"  : ["zvks", "zvkg"],
!   "zvbb"   : ["zvkb"],
!   "zvbc"   : ["zve64x"],
!   "zvkb"   : ["zve32x"],
!   "zvkg"   : ["zve32x"],
!   "zvkned" : ["zve32x"],
!   "zvknha" : ["zve32x"],
!   "zvknhb" : ["zve64x"],
!   "zvksed" : ["zve32x"],
!   "zvksh"  : ["zve32x"],
! }
  
  def arch_canonicalize(arch, isa_spec):
    # TODO: Support extension version.
--- 20,333 ----
  # along with GCC; see the file COPYING3.  If not see
  # <http://www.gnu.org/licenses/>.
  
  from __future__ import print_function
  import sys
  import argparse
  import collections
  import itertools
+ import re
+ import os
  from functools import reduce
  
  SUPPORTED_ISA_SPEC = ["2.2", "20190608", "20191213"]
  CANONICAL_ORDER = "imafdqlcbkjtpvnh"
  LONG_EXT_PREFIXES = ['z', 's', 'h', 'x']
  
! def parse_define_riscv_ext(content):
!   """Parse DEFINE_RISCV_EXT macros using position-based parsing."""
!   extensions = []
  
!   # Find all DEFINE_RISCV_EXT blocks
!   pattern = r'DEFINE_RISCV_EXT\s*\('
!   matches = []
  
!   pos = 0
!   while True:
!     match = re.search(pattern, content[pos:])
!     if not match:
!       break
  
!     start_pos = pos + match.start()
!     paren_count = 0
!     current_pos = pos + match.end() - 1  # Start at the opening parenthesis
  
!     # Find the matching closing parenthesis
!     while current_pos < len(content):
!       if content[current_pos] == '(':
!         paren_count += 1
!       elif content[current_pos] == ')':
!         paren_count -= 1
!         if paren_count == 0:
!           break
!       current_pos += 1
  
!     if paren_count == 0:
!       # Extract the content inside parentheses
!       macro_content = content[pos + match.end():current_pos]
!       ext_data = parse_macro_arguments(macro_content)
!       if ext_data:
!         extensions.append(ext_data)
  
!     pos = current_pos + 1
! 
!   return extensions
! 
! def parse_macro_arguments(macro_content):
!   """Parse the arguments of a DEFINE_RISCV_EXT macro."""
!   # Remove comments /* ... */
!   cleaned_content = re.sub(r'/\*[^*]*\*/', '', macro_content)
! 
!   # Split arguments by comma, but respect nested structures
!   args = []
!   current_arg = ""
!   paren_count = 0
!   brace_count = 0
!   in_string = False
!   escape_next = False
! 
!   for char in cleaned_content:
!     if escape_next:
!       current_arg += char
!       escape_next = False
!       continue
! 
!     if char == '\\':
!       escape_next = True
!       current_arg += char
!       continue
! 
!     if char == '"' and not escape_next:
!       in_string = not in_string
!       current_arg += char
!       continue
! 
!     if in_string:
!       current_arg += char
!       continue
! 
!     if char == '(':
!       paren_count += 1
!     elif char == ')':
!       paren_count -= 1
!     elif char == '{':
!       brace_count += 1
!     elif char == '}':
!       brace_count -= 1
!     elif char == ',' and paren_count == 0 and brace_count == 0:
!       args.append(current_arg.strip())
!       current_arg = ""
!       continue
! 
!     current_arg += char
! 
!   # Add the last argument
!   if current_arg.strip():
!     args.append(current_arg.strip())
! 
!   # We need at least 6 arguments to get DEP_EXTS (position 5)
!   if len(args) < 6:
!     return None
! 
!   ext_name = args[0].strip()
!   dep_exts_arg = args[5].strip()  # DEP_EXTS is at position 5
! 
!   # Parse dependency extensions from the DEP_EXTS argument
!   deps = parse_dep_exts(dep_exts_arg)
! 
!   return {
!     'name': ext_name,
!     'dep_exts': deps
!   }
! 
! def parse_dep_exts(dep_exts_str):
!   """Parse the DEP_EXTS argument to extract dependency list with conditions."""
!   # Remove outer parentheses if present
!   dep_exts_str = dep_exts_str.strip()
!   if dep_exts_str.startswith('(') and dep_exts_str.endswith(')'):
!     dep_exts_str = dep_exts_str[1:-1].strip()
! 
!   # Remove outer braces if present
!   if dep_exts_str.startswith('{') and dep_exts_str.endswith('}'):
!     dep_exts_str = dep_exts_str[1:-1].strip()
! 
!   if not dep_exts_str:
!     return []
! 
!   deps = []
! 
!   # First, find and process conditional dependencies
!   conditional_pattern = r'\{\s*"([^"]+)"\s*,\s*(\[.*?\]\s*\([^)]*\)\s*->\s*bool.*?)\}'
!   conditional_matches = []
! 
!   for match in re.finditer(conditional_pattern, dep_exts_str, re.DOTALL):
!     ext_name = match.group(1)
!     condition_code = match.group(2)
!     deps.append({'ext': ext_name, 'type': 'conditional', 'condition': condition_code})
!     conditional_matches.append((match.start(), match.end()))
! 
!   # Remove conditional dependency blocks from the string
!   remaining_str = dep_exts_str
!   for start, end in reversed(conditional_matches):  # Reverse order to maintain indices
!     remaining_str = remaining_str[:start] + remaining_str[end:]
! 
!   # Now handle simple quoted strings in the remaining text
!   for match in re.finditer(r'"([^"]+)"', remaining_str):
!     deps.append({'ext': match.group(1), 'type': 'simple'})
! 
!   # Remove duplicates while preserving order
!   seen = set()
!   unique_deps = []
!   for dep in deps:
!     key = (dep['ext'], dep['type'])
!     if key not in seen:
!       seen.add(key)
!       unique_deps.append(dep)
! 
!   return unique_deps
! 
! def evaluate_conditional_dependency(ext, dep, xlen, current_exts):
!   """Evaluate whether a conditional dependency should be included."""
!   ext_name = dep['ext']
!   condition = dep['condition']
!   # Parse the condition based on known patterns
!   if ext_name == 'zcf' and ext in ['zca', 'c', 'zce']:
!     # zcf depends on RV32 and F extension
!     return xlen == 32 and 'f' in current_exts
!   elif ext_name == 'zcd' and ext in ['zca', 'c']:
!     # zcd depends on D extension
!     return 'd' in current_exts
!   elif ext_name == 'c' and ext in ['zca']:
!     # Special case for zca -> c conditional dependency
!     if xlen == 32:
!       if 'd' in current_exts:
!         return 'zcf' in current_exts and 'zcd' in current_exts
!       elif 'f' in current_exts:
!         return 'zcf' in current_exts
!       else:
!         return True
!     elif xlen == 64:
!       if 'd' in current_exts:
!         return 'zcd' in current_exts
!       else:
!         return True
!     return False
!   else:
!     # Report error for unhandled conditional dependencies
!     import sys
!     print(f"ERROR: Unhandled conditional dependency: '{ext_name}' with condition:", file=sys.stderr)
!     print(f"  Condition code: {condition[:100]}...", file=sys.stderr)
!     print(f"  Current context: xlen={xlen}, exts={sorted(current_exts)}", file=sys.stderr)
!     # For now, return False to be safe
!     return False
! 
! def resolve_dependencies(arch_parts, xlen):
!   """Resolve all dependencies including conditional ones."""
!   current_exts = set(arch_parts)
!   implied_deps = set()
! 
!   # Keep resolving until no new dependencies are found
!   changed = True
!   while changed:
!     changed = False
!     new_deps = set()
! 
!     for ext in current_exts | implied_deps:
!       if ext in IMPLIED_EXT:
!         for dep in IMPLIED_EXT[ext]:
!           if dep['type'] == 'simple':
!             if dep['ext'] not in current_exts and dep['ext'] not in implied_deps:
!               new_deps.add(dep['ext'])
!               changed = True
!           elif dep['type'] == 'conditional':
!             should_include = evaluate_conditional_dependency(ext, dep, xlen, current_exts | implied_deps)
!             if should_include:
!               if dep['ext'] not in current_exts and dep['ext'] not in implied_deps:
!                 new_deps.add(dep['ext'])
!                 changed = True
! 
!     implied_deps.update(new_deps)
! 
!   return implied_deps
! 
! def parse_def_file(file_path, script_dir, processed_files=None, collect_all=False):
!   """Parse a single .def file and recursively process #include directives."""
!   if processed_files is None:
!     processed_files = set()
! 
!   # Avoid infinite recursion
!   if file_path in processed_files:
!     return ({}, set()) if collect_all else {}
!   processed_files.add(file_path)
! 
!   implied_ext = {}
!   all_extensions = set() if collect_all else None
! 
!   if not os.path.exists(file_path):
!     return (implied_ext, all_extensions) if collect_all else implied_ext
! 
!   with open(file_path, 'r') as f:
!     content = f.read()
! 
!   # Process #include directives first
!   include_pattern = r'#include\s+"([^"]+)"'
!   includes = re.findall(include_pattern, content)
! 
!   for include_file in includes:
!     include_path = os.path.join(script_dir, include_file)
!     if collect_all:
!       included_ext, included_all = parse_def_file(include_path, script_dir, processed_files, collect_all)
!       implied_ext.update(included_ext)
!       all_extensions.update(included_all)
!     else:
!       included_ext = parse_def_file(include_path, script_dir, processed_files, collect_all)
!       implied_ext.update(included_ext)
! 
!   # Parse DEFINE_RISCV_EXT blocks using position-based parsing
!   parsed_exts = parse_define_riscv_ext(content)
! 
!   for ext_data in parsed_exts:
!     ext_name = ext_data['name']
!     deps = ext_data['dep_exts']
! 
!     if collect_all:
!       all_extensions.add(ext_name)
! 
!     if deps:
!       implied_ext[ext_name] = deps
! 
!   return (implied_ext, all_extensions) if collect_all else implied_ext
! 
! def parse_def_files():
!   """Parse RISC-V extension definition files starting from riscv-ext.def."""
!   # Get directory containing this script
!   try:
!     script_dir = os.path.dirname(os.path.abspath(__file__))
!   except NameError:
!     # When __file__ is not defined (e.g., interactive mode)
!     script_dir = os.getcwd()
! 
!   # Start with the main definition file
!   main_def_file = os.path.join(script_dir, 'riscv-ext.def')
!   return parse_def_file(main_def_file, script_dir)
! 
! def get_all_extensions():
!   """Get all supported extensions and their implied extensions."""
!   # Get directory containing this script
!   try:
!     script_dir = os.path.dirname(os.path.abspath(__file__))
!   except NameError:
!     # When __file__ is not defined (e.g., interactive mode)
!     script_dir = os.getcwd()
! 
!   # Start with the main definition file
!   main_def_file = os.path.join(script_dir, 'riscv-ext.def')
!   return parse_def_file(main_def_file, script_dir, collect_all=True)
! 
! #
! # IMPLIED_EXT(ext) -> implied extension list.
! # This is loaded dynamically from .def files
! #
! IMPLIED_EXT = parse_def_files()
  
  def arch_canonicalize(arch, isa_spec):
    # TODO: Support extension version.
*************** def arch_canonicalize(arch, isa_spec):
*** 123,143 ****
    long_exts += extra_long_ext
  
    #
!   # Handle implied extensions.
    #
!   any_change = True
!   while any_change:
!     any_change = False
!     for ext in std_exts + long_exts:
!       if ext in IMPLIED_EXT:
!         implied_exts = IMPLIED_EXT[ext]
!         for implied_ext in implied_exts:
!           if implied_ext == 'zicsr' and is_isa_spec_2p2:
!               continue
  
!           if implied_ext not in std_exts + long_exts:
!             long_exts.append(implied_ext)
!             any_change = True
  
    # Single letter extension might appear in the long_exts list,
    # because we just append extensions list to the arch string.
--- 360,390 ----
    long_exts += extra_long_ext
  
    #
!   # Handle implied extensions using new conditional logic.
    #
!   # Extract xlen from architecture string
!   # TODO: We should support profile here.
!   if arch.startswith('rv32'):
!     xlen = 32
!   elif arch.startswith('rv64'):
!     xlen = 64
!   else:
!     raise Exception("Unsupported prefix `%s`" % arch)
  
!   # Get all current extensions
!   current_exts = std_exts + long_exts
! 
!   # Resolve dependencies
!   implied_deps = resolve_dependencies(current_exts, xlen)
! 
!   # Filter out zicsr for ISA spec 2.2
!   if is_isa_spec_2p2:
!     implied_deps.discard('zicsr')
! 
!   # Add implied dependencies to long_exts
!   for dep in implied_deps:
!     if dep not in current_exts:
!       long_exts.append(dep)
  
    # Single letter extension might appear in the long_exts list,
    # because we just append extensions list to the arch string.
*************** def arch_canonicalize(arch, isa_spec):
*** 179,195 ****
  
    return new_arch
  
! if len(sys.argv) < 2:
!   print ("Usage: %s <arch_str> [<arch_str>*]" % sys.argv)
!   sys.exit(1)
  
! parser = argparse.ArgumentParser()
! parser.add_argument('-misa-spec', type=str,
!                     default='20191213',
!                     choices=SUPPORTED_ISA_SPEC)
! parser.add_argument('arch_strs', nargs=argparse.REMAINDER)
  
! args = parser.parse_args()
  
! for arch in args.arch_strs:
!   print (arch_canonicalize(arch, args.misa_spec))
--- 426,596 ----
  
    return new_arch
  
! def dump_all_extensions():
!   """Dump all extensions and their implied extensions."""
!   implied_ext, all_extensions = get_all_extensions()
  
!   print("All supported RISC-V extensions:")
!   print("=" * 60)
  
!   if not all_extensions:
!     print("No extensions found.")
!     return
  
!   # Sort all extensions for consistent output
!   sorted_all = sorted(all_extensions)
! 
!   # Print all extensions with their dependencies (if any)
!   for ext_name in sorted_all:
!     if ext_name in implied_ext:
!       deps = implied_ext[ext_name]
!       dep_strs = []
!       for dep in deps:
!         if dep['type'] == 'simple':
!           dep_strs.append(dep['ext'])
!         else:
!           dep_strs.append(f"{dep['ext']}*")  # Mark conditional deps with *
!       print(f"{ext_name:15} -> {', '.join(dep_strs)}")
!     else:
!       print(f"{ext_name:15} -> (no dependencies)")
! 
!   print(f"\nTotal extensions: {len(all_extensions)}")
!   print(f"Extensions with dependencies: {len(implied_ext)}")
!   print(f"Extensions without dependencies: {len(all_extensions) - len(implied_ext)}")
! 
! def run_unit_tests():
!   """Run unit tests using pytest dynamically imported."""
!   try:
!     import pytest
!   except ImportError:
!     print("Error: pytest is required for running unit tests.")
!     print("Please install pytest: pip install pytest")
!     return 1
! 
!   # Define test functions
!   def test_basic_arch_parsing():
!     """Test basic architecture string parsing."""
!     result = arch_canonicalize("rv64i", "20191213")
!     assert result == "rv64i"
! 
!   def test_simple_extensions():
!     """Test simple extension handling."""
!     result = arch_canonicalize("rv64im", "20191213")
!     assert "zmmul" in result
! 
!   def test_implied_extensions():
!     """Test implied extension resolution."""
!     result = arch_canonicalize("rv64imaf", "20191213")
!     assert "zicsr" in result
! 
!   def test_conditional_dependencies():
!     """Test conditional dependency evaluation."""
!     # Test RV32 with F extension should include zcf when c is present
!     result = arch_canonicalize("rv32ifc", "20191213")
!     parts = result.split("_")
!     if "c" in parts:
!       assert "zca" in parts
!       if "f" in parts:
!         assert "zcf" in parts
! 
!   def test_parse_dep_exts():
!     """Test dependency parsing function."""
!     # Test simple dependency
!     deps = parse_dep_exts('{"ext1", "ext2"}')
!     assert len(deps) == 2
!     assert deps[0]['ext'] == 'ext1'
!     assert deps[0]['type'] == 'simple'
! 
!   def test_evaluate_conditional_dependency():
!     """Test conditional dependency evaluation."""
!     # Test zcf condition for RV32 with F
!     dep = {'ext': 'zcf', 'type': 'conditional', 'condition': 'test'}
!     result = evaluate_conditional_dependency('zce', dep, 32, {'f'})
!     assert result == True
! 
!     # Test zcf condition for RV64 with F (should be False)
!     result = evaluate_conditional_dependency('zce', dep, 64, {'f'})
!     assert result == False
! 
!   def test_parse_define_riscv_ext():
!     """Test DEFINE_RISCV_EXT parsing."""
!     content = '''
!     DEFINE_RISCV_EXT(
!       /* NAME */ test,
!       /* UPPERCASE_NAME */ TEST,
!       /* FULL_NAME */ "Test extension",
!       /* DESC */ "",
!       /* URL */ ,
!       /* DEP_EXTS */ ({"dep1", "dep2"}),
!       /* SUPPORTED_VERSIONS */ ({{1, 0}}),
!       /* FLAG_GROUP */ test,
!       /* BITMASK_GROUP_ID */ 0,
!       /* BITMASK_BIT_POSITION*/ 0,
!       /* EXTRA_EXTENSION_FLAGS */ 0)
!     '''
! 
!     extensions = parse_define_riscv_ext(content)
!     assert len(extensions) == 1
!     assert extensions[0]['name'] == 'test'
!     assert len(extensions[0]['dep_exts']) == 2
! 
!   # Collect test functions
!   test_functions = [
!     test_basic_arch_parsing,
!     test_simple_extensions,
!     test_implied_extensions,
!     test_conditional_dependencies,
!     test_parse_dep_exts,
!     test_evaluate_conditional_dependency,
!     test_parse_define_riscv_ext
!   ]
! 
!   # Run tests manually first, then optionally with pytest
!   print("Running unit tests...")
! 
!   passed = 0
!   failed = 0
! 
!   for i, test_func in enumerate(test_functions):
!     try:
!       print(f"  Running {test_func.__name__}...", end=" ")
!       test_func()
!       print("PASSED")
!       passed += 1
!     except Exception as e:
!       print(f"FAILED: {e}")
!       failed += 1
! 
!   print(f"\nTest Summary: {passed} passed, {failed} failed")
! 
!   if failed == 0:
!     print("\nAll tests passed!")
!     return 0
!   else:
!     print(f"\n{failed} test(s) failed!")
!     return 1
! 
! if __name__ == "__main__":
!   parser = argparse.ArgumentParser()
!   parser.add_argument('-misa-spec', type=str,
!                       default='20191213',
!                       choices=SUPPORTED_ISA_SPEC)
!   parser.add_argument('--dump-all', action='store_true',
!                       help='Dump all extensions and their implied extensions')
!   parser.add_argument('--selftest', action='store_true',
!                       help='Run unit tests using pytest')
!   parser.add_argument('arch_strs', nargs='*',
!                       help='Architecture strings to canonicalize')
! 
!   args = parser.parse_args()
! 
!   if args.dump_all:
!     dump_all_extensions()
!   elif args.selftest:
!     sys.exit(run_unit_tests())
!   elif args.arch_strs:
!     for arch in args.arch_strs:
!       print (arch_canonicalize(arch, args.misa_spec))
!   else:
!     parser.print_help()
!     sys.exit(1)
diff -Nrcpad gcc-16-20250803/gcc/config/riscv/riscv.cc gcc-16-20250810/gcc/config/riscv/riscv.cc
*** gcc-16-20250803/gcc/config/riscv/riscv.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/config/riscv/riscv.cc	Sun Aug 10 22:32:07 2025
*************** riscv_expand_xmode_usmul (rtx dest, rtx
*** 13867,13875 ****
    riscv_emit_binary (MULT, mul, x, y);
  
    if (TARGET_64BIT)
!     emit_insn (gen_usmuldi3_highpart (mulhu, x, y));
    else
!     emit_insn (gen_usmulsi3_highpart (mulhu, x, y));
  
    riscv_emit_binary (NE, overflow_p, mulhu, CONST0_RTX (Xmode));
    riscv_emit_unary (NEG, overflow_p, overflow_p);
--- 13867,13875 ----
    riscv_emit_binary (MULT, mul, x, y);
  
    if (TARGET_64BIT)
!     emit_insn (gen_umuldi3_highpart (mulhu, x, y));
    else
!     emit_insn (gen_umulsi3_highpart (mulhu, x, y));
  
    riscv_emit_binary (NE, overflow_p, mulhu, CONST0_RTX (Xmode));
    riscv_emit_unary (NEG, overflow_p, overflow_p);
diff -Nrcpad gcc-16-20250803/gcc/config/riscv/riscv.h gcc-16-20250810/gcc/config/riscv/riscv.h
*** gcc-16-20250803/gcc/config/riscv/riscv.h	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/config/riscv/riscv.h	Sun Aug 10 22:32:07 2025
*************** extern const char *riscv_arch_help (int
*** 71,77 ****
    {"tune", "%{!mtune=*:"						\
  	   "  %{!mcpu=*:-mtune=%(VALUE)}"				\
  	   "  %{mcpu=*:-mtune=%:riscv_default_mtune(%* %(VALUE))}}" },	\
!   {"arch", "%{!march=*:"						\
  	   "  %{!mcpu=*:-march=%(VALUE)}"				\
  	   "  %{mcpu=*:%:riscv_expand_arch_from_cpu(%* %(VALUE))}}" },	\
    {"abi", "%{!mabi=*:-mabi=%(VALUE)}" },				\
--- 71,77 ----
    {"tune", "%{!mtune=*:"						\
  	   "  %{!mcpu=*:-mtune=%(VALUE)}"				\
  	   "  %{mcpu=*:-mtune=%:riscv_default_mtune(%* %(VALUE))}}" },	\
!   {"arch", "%{!march=*|march=unset:"					\
  	   "  %{!mcpu=*:-march=%(VALUE)}"				\
  	   "  %{mcpu=*:%:riscv_expand_arch_from_cpu(%* %(VALUE))}}" },	\
    {"abi", "%{!mabi=*:-mabi=%(VALUE)}" },				\
*************** extern const char *riscv_arch_help (int
*** 111,123 ****
  %(subtarget_asm_spec)" \
  ASM_MISA_SPEC
  
  #undef DRIVER_SELF_SPECS
  #define DRIVER_SELF_SPECS					\
  "%{march=help:%:riscv_arch_help()} "				\
  "%{print-supported-extensions:%:riscv_arch_help()} "		\
  "%{-print-supported-extensions:%:riscv_arch_help()} "		\
  "%{march=*:%:riscv_expand_arch(%*)} "				\
! "%{!march=*:%{mcpu=*:%:riscv_expand_arch_from_cpu(%*)}} "
  
  #define LOCAL_LABEL_PREFIX	"."
  #define USER_LABEL_PREFIX	""
--- 111,129 ----
  %(subtarget_asm_spec)" \
  ASM_MISA_SPEC
  
+ /* Drop all -march=* options before -march=unset.  */
+ #define ARCH_UNSET_CLEANUP_SPECS  \
+   "%{march=unset:%<march=*} "  \
+ 
  #undef DRIVER_SELF_SPECS
  #define DRIVER_SELF_SPECS					\
+ ARCH_UNSET_CLEANUP_SPECS \
  "%{march=help:%:riscv_arch_help()} "				\
  "%{print-supported-extensions:%:riscv_arch_help()} "		\
  "%{-print-supported-extensions:%:riscv_arch_help()} "		\
  "%{march=*:%:riscv_expand_arch(%*)} "				\
! "%{!march=*|march=unset:%{mcpu=*:%:riscv_expand_arch_from_cpu(%*)}} " \
! "%{march=unset:%{!mcpu=*:%eAt least one valid -mcpu option must be given after -march=unset}} "
  
  #define LOCAL_LABEL_PREFIX	"."
  #define USER_LABEL_PREFIX	""
diff -Nrcpad gcc-16-20250803/gcc/config/s390/s390.cc gcc-16-20250810/gcc/config/s390/s390.cc
*** gcc-16-20250803/gcc/config/s390/s390.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/config/s390/s390.cc	Sun Aug 10 22:32:07 2025
*************** print_operand (FILE *file, rtx x, int co
*** 9239,9253 ****
        else if (code == 'h')
  	fprintf (file, HOST_WIDE_INT_PRINT_DEC,
  		 ((CONST_WIDE_INT_ELT (x, 0) & 0xffff) ^ 0x8000) - 0x8000);
        else
! 	{
! 	  if (code == 0)
! 	    output_operand_lossage ("invalid constant - try using "
! 				    "an output modifier");
! 	  else
! 	    output_operand_lossage ("invalid constant for output modifier '%c'",
! 				    code);
! 	}
        break;
      case CONST_VECTOR:
        switch (code)
--- 9239,9250 ----
        else if (code == 'h')
  	fprintf (file, HOST_WIDE_INT_PRINT_DEC,
  		 ((CONST_WIDE_INT_ELT (x, 0) & 0xffff) ^ 0x8000) - 0x8000);
+       /* Support arbitrary _BitInt constants in asm statements.  */
+       else if (code == 0)
+ 	output_addr_const (file, x);
        else
! 	output_operand_lossage ("invalid constant for output modifier '%c'",
! 				code);
        break;
      case CONST_VECTOR:
        switch (code)
*************** s390_c_mode_for_floating_type (enum tree
*** 18768,18773 ****
--- 18765,18791 ----
    return default_mode_for_floating_type (ti);
  }
  
+ /* Return true if _BitInt(N) is supported and fill its details into *INFO.  */
+ 
+ bool
+ s390_bitint_type_info (int n, struct bitint_info *info)
+ {
+   if (!TARGET_64BIT)
+     return false;
+   if (n <= 8)
+     info->limb_mode = QImode;
+   else if (n <= 16)
+     info->limb_mode = HImode;
+   else if (n <= 32)
+     info->limb_mode = SImode;
+   else
+     info->limb_mode = DImode;
+   info->abi_limb_mode = info->limb_mode;
+   info->big_endian = true;
+   info->extended = true;
+   return true;
+ }
+ 
  /* Initialize GCC target structure.  */
  
  #undef  TARGET_ASM_ALIGNED_HI_OP
*************** s390_c_mode_for_floating_type (enum tree
*** 19089,19094 ****
--- 19107,19115 ----
  #undef TARGET_DOCUMENTATION_NAME
  #define TARGET_DOCUMENTATION_NAME "S/390"
  
+ #undef TARGET_C_BITINT_TYPE_INFO
+ #define TARGET_C_BITINT_TYPE_INFO s390_bitint_type_info
+ 
  struct gcc_target targetm = TARGET_INITIALIZER;
  
  #include "gt-s390.h"
diff -Nrcpad gcc-16-20250803/gcc/config/xtensa/constraints.md gcc-16-20250810/gcc/config/xtensa/constraints.md
*** gcc-16-20250803/gcc/config/xtensa/constraints.md	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/config/xtensa/constraints.md	Sun Aug 10 22:32:07 2025
***************
*** 130,136 ****
   (and (match_code "mem")
        (match_test "smalloffset_mem_p (op)")))
  
! (define_memory_constraint "T"
   "Memory in a literal pool (addressable with an L32R instruction)."
   (and (match_code "mem")
        (match_test "!TARGET_CONST16 && constantpool_mem_p (op)")))
--- 130,136 ----
   (and (match_code "mem")
        (match_test "smalloffset_mem_p (op)")))
  
! (define_special_memory_constraint "T"
   "Memory in a literal pool (addressable with an L32R instruction)."
   (and (match_code "mem")
        (match_test "!TARGET_CONST16 && constantpool_mem_p (op)")))
diff -Nrcpad gcc-16-20250803/gcc/configure gcc-16-20250810/gcc/configure
*** gcc-16-20250803/gcc/configure	Sun Aug  3 22:34:12 2025
--- gcc-16-20250810/gcc/configure	Sun Aug 10 22:33:26 2025
*************** c_strict_warn
*** 872,878 ****
  strict_warn
  c_loose_warn
  loose_warn
- aliasing_flags
  CPP
  EGREP
  GREP
--- 872,877 ----
*************** $as_echo "#define HAVE_SWAP_IN_UTILITY 1
*** 7126,7170 ****
  
  fi
  
- # Check whether compiler is affected by placement new aliasing bug (PR 29286).
- # If the host compiler is affected by the bug, and we build with optimization
- # enabled (which happens e.g. when cross-compiling), the pool allocator may
- # get miscompiled.  Use -fno-strict-aliasing to work around this problem.
- # Since there is no reliable feature check for the presence of this bug,
- # we simply use a GCC version number check.  (This should never trigger for
- # stages 2 or 3 of a native bootstrap.)
- aliasing_flags=
- if test "$GCC" = yes; then
-   saved_CXXFLAGS="$CXXFLAGS"
- 
-   # The following test compilation will succeed if and only if $CXX accepts
-   # -fno-strict-aliasing *and* is older than GCC 4.3.
-   CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX is affected by placement new aliasing bug" >&5
- $as_echo_n "checking whether $CXX is affected by placement new aliasing bug... " >&6; }
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- 
- #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
- #error compiler not affected by placement new aliasing bug
- #endif
- 
- _ACEOF
- if ac_fn_cxx_try_compile "$LINENO"; then :
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }; aliasing_flags='-fno-strict-aliasing'
- else
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- 
-   CXXFLAGS="$saved_CXXFLAGS"
- fi
- 
- 
- 
- 
  # ---------------------
  # Warnings and checking
  # ---------------------
--- 7125,7130 ----
*************** fi
*** 11308,11313 ****
--- 11268,11274 ----
  
  
  
+ 
      use_additional=yes
  
    acl_save_prefix="$prefix"
*************** $as_echo "$LIBICONV" >&6; }
*** 14236,14241 ****
--- 14197,14203 ----
  
  
  
+ 
      use_additional=yes
  
    acl_save_prefix="$prefix"
*************** else
*** 21522,21528 ****
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
! #line 21525 "configure"
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
--- 21484,21490 ----
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
! #line 21487 "configure"
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
*************** else
*** 21628,21634 ****
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
! #line 21631 "configure"
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
--- 21590,21596 ----
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
! #line 21593 "configure"
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
diff -Nrcpad gcc-16-20250803/gcc/configure.ac gcc-16-20250810/gcc/configure.ac
*** gcc-16-20250803/gcc/configure.ac	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/configure.ac	Sun Aug 10 22:32:07 2025
*************** if test $ac_cv_std_swap_in_utility = yes
*** 563,597 ****
    [Define if <utility> defines std::swap.])
  fi
  
- # Check whether compiler is affected by placement new aliasing bug (PR 29286).
- # If the host compiler is affected by the bug, and we build with optimization
- # enabled (which happens e.g. when cross-compiling), the pool allocator may
- # get miscompiled.  Use -fno-strict-aliasing to work around this problem.
- # Since there is no reliable feature check for the presence of this bug,
- # we simply use a GCC version number check.  (This should never trigger for
- # stages 2 or 3 of a native bootstrap.)
- aliasing_flags=
- if test "$GCC" = yes; then
-   saved_CXXFLAGS="$CXXFLAGS"
- 
-   # The following test compilation will succeed if and only if $CXX accepts
-   # -fno-strict-aliasing *and* is older than GCC 4.3.
-   CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
-   AC_MSG_CHECKING([whether $CXX is affected by placement new aliasing bug])
-   AC_COMPILE_IFELSE([AC_LANG_SOURCE([
- #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
- #error compiler not affected by placement new aliasing bug
- #endif
- ])],
-     [AC_MSG_RESULT([yes]); aliasing_flags='-fno-strict-aliasing'],
-     [AC_MSG_RESULT([no])])
- 
-   CXXFLAGS="$saved_CXXFLAGS"
- fi
- AC_SUBST(aliasing_flags)
- 
- 
- 
  # ---------------------
  # Warnings and checking
  # ---------------------
--- 563,568 ----
diff -Nrcpad gcc-16-20250803/gcc/cp/ChangeLog gcc-16-20250810/gcc/cp/ChangeLog
*** gcc-16-20250803/gcc/cp/ChangeLog	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/cp/ChangeLog	Sun Aug 10 22:32:07 2025
***************
*** 1,3 ****
--- 1,101 ----
+ 2025-08-08  David Malcolm  <dmalcolm@redhat.com>
+ 
+ 	* error.cc (cp_adjust_diagnostic_info): Convert "context" arg from
+ 	ptr to const &.
+ 
+ 2025-08-07  Patrick Palka  <ppalka@redhat.com>
+ 
+ 	* call.cc (extract_call_expr): Remove handling of C++20
+ 	rewritten comparison operators.
+ 
+ 2025-08-07  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR c++/117783
+ 	* parser.cc: Implement C++26 P1061R10 - Structured Bindings can
+ 	introduce a Pack.
+ 	(cp_parser_range_for): Also handle TREE_VEC as DECL_VALUE_EXPR
+ 	instead of ARRAY_REF.
+ 	(cp_parser_decomposition_declaration): Use sb-identifier-list instead
+ 	of identifier-list in comments.  Parse structured bindings with
+ 	structured binding pack.  Don't emit pedwarn about structured
+ 	binding attributes in structured bindings inside of a condition.
+ 	(cp_convert_omp_range_for): Also handle TREE_VEC as DECL_VALUE_EXPR
+ 	instead of ARRAY_REF.
+ 	* decl.cc (get_tuple_element_type): Change i argument type from
+ 	unsigned to unsigned HOST_WIDE_INT.
+ 	(get_tuple_decomp_init): Likewise.
+ 	(set_sb_pack_name): New function.
+ 	(cp_finish_decomp): Handle structured binding packs.
+ 	* pt.cc (tsubst_pack_expansion): Handle structured binding packs
+ 	and capture proxies for them.  Formatting fixes.
+ 	(tsubst_decl): For structured binding packs don't tsubst TREE_TYPE
+ 	first, instead recreate the type after r is created.
+ 	(tsubst_omp_for_iterator): Also handle TREE_VEC as DECL_VALUE_EXPR
+ 	instead of ARRAY_REF.
+ 	(tsubst_expr): Handle sizeof... on non-dependent structure binding
+ 	packs.
+ 	(value_dependent_expression_p): Return false for sizeof... on
+ 	non-dependent structure binding packs.
+ 	(instantiation_dependent_r): Don't recurse on sizeof... on
+ 	non-dependent structure binding packs.
+ 	* constexpr.cc (potential_constant_expression_1): Also handle
+ 	TREE_VEC on DECL_VALUE_EXPR of structure binding packs.
+ 
+ 2025-08-07  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR preprocessor/120778
+ 	* lex.cc (cxx_init): Mark cpp nodes corresponding
+ 	to keywords, identifiers with special meaning and standard
+ 	attribute identifiers as NODE_WARN if warn_keyword_macro.
+ 
+ 2025-08-06  Patrick Palka  <ppalka@redhat.com>
+ 
+ 	PR c++/121231
+ 	PR c++/119688
+ 	PR c++/94511
+ 	* mangle.cc (write_expression): Write out implicit non-trailing
+ 	zeroes of a CONSTRUCTOR when the ABI version is at least 21.
+ 
+ 2025-08-06  Jason Merrill  <jason@redhat.com>
+ 
+ 	* constexpr.cc (cxx_eval_indirect_ref): Improve diagnostic.
+ 
+ 2025-08-06  Kwok Cheung Yeung  <kcyeung@baylibre.com>
+ 
+ 	* parser.cc (cp_parser_omp_clause_from_to): Parse 'iterator' modifier.
+ 	* semantics.cc (finish_omp_clauses): Finish iterators for to/from
+ 	clauses.
+ 
+ 2025-08-06  Kwok Cheung Yeung  <kcyeung@baylibre.com>
+ 	    Andrew Stubbs  <ams@baylibre.com>
+ 
+ 	* parser.cc (cp_parser_omp_clause_map): Parse 'iterator' modifier.
+ 	* semantics.cc (finish_omp_clauses): Finish iterators.  Apply
+ 	iterators to generated clauses.
+ 
+ 2025-08-05  Jason Merrill  <jason@redhat.com>
+ 
+ 	PR c++/121068
+ 	* constexpr.cc (cxx_eval_store_expression): Handle clobbers.
+ 	(potential_constant_expression_1): Handle clobbers more.
+ 	* decl.cc (build_clobber_this): Use INIT_EXPR for initial clobber.
+ 	* init.cc (build_new_1): Clobber on placement new.
+ 	(build_vec_init): Don't clean up after clobber.
+ 
+ 2025-08-04  Patrick Palka  <ppalka@redhat.com>
+ 
+ 	PR c++/121351
+ 	PR c++/119859
+ 	* class.cc (add_method): Substitute outer template arguments
+ 	into constraints before comparing them if the declarations are
+ 	from different classes.
+ 
+ 2025-08-04  Patrick Palka  <ppalka@redhat.com>
+ 
+ 	PR c++/120620
+ 	* constexpr.cc (cxx_dynamic_cast_fn_p): Return true only
+ 	for synthesized __dynamic_cast.
+ 
  2025-08-01  Nathaniel Shead  <nathanieloshead@gmail.com>
  
  	PR c++/108080
diff -Nrcpad gcc-16-20250803/gcc/cp/call.cc gcc-16-20250810/gcc/cp/call.cc
*** gcc-16-20250803/gcc/cp/call.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/cp/call.cc	Sun Aug 10 22:32:07 2025
*************** extract_call_expr (tree call)
*** 7904,7931 ****
      call = TREE_OPERAND (call, 0);
    if (TREE_CODE (call) == TARGET_EXPR)
      call = TARGET_EXPR_INITIAL (call);
-   if (cxx_dialect >= cxx20)
-     switch (TREE_CODE (call))
-       {
- 	/* C++20 rewritten comparison operators.  */
-       case TRUTH_NOT_EXPR:
- 	call = TREE_OPERAND (call, 0);
- 	break;
-       case LT_EXPR:
-       case LE_EXPR:
-       case GT_EXPR:
-       case GE_EXPR:
-       case SPACESHIP_EXPR:
- 	{
- 	  tree op0 = TREE_OPERAND (call, 0);
- 	  if (integer_zerop (op0))
- 	    call = TREE_OPERAND (call, 1);
- 	  else
- 	    call = op0;
- 	}
- 	break;
-       default:;
-       }
  
    if (TREE_CODE (call) != CALL_EXPR
        && TREE_CODE (call) != AGGR_INIT_EXPR
--- 7904,7909 ----
diff -Nrcpad gcc-16-20250803/gcc/cp/class.cc gcc-16-20250810/gcc/cp/class.cc
*** gcc-16-20250803/gcc/cp/class.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/cp/class.cc	Sun Aug 10 22:32:07 2025
*************** add_method (tree type, tree method, bool
*** 1356,1362 ****
        if (!compparms (parms1, parms2))
  	continue;
  
!       if (!equivalently_constrained (fn, method))
  	{
  	  if (processing_template_decl)
  	    /* We can't check satisfaction in dependent context, wait until
--- 1356,1385 ----
        if (!compparms (parms1, parms2))
  	continue;
  
!       tree fn_constraints = get_constraints (fn);
!       tree method_constraints = get_constraints (method);
! 
!       if (fn_constraints && method_constraints
! 	  && DECL_CONTEXT (fn) != type
! 	  && !processing_template_decl)
! 	{
! 	  if (TREE_CODE (fn) == TEMPLATE_DECL)
! 	    ++processing_template_decl;
! 	  if (tree ti = CLASSTYPE_TEMPLATE_INFO (DECL_CONTEXT (fn)))
! 	    fn_constraints = tsubst_constraint_info (fn_constraints,
! 						     TI_ARGS (ti),
! 						     tf_warning_or_error,
! 						     fn);
! 	  if (tree ti = CLASSTYPE_TEMPLATE_INFO (DECL_CONTEXT (method)))
! 	    method_constraints = tsubst_constraint_info (method_constraints,
! 							 TI_ARGS (ti),
! 							 tf_warning_or_error,
! 							 method);
! 	  if (TREE_CODE (fn) == TEMPLATE_DECL)
! 	    --processing_template_decl;
! 	}
! 
!       if (!equivalent_constraints (fn_constraints, method_constraints))
  	{
  	  if (processing_template_decl)
  	    /* We can't check satisfaction in dependent context, wait until
diff -Nrcpad gcc-16-20250803/gcc/cp/constexpr.cc gcc-16-20250810/gcc/cp/constexpr.cc
*** gcc-16-20250803/gcc/cp/constexpr.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/cp/constexpr.cc	Sun Aug 10 22:32:07 2025
*************** cxx_dynamic_cast_fn_p (tree fndecl)
*** 3240,3246 ****
  {
    return (cxx_dialect >= cxx20
  	  && id_equal (DECL_NAME (fndecl), "__dynamic_cast")
! 	  && CP_DECL_CONTEXT (fndecl) == abi_node);
  }
  
  /* Often, we have an expression in the form of address + offset, e.g.
--- 3240,3250 ----
  {
    return (cxx_dialect >= cxx20
  	  && id_equal (DECL_NAME (fndecl), "__dynamic_cast")
! 	  && CP_DECL_CONTEXT (fndecl) == abi_node
! 	  /* Only consider implementation-detail __dynamic_cast calls that
! 	     correspond to a dynamic_cast, and ignore direct calls to
! 	     abi::__dynamic_cast.  */
! 	  && DECL_ARTIFICIAL (fndecl));
  }
  
  /* Often, we have an expression in the form of address + offset, e.g.
*************** cxx_eval_indirect_ref (const constexpr_c
*** 7175,7184 ****
  			  (TREE_TYPE (TREE_TYPE (sub)), TREE_TYPE (t)));
  	      /* DR 1188 says we don't have to deal with this.  */
  	      if (!ctx->quiet)
! 		error_at (cp_expr_loc_or_input_loc (t),
! 			  "accessing value of %qE through a %qT glvalue in a "
! 			  "constant expression", build_fold_indirect_ref (sub),
! 			  TREE_TYPE (t));
  	      *non_constant_p = true;
  	      return t;
  	    }
--- 7179,7201 ----
  			  (TREE_TYPE (TREE_TYPE (sub)), TREE_TYPE (t)));
  	      /* DR 1188 says we don't have to deal with this.  */
  	      if (!ctx->quiet)
! 		{
! 		  auto_diagnostic_group d;
! 		  error_at (cp_expr_loc_or_input_loc (t),
! 			    "accessing value of %qT object through a %qT "
! 			    "glvalue in a constant expression",
! 			    TREE_TYPE (TREE_TYPE (sub)), TREE_TYPE (t));
! 		  tree ob = build_fold_indirect_ref (sub);
! 		  if (DECL_P (ob))
! 		    {
! 		      if (DECL_ARTIFICIAL (ob))
! 			inform (DECL_SOURCE_LOCATION (ob),
! 				"%qT object created here", TREE_TYPE (ob));
! 		      else
! 			inform (DECL_SOURCE_LOCATION (ob),
! 				"%q#D declared here", ob);
! 		    }
! 		}
  	      *non_constant_p = true;
  	      return t;
  	    }
*************** cxx_eval_store_expression (const constex
*** 7448,7459 ****
  
    tree init = TREE_OPERAND (t, 1);
  
-   if (TREE_CLOBBER_P (init)
-       && CLOBBER_KIND (init) < CLOBBER_OBJECT_END)
-     /* Only handle clobbers ending the lifetime of objects.
-        ??? We should probably set CONSTRUCTOR_NO_CLEARING.  */
-     return void_node;
- 
    /* First we figure out where we're storing to.  */
    tree target = TREE_OPERAND (t, 0);
  
--- 7465,7470 ----
*************** cxx_eval_store_expression (const constex
*** 7640,7650 ****
      }
  
    /* Handle explicit end-of-lifetime.  */
!   if (TREE_CLOBBER_P (init))
      {
        if (refs->is_empty ())
! 	ctx->global->destroy_value (object);
!       return void_node;
      }
  
    type = TREE_TYPE (object);
--- 7651,7664 ----
      }
  
    /* Handle explicit end-of-lifetime.  */
!   if (TREE_CLOBBER_P (init)
!       && CLOBBER_KIND (init) >= CLOBBER_OBJECT_END)
      {
        if (refs->is_empty ())
! 	{
! 	  ctx->global->destroy_value (object);
! 	  return void_node;
! 	}
      }
  
    type = TREE_TYPE (object);
*************** cxx_eval_store_expression (const constex
*** 7781,7786 ****
--- 7795,7802 ----
  	      *non_constant_p = true;
  	    }
  	  else if (!is_access_expr
+ 		   || (TREE_CLOBBER_P (init)
+ 		       && CLOBBER_KIND (init) >= CLOBBER_OBJECT_END)
  		   || (TREE_CODE (t) == MODIFY_EXPR
  		       && CLASS_TYPE_P (inner)
  		       && !type_has_non_deleted_trivial_default_ctor (inner)))
*************** cxx_eval_store_expression (const constex
*** 7844,7854 ****
        type = reftype;
      }
  
    /* For initialization of an empty base, the original target will be
       *(base*)this, evaluation of which resolves to the object
       argument, which has the derived type rather than the base type.  */
    if (!empty_base && !(same_type_ignoring_top_level_qualifiers_p
! 		       (initialized_type (init), type)))
      {
        gcc_assert (is_empty_class (TREE_TYPE (target)));
        empty_base = true;
--- 7860,7876 ----
        type = reftype;
      }
  
+   /* Change an "as-base" clobber to the real type;
+      we don't need to worry about padding in constexpr.  */
+   tree itype = initialized_type (init);
+   if (IS_FAKE_BASE_TYPE (itype))
+     itype = TYPE_CONTEXT (itype);
+ 
    /* For initialization of an empty base, the original target will be
       *(base*)this, evaluation of which resolves to the object
       argument, which has the derived type rather than the base type.  */
    if (!empty_base && !(same_type_ignoring_top_level_qualifiers_p
! 		       (itype, type)))
      {
        gcc_assert (is_empty_class (TREE_TYPE (target)));
        empty_base = true;
*************** cxx_eval_store_expression (const constex
*** 7955,7962 ****
    /* Don't share a CONSTRUCTOR that might be changed later.  */
    init = unshare_constructor (init);
  
!   gcc_checking_assert (!*valp || (same_type_ignoring_top_level_qualifiers_p
! 				  (TREE_TYPE (*valp), type)));
    if (empty_base)
      {
        /* Just evaluate the initializer and return, since there's no actual data
--- 7977,7986 ----
    /* Don't share a CONSTRUCTOR that might be changed later.  */
    init = unshare_constructor (init);
  
!   gcc_checking_assert (!*valp
! 		       || *valp == void_node
! 		       || (same_type_ignoring_top_level_qualifiers_p
! 			   (TREE_TYPE (*valp), type)));
    if (empty_base)
      {
        /* Just evaluate the initializer and return, since there's no actual data
*************** cxx_eval_store_expression (const constex
*** 7969,7974 ****
--- 7993,8014 ----
  	  CONSTRUCTOR_ZERO_PADDING_BITS (*valp) = zero_padding_bits;
  	}
      }
+   else if (TREE_CLOBBER_P (init))
+     {
+       if (AGGREGATE_TYPE_P (type))
+ 	{
+ 	  if (*valp)
+ 	    CONSTRUCTOR_ELTS (*valp) = nullptr;
+ 	  else
+ 	    *valp = build_constructor (type, nullptr);
+ 	  TREE_CONSTANT (*valp) = true;
+ 	  TREE_SIDE_EFFECTS (*valp) = false;
+ 	  CONSTRUCTOR_NO_CLEARING (*valp) = true;
+ 	  CONSTRUCTOR_ZERO_PADDING_BITS (*valp) = zero_padding_bits;
+ 	}
+       else
+ 	*valp = void_node;
+     }
    else if (*valp && TREE_CODE (*valp) == CONSTRUCTOR
  	   && TREE_CODE (init) == CONSTRUCTOR)
      {
*************** cxx_eval_store_expression (const constex
*** 7993,7998 ****
--- 8033,8041 ----
        && TREE_CODE (*valp) == CONSTRUCTOR
        && TYPE_READONLY (type))
      {
+       tree target_type = TREE_TYPE (target);
+       if (IS_FAKE_BASE_TYPE (target_type))
+ 	target_type = TYPE_CONTEXT (target_type);
        if (INDIRECT_REF_P (target)
  	  && (is_this_parameter
  	      (tree_strip_nop_conversions (TREE_OPERAND (target, 0)))))
*************** cxx_eval_store_expression (const constex
*** 8000,8006 ****
  	   constructor of a delegating constructor).  Leave it up to the
  	   caller that set 'this' to set TREE_READONLY appropriately.  */
  	gcc_checking_assert (same_type_ignoring_top_level_qualifiers_p
! 			     (TREE_TYPE (target), type) || empty_base);
        else
  	TREE_READONLY (*valp) = true;
      }
--- 8043,8049 ----
  	   constructor of a delegating constructor).  Leave it up to the
  	   caller that set 'this' to set TREE_READONLY appropriately.  */
  	gcc_checking_assert (same_type_ignoring_top_level_qualifiers_p
! 			     (target_type, type) || empty_base);
        else
  	TREE_READONLY (*valp) = true;
      }
*************** potential_constant_expression_1 (tree t,
*** 11304,11309 ****
--- 11347,11359 ----
        && !FUNC_OR_METHOD_TYPE_P (TREE_TYPE (t))
        && !NULLPTR_TYPE_P (TREE_TYPE (t)))
      {
+       if (TREE_CLOBBER_P (t))
+ 	{
+ 	  /* We should have caught any clobbers in INIT/MODIFY_EXPR.  */
+ 	  gcc_checking_assert (false);
+ 	  return true;
+ 	}
+ 
        if (flags & tf_error)
  	constexpr_error (loc, fundef_p, "lvalue-to-rvalue conversion of "
  			 "a volatile lvalue %qE with type %qT", t,
*************** potential_constant_expression_1 (tree t,
*** 11565,11576 ****
  		}
  	      return false;
  	    }
  	  /* Treat __PRETTY_FUNCTION__ inside a template function as
  	     potentially-constant.  */
! 	  else if (DECL_PRETTY_FUNCTION_P (t)
! 		   && DECL_VALUE_EXPR (t) == error_mark_node)
  	    return true;
! 	  return RECUR (DECL_VALUE_EXPR (t), rval);
  	}
        if (want_rval
  	  && (now || !var_in_maybe_constexpr_fn (t))
--- 11615,11628 ----
  		}
  	      return false;
  	    }
+ 	  tree ve = DECL_VALUE_EXPR (t);
  	  /* Treat __PRETTY_FUNCTION__ inside a template function as
  	     potentially-constant.  */
! 	  if (DECL_PRETTY_FUNCTION_P (t) && ve == error_mark_node)
  	    return true;
! 	  if (DECL_DECOMPOSITION_P (t) && TREE_CODE (ve) == TREE_VEC)
! 	    return RECUR (TREE_VEC_ELT (ve, 0), rval);
! 	  return RECUR (ve, rval);
  	}
        if (want_rval
  	  && (now || !var_in_maybe_constexpr_fn (t))
*************** potential_constant_expression_1 (tree t,
*** 12127,12132 ****
--- 12179,12186 ----
  	}
        /* FALLTHRU */
      case INIT_EXPR:
+       if (TREE_CLOBBER_P (TREE_OPERAND (t, 1)))
+ 	return true;
        return RECUR (TREE_OPERAND (t, 1), rval);
  
      case CONSTRUCTOR:
diff -Nrcpad gcc-16-20250803/gcc/cp/decl.cc gcc-16-20250810/gcc/cp/decl.cc
*** gcc-16-20250803/gcc/cp/decl.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/cp/decl.cc	Sun Aug 10 22:32:07 2025
*************** get_tuple_size (tree type)
*** 9748,9754 ****
  /* Return std::tuple_element<I,TYPE>::type.  */
  
  static tree
! get_tuple_element_type (tree type, unsigned i)
  {
    tree args = make_tree_vec (2);
    TREE_VEC_ELT (args, 0) = build_int_cst (integer_type_node, i);
--- 9748,9754 ----
  /* Return std::tuple_element<I,TYPE>::type.  */
  
  static tree
! get_tuple_element_type (tree type, unsigned HOST_WIDE_INT i)
  {
    tree args = make_tree_vec (2);
    TREE_VEC_ELT (args, 0) = build_int_cst (integer_type_node, i);
*************** get_tuple_element_type (tree type, unsig
*** 9764,9770 ****
  /* Return e.get<i>() or get<i>(e).  */
  
  static tree
! get_tuple_decomp_init (tree decl, unsigned i)
  {
    tree targs = make_tree_vec (1);
    TREE_VEC_ELT (targs, 0) = build_int_cst (integer_type_node, i);
--- 9764,9770 ----
  /* Return e.get<i>() or get<i>(e).  */
  
  static tree
! get_tuple_decomp_init (tree decl, unsigned HOST_WIDE_INT i)
  {
    tree targs = make_tree_vec (1);
    TREE_VEC_ELT (targs, 0) = build_int_cst (integer_type_node, i);
*************** cp_maybe_mangle_decomp (tree decl, cp_de
*** 9870,9875 ****
--- 9870,9888 ----
      }
  }
  
+ /* Append #i to DECL_NAME (decl).  */
+ 
+ static void
+ set_sb_pack_name (tree decl, unsigned HOST_WIDE_INT i)
+ {
+   tree name = DECL_NAME (decl);
+   size_t len = IDENTIFIER_LENGTH (name) + 22;
+   char *n = XALLOCAVEC (char, len);
+   snprintf (n, len, "%s#" HOST_WIDE_INT_PRINT_UNSIGNED,
+ 	    IDENTIFIER_POINTER (name), i);
+   DECL_NAME (decl) = get_identifier (n);
+ }
+ 
  /* Finish a decomposition declaration.  DECL is the underlying declaration
     "e", FIRST is the head of a chain of decls for the individual identifiers
     chained through DECL_CHAIN in reverse order and COUNT is the number of
*************** cp_finish_decomp (tree decl, cp_decomp *
*** 9926,9935 ****
--- 9939,9951 ----
    auto_vec<tree, 16> v;
    v.safe_grow (count, true);
    tree d = first;
+   int pack = -1;
    for (unsigned int i = 0; i < count; i++, d = DECL_CHAIN (d))
      {
        v[count - i - 1] = d;
        fit_decomposition_lang_decl (d, decl);
+       if (DECL_PACK_P (d))
+ 	pack = count - i - 1;
      }
  
    tree type = TREE_TYPE (decl);
*************** cp_finish_decomp (tree decl, cp_decomp *
*** 9951,9956 ****
--- 9967,9980 ----
  
    tree eltype = NULL_TREE;
    unsigned HOST_WIDE_INT eltscnt = 0;
+   /* Structured binding packs when initializer is non-dependent should
+      have their DECL_VALUE_EXPR set to a TREE_VEC.  First two elements
+      of that TREE_VEC are the base and index, what is normally represented
+      as DECL_VALUE_EXPR ARRAY_REF <base, index> where index is the index
+      of the pack first element.  The remaining elements of the TREE_VEC
+      are VAR_DECLs for the pack elements.  */
+   tree packv = NULL_TREE;
+ 
    if (TREE_CODE (type) == ARRAY_TYPE)
      {
        tree nelts;
*************** cp_finish_decomp (tree decl, cp_decomp *
*** 9969,9975 ****
  	  goto error_out;
  	}
        eltscnt = tree_to_uhwi (nelts);
!       if (count != eltscnt)
  	{
         cnt_mismatch:
  	  auto_diagnostic_group d;
--- 9993,9999 ----
  	  goto error_out;
  	}
        eltscnt = tree_to_uhwi (nelts);
!       if (pack != -1 ? count - 1 > eltscnt : count != eltscnt)
  	{
         cnt_mismatch:
  	  auto_diagnostic_group d;
*************** cp_finish_decomp (tree decl, cp_decomp *
*** 9990,10001 ****
        eltype = TREE_TYPE (type);
        for (unsigned int i = 0; i < count; i++)
  	{
  	  TREE_TYPE (v[i]) = eltype;
  	  layout_decl (v[i], 0);
  	  if (processing_template_decl)
  	    continue;
  	  tree t = unshare_expr (dexp);
! 	  t = build4 (ARRAY_REF, eltype, t, size_int (i), NULL_TREE, NULL_TREE);
  	  SET_DECL_VALUE_EXPR (v[i], t);
  	  DECL_HAS_VALUE_EXPR_P (v[i]) = 1;
  	}
--- 10014,10050 ----
        eltype = TREE_TYPE (type);
        for (unsigned int i = 0; i < count; i++)
  	{
+ 	  if ((unsigned) pack == i)
+ 	    {
+ 	      packv = make_tree_vec (eltscnt - count + 3);
+ 	      for (unsigned HOST_WIDE_INT j = 0; j < eltscnt - count + 1; ++j)
+ 		{
+ 		  tree t;
+ 		  TREE_VEC_ELT (packv, j + 2) = t = copy_node (v[pack]);
+ 		  set_sb_pack_name (t, j);
+ 		  maybe_push_decl (t);
+ 		  TREE_TYPE (t) = eltype;
+ 		  layout_decl (t, 0);
+ 		  if (!processing_template_decl)
+ 		    {
+ 		      tree a = unshare_expr (dexp);
+ 		      a = build4 (ARRAY_REF, eltype, a, size_int (j + pack),
+ 				  NULL_TREE, NULL_TREE);
+ 		      SET_DECL_VALUE_EXPR (t, a);
+ 		      DECL_HAS_VALUE_EXPR_P (t) = 1;
+ 		    }
+ 		}
+ 	      continue;
+ 	    }
  	  TREE_TYPE (v[i]) = eltype;
  	  layout_decl (v[i], 0);
  	  if (processing_template_decl)
  	    continue;
  	  tree t = unshare_expr (dexp);
! 	  unsigned HOST_WIDE_INT j = i;
! 	  if (pack != -1 && (unsigned) pack < i)
! 	    j = i + eltscnt - count;
! 	  t = build4 (ARRAY_REF, eltype, t, size_int (j), NULL_TREE, NULL_TREE);
  	  SET_DECL_VALUE_EXPR (v[i], t);
  	  DECL_HAS_VALUE_EXPR_P (v[i]) = 1;
  	}
*************** cp_finish_decomp (tree decl, cp_decomp *
*** 10004,10020 ****
    else if (TREE_CODE (type) == COMPLEX_TYPE)
      {
        eltscnt = 2;
!       if (count != eltscnt)
  	goto cnt_mismatch;
        eltype = cp_build_qualified_type (TREE_TYPE (type), TYPE_QUALS (type));
        for (unsigned int i = 0; i < count; i++)
  	{
  	  TREE_TYPE (v[i]) = eltype;
  	  layout_decl (v[i], 0);
  	  if (processing_template_decl)
  	    continue;
  	  tree t = unshare_expr (dexp);
! 	  t = build1 (i ? IMAGPART_EXPR : REALPART_EXPR, eltype, t);
  	  SET_DECL_VALUE_EXPR (v[i], t);
  	  DECL_HAS_VALUE_EXPR_P (v[i]) = 1;
  	}
--- 10053,10093 ----
    else if (TREE_CODE (type) == COMPLEX_TYPE)
      {
        eltscnt = 2;
!       if (pack != -1 ? count - 1 > eltscnt : count != eltscnt)
  	goto cnt_mismatch;
        eltype = cp_build_qualified_type (TREE_TYPE (type), TYPE_QUALS (type));
        for (unsigned int i = 0; i < count; i++)
  	{
+ 	  if ((unsigned) pack == i)
+ 	    {
+ 	      packv = make_tree_vec (eltscnt - count + 3);
+ 	      for (unsigned HOST_WIDE_INT j = 0; j < eltscnt - count + 1; ++j)
+ 		{
+ 		  tree t;
+ 		  TREE_VEC_ELT (packv, j + 2) = t = copy_node (v[pack]);
+ 		  set_sb_pack_name (t, j);
+ 		  maybe_push_decl (t);
+ 		  TREE_TYPE (t) = eltype;
+ 		  layout_decl (t, 0);
+ 		  if (!processing_template_decl)
+ 		    {
+ 		      tree a = build1 (pack + j ? IMAGPART_EXPR : REALPART_EXPR, eltype,
+ 				       unshare_expr (dexp));
+ 		      SET_DECL_VALUE_EXPR (t, a);
+ 		      DECL_HAS_VALUE_EXPR_P (t) = 1;
+ 		    }
+ 		}
+ 	      continue;
+ 	    }
  	  TREE_TYPE (v[i]) = eltype;
  	  layout_decl (v[i], 0);
  	  if (processing_template_decl)
  	    continue;
  	  tree t = unshare_expr (dexp);
! 	  unsigned HOST_WIDE_INT j = i;
! 	  if (pack != -1 && (unsigned) pack < i)
! 	    j = i + eltscnt - count;
! 	  t = build1 (j ? IMAGPART_EXPR : REALPART_EXPR, eltype, t);
  	  SET_DECL_VALUE_EXPR (v[i], t);
  	  DECL_HAS_VALUE_EXPR_P (v[i]) = 1;
  	}
*************** cp_finish_decomp (tree decl, cp_decomp *
*** 10026,10044 ****
  	  error_at (loc, "cannot decompose variable length vector %qT", type);
  	  goto error_out;
  	}
!       if (count != eltscnt)
  	goto cnt_mismatch;
        eltype = cp_build_qualified_type (TREE_TYPE (type), TYPE_QUALS (type));
        for (unsigned int i = 0; i < count; i++)
  	{
  	  TREE_TYPE (v[i]) = eltype;
  	  layout_decl (v[i], 0);
  	  if (processing_template_decl)
  	    continue;
  	  tree t = unshare_expr (dexp);
  	  convert_vector_to_array_for_subscript (DECL_SOURCE_LOCATION (v[i]),
! 						 &t, size_int (i));
! 	  t = build4 (ARRAY_REF, eltype, t, size_int (i), NULL_TREE, NULL_TREE);
  	  SET_DECL_VALUE_EXPR (v[i], t);
  	  DECL_HAS_VALUE_EXPR_P (v[i]) = 1;
  	}
--- 10099,10145 ----
  	  error_at (loc, "cannot decompose variable length vector %qT", type);
  	  goto error_out;
  	}
!       if (pack != -1 ? count - 1 > eltscnt : count != eltscnt)
  	goto cnt_mismatch;
        eltype = cp_build_qualified_type (TREE_TYPE (type), TYPE_QUALS (type));
        for (unsigned int i = 0; i < count; i++)
  	{
+ 	  if ((unsigned) pack == i)
+ 	    {
+ 	      packv = make_tree_vec (eltscnt - count + 3);
+ 	      for (unsigned HOST_WIDE_INT j = 0; j < eltscnt - count + 1; ++j)
+ 		{
+ 		  tree t;
+ 		  TREE_VEC_ELT (packv, j + 2) = t = copy_node (v[pack]);
+ 		  set_sb_pack_name (t, j);
+ 		  maybe_push_decl (t);
+ 		  TREE_TYPE (t) = eltype;
+ 		  layout_decl (t, 0);
+ 		  if (!processing_template_decl)
+ 		    {
+ 		      tree a = unshare_expr (dexp);
+ 		      location_t loc = DECL_SOURCE_LOCATION (t);
+ 		      tree s = size_int (j + pack);
+ 		      convert_vector_to_array_for_subscript (loc, &a, s);
+ 		      a = build4 (ARRAY_REF, eltype, a, s,
+ 				  NULL_TREE, NULL_TREE);
+ 		      SET_DECL_VALUE_EXPR (t, a);
+ 		      DECL_HAS_VALUE_EXPR_P (t) = 1;
+ 		    }
+ 		}
+ 	      continue;
+ 	    }
  	  TREE_TYPE (v[i]) = eltype;
  	  layout_decl (v[i], 0);
  	  if (processing_template_decl)
  	    continue;
  	  tree t = unshare_expr (dexp);
+ 	  unsigned HOST_WIDE_INT j = i;
+ 	  if (pack != -1 && (unsigned) pack < i)
+ 	    j = i + eltscnt - count;
  	  convert_vector_to_array_for_subscript (DECL_SOURCE_LOCATION (v[i]),
! 						 &t, size_int (j));
! 	  t = build4 (ARRAY_REF, eltype, t, size_int (j), NULL_TREE, NULL_TREE);
  	  SET_DECL_VALUE_EXPR (v[i], t);
  	  DECL_HAS_VALUE_EXPR_P (v[i]) = 1;
  	}
*************** cp_finish_decomp (tree decl, cp_decomp *
*** 10062,10072 ****
  	  goto error_out;
  	}
        eltscnt = tree_to_uhwi (tsize);
!       if (count != eltscnt)
  	goto cnt_mismatch;
!       if (test_p)
  	return true;
!       if (!processing_template_decl && DECL_DECOMP_BASE (decl))
  	{
  	  /* For structured bindings used in conditions we need to evaluate
  	     the conversion of decl (aka e in the standard) to bool or
--- 10163,10173 ----
  	  goto error_out;
  	}
        eltscnt = tree_to_uhwi (tsize);
!       if (pack != -1 ? count - 1 > eltscnt : count != eltscnt)
  	goto cnt_mismatch;
!       if (test_p && eltscnt)
  	return true;
!       if (!processing_template_decl && DECL_DECOMP_BASE (decl) && eltscnt)
  	{
  	  /* For structured bindings used in conditions we need to evaluate
  	     the conversion of decl (aka e in the standard) to bool or
*************** cp_finish_decomp (tree decl, cp_decomp *
*** 10096,10111 ****
  	  location_t sloc = input_location;
  	  location_t dloc = DECL_SOURCE_LOCATION (v[i]);
  
  	  input_location = dloc;
! 	  tree init = get_tuple_decomp_init (decl, i);
  	  tree eltype = (init == error_mark_node ? error_mark_node
! 			 : get_tuple_element_type (type, i));
  	  input_location = sloc;
  
  	  if (VOID_TYPE_P (eltype))
  	    {
! 	      error ("%<std::tuple_element<%u, %T>::type%> is %<void%>",
! 		     i, type);
  	      eltype = error_mark_node;
  	    }
  	  if (init == error_mark_node || eltype == error_mark_node)
--- 10197,10266 ----
  	  location_t sloc = input_location;
  	  location_t dloc = DECL_SOURCE_LOCATION (v[i]);
  
+ 	  if ((unsigned) pack == i)
+ 	    {
+ 	      packv = make_tree_vec (eltscnt - count + 3);
+ 	      for (unsigned HOST_WIDE_INT j = 0; j < eltscnt - count + 1; ++j)
+ 		{
+ 		  tree t;
+ 		  TREE_VEC_ELT (packv, j + 2) = t = copy_node (v[pack]);
+ 		  set_sb_pack_name (t, j);
+ 		  input_location = dloc;
+ 		  tree init = get_tuple_decomp_init (decl, j + pack);
+ 		  tree eltype = (init == error_mark_node ? error_mark_node
+ 				 : get_tuple_element_type (type, j + pack));
+ 		  input_location = sloc;
+ 
+ 		  if (VOID_TYPE_P (eltype))
+ 		    {
+ 		      error ("%<std::tuple_element<%wu, %T>::type%> is "
+ 			     "%<void%>", j + pack, type);
+ 		      eltype = error_mark_node;
+ 		    }
+ 		  if (init == error_mark_node || eltype == error_mark_node)
+ 		    {
+ 		      inform (dloc, "in initialization of structured binding "
+ 			      "pack %qD", v[pack]);
+ 		      goto error_out;
+ 		    }
+ 		  if (j == 0
+ 		      && !processing_template_decl
+ 		      && TREE_STATIC (decl))
+ 		    {
+ 		      sorry_at (dloc, "mangling of structured binding pack "
+ 				      "elements not implemented yet");
+ 		      goto error_out;
+ 		    }
+ 		  maybe_push_decl (t);
+ 		  /* Save the decltype away before reference collapse.  */
+ 		  hash_map_safe_put<hm_ggc> (decomp_type_table, t, eltype);
+ 		  eltype = cp_build_reference_type (eltype, !lvalue_p (init));
+ 		  TREE_TYPE (t) = eltype;
+ 		  layout_decl (t, 0);
+ 		  DECL_HAS_VALUE_EXPR_P (t) = 0;
+ 		  if (!processing_template_decl)
+ 		    {
+ 		      copy_linkage (t, decl);
+ 		      cp_finish_decl (t, init, /*constexpr*/false,
+ 				      /*asm*/NULL_TREE, LOOKUP_NORMAL);
+ 		    }
+ 		}
+ 	      continue;
+ 	    }
+ 
+ 	  unsigned HOST_WIDE_INT j = i;
+ 	  if (pack != -1 && (unsigned) pack < i)
+ 	    j = i + eltscnt - count;
  	  input_location = dloc;
! 	  tree init = get_tuple_decomp_init (decl, j);
  	  tree eltype = (init == error_mark_node ? error_mark_node
! 			 : get_tuple_element_type (type, j));
  	  input_location = sloc;
  
  	  if (VOID_TYPE_P (eltype))
  	    {
! 	      error ("%<std::tuple_element<%wu, %T>::type%> is %<void%>",
! 		     j, type);
  	      eltype = error_mark_node;
  	    }
  	  if (init == error_mark_node || eltype == error_mark_node)
*************** cp_finish_decomp (tree decl, cp_decomp *
*** 10159,10164 ****
--- 10314,10325 ----
  	goto error_out;
        else if (btype == NULL_TREE)
  	{
+ 	  if (pack == 0 && count == 1)
+ 	    {
+ 	      eltscnt = 0;
+ 	      packv = make_tree_vec (2);
+ 	      goto done;
+ 	    }
  	  error_at (loc, "cannot decompose class type %qT without non-static "
  			 "data members", type);
  	  goto error_out;
*************** cp_finish_decomp (tree decl, cp_decomp *
*** 10170,10176 ****
  	  continue;
  	else
  	  eltscnt++;
!       if (count != eltscnt)
  	goto cnt_mismatch;
        tree t = dexp;
        if (type != btype)
--- 10331,10337 ----
  	  continue;
  	else
  	  eltscnt++;
!       if (pack != -1 ? count - 1 > eltscnt : count != eltscnt)
  	goto cnt_mismatch;
        tree t = dexp;
        if (type != btype)
*************** cp_finish_decomp (tree decl, cp_decomp *
*** 10179,10184 ****
--- 10340,10346 ----
  			       /*nonnull*/false, tf_warning_or_error);
  	  type = btype;
  	}
+       unsigned HOST_WIDE_INT j = 0;
        unsigned int i = 0;
        for (tree field = TYPE_FIELDS (btype); field; field = TREE_CHAIN (field))
  	if (TREE_CODE (field) != FIELD_DECL
*************** cp_finish_decomp (tree decl, cp_decomp *
*** 10191,10196 ****
--- 10353,10384 ----
  						     NULL_TREE);
  	    if (REFERENCE_REF_P (tt))
  	      tt = TREE_OPERAND (tt, 0);
+ 	    if (pack != -1 && j >= (unsigned) pack)
+ 	      {
+ 		if (j == (unsigned) pack)
+ 		  {
+ 		    packv = make_tree_vec (eltscnt - count + 3);
+ 		    i++;
+ 		  }
+ 		if (j < (unsigned) pack + eltscnt - (count - 1))
+ 		  {
+ 		    tree t;
+ 		    TREE_VEC_ELT (packv, j + 3 - i) = t = copy_node (v[pack]);
+ 		    set_sb_pack_name (t, j + 1 - i);
+ 		    maybe_push_decl (t);
+ 		    TREE_TYPE (t) = TREE_TYPE (tt);
+ 		    layout_decl (t, 0);
+ 		    if (!processing_template_decl)
+ 		      {
+ 			SET_DECL_VALUE_EXPR (t, tt);
+ 			DECL_HAS_VALUE_EXPR_P (t) = 1;
+ 		      }
+ 		    else
+ 		      DECL_HAS_VALUE_EXPR_P (t) = 0;
+ 		    j++;
+ 		    continue;
+ 		  }
+ 	      }
  	    TREE_TYPE (v[i]) = TREE_TYPE (tt);
  	    layout_decl (v[i], 0);
  	    if (!processing_template_decl)
*************** cp_finish_decomp (tree decl, cp_decomp *
*** 10199,10205 ****
--- 10387,10412 ----
  		DECL_HAS_VALUE_EXPR_P (v[i]) = 1;
  	      }
  	    i++;
+ 	    j++;
  	  }
+       if (pack != -1 && j == (unsigned) pack)
+ 	{
+ 	  gcc_checking_assert (eltscnt == count - 1);
+ 	  packv = make_tree_vec (2);
+ 	}
+     }
+  done:
+   if (packv)
+     {
+       gcc_checking_assert (pack != -1);
+       TREE_VEC_ELT (packv, 0) = decl;
+       TREE_VEC_ELT (packv, 1) = size_int (pack);
+       SET_DECL_VALUE_EXPR (v[pack], packv);
+       DECL_HAS_VALUE_EXPR_P (v[pack]) = 1;
+       DECL_IGNORED_P (v[pack]) = 1;
+       if (!processing_template_decl)
+ 	for (unsigned int i = 0; i < TREE_VEC_LENGTH (packv) - 2U; ++i)
+ 	  pushdecl (TREE_VEC_ELT (packv, 2 + i));
      }
    if (processing_template_decl)
      {
*************** build_clobber_this (clobber_kind kind)
*** 18440,18445 ****
--- 18647,18654 ----
      }
  
    tree exprstmt = build2 (MODIFY_EXPR, void_type_node, thisref, clobber);
+   if (kind == CLOBBER_OBJECT_BEGIN)
+     TREE_SET_CODE (exprstmt, INIT_EXPR);
    if (vbases)
      exprstmt = build_if_in_charge (exprstmt);
  
diff -Nrcpad gcc-16-20250803/gcc/cp/error.cc gcc-16-20250810/gcc/cp/error.cc
*** gcc-16-20250803/gcc/cp/error.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/cp/error.cc	Sun Aug 10 22:32:07 2025
*************** erroneous_templates_t *erroneous_templat
*** 250,256 ****
     issue an error if we later need to instantiate the template.  */
  
  static void
! cp_adjust_diagnostic_info (diagnostics::context *context,
  			   diagnostics::diagnostic_info *diagnostic)
  {
    if (diagnostic->m_kind == diagnostics::kind::error)
--- 250,256 ----
     issue an error if we later need to instantiate the template.  */
  
  static void
! cp_adjust_diagnostic_info (const diagnostics::context &context,
  			   diagnostics::diagnostic_info *diagnostic)
  {
    if (diagnostic->m_kind == diagnostics::kind::error)
*************** cp_adjust_diagnostic_info (diagnostics::
*** 258,264 ****
        {
  	diagnostic->m_option_id = OPT_Wtemplate_body;
  
! 	if (context->m_permissive)
  	  diagnostic->m_kind = diagnostics::kind::warning;
  
  	bool existed;
--- 258,264 ----
        {
  	diagnostic->m_option_id = OPT_Wtemplate_body;
  
! 	if (context.m_permissive)
  	  diagnostic->m_kind = diagnostics::kind::warning;
  
  	bool existed;
diff -Nrcpad gcc-16-20250803/gcc/cp/init.cc gcc-16-20250810/gcc/cp/init.cc
*** gcc-16-20250803/gcc/cp/init.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/cp/init.cc	Sun Aug 10 22:32:07 2025
*************** build_new_1 (vec<tree, va_gc> **placemen
*** 3557,3565 ****
      alloc_expr = maybe_wrap_new_for_constexpr (alloc_expr, type,
  					       cookie_size);
  
    /* In the simple case, we can stop now.  */
    pointer_type = build_pointer_type (type);
!   if (!cookie_size && !is_initialized && !member_delete_p)
      return build_nop (pointer_type, alloc_expr);
  
    /* Store the result of the allocation call in a variable so that we can
--- 3557,3575 ----
      alloc_expr = maybe_wrap_new_for_constexpr (alloc_expr, type,
  					       cookie_size);
  
+   bool std_placement = std_placement_new_fn_p (alloc_fn);
+ 
+   /* For std placement new, clobber the object if the constructor won't do it
+      in start_preparsed_function.  This is most important for activating an
+      array in a union (c++/121068), but should also help the optimizers.  */
+   const bool do_clobber
+     = (std_placement && !*init && flag_lifetime_dse > 1
+        && (!CLASS_TYPE_P (elt_type)
+ 	   || type_has_non_user_provided_default_constructor (elt_type)));
+ 
    /* In the simple case, we can stop now.  */
    pointer_type = build_pointer_type (type);
!   if (!cookie_size && !is_initialized && !member_delete_p && !do_clobber)
      return build_nop (pointer_type, alloc_expr);
  
    /* Store the result of the allocation call in a variable so that we can
*************** build_new_1 (vec<tree, va_gc> **placemen
*** 3593,3600 ****
       So check for a null exception spec on the op new we just called.  */
  
    nothrow = TYPE_NOTHROW_P (TREE_TYPE (alloc_fn));
!   check_new
!     = flag_check_new || (nothrow && !std_placement_new_fn_p (alloc_fn));
  
    if (cookie_size)
      {
--- 3603,3609 ----
       So check for a null exception spec on the op new we just called.  */
  
    nothrow = TYPE_NOTHROW_P (TREE_TYPE (alloc_fn));
!   check_new = flag_check_new || (nothrow && !std_placement);
  
    if (cookie_size)
      {
*************** build_new_1 (vec<tree, va_gc> **placemen
*** 3649,3654 ****
--- 3658,3686 ----
    /* Any further uses of alloc_node will want this type, too.  */
    alloc_node = fold_convert (non_const_pointer_type, alloc_node);
  
+   tree clobber_expr = NULL_TREE;
+   if (do_clobber)
+     {
+       tree clobber = build_clobber (elt_type, CLOBBER_OBJECT_BEGIN);
+       CONSTRUCTOR_IS_DIRECT_INIT (clobber) = true;
+       if (array_p)
+ 	{
+ 	  /* Clobber each element rather than the array at once.  */
+ 	  tree maxindex = cp_build_binary_op (input_location,
+ 					      MINUS_EXPR, outer_nelts,
+ 					      integer_one_node,
+ 					      complain);
+ 	  clobber_expr = build_vec_init (data_addr, maxindex, clobber,
+ 					 /*valinit*/false, /*from_arr*/0,
+ 					 complain, nullptr);
+ 	}
+       else
+ 	{
+ 	  tree targ = cp_build_fold_indirect_ref (data_addr);
+ 	  clobber_expr = cp_build_init_expr (targ, clobber);
+ 	}
+     }
+ 
    /* Now initialize the allocated object.  Note that we preevaluate the
       initialization expression, apart from the actual constructor call or
       assignment--we do this because we want to delay the allocation as long
*************** build_new_1 (vec<tree, va_gc> **placemen
*** 3877,3882 ****
--- 3909,3916 ----
  
    if (init_expr)
      rval = build2 (COMPOUND_EXPR, TREE_TYPE (rval), init_expr, rval);
+   if (clobber_expr)
+     rval = build2 (COMPOUND_EXPR, TREE_TYPE (rval), clobber_expr, rval);
    if (cookie_expr)
      rval = build2 (COMPOUND_EXPR, TREE_TYPE (rval), cookie_expr, rval);
  
*************** build_vec_init (tree base, tree maxindex
*** 4717,4722 ****
--- 4751,4759 ----
       the partially constructed array if an exception is thrown.
       But don't do this if we're assigning.  */
    if (flag_exceptions && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)
+       /* And don't clean up from clobbers, the actual initialization will
+ 	 follow as a separate build_vec_init.  */
+       && !(init && TREE_CLOBBER_P (init))
        && from_array != 2)
      {
        tree e;
diff -Nrcpad gcc-16-20250803/gcc/cp/lex.cc gcc-16-20250810/gcc/cp/lex.cc
*** gcc-16-20250803/gcc/cp/lex.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/cp/lex.cc	Sun Aug 10 22:32:07 2025
*************** cxx_init (void)
*** 368,373 ****
--- 368,433 ----
  
    cxx_init_decl_processing ();
  
+   if (warn_keyword_macro)
+     {
+       for (unsigned int i = 0; i < num_c_common_reswords; ++i)
+ 	/* For C++ none of the keywords in [lex.key] starts with underscore,
+ 	   don't register anything like that.  Don't complain about
+ 	   ObjC or Transactional Memory keywords.  */
+ 	if (c_common_reswords[i].word[0] == '_')
+ 	  continue;
+ 	else if (c_common_reswords[i].disable & (D_TRANSMEM | D_OBJC))
+ 	  continue;
+ 	else
+ 	  {
+ 	    tree id = get_identifier (c_common_reswords[i].word);
+ 	    if (IDENTIFIER_KEYWORD_P (id)
+ 		/* Don't register keywords with spaces.  */
+ 		&& IDENTIFIER_POINTER (id)[IDENTIFIER_LENGTH (id) - 1] != ' ')
+ 	      cpp_lookup (parse_in,
+ 			  (const unsigned char *) IDENTIFIER_POINTER (id),
+ 			  IDENTIFIER_LENGTH (id))->flags |= NODE_WARN;
+ 	  }
+       auto warn_on = [] (const char *name) {
+ 	cpp_lookup (parse_in, (const unsigned char *) name,
+ 		    strlen (name))->flags |= NODE_WARN;
+       };
+       if (cxx_dialect >= cxx11)
+ 	{
+ 	  warn_on ("final");
+ 	  warn_on ("override");
+ 	  warn_on ("noreturn");
+ 	  if (cxx_dialect < cxx26)
+ 	    warn_on ("carries_dependency");
+ 	}
+       if (cxx_dialect >= cxx14)
+ 	warn_on ("deprecated");
+       if (cxx_dialect >= cxx17)
+ 	{
+ 	  warn_on ("fallthrough");
+ 	  warn_on ("maybe_unused");
+ 	  warn_on ("nodiscard");
+ 	}
+       if (cxx_dialect >= cxx20)
+ 	{
+ 	  warn_on ("likely");
+ 	  warn_on ("unlikely");
+ 	  warn_on ("no_unique_address");
+ 	}
+       if (flag_modules)
+ 	{
+ 	  warn_on ("import");
+ 	  warn_on ("module");
+ 	}
+       if (cxx_dialect >= cxx23)
+ 	warn_on ("assume");
+       if (cxx_dialect >= cxx26)
+ 	{
+ 	  warn_on ("replaceable_if_eligible");
+ 	  warn_on ("trivially_relocatable_if_eligible");
+ 	}
+     }
+ 
    if (c_common_init () == false)
      {
        input_location = saved_loc;
diff -Nrcpad gcc-16-20250803/gcc/cp/mangle.cc gcc-16-20250810/gcc/cp/mangle.cc
*** gcc-16-20250803/gcc/cp/mangle.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/cp/mangle.cc	Sun Aug 10 22:32:07 2025
*************** write_expression (tree expr)
*** 3745,3755 ****
--- 3745,3803 ----
  		      || !zero_init_expr_p (ce->value))
  		    last_nonzero = i;
  
+ 	      tree prev_field = NULL_TREE;
  	      if (undigested || last_nonzero != UINT_MAX)
  		for (HOST_WIDE_INT i = 0; vec_safe_iterate (elts, i, &ce); ++i)
  		  {
  		    if (i > last_nonzero)
  		      break;
+ 		    if (!undigested && !CONSTRUCTOR_NO_CLEARING (expr)
+ 			&& (TREE_CODE (etype) == RECORD_TYPE
+ 			    || TREE_CODE (etype) == ARRAY_TYPE))
+ 		      {
+ 			/* Write out any implicit non-trailing zeros
+ 			   (which we neglected to do before v21).  */
+ 			if (TREE_CODE (etype) == RECORD_TYPE)
+ 			  {
+ 			    tree field;
+ 			    if (i == 0)
+ 			      field = first_field (etype);
+ 			    else
+ 			      field = DECL_CHAIN (prev_field);
+ 			    for (;;)
+ 			      {
+ 				field = next_subobject_field (field);
+ 				if (field == ce->index)
+ 				  break;
+ 				if (abi_check (21))
+ 				  write_expression (build_zero_cst
+ 						    (TREE_TYPE (field)));
+ 				field = DECL_CHAIN (field);
+ 			      }
+ 			  }
+ 			else if (TREE_CODE (etype) == ARRAY_TYPE)
+ 			  {
+ 			    unsigned HOST_WIDE_INT j;
+ 			    if (i == 0)
+ 			      j = 0;
+ 			    else
+ 			      j = 1 + tree_to_uhwi (prev_field);
+ 			    unsigned HOST_WIDE_INT k;
+ 			    if (TREE_CODE (ce->index) == RANGE_EXPR)
+ 			      k = tree_to_uhwi (TREE_OPERAND (ce->index, 0));
+ 			    else
+ 			      k = tree_to_uhwi (ce->index);
+ 			    tree zero = NULL_TREE;
+ 			    for (; j < k; ++j)
+ 			      if (abi_check (21))
+ 				{
+ 				  if (!zero)
+ 				    zero = build_zero_cst (TREE_TYPE (etype));
+ 				  write_expression (zero);
+ 				}
+ 			  }
+ 		      }
+ 
  		    if (!undigested && TREE_CODE (etype) == UNION_TYPE)
  		      {
  			/* Express the active member as a designator.  */
*************** write_expression (tree expr)
*** 3794,3799 ****
--- 3842,3850 ----
  		    else
  		      for (unsigned j = 0; j < reps; ++j)
  			write_expression (ce->value);
+ 		    prev_field = ce->index;
+ 		    if (prev_field && TREE_CODE (prev_field) == RANGE_EXPR)
+ 		      prev_field = TREE_OPERAND (prev_field, 1);
  		  }
  	    }
  	  else
diff -Nrcpad gcc-16-20250803/gcc/cp/parser.cc gcc-16-20250810/gcc/cp/parser.cc
*** gcc-16-20250803/gcc/cp/parser.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/cp/parser.cc	Sun Aug 10 22:32:07 2025
*************** cp_parser_range_for (cp_parser *parser,
*** 14672,14684 ****
  	  tree v = DECL_VALUE_EXPR (range_decl);
  	  /* For decomposition declaration get all of the corresponding
  	     declarations out of the way.  */
! 	  if (TREE_CODE (v) == ARRAY_REF
! 	      && DECL_DECOMPOSITION_P (TREE_OPERAND (v, 0)))
  	    {
  	      tree d = range_decl;
- 	      range_decl = TREE_OPERAND (v, 0);
  	      decomp = &decomp_d;
! 	      decomp->count = tree_to_uhwi (TREE_OPERAND (v, 1)) + 1;
  	      decomp->decl = d;
  	      bool seen_name_independent_decl = false;
  	      for (unsigned int i = 0; i < decomp->count;
--- 14672,14694 ----
  	  tree v = DECL_VALUE_EXPR (range_decl);
  	  /* For decomposition declaration get all of the corresponding
  	     declarations out of the way.  */
! 	  if ((TREE_CODE (v) == ARRAY_REF
! 	       && DECL_DECOMPOSITION_P (TREE_OPERAND (v, 0)))
! 	      || (TREE_CODE (v) == TREE_VEC
! 		  && DECL_DECOMPOSITION_P (TREE_VEC_ELT (v, 0))))
  	    {
  	      tree d = range_decl;
  	      decomp = &decomp_d;
! 	      if (TREE_CODE (v) == ARRAY_REF)
! 		{
! 		  range_decl = TREE_OPERAND (v, 0);
! 		  decomp->count = tree_to_uhwi (TREE_OPERAND (v, 1)) + 1;
! 		}
! 	      else
! 		{
! 		  range_decl = TREE_VEC_ELT (v, 0);
! 		  decomp->count = tree_to_uhwi (TREE_VEC_ELT (v, 1)) + 1;
! 		}
  	      decomp->decl = d;
  	      bool seen_name_independent_decl = false;
  	      for (unsigned int i = 0; i < decomp->count;
*************** cp_parser_simple_declaration (cp_parser*
*** 16843,16849 ****
  }
  
  /* Helper of cp_parser_simple_declaration, parse a decomposition declaration.
!      decl-specifier-seq ref-qualifier [opt] [ identifier-list ]
         initializer ;  */
  
  static tree
--- 16853,16859 ----
  }
  
  /* Helper of cp_parser_simple_declaration, parse a decomposition declaration.
!      decl-specifier-seq ref-qualifier [opt] [ sb-identifier-list ]
         initializer ;  */
  
  static tree
*************** cp_parser_decomposition_declaration (cp_
*** 16856,16876 ****
    location_t loc = cp_lexer_peek_token (parser->lexer)->location;
    cp_parser_require (parser, CPP_OPEN_SQUARE, RT_OPEN_SQUARE);
  
!   /* Parse the identifier-list.  */
    auto_vec<cp_expr, 10> v;
    bool attr_diagnosed = false;
    int first_attr = -1;
    unsigned int cnt = 0;
    if (!cp_lexer_next_token_is (parser->lexer, CPP_CLOSE_SQUARE))
      while (true)
        {
  	cp_expr e = cp_parser_identifier (parser);
  	if (e.get_value () == error_mark_node)
  	  break;
  	tree attr = NULL_TREE;
  	if (cp_next_tokens_can_be_std_attribute_p (parser))
  	  {
! 	    if (cxx_dialect >= cxx17 && cxx_dialect < cxx26 && !attr_diagnosed)
  	      {
  		pedwarn (cp_lexer_peek_token (parser->lexer)->location,
  			 OPT_Wc__26_extensions,
--- 16866,16910 ----
    location_t loc = cp_lexer_peek_token (parser->lexer)->location;
    cp_parser_require (parser, CPP_OPEN_SQUARE, RT_OPEN_SQUARE);
  
!   /* Parse the sb-identifier-list.  */
    auto_vec<cp_expr, 10> v;
    bool attr_diagnosed = false;
    int first_attr = -1;
+   int pack = -1;
    unsigned int cnt = 0;
    if (!cp_lexer_next_token_is (parser->lexer, CPP_CLOSE_SQUARE))
      while (true)
        {
+ 	if (cp_lexer_next_token_is (parser->lexer, CPP_ELLIPSIS))
+ 	  {
+ 	    location_t elloc = cp_lexer_peek_token (parser->lexer)->location;
+ 	    if (!processing_template_decl)
+ 	      error_at (elloc, "structured binding pack outside of template");
+ 	    else if (pack != -1)
+ 	      error_at (elloc,
+ 			"multiple packs in structured binding declaration");
+ 	    else
+ 	      {
+ 		if (keyword == RID_MAX
+ 		    && cxx_dialect >= cxx17
+ 		    && cxx_dialect < cxx26)
+ 		  pedwarn (elloc, OPT_Wc__26_extensions,
+ 			   "structured binding packs only available with "
+ 			   "%<-std=c++2c%> or %<-std=gnu++2c%>");
+ 		pack = cnt;
+ 	      }
+ 	    cp_lexer_consume_token (parser->lexer);
+ 	  }
  	cp_expr e = cp_parser_identifier (parser);
  	if (e.get_value () == error_mark_node)
  	  break;
  	tree attr = NULL_TREE;
  	if (cp_next_tokens_can_be_std_attribute_p (parser))
  	  {
! 	    if (keyword == RID_MAX
! 		&& cxx_dialect >= cxx17
! 		&& cxx_dialect < cxx26
! 		&& !attr_diagnosed)
  	      {
  		pedwarn (cp_lexer_peek_token (parser->lexer)->location,
  			 OPT_Wc__26_extensions,
*************** cp_parser_decomposition_declaration (cp_
*** 16931,16937 ****
  			  &pushed_scope);
    tree orig_decl = decl;
  
!   unsigned int i;
    cp_expr e;
    cp_decl_specifier_seq decl_specs;
    clear_decl_specs (&decl_specs);
--- 16965,16971 ----
  			  &pushed_scope);
    tree orig_decl = decl;
  
!   unsigned int i, j;
    cp_expr e;
    cp_decl_specifier_seq decl_specs;
    clear_decl_specs (&decl_specs);
*************** cp_parser_decomposition_declaration (cp_
*** 16939,16944 ****
--- 16973,16979 ----
    if (decl_specifiers->storage_class == sc_static)
      decl_specs.storage_class = sc_static;
    tree prev = decl;
+   j = 0;
    FOR_EACH_VEC_ELT (v, i, e)
      {
        if (i == 0)
*************** cp_parser_decomposition_declaration (cp_
*** 16969,16977 ****
--- 17004,17025 ----
  	  prev = decl2;
  	  DECL_DECLARED_CONSTEXPR_P (decl2) = DECL_DECLARED_CONSTEXPR_P (decl);
  	  DECL_DECLARED_CONSTINIT_P (decl2) = DECL_DECLARED_CONSTINIT_P (decl);
+ 	  if (j == (unsigned) pack)
+ 	    {
+ 	      tree dtype = cxx_make_type (DECLTYPE_TYPE);
+ 	      DECLTYPE_TYPE_EXPR (dtype) = decl2;
+ 	      DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P (dtype) = 1;
+ 	      SET_TYPE_STRUCTURAL_EQUALITY (dtype);
+ 	      tree type = cxx_make_type (TYPE_PACK_EXPANSION);
+ 	      PACK_EXPANSION_PATTERN (type) = dtype;
+ 	      SET_TYPE_STRUCTURAL_EQUALITY (type);
+ 	      PACK_EXPANSION_PARAMETER_PACKS (type) = decl2;
+ 	      TREE_TYPE (decl2) = type;
+ 	    }
  	}
        if (elt_pushed_scope)
  	pop_scope (elt_pushed_scope);
+       ++j;
      }
  
    if (v.is_empty ())
*************** cp_parser_omp_clause_doacross (cp_parser
*** 42636,42643 ****
     to ( variable-list )
  
     OpenMP 5.1:
!    from ( [present :] variable-list )
!    to ( [present :] variable-list ) */
  
  static tree
  cp_parser_omp_clause_from_to (cp_parser *parser, enum omp_clause_code kind,
--- 42684,42694 ----
     to ( variable-list )
  
     OpenMP 5.1:
!    from ( [motion-modifier[,] [motion-modifier[,]...]:] variable-list )
!    to ( [motion-modifier[,] [motion-modifier[,]...]:] variable-list )
! 
!    motion-modifier:
!      present | iterator (iterators-definition)  */
  
  static tree
  cp_parser_omp_clause_from_to (cp_parser *parser, enum omp_clause_code kind,
*************** cp_parser_omp_clause_from_to (cp_parser
*** 42646,42668 ****
    if (!cp_parser_require (parser, CPP_OPEN_PAREN, RT_OPEN_PAREN))
      return list;
  
!   bool present = false;
!   cp_token *token = cp_lexer_peek_token (parser->lexer);
  
!   if (token->type == CPP_NAME
!       && strcmp (IDENTIFIER_POINTER (token->u.value), "present") == 0
!       && cp_lexer_nth_token_is (parser->lexer, 2, CPP_COLON))
      {
!       present = true;
!       cp_lexer_consume_token (parser->lexer);
!       cp_lexer_consume_token (parser->lexer);
      }
  
    tree nl = cp_parser_omp_var_list_no_open (parser, kind, list, NULL, true);
    if (present)
      for (tree c = nl; c != list; c = OMP_CLAUSE_CHAIN (c))
        OMP_CLAUSE_MOTION_PRESENT (c) = 1;
  
    return nl;
  }
  
--- 42697,42809 ----
    if (!cp_parser_require (parser, CPP_OPEN_PAREN, RT_OPEN_PAREN))
      return list;
  
!   int pos = 1;
!   int colon_pos = 0;
!   int iterator_length = 0;
  
!   while (cp_lexer_peek_nth_token (parser->lexer, pos)->type == CPP_NAME)
      {
!       const char *identifier =
! 	IDENTIFIER_POINTER (cp_lexer_peek_nth_token (parser->lexer,
! 						     pos)->u.value);
!       if (cp_lexer_nth_token_is (parser->lexer, pos + 1, CPP_OPEN_PAREN))
! 	{
! 	  int n = cp_parser_skip_balanced_tokens (parser, pos + 1);
! 	  if (n != pos + 1)
! 	    {
! 	      if (strcmp (identifier, "iterator") == 0)
! 	      iterator_length = n - pos;
! 	      pos = n - 1;
! 	    }
! 	}
!       if (cp_lexer_peek_nth_token (parser->lexer, pos + 1)->type == CPP_COMMA)
! 	pos += 2;
!       else
! 	pos++;
!       if (cp_lexer_peek_nth_token (parser->lexer, pos)->type == CPP_COLON)
! 	{
! 	  colon_pos = pos;
! 	  break;
! 	}
      }
  
+   bool present = false;
+   tree iterators = NULL_TREE;
+ 
+   for (int pos = 1; pos < colon_pos; ++pos)
+     {
+       cp_token *token = cp_lexer_peek_token (parser->lexer);
+       if (token->type == CPP_COMMA)
+ 	{
+ 	  cp_lexer_consume_token (parser->lexer);
+ 	  continue;
+ 	}
+       const char *p = IDENTIFIER_POINTER (token->u.value);
+       if (strcmp ("present", p) == 0)
+ 	{
+ 	  if (present)
+ 	    {
+ 	      cp_parser_error (parser, "too many %<present%> modifiers");
+ 	      cp_parser_skip_to_closing_parenthesis (parser,
+ 						     /*recovering=*/true,
+ 						     /*or_comma=*/false,
+ 						     /*consume_paren=*/true);
+ 	      return list;
+ 	    }
+ 	  present = true;
+ 	  cp_lexer_consume_token (parser->lexer);
+ 	}
+       else if (strcmp ("iterator", p) == 0)
+ 	{
+ 	  if (iterators)
+ 	    {
+ 	      cp_parser_error (parser, "too many %<iterator%> modifiers");
+ 	      cp_parser_skip_to_closing_parenthesis (parser,
+ 						     /*recovering=*/true,
+ 						     /*or_comma=*/false,
+ 						     /*consume_paren=*/true);
+ 	      return list;
+ 	    }
+ 	  begin_scope (sk_omp, NULL);
+ 	  iterators = cp_parser_omp_iterators (parser);
+ 	  pos += iterator_length - 1;
+ 	}
+ 
+       else
+ 	{
+ 	  error_at (token->location,
+ 		    "%qs clause with modifier other than %<iterator%> "
+ 		    "or %<present%>",
+ 		    kind == OMP_CLAUSE_TO ? "to" : "from");
+ 	  cp_parser_skip_to_closing_parenthesis (parser,
+ 						 /*recovering=*/true,
+ 						 /*or_comma=*/false,
+ 						 /*consume_paren=*/true);
+ 	  return list;
+ 	}
+      }
+ 
+   if (colon_pos)
+     cp_parser_require (parser, CPP_COLON, RT_COLON);
+ 
    tree nl = cp_parser_omp_var_list_no_open (parser, kind, list, NULL, true);
    if (present)
      for (tree c = nl; c != list; c = OMP_CLAUSE_CHAIN (c))
        OMP_CLAUSE_MOTION_PRESENT (c) = 1;
  
+   if (iterators)
+     {
+       tree block = poplevel (1, 1, 0);
+       if (iterators == error_mark_node)
+ 	iterators = NULL_TREE;
+       else
+ 	TREE_VEC_ELT (iterators, 5) = block;
+     }
+ 
+   if (iterators)
+     for (tree c = nl; c != list; c = OMP_CLAUSE_CHAIN (c))
+       OMP_CLAUSE_ITERATORS (c) = iterators;
+ 
    return nl;
  }
  
*************** cp_parser_omp_clause_map (cp_parser *par
*** 42696,42711 ****
  
    int pos = 1;
    int map_kind_pos = 0;
!   while (cp_lexer_peek_nth_token (parser->lexer, pos)->type == CPP_NAME
! 	 || cp_lexer_peek_nth_token (parser->lexer, pos)->keyword == RID_DELETE)
      {
!       if (cp_lexer_peek_nth_token (parser->lexer, pos + 1)->type == CPP_COLON)
  	{
  	  map_kind_pos = pos;
  	  break;
  	}
  
!       if (cp_lexer_peek_nth_token (parser->lexer, pos + 1)->type == CPP_COMMA)
  	pos++;
        else if (cp_lexer_peek_nth_token (parser->lexer, pos + 1)->type
  	       == CPP_OPEN_PAREN)
--- 42837,42870 ----
  
    int pos = 1;
    int map_kind_pos = 0;
!   int iterator_length = 0;
!   for (;;)
      {
!       cp_token *tok = cp_lexer_peek_nth_token (parser->lexer, pos);
!       if (!(tok->type == CPP_NAME || tok->keyword == RID_DELETE))
! 	break;
! 
!       cp_token *next_tok = cp_lexer_peek_nth_token (parser->lexer, pos + 1);
!       if (tok->type == CPP_NAME
! 	  && strcmp (IDENTIFIER_POINTER (tok->u.value), "iterator") == 0
! 	  && next_tok->type == CPP_OPEN_PAREN)
! 	{
! 	  int n = cp_parser_skip_balanced_tokens (parser, pos + 1);
! 	  if (n != pos + 1)
! 	    {
! 	      iterator_length = n - pos;
! 	      pos = n - 1;
! 	      next_tok = cp_lexer_peek_nth_token (parser->lexer, n);
! 	    }
! 	}
! 
!       if (next_tok->type == CPP_COLON)
  	{
  	  map_kind_pos = pos;
  	  break;
  	}
  
!       if (next_tok->type == CPP_COMMA)
  	pos++;
        else if (cp_lexer_peek_nth_token (parser->lexer, pos + 1)->type
  	       == CPP_OPEN_PAREN)
*************** cp_parser_omp_clause_map (cp_parser *par
*** 42718,42723 ****
--- 42877,42883 ----
    bool present_modifier = false;
    bool mapper_modifier = false;
    tree mapper_name = NULL_TREE;
+   tree iterators = NULL_TREE;
    for (int pos = 1; pos < map_kind_pos; ++pos)
      {
        cp_token *tok = cp_lexer_peek_token (parser->lexer);
*************** cp_parser_omp_clause_map (cp_parser *par
*** 42756,42761 ****
--- 42916,42936 ----
  	  close_modifier = true;
  	  cp_lexer_consume_token (parser->lexer);
  	}
+       else if (strcmp ("iterator", p) == 0)
+ 	{
+ 	  if (iterators)
+ 	    {
+ 	      cp_parser_error (parser, "too many %<iterator%> modifiers");
+ 	      cp_parser_skip_to_closing_parenthesis (parser,
+ 						     /*recovering=*/true,
+ 						     /*or_comma=*/false,
+ 						     /*consume_paren=*/true);
+ 	      return list;
+ 	    }
+ 	  begin_scope (sk_omp, NULL);
+ 	  iterators = cp_parser_omp_iterators (parser);
+ 	  pos += iterator_length - 1;
+ 	}
        else if (strcmp ("mapper", p) == 0)
  	{
  	  cp_lexer_consume_token (parser->lexer);
*************** cp_parser_omp_clause_map (cp_parser *par
*** 42844,42850 ****
  	{
  	  cp_parser_error (parser, "%<map%> clause with map-type modifier "
  				   "other than %<always%>, %<close%>, "
! 				   "%<mapper%> or %<present%>");
  	  cp_parser_skip_to_closing_parenthesis (parser,
  						 /*recovering=*/true,
  						 /*or_comma=*/false,
--- 43019,43025 ----
  	{
  	  cp_parser_error (parser, "%<map%> clause with map-type modifier "
  				   "other than %<always%>, %<close%>, "
! 				   "%<iterator%>, %<mapper%> or %<present%>");
  	  cp_parser_skip_to_closing_parenthesis (parser,
  						 /*recovering=*/true,
  						 /*or_comma=*/false,
*************** cp_parser_omp_clause_map (cp_parser *par
*** 42908,42916 ****
--- 43083,43101 ----
  
    tree last_new = NULL_TREE;
  
+   if (iterators)
+     {
+       tree block = poplevel (1, 1, 0);
+       if (iterators == error_mark_node)
+ 	iterators = NULL_TREE;
+       else
+ 	TREE_VEC_ELT (iterators, 5) = block;
+     }
+ 
    for (c = nlist; c != list; c = OMP_CLAUSE_CHAIN (c))
      {
        OMP_CLAUSE_SET_MAP_KIND (c, kind);
+       OMP_CLAUSE_ITERATORS (c) = iterators;
        last_new = c;
      }
  
*************** cp_convert_omp_range_for (tree &this_pre
*** 46163,46168 ****
--- 46348,46361 ----
  		  decomp->count = tree_to_uhwi (TREE_OPERAND (v, 1)) + 1;
  		  decomp->decl = decl;
  		}
+ 	      else if (TREE_CODE (v) == TREE_VEC
+ 		       && DECL_DECOMPOSITION_P (TREE_VEC_ELT (v, 0)))
+ 		{
+ 		  d = TREE_VEC_ELT (v, 0);
+ 		  decomp = &decomp_d;
+ 		  decomp->count = tree_to_uhwi (TREE_VEC_ELT (v, 1)) + 1;
+ 		  decomp->decl = decl;
+ 		}
  	    }
  	  do_range_for_auto_deduction (d, init, decomp);
  	}
*************** cp_convert_omp_range_for (tree &this_pre
*** 46286,46291 ****
--- 46479,46493 ----
  	  decomp->count = tree_to_uhwi (TREE_OPERAND (v, 1)) + 1;
  	  decomp->decl = d;
  	}
+       else if (TREE_CODE (v) == TREE_VEC
+ 	       && DECL_DECOMPOSITION_P (TREE_VEC_ELT (v, 0)))
+ 	{
+ 	  tree d = orig_decl;
+ 	  orig_decl = TREE_VEC_ELT (v, 0);
+ 	  decomp = &decomp_d;
+ 	  decomp->count = tree_to_uhwi (TREE_VEC_ELT (v, 1)) + 1;
+ 	  decomp->decl = d;
+ 	}
      }
  
    tree auto_node = type_uses_auto (TREE_TYPE (orig_decl));
diff -Nrcpad gcc-16-20250803/gcc/cp/pt.cc gcc-16-20250810/gcc/cp/pt.cc
*** gcc-16-20250803/gcc/cp/pt.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/cp/pt.cc	Sun Aug 10 22:32:07 2025
*************** tsubst_pack_expansion (tree t, tree args
*** 13981,13989 ****
--- 13981,14010 ----
        else if (is_capture_proxy (parm_pack))
  	{
  	  arg_pack = retrieve_local_specialization (parm_pack);
+ 	  if (DECL_DECOMPOSITION_P (arg_pack))
+ 	    {
+ 	      orig_arg = arg_pack;
+ 	      goto expand_sb_pack;
+ 	    }
  	  if (DECL_PACK_P (arg_pack))
  	    arg_pack = NULL_TREE;
  	}
+       else if (DECL_DECOMPOSITION_P (parm_pack))
+ 	{
+ 	  orig_arg = retrieve_local_specialization (parm_pack);
+ 	expand_sb_pack:
+ 	  gcc_assert (DECL_DECOMPOSITION_P (orig_arg));
+ 	  if (TREE_TYPE (orig_arg) == error_mark_node)
+ 	    return error_mark_node;
+ 	  gcc_assert (DECL_HAS_VALUE_EXPR_P (orig_arg));
+ 	  arg_pack = DECL_VALUE_EXPR (orig_arg);
+ 	  tree vec = make_tree_vec (TREE_VEC_LENGTH (arg_pack) - 2);
+ 	  if (TREE_VEC_LENGTH (vec))
+ 	    memcpy (TREE_VEC_BEGIN (vec), &TREE_VEC_ELT (arg_pack, 2),
+ 		    TREE_VEC_LENGTH (vec) * sizeof (tree));
+ 	  arg_pack = make_node (NONTYPE_ARGUMENT_PACK);
+ 	  ARGUMENT_PACK_ARGS (arg_pack) = vec;
+ 	}
        else
          {
  	  int idx;
*************** tsubst_pack_expansion (tree t, tree args
*** 13996,14002 ****
  	    arg_pack = NULL_TREE;
          }
  
!       orig_arg = arg_pack;
        if (arg_pack && TREE_CODE (arg_pack) == ARGUMENT_PACK_SELECT)
  	arg_pack = ARGUMENT_PACK_SELECT_FROM_PACK (arg_pack);
  
--- 14017,14024 ----
  	    arg_pack = NULL_TREE;
          }
  
!       if (orig_arg == NULL_TREE)
! 	orig_arg = arg_pack;
        if (arg_pack && TREE_CODE (arg_pack) == ARGUMENT_PACK_SELECT)
  	arg_pack = ARGUMENT_PACK_SELECT_FROM_PACK (arg_pack);
  
*************** tsubst_pack_expansion (tree t, tree args
*** 14011,14018 ****
  
        if (arg_pack)
          {
!           int my_len =
!             TREE_VEC_LENGTH (ARGUMENT_PACK_ARGS (arg_pack));
  
  	  /* Don't bother trying to do a partial substitution with
  	     incomplete packs; we'll try again after deduction.  */
--- 14033,14040 ----
  
        if (arg_pack)
          {
! 	  int my_len
! 	    = TREE_VEC_LENGTH (ARGUMENT_PACK_ARGS (arg_pack));
  
  	  /* Don't bother trying to do a partial substitution with
  	     incomplete packs; we'll try again after deduction.  */
*************** tsubst_pack_expansion (tree t, tree args
*** 14176,14183 ****
  
            /* Update the corresponding argument.  */
            if (TMPL_ARGS_HAVE_MULTIPLE_LEVELS (args))
!             TREE_VEC_ELT (TREE_VEC_ELT (args, level -1 ), idx) =
!               TREE_TYPE (pack);
            else
              TREE_VEC_ELT (args, idx) = TREE_TYPE (pack);
          }
--- 14198,14205 ----
  
            /* Update the corresponding argument.  */
            if (TMPL_ARGS_HAVE_MULTIPLE_LEVELS (args))
! 	    TREE_VEC_ELT (TREE_VEC_ELT (args, level -1 ), idx)
! 	      = TREE_TYPE (pack);
            else
              TREE_VEC_ELT (args, idx) = TREE_TYPE (pack);
          }
*************** tsubst_decl (tree t, tree args, tsubst_f
*** 15921,15927 ****
  	    tsubst_flags_t tcomplain = complain;
  	    if (VAR_P (t))
  	      tcomplain |= tf_tst_ok;
! 	    type = tsubst (type, args, tcomplain, in_decl);
  	    /* Substituting the type might have recursively instantiated this
  	       same alias (c++/86171).  */
  	    if (use_spec_table && gen_tmpl && DECL_ALIAS_TEMPLATE_P (gen_tmpl)
--- 15943,15952 ----
  	    tsubst_flags_t tcomplain = complain;
  	    if (VAR_P (t))
  	      tcomplain |= tf_tst_ok;
! 	    if (DECL_DECOMPOSITION_P (t) && DECL_PACK_P (t))
! 	      type = NULL_TREE;
! 	    else
! 	      type = tsubst (type, args, tcomplain, in_decl);
  	    /* Substituting the type might have recursively instantiated this
  	       same alias (c++/86171).  */
  	    if (use_spec_table && gen_tmpl && DECL_ALIAS_TEMPLATE_P (gen_tmpl)
*************** tsubst_decl (tree t, tree args, tsubst_f
*** 15938,15943 ****
--- 15963,15979 ----
  	  {
  	    DECL_INITIALIZED_P (r) = 0;
  	    DECL_TEMPLATE_INSTANTIATED (r) = 0;
+ 	    if (DECL_DECOMPOSITION_P (t) && DECL_PACK_P (t))
+ 	      {
+ 		tree dtype = cxx_make_type (DECLTYPE_TYPE);
+ 		DECLTYPE_TYPE_EXPR (dtype) = r;
+ 		DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P (dtype) = 1;
+ 		SET_TYPE_STRUCTURAL_EQUALITY (dtype);
+ 		type = cxx_make_type (TYPE_PACK_EXPANSION);
+ 		PACK_EXPANSION_PATTERN (type) = dtype;
+ 		SET_TYPE_STRUCTURAL_EQUALITY (type);
+ 		PACK_EXPANSION_PARAMETER_PACKS (type) = r;
+ 	      }
  	    if (TREE_CODE (type) == FUNCTION_TYPE)
  	      {
  		/* It may seem that this case cannot occur, since:
*************** tsubst_omp_for_iterator (tree t, int i,
*** 18555,18567 ****
        if (decl != error_mark_node && DECL_HAS_VALUE_EXPR_P (decl))
  	{
  	  tree v = DECL_VALUE_EXPR (decl);
! 	  if (TREE_CODE (v) == ARRAY_REF
! 	      && DECL_DECOMPOSITION_P (TREE_OPERAND (v, 0)))
  	    {
  	      cp_decomp decomp_d = { NULL_TREE, 0 };
! 	      tree d = tsubst_decl (TREE_OPERAND (v, 0), args, complain);
  	      maybe_push_decl (d);
! 	      d = tsubst_decomp_names (d, TREE_OPERAND (v, 0), args, complain,
  				       in_decl, &decomp_d);
  	      decomp = true;
  	      if (d == error_mark_node)
--- 18591,18607 ----
        if (decl != error_mark_node && DECL_HAS_VALUE_EXPR_P (decl))
  	{
  	  tree v = DECL_VALUE_EXPR (decl);
! 	  if ((TREE_CODE (v) == ARRAY_REF
! 	       && DECL_DECOMPOSITION_P (TREE_OPERAND (v, 0)))
! 	      || (TREE_CODE (v) == TREE_VEC
! 		  && DECL_DECOMPOSITION_P (TREE_VEC_ELT (v, 0))))
  	    {
+ 	      v = (TREE_CODE (v) == ARRAY_REF
+ 		   ? TREE_OPERAND (v, 0) : TREE_VEC_ELT (v, 0));
  	      cp_decomp decomp_d = { NULL_TREE, 0 };
! 	      tree d = tsubst_decl (v, args, complain);
  	      maybe_push_decl (d);
! 	      d = tsubst_decomp_names (d, v, args, complain,
  				       in_decl, &decomp_d);
  	      decomp = true;
  	      if (d == error_mark_node)
*************** tsubst_expr (tree t, tree args, tsubst_f
*** 21220,21226 ****
  	  ++c_inhibit_evaluation_warnings;
  	  /* We only want to compute the number of arguments.  */
  	  if (PACK_EXPANSION_P (op))
! 	    expanded = tsubst_pack_expansion (op, args, complain, in_decl);
  	  else
  	    expanded = tsubst_template_args (ARGUMENT_PACK_ARGS (op),
  					     args, complain, in_decl);
--- 21260,21287 ----
  	  ++c_inhibit_evaluation_warnings;
  	  /* We only want to compute the number of arguments.  */
  	  if (PACK_EXPANSION_P (op))
! 	    {
! 	      expanded = NULL_TREE;
! 	      if (DECL_DECOMPOSITION_P (PACK_EXPANSION_PATTERN (op)))
! 		{
! 		  tree d = PACK_EXPANSION_PATTERN (op);
! 		  if (DECL_HAS_VALUE_EXPR_P (d))
! 		    {
! 		      d = DECL_VALUE_EXPR (d);
! 		      if (TREE_CODE (d) == TREE_VEC)
! 			{
! 			  tree b = TREE_VEC_ELT (d, 0);
! 			  if (!type_dependent_expression_p_push (b))
! 			    {
! 			      expanded = void_node;
! 			      len = TREE_VEC_LENGTH (d) - 2;
! 			    }
! 			}
! 		    }
! 		}
! 	      if (!expanded)
! 		expanded = tsubst_pack_expansion (op, args, complain, in_decl);
! 	    }
  	  else
  	    expanded = tsubst_template_args (ARGUMENT_PACK_ARGS (op),
  					     args, complain, in_decl);
*************** value_dependent_expression_p (tree expre
*** 29050,29055 ****
--- 29111,29134 ----
      case SIZEOF_EXPR:
        if (SIZEOF_EXPR_TYPE_P (expression))
  	return dependent_type_p (TREE_TYPE (TREE_OPERAND (expression, 0)));
+       if (tree p = TREE_OPERAND (expression, 0))
+ 	if (PACK_EXPANSION_P (p)
+ 	    && DECL_DECOMPOSITION_P (PACK_EXPANSION_PATTERN (p)))
+ 	  {
+ 	    tree d = PACK_EXPANSION_PATTERN (p);
+ 	    if (DECL_HAS_VALUE_EXPR_P (d))
+ 	      {
+ 		d = DECL_VALUE_EXPR (d);
+ 		/* [temp.dep.constexpr]/4:
+ 		   Expressions of the following form are value-dependent:
+ 		   sizeof ... ( identifier )
+ 		   unless the identifier is a structured binding pack whose
+ 		   initializer is not dependent.  */
+ 		if (TREE_CODE (d) == TREE_VEC
+ 		    && !type_dependent_expression_p (TREE_VEC_ELT (d, 0)))
+ 		  return false;
+ 	      }
+ 	  }
        /* FALLTHRU */
      case ALIGNOF_EXPR:
      case TYPEID_EXPR:
*************** instantiation_dependent_r (tree *tp, int
*** 29563,29568 ****
--- 29642,29663 ----
  	tree op = TREE_OPERAND (*tp, 0);
  	if (code == SIZEOF_EXPR && SIZEOF_EXPR_TYPE_P (*tp))
  	  op = TREE_TYPE (op);
+ 	else if (code == SIZEOF_EXPR
+ 		 && PACK_EXPANSION_P (op)
+ 		 && DECL_DECOMPOSITION_P (PACK_EXPANSION_PATTERN (op)))
+ 	  {
+ 	    tree d = PACK_EXPANSION_PATTERN (op);
+ 	    if (DECL_HAS_VALUE_EXPR_P (d))
+ 	      {
+ 		d = DECL_VALUE_EXPR (d);
+ 		if (TREE_CODE (d) == TREE_VEC
+ 		    && !type_dependent_expression_p (TREE_VEC_ELT (d, 0)))
+ 		  {
+ 		    *walk_subtrees = 0;
+ 		    return NULL_TREE;
+ 		  }
+ 	      }
+ 	  }
  	if (TYPE_P (op))
  	  {
  	    if (dependent_type_p (op))
diff -Nrcpad gcc-16-20250803/gcc/cp/semantics.cc gcc-16-20250810/gcc/cp/semantics.cc
*** gcc-16-20250803/gcc/cp/semantics.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/cp/semantics.cc	Sun Aug 10 22:32:07 2025
*************** finish_omp_clauses (tree clauses, enum c
*** 7751,7757 ****
        /* We've reached the end of a list of expanded nodes.  Reset the group
  	 start pointer.  */
        if (c == grp_sentinel)
! 	grp_start_p = NULL;
  
        switch (OMP_CLAUSE_CODE (c))
  	{
--- 7751,7764 ----
        /* We've reached the end of a list of expanded nodes.  Reset the group
  	 start pointer.  */
        if (c == grp_sentinel)
! 	{
! 	  if (grp_start_p
! 	      && OMP_CLAUSE_HAS_ITERATORS (*grp_start_p))
! 	    for (tree gc = *grp_start_p; gc != grp_sentinel;
! 		 gc = OMP_CLAUSE_CHAIN (gc))
! 	      OMP_CLAUSE_ITERATORS (gc) = OMP_CLAUSE_ITERATORS (*grp_start_p);
! 	  grp_start_p = NULL;
! 	}
  
        switch (OMP_CLAUSE_CODE (c))
  	{
*************** finish_omp_clauses (tree clauses, enum c
*** 9003,9008 ****
--- 9010,9022 ----
  	  /* FALLTHRU */
  	case OMP_CLAUSE_TO:
  	case OMP_CLAUSE_FROM:
+ 	  if (OMP_CLAUSE_ITERATORS (c)
+ 	      && cp_omp_finish_iterators (OMP_CLAUSE_ITERATORS (c)))
+ 	    {
+ 	      t = error_mark_node;
+ 	      break;
+ 	    }
+ 	  /* FALLTHRU */
  	case OMP_CLAUSE__CACHE_:
  	  {
  	    using namespace omp_addr_tokenizer;
*************** finish_omp_clauses (tree clauses, enum c
*** 9906,9911 ****
--- 9920,9930 ----
  	pc = &OMP_CLAUSE_CHAIN (c);
      }
  
+   if (grp_start_p
+       && OMP_CLAUSE_HAS_ITERATORS (*grp_start_p))
+     for (tree gc = *grp_start_p; gc; gc = OMP_CLAUSE_CHAIN (gc))
+       OMP_CLAUSE_ITERATORS (gc) = OMP_CLAUSE_ITERATORS (*grp_start_p);
+ 
    if (reduction_seen < 0 && (ordered_seen || schedule_seen))
      reduction_seen = -2;
  
diff -Nrcpad gcc-16-20250803/gcc/d/ChangeLog gcc-16-20250810/gcc/d/ChangeLog
*** gcc-16-20250803/gcc/d/ChangeLog	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/d/ChangeLog	Sun Aug 10 22:32:07 2025
***************
*** 1,3 ****
--- 1,7 ----
+ 2025-08-06  Sam James  <sam@gentoo.org>
+ 
+ 	* Make-lang.in (ALL_DFLAGS): Don't use ALIASING_FLAGS.
+ 
  2025-07-25  David Malcolm  <dmalcolm@redhat.com>
  
  	* d-diagnostic.cc: Likewise.
diff -Nrcpad gcc-16-20250803/gcc/d/Make-lang.in gcc-16-20250810/gcc/d/Make-lang.in
*** gcc-16-20250803/gcc/d/Make-lang.in	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/d/Make-lang.in	Sun Aug 10 22:32:07 2025
*************** WARN_DFLAGS = -Wall -Wdeprecated
*** 61,67 ****
  NOEXCEPTION_DFLAGS = $(filter-out -fno-rtti, $(NOEXCEPTION_FLAGS))
  
  ALL_DFLAGS = $(DFLAGS-$@) $(GDCFLAGS) -fversion=IN_GCC $(CHECKING_DFLAGS) \
! 	$(PICFLAG) $(ALIASING_FLAGS) $(NOEXCEPTION_DFLAGS) $(COVERAGE_FLAGS) \
  	$(WARN_DFLAGS)
  
  DCOMPILE.base = $(GDC) -c $(ALL_DFLAGS) -o $@
--- 61,67 ----
  NOEXCEPTION_DFLAGS = $(filter-out -fno-rtti, $(NOEXCEPTION_FLAGS))
  
  ALL_DFLAGS = $(DFLAGS-$@) $(GDCFLAGS) -fversion=IN_GCC $(CHECKING_DFLAGS) \
! 	$(PICFLAG) $(NOEXCEPTION_DFLAGS) $(COVERAGE_FLAGS) \
  	$(WARN_DFLAGS)
  
  DCOMPILE.base = $(GDC) -c $(ALL_DFLAGS) -o $@
diff -Nrcpad gcc-16-20250803/gcc/defaults.h gcc-16-20250810/gcc/defaults.h
*** gcc-16-20250803/gcc/defaults.h	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/defaults.h	Sun Aug 10 22:32:07 2025
*************** see the files COPYING3 and COPYING.RUNTI
*** 1158,1164 ****
  #endif
  
  #ifndef MAX_FIXED_MODE_SIZE
! #define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (DImode)
  #endif
  
  /* Nonzero if structures and unions should be returned in memory.
--- 1158,1164 ----
  #endif
  
  #ifndef MAX_FIXED_MODE_SIZE
! #define MAX_FIXED_MODE_SIZE MAX (BITS_PER_WORD * 2, 64)
  #endif
  
  /* Nonzero if structures and unions should be returned in memory.
diff -Nrcpad gcc-16-20250803/gcc/diagnostic.h gcc-16-20250810/gcc/diagnostic.h
*** gcc-16-20250803/gcc/diagnostic.h	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/diagnostic.h	Sun Aug 10 22:32:07 2025
*************** namespace diagnostics {
*** 277,285 ****
  /* Compute the number of digits in the decimal representation of an integer.  */
  extern int num_digits (int);
  
- extern char *get_cwe_url (int cwe);
- extern const char *maybe_line_and_column (int line, int col);
- 
  } // namespace diagnostics
  
  #endif /* ! GCC_DIAGNOSTIC_H */
--- 277,282 ----
diff -Nrcpad gcc-16-20250803/gcc/diagnostics/buffering.cc gcc-16-20250810/gcc/diagnostics/buffering.cc
*** gcc-16-20250803/gcc/diagnostics/buffering.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/diagnostics/buffering.cc	Sun Aug 10 22:32:07 2025
*************** along with GCC; see the file COPYING3.
*** 24,29 ****
--- 24,30 ----
  #include "diagnostic.h"
  #include "diagnostics/buffering.h"
  #include "diagnostics/sink.h"
+ #include "diagnostics/dumping.h"
  
  namespace diagnostics {
  
*************** void
*** 122,133 ****
  buffer::dump (FILE *out, int indent) const
  {
    m_diagnostic_counters.dump (out, indent + 2);
!   fprintf (out, "%*sm_per_sink_buffers:\n", indent, "");
    if (m_per_sink_buffers)
      for (auto per_sink_buffer_ : *m_per_sink_buffers)
        per_sink_buffer_->dump (out, indent + 2);
    else
!     fprintf (out, "%*s(none)\n", indent + 2, "");
  }
  
  bool
--- 123,134 ----
  buffer::dump (FILE *out, int indent) const
  {
    m_diagnostic_counters.dump (out, indent + 2);
!   dumping::emit_heading (out, indent, "m_per_sink_buffers");
    if (m_per_sink_buffers)
      for (auto per_sink_buffer_ : *m_per_sink_buffers)
        per_sink_buffer_->dump (out, indent + 2);
    else
!     dumping::emit_none (out, indent + 2);
  }
  
  bool
diff -Nrcpad gcc-16-20250803/gcc/diagnostics/buffering.h gcc-16-20250810/gcc/diagnostics/buffering.h
*** gcc-16-20250803/gcc/diagnostics/buffering.h	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/diagnostics/buffering.h	Sun Aug 10 22:32:07 2025
*************** class sink;
*** 36,42 ****
     A diagnostics::buffer can be:
  
     * flushed to the diagnostics::context, which issues
!    the diagnostics within the buffer to the output format
     and checks for limits such as -fmax-errors=, or
  
     * moved to another diagnostics::buffer, which moves the diagnostics
--- 36,42 ----
     A diagnostics::buffer can be:
  
     * flushed to the diagnostics::context, which issues
!    the diagnostics within the buffer to the output sinks
     and checks for limits such as -fmax-errors=, or
  
     * moved to another diagnostics::buffer, which moves the diagnostics
*************** class sink;
*** 45,57 ****
     source buffer, or
  
     * cleared, which discards any diagnostics within the buffer
!    without issuing them to the output format.
  
!    Since a buffer needs to contain output-format-specific data,
!    it's not possible to change the output format of the
     diagnostics::context once any buffers are non-empty.
  
!    To simplify implementing output formats, it's not possible
     to change buffering on a diagnostics::context whilst within a
     diagnostic group.  */
  
--- 45,57 ----
     source buffer, or
  
     * cleared, which discards any diagnostics within the buffer
!    without issuing them to the output sinks.
  
!    Since a buffer needs to contain sink-specific data,
!    it's not possible to change the output sink(s) of the
     diagnostics::context once any buffers are non-empty.
  
!    To simplify implementing output sinks, it's not possible
     to change buffering on a diagnostics::context whilst within a
     diagnostic group.  */
  
diff -Nrcpad gcc-16-20250803/gcc/diagnostics/column-options.h gcc-16-20250810/gcc/diagnostics/column-options.h
*** gcc-16-20250803/gcc/diagnostics/column-options.h	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/diagnostics/column-options.h	Sun Aug 10 22:32:07 2025
***************
*** 0 ****
--- 1,44 ----
+ /* Options relating to the meaning of column numbers.
+    Copyright (C) 2000-2025 Free Software Foundation, Inc.
+ 
+ This file is part of GCC.
+ 
+ GCC is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 3, or (at your option) any later
+ version.
+ 
+ GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3.  If not see
+ <http://www.gnu.org/licenses/>.  */
+ 
+ #ifndef GCC_DIAGNOSTICS_COLUMN_OPTIONS_H
+ #define GCC_DIAGNOSTICS_COLUMN_OPTIONS_H
+ 
+ namespace diagnostics {
+ 
+ /* A bundle of options relating to the meaning of column numbers.  */
+ 
+ struct column_options
+ {
+   int convert_column (file_cache &fc,
+ 		      expanded_location s) const;
+ 
+   /* What units to use when outputting the column number.  */
+   enum diagnostics_column_unit m_column_unit;
+ 
+   /* The origin for the column number (1-based or 0-based typically).  */
+   int m_column_origin;
+ 
+   /* The size of the tabstop for tab expansion.  */
+   int m_tabstop;
+ };
+ 
+ } // namespace diagnostics
+ 
+ #endif /* ! GCC_DIAGNOSTICS_COLUMN_OPTIONS_H */
diff -Nrcpad gcc-16-20250803/gcc/diagnostics/context.cc gcc-16-20250810/gcc/diagnostics/context.cc
*** gcc-16-20250803/gcc/diagnostics/context.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/diagnostics/context.cc	Sun Aug 10 22:32:07 2025
*************** along with GCC; see the file COPYING3.
*** 50,55 ****
--- 50,56 ----
  #include "diagnostics/logical-locations.h"
  #include "diagnostics/buffering.h"
  #include "diagnostics/file-cache.h"
+ #include "diagnostics/dumping.h"
  
  #ifdef HAVE_TERMIOS_H
  # include <termios.h>
*************** context::initialize (int n_opts)
*** 170,187 ****
    m_text_callbacks.m_html_start_span
      = default_start_span_fn<to_html>;
    m_text_callbacks.m_end_diagnostic = default_text_finalizer;
!   m_option_mgr = nullptr;
    m_urlifier_stack = new auto_vec<urlifier_stack_node> ();
    m_last_location = UNKNOWN_LOCATION;
    m_client_aux_data = nullptr;
    m_lock = 0;
    m_inhibit_notes_p = false;
    m_source_printing.colorize_source_p = false;
    m_source_printing.show_labels_p = false;
    m_source_printing.show_line_numbers_p = false;
    m_source_printing.min_margin_width = 0;
    m_source_printing.show_ruler_p = false;
    m_source_printing.show_event_links_p = false;
    m_report_bug = false;
    m_extra_output_kind = EXTRA_DIAGNOSTIC_OUTPUT_none;
    if (const char *var = getenv ("GCC_EXTRA_DIAGNOSTIC_OUTPUT"))
--- 171,194 ----
    m_text_callbacks.m_html_start_span
      = default_start_span_fn<to_html>;
    m_text_callbacks.m_end_diagnostic = default_text_finalizer;
!   m_option_id_mgr = nullptr;
    m_urlifier_stack = new auto_vec<urlifier_stack_node> ();
    m_last_location = UNKNOWN_LOCATION;
    m_client_aux_data = nullptr;
    m_lock = 0;
    m_inhibit_notes_p = false;
+ 
    m_source_printing.colorize_source_p = false;
    m_source_printing.show_labels_p = false;
    m_source_printing.show_line_numbers_p = false;
    m_source_printing.min_margin_width = 0;
    m_source_printing.show_ruler_p = false;
    m_source_printing.show_event_links_p = false;
+ 
+   m_column_options.m_column_unit = DIAGNOSTICS_COLUMN_UNIT_DISPLAY;
+   m_column_options.m_column_origin = 1;
+   m_column_options.m_tabstop = 8;
+ 
    m_report_bug = false;
    m_extra_output_kind = EXTRA_DIAGNOSTIC_OUTPUT_none;
    if (const char *var = getenv ("GCC_EXTRA_DIAGNOSTIC_OUTPUT"))
*************** context::initialize (int n_opts)
*** 192,200 ****
  	m_extra_output_kind = EXTRA_DIAGNOSTIC_OUTPUT_fixits_v2;
        /* Silently ignore unrecognized values.  */
      }
-   m_column_unit = DIAGNOSTICS_COLUMN_UNIT_DISPLAY;
-   m_column_origin = 1;
-   m_tabstop = 8;
    m_escape_format = DIAGNOSTICS_ESCAPE_FORMAT_UNICODE;
    m_fixits_change_set = nullptr;
    m_diagnostic_groups.m_group_nesting_depth = 0;
--- 199,204 ----
*************** context::urls_init (int value)
*** 284,289 ****
--- 288,320 ----
  	(m_reference_printer->get_url_format ());
  }
  
+ void
+ context::set_show_nesting (bool val)
+ {
+   for (auto sink_ : m_sinks)
+     if (sink_->follows_reference_printer_p ())
+       if (auto text_sink_ = sink_->dyn_cast_text_sink ())
+ 	text_sink_->set_show_nesting (val);
+ }
+ 
+ void
+ context::set_show_nesting_locations (bool val)
+ {
+   for (auto sink_ : m_sinks)
+     if (sink_->follows_reference_printer_p ())
+       if (auto text_sink_ = sink_->dyn_cast_text_sink ())
+ 	text_sink_->set_show_locations_in_nesting (val);
+ }
+ 
+ void
+ context::set_show_nesting_levels (bool val)
+ {
+   for (auto sink_ : m_sinks)
+     if (sink_->follows_reference_printer_p ())
+       if (auto text_sink_ = sink_->dyn_cast_text_sink ())
+ 	text_sink_->set_show_nesting_levels (val);
+ }
+ 
  /* Create the file_cache, if not already created, and tell it how to
     translate files on input.  */
  void
*************** context::finish ()
*** 337,344 ****
        m_client_data_hooks = nullptr;
      }
  
!   delete m_option_mgr;
!   m_option_mgr = nullptr;
  
    if (m_urlifier_stack)
      {
--- 368,375 ----
        m_client_data_hooks = nullptr;
      }
  
!   delete m_option_id_mgr;
!   m_option_id_mgr = nullptr;
  
    if (m_urlifier_stack)
      {
*************** context::finish ()
*** 355,387 ****
  /* Dump state of this diagnostics::context to OUT, for debugging.  */
  
  void
! context::dump (FILE *out) const
  {
!   fprintf (out, "diagnostics::context:\n");
!   m_diagnostic_counters.dump (out, 2);
!   fprintf (out, "  reference printer:\n");
!   m_reference_printer->dump (out, 4);
!   fprintf (out, "  output sinks:\n");
    if (m_sinks.length () > 0)
      {
        for (unsigned i = 0; i < m_sinks.length (); ++i)
  	{
! 	  fprintf (out, "  sink %i:\n", i);
! 	  m_sinks[i]->dump (out, 4);
  	}
      }
    else
!     fprintf (out, "    (none):\n");
!   fprintf (out, "  diagnostic buffer:\n");
    if (m_diagnostic_buffer)
!     m_diagnostic_buffer->dump (out, 4);
    else
!     fprintf (out, "    (none):\n");
!   fprintf (out, "  file cache:\n");
    if (m_file_cache)
!     m_file_cache->dump (out, 4);
    else
!     fprintf (out, "    (none):\n");
  }
  
  /* Return true if sufficiently severe diagnostics have been seen that
--- 386,425 ----
  /* Dump state of this diagnostics::context to OUT, for debugging.  */
  
  void
! context::dump (FILE *outfile) const
  {
!   dumping::emit_heading (outfile, 0, "diagnostics::context");
!   m_diagnostic_counters.dump (outfile, 2);
!   dumping::emit_heading (outfile, 2, "reference printer");
!   if (m_reference_printer)
!     m_reference_printer->dump (outfile, 4);
!   else
!     dumping::emit_none (outfile, 4);
!   dumping::emit_heading (outfile, 2, "output sinks");
    if (m_sinks.length () > 0)
      {
        for (unsigned i = 0; i < m_sinks.length (); ++i)
  	{
! 	  dumping::emit_indent (outfile, 4);
! 	  const sink *s = m_sinks[i];
! 	  fprintf (outfile, "sink %i (", i);
! 	  s->dump_kind (outfile);
! 	  fprintf (outfile, "):\n");
! 	  s->dump (outfile, 6);
  	}
      }
    else
!     dumping::emit_none (outfile, 4);
!   dumping::emit_heading (outfile, 2, "diagnostic buffer");
    if (m_diagnostic_buffer)
!     m_diagnostic_buffer->dump (outfile, 4);
    else
!     dumping::emit_none (outfile, 4);
!   dumping::emit_heading (outfile, 2, "file cache");
    if (m_file_cache)
!     m_file_cache->dump (outfile, 4);
    else
!     dumping::emit_none (outfile, 4);
  }
  
  /* Return true if sufficiently severe diagnostics have been seen that
*************** context::set_original_argv (unique_argv
*** 465,475 ****
  }
  
  void
! context::set_option_manager (std::unique_ptr<option_manager> mgr,
! 			     unsigned lang_mask)
  {
!   delete m_option_mgr;
!   m_option_mgr = mgr.release ();
    m_lang_mask = lang_mask;
  }
  
--- 503,513 ----
  }
  
  void
! context::set_option_id_manager (std::unique_ptr<option_id_manager> mgr,
! 				unsigned lang_mask)
  {
!   delete m_option_id_mgr;
!   m_option_id_mgr = mgr.release ();
    m_lang_mask = lang_mask;
  }
  
*************** convert_column_unit (file_cache &fc,
*** 671,681 ****
      }
  }
  
  column_policy::column_policy (const context &dc)
  : m_file_cache (dc.get_file_cache ()),
!   m_column_unit (dc.m_column_unit),
!   m_column_origin (dc.m_column_origin),
!   m_tabstop (dc.m_tabstop)
  {
  }
  
--- 709,730 ----
      }
  }
  
+ /* Given an expanded_location, convert the column (which is in 1-based bytes)
+    to the requested units and origin.  Return -1 if the column is
+    invalid (<= 0).  */
+ int
+ column_options::convert_column (file_cache &fc,
+ 				expanded_location s) const
+ {
+   int one_based_col = convert_column_unit (fc, m_column_unit, m_tabstop, s);
+   if (one_based_col <= 0)
+     return -1;
+   return one_based_col + (m_column_origin - 1);
+ }
+ 
  column_policy::column_policy (const context &dc)
  : m_file_cache (dc.get_file_cache ()),
!   m_column_options (dc.get_column_options ())
  {
  }
  
*************** column_policy::column_policy (const cont
*** 685,695 ****
  int
  column_policy::converted_column (expanded_location s) const
  {
!   int one_based_col = convert_column_unit (m_file_cache,
! 					   m_column_unit, m_tabstop, s);
!   if (one_based_col <= 0)
!     return -1;
!   return one_based_col + (m_column_origin - 1);
  }
  
  /* Return a string describing a location e.g. "foo.c:42:10".  */
--- 734,740 ----
  int
  column_policy::converted_column (expanded_location s) const
  {
!   return m_column_options.convert_column (m_file_cache, s);
  }
  
  /* Return a string describing a location e.g. "foo.c:42:10".  */
*************** column_policy::get_location_text (const
*** 711,717 ****
  	col = converted_column (s);
      }
  
!   const char *line_col = maybe_line_and_column (line, col);
    return label_text::take (build_message_string ("%s%s%s:%s", locus_cs, file,
  						 line_col, locus_ce));
  }
--- 756,762 ----
  	col = converted_column (s);
      }
  
!   const char *line_col = text_sink::maybe_line_and_column (line, col);
    return label_text::take (build_message_string ("%s%s%s:%s", locus_cs, file,
  						 line_col, locus_ce));
  }
*************** context::get_any_inlining_info (diagnost
*** 1098,1104 ****
      /* Retrieve the locations into which the expression about to be
         diagnosed has been inlined, including those of all the callers
         all the way down the inlining stack.  */
!     m_set_locations_cb (this, diagnostic);
    else
      {
        /* When there's no callback use just the one location provided
--- 1143,1149 ----
      /* Retrieve the locations into which the expression about to be
         diagnosed has been inlined, including those of all the callers
         all the way down the inlining stack.  */
!     m_set_locations_cb (*this, diagnostic);
    else
      {
        /* When there's no callback use just the one location provided
*************** context::report_diagnostic (diagnostic_i
*** 1249,1255 ****
      }
  
    if (m_adjust_diagnostic_info)
!     m_adjust_diagnostic_info (this, diagnostic);
  
    if (diagnostic->m_kind == kind::pedwarn)
      {
--- 1294,1300 ----
      }
  
    if (m_adjust_diagnostic_info)
!     m_adjust_diagnostic_info (*this, diagnostic);
  
    if (diagnostic->m_kind == kind::pedwarn)
      {
*************** context::report_diagnostic (diagnostic_i
*** 1385,1390 ****
--- 1430,1437 ----
        sink_->on_report_diagnostic (*diagnostic, orig_diag_kind);
      }
  
+   const int tabstop = get_column_options ().m_tabstop;
+ 
    switch (m_extra_output_kind)
      {
      default:
*************** context::report_diagnostic (diagnostic_i
*** 1393,1406 ****
        print_parseable_fixits (get_file_cache (),
  			      m_reference_printer, diagnostic->m_richloc,
  			      DIAGNOSTICS_COLUMN_UNIT_BYTE,
! 			      m_tabstop);
        pp_flush (m_reference_printer);
        break;
      case EXTRA_DIAGNOSTIC_OUTPUT_fixits_v2:
        print_parseable_fixits (get_file_cache (),
  			      m_reference_printer, diagnostic->m_richloc,
  			      DIAGNOSTICS_COLUMN_UNIT_DISPLAY,
! 			      m_tabstop);
        pp_flush (m_reference_printer);
        break;
      }
--- 1440,1453 ----
        print_parseable_fixits (get_file_cache (),
  			      m_reference_printer, diagnostic->m_richloc,
  			      DIAGNOSTICS_COLUMN_UNIT_BYTE,
! 			      tabstop);
        pp_flush (m_reference_printer);
        break;
      case EXTRA_DIAGNOSTIC_OUTPUT_fixits_v2:
        print_parseable_fixits (get_file_cache (),
  			      m_reference_printer, diagnostic->m_richloc,
  			      DIAGNOSTICS_COLUMN_UNIT_DISPLAY,
! 			      tabstop);
        pp_flush (m_reference_printer);
        break;
      }
*************** context::pop_nesting_level ()
*** 1682,1690 ****
  }
  
  void
  sink::dump (FILE *out, int indent) const
  {
!   fprintf (out, "%*sprinter:\n", indent, "");
    m_printer->dump (out, indent + 2);
  }
  
--- 1729,1743 ----
  }
  
  void
+ context::set_nesting_level (int new_level)
+ {
+   m_diagnostic_groups.m_diagnostic_nesting_level = new_level;
+ }
+ 
+ void
  sink::dump (FILE *out, int indent) const
  {
!   dumping::emit_heading (out, indent, "printer");
    m_printer->dump (out, indent + 2);
  }
  
*************** counters::counters ()
*** 1771,1789 ****
  void
  counters::dump (FILE *out, int indent) const
  {
!   fprintf (out, "%*scounts:\n", indent, "");
    bool none = true;
    for (int i = 0; i < static_cast<int> (kind::last_diagnostic_kind); i++)
      if (m_count_for_kind[i] > 0)
        {
! 	fprintf (out, "%*s%s%i\n",
! 		 indent + 2, "",
  		 get_text_for_kind (static_cast<enum kind> (i)),
  		 m_count_for_kind[i]);
  	none = false;
        }
    if (none)
!     fprintf (out, "%*s(none)\n", indent + 2, "");
  }
  
  void
--- 1824,1842 ----
  void
  counters::dump (FILE *out, int indent) const
  {
!   dumping::emit_heading (out, indent, "counts");
    bool none = true;
    for (int i = 0; i < static_cast<int> (kind::last_diagnostic_kind); i++)
      if (m_count_for_kind[i] > 0)
        {
! 	dumping::emit_indent (out, indent + 2);
! 	fprintf (out, "%s%i\n",
  		 get_text_for_kind (static_cast<enum kind> (i)),
  		 m_count_for_kind[i]);
  	none = false;
        }
    if (none)
!     dumping::emit_none (out, indent + 2);
  }
  
  void
*************** assert_location_text (const char *expect
*** 2009,2016 ****
  			= DIAGNOSTICS_COLUMN_UNIT_BYTE)
  {
    diagnostics::selftest::test_context dc;
!   dc.m_column_unit = column_unit;
!   dc.m_column_origin = origin;
  
    expanded_location xloc;
    xloc.file = filename;
--- 2062,2069 ----
  			= DIAGNOSTICS_COLUMN_UNIT_BYTE)
  {
    diagnostics::selftest::test_context dc;
!   dc.get_column_options ().m_column_unit = column_unit;
!   dc.get_column_options ().m_column_origin = origin;
  
    expanded_location xloc;
    xloc.file = filename;
*************** test_get_location_text ()
*** 2046,2053 ****
    assert_location_text ("foo.c:42:", "foo.c", 42, 10, false);
    assert_location_text ("foo.c:", "foo.c", 0, 10, false);
  
!   diagnostics::maybe_line_and_column (INT_MAX, INT_MAX);
!   diagnostics::maybe_line_and_column (INT_MIN, INT_MIN);
  
    {
      /* In order to test display columns vs byte columns, we need to create a
--- 2099,2106 ----
    assert_location_text ("foo.c:42:", "foo.c", 42, 10, false);
    assert_location_text ("foo.c:", "foo.c", 0, 10, false);
  
!   diagnostics::text_sink::maybe_line_and_column (INT_MAX, INT_MAX);
!   diagnostics::text_sink::maybe_line_and_column (INT_MIN, INT_MIN);
  
    {
      /* In order to test display columns vs byte columns, we need to create a
diff -Nrcpad gcc-16-20250803/gcc/diagnostics/context.h gcc-16-20250810/gcc/diagnostics/context.h
*** gcc-16-20250803/gcc/diagnostics/context.h	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/diagnostics/context.h	Sun Aug 10 22:32:07 2025
*************** along with GCC; see the file COPYING3.
*** 23,29 ****
--- 23,33 ----
  #include "lazily-created.h"
  #include "unique-argv.h"
  #include "diagnostics/option-classifier.h"
+ #include "diagnostics/option-id-manager.h"
  #include "diagnostics/context-options.h"
+ #include "diagnostics/source-printing-options.h"
+ #include "diagnostics/column-options.h"
+ #include "diagnostics/counters.h"
  
  namespace diagnostics {
  
*************** typedef void (*text_finalizer_fn) (text_
*** 81,164 ****
  				   const diagnostic_info *,
  				   enum kind);
  
- /* Abstract base class for the diagnostic subsystem to make queries
-    about command-line options.  */
- 
- class option_manager
- {
- public:
-   virtual ~option_manager () {}
- 
-   /* Return 1 if option OPT_ID is enabled, 0 if it is disabled,
-      or -1 if it isn't a simple on-off switch
-      (or if the value is unknown, typically set later in target).  */
-   virtual int option_enabled_p (option_id opt_id) const = 0;
- 
-   /* Return malloced memory for the name of the option OPT_ID
-      which enabled a diagnostic, originally of type ORIG_DIAG_KIND but
-      possibly converted to DIAG_KIND by options such as -Werror.
-      May return NULL if no name is to be printed.
-      May be passed 0 as well as the index of a particular option.  */
-   virtual char *make_option_name (option_id opt_id,
- 				  enum kind orig_diag_kind,
- 				  enum kind diag_kind) const = 0;
- 
-   /* Return malloced memory for a URL describing the option that controls
-      a diagnostic.
-      May return NULL if no URL is available.
-      May be passed 0 as well as the index of a particular option.  */
-   virtual char *make_option_url (option_id opt_id) const = 0;
- };
- 
- /* A bundle of options relating to printing the user's source code
-    (potentially with a margin, underlining, labels, etc).  */
- 
- struct source_printing_options
- {
-   /* True if we should print the source line with a caret indicating
-      the location.
-      Corresponds to -fdiagnostics-show-caret.  */
-   bool enabled;
- 
-   /* Maximum width of the source line printed.  */
-   int max_width;
- 
-   /* Character used at the caret when printing source locations.  */
-   char caret_chars[rich_location::STATICALLY_ALLOCATED_RANGES];
- 
-   /* When printing source code, should the characters at carets and ranges
-      be colorized? (assuming colorization is on at all).
-      This should be true for frontends that generate range information
-      (so that the ranges of code are colorized),
-      and false for frontends that merely specify points within the
-      source code (to avoid e.g. colorizing just the first character in
-      a token, which would look strange).  */
-   bool colorize_source_p;
- 
-   /* When printing source code, should labelled ranges be printed?
-      Corresponds to -fdiagnostics-show-labels.  */
-   bool show_labels_p;
- 
-   /* When printing source code, should there be a left-hand margin
-      showing line numbers?
-      Corresponds to -fdiagnostics-show-line-numbers.  */
-   bool show_line_numbers_p;
- 
-   /* If printing source code, what should the minimum width of the margin
-      be?  Line numbers will be right-aligned, and padded to this width.
-      Corresponds to -fdiagnostics-minimum-margin-width=VALUE.  */
-   int min_margin_width;
- 
-   /* Usable by plugins; if true, print a debugging ruler above the
-      source output.  */
-   bool show_ruler_p;
- 
-   /* When printing events in an inline path, should we print lines
-      visualizing links between related events (e.g. for CFG paths)?
-      Corresponds to -fdiagnostics-show-event-links.  */
-   bool show_event_links_p;
- };
- 
  /* A bundle of state for determining column numbers in diagnostics
     (tab stops, whether to start at 0 or 1, etc).
     Uses a file_cache to handle tabs.  */
--- 85,90 ----
*************** public:
*** 174,186 ****
  				bool show_column,
  				bool colorize) const;
  
!   int get_tabstop () const { return m_tabstop; }
  
  private:
    file_cache &m_file_cache;
!   enum diagnostics_column_unit m_column_unit;
!   int m_column_origin;
!   int m_tabstop;
  };
  
  /* A bundle of state for printing locations within diagnostics
--- 100,110 ----
  				bool show_column,
  				bool colorize) const;
  
!   int get_tabstop () const { return m_column_options.m_tabstop; }
  
  private:
    file_cache &m_file_cache;
!   column_options m_column_options;
  };
  
  /* A bundle of state for printing locations within diagnostics
*************** private:
*** 291,318 ****
    enum diagnostics_escape_format m_escape_format;
  };
  
- /* A collection of counters of diagnostics, per-kind
-    (e.g. "3 errors and 1 warning"), for use by both context
-    and by diagnostics::buffer.  */
- 
- struct counters
- {
-   counters ();
- 
-   void dump (FILE *out, int indent) const;
-   void DEBUG_FUNCTION dump () const { dump (stderr, 0); }
- 
-   int get_count (enum kind kind) const
-   {
-     return m_count_for_kind[static_cast<size_t> (kind)];
-   }
- 
-   void move_to (counters &dest);
-   void clear ();
- 
-   int m_count_for_kind[static_cast<size_t> (kind::last_diagnostic_kind)];
- };
- 
  /* This class encapsulates the state of the diagnostics subsystem
     as a whole (either directly, or via owned objects of other classes, to
     avoid global variables).
--- 215,220 ----
*************** struct counters
*** 334,340 ****
     - an optional urlifier to inject URLs into formatted messages
     - counting the number of diagnostics reported of each kind
       (class diagnostics::counters)
!    - calling out to a option_manager to determine if
       a particular warning is enabled or disabled
     - tracking pragmas that enable/disable warnings in a range of
       source code
--- 236,242 ----
     - an optional urlifier to inject URLs into formatted messages
     - counting the number of diagnostics reported of each kind
       (class diagnostics::counters)
!    - calling out to a option_id_manager to determine if
       a particular warning is enabled or disabled
     - tracking pragmas that enable/disable warnings in a range of
       source code
*************** public:
*** 362,368 ****
    friend class text_sink;
    friend class buffer;
  
!   typedef void (*set_locations_callback_t) (context *,
  					    diagnostic_info *);
  
    void initialize (int n_opts);
--- 264,270 ----
    friend class text_sink;
    friend class buffer;
  
!   typedef void (*set_locations_callback_t) (const context &,
  					    diagnostic_info *);
  
    void initialize (int n_opts);
*************** public:
*** 398,403 ****
--- 300,306 ----
  
    void push_nesting_level ();
    void pop_nesting_level ();
+   void set_nesting_level (int new_level);
  
    bool warning_enabled_at (location_t loc, option_id opt_id);
  
*************** public:
*** 489,494 ****
--- 392,400 ----
    }
    void set_show_path_depths (bool val) { m_show_path_depths = val; }
    void set_show_option_requested (bool val) { m_show_option_requested = val; }
+   void set_show_nesting (bool val);
+   void set_show_nesting_locations (bool val);
+   void set_show_nesting_levels (bool val);
    void set_max_errors (int val) { m_max_errors = val; }
    void set_escape_format (enum diagnostics_escape_format val)
    {
*************** public:
*** 546,577 ****
    /* Option-related member functions.  */
    inline bool option_enabled_p (option_id opt_id) const
    {
!     if (!m_option_mgr)
        return true;
!     return m_option_mgr->option_enabled_p (opt_id);
    }
  
    inline char *make_option_name (option_id opt_id,
  				 enum kind orig_diag_kind,
  				 enum kind diag_kind) const
    {
!     if (!m_option_mgr)
        return nullptr;
!     return m_option_mgr->make_option_name (opt_id,
! 					   orig_diag_kind,
! 					   diag_kind);
    }
  
    inline char *make_option_url (option_id opt_id) const
    {
!     if (!m_option_mgr)
        return nullptr;
!     return m_option_mgr->make_option_url (opt_id);
    }
  
    void
!   set_option_manager (std::unique_ptr<option_manager> mgr,
! 		      unsigned lang_mask);
  
    unsigned get_lang_mask () const
    {
--- 452,483 ----
    /* Option-related member functions.  */
    inline bool option_enabled_p (option_id opt_id) const
    {
!     if (!m_option_id_mgr)
        return true;
!     return m_option_id_mgr->option_enabled_p (opt_id);
    }
  
    inline char *make_option_name (option_id opt_id,
  				 enum kind orig_diag_kind,
  				 enum kind diag_kind) const
    {
!     if (!m_option_id_mgr)
        return nullptr;
!     return m_option_id_mgr->make_option_name (opt_id,
! 					      orig_diag_kind,
! 					      diag_kind);
    }
  
    inline char *make_option_url (option_id opt_id) const
    {
!     if (!m_option_id_mgr)
        return nullptr;
!     return m_option_id_mgr->make_option_url (opt_id);
    }
  
    void
!   set_option_id_manager (std::unique_ptr<option_id_manager> option_id_mgr,
! 			 unsigned lang_mask);
  
    unsigned get_lang_mask () const
    {
*************** public:
*** 668,674 ****
    }
  
    void
!   set_adjust_diagnostic_info_callback (void (*cb) (context *,
  						   diagnostic_info *))
    {
      m_adjust_diagnostic_info = cb;
--- 574,580 ----
    }
  
    void
!   set_adjust_diagnostic_info_callback (void (*cb) (const context &,
  						   diagnostic_info *))
    {
      m_adjust_diagnostic_info = cb;
*************** public:
*** 688,693 ****
--- 594,602 ----
      return m_source_printing;
    }
  
+   column_options &get_column_options () { return m_column_options; }
+   const column_options &get_column_options () const { return m_column_options; }
+ 
    void set_caret_max_width (int value);
  
  private:
*************** private:
*** 804,814 ****
  
    /* Client hook to adjust properties of the given diagnostic that we're
       about to issue, such as its kind.  */
!   void (*m_adjust_diagnostic_info)(context *, diagnostic_info *);
  
    /* Owned by the context; this would be a std::unique_ptr if
       context had a proper ctor.  */
!   option_manager *m_option_mgr;
    unsigned m_lang_mask;
  
    /* A stack of optional hooks for adding URLs to quoted text strings in
--- 713,723 ----
  
    /* Client hook to adjust properties of the given diagnostic that we're
       about to issue, such as its kind.  */
!   void (*m_adjust_diagnostic_info)(const context &, diagnostic_info *);
  
    /* Owned by the context; this would be a std::unique_ptr if
       context had a proper ctor.  */
!   option_id_manager *m_option_id_mgr;
    unsigned m_lang_mask;
  
    /* A stack of optional hooks for adding URLs to quoted text strings in
*************** private:
*** 835,840 ****
--- 744,750 ----
    bool m_inhibit_notes_p;
  
    source_printing_options m_source_printing;
+   column_options m_column_options;
  
    /* True if -freport-bug option is used.  */
    bool m_report_bug;
*************** private:
*** 844,860 ****
       -fdiagnostics-parseable-fixits and GCC_EXTRA_DIAGNOSTIC_OUTPUT.  */
    enum diagnostics_extra_output_kind m_extra_output_kind;
  
- public:
-   /* What units to use when outputting the column number.  */
-   enum diagnostics_column_unit m_column_unit;
- 
-   /* The origin for the column number (1-based or 0-based typically).  */
-   int m_column_origin;
- 
-   /* The size of the tabstop for tab expansion.  */
-   int m_tabstop;
- 
- private:
    /* How should non-ASCII/non-printable bytes be escaped when
       a diagnostic suggests escaping the source code on output.  */
    enum diagnostics_escape_format m_escape_format;
--- 754,759 ----
diff -Nrcpad gcc-16-20250803/gcc/diagnostics/counters.h gcc-16-20250810/gcc/diagnostics/counters.h
*** gcc-16-20250803/gcc/diagnostics/counters.h	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/diagnostics/counters.h	Sun Aug 10 22:32:07 2025
***************
*** 0 ****
--- 1,51 ----
+ /* Counts of per-kind diagnostics.
+    Copyright (C) 2000-2025 Free Software Foundation, Inc.
+ 
+ This file is part of GCC.
+ 
+ GCC is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 3, or (at your option) any later
+ version.
+ 
+ GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3.  If not see
+ <http://www.gnu.org/licenses/>.  */
+ 
+ #ifndef GCC_DIAGNOSTICS_COUNTERS_H
+ #define GCC_DIAGNOSTICS_COUNTERS_H
+ 
+ #include "diagnostics/kinds.h"
+ 
+ namespace diagnostics {
+ 
+ /* A collection of counters of diagnostics, per-kind
+    (e.g. "3 errors and 1 warning"), for use by both diagnostics::context
+    and by diagnostics::buffer.  */
+ 
+ struct counters
+ {
+   counters ();
+ 
+   void dump (FILE *out, int indent) const;
+   void DEBUG_FUNCTION dump () const { dump (stderr, 0); }
+ 
+   int get_count (enum kind kind) const
+   {
+     return m_count_for_kind[static_cast<size_t> (kind)];
+   }
+ 
+   void move_to (counters &dest);
+   void clear ();
+ 
+   int m_count_for_kind[static_cast<size_t> (kind::last_diagnostic_kind)];
+ };
+ 
+ } // namespace diagnostics
+ 
+ #endif /* ! GCC_DIAGNOSTICS_COUNTERS_H */
diff -Nrcpad gcc-16-20250803/gcc/diagnostics/dumping.cc gcc-16-20250810/gcc/diagnostics/dumping.cc
*** gcc-16-20250803/gcc/diagnostics/dumping.cc	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/diagnostics/dumping.cc	Sun Aug 10 22:32:07 2025
***************
*** 0 ****
--- 1,102 ----
+ /* Utilities for implementing "dump" functions for the diagnostics subsystem.
+    Copyright (C) 2025 Free Software Foundation, Inc.
+    Contributed by David Malcolm <dmalcolm@redhat.com>.
+ 
+ This file is part of GCC.
+ 
+ GCC is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 3, or (at your option) any later
+ version.
+ 
+ GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3.  If not see
+ <http://www.gnu.org/licenses/>.  */
+ 
+ 
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+ #include "diagnostics/dumping.h"
+ 
+ namespace diagnostics {
+ namespace dumping {
+ 
+ /* Emit indentation to OUTFILE for the start of a dump line.  */
+ 
+ void
+ emit_indent (FILE *outfile, int indent)
+ {
+   fprintf (outfile, "%*s", indent, "");
+ }
+ 
+ /* Emit an indented line to OUTFILE showing a heading.  */
+ 
+ void
+ emit_heading (FILE *outfile, int indent,
+ 	      const char *text)
+ {
+   emit_indent (outfile, indent);
+   fprintf (outfile, "%s:\n", text);
+ }
+ 
+ /* Various functions that emit an indented line to OUTFILE
+    showing "label: value".  */
+ 
+ void
+ emit_string_field (FILE *outfile, int indent,
+ 		      const char *label, const char *value)
+ {
+   emit_indent (outfile, indent);
+   fprintf (outfile, "%s: %s\n", label, value);
+ }
+ 
+ void
+ emit_bool_field (FILE *outfile, int indent,
+ 		 const char *label, bool value)
+ {
+   emit_string_field (outfile, indent, label,
+ 		     value ? "true" : "false");
+ }
+ 
+ void
+ emit_size_t_field (FILE *outfile, int indent,
+ 		   const char *label, size_t value)
+ {
+   emit_indent (outfile, indent);
+   fprintf (outfile, "%s: " HOST_SIZE_T_PRINT_DEC "\n", label, value);
+ }
+ 
+ void
+ emit_int_field (FILE *outfile, int indent,
+ 		const char *label, int value)
+ {
+   emit_indent (outfile, indent);
+   fprintf (outfile, "%s: %i\n", label, value);
+ }
+ 
+ void
+ emit_unsigned_field (FILE *outfile, int indent,
+ 		     const char *label, unsigned value)
+ {
+   emit_indent (outfile, indent);
+   fprintf (outfile, "%s: %u\n", label, value);
+ }
+ 
+ /* Emit an indented line to OUTFILE reading "(none)".  */
+ 
+ void
+ emit_none (FILE *outfile, int indent)
+ {
+   emit_indent (outfile, indent);
+   fprintf (outfile, "(none)\n");
+ }
+ 
+ 
+ } // namespace dumping {
+ } // namespace diagnostics
diff -Nrcpad gcc-16-20250803/gcc/diagnostics/dumping.h gcc-16-20250810/gcc/diagnostics/dumping.h
*** gcc-16-20250803/gcc/diagnostics/dumping.h	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/diagnostics/dumping.h	Sun Aug 10 22:32:07 2025
***************
*** 0 ****
--- 1,50 ----
+ /* Utilities for implementing "dump" functions for the diagnostics subsystem.
+    Copyright (C) 2025 Free Software Foundation, Inc.
+    Contributed by David Malcolm <dmalcolm@redhat.com>.
+ 
+ This file is part of GCC.
+ 
+ GCC is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 3, or (at your option) any later
+ version.
+ 
+ GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3.  If not see
+ <http://www.gnu.org/licenses/>.  */
+ 
+ #ifndef GCC_DIAGNOSTICS_DUMP_H
+ #define GCC_DIAGNOSTICS_DUMP_H
+ 
+ namespace diagnostics {
+ namespace dumping {
+ 
+ extern void emit_indent (FILE *outfile, int indent);
+ extern void emit_heading (FILE *outfile, int indent,
+ 			  const char *text);
+ 
+ extern void emit_string_field (FILE *outfile, int indent,
+ 			       const char *label, const char *value);
+ extern void emit_bool_field (FILE *outfile, int indent,
+ 				const char *label, bool value);
+ extern void emit_size_t_field (FILE *outfile, int indent,
+ 			       const char *label, size_t value);
+ extern void emit_int_field (FILE *outfile, int indent,
+ 			    const char *label, int value);
+ extern void emit_unsigned_field (FILE *outfile, int indent,
+ 				 const char *label, unsigned value);
+ 
+ extern void emit_none (FILE *outfile, int indent);
+ 
+ #define DIAGNOSTICS_DUMPING_EMIT_BOOL_FIELD(FLAG) \
+   dumping::emit_bool_field (outfile, indent, #FLAG, FLAG)
+ 
+ } // namespace dumping
+ } // namespace diagnostics
+ 
+ #endif /* ! GCC_DIAGNOSTICS_DUMP_H */
diff -Nrcpad gcc-16-20250803/gcc/diagnostics/file-cache.cc gcc-16-20250810/gcc/diagnostics/file-cache.cc
*** gcc-16-20250803/gcc/diagnostics/file-cache.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/diagnostics/file-cache.cc	Sun Aug 10 22:32:07 2025
*************** along with GCC; see the file COPYING3.
*** 22,27 ****
--- 22,28 ----
  #include "coretypes.h"
  #include "cpplib.h"
  #include "diagnostics/file-cache.h"
+ #include "diagnostics/dumping.h"
  #include "selftest.h"
  
  #ifndef HAVE_ICONV
*************** file_cache::dump (FILE *out, int indent)
*** 473,479 ****
  {
    for (size_t i = 0; i < m_num_file_slots; ++i)
      {
!       fprintf (out, "%*sslot[%i]:\n", indent, "", (int)i);
        m_file_slots[i].dump (out, indent + 2);
      }
  }
--- 474,481 ----
  {
    for (size_t i = 0; i < m_num_file_slots; ++i)
      {
!       dumping::emit_indent (out, indent);
!       fprintf (out, "slot[%i]:\n", (int)i);
        m_file_slots[i].dump (out, indent + 2);
      }
  }
*************** file_cache_slot::dump (FILE *out, int in
*** 541,567 ****
  {
    if (!m_file_path)
      {
!       fprintf (out, "%*s(unused)\n", indent, "");
        return;
      }
!   fprintf (out, "%*sfile_path: %s\n", indent, "", m_file_path);
!   fprintf (out, "%*sfp: %p\n", indent, "", (void *)m_fp);
!   fprintf (out, "%*sneeds_read_p: %i\n", indent, "", (int)needs_read_p ());
!   fprintf (out, "%*sneeds_grow_p: %i\n", indent, "", (int)needs_grow_p ());
!   fprintf (out, "%*suse_count: %i\n", indent, "", m_use_count);
!   fprintf (out, "%*ssize: %zi\n", indent, "", m_size);
!   fprintf (out, "%*snb_read: %zi\n", indent, "", m_nb_read);
!   fprintf (out, "%*sstart_line_idx: %zi\n", indent, "", m_line_start_idx);
!   fprintf (out, "%*sline_num: %zi\n", indent, "", m_line_num);
!   fprintf (out, "%*smissing_trailing_newline: %i\n",
! 	   indent, "", (int)m_missing_trailing_newline);
!   fprintf (out, "%*sline records (%i):\n",
! 	   indent, "", m_line_record.length ());
    int idx = 0;
    for (auto &line : m_line_record)
!     fprintf (out, "%*s[%i]: line %zi: byte offsets: %zi-%zi\n",
! 	     indent + 2, "",
! 	     idx++, line.line_num, line.start_pos, line.end_pos);
  }
  
  /* Returns TRUE iff the cache would need to be filled with data coming
--- 543,580 ----
  {
    if (!m_file_path)
      {
!       dumping::emit_indent (out, indent);
!       fprintf (out, "(unused)\n");
        return;
      }
!   dumping::emit_string_field (out, indent, "file_path", m_file_path);
!   {
!     dumping::emit_indent (out, indent);
!     fprintf (out, "fp: %p\n", (void *)m_fp);
!   }
!   dumping::emit_bool_field (out, indent, "needs_read_p", needs_read_p ());
!   dumping::emit_bool_field (out, indent, "needs_grow_p", needs_grow_p ());
!   dumping::emit_unsigned_field (out, indent, "use_count", m_use_count);
!   dumping::emit_size_t_field (out, indent, "size", m_size);
!   dumping::emit_size_t_field (out, indent, "nb_read", m_nb_read);
!   dumping::emit_size_t_field (out, indent, "start_line_idx", m_line_start_idx);
!   dumping::emit_size_t_field (out, indent, "line_num", m_line_num);
!   dumping::emit_bool_field (out, indent, "missing_trailing_newline",
! 			    m_missing_trailing_newline);
!   {
!     dumping::emit_indent (out, indent);
!     fprintf (out, "line records (%i):\n", m_line_record.length ());
!   }
    int idx = 0;
    for (auto &line : m_line_record)
!     {
!       dumping::emit_indent (out, indent);
!       fprintf (out, ("[%i]:"
! 		     " line " HOST_SIZE_T_PRINT_DEC ":"
! 		     " byte offsets: " HOST_SIZE_T_PRINT_DEC
! 		     "-" HOST_SIZE_T_PRINT_DEC "\n"),
! 	       idx++, line.line_num, line.start_pos, line.end_pos);
!     }
  }
  
  /* Returns TRUE iff the cache would need to be filled with data coming
diff -Nrcpad gcc-16-20250803/gcc/diagnostics/html-sink.cc gcc-16-20250810/gcc/diagnostics/html-sink.cc
*** gcc-16-20250803/gcc/diagnostics/html-sink.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/diagnostics/html-sink.cc	Sun Aug 10 22:32:07 2025
*************** along with GCC; see the file COPYING3.
*** 33,38 ****
--- 33,39 ----
  #include "diagnostics/output-file.h"
  #include "diagnostics/buffering.h"
  #include "diagnostics/paths.h"
+ #include "diagnostics/dumping.h"
  #include "diagnostics/client-data-hooks.h"
  #include "selftest.h"
  #include "diagnostics/selftest-context.h"
*************** html_generation_options::html_generation
*** 61,66 ****
--- 62,77 ----
  {
  }
  
+ void
+ html_generation_options::dump (FILE *outfile, int indent) const
+ {
+   DIAGNOSTICS_DUMPING_EMIT_BOOL_FIELD (m_css);
+   DIAGNOSTICS_DUMPING_EMIT_BOOL_FIELD (m_javascript);
+   DIAGNOSTICS_DUMPING_EMIT_BOOL_FIELD (m_show_state_diagrams);
+   DIAGNOSTICS_DUMPING_EMIT_BOOL_FIELD (m_show_state_diagrams_sarif);
+   DIAGNOSTICS_DUMPING_EMIT_BOOL_FIELD (m_show_state_diagrams_dot_src);
+ }
+ 
  class html_builder;
  
  /* Concrete buffering implementation subclass for HTML output.  */
*************** public:
*** 116,121 ****
--- 127,134 ----
  		const line_maps *line_maps,
  		const html_generation_options &html_gen_opts);
  
+   void dump (FILE *out, int indent) const;
+ 
    void
    set_main_input_filename (const char *name);
  
*************** make_span (std::string class_)
*** 223,233 ****
  void
  html_sink_buffer::dump (FILE *out, int indent) const
  {
!   fprintf (out, "%*shtml_sink_buffer:\n", indent, "");
    int idx = 0;
    for (auto &result : m_results)
      {
!       fprintf (out, "%*sresult[%i]:\n", indent + 2, "", idx);
        result->dump (out);
        fprintf (out, "\n");
        ++idx;
--- 236,247 ----
  void
  html_sink_buffer::dump (FILE *out, int indent) const
  {
!   dumping::emit_heading (out, indent, "html_sink_buffer");
    int idx = 0;
    for (auto &result : m_results)
      {
!       dumping::emit_indent (out, indent + 2);
!       fprintf (out, "result[%i]:\n", idx);
        result->dump (out);
        fprintf (out, "\n");
        ++idx;
*************** html_builder::html_builder (context &dc,
*** 470,475 ****
--- 484,496 ----
  }
  
  void
+ html_builder::dump (FILE *out, int indent) const
+ {
+   dumping::emit_heading (out, indent, "HTML generation options");
+   m_html_gen_opts.dump (out, indent + 2);
+ }
+ 
+ void
  html_builder::set_main_input_filename (const char *name)
  {
    gcc_assert (m_title_element);
*************** html_builder::on_report_diagnostic (cons
*** 539,545 ****
      }
  }
  
! // For ease of comparison with experimental-nesting-show-levels=yes
  
  static void
  add_nesting_level_attr (xml::element &element,
--- 560,566 ----
      }
  }
  
! // For ease of comparison with show-nesting-levels=yes
  
  static void
  add_nesting_level_attr (xml::element &element,
*************** html_builder::make_element_for_diagnosti
*** 1018,1027 ****
  
    // Add any metadata as a suffix to the message
    if (diagnostic.m_metadata)
!     {
!       xp.add_text (" ");
!       xp.append (make_element_for_metadata (*diagnostic.m_metadata));
!     }
  
    // Add any option as a suffix to the message
  
--- 1039,1049 ----
  
    // Add any metadata as a suffix to the message
    if (diagnostic.m_metadata)
!     if (auto e = make_element_for_metadata (*diagnostic.m_metadata))
!       {
! 	xp.add_text (" ");
! 	xp.append (std::move (e));
!       }
  
    // Add any option as a suffix to the message
  
*************** html_builder::make_element_for_metadata
*** 1234,1239 ****
--- 1256,1264 ----
  	(make_metadata_element (std::move (label), std::move (url)));
      }
  
+   if (span_metadata->m_children.empty ())
+     return nullptr;
+ 
    return span_metadata;
  }
  
*************** public:
*** 1329,1336 ****
  
    void dump (FILE *out, int indent) const override
    {
-     fprintf (out, "%*shtml_sink\n", indent, "");
      sink::dump (out, indent);
    }
  
    void
--- 1354,1362 ----
  
    void dump (FILE *out, int indent) const override
    {
      sink::dump (out, indent);
+     dumping::emit_heading (out, indent, "html_builder");
+     m_builder.dump (out, indent + 2);
    }
  
    void
*************** public:
*** 1435,1446 ****
    {
      m_builder.flush_to_file (m_output_file.get_open_file ());
    }
!   void dump (FILE *out, int indent) const override
    {
!     fprintf (out, "%*shtml_file_sink: %s\n",
! 	     indent, "",
  	     m_output_file.get_filename ());
-     sink::dump (out, indent);
    }
    bool machine_readable_stderr_p () const final override
    {
--- 1461,1470 ----
    {
      m_builder.flush_to_file (m_output_file.get_open_file ());
    }
!   void dump_kind (FILE *out) const override
    {
!     fprintf (out, "html_file_sink: %s",
  	     m_output_file.get_filename ());
    }
    bool machine_readable_stderr_p () const final override
    {
*************** private:
*** 1603,1608 ****
--- 1627,1636 ----
      : html_sink (dc, line_maps, html_gen_opts)
      {
      }
+     void dump_kind (FILE *out) const final override
+     {
+       fprintf (out, "html_buffered_sink");
+     }
      bool machine_readable_stderr_p () const final override
      {
        return true;
diff -Nrcpad gcc-16-20250803/gcc/diagnostics/html-sink.h gcc-16-20250810/gcc/diagnostics/html-sink.h
*** gcc-16-20250803/gcc/diagnostics/html-sink.h	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/diagnostics/html-sink.h	Sun Aug 10 22:32:07 2025
*************** struct html_generation_options
*** 30,35 ****
--- 30,37 ----
  {
    html_generation_options ();
  
+   void dump (FILE *out, int indent) const;
+ 
    bool m_css;
    bool m_javascript;
  
diff -Nrcpad gcc-16-20250803/gcc/diagnostics/lazy-paths.cc gcc-16-20250810/gcc/diagnostics/lazy-paths.cc
*** gcc-16-20250803/gcc/diagnostics/lazy-paths.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/diagnostics/lazy-paths.cc	Sun Aug 10 22:32:07 2025
*************** test_intraprocedural_path (pretty_printe
*** 125,136 ****
  		"double `free'");
  }
  
! /* Implementation of diagnostics::option_manager for which all
     options are disabled, for use in selftests.
     Note that this is *not* called for option_id (0), which
     means "always warn"  */
  
! class all_warnings_disabled : public diagnostics::option_manager
  {
  public:
    int option_enabled_p (diagnostics::option_id) const final override
--- 125,136 ----
  		"double `free'");
  }
  
! /* Implementation of diagnostics::option_id_manager for which all
     options are disabled, for use in selftests.
     Note that this is *not* called for option_id (0), which
     means "always warn"  */
  
! class all_warnings_disabled : public diagnostics::option_id_manager
  {
  public:
    int option_enabled_p (diagnostics::option_id) const final override
*************** test_emission (pretty_printer *event_pp)
*** 168,174 ****
       is skipped.  */
    {
      test_context dc;
!     dc.set_option_manager (std::make_unique<all_warnings_disabled> (), 0);
  
      test_rich_location rich_loc (*event_pp);
      ASSERT_FALSE (rich_loc.m_path.generated_p ());
--- 168,174 ----
       is skipped.  */
    {
      test_context dc;
!     dc.set_option_id_manager (std::make_unique<all_warnings_disabled> (), 0);
  
      test_rich_location rich_loc (*event_pp);
      ASSERT_FALSE (rich_loc.m_path.generated_p ());
diff -Nrcpad gcc-16-20250803/gcc/diagnostics/metadata.h gcc-16-20250810/gcc/diagnostics/metadata.h
*** gcc-16-20250803/gcc/diagnostics/metadata.h	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/diagnostics/metadata.h	Sun Aug 10 22:32:07 2025
*************** class metadata
*** 119,124 ****
--- 119,126 ----
    const lazy_digraphs *m_lazy_digraphs;
  };
  
+ extern char *get_cwe_url (int cwe);
+ 
  } // namespace diagnostics
  
  #endif /* ! GCC_DIAGNOSTICS_METADATA_H */
diff -Nrcpad gcc-16-20250803/gcc/diagnostics/option-id-manager.h gcc-16-20250810/gcc/diagnostics/option-id-manager.h
*** gcc-16-20250803/gcc/diagnostics/option-id-manager.h	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/diagnostics/option-id-manager.h	Sun Aug 10 22:32:07 2025
***************
*** 0 ****
--- 1,56 ----
+ /* Hooks for giving client-specific meaning to option ids.
+    Copyright (C) 2000-2025 Free Software Foundation, Inc.
+ 
+ This file is part of GCC.
+ 
+ GCC is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 3, or (at your option) any later
+ version.
+ 
+ GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3.  If not see
+ <http://www.gnu.org/licenses/>.  */
+ 
+ #ifndef GCC_DIAGNOSTICS_OPTION_ID_MANAGER_H
+ #define GCC_DIAGNOSTICS_OPTION_ID_MANAGER_H
+ 
+ namespace diagnostics {
+ 
+ /* Abstract base class for the diagnostic subsystem to make queries
+    about command-line options.  */
+ 
+ class option_id_manager
+ {
+ public:
+   virtual ~option_id_manager () {}
+ 
+   /* Return 1 if option OPT_ID is enabled, 0 if it is disabled,
+      or -1 if it isn't a simple on-off switch
+      (or if the value is unknown, typically set later in target).  */
+   virtual int option_enabled_p (option_id opt_id) const = 0;
+ 
+   /* Return malloced memory for the name of the option OPT_ID
+      which enabled a diagnostic, originally of type ORIG_DIAG_KIND but
+      possibly converted to DIAG_KIND by options such as -Werror.
+      May return NULL if no name is to be printed.
+      May be passed 0 as well as the index of a particular option.  */
+   virtual char *make_option_name (option_id opt_id,
+ 				  enum kind orig_diag_kind,
+ 				  enum kind diag_kind) const = 0;
+ 
+   /* Return malloced memory for a URL describing the option that controls
+      a diagnostic.
+      May return NULL if no URL is available.
+      May be passed 0 as well as the index of a particular option.  */
+   virtual char *make_option_url (option_id opt_id) const = 0;
+ };
+ 
+ } // namespace diagnostics
+ 
+ #endif /* ! GCC_DIAGNOSTICS_OPTION_ID_MANAGER_H */
diff -Nrcpad gcc-16-20250803/gcc/diagnostics/output-spec.cc gcc-16-20250810/gcc/diagnostics/output-spec.cc
*** gcc-16-20250803/gcc/diagnostics/output-spec.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/diagnostics/output-spec.cc	Sun Aug 10 22:32:07 2025
*************** text_scheme_handler::make_sink (const co
*** 368,374 ****
  				const scheme_name_and_params &parsed_arg) const
  {
    bool show_color = pp_show_color (dc.get_reference_printer ());
!   bool show_nesting = false;
    bool show_locations_in_nesting = true;
    bool show_levels = false;
    for (auto& iter : parsed_arg.m_kvs)
--- 368,374 ----
  				const scheme_name_and_params &parsed_arg) const
  {
    bool show_color = pp_show_color (dc.get_reference_printer ());
!   bool show_nesting = true;
    bool show_locations_in_nesting = true;
    bool show_levels = false;
    for (auto& iter : parsed_arg.m_kvs)
*************** text_scheme_handler::make_sink (const co
*** 381,401 ****
  	    return nullptr;
  	  continue;
  	}
!       if (key == "experimental-nesting")
  	{
  	  if (!parse_bool_value (ctxt, unparsed_arg, key, value,
  				 show_nesting))
  	    return nullptr;
  	  continue;
  	}
!       if (key == "experimental-nesting-show-locations")
  	{
  	  if (!parse_bool_value (ctxt, unparsed_arg, key, value,
  				 show_locations_in_nesting))
  	    return nullptr;
  	  continue;
  	}
!       if (key == "experimental-nesting-show-levels")
  	{
  	  if (!parse_bool_value (ctxt, unparsed_arg, key, value, show_levels))
  	    return nullptr;
--- 381,401 ----
  	    return nullptr;
  	  continue;
  	}
!       if (key == "show-nesting")
  	{
  	  if (!parse_bool_value (ctxt, unparsed_arg, key, value,
  				 show_nesting))
  	    return nullptr;
  	  continue;
  	}
!       if (key == "show-nesting-locations")
  	{
  	  if (!parse_bool_value (ctxt, unparsed_arg, key, value,
  				 show_locations_in_nesting))
  	    return nullptr;
  	  continue;
  	}
!       if (key == "show-nesting-levels")
  	{
  	  if (!parse_bool_value (ctxt, unparsed_arg, key, value, show_levels))
  	    return nullptr;
*************** text_scheme_handler::make_sink (const co
*** 405,413 ****
        /* Key not found.  */
        auto_vec<const char *> known_keys;
        known_keys.safe_push ("color");
!       known_keys.safe_push ("experimental-nesting");
!       known_keys.safe_push ("experimental-nesting-show-locations");
!       known_keys.safe_push ("experimental-nesting-show-levels");
        ctxt.report_unknown_key (unparsed_arg, key, get_scheme_name (),
  			       known_keys);
        return nullptr;
--- 405,413 ----
        /* Key not found.  */
        auto_vec<const char *> known_keys;
        known_keys.safe_push ("color");
!       known_keys.safe_push ("show-nesting");
!       known_keys.safe_push ("show-nesting-locations");
!       known_keys.safe_push ("show-nesting-levels");
        ctxt.report_unknown_key (unparsed_arg, key, get_scheme_name (),
  			       known_keys);
        return nullptr;
diff -Nrcpad gcc-16-20250803/gcc/diagnostics/sarif-sink.cc gcc-16-20250810/gcc/diagnostics/sarif-sink.cc
*** gcc-16-20250803/gcc/diagnostics/sarif-sink.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/diagnostics/sarif-sink.cc	Sun Aug 10 22:32:07 2025
*************** along with GCC; see the file COPYING3.
*** 33,38 ****
--- 33,39 ----
  #include "diagnostics/paths.h"
  #include "diagnostics/sink.h"
  #include "diagnostics/buffering.h"
+ #include "diagnostics/dumping.h"
  #include "json.h"
  #include "cpplib.h"
  #include "diagnostics/logical-locations.h"
*************** sarif_serialization_format_json::write_t
*** 704,709 ****
--- 705,718 ----
    fprintf (outf, "\n");
  }
  
+ void
+ sarif_serialization_format_json::dump (FILE *outfile, int indent) const
+ {
+   dumping::emit_indent (outfile, indent);
+   fprintf (outfile, "json\n");
+   DIAGNOSTICS_DUMPING_EMIT_BOOL_FIELD (m_formatted);
+ }
+ 
  /* A class for managing SARIF output (for -fdiagnostics-format=sarif-stderr
     and -fdiagnostics-format=sarif-file).
  
*************** public:
*** 760,765 ****
--- 769,776 ----
  		 const sarif_generation_options &sarif_gen_opts);
    ~sarif_builder ();
  
+   void dump (FILE *out, int indent) const;
+ 
    void set_printer (pretty_printer &printer)
    {
      m_printer = &printer;
*************** sarif_builder::sarif_builder (diagnostic
*** 1674,1680 ****
      (std::make_unique<sarif_array_of_unique<sarif_logical_location>> ()),
    m_run_graphs
      (std::make_unique<sarif_array_of_unique<sarif_graph>> ()),
!   m_tabstop (dc.m_tabstop),
    m_serialization_format (std::move (serialization_format)),
    m_sarif_gen_opts (sarif_gen_opts),
    m_next_result_idx (0),
--- 1685,1691 ----
      (std::make_unique<sarif_array_of_unique<sarif_logical_location>> ()),
    m_run_graphs
      (std::make_unique<sarif_array_of_unique<sarif_graph>> ()),
!   m_tabstop (dc.get_column_options ().m_tabstop),
    m_serialization_format (std::move (serialization_format)),
    m_sarif_gen_opts (sarif_gen_opts),
    m_next_result_idx (0),
*************** sarif_builder::~sarif_builder ()
*** 1699,1704 ****
--- 1710,1724 ----
      }
  }
  
+ void
+ sarif_builder::dump (FILE *out, int indent) const
+ {
+   dumping::emit_heading (out, indent, "serialization format");
+   m_serialization_format->dump (out, indent + 2);
+   dumping::emit_heading (out, indent, "SARIF generation options");
+   m_sarif_gen_opts.dump (out, indent + 2);
+ }
+ 
  /* Functions at which to stop the backtrace print.  It's not
     particularly helpful to print the callers of these functions.  */
  
*************** sarif_builder::make_artifact_content_obj
*** 3803,3813 ****
  void
  sarif_sink_buffer::dump (FILE *out, int indent) const
  {
!   fprintf (out, "%*ssarif_sink_buffer:\n", indent, "");
    int idx = 0;
    for (auto &result : m_results)
      {
!       fprintf (out, "%*sresult[%i]:\n", indent + 2, "", idx);
        result->dump (out, true);
        fprintf (out, "\n");
        ++idx;
--- 3823,3834 ----
  void
  sarif_sink_buffer::dump (FILE *out, int indent) const
  {
!   dumping::emit_heading (out, indent, "sarif_sink_buffer");
    int idx = 0;
    for (auto &result : m_results)
      {
!       dumping::emit_indent (out, indent + 2);
!       fprintf (out, "result[%i]:\n", idx);
        result->dump (out, true);
        fprintf (out, "\n");
        ++idx;
*************** public:
*** 3862,3869 ****
  
    void dump (FILE *out, int indent) const override
    {
-     fprintf (out, "%*ssarif_sink\n", indent, "");
      sink::dump (out, indent);
    }
  
    void
--- 3883,3891 ----
  
    void dump (FILE *out, int indent) const override
    {
      sink::dump (out, indent);
+     dumping::emit_heading (out, indent, "sarif_builder");
+     m_builder.dump (out, indent + 2);
    }
  
    void
*************** public:
*** 3973,3978 ****
--- 3995,4004 ----
    {
      m_builder.flush_to_file (m_stream);
    }
+   void dump_kind (FILE *out) const override
+   {
+     fprintf (out, "sarif_stream_sink");
+   }
    bool machine_readable_stderr_p () const final override
    {
      return m_stream == stderr;
*************** public:
*** 4001,4012 ****
    {
      m_builder.flush_to_file (m_output_file.get_open_file ());
    }
!   void dump (FILE *out, int indent) const override
    {
!     fprintf (out, "%*ssarif_file_sink: %s\n",
! 	     indent, "",
  	     m_output_file.get_filename ());
-     sink::dump (out, indent);
    }
    bool machine_readable_stderr_p () const final override
    {
--- 4027,4036 ----
    {
      m_builder.flush_to_file (m_output_file.get_open_file ());
    }
!   void dump_kind (FILE *out) const override
    {
!     fprintf (out, "sarif_file_sink: %s",
  	     m_output_file.get_filename ());
    }
    bool machine_readable_stderr_p () const final override
    {
*************** sarif_generation_options::sarif_generati
*** 4319,4324 ****
--- 4343,4371 ----
  {
  }
  
+ static const char *
+ get_dump_string_for_sarif_version (enum sarif_version version)
+ {
+   switch (version)
+     {
+     default:
+       gcc_unreachable ();
+     case sarif_version::v2_1_0:
+       return "v2_1_0";
+     case sarif_version::v2_2_prerelease_2024_08_08:
+       return "v2_2_prerelease_2024_08_08";
+     }
+ }
+ 
+ void
+ sarif_generation_options::dump (FILE *outfile, int indent) const
+ {
+   dumping::emit_string_field (outfile, indent,
+ 			      "m_version",
+ 			      get_dump_string_for_sarif_version (m_version));
+   DIAGNOSTICS_DUMPING_EMIT_BOOL_FIELD (m_state_graph);
+ }
+ 
  #if CHECKING_P
  
  namespace selftest {
*************** public:
*** 4406,4415 ****
    test_sarif_diagnostic_context (const char *main_input_filename,
  				 const sarif_generation_options &sarif_gen_opts)
    {
!     auto sink_ = std::make_unique<buffered_sink> (*this,
! 						  line_table,
! 						  true,
! 						  sarif_gen_opts);
      m_sink = sink_.get (); // borrowed
      init_sarif_sink (*this, std::move (sink_));
      m_sink->set_main_input_filename (main_input_filename);
--- 4453,4462 ----
    test_sarif_diagnostic_context (const char *main_input_filename,
  				 const sarif_generation_options &sarif_gen_opts)
    {
!     auto sink_ = std::make_unique<sarif_buffered_sink> (*this,
! 							line_table,
! 							true,
! 							sarif_gen_opts);
      m_sink = sink_.get (); // borrowed
      init_sarif_sink (*this, std::move (sink_));
      m_sink->set_main_input_filename (main_input_filename);
*************** public:
*** 4424,4433 ****
    sarif_result &get_result (size_t idx) { return m_sink->get_result (idx); }
  
  private:
!   class buffered_sink : public sarif_sink
    {
    public:
!     buffered_sink (context &dc,
  		   const line_maps *line_maps,
  		   bool formatted,
  		   const sarif_generation_options &sarif_gen_opts)
--- 4471,4480 ----
    sarif_result &get_result (size_t idx) { return m_sink->get_result (idx); }
  
  private:
!   class sarif_buffered_sink : public sarif_sink
    {
    public:
!     sarif_buffered_sink (context &dc,
  		   const line_maps *line_maps,
  		   bool formatted,
  		   const sarif_generation_options &sarif_gen_opts)
*************** private:
*** 4436,4441 ****
--- 4483,4492 ----
  		  sarif_gen_opts)
      {
      }
+     void dump_kind (FILE *out) const final override
+     {
+       fprintf (out, "sarif_buffered_sink");
+     }
      bool machine_readable_stderr_p () const final override
      {
        return false;
*************** private:
*** 4446,4452 ****
      }
    };
  
!   buffered_sink *m_sink; // borrowed
  };
  
  /* Test making a sarif_location for a complex rich_location
--- 4497,4503 ----
      }
    };
  
!   sarif_buffered_sink *m_sink; // borrowed
  };
  
  /* Test making a sarif_location for a complex rich_location
diff -Nrcpad gcc-16-20250803/gcc/diagnostics/sarif-sink.h gcc-16-20250810/gcc/diagnostics/sarif-sink.h
*** gcc-16-20250803/gcc/diagnostics/sarif-sink.h	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/diagnostics/sarif-sink.h	Sun Aug 10 22:32:07 2025
*************** public:
*** 73,78 ****
--- 73,79 ----
    virtual ~sarif_serialization_format () {}
    virtual void write_to_file (FILE *outf,
  			      const json::value &top) = 0;
+   virtual void dump (FILE *out, int indent) const = 0;
  };
  
  /* Concrete subclass for serializing SARIF as JSON.  */
*************** public:
*** 85,90 ****
--- 86,92 ----
    {
    }
    void write_to_file (FILE *outf, const json::value &top) final override;
+   void dump (FILE *out, int indent) const final override;
  
  private:
    bool m_formatted;
*************** struct sarif_generation_options
*** 108,113 ****
--- 110,117 ----
  {
    sarif_generation_options ();
  
+   void dump (FILE *out, int indent) const;
+ 
    enum sarif_version m_version;
    bool m_state_graph;
  };
diff -Nrcpad gcc-16-20250803/gcc/diagnostics/sink.h gcc-16-20250810/gcc/diagnostics/sink.h
*** gcc-16-20250803/gcc/diagnostics/sink.h	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/diagnostics/sink.h	Sun Aug 10 22:32:07 2025
*************** class sink
*** 36,41 ****
--- 36,44 ----
  public:
    virtual ~sink () {}
  
+   virtual text_sink *dyn_cast_text_sink () { return nullptr; }
+ 
+   virtual void dump_kind (FILE *out) const = 0;
    virtual void dump (FILE *out, int indent) const;
  
    /* Vfunc for notifying this format what the primary input file is,
diff -Nrcpad gcc-16-20250803/gcc/diagnostics/source-printing-options.h gcc-16-20250810/gcc/diagnostics/source-printing-options.h
*** gcc-16-20250803/gcc/diagnostics/source-printing-options.h	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/diagnostics/source-printing-options.h	Sun Aug 10 22:32:07 2025
***************
*** 0 ****
--- 1,76 ----
+ /* Options relating to printing the user's source code.
+    Copyright (C) 2000-2025 Free Software Foundation, Inc.
+ 
+ This file is part of GCC.
+ 
+ GCC is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 3, or (at your option) any later
+ version.
+ 
+ GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3.  If not see
+ <http://www.gnu.org/licenses/>.  */
+ 
+ #ifndef GCC_DIAGNOSTICS_SOURCE_PRINTING_OPTIONS_H
+ #define GCC_DIAGNOSTICS_SOURCE_PRINTING_OPTIONS_H
+ 
+ namespace diagnostics {
+ 
+ /* A bundle of options relating to printing the user's source code
+    (potentially with a margin, underlining, labels, etc).  */
+ 
+ struct source_printing_options
+ {
+   /* True if we should print the source line with a caret indicating
+      the location.
+      Corresponds to -fdiagnostics-show-caret.  */
+   bool enabled;
+ 
+   /* Maximum width of the source line printed.  */
+   int max_width;
+ 
+   /* Character used at the caret when printing source locations.  */
+   char caret_chars[rich_location::STATICALLY_ALLOCATED_RANGES];
+ 
+   /* When printing source code, should the characters at carets and ranges
+      be colorized? (assuming colorization is on at all).
+      This should be true for frontends that generate range information
+      (so that the ranges of code are colorized),
+      and false for frontends that merely specify points within the
+      source code (to avoid e.g. colorizing just the first character in
+      a token, which would look strange).  */
+   bool colorize_source_p;
+ 
+   /* When printing source code, should labelled ranges be printed?
+      Corresponds to -fdiagnostics-show-labels.  */
+   bool show_labels_p;
+ 
+   /* When printing source code, should there be a left-hand margin
+      showing line numbers?
+      Corresponds to -fdiagnostics-show-line-numbers.  */
+   bool show_line_numbers_p;
+ 
+   /* If printing source code, what should the minimum width of the margin
+      be?  Line numbers will be right-aligned, and padded to this width.
+      Corresponds to -fdiagnostics-minimum-margin-width=VALUE.  */
+   int min_margin_width;
+ 
+   /* Usable by plugins; if true, print a debugging ruler above the
+      source output.  */
+   bool show_ruler_p;
+ 
+   /* When printing events in an inline path, should we print lines
+      visualizing links between related events (e.g. for CFG paths)?
+      Corresponds to -fdiagnostics-show-event-links.  */
+   bool show_event_links_p;
+ };
+ 
+ } // namespace diagnostics
+ 
+ #endif /* ! GCC_DIAGNOSTICS_SOURCE_PRINTING_OPTIONS_H */
diff -Nrcpad gcc-16-20250803/gcc/diagnostics/source-printing.cc gcc-16-20250810/gcc/diagnostics/source-printing.cc
*** gcc-16-20250803/gcc/diagnostics/source-printing.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/diagnostics/source-printing.cc	Sun Aug 10 22:32:07 2025
*************** test_layout_x_offset_display_tab (const
*** 4412,4418 ****
    for (int tabstop = 1; tabstop != num_tabstops; ++tabstop)
      {
        test_context dc;
!       dc.m_tabstop = tabstop;
        diagnostics::source_print_policy policy (dc);
        layout test_layout (policy, richloc, nullptr);
        colorizer col (*dc.get_reference_printer (),
--- 4412,4418 ----
    for (int tabstop = 1; tabstop != num_tabstops; ++tabstop)
      {
        test_context dc;
!       dc.get_column_options ().m_tabstop = tabstop;
        diagnostics::source_print_policy policy (dc);
        layout test_layout (policy, richloc, nullptr);
        colorizer col (*dc.get_reference_printer (),
*************** test_layout_x_offset_display_tab (const
*** 4436,4442 ****
    for (int tabstop = 1; tabstop != num_tabstops; ++tabstop)
      {
        test_context dc;
!       dc.m_tabstop = tabstop;
        static const int small_width = 24;
        auto &source_printing_opts = dc.get_source_printing_options ();
        source_printing_opts.max_width = small_width - 4;
--- 4436,4442 ----
    for (int tabstop = 1; tabstop != num_tabstops; ++tabstop)
      {
        test_context dc;
!       dc.get_column_options ().m_tabstop = tabstop;
        static const int small_width = 24;
        auto &source_printing_opts = dc.get_source_printing_options ();
        source_printing_opts.max_width = small_width - 4;
*************** test_tab_expansion (const line_table_cas
*** 6833,6839 ****
       everything too.  */
    {
      test_context dc;
!     dc.m_tabstop = tabstop;
      rich_location richloc (line_table,
  			   linemap_position_for_column (line_table,
  							first_non_ws_byte_col));
--- 6833,6839 ----
       everything too.  */
    {
      test_context dc;
!     dc.get_column_options ().m_tabstop = tabstop;
      rich_location richloc (line_table,
  			   linemap_position_for_column (line_table,
  							first_non_ws_byte_col));
*************** test_tab_expansion (const line_table_cas
*** 6846,6852 ****
       as well.  */
    {
      test_context dc;
!     dc.m_tabstop = tabstop;
      rich_location richloc (line_table,
  			   linemap_position_for_column (line_table,
  							right_quote_byte_col));
--- 6846,6852 ----
       as well.  */
    {
      test_context dc;
!     dc.get_column_options ().m_tabstop = tabstop;
      rich_location richloc (line_table,
  			   linemap_position_for_column (line_table,
  							right_quote_byte_col));
diff -Nrcpad gcc-16-20250803/gcc/diagnostics/text-sink.cc gcc-16-20250810/gcc/diagnostics/text-sink.cc
*** gcc-16-20250803/gcc/diagnostics/text-sink.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/diagnostics/text-sink.cc	Sun Aug 10 22:32:07 2025
*************** along with GCC; see the file COPYING3.
*** 33,38 ****
--- 33,39 ----
  #include "diagnostics/diagram.h"
  #include "diagnostics/text-sink.h"
  #include "diagnostics/buffering.h"
+ #include "diagnostics/dumping.h"
  #include "text-art/theme.h"
  
  /* Disable warnings about quoting issues in the pp_xxx calls below
*************** text_sink_buffer::text_sink_buffer (sink
*** 76,82 ****
  void
  text_sink_buffer::dump (FILE *out, int indent) const
  {
!   fprintf (out, "%*stext_sink_buffer:\n", indent, "");
    m_output_buffer.dump (out, indent + 2);
  }
  
--- 77,83 ----
  void
  text_sink_buffer::dump (FILE *out, int indent) const
  {
!   dumping::emit_heading (out, indent, "text_sink_buffer");
    m_output_buffer.dump (out, indent + 2);
  }
  
*************** text_sink::~text_sink ()
*** 156,173 ****
  }
  
  void
! text_sink::dump (FILE *out, int indent) const
  {
!   fprintf (out, "%*stext_sink\n", indent, "");
!   fprintf (out, "%*sm_follows_reference_printer: %s\n",
! 	   indent, "",
! 	   m_follows_reference_printer ? "true" : "false");
!   sink::dump (out, indent);
!   fprintf (out, "%*ssaved_output_buffer:\n", indent + 2, "");
    if (m_saved_output_buffer)
!     m_saved_output_buffer->dump (out, indent + 4);
    else
!     fprintf (out, "%*s(none):\n", indent + 4, "");
  }
  
  void
--- 157,175 ----
  }
  
  void
! text_sink::dump (FILE *outfile, int indent) const
  {
!   DIAGNOSTICS_DUMPING_EMIT_BOOL_FIELD (m_follows_reference_printer);
!   DIAGNOSTICS_DUMPING_EMIT_BOOL_FIELD (m_show_nesting);
!   DIAGNOSTICS_DUMPING_EMIT_BOOL_FIELD (m_show_locations_in_nesting);
!   DIAGNOSTICS_DUMPING_EMIT_BOOL_FIELD (m_show_nesting_levels);
! 
!   sink::dump (outfile, indent);
!   dumping::emit_heading (outfile, indent, "saved_output_buffer");
    if (m_saved_output_buffer)
!     m_saved_output_buffer->dump (outfile, indent + 2);
    else
!     dumping::emit_none (outfile, indent + 2);
  }
  
  void
*************** text_sink::get_location_text (const expa
*** 612,618 ****
     The result is a statically allocated buffer.  */
  
  const char *
! maybe_line_and_column (int line, int col)
  {
    static char result[32];
  
--- 614,620 ----
     The result is a statically allocated buffer.  */
  
  const char *
! text_sink::maybe_line_and_column (int line, int col)
  {
    static char result[32];
  
diff -Nrcpad gcc-16-20250803/gcc/diagnostics/text-sink.h gcc-16-20250810/gcc/diagnostics/text-sink.h
*** gcc-16-20250803/gcc/diagnostics/text-sink.h	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/diagnostics/text-sink.h	Sun Aug 10 22:32:07 2025
*************** public:
*** 51,56 ****
--- 51,62 ----
    {}
    ~text_sink ();
  
+   text_sink *dyn_cast_text_sink () final override { return this; }
+ 
+   void dump_kind (FILE *out) const override
+   {
+     fprintf (out, "text_sink");
+   }
    void dump (FILE *out, int indent) const override;
  
    std::unique_ptr<per_sink_buffer>
*************** public:
*** 127,132 ****
--- 133,140 ----
      return m_source_printing;
    }
  
+   static const char *maybe_line_and_column (int line, int col);
+ 
  protected:
    void print_any_cwe (const diagnostic_info &diagnostic);
    void print_any_rules (const diagnostic_info &diagnostic);
diff -Nrcpad gcc-16-20250803/gcc/doc/install.texi gcc-16-20250810/gcc/doc/install.texi
*** gcc-16-20250803/gcc/doc/install.texi	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/doc/install.texi	Sun Aug 10 22:32:07 2025
*************** Note binutils 2.35 or newer is required
*** 393,399 ****
  with GNU libtool that includes doing a bootstrap with LTO enabled.
  
  @item gzip version 1.2.4 (or later) or
! @itemx bzip2 version 1.0.2 (or later)
  
  Necessary to uncompress GCC @command{tar} files when source code is
  obtained via HTTPS mirror sites.
--- 393,399 ----
  with GNU libtool that includes doing a bootstrap with LTO enabled.
  
  @item gzip version 1.2.4 (or later) or
! @itemx xz version 5.0 (or later)
  
  Necessary to uncompress GCC @command{tar} files when source code is
  obtained via HTTPS mirror sites.
*************** Produce code conforming to version 20191
*** 1887,1894 ****
  In the absence of this configuration option the default version is 20191213.
  
  @item --enable-__cxa_atexit
! Define if you want to use @code{__cxa_atexit}, rather than atexit, to
! register C++ destructors for local statics and global objects.
  This is essential for fully standards-compliant handling of
  destructors, but requires @code{__cxa_atexit} in libc.  This option is
  currently only available on systems with GNU libc.  When enabled, this
--- 1887,1894 ----
  In the absence of this configuration option the default version is 20191213.
  
  @item --enable-__cxa_atexit
! Define if you want to use @code{__cxa_atexit}, rather than @code{atexit},
! to register C++ destructors for local statics and global objects.
  This is essential for fully standards-compliant handling of
  destructors, but requires @code{__cxa_atexit} in libc.  This option is
  currently only available on systems with GNU libc.  When enabled, this
diff -Nrcpad gcc-16-20250803/gcc/doc/invoke.texi gcc-16-20250810/gcc/doc/invoke.texi
*** gcc-16-20250803/gcc/doc/invoke.texi	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/doc/invoke.texi	Sun Aug 10 22:32:07 2025
*************** Objective-C and Objective-C++ Dialects}.
*** 322,327 ****
--- 322,330 ----
  -fno-diagnostics-show-cwe
  -fno-diagnostics-show-rules
  -fno-diagnostics-show-highlight-colors
+ -fno-diagnostics-show-nesting
+ -fno-diagnostics-show-nesting-locations
+ -fdiagnostics-show-nesting-levels
  -fdiagnostics-minimum-margin-width=@var{width}
  -fdiagnostics-parseable-fixits  -fdiagnostics-generate-patch
  -fdiagnostics-show-template-tree  -fno-elide-type
*************** Objective-C and Objective-C++ Dialects}.
*** 388,393 ****
--- 391,397 ----
  -Winit-self  -Winline  -Wno-int-conversion  -Wint-in-bool-context
  -Wno-int-to-pointer-cast  -Wno-invalid-memory-model
  -Winvalid-pch  -Winvalid-utf8  -Wno-unicode  -Wjump-misses-init
+ -Wkeyword-macro
  -Wlarger-than=@var{byte-size}  -Wleading-whitespace=@var{kind}
  -Wlogical-not-parentheses  -Wlogical-op
  -Wlong-long  -Wno-lto-type-mismatch -Wmain  -Wmaybe-uninitialized
*************** Version 20, which first appeared in G++
*** 3016,3023 ****
  in static data member initializers.
  
  Version 21, which first appeared in G++ 16, fixes unnecessary captures
! in noexcept lambdas (c++/119764) and layout of a base class
! with all explicitly defaulted constructors (c++/120012).
  
  See also @option{-Wabi}.
  
--- 3020,3028 ----
  in static data member initializers.
  
  Version 21, which first appeared in G++ 16, fixes unnecessary captures
! in noexcept lambdas (c++/119764), layout of a base class with all explicitly
! defaulted constructors (c++/120012), and mangling of class and array
! objects with implicitly zero-initialized non-trailing subobjects (c++/121231).
  
  See also @option{-Wabi}.
  
*************** options:
*** 5427,5433 ****
  -fdiagnostics-urls=never
  -fdiagnostics-path-format=separate-events
  -fdiagnostics-text-art-charset=none
! -fno-diagnostics-show-event-links}
  In the future, if GCC changes the default appearance of its diagnostics, the
  corresponding option to disable the new behavior will be added to this list.
  
--- 5432,5439 ----
  -fdiagnostics-urls=never
  -fdiagnostics-path-format=separate-events
  -fdiagnostics-text-art-charset=none
! -fno-diagnostics-show-event-links
! -fno-diagnostics-show-nesting}
  In the future, if GCC changes the default appearance of its diagnostics, the
  corresponding option to disable the new behavior will be added to this list.
  
*************** emoji variant of the character).
*** 6049,6054 ****
--- 6055,6094 ----
  The default is @samp{emoji}, except when the environment variable @env{LANG}
  is set to @samp{C}, in which case the default is @samp{ascii}.
  
+ @opindex fno-diagnostics-show-nesting
+ @opindex fdiagnostics-show-nesting
+ @item -fno-diagnostics-show-nesting
+ Some GCC diagnostics have an internal tree-like structure of nested
+ sub-diagnostics, such as for problems when instantiating C++ templates.
+ 
+ By default GCC uses indentation and bullet points in its text output to
+ show the nesting structure of these diagnostics, moves location
+ information to separate lines to make the structure clearer, and
+ eliminates redundant repeated information.
+ 
+ Selecting @option{-fno-diagnostics-show-nesting} suppresses this
+ indentation, reformatting, and elision, restoring an older `look'' for the
+ diagnostics.
+ 
+ @opindex fno-diagnostics-show-nesting-locations
+ @opindex fdiagnostics-show-nesting-locations
+ @item -fno-diagnostics-show-nesting-locations
+ 
+ When @option{fdiagnostics-show-nesting} is enabled, file names and
+ line- and column- numbers are displayed on separate lines from the
+ messages.  This location information can be disabled altogether with
+ @option{-fno-diagnostics-show-nesting-locations}.
+ This option exists for use by GCC developers, for writing DejaGnu test cases.
+ 
+ @opindex fdiagnostics-show-nesting-levels
+ @opindex fno-diagnostics-show-nesting-levels
+ @item -fdiagnostics-show-nesting-levels
+ When @option{fdiagnostics-show-nesting} is enabled, use
+ @option{fdiagnostics-show-nesting-levels} to also display numbers
+ showing the depth of the nesting.
+ This option exists for use by GCC developers for debugging nested
+ diagnostics, but may be of use to plugin authors.
+ 
  @opindex fdiagnostics-format
  @item -fdiagnostics-format=@var{FORMAT}
  Select a different format for printing diagnostics.
*************** Supported keys are:
*** 6097,6114 ****
  Override colorization settings from @option{-fdiagnostics-color} for this
  text output.
  
! @item experimental-nesting=@r{[}yes@r{|}no@r{]}
! Enable an experimental mode that emphasizes hierarchical relationships
! within diagnostics messages, displaying location information on separate
! lines.
  
! @item experimental-nesting-show-locations=@r{[}yes@r{|}no@r{]}
! If @code{experimental-nesting=yes}, then by default locations are
  shown; set this key to @code{no} to disable printing such locations.
  This exists for use by GCC developers, for writing DejaGnu test cases.
  
! @item experimental-nesting-show-levels=@r{[}yes@r{|}no@r{]}
! This is a debugging option for use with @code{experimental-nesting=yes}.
  Set this key to @code{yes} to print explicit nesting levels in the output.
  This exists for use by GCC developers.
  
--- 6137,6154 ----
  Override colorization settings from @option{-fdiagnostics-color} for this
  text output.
  
! @item show-nesting=@r{[}yes@r{|}no@r{]}
! Enable a mode that emphasizes hierarchical relationships
! within diagnostics messages, as per @option{-fdiagnostics-show-nesting}.
! Defaults to @code{yes}.
  
! @item show-nesting-locations=@r{[}yes@r{|}no@r{]}
! If @code{show-nesting=yes}, then by default locations are
  shown; set this key to @code{no} to disable printing such locations.
  This exists for use by GCC developers, for writing DejaGnu test cases.
  
! @item show-nesting-levels=@r{[}yes@r{|}no@r{]}
! This is a debugging option for use with @code{show-nesting=yes}.
  Set this key to @code{yes} to print explicit nesting levels in the output.
  This exists for use by GCC developers.
  
*************** Do not warn if certain built-in macros a
*** 10398,10403 ****
--- 10438,10451 ----
  warnings for redefinition of @code{__TIMESTAMP__}, @code{__TIME__},
  @code{__DATE__}, @code{__FILE__}, and @code{__BASE_FILE__}.
  
+ @opindex Wkeyword-macro
+ @opindex Wno-keyword-macro
+ @item -Wkeyword-macro
+ Warn if a keyword is defined as a macro or undefined.
+ For C++ identifiers with special meaning or standard attribute identifiers
+ are diagnosed as well.  This warning is enabled by default for C++26
+ if @code{-Wpedantic} and emits a pedwarn in that case.
+ 
  @opindex Wfree-labels
  @opindex Wno-free-labels
  @item -Wfree-labels @r{(C and Objective-C only)}
*************** LTO output files.
*** 20612,20629 ****
  @opindex fdump-rtl-@var{pass}
  @item -d@var{letters}
  @itemx -fdump-rtl-@var{pass}
! @itemx -fdump-rtl-@var{pass}=@var{filename}
  Says to make debugging dumps during compilation at times specified by
! @var{letters}.  This is used for debugging the RTL-based passes of the
  compiler.
  
  Some @option{-d@var{letters}} switches have different meaning when
  @option{-E} is used for preprocessing.  @xref{Preprocessor Options},
  for information about preprocessor-specific dump options.
  
! Debug dumps can be enabled with a @option{-fdump-rtl} switch or some
! @option{-d} option @var{letters}.  Here are the possible
! letters for use in @var{pass} and @var{letters}, and their meanings:
  
  @table @gcctabopt
  
--- 20660,20681 ----
  @opindex fdump-rtl-@var{pass}
  @item -d@var{letters}
  @itemx -fdump-rtl-@var{pass}
! @itemx -fdump-rtl-@var{pass}-@var{options}
! @itemx -fdump-rtl-@var{pass}-@var{options}=@var{filename}
  Says to make debugging dumps during compilation at times specified by
! @var{letters} when using @option{-d} or by @var{pass} when using
! @option{-fdump-rtl}.  This is used for debugging the RTL-based passes of the
  compiler.
  
  Some @option{-d@var{letters}} switches have different meaning when
  @option{-E} is used for preprocessing.  @xref{Preprocessor Options},
  for information about preprocessor-specific dump options.
  
! The @samp{-@var{options}} form allows greater control over the details of the
! dump. See @option{-fdump-tree}.
! 
! Here are actual instances of command-line options following these patterns and
! their meanings:
  
  @table @gcctabopt
  
*************** GraphViz to @file{@var{file}.@var{passid
*** 21150,21157 ****
  the file is pretty-printed as a subgraph, so that GraphViz can render them
  all in a single plot.
  
! This option currently only works for RTL dumps, and the RTL is always
! dumped in slim form.
  @item vops
  Enable showing virtual operands for every statement.
  @item lineno
--- 21202,21208 ----
  the file is pretty-printed as a subgraph, so that GraphViz can render them
  all in a single plot.
  
! RTL is always dumped in slim form.
  @item vops
  Enable showing virtual operands for every statement.
  @item lineno
*************** The default is @option{-misa-spec=201912
*** 31333,31339 ****
  with @option{--with-isa-spec=} specifying a different default version.
  
  @opindex march
! @item -march=@var{ISA-string|Profiles|Profile_ISA-string}
  Generate code for given RISC-V ISA or Profiles or a combination of them
  (e.g.@: @samp{rv64im} @samp{rvi20u64} @samp{rvi20u64_zbb}).  ISA strings and
  Profiles must be lower-case.  Examples include @samp{rv64i}, @samp{rv32g},
--- 31384,31390 ----
  with @option{--with-isa-spec=} specifying a different default version.
  
  @opindex march
! @item -march=@var{ISA-string|Profiles|Profile_ISA-string|help|unset}
  Generate code for given RISC-V ISA or Profiles or a combination of them
  (e.g.@: @samp{rv64im} @samp{rvi20u64} @samp{rvi20u64_zbb}).  ISA strings and
  Profiles must be lower-case.  Examples include @samp{rv64i}, @samp{rv32g},
*************** at the beginning of the option, then use
*** 31344,31349 ****
--- 31395,31406 ----
  @option{help} (@option{-march=help}) is accepted to list all supported
  extensions.
  
+ @samp{-march=unset} causes the compiler to ignore any @samp{-march=@dots{}} options
+ that appear earlier on the command line, behaving as if the option was never
+ passed. This is useful for ensuring that the architecture is taken from the
+ @samp{-mcpu} option, and it will result in an error if no @samp{-mcpu} option
+ is given when @samp{-march=unset} is used.
+ 
  The syntax of the ISA string is defined as follows:
  
  @table @code
diff -Nrcpad gcc-16-20250803/gcc/doc/libgdiagnostics/topics/compatibility.rst gcc-16-20250810/gcc/doc/libgdiagnostics/topics/compatibility.rst
*** gcc-16-20250803/gcc/doc/libgdiagnostics/topics/compatibility.rst	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/doc/libgdiagnostics/topics/compatibility.rst	Sun Aug 10 22:32:07 2025
*************** working with :type:`diagnostic_message_b
*** 262,264 ****
--- 262,273 ----
    * :func:`diagnostic_add_location_with_label_via_msg_buf`
  
    * :func:`diagnostic_execution_path_add_event_via_msg_buf`
+ 
+ .. _LIBGDIAGNOSTICS_ABI_5:
+ 
+ ``LIBGDIAGNOSTICS_ABI_5``
+ -------------------------
+ 
+ ``LIBGDIAGNOSTICS_ABI_5`` covers the addition of this function:
+ 
+   * :func:`diagnostic_manager_set_debug_physical_locations`
diff -Nrcpad gcc-16-20250803/gcc/doc/libgdiagnostics/topics/physical-locations.rst gcc-16-20250810/gcc/doc/libgdiagnostics/topics/physical-locations.rst
*** gcc-16-20250803/gcc/doc/libgdiagnostics/topics/physical-locations.rst	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/doc/libgdiagnostics/topics/physical-locations.rst	Sun Aug 10 22:32:07 2025
*************** This diagnostic has three locations
*** 304,306 ****
--- 304,322 ----
     .. code-block:: c
  
        #ifdef LIBDIAGNOSTICS_HAVE_diagnostic_message_buffer
+ 
+ .. function:: void diagnostic_manager_set_debug_physical_locations (diagnostic_manager *mgr, \
+ 						 int value)
+ 
+    Calling ``diagnostic_manager_set_debug_physical_locations (mgr, 1);``
+    will lead to debugging information being printed to ``stderr`` when
+    creating :type:`diagnostic_physical_location` instances.
+ 
+    The precise format of these messages is subject to change.
+ 
+    This function was added in :ref:`LIBGDIAGNOSTICS_ABI_5`; you can
+    test for its presence using
+ 
+    .. code-block:: c
+ 
+       #ifdef LIBDIAGNOSTICS_HAVE_diagnostic_manager_set_debug_physical_locations
diff -Nrcpad gcc-16-20250803/gcc/doc/tm.texi gcc-16-20250810/gcc/doc/tm.texi
*** gcc-16-20250803/gcc/doc/tm.texi	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/doc/tm.texi	Sun Aug 10 22:32:07 2025
*************** through the macros defined in the @file{
*** 37,42 ****
--- 37,44 ----
  * Trampolines::         Code set up at run time to enter a nested function.
  * Library Calls::       Controlling how library routines are implicitly called.
  * Addressing Modes::    Defining addressing modes valid for memory operands.
+ * Vectorization::       Controlling how the vectorizer operates.
+ * OpenMP and OpenACC::  Defining how OpenMP and OpenACC features should work.
  * Anchored Addresses::  Defining how @option{-fsection-anchors} should work.
  * Condition Code::      Defining how insns update the condition code.
  * Costs::               Defining relative costs of different operations.
*************** the smaller of @var{computed} and @code{
*** 1424,1433 ****
  
  @defmac MAX_FIXED_MODE_SIZE
  An integer expression for the size in bits of the largest integer
! machine mode that should actually be used.  All integer machine modes of
! this size or smaller can be used for structures and unions with the
! appropriate sizes.  If this macro is undefined, @code{GET_MODE_BITSIZE
! (DImode)} is assumed.
  @end defmac
  
  @defmac STACK_SAVEAREA_MODE (@var{save_level})
--- 1426,1435 ----
  
  @defmac MAX_FIXED_MODE_SIZE
  An integer expression for the size in bits of the largest integer
! machine mode that should actually be used by GCC internally.
! All integer machine modes of this size or smaller can be used for
! structures and unions with the appropriate sizes.  If this macro is
! undefined, @code{MAX (BITS_PER_WORD * 2, 64)} is assumed.
  @end defmac
  
  @defmac STACK_SAVEAREA_MODE (@var{save_level})
*************** reciprocal of the machine-specific built
*** 6282,6287 ****
--- 6284,6293 ----
  @code{NULL_TREE} if such a function is not available.
  @end deftypefn
  
+ @node Vectorization
+ @section Vectorization
+ @cindex Vectorization
+ 
  @deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD (void)
  This hook should return the DECL of a function @var{f} that given an
  address @var{addr} as an argument returns a mask @var{m} that can be
*************** number of scalar elements in each scalar
*** 6522,6527 ****
--- 6528,6537 ----
  combined into the vector.
  @end deftypefn
  
+ @node OpenMP and OpenACC
+ @section OpenMP and OpenACC
+ @cindex OpenMP and OpenACC
+ 
  @deftypefn {Target Hook} int TARGET_SIMD_CLONE_COMPUTE_VECSIZE_AND_SIMDLEN (struct cgraph_node *@var{}, struct cgraph_simd_clone *@var{}, @var{tree}, @var{int}, @var{bool})
  This hook should set @var{vecsize_mangle}, @var{vecsize_int}, @var{vecsize_float}
  fields in @var{simd_clone} structure pointed by @var{clone_info} argument and also
diff -Nrcpad gcc-16-20250803/gcc/doc/tm.texi.in gcc-16-20250810/gcc/doc/tm.texi.in
*** gcc-16-20250803/gcc/doc/tm.texi.in	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/doc/tm.texi.in	Sun Aug 10 22:32:07 2025
*************** through the macros defined in the @file{
*** 37,42 ****
--- 37,44 ----
  * Trampolines::         Code set up at run time to enter a nested function.
  * Library Calls::       Controlling how library routines are implicitly called.
  * Addressing Modes::    Defining addressing modes valid for memory operands.
+ * Vectorization::       Controlling how the vectorizer operates.
+ * OpenMP and OpenACC::  Defining how OpenMP and OpenACC features should work.
  * Anchored Addresses::  Defining how @option{-fsection-anchors} should work.
  * Condition Code::      Defining how insns update the condition code.
  * Costs::               Defining relative costs of different operations.
*************** the smaller of @var{computed} and @code{
*** 1251,1260 ****
  
  @defmac MAX_FIXED_MODE_SIZE
  An integer expression for the size in bits of the largest integer
! machine mode that should actually be used.  All integer machine modes of
! this size or smaller can be used for structures and unions with the
! appropriate sizes.  If this macro is undefined, @code{GET_MODE_BITSIZE
! (DImode)} is assumed.
  @end defmac
  
  @defmac STACK_SAVEAREA_MODE (@var{save_level})
--- 1253,1262 ----
  
  @defmac MAX_FIXED_MODE_SIZE
  An integer expression for the size in bits of the largest integer
! machine mode that should actually be used by GCC internally.
! All integer machine modes of this size or smaller can be used for
! structures and unions with the appropriate sizes.  If this macro is
! undefined, @code{MAX (BITS_PER_WORD * 2, 64)} is assumed.
  @end defmac
  
  @defmac STACK_SAVEAREA_MODE (@var{save_level})
*************** address;  but often a machine-dependent
*** 4273,4278 ****
--- 4275,4284 ----
  
  @hook TARGET_BUILTIN_RECIPROCAL
  
+ @node Vectorization
+ @section Vectorization
+ @cindex Vectorization
+ 
  @hook TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD
  
  @hook TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST
*************** address;  but often a machine-dependent
*** 4313,4318 ****
--- 4319,4328 ----
  
  @hook TARGET_VECTORIZE_PREFER_GATHER_SCATTER
  
+ @node OpenMP and OpenACC
+ @section OpenMP and OpenACC
+ @cindex OpenMP and OpenACC
+ 
  @hook TARGET_SIMD_CLONE_COMPUTE_VECSIZE_AND_SIMDLEN
  
  @hook TARGET_SIMD_CLONE_ADJUST
diff -Nrcpad gcc-16-20250803/gcc/dump-context.h gcc-16-20250810/gcc/dump-context.h
*** gcc-16-20250803/gcc/dump-context.h	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/dump-context.h	Sun Aug 10 22:32:07 2025
*************** extern void verify_dumped_text (const lo
*** 267,273 ****
  void
  verify_item (const location &loc,
  	     const optinfo_item *item,
! 	     enum optinfo_item_kind expected_kind,
  	     location_t expected_location,
  	     const char *expected_text);
  
--- 267,273 ----
  void
  verify_item (const location &loc,
  	     const optinfo_item *item,
! 	     enum optinfo_item::kind expected_kind,
  	     location_t expected_location,
  	     const char *expected_text);
  
*************** verify_item (const location &loc,
*** 275,281 ****
  
  #define ASSERT_IS_TEXT(ITEM, EXPECTED_TEXT) \
    SELFTEST_BEGIN_STMT						    \
!     verify_item (SELFTEST_LOCATION, (ITEM), OPTINFO_ITEM_KIND_TEXT, \
  		 UNKNOWN_LOCATION, (EXPECTED_TEXT));		    \
    SELFTEST_END_STMT
  
--- 275,281 ----
  
  #define ASSERT_IS_TEXT(ITEM, EXPECTED_TEXT) \
    SELFTEST_BEGIN_STMT						    \
!     verify_item (SELFTEST_LOCATION, (ITEM), optinfo_item::kind::text, \
  		 UNKNOWN_LOCATION, (EXPECTED_TEXT));		    \
    SELFTEST_END_STMT
  
*************** verify_item (const location &loc,
*** 283,289 ****
  
  #define ASSERT_IS_TREE(ITEM, EXPECTED_LOCATION, EXPECTED_TEXT) \
    SELFTEST_BEGIN_STMT						    \
!     verify_item (SELFTEST_LOCATION, (ITEM), OPTINFO_ITEM_KIND_TREE, \
  		 (EXPECTED_LOCATION), (EXPECTED_TEXT));	    \
    SELFTEST_END_STMT
  
--- 283,289 ----
  
  #define ASSERT_IS_TREE(ITEM, EXPECTED_LOCATION, EXPECTED_TEXT) \
    SELFTEST_BEGIN_STMT						    \
!     verify_item (SELFTEST_LOCATION, (ITEM), optinfo_item::kind::tree, \
  		 (EXPECTED_LOCATION), (EXPECTED_TEXT));	    \
    SELFTEST_END_STMT
  
*************** verify_item (const location &loc,
*** 291,297 ****
  
  #define ASSERT_IS_GIMPLE(ITEM, EXPECTED_LOCATION, EXPECTED_TEXT) \
    SELFTEST_BEGIN_STMT						    \
!     verify_item (SELFTEST_LOCATION, (ITEM), OPTINFO_ITEM_KIND_GIMPLE, \
  		 (EXPECTED_LOCATION), (EXPECTED_TEXT));	    \
    SELFTEST_END_STMT
  
--- 291,297 ----
  
  #define ASSERT_IS_GIMPLE(ITEM, EXPECTED_LOCATION, EXPECTED_TEXT) \
    SELFTEST_BEGIN_STMT						    \
!     verify_item (SELFTEST_LOCATION, (ITEM), optinfo_item::kind::gimple,	\
  		 (EXPECTED_LOCATION), (EXPECTED_TEXT));	    \
    SELFTEST_END_STMT
  
*************** verify_item (const location &loc,
*** 299,305 ****
  
  #define ASSERT_IS_SYMTAB_NODE(ITEM, EXPECTED_LOCATION, EXPECTED_TEXT) \
    SELFTEST_BEGIN_STMT						    \
!     verify_item (SELFTEST_LOCATION, (ITEM), OPTINFO_ITEM_KIND_SYMTAB_NODE, \
  		 (EXPECTED_LOCATION), (EXPECTED_TEXT));	    \
    SELFTEST_END_STMT
  
--- 299,305 ----
  
  #define ASSERT_IS_SYMTAB_NODE(ITEM, EXPECTED_LOCATION, EXPECTED_TEXT) \
    SELFTEST_BEGIN_STMT						    \
!     verify_item (SELFTEST_LOCATION, (ITEM), optinfo_item::kind::symtab_node, \
  		 (EXPECTED_LOCATION), (EXPECTED_TEXT));	    \
    SELFTEST_END_STMT
  
diff -Nrcpad gcc-16-20250803/gcc/dumpfile.cc gcc-16-20250810/gcc/dumpfile.cc
*** gcc-16-20250803/gcc/dumpfile.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/dumpfile.cc	Sun Aug 10 22:32:07 2025
*************** make_item_for_dump_gimple_stmt (gimple *
*** 636,643 ****
    pp_gimple_stmt_1 (&pp, stmt, spc, dump_flags);
    pp_newline (&pp);
  
!   std::unique_ptr<optinfo_item> item
!     = std::make_unique<optinfo_item> (OPTINFO_ITEM_KIND_GIMPLE,
  				      gimple_location (stmt),
  				      xstrdup (pp_formatted_text (&pp)));
    return item;
--- 636,643 ----
    pp_gimple_stmt_1 (&pp, stmt, spc, dump_flags);
    pp_newline (&pp);
  
!   auto item
!     = std::make_unique<optinfo_item> (optinfo_item::kind::gimple,
  				      gimple_location (stmt),
  				      xstrdup (pp_formatted_text (&pp)));
    return item;
*************** make_item_for_dump_gimple_expr (gimple *
*** 684,691 ****
    pp_needs_newline (&pp) = true;
    pp_gimple_stmt_1 (&pp, stmt, spc, dump_flags);
  
!   std::unique_ptr<optinfo_item> item
!     = std::make_unique<optinfo_item> (OPTINFO_ITEM_KIND_GIMPLE,
  				      gimple_location (stmt),
  				      xstrdup (pp_formatted_text (&pp)));
    return item;
--- 684,691 ----
    pp_needs_newline (&pp) = true;
    pp_gimple_stmt_1 (&pp, stmt, spc, dump_flags);
  
!   auto item
!     = std::make_unique<optinfo_item> (optinfo_item::kind::gimple,
  				      gimple_location (stmt),
  				      xstrdup (pp_formatted_text (&pp)));
    return item;
*************** make_item_for_dump_generic_expr (tree no
*** 738,745 ****
    if (EXPR_HAS_LOCATION (node))
      loc = EXPR_LOCATION (node);
  
!   std::unique_ptr<optinfo_item> item
!     = std::make_unique<optinfo_item> (OPTINFO_ITEM_KIND_TREE, loc,
  				      xstrdup (pp_formatted_text (&pp)));
    return item;
  }
--- 738,745 ----
    if (EXPR_HAS_LOCATION (node))
      loc = EXPR_LOCATION (node);
  
!   auto item
!     = std::make_unique<optinfo_item> (optinfo_item::kind::tree, loc,
  				      xstrdup (pp_formatted_text (&pp)));
    return item;
  }
*************** static std::unique_ptr<optinfo_item>
*** 783,790 ****
  make_item_for_dump_symtab_node (symtab_node *node)
  {
    location_t loc = DECL_SOURCE_LOCATION (node->decl);
!   std::unique_ptr<optinfo_item> item
!     = std::make_unique<optinfo_item> (OPTINFO_ITEM_KIND_SYMTAB_NODE, loc,
  				      xstrdup (node->dump_name ()));
    return item;
  }
--- 783,790 ----
  make_item_for_dump_symtab_node (symtab_node *node)
  {
    location_t loc = DECL_SOURCE_LOCATION (node->decl);
!   auto item
!     = std::make_unique<optinfo_item> (optinfo_item::kind::symtab_node, loc,
  				      xstrdup (node->dump_name ()));
    return item;
  }
*************** emit_any_pending_textual_chunks ()
*** 1011,1018 ****
      return;
  
    char *formatted_text = xstrdup (pp_formatted_text (pp));
!   std::unique_ptr<optinfo_item> item
!     = std::make_unique<optinfo_item> (OPTINFO_ITEM_KIND_TEXT, UNKNOWN_LOCATION,
  				      formatted_text);
    pp->emit_item (std::move (item), m_optinfo);
  
--- 1011,1019 ----
      return;
  
    char *formatted_text = xstrdup (pp_formatted_text (pp));
!   auto item
!     = std::make_unique<optinfo_item> (optinfo_item::kind::text,
! 				      UNKNOWN_LOCATION,
  				      formatted_text);
    pp->emit_item (std::move (item), m_optinfo);
  
*************** make_item_for_dump_dec (const poly_int<N
*** 1084,1090 ****
      }
  
    auto item
!     = std::make_unique<optinfo_item> (OPTINFO_ITEM_KIND_TEXT, UNKNOWN_LOCATION,
  				      xstrdup (pp_formatted_text (&pp)));
    return item;
  }
--- 1085,1092 ----
      }
  
    auto item
!     = std::make_unique<optinfo_item> (optinfo_item::kind::text,
! 				      UNKNOWN_LOCATION,
  				      xstrdup (pp_formatted_text (&pp)));
    return item;
  }
*************** dump_context::begin_scope (const char *n
*** 1162,1169 ****
    pretty_printer pp;
    pp_printf (&pp, "%s %s %s", "===", name, "===");
    pp_newline (&pp);
!   std::unique_ptr<optinfo_item> item
!     = std::make_unique<optinfo_item> (OPTINFO_ITEM_KIND_TEXT, UNKNOWN_LOCATION,
  				      xstrdup (pp_formatted_text (&pp)));
    emit_item (*item.get (), MSG_NOTE);
  
--- 1164,1172 ----
    pretty_printer pp;
    pp_printf (&pp, "%s %s %s", "===", name, "===");
    pp_newline (&pp);
!   auto item
!     = std::make_unique<optinfo_item> (optinfo_item::kind::text,
! 				      UNKNOWN_LOCATION,
  				      xstrdup (pp_formatted_text (&pp)));
    emit_item (*item.get (), MSG_NOTE);
  
*************** dump_context::begin_scope (const char *n
*** 1172,1178 ****
        optinfo &info
  	= begin_next_optinfo (dump_metadata_t (MSG_NOTE, impl_location),
  			      user_location);
!       info.m_kind = OPTINFO_KIND_SCOPE;
        info.add_item (std::move (item));
        end_any_optinfo ();
      }
--- 1175,1181 ----
        optinfo &info
  	= begin_next_optinfo (dump_metadata_t (MSG_NOTE, impl_location),
  			      user_location);
!       info.m_kind = optinfo::kind::scope;
        info.add_item (std::move (item));
        end_any_optinfo ();
      }
*************** dump_context::begin_next_optinfo (const
*** 1221,1227 ****
    end_any_optinfo ();
    gcc_assert (m_pending == NULL);
    dump_location_t loc (user_loc, metadata.get_impl_location ());
!   m_pending = new optinfo (loc, OPTINFO_KIND_NOTE, current_pass);
    m_pending->handle_dump_file_kind (metadata.get_dump_flags ());
    return *m_pending;
  }
--- 1224,1230 ----
    end_any_optinfo ();
    gcc_assert (m_pending == NULL);
    dump_location_t loc (user_loc, metadata.get_impl_location ());
!   m_pending = new optinfo (loc, optinfo::kind::note, current_pass);
    m_pending->handle_dump_file_kind (metadata.get_dump_flags ());
    return *m_pending;
  }
*************** verify_dumped_text (const location &loc,
*** 2265,2271 ****
  void
  verify_item (const location &loc,
  	     const optinfo_item *item,
! 	     enum optinfo_item_kind expected_kind,
  	     location_t expected_location,
  	     const char *expected_text)
  {
--- 2268,2274 ----
  void
  verify_item (const location &loc,
  	     const optinfo_item *item,
! 	     enum optinfo_item::kind expected_kind,
  	     location_t expected_location,
  	     const char *expected_text)
  {
*************** test_capture_of_dump_calls (const line_t
*** 2324,2330 ****
  	  {
  	    optinfo *info = tmp.get_pending_optinfo ();
  	    ASSERT_TRUE (info != NULL);
! 	    ASSERT_EQ (info->get_kind (), OPTINFO_KIND_NOTE);
  	    ASSERT_EQ (info->num_items (), 1);
  	    ASSERT_IS_TEXT (info->get_item (0), "int: 42 str: foo");
  	    ASSERT_IMPL_LOCATION_EQ (info->get_impl_location (),
--- 2327,2333 ----
  	  {
  	    optinfo *info = tmp.get_pending_optinfo ();
  	    ASSERT_TRUE (info != NULL);
! 	    ASSERT_EQ (info->get_kind (), optinfo::kind::note);
  	    ASSERT_EQ (info->num_items (), 1);
  	    ASSERT_IS_TEXT (info->get_item (0), "int: 42 str: foo");
  	    ASSERT_IMPL_LOCATION_EQ (info->get_impl_location (),
*************** test_capture_of_dump_calls (const line_t
*** 2345,2351 ****
  	  {
  	    optinfo *info = tmp.get_pending_optinfo ();
  	    ASSERT_TRUE (info != NULL);
! 	    ASSERT_EQ (info->get_kind (), OPTINFO_KIND_NOTE);
  	    ASSERT_EQ (info->num_items (), 2);
  	    ASSERT_IS_TEXT (info->get_item (0), "tree: ");
  	    ASSERT_IS_TREE (info->get_item (1), UNKNOWN_LOCATION, "0");
--- 2348,2354 ----
  	  {
  	    optinfo *info = tmp.get_pending_optinfo ();
  	    ASSERT_TRUE (info != NULL);
! 	    ASSERT_EQ (info->get_kind (), optinfo::kind::note);
  	    ASSERT_EQ (info->num_items (), 2);
  	    ASSERT_IS_TEXT (info->get_item (0), "tree: ");
  	    ASSERT_IS_TREE (info->get_item (1), UNKNOWN_LOCATION, "0");
*************** test_capture_of_dump_calls (const line_t
*** 2367,2373 ****
  	  {
  	    optinfo *info = tmp.get_pending_optinfo ();
  	    ASSERT_TRUE (info != NULL);
! 	    ASSERT_EQ (info->get_kind (), OPTINFO_KIND_NOTE);
  	    ASSERT_EQ (info->num_items (), 2);
  	    ASSERT_IS_TEXT (info->get_item (0), "gimple: ");
  	    ASSERT_IS_GIMPLE (info->get_item (1), stmt_loc, "return;");
--- 2370,2376 ----
  	  {
  	    optinfo *info = tmp.get_pending_optinfo ();
  	    ASSERT_TRUE (info != NULL);
! 	    ASSERT_EQ (info->get_kind (), optinfo::kind::note);
  	    ASSERT_EQ (info->num_items (), 2);
  	    ASSERT_IS_TEXT (info->get_item (0), "gimple: ");
  	    ASSERT_IS_GIMPLE (info->get_item (1), stmt_loc, "return;");
*************** test_capture_of_dump_calls (const line_t
*** 2389,2395 ****
  	  {
  	    optinfo *info = tmp.get_pending_optinfo ();
  	    ASSERT_TRUE (info != NULL);
! 	    ASSERT_EQ (info->get_kind (), OPTINFO_KIND_NOTE);
  	    ASSERT_EQ (info->num_items (), 2);
  	    ASSERT_IS_TEXT (info->get_item (0), "gimple: ");
  	    ASSERT_IS_GIMPLE (info->get_item (1), stmt_loc, "return;\n");
--- 2392,2398 ----
  	  {
  	    optinfo *info = tmp.get_pending_optinfo ();
  	    ASSERT_TRUE (info != NULL);
! 	    ASSERT_EQ (info->get_kind (), optinfo::kind::note);
  	    ASSERT_EQ (info->num_items (), 2);
  	    ASSERT_IS_TEXT (info->get_item (0), "gimple: ");
  	    ASSERT_IS_GIMPLE (info->get_item (1), stmt_loc, "return;\n");
*************** test_capture_of_dump_calls (const line_t
*** 2411,2417 ****
  	  {
  	    optinfo *info = tmp.get_pending_optinfo ();
  	    ASSERT_TRUE (info != NULL);
! 	    ASSERT_EQ (info->get_kind (), OPTINFO_KIND_NOTE);
  	    ASSERT_EQ (info->num_items (), 2);
  	    ASSERT_IS_TEXT (info->get_item (0), "node: ");
  	    ASSERT_IS_SYMTAB_NODE (info->get_item (1), decl_loc, "test_decl/1");
--- 2414,2420 ----
  	  {
  	    optinfo *info = tmp.get_pending_optinfo ();
  	    ASSERT_TRUE (info != NULL);
! 	    ASSERT_EQ (info->get_kind (), optinfo::kind::note);
  	    ASSERT_EQ (info->num_items (), 2);
  	    ASSERT_IS_TEXT (info->get_item (0), "node: ");
  	    ASSERT_IS_SYMTAB_NODE (info->get_item (1), decl_loc, "test_decl/1");
*************** test_capture_of_dump_calls (const line_t
*** 2441,2447 ****
  	  {
  	    optinfo *info = tmp.get_pending_optinfo ();
  	    ASSERT_TRUE (info != NULL);
! 	    ASSERT_EQ (info->get_kind (), OPTINFO_KIND_NOTE);
  	    ASSERT_EQ (info->num_items (), 8);
  	    ASSERT_IS_TEXT (info->get_item (0), "before ");
  	    ASSERT_IS_TREE (info->get_item (1), UNKNOWN_LOCATION, "0");
--- 2444,2450 ----
  	  {
  	    optinfo *info = tmp.get_pending_optinfo ();
  	    ASSERT_TRUE (info != NULL);
! 	    ASSERT_EQ (info->get_kind (), optinfo::kind::note);
  	    ASSERT_EQ (info->num_items (), 8);
  	    ASSERT_IS_TEXT (info->get_item (0), "before ");
  	    ASSERT_IS_TREE (info->get_item (1), UNKNOWN_LOCATION, "0");
*************** test_capture_of_dump_calls (const line_t
*** 2471,2477 ****
  	    optinfo *info = tmp.get_pending_optinfo ();
  	    ASSERT_TRUE (info != NULL);
  	    ASSERT_EQ (info->get_location_t (), stmt_loc);
! 	    ASSERT_EQ (info->get_kind (), OPTINFO_KIND_NOTE);
  	    ASSERT_EQ (info->num_items (), 2);
  	    ASSERT_IS_TEXT (info->get_item (0), "test of tree: ");
  	    ASSERT_IS_TREE (info->get_item (1), UNKNOWN_LOCATION, "0");
--- 2474,2480 ----
  	    optinfo *info = tmp.get_pending_optinfo ();
  	    ASSERT_TRUE (info != NULL);
  	    ASSERT_EQ (info->get_location_t (), stmt_loc);
! 	    ASSERT_EQ (info->get_kind (), optinfo::kind::note);
  	    ASSERT_EQ (info->num_items (), 2);
  	    ASSERT_IS_TEXT (info->get_item (0), "test of tree: ");
  	    ASSERT_IS_TREE (info->get_item (1), UNKNOWN_LOCATION, "0");
*************** test_capture_of_dump_calls (const line_t
*** 2494,2500 ****
  	    optinfo *info = tmp.get_pending_optinfo ();
  	    ASSERT_TRUE (info != NULL);
  	    ASSERT_EQ (info->get_location_t (), stmt_loc);
! 	    ASSERT_EQ (info->get_kind (), OPTINFO_KIND_NOTE);
  	    ASSERT_EQ (info->num_items (), 1);
  	    ASSERT_IS_TREE (info->get_item (0), UNKNOWN_LOCATION, "1");
  	    ASSERT_IMPL_LOCATION_EQ (info->get_impl_location (),
--- 2497,2503 ----
  	    optinfo *info = tmp.get_pending_optinfo ();
  	    ASSERT_TRUE (info != NULL);
  	    ASSERT_EQ (info->get_location_t (), stmt_loc);
! 	    ASSERT_EQ (info->get_kind (), optinfo::kind::note);
  	    ASSERT_EQ (info->num_items (), 1);
  	    ASSERT_IS_TREE (info->get_item (0), UNKNOWN_LOCATION, "1");
  	    ASSERT_IMPL_LOCATION_EQ (info->get_impl_location (),
*************** test_capture_of_dump_calls (const line_t
*** 2598,2604 ****
  	  {
  	    optinfo *info = tmp.get_pending_optinfo ();
  	    ASSERT_TRUE (info != NULL);
! 	    ASSERT_EQ (info->get_kind (), OPTINFO_KIND_NOTE);
  	    ASSERT_EQ (info->num_items (), 1);
  	    ASSERT_IS_SYMTAB_NODE (info->get_item (0), decl_loc, "test_decl/1");
  	    ASSERT_IMPL_LOCATION_EQ (info->get_impl_location (),
--- 2601,2607 ----
  	  {
  	    optinfo *info = tmp.get_pending_optinfo ();
  	    ASSERT_TRUE (info != NULL);
! 	    ASSERT_EQ (info->get_kind (), optinfo::kind::note);
  	    ASSERT_EQ (info->num_items (), 1);
  	    ASSERT_IS_SYMTAB_NODE (info->get_item (0), decl_loc, "test_decl/1");
  	    ASSERT_IMPL_LOCATION_EQ (info->get_impl_location (),
*************** test_capture_of_dump_calls (const line_t
*** 2727,2733 ****
        temp_dump_context tmp (true, true, MSG_ALL_KINDS);
        dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, loc, "test");
        ASSERT_EQ (tmp.get_pending_optinfo ()->get_kind (),
! 		 OPTINFO_KIND_SUCCESS);
      }
  
      /* MSG_MISSED_OPTIMIZATION.  */
--- 2730,2736 ----
        temp_dump_context tmp (true, true, MSG_ALL_KINDS);
        dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, loc, "test");
        ASSERT_EQ (tmp.get_pending_optinfo ()->get_kind (),
! 		 optinfo::kind::success);
      }
  
      /* MSG_MISSED_OPTIMIZATION.  */
*************** test_capture_of_dump_calls (const line_t
*** 2735,2741 ****
        temp_dump_context tmp (true, true, MSG_ALL_KINDS);
        dump_printf_loc (MSG_MISSED_OPTIMIZATION, loc, "test");
        ASSERT_EQ (tmp.get_pending_optinfo ()->get_kind (),
! 		 OPTINFO_KIND_FAILURE);
      }
    }
  
--- 2738,2744 ----
        temp_dump_context tmp (true, true, MSG_ALL_KINDS);
        dump_printf_loc (MSG_MISSED_OPTIMIZATION, loc, "test");
        ASSERT_EQ (tmp.get_pending_optinfo ()->get_kind (),
! 		 optinfo::kind::failure);
      }
    }
  
diff -Nrcpad gcc-16-20250803/gcc/explow.cc gcc-16-20250810/gcc/explow.cc
*** gcc-16-20250803/gcc/explow.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/explow.cc	Sun Aug 10 22:32:07 2025
*************** promote_function_mode (const_tree type,
*** 854,859 ****
--- 854,871 ----
  
    switch (TREE_CODE (type))
      {
+     case BITINT_TYPE:
+       if (TYPE_MODE (type) == BLKmode)
+ 	return mode;
+ 
+       struct bitint_info info;
+       bool ok;
+       ok = targetm.c.bitint_type_info (TYPE_PRECISION (type), &info);
+       gcc_assert (ok);
+ 
+       if (!info.extended)
+ 	return mode;
+       /* FALLTHRU */
      case INTEGER_TYPE:   case ENUMERAL_TYPE:   case BOOLEAN_TYPE:
      case REAL_TYPE:      case OFFSET_TYPE:     case FIXED_POINT_TYPE:
      case POINTER_TYPE:   case REFERENCE_TYPE:
*************** promote_mode (const_tree type ATTRIBUTE_
*** 893,898 ****
--- 905,922 ----
  
    switch (code)
      {
+     case BITINT_TYPE:
+       if (TYPE_MODE (type) == BLKmode)
+ 	return mode;
+ 
+       struct bitint_info info;
+       bool ok;
+       ok = targetm.c.bitint_type_info (TYPE_PRECISION (type), &info);
+       gcc_assert (ok);
+ 
+       if (!info.extended)
+ 	return mode;
+       /* FALLTHRU */
      case INTEGER_TYPE:   case ENUMERAL_TYPE:   case BOOLEAN_TYPE:
      case REAL_TYPE:      case OFFSET_TYPE:     case FIXED_POINT_TYPE:
        /* Values of these types always have scalar mode.  */
diff -Nrcpad gcc-16-20250803/gcc/expr.cc gcc-16-20250810/gcc/expr.cc
*** gcc-16-20250803/gcc/expr.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/expr.cc	Sun Aug 10 22:32:07 2025
*************** along with GCC; see the file COPYING3.
*** 76,81 ****
--- 76,85 ----
     the same indirect address eventually.  */
  int cse_not_expected;
  
+ /* Cache of the "extended" flag in the target's _BitInt description
+    for use during expand.  */
+ int bitint_extended = -1;
+ 
  static bool block_move_libcall_safe_for_call_parm (void);
  static bool emit_block_move_via_pattern (rtx, rtx, rtx, unsigned, unsigned,
  					 HOST_WIDE_INT, unsigned HOST_WIDE_INT,
*************** expand_expr_real_1 (tree exp, rtx target
*** 11280,11285 ****
--- 11284,11290 ----
       when reading from SSA_NAMEs of vars.  */
  #define EXTEND_BITINT(expr) \
    ((TREE_CODE (type) == BITINT_TYPE					\
+     && !bitint_extended							\
      && reduce_bit_field							\
      && mode != BLKmode							\
      && modifier != EXPAND_MEMORY					\
*************** expand_expr_real_1 (tree exp, rtx target
*** 11291,11296 ****
--- 11296,11308 ----
    type = TREE_TYPE (exp);
    mode = TYPE_MODE (type);
    unsignedp = TYPE_UNSIGNED (type);
+   if (TREE_CODE (type) == BITINT_TYPE && bitint_extended == -1)
+     {
+       struct bitint_info info;
+       bool ok = targetm.c.bitint_type_info (TYPE_PRECISION (type), &info);
+       gcc_assert (ok);
+       bitint_extended = info.extended;
+     }
  
    treeop0 = treeop1 = treeop2 = NULL_TREE;
    if (!VL_EXP_CLASS_P (exp))
diff -Nrcpad gcc-16-20250803/gcc/expr.h gcc-16-20250810/gcc/expr.h
*** gcc-16-20250803/gcc/expr.h	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/expr.h	Sun Aug 10 22:32:07 2025
*************** extern void expand_crc_table_based (rtx,
*** 388,391 ****
--- 388,395 ----
  extern void expand_reversed_crc_table_based (rtx, rtx, rtx, rtx, machine_mode,
  					     void (*) (rtx *));
  
+ /* Cache of the "extended" flag in the target's _BitInt description
+    for use during expand.  */
+ extern int bitint_extended;
+ 
  #endif /* GCC_EXPR_H */
diff -Nrcpad gcc-16-20250803/gcc/fortran/ChangeLog gcc-16-20250810/gcc/fortran/ChangeLog
*** gcc-16-20250803/gcc/fortran/ChangeLog	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/fortran/ChangeLog	Sun Aug 10 22:32:07 2025
***************
*** 1,3 ****
--- 1,83 ----
+ 2025-08-09  Paul Thomas  <pault@gcc.gnu.org>
+ 
+ 	PR fortran/121182
+ 	* decl.cc (match_generic_stmt): New function based on original
+ 	gfc_match_generic but feeding namespace rather than typebound
+ 	generics.
+ 	(match_typebound_generic): Renamed original gfc_match_generic.
+ 	(gfc_match_generic): New function that selects between type
+ 	bound generic and other generic statements and calls one of the
+ 	above two functions as appropriate.
+ 	* parse.cc (decode_specification_statement): Allow generic
+ 	statements.
+ 	(parse_spec): Accept a generic statement in a specification
+ 	block.
+ 
+ 2025-08-05  Mikael Morin  <morin-mikael@orange.fr>
+ 
+ 	* trans-stmt.cc (trans_associate_var): Remove overwrite of
+ 	the polymorphic associate variable's array descriptor offset.
+ 
+ 2025-08-05  Mikael Morin  <morin-mikael@orange.fr>
+ 
+ 	* trans-array.cc (trans_array_constructor): Remove the update of
+ 	the array descriptor upper bound after array constructor
+ 	expansion.
+ 
+ 2025-08-05  Mikael Morin  <morin-mikael@orange.fr>
+ 
+ 	* trans-array.cc (gfc_conv_expr_descriptor): Remove
+ 	isolated initialization of the span field before passing to
+ 	the function that will do the initialization.
+ 
+ 2025-08-05  Mikael Morin  <morin-mikael@orange.fr>
+ 
+ 	* trans-decl.cc (gfc_trans_deferred_vars): Don't default
+ 	initialize the span of local pointer arrays.
+ 
+ 2025-08-05  Mikael Morin  <morin-mikael@orange.fr>
+ 
+ 	* trans-stmt.cc (trans_associate_var): Remove overwrite of the
+ 	span field of the associate variable's array descriptor.
+ 
+ 2025-08-05  Mikael Morin  <morin-mikael@orange.fr>
+ 
+ 	* trans-expr.cc (gfc_trans_pointer_assignment): Remove overwrite
+ 	of the span after assignment of the array descriptor in the
+ 	polymorphic function result to non-polymorphic pointer case.
+ 
+ 2025-08-05  Mikael Morin  <mikael@gcc.gnu.org>
+ 
+ 	* trans.h (gfc_se): Remove field use_offset.
+ 	* trans-expr.cc (gfc_conv_intrinsic_to_class): Remove use_offset
+ 	initialization.
+ 	(gfc_conv_procedure_call): Likewise.
+ 	* trans-stmt.cc (trans_associate_var): Likewise.
+ 
+ 2025-08-05  Mikael Morin  <mikael@gcc.gnu.org>
+ 
+ 	* trans-array.cc (gfc_alloc_allocatable_for_assignment): Use the
+ 	offset setter instead of generating a write to the offset.
+ 	(gfc_conv_array_parameter): Use the offset setter instead of
+ 	generating a write to the value returned by the offset getter.
+ 	* trans-expr.cc (gfc_trans_alloc_subarray_assign): Likewise.
+ 
+ 2025-08-05  Mikael Morin  <mikael@gcc.gnu.org>
+ 
+ 	* trans-array.cc (gfc_conv_descriptor_data_addr): Remove.
+ 	* trans-array.h (gfc_conv_descriptor_data_addr): Remove.
+ 	* trans-decl.cc (gfc_trans_deferred_vars): Use
+ 	gfc_conv_descriptor_data_get.
+ 
+ 2025-08-05  Mikael Morin  <mikael@gcc.gnu.org>
+ 
+ 	* trans.cc (gfc_finalize_tree_expr): Use the data setter instead
+ 	of writing to the value returned by the data getter.
+ 	* trans-decl.cc (gfc_trans_deferred_vars): Likewise.
+ 	* trans-stmt.cc (trans_associate_var): Use the data setter
+ 	instead of writing to the value dereferenced from the data
+ 	address.
+ 
  2025-08-01  Mikael Morin  <mikael@gcc.gnu.org>
  
  	* trans-decl.cc (gfc_trans_deferred_vars): Fix closing brace in
***************
*** 220,226 ****
  
  2025-07-11  Paul Thomas  <pault@gcc.gnu.org>
  
! 	PR fortran/106135
  	* decl.cc (build_sym): Emit an error if a symbol associated by
  	an IMPORT, ONLY or IMPORT, all statement is being redeclared.
  	(gfc_match_import): Parse and check the F2018 versions of the
--- 300,306 ----
  
  2025-07-11  Paul Thomas  <pault@gcc.gnu.org>
  
! 	PR fortran/106035
  	* decl.cc (build_sym): Emit an error if a symbol associated by
  	an IMPORT, ONLY or IMPORT, all statement is being redeclared.
  	(gfc_match_import): Parse and check the F2018 versions of the
diff -Nrcpad gcc-16-20250803/gcc/fortran/decl.cc gcc-16-20250810/gcc/fortran/decl.cc
*** gcc-16-20250803/gcc/fortran/decl.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/fortran/decl.cc	Sun Aug 10 22:32:07 2025
*************** syntax:
*** 11710,11719 ****
  }
  
  
  /* Match a GENERIC procedure binding inside a derived type.  */
  
! match
! gfc_match_generic (void)
  {
    char name[GFC_MAX_SYMBOL_LEN + 1];
    char bind_name[GFC_MAX_SYMBOL_LEN + 16]; /* Allow space for OPERATOR(...).  */
--- 11710,12017 ----
  }
  
  
+ /* Match a GENERIC statement.
+ F2018 15.4.3.3 GENERIC statement
+ 
+ A GENERIC statement specifies a generic identifier for one or more specific
+ procedures, in the same way as a generic interface block that does not contain
+ interface bodies.
+ 
+ R1510 generic-stmt is:
+ GENERIC [ , access-spec ] :: generic-spec => specific-procedure-list
+ 
+ C1510 (R1510) A specific-procedure in a GENERIC statement shall not specify a
+ procedure that was specified previously in any accessible interface with the
+ same generic identifier.
+ 
+ If access-spec appears, it specifies the accessibility (8.5.2) of generic-spec.
+ 
+ For GENERIC statements outside of a derived type, use is made of the existing,
+ typebound matching functions to obtain access-spec and generic-spec.  After
+ this the standard INTERFACE machinery is used. */
+ 
+ static match
+ match_generic_stmt (void)
+ {
+   char name[GFC_MAX_SYMBOL_LEN + 1];
+   /* Allow space for OPERATOR(...).  */
+   char generic_spec_name[GFC_MAX_SYMBOL_LEN + 16];
+   /* Generics other than uops  */
+   gfc_symbol* generic_spec = NULL;
+   /* Generic uops  */
+   gfc_user_op *generic_uop = NULL;
+   /* For the matching calls  */
+   gfc_typebound_proc tbattr;
+   gfc_namespace* ns = gfc_current_ns;
+   interface_type op_type;
+   gfc_intrinsic_op op;
+   match m;
+   gfc_symtree* st;
+   /* The specific-procedure-list  */
+   gfc_interface *generic = NULL;
+   /* The head of the specific-procedure-list  */
+   gfc_interface **generic_tail = NULL;
+ 
+   memset (&tbattr, 0, sizeof (tbattr));
+   tbattr.where = gfc_current_locus;
+ 
+   /* See if we get an access-specifier.  */
+   m = match_binding_attributes (&tbattr, true, false);
+   tbattr.where = gfc_current_locus;
+   if (m == MATCH_ERROR)
+     goto error;
+ 
+   /* Now the colons, those are required.  */
+   if (gfc_match (" ::") != MATCH_YES)
+     {
+       gfc_error ("Expected %<::%> at %C");
+       goto error;
+     }
+ 
+   /* Match the generic-spec name; depending on type (operator / generic) format
+      it for future error messages in 'generic_spec_name'.  */
+   m = gfc_match_generic_spec (&op_type, name, &op);
+   if (m == MATCH_ERROR)
+     return MATCH_ERROR;
+   if (m == MATCH_NO)
+     {
+       gfc_error ("Expected generic name or operator descriptor at %C");
+       goto error;
+     }
+ 
+   switch (op_type)
+     {
+     case INTERFACE_GENERIC:
+     case INTERFACE_DTIO:
+       snprintf (generic_spec_name, sizeof (generic_spec_name), "%s", name);
+       break;
+ 
+     case INTERFACE_USER_OP:
+       snprintf (generic_spec_name, sizeof (generic_spec_name), "OPERATOR(.%s.)", name);
+       break;
+ 
+     case INTERFACE_INTRINSIC_OP:
+       snprintf (generic_spec_name, sizeof (generic_spec_name), "OPERATOR(%s)",
+ 		gfc_op2string (op));
+       break;
+ 
+     case INTERFACE_NAMELESS:
+       gfc_error ("Malformed GENERIC statement at %C");
+       goto error;
+       break;
+ 
+     default:
+       gcc_unreachable ();
+     }
+ 
+   /* Match the required =>.  */
+   if (gfc_match (" =>") != MATCH_YES)
+     {
+       gfc_error ("Expected %<=>%> at %C");
+       goto error;
+     }
+ 
+ 
+   if (gfc_current_state () != COMP_MODULE && tbattr.access != ACCESS_UNKNOWN)
+     {
+       gfc_error ("The access specification at %L not in a module",
+ 		 &tbattr.where);
+       goto error;
+     }
+ 
+   /* Try to find existing generic-spec with this name for this operator;
+      if there is something, check that it is another generic-spec and then
+      extend it rather than building a new symbol. Otherwise, create a new
+      one with the right attributes.  */
+ 
+   switch (op_type)
+     {
+     case INTERFACE_DTIO:
+     case INTERFACE_GENERIC:
+       st = gfc_find_symtree (ns->sym_root, name);
+       generic_spec = st ? st->n.sym : NULL;
+       if (generic_spec)
+ 	{
+ 	  if (generic_spec->attr.flavor != FL_PROCEDURE
+ 	       && generic_spec->attr.flavor != FL_UNKNOWN)
+ 	    {
+ 	      gfc_error ("The generic-spec name %qs at %C clashes with the "
+ 			 "name of an entity declared at %L that is not a "
+ 			 "procedure", name, &generic_spec->declared_at);
+ 	      goto error;
+ 	    }
+ 
+ 	  if (op_type == INTERFACE_GENERIC && !generic_spec->attr.generic
+ 	       && generic_spec->attr.flavor != FL_UNKNOWN)
+ 	    {
+ 	      gfc_error ("There's already a non-generic procedure with "
+ 			 "name %qs at %C", generic_spec->name);
+ 	      goto error;
+ 	    }
+ 
+ 	  if (tbattr.access != ACCESS_UNKNOWN)
+ 	    {
+ 	      if (generic_spec->attr.access != tbattr.access)
+ 		{
+ 		  gfc_error ("The access specification at %L conflicts with "
+ 			     "that already given to %qs", &tbattr.where,
+ 			     generic_spec->name);
+ 		  goto error;
+ 		}
+ 	      else
+ 		{
+ 		  gfc_error ("The access specification at %L repeats that "
+ 			     "already given to %qs", &tbattr.where,
+ 			     generic_spec->name);
+ 		  goto error;
+ 		}
+ 	    }
+ 
+ 	  if (generic_spec->ts.type != BT_UNKNOWN)
+ 	    {
+ 	      gfc_error ("The generic-spec in the generic statement at %C "
+ 			 "has a type from the declaration at %L",
+ 			 &generic_spec->declared_at);
+ 	      goto error;
+ 	    }
+ 	}
+ 
+       /* Now create the generic_spec if it doesn't already exist and provide
+ 	 is with the appropriate attributes.  */
+       if (!generic_spec || generic_spec->attr.flavor != FL_PROCEDURE)
+ 	{
+ 	  if (!generic_spec)
+ 	    {
+ 	      gfc_get_symbol (name, ns, &generic_spec, &gfc_current_locus);
+ 	      gfc_set_sym_referenced (generic_spec);
+ 	      generic_spec->attr.access = tbattr.access;
+ 	    }
+ 	  else if (generic_spec->attr.access == ACCESS_UNKNOWN)
+ 	    generic_spec->attr.access = tbattr.access;
+ 	  generic_spec->refs++;
+ 	  generic_spec->attr.generic = 1;
+ 	  generic_spec->attr.flavor = FL_PROCEDURE;
+ 
+ 	  generic_spec->declared_at = gfc_current_locus;
+ 	}
+ 
+       /* Prepare to add the specific procedures.  */
+       generic = generic_spec->generic;
+       generic_tail = &generic_spec->generic;
+       break;
+ 
+     case INTERFACE_USER_OP:
+       st = gfc_find_symtree (ns->uop_root, name);
+       generic_uop = st ? st->n.uop : NULL;
+       if (generic_uop)
+ 	{
+ 	  if (generic_uop->access != ACCESS_UNKNOWN
+ 	      && tbattr.access != ACCESS_UNKNOWN)
+ 	    {
+ 	      if (generic_uop->access != tbattr.access)
+ 		{
+ 		  gfc_error ("The user operator at %L must have the same "
+ 			     "access specification as already defined user "
+ 			     "operator %qs", &tbattr.where, generic_spec_name);
+ 		  goto error;
+ 		}
+ 	      else
+ 		{
+ 		  gfc_error ("The user operator at %L repeats the access "
+ 			     "specification of already defined user operator " 				   "%qs", &tbattr.where, generic_spec_name);
+ 		  goto error;
+ 		}
+ 	    }
+ 	  else if (generic_uop->access == ACCESS_UNKNOWN)
+ 	    generic_uop->access = tbattr.access;
+ 	}
+       else
+ 	{
+ 	  generic_uop = gfc_get_uop (name);
+ 	  generic_uop->access = tbattr.access;
+ 	}
+ 
+       /* Prepare to add the specific procedures.  */
+       generic = generic_uop->op;
+       generic_tail = &generic_uop->op;
+       break;
+ 
+     case INTERFACE_INTRINSIC_OP:
+       generic = ns->op[op];
+       generic_tail = &ns->op[op];
+       break;
+ 
+     default:
+       gcc_unreachable ();
+     }
+ 
+   /* Now, match all following names in the specific-procedure-list.  */
+   do
+     {
+       m = gfc_match_name (name);
+       if (m == MATCH_ERROR)
+ 	goto error;
+       if (m == MATCH_NO)
+ 	{
+ 	  gfc_error ("Expected specific procedure name at %C");
+ 	  goto error;
+ 	}
+ 
+       if (op_type == INTERFACE_GENERIC
+ 	  && !strcmp (generic_spec->name, name))
+ 	{
+ 	  gfc_error ("The name %qs of the specific procedure at %C conflicts "
+ 		     "with that of the generic-spec", name);
+ 	  goto error;
+ 	}
+ 
+       generic = *generic_tail;
+       for (; generic; generic = generic->next)
+ 	{
+ 	  if (!strcmp (generic->sym->name, name))
+ 	    {
+ 	      gfc_error ("%qs already defined as a specific procedure for the"
+ 			 " generic %qs at %C", name, generic_spec->name);
+ 	      goto error;
+ 	    }
+ 	}
+ 
+       gfc_find_sym_tree (name, ns, 1, &st);
+       if (!st)
+ 	{
+ 	  /* This might be a procedure that has not yet been parsed. If
+ 	     so gfc_fixup_sibling_symbols will replace this symbol with
+ 	     that of the procedure.  */
+ 	  gfc_get_sym_tree (name, ns, &st, false);
+ 	  st->n.sym->refs++;
+ 	}
+ 
+       generic = gfc_get_interface();
+       generic->next = *generic_tail;
+       *generic_tail = generic;
+       generic->where = gfc_current_locus;
+       generic->sym = st->n.sym;
+     }
+   while (gfc_match (" ,") == MATCH_YES);
+ 
+   if (gfc_match_eos () != MATCH_YES)
+     {
+       gfc_error ("Junk after GENERIC statement at %C");
+       goto error;
+     }
+ 
+   gfc_commit_symbols ();
+   return MATCH_YES;
+ 
+ error:
+   return MATCH_ERROR;
+ }
+ 
+ 
  /* Match a GENERIC procedure binding inside a derived type.  */
  
! static match
! match_typebound_generic (void)
  {
    char name[GFC_MAX_SYMBOL_LEN + 1];
    char bind_name[GFC_MAX_SYMBOL_LEN + 16]; /* Allow space for OPERATOR(...).  */
*************** error:
*** 11923,11928 ****
--- 12221,12237 ----
  }
  
  
+ match
+ gfc_match_generic ()
+ {
+   if (gfc_option.allow_std & ~GFC_STD_OPT_F08
+       && gfc_current_state () != COMP_DERIVED_CONTAINS)
+     return match_generic_stmt ();
+   else
+     return match_typebound_generic ();
+ }
+ 
+ 
  /* Match a FINAL declaration inside a derived type.  */
  
  match
diff -Nrcpad gcc-16-20250803/gcc/fortran/parse.cc gcc-16-20250810/gcc/fortran/parse.cc
*** gcc-16-20250803/gcc/fortran/parse.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/fortran/parse.cc	Sun Aug 10 22:32:07 2025
*************** decode_specification_statement (void)
*** 242,247 ****
--- 242,248 ----
        break;
  
      case 'g':
+       match ("generic", gfc_match_generic, ST_GENERIC);
        break;
  
      case 'i':
*************** declSt:
*** 4533,4538 ****
--- 4534,4544 ----
        accept_statement (st);
        st = next_statement ();
        goto loop;
+ 
+     case ST_GENERIC:
+       accept_statement (st);
+       st = next_statement ();
+       goto loop;
  
      case ST_ENUM:
        accept_statement (st);
diff -Nrcpad gcc-16-20250803/gcc/fortran/trans-array.cc gcc-16-20250810/gcc/fortran/trans-array.cc
*** gcc-16-20250803/gcc/fortran/trans-array.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/fortran/trans-array.cc	Sun Aug 10 22:32:07 2025
*************** gfc_conv_descriptor_data_set (stmtblock_
*** 284,299 ****
  }
  
  
- /* This provides address access to the data field.  This should only be
-    used by array allocation, passing this on to the runtime.  */
- 
- tree
- gfc_conv_descriptor_data_addr (tree desc)
- {
-   tree field = gfc_get_descriptor_field (desc, DATA_FIELD);
-   return gfc_build_addr_expr (NULL_TREE, field);
- }
- 
  static tree
  gfc_conv_descriptor_offset (tree desc)
  {
--- 284,289 ----
*************** trans_array_constructor (gfc_ss * ss, lo
*** 3115,3121 ****
  			     gfc_array_index_type,
  			     offsetvar, gfc_index_one_node);
        tmp = gfc_evaluate_now (tmp, &outer_loop->pre);
-       gfc_conv_descriptor_ubound_set (&loop->pre, desc, gfc_rank_cst[0], tmp);
        if (*loop_ubound0 && VAR_P (*loop_ubound0))
  	gfc_add_modify (&outer_loop->pre, *loop_ubound0, tmp);
        else
--- 3105,3110 ----
*************** gfc_conv_expr_descriptor (gfc_se *se, gf
*** 8509,8522 ****
  	  else
  	    gcc_assert (se->ss == ss);
  
- 	  if (!is_pointer_array (se->expr))
- 	    {
- 	      tmp = gfc_get_element_type (TREE_TYPE (se->expr));
- 	      tmp = fold_convert (gfc_array_index_type,
- 				  size_in_bytes (tmp));
- 	      gfc_conv_descriptor_span_set (&se->pre, se->expr, tmp);
- 	    }
- 
  	  se->expr = gfc_build_addr_expr (NULL_TREE, se->expr);
  	  gfc_conv_expr (se, expr);
  
--- 8498,8503 ----
*************** gfc_conv_array_parameter (gfc_se *se, gf
*** 9588,9596 ****
  	      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++)
  		{
--- 9569,9576 ----
  	      new_field = gfc_conv_descriptor_dtype (new_desc);
  	      gfc_add_modify (&se->pre, new_field, old_field);
  
! 	      old_field = gfc_conv_descriptor_offset_get (old_desc);
! 	      gfc_conv_descriptor_offset_set (&se->pre, new_desc, old_field);
  
  	      for (int i = 0; i < expr->rank; i++)
  		{
*************** gfc_alloc_allocatable_for_assignment (gf
*** 11760,11767 ****
  					  gfc_index_zero_node);
  	}
  
!       tmp = gfc_conv_descriptor_offset (desc);
!       gfc_add_modify (&loop_pre_block, tmp, gfc_index_zero_node);
  
        tmp = fold_build2_loc (input_location, EQ_EXPR,
  			     logical_type_node, array1,
--- 11740,11747 ----
  					  gfc_index_zero_node);
  	}
  
!       gfc_conv_descriptor_offset_set (&loop_pre_block, desc,
! 				      gfc_index_zero_node);
  
        tmp = fold_build2_loc (input_location, EQ_EXPR,
  			     logical_type_node, array1,
diff -Nrcpad gcc-16-20250803/gcc/fortran/trans-array.h gcc-16-20250810/gcc/fortran/trans-array.h
*** gcc-16-20250803/gcc/fortran/trans-array.h	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/fortran/trans-array.h	Sun Aug 10 22:32:07 2025
*************** void gfc_get_descriptor_offsets_for_info
*** 173,179 ****
  					  tree *, tree *, tree *, tree *);
  
  tree gfc_conv_descriptor_data_get (tree);
- tree gfc_conv_descriptor_data_addr (tree);
  tree gfc_conv_descriptor_offset_get (tree);
  tree gfc_conv_descriptor_span_get (tree);
  tree gfc_conv_descriptor_dtype (tree);
--- 173,178 ----
diff -Nrcpad gcc-16-20250803/gcc/fortran/trans-decl.cc gcc-16-20250810/gcc/fortran/trans-decl.cc
*** gcc-16-20250803/gcc/fortran/trans-decl.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/fortran/trans-decl.cc	Sun Aug 10 22:32:07 2025
*************** gfc_trans_deferred_vars (gfc_symbol * pr
*** 4936,4955 ****
  	    }
  	}
  
-       if (sym->attr.pointer && sym->attr.dimension
- 	  && sym->attr.save == SAVE_NONE
- 	  && !sym->attr.use_assoc
- 	  && !sym->attr.host_assoc
- 	  && !sym->attr.dummy
- 	  && GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (sym->backend_decl)))
- 	{
- 	  gfc_init_block (&tmpblock);
- 	  gfc_conv_descriptor_span_set (&tmpblock, sym->backend_decl,
- 				build_int_cst (gfc_array_index_type, 0));
- 	  gfc_add_init_cleanup (block, gfc_finish_block (&tmpblock),
- 				NULL_TREE);
- 	}
- 
        if (sym->ts.type == BT_CLASS
  	  && (sym->attr.save || flag_max_stack_var_size == 0)
  	  && CLASS_DATA (sym)->attr.allocatable)
--- 4936,4941 ----
*************** gfc_trans_deferred_vars (gfc_symbol * pr
*** 5148,5165 ****
  		      se.descriptor_only = 1;
  		      gfc_conv_expr (&se, e);
  		      descriptor = se.expr;
! 		      se.expr = gfc_conv_descriptor_data_addr (se.expr);
! 		      se.expr = build_fold_indirect_ref_loc (input_location, se.expr);
  		    }
  		  gfc_free_expr (e);
  
  		  if (!sym->attr.dummy || sym->attr.intent == INTENT_OUT)
  		    {
  		      /* Nullify when entering the scope.  */
! 		      tmp = fold_build2_loc (input_location, MODIFY_EXPR,
! 					     TREE_TYPE (se.expr), se.expr,
! 					     fold_convert (TREE_TYPE (se.expr),
! 							   null_pointer_node));
  		      if (sym->attr.optional)
  			{
  			  tree present = gfc_conv_expr_present (sym);
--- 5134,5164 ----
  		      se.descriptor_only = 1;
  		      gfc_conv_expr (&se, e);
  		      descriptor = se.expr;
! 		      se.expr = gfc_conv_descriptor_data_get (se.expr);
  		    }
  		  gfc_free_expr (e);
  
  		  if (!sym->attr.dummy || sym->attr.intent == INTENT_OUT)
  		    {
  		      /* Nullify when entering the scope.  */
! 		      if (sym->ts.type == BT_CLASS
! 			  && (CLASS_DATA (sym)->attr.dimension
! 			      || CLASS_DATA (sym)->attr.codimension))
! 			{
! 			  stmtblock_t nullify;
! 			  gfc_init_block (&nullify);
! 			  gfc_conv_descriptor_data_set (&nullify, descriptor,
! 							null_pointer_node);
! 			  tmp = gfc_finish_block (&nullify);
! 			}
! 		      else
! 			{
! 			  tree typed_null = fold_convert (TREE_TYPE (se.expr),
! 							  null_pointer_node);
! 			  tmp = fold_build2_loc (input_location, MODIFY_EXPR,
! 						 TREE_TYPE (se.expr), se.expr,
! 						 typed_null);
! 			}
  		      if (sym->attr.optional)
  			{
  			  tree present = gfc_conv_expr_present (sym);
diff -Nrcpad gcc-16-20250803/gcc/fortran/trans-expr.cc gcc-16-20250810/gcc/fortran/trans-expr.cc
*** gcc-16-20250803/gcc/fortran/trans-expr.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/fortran/trans-expr.cc	Sun Aug 10 22:32:07 2025
*************** gfc_conv_intrinsic_to_class (gfc_se *par
*** 1168,1174 ****
        else
  	{
  	  parmse->ss = ss;
- 	  parmse->use_offset = 1;
  	  gfc_conv_expr_descriptor (parmse, e);
  
  	  /* Array references with vector subscripts and non-variable expressions
--- 1168,1173 ----
*************** gfc_conv_procedure_call (gfc_se * se, gf
*** 7542,7548 ****
  			|| CLASS_DATA (fsym)->attr.codimension))
  	    {
  	      /* Pass a class array.  */
- 	      parmse.use_offset = 1;
  	      gfc_conv_expr_descriptor (&parmse, e);
  	      bool defer_to_dealloc_blk = false;
  
--- 7541,7546 ----
*************** gfc_trans_alloc_subarray_assign (tree de
*** 9583,9590 ****
  
    /* Shift the lbound and ubound of temporaries to being unity,
       rather than zero, based. Always calculate the offset.  */
    offset = gfc_conv_descriptor_offset_get (dest);
-   gfc_add_modify (&block, offset, gfc_index_zero_node);
    tmp2 =gfc_create_var (gfc_array_index_type, NULL);
  
    for (n = 0; n < expr->rank; n++)
--- 9581,9588 ----
  
    /* Shift the lbound and ubound of temporaries to being unity,
       rather than zero, based. Always calculate the offset.  */
+   gfc_conv_descriptor_offset_set (&block, dest, gfc_index_zero_node);
    offset = gfc_conv_descriptor_offset_get (dest);
    tmp2 =gfc_create_var (gfc_array_index_type, NULL);
  
    for (n = 0; n < expr->rank; n++)
*************** gfc_trans_pointer_assignment (gfc_expr *
*** 11148,11158 ****
  	    {
  	      rse.expr = gfc_class_data_get (rse.expr);
  	      gfc_add_modify (&lse.pre, desc, rse.expr);
- 	      /* Set the lhs span.  */
- 	      tmp = TREE_TYPE (rse.expr);
- 	      tmp = TYPE_SIZE_UNIT (gfc_get_element_type (tmp));
- 	      tmp = fold_convert (gfc_array_index_type, tmp);
- 	      gfc_conv_descriptor_span_set (&lse.pre, desc, tmp);
   	    }
  	  else
  	    {
--- 11146,11151 ----
diff -Nrcpad gcc-16-20250803/gcc/fortran/trans-stmt.cc gcc-16-20250810/gcc/fortran/trans-stmt.cc
*** gcc-16-20250803/gcc/fortran/trans-stmt.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/fortran/trans-stmt.cc	Sun Aug 10 22:32:07 2025
*************** trans_associate_var (gfc_symbol *sym, gf
*** 1876,1884 ****
    bool class_target;
    bool unlimited;
    tree desc;
-   tree offset;
-   tree dim;
-   int n;
    tree charlen;
    bool need_len_assign;
    bool whole_array = true;
--- 1876,1881 ----
*************** trans_associate_var (gfc_symbol *sym, gf
*** 2116,2122 ****
        if (sym->assoc->variable || cst_array_ctor)
  	{
  	  se.direct_byref = 1;
- 	  se.use_offset = 1;
  	  se.expr = desc;
  	  GFC_DECL_PTR_ARRAY_P (sym->backend_decl) = 1;
  	}
--- 2113,2118 ----
*************** trans_associate_var (gfc_symbol *sym, gf
*** 2183,2198 ****
  					      dim, gfc_index_one_node);
  	}
  
-       /* If this is a subreference array pointer associate name use the
- 	 associate variable element size for the value of 'span'.  */
-       if (sym->attr.subref_array_pointer && !se.direct_byref)
- 	{
- 	  gcc_assert (e->expr_type == EXPR_VARIABLE);
- 	  tmp = gfc_get_array_span (se.expr, e);
- 
- 	  gfc_conv_descriptor_span_set (&se.pre, desc, tmp);
- 	}
- 
        if (e->expr_type == EXPR_FUNCTION
  	  && sym->ts.type == BT_DERIVED
  	  && sym->ts.u.derived
--- 2179,2184 ----
*************** trans_associate_var (gfc_symbol *sym, gf
*** 2303,2323 ****
  
  	  desc = gfc_class_data_get (se.expr);
  
- 	  /* Set the offset.  */
- 	  offset = gfc_index_zero_node;
- 	  for (n = 0; n < e->rank; n++)
- 	    {
- 	      dim = gfc_rank_cst[n];
- 	      tmp = fold_build2_loc (input_location, MULT_EXPR,
- 				     gfc_array_index_type,
- 				     gfc_conv_descriptor_stride_get (desc, dim),
- 				     gfc_conv_descriptor_lbound_get (desc, dim));
- 	      offset = fold_build2_loc (input_location, MINUS_EXPR,
- 					gfc_array_index_type,
- 					offset, tmp);
- 	    }
- 	  gfc_conv_descriptor_offset_set (&se.pre, desc, offset);
- 
  	  if (need_len_assign)
  	    {
  	      if (e->symtree
--- 2289,2294 ----
*************** trans_associate_var (gfc_symbol *sym, gf
*** 2494,2502 ****
  	{
  	  tmp = sym->backend_decl;
  	  if (GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (tmp)))
! 	    tmp = gfc_conv_descriptor_data_get (tmp);
! 	  gfc_add_modify (&se.pre, tmp, fold_convert (TREE_TYPE (tmp),
! 						    null_pointer_node));
  	}
  
        lhs = gfc_lval_expr_from_sym (sym);
--- 2465,2474 ----
  	{
  	  tmp = sym->backend_decl;
  	  if (GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (tmp)))
! 	    gfc_conv_descriptor_data_set (&se.pre, tmp, null_pointer_node);
! 	  else
! 	    gfc_add_modify (&se.pre, tmp,
! 			    fold_convert (TREE_TYPE (tmp), null_pointer_node));
  	}
  
        lhs = gfc_lval_expr_from_sym (sym);
diff -Nrcpad gcc-16-20250803/gcc/fortran/trans.cc gcc-16-20250810/gcc/fortran/trans.cc
*** gcc-16-20250803/gcc/fortran/trans.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/fortran/trans.cc	Sun Aug 10 22:32:07 2025
*************** gfc_finalize_tree_expr (gfc_se *se, gfc_
*** 1740,1746 ****
  			     gfc_call_free (data_ptr),
  			     build_empty_stmt (input_location));
        gfc_add_expr_to_block (&se->loop->post, tmp);
!       gfc_add_modify (&se->loop->post, data_ptr, data_null);
      }
    else
      {
--- 1740,1746 ----
  			     gfc_call_free (data_ptr),
  			     build_empty_stmt (input_location));
        gfc_add_expr_to_block (&se->loop->post, tmp);
!       gfc_conv_descriptor_data_set (&se->loop->post, desc, data_null);
      }
    else
      {
*************** gfc_finalize_tree_expr (gfc_se *se, gfc_
*** 1754,1760 ****
  				 gfc_call_free (data_ptr),
  				 build_empty_stmt (input_location));
  	  gfc_add_expr_to_block (&se->finalblock, tmp);
! 	  gfc_add_modify (&se->finalblock, data_ptr, data_null);
  	}
      }
  }
--- 1754,1760 ----
  				 gfc_call_free (data_ptr),
  				 build_empty_stmt (input_location));
  	  gfc_add_expr_to_block (&se->finalblock, tmp);
! 	  gfc_conv_descriptor_data_set (&se->finalblock, desc, data_null);
  	}
      }
  }
diff -Nrcpad gcc-16-20250803/gcc/fortran/trans.h gcc-16-20250810/gcc/fortran/trans.h
*** gcc-16-20250803/gcc/fortran/trans.h	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/fortran/trans.h	Sun Aug 10 22:32:07 2025
*************** typedef struct gfc_se
*** 105,114 ****
    /* If set, will pass subref descriptors without a temporary.  */
    unsigned force_no_tmp:1;
  
-   /* Unconditionally calculate offset for array segments and constant
-      arrays in gfc_conv_expr_descriptor.  */
-   unsigned use_offset:1;
- 
    unsigned want_coarray:1;
  
    /* Scalarization parameters.  */
--- 105,110 ----
diff -Nrcpad gcc-16-20250803/gcc/function.cc gcc-16-20250810/gcc/function.cc
*** gcc-16-20250803/gcc/function.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/function.cc	Sun Aug 10 22:32:07 2025
*************** prepare_function_start (void)
*** 4965,4970 ****
--- 4965,4974 ----
  
    /* Indicate we have no need of a frame pointer yet.  */
    frame_pointer_needed = 0;
+ 
+   /* Reset the cache of the "extended" flag in the target's
+      _BitInt info struct.  */
+   bitint_extended = -1;
  }
  
  void
diff -Nrcpad gcc-16-20250803/gcc/gengtype-lex.l gcc-16-20250810/gcc/gengtype-lex.l
*** gcc-16-20250803/gcc/gengtype-lex.l	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/gengtype-lex.l	Sun Aug 10 22:32:07 2025
*************** along with GCC; see the file COPYING3.
*** 21,37 ****
  %option noinput
  
  %{
- #ifdef HOST_GENERATOR_FILE
- #include "config.h"
- #define GENERATOR_FILE 1
- #else
- #include "bconfig.h"
- #endif
- #include "system.h"
- 
- #define malloc xmalloc
- #define realloc xrealloc
- 
  #include "gengtype.h"
  
  #define YY_DECL int yylex (const char **yylval)
--- 21,26 ----
diff -Nrcpad gcc-16-20250803/gcc/gimple-lower-bitint.cc gcc-16-20250810/gcc/gimple-lower-bitint.cc
*** gcc-16-20250803/gcc/gimple-lower-bitint.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/gimple-lower-bitint.cc	Sun Aug 10 22:32:07 2025
*************** enum bitint_prec_kind {
*** 76,82 ****
  /* Caches to speed up bitint_precision_kind.  */
  
  static int small_max_prec, mid_min_prec, large_min_prec, huge_min_prec;
! static int limb_prec;
  static bool bitint_big_endian, bitint_extended;
  
  /* Categorize _BitInt(PREC) as small, middle, large or huge.  */
--- 76,82 ----
  /* Caches to speed up bitint_precision_kind.  */
  
  static int small_max_prec, mid_min_prec, large_min_prec, huge_min_prec;
! static int limb_prec, abi_limb_prec;
  static bool bitint_big_endian, bitint_extended;
  
  /* Categorize _BitInt(PREC) as small, middle, large or huge.  */
*************** bitint_precision_kind (int prec)
*** 109,114 ****
--- 109,117 ----
      large_min_prec = MAX_FIXED_MODE_SIZE + 1;
    if (!limb_prec)
      limb_prec = GET_MODE_PRECISION (limb_mode);
+   if (!abi_limb_prec)
+     abi_limb_prec
+       = GET_MODE_PRECISION (as_a <scalar_int_mode> (info.abi_limb_mode));
    if (!huge_min_prec)
      {
        if (4 * limb_prec >= MAX_FIXED_MODE_SIZE)
*************** struct bitint_large_huge
*** 429,435 ****
  
    void insert_before (gimple *);
    tree limb_access_type (tree, tree);
!   tree limb_access (tree, tree, tree, bool);
    tree build_bit_field_ref (tree, tree, unsigned HOST_WIDE_INT,
  			    unsigned HOST_WIDE_INT);
    void if_then (gimple *, profile_probability, edge &, edge &);
--- 432,438 ----
  
    void insert_before (gimple *);
    tree limb_access_type (tree, tree);
!   tree limb_access (tree, tree, tree, bool, bool = false);
    tree build_bit_field_ref (tree, tree, unsigned HOST_WIDE_INT,
  			    unsigned HOST_WIDE_INT);
    void if_then (gimple *, profile_probability, edge &, edge &);
*************** bitint_large_huge::limb_access_type (tre
*** 610,620 ****
     TYPE.  If WRITE_P is true, it will be a store, otherwise a read.  */
  
  tree
! bitint_large_huge::limb_access (tree type, tree var, tree idx, bool write_p)
  {
    tree atype = (tree_fits_uhwi_p (idx)
  		? limb_access_type (type, idx) : m_limb_type);
!   tree ltype = m_limb_type;
    addr_space_t as = TYPE_ADDR_SPACE (TREE_TYPE (var));
    if (as != TYPE_ADDR_SPACE (ltype))
      ltype = build_qualified_type (ltype, TYPE_QUALS (ltype)
--- 613,626 ----
     TYPE.  If WRITE_P is true, it will be a store, otherwise a read.  */
  
  tree
! bitint_large_huge::limb_access (tree type, tree var, tree idx, bool write_p,
! 				bool abi_load_p)
  {
    tree atype = (tree_fits_uhwi_p (idx)
  		? limb_access_type (type, idx) : m_limb_type);
! 
!   tree ltype = (bitint_extended && abi_load_p) ? atype : m_limb_type;
! 
    addr_space_t as = TYPE_ADDR_SPACE (TREE_TYPE (var));
    if (as != TYPE_ADDR_SPACE (ltype))
      ltype = build_qualified_type (ltype, TYPE_QUALS (ltype)
*************** bitint_large_huge::limb_access (tree typ
*** 651,662 ****
  	{
  	  unsigned HOST_WIDE_INT nelts
  	    = CEIL (tree_to_uhwi (TYPE_SIZE (TREE_TYPE (var))), limb_prec);
! 	  tree atype = build_array_type_nelts (ltype, nelts);
  	  var = build1 (VIEW_CONVERT_EXPR, atype, var);
  	}
        ret = build4 (ARRAY_REF, ltype, var, idx, NULL_TREE, NULL_TREE);
      }
!   if (!write_p && !useless_type_conversion_p (atype, m_limb_type))
      {
        gimple *g = gimple_build_assign (make_ssa_name (m_limb_type), ret);
        insert_before (g);
--- 657,677 ----
  	{
  	  unsigned HOST_WIDE_INT nelts
  	    = CEIL (tree_to_uhwi (TYPE_SIZE (TREE_TYPE (var))), limb_prec);
! 
! 	  /* Build the array type with m_limb_type from the right address
! 	     space.  */
! 	  tree limb_type_a = m_limb_type;
! 	  if (as != TYPE_ADDR_SPACE (m_limb_type))
! 	    limb_type_a = build_qualified_type (m_limb_type,
! 						TYPE_QUALS (m_limb_type)
! 						| ENCODE_QUAL_ADDR_SPACE (as));
! 
! 	  tree atype = build_array_type_nelts (limb_type_a, nelts);
  	  var = build1 (VIEW_CONVERT_EXPR, atype, var);
  	}
        ret = build4 (ARRAY_REF, ltype, var, idx, NULL_TREE, NULL_TREE);
      }
!   if (!write_p && !useless_type_conversion_p (atype, ltype))
      {
        gimple *g = gimple_build_assign (make_ssa_name (m_limb_type), ret);
        insert_before (g);
*************** bitint_large_huge::handle_load (gimple *
*** 1964,1969 ****
--- 1979,1985 ----
    tree rhs1 = gimple_assign_rhs1 (stmt);
    tree rhs_type = TREE_TYPE (rhs1);
    bool eh = stmt_ends_bb_p (stmt);
+   bool load_bitfield_p = false;
    edge eh_edge = NULL;
    gimple *g;
  
*************** bitint_large_huge::handle_load (gimple *
*** 1987,1998 ****
        if (!bitint_big_endian
  	  && DECL_OFFSET_ALIGN (fld) >= TYPE_ALIGN (TREE_TYPE (rhs1))
  	  && (tree_to_uhwi (DECL_FIELD_BIT_OFFSET (fld)) % limb_prec) == 0)
! 	goto normal_load;
        /* Even if DECL_FIELD_BIT_OFFSET (fld) is a multiple of BITS_PER_UNIT,
  	 handle it normally for now.  */
        if (!bitint_big_endian
  	  && (tree_to_uhwi (DECL_FIELD_BIT_OFFSET (fld)) % BITS_PER_UNIT) == 0)
! 	goto normal_load;
        tree repr = DECL_BIT_FIELD_REPRESENTATIVE (fld);
        poly_int64 bitoffset;
        poly_uint64 field_offset, repr_offset;
--- 2003,2020 ----
        if (!bitint_big_endian
  	  && DECL_OFFSET_ALIGN (fld) >= TYPE_ALIGN (TREE_TYPE (rhs1))
  	  && (tree_to_uhwi (DECL_FIELD_BIT_OFFSET (fld)) % limb_prec) == 0)
! 	{
! 	  load_bitfield_p = true;
! 	  goto normal_load;
! 	}
        /* Even if DECL_FIELD_BIT_OFFSET (fld) is a multiple of BITS_PER_UNIT,
  	 handle it normally for now.  */
        if (!bitint_big_endian
  	  && (tree_to_uhwi (DECL_FIELD_BIT_OFFSET (fld)) % BITS_PER_UNIT) == 0)
! 	{
! 	  load_bitfield_p = true;
! 	  goto normal_load;
! 	}
        tree repr = DECL_BIT_FIELD_REPRESENTATIVE (fld);
        poly_int64 bitoffset;
        poly_uint64 field_offset, repr_offset;
*************** normal_load:
*** 2241,2247 ****
    /* Use write_p = true for loads with EH edges to make
       sure limb_access doesn't add a cast as separate
       statement after it.  */
!   rhs1 = limb_access (rhs_type, rhs1, idx, eh);
    tree ret = make_ssa_name (TREE_TYPE (rhs1));
    g = gimple_build_assign (ret, rhs1);
    insert_before (g);
--- 2263,2269 ----
    /* Use write_p = true for loads with EH edges to make
       sure limb_access doesn't add a cast as separate
       statement after it.  */
!   rhs1 = limb_access (rhs_type, rhs1, idx, eh, !load_bitfield_p);
    tree ret = make_ssa_name (TREE_TYPE (rhs1));
    g = gimple_build_assign (ret, rhs1);
    insert_before (g);
*************** range_to_prec (tree op, gimple *stmt)
*** 2373,2379 ****
     from that precision, if it is negative, the operand is sign-extended
     from -*PREC.  If PREC_STORED is NULL, it is the toplevel call,
     otherwise *PREC_STORED is prec from the innermost call without
!    range optimizations.  */
  
  tree
  bitint_large_huge::handle_operand_addr (tree op, gimple *stmt,
--- 2395,2401 ----
     from that precision, if it is negative, the operand is sign-extended
     from -*PREC.  If PREC_STORED is NULL, it is the toplevel call,
     otherwise *PREC_STORED is prec from the innermost call without
!    range optimizations (0 for uninitialized SSA_NAME).  */
  
  tree
  bitint_large_huge::handle_operand_addr (tree op, gimple *stmt,
*************** bitint_large_huge::handle_operand_addr (
*** 2481,2487 ****
  	      *prec = TYPE_UNSIGNED (TREE_TYPE (op)) ? limb_prec : -limb_prec;
  	      precs = *prec;
  	      if (prec_stored)
! 		*prec_stored = precs;
  	      tree var = create_tmp_var (m_limb_type);
  	      TREE_ADDRESSABLE (var) = 1;
  	      ret = build_fold_addr_expr (var);
--- 2503,2509 ----
  	      *prec = TYPE_UNSIGNED (TREE_TYPE (op)) ? limb_prec : -limb_prec;
  	      precs = *prec;
  	      if (prec_stored)
! 		*prec_stored = 0;
  	      tree var = create_tmp_var (m_limb_type);
  	      TREE_ADDRESSABLE (var) = 1;
  	      ret = build_fold_addr_expr (var);
*************** bitint_large_huge::handle_operand_addr (
*** 2510,2515 ****
--- 2532,2544 ----
  		  int prec_stored_val = 0;
  		  ret = handle_operand_addr (rhs1, g, &prec_stored_val, prec);
  		  precs = prec_stored_val;
+ 		  if (prec_stored)
+ 		    *prec_stored = prec_stored_val;
+ 		  if (precs == 0)
+ 		    {
+ 		      gcc_assert (*prec == limb_prec || *prec == -limb_prec);
+ 		      precs = *prec;
+ 		    }
  		  if (TYPE_PRECISION (lhs_type) > TYPE_PRECISION (rhs_type))
  		    {
  		      if (TYPE_UNSIGNED (lhs_type)
*************** bitint_large_huge::handle_operand_addr (
*** 2518,2524 ****
  		    }
  		  else
  		    {
! 		      if (*prec > 0 && *prec < TYPE_PRECISION (lhs_type))
  			;
  		      else if (TYPE_UNSIGNED (lhs_type))
  			{
--- 2547,2555 ----
  		    }
  		  else
  		    {
! 		      if (prec_stored_val == 0)
! 			/* Non-widening cast of uninitialized value.  */;
! 		      else if (*prec > 0 && *prec < TYPE_PRECISION (lhs_type))
  			;
  		      else if (TYPE_UNSIGNED (lhs_type))
  			{
*************** bitint_large_huge::lower_mergeable_stmt
*** 3150,3155 ****
--- 3181,3197 ----
  	    {
  	      tree l = limb_access (nlhs ? NULL_TREE : lhs_type,
  				    nlhs ? nlhs : lhs, idx, true);
+ 
+ 	      if (bitint_extended
+ 		  && sext
+ 		  && TYPE_UNSIGNED (lhs_type)
+ 		  && tree_fits_uhwi_p (idx)
+ 		  && !nlhs)
+ 		{
+ 		  rhs1 = add_cast (limb_access_type (lhs_type, idx), rhs1);
+ 		  rhs1 = add_cast (TREE_TYPE (l), rhs1);
+ 		}
+ 
  	      g = gimple_build_assign (l, rhs1);
  	    }
  	  insert_before (g);
*************** static unsigned int
*** 6669,6675 ****
  gimple_lower_bitint (void)
  {
    small_max_prec = mid_min_prec = large_min_prec = huge_min_prec = 0;
!   limb_prec = 0;
    bitint_big_endian = false;
  
    unsigned int i;
--- 6711,6717 ----
  gimple_lower_bitint (void)
  {
    small_max_prec = mid_min_prec = large_min_prec = huge_min_prec = 0;
!   limb_prec = abi_limb_prec = 0;
    bitint_big_endian = false;
  
    unsigned int i;
*************** gimple_lower_bitint (void)
*** 7631,7637 ****
  		       from smaller number.  */
  		    min_prec = prec;
  		  else
! 		    min_prec = CEIL (min_prec, limb_prec) * limb_prec;
  		  if (min_prec == 0)
  		    c = NULL_TREE;
  		  else if (min_prec == prec)
--- 7673,7692 ----
  		       from smaller number.  */
  		    min_prec = prec;
  		  else
! 		    {
! 		      min_prec = CEIL (min_prec, limb_prec) * limb_prec;
! 		      if (min_prec > (unsigned) limb_prec
! 			  && abi_limb_prec > limb_prec)
! 			{
! 			  /* For targets with ABI limb precision higher than
! 			     limb precision round to ABI limb precision,
! 			     otherwise c can contain padding bits.  */
! 			  min_prec
! 			    = CEIL (min_prec, abi_limb_prec) * abi_limb_prec;
! 			  if (min_prec > prec - rem - 2 * limb_prec)
! 			    min_prec = prec;
! 			}
! 		    }
  		  if (min_prec == 0)
  		    c = NULL_TREE;
  		  else if (min_prec == prec)
diff -Nrcpad gcc-16-20250803/gcc/gimple-pretty-print.cc gcc-16-20250810/gcc/gimple-pretty-print.cc
*** gcc-16-20250803/gcc/gimple-pretty-print.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/gimple-pretty-print.cc	Sun Aug 10 22:32:07 2025
*************** dump_gimple_omp_target (pretty_printer *
*** 1837,1842 ****
--- 1837,1848 ----
      default:
        gcc_unreachable ();
      }
+   if (gimple_omp_target_iterator_loops (gs))
+     {
+       pp_string (pp, "// Expanded iterator loops for #pragma omp target\n");
+       dump_gimple_seq (pp, gimple_omp_target_iterator_loops (gs), spc, flags);
+       pp_newline (pp);
+     }
    if (flags & TDF_RAW)
      {
        dump_gimple_fmt (pp, spc, flags, "%G%s <%+BODY <%S>%nCLAUSES <", gs,
diff -Nrcpad gcc-16-20250803/gcc/gimple-warn-recursion.cc gcc-16-20250810/gcc/gimple-warn-recursion.cc
*** gcc-16-20250803/gcc/gimple-warn-recursion.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/gimple-warn-recursion.cc	Sun Aug 10 22:32:07 2025
*************** pass_warn_recursion::execute (function *
*** 190,195 ****
--- 190,196 ----
    if (find_function_exit (entry_bb) || m_calls->length () == 0)
      return 0;
  
+   auto_diagnostic_group d;
    if (warning_at (DECL_SOURCE_LOCATION (func->decl),
  		  OPT_Winfinite_recursion,
  		  "infinite recursion detected"))
diff -Nrcpad gcc-16-20250803/gcc/gimple.cc gcc-16-20250810/gcc/gimple.cc
*** gcc-16-20250803/gcc/gimple.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/gimple.cc	Sun Aug 10 22:32:07 2025
*************** gimple_build_omp_interop (tree clauses)
*** 1295,1304 ****
  
     BODY is the sequence of statements that will be executed.
     KIND is the kind of the region.
!    CLAUSES are any of the construct's clauses.  */
  
  gomp_target *
! gimple_build_omp_target (gimple_seq body, int kind, tree clauses)
  {
    gomp_target *p
      = as_a <gomp_target *> (gimple_alloc (GIMPLE_OMP_TARGET, 0));
--- 1295,1307 ----
  
     BODY is the sequence of statements that will be executed.
     KIND is the kind of the region.
!    CLAUSES are any of the construct's clauses.
!    ITERATOR_LOOPS is an optional sequence containing constructed loops
!    for OpenMP iterators.  */
  
  gomp_target *
! gimple_build_omp_target (gimple_seq body, int kind, tree clauses,
! 			 gimple_seq iterator_loops)
  {
    gomp_target *p
      = as_a <gomp_target *> (gimple_alloc (GIMPLE_OMP_TARGET, 0));
*************** gimple_build_omp_target (gimple_seq body
*** 1306,1311 ****
--- 1309,1315 ----
      gimple_omp_set_body (p, body);
    gimple_omp_target_set_clauses (p, clauses);
    gimple_omp_target_set_kind (p, kind);
+   gimple_omp_target_set_iterator_loops (p, iterator_loops);
  
    return p;
  }
diff -Nrcpad gcc-16-20250803/gcc/gimple.def gcc-16-20250810/gcc/gimple.def
*** gcc-16-20250803/gcc/gimple.def	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/gimple.def	Sun Aug 10 22:32:07 2025
*************** DEFGSCODE(GIMPLE_OMP_SINGLE, "gimple_omp
*** 393,399 ****
     DATA_ARG is a vec of 3 local variables in the parent function
     containing data to be mapped to CHILD_FN.  This is used to
     implement the MAP clauses.  */
! DEFGSCODE(GIMPLE_OMP_TARGET, "gimple_omp_target", GSS_OMP_PARALLEL_LAYOUT)
  
  /* GIMPLE_OMP_TEAMS <BODY, CLAUSES, CHILD_FN, DATA_ARG> represents
     #pragma omp teams
--- 393,399 ----
     DATA_ARG is a vec of 3 local variables in the parent function
     containing data to be mapped to CHILD_FN.  This is used to
     implement the MAP clauses.  */
! DEFGSCODE(GIMPLE_OMP_TARGET, "gimple_omp_target", GSS_OMP_TARGET)
  
  /* GIMPLE_OMP_TEAMS <BODY, CLAUSES, CHILD_FN, DATA_ARG> represents
     #pragma omp teams
diff -Nrcpad gcc-16-20250803/gcc/gimple.h gcc-16-20250810/gcc/gimple.h
*** gcc-16-20250803/gcc/gimple.h	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/gimple.h	Sun Aug 10 22:32:07 2025
*************** struct GTY((tag("GSS_OMP_PARALLEL_LAYOUT
*** 682,692 ****
  };
  
  /* GIMPLE_OMP_TARGET */
! struct GTY((tag("GSS_OMP_PARALLEL_LAYOUT")))
    gomp_target : public gimple_statement_omp_parallel_layout
  {
!     /* No extra fields; adds invariant:
!          stmt->code == GIMPLE_OMP_TARGET.  */
  };
  
  /* GIMPLE_OMP_TASK */
--- 682,695 ----
  };
  
  /* GIMPLE_OMP_TARGET */
! struct GTY((tag("GSS_OMP_TARGET")))
    gomp_target : public gimple_statement_omp_parallel_layout
  {
!   /* [ WORD 1-10 ] : base class */
! 
!   /* [ WORD 11 ]
!      Iterator loops.  */
!   gimple_seq iterator_loops;
  };
  
  /* GIMPLE_OMP_TASK */
*************** gomp_scan *gimple_build_omp_scan (gimple
*** 1607,1613 ****
  gomp_sections *gimple_build_omp_sections (gimple_seq, tree);
  gimple *gimple_build_omp_sections_switch (void);
  gomp_single *gimple_build_omp_single (gimple_seq, tree);
! gomp_target *gimple_build_omp_target (gimple_seq, int, tree);
  gomp_teams *gimple_build_omp_teams (gimple_seq, tree);
  gomp_atomic_load *gimple_build_omp_atomic_load (tree, tree,
  						enum omp_memory_order);
--- 1610,1616 ----
  gomp_sections *gimple_build_omp_sections (gimple_seq, tree);
  gimple *gimple_build_omp_sections_switch (void);
  gomp_single *gimple_build_omp_single (gimple_seq, tree);
! gomp_target *gimple_build_omp_target (gimple_seq, int, tree, gimple_seq = NULL);
  gomp_teams *gimple_build_omp_teams (gimple_seq, tree);
  gomp_atomic_load *gimple_build_omp_atomic_load (tree, tree,
  						enum omp_memory_order);
*************** gimple_omp_target_set_data_arg (gomp_tar
*** 6380,6385 ****
--- 6383,6420 ----
  }
  
  
+ /* Return the Gimple sequence used to store loops for OpenMP iterators used
+    by OMP_TARGET_STMT.  */
+ 
+ inline gimple_seq
+ gimple_omp_target_iterator_loops (const gomp_target *omp_target_stmt)
+ {
+   return omp_target_stmt->iterator_loops;
+ }
+ 
+ 
+ /* Return a pointer to the Gimple sequence used to store loops for OpenMP
+    iterators used by OMP_TARGET GS.  */
+ 
+ inline gimple_seq *
+ gimple_omp_target_iterator_loops_ptr (gimple *gs)
+ {
+   gomp_target *omp_target_stmt = as_a <gomp_target *> (gs);
+   return &omp_target_stmt->iterator_loops;
+ }
+ 
+ 
+ /* Set ITERATOR_LOOPS to be the Gimple sequence used to store loops
+    constructed for OpenMP iterators in OMP_TARGET_STMT.  */
+ 
+ inline void
+ gimple_omp_target_set_iterator_loops (gomp_target *omp_target_stmt,
+ 				      gimple_seq iterator_loops)
+ {
+   omp_target_stmt->iterator_loops = iterator_loops;
+ }
+ 
+ 
  /* Return the clauses associated with OMP_TEAMS GS.  */
  
  inline tree
diff -Nrcpad gcc-16-20250803/gcc/gimplify.cc gcc-16-20250810/gcc/gimplify.cc
*** gcc-16-20250803/gcc/gimplify.cc	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/gimplify.cc	Sun Aug 10 22:32:07 2025
*************** build_omp_iterator_loop (tree it, gimple
*** 9891,9896 ****
--- 9891,10263 ----
    return p;
  }
  
+ 
+ /* Callback for walk_tree to find a VAR_DECL (stored in DATA) in the
+    tree TP.  */
+ 
+ static tree
+ find_var_decl (tree *tp, int *, void *data)
+ {
+   if (*tp == (tree) data)
+     return *tp;
+ 
+   return NULL_TREE;
+ }
+ 
+ /* Returns an element-by-element copy of OMP iterator tree IT.  */
+ 
+ static tree
+ copy_omp_iterator (tree it, int elem_count = -1)
+ {
+   if (elem_count < 0)
+     elem_count = TREE_VEC_LENGTH (it);
+   tree new_it = make_tree_vec (elem_count);
+   for (int i = 0; i < TREE_VEC_LENGTH (it); i++)
+     TREE_VEC_ELT (new_it, i) = TREE_VEC_ELT (it, i);
+ 
+   return new_it;
+ }
+ 
+ /* Helper function for walk_tree in remap_omp_iterator_var.  */
+ 
+ static tree
+ remap_omp_iterator_var_1 (tree *tp, int *, void *data)
+ {
+   tree old_var = ((tree *) data)[0];
+   tree new_var = ((tree *) data)[1];
+ 
+   if (*tp == old_var)
+     *tp = new_var;
+   return NULL_TREE;
+ }
+ 
+ /* Replace instances of OLD_VAR in TP with NEW_VAR.  */
+ 
+ static void
+ remap_omp_iterator_var (tree *tp, tree old_var, tree new_var)
+ {
+   tree vars[2] = { old_var, new_var };
+   walk_tree (tp, remap_omp_iterator_var_1, vars, NULL);
+ }
+ 
+ /* Scan through all clauses using OpenMP iterators in LIST_P.  If any
+    clauses have iterators with variables that are not used by the clause
+    decl or size, issue a warning and replace the iterator with a copy with
+    the unused variables removed.  */
+ 
+ static void
+ remove_unused_omp_iterator_vars (tree *list_p)
+ {
+   auto_vec< vec<tree> > iter_vars;
+   auto_vec<tree> new_iterators;
+ 
+   for (tree c = *list_p; c; c = OMP_CLAUSE_CHAIN (c))
+     {
+       if (!OMP_CLAUSE_HAS_ITERATORS (c))
+ 	continue;
+       auto_vec<tree> vars;
+       bool need_new_iterators = false;
+       for (tree it = OMP_CLAUSE_ITERATORS (c); it; it = TREE_CHAIN (it))
+ 	{
+ 	  tree var = TREE_VEC_ELT (it, 0);
+ 	  tree t = walk_tree (&OMP_CLAUSE_DECL (c), find_var_decl, var, NULL);
+ 	  if (t == NULL_TREE)
+ 	    t = walk_tree (&OMP_CLAUSE_SIZE (c), find_var_decl, var, NULL);
+ 	  if (t == NULL_TREE)
+ 	    {
+ 	      need_new_iterators = true;
+ 	      if ((OMP_CLAUSE_CODE (c) == OMP_CLAUSE_MAP
+ 		   && (OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_TO
+ 		       || OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_FROM))
+ 		  || OMP_CLAUSE_CODE (c) == OMP_CLAUSE_TO
+ 		  || OMP_CLAUSE_CODE (c) == OMP_CLAUSE_FROM)
+ 		warning_at (OMP_CLAUSE_LOCATION (c), OPT_Wopenmp,
+ 			    "iterator variable %qE not used in clause "
+ 			    "expression", DECL_NAME (var));
+ 	    }
+ 	  else
+ 	    vars.safe_push (var);
+ 	}
+       if (!need_new_iterators)
+ 	continue;
+       if (need_new_iterators && vars.is_empty ())
+ 	{
+ 	  /* No iteration variables are used in the clause - remove the
+ 	     iterator from the clause.  */
+ 	  OMP_CLAUSE_ITERATORS (c) = NULL_TREE;
+ 	  continue;
+ 	}
+ 
+       /* If a new iterator has been created for the current set of used
+ 	 iterator variables, then use that as the iterator.  Otherwise,
+ 	 create a new iterator for the current iterator variable set. */
+       unsigned i;
+       for (i = 0; i < iter_vars.length (); i++)
+ 	{
+ 	  if (vars.length () != iter_vars[i].length ())
+ 	    continue;
+ 	  bool identical_p = true;
+ 	  for (unsigned j = 0; j < vars.length () && identical_p; j++)
+ 	    identical_p = vars[j] == iter_vars[i][j];
+ 
+ 	  if (identical_p)
+ 	    break;
+ 	}
+       if (i < iter_vars.length ())
+ 	OMP_CLAUSE_ITERATORS (c) = new_iterators[i];
+       else
+ 	{
+ 	  tree new_iters = NULL_TREE;
+ 	  tree *new_iters_p = &new_iters;
+ 	  tree new_vars = NULL_TREE;
+ 	  tree *new_vars_p = &new_vars;
+ 	  i = 0;
+ 	  for (tree it = OMP_CLAUSE_ITERATORS (c); it && i < vars.length();
+ 	       it = TREE_CHAIN (it))
+ 	    {
+ 	      tree var = TREE_VEC_ELT (it, 0);
+ 	      if (var == vars[i])
+ 		{
+ 		  *new_iters_p = copy_omp_iterator (it);
+ 		  *new_vars_p = build_decl (OMP_CLAUSE_LOCATION (c), VAR_DECL,
+ 					    DECL_NAME (var), TREE_TYPE (var));
+ 		  DECL_ARTIFICIAL (*new_vars_p) = 1;
+ 		  DECL_CONTEXT (*new_vars_p) = DECL_CONTEXT (var);
+ 		  TREE_VEC_ELT (*new_iters_p, 0) = *new_vars_p;
+ 		  new_iters_p = &TREE_CHAIN (*new_iters_p);
+ 		  new_vars_p = &DECL_CHAIN (*new_vars_p);
+ 		  i++;
+ 		}
+ 	    }
+ 	  tree new_block = make_node (BLOCK);
+ 	  BLOCK_VARS (new_block) = new_vars;
+ 	  TREE_VEC_ELT (new_iters, 5) = new_block;
+ 	  new_iterators.safe_push (new_iters);
+ 	  iter_vars.safe_push (vars.copy ());
+ 	  OMP_CLAUSE_ITERATORS (c) = new_iters;
+ 	}
+ 
+       /* Remap clause to use the new variables.  */
+       i = 0;
+       for (tree it = OMP_CLAUSE_ITERATORS (c); it; it = TREE_CHAIN (it))
+ 	{
+ 	  tree old_var = vars[i++];
+ 	  tree new_var = TREE_VEC_ELT (it, 0);
+ 	  remap_omp_iterator_var (&OMP_CLAUSE_DECL (c), old_var, new_var);
+ 	  remap_omp_iterator_var (&OMP_CLAUSE_SIZE (c), old_var, new_var);
+ 	}
+     }
+ 
+   for (unsigned i = 0; i < iter_vars.length (); i++)
+     iter_vars[i].release ();
+ }
+ 
+ struct iterator_loop_info_t
+ {
+   tree bind;
+   tree count;
+   tree index;
+   tree body_label;
+   auto_vec<tree> clauses;
+ };
+ 
+ typedef hash_map<tree, iterator_loop_info_t> iterator_loop_info_map_t;
+ 
+ /* Builds a loop to expand any OpenMP iterators in the clauses in LIST_P,
+    reusing any previously built loops if they use the same set of iterators.
+    Generated Gimple statements are placed into LOOPS_SEQ_P.  The clause
+    iterators are updated with information on how and where to insert code into
+    the loop body.  */
+ 
+ static void
+ build_omp_iterators_loops (tree *list_p, gimple_seq *loops_seq_p)
+ {
+   iterator_loop_info_map_t loops;
+ 
+   for (tree c = *list_p; c; c = OMP_CLAUSE_CHAIN (c))
+     {
+       if (!OMP_CLAUSE_HAS_ITERATORS (c))
+ 	continue;
+ 
+       bool built_p;
+       iterator_loop_info_t &loop
+ 	= loops.get_or_insert (OMP_CLAUSE_ITERATORS (c), &built_p);
+ 
+       if (!built_p)
+ 	{
+ 	  loop.count = compute_omp_iterator_count (OMP_CLAUSE_ITERATORS (c),
+ 						   loops_seq_p);
+ 	  if (!loop.count)
+ 	    continue;
+ 	  if (integer_zerop (loop.count))
+ 	    warning_at (OMP_CLAUSE_LOCATION (c), OPT_Wopenmp,
+ 			"iteration count is zero");
+ 
+ 	  loop.bind = NULL_TREE;
+ 	  tree *body = build_omp_iterator_loop (OMP_CLAUSE_ITERATORS (c),
+ 						loops_seq_p, &loop.bind);
+ 
+ 	  loop.index = create_tmp_var (sizetype);
+ 	  SET_EXPR_LOCATION (loop.bind, OMP_CLAUSE_LOCATION (c));
+ 
+ 	  /* BEFORE LOOP:  */
+ 	  /* idx = -1;  */
+ 	  /* This should be initialized to before the individual elements,
+ 	     as idx is pre-incremented in the loop body.  */
+ 	  gimple *assign = gimple_build_assign (loop.index, size_int (-1));
+ 	  gimple_seq_add_stmt (loops_seq_p, assign);
+ 
+ 	  /* IN LOOP BODY:  */
+ 	  /* Create a label so we can find this point later.  */
+ 	  loop.body_label = create_artificial_label (OMP_CLAUSE_LOCATION (c));
+ 	  tree tem = build1 (LABEL_EXPR, void_type_node, loop.body_label);
+ 	  append_to_statement_list_force (tem, body);
+ 
+ 	  /* idx += 2;  */
+ 	  tem = build2_loc (OMP_CLAUSE_LOCATION (c), MODIFY_EXPR,
+ 			    void_type_node, loop.index,
+ 			    size_binop (PLUS_EXPR, loop.index, size_int (2)));
+ 	  append_to_statement_list_force (tem, body);
+ 	}
+ 
+       /* Create array to hold expanded values.  */
+       tree last_count_2 = size_binop (MULT_EXPR, loop.count, size_int (2));
+       tree arr_length = size_binop (PLUS_EXPR, last_count_2, size_int (1));
+       tree elems = NULL_TREE;
+       if (TREE_CONSTANT (arr_length))
+ 	{
+ 	  tree type = build_array_type (ptr_type_node,
+ 					build_index_type (arr_length));
+ 	  elems = create_tmp_var_raw (type, "omp_iter_data");
+ 	  TREE_ADDRESSABLE (elems) = 1;
+ 	  gimple_add_tmp_var (elems);
+ 	}
+       else
+ 	{
+ 	  /* Handle dynamic sizes.  */
+ 	  sorry ("dynamic iterator sizes not implemented yet");
+ 	}
+ 
+       /* BEFORE LOOP:  */
+       /* elems[0] = count;  */
+       tree lhs = build4 (ARRAY_REF, ptr_type_node, elems, size_int (0),
+ 			 NULL_TREE, NULL_TREE);
+       tree tem = build2_loc (OMP_CLAUSE_LOCATION (c), MODIFY_EXPR,
+ 			     void_type_node, lhs, loop.count);
+       gimplify_and_add (tem, loops_seq_p);
+ 
+       /* Make a copy of the iterator with extra info at the end.  */
+       int elem_count = TREE_VEC_LENGTH (OMP_CLAUSE_ITERATORS (c));
+       tree new_iterator = copy_omp_iterator (OMP_CLAUSE_ITERATORS (c),
+ 					     elem_count + 3);
+       TREE_VEC_ELT (new_iterator, elem_count) = loop.body_label;
+       TREE_VEC_ELT (new_iterator, elem_count + 1) = elems;
+       TREE_VEC_ELT (new_iterator, elem_count + 2) = loop.index;
+       TREE_CHAIN (new_iterator) = TREE_CHAIN (OMP_CLAUSE_ITERATORS (c));
+       OMP_CLAUSE_ITERATORS (c) = new_iterator;
+ 
+       loop.clauses.safe_push (c);
+     }
+ 
+   /* Now gimplify and add all the loops that were built.  */
+   for (hash_map<tree, iterator_loop_info_t>::iterator it = loops.begin ();
+        it != loops.end (); ++it)
+     gimplify_and_add ((*it).second.bind, loops_seq_p);
+ }
+ 
+ /* Helper function for enter_omp_iterator_loop_context.  */
+ 
+ static gimple_seq *
+ enter_omp_iterator_loop_context_1 (tree iterator, gimple_seq *loops_seq_p)
+ {
+   /* Drill into the nested bind expressions to get to the loop body.  */
+   for (gimple_stmt_iterator gsi = gsi_start (*loops_seq_p);
+        !gsi_end_p (gsi); gsi_next (&gsi))
+     {
+       gimple *stmt = gsi_stmt (gsi);
+ 
+       switch (gimple_code (stmt))
+ 	{
+ 	case GIMPLE_BIND:
+ 	  {
+ 	    gbind *bind_stmt = as_a<gbind *> (stmt);
+ 	    gimple_push_bind_expr (bind_stmt);
+ 	    gimple_seq *bind_body_p = gimple_bind_body_ptr (bind_stmt);
+ 	    gimple_seq *seq =
+ 	      enter_omp_iterator_loop_context_1 (iterator, bind_body_p);
+ 	    if (seq)
+ 	      return seq;
+ 	    gimple_pop_bind_expr ();
+ 	  }
+ 	  break;
+ 	case GIMPLE_TRY:
+ 	  {
+ 	    gimple_seq *try_eval_p = gimple_try_eval_ptr (stmt);
+ 	    gimple_seq *seq =
+ 	      enter_omp_iterator_loop_context_1 (iterator, try_eval_p);
+ 	    if (seq)
+ 	      return seq;
+ 	  }
+ 	  break;
+ 	case GIMPLE_LABEL:
+ 	  {
+ 	    glabel *label_stmt = as_a<glabel *> (stmt);
+ 	    tree label = gimple_label_label (label_stmt);
+ 	    if (label == TREE_VEC_ELT (iterator, 6))
+ 	      return loops_seq_p;
+ 	  }
+ 	  break;
+ 	default:
+ 	  break;
+ 	}
+     }
+ 
+   return NULL;
+ }
+ 
+ /* Enter the Gimplification context in LOOPS_SEQ_P for the iterator loop
+    associated with OpenMP clause C.  Returns the gimple_seq for the loop body
+    if C has OpenMP iterators, or ALT_SEQ_P if not.  */
+ 
+ static gimple_seq *
+ enter_omp_iterator_loop_context (tree c, gimple_seq *loops_seq_p,
+ 				 gimple_seq *alt_seq_p)
+ {
+   if (!OMP_CLAUSE_HAS_ITERATORS (c))
+     return alt_seq_p;
+ 
+   push_gimplify_context ();
+ 
+   gimple_seq *seq = enter_omp_iterator_loop_context_1 (OMP_CLAUSE_ITERATORS (c),
+ 						       loops_seq_p);
+   gcc_assert (seq);
+   return seq;
+ }
+ 
+ /* Enter the Gimplification context in STMT for the iterator loop associated
+    with OpenMP clause C.  Returns the gimple_seq for the loop body if C has
+    OpenMP iterators, or ALT_SEQ_P if not.  */
+ 
+ gimple_seq *
+ enter_omp_iterator_loop_context (tree c, gomp_target *stmt,
+ 				 gimple_seq *alt_seq_p)
+ {
+   gimple_seq *loops_seq_p = gimple_omp_target_iterator_loops_ptr (stmt);
+   return enter_omp_iterator_loop_context (c, loops_seq_p, alt_seq_p);
+ }
+ 
+ /* Exit the Gimplification context for the OpenMP clause C.  */
+ 
+ void
+ exit_omp_iterator_loop_context (tree c)
+ {
+   if (!OMP_CLAUSE_HAS_ITERATORS (c))
+     return;
+   while (!gimplify_ctxp->bind_expr_stack.is_empty ())
+     gimple_pop_bind_expr ();
+   pop_gimplify_context (NULL);
+ }
+ 
  /* If *LIST_P contains any OpenMP depend clauses with iterators,
     lower all the depend clauses by populating corresponding depend
     array.  Returns 0 if there are no such depend clauses, or
*************** omp_instantiate_implicit_mappers (splay_
*** 13217,13223 ****
  static void
  gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p,
  			   enum omp_region_type region_type,
! 			   enum tree_code code)
  {
    using namespace omp_addr_tokenizer;
    struct gimplify_omp_ctx *ctx, *outer_ctx;
--- 13584,13591 ----
  static void
  gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p,
  			   enum omp_region_type region_type,
! 			   enum tree_code code,
! 			   gimple_seq *loops_seq_p = NULL)
  {
    using namespace omp_addr_tokenizer;
    struct gimplify_omp_ctx *ctx, *outer_ctx;
*************** gimplify_scan_omp_clauses (tree *list_p,
*** 13988,14010 ****
  	  if (OMP_CLAUSE_SIZE (c) == NULL_TREE)
  	    OMP_CLAUSE_SIZE (c) = DECL_P (decl) ? DECL_SIZE_UNIT (decl)
  				  : TYPE_SIZE_UNIT (TREE_TYPE (decl));
! 	  if (gimplify_expr (&OMP_CLAUSE_SIZE (c), pre_p,
! 			     NULL, is_gimple_val, fb_rvalue) == GS_ERROR)
  	    {
  	      remove = true;
  	      break;
  	    }
  	  if (!DECL_P (decl))
  	    {
! 	      if (gimplify_expr (&OMP_CLAUSE_DECL (c), pre_p,
! 				 NULL, is_gimple_lvalue, fb_lvalue)
! 		  == GS_ERROR)
! 		{
! 		  remove = true;
! 		  break;
! 		}
  	      break;
  	    }
  	  goto do_notice;
  
  	case OMP_CLAUSE__MAPPER_BINDING_:
--- 14356,14379 ----
  	  if (OMP_CLAUSE_SIZE (c) == NULL_TREE)
  	    OMP_CLAUSE_SIZE (c) = DECL_P (decl) ? DECL_SIZE_UNIT (decl)
  				  : TYPE_SIZE_UNIT (TREE_TYPE (decl));
! 	  gimple_seq *seq_p;
! 	  seq_p = enter_omp_iterator_loop_context (c, loops_seq_p, pre_p);
! 	  if (gimplify_expr (&OMP_CLAUSE_SIZE (c), seq_p, NULL,
! 			     is_gimple_val, fb_rvalue) == GS_ERROR)
  	    {
  	      remove = true;
+ 	      exit_omp_iterator_loop_context (c);
  	      break;
  	    }
  	  if (!DECL_P (decl))
  	    {
! 	      if (gimplify_expr (&OMP_CLAUSE_DECL (c), seq_p, NULL,
! 				 is_gimple_lvalue, fb_lvalue) == GS_ERROR)
! 		remove = true;
! 	      exit_omp_iterator_loop_context (c);
  	      break;
  	    }
+ 	  exit_omp_iterator_loop_context (c);
  	  goto do_notice;
  
  	case OMP_CLAUSE__MAPPER_BINDING_:
*************** gimplify_adjust_omp_clauses_1 (splay_tre
*** 15035,15041 ****
  
  static void
  gimplify_adjust_omp_clauses (gimple_seq *pre_p, gimple_seq body, tree *list_p,
! 			     enum tree_code code)
  {
    struct gimplify_omp_ctx *ctx = gimplify_omp_ctxp;
    tree *orig_list_p = list_p;
--- 15404,15411 ----
  
  static void
  gimplify_adjust_omp_clauses (gimple_seq *pre_p, gimple_seq body, tree *list_p,
! 			     enum tree_code code,
! 			     gimple_seq *loops_seq_p = NULL)
  {
    struct gimplify_omp_ctx *ctx = gimplify_omp_ctxp;
    tree *orig_list_p = list_p;
*************** gimplify_adjust_omp_clauses (gimple_seq
*** 15406,15417 ****
  				    : TYPE_SIZE_UNIT (TREE_TYPE (decl));
  	    }
  	  gimplify_omp_ctxp = ctx->outer_context;
! 	  if (gimplify_expr (&OMP_CLAUSE_SIZE (c), pre_p, NULL,
  				  is_gimple_val, fb_rvalue) == GS_ERROR)
  	    {
  	      gimplify_omp_ctxp = ctx;
  	      remove = true;
! 	      break;
  	    }
  	  else if ((OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_FIRSTPRIVATE_POINTER
  		    || (OMP_CLAUSE_MAP_KIND (c)
--- 15776,15789 ----
  				    : TYPE_SIZE_UNIT (TREE_TYPE (decl));
  	    }
  	  gimplify_omp_ctxp = ctx->outer_context;
! 	  gimple_seq *seq_p;
! 	  seq_p = enter_omp_iterator_loop_context (c, loops_seq_p, pre_p);
! 	  if (gimplify_expr (&OMP_CLAUSE_SIZE (c), seq_p, NULL,
  				  is_gimple_val, fb_rvalue) == GS_ERROR)
  	    {
  	      gimplify_omp_ctxp = ctx;
  	      remove = true;
! 	      goto end_adjust_omp_map_clause;
  	    }
  	  else if ((OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_FIRSTPRIVATE_POINTER
  		    || (OMP_CLAUSE_MAP_KIND (c)
*************** gimplify_adjust_omp_clauses (gimple_seq
*** 15420,15426 ****
  		   && TREE_CODE (OMP_CLAUSE_SIZE (c)) != INTEGER_CST)
  	    {
  	      OMP_CLAUSE_SIZE (c)
! 		= get_initialized_tmp_var (OMP_CLAUSE_SIZE (c), pre_p, NULL,
  					   false);
  	      if ((ctx->region_type & ORT_TARGET) != 0)
  		omp_add_variable (ctx, OMP_CLAUSE_SIZE (c),
--- 15792,15798 ----
  		   && TREE_CODE (OMP_CLAUSE_SIZE (c)) != INTEGER_CST)
  	    {
  	      OMP_CLAUSE_SIZE (c)
! 		= get_initialized_tmp_var (OMP_CLAUSE_SIZE (c), seq_p, NULL,
  					   false);
  	      if ((ctx->region_type & ORT_TARGET) != 0)
  		omp_add_variable (ctx, OMP_CLAUSE_SIZE (c),
*************** gimplify_adjust_omp_clauses (gimple_seq
*** 15461,15467 ****
  	      && (code == OMP_TARGET_EXIT_DATA || code == OACC_EXIT_DATA))
  	    {
  	      remove = true;
! 	      break;
  	    }
  	  /* If we have a DECL_VALUE_EXPR (e.g. this is a class member and/or
  	     a variable captured in a lambda closure), look through that now
--- 15833,15839 ----
  	      && (code == OMP_TARGET_EXIT_DATA || code == OACC_EXIT_DATA))
  	    {
  	      remove = true;
! 	      goto end_adjust_omp_map_clause;
  	    }
  	  /* If we have a DECL_VALUE_EXPR (e.g. this is a class member and/or
  	     a variable captured in a lambda closure), look through that now
*************** gimplify_adjust_omp_clauses (gimple_seq
*** 15477,15483 ****
  	    decl = OMP_CLAUSE_DECL (c) = DECL_VALUE_EXPR (decl);
  	  if (TREE_CODE (decl) == TARGET_EXPR)
  	    {
! 	      if (gimplify_expr (&OMP_CLAUSE_DECL (c), pre_p, NULL,
  				 is_gimple_lvalue, fb_lvalue) == GS_ERROR)
  		remove = true;
  	    }
--- 15849,15855 ----
  	    decl = OMP_CLAUSE_DECL (c) = DECL_VALUE_EXPR (decl);
  	  if (TREE_CODE (decl) == TARGET_EXPR)
  	    {
! 	      if (gimplify_expr (&OMP_CLAUSE_DECL (c), seq_p, NULL,
  				 is_gimple_lvalue, fb_lvalue) == GS_ERROR)
  		remove = true;
  	    }
*************** gimplify_adjust_omp_clauses (gimple_seq
*** 15564,15582 ****
  	      /* If we have e.g. map(struct: *var), don't gimplify the
  		 argument since omp-low.cc wants to see the decl itself.  */
  	      if (OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_STRUCT)
! 		break;
  
  	      /* We've already partly gimplified this in
  		 gimplify_scan_omp_clauses.  Don't do any more.  */
  	      if (code == OMP_TARGET && OMP_CLAUSE_MAP_IN_REDUCTION (c))
! 		break;
  
  	      gimplify_omp_ctxp = ctx->outer_context;
! 	      if (gimplify_expr (pd, pre_p, NULL, is_gimple_lvalue,
  				 fb_lvalue) == GS_ERROR)
  		remove = true;
  	      gimplify_omp_ctxp = ctx;
! 	      break;
  	    }
  
  	 if ((code == OMP_TARGET
--- 15936,15954 ----
  	      /* If we have e.g. map(struct: *var), don't gimplify the
  		 argument since omp-low.cc wants to see the decl itself.  */
  	      if (OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_STRUCT)
! 		goto end_adjust_omp_map_clause;
  
  	      /* We've already partly gimplified this in
  		 gimplify_scan_omp_clauses.  Don't do any more.  */
  	      if (code == OMP_TARGET && OMP_CLAUSE_MAP_IN_REDUCTION (c))
! 		goto end_adjust_omp_map_clause;
  
  	      gimplify_omp_ctxp = ctx->outer_context;
! 	      if (gimplify_expr (pd, seq_p, NULL, is_gimple_lvalue,
  				 fb_lvalue) == GS_ERROR)
  		remove = true;
  	      gimplify_omp_ctxp = ctx;
! 	      goto end_adjust_omp_map_clause;
  	    }
  
  	 if ((code == OMP_TARGET
*************** gimplify_adjust_omp_clauses (gimple_seq
*** 15709,15714 ****
--- 16081,16088 ----
  		      == GOMP_MAP_ATTACH_ZERO_LENGTH_ARRAY_SECTION)))
  	    move_attach = true;
  
+ end_adjust_omp_map_clause:
+ 	  exit_omp_iterator_loop_context (c);
  	  break;
  
  	case OMP_CLAUSE_TO:
*************** gimplify_omp_workshare (tree *expr_p, gi
*** 18347,18357 ****
        gcc_unreachable ();
      }
  
    bool save_in_omp_construct = in_omp_construct;
    if ((ort & ORT_ACC) == 0)
      in_omp_construct = false;
    gimplify_scan_omp_clauses (&OMP_CLAUSES (expr), pre_p, ort,
! 			     TREE_CODE (expr));
    if (TREE_CODE (expr) == OMP_TARGET)
      optimize_target_teams (expr, pre_p);
    if ((ort & (ORT_TARGET | ORT_TARGET_DATA)) != 0
--- 18721,18738 ----
        gcc_unreachable ();
      }
  
+   gimple_seq iterator_loops_seq = NULL;
+   if (TREE_CODE (expr) == OMP_TARGET)
+     {
+       remove_unused_omp_iterator_vars (&OMP_CLAUSES (expr));
+       build_omp_iterators_loops (&OMP_CLAUSES (expr), &iterator_loops_seq);
+     }
+ 
    bool save_in_omp_construct = in_omp_construct;
    if ((ort & ORT_ACC) == 0)
      in_omp_construct = false;
    gimplify_scan_omp_clauses (&OMP_CLAUSES (expr), pre_p, ort,
! 			     TREE_CODE (expr), &iterator_loops_seq);
    if (TREE_CODE (expr) == OMP_TARGET)
      optimize_target_teams (expr, pre_p);
    if ((ort & (ORT_TARGET | ORT_TARGET_DATA)) != 0
*************** gimplify_omp_workshare (tree *expr_p, gi
*** 18390,18396 ****
    else
      gimplify_and_add (OMP_BODY (expr), &body);
    gimplify_adjust_omp_clauses (pre_p, body, &OMP_CLAUSES (expr),
! 			       TREE_CODE (expr));
    in_omp_construct = save_in_omp_construct;
  
    switch (TREE_CODE (expr))
--- 18771,18777 ----
    else
      gimplify_and_add (OMP_BODY (expr), &body);
    gimplify_adjust_omp_clauses (pre_p, body, &OMP_CLAUSES (expr),
! 			       TREE_CODE (expr), &iterator_loops_seq);
    in_omp_construct = save_in_omp_construct;
  
    switch (TREE_CODE (expr))
*************** gimplify_omp_workshare (tree *expr_p, gi
*** 18433,18439 ****
        break;
      case OMP_TARGET:
        stmt = gimple_build_omp_target (body, GF_OMP_TARGET_KIND_REGION,
! 				      OMP_CLAUSES (expr));
        break;
      case OMP_TARGET_DATA:
        /* Put use_device_{ptr,addr} clauses last, as map clauses are supposed
--- 18814,18820 ----
        break;
      case OMP_TARGET:
        stmt = gimple_build_omp_target (body, GF_OMP_TARGET_KIND_REGION,
! 				      OMP_CLAUSES (expr), iterator_loops_seq);
        break;
      case OMP_TARGET_DATA:
        /* Put use_device_{ptr,addr} clauses last, as map clauses are supposed
*************** gimplify_omp_target_update (tree *expr_p
*** 18508,18517 ****
      default:
        gcc_unreachable ();
      }
    gimplify_scan_omp_clauses (&OMP_STANDALONE_CLAUSES (expr), pre_p,
! 			     ort, TREE_CODE (expr));
    gimplify_adjust_omp_clauses (pre_p, NULL, &OMP_STANDALONE_CLAUSES (expr),
! 			       TREE_CODE (expr));
    if (TREE_CODE (expr) == OACC_UPDATE
        && omp_find_clause (OMP_STANDALONE_CLAUSES (expr),
  			  OMP_CLAUSE_IF_PRESENT))
--- 18889,18904 ----
      default:
        gcc_unreachable ();
      }
+ 
+   gimple_seq iterator_loops_seq = NULL;
+   remove_unused_omp_iterator_vars (&OMP_STANDALONE_CLAUSES (expr));
+   build_omp_iterators_loops (&OMP_STANDALONE_CLAUSES (expr),
+ 			     &iterator_loops_seq);
+ 
    gimplify_scan_omp_clauses (&OMP_STANDALONE_CLAUSES (expr), pre_p,
! 			     ort, TREE_CODE (expr), &iterator_loops_seq);
    gimplify_adjust_omp_clauses (pre_p, NULL, &OMP_STANDALONE_CLAUSES (expr),
! 			       TREE_CODE (expr), &iterator_loops_seq);
    if (TREE_CODE (expr) == OACC_UPDATE
        && omp_find_clause (OMP_STANDALONE_CLAUSES (expr),
  			  OMP_CLAUSE_IF_PRESENT))
*************** gimplify_omp_target_update (tree *expr_p
*** 18575,18581 ****
  	      gcc_unreachable ();
  	    }
      }
!   stmt = gimple_build_omp_target (NULL, kind, OMP_STANDALONE_CLAUSES (expr));
  
    gimplify_seq_add_stmt (pre_p, stmt);
    *expr_p = NULL_TREE;
--- 18962,18969 ----
  	      gcc_unreachable ();
  	    }
      }
!   stmt = gimple_build_omp_target (NULL, kind, OMP_STANDALONE_CLAUSES (expr),
! 				  iterator_loops_seq);
  
    gimplify_seq_add_stmt (pre_p, stmt);
    *expr_p = NULL_TREE;
diff -Nrcpad gcc-16-20250803/gcc/gimplify.h gcc-16-20250810/gcc/gimplify.h
*** gcc-16-20250803/gcc/gimplify.h	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/gimplify.h	Sun Aug 10 22:32:07 2025
*************** extern enum gimplify_status gimplify_exp
*** 79,84 ****
--- 79,88 ----
  extern tree omp_get_construct_context (void);
  int omp_has_novariants (void);
  
+ extern gimple_seq *enter_omp_iterator_loop_context (tree, gomp_target *,
+ 						    gimple_seq * = NULL);
+ extern void exit_omp_iterator_loop_context (tree);
+ 
  extern void gimplify_type_sizes (tree, gimple_seq *);
  extern void gimplify_one_sizepos (tree *, gimple_seq *);
  extern gbind *gimplify_body (tree, bool);
diff -Nrcpad gcc-16-20250803/gcc/gsstruct.def gcc-16-20250810/gcc/gsstruct.def
*** gcc-16-20250803/gcc/gsstruct.def	Sun Aug  3 22:32:19 2025
--- gcc-16-20250810/gcc/gsstruct.def	Sun Aug 10 22:32:07 2025
*************** DEFGSSTRUCT(GSS_OMP, gimple_statement_om
*** 44,49 ****
--- 44,50 ----
  DEFGSSTRUCT(GSS_OMP_CRITICAL, gomp_critical, false)
  DEFGSSTRUCT(GSS_OMP_FOR, gomp_for, false)
  DEFGSSTRUCT(GSS_OMP_PARALLEL_LAYOUT, gimple_statement_omp_parallel_layout, false)
+ DEFGSSTRUCT(GSS_OMP_TARGET, gomp_target, false)
  DEFGSSTRUCT(GSS_OMP_TASK, gomp_task, false)
  DEFGSSTRUCT(GSS_OMP_SECTIONS, gomp_sections, false)
  DEFGSSTRUCT(GSS_OMP_SINGLE_LAYOUT, gimple_statement_omp_single_layout, false)
diff -Nrcpad gcc-16-20250803/gcc/libgdiagnostics++.h gcc-16-20250810/gcc/libgdiagnostics++.h
*** gcc-16-20250803/gcc/libgdiagnostics++.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/libgdiagnostics++.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 477,482 ****
--- 477,485 ----
    void
    take_global_graph (graph g);
  
+   void
+   set_debug_physical_locations (bool value);
+ 
    diagnostic_manager *m_inner;
    bool m_owned;
  };
*************** manager::take_global_graph (graph g)
*** 926,931 ****
--- 929,941 ----
    g.m_owned = false;
  }
  
+ inline void
+ manager::set_debug_physical_locations (bool value)
+ {
+   diagnostic_manager_set_debug_physical_locations (m_inner,
+ 						   value ? 1 : 0);
+ }
+ 
  // class graph
  
  inline void
diff -Nrcpad gcc-16-20250803/gcc/libgdiagnostics-private.h gcc-16-20250810/gcc/libgdiagnostics-private.h
*** gcc-16-20250803/gcc/libgdiagnostics-private.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/libgdiagnostics-private.h	Sun Aug 10 22:32:08 2025
*************** private_diagnostic_execution_path_add_ev
*** 58,63 ****
--- 58,70 ----
    LIBGDIAGNOSTICS_PARAM_CAN_BE_NULL (5)
    LIBGDIAGNOSTICS_PARAM_MUST_BE_NON_NULL (6);
  
+ /* Entrypoint added in LIBGDIAGNOSTICS_ABI_5.  */
+ 
+ extern void
+ private_diagnostic_set_nesting_level (diagnostic *diag,
+ 				      int nesting_level)
+   LIBGDIAGNOSTICS_PARAM_MUST_BE_NON_NULL (1);
+ 
  } // extern "C"
  
  #endif  /* LIBGDIAGNOSTICS_PRIVATE_H  */
diff -Nrcpad gcc-16-20250803/gcc/libgdiagnostics.cc gcc-16-20250810/gcc/libgdiagnostics.cc
*** gcc-16-20250803/gcc/libgdiagnostics.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/libgdiagnostics.cc	Sun Aug 10 22:32:08 2025
*************** struct diagnostic_manager
*** 639,645 ****
  public:
    diagnostic_manager ()
    : m_current_diag (nullptr),
!     m_prev_diag_logical_loc (nullptr)
    {
      linemap_init (&m_line_table, BUILTINS_LOCATION);
      m_line_table.m_reallocator = xrealloc;
--- 639,646 ----
  public:
    diagnostic_manager ()
    : m_current_diag (nullptr),
!     m_prev_diag_logical_loc (nullptr),
!     m_debug_physical_locations (false)
    {
      linemap_init (&m_line_table, BUILTINS_LOCATION);
      m_line_table.m_reallocator = xrealloc;
*************** public:
*** 747,752 ****
--- 748,756 ----
    new_location_from_file_and_line (const diagnostic_file *file,
  				   diagnostic_line_num_t line_num)
    {
+     if (m_debug_physical_locations)
+       fprintf (stderr, "new_location_from_file_and_line (%s, %i)",
+ 	       file->get_name (), line_num);
      ensure_linemap_for_file_and_line (file, line_num);
      location_t loc = linemap_position_for_column (&m_line_table, 0);
      return new_location (loc);
*************** public:
*** 757,762 ****
--- 761,769 ----
  				      diagnostic_line_num_t line_num,
  				      diagnostic_column_num_t column_num)
    {
+     if (m_debug_physical_locations)
+       fprintf (stderr, "new_location_from_file_line_column (%s, %i, %i)",
+ 	       file->get_name (), line_num, column_num);
      ensure_linemap_for_file_and_line (file, line_num);
      location_t loc = linemap_position_for_column (&m_line_table, column_num);
      return new_location (loc);
*************** public:
*** 767,778 ****
--- 774,796 ----
  			   const diagnostic_physical_location *loc_start,
  			   const diagnostic_physical_location *loc_end)
    {
+     if (m_debug_physical_locations)
+       fprintf (stderr, "new_location_from_range (%p, %p, %p)",
+ 	       (const void *)loc_caret,
+ 	       (const void *)loc_start,
+ 	       (const void *)loc_end);
      return new_location
        (m_line_table.make_location (as_location_t (loc_caret),
  				   as_location_t (loc_start),
  				   as_location_t (loc_end)));
    }
  
+   void
+   set_debug_physical_locations (bool value)
+   {
+     m_debug_physical_locations = value;
+   }
+ 
    const diagnostic_logical_location *
    new_logical_location (enum diagnostic_logical_location_kind_t kind,
  			const diagnostic_logical_location *parent,
*************** private:
*** 874,884 ****
        linemap_add (&m_line_table, LC_ENTER, false, file->get_name (), 0);
      else
        {
! 	line_map *map
! 	  = const_cast<line_map *>
! 	    (linemap_add (&m_line_table, LC_RENAME_VERBATIM, false,
! 			  file->get_name (), 0));
! 	((line_map_ordinary *)map)->included_from = UNKNOWN_LOCATION;
        }
      linemap_line_start (&m_line_table, linenum, 100);
    }
--- 892,908 ----
        linemap_add (&m_line_table, LC_ENTER, false, file->get_name (), 0);
      else
        {
! 	line_map_ordinary *last_map
! 	  = LINEMAPS_LAST_ORDINARY_MAP (&m_line_table);
! 	if (last_map->to_file != file->get_name ()
! 	    || linenum < last_map->to_line)
! 	  {
! 	    line_map *map
! 	      = const_cast<line_map *>
! 	      (linemap_add (&m_line_table, LC_RENAME_VERBATIM, false,
! 			    file->get_name (), 0));
! 	    ((line_map_ordinary *)map)->included_from = UNKNOWN_LOCATION;
! 	  }
        }
      linemap_line_start (&m_line_table, linenum, 100);
    }
*************** private:
*** 888,898 ****
    {
      if (loc == UNKNOWN_LOCATION)
        return nullptr;
      if (diagnostic_physical_location **slot = m_location_t_map.get (loc))
!       return *slot;
      diagnostic_physical_location *phys_loc
        = new diagnostic_physical_location (this, loc);
      m_location_t_map.put (loc, phys_loc);
      return phys_loc;
    }
  
--- 912,930 ----
    {
      if (loc == UNKNOWN_LOCATION)
        return nullptr;
+     if (m_debug_physical_locations)
+       fprintf (stderr, ": new_location (%lx)", loc);
      if (diagnostic_physical_location **slot = m_location_t_map.get (loc))
!       {
! 	if (m_debug_physical_locations)
! 	  fprintf (stderr, ": cache hit: %p\n", (const void *)*slot);
! 	return *slot;
!       }
      diagnostic_physical_location *phys_loc
        = new diagnostic_physical_location (this, loc);
      m_location_t_map.put (loc, phys_loc);
+     if (m_debug_physical_locations)
+       fprintf (stderr, ": cache miss: %p\n", (const void *)phys_loc);
      return phys_loc;
    }
  
*************** private:
*** 909,914 ****
--- 941,947 ----
    const diagnostic *m_current_diag;
    const diagnostic_logical_location *m_prev_diag_logical_loc;
    std::unique_ptr<diagnostics::changes::change_set> m_change_set;
+   bool m_debug_physical_locations;
  };
  
  class impl_rich_location : public rich_location
*************** public:
*** 1221,1227 ****
      m_level (level),
      m_rich_loc (diag_mgr.get_line_table ()),
      m_logical_loc (nullptr),
!     m_path (nullptr)
    {
      m_metadata.set_lazy_digraphs (&m_graphs);
    }
--- 1254,1261 ----
      m_level (level),
      m_rich_loc (diag_mgr.get_line_table ()),
      m_logical_loc (nullptr),
!     m_path (nullptr),
!     m_nesting_level (0)
    {
      m_metadata.set_lazy_digraphs (&m_graphs);
    }
*************** public:
*** 1325,1330 ****
--- 1359,1367 ----
      return m_graphs;
    }
  
+   int get_nesting_level () const { return m_nesting_level; }
+   void set_nesting_level (int value) { m_nesting_level = value; }
+ 
  private:
    diagnostic_manager &m_diag_mgr;
    enum diagnostic_level m_level;
*************** private:
*** 1335,1340 ****
--- 1372,1378 ----
    std::vector<std::unique_ptr<range_label>> m_labels;
    std::vector<std::unique_ptr<impl_rule>> m_rules;
    std::unique_ptr<diagnostic_execution_path> m_path;
+   int m_nesting_level;
  };
  
  static enum diagnostics::kind
*************** GCC_DIAGNOSTIC_PUSH_IGNORED(-Wsuggest-at
*** 1624,1631 ****
  GCC_DIAGNOSTIC_POP
      info.m_metadata = diag.get_metadata ();
      info.m_x_data = &diag;
      diagnostic_report_diagnostic (&m_dc, &info);
! 
      m_dc.end_group ();
    }
  
--- 1662,1670 ----
  GCC_DIAGNOSTIC_POP
      info.m_metadata = diag.get_metadata ();
      info.m_x_data = &diag;
+     m_dc.set_nesting_level (diag.get_nesting_level ());
      diagnostic_report_diagnostic (&m_dc, &info);
!     m_dc.set_nesting_level (0);
      m_dc.end_group ();
    }
  
*************** diagnostic_manager_debug_dump_file (diag
*** 1900,1906 ****
  	fprintf (out, ", sarif_source_language=\"%s\"",
  		 file->get_sarif_source_language ());
        if (const content_buffer *buf = file->get_content ())
! 	fprintf (out, ", content=(size=%zi)", buf->m_sz);
        fprintf (out, ")");
      }
    else
--- 1939,1946 ----
  	fprintf (out, ", sarif_source_language=\"%s\"",
  		 file->get_sarif_source_language ());
        if (const content_buffer *buf = file->get_content ())
! 	fprintf (out, ", content=(size=" HOST_SIZE_T_PRINT_DEC ")",
! 		 buf->m_sz);
        fprintf (out, ")");
      }
    else
*************** private_diagnostic_execution_path_add_ev
*** 2972,2974 ****
--- 3012,3034 ----
  
    return as_diagnostic_event_id (result);
  }
+ 
+ /* Public entrypoint.  */
+ 
+ void
+ diagnostic_manager_set_debug_physical_locations (diagnostic_manager *mgr,
+ 						 int value)
+ {
+   FAIL_IF_NULL (mgr);
+   mgr->set_debug_physical_locations (value);
+ }
+ 
+ /* Private entrypoint.  */
+ 
+ void
+ private_diagnostic_set_nesting_level (diagnostic *diag,
+ 				      int nesting_level)
+ {
+   FAIL_IF_NULL (diag);
+   diag->set_nesting_level (nesting_level);
+ }
diff -Nrcpad gcc-16-20250803/gcc/libgdiagnostics.h gcc-16-20250810/gcc/libgdiagnostics.h
*** gcc-16-20250803/gcc/libgdiagnostics.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/libgdiagnostics.h	Sun Aug 10 22:32:08 2025
*************** diagnostic_node_set_label_via_msg_buf (d
*** 1115,1120 ****
--- 1115,1130 ----
    LIBGDIAGNOSTICS_PARAM_MUST_BE_NON_NULL (1)
    LIBGDIAGNOSTICS_PARAM_CAN_BE_NULL (2);
  
+ /* If non-zero, print debugging information to stderr when
+    creating diagnostic_physical_location instances.
+ 
+    Added in LIBGDIAGNOSTICS_ABI_5.  */
+ #define LIBDIAGNOSTICS_HAVE_diagnostic_manager_set_debug_physical_locations
+ 
+ extern void
+ diagnostic_manager_set_debug_physical_locations (diagnostic_manager *mgr,
+ 						 int value);
+ 
  /* DEFERRED:
     - thread-safety
     - plural forms
diff -Nrcpad gcc-16-20250803/gcc/libgdiagnostics.map gcc-16-20250810/gcc/libgdiagnostics.map
*** gcc-16-20250803/gcc/libgdiagnostics.map	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/libgdiagnostics.map	Sun Aug 10 22:32:08 2025
*************** LIBGDIAGNOSTICS_ABI_4 {
*** 141,143 ****
--- 141,151 ----
      # Private hook used by sarif-replay
      private_diagnostic_execution_path_add_event_3;
  } LIBGDIAGNOSTICS_ABI_3;
+ 
+ LIBGDIAGNOSTICS_ABI_5 {
+   global:
+     diagnostic_manager_set_debug_physical_locations;
+ 
+     # Private hook used by sarif-replay
+     private_diagnostic_set_nesting_level;
+ } LIBGDIAGNOSTICS_ABI_4;
diff -Nrcpad gcc-16-20250803/gcc/libsarifreplay.cc gcc-16-20250810/gcc/libsarifreplay.cc
*** gcc-16-20250803/gcc/libsarifreplay.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/libsarifreplay.cc	Sun Aug 10 22:32:08 2025
*************** sarif_replayer::handle_result_obj (const
*** 1408,1417 ****
--- 1408,1429 ----
  		  rule_obj));
  	      if (!msg_buf.m_inner)
  		return status::err_invalid_sarif;
+ 
  	      auto note (m_output_mgr.begin_diagnostic (DIAGNOSTIC_LEVEL_NOTE));
  	      note.set_location (physical_loc);
  	      note.set_logical_location (logical_loc);
  	      add_any_annotations (note, annotations);
+ 
+ 	      /* Look for "nestingLevel" property, as per
+ 		 "P3358R0 SARIF for Structured Diagnostics"
+ 		 https://wg21.link/P3358R0  */
+ 	      if (auto nesting_level
+ 		  = maybe_get_property_bag_value<json::integer_number>
+ 		  (*location_obj,
+ 		   "nestingLevel"))
+ 		private_diagnostic_set_nesting_level (note.m_inner,
+ 						      nesting_level->get ());
+ 
  	      notes.push_back ({std::move (note), std::move (msg_buf)});
  	    }
  	  else
diff -Nrcpad gcc-16-20250803/gcc/libsarifreplay.h gcc-16-20250810/gcc/libsarifreplay.h
*** gcc-16-20250803/gcc/libsarifreplay.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/libsarifreplay.h	Sun Aug 10 22:32:08 2025
*************** struct replay_options
*** 31,36 ****
--- 31,37 ----
    bool m_echo_file;
    bool m_json_comments;
    bool m_verbose;
+   bool m_debug_physical_locations;
    enum diagnostic_colorize m_diagnostics_colorize;
  };
  
diff -Nrcpad gcc-16-20250803/gcc/lto-wrapper.cc gcc-16-20250810/gcc/lto-wrapper.cc
*** gcc-16-20250803/gcc/lto-wrapper.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/lto-wrapper.cc	Sun Aug 10 22:32:08 2025
*************** merge_and_complain (vec<cl_decoded_optio
*** 320,325 ****
--- 320,328 ----
  	case OPT_fdiagnostics_show_line_numbers:
  	case OPT_fdiagnostics_show_option:
  	case OPT_fdiagnostics_show_location_:
+ 	case OPT_fdiagnostics_show_nesting:
+ 	case OPT_fdiagnostics_show_nesting_locations:
+ 	case OPT_fdiagnostics_show_nesting_levels:
  	case OPT_fshow_column:
  	case OPT_fcommon:
  	case OPT_fgnu_tm:
*************** append_compiler_options (obstack *argv_o
*** 739,744 ****
--- 742,750 ----
  	case OPT_fdiagnostics_show_line_numbers:
  	case OPT_fdiagnostics_show_option:
  	case OPT_fdiagnostics_show_location_:
+ 	case OPT_fdiagnostics_show_nesting:
+ 	case OPT_fdiagnostics_show_nesting_locations:
+ 	case OPT_fdiagnostics_show_nesting_levels:
  	case OPT_fshow_column:
  	case OPT_fPIC:
  	case OPT_fpic:
*************** append_diag_options (obstack *argv_obsta
*** 801,806 ****
--- 807,815 ----
  	case OPT_fdiagnostics_show_line_numbers:
  	case OPT_fdiagnostics_show_option:
  	case OPT_fdiagnostics_show_location_:
+ 	case OPT_fdiagnostics_show_nesting:
+ 	case OPT_fdiagnostics_show_nesting_locations:
+ 	case OPT_fdiagnostics_show_nesting_levels:
  	case OPT_fshow_column:
  	  break;
  	default:
*************** cont:
*** 2265,2277 ****
    obstack_free (&argv_obstack, NULL);
  }
  
! /* Concrete implementation of diagnostic_option_manager for LTO.  */
  
! class lto_diagnostic_option_manager : public gcc_diagnostic_option_manager
  {
  public:
!   lto_diagnostic_option_manager ()
!   : gcc_diagnostic_option_manager (0 /* lang_mask */)
    {
    }
    int option_enabled_p (diagnostics::option_id) const final override
--- 2274,2287 ----
    obstack_free (&argv_obstack, NULL);
  }
  
! /* Concrete implementation of diagnostics::option_id_manager for LTO.  */
  
! class lto_diagnostic_option_id_manager
!   : public gcc_diagnostic_option_id_manager
  {
  public:
!   lto_diagnostic_option_id_manager ()
!   : gcc_diagnostic_option_id_manager (0 /* lang_mask */)
    {
    }
    int option_enabled_p (diagnostics::option_id) const final override
*************** main (int argc, char *argv[])
*** 2307,2314 ****
    diagnostic_initialize (global_dc, 0);
    diagnostic_color_init (global_dc);
    diagnostic_urls_init (global_dc);
!   global_dc->set_option_manager
!     (::make_unique<lto_diagnostic_option_manager> (), 0);
  
    if (atexit (lto_wrapper_cleanup) != 0)
      fatal_error (input_location, "%<atexit%> failed");
--- 2317,2324 ----
    diagnostic_initialize (global_dc, 0);
    diagnostic_color_init (global_dc);
    diagnostic_urls_init (global_dc);
!   global_dc->set_option_id_manager
!     (::make_unique<lto_diagnostic_option_id_manager> (), 0);
  
    if (atexit (lto_wrapper_cleanup) != 0)
      fatal_error (input_location, "%<atexit%> failed");
diff -Nrcpad gcc-16-20250803/gcc/match.pd gcc-16-20250810/gcc/match.pd
*** gcc-16-20250803/gcc/match.pd	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/match.pd	Sun Aug 10 22:32:08 2025
*************** DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
*** 5508,5523 ****
     (convert @0)))
  
  /* Strip inner integral conversions that do not change precision or size, or
!    zero-extend while keeping the same size (for bool-to-char).  */
  (simplify
    (view_convert (convert@0 @1))
    (if ((INTEGRAL_TYPE_P (TREE_TYPE (@0)) || POINTER_TYPE_P (TREE_TYPE (@0)))
         && (INTEGRAL_TYPE_P (TREE_TYPE (@1)) || POINTER_TYPE_P (TREE_TYPE (@1)))
         && TYPE_SIZE (TREE_TYPE (@0)) == TYPE_SIZE (TREE_TYPE (@1))
         && (TYPE_PRECISION (TREE_TYPE (@0)) == TYPE_PRECISION (TREE_TYPE (@1))
  	   || (TYPE_PRECISION (TREE_TYPE (@0)) > TYPE_PRECISION (TREE_TYPE (@1))
  	       && TYPE_UNSIGNED (TREE_TYPE (@1)))))
!    (view_convert @1)))
  
  /* Simplify a view-converted empty or single-element constructor.  */
  (simplify
--- 5508,5538 ----
     (convert @0)))
  
  /* Strip inner integral conversions that do not change precision or size, or
!    zero-extend while keeping the same size (for bool-to-char).
!    However, keep this conversion if the result is an extended _BitInt,
!    since it may rely on this conversion to extend properly.  */
! 
  (simplify
    (view_convert (convert@0 @1))
+   (with {
+     bool extended_bitint = false;
+     if (BITINT_TYPE_P (TREE_TYPE (@0)))
+       {
+ 	struct bitint_info info;
+ 	extended_bitint
+ 	  = targetm.c.bitint_type_info (TYPE_PRECISION (TREE_TYPE (@0)),
+ 							&info);
+ 	extended_bitint = extended_bitint && info.extended;
+       }
+    }
    (if ((INTEGRAL_TYPE_P (TREE_TYPE (@0)) || POINTER_TYPE_P (TREE_TYPE (@0)))
         && (INTEGRAL_TYPE_P (TREE_TYPE (@1)) || POINTER_TYPE_P (TREE_TYPE (@1)))
+        && !extended_bitint
         && TYPE_SIZE (TREE_TYPE (@0)) == TYPE_SIZE (TREE_TYPE (@1))
         && (TYPE_PRECISION (TREE_TYPE (@0)) == TYPE_PRECISION (TREE_TYPE (@1))
  	   || (TYPE_PRECISION (TREE_TYPE (@0)) > TYPE_PRECISION (TREE_TYPE (@1))
  	       && TYPE_UNSIGNED (TREE_TYPE (@1)))))
!    (view_convert @1))))
  
  /* Simplify a view-converted empty or single-element constructor.  */
  (simplify
diff -Nrcpad gcc-16-20250803/gcc/omp-low.cc gcc-16-20250810/gcc/omp-low.cc
*** gcc-16-20250803/gcc/omp-low.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/omp-low.cc	Sun Aug 10 22:32:08 2025
*************** lower_omp_taskreg (gimple_stmt_iterator
*** 12651,12656 ****
--- 12651,12713 ----
      }
  }
  
+  /* Set EXPR as the hostaddr expression that should result from the clause C
+     in the target statement STMT.  Returns the tree that should be
+     passed as the hostaddr (a pointer to the array containing the expanded
+     hostaddrs and sizes of the clause).  */
+ 
+ static tree
+ lower_omp_map_iterator_expr (tree expr, tree c, gomp_target *stmt)
+ {
+   if (!OMP_CLAUSE_HAS_ITERATORS (c))
+     return expr;
+ 
+   tree iterator = OMP_CLAUSE_ITERATORS (c);
+   tree elems = TREE_VEC_ELT (iterator, 7);
+   tree index = TREE_VEC_ELT (iterator, 8);
+   gimple_seq *loop_body_p = enter_omp_iterator_loop_context (c, stmt);
+ 
+    /* IN LOOP BODY:  */
+    /* elems[idx] = <expr>;  */
+   tree lhs = build4 (ARRAY_REF, ptr_type_node, elems, index,
+ 		     NULL_TREE, NULL_TREE);
+   tree mod_expr = build2_loc (OMP_CLAUSE_LOCATION (c), MODIFY_EXPR,
+ 			      void_type_node, lhs, expr);
+   gimplify_and_add (mod_expr, loop_body_p);
+   exit_omp_iterator_loop_context (c);
+ 
+   return build_fold_addr_expr_with_type (elems, ptr_type_node);
+ }
+ 
+ /* Set SIZE as the size expression that should result from the clause C
+    in the target statement STMT.  Returns the tree that should be
+    passed as the clause size (a size_int with the value SIZE_MAX, indicating
+    that the clause uses an iterator).  */
+ 
+ static tree
+ lower_omp_map_iterator_size (tree size, tree c, gomp_target *stmt)
+ {
+   if (!OMP_CLAUSE_HAS_ITERATORS (c))
+     return size;
+ 
+   tree iterator = OMP_CLAUSE_ITERATORS (c);
+   tree elems = TREE_VEC_ELT (iterator, 7);
+   tree index = TREE_VEC_ELT (iterator, 8);
+   gimple_seq *loop_body_p = enter_omp_iterator_loop_context (c, stmt);
+ 
+   /* IN LOOP BODY:  */
+   /* elems[idx+1] = <size>;  */
+   tree lhs = build4 (ARRAY_REF, ptr_type_node, elems,
+ 		     size_binop (PLUS_EXPR, index, size_int (1)),
+ 		     NULL_TREE, NULL_TREE);
+   tree mod_expr = build2_loc (OMP_CLAUSE_LOCATION (c), MODIFY_EXPR,
+ 			      void_type_node, lhs, size);
+   gimplify_and_add (mod_expr, loop_body_p);
+   exit_omp_iterator_loop_context (c);
+ 
+   return size_int (SIZE_MAX);
+ }
+ 
  /* Lower the GIMPLE_OMP_TARGET in the current statement
     in GSI_P.  CTX holds context information for the directive.  */
  
*************** lower_omp_target (gimple_stmt_iterator *
*** 12820,12825 ****
--- 12877,12887 ----
  	    deep_map_cnt = extra;
  	}
  
+ 	if (deep_map_cnt
+ 	    && OMP_CLAUSE_HAS_ITERATORS (c))
+ 	  sorry ("iterators used together with deep mapping are not "
+ 		 "supported yet");
+ 
  	if (!DECL_P (var))
  	  {
  	    if (OMP_CLAUSE_CODE (c) != OMP_CLAUSE_MAP
*************** lower_omp_target (gimple_stmt_iterator *
*** 13234,13239 ****
--- 13296,13302 ----
  			  *p = build_fold_indirect_ref (nd);
  		      }
  		    v = build_fold_addr_expr_with_type (v, ptr_type_node);
+ 		    v = lower_omp_map_iterator_expr (v, c, stmt);
  		    gimplify_assign (x, v, &ilist);
  		    nc = NULL_TREE;
  		  }
*************** lower_omp_target (gimple_stmt_iterator *
*** 13307,13318 ****
  		    && TREE_CODE (TREE_TYPE (ovar)) == ARRAY_TYPE)
  		  {
  		    gcc_assert (offloaded);
! 		    tree avar
! 		      = create_tmp_var (TREE_TYPE (TREE_TYPE (x)));
! 		    mark_addressable (avar);
! 		    gimplify_assign (avar, build_fold_addr_expr (var), &ilist);
! 		    talign = DECL_ALIGN_UNIT (avar);
  		    avar = build_fold_addr_expr (avar);
  		    gimplify_assign (x, avar, &ilist);
  		  }
  		else if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_FIRSTPRIVATE)
--- 13370,13386 ----
  		    && TREE_CODE (TREE_TYPE (ovar)) == ARRAY_TYPE)
  		  {
  		    gcc_assert (offloaded);
! 		    tree avar = build_fold_addr_expr (var);
! 		    if (!OMP_CLAUSE_ITERATORS (c))
! 		      {
! 			tree tmp = create_tmp_var (TREE_TYPE (TREE_TYPE (x)));
! 			mark_addressable (tmp);
! 			gimplify_assign (tmp, avar, &ilist);
! 			avar = tmp;
! 		      }
! 		    talign = TYPE_ALIGN_UNIT (TREE_TYPE (TREE_TYPE (x)));
  		    avar = build_fold_addr_expr (avar);
+ 		    avar = lower_omp_map_iterator_expr (avar, c, stmt);
  		    gimplify_assign (x, avar, &ilist);
  		  }
  		else if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_FIRSTPRIVATE)
*************** lower_omp_target (gimple_stmt_iterator *
*** 13392,13397 ****
--- 13460,13466 ----
  	    if (s == NULL_TREE)
  	      s = TYPE_SIZE_UNIT (TREE_TYPE (ovar));
  	    s = fold_convert (size_type_node, s);
+ 	    s = lower_omp_map_iterator_size (s, c, stmt);
  	    purpose = size_int (map_idx++);
  	    CONSTRUCTOR_APPEND_ELT (vsize, purpose, s);
  	    if (TREE_CODE (s) != INTEGER_CST)
*************** lower_omp_target (gimple_stmt_iterator *
*** 14324,14329 ****
--- 14393,14401 ----
        gimple_omp_set_body (stmt, new_body);
      }
  
+   gsi_insert_seq_before (gsi_p, gimple_omp_target_iterator_loops (stmt),
+ 			 GSI_SAME_STMT);
+   gimple_omp_target_set_iterator_loops (stmt, NULL);
    bind = gimple_build_bind (NULL, NULL,
  			    tgt_bind ? gimple_bind_block (tgt_bind)
  				     : NULL_TREE);
diff -Nrcpad gcc-16-20250803/gcc/opt-problem.cc gcc-16-20250810/gcc/opt-problem.cc
*** gcc-16-20250803/gcc/opt-problem.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/opt-problem.cc	Sun Aug 10 22:32:08 2025
*************** along with GCC; see the file COPYING3.
*** 42,48 ****
  
  opt_problem::opt_problem (const dump_location_t &loc,
  			  const char *fmt, va_list *ap)
! : m_optinfo (loc, OPTINFO_KIND_FAILURE, current_pass)
  {
    /* We shouldn't be bothering to construct these objects if
       dumping isn't enabled.  */
--- 42,48 ----
  
  opt_problem::opt_problem (const dump_location_t &loc,
  			  const char *fmt, va_list *ap)
! : m_optinfo (loc, optinfo::kind::failure, current_pass)
  {
    /* We shouldn't be bothering to construct these objects if
       dumping isn't enabled.  */
diff -Nrcpad gcc-16-20250803/gcc/optinfo-emit-json.cc gcc-16-20250810/gcc/optinfo-emit-json.cc
*** gcc-16-20250803/gcc/optinfo-emit-json.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/optinfo-emit-json.cc	Sun Aug 10 22:32:08 2025
*************** optrecord_json_writer::add_record (const
*** 143,149 ****
    add_record (obj);
  
    /* Potentially push the scope.  */
!   if (optinfo->get_kind () == OPTINFO_KIND_SCOPE)
      {
        json::array *children = new json::array ();
        obj->set ("children", children);
--- 143,149 ----
    add_record (obj);
  
    /* Potentially push the scope.  */
!   if (optinfo->get_kind () == optinfo::kind::scope)
      {
        json::array *children = new json::array ();
        obj->set ("children", children);
*************** optrecord_json_writer::optinfo_to_json (
*** 334,340 ****
    obj->set ("impl_location",
  	    impl_location_to_json (optinfo->get_impl_location ()));
  
!   const char *kind_str = optinfo_kind_to_string (optinfo->get_kind ());
    obj->set_string ("kind", kind_str);
    json::array *message = new json::array ();
    obj->set ("message", message);
--- 334,340 ----
    obj->set ("impl_location",
  	    impl_location_to_json (optinfo->get_impl_location ()));
  
!   const char *kind_str = optinfo::kind_to_string (optinfo->get_kind ());
    obj->set_string ("kind", kind_str);
    json::array *message = new json::array ();
    obj->set ("message", message);
*************** optrecord_json_writer::optinfo_to_json (
*** 345,356 ****
  	{
  	default:
  	  gcc_unreachable ();
! 	case OPTINFO_ITEM_KIND_TEXT:
  	  {
  	    message->append_string (item->get_text ());
  	  }
  	  break;
! 	case OPTINFO_ITEM_KIND_TREE:
  	  {
  	    json::object *json_item = new json::object ();
  	    json_item->set_string ("expr", item->get_text ());
--- 345,356 ----
  	{
  	default:
  	  gcc_unreachable ();
! 	case optinfo_item::kind::text:
  	  {
  	    message->append_string (item->get_text ());
  	  }
  	  break;
! 	case optinfo_item::kind::tree:
  	  {
  	    json::object *json_item = new json::object ();
  	    json_item->set_string ("expr", item->get_text ());
*************** optrecord_json_writer::optinfo_to_json (
*** 363,369 ****
  	    message->append (json_item);
  	  }
  	  break;
! 	case OPTINFO_ITEM_KIND_GIMPLE:
  	  {
  	    json::object *json_item = new json::object ();
  	    json_item->set_string ("stmt", item->get_text ());
--- 363,369 ----
  	    message->append (json_item);
  	  }
  	  break;
! 	case optinfo_item::kind::gimple:
  	  {
  	    json::object *json_item = new json::object ();
  	    json_item->set_string ("stmt", item->get_text ());
*************** optrecord_json_writer::optinfo_to_json (
*** 376,382 ****
  	    message->append (json_item);
  	  }
  	  break;
! 	case OPTINFO_ITEM_KIND_SYMTAB_NODE:
  	  {
  	    json::object *json_item = new json::object ();
  	    json_item->set_string ("symtab_node", item->get_text ());
--- 376,382 ----
  	    message->append (json_item);
  	  }
  	  break;
! 	case optinfo_item::kind::symtab_node:
  	  {
  	    json::object *json_item = new json::object ();
  	    json_item->set_string ("symtab_node", item->get_text ());
diff -Nrcpad gcc-16-20250803/gcc/optinfo.cc gcc-16-20250810/gcc/optinfo.cc
*** gcc-16-20250803/gcc/optinfo.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/optinfo.cc	Sun Aug 10 22:32:08 2025
*************** along with GCC; see the file COPYING3.
*** 36,44 ****
  
  /* optinfo_item's ctor.  Takes ownership of TEXT.  */
  
! optinfo_item::optinfo_item (enum optinfo_item_kind kind, location_t location,
  			    char *text)
! : m_kind (kind), m_location (location), m_text (text)
  {
  }
  
--- 36,44 ----
  
  /* optinfo_item's ctor.  Takes ownership of TEXT.  */
  
! optinfo_item::optinfo_item (enum kind kind_, location_t location,
  			    char *text)
! : m_kind (kind_), m_location (location), m_text (text)
  {
  }
  
*************** optinfo_item::~optinfo_item ()
*** 52,70 ****
  /* Get a string from KIND.  */
  
  const char *
! optinfo_kind_to_string (enum optinfo_kind kind)
  {
!   switch (kind)
      {
      default:
        gcc_unreachable ();
!     case OPTINFO_KIND_SUCCESS:
        return "success";
!     case OPTINFO_KIND_FAILURE:
        return "failure";
!     case OPTINFO_KIND_NOTE:
        return "note";
!     case OPTINFO_KIND_SCOPE:
        return "scope";
      }
  }
--- 52,70 ----
  /* Get a string from KIND.  */
  
  const char *
! optinfo::kind_to_string (enum kind kind_)
  {
!   switch (kind_)
      {
      default:
        gcc_unreachable ();
!     case kind::success:
        return "success";
!     case kind::failure:
        return "failure";
!     case kind::note:
        return "note";
!     case kind::scope:
        return "scope";
      }
  }
*************** optinfo::add_item (std::unique_ptr<optin
*** 91,109 ****
  
  /* Get MSG_* flags corresponding to KIND.  */
  
! static dump_flags_t
! optinfo_kind_to_dump_flag (enum optinfo_kind kind)
  {
!   switch (kind)
      {
      default:
        gcc_unreachable ();
!     case OPTINFO_KIND_SUCCESS:
        return MSG_OPTIMIZED_LOCATIONS;
!     case OPTINFO_KIND_FAILURE:
        return MSG_MISSED_OPTIMIZATION;
!     case OPTINFO_KIND_NOTE:
!     case OPTINFO_KIND_SCOPE:
        return MSG_NOTE;
      }
  }
--- 91,109 ----
  
  /* Get MSG_* flags corresponding to KIND.  */
  
! dump_flags_t
! optinfo::kind_to_dump_flag (enum kind kind_)
  {
!   switch (kind_)
      {
      default:
        gcc_unreachable ();
!     case kind::success:
        return MSG_OPTIMIZED_LOCATIONS;
!     case kind::failure:
        return MSG_MISSED_OPTIMIZATION;
!     case kind::note:
!     case kind::scope:
        return MSG_NOTE;
      }
  }
*************** optinfo_kind_to_dump_flag (enum optinfo_
*** 114,120 ****
  void
  optinfo::emit_for_opt_problem () const
  {
!   dump_flags_t dump_kind = optinfo_kind_to_dump_flag (get_kind ());
    dump_kind |= MSG_PRIORITY_REEMITTED;
  
    /* Re-emit to "immediate" destinations, without creating a new optinfo.  */
--- 114,120 ----
  void
  optinfo::emit_for_opt_problem () const
  {
!   dump_flags_t dump_kind = kind_to_dump_flag (get_kind ());
    dump_kind |= MSG_PRIORITY_REEMITTED;
  
    /* Re-emit to "immediate" destinations, without creating a new optinfo.  */
*************** void
*** 134,147 ****
  optinfo::handle_dump_file_kind (dump_flags_t dump_kind)
  {
    /* Any optinfo for a "scope" should have been emitted separately.  */
!   gcc_assert (m_kind != OPTINFO_KIND_SCOPE);
  
    if (dump_kind & MSG_OPTIMIZED_LOCATIONS)
!     m_kind = OPTINFO_KIND_SUCCESS;
    else if (dump_kind & MSG_MISSED_OPTIMIZATION)
!     m_kind = OPTINFO_KIND_FAILURE;
    else if (dump_kind & MSG_NOTE)
!     m_kind = OPTINFO_KIND_NOTE;
  }
  
  /* Return true if any of the active optinfo destinations make use
--- 134,147 ----
  optinfo::handle_dump_file_kind (dump_flags_t dump_kind)
  {
    /* Any optinfo for a "scope" should have been emitted separately.  */
!   gcc_assert (m_kind != kind::scope);
  
    if (dump_kind & MSG_OPTIMIZED_LOCATIONS)
!     m_kind = kind::success;
    else if (dump_kind & MSG_MISSED_OPTIMIZATION)
!     m_kind = kind::failure;
    else if (dump_kind & MSG_NOTE)
!     m_kind = kind::note;
  }
  
  /* Return true if any of the active optinfo destinations make use
diff -Nrcpad gcc-16-20250803/gcc/optinfo.h gcc-16-20250810/gcc/optinfo.h
*** gcc-16-20250803/gcc/optinfo.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/optinfo.h	Sun Aug 10 22:32:08 2025
*************** class optinfo_item;
*** 74,91 ****
  
  extern bool optinfo_wants_inlining_info_p ();
  
- /* The various kinds of optinfo.  */
- 
- enum optinfo_kind
- {
-   OPTINFO_KIND_SUCCESS,
-   OPTINFO_KIND_FAILURE,
-   OPTINFO_KIND_NOTE,
-   OPTINFO_KIND_SCOPE
- };
- 
- extern const char *optinfo_kind_to_string (enum optinfo_kind kind);
- 
  class dump_context;
  
  /* A bundle of information describing part of an optimization.  */
--- 74,79 ----
*************** class optinfo
*** 95,104 ****
    friend class dump_context;
  
   public:
    optinfo (const dump_location_t &loc,
! 	   enum optinfo_kind kind,
  	   opt_pass *pass)
!   : m_loc (loc), m_kind (kind), m_pass (pass), m_items ()
    {}
    ~optinfo ();
  
--- 83,101 ----
    friend class dump_context;
  
   public:
+   /* The various kinds of optinfo.  */
+   enum class kind
+   {
+     success,
+     failure,
+     note,
+     scope
+   };
+ 
    optinfo (const dump_location_t &loc,
! 	   enum kind kind_,
  	   opt_pass *pass)
!   : m_loc (loc), m_kind (kind_), m_pass (pass), m_items ()
    {}
    ~optinfo ();
  
*************** class optinfo
*** 111,117 ****
    const dump_impl_location_t &
    get_impl_location () const { return m_loc.get_impl_location (); }
  
!   enum optinfo_kind get_kind () const { return m_kind; }
    opt_pass *get_pass () const { return m_pass; }
    unsigned int num_items () const { return m_items.length (); }
    const optinfo_item *get_item (unsigned int i) const { return m_items[i]; }
--- 108,114 ----
    const dump_impl_location_t &
    get_impl_location () const { return m_loc.get_impl_location (); }
  
!   enum kind get_kind () const { return m_kind; }
    opt_pass *get_pass () const { return m_pass; }
    unsigned int num_items () const { return m_items.length (); }
    const optinfo_item *get_item (unsigned int i) const { return m_items[i]; }
*************** class optinfo
*** 123,128 ****
--- 120,128 ----
  
    void emit_for_opt_problem () const;
  
+   static const char *kind_to_string (enum kind k);
+   static dump_flags_t kind_to_dump_flag (enum kind k);
+ 
   private:
    /* Pre-canned ways of manipulating the optinfo, for use by friend class
       dump_context.  */
*************** class optinfo
*** 130,166 ****
  
   private:
    dump_location_t m_loc;
!   enum optinfo_kind m_kind;
    opt_pass *m_pass;
    auto_vec <optinfo_item *> m_items;
  };
  
- /* An enum for discriminating between different kinds of optinfo_item.  */
- 
- enum optinfo_item_kind
- {
-   OPTINFO_ITEM_KIND_TEXT,
-   OPTINFO_ITEM_KIND_TREE,
-   OPTINFO_ITEM_KIND_GIMPLE,
-   OPTINFO_ITEM_KIND_SYMTAB_NODE
- };
- 
  /* An item within an optinfo.  */
  
  class optinfo_item
  {
   public:
!   optinfo_item (enum optinfo_item_kind kind, location_t location,
  		char *text);
    ~optinfo_item ();
  
!   enum optinfo_item_kind get_kind () const { return m_kind; }
    location_t get_location () const { return m_location; }
    const char *get_text () const { return m_text; }
  
   private:
    /* Metadata (e.g. for optimization records).  */
!   enum optinfo_item_kind m_kind;
    location_t m_location;
  
    /* The textual form of the item, owned by the item.  */
--- 130,165 ----
  
   private:
    dump_location_t m_loc;
!   enum kind m_kind;
    opt_pass *m_pass;
    auto_vec <optinfo_item *> m_items;
  };
  
  /* An item within an optinfo.  */
  
  class optinfo_item
  {
   public:
!   /* An enum for discriminating between different kinds of optinfo_item.  */
!   enum class kind
!   {
!     text,
!     tree,
!     gimple,
!     symtab_node
!   };
! 
!   optinfo_item (enum kind kind_, location_t location,
  		char *text);
    ~optinfo_item ();
  
!   enum kind get_kind () const { return m_kind; }
    location_t get_location () const { return m_location; }
    const char *get_text () const { return m_text; }
  
   private:
    /* Metadata (e.g. for optimization records).  */
!   enum kind m_kind;
    location_t m_location;
  
    /* The textual form of the item, owned by the item.  */
diff -Nrcpad gcc-16-20250803/gcc/opts-common.cc gcc-16-20250810/gcc/opts-common.cc
*** gcc-16-20250803/gcc/opts-common.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/opts-common.cc	Sun Aug 10 22:32:08 2025
*************** decode_cmdline_options_to_array (unsigne
*** 1096,1102 ****
  	    "-fdiagnostics-urls=never",
  	    "-fdiagnostics-path-format=separate-events",
  	    "-fdiagnostics-text-art-charset=none",
! 	    "-fno-diagnostics-show-event-links"
  	    /* We don't put "-fno-diagnostics-show-highlight-colors" here
  	       as -fdiagnostics-color=never makes it redundant.  */
  	  };
--- 1096,1103 ----
  	    "-fdiagnostics-urls=never",
  	    "-fdiagnostics-path-format=separate-events",
  	    "-fdiagnostics-text-art-charset=none",
! 	    "-fno-diagnostics-show-event-links",
! 	    "-fno-diagnostics-show-nesting"
  	    /* We don't put "-fno-diagnostics-show-highlight-colors" here
  	       as -fdiagnostics-color=never makes it redundant.  */
  	  };
*************** option_enabled (int opt_idx, unsigned la
*** 1876,1882 ****
  }
  
  int
! compiler_diagnostic_option_manager::
  option_enabled_p (diagnostics::option_id opt_id) const
  {
    return option_enabled (opt_id.m_idx, m_lang_mask, m_opts);
--- 1877,1883 ----
  }
  
  int
! compiler_diagnostic_option_id_manager::
  option_enabled_p (diagnostics::option_id opt_id) const
  {
    return option_enabled (opt_id.m_idx, m_lang_mask, m_opts);
diff -Nrcpad gcc-16-20250803/gcc/opts-diagnostic.h gcc-16-20250810/gcc/opts-diagnostic.h
*** gcc-16-20250803/gcc/opts-diagnostic.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/opts-diagnostic.h	Sun Aug 10 22:32:08 2025
*************** along with GCC; see the file COPYING3.
*** 20,49 ****
  #ifndef GCC_OPTS_DIAGNOSTIC_H
  #define GCC_OPTS_DIAGNOSTIC_H
  
! /* Abstract subclass of diagnostics::option_manager for gcc options.  */
  
! class gcc_diagnostic_option_manager : public diagnostics::option_manager
  {
  public:
    char *make_option_url (diagnostics::option_id option_id) const final override;
  
  protected:
!   gcc_diagnostic_option_manager (unsigned lang_mask)
    : m_lang_mask (lang_mask)
    {}
  
    unsigned m_lang_mask;
  };
  
! /* Concrete implementation of diagnostic_option_manager for compiler.  */
  
! class compiler_diagnostic_option_manager : public gcc_diagnostic_option_manager
  {
  public:
!   compiler_diagnostic_option_manager (const diagnostics::context &context,
! 				      unsigned lang_mask,
! 				      void *opts)
!   : gcc_diagnostic_option_manager (lang_mask),
      m_context (context),
      m_opts (opts)
    {
--- 20,50 ----
  #ifndef GCC_OPTS_DIAGNOSTIC_H
  #define GCC_OPTS_DIAGNOSTIC_H
  
! /* Abstract subclass of diagnostics::option_id_manager for gcc options.  */
  
! class gcc_diagnostic_option_id_manager : public diagnostics::option_id_manager
  {
  public:
    char *make_option_url (diagnostics::option_id option_id) const final override;
  
  protected:
!   gcc_diagnostic_option_id_manager (unsigned lang_mask)
    : m_lang_mask (lang_mask)
    {}
  
    unsigned m_lang_mask;
  };
  
! /* Concrete implementation of diagnostics::option_id_manager for compiler.  */
  
! class compiler_diagnostic_option_id_manager
!   : public gcc_diagnostic_option_id_manager
  {
  public:
!   compiler_diagnostic_option_id_manager (const diagnostics::context &context,
! 					 unsigned lang_mask,
! 					 void *opts)
!   : gcc_diagnostic_option_id_manager (lang_mask),
      m_context (context),
      m_opts (opts)
    {
diff -Nrcpad gcc-16-20250803/gcc/opts.cc gcc-16-20250810/gcc/opts.cc
*** gcc-16-20250803/gcc/opts.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/opts.cc	Sun Aug 10 22:32:08 2025
*************** common_handle_option (struct gcc_options
*** 3016,3026 ****
        break;
  
      case OPT_fdiagnostics_column_unit_:
!       dc->m_column_unit = (enum diagnostics_column_unit)value;
        break;
  
      case OPT_fdiagnostics_column_origin_:
!       dc->m_column_origin = value;
        break;
  
      case OPT_fdiagnostics_escape_format_:
--- 3016,3027 ----
        break;
  
      case OPT_fdiagnostics_column_unit_:
!       dc->get_column_options ().m_column_unit
! 	= (enum diagnostics_column_unit)value;
        break;
  
      case OPT_fdiagnostics_column_origin_:
!       dc->get_column_options ().m_column_origin = value;
        break;
  
      case OPT_fdiagnostics_escape_format_:
*************** common_handle_option (struct gcc_options
*** 3051,3056 ****
--- 3052,3069 ----
        dc->set_show_option_requested (value);
        break;
  
+     case OPT_fdiagnostics_show_nesting:
+       dc->set_show_nesting (value);
+       break;
+ 
+     case OPT_fdiagnostics_show_nesting_locations:
+       dc->set_show_nesting_locations (value);
+       break;
+ 
+     case OPT_fdiagnostics_show_nesting_levels:
+       dc->set_show_nesting_levels (value);
+       break;
+ 
      case OPT_fdiagnostics_minimum_margin_width_:
        dc->get_source_printing_options ().min_margin_width = value;
        break;
*************** common_handle_option (struct gcc_options
*** 3408,3414 ****
      case OPT_ftabstop_:
        /* It is documented that we silently ignore silly values.  */
        if (value >= 1 && value <= 100)
! 	dc->m_tabstop = value;
        break;
  
      case OPT_freport_bug:
--- 3421,3427 ----
      case OPT_ftabstop_:
        /* It is documented that we silently ignore silly values.  */
        if (value >= 1 && value <= 100)
! 	dc->get_column_options ().m_tabstop = value;
        break;
  
      case OPT_freport_bug:
*************** enable_warning_as_error (const char *arg
*** 3744,3750 ****
     as -Werror.  */
  
  char *
! compiler_diagnostic_option_manager::
  make_option_name (diagnostics::option_id option_id,
  		  enum diagnostics::kind orig_diag_kind,
  		  enum diagnostics::kind diag_kind) const
--- 3757,3763 ----
     as -Werror.  */
  
  char *
! compiler_diagnostic_option_id_manager::
  make_option_name (diagnostics::option_id option_id,
  		  enum diagnostics::kind orig_diag_kind,
  		  enum diagnostics::kind diag_kind) const
*************** get_option_url_suffix (int option_index,
*** 3823,3829 ****
     which enabled a diagnostic.  */
  
  char *
! gcc_diagnostic_option_manager::
  make_option_url (diagnostics::option_id option_id) const
  {
    if (option_id.m_idx)
--- 3836,3842 ----
     which enabled a diagnostic.  */
  
  char *
! gcc_diagnostic_option_id_manager::
  make_option_url (diagnostics::option_id option_id) const
  {
    if (option_id.m_idx)
*************** gen_command_line_string (cl_decoded_opti
*** 3879,3884 ****
--- 3892,3900 ----
        case OPT_fdiagnostics_show_line_numbers:
        case OPT_fdiagnostics_color_:
        case OPT_fdiagnostics_format_:
+       case OPT_fdiagnostics_show_nesting:
+       case OPT_fdiagnostics_show_nesting_locations:
+       case OPT_fdiagnostics_show_nesting_levels:
        case OPT_fverbose_asm:
        case OPT____:
        case OPT__sysroot_:
diff -Nrcpad gcc-16-20250803/gcc/output.h gcc-16-20250810/gcc/output.h
*** gcc-16-20250803/gcc/output.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/output.h	Sun Aug 10 22:32:08 2025
*************** extern GTY(()) section *bss_noswitch_sec
*** 545,552 ****
  extern GTY(()) section *in_section;
  extern GTY(()) bool in_cold_section_p;
  
! /* MAX bit alignment for mergable sections. */
! #define MAX_ALIGN_MERGABLE 256
  
  extern section *get_unnamed_section (unsigned int, void (*) (const char *),
  				     const char *);
--- 545,552 ----
  extern GTY(()) section *in_section;
  extern GTY(()) bool in_cold_section_p;
  
! /* MAX size for mergeable sections in bits. */
! #define MAX_MERGEABLE_BITSIZE 256
  
  extern section *get_unnamed_section (unsigned int, void (*) (const char *),
  				     const char *);
diff -Nrcpad gcc-16-20250803/gcc/pretty-print.cc gcc-16-20250810/gcc/pretty-print.cc
*** gcc-16-20250803/gcc/pretty-print.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/pretty-print.cc	Sun Aug 10 22:32:08 2025
*************** along with GCC; see the file COPYING3.
*** 29,34 ****
--- 29,35 ----
  #include "pretty-print-urlifier.h"
  #include "diagnostics/color.h"
  #include "diagnostics/event-id.h"
+ #include "diagnostics/dumping.h"
  #include "diagnostic-highlight-colors.h"
  #include "auto-obstack.h"
  #include "selftest.h"
*************** pp_formatted_chunks::dump (FILE *out, in
*** 1600,1608 ****
  {
    for (size_t idx = 0; m_args[idx]; ++idx)
      {
!       fprintf (out, "%*s%i: ",
! 	       indent, "",
! 	       (int)idx);
        m_args[idx]->dump (out);
      }
  }
--- 1601,1608 ----
  {
    for (size_t idx = 0; m_args[idx]; ++idx)
      {
!       diagnostics::dumping::emit_indent (out, indent);
!       fprintf (out, "%i: ", (int)idx);
        m_args[idx]->dump (out);
      }
  }
*************** pretty_printer::end_url ()
*** 3100,3133 ****
      pp_string (this, get_end_url_string (this));
  }
  
! /* Dump state of this pretty_printer to OUT, for debugging.  */
! 
! void
! pretty_printer::dump (FILE *out, int indent) const
  {
!   fprintf (out, "%*sm_show_color: %s\n",
! 	   indent, "",
! 	   m_show_color ? "true" : "false");
! 
!   fprintf (out, "%*sm_url_format: ", indent, "");
!   switch (m_url_format)
      {
      case URL_FORMAT_NONE:
!       fprintf (out, "none");
!       break;
      case URL_FORMAT_ST:
!       fprintf (out, "st");
!       break;
      case URL_FORMAT_BEL:
!       fprintf (out, "bel");
!       break;
      default:
        gcc_unreachable ();
      }
!   fprintf (out, "\n");
  
!   fprintf (out, "%*sm_buffer:\n", indent, "");
!   m_buffer->dump (out, indent + 2);
  }
  
  /* class pp_markup::context.  */
--- 3100,3138 ----
      pp_string (this, get_end_url_string (this));
  }
  
! static const char *
! get_url_format_as_string (diagnostic_url_format url_format)
  {
!   switch (url_format)
      {
      case URL_FORMAT_NONE:
!       return "none";
      case URL_FORMAT_ST:
!       return "st";
      case URL_FORMAT_BEL:
!       return "bel";
      default:
        gcc_unreachable ();
      }
! }
  
! /* Dump state of this pretty_printer to OUT, for debugging.  */
! 
! void
! pretty_printer::dump (FILE *outfile, int indent) const
! {
!   namespace dumping = diagnostics::dumping;
! 
!   DIAGNOSTICS_DUMPING_EMIT_BOOL_FIELD (m_show_color);
!   dumping::emit_string_field
!     (outfile, indent,
!      "m_url_format",
!      get_url_format_as_string (m_url_format));
!   dumping::emit_heading (outfile, indent, "m_buffer");
!   if (m_buffer)
!     m_buffer->dump (outfile, indent + 2);
!   else
!     dumping::emit_none (outfile, indent + 2);
  }
  
  /* class pp_markup::context.  */
diff -Nrcpad gcc-16-20250803/gcc/rust/ChangeLog gcc-16-20250810/gcc/rust/ChangeLog
*** gcc-16-20250803/gcc/rust/ChangeLog	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ChangeLog	Sun Aug 10 22:32:08 2025
***************
*** 1,3 ****
--- 1,2391 ----
+ 2025-08-05  Ryutaro Okada  <1015ryu88@gmail.com>
+ 
+ 	* Make-lang.in (rust-readonly-check2.cc):
+ 	Add read-only check on HIR
+ 	* checks/errors/rust-readonly-check2.cc (ReadonlyChecker):
+ 	Add read-only check on HIR
+ 	* checks/errors/rust-readonly-check2.h (ReadonlyChecker):
+ 	Add read-only check on HIR
+ 
+ 2025-08-05  Ryutaro Okada  <1015ryu88@gmail.com>
+ 
+ 	* hir/tree/rust-hir-visitor.cc (DefaultHIRVisitor::walk):
+ 	Call base class's  accept_vis method
+ 
+ 2025-08-05  Ryutaro Okada  <1015ryu88@gmail.com>
+ 
+ 	* hir/tree/rust-hir-visitor.cc (DefaultHIRVisitor::walk):
+ 	Add check before calling  `get_trait_ref()`
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* expand/rust-macro-builtins-helpers.cc
+ 	(try_extract_string_literal_from_fragment): Perform static_cast
+ 	to AST::LiteralExpr only after it's verified that an AST::Expr
+ 	is a literal.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* util/rust-attribute-values.h
+ 	(Attributes::RUSTC_ARGS_REQUIRED_CONST): New constexpr variable.
+ 	* util/rust-attributes.cc (__definitions): New entry for
+ 	RUSTC_ARGS_REQUIRED_CONST.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* ast/rust-ast.cc (AttributeParser::parse_meta_item_inner):
+ 	Handle removal of AttributeParser-specific functions.
+ 	(AttributeParser::parse_path_meta_item): Likewise.
+ 	(AttributeParser::parse_meta_item_seq): Likewise.
+ 	(AttributeParser::parse_meta_item_lit): Likewise.
+ 	(AttributeParser::parse_literal): Remove function.
+ 	(AttributeParser::parse_simple_path): Likewise.
+ 	(AttributeParser::parse_simple_path_segment): Likewise.
+ 	(AttributeParser::peek_token): Likewise.
+ 	(AttributeParser::skip_token): Likewise.
+ 	* ast/rust-macro.h (AttributeParser::parse_simple_path):
+ 	Likewise.
+ 	(AttributeParser::parse_simple_path_segment): Likewise.
+ 	(AttributeParser::parse_literal): Likewise.
+ 	(AttributeParser::peek_token): Likewise.
+ 	(AttributeParser::skip_token): Likewise.
+ 	* parse/rust-parse.h (Parser): Make AttributeParser a friend
+ 	class.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* backend/rust-compile-expr.cc (CompileExpr::visit): Add proper handling
+ 	of the node.
+ 	* rust-backend.h (lookup_field): Declare it.
+ 	* rust-gcc.cc (lookup_field): Add forked implementation from gcc/c/.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* ast/rust-ast.cc (AttributeParser::parse_path_meta_item): Catch
+ 	parse_expr returning nullptr and remove defunct comment.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* Make-lang.in (GRS_OBJS): Add entries.
+ 	* parse/rust-parse-impl.h: Adjust header comment.
+ 	(Parser::parse_lifetime_params_objs): Fix bug and add comment.
+ 	(Parser::unexpected_token): Likewise.
+ 	* parse/rust-parse.h: Remove inclusion of "rust-parse-impl.h".
+ 	* parse/rust-parse-impl-lexer.cc: New file.
+ 	* parse/rust-parse-impl-macro.cc: New file.
+ 	* parse/rust-parse-impl-proc-macro.cc: New file.
+ 
+ 2025-08-05  Ryutaro Okada  <1015ryu88@gmail.com>
+ 
+ 	* hir/rust-ast-lower-implitem.cc (ASTLowerTraitItem::visit):
+ 	Fix object copying issue causing pointer inconsistency
+ 
+ 2025-08-05  Pierre-Emmanuel Patry  <pierre-emmanuel.patry@embecosm.com>
+ 
+ 	* ast/rust-ast.cc (AttributeParser::parse_path_meta_item): Parse
+ 	expression instead of literal. Update variant name.
+ 	(MetaItemPathLit::to_attribute): Remove function.
+ 	(AttributeParser::parse_path_meta_item): Update name.
+ 	(MetaItemPathLit::check_cfg_predicate): Likewise.
+ 	(MetaItemPathExpr::check_cfg_predicate): Likewise.
+ 	(MetaItemPathLit::accept_vis): Likewise.
+ 	(MetaItemPathExpr::accept_vis): Likewise.
+ 	* ast/rust-ast-collector.h: Update prototype and adapt code to new
+ 	expression.
+ 	* ast/rust-ast-collector.cc: Update code to expr.
+ 	* ast/rust-ast-full-decls.h (class MetaItemPathLit): Likewise.
+ 	(class MetaItemPathExpr): Likewise.
+ 	* ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Likewise.
+ 	* ast/rust-ast-visitor.h: Likewise.
+ 	* ast/rust-ast.h (class MetaItemPathLit): Rename class from here...
+ 	(class MetaItemPathExpr): ... to here.
+ 	* ast/rust-expr.h (class MetaItemPathLit): Rename class from here...
+ 	(class MetaItemPathExpr): ...to here.
+ 	* expand/rust-derive.h: Update class name.
+ 	* expand/rust-expand-visitor.cc (ExpandVisitor::visit): Likewise.
+ 	* expand/rust-expand-visitor.h: Likewise.
+ 	* hir/rust-ast-lower-base.cc (ASTLoweringBase::visit): Likewise.
+ 	* hir/rust-ast-lower-base.h: Likewise.
+ 	* resolve/rust-ast-resolve-base.cc (ResolverBase::visit): Likewise.
+ 	* resolve/rust-ast-resolve-base.h: Likewise.
+ 	* resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit):
+ 	Likewise.
+ 	* resolve/rust-early-name-resolver.h: Likewise.
+ 	* util/rust-attributes.cc (AttributeChecker::visit): Likewise.
+ 	* util/rust-attributes.h: Likewise.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* typecheck/rust-tyty-subst.cc (SubstitutionRef::infer_substitions): remove debug
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* typecheck/rust-type-util.cc (unify_site_and): improve debug
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* typecheck/rust-autoderef.cc: remove useless assertion
+ 	* typecheck/rust-coercion.cc (TypeCoercionRules::coerce_unsafe_ptr): refactor
+ 	(TypeCoercionRules::coerce_borrowed_pointer): remove FIXME this is fine
+ 	* typecheck/rust-hir-inherent-impl-overlap.h: use types_compatable
+ 	* typecheck/rust-hir-path-probe.cc (PathProbeType::PathProbeType): remove const
+ 	(PathProbeType::Probe): likewise
+ 	(PathProbeImplTrait::PathProbeImplTrait): likewise
+ 	(PathProbeImplTrait::Probe): likewise
+ 	* typecheck/rust-hir-path-probe.h: likewise
+ 	* typecheck/rust-hir-type-check-base.cc (walk_types_to_constrain): likewise
+ 	* typecheck/rust-hir-type-check-base.h: likewise
+ 	* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): use types_compatable
+ 	* typecheck/rust-hir-type-check.h: remove const
+ 	* typecheck/rust-typecheck-context.cc (TypeCheckContext::insert_associated_impl_mapping):
+ 	likewise
+ 	(TypeCheckContext::lookup_associated_impl_mapping_for_self): remove can_Eq
+ 	* typecheck/rust-tyty-bounds.cc (TypeBoundPredicate::is_equal): likewise
+ 	* typecheck/rust-tyty-subst.cc (SubstitutionArg::get_tyty): remove const version
+ 	* typecheck/rust-tyty-subst.h: likewise
+ 	* typecheck/rust-tyty.cc (BaseType::get_root): likewise
+ 	* typecheck/rust-tyty.h: likewise
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* typecheck/rust-tyty-subst.cc: track the const generic
+ 	* typecheck/rust-tyty.cc (ConstType::is_equal): finish the is_equal
+ 
+ 2025-08-05  Pierre-Emmanuel Patry  <pierre-emmanuel.patry@embecosm.com>
+ 
+ 	* hir/rust-hir-dump.cc (Dump::Dump): Initialize flag.
+ 
+ 2025-08-05  Pierre-Emmanuel Patry  <pierre-emmanuel.patry@embecosm.com>
+ 
+ 	* hir/rust-ast-lower-pattern.cc (ASTLoweringPattern::ASTLoweringPattern):
+ 	flag was not initialized in the constructor.
+ 
+ 2025-08-05  Pierre-Emmanuel Patry  <pierre-emmanuel.patry@embecosm.com>
+ 
+ 	* hir/rust-ast-lower-implitem.cc (ASTLowerTraitItem::visit): Remove
+ 	use after move.
+ 
+ 2025-08-05  Pierre-Emmanuel Patry  <pierre-emmanuel.patry@embecosm.com>
+ 
+ 	* expand/rust-macro-builtins-helpers.cc: Remove use after move.
+ 
+ 2025-08-05  Yap Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* ast/rust-ast-collector.cc: Add support for the 2 new classes.
+ 	* ast/rust-ast-collector.h: Header file update for above.
+ 	* ast/rust-ast-full-decls.h: Add forward decls for the 2 new classes.
+ 	* ast/rust-ast-visitor.cc: Add visit support for the 2 new classes.
+ 	* ast/rust-ast-visitor.h: Header file update for above.
+ 	* ast/rust-pattern.cc: Implementation of certain methods for the 2 new classes.
+ 	* ast/rust-pattern.h: Define the 2 new classes. Update SlicePattern to be able to hold
+ 	2 kinds of items - SlicePatternItemsNoRest or SlicePatternItemsRest.
+ 	* expand/rust-cfg-strip.cc: Add support for the 2 new classes.
+ 	* expand/rust-cfg-strip.h: Header file update for above.
+ 	* expand/rust-derive.h: Add visits for the 2 new classes.
+ 	* hir/rust-ast-lower-base.cc: Add visits for the 2 new classes.
+ 	* hir/rust-ast-lower-base.h: Header file update for above.
+ 	* hir/rust-ast-lower-pattern.cc: Update lowering of SlicePattern to support
+ 	SlicePatternItemsNoRest.
+ 	* parse/rust-parse-impl.h (parse_slice_pattern()): Add support for parsing DOT_DOT into
+ 	respective SlicePatternItems.
+ 	* resolve/rust-ast-resolve-base.cc: Add visits for the 2 new classes.
+ 	* resolve/rust-ast-resolve-base.h: Header file update for above.
+ 	* resolve/rust-ast-resolve-pattern.cc: Update SlicePattern resolution to support new
+ 	classes.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* typecheck/rust-tyty-subst.cc: fix check for total arguments
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): create infer variable
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* hir/rust-hir-dump.cc (Dump::visit): check for expression
+ 	* hir/tree/rust-hir.cc (AnonConst::as_string): likewise
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* ast/rust-ast-collector.cc (TokenCollector::visit): check for value
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): formatting
+ 	* typecheck/rust-tyty-variance-analysis-private.h: likewise
+ 	* typecheck/rust-tyty.cc (VariantDef::clone): likewise
+ 	(VariantDef::monomorphized_clone): likewise
+ 	* typecheck/rust-tyty.h: likewise
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* backend/rust-compile-base.cc: useful debug
+ 	* backend/rust-compile-stmt.cc (CompileStmt::visit): likewise
+ 	* backend/rust-compile-type.cc (TyTyResolveCompile::visit): fold the capacity into ConstType
+ 	* hir/tree/rust-hir-generic-param.h: make const
+ 	* hir/tree/rust-hir-path.h: take into account const arguments now
+ 	* typecheck/rust-hir-type-check-base.cc (TypeCheckBase::resolve_literal): needs const
+ 	* typecheck/rust-hir-type-check-base.h: add error handling for const supported locations
+ 	* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): const type the arrays
+ 	* typecheck/rust-hir-type-check-implitem.cc (TypeCheckTopLevelExternItem::visit): update
+ 	(TypeCheckImplItem::visit): likewise
+ 	* typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): likewise
+ 	(TypeCheckItem::resolve_impl_block_substitutions): likewise
+ 	* typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): wrap up const type
+ 	* typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit): likewise
+ 	(TypeResolveGenericParam::visit): likewise
+ 	(TypeResolveGenericParam::apply_trait_bounds): remove HIR::Generic from Param
+ 	* typecheck/rust-hir-type-check.cc (TraitItemReference::get_type_from_fn): cleanup
+ 	* typecheck/rust-tyty-subst.cc (SubstitutionParamMapping::SubstitutionParamMapping):
+ 	handle const generics
+ 	(SubstitutionParamMapping::get_type_representation): likewise
+ 	(SubstitutionParamMapping::param_has_default_ty): likewise
+ 	(SubstitutionParamMapping::get_default_ty): likewise
+ 	(SubstitutionRef::infer_substitions): likewise
+ 	* typecheck/rust-tyty-subst.h: likewise
+ 	* typecheck/rust-tyty-util.cc (TyVar::get_implicit_const_infer_var): new helper
+ 	* typecheck/rust-tyty-util.h (class ConstType): likewise
+ 	* typecheck/rust-tyty.cc (BaseType::is_concrete): check for array const concrete
+ 	(ArrayType::as_string): update to const
+ 	(ArrayType::handle_substitions): likewise
+ 	(ParamType::ParamType): likewise
+ 	(ParamType::get_generic_param): likewise
+ 	(ParamType::clone): likewise
+ 	(ConstType::ConstType): likewise
+ 	(ConstType::set_value): likewise
+ 	(ConstType::clone): likewise
+ 	(ConstType::get_generic_param): likewise
+ 	(generate_tree_str): new helper to pretty print gimple
+ 	(ConstType::get_name): uses the generate_tree_str
+ 	(ConstType::handle_substitions): handle const infer's
+ 	* typecheck/rust-tyty.h (RUST_TYTY): likewise
+ 	* typecheck/rust-unify.cc (UnifyRules::expect_array): likewise
+ 	(UnifyRules::expect_const): likewise
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* backend/rust-compile-type.cc (TyTyResolveCompile::visit): error_mark_node for const types
+ 	* backend/rust-compile-type.h: boilerplate
+ 	* checks/errors/borrowck/rust-bir-fact-collector.h: likewise
+ 	* checks/errors/borrowck/rust-bir-place.h: likewise
+ 	* checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::check_base_type_privacy):
+ 	likewise
+ 	* typecheck/rust-substitution-mapper.cc (SubstMapperInternal::visit): likewise
+ 	* typecheck/rust-substitution-mapper.h: likewise
+ 	* typecheck/rust-tyty-bounds.cc (TypeBoundsProbe::assemble_marker_builtins): likewise
+ 	* typecheck/rust-tyty-call.h: likewise
+ 	* typecheck/rust-tyty-cmp.h (class ConstCmp): likewise
+ 	* typecheck/rust-tyty-variance-analysis-private.h: likewise
+ 	* typecheck/rust-tyty-visitor.h: likewise
+ 	* typecheck/rust-tyty.cc (TypeKindFormat::to_string): likewise
+ 	(BaseType::is_unit): likewise
+ 	(BaseType::has_substitutions_defined): likewise
+ 	(BaseType::needs_generic_substitutions): likewise
+ 	(ConstType::ConstType): likewise
+ 	(ConstType::accept_vis): likewise
+ 	(ConstType::as_string): likewise
+ 	(ConstType::can_eq): likewise
+ 	(ConstType::clone): likewise
+ 	(ConstType::get_symbol): likewise
+ 	(ConstType::get_generic_param): likewise
+ 	(ConstType::can_resolve): likewise
+ 	(ConstType::resolve): likewise
+ 	(ConstType::get_name): likewise
+ 	(ConstType::is_equal): likewise
+ 	(ConstType::handle_substitions): likewise
+ 	* typecheck/rust-tyty.h (enum TypeKind): new tyty_kind
+ 	(class ConstType): new type
+ 	* typecheck/rust-unify.cc (UnifyRules::go): Handle a const type unify
+ 	(UnifyRules::expect_inference_variable): likewise
+ 	(UnifyRules::expect_adt): likewise
+ 	(UnifyRules::expect_str): likewise
+ 	(UnifyRules::expect_reference): likewise
+ 	(UnifyRules::expect_pointer): likewise
+ 	(UnifyRules::expect_param): likewise
+ 	(UnifyRules::expect_array): likewise
+ 	(UnifyRules::expect_slice): likewise
+ 	(UnifyRules::expect_fndef): likewise
+ 	(UnifyRules::expect_fnptr): likewise
+ 	(UnifyRules::expect_tuple): likewise
+ 	(UnifyRules::expect_bool): likewise
+ 	(UnifyRules::expect_char): likewise
+ 	(UnifyRules::expect_int): likewise
+ 	(UnifyRules::expect_uint): likewise
+ 	(UnifyRules::expect_float): likewise
+ 	(UnifyRules::expect_isize): likewise
+ 	(UnifyRules::expect_usize): likewise
+ 	(UnifyRules::expect_placeholder): likewise
+ 	(UnifyRules::expect_projection): likewise
+ 	(UnifyRules::expect_dyn): likewise
+ 	(UnifyRules::expect_closure): likewise
+ 	(UnifyRules::expect_const): likewise
+ 	* typecheck/rust-unify.h: new expect_const_type handler
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* backend/rust-compile-intrinsic.cc (sizeof_handler): refactor types
+ 	(op_with_overflow_inner): likewise
+ 	(uninit_handler): likewise
+ 	(move_val_init_handler): likewise
+ 	* backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile): likewise
+ 	* typecheck/rust-hir-trait-resolve.cc: likewise
+ 	* typecheck/rust-hir-type-check-base.cc: likewise
+ 	* typecheck/rust-hir-type-check-item.cc: likewise
+ 	* typecheck/rust-tyty-bounds.cc (TypeBoundPredicate::is_equal): likewise
+ 	* typecheck/rust-tyty-subst.cc (SubstitutionParamMapping::get_param_ty): likewise
+ 	(SubstitutionArg::get_param_mapping): likewise
+ 	(SubstitutionRef::prepare_higher_ranked_bounds): likewise
+ 	(SubstitutionRef::monomorphize): likewise
+ 	* typecheck/rust-tyty-subst.h (class BaseGeneric): new generic base
+ 	* typecheck/rust-tyty.cc (VariantDef::clone): likewise
+ 	(VariantDef::monomorphized_clone): refactor
+ 	(ADTType::is_equal): likewise
+ 	(FnType::is_equal): likewise
+ 	(ParamType::ParamType): likewise
+ 	* typecheck/rust-tyty.h (class ParamType): likewise
+ 	(class BaseGeneric): new base class impl
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* typecheck/rust-tyty.cc (ADTType::is_equal): let param::is_eq do this
+ 	(FnType::is_equal): remove whitespace
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* typecheck/rust-hir-type-check-base.cc: check for type param
+ 	* typecheck/rust-tyty-subst.cc (SubstitutionParamMapping::SubstitutionParamMapping):
+ 	return HIR::GenericParam base class
+ 	(SubstitutionParamMapping::get_generic_param): likewise
+ 	(SubstitutionParamMapping::get_type_representation): new helper
+ 	(SubstitutionParamMapping::param_has_default_ty): check for param type
+ 	(SubstitutionParamMapping::get_default_ty): likewise
+ 	* typecheck/rust-tyty-subst.h: get the locus from the subst HIR::GenericParam now
+ 	* typecheck/rust-tyty-variance-analysis.cc (GenericTyPerCrateCtx::debug_print_solutions):
+ 	likwise
+ 	(GenericTyVisitorCtx::process_type): likewise
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* backend/rust-compile-expr.cc (CompileExpr::visit): check for ADTType instead of assert
+ 
+ 2025-08-05  Ryutaro Okada  <1015ryu88@gmail.com>
+ 
+ 	* checks/lints/rust-lint-unused-var.cc (check_decl):
+ 	Do not warn about unused `self` parameter.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* Make-lang.in:
+ 	* ast/rust-expression-yeast.cc (ExpressionYeast::dispatch_loops): Call DesugarWhileLet.
+ 	* ast/rust-desugar-while-let.cc: New file.
+ 	* ast/rust-desugar-while-let.h: New file.
+ 
+ 2025-08-05  Pierre-Emmanuel Patry  <pierre-emmanuel.patry@embecosm.com>
+ 
+ 	* ast/rust-ast.cc (AttrInputMacro::operator=): Add return type.
+ 	* ast/rust-expr.h: Likewise.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* ast/rust-desugar-for-loops.cc: Remove functions implemented in AST::Builder.
+ 	* ast/rust-desugar-for-loops.h: Likewise.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* hir/rust-ast-lower-base.cc: Add rust_unreachable() when lowering desugared exprs.
+ 	* hir/rust-ast-lower-base.h: Mention this.
+ 	* hir/rust-ast-lower-block.h: Remove existing definitions.
+ 	* hir/rust-ast-lower-expr.cc: Likewise.
+ 	* hir/rust-ast-lower-expr.h: Likewise.
+ 	* hir/rust-ast-lower.cc: Likewise.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* ast/rust-desugar-question-mark.cc (DesugarQuestionMark::go): Add assertion for the
+ 	expr's type.
+ 	* ast/rust-desugar-try-block.cc (DesugarTryBlock::go): Likewise.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* ast/rust-desugar-for-loops.h: Adapt API and remove visitor.
+ 	* ast/rust-desugar-for-loops.cc: Likewise.
+ 	* ast/rust-expression-yeast.cc: Call DesugarForLoop.
+ 	* ast/rust-expression-yeast.h: Declare dispatch_loops function.
+ 	* rust-session-manager.cc (Session::expansion): Do not call for-loop desugar.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* hir/tree/rust-hir-expr.h (class OffsetOf): New.
+ 	* hir/tree/rust-hir-expr.cc: Define its methods.
+ 	* hir/tree/rust-hir-expr-abstract.h: Add ExprType::OffsetOf.
+ 	* hir/tree/rust-hir-full-decls.h (class OffsetOf): Declare it.
+ 	* backend/rust-compile-block.h: Add handling for OffsetOf.
+ 	* backend/rust-compile-expr.cc (CompileExpr::visit): Likewise.
+ 	* backend/rust-compile-expr.h: Likewise.
+ 	* checks/errors/borrowck/rust-bir-builder-expr-stmt.cc (ExprStmtBuilder::visit): Likewise.
+ 	* checks/errors/borrowck/rust-bir-builder-expr-stmt.h (RUST_BIR_BUILDER_EXPR_H): Likewise.
+ 	* checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h: Likewise.
+ 	* checks/errors/borrowck/rust-bir-builder-struct.h: Likewise.
+ 	* checks/errors/borrowck/rust-function-collector.h: Likewise.
+ 	* checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::visit): Likewise.
+ 	* checks/errors/privacy/rust-privacy-reporter.h (RUST_PRIVACY_REPORTER_H): Likewise.
+ 	* checks/errors/rust-const-checker.cc (ConstChecker::visit): Likewise.
+ 	* checks/errors/rust-const-checker.h: Likewise.
+ 	* checks/errors/rust-hir-pattern-analysis.cc (PatternChecker::visit): Likewise.
+ 	* checks/errors/rust-hir-pattern-analysis.h: Likewise.
+ 	* checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): Likewise.
+ 	* checks/errors/rust-unsafe-checker.h: Likewise.
+ 	* hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Likewise.
+ 	* hir/rust-hir-dump.cc (Dump::visit): Likewise.
+ 	* hir/rust-hir-dump.h: Likewise.
+ 	* hir/tree/rust-hir-visitor.cc (DefaultHIRVisitor::walk): Likewise.
+ 	* hir/tree/rust-hir-visitor.h: Likewise.
+ 	* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Likewise.
+ 	* typecheck/rust-hir-type-check-expr.h (RUST_HIR_TYPE_CHECK_EXPR): Likewise.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* Make-lang.in: Compile the offset_of handler.
+ 	* lang.opt: Add -frust-assume-builtin-offset-of option.
+ 	* ast/rust-ast.h: Add has_str() for const_TokenPtr.
+ 	* expand/rust-macro-builtins.cc: Map offset_of as builtin.
+ 	* expand/rust-macro-builtins.h: Declare it.
+ 	* expand/rust-macro-expand.cc (MacroExpander::expand_invoc): Add hack for calling builtin
+ 	offset_of!().
+ 	* resolve/rust-early-name-resolver-2.0.cc (Early::visit):  Likewise.
+ 	* expand/rust-macro-builtins-offset-of.cc: New file.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* ast/rust-ast.h: Add OffsetOf expression kind.
+ 	* ast/rust-builtin-ast-nodes.h (class OffsetOf): Add node.
+ 	* ast/rust-ast.cc: Define it.
+ 	* ast/rust-ast-collector.cc: Add visitor for OffsetOf.
+ 	* ast/rust-ast-collector.h: Likewise.
+ 	* ast/rust-ast-visitor.cc: Likewise.
+ 	* ast/rust-ast-visitor.h: Likewise.
+ 	* hir/rust-ast-lower-base.cc (ASTLoweringBase::visit): Likewise.
+ 	* hir/rust-ast-lower-base.h: Likewise.
+ 	* hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Likewise.
+ 	* hir/rust-ast-lower-expr.h: Likewise.
+ 	* resolve/rust-ast-resolve-base.cc (ResolverBase::visit): Likewise.
+ 	* resolve/rust-ast-resolve-base.h: Likewise.
+ 	* resolve/rust-early-name-resolver-2.0.cc: Likewise.
+ 	* expand/rust-derive.h:
+ 
+ 2025-08-05  Pierre-Emmanuel Patry  <pierre-emmanuel.patry@embecosm.com>
+ 
+ 	* rust-diagnostics.h (struct Error): Add disambiguation.
+ 
+ 2025-08-05  Pierre-Emmanuel Patry  <pierre-emmanuel.patry@embecosm.com>
+ 
+ 	* expand/rust-macro-builtins-asm.cc (parse_format_strings): Emit an
+ 	error when expecting a comma.
+ 
+ 2025-08-05  Pierre-Emmanuel Patry  <pierre-emmanuel.patry@embecosm.com>
+ 
+ 	* checks/errors/borrowck/rust-bir-fact-collector.h: Remove spurious
+ 	comment.
+ 	* checks/errors/rust-feature.cc: Likewise.
+ 	* util/optional.h: Likewise.
+ 	* expand/rust-token-tree-desugar.cc (TokenTreeDesugar::visit): Remove
+ 	semicolons on namespace.
+ 	* expand/rust-token-tree-desugar.h: Likewise.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* typecheck/rust-hir-type-check-base.cc
+ 	(TypeCheckBase::TypeCheckBase): Remove initialization of
+ 	resolver field.
+ 	* typecheck/rust-hir-type-check-base.h
+ 	(TypeCheckBase::resolver): Remove field.
+ 	* typecheck/rust-hir-trait-resolve.cc: Remove "options.h"
+ 	include.
+ 	(TraitResolver::resolve_path_to_trait): Assume name resolution
+ 	2.0 is always enabled.
+ 	* typecheck/rust-hir-type-check-enumitem.cc: Remove "options.h"
+ 	include.
+ 	(TypeCheckEnumItem::visit): Assume name resolution 2.0 is always
+ 	enabled.
+ 	* typecheck/rust-hir-type-check-expr.cc: Remove "options.h"
+ 	include.
+ 	(TypeCheckExpr::visit): Assume name resolution 2.0 is always
+ 	enabled.
+ 	(TypeCheckExpr::resolve_operator_overload): Likewise.
+ 	(TypeCheckExpr::resolve_fn_trait_call): Likewise.
+ 	* typecheck/rust-hir-type-check-implitem.cc: Remove "options.h"
+ 	include.
+ 	(TypeCheckImplItem::visit): Assume name resolution 2.0 is always
+ 	enabled.
+ 	* typecheck/rust-hir-type-check-item.cc: Remove "options.h"
+ 	include.
+ 	(TypeCheckItem::visit): Assume name resolution 2.0 is always
+ 	enabled.
+ 	* typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::visit):
+ 	Likewise.
+ 	(TypeCheckExpr::resolve_root_path): Likewise.
+ 	(TypeCheckExpr::resolve_segments): Likewise.
+ 	* typecheck/rust-hir-type-check-pattern.cc: Remove "options.h"
+ 	include.
+ 	(TypeCheckPattern::visit): Assume name resolution 2.0 is always
+ 	enabled.
+ 	* typecheck/rust-hir-type-check-type.cc
+ 	(TypeCheckType::resolve_root_path): Likewise.
+ 	(ResolveWhereClauseItem::visit): Likewise.
+ 	* typecheck/rust-hir-type-check.cc: Remove "options.h" include.
+ 	(TraitItemReference::get_type_from_fn): Assume name resolution
+ 	2.0 is always enabled.
+ 	* typecheck/rust-type-util.cc (query_type): Likewise.
+ 
+ 2025-08-05  Pierre-Emmanuel Patry  <pierre-emmanuel.patry@embecosm.com>
+ 
+ 	* backend/rust-compile-asm.cc (get_out_expr): Return valid output from
+ 	an operand.
+ 	(CompileAsm::asm_construct_outputs): Handle every output
+ 	(get_in_expr): Return valid input from an operand.
+ 	(CompileAsm::asm_construct_inputs): Handle every input
+ 
+ 2025-08-05  Pierre-Emmanuel Patry  <pierre-emmanuel.patry@embecosm.com>
+ 
+ 	* expand/rust-macro-builtins-asm.cc (parse_reg_operand_inout): Parse
+ 	expressions and build split in out.
+ 
+ 2025-08-05  Pierre-Emmanuel Patry  <pierre-emmanuel.patry@embecosm.com>
+ 
+ 	* hir/rust-hir-dump.cc (Dump::visit): Dump inline assembly fields
+ 	* hir/tree/rust-hir-expr.h: Add non const getter and avoid operand copy
+ 	from getters.
+ 	* hir/tree/rust-hir-visitor.cc (DefaultHIRVisitor::walk): Use non const
+ 	reference.
+ 
+ 2025-08-05  Pierre-Emmanuel Patry  <pierre-emmanuel.patry@embecosm.com>
+ 
+ 	* expand/rust-macro-builtins-asm.cc (expand_inline_asm_strings): Handle
+ 	transformation for indexed positional arguments.
+ 
+ 2025-08-05  Yap Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* rust-backend.h: New slice_index_expression function.
+ 	* rust-gcc.cc: Implementation of slice_index_expression to generate tree node for
+ 		accessing slice elements.
+ 	* backend/rust-compile-pattern.cc: Implement SlicePattern check expression & binding
+ 		compilation against SliceType scrutinee.
+ 
+ 2025-08-05  Yap Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit(SlicePattern)):
+ 		Add new type check case for SliceType wrapped in ReferenceType.
+ 	* backend/rust-compile-pattern.cc: Adjusted the asserts accordingly for
+ 		CompilePatternCheckExpr(SlicePattern) & CompilePatternBindings(SlicePattern).
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* Make-lang.in: Compile it.
+ 	* ast/rust-expression-yeast.cc (ExpressionYeast::dispatch): Dispatch to try-block
+ 	desugar.
+ 	* ast/rust-desugar-try-block.cc: New file.
+ 	* ast/rust-desugar-try-block.h: New file.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* ast/rust-ast.h: Add the new variant.
+ 	* ast/rust-expr.h: Use it for TryExpr class.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* resolve/rust-default-resolver.cc (DefaultResolver::visit): Add
+ 	visitor for IfLetExprConseqElse.
+ 	* resolve/rust-default-resolver.h (DefaultResolver::visit):
+ 	Likewise.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Visit a block's loop label if it
+ 	exists.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* Make-lang.in: Compile it.
+ 	* rust-session-manager.cc: Call the expression desugar dispatcher.
+ 	* ast/rust-desugar-question-mark.cc: Rework class API.
+ 	* ast/rust-desugar-question-mark.h: Likewise.
+ 	* ast/rust-expression-yeast.cc: New file.
+ 	* ast/rust-expression-yeast.h: New file.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* ast/rust-expr.h: Fix formatting.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Handle defered consts.
+ 	* hir/tree/rust-hir-expr.cc (AnonConst::AnonConst): Likewise.
+ 	(AnonConst::operator=): Likewise.
+ 	* hir/tree/rust-hir-expr.h: Likewise.
+ 	* hir/tree/rust-hir-visitor.cc (DefaultHIRVisitor::walk): Likewise.
+ 	* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Likewise.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* ast/rust-expr.h: Add handling for deferred consts.
+ 	* ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Likewise.
+ 	* ast/rust-ast.cc (AnonConst::as_string): Likewise.
+ 	(ArrayType::as_string): Likewise.
+ 	* ast/rust-type.h (class ArrayType): Use AnonConst for sizes.
+ 	* parse/rust-parse-impl.h (Parser::parse_anon_const): New function.
+ 	(Parser::parse_slice_or_array_type): Call it.
+ 	* parse/rust-parse.h: Declare it.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* resolve/rust-early-name-resolver-2.0.cc (Early::resolve_glob_import): Adapt for enums.
+ 	(Early::finalize_glob_import): Likewise.
+ 	* resolve/rust-early-name-resolver-2.0.h: Likewise.
+ 	* resolve/rust-finalize-imports-2.0.cc (GlobbingVisitor::go): Likewise.
+ 	(GlobbingVisitor::visit_module_container): New function.
+ 	(GlobbingVisitor::visit_enum_container): New function.
+ 	* resolve/rust-finalize-imports-2.0.h: Declare them.
+ 	* resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Insert enums as potential
+ 	containers.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* util/rust-hir-map.cc (Mappings::insert_ast_module): Rename to...
+ 	(Mappings::insert_glob_container): ...this.
+ 	(Mappings::lookup_ast_module): Rename to...
+ 	(Mappings::lookup_glob_container): ...this.
+ 	* util/rust-hir-map.h: Change declarations.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* expand/rust-cfg-strip.cc (CfgStrip::visit): Load unloaded
+ 	modules.
+ 	* resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit):
+ 	Assume modules have been loaded by CfgStrip.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* expand/rust-expand-visitor.cc
+ 	(ExpandVisitor::expand_inner_items): Adjust call to
+ 	expand_macro_children.
+ 	(ExpandVisitor::expand_inner_stmts): Likewise.
+ 	(ExpandVisitor::visit): Likewise.
+ 	* expand/rust-expand-visitor.h
+ 	(ExpandVisitor::expand_macro_children): Take a pointer to member
+ 	function instead of a std::function.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile): do another lookup
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* ast/rust-ast.cc: Include "rust-macro-invoc-lexer.h".
+ 	(AttributeParser::~AttributeParser): Move function definition
+ 	here.
+ 	(AttributeParser::AttributeParser): Likewise and adjust member
+ 	initialization.
+ 	(AttributeParser::parse_meta_item_inner): Handle changes to
+ 	peek_token.
+ 	(AttributeParser::parse_literal): Likewise.
+ 	(AttributeParser::parse_simple_path_segment): Likewise.
+ 	(AttributeParser::parse_meta_item_seq): Handle changes to
+ 	AttributeParser fields.
+ 	(AttributeParser::peek_token): Move function definition here and
+ 	wrap MacroInvocLexer.
+ 	(AttributeParser::skip_token): Likewise.
+ 	* ast/rust-macro.h (class MacroInvocLexer): Forward declare.
+ 	(class Parser): Likewise.
+ 	(AttributeParser::token_stream): Remove field.
+ 	(AttributeParser::stream_pos): Likewise.
+ 	(AttributeParser::lexer): New field.
+ 	(AttributeParser::parser): Likewise.
+ 	(AttributeParser::AttributeParser): Move definition to
+ 	"rust-ast.cc".
+ 	(AttributeParser::~AttributeParser): Likewise.
+ 	(AttributeParser::peek_token): Likewise.
+ 	(AttributeParser::skip_token): Likewise.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* backend/rust-compile-resolve-path.cc (ResolvePathRef::resolve): return error_mark_node
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* hir/tree/rust-hir-expr.cc (OperatorExprMeta::OperatorExprMeta): track the rhs
+ 	* hir/tree/rust-hir-expr.h: likewise
+ 	* hir/tree/rust-hir-path.h: get rid of old comments
+ 	* typecheck/rust-hir-trait-reference.cc (TraitReference::get_trait_substs): return
+ 	references instead of copy
+ 	* typecheck/rust-hir-trait-reference.h: update header
+ 	* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::ResolveOpOverload): write ambigious
+ 	operator overloads to a table and try to resolve it at the end
+ 	* typecheck/rust-hir-type-check-expr.h: new static helper
+ 	* typecheck/rust-hir-type-check.h (struct DeferredOpOverload): new model to defer resolution
+ 	* typecheck/rust-typecheck-context.cc (TypeCheckContext::lookup_operator_overload): new
+ 	(TypeCheckContext::compute_ambigious_op_overload): likewise
+ 	(TypeCheckContext::compute_inference_variables): likewise
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* backend/rust-compile-base.cc: check the canonical path
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* parse/rust-parse-impl.h (Parser::parse_simple_path): Be more
+ 	careful about skipping SCOPE_RESOLUTION tokens.
+ 	(Parser::parse_simple_path_segment): Allow parsing from a
+ 	starting offset.
+ 	(Parser::parse_use_tree): Handle a non-skipped SCOPE_RESOLUTION
+ 	token.
+ 	* parse/rust-parse.h (Parser::parse_simple_path_segment): Add
+ 	parameter for parsing from a starting offset.
+ 
+ 2025-08-05  lishin  <lishin1008@gmail.com>
+ 
+ 	* backend/rust-compile-expr.cc (CompileExpr::visit): Add a catch for const/static.
+ 
+ 2025-08-05  Yap Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* rust-backend.h: New size_constant_expression function.
+ 	* rust-gcc.cc: Implementation of size_constant_expression function to generate tree node
+ 		for array access.
+ 	* backend/rust-compile-pattern.h: Remove empty visits for SlicePattern.
+ 	* backend/rust-compile-pattern.cc: Implement SlicePattern check expression & binding
+ 		compilation against ArrayType scrutinee.
+ 
+ 2025-08-05  Yap Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* typecheck/rust-hir-type-check-pattern.cc(TypeCheckPattern::visit(SlicePattern)):
+ 		Implement size checking for SlicePattern when type checking against array parent
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* util/rust-attribute-values.h: Add declarations for them.
+ 	* util/rust-attributes.cc: Add definitions.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* typecheck/rust-hir-type-check-struct.cc (TypeCheckStructExpr::visit): fix typo
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* typecheck/rust-casts.cc (TypeCastRules::resolve): optional emit_error flag
+ 	(TypeCastRules::check): try the simple cast rules then fallback to coercions
+ 	(TypeCastRules::check_ptr_ptr_cast): ensure the underlying's
+ 	(TypeCastRules::emit_cast_error): make this a static helper
+ 	* typecheck/rust-casts.h: new emit_error prototype
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Check for a label
+ 	before visiting it.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* typecheck/rust-hir-trait-resolve.cc (TraitResolver::resolve_trait): track is super trait
+ 	* typecheck/rust-hir-type-bounds.h: refactor bounds scan
+ 	* typecheck/rust-hir-type-check-base.h: track from super trait
+ 	* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): likewise
+ 	* typecheck/rust-tyty-bounds.cc (TypeBoundsProbe::is_bound_satisfied_for_type): refactor
+ 	(TypeBoundsProbe::scan): likewise
+ 	(TypeBoundPredicate::apply_generic_arguments): likewise
+ 	* typecheck/rust-tyty-subst.cc: optional bounds checking on parm subst
+ 	* typecheck/rust-tyty-subst.h: likewise
+ 	* typecheck/rust-tyty.h: likewise
+ 
+ 2025-08-05  Marc Poulhiès  <dkm@kataplop.net>
+ 
+ 	* checks/errors/borrowck/rust-bir-place.h (LoanId::value): Make
+ 	it size_t to match Loan's base type.
+ 
+ 2025-08-05  Yap Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* typecheck/rust-hir-type-check-pattern.cc(TypeCheckPattern::visit(LiteralPattern)):
+ 		Check LiteralPattern's type against its parent.
+ 
+ 2025-08-05  Yap Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit(SlicePattern)):
+ 		Implement initial type checking for SlicePattern.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* ast/rust-ast-collector.cc (TokenCollector::visit): check for missing borrow
+ 	* ast/rust-expr.h: add helper
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* backend/rust-compile-base.cc (HIRCompileBase::query_compile_const_expr): new wrapper
+ 	* backend/rust-compile-base.h: add prototype
+ 	* backend/rust-compile-context.cc (Context::get): singleton helper
+ 	* backend/rust-compile-context.h: likewise
+ 	* backend/rust-compile-type.cc (TyTyResolveCompile::visit): handle infer's that can default
+ 	* rust-session-manager.cc (Session::compile_crate): create the gcc context earlier for tychk
+ 	* typecheck/rust-hir-type-check-base.cc (TypeCheckBase::resolve_literal): const fold it
+ 	* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): likewise
+ 	* typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit): likewise
+ 	* typecheck/rust-tyty.cc (BaseType::monomorphized_clone): fix constructor call
+ 	(ArrayType::as_string): print capacity
+ 	(ArrayType::clone): fix constructor call
+ 	* typecheck/rust-tyty.h: track capacity
+ 	* typecheck/rust-unify.cc (UnifyRules::expect_array): check the capacities
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* resolve/rust-late-name-resolver-2.0.cc (Late::visit): New visitor.
+ 	* resolve/rust-late-name-resolver-2.0.h: Declare it.
+ 	* resolve/rust-name-resolution-context.h (enum class): New binding context.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Check that the WhileLet has a label
+ 	before visiting it.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* ast/rust-ast-collector.cc (TokenCollector::visit): Add visitor
+ 	for TryExpr.
+ 	* ast/rust-ast-collector.h (TokenCollector::visit): Likewise.
+ 	* ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Likewise.
+ 	* ast/rust-ast-visitor.h (ASTVisitor::visit): Likewise.
+ 	(DefaultASTVisitor::visit): Likewise.
+ 	* expand/rust-derive.h (DeriveVisitor::visit): Likewise.
+ 	* hir/rust-ast-lower-base.cc (ASTLoweringBase::visit): Likewise.
+ 	* hir/rust-ast-lower-base.h (ASTLoweringBase::visit): Likewise.
+ 	* resolve/rust-ast-resolve-base.cc (ResolverBase::visit):
+ 	Likewise.
+ 	* resolve/rust-ast-resolve-base.h (ResolverBase::visit):
+ 	Likewise.
+ 	* ast/rust-ast-full-decls.h (class TryExpr): New forward class
+ 	declaration.
+ 	* ast/rust-ast.cc (TryExpr::as_string): New function.
+ 	(TryExpr::accept_vis): Likewise.
+ 	* ast/rust-expr.h (class TryExpr): New class.
+ 	* parse/rust-parse.h (Parser::parse_try_expr): New function.
+ 	* parse/rust-parse-impl.h (Parser::parse_try_expr): Likewise.
+ 	(Parser::null_denotation_not_path): Use parse_try_expr to parse
+ 	try expressions.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* expand/rust-macro-builtins-format-args.cc
+ 	(format_args_parse_arguments): Accept a RAW_STRING_LITERAL token
+ 	as the first argument.
+ 
+ 2025-08-05  Pierre-Emmanuel Patry  <pierre-emmanuel.patry@embecosm.com>
+ 
+ 	* parse/rust-parse-impl.h: Add enum prefix.
+ 	* parse/rust-parse.h (enum ParseSelfError): Change from enum...
+ 	(enum class): To enum class.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Replace
+ 	usages of reinterpret_cast with static_cast.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Remove
+ 	override for StructStruct visitor.
+ 	* resolve/rust-late-name-resolver-2.0.h (Late::visit): Likewise.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* backend/rust-compile-context.cc (Context::Context): Remove
+ 	initialization of resolver field.
+ 	* backend/rust-compile-context.h (Context::get_resolver): Remove
+ 	function.
+ 	(Context::resolver): Remove field.
+ 	* backend/rust-compile-expr.cc (CompileExpr::visit): Assume name
+ 	resolution 2.0 is always enabled.
+ 	(CompileExpr::generate_closure_function): Likewise.
+ 	* backend/rust-compile-implitem.cc (CompileTraitItem::visit):
+ 	Likewise.
+ 	* backend/rust-compile-item.cc (CompileItem::visit): Likewise.
+ 	* backend/rust-compile-resolve-path.cc
+ 	(ResolvePathRef::resolve): Likewise.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* lang.opt (frust-name-resolution-2.0): Enable by default.
+ 
+ 2025-08-05  Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* backend/rust-compile-pattern.cc (CompilePatternCheckExpr::visit(TuplePattern)):
+ 		Implement check expression compilation for TuplePatternItems::RANGED.
+ 
+ 2025-08-05  Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* typecheck/rust-hir-type-check-pattern.cc (visit(TuplePattern)): Fix
+ 		incorrect logic for field size checking.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* ast/rust-ast-builder.cc: Remove extra include, fix new formatting.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* ast/rust-ast.h (reconstruct_vec): Pre-allocate size of vector.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* Make-lang.in: Remove object file for ASTTypeBuilder.
+ 	* ast/rust-ast-builder.h: Remove function.
+ 	* ast/rust-ast-builder.cc (Builder::new_type): Likewise.
+ 	(Builder::new_const_param): Use reconstruct_type() instead.
+ 	(Builder::new_generic_args): Likewise.
+ 	* expand/rust-derive-default.cc (DeriveDefault::visit_struct): Likewise.
+ 	(DeriveDefault::visit_tuple): Likewise.
+ 	* expand/rust-derive-eq.cc (DeriveEq::visit_tuple): Likewise.
+ 	(DeriveEq::visit_struct): Likewise.
+ 	(DeriveEq::visit_enum): Likewise.
+ 	(DeriveEq::visit_union): Likewise.
+ 	* ast/rust-ast-builder-type.cc: Removed.
+ 	* ast/rust-ast-builder-type.h: Removed.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* ast/rust-ast.h: Add reconstruct() and reconstruct_impl() for Type nodes.
+ 	* ast/rust-type.h: Implement them.
+ 	* ast/rust-macro.h: Likewise.
+ 	* ast/rust-path.h: Likewise.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* ast/rust-ast.h (reconstruct): New function for calling the `reconstruct_*_impl` method
+ 	and asserting that the new NodeId is different, and then wrap it in a unique_ptr<T>.
+ 	(reconstruct_vec): Likewise, but for vectors of unique_ptr<T>
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* resolve/rust-forever-stack.hxx (ForeverStack::resolve_path):
+ 	Resolve final segments which point to modules.
+ 	* resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit):
+ 	Avoid inserting module names into ribs in the type namespace.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* resolve/rust-late-name-resolver-2.0.cc
+ 	(visit_identifier_as_pattern): Handle is_ref and is_mut.
+ 	(Late::visit): Likewise.
+ 	* resolve/rust-name-resolution-context.cc
+ 	(BindingLayer::insert_ident): Likewise.
+ 	(BindingLayer::bind_test): Handle changes to BindingLayer
+ 	fields.
+ 	(BindingLayer::merge): Likewise and emit more error messages.
+ 	* resolve/rust-name-resolution-context.h
+ 	(struct IdentifierMode): New.
+ 	(Binding::has_expected_bindings): New field.
+ 	(Binding::set): Rename field to...
+ 	(Binding::idents): ...here and convert from a set to a map.
+ 	(Binding::Binding): Initialize has_expected_bindings.
+ 	(BindingLayer::insert_ident): Adjust parameters.
+ 
+ 2025-08-05  Pierre-Emmanuel Patry  <pierre-emmanuel.patry@embecosm.com>
+ 
+ 	* ast/rust-expr.h: Add getter to locus field.
+ 	* ast/rust-pattern.h (tokenid_to_rangekind): Likewise.
+ 	* hir/tree/rust-hir-item.h: Likewise.
+ 	* hir/tree/rust-hir-visibility.h: Likewise.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* resolve/rust-default-resolver.cc
+ 	(DefaultResolver::visit_extern_crate): New function.
+ 	(DefaultResolver::visit): New visitor function for ExternCrate.
+ 	* resolve/rust-default-resolver.h
+ 	(DefaultResolver::visit_extern_crate): New function.
+ 	(DefaultResolver::visit): New visitor function for ExternCrate.
+ 	* resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit):
+ 	Adjust ExternCrate visitor and rename to...
+ 	(TopLevel::visit_extern_crate): ...here.
+ 	* resolve/rust-toplevel-name-resolver-2.0.h (TopLevel::visit):
+ 	Remove ExternCrate visitor override.
+ 	(TopLevel::visit_extern_crate): New function.
+ 	* rust-session-manager.cc (Session::load_extern_crate): Only run
+ 	name resolution 1.0 if name resolution 2.0 is disabled.
+ 
+ 2025-08-05  Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit(TuplePattern)):
+ 		Implement type checking for ItemType::RANGED.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* rust-lang.cc: Move version check from C++11 to C++14.
+ 
+ 2025-08-05  Ryutaro Okada  <1015ryu88@gmail.com>
+ 
+ 	* Make-lang.in: Scaffolding new rust-hir-visitor files
+ 	* hir/tree/rust-hir-visitor.h (DefaultHIRVisitor): Declare default HIR visitor
+ 	* hir/tree/rust-hir-visitor.cc  (DefaultHIRVisitor): Define default HIR visitor
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* Make-lang.in (GRS_OBJS): Add rust-ggc.o.
+ 	* backend/rust-compile-base.cc
+ 	(HIRCompileBase::compile_function): Adjust call to
+ 	Backend::function.
+ 	(HIRCompileBase::compile_constant_item): Likewise and adjust
+ 	initialization of Backend::typed_identifier.
+ 	* backend/rust-compile-expr.cc (CompileExpr::visit): Adjust call
+ 	to Backend::label.
+ 	* backend/rust-compile-type.cc (TyTyResolveCompile::visit):
+ 	Adjust initialization of Backend::typed_identifier.
+ 	* rust-backend.h: Add includes.
+ 	(Backend::GGC::Ident): Use Rust::GGC::Ident.
+ 	(struct typed_identifier): Store name as a GGC::Ident rather
+ 	than a std::string and adjust constructors.
+ 	(named_type): Take GGC::Ident/tl::optional<GGC::Ident> rather
+ 	than std::string.
+ 	(global_variable): Likewise.
+ 	(local_variable): Likewise.
+ 	(parameter_variable): Likewise.
+ 	(static_chain_variable): Likewise.
+ 	(label): Likewise.
+ 	(function): Likewise.
+ 	* rust-gcc.cc (named_type): Likewise.
+ 	(global_variable): Likewise.
+ 	(local_variable): Likewise.
+ 	(parameter_variable): Likewise.
+ 	(static_chain_variable): Likewise.
+ 	(label): Likewise.
+ 	(function): Likewise.
+ 	(function_defer_statement): Adjust call to Backend::label.
+ 	(get_identifier_from_string): Remove function.
+ 	(fill_in_fields): Handle adjustments to typed_identifier.
+ 	* util/rust-ggc.cc: New file.
+ 	* util/rust-ggc.h: New file.
+ 
+ 2025-08-05  Ryutaro Okada  <1015ryu88@gmail.com>
+ 
+ 	* hir/tree/rust-hir-item.h (SelfParam::get_lifetime): Add getter
+ 	for non const lifetime object
+ 
+ 2025-08-05  Ryutaro Okada  <1015ryu88@gmail.com>
+ 
+ 	* hir/tree/rust-hir-expr.h (MatchArm::get_outer_attrs): Add getter for outer attributions
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* backend/rust-compile-resolve-path.cc: if this fails fall back to query compile
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* backend/rust-compile-expr.cc (CompileExpr::visit): add const call check
+ 	* backend/rust-compile-item.cc (CompileItem::visit): ensure we upfront compile types where
+ 	possible
+ 	* backend/rust-compile-item.h: update header
+ 	* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): make parent ctx optional
+ 
+ 2025-08-05  Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* backend/rust-compile-pattern.cc(CompilePatternCheckExpr::visit(TupleStructPattern)):
+ 		Fix error thrown when compiling non-enum TupleStructPattern.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* resolve/rust-default-resolver.cc (DefaultResolver::visit):
+ 	Call DefaultASTVisitor::visit even on ConstantItem instances
+ 	without expressions.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* typecheck/rust-unify.cc (UnifyRules::expect_fnptr): add unify rules
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* typecheck/rust-hir-trait-reference.cc (TraitReference::on_resolved): ensure associated
+ 	types are done first
+ 	* typecheck/rust-hir-type-check-type.cc: Update call site.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* typecheck/rust-tyty-bounds.cc: Check super traits for type bindings.
+ 	* typecheck/rust-tyty.h: Add helper methods for bound checking.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* typecheck/rust-hir-type-bounds.h: Rename method.
+ 	* typecheck/rust-tyty-bounds.cc: Refactor marker trait assembly
+ 	and add proper Fn trait handling for function types.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* typecheck/rust-hir-dot-operator.cc: Major refactoring and cleanup.
+ 	* typecheck/rust-hir-dot-operator.h: Add new helper methods.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* typecheck/rust-hir-trait-resolve.cc: Add cyclical projection
+ 	protection.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* typecheck/rust-hir-type-check-expr.cc: Look at bounds behind
+ 	references.
+ 	* typecheck/rust-hir-type-check-expr.h: Add helper method.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* rust-session-manager.cc (Session::compile_crate): Move
+ 	AST desugaring to...
+ 	(Session::expansion): ...here and add a final TopLevel pass
+ 	afterwards.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): check for has_expr
+ 	* hir/rust-hir-dump.cc (Dump::visit): likewise
+ 	* hir/tree/rust-hir-item.h: add has_expr helper
+ 	* resolve/rust-ast-resolve-item.cc (ResolveItem::visit): check for has_expr
+ 	* resolve/rust-ast-resolve-stmt.h: likewise
+ 	* typecheck/rust-hir-type-check-stmt.cc (TypeCheckStmt::visit): likewise
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): Add
+ 	visitor for ExternCrate.
+ 	* hir/rust-ast-lower-item.h (ASTLoweringItem::visit): Likewise.
+ 	* rust-session-manager.cc (Session::load_extern_crate): Avoid
+ 	lowering or type resolving external crates here.
+ 	* typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit):
+ 	Add visitor for ExternCrate.
+ 	* typecheck/rust-hir-type-check-item.h (TypeCheckItem::visit):
+ 	Replace empty definition with a declaration.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* typecheck/rust-tyty.cc (ParamType::handle_substitions): make this consistent
+ 
+ 2025-08-05  Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* resolve/rust-late-name-resolver-2.0.cc (Late::visit(IdentifierPattern)):
+ 	Remove redundant subpattern check.
+ 
+ 2025-08-05  Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* backend/rust-compile-pattern.cc: Add support for IdentifierPattern's
+ 		subpattern under CompilePatternBindings.
+ 
+ 2025-08-05  Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* resolve/rust-ast-resolve-pattern.cc: Implement name resolution for
+ 		IdentifierPattern's subpattern.
+ 	* resolve/rust-late-name-resolver-2.0.cc: Ditto, but for nr2.
+ 
+ 2025-08-05  Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* ast/rust-ast-collector.cc: Rename get_pattern_to_bind to get_subpattern
+ 	* ast/rust-ast-visitor.cc: Ditto.
+ 	* ast/rust-pattern.h: Ditto.
+ 	* expand/rust-cfg-strip.cc: Ditto.
+ 	* hir/rust-ast-lower-pattern.cc: Ditto.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* resolve/rust-default-resolver.cc (DefaultResolver::visit):
+ 	Adjust scoping of trait definitions and their generic
+ 	parameters.
+ 	* resolve/rust-forever-stack.hxx (ForeverStack::get): Prevent
+ 	lookups inside TraitOrImpl ribs.
+ 	(ForeverStack::resolve_segments): Prevent lookups of the first
+ 	segment inside TraitOrImpl ribs.
+ 
+ 2025-08-05  Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* hir/rust-hir-dump.cc: Change pattern dumps to use visit_field.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* expand/rust-derive.cc: Fix formatting after fork update.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* expand/rust-derive-cmp-common.cc (EnumMatchBuilder::tuple): Create two different
+ 	variant paths.
+ 	(EnumMatchBuilder::strukt): Likewise.
+ 	* expand/rust-derive-cmp-common.h: Change API.
+ 	* expand/rust-derive-ord.cc (DeriveOrd::visit_enum): Use new EnumMatchBuilder API.
+ 	* expand/rust-derive-partial-eq.cc (DerivePartialEq::visit_enum): Likewise.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* expand/rust-derive-ord.cc (DeriveOrd::make_cmp_arms): Use new make_equal function.
+ 	(DeriveOrd::make_equal): New function.
+ 	(DeriveOrd::recursive_match): Handle the unit struct/tuple case.
+ 	* expand/rust-derive-ord.h: Declare make_equal.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* expand/rust-derive-ord.cc (DeriveOrd::cmp_call): Use references.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* expand/rust-derive-ord.cc (DeriveOrd::make_cmp_arms): Fix condition.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* expand/rust-derive-ord.cc: Finish implementation for enums.
+ 	* expand/rust-derive-ord.h: Likewise.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* expand/rust-derive-partial-eq.cc (DerivePartialEq::eq_fn): Change signature.
+ 	(DerivePartialEq::visit_tuple): Use new eq_fn API.
+ 	(DerivePartialEq::visit_struct): Likewise.
+ 	(DerivePartialEq::visit_enum): Implement proper discriminant comparison.
+ 	* expand/rust-derive-partial-eq.h: Change eq_fn signature.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* expand/rust-derive-cmp-common.h (class EnumMatchBuilder): New helper class.
+ 	* expand/rust-derive-cmp-common.cc (EnumMatchBuilder::tuple): New function.
+ 	(EnumMatchBuilder::strukt): New function.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* ast/rust-ast-builder.h: Put `loc` member in public.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* expand/rust-derive-ord.cc (DeriveOrd::cmp_call): New function.
+ 	(DeriveOrd::recursive_match): Use it.
+ 	(DeriveOrd::visit_enum): Likewise.
+ 	* expand/rust-derive-ord.h: Declare it.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* expand/rust-derive-hash.cc (DeriveHash::visit_enum): Use new APIs.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* ast/rust-ast-builder.cc (Builder::discriminant_value): New function.
+ 	* ast/rust-ast-builder.h: Declare it.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* expand/rust-derive-ord.cc (is_last): Remove.
+ 	(DeriveOrd::visit_tuple): Fix implementation.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* expand/rust-derive-cmp-common.cc (SelfOther::indexes): Fix formatting.
+ 	(SelfOther::fields): Make iterator const.
+ 	* expand/rust-derive-cmp-common.h (struct SelfOther): New declaration for indexes.
+ 	* expand/rust-derive-partial-eq.cc (DerivePartialEq::visit_tuple): Use the new API.
+ 	(DerivePartialEq::visit_struct): Likewise.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* expand/rust-derive-ord.cc (DeriveOrd::make_cmp_arms): New function.
+ 	(is_last): Likewise.
+ 	(recursive_match): Likewise.
+ 	(DeriveOrd::recursive_match): Likewise.
+ 	(DeriveOrd::visit_struct): Add proper implementation.
+ 	(DeriveOrd::visit_union): Likewise.
+ 	* expand/rust-derive-ord.h: Declare these new functions.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* expand/rust-derive-partial-eq.cc (DerivePartialEq::tuple_indexes): Remove.
+ 	(DerivePartialEq::field_acccesses): Remove.
+ 	(DerivePartialEq::visit_tuple): Use new API.
+ 	(DerivePartialEq::visit_struct): Likewise.
+ 	* expand/rust-derive-partial-eq.h: Remove declarations.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* expand/rust-derive-cmp-common.cc: New file.
+ 	* expand/rust-derive-cmp-common.h: New file.
+ 	* Make-lang.in: Compile them.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* ast/rust-ast-builder.cc (Builder::block): New function.
+ 	(Builder::match_case): Likewise.
+ 	* ast/rust-ast-builder.h: Declare them.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* ast/rust-ast-builder.cc (Builder::new_const_param): New function.
+ 	* ast/rust-ast-builder.h (vec): New function for creating 3 elts vector.
+ 	* expand/rust-derive.cc: Use the new_const_param builder.
+ 	* ast/rust-path.h: Add get_default_value() method.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* Make-lang.in: Compile it.
+ 	* expand/rust-derive.cc (DeriveVisitor::derive): Call them.
+ 	* expand/rust-derive-ord.cc: New file.
+ 	* expand/rust-derive-ord.h: New file.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* expand/rust-derive-clone.h: Add missing override qualifiers to DeriveVisitor methods.
+ 	* expand/rust-derive-copy.h: Likewise.
+ 	* expand/rust-derive-eq.h: Likewise.
+ 	* expand/rust-derive-hash.h: Likewise.
+ 	* expand/rust-derive-partial-eq.h: Likewise.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* resolve/rust-rib.h: Add missing switch cases.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* typecheck/rust-type-util.cc (query_type): early return.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* backend/rust-compile-type.cc (TyTyResolveCompile::visit): reuse GCC's build_array_type
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* resolve/rust-late-name-resolver-2.0.cc
+ 	(visit_identifier_as_pattern): Make sure to map identifiers
+ 	inside or-bindings to prior identifiers.
+ 
+ 2025-08-05  Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* ast/rust-ast-collector.cc: Rename to_bind to subpattern.
+ 	* ast/rust-ast-visitor.cc: Ditto.
+ 	* ast/rust-pattern.cc: Ditto.
+ 	* ast/rust-pattern.h: Ditto.
+ 	* backend/rust-compile-pattern.cc: Ditto.
+ 	* expand/rust-cfg-strip.cc: Ditto.
+ 	* hir/rust-ast-lower-pattern.cc: Ditto.
+ 	* hir/rust-hir-dump.cc: Ditto.
+ 	* hir/tree/rust-hir-pattern.h: Ditto.
+ 	* hir/tree/rust-hir.cc: Ditto.
+ 	* typecheck/rust-hir-type-check-pattern.cc: Ditto.
+ 
+ 2025-08-05  Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* backend/rust-compile-pattern.cc: Add CheckExpr compilation for
+ 		IdentifierPattern with subpattern.
+ 	* backend/rust-compile-pattern.h: Modify IdentifierPattern's
+ 		visit func to support the above.
+ 	* typecheck/rust-hir-type-check-pattern.cc: Add typechecking
+ 		support for the changes above.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* resolve/rust-default-resolver.cc
+ 	(DefaultResolver::visit_closure_params): New member function
+ 	definition.
+ 	(DefaultResolver::visit): New visiting function definition for
+ 	ClosureExpr called from visiting functions for ClosureExprInner
+ 	and ClosureExprInnerTyped.
+ 	* resolve/rust-default-resolver.h
+ 	(DefaultResolver::visit_closure_params): New member function
+ 	declaration.
+ 	(DefaultResolver::visit): New visiting function declaration for
+ 	ClosureExpr.
+ 	* resolve/rust-late-name-resolver-2.0.cc (add_captures): Remove
+ 	function.
+ 	(Late::visit): New visiting function definition for ClosureExpr,
+ 	remove visiting function definitions for ClosureExprInner and
+ 	ClosureExprInnerTyped.
+ 	(Late::visit_closure_params): New member function definition.
+ 	* resolve/rust-late-name-resolver-2.0.h (Late::visit): New
+ 	visiting function declaration for ClosureExpr, remove visiting
+ 	function declarations for ClosureExprInner and
+ 	ClosureExprInnerTyped.
+ 	(Late::visit_closure_params): New member function declaration.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* resolve/rust-forever-stack.hxx (ForeverStack::resolve_path):
+ 	Handle single segment paths "crate", "self", and "super".
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Use
+ 	visit_identifier_as_pattern to handle IdentifierPattern and
+ 	StructPatternFieldIdent.
+ 	(visit_identifier_as_pattern): New function.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* ast/rust-expr.h (ClosureExpr::get_definition_expr): New
+ 	virtual member function.
+ 	(ClosureExprInner::get_definition_expr): Add override specifier.
+ 	(ClosureExprInnerTyped::get_definition_block): Rename to...
+ 	(ClosureExprInnerTyped::get_definition_expr): ...here and add
+ 	override specifier.
+ 	* ast/rust-ast-collector.cc (TokenCollector::visit): Handle
+ 	rename of ClosureExprInnerTyped::get_definition_block to
+ 	ClosureExprInnerTyped::get_definition_expr.
+ 	* ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Likewise.
+ 	* expand/rust-cfg-strip.cc (CfgStrip::visit): Likewise.
+ 	* expand/rust-expand-visitor.cc (ExpandVisitor::visit):
+ 	Likewise.
+ 	* hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Likewise.
+ 	* resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit):
+ 	Likewise.
+ 	* resolve/rust-late-name-resolver-2.0.cc (Late::visit):
+ 	Likewise.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* backend/rust-compile-base.cc
+ 	(HIRCompileBase::compile_function): Since canonical paths
+ 	returned from nr2.0 now include the crate name, avoid prepending
+ 	the crate name again.
+ 	* backend/rust-compile-implitem.cc (CompileTraitItem::visit):
+ 	Use NameResolutionContext::to_canonical_path instead of
+ 	ForeverStack::to_canonical_path.
+ 	* backend/rust-compile-item.cc (CompileItem::visit): Likewise.
+ 	* typecheck/rust-hir-type-check-enumitem.cc
+ 	(TypeCheckEnumItem::visit): Likewise.
+ 	* typecheck/rust-hir-type-check-implitem.cc
+ 	(TypeCheckImplItem::visit): Likewise.
+ 	* typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit):
+ 	Likewise.
+ 	* typecheck/rust-hir-type-check.cc
+ 	(TraitItemReference::get_type_from_fn): Likewise.
+ 	* resolve/rust-default-resolver.cc (DefaultResolver::visit): Add
+ 	Crate and EnumItem instance visitors, handle canonical path
+ 	context scoping.
+ 	* resolve/rust-default-resolver.h (DefaultResolver::visit): Add
+ 	Crate and EnumItem instance visitors.
+ 	* resolve/rust-early-name-resolver-2.0.cc (Early::go): Visit
+ 	instances of Crate using the virtual member function visit.
+ 	* resolve/rust-forever-stack.h
+ 	(ForeverStack::to_canonical_path): Remove function declaration.
+ 	* resolve/rust-forever-stack.hxx
+ 	(ForeverStack::to_canonical_path): Remove function definition.
+ 	* resolve/rust-late-name-resolver-2.0.cc (Late::go): Visit
+ 	instances of Crate using the virtual member function visit.
+ 	* resolve/rust-name-resolution-context.cc
+ 	(CanonicalPathRecordCrateRoot::as_path): New function definition.
+ 	(CanonicalPathRecordNormal::as_path): Likewise.
+ 	(CanonicalPathRecordLookup::as_path): Likewise.
+ 	(CanonicalPathRecordImpl::as_path): Likewise.
+ 	(CanonicalPathRecordTraitImpl::as_path): Likewise.
+ 	(NameResolutionContext::NameResolutionContext): Initialize
+ 	member variable canonical_ctx.
+ 	* resolve/rust-name-resolution-context.h: Include "rust-item.h".
+ 	(class NameResolutionContext): Forward declare class.
+ 	(class CanonicalPathRecord): New class.
+ 	(class CanonicalPathRecordWithParent): Likewise.
+ 	(class CanonicalPathRecordCrateRoot): Likewise.
+ 	(class CanonicalPathRecordNormal): Likewise.
+ 	(class CanonicalPathRecordLookup): Likewise.
+ 	(class CanonicalPathRecordImpl): Likewise.
+ 	(class CanonicalPathRecordTraitImpl): Likewise.
+ 	(class CanonicalPathCtx): Likewise.
+ 	(NameResolutionContext::canonical_ctx): New member variable.
+ 	(NameResolutionContext::to_canonical_path): New member function.
+ 	* resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::go):
+ 	Visit instances of Crate with the virtual member function visit.
+ 	(TopLevel::visit): Handle canonical path context scoping for
+ 	external crates, use DefaultResolver::visit when visiting
+ 	instances of StructStruct.
+ 	* util/rust-canonical-path.h (CanonicalPath::new_seg): Take path
+ 	parameter by-value, as a duplicate instance will be constructed
+ 	regardless.
+ 
+ 2025-08-05  Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* hir/rust-ast-lower-pattern.cc: Lower of IdentifierPattern's to_bind to HIR.
+ 	* hir/rust-hir-dump.cc: Update IdentifierPattern's dump to properly show to_bind's full
+ 	full properties.
+ 
+ 2025-08-05  Vishruth-Thimmaiah  <vishruththimmaiah@gmail.com>
+ 
+ 	* lex/rust-lex.cc (Lexer::parse_raw_byte_string):
+ 	Fix infinite looping when a raw byte string is not terminated.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* resolve/rust-default-resolver.cc (DefaultResolver::visit): Use
+ 	visit_impl_type to visit the self types of impl blocks.
+ 	* resolve/rust-default-resolver.h
+ 	(DefaultResolver::visit_impl_type): New member function
+ 	declaration.
+ 	* resolve/rust-late-name-resolver-2.0.cc (Late::Late):
+ 	Initialize member variable block_big_self.
+ 	(Late::visit_impl_type): New member function definition.
+ 	(Late::visit): Check for Self while inside impl block self
+ 	types.
+ 	* resolve/rust-late-name-resolver-2.0.h (Late::visit_impl_type):
+ 	New member function.
+ 	(Late::block_big_self): New member variable.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* resolve/rust-forever-stack.h
+ 	(enum ResolutionMode): New.
+ 	(ForeverStack::get): Add a private overload that takes a
+ 	starting node as a parameter.
+ 	(ForeverStack::resolve_path): Replace boolean parameter
+ 	has_opening_scope_resolution with ResolutionMode parameter mode.
+ 	* resolve/rust-forever-stack.hxx
+ 	(ForeverStack::resolve_path): Likewise.
+ 	(ForeverStack::get): Add a private overload that takes a
+ 	starting node as a parameter.
+ 	* resolve/rust-late-name-resolver-2.0.cc
+ 	(Late::visit): Add Visibility visitor.
+ 	* resolve/rust-late-name-resolver-2.0.h
+ 	(Late::visit): Likewise.
+ 	* resolve/rust-name-resolution-context.h
+ 	(NameResolutionContext::resolve_path): Rework overloading a bit
+ 	and accept ResolutionMode parameter.
+ 
+ 2025-08-05  Vishruth-Thimmaiah  <vishruththimmaiah@gmail.com>
+ 
+ 	* parse/rust-parse.cc (Rust::extract_module_path):
+ 	Handle empty or whitespace-only path attributes.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* ast/rust-ast-collector.cc (TokenCollector::visit): Handle
+ 	changed type of ConstantItem::identifier.
+ 	* ast/rust-ast.cc (ConstantItem::as_string): Likewise.
+ 	* ast/rust-ast.h (operator const std::string &): New member
+ 	function.
+ 	* ast/rust-item.h (ConstantItem::identifier): Change type from
+ 	std::string to Identifier.
+ 	(ConstantItem::ConstantItem): Handle changed type of identifier
+ 	field.
+ 	(ConstantItem::is_unnamed): Likewise.
+ 	(ConstantItem::get_identifier): Likewise.
+ 	* hir/rust-ast-lower-extern.h (ASTLoweringExternItem::visit):
+ 	Avoid discarding location of wildcard patterns.
+ 	* lex/rust-token.cc: Include "rust-ast.h".
+ 	(Token::make_identifier): Add overload accepting an Identifier
+ 	instance.
+ 	* lex/rust-token.h (class Identifier): Add forward declaration
+ 	in order to...
+ 	(Token::make_identifier): ...declare an overload for this static
+ 	member function.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* hir/tree/rust-hir-expr.h: New classes.
+ 	* hir/tree/rust-hir-full-decls.h: Likewise.
+ 	* hir/tree/rust-hir.cc: Handle AnonConst and ConstBlock.
+ 	* backend/rust-compile-block.cc: Likewise.
+ 	* backend/rust-compile-block.h: Likewise.
+ 	* backend/rust-compile-expr.cc (CompileExpr::visit): Likewise.
+ 	* backend/rust-compile-expr.h: Likewise.
+ 	* checks/errors/borrowck/rust-bir-builder-expr-stmt.cc (ExprStmtBuilder::visit): Likewise.
+ 	* checks/errors/borrowck/rust-bir-builder-expr-stmt.h: Likewise.
+ 	* checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h: Likewise.
+ 	* checks/errors/borrowck/rust-bir-builder-struct.h: Likewise.
+ 	* checks/errors/borrowck/rust-function-collector.h: Likewise.
+ 	* checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::visit): Likewise.
+ 	* checks/errors/privacy/rust-privacy-reporter.h: Likewise.
+ 	* checks/errors/rust-const-checker.cc (ConstChecker::visit): Likewise.
+ 	* checks/errors/rust-const-checker.h: Likewise.
+ 	* checks/errors/rust-hir-pattern-analysis.cc (PatternChecker::visit): Likewise.
+ 	* checks/errors/rust-hir-pattern-analysis.h: Likewise.
+ 	* checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): Likewise.
+ 	* checks/errors/rust-unsafe-checker.h: Likewise.
+ 	* hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Likewise.
+ 	(translate_operand_out): Likewise.
+ 	(translate_operand_inout): Likewise.
+ 	(translate_operand_const): Likewise.
+ 	* hir/rust-ast-lower-expr.h: Likewise.
+ 	* hir/rust-hir-dump.cc (Dump::visit): Likewise.
+ 	* hir/rust-hir-dump.h: Likewise.
+ 	* hir/tree/rust-hir-expr-abstract.h: Likewise.
+ 	* hir/tree/rust-hir-expr.cc (AnonConst::AnonConst): Likewise.
+ 	(AnonConst::operator=): Likewise.
+ 	(ConstBlock::ConstBlock): Likewise.
+ 	(ConstBlock::operator=): Likewise.
+ 	* hir/tree/rust-hir-visitor.h:
+ 	* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Likewise.
+ 	(typecheck_inline_asm_operand): Likewise.
+ 	* typecheck/rust-hir-type-check-expr.h: Likewise.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* parse/rust-parse-impl.h (Parser::parse_const_block_expr): New function.
+ 	* parse/rust-parse.h: Declare it.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* ast/rust-expr.h: Declare AnonConst and ConstBlock and use them.
+ 	* ast/rust-ast-full-decls.h: Likewise.
+ 	* ast/rust-ast.cc: Add implementation for AnonConst and ConstBlock.
+ 	* ast/rust-ast.h: Likewise.
+ 	* ast/rust-ast-collector.cc (TokenCollector::visit): Likewise.
+ 	* ast/rust-ast-collector.h: Likewise.
+ 	* ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Likewise.
+ 	* ast/rust-ast-visitor.h: Likewise.
+ 	* expand/rust-derive.h: Likewise.
+ 	* hir/rust-ast-lower-base.cc (ASTLoweringBase::visit): Likewise.
+ 	* hir/rust-ast-lower-base.h: Likewise.
+ 	* hir/rust-ast-lower-expr.cc (translate_operand_const): Likewise.
+ 	* resolve/rust-ast-resolve-base.cc (ResolverBase::visit): Likewise.
+ 	* resolve/rust-ast-resolve-base.h: Likewise.
+ 	* resolve/rust-ast-resolve-expr.h: Likewise.
+ 	* resolve/rust-ast-resolve-expr.cc: Likewise.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* typecheck/rust-coercion.cc (TypeCoercionRules::coerce_unsized): dont emit error here
+ 	* typecheck/rust-unify.cc (UnifyRules::resolve_subtype): new helper to handle emit error
+ 	(UnifyRules::expect_adt): call resolve_subtype
+ 	(UnifyRules::expect_reference): likewise
+ 	(UnifyRules::expect_pointer): likewise
+ 	(UnifyRules::expect_array): likewise
+ 	(UnifyRules::expect_slice): likewise
+ 	(UnifyRules::expect_fndef): likewise
+ 	(UnifyRules::expect_fnptr): likewise
+ 	(UnifyRules::expect_tuple): likewise
+ 	(UnifyRules::expect_closure): likewise
+ 	(UnifyRules::expect_opaque): likeiwse
+ 	* typecheck/rust-unify.h: add new helper to header
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* resolve/rust-default-resolver.cc
+ 	(DefaultResolver::visit_if_let_patterns): New function
+ 	definition.
+ 	(DefaultResolver::visit): New IfLetExpr visitor definition.
+ 	* resolve/rust-default-resolver.h
+ 	(DefaultResolver::visit_if_let_patterns): New function
+ 	declaration.
+ 	(DefaultResolver::visit): New IfLetExpr visitor declaration.
+ 	* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Remove
+ 	IfLetExpr visitor definition.
+ 	(Late::visit_if_let_patterns): New function definition.
+ 	* resolve/rust-late-name-resolver-2.0.h (Late::visit): Remove
+ 	IfLetExpr visitor declaration.
+ 	(Late::visit_if_let_patterns): New function declaration.
+ 	* resolve/rust-name-resolution-context.h (BindingSource::IfLet):
+ 	New enumerator.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* backend/rust-compile-type.cc (TyTyResolveCompile::visit): we need to resolve the
+ 	underlying type
+ 	* typecheck/rust-substitution-mapper.cc (SubstMapperInternal::visit): just clone
+ 	* typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit):
+ 	ensure we monomphize to get the underlying
+ 	* typecheck/rust-tyty.cc (BaseType::destructure): handle opaque types
+ 	(OpaqueType::resolve): this is much simpler now
+ 	(OpaqueType::handle_substitions): no longer needed
+ 	* typecheck/rust-tyty.h: update header
+ 	* typecheck/rust-unify.cc (UnifyRules::expect_opaque): unify rules for opaque
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* backend/rust-compile-type.cc (TyTyResolveCompile::visit): use get_name
+ 	* typecheck/rust-tyty.cc (TupleType::get_name): likewise
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::check_base_type_privacy):
+ 	no need for unreachable here
+ 	* typecheck/rust-unify.cc (UnifyRules::commit): dont clone infer vars
+ 	(UnifyRules::expect_inference_variable): likewise
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* typecheck/rust-hir-type-check.h: new function
+ 	* typecheck/rust-typecheck-context.cc (TypeCheckContext::compute_inference_variables):
+ 	call the new helper
+ 	(TypeCheckContext::compute_infer_var): refactored code
+ 
+ 2025-08-05  Tom Schollenberger  <tss2344@g.rit.edu>
+ 
+ 	* resolve/rust-early-name-resolver-2.0.cc (Early::visit_attributes): rust_assert to if
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* parse/rust-parse-impl.h (Parser::parse_expr_stmt): Avoid
+ 	reference binding and remove std::move in return statements.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* ast/rust-ast-visitor.cc
+ 	(DefaultASTVisitor::visit): Only visit the path of an instance
+ 	of Visibility if the instance has a path.
+ 	* ast/rust-ast.h
+ 	(SimplePath::SimplePath): Make sure constructors are explicit.
+ 	* resolve/rust-early-name-resolver-2.0.cc
+ 	(Early::visit_attributes): Pass entire paths to
+ 	NameResolutionContext::resolve_path.
+ 	(Early::visit): Likewise and avoid copying a path.
+ 	* resolve/rust-forever-stack.hxx
+ 	(ForeverStack::resolve_path): Assert that at least one path
+ 	segment has been passed in.
+ 
+ 2025-08-05  Marc Poulhiès  <dkm@kataplop.net>
+ 
+ 	* rust-attribs.cc (handle_hot_attribute): Remove clang-format comment.
+ 
+ 2025-08-05  Marc Poulhiès  <dkm@kataplop.net>
+ 
+ 	* ast/rust-ast-builder-type.cc (ASTTypeBuilder::visit): Reindent.
+ 	* ast/rust-ast-builder.cc (Builder::new_generic_args): Likewise.
+ 	* ast/rust-ast-collector.cc (TokenCollector::visit): Likewise.
+ 	* ast/rust-ast-dump.h (debug): Likewise.
+ 	* ast/rust-ast-formatting.h (indent_spaces): Likewise.
+ 	(get_string_in_delims): Likewise.
+ 	(get_mode_dump_desc): Likewise.
+ 	(append_attributes): Likewise.
+ 	(unquote_string): Likewise.
+ 	* ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Likewise.
+ 	* ast/rust-ast.cc (Attribute::get_traits_to_derive): Likewise.
+ 	(UseTreeGlob::as_string): Likewise.
+ 	(UseTreeList::as_string): Likewise.
+ 	(AttributeParser::parse_path_meta_item): Likewise.
+ 	(FormatArgs::set_outer_attrs): Likewise.
+ 	* ast/rust-ast.h (operator<<): Likewise.
+ 	* ast/rust-cond-compilation.h: Likewise.
+ 	* ast/rust-desugar-apit.cc: Likewise.
+ 	* ast/rust-fmt.h (collect_pieces): Likewise.
+ 	(clone_pieces): Likewise.
+ 	* ast/rust-pattern.h (tokenid_to_rangekind): Likewise.
+ 	* backend/rust-compile-context.cc (Context::type_hasher): Likewise.
+ 	* backend/rust-compile-expr.cc (CompileExpr::visit): Likewise.
+ 	* backend/rust-compile-intrinsic.cc (get_identifier): Likewise.
+ 	(offset_handler): Likewise.
+ 	(sizeof_handler): Likewise.
+ 	(transmute_handler): Likewise.
+ 	(rotate_handler): Likewise.
+ 	(wrapping_op_handler_inner): Likewise.
+ 	(op_with_overflow_inner): Likewise.
+ 	(uninit_handler): Likewise.
+ 	(move_val_init_handler): Likewise.
+ 	(assume_handler): Likewise.
+ 	(discriminant_value_handler): Likewise.
+ 	(variant_count_handler): Likewise.
+ 	(prefetch_data_handler): Likewise.
+ 	(atomic_store_handler_inner): Likewise.
+ 	(atomic_load_handler_inner): Likewise.
+ 	(unchecked_op_inner): Likewise.
+ 	(copy_handler_inner): Likewise.
+ 	(expect_handler_inner): Likewise.
+ 	(try_handler_inner): Likewise.
+ 	* backend/rust-compile-pattern.cc (compile_range_pattern_bound): Likewise.
+ 	(CompilePatternCheckExpr::visit): Likewise.
+ 	(CompilePatternBindings::visit): Likewise.
+ 	(CompilePatternLet::visit): Likewise.
+ 	* backend/rust-compile-var-decl.h: Likewise.
+ 	* backend/rust-constexpr.cc (verify_constant): Likewise.
+ 	(find_array_ctor_elt): Likewise.
+ 	(array_index_cmp): Likewise.
+ 	(potential_constant_expression_1): Likewise.
+ 	(unshare_constructor): Likewise.
+ 	(maybe_save_constexpr_fundef): Likewise.
+ 	(returns): Likewise.
+ 	(breaks): Likewise.
+ 	(continues): Likewise.
+ 	(switches): Likewise.
+ 	(constant_value_1): Likewise.
+ 	(decl_constant_value): Likewise.
+ 	(non_const_var_error): Likewise.
+ 	(eval_constant_expression): Likewise.
+ 	(constexpr_fn_retval): Likewise.
+ 	(eval_store_expression): Likewise.
+ 	(eval_call_expression): Likewise.
+ 	(eval_binary_expression): Likewise.
+ 	(get_function_named_in_call): Likewise.
+ 	(eval_statement_list): Likewise.
+ 	(extract_string_elt): Likewise.
+ 	(eval_conditional_expression): Likewise.
+ 	(eval_bit_field_ref): Likewise.
+ 	(eval_loop_expr): Likewise.
+ 	(eval_switch_expr): Likewise.
+ 	(eval_unary_expression): Likewise.
+ 	(get_or_insert_ctor_field): Likewise.
+ 	(eval_and_check_array_index): Likewise.
+ 	* backend/rust-constexpr.h (maybe_save_constexpr_fundef): Likewise.
+ 	* backend/rust-mangle-v0.cc (v0_path): Likewise.
+ 	(v0_complex_type_prefix): Likewise.
+ 	* backend/rust-mangle.h (legacy_mangle_item): Likewise.
+ 	(v0_mangle_item): Likewise.
+ 	* backend/rust-tree.cc (convert_to_void): Likewise.
+ 	(find_parameter_packs_r): Likewise.
+ 	(rs_tree_equal): Likewise.
+ 	(publicly_uniquely_derived_p): Likewise.
+ 	(instantiation_dependent_expression_p): Likewise.
+ 	(type_has_nontrivial_copy_init): Likewise.
+ 	(is_normal_capture_proxy): Likewise.
+ 	(is_bitfield_expr_with_lowered_type): Likewise.
+ 	(undeduced_auto_decl): Likewise.
+ 	(require_deduced_type): Likewise.
+ 	(gt_pch_nx): Likewise.
+ 	(lvalue_kind): Likewise.
+ 	* backend/rust-tree.h (LANG_DECL_MIN_CHECK): Likewise.
+ 	(LANG_DECL_FN_CHECK): Likewise.
+ 	(LANG_DECL_NS_CHECK): Likewise.
+ 	(LANG_DECL_PARM_CHECK): Likewise.
+ 	(LANG_DECL_DECOMP_CHECK): Likewise.
+ 	(resort_type_member_vec): Likewise.
+ 	(convert_to_void): Likewise.
+ 	(mark_discarded_use): Likewise.
+ 	(mark_exp_read): Likewise.
+ 	(mark_use): Likewise.
+ 	(mark_rvalue_use): Likewise.
+ 	(mark_lvalue_use): Likewise.
+ 	(mark_lvalue_use_nonread): Likewise.
+ 	(convert_from_reference): Likewise.
+ 	(maybe_warn_nodiscard): Likewise.
+ 	(expr_loc_or_loc): Likewise.
+ 	(expr_loc_or_input_loc): Likewise.
+ 	(get_fndecl_from_callee): Likewise.
+ 	(pointer_offset_expression): Likewise.
+ 	(is_empty_class): Likewise.
+ 	(is_really_empty_class): Likewise.
+ 	(rs_type_quals): Likewise.
+ 	(init_modules): Likewise.
+ 	(lookup_add): Likewise.
+ 	(ovl_make): Likewise.
+ 	(struct c_fileinfo): Likewise.
+ 	(get_fileinfo): Likewise.
+ 	(cxx_make_type): Likewise.
+ 	(build_cplus_array_type): Likewise.
+ 	(comptypes): Likewise.
+ 	(rs_build_qualified_type_real): Likewise.
+ 	(vector_targets_convertible_p): Likewise.
+ 	(get_class_binding_direct): Likewise.
+ 	(lang_check_failed): Likewise.
+ 	(check_for_uninitialized_const_var): Likewise.
+ 	(cp_fold_maybe_rvalue): Likewise.
+ 	(fold_offsetof): Likewise.
+ 	(fold_non_dependent_expr): Likewise.
+ 	(in_immediate_context): Likewise.
+ 	(cxx_mark_addressable): Likewise.
+ 	(decl_constant_value): Likewise.
+ 	(is_class_type): Likewise.
+ 	(fold_builtin_is_pointer_inverconvertible_with_class): Likewise.
+ 	(c_common_type_for_mode): Likewise.
+ 	(next_common_initial_seqence): Likewise.
+ 	(fold_builtin_is_corresponding_member): Likewise.
+ 	(maybe_constant_value): Likewise.
+ 	(rs_walk_subtrees): Likewise.
+ 	(make_tree_vector): Likewise.
+ 	(release_tree_vector): Likewise.
+ 	(location_of): Likewise.
+ 	(maybe_constant_init): Likewise.
+ 	(explain_invalid_constexpr_fn): Likewise.
+ 	(literal_type_p): Likewise.
+ 	(maybe_constexpr_fn): Likewise.
+ 	(fold_non_dependent_init): Likewise.
+ 	* checks/errors/borrowck/polonius/rust-polonius.h (polonius_run): Likewise.
+ 	(FFIVector__new): Likewise.
+ 	(FFIVector__new_vec_pair): Likewise.
+ 	(FFIVector__new_vec_triple): Likewise.
+ 	(FFIVector__push): Likewise.
+ 	(FFIVector__push_vec_triple): Likewise.
+ 	* checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
+ 	(ExprStmtBuilder::visit): Likewise.
+ 	* checks/errors/borrowck/rust-bir-builder-pattern.cc
+ 	(PatternBindingBuilder::visit): Likewise.
+ 	* checks/errors/borrowck/rust-bir-dump.cc (Dump::visit): Likewise.
+ 	* checks/errors/borrowck/rust-bir-fact-collector.h (points): Likewise.
+ 	* checks/errors/borrowck/rust-bir-place.h: Likewise.
+ 	* checks/errors/borrowck/rust-bir-visitor.h: Likewise.
+ 	* checks/errors/privacy/rust-privacy-check.cc (saw_errors): Likewise.
+ 	* checks/errors/privacy/rust-privacy-ctx.h (rust_privacy_ctx_test): Likewise.
+ 	* checks/errors/privacy/rust-privacy-reporter.cc
+ 	(PrivacyReporter::check_for_privacy_violation): Likewise.
+ 	(PrivacyReporter::check_base_type_privacy): Likewise.
+ 	(PrivacyReporter::visit): Likewise.
+ 	* checks/errors/privacy/rust-reachability.cc (ReachabilityVisitor::visit): Likewise.
+ 	* checks/errors/privacy/rust-visibility-resolver.cc
+ 	(VisibilityResolver::resolve_visibility): Likewise.
+ 	* checks/errors/rust-hir-pattern-analysis.cc (Constructor::is_covered_by): Likewise.
+ 	(PlaceInfo::specialize): Likewise.
+ 	(WitnessPat::to_string): Likewise.
+ 	(WitnessMatrix::apply_constructor): Likewise.
+ 	(lower_pattern): Likewise.
+ 	(lower_tuple_pattern): Likewise.
+ 	(lower_struct_pattern): Likewise.
+ 	* checks/errors/rust-hir-pattern-analysis.h (check_match_usefulness): Likewise.
+ 	* expand/rust-cfg-strip.cc (CfgStrip::maybe_strip_generic_args): Likewise.
+ 	* expand/rust-derive-eq.cc (DeriveEq::visit_enum): Likewise.
+ 	* expand/rust-derive.cc: Likewise.
+ 	* expand/rust-expand-format-args.cc (expand_format_args): Likewise.
+ 	* expand/rust-expand-visitor.h (is_derive): Likewise.
+ 	(is_builtin): Likewise.
+ 	* expand/rust-macro-builtins-asm.cc (expand_inline_asm_strings): Likewise.
+ 	* expand/rust-macro-builtins-asm.h (parse_asm): Likewise.
+ 	(check_identifier): Likewise.
+ 	(check_and_set): Likewise.
+ 	(parse_label): Likewise.
+ 	(parse_llvm_outputs): Likewise.
+ 	(parse_llvm_inputs): Likewise.
+ 	(parse_llvm_clobbers): Likewise.
+ 	(parse_llvm_options): Likewise.
+ 	* expand/rust-macro-builtins-helpers.h (make_macro_path_str): Likewise.
+ 	(make_token): Likewise.
+ 	(make_string): Likewise.
+ 	(macro_end_token): Likewise.
+ 	(parse_single_string_literal): Likewise.
+ 	(source_relative_path): Likewise.
+ 	(load_file_bytes): Likewise.
+ 	* expand/rust-macro-expand.cc (MacroExpander::match_fragment): Likewise.
+ 	(MacroExpander::match_matcher): Likewise.
+ 	(MacroExpander::match_n_matches): Likewise.
+ 	* expand/rust-macro-substitute-ctx.cc (SubstituteCtx::substitute_token): Likewise.
+ 	* expand/rust-proc-macro.h (load_macros): Likewise.
+ 	(generate_proc_macro_decls_symbol): Likewise.
+ 	* hir/rust-ast-lower-base.cc (ASTLoweringBase::lower_generic_args): Likewise.
+ 	(ASTLoweringBase::lower_range_pattern_bound): Likewise.
+ 	* hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): Likewise.
+ 	* hir/rust-ast-lower-pattern.cc (ASTLoweringPattern::visit): Likewise.
+ 	* hir/rust-ast-lower.h (struct_field_name_exists): Likewise.
+ 	(translate_visibility): Likewise.
+ 	* hir/rust-hir-dump.cc (Dump::visit): Likewise.
+ 	* hir/rust-hir-dump.h (debug): Likewise.
+ 	* hir/tree/rust-hir.cc (UseTreeGlob::as_string): Likewise.
+ 	(UseTreeList::as_string): Likewise.
+ 	* lex/rust-lex.cc (Lexer::parse_escape): Likewise.
+ 	(Lexer::parse_utf8_escape): Likewise.
+ 	* lex/rust-lex.h (rust_input_source_test): Likewise.
+ 	* lex/rust-token.cc (RS_TOKEN_KEYWORD_2015): Likewise.
+ 	* lex/rust-token.h (get_token_description): Likewise.
+ 	(token_id_to_str): Likewise.
+ 	(token_id_is_keyword): Likewise.
+ 	(token_id_keyword_string): Likewise.
+ 	(get_type_hint_string): Likewise.
+ 	(nfc_normalize_token_string): Likewise.
+ 	* metadata/rust-export-metadata.cc (PublicInterface::write_to_path): Likewise.
+ 	* metadata/rust-import-archive.cc: Likewise.
+ 	* metadata/rust-imports.h (add_search_path): Likewise.
+ 	* parse/rust-cfg-parser.h (parse_cfg_option): Likewise.
+ 	(rust_cfg_parser_test): Likewise.
+ 	* parse/rust-parse-impl.h (Parser::skip_generics_right_angle): Likewise.
+ 	(Parser::parse_attr_input): Likewise.
+ 	(Parser::parse_macro_match): Likewise.
+ 	(Parser::parse_visibility): Likewise.
+ 	(Parser::parse_module): Likewise.
+ 	(Parser::parse_use_tree): Likewise.
+ 	(Parser::parse_generic_param): Likewise.
+ 	(Parser::parse_struct): Likewise.
+ 	(Parser::parse_enum_item): Likewise.
+ 	(Parser::parse_inherent_impl_item): Likewise.
+ 	(Parser::parse_external_item): Likewise.
+ 	(Parser::parse_generic_arg): Likewise.
+ 	(Parser::parse_type_path_segment): Likewise.
+ 	(Parser::parse_expr_stmt): Likewise.
+ 	(Parser::parse_if_expr): Likewise.
+ 	(Parser::parse_if_let_expr): Likewise.
+ 	(Parser::parse_type): Likewise.
+ 	(Parser::parse_for_prefixed_type): Likewise.
+ 	(Parser::parse_slice_or_array_type): Likewise.
+ 	(Parser::parse_type_no_bounds): Likewise.
+ 	(Parser::parse_range_pattern_bound): Likewise.
+ 	(Parser::parse_pattern_no_alt): Likewise.
+ 	(Parser::parse_grouped_or_tuple_pattern): Likewise.
+ 	(Parser::parse_ident_leading_pattern): Likewise.
+ 	(Parser::parse_tuple_struct_items): Likewise.
+ 	(Parser::parse_stmt_or_expr): Likewise.
+ 	(Parser::parse_struct_expr_field): Likewise.
+ 	(Parser::null_denotation): Likewise.
+ 	(Parser::left_denotation): Likewise.
+ 	(Parser::parse_closure_expr_pratt): Likewise.
+ 	* parse/rust-parse.cc (peculiar_fragment_match_compatible): Likewise.
+ 	(is_match_compatible): Likewise.
+ 	* parse/rust-parse.h (extract_module_path): Likewise.
+ 	(is_match_compatible): Likewise.
+ 	* resolve/rust-ast-resolve-expr.cc (translate_operand): Likewise.
+ 	* resolve/rust-ast-resolve-item.cc (flatten_glob): Likewise.
+ 	(flatten_rebind): Likewise.
+ 	(flatten_list): Likewise.
+ 	(flatten): Likewise.
+ 	* resolve/rust-ast-resolve-item.h (rust_simple_path_resolve_test): Likewise.
+ 	* resolve/rust-ast-resolve-pattern.cc (PatternDeclaration::visit): Likewise.
+ 	(resolve_range_pattern_bound): Likewise.
+ 	* resolve/rust-ast-resolve-type.cc (ResolveRelativeTypePath::go): Likewise.
+ 	(ResolveTypeToCanonicalPath::visit): Likewise.
+ 	* resolve/rust-ast-resolve.cc (saw_errors): Likewise.
+ 	* resolve/rust-early-name-resolver-2.0.cc (Early::finalize_rebind_import): Likewise.
+ 	* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Likewise.
+ 	* resolve/rust-toplevel-name-resolver-2.0.cc (flatten_glob): Likewise.
+ 	* rust-backend.h (init): Likewise.
+ 	(debug): Likewise.
+ 	(get_identifier_node): Likewise.
+ 	(wchar_type): Likewise.
+ 	(get_pointer_size): Likewise.
+ 	(raw_str_type): Likewise.
+ 	(integer_type): Likewise.
+ 	(float_type): Likewise.
+ 	(pointer_type): Likewise.
+ 	(reference_type): Likewise.
+ 	(immutable_type): Likewise.
+ 	(function_type): Likewise.
+ 	(function_type_variadic): Likewise.
+ 	(function_ptr_type): Likewise.
+ 	(struct_type): Likewise.
+ 	(union_type): Likewise.
+ 	(array_type): Likewise.
+ 	(named_type): Likewise.
+ 	(type_field_offset): Likewise.
+ 	(var_expression): Likewise.
+ 	(float_constant_expression): Likewise.
+ 	(string_constant_expression): Likewise.
+ 	(char_constant_expression): Likewise.
+ 	(wchar_constant_expression): Likewise.
+ 	(boolean_constant_expression): Likewise.
+ 	(convert_expression): Likewise.
+ 	(struct_field_expression): Likewise.
+ 	(compound_expression): Likewise.
+ 	(conditional_expression): Likewise.
+ 	(negation_expression): Likewise.
+ 	(arithmetic_or_logical_expression): Likewise.
+ 	(arithmetic_or_logical_expression_checked): Likewise.
+ 	(comparison_expression): Likewise.
+ 	(lazy_boolean_expression): Likewise.
+ 	(constructor_expression): Likewise.
+ 	(array_constructor_expression): Likewise.
+ 	(array_initializer): Likewise.
+ 	(array_index_expression): Likewise.
+ 	(call_expression): Likewise.
+ 	(init_statement): Likewise.
+ 	(assignment_statement): Likewise.
+ 	(return_statement): Likewise.
+ 	(if_statement): Likewise.
+ 	(loop_expression): Likewise.
+ 	(exit_expression): Likewise.
+ 	(statement_list): Likewise.
+ 	(exception_handler_statement): Likewise.
+ 	(block): Likewise.
+ 	(block_add_statements): Likewise.
+ 	(global_variable): Likewise.
+ 	(global_variable_set_init): Likewise.
+ 	(local_variable): Likewise.
+ 	(parameter_variable): Likewise.
+ 	(static_chain_variable): Likewise.
+ 	(temporary_variable): Likewise.
+ 	(label): Likewise.
+ 	(function): Likewise.
+ 	(function_defer_statement): Likewise.
+ 	(function_set_parameters): Likewise.
+ 	(write_global_definitions): Likewise.
+ 	(fill_in_fields): Likewise.
+ 	* rust-diagnostics.cc (expand_format): Likewise.
+ 	(expand_message): Likewise.
+ 	(va_constructor): Likewise.
+ 	* rust-diagnostics.h (RUST_ATTRIBUTE_GCC_DIAG): Likewise.
+ 	(rust_open_quote): Likewise.
+ 	(rust_close_quote): Likewise.
+ 	(rust_debug_loc): Likewise.
+ 	* rust-gcc.cc (non_zero_size_type): Likewise.
+ 	* rust-object-export.h (rust_field_alignment): Likewise.
+ 	(rust_read_export_data): Likewise.
+ 	(rust_write_export_data): Likewise.
+ 	* rust-session-manager.cc (saw_errors): Likewise.
+ 	(rust_get_linemap): Likewise.
+ 	(validate_crate_name): Likewise.
+ 	(Session::load_extern_crate): Likewise.
+ 	* rust-session-manager.h (rust_crate_name_validation_test): Likewise.
+ 	* rust-system.h (rust_preserve_from_gc): Likewise.
+ 	(rust_localize_identifier): Likewise.
+ 	* rust-target.h (rust_add_target_info): Likewise.
+ 	* typecheck/rust-autoderef.cc:
+ 	* typecheck/rust-casts.cc (TypeCastRules::cast_rules): Likewise.
+ 	* typecheck/rust-coercion.cc (TypeCoercionRules::do_coercion): Likewise.
+ 	(TypeCoercionRules::coerce_unsafe_ptr): Likewise.
+ 	(TypeCoercionRules::coerce_borrowed_pointer): Likewise.
+ 	* typecheck/rust-hir-trait-resolve.cc (TraitResolver::resolve_trait): Likewise.
+ 	(TraitItemReference::is_object_safe): Likewise.
+ 	* typecheck/rust-hir-type-check-base.cc (TypeCheckBase::resolve_literal): Likewise.
+ 	* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Likewise.
+ 	(typecheck_inline_asm_operand): Likewise.
+ 	* typecheck/rust-hir-type-check-implitem.cc (TypeCheckImplItem::visit): Likewise.
+ 	(TypeCheckImplItemWithTrait::visit): Likewise.
+ 	* typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): Likewise.
+ 	* typecheck/rust-hir-type-check-struct.cc (TypeCheckStructExpr::visit): Likewise.
+ 	* typecheck/rust-hir-type-check-type.cc
+ 	(TypeResolveGenericParam::apply_trait_bounds): Likewise.
+ 	(ResolveWhereClauseItem::visit): Likewise.
+ 	* typecheck/rust-hir-type-check.cc (saw_errors): Likewise.
+ 	(TraitItemReference::get_type_from_fn): Likewise.
+ 	* typecheck/rust-type-util.h (query_type): Likewise.
+ 	(types_compatable): Likewise.
+ 	(unify_site): Likewise.
+ 	(unify_site_and): Likewise.
+ 	(coercion_site): Likewise.
+ 	(try_coercion): Likewise.
+ 	(cast_site): Likewise.
+ 	* typecheck/rust-tyty-bounds.cc:
+ 	* typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): Likewise.
+ 	* typecheck/rust-tyty-cmp.h:
+ 	* typecheck/rust-tyty-variance-analysis.h (query_field_regions): Likewise.
+ 	* typecheck/rust-tyty.cc (BaseType::is_unit): Likewise.
+ 	(BaseType::has_substitutions_defined): Likewise.
+ 	(BaseType::needs_generic_substitutions): Likewise.
+ 	(BaseType::get_subst_argument_mappings): Likewise.
+ 	(InferType::default_type): Likewise.
+ 	(InferType::apply_primitive_type_hint): Likewise.
+ 	* typecheck/rust-tyty.h (is_primitive_type_kind): Likewise.
+ 	* typecheck/rust-unify.cc (UnifyRules::expect_inference_variable): Likewise.
+ 	(UnifyRules::expect_adt): Likewise.
+ 	(UnifyRules::expect_str): Likewise.
+ 	(UnifyRules::expect_reference): Likewise.
+ 	(UnifyRules::expect_pointer): Likewise.
+ 	(UnifyRules::expect_param): Likewise.
+ 	(UnifyRules::expect_array): Likewise.
+ 	(UnifyRules::expect_slice): Likewise.
+ 	(UnifyRules::expect_fndef): Likewise.
+ 	(UnifyRules::expect_fnptr): Likewise.
+ 	(UnifyRules::expect_tuple): Likewise.
+ 	(UnifyRules::expect_bool): Likewise.
+ 	(UnifyRules::expect_char): Likewise.
+ 	(UnifyRules::expect_int): Likewise.
+ 	(UnifyRules::expect_uint): Likewise.
+ 	(UnifyRules::expect_float): Likewise.
+ 	(UnifyRules::expect_isize): Likewise.
+ 	(UnifyRules::expect_usize): Likewise.
+ 	(UnifyRules::expect_never): Likewise.
+ 	(UnifyRules::expect_placeholder): Likewise.
+ 	(UnifyRules::expect_projection): Likewise.
+ 	(UnifyRules::expect_dyn): Likewise.
+ 	(UnifyRules::expect_closure): Likewise.
+ 	(UnifyRules::expect_opaque): Likewise.
+ 	* util/rust-abi.h (get_abi_from_string): Likewise.
+ 	(get_string_from_abi): Likewise.
+ 	* util/rust-attributes.cc (check_doc_attribute): Likewise.
+ 	* util/rust-base62.h (base62_integer): Likewise.
+ 	* util/rust-dir-owner.h (get_file_subdir): Likewise.
+ 	* util/rust-edition.h (get_rust_edition): Likewise.
+ 	* util/rust-punycode.h (encode_punycode): Likewise.
+ 	(rust_punycode_encode_test): Likewise.
+ 	* util/rust-token-converter.cc (convert): Likewise.
+ 	(from_tokenstream): Likewise.
+ 	* util/rust-token-converter.h (convert): Likewise.
+ 	(convert_literal): Likewise.
+ 	* util/rust-unicode.h (is_alphabetic): Likewise.
+ 	(is_ascii_only): Likewise.
+ 	(is_numeric): Likewise.
+ 	(is_nfc_qc_no): Likewise.
+ 	(is_nfc_qc_maybe): Likewise.
+ 	(nfc_quick_check): Likewise.
+ 	(rust_nfc_qc_test): Likewise.
+ 	(rust_utf8_normalize_test): Likewise.
+ 	(rust_utf8_property_test): Likewise.
+ 	* util/rust-unwrap-segment.h (unwrap_segment_node_id): Likewise.
+ 
+ 2025-08-05  Marc Poulhiès  <dkm@kataplop.net>
+ 
+ 	* Make-lang.in (GRS_OBJS): Remove rust-macro.o.
+ 	* ast/rust-macro.cc: Removed.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* parse/rust-parse-impl.h
+ 	(Parser::parse_attr_input): Handle more delimeter tokens and the
+ 	END_OF_FILE token.
+ 	(Parser::skip_after_end_attribute): Handle the END_OF_FILE
+ 	token.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* hir/rust-ast-lower-item.cc
+ 	(ASTLoweringItem::visit): Keep going after a duplicate field is
+ 	found.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* checks/errors/borrowck/rust-bir-builder-internal.h: Include
+ 	"rust-immutable-name-resolution-context.h" and "options.h".
+ 	(AbstractBuilder::resolve_label): Use the 2.0 name resolver when
+ 	it's enabled.
+ 	(AbstractBuilder::resolve_variable): Likewise.
+ 	(AbstractBuilder::resolve_variable_or_fn): Likewise.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* expand/rust-derive-default.cc (DeriveDefault::visit_struct): use builder
+ 	(DeriveDefault::visit_tuple): likewise
+ 	* expand/rust-derive-eq.cc (DeriveEq::visit_tuple): likewise
+ 	(DeriveEq::visit_struct): likewise
+ 	(DeriveEq::visit_enum): likewise
+ 	(DeriveEq::visit_union): likewise
+ 
+ 2025-08-05  Marc Poulhiès  <dkm@kataplop.net>
+ 
+ 	PR rust/120018
+ 	* rust-attribs.cc (handle_noreturn_attribute): Reindent declaration.
+ 	(handle_leaf_attribute): Likewise.
+ 	(handle_const_attribute): Likewise.
+ 	(handle_malloc_attribute): Likewise.
+ 	(handle_pure_attribute): Likewise.
+ 	(handle_novops_attribute): Likewise.
+ 	(handle_nonnull_attribute): Likewise.
+ 	(handle_nothrow_attribute): Likewise.
+ 	(handle_type_generic_attribute): Likewise.
+ 	(handle_transaction_pure_attribute): Likewise.
+ 	(handle_returns_twice_attribute): Likewise.
+ 	(handle_fnspec_attribute): Likewise.
+ 	(handle_omp_declare_simd_attribute): Likewise.
+ 	(handle_cold_attribute): New.
+ 	(handle_hot_attribute): New.
+ 	(attribute_spec::exclusions attr_cold_hot_exclusions): New.
+ 	(grs_langhook_common_attributes): Make it static.
+ 	(grs_langhook_common_attribute_table): New.
+ 	(grs_langhook_gnu_attributes): New.
+ 	(grs_langhook_gnu_attribute_table): New.
+ 	(handle_malloc_attribute): Make it static.
+ 	(handle_fnspec_attribute): Likewise.
+ 	(handle_pure_attribute): Replace gcc_assert by explicit warning.
+ 	(handle_novops_attribute): Likewise.
+ 	(handle_nothrow_attribute): Likewise.
+ 	(handle_returns_twice_attribute): Likewise.
+ 	(handle_omp_declare_simd_attribute): Likewise and make it static.
+ 	* rust-lang.cc (grs_langhook_gnu_attribute_table): New.
+ 	(grs_langhook_common_attribute_table): Adjust type to new hook.
+ 	(LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Remove.
+ 	(LANG_HOOKS_ATTRIBUTE_TABLE): New.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* ast/rust-path.cc
+ 	(TypePath::make_debug_string): Add definition.
+ 	* ast/rust-path.h
+ 	(TypePath::make_debug_string): Add declaration.
+ 	* resolve/rust-default-resolver.cc
+ 	(DefaultResolver::visit): Adjust InherentImpl and TraitImpl
+ 	visitors to better handle associated item scope.
+ 	* resolve/rust-default-resolver.h
+ 	(DefaultResolver::maybe_insert_big_self): Add.
+ 	* resolve/rust-late-name-resolver-2.0.cc
+ 	(Late::visit): Adjust type path resolution errors.
+ 	* resolve/rust-rib.h
+ 	(Rib::Kind): Add Generics kind.
+ 	* resolve/rust-toplevel-name-resolver-2.0.cc
+ 	(TopLevel::visit): Remove InherentImpl and TraitImpl visitor
+ 	overrides.
+ 	(TopLevel::maybe_insert_big_self): Add override in order to add
+ 	a definition of 'Self'.
+ 	* resolve/rust-toplevel-name-resolver-2.0.h
+ 	(TopLevel::visit): Remove InherentImpl and TraitImpl visitor
+ 	overrides.
+ 	(TopLevel::maybe_insert_big_self): Add override.
+ 
+ 2025-08-05  0xn4utilus  <gyanendrabanjare8@gmail.com>
+ 
+ 	* ast/rust-ast-collector.cc (TokenCollector::visit): Implement for InlineAsm.
+ 	* ast/rust-ast-full-decls.h (enum class): Move InlineAsmOption enum inside InlineAsm.
+ 	* ast/rust-expr.h (enum class): Likewise.
+ 	(class InlineAsm): Likewise.
+ 	* expand/rust-macro-builtins-asm.cc (check_and_set): Likewise.
+ 	(parse_options): Likewise.
+ 	* expand/rust-macro-builtins-asm.h (check_and_set): Likewise.
+ 	* hir/tree/rust-hir-expr.cc (InlineAsm::InlineAsm): Likewise.
+ 	* hir/tree/rust-hir-expr.h: Likewise.
+ 	* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Likewise.
+ 
+ 2025-08-05  Tom Schollenberger  <tss2344@g.rit.edu>
+ 
+ 	* backend/rust-constexpr.cc (eval_constant_expression):  Check if t is a NULL_TREE
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* ast/rust-desugar-apit.cc: track if this is a impl-trait generic
+ 	* ast/rust-item.h (class TypeParam): add field to track if from impl trait
+ 	* hir/rust-ast-lower-type.cc (ASTLowerGenericParam::visit): likewise
+ 	* hir/tree/rust-hir-item.cc (TypeParam::TypeParam): upate hir as well
+ 	(TypeParam::operator=): likewise
+ 	* hir/tree/rust-hir-item.h (class TypeParam): likewise
+ 	* typecheck/rust-tyty-subst.cc (SubstitutionParamMapping::get_generic_param): add error
+ 	* typecheck/rust-tyty-subst.h: add const getter for the associated TypeParm
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* ast/rust-ast-visitor.cc
+ 	(DefaultASTVisitor::visit): Make call to EnumItem visitor from
+ 	EnumItem derived class visitors non-virtual.
+ 	* ast/rust-collect-lang-items.cc
+ 	(CollectLangItems::visit): Handle visitation of classes derived
+ 	from EnumItem.
+ 	* ast/rust-collect-lang-items.h
+ 	(CollectLangItems::visit): Likewise.
+ 	* resolve/rust-toplevel-name-resolver-2.0.cc
+ 	(TopLevel::visit): Call DefaultResolver::visit on EnumItem
+ 	instances.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* backend/rust-compile-pattern.cc
+ 	(CompilePatternCheckExpr::visit): Fix GENERIC generation in
+ 	light of enum layout changes since this code was written.
+ 	(CompilePatternBindings::handle_struct_pattern_ident_pat):
+ 	Delegate handling of child patterns to another
+ 	CompilePatternBindings::Compile call.
+ 	(CompilePatternBindings::make_struct_access): Make field name
+ 	parameter const qualified.
+ 	* backend/rust-compile-pattern.h
+ 	(CompilePatternBindings::make_struct_access): Likewise.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* resolve/rust-ast-resolve-item.cc
+ 	(ResolveItem::visit): Use the return values of
+ 	CanonicalPath::inherent_impl_seg and
+ 	CanonicalPath::trait_impl_projection_seg more directly.
+ 	* util/rust-canonical-path.h
+ 	(CanonicalPath::trait_impl_projection_seg): Append "<impl "
+ 	instead of "<" to the beginning of the returned path segment.
+ 	(CanonicalPath::inherent_impl_seg): Likewise.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* Make-lang.in: new desugar file
+ 	* ast/rust-ast.cc (ImplTraitTypeOneBound::as_string): its a unique_ptr now
+ 	(FormatArgs::set_outer_attrs): reformat
+ 	* ast/rust-path.h: remove has_generic_args assertion (can be empty because of desugar)
+ 	* ast/rust-type.h (class ImplTraitTypeOneBound): add copy ctor and use unique_ptr
+ 	* hir/rust-ast-lower-type.cc (ASTLoweringType::visit): update to use unique_ptr
+ 	* parse/rust-parse-impl.h (Parser::parse_type): reuse the existing unique_ptr instead
+ 	(Parser::parse_type_no_bounds): likewise
+ 	(Parser::parse_pattern): likewise
+ 	* resolve/rust-ast-resolve-type.cc (ResolveType::visit): its a unique_ptr now
+ 	* rust-session-manager.cc (Session::compile_crate): call desugar
+ 	* ast/rust-desugar-apit.cc: New file.
+ 	* ast/rust-desugar-apit.h: New file.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* hir/rust-ast-lower-implitem.cc (ASTLowerImplItem::visit): allow impl type
+ 	* hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): likewise
+ 	* hir/rust-ast-lower-type.cc (ASTLoweringType::ASTLoweringType): new flag for impl trait
+ 	(ASTLoweringType::translate): pass flag
+ 	(ASTLoweringType::visit): track impl trait tag
+ 	(ASTLoweringType::emit_impl_trait_error): new diagnostic
+ 	* hir/rust-ast-lower-type.h: add new field
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* expand/rust-derive-partial-eq.cc (DerivePartialEq::match_enum_tuple): Remove debug call.
+ 	(DerivePartialEq::match_enum_struct): Add proper implementation.
+ 	(DerivePartialEq::visit_enum): Call it.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* ast/rust-ast-builder.cc (Builder::struct_pattern_ident_pattern): New.
+ 	* ast/rust-ast-builder.h: New declaration.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* backend/rust-compile-pattern.cc (CompilePatternBindings::make_struct_access):
+ 	New function.
+ 	(CompilePatternBindings::visit): Properly implement patterns mentioned above
+ 	and call make_struct_accesss.
+ 	* backend/rust-compile-pattern.h: New declaration.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* backend/rust-compile-pattern.h: Split struct pattern compilation into three functions.
+ 	* backend/rust-compile-pattern.cc: Implement them.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* resolve/rust-late-name-resolver-2.0.cc (Late::Late): False initialize the
+ 	funny_error field.
+ 
  2025-07-25  David Malcolm  <dmalcolm@redhat.com>
  
  	* resolve/rust-ice-finalizer.cc: Update usage of "diagnostic_info"
diff -Nrcpad gcc-16-20250803/gcc/rust/Make-lang.in gcc-16-20250810/gcc/rust/Make-lang.in
*** gcc-16-20250803/gcc/rust/Make-lang.in	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/Make-lang.in	Sun Aug 10 22:32:08 2025
*************** GRS_OBJS = \
*** 73,78 ****
--- 73,81 ----
      rust/rust-lex.o \
      rust/rust-cfg-parser.o \
      rust/rust-parse.o \
+     rust/rust-parse-impl-proc-macro.o \
+     rust/rust-parse-impl-macro.o \
+     rust/rust-parse-impl-lexer.o \
      rust/rust-ast.o \
      rust/rust-ast-formatting.o \
      rust/rust-path.o \
*************** GRS_OBJS = \
*** 81,86 ****
--- 84,90 ----
      rust/rust-ast-dump.o \
      rust/rust-ast-collector.o \
      rust/rust-ast-visitor.o \
+     rust/rust-hir-visitor.o \
      rust/rust-hir-dump.o \
      rust/rust-session-manager.o \
      rust/rust-compile.o \
*************** GRS_OBJS = \
*** 92,105 ****
      rust/rust-cfg-strip.o \
      rust/rust-expand-visitor.o \
      rust/rust-ast-builder.o \
-     rust/rust-ast-builder-type.o \
      rust/rust-derive.o \
      rust/rust-derive-clone.o \
      rust/rust-derive-copy.o \
      rust/rust-derive-debug.o \
      rust/rust-derive-default.o \
      rust/rust-derive-partial-eq.o \
      rust/rust-derive-eq.o \
      rust/rust-derive-hash.o \
      rust/rust-proc-macro.o \
      rust/rust-macro-invoc-lexer.o \
--- 96,110 ----
      rust/rust-cfg-strip.o \
      rust/rust-expand-visitor.o \
      rust/rust-ast-builder.o \
      rust/rust-derive.o \
+     rust/rust-derive-cmp-common.o \
      rust/rust-derive-clone.o \
      rust/rust-derive-copy.o \
      rust/rust-derive-debug.o \
      rust/rust-derive-default.o \
      rust/rust-derive-partial-eq.o \
      rust/rust-derive-eq.o \
+     rust/rust-derive-ord.o \
      rust/rust-derive-hash.o \
      rust/rust-proc-macro.o \
      rust/rust-macro-invoc-lexer.o \
*************** GRS_OBJS = \
*** 113,118 ****
--- 118,124 ----
      rust/rust-macro-builtins-log-debug.o \
      rust/rust-macro-builtins-test-bench.o \
      rust/rust-macro-builtins-format-args.o \
+     rust/rust-macro-builtins-offset-of.o \
      rust/rust-macro-builtins-location.o \
      rust/rust-macro-builtins-include.o \
      rust/rust-token-tree-desugar.o \
*************** GRS_OBJS = \
*** 123,129 ****
      rust/rust-keyword-values.o \
      rust/rust-abi.o \
      rust/rust-token-converter.o \
-     rust/rust-macro.o \
      rust/rust-ast-lower.o \
      rust/rust-ast-lower-base.o \
      rust/rust-ast-lower-pattern.o \
--- 129,134 ----
*************** GRS_OBJS = \
*** 204,209 ****
--- 209,215 ----
      rust/rust-lint-marklive.o \
      rust/rust-lint-unused-var.o \
      rust/rust-readonly-check.o \
+     rust/rust-readonly-check2.o \
      rust/rust-hir-type-check-path.o \
      rust/rust-unsafe-checker.o \
      rust/rust-hir-pattern-analysis.o \
*************** GRS_OBJS = \
*** 237,247 ****
--- 243,258 ----
      rust/rust-punycode.o \
      rust/rust-unwrap-segment.o \
      rust/rust-edition.o \
+     rust/rust-ggc.o \
  	rust/rust-expand-format-args.o \
  	rust/rust-lang-item.o \
  	rust/rust-collect-lang-items.o \
+ 	rust/rust-expression-yeast.o \
  	rust/rust-desugar-for-loops.o \
+ 	rust/rust-desugar-while-let.o \
  	rust/rust-desugar-question-mark.o \
+ 	rust/rust-desugar-apit.o \
+ 	rust/rust-desugar-try-block.o \
      $(END)
  # removed object files from here
  
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-ast-builder-type.cc gcc-16-20250810/gcc/rust/ast/rust-ast-builder-type.cc
*** gcc-16-20250803/gcc/rust/ast/rust-ast-builder-type.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-ast-builder-type.cc	Thu Jan  1 00:00:00 1970
***************
*** 1,163 ****
- // Copyright (C) 2020-2024 Free Software Foundation, Inc.
- 
- // This file is part of GCC.
- 
- // GCC is free software; you can redistribute it and/or modify it under
- // the terms of the GNU General Public License as published by the Free
- // Software Foundation; either version 3, or (at your option) any later
- // version.
- 
- // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
- // WARRANTY; without even the implied warranty of MERCHANTABILITY or
- // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- // for more details.
- 
- // You should have received a copy of the GNU General Public License
- // along with GCC; see the file COPYING3.  If not see
- // <http://www.gnu.org/licenses/>.
- 
- #include "rust-ast-builder-type.h"
- #include "rust-ast-builder.h"
- #include "rust-ast-full.h"
- #include "rust-common.h"
- 
- namespace Rust {
- namespace AST {
- 
- ASTTypeBuilder::ASTTypeBuilder () : translated (nullptr) {}
- 
- Type *
- ASTTypeBuilder::build (Type &type)
- {
-   ASTTypeBuilder builder;
-   type.accept_vis (builder);
-   rust_assert (builder.translated != nullptr);
-   return builder.translated;
- }
- 
- void
- ASTTypeBuilder::visit (BareFunctionType &fntype)
- {
-   /* TODO */
- }
- 
- void
- ASTTypeBuilder::visit (TupleType &tuple)
- {
-   std::vector<std::unique_ptr<Type> > elems;
-   for (auto &elem : tuple.get_elems ())
-     {
-       Type *t = ASTTypeBuilder::build (*elem.get ());
-       std::unique_ptr<Type> ty (t);
-       elems.push_back (std::move (ty));
-     }
-   translated = new TupleType (std::move (elems), tuple.get_locus ());
- }
- 
- void
- ASTTypeBuilder::visit (TypePath &path)
- {
-   std::vector<std::unique_ptr<TypePathSegment> > segments;
-   for (auto &seg : path.get_segments ())
-     {
-       switch (seg->get_type ())
- 	{
- 	  case TypePathSegment::REG: {
- 	    const TypePathSegment &segment
- 	      = (const TypePathSegment &) (*seg.get ());
- 	    TypePathSegment *s
- 	      = new TypePathSegment (segment.get_ident_segment (),
- 				     segment.get_separating_scope_resolution (),
- 				     segment.get_locus ());
- 	    std::unique_ptr<TypePathSegment> sg (s);
- 	    segments.push_back (std::move (sg));
- 	  }
- 	  break;
- 
- 	  case TypePathSegment::GENERIC: {
- 	    TypePathSegmentGeneric &generic
- 	      = (TypePathSegmentGeneric &) (*seg.get ());
- 
- 	    GenericArgs args
- 	      = Builder::new_generic_args (generic.get_generic_args ());
- 	    TypePathSegmentGeneric *s
- 	      = new TypePathSegmentGeneric (generic.get_ident_segment (), false,
- 					    std::move (args),
- 					    generic.get_locus ());
- 	    std::unique_ptr<TypePathSegment> sg (s);
- 	    segments.push_back (std::move (sg));
- 	  }
- 	  break;
- 
- 	  case TypePathSegment::FUNCTION: {
- 	    rust_unreachable ();
- 	    // TODO
- 	    // const TypePathSegmentFunction &fn
- 	    //   = (const TypePathSegmentFunction &) (*seg.get ());
- 	  }
- 	  break;
- 	}
-     }
- 
-   translated = new TypePath (std::move (segments), path.get_locus (),
- 			     path.has_opening_scope_resolution_op ());
- }
- 
- void
- ASTTypeBuilder::visit (QualifiedPathInType &path)
- {
-   /* TODO */
- }
- 
- void
- ASTTypeBuilder::visit (ArrayType &type)
- {
-   /* TODO */
- }
- 
- void
- ASTTypeBuilder::visit (ReferenceType &type)
- {
-   /* TODO */
- }
- 
- void
- ASTTypeBuilder::visit (RawPointerType &type)
- {
-   /* TODO */
- }
- 
- void
- ASTTypeBuilder::visit (SliceType &type)
- {
-   Type *t = ASTTypeBuilder::build (type.get_elem_type ());
-   std::unique_ptr<Type> ty (t);
-   translated = new SliceType (std::move (ty), type.get_locus ());
- }
- 
- void
- ASTTypeBuilder::visit (InferredType &type)
- {
-   translated = new InferredType (type.get_locus ());
- }
- 
- void
- ASTTypeBuilder::visit (NeverType &type)
- {
-   translated = new NeverType (type.get_locus ());
- }
- 
- void
- ASTTypeBuilder::visit (TraitObjectTypeOneBound &type)
- {
-   /* TODO */
- }
- 
- void
- ASTTypeBuilder::visit (TraitObjectType &type)
- {
-   /* TODO */
- }
- 
- } // namespace AST
- } // namespace Rust
--- 0 ----
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-ast-builder-type.h gcc-16-20250810/gcc/rust/ast/rust-ast-builder-type.h
*** gcc-16-20250803/gcc/rust/ast/rust-ast-builder-type.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-ast-builder-type.h	Thu Jan  1 00:00:00 1970
***************
*** 1,57 ****
- // Copyright (C) 2020-2024 Free Software Foundation, Inc.
- 
- // This file is part of GCC.
- 
- // GCC is free software; you can redistribute it and/or modify it under
- // the terms of the GNU General Public License as published by the Free
- // Software Foundation; either version 3, or (at your option) any later
- // version.
- 
- // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
- // WARRANTY; without even the implied warranty of MERCHANTABILITY or
- // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- // for more details.
- 
- // You should have received a copy of the GNU General Public License
- // along with GCC; see the file COPYING3.  If not see
- // <http://www.gnu.org/licenses/>.
- 
- #ifndef RUST_AST_BUILDER_TYPE
- #define RUST_AST_BUILDER_TYPE
- 
- #include "rust-ast-visitor.h"
- 
- namespace Rust {
- namespace AST {
- 
- class ASTTypeBuilder : public DefaultASTVisitor
- {
- protected:
-   using DefaultASTVisitor::visit;
- 
- public:
-   static Type *build (Type &type);
- 
-   void visit (BareFunctionType &fntype) override;
-   void visit (TupleType &tuple) override;
-   void visit (TypePath &path) override;
-   void visit (QualifiedPathInType &path) override;
-   void visit (ArrayType &type) override;
-   void visit (ReferenceType &type) override;
-   void visit (RawPointerType &type) override;
-   void visit (SliceType &type) override;
-   void visit (InferredType &type) override;
-   void visit (NeverType &type) override;
-   void visit (TraitObjectTypeOneBound &type) override;
-   void visit (TraitObjectType &type) override;
- 
- private:
-   ASTTypeBuilder ();
- 
-   Type *translated;
- };
- 
- } // namespace AST
- } // namespace Rust
- 
- #endif // RUST_AST_BUILDER_TYPE
--- 0 ----
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-ast-builder.cc gcc-16-20250810/gcc/rust/ast/rust-ast-builder.cc
*** gcc-16-20250803/gcc/rust/ast/rust-ast-builder.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-ast-builder.cc	Sun Aug 10 22:32:08 2025
***************
*** 18,24 ****
  
  #include "rust-ast-builder.h"
  #include "optional.h"
- #include "rust-ast-builder-type.h"
  #include "rust-ast.h"
  #include "rust-common.h"
  #include "rust-expr.h"
--- 18,23 ----
***************
*** 29,35 ****
  #include "rust-pattern.h"
  #include "rust-system.h"
  #include "rust-token.h"
- #include <memory>
  
  namespace Rust {
  namespace AST {
--- 28,33 ----
*************** Builder::block () const
*** 332,337 ****
--- 330,341 ----
  }
  
  std::unique_ptr<BlockExpr>
+ Builder::block (std::unique_ptr<Expr> &&tail_expr) const
+ {
+   return block (tl::nullopt, std::move (tail_expr));
+ }
+ 
+ std::unique_ptr<BlockExpr>
  Builder::block (std::vector<std::unique_ptr<Stmt>> &&stmts,
  		std::unique_ptr<Expr> &&tail_expr) const
  {
*************** Builder::field_access (std::unique_ptr<E
*** 442,447 ****
--- 446,459 ----
      new FieldAccessExpr (std::move (instance), field, {}, loc));
  }
  
+ std::unique_ptr<StructPatternField>
+ Builder::struct_pattern_ident_pattern (std::string field_name,
+ 				       std::unique_ptr<Pattern> &&pattern)
+ {
+   return std::make_unique<StructPatternFieldIdentPat> (
+     field_name, std::move (pattern), std::vector<Attribute> (), loc);
+ }
+ 
  std::unique_ptr<Pattern>
  Builder::wildcard () const
  {
*************** MatchCase
*** 482,490 ****
  Builder::match_case (std::unique_ptr<Pattern> &&pattern,
  		     std::unique_ptr<Expr> &&expr)
  {
!   return MatchCase (match_arm (std::move (pattern)), std::move (expr));
  }
  
  std::unique_ptr<Expr>
  Builder::loop (std::vector<std::unique_ptr<Stmt>> &&stmts)
  {
--- 494,507 ----
  Builder::match_case (std::unique_ptr<Pattern> &&pattern,
  		     std::unique_ptr<Expr> &&expr)
  {
!   return match_case (match_arm (std::move (pattern)), std::move (expr));
  }
  
+ MatchCase
+ Builder::match_case (MatchArm &&arm, std::unique_ptr<Expr> &&expr)
+ {
+   return MatchCase (std::move (arm), std::move (expr));
+ }
  std::unique_ptr<Expr>
  Builder::loop (std::vector<std::unique_ptr<Stmt>> &&stmts)
  {
*************** Builder::generic_type_param (
*** 523,533 ****
  				      std::vector<Attribute> ());
  }
  
! std::unique_ptr<Type>
! Builder::new_type (Type &type)
  {
!   Type *t = ASTTypeBuilder::build (type);
!   return std::unique_ptr<Type> (t);
  }
  
  std::unique_ptr<GenericParam>
--- 540,553 ----
  				      std::vector<Attribute> ());
  }
  
! std::unique_ptr<Stmt>
! Builder::discriminant_value (std::string binding_name, std::string instance)
  {
!   auto intrinsic = ptrify (
!     path_in_expression ({"core", "intrinsics", "discriminant_value"}, true));
! 
!   return let (identifier_pattern (binding_name), nullptr,
! 	      call (std::move (intrinsic), identifier (instance)));
  }
  
  std::unique_ptr<GenericParam>
*************** Builder::new_lifetime_param (LifetimePar
*** 547,552 ****
--- 567,582 ----
  }
  
  std::unique_ptr<GenericParam>
+ Builder::new_const_param (ConstGenericParam &param) const
+ {
+   return std::make_unique<ConstGenericParam> (param.get_name (),
+ 					      param.get_type ().clone_type (),
+ 					      param.get_default_value (),
+ 					      param.get_outer_attrs (),
+ 					      param.get_locus ());
+ }
+ 
+ std::unique_ptr<GenericParam>
  Builder::new_type_param (
    TypeParam &param, std::vector<std::unique_ptr<TypeParamBound>> extra_bounds)
  {
*************** Builder::new_type_param (
*** 557,563 ****
    std::unique_ptr<Type> type = nullptr;
  
    if (param.has_type ())
!     type = new_type (param.get_type ());
  
    for (auto &&extra_bound : extra_bounds)
      type_param_bounds.emplace_back (std::move (extra_bound));
--- 587,593 ----
    std::unique_ptr<Type> type = nullptr;
  
    if (param.has_type ())
!     type = param.get_type ().reconstruct ();
  
    for (auto &&extra_bound : extra_bounds)
      type_param_bounds.emplace_back (std::move (extra_bound));
*************** Builder::new_type_param (
*** 566,572 ****
      {
        switch (b->get_bound_type ())
  	{
! 	  case TypeParamBound::TypeParamBoundType::TRAIT: {
  	    const TraitBound &tb = (const TraitBound &) *b.get ();
  	    const TypePath &path = tb.get_type_path ();
  
--- 596,603 ----
      {
        switch (b->get_bound_type ())
  	{
! 	case TypeParamBound::TypeParamBoundType::TRAIT:
! 	  {
  	    const TraitBound &tb = (const TraitBound &) *b.get ();
  	    const TypePath &path = tb.get_type_path ();
  
*************** Builder::new_type_param (
*** 591,597 ****
  	      {
  		switch (seg->get_type ())
  		  {
! 		    case TypePathSegment::REG: {
  		      const TypePathSegment &segment
  			= (const TypePathSegment &) (*seg.get ());
  		      TypePathSegment *s = new TypePathSegment (
--- 622,629 ----
  	      {
  		switch (seg->get_type ())
  		  {
! 		  case TypePathSegment::REG:
! 		    {
  		      const TypePathSegment &segment
  			= (const TypePathSegment &) (*seg.get ());
  		      TypePathSegment *s = new TypePathSegment (
*************** Builder::new_type_param (
*** 603,609 ****
  		    }
  		    break;
  
! 		    case TypePathSegment::GENERIC: {
  		      TypePathSegmentGeneric &generic
  			= (TypePathSegmentGeneric &) (*seg.get ());
  
--- 635,642 ----
  		    }
  		    break;
  
! 		  case TypePathSegment::GENERIC:
! 		    {
  		      TypePathSegmentGeneric &generic
  			= (TypePathSegmentGeneric &) (*seg.get ());
  
*************** Builder::new_type_param (
*** 617,623 ****
  		    }
  		    break;
  
! 		    case TypePathSegment::FUNCTION: {
  		      rust_unreachable ();
  		      // TODO
  		      // const TypePathSegmentFunction &fn
--- 650,657 ----
  		    }
  		    break;
  
! 		  case TypePathSegment::FUNCTION:
! 		    {
  		      rust_unreachable ();
  		      // TODO
  		      // const TypePathSegmentFunction &fn
*************** Builder::new_type_param (
*** 639,645 ****
  	  }
  	  break;
  
! 	  case TypeParamBound::TypeParamBoundType::LIFETIME: {
  	    const Lifetime &l = (const Lifetime &) *b.get ();
  
  	    auto bl = new Lifetime (l.get_lifetime_type (),
--- 673,680 ----
  	  }
  	  break;
  
! 	case TypeParamBound::TypeParamBoundType::LIFETIME:
! 	  {
  	    const Lifetime &l = (const Lifetime &) *b.get ();
  
  	    auto bl = new Lifetime (l.get_lifetime_type (),
*************** Builder::new_generic_args (GenericArgs &
*** 682,688 ****
    for (auto &binding : args.get_binding_args ())
      {
        Type &t = *binding.get_type_ptr ().get ();
!       std::unique_ptr<Type> ty = new_type (t);
        GenericArgsBinding b (binding.get_identifier (), std::move (ty),
  			    binding.get_locus ());
        binding_args.push_back (std::move (b));
--- 717,723 ----
    for (auto &binding : args.get_binding_args ())
      {
        Type &t = *binding.get_type_ptr ().get ();
!       std::unique_ptr<Type> ty = t.reconstruct ();
        GenericArgsBinding b (binding.get_identifier (), std::move (ty),
  			    binding.get_locus ());
        binding_args.push_back (std::move (b));
*************** Builder::new_generic_args (GenericArgs &
*** 690,708 ****
  
    for (auto &arg : args.get_generic_args ())
      {
        switch (arg.get_kind ())
  	{
! 	  case GenericArg::Kind::Type: {
! 	    std::unique_ptr<Type> ty = new_type (arg.get_type ());
! 	    GenericArg arg = GenericArg::create_type (std::move (ty));
! 	  }
  	  break;
! 
! 	default:
! 	  // FIXME
! 	  rust_unreachable ();
  	  break;
  	}
      }
  
    return GenericArgs (std::move (lifetime_args), std::move (generic_args),
--- 725,749 ----
  
    for (auto &arg : args.get_generic_args ())
      {
+       tl::optional<GenericArg> new_arg = tl::nullopt;
+ 
        switch (arg.get_kind ())
  	{
! 	case GenericArg::Kind::Type:
! 	  new_arg = GenericArg::create_type (arg.get_type ().reconstruct ());
  	  break;
! 	case GenericArg::Kind::Either:
! 	  new_arg
! 	    = GenericArg::create_ambiguous (arg.get_path (), arg.get_locus ());
! 	  break;
! 	case GenericArg::Kind::Const:
! 	  new_arg
! 	    = GenericArg::create_const (arg.get_expression ().clone_expr ());
! 	  // FIXME: Use `reconstruct()` here, not `clone_expr()`
  	  break;
  	}
+ 
+       generic_args.emplace_back (*new_arg);
      }
  
    return GenericArgs (std::move (lifetime_args), std::move (generic_args),
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-ast-builder.h gcc-16-20250810/gcc/rust/ast/rust-ast-builder.h
*** gcc-16-20250803/gcc/rust/ast/rust-ast-builder.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-ast-builder.h	Sun Aug 10 22:32:08 2025
***************
*** 24,29 ****
--- 24,30 ----
  #include "rust-ast.h"
  #include "rust-item.h"
  #include "rust-operators.h"
+ #include <initializer_list>
  
  namespace Rust {
  namespace AST {
*************** vec (std::unique_ptr<T> &&t1, std::uniqu
*** 51,56 ****
--- 52,70 ----
    return v;
  }
  
+ template <typename T>
+ std::vector<std::unique_ptr<T>>
+ vec (std::unique_ptr<T> &&t1, std::unique_ptr<T> &&t2, std::unique_ptr<T> &&t3)
+ {
+   auto v = std::vector<std::unique_ptr<T>> ();
+ 
+   v.emplace_back (std::move (t1));
+   v.emplace_back (std::move (t2));
+   v.emplace_back (std::move (t3));
+ 
+   return v;
+ }
+ 
  /* Pointer-ify something */
  template <typename T>
  static std::unique_ptr<T>
*************** public:
*** 117,122 ****
--- 131,139 ----
    /* Create an empty block */
    std::unique_ptr<BlockExpr> block () const;
  
+   /* Create a block with just a tail expression */
+   std::unique_ptr<BlockExpr> block (std::unique_ptr<Expr> &&tail_expr) const;
+ 
    /* Create an early return expression with an optional expression */
    std::unique_ptr<Expr> return_expr (std::unique_ptr<Expr> &&to_return
  				     = nullptr);
*************** public:
*** 254,259 ****
--- 271,280 ----
    std::unique_ptr<Expr> field_access (std::unique_ptr<Expr> &&instance,
  				      std::string field) const;
  
+   std::unique_ptr<StructPatternField>
+   struct_pattern_ident_pattern (std::string field_name,
+ 				std::unique_ptr<Pattern> &&pattern);
+ 
    /* Create a wildcard pattern (`_`) */
    std::unique_ptr<Pattern> wildcard () const;
    /* Create a reference pattern (`&pattern`) */
*************** public:
*** 268,273 ****
--- 289,295 ----
    MatchArm match_arm (std::unique_ptr<Pattern> &&pattern);
    MatchCase match_case (std::unique_ptr<Pattern> &&pattern,
  			std::unique_ptr<Expr> &&expr);
+   MatchCase match_case (MatchArm &&arm, std::unique_ptr<Expr> &&expr);
  
    /* Create a loop expression */
    std::unique_ptr<Expr> loop (std::vector<std::unique_ptr<Stmt>> &&stmts);
*************** public:
*** 285,295 ****
  		      std::vector<std::unique_ptr<TypeParamBound>> &&bounds,
  		      std::unique_ptr<Type> &&type = nullptr);
  
!   static std::unique_ptr<Type> new_type (Type &type);
  
    static std::unique_ptr<GenericParam>
    new_lifetime_param (LifetimeParam &param);
  
    static std::unique_ptr<GenericParam> new_type_param (
      TypeParam &param,
      std::vector<std::unique_ptr<TypeParamBound>> extra_trait_bounds = {});
--- 307,326 ----
  		      std::vector<std::unique_ptr<TypeParamBound>> &&bounds,
  		      std::unique_ptr<Type> &&type = nullptr);
  
!   /**
!    * Create a let statement with the discriminant value of a given enum
!    * instance. This helper exists since it is a common operation in a lot of the
!    * derive implementations, and it sucks to repeat all the steps every time.
!    */
!   std::unique_ptr<Stmt> discriminant_value (std::string binding_name,
! 					    std::string instance = "self");
  
    static std::unique_ptr<GenericParam>
    new_lifetime_param (LifetimeParam &param);
  
+   std::unique_ptr<GenericParam>
+   new_const_param (ConstGenericParam &param) const;
+ 
    static std::unique_ptr<GenericParam> new_type_param (
      TypeParam &param,
      std::vector<std::unique_ptr<TypeParamBound>> extra_trait_bounds = {});
*************** public:
*** 298,308 ****
  
    static GenericArgs new_generic_args (GenericArgs &args);
  
! private:
!   /**
!    * Location of the generated AST nodes
!    */
    location_t loc;
  };
  
  } // namespace AST
--- 329,341 ----
  
    static GenericArgs new_generic_args (GenericArgs &args);
  
!   /* Location of the generated AST nodes */
    location_t loc;
+ 
+ private:
+   /* Some constexpr helpers for some of the builders */
+   static constexpr std::initializer_list<const char *> discriminant_value_path
+     = {"core", "intrinsics", "discriminant_value"};
  };
  
  } // namespace AST
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-ast-collector.cc gcc-16-20250810/gcc/rust/ast/rust-ast-collector.cc
*** gcc-16-20250803/gcc/rust/ast/rust-ast-collector.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-ast-collector.cc	Sun Aug 10 22:32:08 2025
***************
*** 18,23 ****
--- 18,24 ----
  
  #include "rust-ast-collector.h"
  #include "rust-ast.h"
+ #include "rust-builtin-ast-nodes.h"
  #include "rust-diagnostics.h"
  #include "rust-expr.h"
  #include "rust-item.h"
*************** TokenCollector::visit (Attribute &attrib
*** 154,173 ****
      {
        switch (attrib.get_attr_input ().get_attr_input_type ())
  	{
! 	  case AST::AttrInput::AttrInputType::LITERAL: {
  	    visit (static_cast<AttrInputLiteral &> (attrib.get_attr_input ()));
  	    break;
  	  }
! 	  case AST::AttrInput::AttrInputType::MACRO: {
  	    visit (static_cast<AttrInputMacro &> (attrib.get_attr_input ()));
  	    break;
  	  }
! 	  case AST::AttrInput::AttrInputType::META_ITEM: {
  	    visit (static_cast<AttrInputMetaItemContainer &> (
  	      attrib.get_attr_input ()));
  	    break;
  	  }
! 	  case AST::AttrInput::AttrInputType::TOKEN_TREE: {
  	    visit (static_cast<DelimTokenTree &> (attrib.get_attr_input ()));
  	    break;
  	  }
--- 155,178 ----
      {
        switch (attrib.get_attr_input ().get_attr_input_type ())
  	{
! 	case AST::AttrInput::AttrInputType::LITERAL:
! 	  {
  	    visit (static_cast<AttrInputLiteral &> (attrib.get_attr_input ()));
  	    break;
  	  }
! 	case AST::AttrInput::AttrInputType::MACRO:
! 	  {
  	    visit (static_cast<AttrInputMacro &> (attrib.get_attr_input ()));
  	    break;
  	  }
! 	case AST::AttrInput::AttrInputType::META_ITEM:
! 	  {
  	    visit (static_cast<AttrInputMetaItemContainer &> (
  	      attrib.get_attr_input ()));
  	    break;
  	  }
! 	case AST::AttrInput::AttrInputType::TOKEN_TREE:
! 	  {
  	    visit (static_cast<DelimTokenTree &> (attrib.get_attr_input ()));
  	    break;
  	  }
*************** TokenCollector::visit (GenericArg &arg)
*** 634,640 ****
      case GenericArg::Kind::Type:
        visit (arg.get_type ());
        break;
!       case GenericArg::Kind::Either: {
  	auto path = arg.get_path ();
  	push (Rust::Token::make_identifier (UNDEF_LOCATION, std::move (path)));
        }
--- 639,646 ----
      case GenericArg::Kind::Type:
        visit (arg.get_type ());
        break;
!     case GenericArg::Kind::Either:
!       {
  	auto path = arg.get_path ();
  	push (Rust::Token::make_identifier (UNDEF_LOCATION, std::move (path)));
        }
*************** TokenCollector::visit (Literal &lit, loc
*** 789,795 ****
        push (Rust::Token::make_float (locus, std::move (value),
  				     lit.get_type_hint ()));
        break;
!       case Literal::LitType::BOOL: {
  	if (value == Values::Keywords::FALSE_LITERAL)
  	  push (Rust::Token::make (FALSE_LITERAL, locus));
  	else if (value == Values::Keywords::TRUE_LITERAL)
--- 795,802 ----
        push (Rust::Token::make_float (locus, std::move (value),
  				     lit.get_type_hint ()));
        break;
!     case Literal::LitType::BOOL:
!       {
  	if (value == Values::Keywords::FALSE_LITERAL)
  	  push (Rust::Token::make (FALSE_LITERAL, locus));
  	else if (value == Values::Keywords::TRUE_LITERAL)
*************** TokenCollector::visit (MetaItemLitExpr &
*** 833,845 ****
  }
  
  void
! TokenCollector::visit (MetaItemPathLit &item)
  {
!   auto path = item.get_path ();
!   auto lit = item.get_literal ();
    visit (path);
!   push (Rust::Token::make (COLON, item.get_locus ()));
!   visit (lit);
  }
  
  void
--- 840,852 ----
  }
  
  void
! TokenCollector::visit (MetaItemPathExpr &item)
  {
!   auto &path = item.get_path ();
!   auto &expr = item.get_expr ();
    visit (path);
!   push (Rust::Token::make (EQUAL, item.get_locus ()));
!   visit (expr);
  }
  
  void
*************** TokenCollector::visit (BorrowExpr &expr)
*** 864,870 ****
  	push (Rust::Token::make (MUT, UNDEF_LOCATION));
      }
  
!   visit (expr.get_borrowed_expr ());
  }
  
  void
--- 871,878 ----
  	push (Rust::Token::make (MUT, UNDEF_LOCATION));
      }
  
!   if (expr.has_borrow_expr ())
!     visit (expr.get_borrowed_expr ());
  }
  
  void
*************** TokenCollector::visit (BlockExpr &expr)
*** 1264,1275 ****
  }
  
  void
  TokenCollector::visit (ClosureExprInnerTyped &expr)
  {
    visit_closure_common (expr);
    push (Rust::Token::make (RETURN_TYPE, expr.get_locus ()));
    visit (expr.get_return_type ());
!   visit (expr.get_definition_block ());
  }
  
  void
--- 1272,1305 ----
  }
  
  void
+ TokenCollector::visit (AnonConst &expr)
+ {
+   if (!expr.is_deferred ())
+     {
+       visit (expr.get_inner_expr ());
+       return;
+     }
+ 
+   push (Rust::Token::make_string (expr.get_locus (), "_"));
+ }
+ 
+ void
+ TokenCollector::visit (ConstBlock &expr)
+ {
+   push (Rust::Token::make (CONST, expr.get_locus ()));
+ 
+   // The inner expression is already a block expr, so we don't need to add
+   // curlies
+   visit (expr.get_const_expr ());
+ }
+ 
+ void
  TokenCollector::visit (ClosureExprInnerTyped &expr)
  {
    visit_closure_common (expr);
    push (Rust::Token::make (RETURN_TYPE, expr.get_locus ()));
    visit (expr.get_return_type ());
!   visit (expr.get_definition_expr ());
  }
  
  void
*************** TokenCollector::visit (ReturnExpr &expr)
*** 1349,1354 ****
--- 1379,1391 ----
  }
  
  void
+ TokenCollector::visit (TryExpr &expr)
+ {
+   push (Rust::Token::make (TRY, expr.get_locus ()));
+   visit (expr.get_block_expr ());
+ }
+ 
+ void
  TokenCollector::visit (UnsafeBlockExpr &expr)
  {
    push (Rust::Token::make (UNSAFE, expr.get_locus ()));
*************** TokenCollector::visit (AsyncBlockExpr &e
*** 1518,1524 ****
  
  void
  TokenCollector::visit (InlineAsm &expr)
! {}
  
  void
  TokenCollector::visit (LlvmInlineAsm &expr)
--- 1555,1649 ----
  
  void
  TokenCollector::visit (InlineAsm &expr)
! {
!   push (Rust::Token::make_identifier (expr.get_locus (), "asm"));
!   push (Rust::Token::make (EXCLAM, expr.get_locus ()));
!   push (Rust::Token::make (LEFT_PAREN, expr.get_locus ()));
! 
!   for (auto &template_str : expr.get_template_strs ())
!     push (Rust::Token::make_string (template_str.get_locus (),
! 				    std::move (template_str.symbol)));
! 
!   push (Rust::Token::make (COLON, expr.get_locus ()));
! 
!   for (auto &operand : expr.get_operands ())
!     {
!       using RegisterType = AST::InlineAsmOperand::RegisterType;
!       switch (operand.get_register_type ())
! 	{
! 	case RegisterType::In:
! 	  {
! 	    visit (operand.get_in ().expr);
! 	    break;
! 	  }
! 	case RegisterType::Out:
! 	  {
! 	    visit (operand.get_out ().expr);
! 	    break;
! 	  }
! 	case RegisterType::InOut:
! 	  {
! 	    visit (operand.get_in_out ().expr);
! 	    break;
! 	  }
! 	case RegisterType::SplitInOut:
! 	  {
! 	    auto split = operand.get_split_in_out ();
! 	    visit (split.in_expr);
! 	    visit (split.out_expr);
! 	    break;
! 	  }
! 	case RegisterType::Const:
! 	  {
! 	    visit (operand.get_const ().anon_const.get_inner_expr ());
! 	    break;
! 	  }
! 	case RegisterType::Sym:
! 	  {
! 	    visit (operand.get_sym ().expr);
! 	    break;
! 	  }
! 	case RegisterType::Label:
! 	  {
! 	    visit (operand.get_label ().expr);
! 	    break;
! 	  }
! 	}
!       push (Rust::Token::make (COMMA, expr.get_locus ()));
!     }
!   push (Rust::Token::make (COLON, expr.get_locus ()));
! 
!   for (auto &clobber : expr.get_clobber_abi ())
!     {
!       push (Rust::Token::make_string (expr.get_locus (),
! 				      std::move (clobber.symbol)));
!       push (Rust::Token::make (COMMA, expr.get_locus ()));
!     }
!   push (Rust::Token::make (COLON, expr.get_locus ()));
! 
!   for (auto it = expr.named_args.begin (); it != expr.named_args.end (); ++it)
!     {
!       auto &arg = *it;
!       push (
! 	Rust::Token::make_identifier (expr.get_locus (), arg.first.c_str ()));
!       push (Rust::Token::make (EQUAL, expr.get_locus ()));
!       push (Rust::Token::make_identifier (expr.get_locus (),
! 					  std::to_string (arg.second)));
! 
!       push (Rust::Token::make (COMMA, expr.get_locus ()));
!     }
! 
!   push (Rust::Token::make (COLON, expr.get_locus ()));
! 
!   for (auto &option : expr.get_options ())
!     {
!       push (Rust::Token::make_identifier (
! 	expr.get_locus (), InlineAsm::option_to_string (option).c_str ()));
!       push (Rust::Token::make (COMMA, expr.get_locus ()));
!     }
! 
!   push (Rust::Token::make (RIGHT_PAREN, expr.get_locus ()));
! }
  
  void
  TokenCollector::visit (LlvmInlineAsm &expr)
*************** TokenCollector::visit (UseTreeGlob &use_
*** 1695,1701 ****
  {
    switch (use_tree.get_glob_type ())
      {
!       case UseTreeGlob::PathType::PATH_PREFIXED: {
  	auto path = use_tree.get_path ();
  	visit (path);
  	push (Rust::Token::make (SCOPE_RESOLUTION, UNDEF_LOCATION));
--- 1820,1827 ----
  {
    switch (use_tree.get_glob_type ())
      {
!     case UseTreeGlob::PathType::PATH_PREFIXED:
!       {
  	auto path = use_tree.get_path ();
  	visit (path);
  	push (Rust::Token::make (SCOPE_RESOLUTION, UNDEF_LOCATION));
*************** TokenCollector::visit (UseTreeList &use_
*** 1715,1721 ****
  {
    switch (use_tree.get_path_type ())
      {
!       case UseTreeList::PathType::PATH_PREFIXED: {
  	auto path = use_tree.get_path ();
  	visit (path);
  	push (Rust::Token::make (SCOPE_RESOLUTION, UNDEF_LOCATION));
--- 1841,1848 ----
  {
    switch (use_tree.get_path_type ())
      {
!     case UseTreeList::PathType::PATH_PREFIXED:
!       {
  	auto path = use_tree.get_path ();
  	visit (path);
  	push (Rust::Token::make (SCOPE_RESOLUTION, UNDEF_LOCATION));
*************** TokenCollector::visit (UseTreeRebind &us
*** 1743,1749 ****
    visit (path);
    switch (use_tree.get_new_bind_type ())
      {
!       case UseTreeRebind::NewBindType::IDENTIFIER: {
  	push (Rust::Token::make (AS, UNDEF_LOCATION));
  	auto id = use_tree.get_identifier ().as_string ();
  	push (
--- 1870,1877 ----
    visit (path);
    switch (use_tree.get_new_bind_type ())
      {
!     case UseTreeRebind::NewBindType::IDENTIFIER:
!       {
  	push (Rust::Token::make (AS, UNDEF_LOCATION));
  	auto id = use_tree.get_identifier ().as_string ();
  	push (
*************** TokenCollector::visit (ConstantItem &ite
*** 1964,1971 ****
      }
    else
      {
!       auto id = item.get_identifier ();
!       push (Rust::Token::make_identifier (UNDEF_LOCATION, std::move (id)));
      }
    push (Rust::Token::make (COLON, UNDEF_LOCATION));
    visit (item.get_type ());
--- 2092,2098 ----
      }
    else
      {
!       push (Rust::Token::make_identifier (item.get_identifier ()));
      }
    push (Rust::Token::make (COLON, UNDEF_LOCATION));
    visit (item.get_type ());
*************** TokenCollector::visit (IdentifierPattern
*** 2370,2379 ****
    auto id = pattern.get_ident ().as_string ();
    push (Rust::Token::make_identifier (UNDEF_LOCATION, std::move (id)));
  
!   if (pattern.has_pattern_to_bind ())
      {
        push (Rust::Token::make (PATTERN_BIND, UNDEF_LOCATION));
!       visit (pattern.get_pattern_to_bind ());
      }
  }
  
--- 2497,2506 ----
    auto id = pattern.get_ident ().as_string ();
    push (Rust::Token::make_identifier (UNDEF_LOCATION, std::move (id)));
  
!   if (pattern.has_subpattern ())
      {
        push (Rust::Token::make (PATTERN_BIND, UNDEF_LOCATION));
!       visit (pattern.get_subpattern ());
      }
  }
  
*************** TokenCollector::visit (GroupedPattern &p
*** 2591,2600 ****
  }
  
  void
  TokenCollector::visit (SlicePattern &pattern)
  {
    push (Rust::Token::make (LEFT_SQUARE, pattern.get_locus ()));
!   visit_items_joined_by_separator (pattern.get_items (), COMMA);
    push (Rust::Token::make (RIGHT_SQUARE, UNDEF_LOCATION));
  }
  
--- 2718,2751 ----
  }
  
  void
+ TokenCollector::visit (SlicePatternItemsNoRest &items)
+ {
+   visit_items_joined_by_separator (items.get_patterns (), COMMA);
+ }
+ 
+ void
+ TokenCollector::visit (SlicePatternItemsHasRest &items)
+ {
+   if (!items.get_lower_patterns ().empty ())
+     {
+       visit_items_joined_by_separator (items.get_lower_patterns (), COMMA);
+       push (Rust::Token::make (COMMA, UNDEF_LOCATION));
+     }
+ 
+   push (Rust::Token::make (DOT_DOT, UNDEF_LOCATION));
+ 
+   if (!items.get_upper_patterns ().empty ())
+     {
+       push (Rust::Token::make (COMMA, UNDEF_LOCATION));
+       visit_items_joined_by_separator (items.get_upper_patterns (), COMMA);
+     }
+ }
+ 
+ void
  TokenCollector::visit (SlicePattern &pattern)
  {
    push (Rust::Token::make (LEFT_SQUARE, pattern.get_locus ()));
!   visit (pattern.get_items ());
    push (Rust::Token::make (RIGHT_SQUARE, UNDEF_LOCATION));
  }
  
*************** TokenCollector::visit (AST::FormatArgs &
*** 2862,2866 ****
--- 3013,3035 ----
  		 __FILE__, __LINE__);
  }
  
+ void
+ TokenCollector::visit (AST::OffsetOf &offset_of)
+ {
+   auto loc = offset_of.get_locus ();
+ 
+   push (Rust::Token::make_identifier (loc, "offset_of"));
+   push (Rust::Token::make (EXCLAM, loc));
+   push (Rust::Token::make (LEFT_PAREN, loc));
+ 
+   visit (offset_of.get_type ());
+ 
+   push (Rust::Token::make (COMMA, loc));
+ 
+   push (Rust::Token::make_identifier (offset_of.get_field ()));
+ 
+   push (Rust::Token::make (RIGHT_PAREN, loc));
+ }
+ 
  } // namespace AST
  } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-ast-collector.h gcc-16-20250810/gcc/rust/ast/rust-ast-collector.h
*** gcc-16-20250803/gcc/rust/ast/rust-ast-collector.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-ast-collector.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 246,252 ****
    void visit (AttrInputLiteral &attr_input);
    void visit (AttrInputMacro &attr_input);
    void visit (MetaItemLitExpr &meta_item);
!   void visit (MetaItemPathLit &meta_item);
    void visit (BorrowExpr &expr);
    void visit (DereferenceExpr &expr);
    void visit (ErrorPropagationExpr &expr);
--- 246,252 ----
    void visit (AttrInputLiteral &attr_input);
    void visit (AttrInputMacro &attr_input);
    void visit (MetaItemLitExpr &meta_item);
!   void visit (MetaItemPathExpr &meta_item);
    void visit (BorrowExpr &expr);
    void visit (DereferenceExpr &expr);
    void visit (ErrorPropagationExpr &expr);
*************** public:
*** 277,282 ****
--- 277,284 ----
    void visit (ClosureParam &param);
    void visit (ClosureExprInner &expr);
    void visit (BlockExpr &expr);
+   void visit (AnonConst &expr);
+   void visit (ConstBlock &expr);
    void visit (ClosureExprInnerTyped &expr);
    void visit (ContinueExpr &expr);
    void visit (BreakExpr &expr);
*************** public:
*** 287,292 ****
--- 289,295 ----
    void visit (RangeFromToInclExpr &expr);
    void visit (RangeToInclExpr &expr);
    void visit (ReturnExpr &expr);
+   void visit (TryExpr &expr);
    void visit (BoxExpr &expr);
    void visit (UnsafeBlockExpr &expr);
    void visit (LoopExpr &expr);
*************** public:
*** 375,380 ****
--- 378,385 ----
    void visit (TuplePatternItemsRanged &tuple_items);
    void visit (TuplePattern &pattern);
    void visit (GroupedPattern &pattern);
+   void visit (SlicePatternItemsNoRest &items);
+   void visit (SlicePatternItemsHasRest &items);
    void visit (SlicePattern &pattern);
    void visit (AltPattern &pattern);
  
*************** public:
*** 400,405 ****
--- 405,411 ----
    void visit (BareFunctionType &type);
  
    void visit (FormatArgs &fmt);
+   void visit (OffsetOf &offset_of);
  };
  } // namespace AST
  
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-ast-dump.h gcc-16-20250810/gcc/rust/ast/rust-ast-dump.h
*** gcc-16-20250803/gcc/rust/ast/rust-ast-dump.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-ast-dump.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 49,55 ****
        {
  	switch (item.get_kind ())
  	  {
! 	    case AST::CollectItem::Kind::Token: {
  	      TokenPtr current = item.get_token ();
  	      if (require_spacing (previous, current))
  		stream << " ";
--- 49,56 ----
        {
  	switch (item.get_kind ())
  	  {
! 	  case AST::CollectItem::Kind::Token:
! 	    {
  	      TokenPtr current = item.get_token ();
  	      if (require_spacing (previous, current))
  		stream << " ";
*************** private:
*** 90,96 ****
  } // namespace Rust
  
  // In the global namespace to make it easier to call from debugger
! void
! debug (Rust::AST::Visitable &v);
  
  #endif // !RUST_AST_DUMP_H
--- 91,96 ----
  } // namespace Rust
  
  // In the global namespace to make it easier to call from debugger
! void debug (Rust::AST::Visitable &v);
  
  #endif // !RUST_AST_DUMP_H
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-ast-formatting.h gcc-16-20250810/gcc/rust/ast/rust-ast-formatting.h
*** gcc-16-20250803/gcc/rust/ast/rust-ast-formatting.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-ast-formatting.h	Sun Aug 10 22:32:08 2025
*************** enum AttrMode
*** 35,57 ****
    INNER
  };
  
! std::string
! indent_spaces (enum indent_mode mode);
  
  // Gets a string in a certain delim type.
! std::string
! get_string_in_delims (std::string str_input, DelimType delim_type);
  
! std::string
! get_mode_dump_desc (AttrMode mode);
  
  // Adds lines below adding attributes
! std::string
! append_attributes (std::vector<Attribute> attrs, AttrMode mode);
  
  // Removes the beginning and end quotes of a quoted string.
! std::string
! unquote_string (std::string input);
  
  } // namespace AST
  } // namespace Rust
--- 35,52 ----
    INNER
  };
  
! std::string indent_spaces (enum indent_mode mode);
  
  // Gets a string in a certain delim type.
! std::string get_string_in_delims (std::string str_input, DelimType delim_type);
  
! std::string get_mode_dump_desc (AttrMode mode);
  
  // Adds lines below adding attributes
! std::string append_attributes (std::vector<Attribute> attrs, AttrMode mode);
  
  // Removes the beginning and end quotes of a quoted string.
! std::string unquote_string (std::string input);
  
  } // namespace AST
  } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-ast-full-decls.h gcc-16-20250810/gcc/rust/ast/rust-ast-full-decls.h
*** gcc-16-20250803/gcc/rust/ast/rust-ast-full-decls.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-ast-full-decls.h	Sun Aug 10 22:32:08 2025
*************** class LiteralExpr;
*** 78,84 ****
  class AttrInputLiteral;
  class AttrInputMacro;
  class MetaItemLitExpr;
! class MetaItemPathLit;
  class OperatorExpr;
  class BorrowExpr;
  class DereferenceExpr;
--- 78,84 ----
  class AttrInputLiteral;
  class AttrInputMacro;
  class MetaItemLitExpr;
! class MetaItemPathExpr;
  class OperatorExpr;
  class BorrowExpr;
  class DereferenceExpr;
*************** struct ClosureParam;
*** 115,120 ****
--- 115,122 ----
  class ClosureExpr;
  class ClosureExprInner;
  class BlockExpr;
+ class AnonConst;
+ class ConstBlock;
  class ClosureExprInnerTyped;
  class ContinueExpr;
  class BreakExpr;
*************** class RangeFullExpr;
*** 126,131 ****
--- 128,134 ----
  class RangeFromToInclExpr;
  class RangeToInclExpr;
  class ReturnExpr;
+ class TryExpr;
  class UnsafeBlockExpr;
  class LoopLabel;
  class BaseLoopExpr;
*************** class MatchExpr;
*** 146,152 ****
  class AwaitExpr;
  class AsyncBlockExpr;
  enum class InlineAsmOption;
- struct AnonConst;
  struct InlineAsmRegOrRegClass;
  class InlineAsmOperand;
  struct InlineAsmPlaceHolder;
--- 149,154 ----
*************** class TuplePatternItemsMultiple;
*** 246,251 ****
--- 248,255 ----
  class TuplePatternItemsRanged;
  class TuplePattern;
  class GroupedPattern;
+ class SlicePatternItemsNoRest;
+ class SlicePatternItemsHasRest;
  class SlicePattern;
  class AltPattern;
  
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-ast-visitor.cc gcc-16-20250810/gcc/rust/ast/rust-ast-visitor.cc
*** gcc-16-20250803/gcc/rust/ast/rust-ast-visitor.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-ast-visitor.cc	Sun Aug 10 22:32:08 2025
***************
*** 19,24 ****
--- 19,25 ----
  #include "rust-ast-visitor.h"
  #include "rust-ast-full-decls.h"
  #include "rust-ast.h"
+ #include "rust-builtin-ast-nodes.h"
  #include "rust-path.h"
  #include "rust-token.h"
  #include "rust-expr.h"
*************** DefaultASTVisitor::visit (AST::SimplePat
*** 223,232 ****
  }
  
  void
! DefaultASTVisitor::visit (AST::MetaItemPathLit &meta_item)
  {
    visit (meta_item.get_path ());
!   visit (meta_item.get_literal ());
  }
  
  void
--- 224,233 ----
  }
  
  void
! DefaultASTVisitor::visit (AST::MetaItemPathExpr &meta_item)
  {
    visit (meta_item.get_path ());
!   visit (meta_item.get_expr ());
  }
  
  void
*************** DefaultASTVisitor::visit (AST::BlockExpr
*** 449,468 ****
  {
    visit_outer_attrs (expr);
    visit_inner_attrs (expr);
    for (auto &stmt : expr.get_statements ())
      visit (stmt);
    if (expr.has_tail_expr ())
      visit (expr.get_tail_expr ());
  }
  
  void
  DefaultASTVisitor::visit (AST::ClosureExprInnerTyped &expr)
  {
    visit_outer_attrs (expr);
    for (auto &param : expr.get_params ())
      visit (param);
    visit (expr.get_return_type ());
!   visit (expr.get_definition_block ());
  }
  
  void
--- 450,487 ----
  {
    visit_outer_attrs (expr);
    visit_inner_attrs (expr);
+ 
+   if (expr.has_label ())
+     visit (expr.get_label ());
+ 
    for (auto &stmt : expr.get_statements ())
      visit (stmt);
+ 
    if (expr.has_tail_expr ())
      visit (expr.get_tail_expr ());
  }
  
  void
+ DefaultASTVisitor::visit (AST::ConstBlock &expr)
+ {
+   visit (expr.get_const_expr ());
+ }
+ 
+ void
+ DefaultASTVisitor::visit (AST::AnonConst &expr)
+ {
+   if (!expr.is_deferred ())
+     visit (expr.get_inner_expr ());
+ }
+ 
+ void
  DefaultASTVisitor::visit (AST::ClosureExprInnerTyped &expr)
  {
    visit_outer_attrs (expr);
    for (auto &param : expr.get_params ())
      visit (param);
    visit (expr.get_return_type ());
!   visit (expr.get_definition_expr ());
  }
  
  void
*************** DefaultASTVisitor::visit (AST::ReturnExp
*** 538,543 ****
--- 557,569 ----
  }
  
  void
+ DefaultASTVisitor::visit (AST::TryExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   visit (expr.get_block_expr ());
+ }
+ 
+ void
  DefaultASTVisitor::visit (AST::BoxExpr &expr)
  {
    visit_outer_attrs (expr);
*************** DefaultASTVisitor::visit (AST::WhileLetL
*** 582,588 ****
    visit_outer_attrs (expr);
    for (auto &pattern : expr.get_patterns ())
      visit (pattern);
!   visit (expr.get_loop_label ());
    visit (expr.get_scrutinee_expr ());
    visit (expr.get_loop_block ());
  }
--- 608,617 ----
    visit_outer_attrs (expr);
    for (auto &pattern : expr.get_patterns ())
      visit (pattern);
! 
!   if (expr.has_loop_label ())
!     visit (expr.get_loop_label ());
! 
    visit (expr.get_scrutinee_expr ());
    visit (expr.get_loop_block ());
  }
*************** DefaultASTVisitor::visit (AST::InlineAsm
*** 680,712 ****
      {
        switch (operand.get_register_type ())
  	{
! 	  case RegisterType::In: {
  	    visit (operand.get_in ().expr);
  	    break;
  	  }
! 	  case RegisterType::Out: {
  	    visit (operand.get_out ().expr);
  	    break;
  	  }
! 	  case RegisterType::InOut: {
  	    visit (operand.get_in_out ().expr);
  	    break;
  	  }
! 	  case RegisterType::SplitInOut: {
  	    auto split = operand.get_split_in_out ();
  	    visit (split.in_expr);
  	    visit (split.out_expr);
  	    break;
  	  }
! 	  case RegisterType::Const: {
! 	    visit (operand.get_const ().anon_const.expr);
  	    break;
  	  }
! 	  case RegisterType::Sym: {
  	    visit (operand.get_sym ().expr);
  	    break;
  	  }
! 	  case RegisterType::Label: {
  	    visit (operand.get_label ().expr);
  	    break;
  	  }
--- 709,748 ----
      {
        switch (operand.get_register_type ())
  	{
! 	case RegisterType::In:
! 	  {
  	    visit (operand.get_in ().expr);
  	    break;
  	  }
! 	case RegisterType::Out:
! 	  {
  	    visit (operand.get_out ().expr);
  	    break;
  	  }
! 	case RegisterType::InOut:
! 	  {
  	    visit (operand.get_in_out ().expr);
  	    break;
  	  }
! 	case RegisterType::SplitInOut:
! 	  {
  	    auto split = operand.get_split_in_out ();
  	    visit (split.in_expr);
  	    visit (split.out_expr);
  	    break;
  	  }
! 	case RegisterType::Const:
! 	  {
! 	    visit (operand.get_const ().anon_const.get_inner_expr ());
  	    break;
  	  }
! 	case RegisterType::Sym:
! 	  {
  	    visit (operand.get_sym ().expr);
  	    break;
  	  }
! 	case RegisterType::Label:
! 	  {
  	    visit (operand.get_label ().expr);
  	    break;
  	  }
*************** DefaultASTVisitor::visit (AST::TypeBound
*** 755,761 ****
  void
  DefaultASTVisitor::visit (AST::Visibility &vis)
  {
!   visit (vis.get_path ());
  }
  
  void
--- 791,798 ----
  void
  DefaultASTVisitor::visit (AST::Visibility &vis)
  {
!   if (vis.has_path ())
!     visit (vis.get_path ());
  }
  
  void
*************** DefaultASTVisitor::visit (AST::EnumItem
*** 922,928 ****
  void
  DefaultASTVisitor::visit (AST::EnumItemTuple &item)
  {
!   visit (reinterpret_cast<EnumItem &> (item));
    for (auto &field : item.get_tuple_fields ())
      visit (field);
  }
--- 959,965 ----
  void
  DefaultASTVisitor::visit (AST::EnumItemTuple &item)
  {
!   DefaultASTVisitor::visit (static_cast<EnumItem &> (item));
    for (auto &field : item.get_tuple_fields ())
      visit (field);
  }
*************** DefaultASTVisitor::visit (AST::EnumItemT
*** 930,936 ****
  void
  DefaultASTVisitor::visit (AST::EnumItemStruct &item)
  {
!   visit (reinterpret_cast<EnumItem &> (item));
    for (auto &field : item.get_struct_fields ())
      visit (field);
  }
--- 967,973 ----
  void
  DefaultASTVisitor::visit (AST::EnumItemStruct &item)
  {
!   DefaultASTVisitor::visit (static_cast<EnumItem &> (item));
    for (auto &field : item.get_struct_fields ())
      visit (field);
  }
*************** DefaultASTVisitor::visit (AST::EnumItemS
*** 938,944 ****
  void
  DefaultASTVisitor::visit (AST::EnumItemDiscriminant &item)
  {
!   visit (reinterpret_cast<EnumItem &> (item));
    visit (item.get_expr ());
  }
  
--- 975,981 ----
  void
  DefaultASTVisitor::visit (AST::EnumItemDiscriminant &item)
  {
!   DefaultASTVisitor::visit (static_cast<EnumItem &> (item));
    visit (item.get_expr ());
  }
  
*************** DefaultASTVisitor::visit (AST::LiteralPa
*** 1179,1186 ****
  void
  DefaultASTVisitor::visit (AST::IdentifierPattern &pattern)
  {
!   if (pattern.has_pattern_to_bind ())
!     visit (pattern.get_pattern_to_bind ());
  }
  
  void
--- 1216,1223 ----
  void
  DefaultASTVisitor::visit (AST::IdentifierPattern &pattern)
  {
!   if (pattern.has_subpattern ())
!     visit (pattern.get_subpattern ());
  }
  
  void
*************** DefaultASTVisitor::visit (AST::GroupedPa
*** 1310,1322 ****
  }
  
  void
! DefaultASTVisitor::visit (AST::SlicePattern &pattern)
  {
!   for (auto &item : pattern.get_items ())
      visit (item);
  }
  
  void
  DefaultASTVisitor::visit (AST::AltPattern &pattern)
  {
    for (auto &alt : pattern.get_alts ())
--- 1347,1374 ----
  }
  
  void
! DefaultASTVisitor::visit (AST::SlicePatternItemsNoRest &items)
  {
!   for (auto &item : items.get_patterns ())
!     visit (item);
! }
! 
! void
! DefaultASTVisitor::visit (AST::SlicePatternItemsHasRest &items)
! {
!   for (auto &item : items.get_lower_patterns ())
!     visit (item);
!   for (auto &item : items.get_upper_patterns ())
      visit (item);
  }
  
  void
+ DefaultASTVisitor::visit (AST::SlicePattern &pattern)
+ {
+   visit (pattern.get_items ());
+ }
+ 
+ void
  DefaultASTVisitor::visit (AST::AltPattern &pattern)
  {
    for (auto &alt : pattern.get_alts ())
*************** DefaultASTVisitor::visit (AST::FormatArg
*** 1454,1459 ****
--- 1506,1517 ----
  }
  
  void
+ DefaultASTVisitor::visit (AST::OffsetOf &offset_of)
+ {
+   visit (offset_of.get_type ());
+ }
+ 
+ void
  DefaultASTVisitor::visit (AST::VariadicParam &param)
  {
    if (param.has_pattern ())
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-ast-visitor.h gcc-16-20250810/gcc/rust/ast/rust-ast-visitor.h
*** gcc-16-20250803/gcc/rust/ast/rust-ast-visitor.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-ast-visitor.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 73,79 ****
    virtual void visit (AttrInputLiteral &attr_input) = 0;
    virtual void visit (AttrInputMacro &attr_input) = 0;
    virtual void visit (MetaItemLitExpr &meta_item) = 0;
!   virtual void visit (MetaItemPathLit &meta_item) = 0;
    virtual void visit (BorrowExpr &expr) = 0;
    virtual void visit (DereferenceExpr &expr) = 0;
    virtual void visit (ErrorPropagationExpr &expr) = 0;
--- 73,79 ----
    virtual void visit (AttrInputLiteral &attr_input) = 0;
    virtual void visit (AttrInputMacro &attr_input) = 0;
    virtual void visit (MetaItemLitExpr &meta_item) = 0;
!   virtual void visit (MetaItemPathExpr &meta_item) = 0;
    virtual void visit (BorrowExpr &expr) = 0;
    virtual void visit (DereferenceExpr &expr) = 0;
    virtual void visit (ErrorPropagationExpr &expr) = 0;
*************** public:
*** 104,109 ****
--- 104,111 ----
    virtual void visit (FieldAccessExpr &expr) = 0;
    virtual void visit (ClosureExprInner &expr) = 0;
    virtual void visit (BlockExpr &expr) = 0;
+   virtual void visit (AnonConst &expr) = 0;
+   virtual void visit (ConstBlock &expr) = 0;
    virtual void visit (ClosureExprInnerTyped &expr) = 0;
    virtual void visit (ContinueExpr &expr) = 0;
    virtual void visit (BreakExpr &expr) = 0;
*************** public:
*** 114,119 ****
--- 116,122 ----
    virtual void visit (RangeFromToInclExpr &expr) = 0;
    virtual void visit (RangeToInclExpr &expr) = 0;
    virtual void visit (ReturnExpr &expr) = 0;
+   virtual void visit (TryExpr &expr) = 0;
    virtual void visit (BoxExpr &expr) = 0;
    virtual void visit (UnsafeBlockExpr &expr) = 0;
    virtual void visit (LoopExpr &expr) = 0;
*************** public:
*** 209,214 ****
--- 212,219 ----
    virtual void visit (TuplePatternItemsRanged &tuple_items) = 0;
    virtual void visit (TuplePattern &pattern) = 0;
    virtual void visit (GroupedPattern &pattern) = 0;
+   virtual void visit (SlicePatternItemsNoRest &items) = 0;
+   virtual void visit (SlicePatternItemsHasRest &items) = 0;
    virtual void visit (SlicePattern &pattern) = 0;
    virtual void visit (AltPattern &pattern) = 0;
  
*************** public:
*** 235,240 ****
--- 240,246 ----
  
    // special AST nodes for certain builtin macros such as `asm!()`
    virtual void visit (FormatArgs &fmt) = 0;
+   virtual void visit (OffsetOf &fmt) = 0;
  
    // TODO: rust-cond-compilation.h visiting? not currently used
  };
*************** public:
*** 264,270 ****
    virtual void visit (AST::AttrInputLiteral &attr_input) override;
    virtual void visit (AST::AttrInputMacro &attr_input) override;
    virtual void visit (AST::MetaItemLitExpr &meta_item) override;
!   virtual void visit (AST::MetaItemPathLit &meta_item) override;
    virtual void visit (AST::BorrowExpr &expr) override;
    virtual void visit (AST::DereferenceExpr &expr) override;
    virtual void visit (AST::ErrorPropagationExpr &expr) override;
--- 270,276 ----
    virtual void visit (AST::AttrInputLiteral &attr_input) override;
    virtual void visit (AST::AttrInputMacro &attr_input) override;
    virtual void visit (AST::MetaItemLitExpr &meta_item) override;
!   virtual void visit (AST::MetaItemPathExpr &meta_item) override;
    virtual void visit (AST::BorrowExpr &expr) override;
    virtual void visit (AST::DereferenceExpr &expr) override;
    virtual void visit (AST::ErrorPropagationExpr &expr) override;
*************** public:
*** 293,298 ****
--- 299,306 ----
    virtual void visit (AST::FieldAccessExpr &expr) override;
    virtual void visit (AST::ClosureExprInner &expr) override;
    virtual void visit (AST::BlockExpr &expr) override;
+   virtual void visit (AST::AnonConst &expr) override;
+   virtual void visit (AST::ConstBlock &expr) override;
    virtual void visit (AST::ClosureExprInnerTyped &expr) override;
    virtual void visit (AST::ContinueExpr &expr) override;
    virtual void visit (AST::BreakExpr &expr) override;
*************** public:
*** 303,308 ****
--- 311,317 ----
    virtual void visit (AST::RangeFromToInclExpr &expr) override;
    virtual void visit (AST::RangeToInclExpr &expr) override;
    virtual void visit (AST::ReturnExpr &expr) override;
+   virtual void visit (AST::TryExpr &expr) override;
    virtual void visit (AST::BoxExpr &expr) override;
    virtual void visit (AST::UnsafeBlockExpr &expr) override;
    virtual void visit (AST::LoopExpr &expr) override;
*************** public:
*** 379,384 ****
--- 388,395 ----
    virtual void visit (AST::TuplePatternItemsRanged &tuple_items) override;
    virtual void visit (AST::TuplePattern &pattern) override;
    virtual void visit (AST::GroupedPattern &pattern) override;
+   virtual void visit (AST::SlicePatternItemsNoRest &items) override;
+   virtual void visit (AST::SlicePatternItemsHasRest &items) override;
    virtual void visit (AST::SlicePattern &pattern) override;
    virtual void visit (AST::AltPattern &pattern) override;
    virtual void visit (AST::EmptyStmt &stmt) override;
*************** public:
*** 402,407 ****
--- 413,419 ----
    virtual void visit (AST::FunctionParam &param) override;
    virtual void visit (AST::VariadicParam &param) override;
    virtual void visit (AST::FormatArgs &fmt) override;
+   virtual void visit (AST::OffsetOf &fmt) override;
  
    template <typename T> void visit (T &node) { node.accept_vis (*this); }
  
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-ast.cc gcc-16-20250810/gcc/rust/ast/rust-ast.cc
*** gcc-16-20250803/gcc/rust/ast/rust-ast.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-ast.cc	Sun Aug 10 22:32:08 2025
*************** along with GCC; see the file COPYING3.
*** 33,38 ****
--- 33,39 ----
  #include "rust-operators.h"
  #include "rust-dir-owner.h"
  #include "rust-attribute-values.h"
+ #include "rust-macro-invoc-lexer.h"
  
  /* Compilation unit used for various AST-related functions that would make
   * the headers too long if they were defined inline and don't receive any
*************** Attribute::get_traits_to_derive ()
*** 249,275 ****
    auto &input = get_attr_input ();
    switch (input.get_attr_input_type ())
      {
!       case AST::AttrInput::META_ITEM: {
  	auto &meta = static_cast<AST::AttrInputMetaItemContainer &> (input);
  	for (auto &current : meta.get_items ())
  	  {
  	    // HACK: Find a better way to achieve the downcast.
  	    switch (current->get_kind ())
  	      {
! 		case AST::MetaItemInner::Kind::MetaItem: {
  		  // Let raw pointer go out of scope without freeing, it doesn't
  		  // own the data anyway
  		  auto meta_item
  		    = static_cast<AST::MetaItem *> (current.get ());
  		  switch (meta_item->get_item_kind ())
  		    {
! 		      case AST::MetaItem::ItemKind::Path: {
  			auto path
  			  = static_cast<AST::MetaItemPath *> (meta_item);
  			result.push_back (path->get_path ());
  		      }
  		      break;
! 		      case AST::MetaItem::ItemKind::Word: {
  			auto word = static_cast<AST::MetaWord *> (meta_item);
  			// Convert current word to path
  			current = std::make_unique<AST::MetaItemPath> (
--- 250,280 ----
    auto &input = get_attr_input ();
    switch (input.get_attr_input_type ())
      {
!     case AST::AttrInput::META_ITEM:
!       {
  	auto &meta = static_cast<AST::AttrInputMetaItemContainer &> (input);
  	for (auto &current : meta.get_items ())
  	  {
  	    // HACK: Find a better way to achieve the downcast.
  	    switch (current->get_kind ())
  	      {
! 	      case AST::MetaItemInner::Kind::MetaItem:
! 		{
  		  // Let raw pointer go out of scope without freeing, it doesn't
  		  // own the data anyway
  		  auto meta_item
  		    = static_cast<AST::MetaItem *> (current.get ());
  		  switch (meta_item->get_item_kind ())
  		    {
! 		    case AST::MetaItem::ItemKind::Path:
! 		      {
  			auto path
  			  = static_cast<AST::MetaItemPath *> (meta_item);
  			result.push_back (path->get_path ());
  		      }
  		      break;
! 		    case AST::MetaItem::ItemKind::Word:
! 		      {
  			auto word = static_cast<AST::MetaWord *> (meta_item);
  			// Convert current word to path
  			current = std::make_unique<AST::MetaItemPath> (
*************** Attribute::get_traits_to_derive ()
*** 283,289 ****
  		      break;
  		    case AST::MetaItem::ItemKind::ListPaths:
  		    case AST::MetaItem::ItemKind::NameValueStr:
! 		    case AST::MetaItem::ItemKind::PathLit:
  		    case AST::MetaItem::ItemKind::Seq:
  		    case AST::MetaItem::ItemKind::ListNameValueStr:
  		    default:
--- 288,294 ----
  		      break;
  		    case AST::MetaItem::ItemKind::ListPaths:
  		    case AST::MetaItem::ItemKind::NameValueStr:
! 		    case AST::MetaItem::ItemKind::PathExpr:
  		    case AST::MetaItem::ItemKind::Seq:
  		    case AST::MetaItem::ItemKind::ListNameValueStr:
  		    default:
*************** ConstantItem::as_string () const
*** 620,626 ****
  {
    std::string str = VisItem::as_string ();
  
!   str += "const " + identifier;
  
    // DEBUG: null pointer check
    if (type == nullptr)
--- 625,631 ----
  {
    std::string str = VisItem::as_string ();
  
!   str += "const " + identifier.as_string ();
  
    // DEBUG: null pointer check
    if (type == nullptr)
*************** UseTreeGlob::as_string () const
*** 782,788 ****
        return "*";
      case GLOBAL:
        return "::*";
!       case PATH_PREFIXED: {
  	std::string path_str = path.as_string ();
  	return path_str + "::*";
        }
--- 787,794 ----
        return "*";
      case GLOBAL:
        return "::*";
!     case PATH_PREFIXED:
!       {
  	std::string path_str = path.as_string ();
  	return path_str + "::*";
        }
*************** UseTreeList::as_string () const
*** 805,811 ****
      case GLOBAL:
        path_str = "::{";
        break;
!       case PATH_PREFIXED: {
  	path_str = path.as_string () + "::{";
  	break;
        }
--- 811,818 ----
      case GLOBAL:
        path_str = "::{";
        break;
!     case PATH_PREFIXED:
!       {
  	path_str = path.as_string () + "::{";
  	break;
        }
*************** BlockExpr::as_string () const
*** 1272,1277 ****
--- 1279,1303 ----
  }
  
  std::string
+ AnonConst::as_string () const
+ {
+   std::string str = "AnonConst: ";
+ 
+   if (kind == AnonConst::Kind::DeferredInference)
+     str += "_";
+   else
+     str += expr.value ()->as_string ();
+ 
+   return str;
+ }
+ 
+ std::string
+ ConstBlock::as_string () const
+ {
+   return "ConstBlock: " + expr.as_string ();
+ }
+ 
+ std::string
  TraitImpl::as_string () const
  {
    std::string str = VisItem::as_string ();
*************** ReturnExpr::as_string () const
*** 1619,1624 ****
--- 1645,1663 ----
  }
  
  std::string
+ TryExpr::as_string () const
+ {
+   /* TODO: find way to incorporate outer attrs - may have to represent in
+    * different style (i.e. something more like BorrowExpr: \n outer attrs) */
+ 
+   std::string str ("try ");
+ 
+   str += block_expr->as_string ();
+ 
+   return str;
+ }
+ 
+ std::string
  RangeToExpr::as_string () const
  {
    return ".." + to->as_string ();
*************** ImplTraitTypeOneBound::as_string () cons
*** 2714,2720 ****
  {
    std::string str ("ImplTraitTypeOneBound: \n TraitBound: ");
  
!   return str + trait_bound.as_string ();
  }
  
  std::string
--- 2753,2759 ----
  {
    std::string str ("ImplTraitTypeOneBound: \n TraitBound: ");
  
!   return str + trait_bound->as_string ();
  }
  
  std::string
*************** std::string
*** 2736,2742 ****
  ArrayType::as_string () const
  {
    // TODO: rewrite to work with non-linearisable types and exprs
!   return "[" + elem_type->as_string () + "; " + size->as_string () + "]";
  }
  
  std::string
--- 2775,2781 ----
  ArrayType::as_string () const
  {
    // TODO: rewrite to work with non-linearisable types and exprs
!   return "[" + elem_type->as_string () + "; " + size.as_string () + "]";
  }
  
  std::string
*************** DelimTokenTree::parse_to_meta_item () co
*** 3477,3489 ****
    return new AttrInputMetaItemContainer (std::move (meta_items));
  }
  
  std::unique_ptr<MetaItemInner>
  AttributeParser::parse_meta_item_inner ()
  {
    // if first tok not identifier, not a "special" case one
!   if (peek_token ()->get_id () != IDENTIFIER)
      {
!       switch (peek_token ()->get_id ())
  	{
  	case CHAR_LITERAL:
  	case STRING_LITERAL:
--- 3516,3539 ----
    return new AttrInputMetaItemContainer (std::move (meta_items));
  }
  
+ AttributeParser::AttributeParser (
+   std::vector<std::unique_ptr<Token>> token_stream, int stream_start_pos)
+   : lexer (new MacroInvocLexer (std::move (token_stream))),
+     parser (new Parser<MacroInvocLexer> (*lexer))
+ {
+   if (stream_start_pos)
+     lexer->skip_token (stream_start_pos - 1);
+ }
+ 
+ AttributeParser::~AttributeParser () {}
+ 
  std::unique_ptr<MetaItemInner>
  AttributeParser::parse_meta_item_inner ()
  {
    // if first tok not identifier, not a "special" case one
!   if (lexer->peek_token ()->get_id () != IDENTIFIER)
      {
!       switch (lexer->peek_token ()->get_id ())
  	{
  	case CHAR_LITERAL:
  	case STRING_LITERAL:
*************** AttributeParser::parse_meta_item_inner (
*** 3504,3551 ****
  	  return parse_path_meta_item ();
  
  	default:
! 	  rust_error_at (peek_token ()->get_locus (),
  			 "unrecognised token '%s' in meta item",
! 			 get_token_description (peek_token ()->get_id ()));
  	  return nullptr;
  	}
      }
  
    // else, check for path
!   if (peek_token (1)->get_id () == SCOPE_RESOLUTION)
      {
        // path
        return parse_path_meta_item ();
      }
  
!   auto ident = peek_token ()->as_string ();
!   auto ident_locus = peek_token ()->get_locus ();
  
!   if (is_end_meta_item_tok (peek_token (1)->get_id ()))
      {
        // meta word syntax
!       skip_token ();
        return std::unique_ptr<MetaWord> (new MetaWord (ident, ident_locus));
      }
  
!   if (peek_token (1)->get_id () == EQUAL)
      {
        // maybe meta name value str syntax - check next 2 tokens
!       if (peek_token (2)->get_id () == STRING_LITERAL
! 	  && is_end_meta_item_tok (peek_token (3)->get_id ()))
  	{
  	  // meta name value str syntax
! 	  auto &value_tok = peek_token (2);
! 	  auto value = value_tok->as_string ();
  	  auto locus = value_tok->get_locus ();
  
! 	  skip_token (2);
! 
! 	  // remove the quotes from the string value
! 	  std::string raw_value = unquote_string (std::move (value));
  
  	  return std::unique_ptr<MetaNameValueStr> (
! 	    new MetaNameValueStr (ident, ident_locus, std::move (raw_value),
  				  locus));
  	}
        else
--- 3554,3599 ----
  	  return parse_path_meta_item ();
  
  	default:
! 	  rust_error_at (lexer->peek_token ()->get_locus (),
  			 "unrecognised token '%s' in meta item",
! 			 get_token_description (
! 			   lexer->peek_token ()->get_id ()));
  	  return nullptr;
  	}
      }
  
    // else, check for path
!   if (lexer->peek_token (1)->get_id () == SCOPE_RESOLUTION)
      {
        // path
        return parse_path_meta_item ();
      }
  
!   auto ident = lexer->peek_token ()->get_str ();
!   auto ident_locus = lexer->peek_token ()->get_locus ();
  
!   if (is_end_meta_item_tok (lexer->peek_token (1)->get_id ()))
      {
        // meta word syntax
!       lexer->skip_token ();
        return std::unique_ptr<MetaWord> (new MetaWord (ident, ident_locus));
      }
  
!   if (lexer->peek_token (1)->get_id () == EQUAL)
      {
        // maybe meta name value str syntax - check next 2 tokens
!       if (lexer->peek_token (2)->get_id () == STRING_LITERAL
! 	  && is_end_meta_item_tok (lexer->peek_token (3)->get_id ()))
  	{
  	  // meta name value str syntax
! 	  const_TokenPtr value_tok = lexer->peek_token (2);
! 	  auto value = value_tok->get_str ();
  	  auto locus = value_tok->get_locus ();
  
! 	  lexer->skip_token (2);
  
  	  return std::unique_ptr<MetaNameValueStr> (
! 	    new MetaNameValueStr (ident, ident_locus, std::move (value),
  				  locus));
  	}
        else
*************** AttributeParser::parse_meta_item_inner (
*** 3555,3570 ****
  	}
      }
  
!   if (peek_token (1)->get_id () != LEFT_PAREN)
      {
!       rust_error_at (peek_token (1)->get_locus (),
  		     "unexpected token '%s' after identifier in attribute",
! 		     get_token_description (peek_token (1)->get_id ()));
        return nullptr;
      }
  
    // is it one of those special cases like not?
!   if (peek_token ()->get_id () == IDENTIFIER)
      {
        return parse_path_meta_item ();
      }
--- 3603,3618 ----
  	}
      }
  
!   if (lexer->peek_token (1)->get_id () != LEFT_PAREN)
      {
!       rust_error_at (lexer->peek_token (1)->get_locus (),
  		     "unexpected token '%s' after identifier in attribute",
! 		     get_token_description (lexer->peek_token (1)->get_id ()));
        return nullptr;
      }
  
    // is it one of those special cases like not?
!   if (lexer->peek_token ()->get_id () == IDENTIFIER)
      {
        return parse_path_meta_item ();
      }
*************** AttributeParser::is_end_meta_item_tok (T
*** 3643,3691 ****
  std::unique_ptr<MetaItem>
  AttributeParser::parse_path_meta_item ()
  {
!   SimplePath path = parse_simple_path ();
    if (path.is_empty ())
      {
!       rust_error_at (peek_token ()->get_locus (),
  		     "failed to parse simple path in attribute");
        return nullptr;
      }
  
!   switch (peek_token ()->get_id ())
      {
!       case LEFT_PAREN: {
  	std::vector<std::unique_ptr<MetaItemInner>> meta_items
  	  = parse_meta_item_seq ();
  
  	return std::unique_ptr<MetaItemSeq> (
  	  new MetaItemSeq (std::move (path), std::move (meta_items)));
        }
!       case EQUAL: {
! 	skip_token ();
  
! 	location_t locus = peek_token ()->get_locus ();
! 	Literal lit = parse_literal ();
! 	if (lit.is_error ())
! 	  {
! 	    rust_error_at (peek_token ()->get_locus (),
! 			   "failed to parse literal in attribute");
! 	    return nullptr;
! 	  }
! 	LiteralExpr expr (std::move (lit), {}, locus);
! 	// stream_pos++;
! 	/* shouldn't be required anymore due to parsing literal actually
! 	 * skipping the token */
! 	return std::unique_ptr<MetaItemPathLit> (
! 	  new MetaItemPathLit (std::move (path), std::move (expr)));
        }
      case COMMA:
        // just simple path
        return std::unique_ptr<MetaItemPath> (
  	new MetaItemPath (std::move (path)));
      default:
!       rust_error_at (peek_token ()->get_locus (),
  		     "unrecognised token '%s' in meta item",
! 		     get_token_description (peek_token ()->get_id ()));
        return nullptr;
      }
  }
--- 3691,3736 ----
  std::unique_ptr<MetaItem>
  AttributeParser::parse_path_meta_item ()
  {
!   SimplePath path = parser->parse_simple_path ();
    if (path.is_empty ())
      {
!       rust_error_at (lexer->peek_token ()->get_locus (),
  		     "failed to parse simple path in attribute");
        return nullptr;
      }
  
!   switch (lexer->peek_token ()->get_id ())
      {
!     case LEFT_PAREN:
!       {
  	std::vector<std::unique_ptr<MetaItemInner>> meta_items
  	  = parse_meta_item_seq ();
  
  	return std::unique_ptr<MetaItemSeq> (
  	  new MetaItemSeq (std::move (path), std::move (meta_items)));
        }
!     case EQUAL:
!       {
! 	lexer->skip_token ();
  
! 	std::unique_ptr<Expr> expr = parser->parse_expr ();
! 
! 	// handle error
! 	// parse_expr should already emit an error and return nullptr
! 	if (!expr)
! 	  return nullptr;
! 
! 	return std::unique_ptr<MetaItemPathExpr> (
! 	  new MetaItemPathExpr (std::move (path), std::move (expr)));
        }
      case COMMA:
        // just simple path
        return std::unique_ptr<MetaItemPath> (
  	new MetaItemPath (std::move (path)));
      default:
!       rust_error_at (lexer->peek_token ()->get_locus (),
  		     "unrecognised token '%s' in meta item",
! 		     get_token_description (lexer->peek_token ()->get_id ()));
        return nullptr;
      }
  }
*************** AttributeParser::parse_path_meta_item ()
*** 3695,3735 ****
  std::vector<std::unique_ptr<MetaItemInner>>
  AttributeParser::parse_meta_item_seq ()
  {
-   int vec_length = token_stream.size ();
    std::vector<std::unique_ptr<MetaItemInner>> meta_items;
  
!   if (peek_token ()->get_id () != LEFT_PAREN)
      {
!       rust_error_at (peek_token ()->get_locus (),
  		     "missing left paren in delim token tree");
        return {};
      }
!   skip_token ();
  
!   while (stream_pos < vec_length && peek_token ()->get_id () != RIGHT_PAREN)
      {
        std::unique_ptr<MetaItemInner> inner = parse_meta_item_inner ();
        if (inner == nullptr)
  	{
! 	  rust_error_at (peek_token ()->get_locus (),
  			 "failed to parse inner meta item in attribute");
  	  return {};
  	}
        meta_items.push_back (std::move (inner));
  
!       if (peek_token ()->get_id () != COMMA)
  	break;
  
!       skip_token ();
      }
  
!   if (peek_token ()->get_id () != RIGHT_PAREN)
      {
!       rust_error_at (peek_token ()->get_locus (),
  		     "missing right paren in delim token tree");
        return {};
      }
!   skip_token ();
  
    return meta_items;
  }
--- 3740,3780 ----
  std::vector<std::unique_ptr<MetaItemInner>>
  AttributeParser::parse_meta_item_seq ()
  {
    std::vector<std::unique_ptr<MetaItemInner>> meta_items;
  
!   if (lexer->peek_token ()->get_id () != LEFT_PAREN)
      {
!       rust_error_at (lexer->peek_token ()->get_locus (),
  		     "missing left paren in delim token tree");
        return {};
      }
!   lexer->skip_token ();
  
!   while (lexer->peek_token ()->get_id () != END_OF_FILE
! 	 && lexer->peek_token ()->get_id () != RIGHT_PAREN)
      {
        std::unique_ptr<MetaItemInner> inner = parse_meta_item_inner ();
        if (inner == nullptr)
  	{
! 	  rust_error_at (lexer->peek_token ()->get_locus (),
  			 "failed to parse inner meta item in attribute");
  	  return {};
  	}
        meta_items.push_back (std::move (inner));
  
!       if (lexer->peek_token ()->get_id () != COMMA)
  	break;
  
!       lexer->skip_token ();
      }
  
!   if (lexer->peek_token ()->get_id () != RIGHT_PAREN)
      {
!       rust_error_at (lexer->peek_token ()->get_locus (),
  		     "missing right paren in delim token tree");
        return {};
      }
!   lexer->skip_token ();
  
    return meta_items;
  }
*************** DelimTokenTree::to_token_stream () const
*** 3752,3881 ****
    return tokens;
  }
  
- Literal
- AttributeParser::parse_literal ()
- {
-   const std::unique_ptr<Token> &tok = peek_token ();
-   switch (tok->get_id ())
-     {
-     case CHAR_LITERAL:
-       skip_token ();
-       return Literal (tok->as_string (), Literal::CHAR, tok->get_type_hint ());
-     case STRING_LITERAL:
-       skip_token ();
-       return Literal (tok->as_string (), Literal::STRING,
- 		      tok->get_type_hint ());
-     case BYTE_CHAR_LITERAL:
-       skip_token ();
-       return Literal (tok->as_string (), Literal::BYTE, tok->get_type_hint ());
-     case BYTE_STRING_LITERAL:
-       skip_token ();
-       return Literal (tok->as_string (), Literal::BYTE_STRING,
- 		      tok->get_type_hint ());
-     case RAW_STRING_LITERAL:
-       skip_token ();
-       return Literal (tok->as_string (), Literal::RAW_STRING,
- 		      tok->get_type_hint ());
-     case INT_LITERAL:
-       skip_token ();
-       return Literal (tok->as_string (), Literal::INT, tok->get_type_hint ());
-     case FLOAT_LITERAL:
-       skip_token ();
-       return Literal (tok->as_string (), Literal::FLOAT, tok->get_type_hint ());
-     case TRUE_LITERAL:
-       skip_token ();
-       return Literal ("true", Literal::BOOL, tok->get_type_hint ());
-     case FALSE_LITERAL:
-       skip_token ();
-       return Literal ("false", Literal::BOOL, tok->get_type_hint ());
-     default:
-       rust_error_at (tok->get_locus (), "expected literal - found '%s'",
- 		     get_token_description (tok->get_id ()));
-       return Literal::create_error ();
-     }
- }
- 
- SimplePath
- AttributeParser::parse_simple_path ()
- {
-   bool has_opening_scope_res = false;
-   if (peek_token ()->get_id () == SCOPE_RESOLUTION)
-     {
-       has_opening_scope_res = true;
-       skip_token ();
-     }
- 
-   std::vector<SimplePathSegment> segments;
- 
-   SimplePathSegment segment = parse_simple_path_segment ();
-   if (segment.is_error ())
-     {
-       rust_error_at (
- 	peek_token ()->get_locus (),
- 	"failed to parse simple path segment in attribute simple path");
-       return SimplePath::create_empty ();
-     }
-   segments.push_back (std::move (segment));
- 
-   while (peek_token ()->get_id () == SCOPE_RESOLUTION)
-     {
-       skip_token ();
- 
-       SimplePathSegment segment = parse_simple_path_segment ();
-       if (segment.is_error ())
- 	{
- 	  rust_error_at (
- 	    peek_token ()->get_locus (),
- 	    "failed to parse simple path segment in attribute simple path");
- 	  return SimplePath::create_empty ();
- 	}
-       segments.push_back (std::move (segment));
-     }
-   segments.shrink_to_fit ();
- 
-   return SimplePath (std::move (segments), has_opening_scope_res);
- }
- 
- SimplePathSegment
- AttributeParser::parse_simple_path_segment ()
- {
-   const std::unique_ptr<Token> &tok = peek_token ();
-   switch (tok->get_id ())
-     {
-     case IDENTIFIER:
-       skip_token ();
-       return SimplePathSegment (tok->as_string (), tok->get_locus ());
-     case SUPER:
-       skip_token ();
-       return SimplePathSegment ("super", tok->get_locus ());
-     case SELF:
-       skip_token ();
-       return SimplePathSegment ("self", tok->get_locus ());
-     case CRATE:
-       skip_token ();
-       return SimplePathSegment ("crate", tok->get_locus ());
-     case DOLLAR_SIGN:
-       if (peek_token (1)->get_id () == CRATE)
- 	{
- 	  skip_token (1);
- 	  return SimplePathSegment ("$crate", tok->get_locus ());
- 	}
-       gcc_fallthrough ();
-     default:
-       rust_error_at (tok->get_locus (),
- 		     "unexpected token '%s' in simple path segment",
- 		     get_token_description (tok->get_id ()));
-       return SimplePathSegment::create_error ();
-     }
- }
- 
  std::unique_ptr<MetaItemLitExpr>
  AttributeParser::parse_meta_item_lit ()
  {
!   location_t locus = peek_token ()->get_locus ();
!   LiteralExpr lit_expr (parse_literal (), {}, locus);
    return std::unique_ptr<MetaItemLitExpr> (
!     new MetaItemLitExpr (std::move (lit_expr)));
  }
  
  bool
--- 3797,3815 ----
    return tokens;
  }
  
  std::unique_ptr<MetaItemLitExpr>
  AttributeParser::parse_meta_item_lit ()
  {
!   std::unique_ptr<LiteralExpr> lit_expr = parser->parse_literal_expr ({});
! 
!   // TODO: return nullptr instead?
!   if (!lit_expr)
!     lit_expr = std::unique_ptr<LiteralExpr> (
!       new LiteralExpr (Literal::create_error (), {},
! 		       lexer->peek_token ()->get_locus ()));
! 
    return std::unique_ptr<MetaItemLitExpr> (
!     new MetaItemLitExpr (std::move (*lit_expr)));
  }
  
  bool
*************** MetaNameValueStr::check_cfg_predicate (c
*** 4084,4093 ****
  }
  
  bool
! MetaItemPathLit::check_cfg_predicate (const Session &session) const
  {
    return session.options.target_data.has_key_value_pair (path.as_string (),
! 							 lit.as_string ());
  }
  
  std::vector<std::unique_ptr<Token>>
--- 4018,4029 ----
  }
  
  bool
! MetaItemPathExpr::check_cfg_predicate (const Session &session) const
  {
+   // FIXME: Accept path expressions
+   rust_assert (expr->is_literal ());
    return session.options.target_data.has_key_value_pair (path.as_string (),
! 							 expr->as_string ());
  }
  
  std::vector<std::unique_ptr<Token>>
*************** MetaListNameValueStr::to_attribute () co
*** 4175,4182 ****
  }
  
  Attribute
! MetaItemPathLit::to_attribute () const
  {
    return Attribute (path, std::unique_ptr<AttrInputLiteral> (
  			    new AttrInputLiteral (lit)));
  }
--- 4111,4120 ----
  }
  
  Attribute
! MetaItemPathExpr::to_attribute () const
  {
+   rust_assert (expr->is_literal ());
+   auto &lit = static_cast<LiteralExpr &> (*expr);
    return Attribute (path, std::unique_ptr<AttrInputLiteral> (
  			    new AttrInputLiteral (lit)));
  }
*************** AttrInputMacro::AttrInputMacro (const At
*** 4279,4289 ****
    : macro (oth.macro->clone_macro_invocation_impl ())
  {}
  
! void
  AttrInputMacro::operator= (const AttrInputMacro &oth)
  {
    macro = std::unique_ptr<MacroInvocation> (
      oth.macro->clone_macro_invocation_impl ());
  }
  
  /* Visitor implementations - these are short but inlining can't happen anyway
--- 4217,4228 ----
    : macro (oth.macro->clone_macro_invocation_impl ())
  {}
  
! AttrInputMacro &
  AttrInputMacro::operator= (const AttrInputMacro &oth)
  {
    macro = std::unique_ptr<MacroInvocation> (
      oth.macro->clone_macro_invocation_impl ());
+   return *this;
  }
  
  /* Visitor implementations - these are short but inlining can't happen anyway
*************** MetaItemLitExpr::accept_vis (ASTVisitor
*** 4345,4351 ****
  }
  
  void
! MetaItemPathLit::accept_vis (ASTVisitor &vis)
  {
    vis.visit (*this);
  }
--- 4284,4290 ----
  }
  
  void
! MetaItemPathExpr::accept_vis (ASTVisitor &vis)
  {
    vis.visit (*this);
  }
*************** BlockExpr::accept_vis (ASTVisitor &vis)
*** 4513,4518 ****
--- 4452,4469 ----
  }
  
  void
+ AnonConst::accept_vis (ASTVisitor &vis)
+ {
+   vis.visit (*this);
+ }
+ 
+ void
+ ConstBlock::accept_vis (ASTVisitor &vis)
+ {
+   vis.visit (*this);
+ }
+ 
+ void
  ClosureExprInnerTyped::accept_vis (ASTVisitor &vis)
  {
    vis.visit (*this);
*************** ReturnExpr::accept_vis (ASTVisitor &vis)
*** 4573,4578 ****
--- 4524,4535 ----
  }
  
  void
+ TryExpr::accept_vis (ASTVisitor &vis)
+ {
+   vis.visit (*this);
+ }
+ 
+ void
  UnsafeBlockExpr::accept_vis (ASTVisitor &vis)
  {
    vis.visit (*this);
*************** FormatArgs::accept_vis (ASTVisitor &vis)
*** 5010,5015 ****
--- 4967,4978 ----
    vis.visit (*this);
  }
  
+ void
+ OffsetOf::accept_vis (ASTVisitor &vis)
+ {
+   vis.visit (*this);
+ }
+ 
  std::string
  FormatArgs::as_string () const
  {
*************** FormatArgs::as_string () const
*** 5017,5022 ****
--- 4980,4991 ----
    return "FormatArgs";
  }
  
+ std::string
+ OffsetOf::as_string () const
+ {
+   return "OffsetOf(" + type->as_string () + ", " + field.as_string () + ")";
+ }
+ 
  location_t
  FormatArgs::get_locus () const
  {
*************** FormatArgs::get_outer_attrs ()
*** 5047,5053 ****
    rust_unreachable ();
  }
  
! void FormatArgs::set_outer_attrs (std::vector<Attribute>)
  {
    rust_unreachable ();
  }
--- 5016,5023 ----
    rust_unreachable ();
  }
  
! void
! FormatArgs::set_outer_attrs (std::vector<Attribute>)
  {
    rust_unreachable ();
  }
*************** FormatArgs::clone_expr_impl () const
*** 5060,5065 ****
--- 5030,5053 ----
    return new FormatArgs (*this);
  }
  
+ std::vector<Attribute> &
+ OffsetOf::get_outer_attrs ()
+ {
+   rust_unreachable ();
+ }
+ 
+ void
+ OffsetOf::set_outer_attrs (std::vector<Attribute>)
+ {
+   rust_unreachable ();
+ }
+ 
+ Expr *
+ OffsetOf::clone_expr_impl () const
+ {
+   return new OffsetOf (*this);
+ }
+ 
  } // namespace AST
  
  std::ostream &
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-ast.h gcc-16-20250810/gcc/rust/ast/rust-ast.h
*** gcc-16-20250803/gcc/rust/ast/rust-ast.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-ast.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 62,74 ****
      return ident == other.ident;
    }
  
  private:
    std::string ident;
    location_t loc;
  };
  
! std::ostream &
! operator<< (std::ostream &os, Identifier const &i);
  
  namespace AST {
  // foward decl: ast visitor
--- 62,75 ----
      return ident == other.ident;
    }
  
+   operator const std::string & () const { return ident; }
+ 
  private:
    std::string ident;
    location_t loc;
  };
  
! std::ostream &operator<< (std::ostream &os, Identifier const &i);
  
  namespace AST {
  // foward decl: ast visitor
*************** public:
*** 82,87 ****
--- 83,120 ----
    virtual void accept_vis (ASTVisitor &vis) = 0;
  };
  
+ /**
+  * Base function for reconstructing and asserting that the new NodeId is
+  * different from the old NodeId. It then wraps the given pointer into a unique
+  * pointer and returns it.
+  */
+ template <typename T>
+ std::unique_ptr<T>
+ reconstruct_base (const T *instance)
+ {
+   auto *reconstructed = instance->reconstruct_impl ();
+ 
+   rust_assert (reconstructed->get_node_id () != instance->get_node_id ());
+ 
+   return std::unique_ptr<T> (reconstructed);
+ }
+ 
+ /**
+  * Reconstruct multiple items in a vector
+  */
+ template <typename T>
+ std::vector<std::unique_ptr<T>>
+ reconstruct_vec (const std::vector<std::unique_ptr<T>> &to_reconstruct)
+ {
+   std::vector<std::unique_ptr<T>> reconstructed;
+   reconstructed.reserve (to_reconstruct.size ());
+ 
+   for (const auto &elt : to_reconstruct)
+     reconstructed.emplace_back (std::unique_ptr<T> (elt->reconstruct_impl ()));
+ 
+   return reconstructed;
+ }
+ 
  // Delimiter types - used in macros and whatever.
  enum DelimType
  {
*************** public:
*** 250,255 ****
--- 283,289 ----
    std::vector<std::unique_ptr<Token>> to_token_stream () const override;
  
    TokenId get_id () const { return tok_ref->get_id (); }
+   bool has_str () const { return tok_ref->has_str (); }
    const std::string &get_str () const { return tok_ref->get_str (); }
  
    location_t get_locus () const { return tok_ref->get_locus (); }
*************** class SimplePath
*** 403,417 ****
  
  public:
    // Constructor
!   SimplePath (std::vector<SimplePathSegment> path_segments,
! 	      bool has_opening_scope_resolution = false,
! 	      location_t locus = UNDEF_LOCATION)
      : opening_scope_resolution (has_opening_scope_resolution),
        segments (std::move (path_segments)), locus (locus),
        node_id (Analysis::Mappings::get ().get_next_node_id ())
    {}
  
!   SimplePath (Identifier ident)
      : opening_scope_resolution (false),
        segments ({SimplePathSegment (ident.as_string (), ident.get_locus ())}),
        locus (ident.get_locus ()),
--- 437,451 ----
  
  public:
    // Constructor
!   explicit SimplePath (std::vector<SimplePathSegment> path_segments,
! 		       bool has_opening_scope_resolution = false,
! 		       location_t locus = UNDEF_LOCATION)
      : opening_scope_resolution (has_opening_scope_resolution),
        segments (std::move (path_segments)), locus (locus),
        node_id (Analysis::Mappings::get ().get_next_node_id ())
    {}
  
!   explicit SimplePath (Identifier ident)
      : opening_scope_resolution (false),
        segments ({SimplePathSegment (ident.as_string (), ident.get_locus ())}),
        locus (ident.get_locus ()),
*************** public:
*** 1039,1045 ****
      Path,
      Word,
      NameValueStr,
!     PathLit,
      Seq,
      ListPaths,
      ListNameValueStr,
--- 1073,1079 ----
      Path,
      Word,
      NameValueStr,
!     PathExpr,
      Seq,
      ListPaths,
      ListNameValueStr,
*************** public:
*** 1057,1063 ****
  class MetaItemLitExpr;
  
  // Forward decl - defined in rust-expr.h
! class MetaItemPathLit;
  
  // Forward decl - defined in rust-macro.h
  class MetaItemPath;
--- 1091,1097 ----
  class MetaItemLitExpr;
  
  // Forward decl - defined in rust-expr.h
! class MetaItemPathExpr;
  
  // Forward decl - defined in rust-macro.h
  class MetaItemPath;
*************** public:
*** 1256,1261 ****
--- 1290,1297 ----
      FieldAccess,
      Closure,
      Block,
+     ConstExpr,
+     ConstBlock,
      Continue,
      Break,
      Range,
*************** public:
*** 1272,1277 ****
--- 1308,1314 ----
      LlvmInlineAsm,
      Identifier,
      FormatArgs,
+     OffsetOf,
      MacroInvocation,
      Borrow,
      Dereference,
*************** public:
*** 1283,1288 ****
--- 1320,1326 ----
      TypeCast,
      Assignment,
      CompoundAssignment,
+     Try,
    };
  
    virtual Kind get_expr_kind () const = 0;
*************** public:
*** 1477,1482 ****
--- 1515,1524 ----
      return std::unique_ptr<Type> (clone_type_impl ());
    }
  
+   // Similar to `clone_type`, but generates a new instance of the node with a
+   // different NodeId
+   std::unique_ptr<Type> reconstruct () const { return reconstruct_base (this); }
+ 
    // virtual destructor
    virtual ~Type () {}
  
*************** public:
*** 1495,1505 ****
    virtual location_t get_locus () const = 0;
  
    NodeId get_node_id () const { return node_id; }
  
  protected:
    Type () : node_id (Analysis::Mappings::get ().get_next_node_id ()) {}
  
!   // Clone function implementation as pure virtual method
    virtual Type *clone_type_impl () const = 0;
  
    NodeId node_id;
--- 1537,1549 ----
    virtual location_t get_locus () const = 0;
  
    NodeId get_node_id () const { return node_id; }
+   virtual Type *reconstruct_impl () const = 0;
  
  protected:
    Type () : node_id (Analysis::Mappings::get ().get_next_node_id ()) {}
+   Type (NodeId node_id) : node_id (node_id) {}
  
!   // Clone and reconstruct function implementations as pure virtual methods
    virtual Type *clone_type_impl () const = 0;
  
    NodeId node_id;
*************** public:
*** 1515,1520 ****
--- 1559,1571 ----
      return std::unique_ptr<TypeNoBounds> (clone_type_no_bounds_impl ());
    }
  
+   std::unique_ptr<TypeNoBounds> reconstruct () const
+   {
+     return reconstruct_base (this);
+   }
+ 
+   virtual TypeNoBounds *reconstruct_impl () const override = 0;
+ 
  protected:
    // Clone function implementation as pure virtual method
    virtual TypeNoBounds *clone_type_no_bounds_impl () const = 0;
*************** public:
*** 1549,1554 ****
--- 1600,1610 ----
      return std::unique_ptr<TypeParamBound> (clone_type_param_bound_impl ());
    }
  
+   std::unique_ptr<TypeParamBound> reconstruct () const
+   {
+     return reconstruct_base (this);
+   }
+ 
    virtual std::string as_string () const = 0;
  
    NodeId get_node_id () const { return node_id; }
*************** public:
*** 1557,1566 ****
--- 1613,1626 ----
  
    virtual TypeParamBoundType get_bound_type () const = 0;
  
+   virtual TypeParamBound *reconstruct_impl () const = 0;
+ 
  protected:
    // Clone function implementation as pure virtual method
    virtual TypeParamBound *clone_type_param_bound_impl () const = 0;
  
+   TypeParamBound () : node_id (Analysis::Mappings::get ().get_next_node_id ())
+   {}
    TypeParamBound (NodeId node_id) : node_id (node_id) {}
  
    NodeId node_id;
*************** protected:
*** 1622,1627 ****
--- 1682,1691 ----
    {
      return new Lifetime (node_id, lifetime_type, lifetime_name, locus);
    }
+   Lifetime *reconstruct_impl () const override
+   {
+     return new Lifetime (lifetime_type, lifetime_name, locus);
+   }
  };
  
  /* Base generic parameter in AST. Abstract - can be represented by a Lifetime
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-builtin-ast-nodes.h gcc-16-20250810/gcc/rust/ast/rust-builtin-ast-nodes.h
*** gcc-16-20250803/gcc/rust/ast/rust-builtin-ast-nodes.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-builtin-ast-nodes.h	Sun Aug 10 22:32:08 2025
*************** protected:
*** 225,230 ****
--- 225,283 ----
    virtual Expr *clone_expr_impl () const override;
  };
  
+ /**
+  * The node associated with the builtin offset_of!() macro
+  */
+ class OffsetOf : public Expr
+ {
+ public:
+   OffsetOf (std::unique_ptr<Type> &&type, Identifier field, location_t loc)
+     : type (std::move (type)), field (field), loc (loc)
+   {}
+ 
+   OffsetOf (const OffsetOf &other)
+     : type (other.type->clone_type ()), field (other.field), loc (other.loc),
+       marked_for_strip (other.marked_for_strip)
+   {}
+ 
+   OffsetOf &operator= (const OffsetOf &other)
+   {
+     type = other.type->clone_type ();
+     field = other.field;
+     loc = other.loc;
+     marked_for_strip = other.marked_for_strip;
+ 
+     return *this;
+   }
+ 
+   void accept_vis (AST::ASTVisitor &vis) override;
+ 
+   virtual location_t get_locus () const override { return loc; }
+   const Type &get_type () const { return *type; }
+   Type &get_type () { return *type; }
+   const Identifier &get_field () const { return field; }
+ 
+   bool is_expr_without_block () const override { return false; }
+ 
+   void mark_for_strip () override { marked_for_strip = true; }
+   bool is_marked_for_strip () const override { return marked_for_strip; }
+ 
+   std::string as_string () const override;
+ 
+   std::vector<Attribute> &get_outer_attrs () override;
+   void set_outer_attrs (std::vector<Attribute>) override;
+   Expr *clone_expr_impl () const override;
+ 
+   Expr::Kind get_expr_kind () const override { return Expr::Kind::OffsetOf; }
+ 
+ private:
+   std::unique_ptr<Type> type;
+   Identifier field;
+ 
+   location_t loc;
+   bool marked_for_strip = false;
+ };
+ 
  } // namespace AST
  } // namespace Rust
  
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-collect-lang-items.cc gcc-16-20250810/gcc/rust/ast/rust-collect-lang-items.cc
*** gcc-16-20250803/gcc/rust/ast/rust-collect-lang-items.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-collect-lang-items.cc	Sun Aug 10 22:32:08 2025
*************** CollectLangItems::visit (AST::EnumItem &
*** 109,113 ****
--- 109,137 ----
    DefaultASTVisitor::visit (item);
  }
  
+ void
+ CollectLangItems::visit (AST::EnumItemTuple &item)
+ {
+   maybe_add_lang_item (item);
+ 
+   DefaultASTVisitor::visit (item);
+ }
+ 
+ void
+ CollectLangItems::visit (AST::EnumItemStruct &item)
+ {
+   maybe_add_lang_item (item);
+ 
+   DefaultASTVisitor::visit (item);
+ }
+ 
+ void
+ CollectLangItems::visit (AST::EnumItemDiscriminant &item)
+ {
+   maybe_add_lang_item (item);
+ 
+   DefaultASTVisitor::visit (item);
+ }
+ 
  } // namespace AST
  } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-collect-lang-items.h gcc-16-20250810/gcc/rust/ast/rust-collect-lang-items.h
*** gcc-16-20250803/gcc/rust/ast/rust-collect-lang-items.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-collect-lang-items.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 50,55 ****
--- 50,58 ----
    void visit (AST::Function &item) override;
    void visit (AST::StructStruct &item) override;
    void visit (AST::EnumItem &item) override;
+   void visit (AST::EnumItemTuple &item) override;
+   void visit (AST::EnumItemStruct &item) override;
+   void visit (AST::EnumItemDiscriminant &item) override;
  
  private:
    template <typename T> void maybe_add_lang_item (const T &item);
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-cond-compilation.h gcc-16-20250810/gcc/rust/ast/rust-cond-compilation.h
*** gcc-16-20250803/gcc/rust/ast/rust-cond-compilation.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-cond-compilation.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 42,49 ****
  
  protected:
    // Clone function impl to be overriden in base classes
!   virtual ConfigurationPredicate *
!   clone_configuration_predicate_impl () const = 0;
  };
  
  // A configuration option - true if option is set, false if option is not set.
--- 42,49 ----
  
  protected:
    // Clone function impl to be overriden in base classes
!   virtual ConfigurationPredicate *clone_configuration_predicate_impl () const
!     = 0;
  };
  
  // A configuration option - true if option is set, false if option is not set.
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-desugar-apit.cc gcc-16-20250810/gcc/rust/ast/rust-desugar-apit.cc
*** gcc-16-20250803/gcc/rust/ast/rust-desugar-apit.cc	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/rust/ast/rust-desugar-apit.cc	Sun Aug 10 22:32:08 2025
***************
*** 0 ****
--- 1,522 ----
+ // Copyright (C) 2025 Free Software Foundation, Inc.
+ 
+ // This file is part of GCC.
+ 
+ // GCC is free software; you can redistribute it and/or modify it under
+ // the terms of the GNU General Public License as published by the Free
+ // Software Foundation; either version 3, or (at your option) any later
+ // version.
+ 
+ // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ // WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ // for more details.
+ 
+ // You should have received a copy of the GNU General Public License
+ // along with GCC; see the file COPYING3.  If not see
+ // <http://www.gnu.org/licenses/>.
+ 
+ #include "rust-desugar-apit.h"
+ #include "rust-ast.h"
+ #include "rust-type.h"
+ 
+ namespace Rust {
+ namespace AST {
+ 
+ class DesugarApitType : public DefaultASTVisitor
+ {
+   using DefaultASTVisitor::visit;
+ 
+ public:
+   static std::pair<AST::Type *, std::vector<std::unique_ptr<GenericParam>>>
+   Desugar (AST::Type &type)
+   {
+     DesugarApitType visitor (&type);
+     type.accept_vis (visitor);
+     rust_assert (visitor.translated != nullptr);
+     return std::make_pair (visitor.translated,
+ 			   std::move (visitor.implicit_generic_params));
+   }
+ 
+   // Generate a unique impl trait parameter name
+   static Identifier get_impl_name ()
+   {
+     static size_t counter = 0;
+     return Identifier ("Impl_" + std::to_string (counter++));
+   }
+ 
+   // these can hold other types
+   void visit (AST::TupleType &tuple) override
+   {
+     for (auto &elem : tuple.get_elems ())
+       {
+ 	auto &type = *elem.get ();
+ 	auto desugar = Desugar (type);
+ 	auto tt = desugar.first;
+ 
+ 	auto &implicit_generics = desugar.second;
+ 	if (implicit_generics.empty ())
+ 	  continue;
+ 
+ 	if (tt != elem.get ())
+ 	  elem = std::unique_ptr<Type> (tt);
+ 
+ 	for (auto &implicit_generic : implicit_generics)
+ 	  implicit_generic_params.push_back (std::move (implicit_generic));
+       }
+   }
+ 
+   void visit (AST::ArrayType &type) override
+   {
+     auto &element_type = type.get_element_type ();
+     auto desugar = Desugar (*element_type);
+     auto tt = desugar.first;
+ 
+     auto &implicit_generics = desugar.second;
+     if (implicit_generics.empty ())
+       return;
+ 
+     if (tt != element_type.get ())
+       element_type = std::unique_ptr<AST::Type> (tt);
+ 
+     for (auto &implicit_generic : implicit_generics)
+       implicit_generic_params.push_back (std::move (implicit_generic));
+   }
+ 
+   void visit (AST::ReferenceType &type) override
+   {
+     // Get a reference to the current type for in-place modification
+     auto &referenced_type = type.get_type_referenced ();
+     auto desugar = Desugar (referenced_type);
+     auto tt = desugar.first;
+ 
+     auto &implicit_generics = desugar.second;
+     if (implicit_generics.empty ())
+       return;
+ 
+     // Update the reference type's contents rather than creating a new one
+     if (&referenced_type != tt)
+       {
+ 	std::unique_ptr<AST::TypeNoBounds> new_type_no_bounds (
+ 	  static_cast<AST::TypeNoBounds *> (tt));
+ 	type.get_type_ptr () = std::move (new_type_no_bounds);
+       }
+ 
+     // Collect all the implicit generic parameters we found
+     for (auto &implicit_generic : implicit_generics)
+       implicit_generic_params.push_back (std::move (implicit_generic));
+   }
+ 
+   void visit (AST::RawPointerType &type) override
+   {
+     auto &pointed_type = type.get_type_pointed_to ();
+     auto desugar = Desugar (pointed_type);
+     auto tt = desugar.first;
+ 
+     auto &implicit_generics = desugar.second;
+     if (implicit_generics.empty ())
+       return;
+ 
+     // Update the pointer's inner type directly using the new accessor
+     if (&pointed_type != tt)
+       {
+ 	std::unique_ptr<AST::TypeNoBounds> new_type_no_bounds (
+ 	  static_cast<AST::TypeNoBounds *> (tt));
+ 	type.get_type_ptr () = std::move (new_type_no_bounds);
+       }
+ 
+     // Collect all the implicit generic parameters we found
+     for (auto &implicit_generic : implicit_generics)
+       implicit_generic_params.push_back (std::move (implicit_generic));
+   }
+ 
+   void visit (AST::SliceType &type) override
+   {
+     auto &element_type = type.get_elem_type ();
+     auto desugar = Desugar (element_type);
+     auto tt = desugar.first;
+ 
+     auto &implicit_generics = desugar.second;
+     if (implicit_generics.empty ())
+       return;
+ 
+     if (&element_type != tt)
+       {
+ 	std::unique_ptr<AST::Type> new_elem_type (tt);
+ 	type.get_elem_type_ptr () = std::move (new_elem_type);
+       }
+ 
+     // Collect all the implicit generic parameters we found
+     for (auto &implicit_generic : implicit_generics)
+       implicit_generic_params.push_back (std::move (implicit_generic));
+   }
+ 
+   void visit (AST::ParenthesisedType &type) override
+   {
+     auto &inner_type_ptr = type.get_type_in_parens ();
+     auto desugar = Desugar (*inner_type_ptr);
+     auto tt = desugar.first;
+ 
+     auto &implicit_generics = desugar.second;
+     if (implicit_generics.empty ())
+       return;
+ 
+     if (inner_type_ptr.get () != tt)
+       {
+ 	std::unique_ptr<AST::Type> new_inner_type (tt);
+ 	inner_type_ptr = std::move (new_inner_type);
+       }
+ 
+     // Collect all the implicit generic parameters we found
+     for (auto &implicit_generic : implicit_generics)
+       implicit_generic_params.push_back (std::move (implicit_generic));
+   }
+ 
+   // this is where the desugar happens
+   void visit (AST::ImplTraitType &type) override
+   {
+     // Generate a unique name using the static method
+     auto ident = get_impl_name ();
+ 
+     // Create a type path for the new generic parameter
+     // Create a SimplePathSegment with the identifier string
+     auto simple_seg = SimplePathSegment (ident.as_string (), type.get_locus ());
+     // Create a vector of SimplePathSegments for SimplePath constructor
+     std::vector<SimplePathSegment> simple_segs = {simple_seg};
+     // Create a SimplePath
+     auto simple_path = SimplePath (simple_segs, false, type.get_locus ());
+ 
+     // Convert to TypePath by creating path segments
+     std::vector<std::unique_ptr<TypePathSegment>> segments;
+     segments.push_back (std::unique_ptr<TypePathSegment> (new TypePathSegment (
+       PathIdentSegment (ident.as_string (), type.get_locus ()), false,
+       type.get_locus ())));
+ 
+     // Create TypePath from segments
+     auto type_path
+       = new TypePath (std::move (segments), type.get_locus (), false);
+ 
+     // Convert bounds from impl trait to generic parameter bounds
+     std::vector<std::unique_ptr<TypeParamBound>> bounds;
+     for (auto &bound : type.get_type_param_bounds ())
+       bounds.push_back (bound->clone_type_param_bound ());
+ 
+     // Create the new generic parameter
+     auto generic_param = std::unique_ptr<TypeParam> (
+       new TypeParam (ident, type.get_locus (), std::move (bounds), nullptr, {},
+ 		     true /*from impl trait*/));
+ 
+     // Store the generic parameter to be added to the function signature
+     implicit_generic_params.push_back (std::move (generic_param));
+ 
+     // Replace impl trait with the new type parameter
+     translated = type_path;
+   }
+ 
+   void visit (AST::ImplTraitTypeOneBound &type) override
+   {
+     // Generate a unique name using the static method
+     auto ident = get_impl_name ();
+ 
+     // Create a type path for the new generic parameter
+     // Create a SimplePathSegment with the identifier string
+     auto simple_seg = SimplePathSegment (ident.as_string (), type.get_locus ());
+     // Create a vector of SimplePathSegments for SimplePath constructor
+     std::vector<SimplePathSegment> simple_segs = {simple_seg};
+     // Create a SimplePath
+     auto simple_path = SimplePath (simple_segs, false, type.get_locus ());
+ 
+     // Convert to TypePath by creating path segments
+     std::vector<std::unique_ptr<TypePathSegment>> segments;
+     segments.push_back (std::unique_ptr<TypePathSegment> (new TypePathSegment (
+       PathIdentSegment (ident.as_string (), type.get_locus ()), false,
+       type.get_locus ())));
+ 
+     // Create TypePath from segments
+     auto type_path
+       = new TypePath (std::move (segments), type.get_locus (), false);
+ 
+     // Convert the bound to a generic parameter bound
+     std::vector<std::unique_ptr<TypeParamBound>> bounds;
+     bounds.push_back (std::move (type.get_trait_bound ()));
+ 
+     // Create the new generic parameter
+     auto generic_param = std::unique_ptr<TypeParam> (
+       new TypeParam (ident, type.get_locus (), std::move (bounds), nullptr, {},
+ 		     true /*from impl trait*/));
+ 
+     // Store the generic parameter to be added to the function signature
+     implicit_generic_params.push_back (std::move (generic_param));
+ 
+     // Replace impl trait with the new type parameter
+     translated = type_path;
+   }
+ 
+ private:
+   DesugarApitType (AST::Type *base)
+     : translated (base), implicit_generic_params ()
+   {}
+ 
+   AST::Type *translated;
+   std::vector<std::unique_ptr<GenericParam>> implicit_generic_params;
+ };
+ 
+ // ---------
+ 
+ class ApitBoundProcessor
+ {
+ public:
+   ApitBoundProcessor (
+     WhereClause &where_clause,
+     std::vector<std::unique_ptr<GenericParam>> &generic_params)
+     : where_clause (where_clause), generic_params (generic_params)
+   {}
+ 
+   void go (std::vector<std::unique_ptr<GenericParam>> &implicit_generics)
+   {
+     // some desugars are more complex so imagine this case
+     //
+     // pub fn foo(_value: impl Bar<Baz = impl Foo>) -> i32 {
+     //   15
+     // }
+     //
+     // this needs to become:
+     //
+     // pub fn foo<T, U>(_value: T) -> i32
+     // where
+     //     T: Bar<Baz = U>,
+     //     U: Foo,
+     // {
+     //     15
+     // }
+     //
+     // so we need to walk all the implicit generics and the trait bounds paths
+     // for more generics
+ 
+     for (auto &implicit_generic : implicit_generics)
+       {
+ 	switch (implicit_generic->get_kind ())
+ 	  {
+ 	  case GenericParam::Kind::Type:
+ 	    {
+ 	      TypeParam &p
+ 		= *static_cast<TypeParam *> (implicit_generic.get ());
+ 
+ 	      process_type_param (p);
+ 	      generic_params.push_back (std::move (implicit_generic));
+ 	      for (auto &synth : synthetic_params)
+ 		generic_params.push_back (std::move (synth));
+ 	      synthetic_params.clear ();
+ 	    }
+ 	    break;
+ 
+ 	  default:
+ 	    generic_params.push_back (std::move (implicit_generic));
+ 	    break;
+ 	  }
+       }
+   }
+ 
+ private:
+   void process_type_param (TypeParam &p)
+   {
+     auto &bounds = p.get_type_param_bounds ();
+     std::vector<size_t> bounds_to_remove;
+     for (size_t i = 0; i < bounds.size (); i++)
+       {
+ 	auto &tb = bounds[i];
+ 	switch (tb->get_bound_type ())
+ 	  {
+ 	  case TypeParamBound::TypeParamBoundType::TRAIT:
+ 	    {
+ 	      TraitBound &ttb = *static_cast<TraitBound *> (tb.get ());
+ 	      TypePath &path = ttb.get_type_path ();
+ 	      bool deusgared = process_type_path (p, ttb, path);
+ 	      if (deusgared)
+ 		bounds_to_remove.push_back (i);
+ 	    }
+ 
+ 	  default:
+ 	    break;
+ 	  }
+       }
+     for (auto it = bounds_to_remove.rbegin (); it != bounds_to_remove.rend ();
+ 	 ++it)
+       bounds.erase (bounds.begin () + *it);
+   }
+ 
+   bool process_type_path (TypeParam &p, TraitBound &parent, TypePath &path)
+   {
+     bool desugared = false;
+     for (auto &segment : path.get_segments ())
+       {
+ 	switch (segment->get_type ())
+ 	  {
+ 	  case TypePathSegment::SegmentType::GENERIC:
+ 	    {
+ 	      TypePathSegmentGeneric &seg
+ 		= *static_cast<TypePathSegmentGeneric *> (segment.get ());
+ 	      desugared |= process_generic_segment (p, parent, path, seg);
+ 	    }
+ 
+ 	  default:
+ 	    break;
+ 	  }
+       }
+     return desugared;
+   }
+ 
+   bool process_generic_segment (TypeParam &p, TraitBound &parent,
+ 				TypePath &path, TypePathSegmentGeneric &seg)
+   {
+     // we need to look for any impl types as default arguments in any generics
+     // and remove this index from the generic arguments by using a where
+     // constraint instead
+ 
+     std::vector<std::unique_ptr<WhereClauseItem>> new_clauses;
+     GenericArgs &generic_args = seg.get_generic_args ();
+     std::vector<std::reference_wrapper<const GenericArgsBinding>>
+       bindings_desugared;
+     std::vector<GenericArgsBinding> &bindings
+       = generic_args.get_binding_args ();
+ 
+     for (auto &generic : bindings)
+       {
+ 	auto &t = generic.get_type ();
+ 	auto translated = DesugarApitType::Desugar (t);
+ 	auto tt = translated.first;
+ 
+ 	auto &implicit_generics = translated.second;
+ 	if (implicit_generics.empty ())
+ 	  continue;
+ 
+ 	if (tt != &t)
+ 	  {
+ 	    bindings_desugared.push_back (generic);
+ 	    generic.get_type_ptr () = std::unique_ptr<Type> (tt);
+ 	  }
+ 
+ 	for (auto &implicit_generic : implicit_generics)
+ 	  {
+ 	    switch (implicit_generic->get_kind ())
+ 	      {
+ 	      case GenericParam::Kind::Type:
+ 		{
+ 		  TypeParam &tp
+ 		    = *static_cast<TypeParam *> (implicit_generic.get ());
+ 
+ 		  std::vector<std::unique_ptr<TypeParamBound>>
+ 		    type_param_bounds;
+ 		  for (auto &b : tp.get_type_param_bounds ())
+ 		    type_param_bounds.push_back (std::move (b));
+ 		  tp.get_type_param_bounds ().clear ();
+ 
+ 		  // add synthetic parameter for this
+ 		  synthetic_params.push_back (std::move (implicit_generic));
+ 
+ 		  auto bound_type_path
+ 		    = get_type_for_identifier (tp.get_type_representation ());
+ 
+ 		  auto clause = new TypeBoundWhereClauseItem (
+ 		    {}, std::move (bound_type_path),
+ 		    std::move (type_param_bounds), tp.get_locus ());
+ 		  std::unique_ptr<WhereClauseItem> clause_item
+ 		    = std::unique_ptr<WhereClauseItem> (clause);
+ 		  new_clauses.push_back (std::move (clause_item));
+ 		}
+ 		break;
+ 
+ 	      default:
+ 		synthetic_params.push_back (std::move (implicit_generic));
+ 		break;
+ 	      }
+ 	  }
+       }
+ 
+     std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds;
+     auto bound = std::unique_ptr<TypeParamBound> (new TraitBound (parent));
+     type_param_bounds.push_back (std::move (bound));
+     auto parent_type_path
+       = get_type_for_identifier (p.get_type_representation ());
+     auto clause
+       = new TypeBoundWhereClauseItem ({}, std::move (parent_type_path),
+ 				      std::move (type_param_bounds),
+ 				      parent.get_locus ());
+     std::unique_ptr<WhereClauseItem> clause_item
+       = std::unique_ptr<WhereClauseItem> (clause);
+     where_clause.get_items ().push_back (std::move (clause_item));
+ 
+     for (auto &where_item : new_clauses)
+       where_clause.get_items ().push_back (std::move (where_item));
+ 
+     return !bindings_desugared.empty ();
+   }
+ 
+   static std::unique_ptr<Type> get_type_for_identifier (const Identifier &ident)
+   {
+     auto simple_seg
+       = SimplePathSegment (ident.as_string (), ident.get_locus ());
+     std::vector<SimplePathSegment> simple_segs = {simple_seg};
+     auto simple_path = SimplePath (simple_segs, false, ident.get_locus ());
+     std::vector<std::unique_ptr<TypePathSegment>> segments;
+     segments.push_back (std::unique_ptr<TypePathSegment> (new TypePathSegment (
+       PathIdentSegment (ident.as_string (), ident.get_locus ()), false,
+       ident.get_locus ())));
+     auto type_path = new TypePath (std::move (segments), ident.get_locus ());
+     return std::unique_ptr<Type> (type_path);
+   }
+ 
+ private:
+   WhereClause &where_clause;
+   std::vector<std::unique_ptr<GenericParam>> &generic_params;
+ 
+   // mutates
+   std::vector<std::unique_ptr<GenericParam>> synthetic_params;
+ };
+ 
+ // ---------
+ 
+ DesugarApit::DesugarApit () {}
+ 
+ void
+ DesugarApit::go (AST::Crate &crate)
+ {
+   DefaultASTVisitor::visit (crate);
+ }
+ 
+ void
+ DesugarApit::visit (AST::Function &function)
+ {
+   if (!function.has_function_params ())
+     return;
+ 
+   auto &fn_params = function.get_function_params ();
+   for (auto &param : fn_params)
+     {
+       if (param->is_variadic () || param->is_self ())
+ 	continue;
+ 
+       auto *p = param.get ();
+       auto &fp = *static_cast<AST::FunctionParam *> (p);
+       auto &type = fp.get_type ();
+ 
+       auto translated = DesugarApitType::Desugar (type);
+       auto tt = translated.first;
+ 
+       auto &implicit_generics = translated.second;
+       if (implicit_generics.empty ())
+ 	continue;
+ 
+       if (fp.get_type_ptr ().get () != tt)
+ 	{
+ 	  fp.get_type_ptr () = std::unique_ptr<AST::Type> (tt);
+ 	}
+ 
+       ApitBoundProcessor processor (function.get_where_clause (),
+ 				    function.get_generic_params ());
+       processor.go (implicit_generics);
+     }
+ }
+ 
+ } // namespace AST
+ } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-desugar-apit.h gcc-16-20250810/gcc/rust/ast/rust-desugar-apit.h
*** gcc-16-20250803/gcc/rust/ast/rust-desugar-apit.h	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/rust/ast/rust-desugar-apit.h	Sun Aug 10 22:32:08 2025
***************
*** 0 ****
--- 1,42 ----
+ // Copyright (C) 2025 Free Software Foundation, Inc.
+ 
+ // This file is part of GCC.
+ 
+ // GCC is free software; you can redistribute it and/or modify it under
+ // the terms of the GNU General Public License as published by the Free
+ // Software Foundation; either version 3, or (at your option) any later
+ // version.
+ 
+ // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ // WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ // for more details.
+ 
+ // You should have received a copy of the GNU General Public License
+ // along with GCC; see the file COPYING3.  If not see
+ // <http://www.gnu.org/licenses/>.
+ 
+ #ifndef RUST_DESUGAR_APIT_H
+ #define RUST_DESUGAR_APIT_H
+ 
+ #include "rust-ast-visitor.h"
+ 
+ namespace Rust {
+ namespace AST {
+ 
+ class DesugarApit : public DefaultASTVisitor
+ {
+   using DefaultASTVisitor::visit;
+ 
+ public:
+   DesugarApit ();
+   void go (AST::Crate &);
+ 
+ private:
+   void visit (AST::Function &) override;
+ };
+ 
+ } // namespace AST
+ } // namespace Rust
+ 
+ #endif // ! RUST_DESUGAR_APIT_H
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-desugar-for-loops.cc gcc-16-20250810/gcc/rust/ast/rust-desugar-for-loops.cc
*** gcc-16-20250803/gcc/rust/ast/rust-desugar-for-loops.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-desugar-for-loops.cc	Sun Aug 10 22:32:08 2025
***************
*** 17,23 ****
  // <http://www.gnu.org/licenses/>.
  
  #include "rust-desugar-for-loops.h"
- #include "rust-ast-visitor.h"
  #include "rust-ast.h"
  #include "rust-hir-map.h"
  #include "rust-path.h"
--- 17,22 ----
*************** namespace AST {
*** 31,62 ****
  
  DesugarForLoops::DesugarForLoops () {}
  
- void
- DesugarForLoops::go (AST::Crate &crate)
- {
-   DefaultASTVisitor::visit (crate);
- }
- 
- static void
- replace_for_loop (std::unique_ptr<Expr> &for_loop,
- 		  std::unique_ptr<Expr> &&expanded)
- {
-   for_loop = std::move (expanded);
- }
- 
- MatchArm
- DesugarForLoops::DesugarCtx::make_match_arm (std::unique_ptr<Pattern> &&path)
- {
-   auto patterns = std::vector<std::unique_ptr<Pattern>> ();
-   patterns.emplace_back (std::move (path));
- 
-   return MatchArm (std::move (patterns), loc);
- }
- 
  MatchCase
  DesugarForLoops::DesugarCtx::make_break_arm ()
  {
!   auto arm = make_match_arm (std::unique_ptr<Pattern> (new PathInExpression (
      builder.path_in_expression (LangItem::Kind::OPTION_NONE))));
  
    auto break_expr
--- 30,39 ----
  
  DesugarForLoops::DesugarForLoops () {}
  
  MatchCase
  DesugarForLoops::DesugarCtx::make_break_arm ()
  {
!   auto arm = builder.match_arm (std::unique_ptr<Pattern> (new PathInExpression (
      builder.path_in_expression (LangItem::Kind::OPTION_NONE))));
  
    auto break_expr
*************** DesugarForLoops::DesugarCtx::make_contin
*** 79,85 ****
      builder.path_in_expression (LangItem::Kind::OPTION_SOME),
      std::move (pattern_item)));
  
!   auto val_arm = make_match_arm (std::move (pattern));
  
    auto next = builder.identifier (DesugarCtx::next_value_id);
  
--- 56,62 ----
      builder.path_in_expression (LangItem::Kind::OPTION_SOME),
      std::move (pattern_item)));
  
!   auto val_arm = builder.match_arm (std::move (pattern));
  
    auto next = builder.identifier (DesugarCtx::next_value_id);
  
*************** DesugarForLoops::DesugarCtx::make_contin
*** 91,104 ****
    return MatchCase (std::move (val_arm), std::move (assignment));
  }
  
- std::unique_ptr<Stmt>
- DesugarForLoops::DesugarCtx::statementify (std::unique_ptr<Expr> &&expr)
- {
-   return std::unique_ptr<Stmt> (new ExprStmt (std::move (expr), loc, true));
- }
- 
  std::unique_ptr<Expr>
! DesugarForLoops::desugar (AST::ForLoopExpr &expr)
  {
    auto ctx = DesugarCtx (expr.get_locus ());
  
--- 68,75 ----
    return MatchCase (std::move (val_arm), std::move (assignment));
  }
  
  std::unique_ptr<Expr>
! DesugarForLoops::desugar (ForLoopExpr &expr)
  {
    auto ctx = DesugarCtx (expr.get_locus ());
  
*************** DesugarForLoops::desugar (AST::ForLoopEx
*** 140,149 ****
  
    auto loop_stmts = std::vector<std::unique_ptr<Stmt>> ();
    loop_stmts.emplace_back (std::move (let_next));
!   loop_stmts.emplace_back (ctx.statementify (std::move (match_next)));
    loop_stmts.emplace_back (std::move (let_pat));
    loop_stmts.emplace_back (
!     ctx.statementify (expr.get_loop_block ().clone_expr ()));
  
    // loop {
    //     <let_next>;
--- 111,120 ----
  
    auto loop_stmts = std::vector<std::unique_ptr<Stmt>> ();
    loop_stmts.emplace_back (std::move (let_next));
!   loop_stmts.emplace_back (ctx.builder.statementify (std::move (match_next)));
    loop_stmts.emplace_back (std::move (let_pat));
    loop_stmts.emplace_back (
!     ctx.builder.statementify (expr.get_loop_block ().clone_expr ()));
  
    // loop {
    //     <let_next>;
*************** DesugarForLoops::desugar (AST::ForLoopEx
*** 170,203 ****
  }
  
  void
! DesugarForLoops::maybe_desugar_expr (std::unique_ptr<Expr> &expr)
  {
!   if (expr->get_expr_kind () == AST::Expr::Kind::Loop)
!     {
!       auto &loop = static_cast<AST::BaseLoopExpr &> (*expr);
! 
!       if (loop.get_loop_kind () == AST::BaseLoopExpr::Kind::For)
! 	{
! 	  auto &for_loop = static_cast<AST::ForLoopExpr &> (loop);
! 
! 	  auto desugared = desugar (for_loop);
  
! 	  replace_for_loop (expr, std::move (desugared));
! 	}
!     }
! }
  
! void
! DesugarForLoops::visit (AST::BlockExpr &block)
! {
!   for (auto &stmt : block.get_statements ())
!     if (stmt->get_stmt_kind () == AST::Stmt::Kind::Expr)
!       maybe_desugar_expr (static_cast<AST::ExprStmt &> (*stmt).get_expr_ptr ());
  
!   if (block.has_tail_expr ())
!     maybe_desugar_expr (block.get_tail_expr_ptr ());
  
!   DefaultASTVisitor::visit (block);
  }
  
  } // namespace AST
--- 141,158 ----
  }
  
  void
! DesugarForLoops::go (std::unique_ptr<Expr> &ptr)
  {
!   rust_assert (ptr->get_expr_kind () == Expr::Kind::Loop);
  
!   auto &loop = static_cast<BaseLoopExpr &> (*ptr);
  
!   rust_assert (loop.get_loop_kind () == BaseLoopExpr::Kind::For);
  
!   auto &for_loop = static_cast<ForLoopExpr &> (loop);
!   auto desugared = DesugarForLoops ().desugar (for_loop);
  
!   ptr = std::move (desugared);
  }
  
  } // namespace AST
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-desugar-for-loops.h gcc-16-20250810/gcc/rust/ast/rust-desugar-for-loops.h
*** gcc-16-20250803/gcc/rust/ast/rust-desugar-for-loops.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-desugar-for-loops.h	Sun Aug 10 22:32:08 2025
***************
*** 20,26 ****
  #define RUST_DESUGAR_FOR_LOOPS_H
  
  #include "rust-ast-builder.h"
- #include "rust-ast-visitor.h"
  #include "rust-expr.h"
  
  namespace Rust {
--- 20,25 ----
*************** namespace AST {
*** 69,83 ****
  // of the way the typechecker is currently structured, where it will fetch name
  // resolution information in order to typecheck paths - which technically isn't
  // necessary.
! class DesugarForLoops : public DefaultASTVisitor
  {
-   using DefaultASTVisitor::visit;
- 
  public:
!   DesugarForLoops ();
!   void go (AST::Crate &);
  
  private:
    struct DesugarCtx
    {
      DesugarCtx (location_t loc) : builder (Builder (loc)), loc (loc) {}
--- 68,81 ----
  // of the way the typechecker is currently structured, where it will fetch name
  // resolution information in order to typecheck paths - which technically isn't
  // necessary.
! class DesugarForLoops
  {
  public:
!   static void go (std::unique_ptr<Expr> &ptr);
  
  private:
+   DesugarForLoops ();
+ 
    struct DesugarCtx
    {
      DesugarCtx (location_t loc) : builder (Builder (loc)), loc (loc) {}
*************** private:
*** 85,94 ****
      Builder builder;
      location_t loc;
  
-     MatchArm make_match_arm (std::unique_ptr<Pattern> &&pattern);
      MatchCase make_break_arm ();
      MatchCase make_continue_arm ();
-     std::unique_ptr<Stmt> statementify (std::unique_ptr<Expr> &&expr);
  
      constexpr static const char *continue_pattern_id = "#val";
      constexpr static const char *next_value_id = "#__next";
--- 83,90 ----
*************** private:
*** 96,105 ****
      constexpr static const char *result_id = "#result";
    };
  
!   std::unique_ptr<Expr> desugar (AST::ForLoopExpr &expr);
!   void maybe_desugar_expr (std::unique_ptr<Expr> &expr);
! 
!   void visit (AST::BlockExpr &) override;
  };
  
  } // namespace AST
--- 92,98 ----
      constexpr static const char *result_id = "#result";
    };
  
!   std::unique_ptr<Expr> desugar (ForLoopExpr &expr);
  };
  
  } // namespace AST
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-desugar-question-mark.cc gcc-16-20250810/gcc/rust/ast/rust-desugar-question-mark.cc
*** gcc-16-20250803/gcc/rust/ast/rust-desugar-question-mark.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-desugar-question-mark.cc	Sun Aug 10 22:32:08 2025
***************
*** 18,24 ****
  
  #include "rust-desugar-question-mark.h"
  #include "rust-ast-builder.h"
- #include "rust-ast-visitor.h"
  
  namespace Rust {
  namespace AST {
--- 18,23 ----
*************** namespace AST {
*** 26,67 ****
  DesugarQuestionMark::DesugarQuestionMark () {}
  
  void
! DesugarQuestionMark::go (AST::Crate &crate)
! {
!   DesugarQuestionMark::visit (crate);
! }
! 
! void
! DesugarQuestionMark::visit (ExprStmt &stmt)
! {
!   if (stmt.get_expr ().get_expr_kind () == Expr::Kind::ErrorPropagation)
!     desugar_and_replace (stmt.get_expr_ptr ());
! 
!   DefaultASTVisitor::visit (stmt);
! }
! 
! void
! DesugarQuestionMark::visit (CallExpr &call)
  {
!   if (call.get_function_expr ().get_expr_kind ()
!       == Expr::Kind::ErrorPropagation)
!     desugar_and_replace (call.get_function_expr_ptr ());
! 
!   for (auto &arg : call.get_params ())
!     if (arg->get_expr_kind () == Expr::Kind::ErrorPropagation)
!       desugar_and_replace (arg);
! 
!   DefaultASTVisitor::visit (call);
! }
  
! void
! DesugarQuestionMark::visit (LetStmt &stmt)
! {
!   if (stmt.has_init_expr ()
!       && stmt.get_init_expr ().get_expr_kind () == Expr::Kind::ErrorPropagation)
!     desugar_and_replace (stmt.get_init_expr_ptr ());
  
!   DefaultASTVisitor::visit (stmt);
  }
  
  MatchArm
--- 25,38 ----
  DesugarQuestionMark::DesugarQuestionMark () {}
  
  void
! DesugarQuestionMark::go (std::unique_ptr<Expr> &ptr)
  {
!   rust_assert (ptr->get_expr_kind () == Expr::Kind::ErrorPropagation);
  
!   auto original = static_cast<ErrorPropagationExpr &> (*ptr);
!   auto desugared = DesugarQuestionMark ().desugar (original);
  
!   ptr = std::move (desugared);
  }
  
  MatchArm
*************** ok_case (Builder &builder)
*** 99,104 ****
--- 70,81 ----
  MatchCase
  err_case (Builder &builder)
  {
+   // TODO: We need to handle the case where there is an enclosing `try {}`
+   // block, as that will create an additional block label that we can break to.
+   // This allows try blocks to use the question mark operator without having the
+   // offending statement early return from the enclosing function
+   // FIXME: How to mark that there is an enclosing block label?
+ 
    auto val = builder.identifier_pattern ("err");
  
    auto patterns = std::vector<std::unique_ptr<Pattern>> ();
*************** DesugarQuestionMark::desugar (ErrorPropa
*** 154,167 ****
  						    expr.get_locus ()));
  }
  
- void
- DesugarQuestionMark::desugar_and_replace (std::unique_ptr<Expr> &ptr)
- {
-   auto original = static_cast<ErrorPropagationExpr &> (*ptr);
-   auto desugared = desugar (original);
- 
-   ptr = std::move (desugared);
- }
- 
  } // namespace AST
  } // namespace Rust
--- 131,135 ----
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-desugar-question-mark.h gcc-16-20250810/gcc/rust/ast/rust-desugar-question-mark.h
*** gcc-16-20250803/gcc/rust/ast/rust-desugar-question-mark.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-desugar-question-mark.h	Sun Aug 10 22:32:08 2025
***************
*** 19,27 ****
  #ifndef RUST_DESUGAR_QUESTION_MARK
  #define RUST_DESUGAR_QUESTION_MARK
  
- #include "rust-ast-visitor.h"
  #include "rust-expr.h"
- #include "rust-stmt.h"
  
  namespace Rust {
  namespace AST {
--- 19,25 ----
*************** namespace AST {
*** 56,76 ****
  //   }
  // }
  // ```
! class DesugarQuestionMark : public DefaultASTVisitor
  {
-   using DefaultASTVisitor::visit;
- 
  public:
!   DesugarQuestionMark ();
!   void go (AST::Crate &);
  
  private:
!   void desugar_and_replace (std::unique_ptr<Expr> &ptr);
!   std::unique_ptr<Expr> desugar (ErrorPropagationExpr &);
  
!   void visit (AST::ExprStmt &) override;
!   void visit (AST::CallExpr &) override;
!   void visit (AST::LetStmt &) override;
  };
  
  } // namespace AST
--- 54,68 ----
  //   }
  // }
  // ```
! class DesugarQuestionMark
  {
  public:
!   static void go (std::unique_ptr<Expr> &ptr);
  
  private:
!   DesugarQuestionMark ();
  
!   std::unique_ptr<Expr> desugar (ErrorPropagationExpr &);
  };
  
  } // namespace AST
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-desugar-try-block.cc gcc-16-20250810/gcc/rust/ast/rust-desugar-try-block.cc
*** gcc-16-20250803/gcc/rust/ast/rust-desugar-try-block.cc	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/rust/ast/rust-desugar-try-block.cc	Sun Aug 10 22:32:08 2025
***************
*** 0 ****
--- 1,62 ----
+ // Copyright (C) 2025 Free Software Foundation, Inc.
+ 
+ // This file is part of GCC.
+ 
+ // GCC is free software; you can redistribute it and/or modify it under
+ // the terms of the GNU General Public License as published by the Free
+ // Software Foundation; either version 3, or (at your option) any later
+ // version.
+ 
+ // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ // WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ // for more details.
+ 
+ // You should have received a copy of the GNU General Public License
+ // along with GCC; see the file COPYING3.  If not see
+ // <http://www.gnu.org/licenses/>.
+ 
+ #include "rust-desugar-try-block.h"
+ #include "rust-ast-builder.h"
+ #include "rust-expr.h"
+ 
+ namespace Rust {
+ namespace AST {
+ 
+ DesugarTryBlock::DesugarTryBlock () {}
+ 
+ void
+ DesugarTryBlock::go (std::unique_ptr<Expr> &ptr)
+ {
+   rust_assert (ptr->get_expr_kind () == Expr::Kind::Try);
+ 
+   auto original = static_cast<TryExpr &> (*ptr);
+   auto desugared = DesugarTryBlock ().desugar (original);
+ 
+   ptr = std::move (desugared);
+ }
+ 
+ std::unique_ptr<Expr>
+ DesugarTryBlock::desugar (TryExpr &expr)
+ {
+   auto builder = Builder (expr.get_locus ());
+   auto &block = expr.get_block_expr ();
+ 
+   if (block.has_statements ())
+     rust_sorry_at (expr.get_locus (),
+ 		   "cannot desugar try-blocks with statements");
+ 
+   auto tail_expr = builder.tuple ();
+ 
+   if (block.has_tail_expr ())
+     tail_expr = block.get_tail_expr ().clone_expr ();
+ 
+   // Wrap in Try::from_ok call
+   auto from_ok = builder.path_in_expression (LangItem::Kind::TRY_FROM_OK);
+   auto call = builder.call (ptrify (from_ok), std::move (tail_expr));
+ 
+   return builder.block (std::move (call));
+ }
+ 
+ } // namespace AST
+ } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-desugar-try-block.h gcc-16-20250810/gcc/rust/ast/rust-desugar-try-block.h
*** gcc-16-20250803/gcc/rust/ast/rust-desugar-try-block.h	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/rust/ast/rust-desugar-try-block.h	Sun Aug 10 22:32:08 2025
***************
*** 0 ****
--- 1,42 ----
+ // Copyright (C) 2025 Free Software Foundation, Inc.
+ 
+ // This file is part of GCC.
+ 
+ // GCC is free software; you can redistribute it and/or modify it under
+ // the terms of the GNU General Public License as published by the Free
+ // Software Foundation; either version 3, or (at your option) any later
+ // version.
+ 
+ // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ // WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ // for more details.
+ 
+ // You should have received a copy of the GNU General Public License
+ // along with GCC; see the file COPYING3.  If not see
+ // <http://www.gnu.org/licenses/>.
+ 
+ #ifndef RUST_DESUGAR_TRY_BLOCK
+ #define RUST_DESUGAR_TRY_BLOCK
+ 
+ #include "rust-expr.h"
+ 
+ namespace Rust {
+ namespace AST {
+ 
+ // FIXME: Add documentation
+ class DesugarTryBlock
+ {
+ public:
+   static void go (std::unique_ptr<Expr> &ptr);
+ 
+ private:
+   DesugarTryBlock ();
+ 
+   std::unique_ptr<Expr> desugar (TryExpr &);
+ };
+ 
+ } // namespace AST
+ } // namespace Rust
+ 
+ #endif // ! RUST_DESUGAR_TRY_BLOCK
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-desugar-while-let.cc gcc-16-20250810/gcc/rust/ast/rust-desugar-while-let.cc
*** gcc-16-20250803/gcc/rust/ast/rust-desugar-while-let.cc	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/rust/ast/rust-desugar-while-let.cc	Sun Aug 10 22:32:08 2025
***************
*** 0 ****
--- 1,104 ----
+ // Copyright (C) 2025 Free Software Foundation, Inc.
+ 
+ // This file is part of GCC.
+ 
+ // GCC is free software; you can redistribute it and/or modify it under
+ // the terms of the GNU General Public License as published by the Free
+ // Software Foundation; either version 3, or (at your option) any later
+ // version.
+ 
+ // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ // WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ // for more details.
+ 
+ // You should have received a copy of the GNU General Public License
+ // along with GCC; see the file COPYING3.  If not see
+ // <http://www.gnu.org/licenses/>.
+ 
+ #include "rust-desugar-while-let.h"
+ #include "rust-ast.h"
+ #include "rust-hir-map.h"
+ #include "rust-path.h"
+ #include "rust-pattern.h"
+ #include "rust-stmt.h"
+ #include "rust-expr.h"
+ #include "rust-ast-builder.h"
+ 
+ namespace Rust {
+ namespace AST {
+ 
+ DesugarWhileLet::DesugarWhileLet () {}
+ 
+ MatchCase
+ DesugarWhileLet::DesugarCtx::make_break_arm ()
+ {
+   auto arm = builder.match_arm (builder.wildcard ());
+ 
+   auto break_expr
+     = std::unique_ptr<Expr> (new BreakExpr (tl::nullopt, nullptr, {}, loc));
+ 
+   return MatchCase (std::move (arm), std::move (break_expr));
+ }
+ 
+ MatchCase
+ DesugarWhileLet::DesugarCtx::make_continue_arm (
+   std::unique_ptr<Pattern> &&pattern, std::unique_ptr<BlockExpr> &&body)
+ {
+   auto arm = builder.match_arm (std::move (pattern));
+ 
+   return MatchCase (std::move (arm), std::move (body));
+ }
+ 
+ std::unique_ptr<Expr>
+ DesugarWhileLet::desugar (WhileLetLoopExpr &expr)
+ {
+   rust_assert (expr.get_patterns ().size () == 1);
+ 
+   auto pattern = expr.get_patterns ()[0]->clone_pattern ();
+   auto body = expr.get_loop_block ().clone_block_expr ();
+   auto scrutinee = expr.get_scrutinee_expr ().clone_expr ();
+ 
+   auto ctx = DesugarCtx (expr.get_locus ());
+ 
+   // _ => break,
+   auto break_arm = ctx.make_break_arm ();
+ 
+   // <pattern> => <body>,
+   auto continue_arm
+     = ctx.make_continue_arm (std::move (pattern), std::move (body));
+ 
+   // match <scrutinee> {
+   //     <continue_arm>
+   //     <break_arm>
+   // }
+   auto match_expr
+     = ctx.builder.match (std::move (scrutinee),
+ 			 {std::move (continue_arm), std::move (break_arm)});
+ 
+   auto loop_stmts = std::vector<std::unique_ptr<Stmt>> ();
+   loop_stmts.emplace_back (ctx.builder.statementify (std::move (match_expr)));
+ 
+   // loop {
+   //     <match_expr>
+   // }
+   return ctx.builder.loop (std::move (loop_stmts));
+ }
+ 
+ void
+ DesugarWhileLet::go (std::unique_ptr<Expr> &ptr)
+ {
+   rust_assert (ptr->get_expr_kind () == Expr::Kind::Loop);
+ 
+   auto &loop = static_cast<BaseLoopExpr &> (*ptr);
+ 
+   rust_assert (loop.get_loop_kind () == BaseLoopExpr::Kind::WhileLet);
+ 
+   auto &while_let = static_cast<WhileLetLoopExpr &> (loop);
+   auto desugared = DesugarWhileLet ().desugar (while_let);
+ 
+   ptr = std::move (desugared);
+ }
+ 
+ } // namespace AST
+ } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-desugar-while-let.h gcc-16-20250810/gcc/rust/ast/rust-desugar-while-let.h
*** gcc-16-20250803/gcc/rust/ast/rust-desugar-while-let.h	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/rust/ast/rust-desugar-while-let.h	Sun Aug 10 22:32:08 2025
***************
*** 0 ****
--- 1,71 ----
+ // Copyright (C) 2025 Free Software Foundation, Inc.
+ 
+ // This file is part of GCC.
+ 
+ // GCC is free software; you can redistribute it and/or modify it under
+ // the terms of the GNU General Public License as published by the Free
+ // Software Foundation; either version 3, or (at your option) any later
+ // version.
+ 
+ // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ // WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ // for more details.
+ 
+ // You should have received a copy of the GNU General Public License
+ // along with GCC; see the file COPYING3.  If not see
+ // <http://www.gnu.org/licenses/>.
+ 
+ #ifndef RUST_DESUGAR_WHILE_LET_H
+ #define RUST_DESUGAR_WHILE_LET_H
+ 
+ #include "rust-ast-builder.h"
+ #include "rust-expr.h"
+ 
+ namespace Rust {
+ namespace AST {
+ 
+ // Desugar while-let into a set of other AST nodes. The desugar is of the
+ // following form:
+ //
+ // ```
+ // whilet let <pat> = <expr> <body>
+ // ```
+ //
+ // becomes:
+ //
+ // ```
+ // loop {
+ //     match <expr> {
+ //         <pat> => <body>,
+ //         _ => break
+ //     }
+ // }
+ // ```
+ class DesugarWhileLet
+ {
+ public:
+   static void go (std::unique_ptr<Expr> &ptr);
+ 
+ private:
+   DesugarWhileLet ();
+ 
+   struct DesugarCtx
+   {
+     DesugarCtx (location_t loc) : builder (Builder (loc)), loc (loc) {}
+ 
+     Builder builder;
+     location_t loc;
+ 
+     MatchCase make_break_arm ();
+     MatchCase make_continue_arm (std::unique_ptr<Pattern> &&pattern,
+ 				 std::unique_ptr<BlockExpr> &&body);
+   };
+ 
+   std::unique_ptr<Expr> desugar (WhileLetLoopExpr &expr);
+ };
+ 
+ } // namespace AST
+ } // namespace Rust
+ 
+ #endif // ! RUST_DESUGAR_WHILE_LET_H
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-expr.h gcc-16-20250810/gcc/rust/ast/rust-expr.h
*** gcc-16-20250803/gcc/rust/ast/rust-expr.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-expr.h	Sun Aug 10 22:32:08 2025
***************
*** 1,6 ****
--- 1,7 ----
  #ifndef RUST_AST_EXPR_H
  #define RUST_AST_EXPR_H
  
+ #include "optional.h"
  #include "rust-ast.h"
  #include "rust-common.h"
  #include "rust-path.h"
*************** public:
*** 182,190 ****
  
    AttrInputMacro (AttrInputMacro &&oth) : macro (std::move (oth.macro)) {}
  
!   void operator= (const AttrInputMacro &oth);
  
!   void operator= (AttrInputMacro &&oth) { macro = std::move (oth.macro); }
  
    std::string as_string () const override;
  
--- 183,195 ----
  
    AttrInputMacro (AttrInputMacro &&oth) : macro (std::move (oth.macro)) {}
  
!   AttrInputMacro &operator= (const AttrInputMacro &oth);
  
!   AttrInputMacro &operator= (AttrInputMacro &&oth)
!   {
!     macro = std::move (oth.macro);
!     return *this;
!   }
  
    std::string as_string () const override;
  
*************** protected:
*** 244,279 ****
    }
  };
  
! // more generic meta item "path = lit" form
! class MetaItemPathLit : public MetaItem
  {
    SimplePath path;
!   LiteralExpr lit;
  
  public:
!   MetaItemPathLit (SimplePath path, LiteralExpr lit_expr)
!     : path (std::move (path)), lit (std::move (lit_expr))
    {}
  
    SimplePath get_path () const { return path; }
  
    SimplePath &get_path () { return path; }
  
!   LiteralExpr get_literal () const { return lit; }
! 
!   LiteralExpr &get_literal () { return lit; }
  
    std::string as_string () const override
    {
!     return path.as_string () + " = " + lit.as_string ();
    }
  
    MetaItem::ItemKind get_item_kind () const override
    {
!     return MetaItem::ItemKind::PathLit;
    }
  
!   // There are two Locations in MetaItemPathLit (path and lit_expr),
    //  we have no idea use which of them, just simply return UNKNOWN_LOCATION
    //  now.
    // Maybe we will figure out when we really need the location in the future.
--- 249,298 ----
    }
  };
  
! // more generic meta item "path = expr" form
! class MetaItemPathExpr : public MetaItem
  {
    SimplePath path;
!   std::unique_ptr<Expr> expr;
  
  public:
!   MetaItemPathExpr (SimplePath path, std::unique_ptr<Expr> expr)
!     : path (std::move (path)), expr (std::move (expr))
!   {}
! 
!   MetaItemPathExpr (const MetaItemPathExpr &other)
!     : MetaItem (other), path (other.path), expr (other.expr->clone_expr ())
    {}
  
+   MetaItemPathExpr (MetaItemPathExpr &&) = default;
+ 
+   MetaItemPathExpr &operator= (MetaItemPathExpr &&) = default;
+ 
+   MetaItemPathExpr operator= (const MetaItemPathExpr &other)
+   {
+     MetaItem::operator= (other);
+     path = other.path;
+     expr = other.expr->clone_expr ();
+     return *this;
+   }
+ 
    SimplePath get_path () const { return path; }
  
    SimplePath &get_path () { return path; }
  
!   Expr &get_expr () { return *expr; }
  
    std::string as_string () const override
    {
!     return path.as_string () + " = " + expr->as_string ();
    }
  
    MetaItem::ItemKind get_item_kind () const override
    {
!     return MetaItem::ItemKind::PathExpr;
    }
  
!   // There are two Locations in MetaItemPathExpr (path and expr),
    //  we have no idea use which of them, just simply return UNKNOWN_LOCATION
    //  now.
    // Maybe we will figure out when we really need the location in the future.
*************** public:
*** 289,297 ****
  
  protected:
    // Use covariance to implement clone function as returning this type
!   MetaItemPathLit *clone_meta_item_inner_impl () const override
    {
!     return new MetaItemPathLit (*this);
    }
  };
  
--- 308,316 ----
  
  protected:
    // Use covariance to implement clone function as returning this type
!   MetaItemPathExpr *clone_meta_item_inner_impl () const override
    {
!     return new MetaItemPathExpr (*this);
    }
  };
  
*************** public:
*** 395,400 ****
--- 414,421 ----
      return *main_or_left_expr;
    }
  
+   bool has_borrow_expr () const { return main_or_left_expr != nullptr; }
+ 
    bool get_is_mut () const { return mutability == Mutability::Mut; }
  
    Mutability get_mutability () const { return mutability; }
*************** protected:
*** 1160,1170 ****
  // Value array elements
  class ArrayElemsValues : public ArrayElems
  {
!   std::vector<std::unique_ptr<Expr> > values;
    location_t locus;
  
  public:
!   ArrayElemsValues (std::vector<std::unique_ptr<Expr> > elems, location_t locus)
      : ArrayElems (), values (std::move (elems)), locus (locus)
    {}
  
--- 1181,1191 ----
  // Value array elements
  class ArrayElemsValues : public ArrayElems
  {
!   std::vector<std::unique_ptr<Expr>> values;
    location_t locus;
  
  public:
!   ArrayElemsValues (std::vector<std::unique_ptr<Expr>> elems, location_t locus)
      : ArrayElems (), values (std::move (elems)), locus (locus)
    {}
  
*************** public:
*** 1192,1205 ****
  
    std::string as_string () const override;
  
    void accept_vis (ASTVisitor &vis) override;
  
    // TODO: this mutable getter seems really dodgy. Think up better way.
!   const std::vector<std::unique_ptr<Expr> > &get_values () const
    {
      return values;
    }
!   std::vector<std::unique_ptr<Expr> > &get_values () { return values; }
  
    size_t get_num_values () const { return values.size (); }
  
--- 1213,1228 ----
  
    std::string as_string () const override;
  
+   location_t get_locus () const { return locus; }
+ 
    void accept_vis (ASTVisitor &vis) override;
  
    // TODO: this mutable getter seems really dodgy. Think up better way.
!   const std::vector<std::unique_ptr<Expr>> &get_values () const
    {
      return values;
    }
!   std::vector<std::unique_ptr<Expr>> &get_values () { return values; }
  
    size_t get_num_values () const { return values.size (); }
  
*************** protected:
*** 1214,1219 ****
--- 1237,1244 ----
  class ArrayElemsCopied : public ArrayElems
  {
    std::unique_ptr<Expr> elem_to_copy;
+ 
+   // TODO: This should be replaced by a ConstExpr
    std::unique_ptr<Expr> num_copies;
    location_t locus;
  
*************** public:
*** 1246,1251 ****
--- 1271,1278 ----
  
    std::string as_string () const override;
  
+   location_t get_locus () const { return locus; }
+ 
    void accept_vis (ASTVisitor &vis) override;
  
    // TODO: is this better? Or is a "vis_block" better?
*************** class TupleExpr : public ExprWithoutBloc
*** 1472,1478 ****
  {
    std::vector<Attribute> outer_attrs;
    std::vector<Attribute> inner_attrs;
!   std::vector<std::unique_ptr<Expr> > tuple_elems;
    location_t locus;
  
    // TODO: find another way to store this to save memory?
--- 1499,1505 ----
  {
    std::vector<Attribute> outer_attrs;
    std::vector<Attribute> inner_attrs;
!   std::vector<std::unique_ptr<Expr>> tuple_elems;
    location_t locus;
  
    // TODO: find another way to store this to save memory?
*************** public:
*** 1492,1498 ****
      outer_attrs = std::move (new_attrs);
    }
  
!   TupleExpr (std::vector<std::unique_ptr<Expr> > tuple_elements,
  	     std::vector<Attribute> inner_attribs,
  	     std::vector<Attribute> outer_attribs, location_t locus)
      : outer_attrs (std::move (outer_attribs)),
--- 1519,1525 ----
      outer_attrs = std::move (new_attrs);
    }
  
!   TupleExpr (std::vector<std::unique_ptr<Expr>> tuple_elements,
  	     std::vector<Attribute> inner_attribs,
  	     std::vector<Attribute> outer_attribs, location_t locus)
      : outer_attrs (std::move (outer_attribs)),
*************** public:
*** 1543,1556 ****
    bool is_marked_for_strip () const override { return marked_for_strip; }
  
    // TODO: this mutable getter seems really dodgy. Think up better way.
!   const std::vector<std::unique_ptr<Expr> > &get_tuple_elems () const
!   {
!     return tuple_elems;
!   }
!   std::vector<std::unique_ptr<Expr> > &get_tuple_elems ()
    {
      return tuple_elems;
    }
  
    bool is_unit () const { return tuple_elems.size () == 0; }
  
--- 1570,1580 ----
    bool is_marked_for_strip () const override { return marked_for_strip; }
  
    // TODO: this mutable getter seems really dodgy. Think up better way.
!   const std::vector<std::unique_ptr<Expr>> &get_tuple_elems () const
    {
      return tuple_elems;
    }
+   std::vector<std::unique_ptr<Expr>> &get_tuple_elems () { return tuple_elems; }
  
    bool is_unit () const { return tuple_elems.size () == 0; }
  
*************** public:
*** 1775,1780 ****
--- 1799,1806 ----
  
    std::string as_string () const;
  
+   location_t get_locus () const { return locus; }
+ 
    // TODO: is this better? Or is a "vis_block" better?
    Expr &get_base_struct ()
    {
*************** protected:
*** 1972,1978 ****
  class StructExprStructFields : public StructExprStruct
  {
    // std::vector<StructExprField> fields;
!   std::vector<std::unique_ptr<StructExprField> > fields;
  
    // bool has_struct_base;
    StructBase struct_base;
--- 1998,2004 ----
  class StructExprStructFields : public StructExprStruct
  {
    // std::vector<StructExprField> fields;
!   std::vector<std::unique_ptr<StructExprField>> fields;
  
    // bool has_struct_base;
    StructBase struct_base;
*************** public:
*** 1985,1992 ****
    // Constructor for StructExprStructFields when no struct base is used
    StructExprStructFields (
      PathInExpression struct_path,
!     std::vector<std::unique_ptr<StructExprField> > expr_fields,
!     location_t locus, StructBase base_struct = StructBase::error (),
      std::vector<Attribute> inner_attribs = std::vector<Attribute> (),
      std::vector<Attribute> outer_attribs = std::vector<Attribute> ())
      : StructExprStruct (std::move (struct_path), std::move (inner_attribs),
--- 2011,2018 ----
    // Constructor for StructExprStructFields when no struct base is used
    StructExprStructFields (
      PathInExpression struct_path,
!     std::vector<std::unique_ptr<StructExprField>> expr_fields, location_t locus,
!     StructBase base_struct = StructBase::error (),
      std::vector<Attribute> inner_attribs = std::vector<Attribute> (),
      std::vector<Attribute> outer_attribs = std::vector<Attribute> ())
      : StructExprStruct (std::move (struct_path), std::move (inner_attribs),
*************** public:
*** 2023,2033 ****
    void accept_vis (ASTVisitor &vis) override;
  
    // TODO: this mutable getter seems really dodgy. Think up better way.
!   std::vector<std::unique_ptr<StructExprField> > &get_fields ()
    {
      return fields;
    }
!   const std::vector<std::unique_ptr<StructExprField> > &get_fields () const
    {
      return fields;
    }
--- 2049,2059 ----
    void accept_vis (ASTVisitor &vis) override;
  
    // TODO: this mutable getter seems really dodgy. Think up better way.
!   std::vector<std::unique_ptr<StructExprField>> &get_fields ()
    {
      return fields;
    }
!   const std::vector<std::unique_ptr<StructExprField>> &get_fields () const
    {
      return fields;
    }
*************** class CallExpr : public ExprWithoutBlock
*** 2084,2090 ****
  {
    std::vector<Attribute> outer_attrs;
    std::unique_ptr<Expr> function;
!   std::vector<std::unique_ptr<Expr> > params;
    location_t locus;
  
  public:
--- 2110,2116 ----
  {
    std::vector<Attribute> outer_attrs;
    std::unique_ptr<Expr> function;
!   std::vector<std::unique_ptr<Expr>> params;
    location_t locus;
  
  public:
*************** public:
*** 2093,2099 ****
    std::string as_string () const override;
  
    CallExpr (std::unique_ptr<Expr> function_expr,
! 	    std::vector<std::unique_ptr<Expr> > function_params,
  	    std::vector<Attribute> outer_attribs, location_t locus)
      : outer_attrs (std::move (outer_attribs)),
        function (std::move (function_expr)),
--- 2119,2125 ----
    std::string as_string () const override;
  
    CallExpr (std::unique_ptr<Expr> function_expr,
! 	    std::vector<std::unique_ptr<Expr>> function_params,
  	    std::vector<Attribute> outer_attribs, location_t locus)
      : outer_attrs (std::move (outer_attribs)),
        function (std::move (function_expr)),
*************** public:
*** 2150,2160 ****
    bool is_marked_for_strip () const override { return function == nullptr; }
  
    // TODO: this mutable getter seems really dodgy. Think up better way.
!   const std::vector<std::unique_ptr<Expr> > &get_params () const
    {
      return params;
    }
!   std::vector<std::unique_ptr<Expr> > &get_params () { return params; }
  
    // TODO: is this better? Or is a "vis_block" better?
    Expr &get_function_expr ()
--- 2176,2186 ----
    bool is_marked_for_strip () const override { return function == nullptr; }
  
    // TODO: this mutable getter seems really dodgy. Think up better way.
!   const std::vector<std::unique_ptr<Expr>> &get_params () const
    {
      return params;
    }
!   std::vector<std::unique_ptr<Expr>> &get_params () { return params; }
  
    // TODO: is this better? Or is a "vis_block" better?
    Expr &get_function_expr ()
*************** class MethodCallExpr : public ExprWithou
*** 2190,2196 ****
    std::vector<Attribute> outer_attrs;
    std::unique_ptr<Expr> receiver;
    PathExprSegment method_name;
!   std::vector<std::unique_ptr<Expr> > params;
    location_t locus;
  
  public:
--- 2216,2222 ----
    std::vector<Attribute> outer_attrs;
    std::unique_ptr<Expr> receiver;
    PathExprSegment method_name;
!   std::vector<std::unique_ptr<Expr>> params;
    location_t locus;
  
  public:
*************** public:
*** 2198,2204 ****
  
    MethodCallExpr (std::unique_ptr<Expr> call_receiver,
  		  PathExprSegment method_path,
! 		  std::vector<std::unique_ptr<Expr> > method_params,
  		  std::vector<Attribute> outer_attribs, location_t locus)
      : outer_attrs (std::move (outer_attribs)),
        receiver (std::move (call_receiver)),
--- 2224,2230 ----
  
    MethodCallExpr (std::unique_ptr<Expr> call_receiver,
  		  PathExprSegment method_path,
! 		  std::vector<std::unique_ptr<Expr>> method_params,
  		  std::vector<Attribute> outer_attribs, location_t locus)
      : outer_attrs (std::move (outer_attribs)),
        receiver (std::move (call_receiver)),
*************** public:
*** 2254,2264 ****
    bool is_marked_for_strip () const override { return receiver == nullptr; }
  
    // TODO: this mutable getter seems really dodgy. Think up better way.
!   const std::vector<std::unique_ptr<Expr> > &get_params () const
    {
      return params;
    }
!   std::vector<std::unique_ptr<Expr> > &get_params () { return params; }
  
    // TODO: is this better? Or is a "vis_block" better?
    Expr &get_receiver_expr ()
--- 2280,2290 ----
    bool is_marked_for_strip () const override { return receiver == nullptr; }
  
    // TODO: this mutable getter seems really dodgy. Think up better way.
!   const std::vector<std::unique_ptr<Expr>> &get_params () const
    {
      return params;
    }
!   std::vector<std::unique_ptr<Expr>> &get_params () { return params; }
  
    // TODO: is this better? Or is a "vis_block" better?
    Expr &get_receiver_expr ()
*************** public:
*** 2504,2509 ****
--- 2530,2537 ----
    bool get_has_move () const { return has_move; }
  
    Expr::Kind get_expr_kind () const override { return Expr::Kind::Closure; }
+ 
+   virtual Expr &get_definition_expr () = 0;
  };
  
  // Represents a non-type-specified closure expression AST node
*************** public:
*** 2563,2569 ****
      return closure_inner == nullptr;
    }
  
!   Expr &get_definition_expr ()
    {
      rust_assert (closure_inner != nullptr);
      return *closure_inner;
--- 2591,2597 ----
      return closure_inner == nullptr;
    }
  
!   Expr &get_definition_expr () override
    {
      rust_assert (closure_inner != nullptr);
      return *closure_inner;
*************** class BlockExpr : public ExprWithBlock
*** 2583,2589 ****
  {
    std::vector<Attribute> outer_attrs;
    std::vector<Attribute> inner_attrs;
!   std::vector<std::unique_ptr<Stmt> > statements;
    std::unique_ptr<Expr> expr;
    tl::optional<LoopLabel> label;
    location_t start_locus;
--- 2611,2617 ----
  {
    std::vector<Attribute> outer_attrs;
    std::vector<Attribute> inner_attrs;
!   std::vector<std::unique_ptr<Stmt>> statements;
    std::unique_ptr<Expr> expr;
    tl::optional<LoopLabel> label;
    location_t start_locus;
*************** public:
*** 2599,2605 ****
    // Returns whether the block contains a final expression.
    bool has_tail_expr () const { return expr != nullptr; }
  
!   BlockExpr (std::vector<std::unique_ptr<Stmt> > block_statements,
  	     std::unique_ptr<Expr> block_expr,
  	     std::vector<Attribute> inner_attribs,
  	     std::vector<Attribute> outer_attribs,
--- 2627,2633 ----
    // Returns whether the block contains a final expression.
    bool has_tail_expr () const { return expr != nullptr; }
  
!   BlockExpr (std::vector<std::unique_ptr<Stmt>> block_statements,
  	     std::unique_ptr<Expr> block_expr,
  	     std::vector<Attribute> inner_attribs,
  	     std::vector<Attribute> outer_attribs,
*************** public:
*** 2678,2688 ****
    const std::vector<Attribute> &get_inner_attrs () const { return inner_attrs; }
    std::vector<Attribute> &get_inner_attrs () { return inner_attrs; }
  
!   const std::vector<std::unique_ptr<Stmt> > &get_statements () const
    {
      return statements;
    }
!   std::vector<std::unique_ptr<Stmt> > &get_statements () { return statements; }
  
    // TODO: is this better? Or is a "vis_block" better?
    Expr &get_tail_expr ()
--- 2706,2716 ----
    const std::vector<Attribute> &get_inner_attrs () const { return inner_attrs; }
    std::vector<Attribute> &get_inner_attrs () { return inner_attrs; }
  
!   const std::vector<std::unique_ptr<Stmt>> &get_statements () const
    {
      return statements;
    }
!   std::vector<std::unique_ptr<Stmt>> &get_statements () { return statements; }
  
    // TODO: is this better? Or is a "vis_block" better?
    Expr &get_tail_expr ()
*************** protected:
*** 2744,2749 ****
--- 2772,2922 ----
    }
  };
  
+ class AnonConst : public ExprWithBlock
+ {
+ public:
+   enum class Kind
+   {
+     Explicit,
+     DeferredInference,
+   };
+ 
+   AnonConst (std::unique_ptr<Expr> &&expr, location_t locus = UNKNOWN_LOCATION)
+     : ExprWithBlock (), locus (locus), kind (Kind::Explicit),
+       expr (std::move (expr))
+   {
+     rust_assert (this->expr.value ());
+   }
+ 
+   AnonConst (location_t locus = UNKNOWN_LOCATION)
+     : ExprWithBlock (), locus (locus), kind (Kind::DeferredInference),
+       expr (tl::nullopt)
+   {}
+ 
+   AnonConst (const AnonConst &other)
+   {
+     node_id = other.node_id;
+     locus = other.locus;
+     kind = other.kind;
+ 
+     if (other.expr)
+       expr = other.expr.value ()->clone_expr ();
+   }
+ 
+   AnonConst operator= (const AnonConst &other)
+   {
+     node_id = other.node_id;
+     locus = other.locus;
+     kind = other.kind;
+ 
+     if (other.expr)
+       expr = other.expr.value ()->clone_expr ();
+ 
+     return *this;
+   }
+ 
+   std::string as_string () const override;
+ 
+   Expr::Kind get_expr_kind () const override { return Expr::Kind::ConstExpr; }
+ 
+   location_t get_locus () const override { return locus; }
+ 
+   Expr &get_inner_expr ()
+   {
+     rust_assert (expr.has_value ());
+     return *expr.value ();
+   }
+ 
+   NodeId get_node_id () const override { return node_id; }
+ 
+   /* FIXME: AnonConst are always "internal" and should not have outer attributes
+    * - is that true? Or should we instead call
+    * expr->get_outer_attrs()/expr->set_outer_attrs() */
+ 
+   std::vector<Attribute> &get_outer_attrs () override
+   {
+     static auto attrs = std::vector<Attribute> ();
+     return attrs;
+   }
+ 
+   void set_outer_attrs (std::vector<Attribute>) override {}
+ 
+   /* FIXME: Likewise for mark_for_strip() ? */
+   void mark_for_strip () override {}
+   bool is_marked_for_strip () const override { return false; }
+ 
+   void accept_vis (ASTVisitor &vis) override;
+ 
+   bool is_deferred () const { return kind == Kind::DeferredInference; }
+ 
+ private:
+   location_t locus;
+   Kind kind;
+   tl::optional<std::unique_ptr<Expr>> expr;
+ 
+   AnonConst *clone_expr_with_block_impl () const override
+   {
+     return new AnonConst (*this);
+   }
+ };
+ 
+ class ConstBlock : public ExprWithBlock
+ {
+ public:
+   ConstBlock (AnonConst &&expr, location_t locus = UNKNOWN_LOCATION,
+ 	      std::vector<Attribute> &&outer_attrs = {})
+     : ExprWithBlock (), expr (std::move (expr)),
+       outer_attrs (std::move (outer_attrs)), locus (locus)
+   {}
+ 
+   ConstBlock (const ConstBlock &other)
+     : ExprWithBlock (other), expr (other.expr), outer_attrs (other.outer_attrs),
+       locus (other.locus)
+   {}
+ 
+   ConstBlock operator= (const ConstBlock &other)
+   {
+     expr = other.expr;
+     node_id = other.node_id;
+     outer_attrs = other.outer_attrs;
+     locus = other.locus;
+ 
+     return *this;
+   }
+ 
+   std::string as_string () const override;
+ 
+   Expr::Kind get_expr_kind () const override { return Expr::Kind::ConstBlock; }
+ 
+   AnonConst &get_const_expr () { return expr; }
+ 
+   void accept_vis (ASTVisitor &vis) override;
+ 
+   std::vector<Attribute> &get_outer_attrs () override { return outer_attrs; }
+ 
+   void set_outer_attrs (std::vector<Attribute> new_attrs) override
+   {
+     outer_attrs = std::move (new_attrs);
+   }
+ 
+   location_t get_locus () const override { return locus; }
+ 
+   bool is_marked_for_strip () const override { return marked_for_strip; }
+   void mark_for_strip () override { marked_for_strip = true; }
+ 
+ private:
+   AnonConst expr;
+ 
+   std::vector<Attribute> outer_attrs;
+   location_t locus;
+   bool marked_for_strip = false;
+ 
+   ConstBlock *clone_expr_with_block_impl () const override
+   {
+     return new ConstBlock (*this);
+   }
+ };
+ 
  // Represents a type-specified closure expression AST node
  class ClosureExprInnerTyped : public ClosureExpr
  {
*************** public:
*** 2812,2818 ****
    bool is_marked_for_strip () const override { return expr == nullptr; }
  
    // TODO: is this better? Or is a "vis_block" better?
!   BlockExpr &get_definition_block ()
    {
      rust_assert (expr != nullptr);
      return *expr;
--- 2985,2991 ----
    bool is_marked_for_strip () const override { return expr == nullptr; }
  
    // TODO: is this better? Or is a "vis_block" better?
!   BlockExpr &get_definition_expr () override
    {
      rust_assert (expr != nullptr);
      return *expr;
*************** protected:
*** 3572,3577 ****
--- 3745,3826 ----
    }
  };
  
+ // Try expression AST node representation
+ class TryExpr : public ExprWithBlock
+ {
+   std::vector<Attribute> outer_attrs;
+   std::unique_ptr<BlockExpr> block_expr;
+   location_t locus;
+ 
+   // TODO: find another way to store this to save memory?
+   bool marked_for_strip = false;
+ 
+ public:
+   std::string as_string () const override;
+ 
+   // Constructor for ReturnExpr.
+   TryExpr (std::unique_ptr<BlockExpr> block_expr,
+ 	   std::vector<Attribute> outer_attribs, location_t locus)
+     : outer_attrs (std::move (outer_attribs)),
+       block_expr (std::move (block_expr)), locus (locus)
+   {
+     rust_assert (this->block_expr);
+   }
+ 
+   // Copy constructor with clone
+   TryExpr (TryExpr const &other)
+     : ExprWithBlock (other), outer_attrs (other.outer_attrs),
+       block_expr (other.block_expr->clone_block_expr ()), locus (other.locus),
+       marked_for_strip (other.marked_for_strip)
+   {}
+ 
+   // Overloaded assignment operator to clone return_expr pointer
+   TryExpr &operator= (TryExpr const &other)
+   {
+     ExprWithBlock::operator= (other);
+     locus = other.locus;
+     marked_for_strip = other.marked_for_strip;
+     outer_attrs = other.outer_attrs;
+ 
+     block_expr = other.block_expr->clone_block_expr ();
+ 
+     return *this;
+   }
+ 
+   // move constructors
+   TryExpr (TryExpr &&other) = default;
+   TryExpr &operator= (TryExpr &&other) = default;
+ 
+   location_t get_locus () const override final { return locus; }
+ 
+   void accept_vis (ASTVisitor &vis) override;
+ 
+   // Can't think of any invalid invariants, so store boolean.
+   void mark_for_strip () override { marked_for_strip = true; }
+   bool is_marked_for_strip () const override { return marked_for_strip; }
+ 
+   // TODO: is this better? Or is a "vis_block" better?
+   BlockExpr &get_block_expr () { return *block_expr; }
+ 
+   const std::vector<Attribute> &get_outer_attrs () const { return outer_attrs; }
+   std::vector<Attribute> &get_outer_attrs () override { return outer_attrs; }
+ 
+   void set_outer_attrs (std::vector<Attribute> new_attrs) override
+   {
+     outer_attrs = std::move (new_attrs);
+   }
+ 
+   Expr::Kind get_expr_kind () const override { return Expr::Kind::Try; }
+ 
+ protected:
+   /* Use covariance to implement clone function as returning this object rather
+    * than base */
+   TryExpr *clone_expr_with_block_impl () const override
+   {
+     return new TryExpr (*this);
+   }
+ };
+ 
  // Forward decl - defined in rust-macro.h
  class MacroInvocation;
  
*************** protected:
*** 3847,3860 ****
  class WhileLetLoopExpr : public BaseLoopExpr
  {
    // MatchArmPatterns patterns;
!   std::vector<std::unique_ptr<Pattern> > match_arm_patterns; // inlined
    std::unique_ptr<Expr> scrutinee;
  
  public:
    std::string as_string () const override;
  
    // Constructor with a loop label
!   WhileLetLoopExpr (std::vector<std::unique_ptr<Pattern> > match_arm_patterns,
  		    std::unique_ptr<Expr> scrutinee,
  		    std::unique_ptr<BlockExpr> loop_block, location_t locus,
  		    tl::optional<LoopLabel> loop_label = tl::nullopt,
--- 4096,4109 ----
  class WhileLetLoopExpr : public BaseLoopExpr
  {
    // MatchArmPatterns patterns;
!   std::vector<std::unique_ptr<Pattern>> match_arm_patterns; // inlined
    std::unique_ptr<Expr> scrutinee;
  
  public:
    std::string as_string () const override;
  
    // Constructor with a loop label
!   WhileLetLoopExpr (std::vector<std::unique_ptr<Pattern>> match_arm_patterns,
  		    std::unique_ptr<Expr> scrutinee,
  		    std::unique_ptr<BlockExpr> loop_block, location_t locus,
  		    tl::optional<LoopLabel> loop_label = tl::nullopt,
*************** public:
*** 3908,3918 ****
    }
  
    // TODO: this mutable getter seems really dodgy. Think up better way.
!   const std::vector<std::unique_ptr<Pattern> > &get_patterns () const
    {
      return match_arm_patterns;
    }
!   std::vector<std::unique_ptr<Pattern> > &get_patterns ()
    {
      return match_arm_patterns;
    }
--- 4157,4167 ----
    }
  
    // TODO: this mutable getter seems really dodgy. Think up better way.
!   const std::vector<std::unique_ptr<Pattern>> &get_patterns () const
    {
      return match_arm_patterns;
    }
!   std::vector<std::unique_ptr<Pattern>> &get_patterns ()
    {
      return match_arm_patterns;
    }
*************** protected:
*** 4195,4201 ****
  class IfLetExpr : public ExprWithBlock
  {
    std::vector<Attribute> outer_attrs;
!   std::vector<std::unique_ptr<Pattern> > match_arm_patterns; // inlined
    std::unique_ptr<Expr> value;
    std::unique_ptr<BlockExpr> if_block;
    location_t locus;
--- 4444,4450 ----
  class IfLetExpr : public ExprWithBlock
  {
    std::vector<Attribute> outer_attrs;
!   std::vector<std::unique_ptr<Pattern>> match_arm_patterns; // inlined
    std::unique_ptr<Expr> value;
    std::unique_ptr<BlockExpr> if_block;
    location_t locus;
*************** class IfLetExpr : public ExprWithBlock
*** 4203,4209 ****
  public:
    std::string as_string () const override;
  
!   IfLetExpr (std::vector<std::unique_ptr<Pattern> > match_arm_patterns,
  	     std::unique_ptr<Expr> value, std::unique_ptr<BlockExpr> if_block,
  	     std::vector<Attribute> outer_attrs, location_t locus)
      : outer_attrs (std::move (outer_attrs)),
--- 4452,4458 ----
  public:
    std::string as_string () const override;
  
!   IfLetExpr (std::vector<std::unique_ptr<Pattern>> match_arm_patterns,
  	     std::unique_ptr<Expr> value, std::unique_ptr<BlockExpr> if_block,
  	     std::vector<Attribute> outer_attrs, location_t locus)
      : outer_attrs (std::move (outer_attrs)),
*************** public:
*** 4297,4307 ****
    }
  
    // TODO: this mutable getter seems really dodgy. Think up better way.
!   const std::vector<std::unique_ptr<Pattern> > &get_patterns () const
    {
      return match_arm_patterns;
    }
!   std::vector<std::unique_ptr<Pattern> > &get_patterns ()
    {
      return match_arm_patterns;
    }
--- 4546,4556 ----
    }
  
    // TODO: this mutable getter seems really dodgy. Think up better way.
!   const std::vector<std::unique_ptr<Pattern>> &get_patterns () const
    {
      return match_arm_patterns;
    }
!   std::vector<std::unique_ptr<Pattern>> &get_patterns ()
    {
      return match_arm_patterns;
    }
*************** class IfLetExprConseqElse : public IfLet
*** 4341,4351 ****
  public:
    std::string as_string () const override;
  
!   IfLetExprConseqElse (
!     std::vector<std::unique_ptr<Pattern> > match_arm_patterns,
!     std::unique_ptr<Expr> value, std::unique_ptr<BlockExpr> if_block,
!     std::unique_ptr<ExprWithBlock> else_block,
!     std::vector<Attribute> outer_attrs, location_t locus)
      : IfLetExpr (std::move (match_arm_patterns), std::move (value),
  		 std::move (if_block), std::move (outer_attrs), locus),
        else_block (std::move (else_block))
--- 4590,4600 ----
  public:
    std::string as_string () const override;
  
!   IfLetExprConseqElse (std::vector<std::unique_ptr<Pattern>> match_arm_patterns,
! 		       std::unique_ptr<Expr> value,
! 		       std::unique_ptr<BlockExpr> if_block,
! 		       std::unique_ptr<ExprWithBlock> else_block,
! 		       std::vector<Attribute> outer_attrs, location_t locus)
      : IfLetExpr (std::move (match_arm_patterns), std::move (value),
  		 std::move (if_block), std::move (outer_attrs), locus),
        else_block (std::move (else_block))
*************** struct MatchArm
*** 4398,4404 ****
  private:
    std::vector<Attribute> outer_attrs;
    // MatchArmPatterns patterns;
!   std::vector<std::unique_ptr<Pattern> > match_arm_patterns; // inlined
  
    // bool has_match_arm_guard;
    // inlined from MatchArmGuard
--- 4647,4653 ----
  private:
    std::vector<Attribute> outer_attrs;
    // MatchArmPatterns patterns;
!   std::vector<std::unique_ptr<Pattern>> match_arm_patterns; // inlined
  
    // bool has_match_arm_guard;
    // inlined from MatchArmGuard
*************** public:
*** 4411,4417 ****
    bool has_match_arm_guard () const { return guard_expr != nullptr; }
  
    // Constructor for match arm with a guard expression
!   MatchArm (std::vector<std::unique_ptr<Pattern> > match_arm_patterns,
  	    location_t locus, std::unique_ptr<Expr> guard_expr = nullptr,
  	    std::vector<Attribute> outer_attrs = std::vector<Attribute> ())
      : outer_attrs (std::move (outer_attrs)),
--- 4660,4666 ----
    bool has_match_arm_guard () const { return guard_expr != nullptr; }
  
    // Constructor for match arm with a guard expression
!   MatchArm (std::vector<std::unique_ptr<Pattern>> match_arm_patterns,
  	    location_t locus, std::unique_ptr<Expr> guard_expr = nullptr,
  	    std::vector<Attribute> outer_attrs = std::vector<Attribute> ())
      : outer_attrs (std::move (outer_attrs)),
*************** public:
*** 4463,4469 ****
    static MatchArm create_error ()
    {
      location_t locus = UNDEF_LOCATION;
!     return MatchArm (std::vector<std::unique_ptr<Pattern> > (), locus);
    }
  
    std::string as_string () const;
--- 4712,4718 ----
    static MatchArm create_error ()
    {
      location_t locus = UNDEF_LOCATION;
!     return MatchArm (std::vector<std::unique_ptr<Pattern>> (), locus);
    }
  
    std::string as_string () const;
*************** public:
*** 4485,4495 ****
    const std::vector<Attribute> &get_outer_attrs () const { return outer_attrs; }
    std::vector<Attribute> &get_outer_attrs () { return outer_attrs; }
  
!   const std::vector<std::unique_ptr<Pattern> > &get_patterns () const
    {
      return match_arm_patterns;
    }
!   std::vector<std::unique_ptr<Pattern> > &get_patterns ()
    {
      return match_arm_patterns;
    }
--- 4734,4744 ----
    const std::vector<Attribute> &get_outer_attrs () const { return outer_attrs; }
    std::vector<Attribute> &get_outer_attrs () { return outer_attrs; }
  
!   const std::vector<std::unique_ptr<Pattern>> &get_patterns () const
    {
      return match_arm_patterns;
    }
!   std::vector<std::unique_ptr<Pattern>> &get_patterns ()
    {
      return match_arm_patterns;
    }
*************** enum class InlineAsmOption
*** 4836,4864 ****
    MAY_UNWIND = 1 << 8,
  };
  
- struct AnonConst
- {
-   NodeId id;
-   std::unique_ptr<Expr> expr;
-   AnonConst (NodeId id, std::unique_ptr<Expr> expr)
-     : id (id), expr (std::move (expr))
-   {
-     rust_assert (this->expr != nullptr);
-   }
-   AnonConst (const AnonConst &other)
-   {
-     id = other.id;
-     expr = other.expr->clone_expr ();
-   }
- 
-   AnonConst operator= (const AnonConst &other)
-   {
-     id = other.id;
-     expr = other.expr->clone_expr ();
-     return *this;
-   }
- };
- 
  struct InlineAsmRegOrRegClass
  {
    enum Type
--- 5085,5090 ----
*************** struct TupleTemplateStr
*** 5288,5293 ****
--- 5514,5533 ----
  // Inline Assembly Node
  class InlineAsm : public ExprWithoutBlock
  {
+ public:
+   enum class Option
+   {
+     PURE = 1 << 0,
+     NOMEM = 1 << 1,
+     READONLY = 1 << 2,
+     PRESERVES_FLAGS = 1 << 3,
+     NORETURN = 1 << 4,
+     NOSTACK = 1 << 5,
+     ATT_SYNTAX = 1 << 6,
+     RAW = 1 << 7,
+     MAY_UNWIND = 1 << 8,
+   };
+ 
  private:
    location_t locus;
    // TODO: Not sure how outer_attrs plays with InlineAsm, I put it here in order
*************** public:
*** 5311,5317 ****
    std::map<std::string, int> named_args;
    std::set<int> reg_args;
    std::vector<TupleClobber> clobber_abi;
!   std::set<InlineAsmOption> options;
  
    std::vector<location_t> line_spans;
  
--- 5551,5557 ----
    std::map<std::string, int> named_args;
    std::set<int> reg_args;
    std::vector<TupleClobber> clobber_abi;
!   std::set<InlineAsm::Option> options;
  
    std::vector<location_t> line_spans;
  
*************** public:
*** 5342,5348 ****
  
    std::vector<TupleClobber> get_clobber_abi () { return clobber_abi; }
  
!   std::set<InlineAsmOption> get_options () { return options; }
  
    InlineAsm *clone_expr_without_block_impl () const override
    {
--- 5582,5588 ----
  
    std::vector<TupleClobber> get_clobber_abi () { return clobber_abi; }
  
!   std::set<InlineAsm::Option> get_options () { return options; }
  
    InlineAsm *clone_expr_without_block_impl () const override
    {
*************** public:
*** 5350,5355 ****
--- 5590,5622 ----
    }
  
    Expr::Kind get_expr_kind () const override { return Expr::Kind::InlineAsm; }
+ 
+   static std::string option_to_string (Option option)
+   {
+     switch (option)
+       {
+       case Option::PURE:
+ 	return "pure";
+       case Option::NOMEM:
+ 	return "nomem";
+       case Option::READONLY:
+ 	return "readonly";
+       case Option::PRESERVES_FLAGS:
+ 	return "preserves_flags";
+       case Option::NORETURN:
+ 	return "noreturn";
+       case Option::NOSTACK:
+ 	return "nostack";
+       case Option::ATT_SYNTAX:
+ 	return "att_syntax";
+       case Option::RAW:
+ 	return "raw";
+       case Option::MAY_UNWIND:
+ 	return "may_unwind";
+       default:
+ 	rust_unreachable ();
+       }
+   }
  };
  
  class LlvmInlineAsm : public ExprWithoutBlock
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-expression-yeast.cc gcc-16-20250810/gcc/rust/ast/rust-expression-yeast.cc
*** gcc-16-20250803/gcc/rust/ast/rust-expression-yeast.cc	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/rust/ast/rust-expression-yeast.cc	Sun Aug 10 22:32:08 2025
***************
*** 0 ****
--- 1,118 ----
+ // Copyright (C) 2025 Free Software Foundation, Inc.
+ 
+ // This file is part of GCC.
+ 
+ // GCC is free software; you can redistribute it and/or modify it under
+ // the terms of the GNU General Public License as published by the Free
+ // Software Foundation; either version 3, or (at your option) any later
+ // version.
+ 
+ // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ // WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ // for more details.
+ 
+ // You should have received a copy of the GNU General Public License
+ // along with GCC; see the file COPYING3.  If not see
+ // <http://www.gnu.org/licenses/>.
+ 
+ #include "rust-expression-yeast.h"
+ #include "rust-ast-visitor.h"
+ #include "rust-desugar-question-mark.h"
+ #include "rust-desugar-try-block.h"
+ #include "rust-desugar-for-loops.h"
+ #include "rust-ast-full.h"
+ #include "rust-desugar-while-let.h"
+ #include "rust-expr.h"
+ #include "rust-stmt.h"
+ 
+ namespace Rust {
+ namespace AST {
+ 
+ void
+ ExpressionYeast::go (AST::Crate &crate)
+ {
+   DefaultASTVisitor::visit (crate);
+ }
+ 
+ void
+ ExpressionYeast::dispatch_loops (std::unique_ptr<Expr> &loop_expr)
+ {
+   auto &loop = static_cast<BaseLoopExpr &> (*loop_expr.get ());
+ 
+   switch (loop.get_loop_kind ())
+     {
+     case BaseLoopExpr::Kind::For:
+       DesugarForLoops::go (loop_expr);
+       break;
+     case BaseLoopExpr::Kind::WhileLet:
+       DesugarWhileLet::go (loop_expr);
+       break;
+     default:
+       break;
+     }
+ }
+ 
+ void
+ ExpressionYeast::dispatch (std::unique_ptr<Expr> &expr)
+ {
+   switch (expr->get_expr_kind ())
+     {
+     case Expr::Kind::ErrorPropagation:
+       DesugarQuestionMark::go (expr);
+       break;
+     case Expr::Kind::Try:
+       DesugarTryBlock::go (expr);
+       break;
+     case Expr::Kind::Loop:
+       dispatch_loops (expr);
+       break;
+ 
+     default:
+       break;
+     }
+ }
+ 
+ void
+ ExpressionYeast::visit (ExprStmt &stmt)
+ {
+   dispatch (stmt.get_expr_ptr ());
+ 
+   DefaultASTVisitor::visit (stmt);
+ }
+ 
+ void
+ ExpressionYeast::visit (CallExpr &call)
+ {
+   dispatch (call.get_function_expr_ptr ());
+ 
+   for (auto &arg : call.get_params ())
+     dispatch (arg);
+ 
+   DefaultASTVisitor::visit (call);
+ }
+ 
+ void
+ ExpressionYeast::visit (BlockExpr &block)
+ {
+   for (auto &stmt : block.get_statements ())
+     if (stmt->get_stmt_kind () == Stmt::Kind::Expr)
+       dispatch (static_cast<ExprStmt &> (*stmt).get_expr_ptr ());
+ 
+   if (block.has_tail_expr ())
+     dispatch (block.get_tail_expr_ptr ());
+ 
+   DefaultASTVisitor::visit (block);
+ }
+ 
+ void
+ ExpressionYeast::visit (LetStmt &stmt)
+ {
+   if (stmt.has_init_expr ())
+     dispatch (stmt.get_init_expr_ptr ());
+ 
+   DefaultASTVisitor::visit (stmt);
+ }
+ 
+ } // namespace AST
+ } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-expression-yeast.h gcc-16-20250810/gcc/rust/ast/rust-expression-yeast.h
*** gcc-16-20250803/gcc/rust/ast/rust-expression-yeast.h	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/rust/ast/rust-expression-yeast.h	Sun Aug 10 22:32:08 2025
***************
*** 0 ****
--- 1,52 ----
+ // Copyright (C) 2025 Free Software Foundation, Inc.
+ 
+ // This file is part of GCC.
+ 
+ // GCC is free software; you can redistribute it and/or modify it under
+ // the terms of the GNU General Public License as published by the Free
+ // Software Foundation; either version 3, or (at your option) any later
+ // version.
+ 
+ // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ // WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ // for more details.
+ 
+ // You should have received a copy of the GNU General Public License
+ // along with GCC; see the file COPYING3.  If not see
+ // <http://www.gnu.org/licenses/>.
+ 
+ #ifndef RUST_EXPRESSION_YEAST
+ #define RUST_EXPRESSION_YEAST
+ 
+ #include "rust-ast-visitor.h"
+ #include "rust-ast.h"
+ #include "rust-desugar-question-mark.h"
+ 
+ namespace Rust {
+ namespace AST {
+ 
+ // This visitor takes care of all the expression desugars: try-blocks,
+ // error-propagation, etc.
+ class ExpressionYeast : public AST::DefaultASTVisitor
+ {
+   using AST::DefaultASTVisitor::visit;
+ 
+ public:
+   void go (AST::Crate &);
+ 
+ private:
+   // Dispatch to the proper desugar
+   void dispatch (std::unique_ptr<Expr> &expr);
+   void dispatch_loops (std::unique_ptr<Expr> &loop_expr);
+ 
+   void visit (AST::ExprStmt &) override;
+   void visit (AST::CallExpr &) override;
+   void visit (AST::LetStmt &) override;
+   void visit (AST::BlockExpr &) override;
+ };
+ 
+ } // namespace AST
+ } // namespace Rust
+ 
+ #endif // ! RUST_EXPRESSION_YEAST
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-fmt.h gcc-16-20250810/gcc/rust/ast/rust-fmt.h
*** gcc-16-20250803/gcc/rust/ast/rust-fmt.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-fmt.h	Sun Aug 10 22:32:08 2025
*************** enum ParseMode
*** 266,276 ****
  
  extern "C" {
  
! FormatArgsHandle
! collect_pieces (const char *input, bool append_newline, ParseMode parse_mode);
  
! FormatArgsHandle
! clone_pieces (const FormatArgsHandle &);
  
  void destroy_pieces (FormatArgsHandle);
  
--- 266,275 ----
  
  extern "C" {
  
! FormatArgsHandle collect_pieces (const char *input, bool append_newline,
! 				 ParseMode parse_mode);
  
! FormatArgsHandle clone_pieces (const FormatArgsHandle &);
  
  void destroy_pieces (FormatArgsHandle);
  
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-item.h gcc-16-20250810/gcc/rust/ast/rust-item.h
*** gcc-16-20250803/gcc/rust/ast/rust-item.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-item.h	Sun Aug 10 22:32:08 2025
*************** class TypePath;
*** 51,71 ****
  // A type generic parameter (as opposed to a lifetime generic parameter)
  class TypeParam : public GenericParam
  {
-   // bool has_outer_attribute;
-   // std::unique_ptr<Attribute> outer_attr;
    AST::AttrVec outer_attrs;
- 
    Identifier type_representation;
! 
!   // bool has_type_param_bounds;
!   // TypeParamBounds type_param_bounds;
!   std::vector<std::unique_ptr<TypeParamBound>>
!     type_param_bounds; // inlined form
! 
!   // bool has_type;
    std::unique_ptr<Type> type;
- 
    location_t locus;
  
  public:
    Identifier get_type_representation () const { return type_representation; }
--- 51,62 ----
  // A type generic parameter (as opposed to a lifetime generic parameter)
  class TypeParam : public GenericParam
  {
    AST::AttrVec outer_attrs;
    Identifier type_representation;
!   std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds;
    std::unique_ptr<Type> type;
    location_t locus;
+   bool was_impl_trait;
  
  public:
    Identifier get_type_representation () const { return type_representation; }
*************** public:
*** 85,102 ****
  	     std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds
  	     = std::vector<std::unique_ptr<TypeParamBound>> (),
  	     std::unique_ptr<Type> type = nullptr,
! 	     AST::AttrVec outer_attrs = {})
      : GenericParam (Analysis::Mappings::get ().get_next_node_id ()),
        outer_attrs (std::move (outer_attrs)),
        type_representation (std::move (type_representation)),
        type_param_bounds (std::move (type_param_bounds)),
!       type (std::move (type)), locus (locus)
    {}
  
    // Copy constructor uses clone
    TypeParam (TypeParam const &other)
      : GenericParam (other.node_id), outer_attrs (other.outer_attrs),
!       type_representation (other.type_representation), locus (other.locus)
    {
      // guard to prevent null pointer dereference
      if (other.type != nullptr)
--- 76,94 ----
  	     std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds
  	     = std::vector<std::unique_ptr<TypeParamBound>> (),
  	     std::unique_ptr<Type> type = nullptr,
! 	     AST::AttrVec outer_attrs = {}, bool was_impl_trait = false)
      : GenericParam (Analysis::Mappings::get ().get_next_node_id ()),
        outer_attrs (std::move (outer_attrs)),
        type_representation (std::move (type_representation)),
        type_param_bounds (std::move (type_param_bounds)),
!       type (std::move (type)), locus (locus), was_impl_trait (was_impl_trait)
    {}
  
    // Copy constructor uses clone
    TypeParam (TypeParam const &other)
      : GenericParam (other.node_id), outer_attrs (other.outer_attrs),
!       type_representation (other.type_representation), locus (other.locus),
!       was_impl_trait (other.was_impl_trait)
    {
      // guard to prevent null pointer dereference
      if (other.type != nullptr)
*************** public:
*** 114,119 ****
--- 106,112 ----
      outer_attrs = other.outer_attrs;
      locus = other.locus;
      node_id = other.node_id;
+     was_impl_trait = other.was_impl_trait;
  
      // guard to prevent null pointer dereference
      if (other.type != nullptr)
*************** public:
*** 153,169 ****
      return type;
    }
  
-   // TODO: mutable getter seems kinda dodgy
    std::vector<std::unique_ptr<TypeParamBound>> &get_type_param_bounds ()
    {
      return type_param_bounds;
    }
    const std::vector<std::unique_ptr<TypeParamBound>> &
    get_type_param_bounds () const
    {
      return type_param_bounds;
    }
  
  protected:
    // Clone function implementation as virtual method
    TypeParam *clone_generic_param_impl () const override
--- 146,164 ----
      return type;
    }
  
    std::vector<std::unique_ptr<TypeParamBound>> &get_type_param_bounds ()
    {
      return type_param_bounds;
    }
+ 
    const std::vector<std::unique_ptr<TypeParamBound>> &
    get_type_param_bounds () const
    {
      return type_param_bounds;
    }
  
+   bool from_impl_trait () const { return was_impl_trait; }
+ 
  protected:
    // Clone function implementation as virtual method
    TypeParam *clone_generic_param_impl () const override
*************** class ConstantItem : public VisItem, pub
*** 2455,2461 ****
    // either has an identifier or "_" - maybe handle in identifier?
    // bool identifier_is_underscore;
    // if no identifier declared, identifier will be "_"
!   std::string identifier;
  
    std::unique_ptr<Type> type;
    std::unique_ptr<Expr> const_expr;
--- 2450,2456 ----
    // either has an identifier or "_" - maybe handle in identifier?
    // bool identifier_is_underscore;
    // if no identifier declared, identifier will be "_"
!   Identifier identifier;
  
    std::unique_ptr<Type> type;
    std::unique_ptr<Expr> const_expr;
*************** class ConstantItem : public VisItem, pub
*** 2465,2471 ****
  public:
    std::string as_string () const override;
  
!   ConstantItem (std::string ident, Visibility vis, std::unique_ptr<Type> type,
  		std::unique_ptr<Expr> const_expr,
  		std::vector<Attribute> outer_attrs, location_t locus)
      : VisItem (std::move (vis), std::move (outer_attrs)),
--- 2460,2466 ----
  public:
    std::string as_string () const override;
  
!   ConstantItem (Identifier ident, Visibility vis, std::unique_ptr<Type> type,
  		std::unique_ptr<Expr> const_expr,
  		std::vector<Attribute> outer_attrs, location_t locus)
      : VisItem (std::move (vis), std::move (outer_attrs)),
*************** public:
*** 2473,2479 ****
        const_expr (std::move (const_expr)), locus (locus)
    {}
  
!   ConstantItem (std::string ident, Visibility vis, std::unique_ptr<Type> type,
  		std::vector<Attribute> outer_attrs, location_t locus)
      : VisItem (std::move (vis), std::move (outer_attrs)),
        identifier (std::move (ident)), type (std::move (type)),
--- 2468,2474 ----
        const_expr (std::move (const_expr)), locus (locus)
    {}
  
!   ConstantItem (Identifier ident, Visibility vis, std::unique_ptr<Type> type,
  		std::vector<Attribute> outer_attrs, location_t locus)
      : VisItem (std::move (vis), std::move (outer_attrs)),
        identifier (std::move (ident)), type (std::move (type)),
*************** public:
*** 2516,2522 ****
  
    /* Returns whether constant item is an "unnamed" (wildcard underscore used
     * as identifier) constant. */
!   bool is_unnamed () const { return identifier == "_"; }
  
    location_t get_locus () const override final { return locus; }
  
--- 2511,2517 ----
  
    /* Returns whether constant item is an "unnamed" (wildcard underscore used
     * as identifier) constant. */
!   bool is_unnamed () const { return identifier.as_string () == "_"; }
  
    location_t get_locus () const override final { return locus; }
  
*************** public:
*** 2561,2567 ****
      return type;
    }
  
!   std::string get_identifier () const { return identifier; }
  
    Item::Kind get_item_kind () const override
    {
--- 2556,2562 ----
      return type;
    }
  
!   const Identifier &get_identifier () const { return identifier; }
  
    Item::Kind get_item_kind () const override
    {
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-macro.cc gcc-16-20250810/gcc/rust/ast/rust-macro.cc
*** gcc-16-20250803/gcc/rust/ast/rust-macro.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-macro.cc	Thu Jan  1 00:00:00 1970
***************
*** 1,25 ****
- // Copyright (C) 2020-2025 Free Software Foundation, Inc.
- 
- // This file is part of GCC.
- 
- // GCC is free software; you can redistribute it and/or modify it under
- // the terms of the GNU General Public License as published by the Free
- // Software Foundation; either version 3, or (at your option) any later
- // version.
- 
- // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
- // WARRANTY; without even the implied warranty of MERCHANTABILITY or
- // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- // for more details.
- 
- // You should have received a copy of the GNU General Public License
- // along with GCC; see the file COPYING3.  If not see
- // <http://www.gnu.org/licenses/>.
- 
- #include "rust-macro.h"
- 
- namespace Rust {
- namespace AST {
- 
- } // namespace AST
- } // namespace Rust
--- 0 ----
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-macro.h gcc-16-20250810/gcc/rust/ast/rust-macro.h
*** gcc-16-20250803/gcc/rust/ast/rust-macro.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-macro.h	Sun Aug 10 22:32:08 2025
***************
*** 27,32 ****
--- 27,37 ----
  #include "rust-macro-builtins.h"
  
  namespace Rust {
+ 
+ // forward declarations for AttributeParser
+ class MacroInvocLexer;
+ template <typename ManagedTokenSource> class Parser;
+ 
  namespace AST {
  
  class MacroFragSpec
*************** private:
*** 756,777 ****
    std::vector<std::unique_ptr<MacroInvocation>> pending_eager_invocs;
  
  protected:
-   /* Use covariance to implement clone function as returning this object rather
-    * than base */
    MacroInvocation *clone_pattern_impl () const final override
    {
      return clone_macro_invocation_impl ();
    }
  
-   /* Use covariance to implement clone function as returning this object rather
-    * than base */
    MacroInvocation *clone_expr_without_block_impl () const final override
    {
      return clone_macro_invocation_impl ();
    }
  
-   /* Use covariance to implement clone function as returning this object rather
-    * than base */
    MacroInvocation *clone_type_no_bounds_impl () const final override
    {
      return clone_macro_invocation_impl ();
--- 761,776 ----
*************** public:
*** 788,793 ****
--- 787,806 ----
      return new MacroInvocation (*this);
    }
  
+   std::unique_ptr<MacroInvocation> reconstruct_macro_invocation () const
+   {
+     return nullptr;
+     //  return reconstruct (this,
+     // &MacroInvocation::reconstruct_macro_invocation_impl);
+   }
+ 
+   MacroInvocation *reconstruct_impl () const override
+   {
+     return new MacroInvocation (kind, builtin_kind, invoc_data, outer_attrs,
+ 				locus, is_semi_coloned,
+ 				reconstruct_vec (pending_eager_invocs));
+   }
+ 
    void add_semicolon () override { is_semi_coloned = true; }
  
    Pattern::Kind get_pattern_kind () override
*************** struct AttributeParser
*** 1108,1123 ****
  {
  private:
    // TODO: might as well rewrite to use lexer tokens
!   std::vector<std::unique_ptr<Token>> token_stream;
!   int stream_pos;
  
  public:
    AttributeParser (std::vector<std::unique_ptr<Token>> token_stream,
! 		   int stream_start_pos = 0)
!     : token_stream (std::move (token_stream)), stream_pos (stream_start_pos)
!   {}
  
!   ~AttributeParser () = default;
  
    std::vector<std::unique_ptr<MetaItemInner>> parse_meta_item_seq ();
  
--- 1121,1134 ----
  {
  private:
    // TODO: might as well rewrite to use lexer tokens
!   std::unique_ptr<MacroInvocLexer> lexer;
!   std::unique_ptr<Parser<MacroInvocLexer>> parser;
  
  public:
    AttributeParser (std::vector<std::unique_ptr<Token>> token_stream,
! 		   int stream_start_pos = 0);
  
!   ~AttributeParser ();
  
    std::vector<std::unique_ptr<MetaItemInner>> parse_meta_item_seq ();
  
*************** private:
*** 1126,1149 ****
    std::unique_ptr<MetaItemInner> parse_meta_item_inner ();
    // Returns whether token can end a meta item.
    bool is_end_meta_item_tok (TokenId id) const;
-   // Parses a simple path.
-   SimplePath parse_simple_path ();
-   // Parses a segment of a simple path (but not scope resolution operator).
-   SimplePathSegment parse_simple_path_segment ();
    // Parses a MetaItemLitExpr.
    std::unique_ptr<MetaItemLitExpr> parse_meta_item_lit ();
-   // Parses a literal.
-   Literal parse_literal ();
    // Parses a meta item that begins with a simple path.
    std::unique_ptr<MetaItem> parse_path_meta_item ();
- 
-   // TODO: should this be const?
-   std::unique_ptr<Token> &peek_token (int i = 0)
-   {
-     return token_stream[stream_pos + i];
-   }
- 
-   void skip_token (int i = 0) { stream_pos += 1 + i; }
  };
  } // namespace AST
  } // namespace Rust
--- 1137,1146 ----
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-path.cc gcc-16-20250810/gcc/rust/ast/rust-path.cc
*** gcc-16-20250803/gcc/rust/ast/rust-path.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-path.cc	Sun Aug 10 22:32:08 2025
*************** TypePath::as_simple_path () const
*** 266,271 ****
--- 266,292 ----
  		     locus);
  }
  
+ std::string
+ TypePath::make_debug_string () const
+ {
+   rust_assert (!segments.empty ());
+ 
+   std::string output;
+ 
+   for (const auto &segment : segments)
+     {
+       if (segment != nullptr && !segment->is_lang_item ()
+ 	  && !segment->is_error ())
+ 	{
+ 	  if (!output.empty () || has_opening_scope_resolution_op ())
+ 	    output.append ("::");
+ 	  output.append (segment->get_ident_segment ().as_string ());
+ 	}
+     }
+ 
+   return output;
+ }
+ 
  // hopefully definition here will prevent circular dependency issue
  TraitBound *
  TypePath::to_trait_bound (bool in_parens) const
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-path.h gcc-16-20250810/gcc/rust/ast/rust-path.h
*** gcc-16-20250803/gcc/rust/ast/rust-path.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-path.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 391,396 ****
--- 391,403 ----
      return default_value.value ();
    }
  
+   tl::optional<GenericArg> &get_default_value () { return default_value; }
+ 
+   const tl::optional<GenericArg> &get_default_value () const
+   {
+     return default_value;
+   }
+ 
    std::string as_string () const override;
  
    void accept_vis (ASTVisitor &vis) override;
*************** public:
*** 779,784 ****
--- 786,796 ----
    {
      return new TypePathSegment (*this);
    }
+   virtual TypePathSegment *reconstruct_impl () const
+   {
+     return new TypePathSegment (lang_item, ident_segment,
+ 				has_separating_scope_resolution, locus);
+   }
  
  public:
    virtual ~TypePathSegment () {}
*************** public:
*** 790,795 ****
--- 802,812 ----
    {
      return std::unique_ptr<TypePathSegment> (clone_type_path_segment_impl ());
    }
+   // Unique pointer custom reconstruct function
+   std::unique_ptr<TypePathSegment> reconstruct () const
+   {
+     return reconstruct_base (this);
+   }
  
    TypePathSegment (PathIdentSegment ident_segment,
  		   bool has_separating_scope_resolution, location_t locus)
*************** public:
*** 814,819 ****
--- 831,845 ----
        node_id (Analysis::Mappings::get ().get_next_node_id ())
    {}
  
+   // General constructor
+   TypePathSegment (tl::optional<LangItem::Kind> lang_item,
+ 		   tl::optional<PathIdentSegment> ident_segment,
+ 		   bool has_separating_scope_resolution, location_t locus)
+     : lang_item (lang_item), ident_segment (ident_segment), locus (locus),
+       has_separating_scope_resolution (has_separating_scope_resolution),
+       node_id (Analysis::Mappings::get ().get_next_node_id ())
+   {}
+ 
    TypePathSegment (TypePathSegment const &other)
      : lang_item (other.lang_item), ident_segment (other.ident_segment),
        locus (other.locus),
*************** public:
*** 968,978 ****
    void accept_vis (ASTVisitor &vis) override;
  
    // TODO: is this better? Or is a "vis_pattern" better?
!   GenericArgs &get_generic_args ()
!   {
!     rust_assert (has_generic_args ());
!     return generic_args;
!   }
  
    // Use covariance to override base class method
    TypePathSegmentGeneric *clone_type_path_segment_impl () const override
--- 994,1000 ----
    void accept_vis (ASTVisitor &vis) override;
  
    // TODO: is this better? Or is a "vis_pattern" better?
!   GenericArgs &get_generic_args () { return generic_args; }
  
    // Use covariance to override base class method
    TypePathSegmentGeneric *clone_type_path_segment_impl () const override
*************** protected:
*** 1149,1154 ****
--- 1171,1181 ----
    {
      return new TypePath (*this);
    }
+   TypePath *reconstruct_impl () const override
+   {
+     return new TypePath (reconstruct_vec (segments), locus,
+ 			 has_opening_scope_resolution);
+   }
  
  public:
    /* Returns whether the TypePath has an opening scope resolution operator
*************** public:
*** 1215,1220 ****
--- 1242,1249 ----
  
    std::string as_string () const override;
  
+   std::string make_debug_string () const;
+ 
    /* Converts TypePath to SimplePath if possible (i.e. no generic or function
     * arguments). Otherwise returns an empty SimplePath. */
    SimplePath as_simple_path () const;
*************** protected:
*** 1438,1443 ****
--- 1467,1478 ----
    {
      return new QualifiedPathInType (*this);
    }
+   QualifiedPathInType *reconstruct_impl () const override
+   {
+     return new QualifiedPathInType (path_type,
+ 				    associated_segment->reconstruct (),
+ 				    reconstruct_vec (segments), locus);
+   }
  
  public:
    QualifiedPathInType (
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-pattern.cc gcc-16-20250810/gcc/rust/ast/rust-pattern.cc
*** gcc-16-20250803/gcc/rust/ast/rust-pattern.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-pattern.cc	Sun Aug 10 22:32:08 2025
*************** IdentifierPattern::as_string () const
*** 65,72 ****
  
    str += variable_ident.as_string ();
  
!   if (has_pattern_to_bind ())
!     str += " @ " + to_bind->as_string ();
  
    return str;
  }
--- 65,72 ----
  
    str += variable_ident.as_string ();
  
!   if (has_subpattern ())
!     str += " @ " + subpattern->as_string ();
  
    return str;
  }
*************** GroupedExpr::as_string () const
*** 327,343 ****
  }
  
  std::string
! SlicePattern::as_string () const
  {
!   std::string str ("SlicePattern: ");
  
!   for (const auto &pattern : items)
      str += "\n " + pattern->as_string ();
  
    return str;
  }
  
  std::string
  AltPattern::as_string () const
  {
    std::string str ("AltPattern: ");
--- 327,379 ----
  }
  
  std::string
! SlicePatternItemsNoRest::as_string () const
  {
!   std::string str;
  
!   for (const auto &pattern : patterns)
      str += "\n " + pattern->as_string ();
  
    return str;
  }
  
  std::string
+ SlicePatternItemsHasRest::as_string () const
+ {
+   std::string str;
+ 
+   str += "\n Lower patterns: ";
+   if (lower_patterns.empty ())
+     {
+       str += "none";
+     }
+   else
+     {
+       for (const auto &lower : lower_patterns)
+ 	str += "\n  " + lower->as_string ();
+     }
+ 
+   str += "\n Upper patterns: ";
+   if (upper_patterns.empty ())
+     {
+       str += "none";
+     }
+   else
+     {
+       for (const auto &upper : upper_patterns)
+ 	str += "\n  " + upper->as_string ();
+     }
+ 
+   return str;
+ }
+ 
+ std::string
+ SlicePattern::as_string () const
+ {
+   return "SlicePattern: " + items->as_string ();
+ }
+ 
+ std::string
  AltPattern::as_string () const
  {
    std::string str ("AltPattern: ");
*************** GroupedExpr::accept_vis (ASTVisitor &vis
*** 365,370 ****
--- 401,418 ----
  {
    vis.visit (*this);
  }
+ 
+ void
+ SlicePatternItemsNoRest::accept_vis (ASTVisitor &vis)
+ {
+   vis.visit (*this);
+ }
+ 
+ void
+ SlicePatternItemsHasRest::accept_vis (ASTVisitor &vis)
+ {
+   vis.visit (*this);
+ }
  
  void
  SlicePattern::accept_vis (ASTVisitor &vis)
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-pattern.h gcc-16-20250810/gcc/rust/ast/rust-pattern.h
*** gcc-16-20250803/gcc/rust/ast/rust-pattern.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-pattern.h	Sun Aug 10 22:32:08 2025
*************** class IdentifierPattern : public Pattern
*** 74,80 ****
    bool is_mut;
  
    // bool has_pattern;
!   std::unique_ptr<Pattern> to_bind;
    location_t locus;
    NodeId node_id;
  
--- 74,80 ----
    bool is_mut;
  
    // bool has_pattern;
!   std::unique_ptr<Pattern> subpattern;
    location_t locus;
    NodeId node_id;
  
*************** public:
*** 82,103 ****
    std::string as_string () const override;
  
    // Returns whether the IdentifierPattern has a pattern to bind.
!   bool has_pattern_to_bind () const { return to_bind != nullptr; }
  
    // Constructor
    IdentifierPattern (Identifier ident, location_t locus, bool is_ref = false,
  		     bool is_mut = false,
! 		     std::unique_ptr<Pattern> to_bind = nullptr)
      : Pattern (), variable_ident (std::move (ident)), is_ref (is_ref),
!       is_mut (is_mut), to_bind (std::move (to_bind)), locus (locus),
        node_id (Analysis::Mappings::get ().get_next_node_id ())
    {}
  
    IdentifierPattern (NodeId node_id, Identifier ident, location_t locus,
  		     bool is_ref = false, bool is_mut = false,
! 		     std::unique_ptr<Pattern> to_bind = nullptr)
      : Pattern (), variable_ident (std::move (ident)), is_ref (is_ref),
!       is_mut (is_mut), to_bind (std::move (to_bind)), locus (locus),
        node_id (node_id)
    {}
  
--- 82,103 ----
    std::string as_string () const override;
  
    // Returns whether the IdentifierPattern has a pattern to bind.
!   bool has_subpattern () const { return subpattern != nullptr; }
  
    // Constructor
    IdentifierPattern (Identifier ident, location_t locus, bool is_ref = false,
  		     bool is_mut = false,
! 		     std::unique_ptr<Pattern> subpattern = nullptr)
      : Pattern (), variable_ident (std::move (ident)), is_ref (is_ref),
!       is_mut (is_mut), subpattern (std::move (subpattern)), locus (locus),
        node_id (Analysis::Mappings::get ().get_next_node_id ())
    {}
  
    IdentifierPattern (NodeId node_id, Identifier ident, location_t locus,
  		     bool is_ref = false, bool is_mut = false,
! 		     std::unique_ptr<Pattern> subpattern = nullptr)
      : Pattern (), variable_ident (std::move (ident)), is_ref (is_ref),
!       is_mut (is_mut), subpattern (std::move (subpattern)), locus (locus),
        node_id (node_id)
    {}
  
*************** public:
*** 107,114 ****
        is_mut (other.is_mut), locus (other.locus), node_id (other.node_id)
    {
      // fix to get prevent null pointer dereference
!     if (other.to_bind != nullptr)
!       to_bind = other.to_bind->clone_pattern ();
    }
  
    // Overload assignment operator to use clone
--- 107,114 ----
        is_mut (other.is_mut), locus (other.locus), node_id (other.node_id)
    {
      // fix to get prevent null pointer dereference
!     if (other.subpattern != nullptr)
!       subpattern = other.subpattern->clone_pattern ();
    }
  
    // Overload assignment operator to use clone
*************** public:
*** 121,130 ****
      node_id = other.node_id;
  
      // fix to prevent null pointer dereference
!     if (other.to_bind != nullptr)
!       to_bind = other.to_bind->clone_pattern ();
      else
!       to_bind = nullptr;
  
      return *this;
    }
--- 121,130 ----
      node_id = other.node_id;
  
      // fix to prevent null pointer dereference
!     if (other.subpattern != nullptr)
!       subpattern = other.subpattern->clone_pattern ();
      else
!       subpattern = nullptr;
  
      return *this;
    }
*************** public:
*** 137,147 ****
  
    void accept_vis (ASTVisitor &vis) override;
  
!   // TODO: is this better? Or is a "vis_pattern" better?
!   Pattern &get_pattern_to_bind ()
    {
!     rust_assert (has_pattern_to_bind ());
!     return *to_bind;
    }
  
    Identifier get_ident () const { return variable_ident; }
--- 137,146 ----
  
    void accept_vis (ASTVisitor &vis) override;
  
!   Pattern &get_subpattern ()
    {
!     rust_assert (has_subpattern ());
!     return *subpattern;
    }
  
    Identifier get_ident () const { return variable_ident; }
*************** enum class RangeKind
*** 375,382 ****
    EXCLUDED,
  };
  
! RangeKind
! tokenid_to_rangekind (TokenId id);
  // AST node for matching within a certain range (range pattern)
  class RangePattern : public Pattern
  {
--- 374,380 ----
    EXCLUDED,
  };
  
! RangeKind tokenid_to_rangekind (TokenId id);
  // AST node for matching within a certain range (range pattern)
  class RangePattern : public Pattern
  {
*************** public:
*** 950,956 ****
     * is empty). */
    bool has_struct_pattern_elems () const { return !elems.is_empty (); }
  
!   location_t get_locus () const override { return path.get_locus (); }
  
    void accept_vis (ASTVisitor &vis) override;
  
--- 948,954 ----
     * is empty). */
    bool has_struct_pattern_elems () const { return !elems.is_empty (); }
  
!   location_t get_locus () const override { return locus; }
  
    void accept_vis (ASTVisitor &vis) override;
  
*************** protected:
*** 1523,1563 ****
    }
  };
  
  // AST node representing patterns that can match slices and arrays
  class SlicePattern : public Pattern
  {
!   std::vector<std::unique_ptr<Pattern>> items;
    location_t locus;
    NodeId node_id;
  
  public:
    std::string as_string () const override;
  
!   SlicePattern (std::vector<std::unique_ptr<Pattern>> items, location_t locus)
      : items (std::move (items)), locus (locus),
        node_id (Analysis::Mappings::get ().get_next_node_id ())
    {}
  
!   // Copy constructor with vector clone
    SlicePattern (SlicePattern const &other) : locus (other.locus)
    {
      node_id = other.node_id;
!     items.reserve (other.items.size ());
!     for (const auto &e : other.items)
!       items.push_back (e->clone_pattern ());
    }
  
!   // Overloaded assignment operator to vector clone
    SlicePattern &operator= (SlicePattern const &other)
    {
      locus = other.locus;
      node_id = other.node_id;
  
!     items.clear ();
!     items.reserve (other.items.size ());
!     for (const auto &e : other.items)
!       items.push_back (e->clone_pattern ());
  
      return *this;
    }
  
--- 1521,1737 ----
    }
  };
  
+ // Base abstract class representing patterns in a SlicePattern
+ class SlicePatternItems
+ {
+ public:
+   enum SlicePatternItemType
+   {
+     NO_REST,
+     HAS_REST,
+   };
+ 
+   virtual ~SlicePatternItems () {}
+ 
+   // TODO: should this store location data?
+ 
+   // Unique pointer custom clone function
+   std::unique_ptr<SlicePatternItems> clone_slice_pattern_items () const
+   {
+     return std::unique_ptr<SlicePatternItems> (
+       clone_slice_pattern_items_impl ());
+   }
+ 
+   virtual std::string as_string () const = 0;
+ 
+   virtual void accept_vis (ASTVisitor &vis) = 0;
+ 
+   virtual SlicePatternItemType get_pattern_type () const = 0;
+ 
+ protected:
+   // pure virtual clone implementation
+   virtual SlicePatternItems *clone_slice_pattern_items_impl () const = 0;
+ };
+ 
+ // Class representing the patterns in a SlicePattern without `..`
+ class SlicePatternItemsNoRest : public SlicePatternItems
+ {
+   std::vector<std::unique_ptr<Pattern>> patterns;
+ 
+ public:
+   SlicePatternItemsNoRest (std::vector<std::unique_ptr<Pattern>> patterns)
+     : patterns (std::move (patterns))
+   {}
+ 
+   // Copy constructor with vector clone
+   SlicePatternItemsNoRest (SlicePatternItemsNoRest const &other)
+   {
+     patterns.reserve (other.patterns.size ());
+     for (const auto &e : other.patterns)
+       patterns.push_back (e->clone_pattern ());
+   }
+ 
+   // Overloaded assignment operator to vector clone
+   SlicePatternItemsNoRest &operator= (SlicePatternItemsNoRest const &other)
+   {
+     patterns.clear ();
+     patterns.reserve (other.patterns.size ());
+     for (const auto &e : other.patterns)
+       patterns.push_back (e->clone_pattern ());
+ 
+     return *this;
+   }
+ 
+   // move constructors
+   SlicePatternItemsNoRest (SlicePatternItemsNoRest &&other) = default;
+   SlicePatternItemsNoRest &operator= (SlicePatternItemsNoRest &&other)
+     = default;
+ 
+   std::string as_string () const override;
+ 
+   void accept_vis (ASTVisitor &vis) override;
+ 
+   // TODO: seems kinda dodgy. Think of better way.
+   std::vector<std::unique_ptr<Pattern>> &get_patterns () { return patterns; }
+   const std::vector<std::unique_ptr<Pattern>> &get_patterns () const
+   {
+     return patterns;
+   }
+ 
+   SlicePatternItemType get_pattern_type () const override
+   {
+     return SlicePatternItemType::NO_REST;
+   }
+ 
+ protected:
+   /* Use covariance to implement clone function as returning this object rather
+    * than base */
+   SlicePatternItemsNoRest *clone_slice_pattern_items_impl () const override
+   {
+     return new SlicePatternItemsNoRest (*this);
+   }
+ };
+ 
+ // Class representing the patterns in a SlicePattern that contains a `..`
+ class SlicePatternItemsHasRest : public SlicePatternItems
+ {
+   std::vector<std::unique_ptr<Pattern>> lower_patterns;
+   std::vector<std::unique_ptr<Pattern>> upper_patterns;
+ 
+ public:
+   SlicePatternItemsHasRest (
+     std::vector<std::unique_ptr<Pattern>> lower_patterns,
+     std::vector<std::unique_ptr<Pattern>> upper_patterns)
+     : lower_patterns (std::move (lower_patterns)),
+       upper_patterns (std::move (upper_patterns))
+   {}
+ 
+   // Copy constructor with vector clone
+   SlicePatternItemsHasRest (SlicePatternItemsHasRest const &other)
+   {
+     lower_patterns.reserve (other.lower_patterns.size ());
+     for (const auto &e : other.lower_patterns)
+       lower_patterns.push_back (e->clone_pattern ());
+ 
+     upper_patterns.reserve (other.upper_patterns.size ());
+     for (const auto &e : other.upper_patterns)
+       upper_patterns.push_back (e->clone_pattern ());
+   }
+ 
+   // Overloaded assignment operator to clone
+   SlicePatternItemsHasRest &operator= (SlicePatternItemsHasRest const &other)
+   {
+     lower_patterns.clear ();
+     lower_patterns.reserve (other.lower_patterns.size ());
+     for (const auto &e : other.lower_patterns)
+       lower_patterns.push_back (e->clone_pattern ());
+ 
+     upper_patterns.clear ();
+     upper_patterns.reserve (other.upper_patterns.size ());
+     for (const auto &e : other.upper_patterns)
+       upper_patterns.push_back (e->clone_pattern ());
+ 
+     return *this;
+   }
+ 
+   // move constructors
+   SlicePatternItemsHasRest (SlicePatternItemsHasRest &&other) = default;
+   SlicePatternItemsHasRest &operator= (SlicePatternItemsHasRest &&other)
+     = default;
+ 
+   std::string as_string () const override;
+ 
+   void accept_vis (ASTVisitor &vis) override;
+ 
+   // TODO: seems kinda dodgy. Think of better way.
+   std::vector<std::unique_ptr<Pattern>> &get_lower_patterns ()
+   {
+     return lower_patterns;
+   }
+   const std::vector<std::unique_ptr<Pattern>> &get_lower_patterns () const
+   {
+     return lower_patterns;
+   }
+ 
+   // TODO: seems kinda dodgy. Think of better way.
+   std::vector<std::unique_ptr<Pattern>> &get_upper_patterns ()
+   {
+     return upper_patterns;
+   }
+   const std::vector<std::unique_ptr<Pattern>> &get_upper_patterns () const
+   {
+     return upper_patterns;
+   }
+ 
+   SlicePatternItemType get_pattern_type () const override
+   {
+     return SlicePatternItemType::HAS_REST;
+   }
+ 
+ protected:
+   /* Use covariance to implement clone function as returning this object rather
+    * than base */
+   SlicePatternItemsHasRest *clone_slice_pattern_items_impl () const override
+   {
+     return new SlicePatternItemsHasRest (*this);
+   }
+ };
+ 
  // AST node representing patterns that can match slices and arrays
  class SlicePattern : public Pattern
  {
!   std::unique_ptr<SlicePatternItems> items;
    location_t locus;
    NodeId node_id;
  
  public:
    std::string as_string () const override;
  
!   SlicePattern (std::unique_ptr<SlicePatternItems> items, location_t locus)
      : items (std::move (items)), locus (locus),
        node_id (Analysis::Mappings::get ().get_next_node_id ())
    {}
  
!   // Copy constructor requires clone
    SlicePattern (SlicePattern const &other) : locus (other.locus)
    {
+     // guard to prevent null dereference
+     rust_assert (other.items != nullptr);
+ 
      node_id = other.node_id;
!     items = other.items->clone_slice_pattern_items ();
    }
  
!   // Overloaded assignment operator to clone
    SlicePattern &operator= (SlicePattern const &other)
    {
      locus = other.locus;
      node_id = other.node_id;
  
!     // guard to prevent null dereference
!     rust_assert (other.items != nullptr);
  
+     items = other.items->clone_slice_pattern_items ();
      return *this;
    }
  
*************** public:
*** 1570,1579 ****
    void accept_vis (ASTVisitor &vis) override;
  
    // TODO: seems kinda dodgy. Think of better way.
!   std::vector<std::unique_ptr<Pattern>> &get_items () { return items; }
!   const std::vector<std::unique_ptr<Pattern>> &get_items () const
    {
!     return items;
    }
  
    NodeId get_node_id () const override { return node_id; }
--- 1744,1753 ----
    void accept_vis (ASTVisitor &vis) override;
  
    // TODO: seems kinda dodgy. Think of better way.
!   SlicePatternItems &get_items ()
    {
!     rust_assert (items != nullptr);
!     return *items;
    }
  
    NodeId get_node_id () const override { return node_id; }
diff -Nrcpad gcc-16-20250803/gcc/rust/ast/rust-type.h gcc-16-20250810/gcc/rust/ast/rust-type.h
*** gcc-16-20250803/gcc/rust/ast/rust-type.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/ast/rust-type.h	Sun Aug 10 22:32:08 2025
***************
*** 19,25 ****
--- 19,27 ----
  #ifndef RUST_AST_TYPE_H
  #define RUST_AST_TYPE_H
  
+ #include "optional.h"
  #include "rust-ast.h"
+ #include "rust-expr.h"
  #include "rust-path.h"
  
  namespace Rust {
*************** public:
*** 73,78 ****
--- 75,87 ----
        type_path (std::move (type_path)), locus (locus)
    {}
  
+   TraitBound (TraitBound const &other)
+     : TypeParamBound (other.get_node_id ()), in_parens (other.in_parens),
+       opening_question_mark (other.opening_question_mark),
+       for_lifetimes (other.for_lifetimes), type_path (other.type_path),
+       locus (other.locus)
+   {}
+ 
    std::string as_string () const override;
  
    location_t get_locus () const override final { return locus; }
*************** protected:
*** 99,104 ****
--- 108,118 ----
      return new TraitBound (node_id, type_path, locus, in_parens,
  			   opening_question_mark, for_lifetimes);
    }
+   TraitBound *reconstruct_impl () const override
+   {
+     return new TraitBound (type_path, locus, in_parens, opening_question_mark,
+ 			   for_lifetimes);
+   }
  };
  
  // definition moved to rust-ast.h
*************** protected:
*** 120,125 ****
--- 134,143 ----
    {
      return new ImplTraitType (*this);
    }
+   ImplTraitType *reconstruct_impl () const override
+   {
+     return new ImplTraitType (reconstruct_vec (type_param_bounds), locus);
+   }
  
  public:
    ImplTraitType (
*************** public:
*** 129,135 ****
    {}
  
    // copy constructor with vector clone
!   ImplTraitType (ImplTraitType const &other) : locus (other.locus)
    {
      type_param_bounds.reserve (other.type_param_bounds.size ());
      for (const auto &e : other.type_param_bounds)
--- 147,154 ----
    {}
  
    // copy constructor with vector clone
!   ImplTraitType (ImplTraitType const &other)
!     : Type (other.node_id), locus (other.locus)
    {
      type_param_bounds.reserve (other.type_param_bounds.size ());
      for (const auto &e : other.type_param_bounds)
*************** protected:
*** 184,189 ****
--- 203,213 ----
    {
      return new TraitObjectType (*this);
    }
+   TraitObjectType *reconstruct_impl () const override
+   {
+     return new TraitObjectType (reconstruct_vec (type_param_bounds), locus,
+ 				has_dyn);
+   }
  
  public:
    TraitObjectType (
*************** public:
*** 195,201 ****
  
    // copy constructor with vector clone
    TraitObjectType (TraitObjectType const &other)
!     : has_dyn (other.has_dyn), locus (other.locus)
    {
      type_param_bounds.reserve (other.type_param_bounds.size ());
      for (const auto &e : other.type_param_bounds)
--- 219,225 ----
  
    // copy constructor with vector clone
    TraitObjectType (TraitObjectType const &other)
!     : Type (other.node_id), has_dyn (other.has_dyn), locus (other.locus)
    {
      type_param_bounds.reserve (other.type_param_bounds.size ());
      for (const auto &e : other.type_param_bounds)
*************** protected:
*** 251,256 ****
--- 275,284 ----
    {
      return new ParenthesisedType (*this);
    }
+   ParenthesisedType *reconstruct_impl () const override
+   {
+     return new ParenthesisedType (type_in_parens->reconstruct (), locus);
+   }
  
  public:
    // Constructor uses Type pointer for polymorphism
*************** public:
*** 305,337 ****
  // Impl trait with a single bound? Poor reference material here.
  class ImplTraitTypeOneBound : public TypeNoBounds
  {
!   TraitBound trait_bound;
    location_t locus;
  
- protected:
-   /* Use covariance to implement clone function as returning this object rather
-    * than base */
-   ImplTraitTypeOneBound *clone_type_no_bounds_impl () const override
-   {
-     return new ImplTraitTypeOneBound (*this);
-   }
- 
  public:
!   ImplTraitTypeOneBound (TraitBound trait_bound, location_t locus)
      : trait_bound (std::move (trait_bound)), locus (locus)
    {}
  
    std::string as_string () const override;
  
    location_t get_locus () const override final { return locus; }
  
    void accept_vis (ASTVisitor &vis) override;
  
!   // TODO: would a "vis_type" be better?
!   TraitBound &get_trait_bound ()
    {
!     // TODO: check to ensure invariants are met?
!     return trait_bound;
    }
  };
  
--- 333,367 ----
  // Impl trait with a single bound? Poor reference material here.
  class ImplTraitTypeOneBound : public TypeNoBounds
  {
!   std::unique_ptr<TypeParamBound> trait_bound;
    location_t locus;
  
  public:
!   ImplTraitTypeOneBound (std::unique_ptr<TypeParamBound> trait_bound,
! 			 location_t locus)
      : trait_bound (std::move (trait_bound)), locus (locus)
    {}
  
+   ImplTraitTypeOneBound (ImplTraitTypeOneBound const &other)
+     : trait_bound (other.trait_bound->clone_type_param_bound ()),
+       locus (other.locus)
+   {}
+ 
    std::string as_string () const override;
  
    location_t get_locus () const override final { return locus; }
  
    void accept_vis (ASTVisitor &vis) override;
  
!   std::unique_ptr<TypeParamBound> &get_trait_bound () { return trait_bound; }
! 
!   TypeNoBounds *clone_type_no_bounds_impl () const override
    {
!     return new ImplTraitTypeOneBound (*this);
!   }
!   TypeNoBounds *reconstruct_impl () const override
!   {
!     return new ImplTraitTypeOneBound (trait_bound->reconstruct (), locus);
    }
  };
  
*************** protected:
*** 350,355 ****
--- 380,389 ----
    {
      return new TraitObjectTypeOneBound (*this);
    }
+   TraitObjectTypeOneBound *reconstruct_impl () const override
+   {
+     return new TraitObjectTypeOneBound (trait_bound, locus, has_dyn);
+   }
  
  public:
    TraitObjectTypeOneBound (TraitBound trait_bound, location_t locus,
*************** protected:
*** 443,448 ****
--- 477,486 ----
    {
      return new TupleType (*this);
    }
+   TupleType *reconstruct_impl () const override
+   {
+     return new TupleType (reconstruct_vec (elems), locus);
+   }
  };
  
  /* A type with no values, representing the result of computations that never
*************** protected:
*** 459,464 ****
--- 497,506 ----
    {
      return new NeverType (*this);
    }
+   NeverType *reconstruct_impl () const override
+   {
+     return new NeverType (locus);
+   }
  
  public:
    NeverType (location_t locus) : locus (locus) {}
*************** public:
*** 529,534 ****
--- 571,579 ----
      return *type;
    }
  
+   // Getter for direct access to the type unique_ptr
+   std::unique_ptr<TypeNoBounds> &get_type_ptr () { return type; }
+ 
  protected:
    /* Use covariance to implement clone function as returning this object rather
     * than base */
*************** protected:
*** 536,541 ****
--- 581,590 ----
    {
      return new RawPointerType (*this);
    }
+   RawPointerType *reconstruct_impl () const override
+   {
+     return new RawPointerType (pointer_type, type->reconstruct (), locus);
+   }
  };
  
  // A type pointing to memory owned by another value
*************** public:
*** 604,609 ****
--- 653,661 ----
  
    TypeNoBounds &get_base_type () { return *type; }
  
+   // Getter for direct access to the type unique_ptr
+   std::unique_ptr<TypeNoBounds> &get_type_ptr () { return type; }
+ 
  protected:
    /* Use covariance to implement clone function as returning this object rather
     * than base */
*************** protected:
*** 611,643 ****
    {
      return new ReferenceType (*this);
    }
  };
  
  // A fixed-size sequence of elements of a specified type
  class ArrayType : public TypeNoBounds
  {
    std::unique_ptr<Type> elem_type;
!   std::unique_ptr<Expr> size;
    location_t locus;
  
  public:
    // Constructor requires pointers for polymorphism
!   ArrayType (std::unique_ptr<Type> type, std::unique_ptr<Expr> array_size,
! 	     location_t locus)
      : elem_type (std::move (type)), size (std::move (array_size)), locus (locus)
    {}
  
    // Copy constructor requires deep copies of both unique pointers
    ArrayType (ArrayType const &other)
!     : elem_type (other.elem_type->clone_type ()),
!       size (other.size->clone_expr ()), locus (other.locus)
    {}
  
    // Overload assignment operator to deep copy pointers
    ArrayType &operator= (ArrayType const &other)
    {
      elem_type = other.elem_type->clone_type ();
!     size = other.size->clone_expr ();
      locus = other.locus;
      return *this;
    }
--- 663,704 ----
    {
      return new ReferenceType (*this);
    }
+   ReferenceType *reconstruct_impl () const override
+   {
+     return new ReferenceType (has_mut, type->reconstruct (), locus,
+ 			      // TODO: Improve this - it's ugly!
+ 			      has_lifetime () ? tl::make_optional<Lifetime> (
+ 				lifetime->get_lifetime_type (),
+ 				lifetime->get_lifetime_name (),
+ 				lifetime->get_locus ())
+ 					      : tl::nullopt);
+   }
  };
  
  // A fixed-size sequence of elements of a specified type
  class ArrayType : public TypeNoBounds
  {
    std::unique_ptr<Type> elem_type;
!   AnonConst size;
    location_t locus;
  
  public:
    // Constructor requires pointers for polymorphism
!   ArrayType (std::unique_ptr<Type> type, AnonConst array_size, location_t locus)
      : elem_type (std::move (type)), size (std::move (array_size)), locus (locus)
    {}
  
    // Copy constructor requires deep copies of both unique pointers
    ArrayType (ArrayType const &other)
!     : elem_type (other.elem_type->clone_type ()), size (other.size),
!       locus (other.locus)
    {}
  
    // Overload assignment operator to deep copy pointers
    ArrayType &operator= (ArrayType const &other)
    {
      elem_type = other.elem_type->clone_type ();
!     size = other.size;
      locus = other.locus;
      return *this;
    }
*************** public:
*** 660,671 ****
    }
  
    // TODO: would a "vis_expr" be better?
!   Expr &get_size_expr ()
    {
!     rust_assert (size != nullptr);
!     return *size;
    }
  
  protected:
    /* Use covariance to implement clone function as returning this object rather
     * than base */
--- 721,735 ----
    }
  
    // TODO: would a "vis_expr" be better?
!   AnonConst &get_size_expr ()
    {
!     // rust_assert (size != nullptr);
! 
!     return size;
    }
  
+   std::unique_ptr<Type> &get_element_type () { return elem_type; }
+ 
  protected:
    /* Use covariance to implement clone function as returning this object rather
     * than base */
*************** protected:
*** 673,678 ****
--- 737,748 ----
    {
      return new ArrayType (*this);
    }
+   ArrayType *reconstruct_impl () const override
+   {
+     return new ArrayType (elem_type->reconstruct (),
+ 			  size /* FIXME: This should be `reconstruct_expr()` */,
+ 			  locus);
+   }
  };
  
  /* A dynamically-sized type representing a "view" into a sequence of elements of
*************** public:
*** 719,731 ****
      return *elem_type;
    }
  
  protected:
!   /* Use covariance to implement clone function as returning this object rather
!    * than base */
    SliceType *clone_type_no_bounds_impl () const override
    {
      return new SliceType (*this);
    }
  };
  
  /* Type used in generic arguments to explicitly request type inference (wildcard
--- 789,808 ----
      return *elem_type;
    }
  
+   // Getter for direct access to the elem_type unique_ptr
+   std::unique_ptr<Type> &get_elem_type_ptr () { return elem_type; }
+ 
  protected:
!   /* Use covariance to implement clone function as returning this object
!    * rather than base */
    SliceType *clone_type_no_bounds_impl () const override
    {
      return new SliceType (*this);
    }
+   SliceType *reconstruct_impl () const override
+   {
+     return new SliceType (elem_type->reconstruct (), locus);
+   }
  };
  
  /* Type used in generic arguments to explicitly request type inference (wildcard
*************** class InferredType : public TypeNoBounds
*** 736,748 ****
  
    // e.g. Vec<_> = whatever
  protected:
!   /* Use covariance to implement clone function as returning this object rather
!    * than base */
    InferredType *clone_type_no_bounds_impl () const override
    {
      return new InferredType (*this);
    }
  
  public:
    InferredType (location_t locus) : locus (locus) {}
  
--- 813,833 ----
  
    // e.g. Vec<_> = whatever
  protected:
!   /* Use covariance to implement clone function as returning this object
!    * rather than base */
    InferredType *clone_type_no_bounds_impl () const override
    {
+     // This goes through the copy constructor
      return new InferredType (*this);
    }
  
+   InferredType *reconstruct_impl () const override
+   {
+     // This goes through the base constructor which calls the base
+     // TypeNoBounds constructor, which allocates a new NodeId
+     return new InferredType (locus);
+   }
+ 
  public:
    InferredType (location_t locus) : locus (locus) {}
  
*************** public:
*** 961,969 ****
  
    FunctionQualifiers &get_function_qualifiers () { return function_qualifiers; }
  
  protected:
!   /* Use covariance to implement clone function as returning this object rather
!    * than base */
    BareFunctionType *clone_type_no_bounds_impl () const override
    {
      return new BareFunctionType (*this);
--- 1046,1062 ----
  
    FunctionQualifiers &get_function_qualifiers () { return function_qualifiers; }
  
+   BareFunctionType *reconstruct_impl () const override
+   {
+     return new BareFunctionType (
+       for_lifetimes, function_qualifiers, params,
+       /* FIXME: Should params be reconstruct() as well? */
+       _is_variadic, variadic_attrs, return_type->reconstruct (), locus);
+   }
+ 
  protected:
!   /* Use covariance to implement clone function as returning this object
!    * rather than base */
    BareFunctionType *clone_type_no_bounds_impl () const override
    {
      return new BareFunctionType (*this);
*************** class MacroInvocation;
*** 980,992 ****
   * function item type?
   * closure expression types?
   * primitive types (bool, int, float, char, str (the slice))
!  * Although supposedly TypePaths are used to reference these types (including
!  * primitives) */
  
  /* FIXME: Incomplete spec references:
!  *  anonymous type parameters, aka "impl Trait in argument position" - impl then
!  * trait bounds abstract return types, aka "impl Trait in return position" -
!  * impl then trait bounds */
  } // namespace AST
  } // namespace Rust
  
--- 1073,1085 ----
   * function item type?
   * closure expression types?
   * primitive types (bool, int, float, char, str (the slice))
!  * Although supposedly TypePaths are used to reference these types
!  * (including primitives) */
  
  /* FIXME: Incomplete spec references:
!  *  anonymous type parameters, aka "impl Trait in argument position" - impl
!  * then trait bounds abstract return types, aka "impl Trait in return
!  * position" - impl then trait bounds */
  } // namespace AST
  } // namespace Rust
  
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-compile-asm.cc gcc-16-20250810/gcc/rust/backend/rust-compile-asm.cc
*** gcc-16-20250803/gcc/rust/backend/rust-compile-asm.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-compile-asm.cc	Sun Aug 10 22:32:08 2025
*************** CompileAsm::asm_construct_string_tree (H
*** 74,130 ****
    return Backend::string_constant_expression (result);
  }
  
  tree
  CompileAsm::asm_construct_outputs (HIR::InlineAsm &expr)
  {
    // TODO: Do i need to do this?
  
    tree head = NULL_TREE;
!   for (auto &output : expr.get_operands ())
      {
!       if (output.get_register_type ()
! 	  == AST::InlineAsmOperand::RegisterType::Out)
! 	{
! 	  auto out = output.get_out ();
  
! 	  tree out_tree = CompileExpr::Compile (*out.expr, this->ctx);
! 	  // expects a tree list
! 	  // TODO: This assumes that the output is a register
! 	  std::string expr_name = "=r";
! 	  auto name = build_string (expr_name.size () + 1, expr_name.c_str ());
! 	  head
! 	    = chainon (head, build_tree_list (build_tree_list (NULL_TREE, name),
! 					      out_tree));
  
! 	  /*Backend::debug (head);*/
! 	  /*head = chainon (head, out_tree);*/
! 	}
      }
    return head;
  }
  
  tree
  CompileAsm::asm_construct_inputs (HIR::InlineAsm &expr)
  {
    // TODO: Do i need to do this?
    tree head = NULL_TREE;
!   for (auto &input : expr.get_operands ())
      {
!       if (input.get_register_type () == AST::InlineAsmOperand::RegisterType::In)
! 	{
! 	  auto in = input.get_in ();
  
! 	  tree in_tree = CompileExpr::Compile (*in.expr, this->ctx);
! 	  // expects a tree list
! 	  // TODO: This assumes that the input is a register
! 	  std::string expr_name = "r";
! 	  auto name = build_string (expr_name.size () + 1, expr_name.c_str ());
! 	  head
! 	    = chainon (head, build_tree_list (build_tree_list (NULL_TREE, name),
! 					      in_tree));
  
! 	  /*head = chainon (head, out_tree);*/
! 	}
      }
    return head;
  }
--- 74,167 ----
    return Backend::string_constant_expression (result);
  }
  
+ tl::optional<std::reference_wrapper<HIR::Expr>>
+ get_out_expr (HIR::InlineAsmOperand &operand)
+ {
+   switch (operand.get_register_type ())
+     {
+     case HIR::InlineAsmOperand::RegisterType::Out:
+       return *operand.get_out ().expr;
+     case HIR::InlineAsmOperand::RegisterType::InOut:
+       return *operand.get_in_out ().expr;
+     case HIR::InlineAsmOperand::RegisterType::SplitInOut:
+       return *operand.get_split_in_out ().out_expr;
+     case HIR::InlineAsmOperand::RegisterType::Const:
+     case HIR::InlineAsmOperand::RegisterType::Sym:
+     case HIR::InlineAsmOperand::RegisterType::Label:
+     case HIR::InlineAsmOperand::RegisterType::In:
+       break;
+     }
+   return tl::nullopt;
+ }
+ 
  tree
  CompileAsm::asm_construct_outputs (HIR::InlineAsm &expr)
  {
    // TODO: Do i need to do this?
  
    tree head = NULL_TREE;
!   for (auto &operand : expr.get_operands ())
      {
!       tl::optional<std::reference_wrapper<HIR::Expr>> out_expr
! 	= get_out_expr (operand);
!       if (!out_expr.has_value ())
! 	continue;
  
!       tree out_tree = CompileExpr::Compile (*out_expr, this->ctx);
!       // expects a tree list
!       // TODO: This assumes that the output is a register
!       std::string expr_name = "=r";
!       auto name = build_string (expr_name.size () + 1, expr_name.c_str ());
!       head = chainon (head, build_tree_list (build_tree_list (NULL_TREE, name),
! 					     out_tree));
  
!       /*Backend::debug (head);*/
!       /*head = chainon (head, out_tree);*/
      }
    return head;
  }
  
+ tl::optional<std::reference_wrapper<HIR::Expr>>
+ get_in_expr (HIR::InlineAsmOperand &operand)
+ {
+   switch (operand.get_register_type ())
+     {
+     case HIR::InlineAsmOperand::RegisterType::In:
+       return *operand.get_in ().expr;
+     case HIR::InlineAsmOperand::RegisterType::InOut:
+       return *operand.get_in_out ().expr;
+     case HIR::InlineAsmOperand::RegisterType::SplitInOut:
+       return *operand.get_split_in_out ().in_expr;
+     case HIR::InlineAsmOperand::RegisterType::Const:
+     case HIR::InlineAsmOperand::RegisterType::Sym:
+     case HIR::InlineAsmOperand::RegisterType::Label:
+     case HIR::InlineAsmOperand::RegisterType::Out:
+       break;
+     }
+   return tl::nullopt;
+ }
+ 
  tree
  CompileAsm::asm_construct_inputs (HIR::InlineAsm &expr)
  {
    // TODO: Do i need to do this?
    tree head = NULL_TREE;
!   for (auto &operand : expr.get_operands ())
      {
!       tl::optional<std::reference_wrapper<HIR::Expr>> in_expr
! 	= get_in_expr (operand);
!       if (!in_expr.has_value ())
! 	continue;
  
!       tree in_tree = CompileExpr::Compile (*in_expr, this->ctx);
!       // expects a tree list
!       // TODO: This assumes that the input is a register
!       std::string expr_name = "r";
!       auto name = build_string (expr_name.size () + 1, expr_name.c_str ());
!       head = chainon (head, build_tree_list (build_tree_list (NULL_TREE, name),
! 					     in_tree));
  
!       /*head = chainon (head, out_tree);*/
      }
    return head;
  }
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-compile-base.cc gcc-16-20250810/gcc/rust/backend/rust-compile-base.cc
*** gcc-16-20250803/gcc/rust/backend/rust-compile-base.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-compile-base.cc	Sun Aug 10 22:32:08 2025
*************** HIRCompileBase::compile_constant_expr (
*** 576,581 ****
--- 576,600 ----
  }
  
  tree
+ HIRCompileBase::query_compile_const_expr (Context *ctx, TyTy::BaseType *expr_ty,
+ 					  HIR::Expr &const_value_expr)
+ {
+   HIRCompileBase c (ctx);
+ 
+   ctx->push_const_context ();
+ 
+   HirId expr_id = const_value_expr.get_mappings ().get_hirid ();
+   location_t locus = const_value_expr.get_locus ();
+   tree capacity_expr = HIRCompileBase::compile_constant_expr (
+     ctx, expr_id, expr_ty, expr_ty, Resolver::CanonicalPath::create_empty (),
+     const_value_expr, locus, locus);
+ 
+   ctx->pop_const_context ();
+ 
+   return fold_expr (capacity_expr);
+ }
+ 
+ tree
  HIRCompileBase::indirect_expression (tree expr, location_t locus)
  {
    if (expr == error_mark_node)
*************** HIRCompileBase::compile_function (
*** 677,684 ****
    std::string ir_symbol_name
      = canonical_path.get () + fntype->subst_as_string ();
  
    // we don't mangle the main fn since we haven't implemented the main shim
!   bool is_main_fn = fn_name.compare ("main") == 0 && is_root_item;
    if (is_main_fn)
      {
        rust_assert (!main_identifier_node);
--- 696,707 ----
    std::string ir_symbol_name
      = canonical_path.get () + fntype->subst_as_string ();
  
+   rust_debug_loc (locus, "--> Compiling [%s] - %s", ir_symbol_name.c_str (),
+ 		  fntype->get_name ().c_str ());
+ 
    // we don't mangle the main fn since we haven't implemented the main shim
!   bool is_main_fn = fn_name.compare ("main") == 0 && is_root_item
! 		    && canonical_path.size () <= 2;
    if (is_main_fn)
      {
        rust_assert (!main_identifier_node);
*************** HIRCompileBase::compile_function (
*** 687,700 ****
      }
    std::string asm_name = fn_name;
  
-   auto &mappings = Analysis::Mappings::get ();
- 
-   if (flag_name_resolution_2_0)
-     ir_symbol_name = mappings.get_current_crate_name () + "::" + ir_symbol_name;
- 
    unsigned int flags = 0;
    tree fndecl = Backend::function (compiled_fn_type, ir_symbol_name,
! 				   "" /* asm_name */, flags, locus);
  
    setup_fndecl (fndecl, is_main_fn, fntype->has_substitutions_defined (),
  		visibility, qualifiers, outer_attrs);
--- 710,718 ----
      }
    std::string asm_name = fn_name;
  
    unsigned int flags = 0;
    tree fndecl = Backend::function (compiled_fn_type, ir_symbol_name,
! 				   tl::nullopt /* asm_name */, flags, locus);
  
    setup_fndecl (fndecl, is_main_fn, fntype->has_substitutions_defined (),
  		visibility, qualifiers, outer_attrs);
*************** HIRCompileBase::compile_constant_item (
*** 812,822 ****
    // machineary that we already have. This means the best approach is to
    // make a _fake_ function with a block so it can hold onto temps then
    // use our constexpr code to fold it completely or error_mark_node
!   Backend::typed_identifier receiver;
    tree compiled_fn_type = Backend::function_type (
      receiver, {}, {Backend::typed_identifier ("_", const_type, locus)}, NULL,
      locus);
!   tree fndecl = Backend::function (compiled_fn_type, ident, "", 0, locus);
    TREE_READONLY (fndecl) = 1;
  
    tree enclosing_scope = NULL_TREE;
--- 830,841 ----
    // machineary that we already have. This means the best approach is to
    // make a _fake_ function with a block so it can hold onto temps then
    // use our constexpr code to fold it completely or error_mark_node
!   Backend::typed_identifier receiver ("", NULL_TREE, UNKNOWN_LOCATION);
    tree compiled_fn_type = Backend::function_type (
      receiver, {}, {Backend::typed_identifier ("_", const_type, locus)}, NULL,
      locus);
!   tree fndecl
!     = Backend::function (compiled_fn_type, ident, tl::nullopt, 0, locus);
    TREE_READONLY (fndecl) = 1;
  
    tree enclosing_scope = NULL_TREE;
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-compile-base.h gcc-16-20250810/gcc/rust/backend/rust-compile-base.h
*** gcc-16-20250803/gcc/rust/backend/rust-compile-base.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-compile-base.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 38,43 ****
--- 38,46 ----
      const Resolver::CanonicalPath &canonical_path, HIR::Expr &const_value_expr,
      location_t locus, location_t expr_locus);
  
+   static tree query_compile_const_expr (Context *ctx, TyTy::BaseType *expr_ty,
+ 					HIR::Expr &const_value_expr);
+ 
  protected:
    HIRCompileBase (Context *ctx) : ctx (ctx) {}
  
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-compile-block.cc gcc-16-20250810/gcc/rust/backend/rust-compile-block.cc
*** gcc-16-20250803/gcc/rust/backend/rust-compile-block.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-compile-block.cc	Sun Aug 10 22:32:08 2025
***************
*** 19,24 ****
--- 19,25 ----
  #include "rust-compile-block.h"
  #include "rust-compile-stmt.h"
  #include "rust-compile-expr.h"
+ #include "rust-hir-expr.h"
  
  namespace Rust {
  namespace Compile {
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-compile-block.h gcc-16-20250810/gcc/rust/backend/rust-compile-block.h
*** gcc-16-20250803/gcc/rust/backend/rust-compile-block.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-compile-block.h	Sun Aug 10 22:32:08 2025
***************
*** 20,25 ****
--- 20,26 ----
  #define RUST_COMPILE_BLOCK
  
  #include "rust-compile-base.h"
+ #include "rust-hir-expr.h"
  #include "rust-hir-visitor.h"
  
  namespace Rust {
*************** public:
*** 83,88 ****
--- 84,91 ----
    void visit (HIR::MethodCallExpr &) override {}
    void visit (HIR::FieldAccessExpr &) override {}
    void visit (HIR::BlockExpr &) override {}
+   void visit (HIR::AnonConst &) override {}
+   void visit (HIR::ConstBlock &) override {}
    void visit (HIR::ContinueExpr &) override {}
    void visit (HIR::BreakExpr &) override {}
    void visit (HIR::RangeFromToExpr &) override {}
*************** public:
*** 101,106 ****
--- 104,110 ----
    void visit (HIR::AsyncBlockExpr &) override {}
    void visit (HIR::InlineAsm &) override {}
    void visit (HIR::LlvmInlineAsm &) override {}
+   void visit (HIR::OffsetOf &) override {}
  
  private:
    CompileConditionalBlocks (Context *ctx, Bvariable *result)
*************** public:
*** 138,143 ****
--- 142,153 ----
      translated = CompileBlock::compile (expr, ctx, result);
    }
  
+   void visit (HIR::ConstBlock &expr) override
+   {
+     rust_unreachable ();
+     // translated = CompileExpr::compile (expr, ctx, result);
+   }
+ 
    // Empty visit for unused Expression HIR nodes.
    void visit (HIR::PathInExpression &) override {}
    void visit (HIR::QualifiedPathInExpression &) override {}
*************** public:
*** 184,189 ****
--- 194,201 ----
    void visit (HIR::AsyncBlockExpr &) override {}
    void visit (HIR::InlineAsm &) override {}
    void visit (HIR::LlvmInlineAsm &) override {}
+   void visit (HIR::OffsetOf &) override {}
+   void visit (HIR::AnonConst &) override {}
  
  private:
    CompileExprWithBlock (Context *ctx, Bvariable *result)
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-compile-context.cc gcc-16-20250810/gcc/rust/backend/rust-compile-context.cc
*** gcc-16-20250803/gcc/rust/backend/rust-compile-context.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-compile-context.cc	Sun Aug 10 22:32:08 2025
***************
*** 22,30 ****
  namespace Rust {
  namespace Compile {
  
  Context::Context ()
!   : resolver (Resolver::Resolver::get ()),
!     tyctx (Resolver::TypeCheckContext::get ()),
      mappings (Analysis::Mappings::get ()), mangler (Mangler ())
  {
    setup_builtins ();
--- 22,39 ----
  namespace Rust {
  namespace Compile {
  
+ Context *
+ Context::get ()
+ {
+   static Context *instance;
+   if (instance == nullptr)
+     instance = new Context ();
+ 
+   return instance;
+ }
+ 
  Context::Context ()
!   : tyctx (Resolver::TypeCheckContext::get ()),
      mappings (Analysis::Mappings::get ()), mangler (Mangler ())
  {
    setup_builtins ();
*************** Context::type_hasher (tree type)
*** 70,76 ****
        hstate.add_object (TYPE_HASH (TYPE_OFFSET_BASETYPE (type)));
        break;
  
!       case ARRAY_TYPE: {
  	if (TYPE_DOMAIN (type))
  	  hstate.add_object (TYPE_HASH (TYPE_DOMAIN (type)));
  	if (!AGGREGATE_TYPE_P (TREE_TYPE (type)))
--- 79,86 ----
        hstate.add_object (TYPE_HASH (TYPE_OFFSET_BASETYPE (type)));
        break;
  
!     case ARRAY_TYPE:
!       {
  	if (TYPE_DOMAIN (type))
  	  hstate.add_object (TYPE_HASH (TYPE_DOMAIN (type)));
  	if (!AGGREGATE_TYPE_P (TREE_TYPE (type)))
*************** Context::type_hasher (tree type)
*** 81,87 ****
        }
        break;
  
!       case INTEGER_TYPE: {
  	tree t = TYPE_MAX_VALUE (type);
  	if (!t)
  	  t = TYPE_MIN_VALUE (type);
--- 91,98 ----
        }
        break;
  
!     case INTEGER_TYPE:
!       {
  	tree t = TYPE_MAX_VALUE (type);
  	if (!t)
  	  t = TYPE_MIN_VALUE (type);
*************** Context::type_hasher (tree type)
*** 91,97 ****
        }
  
      case REAL_TYPE:
!       case FIXED_POINT_TYPE: {
  	unsigned prec = TYPE_PRECISION (type);
  	hstate.add_object (prec);
  	break;
--- 102,109 ----
        }
  
      case REAL_TYPE:
!     case FIXED_POINT_TYPE:
!       {
  	unsigned prec = TYPE_PRECISION (type);
  	hstate.add_object (prec);
  	break;
*************** Context::type_hasher (tree type)
*** 103,109 ****
  
      case RECORD_TYPE:
      case UNION_TYPE:
!       case QUAL_UNION_TYPE: {
  	for (tree t = TYPE_FIELDS (type); t; t = TREE_CHAIN (t))
  	  {
  	    hashval_t name_hash = IDENTIFIER_HASH_VALUE (DECL_NAME (t));
--- 115,122 ----
  
      case RECORD_TYPE:
      case UNION_TYPE:
!     case QUAL_UNION_TYPE:
!       {
  	for (tree t = TYPE_FIELDS (type); t; t = TREE_CHAIN (t))
  	  {
  	    hashval_t name_hash = IDENTIFIER_HASH_VALUE (DECL_NAME (t));
*************** Context::type_hasher (tree type)
*** 118,124 ****
        break;
  
      case REFERENCE_TYPE:
!       case POINTER_TYPE: {
  	hashval_t type_hash = type_hasher (TREE_TYPE (type));
  	hstate.add_object (type_hash);
        }
--- 131,138 ----
        break;
  
      case REFERENCE_TYPE:
!     case POINTER_TYPE:
!       {
  	hashval_t type_hash = type_hasher (TREE_TYPE (type));
  	hstate.add_object (type_hash);
        }
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-compile-context.h gcc-16-20250810/gcc/rust/backend/rust-compile-context.h
*** gcc-16-20250803/gcc/rust/backend/rust-compile-context.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-compile-context.h	Sun Aug 10 22:32:08 2025
*************** struct CustomDeriveInfo
*** 49,55 ****
  class Context
  {
  public:
!   Context ();
  
    void setup_builtins ();
  
--- 49,55 ----
  class Context
  {
  public:
!   static Context *get ();
  
    void setup_builtins ();
  
*************** public:
*** 90,96 ****
      return type;
    }
  
-   Resolver::Resolver *get_resolver () { return resolver; }
    Resolver::TypeCheckContext *get_tyctx () { return tyctx; }
    Analysis::Mappings &get_mappings () { return mappings; }
  
--- 90,95 ----
*************** public:
*** 391,397 ****
    }
  
  private:
!   Resolver::Resolver *resolver;
    Resolver::TypeCheckContext *tyctx;
    Analysis::Mappings &mappings;
    Mangler mangler;
--- 390,397 ----
    }
  
  private:
!   Context ();
! 
    Resolver::TypeCheckContext *tyctx;
    Analysis::Mappings &mappings;
    Mangler mangler;
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-compile-expr.cc gcc-16-20250810/gcc/rust/backend/rust-compile-expr.cc
*** gcc-16-20250803/gcc/rust/backend/rust-compile-expr.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-compile-expr.cc	Sun Aug 10 22:32:08 2025
***************
*** 17,22 ****
--- 17,24 ----
  // <http://www.gnu.org/licenses/>.
  
  #include "rust-compile-expr.h"
+ #include "rust-backend.h"
+ #include "rust-compile-type.h"
  #include "rust-compile-struct-field-expr.h"
  #include "rust-compile-pattern.h"
  #include "rust-compile-resolve-path.h"
***************
*** 30,37 ****
--- 32,42 ----
  #include "realmpfr.h"
  #include "convert.h"
  #include "print-tree.h"
+ #include "rust-hir-expr.h"
  #include "rust-system.h"
+ #include "rust-tree.h"
  #include "rust-tyty.h"
+ #include "tree-core.h"
  
  namespace Rust {
  namespace Compile {
*************** CompileExpr::visit (HIR::LlvmInlineAsm &
*** 375,380 ****
--- 380,410 ----
  }
  
  void
+ CompileExpr::visit (HIR::OffsetOf &expr)
+ {
+   TyTy::BaseType *type = nullptr;
+   if (!ctx->get_tyctx ()->lookup_type (
+ 	expr.get_type ().get_mappings ().get_hirid (), &type))
+     {
+       translated = error_mark_node;
+       return;
+     }
+ 
+   auto compiled_ty = TyTyResolveCompile::compile (ctx, type);
+ 
+   rust_assert (TREE_CODE (compiled_ty) == RECORD_TYPE);
+ 
+   // Create an identifier node for the field
+   auto field_id = Backend::get_identifier_node (expr.get_field ().as_string ());
+ 
+   // And now look it up and get its value for `byte_position`
+   auto field = Backend::lookup_field (compiled_ty, field_id);
+   auto field_value = TREE_VALUE (field);
+ 
+   translated = byte_position (field_value);
+ }
+ 
+ void
  CompileExpr::visit (HIR::IfExprConseqElse &expr)
  {
    TyTy::BaseType *if_type = nullptr;
*************** CompileExpr::visit (HIR::BlockExpr &expr
*** 441,446 ****
--- 471,488 ----
  }
  
  void
+ CompileExpr::visit (HIR::AnonConst &expr)
+ {
+   expr.get_inner_expr ().accept_vis (*this);
+ }
+ 
+ void
+ CompileExpr::visit (HIR::ConstBlock &expr)
+ {
+   expr.get_const_expr ().accept_vis (*this);
+ }
+ 
+ void
  CompileExpr::visit (HIR::UnsafeBlockExpr &expr)
  {
    expr.get_block_expr ().accept_vis (*this);
*************** CompileExpr::visit (HIR::StructExprStruc
*** 471,476 ****
--- 513,520 ----
        rust_error_at (struct_expr.get_locus (), "unknown type");
        return;
      }
+   if (!tyty->is<TyTy::ADTType> ())
+     return;
  
    // it must be an ADT
    rust_assert (tyty->get_kind () == TyTy::TypeKind::ADT);
*************** void
*** 669,674 ****
--- 713,727 ----
  CompileExpr::visit (HIR::LoopExpr &expr)
  {
    TyTy::BaseType *block_tyty = nullptr;
+   fncontext fnctx = ctx->peek_fn ();
+   if (ctx->const_context_p () && !DECL_DECLARED_CONSTEXPR_P (fnctx.fndecl))
+     {
+       rich_location r (line_table, expr.get_locus ());
+       rust_error_at (r, ErrorCode::E0658,
+ 		     "%<loop%> is not allowed in const context");
+       return;
+     }
+ 
    if (!ctx->get_tyctx ()->lookup_type (expr.get_mappings ().get_hirid (),
  				       &block_tyty))
      {
*************** CompileExpr::visit (HIR::LoopExpr &expr)
*** 676,682 ****
        return;
      }
  
-   fncontext fnctx = ctx->peek_fn ();
    tree enclosing_scope = ctx->peek_enclosing_scope ();
    tree block_type = TyTyResolveCompile::compile (ctx, block_tyty);
  
--- 729,734 ----
*************** CompileExpr::visit (HIR::LoopExpr &expr)
*** 701,707 ****
  	loop_label.get_lifetime ().get_mappings ().get_hirid (), label);
      }
  
!   tree loop_begin_label = Backend::label (fnctx.fndecl, "", expr.get_locus ());
    tree loop_begin_label_decl
      = Backend::label_definition_statement (loop_begin_label);
    ctx->add_statement (loop_begin_label_decl);
--- 753,760 ----
  	loop_label.get_lifetime ().get_mappings ().get_hirid (), label);
      }
  
!   tree loop_begin_label
!     = Backend::label (fnctx.fndecl, tl::nullopt, expr.get_locus ());
    tree loop_begin_label_decl
      = Backend::label_definition_statement (loop_begin_label);
    ctx->add_statement (loop_begin_label_decl);
*************** CompileExpr::visit (HIR::WhileLoopExpr &
*** 743,749 ****
  				    start_location, end_location);
    ctx->push_block (loop_block);
  
!   tree loop_begin_label = Backend::label (fnctx.fndecl, "", expr.get_locus ());
    tree loop_begin_label_decl
      = Backend::label_definition_statement (loop_begin_label);
    ctx->add_statement (loop_begin_label_decl);
--- 796,803 ----
  				    start_location, end_location);
    ctx->push_block (loop_block);
  
!   tree loop_begin_label
!     = Backend::label (fnctx.fndecl, tl::nullopt, expr.get_locus ());
    tree loop_begin_label_decl
      = Backend::label_definition_statement (loop_begin_label);
    ctx->add_statement (loop_begin_label_decl);
*************** CompileExpr::visit (HIR::BreakExpr &expr
*** 787,811 ****
  
    if (expr.has_label ())
      {
!       NodeId resolved_node_id = UNKNOWN_NODEID;
!       if (flag_name_resolution_2_0)
! 	{
! 	  auto &nr_ctx
! 	    = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
! 	  if (auto id
! 	      = nr_ctx.lookup (expr.get_label ().get_mappings ().get_nodeid ()))
! 	    resolved_node_id = *id;
! 	}
!       else
  	{
! 	  NodeId tmp = UNKNOWN_NODEID;
! 	  if (ctx->get_resolver ()->lookup_resolved_label (
! 		expr.get_label ().get_mappings ().get_nodeid (), &tmp))
! 	    resolved_node_id = tmp;
  	}
! 
!       if (resolved_node_id == UNKNOWN_NODEID)
  	{
  	  rust_error_at (
  	    expr.get_label ().get_locus (),
--- 841,856 ----
  
    if (expr.has_label ())
      {
!       auto &nr_ctx
! 	= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!       NodeId resolved_node_id;
!       if (auto id
! 	  = nr_ctx.lookup (expr.get_label ().get_mappings ().get_nodeid ()))
  	{
! 	  resolved_node_id = *id;
  	}
!       else
  	{
  	  rust_error_at (
  	    expr.get_label ().get_locus (),
*************** CompileExpr::visit (HIR::ContinueExpr &e
*** 849,874 ****
    tree label = ctx->peek_loop_begin_label ();
    if (expr.has_label ())
      {
!       NodeId resolved_node_id = UNKNOWN_NODEID;
!       if (flag_name_resolution_2_0)
! 	{
! 	  auto &nr_ctx
! 	    = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
! 	  if (auto id
! 	      = nr_ctx.lookup (expr.get_label ().get_mappings ().get_nodeid ()))
! 	    resolved_node_id = *id;
! 	}
!       else
  	{
! 	  NodeId tmp = UNKNOWN_NODEID;
! 
! 	  if (ctx->get_resolver ()->lookup_resolved_label (
! 		expr.get_label ().get_mappings ().get_nodeid (), &tmp))
! 	    resolved_node_id = tmp;
  	}
! 
!       if (resolved_node_id == UNKNOWN_NODEID)
  	{
  	  rust_error_at (
  	    expr.get_label ().get_locus (),
--- 894,909 ----
    tree label = ctx->peek_loop_begin_label ();
    if (expr.has_label ())
      {
!       auto &nr_ctx
! 	= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!       NodeId resolved_node_id;
!       if (auto id
! 	  = nr_ctx.lookup (expr.get_label ().get_mappings ().get_nodeid ()))
  	{
! 	  resolved_node_id = *id;
  	}
!       else
  	{
  	  rust_error_at (
  	    expr.get_label ().get_locus (),
*************** CompileExpr::visit (HIR::MatchExpr &expr
*** 1130,1138 ****
    // setup the end label so the cases can exit properly
    tree fndecl = fnctx.fndecl;
    location_t end_label_locus = expr.get_locus (); // FIXME
!   tree end_label
!     = Backend::label (fndecl, "" /* empty creates an artificial label */,
! 		      end_label_locus);
    tree end_label_decl_statement
      = Backend::label_definition_statement (end_label);
  
--- 1165,1172 ----
    // setup the end label so the cases can exit properly
    tree fndecl = fnctx.fndecl;
    location_t end_label_locus = expr.get_locus (); // FIXME
!   // tl::nullopt creates an artificial label
!   tree end_label = Backend::label (fndecl, tl::nullopt, end_label_locus);
    tree end_label_decl_statement
      = Backend::label_definition_statement (end_label);
  
*************** CompileExpr::visit (HIR::CallExpr &expr)
*** 1325,1330 ****
--- 1359,1386 ----
    };
  
    auto fn_address = CompileExpr::Compile (expr.get_fnexpr (), ctx);
+   if (ctx->const_context_p ())
+     {
+       if (!FUNCTION_POINTER_TYPE_P (TREE_TYPE (fn_address)))
+ 	{
+ 	  rust_error_at (expr.get_locus (),
+ 			 "calls in constants are limited to constant "
+ 			 "functions, tuple structs and tuple variants");
+ 	  return;
+ 	}
+ 
+       if (TREE_CODE (fn_address) == ADDR_EXPR)
+ 	{
+ 	  tree fndecl = TREE_OPERAND (fn_address, 0);
+ 	  if (!DECL_DECLARED_CONSTEXPR_P (fndecl))
+ 	    {
+ 	      rust_error_at (expr.get_locus (),
+ 			     "calls in constants are limited to constant "
+ 			     "functions, tuple structs and tuple variants");
+ 	      return;
+ 	    }
+ 	}
+     }
  
    // is this a closure call?
    bool possible_trait_call
*************** CompileExpr::visit (HIR::ArrayExpr &expr
*** 1883,1889 ****
    HIR::ArrayElems &elements = expr.get_internal_elements ();
    switch (elements.get_array_expr_type ())
      {
!       case HIR::ArrayElems::ArrayExprType::VALUES: {
  	HIR::ArrayElemsValues &elems
  	  = static_cast<HIR::ArrayElemsValues &> (elements);
  	translated
--- 1939,1946 ----
    HIR::ArrayElems &elements = expr.get_internal_elements ();
    switch (elements.get_array_expr_type ())
      {
!     case HIR::ArrayElems::ArrayExprType::VALUES:
!       {
  	HIR::ArrayElemsValues &elems
  	  = static_cast<HIR::ArrayElemsValues &> (elements);
  	translated
*************** HIRCompileBase::resolve_adjustements (
*** 2032,2038 ****
  	  return error_mark_node;
  
  	case Resolver::Adjustment::AdjustmentType::IMM_REF:
! 	  case Resolver::Adjustment::AdjustmentType::MUT_REF: {
  	    if (!RS_DST_FLAG (TREE_TYPE (e)))
  	      {
  		e = address_expression (e, locus);
--- 2089,2096 ----
  	  return error_mark_node;
  
  	case Resolver::Adjustment::AdjustmentType::IMM_REF:
! 	case Resolver::Adjustment::AdjustmentType::MUT_REF:
! 	  {
  	    if (!RS_DST_FLAG (TREE_TYPE (e)))
  	      {
  		e = address_expression (e, locus);
*************** CompileExpr::generate_closure_function (
*** 2474,2496 ****
    if (is_block_expr)
      {
        auto body_mappings = function_body.get_mappings ();
!       if (flag_name_resolution_2_0)
! 	{
! 	  auto &nr_ctx
! 	    = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
! 	  auto candidate = nr_ctx.values.to_rib (body_mappings.get_nodeid ());
  
! 	  rust_assert (candidate.has_value ());
! 	}
!       else
! 	{
! 	  Resolver::Rib *rib = nullptr;
! 	  bool ok
! 	    = ctx->get_resolver ()->find_name_rib (body_mappings.get_nodeid (),
! 						   &rib);
! 	  rust_assert (ok);
! 	}
      }
  
    tree enclosing_scope = NULL_TREE;
--- 2532,2543 ----
    if (is_block_expr)
      {
        auto body_mappings = function_body.get_mappings ();
!       auto &nr_ctx
! 	= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!       auto candidate = nr_ctx.values.to_rib (body_mappings.get_nodeid ());
  
!       rust_assert (candidate.has_value ());
      }
  
    tree enclosing_scope = NULL_TREE;
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-compile-expr.h gcc-16-20250810/gcc/rust/backend/rust-compile-expr.h
*** gcc-16-20250803/gcc/rust/backend/rust-compile-expr.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-compile-expr.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 48,53 ****
--- 48,55 ----
    void visit (HIR::IfExpr &expr) override;
    void visit (HIR::IfExprConseqElse &expr) override;
    void visit (HIR::BlockExpr &expr) override;
+   void visit (HIR::AnonConst &expr) override;
+   void visit (HIR::ConstBlock &expr) override;
    void visit (HIR::UnsafeBlockExpr &expr) override;
    void visit (HIR::StructExprStruct &struct_expr) override;
    void visit (HIR::StructExprStructFields &struct_expr) override;
*************** public:
*** 70,75 ****
--- 72,78 ----
    void visit (HIR::ClosureExpr &expr) override;
    void visit (HIR::InlineAsm &expr) override;
    void visit (HIR::LlvmInlineAsm &expr) override;
+   void visit (HIR::OffsetOf &expr) override;
  
    // TODO
    void visit (HIR::ErrorPropagationExpr &) override {}
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-compile-implitem.cc gcc-16-20250810/gcc/rust/backend/rust-compile-implitem.cc
*** gcc-16-20250803/gcc/rust/backend/rust-compile-implitem.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-compile-implitem.cc	Sun Aug 10 22:32:08 2025
*************** CompileTraitItem::visit (HIR::TraitItemC
*** 27,48 ****
    rust_assert (concrete != nullptr);
    TyTy::BaseType *resolved_type = concrete;
  
!   tl::optional<Resolver::CanonicalPath> canonical_path;
!   if (flag_name_resolution_2_0)
!     {
!       auto &nr_ctx
! 	= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
! 
!       canonical_path = nr_ctx.values.to_canonical_path (
! 	constant.get_mappings ().get_nodeid ());
!     }
!   else
!     {
!       canonical_path = ctx->get_mappings ().lookup_canonical_path (
! 	constant.get_mappings ().get_nodeid ());
!     }
  
!   rust_assert (canonical_path);
  
    HIR::Expr &const_value_expr = constant.get_expr ();
    TyTy::BaseType *expr_type = nullptr;
--- 27,37 ----
    rust_assert (concrete != nullptr);
    TyTy::BaseType *resolved_type = concrete;
  
!   auto &nr_ctx
!     = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!   Resolver::CanonicalPath canonical_path
!     = nr_ctx.to_canonical_path (constant.get_mappings ().get_nodeid ());
  
    HIR::Expr &const_value_expr = constant.get_expr ();
    TyTy::BaseType *expr_type = nullptr;
*************** CompileTraitItem::visit (HIR::TraitItemC
*** 52,58 ****
  
    tree const_expr
      = compile_constant_item (constant.get_mappings ().get_hirid (), expr_type,
! 			     resolved_type, *canonical_path, const_value_expr,
  			     constant.get_locus (),
  			     const_value_expr.get_locus ());
    ctx->push_const (const_expr);
--- 41,47 ----
  
    tree const_expr
      = compile_constant_item (constant.get_mappings ().get_hirid (), expr_type,
! 			     resolved_type, canonical_path, const_value_expr,
  			     constant.get_locus (),
  			     const_value_expr.get_locus ());
    ctx->push_const (const_expr);
*************** CompileTraitItem::visit (HIR::TraitItemF
*** 96,117 ****
        fntype->override_context ();
      }
  
!   tl::optional<Resolver::CanonicalPath> canonical_path;
!   if (flag_name_resolution_2_0)
!     {
!       auto &nr_ctx
! 	= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
! 
!       canonical_path
! 	= nr_ctx.values.to_canonical_path (func.get_mappings ().get_nodeid ());
!     }
!   else
!     {
!       canonical_path = ctx->get_mappings ().lookup_canonical_path (
! 	func.get_mappings ().get_nodeid ());
!     }
  
!   rust_assert (canonical_path);
  
    // FIXME: How do we get the proper visibility here?
    auto vis = HIR::Visibility (HIR::Visibility::VisType::PUBLIC);
--- 85,95 ----
        fntype->override_context ();
      }
  
!   auto &nr_ctx
!     = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!   Resolver::CanonicalPath canonical_path
!     = nr_ctx.to_canonical_path (func.get_mappings ().get_nodeid ());
  
    // FIXME: How do we get the proper visibility here?
    auto vis = HIR::Visibility (HIR::Visibility::VisType::PUBLIC);
*************** CompileTraitItem::visit (HIR::TraitItemF
*** 121,127 ****
  			function.get_self (), function.get_function_params (),
  			function.get_qualifiers (), vis,
  			func.get_outer_attrs (), func.get_locus (),
! 			&func.get_block_expr (), *canonical_path, fntype);
    reference = address_expression (fndecl, ref_locus);
  }
  
--- 99,105 ----
  			function.get_self (), function.get_function_params (),
  			function.get_qualifiers (), vis,
  			func.get_outer_attrs (), func.get_locus (),
! 			&func.get_block_expr (), canonical_path, fntype);
    reference = address_expression (fndecl, ref_locus);
  }
  
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-compile-intrinsic.cc gcc-16-20250810/gcc/rust/backend/rust-compile-intrinsic.cc
*** gcc-16-20250803/gcc/rust/backend/rust-compile-intrinsic.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-compile-intrinsic.cc	Sun Aug 10 22:32:08 2025
***************
*** 32,39 ****
  
  // declaration taken from "stringpool.h"
  // the get_identifier macro causes compilation issues
! extern tree
! get_identifier (const char *);
  
  namespace Rust {
  namespace Compile {
--- 32,38 ----
  
  // declaration taken from "stringpool.h"
  // the get_identifier macro causes compilation issues
! extern tree get_identifier (const char *);
  
  namespace Rust {
  namespace Compile {
*************** check_for_basic_integer_type (const std:
*** 70,97 ****
    return is_basic_integer;
  }
  
! static tree
! offset_handler (Context *ctx, TyTy::FnType *fntype);
! static tree
! sizeof_handler (Context *ctx, TyTy::FnType *fntype);
! static tree
! transmute_handler (Context *ctx, TyTy::FnType *fntype);
! static tree
! rotate_handler (Context *ctx, TyTy::FnType *fntype, tree_code op);
! static tree
! wrapping_op_handler_inner (Context *ctx, TyTy::FnType *fntype, tree_code op);
! static tree
! op_with_overflow_inner (Context *ctx, TyTy::FnType *fntype, tree_code op);
! static tree
! uninit_handler (Context *ctx, TyTy::FnType *fntype);
! static tree
! move_val_init_handler (Context *ctx, TyTy::FnType *fntype);
! static tree
! assume_handler (Context *ctx, TyTy::FnType *fntype);
! static tree
! discriminant_value_handler (Context *ctx, TyTy::FnType *fntype);
! static tree
! variant_count_handler (Context *ctx, TyTy::FnType *fntype);
  
  enum class Prefetch
  {
--- 69,87 ----
    return is_basic_integer;
  }
  
! static tree offset_handler (Context *ctx, TyTy::FnType *fntype);
! static tree sizeof_handler (Context *ctx, TyTy::FnType *fntype);
! static tree transmute_handler (Context *ctx, TyTy::FnType *fntype);
! static tree rotate_handler (Context *ctx, TyTy::FnType *fntype, tree_code op);
! static tree wrapping_op_handler_inner (Context *ctx, TyTy::FnType *fntype,
! 				       tree_code op);
! static tree op_with_overflow_inner (Context *ctx, TyTy::FnType *fntype,
! 				    tree_code op);
! static tree uninit_handler (Context *ctx, TyTy::FnType *fntype);
! static tree move_val_init_handler (Context *ctx, TyTy::FnType *fntype);
! static tree assume_handler (Context *ctx, TyTy::FnType *fntype);
! static tree discriminant_value_handler (Context *ctx, TyTy::FnType *fntype);
! static tree variant_count_handler (Context *ctx, TyTy::FnType *fntype);
  
  enum class Prefetch
  {
*************** enum class Prefetch
*** 99,106 ****
    Write
  };
  
! static tree
! prefetch_data_handler (Context *ctx, TyTy::FnType *fntype, Prefetch kind);
  
  static inline tree
  rotate_left_handler (Context *ctx, TyTy::FnType *fntype)
--- 89,96 ----
    Write
  };
  
! static tree prefetch_data_handler (Context *ctx, TyTy::FnType *fntype,
! 				   Prefetch kind);
  
  static inline tree
  rotate_left_handler (Context *ctx, TyTy::FnType *fntype)
*************** prefetch_write_data (Context *ctx, TyTy:
*** 140,149 ****
    return prefetch_data_handler (ctx, fntype, Prefetch::Write);
  }
  
! static tree
! atomic_store_handler_inner (Context *ctx, TyTy::FnType *fntype, int ordering);
! static tree
! atomic_load_handler_inner (Context *ctx, TyTy::FnType *fntype, int ordering);
  
  static inline std::function<tree (Context *, TyTy::FnType *)>
  atomic_store_handler (int ordering)
--- 130,139 ----
    return prefetch_data_handler (ctx, fntype, Prefetch::Write);
  }
  
! static tree atomic_store_handler_inner (Context *ctx, TyTy::FnType *fntype,
! 					int ordering);
! static tree atomic_load_handler_inner (Context *ctx, TyTy::FnType *fntype,
! 				       int ordering);
  
  static inline std::function<tree (Context *, TyTy::FnType *)>
  atomic_store_handler (int ordering)
*************** atomic_load_handler (int ordering)
*** 161,168 ****
    };
  }
  
! static inline tree
! unchecked_op_inner (Context *ctx, TyTy::FnType *fntype, tree_code op);
  
  const static std::function<tree (Context *, TyTy::FnType *)>
  unchecked_op_handler (tree_code op)
--- 151,158 ----
    };
  }
  
! static inline tree unchecked_op_inner (Context *ctx, TyTy::FnType *fntype,
! 				       tree_code op);
  
  const static std::function<tree (Context *, TyTy::FnType *)>
  unchecked_op_handler (tree_code op)
*************** unchecked_op_handler (tree_code op)
*** 172,179 ****
    };
  }
  
! static inline tree
! copy_handler_inner (Context *ctx, TyTy::FnType *fntype, bool overlaps);
  
  const static std::function<tree (Context *, TyTy::FnType *)>
  copy_handler (bool overlaps)
--- 162,169 ----
    };
  }
  
! static inline tree copy_handler_inner (Context *ctx, TyTy::FnType *fntype,
! 				       bool overlaps);
  
  const static std::function<tree (Context *, TyTy::FnType *)>
  copy_handler (bool overlaps)
*************** copy_handler (bool overlaps)
*** 183,190 ****
    };
  }
  
! static inline tree
! expect_handler_inner (Context *ctx, TyTy::FnType *fntype, bool likely);
  
  const static std::function<tree (Context *, TyTy::FnType *)>
  expect_handler (bool likely)
--- 173,180 ----
    };
  }
  
! static inline tree expect_handler_inner (Context *ctx, TyTy::FnType *fntype,
! 					 bool likely);
  
  const static std::function<tree (Context *, TyTy::FnType *)>
  expect_handler (bool likely)
*************** expect_handler (bool likely)
*** 194,201 ****
    };
  }
  
! static tree
! try_handler_inner (Context *ctx, TyTy::FnType *fntype, bool is_new_api);
  
  const static std::function<tree (Context *, TyTy::FnType *)>
  try_handler (bool is_new_api)
--- 184,191 ----
    };
  }
  
! static tree try_handler_inner (Context *ctx, TyTy::FnType *fntype,
! 			       bool is_new_api);
  
  const static std::function<tree (Context *, TyTy::FnType *)>
  try_handler (bool is_new_api)
*************** sizeof_handler (Context *ctx, TyTy::FnTy
*** 447,454 ****
    // get the template parameter type tree fn size_of<T>();
    rust_assert (fntype->get_num_substitutions () == 1);
    auto &param_mapping = fntype->get_substs ().at (0);
!   const TyTy::ParamType *param_tyty = param_mapping.get_param_ty ();
!   TyTy::BaseType *resolved_tyty = param_tyty->resolve ();
    tree template_parameter_type
      = TyTyResolveCompile::compile (ctx, resolved_tyty);
  
--- 437,444 ----
    // get the template parameter type tree fn size_of<T>();
    rust_assert (fntype->get_num_substitutions () == 1);
    auto &param_mapping = fntype->get_substs ().at (0);
!   const auto param_tyty = param_mapping.get_param_ty ();
!   auto resolved_tyty = param_tyty->resolve ();
    tree template_parameter_type
      = TyTyResolveCompile::compile (ctx, resolved_tyty);
  
*************** op_with_overflow_inner (Context *ctx, Ty
*** 653,660 ****
  
    rust_assert (fntype->get_num_substitutions () == 1);
    auto &param_mapping = fntype->get_substs ().at (0);
!   const TyTy::ParamType *param_tyty = param_mapping.get_param_ty ();
!   TyTy::BaseType *resolved_tyty = param_tyty->resolve ();
    tree template_parameter_type
      = TyTyResolveCompile::compile (ctx, resolved_tyty);
  
--- 643,650 ----
  
    rust_assert (fntype->get_num_substitutions () == 1);
    auto &param_mapping = fntype->get_substs ().at (0);
!   const auto param_tyty = param_mapping.get_param_ty ();
!   auto resolved_tyty = param_tyty->resolve ();
    tree template_parameter_type
      = TyTyResolveCompile::compile (ctx, resolved_tyty);
  
*************** uninit_handler (Context *ctx, TyTy::FnTy
*** 1089,1096 ****
    // get the template parameter type tree fn uninit<T>();
    rust_assert (fntype->get_num_substitutions () == 1);
    auto &param_mapping = fntype->get_substs ().at (0);
!   const TyTy::ParamType *param_tyty = param_mapping.get_param_ty ();
!   TyTy::BaseType *resolved_tyty = param_tyty->resolve ();
    tree template_parameter_type
      = TyTyResolveCompile::compile (ctx, resolved_tyty);
  
--- 1079,1086 ----
    // get the template parameter type tree fn uninit<T>();
    rust_assert (fntype->get_num_substitutions () == 1);
    auto &param_mapping = fntype->get_substs ().at (0);
!   const auto param_tyty = param_mapping.get_param_ty ();
!   auto resolved_tyty = param_tyty->resolve ();
    tree template_parameter_type
      = TyTyResolveCompile::compile (ctx, resolved_tyty);
  
*************** move_val_init_handler (Context *ctx, TyT
*** 1154,1161 ****
    // get the template parameter type tree fn size_of<T>();
    rust_assert (fntype->get_num_substitutions () == 1);
    auto &param_mapping = fntype->get_substs ().at (0);
!   const TyTy::ParamType *param_tyty = param_mapping.get_param_ty ();
!   TyTy::BaseType *resolved_tyty = param_tyty->resolve ();
    tree template_parameter_type
      = TyTyResolveCompile::compile (ctx, resolved_tyty);
  
--- 1144,1151 ----
    // get the template parameter type tree fn size_of<T>();
    rust_assert (fntype->get_num_substitutions () == 1);
    auto &param_mapping = fntype->get_substs ().at (0);
!   auto param_tyty = param_mapping.get_param_ty ();
!   auto resolved_tyty = param_tyty->resolve ();
    tree template_parameter_type
      = TyTyResolveCompile::compile (ctx, resolved_tyty);
  
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-compile-item.cc gcc-16-20250810/gcc/rust/backend/rust-compile-item.cc
*** gcc-16-20250803/gcc/rust/backend/rust-compile-item.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-compile-item.cc	Sun Aug 10 22:32:08 2025
*************** CompileItem::visit (HIR::StaticItem &var
*** 50,82 ****
  
    tree type = TyTyResolveCompile::compile (ctx, resolved_type);
  
!   tl::optional<Resolver::CanonicalPath> canonical_path;
! 
!   if (flag_name_resolution_2_0)
!     {
!       auto &nr_ctx
! 	= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
! 
!       canonical_path
! 	= nr_ctx.values.to_canonical_path (var.get_mappings ().get_nodeid ());
!     }
!   else
!     {
!       canonical_path = ctx->get_mappings ().lookup_canonical_path (
! 	var.get_mappings ().get_nodeid ());
!     }
  
!   rust_assert (canonical_path.has_value ());
  
    ctx->push_const_context ();
    tree value
      = compile_constant_item (var.get_mappings ().get_hirid (), expr_type,
! 			     resolved_type, *canonical_path, const_value_expr,
  			     var.get_locus (), const_value_expr.get_locus ());
    ctx->pop_const_context ();
  
!   std::string name = canonical_path->get ();
!   std::string asm_name = ctx->mangle_item (resolved_type, *canonical_path);
  
    bool is_external = false;
    bool is_hidden = false;
--- 50,70 ----
  
    tree type = TyTyResolveCompile::compile (ctx, resolved_type);
  
!   auto &nr_ctx
!     = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!   Resolver::CanonicalPath canonical_path
!     = nr_ctx.to_canonical_path (var.get_mappings ().get_nodeid ());
  
    ctx->push_const_context ();
    tree value
      = compile_constant_item (var.get_mappings ().get_hirid (), expr_type,
! 			     resolved_type, canonical_path, const_value_expr,
  			     var.get_locus (), const_value_expr.get_locus ());
    ctx->pop_const_context ();
  
!   std::string name = canonical_path.get ();
!   std::string asm_name = ctx->mangle_item (resolved_type, canonical_path);
  
    bool is_external = false;
    bool is_hidden = false;
*************** CompileItem::visit (HIR::ConstantItem &c
*** 115,138 ****
      const_value_expr.get_mappings ().get_hirid (), &expr_type);
    rust_assert (ok);
  
    // canonical path
    Resolver::CanonicalPath canonical_path
!     = Resolver::CanonicalPath::create_empty ();
! 
!   if (flag_name_resolution_2_0)
!     {
!       auto &nr_ctx
! 	= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
! 
!       canonical_path
! 	= nr_ctx.values.to_canonical_path (mappings.get_nodeid ()).value ();
!     }
!   else
!     {
!       canonical_path = ctx->get_mappings ()
! 			 .lookup_canonical_path (mappings.get_nodeid ())
! 			 .value ();
!     }
  
    ctx->push_const_context ();
    tree const_expr
--- 103,114 ----
      const_value_expr.get_mappings ().get_hirid (), &expr_type);
    rust_assert (ok);
  
+   auto &nr_ctx
+     = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
+ 
    // canonical path
    Resolver::CanonicalPath canonical_path
!     = nr_ctx.to_canonical_path (mappings.get_nodeid ());
  
    ctx->push_const_context ();
    tree const_expr
*************** CompileItem::visit (HIR::Function &funct
*** 210,235 ****
  	}
      }
  
!   Resolver::CanonicalPath canonical_path
!     = Resolver::CanonicalPath::create_empty ();
! 
!   if (flag_name_resolution_2_0)
!     {
!       auto &nr_ctx
! 	= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
! 
!       auto path = nr_ctx.values.to_canonical_path (
! 	function.get_mappings ().get_nodeid ());
! 
!       canonical_path = path.value ();
!     }
!   else
!     {
!       auto path = ctx->get_mappings ().lookup_canonical_path (
! 	function.get_mappings ().get_nodeid ());
  
!       canonical_path = *path;
!     }
  
    const std::string asm_name = ctx->mangle_item (fntype, canonical_path);
  
--- 186,196 ----
  	}
      }
  
!   auto &nr_ctx
!     = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!   Resolver::CanonicalPath canonical_path
!     = nr_ctx.to_canonical_path (function.get_mappings ().get_nodeid ());
  
    const std::string asm_name = ctx->mangle_item (fntype, canonical_path);
  
*************** CompileItem::visit (HIR::Module &module)
*** 300,304 ****
--- 261,325 ----
      CompileItem::compile (item.get (), ctx);
  }
  
+ void
+ CompileItem::visit (HIR::TupleStruct &tuple_struct_decl)
+ {
+   TyTy::BaseType *lookup = nullptr;
+   if (!ctx->get_tyctx ()->lookup_type (
+ 	tuple_struct_decl.get_mappings ().get_hirid (), &lookup))
+     {
+       rust_error_at (tuple_struct_decl.get_locus (), "failed to resolve type");
+       return;
+     }
+ 
+   if (lookup->is_concrete ())
+     TyTyResolveCompile::compile (ctx, lookup);
+ }
+ 
+ void
+ CompileItem::visit (HIR::Enum &enum_decl)
+ {
+   TyTy::BaseType *lookup = nullptr;
+   if (!ctx->get_tyctx ()->lookup_type (enum_decl.get_mappings ().get_hirid (),
+ 				       &lookup))
+     {
+       rust_error_at (enum_decl.get_locus (), "failed to resolve type");
+       return;
+     }
+ 
+   if (lookup->is_concrete ())
+     TyTyResolveCompile::compile (ctx, lookup);
+ }
+ 
+ void
+ CompileItem::visit (HIR::Union &union_decl)
+ {
+   TyTy::BaseType *lookup = nullptr;
+   if (!ctx->get_tyctx ()->lookup_type (union_decl.get_mappings ().get_hirid (),
+ 				       &lookup))
+     {
+       rust_error_at (union_decl.get_locus (), "failed to resolve type");
+       return;
+     }
+ 
+   if (lookup->is_concrete ())
+     TyTyResolveCompile::compile (ctx, lookup);
+ }
+ 
+ void
+ CompileItem::visit (HIR::StructStruct &struct_decl)
+ {
+   TyTy::BaseType *lookup = nullptr;
+   if (!ctx->get_tyctx ()->lookup_type (struct_decl.get_mappings ().get_hirid (),
+ 				       &lookup))
+     {
+       rust_error_at (struct_decl.get_locus (), "failed to resolve type");
+       return;
+     }
+ 
+   if (lookup->is_concrete ())
+     TyTyResolveCompile::compile (ctx, lookup);
+ }
+ 
  } // namespace Compile
  } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-compile-item.h gcc-16-20250810/gcc/rust/backend/rust-compile-item.h
*** gcc-16-20250803/gcc/rust/backend/rust-compile-item.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-compile-item.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 44,52 ****
    void visit (HIR::ImplBlock &impl_block) override;
    void visit (HIR::ExternBlock &extern_block) override;
    void visit (HIR::Module &module) override;
  
    // Empty visit for unused Stmt HIR nodes.
-   void visit (HIR::TupleStruct &) override {}
    void visit (HIR::EnumItem &) override {}
    void visit (HIR::EnumItemTuple &) override {}
    void visit (HIR::EnumItemStruct &) override {}
--- 44,55 ----
    void visit (HIR::ImplBlock &impl_block) override;
    void visit (HIR::ExternBlock &extern_block) override;
    void visit (HIR::Module &module) override;
+   void visit (HIR::TupleStruct &tuple_struct) override;
+   void visit (HIR::Enum &enum_decl) override;
+   void visit (HIR::Union &union_decl) override;
+   void visit (HIR::StructStruct &struct_decl) override;
  
    // Empty visit for unused Stmt HIR nodes.
    void visit (HIR::EnumItem &) override {}
    void visit (HIR::EnumItemTuple &) override {}
    void visit (HIR::EnumItemStruct &) override {}
*************** public:
*** 57,65 ****
    void visit (HIR::ExternCrate &) override {}
    void visit (HIR::UseDeclaration &) override {}
    void visit (HIR::TypeAlias &) override {}
-   void visit (HIR::StructStruct &) override {}
-   void visit (HIR::Enum &) override {}
-   void visit (HIR::Union &) override {}
    void visit (HIR::Trait &) override {}
    void visit (HIR::EmptyStmt &) override {}
    void visit (HIR::LetStmt &) override {}
--- 60,65 ----
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-compile-pattern.cc gcc-16-20250810/gcc/rust/backend/rust-compile-pattern.cc
*** gcc-16-20250803/gcc/rust/backend/rust-compile-pattern.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-compile-pattern.cc	Sun Aug 10 22:32:08 2025
***************
*** 22,27 ****
--- 22,32 ----
  #include "rust-constexpr.h"
  #include "rust-compile-type.h"
  #include "print-tree.h"
+ #include "rust-diagnostics.h"
+ #include "rust-hir-pattern-abstract.h"
+ #include "rust-hir-pattern.h"
+ #include "rust-system.h"
+ #include "rust-tyty.h"
  
  namespace Rust {
  namespace Compile {
*************** compile_range_pattern_bound (HIR::RangeP
*** 107,113 ****
    tree result = NULL_TREE;
    switch (bound.get_bound_type ())
      {
!       case HIR::RangePatternBound::RangePatternBoundType::LITERAL: {
  	auto &ref = static_cast<HIR::RangePatternBoundLiteral &> (bound);
  
  	HIR::LiteralExpr litexpr (mappings, ref.get_literal (), locus,
--- 112,119 ----
    tree result = NULL_TREE;
    switch (bound.get_bound_type ())
      {
!     case HIR::RangePatternBound::RangePatternBoundType::LITERAL:
!       {
  	auto &ref = static_cast<HIR::RangePatternBoundLiteral &> (bound);
  
  	HIR::LiteralExpr litexpr (mappings, ref.get_literal (), locus,
*************** compile_range_pattern_bound (HIR::RangeP
*** 117,123 ****
        }
        break;
  
!       case HIR::RangePatternBound::RangePatternBoundType::PATH: {
  	auto &ref = static_cast<HIR::RangePatternBoundPath &> (bound);
  
  	result = ResolvePathRef::Compile (ref.get_path (), ctx);
--- 123,130 ----
        }
        break;
  
!     case HIR::RangePatternBound::RangePatternBoundType::PATH:
!       {
  	auto &ref = static_cast<HIR::RangePatternBoundPath &> (bound);
  
  	result = ResolvePathRef::Compile (ref.get_path (), ctx);
*************** compile_range_pattern_bound (HIR::RangeP
*** 127,133 ****
        }
        break;
  
!       case HIR::RangePatternBound::RangePatternBoundType::QUALPATH: {
  	auto &ref = static_cast<HIR::RangePatternBoundQualPath &> (bound);
  
  	result = ResolvePathRef::Compile (ref.get_qualified_path (), ctx);
--- 134,141 ----
        }
        break;
  
!     case HIR::RangePatternBound::RangePatternBoundType::QUALPATH:
!       {
  	auto &ref = static_cast<HIR::RangePatternBoundQualPath &> (bound);
  
  	result = ResolvePathRef::Compile (ref.get_qualified_path (), ctx);
*************** CompilePatternCheckExpr::visit (HIR::Str
*** 204,209 ****
--- 212,218 ----
  
    rust_assert (adt->number_of_variants () > 0);
    TyTy::VariantDef *variant = nullptr;
+   tree variant_accesser_expr = nullptr;
    if (adt->is_enum ())
      {
        // lookup the variant
*************** CompilePatternCheckExpr::visit (HIR::Str
*** 218,226 ****
  
        // find expected discriminant
        // // need to access qualifier the field, if we use QUAL_UNION_TYPE this
!       // // would be DECL_QUALIFIER i think. For now this will just access the
!       // // first record field and its respective qualifier because it will
!       // // always be set because this is all a big special union
        HIR::Expr &discrim_expr = variant->get_discriminant ();
        tree discrim_expr_node = CompileExpr::Compile (discrim_expr, ctx);
  
--- 227,233 ----
  
        // find expected discriminant
        // // need to access qualifier the field, if we use QUAL_UNION_TYPE this
!       // // would be DECL_QUALIFIER i think.
        HIR::Expr &discrim_expr = variant->get_discriminant ();
        tree discrim_expr_node = CompileExpr::Compile (discrim_expr, ctx);
  
*************** CompilePatternCheckExpr::visit (HIR::Str
*** 229,234 ****
--- 236,249 ----
  	= Backend::struct_field_expression (match_scrutinee_expr, 0,
  					    pattern.get_path ().get_locus ());
  
+       // access variant data
+       tree scrutinee_union_expr
+ 	= Backend::struct_field_expression (match_scrutinee_expr, 1,
+ 					    pattern.get_path ().get_locus ());
+       variant_accesser_expr
+ 	= Backend::struct_field_expression (scrutinee_union_expr, variant_index,
+ 					    pattern.get_path ().get_locus ());
+ 
        check_expr
  	= Backend::comparison_expression (ComparisonOperator::EQUAL,
  					  scrutinee_expr_qualifier_expr,
*************** CompilePatternCheckExpr::visit (HIR::Str
*** 240,245 ****
--- 255,261 ----
    else
      {
        variant = adt->get_variants ().at (0);
+       variant_accesser_expr = match_scrutinee_expr;
        check_expr = boolean_true_node;
      }
  
*************** CompilePatternCheckExpr::visit (HIR::Str
*** 248,260 ****
      {
        switch (field->get_item_type ())
  	{
! 	  case HIR::StructPatternField::ItemType::TUPLE_PAT: {
  	    // TODO
  	    rust_unreachable ();
  	  }
  	  break;
  
! 	  case HIR::StructPatternField::ItemType::IDENT_PAT: {
  	    HIR::StructPatternFieldIdentPat &ident
  	      = static_cast<HIR::StructPatternFieldIdentPat &> (*field.get ());
  
--- 264,278 ----
      {
        switch (field->get_item_type ())
  	{
! 	case HIR::StructPatternField::ItemType::TUPLE_PAT:
! 	  {
  	    // TODO
  	    rust_unreachable ();
  	  }
  	  break;
  
! 	case HIR::StructPatternField::ItemType::IDENT_PAT:
! 	  {
  	    HIR::StructPatternFieldIdentPat &ident
  	      = static_cast<HIR::StructPatternFieldIdentPat &> (*field.get ());
  
*************** CompilePatternCheckExpr::visit (HIR::Str
*** 263,273 ****
  					nullptr, &offs);
  	    rust_assert (ok);
  
- 	    // we may be offsetting by + 1 here since the first field in the
- 	    // record is always the discriminator
- 	    offs += adt->is_enum ();
  	    tree field_expr
! 	      = Backend::struct_field_expression (match_scrutinee_expr, offs,
  						  ident.get_locus ());
  
  	    tree check_expr_sub
--- 281,288 ----
  					nullptr, &offs);
  	    rust_assert (ok);
  
  	    tree field_expr
! 	      = Backend::struct_field_expression (variant_accesser_expr, offs,
  						  ident.get_locus ());
  
  	    tree check_expr_sub
*************** CompilePatternCheckExpr::visit (HIR::Str
*** 279,285 ****
  	  }
  	  break;
  
! 	  case HIR::StructPatternField::ItemType::IDENT: {
  	    // ident pattern always matches - do nothing
  	  }
  	  break;
--- 294,301 ----
  	  }
  	  break;
  
! 	case HIR::StructPatternField::ItemType::IDENT:
! 	  {
  	    // ident pattern always matches - do nothing
  	  }
  	  break;
*************** CompilePatternCheckExpr::visit (HIR::Tup
*** 338,381 ****
    HIR::TupleStructItems &items = pattern.get_items ();
    switch (items.get_item_type ())
      {
!       case HIR::TupleStructItems::RANGED: {
  	// TODO
  	rust_unreachable ();
        }
        break;
  
!       case HIR::TupleStructItems::MULTIPLE: {
  	HIR::TupleStructItemsNoRange &items_no_range
  	  = static_cast<HIR::TupleStructItemsNoRange &> (items);
  
  	rust_assert (items_no_range.get_patterns ().size ()
  		     == variant->num_fields ());
  
! 	size_t tuple_field_index = 0;
! 	for (auto &pattern : items_no_range.get_patterns ())
  	  {
! 	    // find payload union field of scrutinee
! 	    tree payload_ref
! 	      = Backend::struct_field_expression (match_scrutinee_expr, 1,
! 						  pattern->get_locus ());
  
! 	    tree variant_ref
! 	      = Backend::struct_field_expression (payload_ref, variant_index,
! 						  pattern->get_locus ());
  
! 	    tree field_expr
! 	      = Backend::struct_field_expression (variant_ref,
! 						  tuple_field_index++,
! 						  pattern->get_locus ());
  
! 	    tree check_expr_sub
! 	      = CompilePatternCheckExpr::Compile (*pattern, field_expr, ctx);
! 	    check_expr = Backend::arithmetic_or_logical_expression (
! 	      ArithmeticOrLogicalOperator::BITWISE_AND, check_expr,
! 	      check_expr_sub, pattern->get_locus ());
  	  }
        }
-       break;
      }
  }
  
--- 354,423 ----
    HIR::TupleStructItems &items = pattern.get_items ();
    switch (items.get_item_type ())
      {
!     case HIR::TupleStructItems::RANGED:
!       {
  	// TODO
  	rust_unreachable ();
        }
        break;
  
!     case HIR::TupleStructItems::MULTIPLE:
!       {
  	HIR::TupleStructItemsNoRange &items_no_range
  	  = static_cast<HIR::TupleStructItemsNoRange &> (items);
  
  	rust_assert (items_no_range.get_patterns ().size ()
  		     == variant->num_fields ());
  
! 	if (adt->is_enum ())
  	  {
! 	    size_t tuple_field_index = 0;
! 	    for (auto &pattern : items_no_range.get_patterns ())
! 	      {
! 		// find payload union field of scrutinee
! 		tree payload_ref
! 		  = Backend::struct_field_expression (match_scrutinee_expr, 1,
! 						      pattern->get_locus ());
  
! 		tree variant_ref
! 		  = Backend::struct_field_expression (payload_ref,
! 						      variant_index,
! 						      pattern->get_locus ());
  
! 		tree field_expr
! 		  = Backend::struct_field_expression (variant_ref,
! 						      tuple_field_index++,
! 						      pattern->get_locus ());
  
! 		tree check_expr_sub
! 		  = CompilePatternCheckExpr::Compile (*pattern, field_expr,
! 						      ctx);
! 		check_expr = Backend::arithmetic_or_logical_expression (
! 		  ArithmeticOrLogicalOperator::BITWISE_AND, check_expr,
! 		  check_expr_sub, pattern->get_locus ());
! 	      }
! 	  }
! 	else
! 	  {
! 	    // For non-enum TupleStructPatterns
! 	    size_t tuple_field_index = 0;
! 	    for (auto &pattern : items_no_range.get_patterns ())
! 	      {
! 		tree field_expr
! 		  = Backend::struct_field_expression (match_scrutinee_expr,
! 						      tuple_field_index++,
! 						      pattern->get_locus ());
! 
! 		tree check_expr_sub
! 		  = CompilePatternCheckExpr::Compile (*pattern, field_expr,
! 						      ctx);
! 		check_expr = Backend::arithmetic_or_logical_expression (
! 		  ArithmeticOrLogicalOperator::BITWISE_AND, check_expr,
! 		  check_expr_sub, pattern->get_locus ());
! 	      }
  	  }
+ 	break;
        }
      }
  }
  
*************** CompilePatternCheckExpr::visit (HIR::Tup
*** 386,398 ****
  
    switch (pattern.get_items ().get_item_type ())
      {
!       case HIR::TuplePatternItems::RANGED: {
! 	// TODO
! 	gcc_unreachable ();
        }
        break;
  
!       case HIR::TuplePatternItems::MULTIPLE: {
  	auto &items = static_cast<HIR::TuplePatternItemsMultiple &> (
  	  pattern.get_items ());
  	size_t tuple_field_index = 0;
--- 428,484 ----
  
    switch (pattern.get_items ().get_item_type ())
      {
!     case HIR::TuplePatternItems::RANGED:
!       {
! 	auto &items
! 	  = static_cast<HIR::TuplePatternItemsRanged &> (pattern.get_items ());
! 	size_t tuple_field_index = 0;
! 
! 	// lookup the type to find out number of fields
! 	TyTy::BaseType *ty = nullptr;
! 	bool ok = ctx->get_tyctx ()->lookup_type (
! 	  pattern.get_mappings ().get_hirid (), &ty);
! 	rust_assert (ok);
! 	rust_assert (ty->get_kind () == TyTy::TypeKind::TUPLE);
! 
! 	// compile check expr for lower patterns
! 	for (auto &pat : items.get_lower_patterns ())
! 	  {
! 	    tree field_expr
! 	      = Backend::struct_field_expression (match_scrutinee_expr,
! 						  tuple_field_index++,
! 						  pat->get_locus ());
! 
! 	    tree check_expr_sub
! 	      = CompilePatternCheckExpr::Compile (*pat, field_expr, ctx);
! 	    check_expr = Backend::arithmetic_or_logical_expression (
! 	      ArithmeticOrLogicalOperator::BITWISE_AND, check_expr,
! 	      check_expr_sub, pat->get_locus ());
! 	  }
! 
! 	// skip the fields that are not checked
! 	tuple_field_index = static_cast<TyTy::TupleType &> (*ty).num_fields ()
! 			    - items.get_upper_patterns ().size ();
! 
! 	// compile check expr for upper patterns
! 	for (auto &pat : items.get_upper_patterns ())
! 	  {
! 	    tree field_expr
! 	      = Backend::struct_field_expression (match_scrutinee_expr,
! 						  tuple_field_index++,
! 						  pat->get_locus ());
! 
! 	    tree check_expr_sub
! 	      = CompilePatternCheckExpr::Compile (*pat, field_expr, ctx);
! 	    check_expr = Backend::arithmetic_or_logical_expression (
! 	      ArithmeticOrLogicalOperator::BITWISE_AND, check_expr,
! 	      check_expr_sub, pat->get_locus ());
! 	  }
        }
        break;
  
!     case HIR::TuplePatternItems::MULTIPLE:
!       {
  	auto &items = static_cast<HIR::TuplePatternItemsMultiple &> (
  	  pattern.get_items ());
  	size_t tuple_field_index = 0;
*************** CompilePatternCheckExpr::visit (HIR::Tup
*** 414,419 ****
--- 500,598 ----
      }
  }
  
+ void
+ CompilePatternCheckExpr::visit (HIR::IdentifierPattern &pattern)
+ {
+   if (pattern.has_subpattern ())
+     {
+       check_expr = CompilePatternCheckExpr::Compile (pattern.get_subpattern (),
+ 						     match_scrutinee_expr, ctx);
+     }
+   else
+     {
+       check_expr = boolean_true_node;
+     }
+ }
+ 
+ void
+ CompilePatternCheckExpr::visit (HIR::SlicePattern &pattern)
+ {
+   check_expr = boolean_true_node;
+ 
+   // lookup the type
+   TyTy::BaseType *lookup = nullptr;
+   bool ok
+     = ctx->get_tyctx ()->lookup_type (pattern.get_mappings ().get_hirid (),
+ 				      &lookup);
+   rust_assert (ok);
+ 
+   // pattern must either be ArrayType or SliceType, should be already confirmed
+   // by type checking
+   rust_assert (lookup->get_kind () == TyTy::TypeKind::ARRAY
+ 	       || lookup->get_kind () == TyTy::TypeKind::SLICE
+ 	       || lookup->get_kind () == TyTy::REF);
+ 
+   size_t array_element_index = 0;
+   switch (lookup->get_kind ())
+     {
+     case TyTy::TypeKind::ARRAY:
+       for (auto &pattern_member : pattern.get_items ())
+ 	{
+ 	  tree array_index_tree
+ 	    = Backend::size_constant_expression (array_element_index++);
+ 	  tree element_expr
+ 	    = Backend::array_index_expression (match_scrutinee_expr,
+ 					       array_index_tree,
+ 					       pattern.get_locus ());
+ 	  tree check_expr_sub
+ 	    = CompilePatternCheckExpr::Compile (*pattern_member, element_expr,
+ 						ctx);
+ 	  check_expr = Backend::arithmetic_or_logical_expression (
+ 	    ArithmeticOrLogicalOperator::BITWISE_AND, check_expr,
+ 	    check_expr_sub, pattern.get_locus ());
+ 	}
+       break;
+     case TyTy::TypeKind::SLICE:
+       rust_sorry_at (
+ 	pattern.get_locus (),
+ 	"SlicePattern matching against non-ref slices are not yet supported");
+       break;
+     case TyTy::TypeKind::REF:
+       {
+ 	rust_assert (RS_DST_FLAG_P (TREE_TYPE (match_scrutinee_expr)));
+ 	tree size_field
+ 	  = Backend::struct_field_expression (match_scrutinee_expr, 1,
+ 					      pattern.get_locus ());
+ 
+ 	// First compare the size
+ 	check_expr = Backend::comparison_expression (
+ 	  ComparisonOperator::EQUAL, size_field,
+ 	  build_int_cst (size_type_node, pattern.get_items ().size ()),
+ 	  pattern.get_locus ());
+ 
+ 	// Then compare each element in the slice pattern
+ 	for (auto &pattern_member : pattern.get_items ())
+ 	  {
+ 	    tree slice_index_tree
+ 	      = Backend::size_constant_expression (array_element_index++);
+ 	    tree element_expr
+ 	      = Backend::slice_index_expression (match_scrutinee_expr,
+ 						 slice_index_tree,
+ 						 pattern.get_locus ());
+ 	    tree check_expr_sub
+ 	      = CompilePatternCheckExpr::Compile (*pattern_member, element_expr,
+ 						  ctx);
+ 	    check_expr = Backend::arithmetic_or_logical_expression (
+ 	      ArithmeticOrLogicalOperator::BITWISE_AND, check_expr,
+ 	      check_expr_sub, pattern.get_locus ());
+ 	  }
+       }
+       break;
+     default:
+       rust_unreachable ();
+     }
+ }
+ 
  // setup the bindings
  
  void
*************** CompilePatternBindings::visit (HIR::Tupl
*** 449,461 ****
    HIR::TupleStructItems &items = pattern.get_items ();
    switch (items.get_item_type ())
      {
!       case HIR::TupleStructItems::RANGED: {
  	// TODO
  	rust_unreachable ();
        }
        break;
  
!       case HIR::TupleStructItems::MULTIPLE: {
  	HIR::TupleStructItemsNoRange &items_no_range
  	  = static_cast<HIR::TupleStructItemsNoRange &> (items);
  
--- 628,642 ----
    HIR::TupleStructItems &items = pattern.get_items ();
    switch (items.get_item_type ())
      {
!     case HIR::TupleStructItems::RANGED:
!       {
  	// TODO
  	rust_unreachable ();
        }
        break;
  
!     case HIR::TupleStructItems::MULTIPLE:
!       {
  	HIR::TupleStructItemsNoRange &items_no_range
  	  = static_cast<HIR::TupleStructItemsNoRange &> (items);
  
*************** CompilePatternBindings::visit (HIR::Tupl
*** 504,509 ****
--- 685,755 ----
      }
  }
  
+ tree
+ CompilePatternBindings::make_struct_access (TyTy::ADTType *adt,
+ 					    TyTy::VariantDef *variant,
+ 					    const Identifier &ident,
+ 					    int variant_index)
+ {
+   size_t offs = 0;
+   auto ok = variant->lookup_field (ident.as_string (), nullptr, &offs);
+   rust_assert (ok);
+ 
+   if (adt->is_enum ())
+     {
+       tree payload_accessor_union
+ 	= Backend::struct_field_expression (match_scrutinee_expr, 1,
+ 					    ident.get_locus ());
+ 
+       tree variant_accessor
+ 	= Backend::struct_field_expression (payload_accessor_union,
+ 					    variant_index, ident.get_locus ());
+ 
+       return Backend::struct_field_expression (variant_accessor, offs,
+ 					       ident.get_locus ());
+     }
+   else
+     {
+       tree variant_accessor = match_scrutinee_expr;
+ 
+       return Backend::struct_field_expression (variant_accessor, offs,
+ 					       ident.get_locus ());
+     }
+ }
+ 
+ void
+ CompilePatternBindings::handle_struct_pattern_ident (
+   HIR::StructPatternField &pat, TyTy::ADTType *adt, TyTy::VariantDef *variant,
+   int variant_index)
+ {
+   HIR::StructPatternFieldIdent &ident
+     = static_cast<HIR::StructPatternFieldIdent &> (pat);
+ 
+   auto identifier = ident.get_identifier ();
+   tree binding = make_struct_access (adt, variant, identifier, variant_index);
+ 
+   ctx->insert_pattern_binding (ident.get_mappings ().get_hirid (), binding);
+ }
+ 
+ void
+ CompilePatternBindings::handle_struct_pattern_ident_pat (
+   HIR::StructPatternField &pat, TyTy::ADTType *adt, TyTy::VariantDef *variant,
+   int variant_index)
+ {
+   auto &pattern = static_cast<HIR::StructPatternFieldIdentPat &> (pat);
+ 
+   tree binding = make_struct_access (adt, variant, pattern.get_identifier (),
+ 				     variant_index);
+   CompilePatternBindings::Compile (pattern.get_pattern (), binding, ctx);
+ }
+ 
+ void
+ CompilePatternBindings::handle_struct_pattern_tuple_pat (
+   HIR::StructPatternField &pat)
+ {
+   rust_unreachable ();
+ }
+ 
  void
  CompilePatternBindings::visit (HIR::StructPattern &pattern)
  {
*************** CompilePatternBindings::visit (HIR::Stru
*** 539,592 ****
      {
        switch (field->get_item_type ())
  	{
! 	  case HIR::StructPatternField::ItemType::TUPLE_PAT: {
! 	    // TODO
! 	    rust_unreachable ();
! 	  }
  	  break;
! 
! 	  case HIR::StructPatternField::ItemType::IDENT_PAT: {
! 	    // TODO
! 	    rust_unreachable ();
! 	  }
  	  break;
! 
! 	  case HIR::StructPatternField::ItemType::IDENT: {
! 	    HIR::StructPatternFieldIdent &ident
! 	      = static_cast<HIR::StructPatternFieldIdent &> (*field.get ());
! 
! 	    size_t offs = 0;
! 	    ok = variant->lookup_field (ident.get_identifier ().as_string (),
! 					nullptr, &offs);
! 	    rust_assert (ok);
! 
! 	    tree binding = error_mark_node;
! 	    if (adt->is_enum ())
! 	      {
! 		tree payload_accessor_union
! 		  = Backend::struct_field_expression (match_scrutinee_expr, 1,
! 						      ident.get_locus ());
! 
! 		tree variant_accessor
! 		  = Backend::struct_field_expression (payload_accessor_union,
! 						      variant_index,
! 						      ident.get_locus ());
! 
! 		binding
! 		  = Backend::struct_field_expression (variant_accessor, offs,
! 						      ident.get_locus ());
! 	      }
! 	    else
! 	      {
! 		tree variant_accessor = match_scrutinee_expr;
! 		binding
! 		  = Backend::struct_field_expression (variant_accessor, offs,
! 						      ident.get_locus ());
! 	      }
! 
! 	    ctx->insert_pattern_binding (ident.get_mappings ().get_hirid (),
! 					 binding);
! 	  }
  	  break;
  	}
      }
--- 785,798 ----
      {
        switch (field->get_item_type ())
  	{
! 	case HIR::StructPatternField::ItemType::TUPLE_PAT:
! 	  handle_struct_pattern_tuple_pat (*field);
  	  break;
! 	case HIR::StructPatternField::ItemType::IDENT_PAT:
! 	  handle_struct_pattern_ident_pat (*field, adt, variant, variant_index);
  	  break;
! 	case HIR::StructPatternField::ItemType::IDENT:
! 	  handle_struct_pattern_ident (*field, adt, variant, variant_index);
  	  break;
  	}
      }
*************** CompilePatternBindings::visit (HIR::Refe
*** 605,610 ****
--- 811,822 ----
  void
  CompilePatternBindings::visit (HIR::IdentifierPattern &pattern)
  {
+   if (pattern.has_subpattern ())
+     {
+       CompilePatternBindings::Compile (pattern.get_subpattern (),
+ 				       match_scrutinee_expr, ctx);
+     }
+ 
    if (!pattern.get_is_ref ())
      {
        ctx->insert_pattern_binding (pattern.get_mappings ().get_hirid (),
*************** CompilePatternBindings::visit (HIR::Tupl
*** 631,637 ****
  
    switch (pattern.get_items ().get_item_type ())
      {
!       case HIR::TuplePatternItems::ItemType::RANGED: {
  	size_t tuple_idx = 0;
  	auto &items
  	  = static_cast<HIR::TuplePatternItemsRanged &> (pattern.get_items ());
--- 843,850 ----
  
    switch (pattern.get_items ().get_item_type ())
      {
!     case HIR::TuplePatternItems::ItemType::RANGED:
!       {
  	size_t tuple_idx = 0;
  	auto &items
  	  = static_cast<HIR::TuplePatternItemsRanged &> (pattern.get_items ());
*************** CompilePatternBindings::visit (HIR::Tupl
*** 674,680 ****
  
  	return;
        }
!       case HIR::TuplePatternItems::ItemType::MULTIPLE: {
  	size_t tuple_idx = 0;
  	auto &items = static_cast<HIR::TuplePatternItemsMultiple &> (
  	  pattern.get_items ());
--- 887,894 ----
  
  	return;
        }
!     case HIR::TuplePatternItems::ItemType::MULTIPLE:
!       {
  	size_t tuple_idx = 0;
  	auto &items = static_cast<HIR::TuplePatternItemsMultiple &> (
  	  pattern.get_items ());
*************** CompilePatternBindings::visit (HIR::Tupl
*** 695,706 ****
  
  	return;
        }
!       default: {
  	rust_unreachable ();
        }
      }
  }
  
  //
  
  void
--- 909,975 ----
  
  	return;
        }
!     default:
!       {
  	rust_unreachable ();
        }
      }
  }
  
+ void
+ CompilePatternBindings::visit (HIR::SlicePattern &pattern)
+ {
+   // lookup the type
+   TyTy::BaseType *lookup = nullptr;
+   bool ok
+     = ctx->get_tyctx ()->lookup_type (pattern.get_mappings ().get_hirid (),
+ 				      &lookup);
+   rust_assert (ok);
+ 
+   rust_assert (lookup->get_kind () == TyTy::TypeKind::ARRAY
+ 	       || lookup->get_kind () == TyTy::TypeKind::SLICE
+ 	       || lookup->get_kind () == TyTy::REF);
+ 
+   size_t array_element_index = 0;
+   switch (lookup->get_kind ())
+     {
+     case TyTy::TypeKind::ARRAY:
+       for (auto &pattern_member : pattern.get_items ())
+ 	{
+ 	  tree array_index_tree
+ 	    = Backend::size_constant_expression (array_element_index++);
+ 	  tree element_expr
+ 	    = Backend::array_index_expression (match_scrutinee_expr,
+ 					       array_index_tree,
+ 					       pattern.get_locus ());
+ 	  CompilePatternBindings::Compile (*pattern_member, element_expr, ctx);
+ 	}
+       break;
+     case TyTy::TypeKind::SLICE:
+       rust_sorry_at (
+ 	pattern.get_locus (),
+ 	"SlicePattern matching against non-ref slices are not yet supported");
+       break;
+     case TyTy::TypeKind::REF:
+       {
+ 	for (auto &pattern_member : pattern.get_items ())
+ 	  {
+ 	    tree slice_index_tree
+ 	      = Backend::size_constant_expression (array_element_index++);
+ 	    tree element_expr
+ 	      = Backend::slice_index_expression (match_scrutinee_expr,
+ 						 slice_index_tree,
+ 						 pattern.get_locus ());
+ 	    CompilePatternBindings::Compile (*pattern_member, element_expr,
+ 					     ctx);
+ 	  }
+ 	break;
+       }
+     default:
+       rust_unreachable ();
+     }
+ }
+ 
  //
  
  void
*************** CompilePatternLet::visit (HIR::TuplePatt
*** 755,761 ****
  
    switch (pattern.get_items ().get_item_type ())
      {
!       case HIR::TuplePatternItems::ItemType::RANGED: {
  	size_t tuple_idx = 0;
  	auto &items
  	  = static_cast<HIR::TuplePatternItemsRanged &> (pattern.get_items ());
--- 1024,1031 ----
  
    switch (pattern.get_items ().get_item_type ())
      {
!     case HIR::TuplePatternItems::ItemType::RANGED:
!       {
  	size_t tuple_idx = 0;
  	auto &items
  	  = static_cast<HIR::TuplePatternItemsRanged &> (pattern.get_items ());
*************** CompilePatternLet::visit (HIR::TuplePatt
*** 799,805 ****
  
  	return;
        }
!       case HIR::TuplePatternItems::ItemType::MULTIPLE: {
  	size_t tuple_idx = 0;
  	auto &items = static_cast<HIR::TuplePatternItemsMultiple &> (
  	  pattern.get_items ());
--- 1069,1076 ----
  
  	return;
        }
!     case HIR::TuplePatternItems::ItemType::MULTIPLE:
!       {
  	size_t tuple_idx = 0;
  	auto &items = static_cast<HIR::TuplePatternItemsMultiple &> (
  	  pattern.get_items ());
*************** CompilePatternLet::visit (HIR::TuplePatt
*** 821,827 ****
  
  	return;
        }
!       default: {
  	rust_unreachable ();
        }
      }
--- 1092,1099 ----
  
  	return;
        }
!     default:
!       {
  	rust_unreachable ();
        }
      }
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-compile-pattern.h gcc-16-20250810/gcc/rust/backend/rust-compile-pattern.h
*** gcc-16-20250803/gcc/rust/backend/rust-compile-pattern.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-compile-pattern.h	Sun Aug 10 22:32:08 2025
***************
*** 17,23 ****
--- 17,25 ----
  // <http://www.gnu.org/licenses/>.
  
  #include "rust-compile-base.h"
+ #include "rust-hir-pattern.h"
  #include "rust-hir-visitor.h"
+ #include "rust-tyty.h"
  
  namespace Rust {
  namespace Compile {
*************** public:
*** 43,54 ****
    void visit (HIR::StructPattern &) override;
    void visit (HIR::TupleStructPattern &) override;
    void visit (HIR::TuplePattern &) override;
  
    // Always succeeds
-   void visit (HIR::IdentifierPattern &) override
-   {
-     check_expr = boolean_true_node;
-   }
    void visit (HIR::WildcardPattern &) override
    {
      check_expr = boolean_true_node;
--- 45,54 ----
    void visit (HIR::StructPattern &) override;
    void visit (HIR::TupleStructPattern &) override;
    void visit (HIR::TuplePattern &) override;
+   void visit (HIR::IdentifierPattern &) override;
+   void visit (HIR::SlicePattern &) override;
  
    // Always succeeds
    void visit (HIR::WildcardPattern &) override
    {
      check_expr = boolean_true_node;
*************** public:
*** 56,62 ****
  
    // Empty visit for unused Pattern HIR nodes.
    void visit (HIR::QualifiedPathInExpression &) override {}
-   void visit (HIR::SlicePattern &) override {}
  
    CompilePatternCheckExpr (Context *ctx, tree match_scrutinee_expr)
      : HIRCompileBase (ctx), match_scrutinee_expr (match_scrutinee_expr),
--- 56,61 ----
*************** public:
*** 78,88 ****
--- 77,101 ----
      pattern.accept_vis (compiler);
    }
  
+   tree make_struct_access (TyTy::ADTType *adt, TyTy::VariantDef *variant,
+ 			   const Identifier &ident, int variant_index);
+ 
+   void handle_struct_pattern_ident (HIR::StructPatternField &pat,
+ 				    TyTy::ADTType *adt,
+ 				    TyTy::VariantDef *variant,
+ 				    int variant_index);
+   void handle_struct_pattern_ident_pat (HIR::StructPatternField &pat,
+ 					TyTy::ADTType *adt,
+ 					TyTy::VariantDef *variant,
+ 					int variant_index);
+   void handle_struct_pattern_tuple_pat (HIR::StructPatternField &pat);
+ 
    void visit (HIR::StructPattern &pattern) override;
    void visit (HIR::TupleStructPattern &pattern) override;
    void visit (HIR::ReferencePattern &pattern) override;
    void visit (HIR::IdentifierPattern &) override;
    void visit (HIR::TuplePattern &pattern) override;
+   void visit (HIR::SlicePattern &) override;
  
    // Empty visit for unused Pattern HIR nodes.
    void visit (HIR::AltPattern &) override {}
*************** public:
*** 90,96 ****
    void visit (HIR::PathInExpression &) override {}
    void visit (HIR::QualifiedPathInExpression &) override {}
    void visit (HIR::RangePattern &) override {}
-   void visit (HIR::SlicePattern &) override {}
    void visit (HIR::WildcardPattern &) override {}
  
  protected:
--- 103,108 ----
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-compile-resolve-path.cc gcc-16-20250810/gcc/rust/backend/rust-compile-resolve-path.cc
*** gcc-16-20250803/gcc/rust/backend/rust-compile-resolve-path.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-compile-resolve-path.cc	Sun Aug 10 22:32:08 2025
*************** ResolvePathRef::resolve_with_node_id (
*** 187,199 ****
      }
  
    // Handle unit struct
    if (lookup->get_kind () == TyTy::TypeKind::ADT)
!     return attempt_constructor_expression_lookup (lookup, ctx, mappings,
! 						  expr_locus);
  
    // let the query system figure it out
!   tree resolved_item = query_compile (ref, lookup, final_segment, mappings,
! 				      expr_locus, is_qualified_path);
    if (resolved_item != error_mark_node)
      {
        TREE_USED (resolved_item) = 1;
--- 187,204 ----
      }
  
    // Handle unit struct
+   tree resolved_item = error_mark_node;
    if (lookup->get_kind () == TyTy::TypeKind::ADT)
!     resolved_item
!       = attempt_constructor_expression_lookup (lookup, ctx, mappings,
! 					       expr_locus);
! 
!   if (!error_operand_p (resolved_item))
!     return resolved_item;
  
    // let the query system figure it out
!   resolved_item = query_compile (ref, lookup, final_segment, mappings,
! 				 expr_locus, is_qualified_path);
    if (resolved_item != error_mark_node)
      {
        TREE_USED (resolved_item) = 1;
*************** ResolvePathRef::resolve (const HIR::Path
*** 209,244 ****
  {
    TyTy::BaseType *lookup = nullptr;
    bool ok = ctx->get_tyctx ()->lookup_type (mappings.get_hirid (), &lookup);
!   rust_assert (ok);
  
    // need to look up the reference for this identifier
  
    // this can fail because it might be a Constructor for something
    // in that case the caller should attempt ResolvePathType::Compile
!   NodeId ref_node_id = UNKNOWN_NODEID;
!   if (flag_name_resolution_2_0)
!     {
!       auto &nr_ctx
! 	= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
! 
!       auto resolved = nr_ctx.lookup (mappings.get_nodeid ());
  
!       if (!resolved)
! 	return attempt_constructor_expression_lookup (lookup, ctx, mappings,
! 						      expr_locus);
  
!       ref_node_id = *resolved;
!     }
!   else
!     {
!       if (!ctx->get_resolver ()->lookup_resolved_name (mappings.get_nodeid (),
! 						       &ref_node_id))
! 	return attempt_constructor_expression_lookup (lookup, ctx, mappings,
! 						      expr_locus);
!     }
  
    return resolve_with_node_id (final_segment, mappings, expr_locus,
! 			       is_qualified_path, ref_node_id);
  }
  
  tree
--- 214,237 ----
  {
    TyTy::BaseType *lookup = nullptr;
    bool ok = ctx->get_tyctx ()->lookup_type (mappings.get_hirid (), &lookup);
!   if (!ok)
!     return error_mark_node;
  
    // need to look up the reference for this identifier
  
    // this can fail because it might be a Constructor for something
    // in that case the caller should attempt ResolvePathType::Compile
!   auto &nr_ctx
!     = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!   auto resolved = nr_ctx.lookup (mappings.get_nodeid ());
  
!   if (!resolved)
!     return attempt_constructor_expression_lookup (lookup, ctx, mappings,
! 						  expr_locus);
  
    return resolve_with_node_id (final_segment, mappings, expr_locus,
! 			       is_qualified_path, *resolved);
  }
  
  tree
*************** HIRCompileBase::query_compile (HirId ref
*** 336,346 ****
  	  rust_assert (lookup->is<TyTy::FnType> ());
  	  auto fn = lookup->as<TyTy::FnType> ();
  	  rust_assert (fn->get_num_type_params () > 0);
! 	  auto &self = fn->get_substs ().at (0);
! 	  auto receiver = self.get_param_ty ();
  	  auto candidates
! 	    = Resolver::PathProbeImplTrait::Probe (receiver, final_segment,
! 						   trait_ref);
  	  if (candidates.size () == 0)
  	    {
  	      // this means we are defaulting back to the trait_item if
--- 329,346 ----
  	  rust_assert (lookup->is<TyTy::FnType> ());
  	  auto fn = lookup->as<TyTy::FnType> ();
  	  rust_assert (fn->get_num_type_params () > 0);
! 	  TyTy::SubstitutionParamMapping &self = fn->get_substs ().at (0);
! 	  TyTy::BaseGeneric *receiver = self.get_param_ty ();
! 	  TyTy::BaseType *r = receiver;
! 	  if (!receiver->can_resolve ())
! 	    {
! 	      bool ok
! 		= ctx->get_tyctx ()->lookup_type (receiver->get_ref (), &r);
! 	      rust_assert (ok);
! 	    }
! 
  	  auto candidates
! 	    = Resolver::PathProbeImplTrait::Probe (r, final_segment, trait_ref);
  	  if (candidates.size () == 0)
  	    {
  	      // this means we are defaulting back to the trait_item if
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-compile-stmt.cc gcc-16-20250810/gcc/rust/backend/rust-compile-stmt.cc
*** gcc-16-20250803/gcc/rust/backend/rust-compile-stmt.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-compile-stmt.cc	Sun Aug 10 22:32:08 2025
*************** CompileStmt::visit (HIR::LetStmt &stmt)
*** 58,63 ****
--- 58,66 ----
        return;
      }
  
+   rust_debug_loc (stmt.get_locus (), "   -> LetStmt %s",
+ 		  ty->as_string ().c_str ());
+ 
    // setup var decl nodes
    fncontext fnctx = ctx->peek_fn ();
    tree fndecl = fnctx.fndecl;
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-compile-type.cc gcc-16-20250810/gcc/rust/backend/rust-compile-type.cc
*** gcc-16-20250803/gcc/rust/backend/rust-compile-type.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-compile-type.cc	Sun Aug 10 22:32:08 2025
***************
*** 17,27 ****
  // <http://www.gnu.org/licenses/>.
  
  #include "rust-compile-type.h"
- #include "rust-compile-expr.h"
  #include "rust-constexpr.h"
! #include "rust-gcc.h"
  
  #include "tree.h"
  #include "stor-layout.h"
  
  namespace Rust {
--- 17,27 ----
  // <http://www.gnu.org/licenses/>.
  
  #include "rust-compile-type.h"
  #include "rust-constexpr.h"
! #include "rust-compile-base.h"
  
  #include "tree.h"
+ #include "fold-const.h"
  #include "stor-layout.h"
  
  namespace Rust {
*************** TyTyResolveCompile::visit (const TyTy::I
*** 121,126 ****
--- 121,133 ----
  
    if (orig == lookup)
      {
+       TyTy::BaseType *def = nullptr;
+       if (type.default_type (&def))
+ 	{
+ 	  translated = TyTyResolveCompile::compile (ctx, def);
+ 	  return;
+ 	}
+ 
        translated = error_mark_node;
        return;
      }
*************** TyTyResolveCompile::visit (const TyTy::P
*** 135,140 ****
--- 142,153 ----
  }
  
  void
+ TyTyResolveCompile::visit (const TyTy::ConstType &)
+ {
+   translated = error_mark_node;
+ }
+ 
+ void
  TyTyResolveCompile::visit (const TyTy::ProjectionType &type)
  {
    translated = error_mark_node;
*************** TyTyResolveCompile::visit (const TyTy::C
*** 189,195 ****
  void
  TyTyResolveCompile::visit (const TyTy::FnType &type)
  {
!   Backend::typed_identifier receiver;
    std::vector<Backend::typed_identifier> parameters;
    std::vector<Backend::typed_identifier> results;
  
--- 202,208 ----
  void
  TyTyResolveCompile::visit (const TyTy::FnType &type)
  {
!   Backend::typed_identifier receiver ("", NULL_TREE, UNKNOWN_LOCATION);
    std::vector<Backend::typed_identifier> parameters;
    std::vector<Backend::typed_identifier> results;
  
*************** TyTyResolveCompile::visit (const TyTy::T
*** 454,460 ****
      }
  
    tree struct_type_record = Backend::struct_type (fields);
!   translated = Backend::named_type (type.as_string (), struct_type_record,
  				    type.get_ident ().locus);
  }
  
--- 467,473 ----
      }
  
    tree struct_type_record = Backend::struct_type (fields);
!   translated = Backend::named_type (type.get_name (), struct_type_record,
  				    type.get_ident ().locus);
  }
  
*************** TyTyResolveCompile::visit (const TyTy::A
*** 463,488 ****
  {
    tree element_type
      = TyTyResolveCompile::compile (ctx, type.get_element_type ());
  
!   ctx->push_const_context ();
! 
!   HIR::Expr &hir_capacity_expr = type.get_capacity_expr ();
!   TyTy::BaseType *capacity_expr_ty = nullptr;
!   bool ok = ctx->get_tyctx ()->lookup_type (
!     hir_capacity_expr.get_mappings ().get_hirid (), &capacity_expr_ty);
!   rust_assert (ok);
!   tree capacity_expr = HIRCompileBase::compile_constant_expr (
!     ctx, hir_capacity_expr.get_mappings ().get_hirid (), capacity_expr_ty,
!     capacity_expr_ty, Resolver::CanonicalPath::create_empty (),
!     hir_capacity_expr, type.get_locus (), hir_capacity_expr.get_locus ());
! 
!   ctx->pop_const_context ();
! 
!   tree folded_capacity_expr = fold_expr (capacity_expr);
  
!   translated = Backend::array_type (element_type, folded_capacity_expr);
!   if (translated != error_mark_node)
!     translated = ctx->insert_compiled_type (translated);
  }
  
  void
--- 476,490 ----
  {
    tree element_type
      = TyTyResolveCompile::compile (ctx, type.get_element_type ());
+   TyTy::ConstType *const_capacity = type.get_capacity ();
+   tree folded_capacity_expr = const_capacity->get_value ();
  
!   // build_index_type takes the maximum index, which is one less than
!   // the length.
!   tree index_type_tree = build_index_type (
!     fold_build2 (MINUS_EXPR, sizetype, folded_capacity_expr, size_one_node));
  
!   translated = build_array_type (element_type, index_type_tree, false);
  }
  
  void
*************** TyTyResolveCompile::visit (const TyTy::D
*** 755,761 ****
  void
  TyTyResolveCompile::visit (const TyTy::OpaqueType &type)
  {
!   translated = error_mark_node;
  }
  
  tree
--- 757,765 ----
  void
  TyTyResolveCompile::visit (const TyTy::OpaqueType &type)
  {
!   rust_assert (type.can_resolve ());
!   auto underlying = type.resolve ();
!   translated = TyTyResolveCompile::compile (ctx, underlying, trait_object_mode);
  }
  
  tree
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-compile-type.h gcc-16-20250810/gcc/rust/backend/rust-compile-type.h
*** gcc-16-20250803/gcc/rust/backend/rust-compile-type.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-compile-type.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 50,55 ****
--- 50,56 ----
    void visit (const TyTy::ReferenceType &) override;
    void visit (const TyTy::PointerType &) override;
    void visit (const TyTy::ParamType &) override;
+   void visit (const TyTy::ConstType &) override;
    void visit (const TyTy::StrType &) override;
    void visit (const TyTy::NeverType &) override;
    void visit (const TyTy::PlaceholderType &) override;
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-compile-var-decl.h gcc-16-20250810/gcc/rust/backend/rust-compile-var-decl.h
*** gcc-16-20250803/gcc/rust/backend/rust-compile-var-decl.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-compile-var-decl.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 70,76 ****
    {
      switch (pattern.get_items ().get_item_type ())
        {
! 	case HIR::TuplePatternItems::ItemType::MULTIPLE: {
  	  rust_assert (TREE_CODE (translated_type) == RECORD_TYPE);
  	  auto &items = static_cast<HIR::TuplePatternItemsMultiple &> (
  	    pattern.get_items ());
--- 70,77 ----
    {
      switch (pattern.get_items ().get_item_type ())
        {
!       case HIR::TuplePatternItems::ItemType::MULTIPLE:
! 	{
  	  rust_assert (TREE_CODE (translated_type) == RECORD_TYPE);
  	  auto &items = static_cast<HIR::TuplePatternItemsMultiple &> (
  	    pattern.get_items ());
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-constexpr.cc gcc-16-20250810/gcc/rust/backend/rust-constexpr.cc
*** gcc-16-20250803/gcc/rust/backend/rust-constexpr.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-constexpr.cc	Sun Aug 10 22:32:08 2025
*************** literal_type_p (tree t)
*** 68,99 ****
    return false;
  }
  
! static bool
! verify_constant (tree, bool, bool *, bool *);
  
! static HOST_WIDE_INT
! find_array_ctor_elt (tree ary, tree dindex, bool insert = false);
! static int
! array_index_cmp (tree key, tree index);
! static bool
! potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now,
! 				 tsubst_flags_t flags, tree *jump_target);
! bool
! potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now,
! 				 tsubst_flags_t flags);
! tree
! unshare_constructor (tree t MEM_STAT_DECL);
! void
! maybe_save_constexpr_fundef (tree fun);
  
! static bool
! returns (tree *jump_target);
! static bool
! breaks (tree *jump_target);
! static bool
! continues (tree *jump_target);
! static bool
! switches (tree *jump_target);
  
  struct constexpr_global_ctx
  {
--- 68,91 ----
    return false;
  }
  
! static bool verify_constant (tree, bool, bool *, bool *);
  
! static HOST_WIDE_INT find_array_ctor_elt (tree ary, tree dindex,
! 					  bool insert = false);
! static int array_index_cmp (tree key, tree index);
! static bool potential_constant_expression_1 (tree t, bool want_rval,
! 					     bool strict, bool now,
! 					     tsubst_flags_t flags,
! 					     tree *jump_target);
! bool potential_constant_expression_1 (tree t, bool want_rval, bool strict,
! 				      bool now, tsubst_flags_t flags);
! tree unshare_constructor (tree t MEM_STAT_DECL);
! void maybe_save_constexpr_fundef (tree fun);
  
! static bool returns (tree *jump_target);
! static bool breaks (tree *jump_target);
! static bool continues (tree *jump_target);
! static bool switches (tree *jump_target);
  
  struct constexpr_global_ctx
  {
*************** save_fundef_copy (tree fun, tree copy)
*** 463,522 ****
    *slot = copy;
  }
  
! static tree
! constant_value_1 (tree decl, bool strict_p, bool return_aggregate_cst_ok_p,
! 		  bool unshare_p);
! tree
! decl_constant_value (tree decl, bool unshare_p);
  
! static void
! non_const_var_error (location_t loc, tree r);
  
! static tree
! eval_constant_expression (const constexpr_ctx *ctx, tree, bool, bool *, bool *,
! 			  tree * = NULL);
  
! static tree
! constexpr_fn_retval (const constexpr_ctx *ctx, tree r);
  
! static tree
! eval_store_expression (const constexpr_ctx *ctx, tree r, bool, bool *, bool *);
  
! static tree
! eval_call_expression (const constexpr_ctx *ctx, tree r, bool, bool *, bool *);
  
! static tree
! eval_binary_expression (const constexpr_ctx *ctx, tree r, bool, bool *, bool *);
  
! static tree
! get_function_named_in_call (tree t);
  
! static tree
! eval_statement_list (const constexpr_ctx *ctx, tree t, bool *non_constant_p,
! 		     bool *overflow_p, tree *jump_target);
! static tree
! extract_string_elt (tree string, unsigned chars_per_elt, unsigned index);
  
! static tree
! eval_conditional_expression (const constexpr_ctx *ctx, tree t, bool lval,
! 			     bool *non_constant_p, bool *overflow_p,
! 			     tree *jump_target);
  
! static tree
! eval_bit_field_ref (const constexpr_ctx *ctx, tree t, bool lval,
! 		    bool *non_constant_p, bool *overflow_p);
  
! static tree
! eval_loop_expr (const constexpr_ctx *ctx, tree t, bool *non_constant_p,
! 		bool *overflow_p, tree *jump_target);
  
! static tree
! eval_switch_expr (const constexpr_ctx *ctx, tree t, bool *non_constant_p,
! 		  bool *overflow_p, tree *jump_target);
  
! static tree
! eval_unary_expression (const constexpr_ctx *ctx, tree t, bool /*lval*/,
! 		       bool *non_constant_p, bool *overflow_p);
  
  /* Variables and functions to manage constexpr call expansion context.
     These do not need to be marked for PCH or GC.  */
--- 455,506 ----
    *slot = copy;
  }
  
! static tree constant_value_1 (tree decl, bool strict_p,
! 			      bool return_aggregate_cst_ok_p, bool unshare_p);
! tree decl_constant_value (tree decl, bool unshare_p);
  
! static void non_const_var_error (location_t loc, tree r);
  
! static tree eval_constant_expression (const constexpr_ctx *ctx, tree, bool,
! 				      bool *, bool *, tree * = NULL);
  
! static tree constexpr_fn_retval (const constexpr_ctx *ctx, tree r);
  
! static tree eval_store_expression (const constexpr_ctx *ctx, tree r, bool,
! 				   bool *, bool *);
  
! static tree eval_call_expression (const constexpr_ctx *ctx, tree r, bool,
! 				  bool *, bool *);
  
! static tree eval_binary_expression (const constexpr_ctx *ctx, tree r, bool,
! 				    bool *, bool *);
  
! static tree get_function_named_in_call (tree t);
  
! static tree eval_statement_list (const constexpr_ctx *ctx, tree t,
! 				 bool *non_constant_p, bool *overflow_p,
! 				 tree *jump_target);
! static tree extract_string_elt (tree string, unsigned chars_per_elt,
! 				unsigned index);
  
! static tree eval_conditional_expression (const constexpr_ctx *ctx, tree t,
! 					 bool lval, bool *non_constant_p,
! 					 bool *overflow_p, tree *jump_target);
  
! static tree eval_bit_field_ref (const constexpr_ctx *ctx, tree t, bool lval,
! 				bool *non_constant_p, bool *overflow_p);
  
! static tree eval_loop_expr (const constexpr_ctx *ctx, tree t,
! 			    bool *non_constant_p, bool *overflow_p,
! 			    tree *jump_target);
  
! static tree eval_switch_expr (const constexpr_ctx *ctx, tree t,
! 			      bool *non_constant_p, bool *overflow_p,
! 			      tree *jump_target);
  
! static tree eval_unary_expression (const constexpr_ctx *ctx, tree t,
! 				   bool /*lval*/, bool *non_constant_p,
! 				   bool *overflow_p);
  
  /* Variables and functions to manage constexpr call expansion context.
     These do not need to be marked for PCH or GC.  */
*************** get_or_insert_ctor_field (tree ctor, tre
*** 1235,1241 ****
        /* We fell off the end of the CONSTRUCTOR, so insert a new
  	 entry at the end.  */
  
!       insert : {
  	constructor_elt ce = {index, NULL_TREE};
  
  	vec_safe_insert (CONSTRUCTOR_ELTS (ctor), idx, ce);
--- 1219,1226 ----
        /* We fell off the end of the CONSTRUCTOR, so insert a new
  	 entry at the end.  */
  
!     insert:
!       {
  	constructor_elt ce = {index, NULL_TREE};
  
  	vec_safe_insert (CONSTRUCTOR_ELTS (ctor), idx, ce);
*************** free_constructor (tree t)
*** 1568,1577 ****
      }
  }
  
! static tree
! eval_and_check_array_index (const constexpr_ctx *ctx, tree t,
! 			    bool allow_one_past, bool *non_constant_p,
! 			    bool *overflow_p);
  
  // forked from gcc/cp/constexpr.cc cxx_eval_array_reference
  
--- 1553,1561 ----
      }
  }
  
! static tree eval_and_check_array_index (const constexpr_ctx *ctx, tree t,
! 					bool allow_one_past,
! 					bool *non_constant_p, bool *overflow_p);
  
  // forked from gcc/cp/constexpr.cc cxx_eval_array_reference
  
*************** eval_constant_expression (const constexp
*** 1901,1906 ****
--- 1885,1893 ----
  
    location_t loc = EXPR_LOCATION (t);
  
+   if (t == NULL_TREE)
+     return NULL_TREE;
+ 
    if (CONSTANT_CLASS_P (t))
      {
        if (TREE_OVERFLOW (t))
*************** eval_constant_expression (const constexp
*** 1936,1943 ****
  	  return eval_constant_expression (ctx, r, lval, non_constant_p,
  					   overflow_p);
  	}
!       /* fall through */
!       case CONST_DECL: {
  	/* We used to not check lval for CONST_DECL, but darwin.cc uses
  	   CONST_DECL for aggregate constants.  */
  	if (lval)
--- 1923,1931 ----
  	  return eval_constant_expression (ctx, r, lval, non_constant_p,
  					   overflow_p);
  	}
!     /* fall through */
!     case CONST_DECL:
!       {
  	/* We used to not check lval for CONST_DECL, but darwin.cc uses
  	   CONST_DECL for aggregate constants.  */
  	if (lval)
*************** eval_constant_expression (const constexp
*** 2045,2051 ****
  				   overflow_p);
        break;
  
!       case TARGET_EXPR: {
  	tree type = TREE_TYPE (t);
  
  	if (!literal_type_p (type))
--- 2033,2040 ----
  				   overflow_p);
        break;
  
!     case TARGET_EXPR:
!       {
  	tree type = TREE_TYPE (t);
  
  	if (!literal_type_p (type))
*************** eval_constant_expression (const constexp
*** 2129,2135 ****
  	}
        break;
  
!       case DECL_EXPR: {
  	r = DECL_EXPR_DECL (t);
  
  	if (AGGREGATE_TYPE_P (TREE_TYPE (r)) || VECTOR_TYPE_P (TREE_TYPE (r)))
--- 2118,2125 ----
  	}
        break;
  
!     case DECL_EXPR:
!       {
  	r = DECL_EXPR_DECL (t);
  
  	if (AGGREGATE_TYPE_P (TREE_TYPE (r)) || VECTOR_TYPE_P (TREE_TYPE (r)))
*************** eval_constant_expression (const constexp
*** 2201,2207 ****
        return eval_constant_expression (ctx, OBJ_TYPE_REF_EXPR (t), lval,
  				       non_constant_p, overflow_p);
  
!       case EXIT_EXPR: {
  	tree cond = TREE_OPERAND (t, 0);
  	cond = eval_constant_expression (ctx, cond, /*lval*/ false,
  					 non_constant_p, overflow_p);
--- 2191,2198 ----
        return eval_constant_expression (ctx, OBJ_TYPE_REF_EXPR (t), lval,
  				       non_constant_p, overflow_p);
  
!     case EXIT_EXPR:
!       {
  	tree cond = TREE_OPERAND (t, 0);
  	cond = eval_constant_expression (ctx, cond, /*lval*/ false,
  					 non_constant_p, overflow_p);
*************** eval_constant_expression (const constexp
*** 2243,2249 ****
  	}
        break;
  
!       case ADDR_EXPR: {
  	tree oldop = TREE_OPERAND (t, 0);
  	tree op = eval_constant_expression (ctx, oldop,
  					    /*lval*/ true, non_constant_p,
--- 2234,2241 ----
  	}
        break;
  
!     case ADDR_EXPR:
!       {
  	tree oldop = TREE_OPERAND (t, 0);
  	tree op = eval_constant_expression (ctx, oldop,
  					    /*lval*/ true, non_constant_p,
*************** eval_constant_expression (const constexp
*** 2261,2267 ****
  	break;
        }
  
!       case COMPOUND_EXPR: {
  	/* check_return_expr sometimes wraps a TARGET_EXPR in a
  	   COMPOUND_EXPR; don't get confused.  Also handle EMPTY_CLASS_EXPR
  	   introduced by build_call_a.  */
--- 2253,2260 ----
  	break;
        }
  
!     case COMPOUND_EXPR:
!       {
  	/* check_return_expr sometimes wraps a TARGET_EXPR in a
  	   COMPOUND_EXPR; don't get confused.  Also handle EMPTY_CLASS_EXPR
  	   introduced by build_call_a.  */
*************** eval_constant_expression (const constexp
*** 2401,2407 ****
  				    non_constant_p, overflow_p, jump_target);
        break;
  
!       case CLEANUP_POINT_EXPR: {
  	auto_vec<tree, 2> cleanups;
  	vec<tree> *prev_cleanups = ctx->global->cleanups;
  	ctx->global->cleanups = &cleanups;
--- 2394,2401 ----
  				    non_constant_p, overflow_p, jump_target);
        break;
  
!     case CLEANUP_POINT_EXPR:
!       {
  	auto_vec<tree, 2> cleanups;
  	vec<tree> *prev_cleanups = ctx->global->cleanups;
  	ctx->global->cleanups = &cleanups;
*************** eval_constant_expression (const constexp
*** 2441,2447 ****
        /* FALLTHROUGH.  */
      case NOP_EXPR:
      case CONVERT_EXPR:
!       case VIEW_CONVERT_EXPR: {
  	tree oldop = TREE_OPERAND (t, 0);
  
  	tree op = eval_constant_expression (ctx, oldop, lval, non_constant_p,
--- 2435,2442 ----
        /* FALLTHROUGH.  */
      case NOP_EXPR:
      case CONVERT_EXPR:
!     case VIEW_CONVERT_EXPR:
!       {
  	tree oldop = TREE_OPERAND (t, 0);
  
  	tree op = eval_constant_expression (ctx, oldop, lval, non_constant_p,
*************** eval_store_expression (const constexpr_c
*** 2688,2694 ****
  	{
  	case BIT_FIELD_REF:
  	case COMPONENT_REF:
! 	  case ARRAY_REF: {
  	    tree ob = TREE_OPERAND (probe, 0);
  	    tree elt = TREE_OPERAND (probe, 1);
  	    if (TREE_CODE (elt) == FIELD_DECL /*&& DECL_MUTABLE_P (elt)*/)
--- 2683,2690 ----
  	{
  	case BIT_FIELD_REF:
  	case COMPONENT_REF:
! 	case ARRAY_REF:
! 	  {
  	    tree ob = TREE_OPERAND (probe, 0);
  	    tree elt = TREE_OPERAND (probe, 1);
  	    if (TREE_CODE (elt) == FIELD_DECL /*&& DECL_MUTABLE_P (elt)*/)
*************** constexpr_fn_retval (const constexpr_ctx
*** 3940,3946 ****
  {
    switch (TREE_CODE (body))
      {
!       case STATEMENT_LIST: {
  	tree expr = NULL_TREE;
  	for (tree stmt : tsi_range (body))
  	  {
--- 3936,3943 ----
  {
    switch (TREE_CODE (body))
      {
!     case STATEMENT_LIST:
!       {
  	tree expr = NULL_TREE;
  	for (tree stmt : tsi_range (body))
  	  {
*************** constexpr_fn_retval (const constexpr_ctx
*** 3958,3970 ****
  	return expr;
        }
  
!       case RETURN_EXPR: {
  	bool non_constant_p = false;
  	bool overflow_p = false;
  	return eval_constant_expression (ctx, body, false, &non_constant_p,
  					 &overflow_p);
        }
!       case DECL_EXPR: {
  	tree decl = DECL_EXPR_DECL (body);
  	if (TREE_CODE (decl) == USING_DECL
  	    /* Accept __func__, __FUNCTION__, and __PRETTY_FUNCTION__.  */
--- 3955,3969 ----
  	return expr;
        }
  
!     case RETURN_EXPR:
!       {
  	bool non_constant_p = false;
  	bool overflow_p = false;
  	return eval_constant_expression (ctx, body, false, &non_constant_p,
  					 &overflow_p);
        }
!     case DECL_EXPR:
!       {
  	tree decl = DECL_EXPR_DECL (body);
  	if (TREE_CODE (decl) == USING_DECL
  	    /* Accept __func__, __FUNCTION__, and __PRETTY_FUNCTION__.  */
*************** constexpr_fn_retval (const constexpr_ctx
*** 3976,3982 ****
      case CLEANUP_POINT_EXPR:
        return constexpr_fn_retval (ctx, TREE_OPERAND (body, 0));
  
!       case BIND_EXPR: {
  	tree b = BIND_EXPR_BODY (body);
  	return constexpr_fn_retval (ctx, b);
        }
--- 3975,3982 ----
      case CLEANUP_POINT_EXPR:
        return constexpr_fn_retval (ctx, TREE_OPERAND (body, 0));
  
!     case BIND_EXPR:
!       {
  	tree b = BIND_EXPR_BODY (body);
  	return constexpr_fn_retval (ctx, b);
        }
*************** array_index_cmp (tree key, tree index)
*** 4136,4142 ****
      {
      case INTEGER_CST:
        return tree_int_cst_compare (key, index);
!       case RANGE_EXPR: {
  	tree lo = TREE_OPERAND (index, 0);
  	tree hi = TREE_OPERAND (index, 1);
  	if (tree_int_cst_lt (key, lo))
--- 4136,4143 ----
      {
      case INTEGER_CST:
        return tree_int_cst_compare (key, index);
!     case RANGE_EXPR:
!       {
  	tree lo = TREE_OPERAND (index, 0);
  	tree hi = TREE_OPERAND (index, 1);
  	if (tree_int_cst_lt (key, lo))
*************** potential_constant_expression_1 (tree t,
*** 5943,5949 ****
      case BIT_FIELD_REF:
        return RECUR (TREE_OPERAND (t, 0), want_rval);
  
!       case INDIRECT_REF: {
  	tree x = TREE_OPERAND (t, 0);
  	STRIP_NOPS (x);
  	return RECUR (x, rval);
--- 5944,5951 ----
      case BIT_FIELD_REF:
        return RECUR (TREE_OPERAND (t, 0), want_rval);
  
!     case INDIRECT_REF:
!       {
  	tree x = TREE_OPERAND (t, 0);
  	STRIP_NOPS (x);
  	return RECUR (x, rval);
*************** potential_constant_expression_1 (tree t,
*** 6214,6220 ****
      case INIT_EXPR:
        return RECUR (TREE_OPERAND (t, 1), rval);
  
!       case CONSTRUCTOR: {
  	vec<constructor_elt, va_gc> *v = CONSTRUCTOR_ELTS (t);
  	constructor_elt *ce;
  	for (i = 0; vec_safe_iterate (v, i, &ce); ++i)
--- 6216,6223 ----
      case INIT_EXPR:
        return RECUR (TREE_OPERAND (t, 1), rval);
  
!     case CONSTRUCTOR:
!       {
  	vec<constructor_elt, va_gc> *v = CONSTRUCTOR_ELTS (t);
  	constructor_elt *ce;
  	for (i = 0; vec_safe_iterate (v, i, &ce); ++i)
*************** potential_constant_expression_1 (tree t,
*** 6223,6229 ****
  	return true;
        }
  
!       case TREE_LIST: {
  	gcc_assert (TREE_PURPOSE (t) == NULL_TREE || DECL_P (TREE_PURPOSE (t)));
  	if (!RECUR (TREE_VALUE (t), want_rval))
  	  return false;
--- 6226,6233 ----
  	return true;
        }
  
!     case TREE_LIST:
!       {
  	gcc_assert (TREE_PURPOSE (t) == NULL_TREE || DECL_P (TREE_PURPOSE (t)));
  	if (!RECUR (TREE_VALUE (t), want_rval))
  	  return false;
*************** potential_constant_expression_1 (tree t,
*** 6238,6244 ****
      case ROUND_DIV_EXPR:
      case TRUNC_MOD_EXPR:
      case CEIL_MOD_EXPR:
!       case ROUND_MOD_EXPR: {
  	tree denom = TREE_OPERAND (t, 1);
  	if (!RECUR (denom, rval))
  	  return false;
--- 6242,6249 ----
      case ROUND_DIV_EXPR:
      case TRUNC_MOD_EXPR:
      case CEIL_MOD_EXPR:
!     case ROUND_MOD_EXPR:
!       {
  	tree denom = TREE_OPERAND (t, 1);
  	if (!RECUR (denom, rval))
  	  return false;
*************** potential_constant_expression_1 (tree t,
*** 6258,6264 ****
  	  }
        }
  
!       case COMPOUND_EXPR: {
  	/* check_return_expr sometimes wraps a TARGET_EXPR in a
  	   COMPOUND_EXPR; don't get confused.  */
  	tree op0 = TREE_OPERAND (t, 0);
--- 6263,6270 ----
  	  }
        }
  
!     case COMPOUND_EXPR:
!       {
  	/* check_return_expr sometimes wraps a TARGET_EXPR in a
  	   COMPOUND_EXPR; don't get confused.  */
  	tree op0 = TREE_OPERAND (t, 0);
*************** potential_constant_expression_1 (tree t,
*** 6280,6286 ****
      case TRUTH_OR_EXPR:
      case TRUTH_ORIF_EXPR:
        tmp = boolean_false_node;
!       truth : {
  	tree op0 = TREE_OPERAND (t, 0);
  	tree op1 = TREE_OPERAND (t, 1);
  	if (!RECUR (op0, rval))
--- 6286,6293 ----
      case TRUTH_OR_EXPR:
      case TRUTH_ORIF_EXPR:
        tmp = boolean_false_node;
!     truth:
!       {
  	tree op0 = TREE_OPERAND (t, 0);
  	tree op1 = TREE_OPERAND (t, 1);
  	if (!RECUR (op0, rval))
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-constexpr.h gcc-16-20250810/gcc/rust/backend/rust-constexpr.h
*** gcc-16-20250803/gcc/rust/backend/rust-constexpr.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-constexpr.h	Sun Aug 10 22:32:08 2025
*************** namespace Rust {
*** 24,31 ****
  namespace Compile {
  
  extern tree fold_expr (tree);
! extern void
! maybe_save_constexpr_fundef (tree fun);
  
  } // namespace Compile
  } // namespace Rust
--- 24,30 ----
  namespace Compile {
  
  extern tree fold_expr (tree);
! extern void maybe_save_constexpr_fundef (tree fun);
  
  } // namespace Compile
  } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-mangle-v0.cc gcc-16-20250810/gcc/rust/backend/rust-mangle-v0.cc
*** gcc-16-20250803/gcc/rust/backend/rust-mangle-v0.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-mangle-v0.cc	Sun Aug 10 22:32:08 2025
*************** struct V0Path
*** 62,70 ****
    }
  };
  
! static std::string
! v0_path (Rust::Compile::Context *ctx, const TyTy::BaseType *ty,
! 	 const Resolver::CanonicalPath &path);
  
  static std::string
  v0_tuple_prefix (const TyTy::BaseType *ty)
--- 62,70 ----
    }
  };
  
! static std::string v0_path (Rust::Compile::Context *ctx,
! 			    const TyTy::BaseType *ty,
! 			    const Resolver::CanonicalPath &path);
  
  static std::string
  v0_tuple_prefix (const TyTy::BaseType *ty)
*************** v0_complex_type_prefix (Context *ctx, co
*** 148,154 ****
    // TODO: generics
    switch (ty->get_kind ())
      {
!       case TyTy::TypeKind::ADT: {
  	const TyTy::ADTType *adt = static_cast<const TyTy::ADTType *> (ty);
  	return v0_path (ctx, ty, adt->get_ident ().path);
        }
--- 148,155 ----
    // TODO: generics
    switch (ty->get_kind ())
      {
!     case TyTy::TypeKind::ADT:
!       {
  	const TyTy::ADTType *adt = static_cast<const TyTy::ADTType *> (ty);
  	return v0_path (ctx, ty, adt->get_ident ().path);
        }
*************** v0_path (Rust::Compile::Context *ctx, co
*** 387,393 ****
        {
  	switch (impl_item->first->get_impl_item_type ())
  	  {
! 	    case HIR::ImplItem::FUNCTION: {
  	      HIR::Function *fn
  		= static_cast<HIR::Function *> (impl_item->first);
  	      v0path
--- 388,395 ----
        {
  	switch (impl_item->first->get_impl_item_type ())
  	  {
! 	  case HIR::ImplItem::FUNCTION:
! 	    {
  	      HIR::Function *fn
  		= static_cast<HIR::Function *> (impl_item->first);
  	      v0path
*************** v0_path (Rust::Compile::Context *ctx, co
*** 408,414 ****
        {
  	switch (trait_item.value ()->get_item_kind ())
  	  {
! 	    case HIR::TraitItem::FUNC: {
  	      auto fn = static_cast<HIR::TraitItemFunc *> (*trait_item);
  	      rust_unreachable ();
  	      v0path = v0_function_path (v0path, ctx, ty,
--- 410,417 ----
        {
  	switch (trait_item.value ()->get_item_kind ())
  	  {
! 	  case HIR::TraitItem::FUNC:
! 	    {
  	      auto fn = static_cast<HIR::TraitItemFunc *> (*trait_item);
  	      rust_unreachable ();
  	      v0path = v0_function_path (v0path, ctx, ty,
*************** v0_path (Rust::Compile::Context *ctx, co
*** 428,434 ****
      else if (auto item = mappings.lookup_hir_item (hir_id))
        switch (item.value ()->get_item_kind ())
  	{
! 	  case HIR::Item::ItemKind::Function: {
  	    HIR::Function *fn = static_cast<HIR::Function *> (*item);
  	    v0path
  	      = v0_function_path (v0path, ctx, ty, fn->get_generic_params (),
--- 431,438 ----
      else if (auto item = mappings.lookup_hir_item (hir_id))
        switch (item.value ()->get_item_kind ())
  	{
! 	case HIR::Item::ItemKind::Function:
! 	  {
  	    HIR::Function *fn = static_cast<HIR::Function *> (*item);
  	    v0path
  	      = v0_function_path (v0path, ctx, ty, fn->get_generic_params (),
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-mangle.h gcc-16-20250810/gcc/rust/backend/rust-mangle.h
*** gcc-16-20250803/gcc/rust/backend/rust-mangle.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-mangle.h	Sun Aug 10 22:32:08 2025
*************** private:
*** 49,61 ****
    static enum MangleVersion version;
  };
  
! std::string
! legacy_mangle_item (const TyTy::BaseType *ty,
! 		    const Resolver::CanonicalPath &path);
  
! std::string
! v0_mangle_item (Rust::Compile::Context *ctx, const TyTy::BaseType *ty,
! 		const Resolver::CanonicalPath &path);
  
  } // namespace Compile
  } // namespace Rust
--- 49,60 ----
    static enum MangleVersion version;
  };
  
! std::string legacy_mangle_item (const TyTy::BaseType *ty,
! 				const Resolver::CanonicalPath &path);
  
! std::string v0_mangle_item (Rust::Compile::Context *ctx,
! 			    const TyTy::BaseType *ty,
! 			    const Resolver::CanonicalPath &path);
  
  } // namespace Compile
  } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-tree.cc gcc-16-20250810/gcc/rust/backend/rust-tree.cc
*** gcc-16-20250803/gcc/rust/backend/rust-tree.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-tree.cc	Sun Aug 10 22:32:08 2025
*************** convert_to_void (tree expr, impl_conv_vo
*** 268,274 ****
      return expr;
    switch (TREE_CODE (expr))
      {
!       case COND_EXPR: {
  	/* The two parts of a cond expr might be separate lvalues.  */
  	tree op1 = TREE_OPERAND (expr, 1);
  	tree op2 = TREE_OPERAND (expr, 2);
--- 268,275 ----
      return expr;
    switch (TREE_CODE (expr))
      {
!     case COND_EXPR:
!       {
  	/* The two parts of a cond expr might be separate lvalues.  */
  	tree op1 = TREE_OPERAND (expr, 1);
  	tree op2 = TREE_OPERAND (expr, 2);
*************** convert_to_void (tree expr, impl_conv_vo
*** 294,300 ****
  	break;
        }
  
!       case COMPOUND_EXPR: {
  	/* The second part of a compound expr contains the value.  */
  	tree op1 = TREE_OPERAND (expr, 1);
  	tree new_op1;
--- 295,302 ----
  	break;
        }
  
!     case COMPOUND_EXPR:
!       {
  	/* The second part of a compound expr contains the value.  */
  	tree op1 = TREE_OPERAND (expr, 1);
  	tree new_op1;
*************** convert_to_void (tree expr, impl_conv_vo
*** 323,329 ****
        maybe_warn_nodiscard (expr, implicit);
        break;
  
!       case INDIRECT_REF: {
  	tree type = TREE_TYPE (expr);
  	int is_reference = TYPE_REF_P (TREE_TYPE (TREE_OPERAND (expr, 0)));
  	int is_volatile = TYPE_VOLATILE (type);
--- 325,332 ----
        maybe_warn_nodiscard (expr, implicit);
        break;
  
!     case INDIRECT_REF:
!       {
  	tree type = TREE_TYPE (expr);
  	int is_reference = TYPE_REF_P (TREE_TYPE (TREE_OPERAND (expr, 0)));
  	int is_volatile = TYPE_VOLATILE (type);
*************** convert_to_void (tree expr, impl_conv_vo
*** 518,524 ****
  	break;
        }
  
!       case VAR_DECL: {
  	/* External variables might be incomplete.  */
  	tree type = TREE_TYPE (expr);
  	int is_complete = COMPLETE_TYPE_P (type);
--- 521,528 ----
  	break;
        }
  
!     case VAR_DECL:
!       {
  	/* External variables might be incomplete.  */
  	tree type = TREE_TYPE (expr);
  	int is_complete = COMPLETE_TYPE_P (type);
*************** find_parameter_packs_r (tree *tp, int *w
*** 1485,1491 ****
       parameter pack.  ??? Should some of these be in cp_walk_subtrees?  */
    switch (TREE_CODE (t))
      {
!       case DECL_EXPR: {
  	tree decl = DECL_EXPR_DECL (t);
  	if (is_typedef_decl (decl))
  	  /* Since we stop at typedefs above, we need to look through them at
--- 1489,1496 ----
       parameter pack.  ??? Should some of these be in cp_walk_subtrees?  */
    switch (TREE_CODE (t))
      {
!     case DECL_EXPR:
!       {
  	tree decl = DECL_EXPR_DECL (t);
  	if (is_typedef_decl (decl))
  	  /* Since we stop at typedefs above, we need to look through them at
*************** find_parameter_packs_r (tree *tp, int *w
*** 1506,1512 ****
        *walk_subtrees = 0;
        return NULL_TREE;
  
!       case DECLTYPE_TYPE: {
  	/* When traversing a DECLTYPE_TYPE_EXPR, we need to set
  	   type_pack_expansion_p to false so that any placeholders
  	   within the expression don't get marked as parameter packs.  */
--- 1511,1518 ----
        *walk_subtrees = 0;
        return NULL_TREE;
  
!     case DECLTYPE_TYPE:
!       {
  	/* When traversing a DECLTYPE_TYPE_EXPR, we need to set
  	   type_pack_expansion_p to false so that any placeholders
  	   within the expression don't get marked as parameter packs.  */
*************** rs_tree_equal (tree t1, tree t2)
*** 1970,1976 ****
      case SAVE_EXPR:
        return rs_tree_equal (TREE_OPERAND (t1, 0), TREE_OPERAND (t2, 0));
  
!       case CALL_EXPR: {
  	if (KOENIG_LOOKUP_P (t1) != KOENIG_LOOKUP_P (t2))
  	  return false;
  
--- 1976,1983 ----
      case SAVE_EXPR:
        return rs_tree_equal (TREE_OPERAND (t1, 0), TREE_OPERAND (t2, 0));
  
!     case CALL_EXPR:
!       {
  	if (KOENIG_LOOKUP_P (t1) != KOENIG_LOOKUP_P (t2))
  	  return false;
  
*************** rs_tree_equal (tree t1, tree t2)
*** 1996,2002 ****
  	return true;
        }
  
!       case TARGET_EXPR: {
  	tree o1 = TREE_OPERAND (t1, 0);
  	tree o2 = TREE_OPERAND (t2, 0);
  
--- 2003,2010 ----
  	return true;
        }
  
!     case TARGET_EXPR:
!       {
  	tree o1 = TREE_OPERAND (t1, 0);
  	tree o2 = TREE_OPERAND (t2, 0);
  
*************** rs_tree_equal (tree t1, tree t2)
*** 2067,2073 ****
      case tcc_expression:
      case tcc_vl_exp:
      case tcc_reference:
!       case tcc_statement: {
  	int n = rs_tree_operand_length (t1);
  	if (TREE_CODE_CLASS (code1) == tcc_vl_exp
  	    && n != TREE_OPERAND_LENGTH (t2))
--- 2075,2082 ----
      case tcc_expression:
      case tcc_vl_exp:
      case tcc_reference:
!     case tcc_statement:
!       {
  	int n = rs_tree_operand_length (t1);
  	if (TREE_CODE_CLASS (code1) == tcc_vl_exp
  	    && n != TREE_OPERAND_LENGTH (t2))
*************** rs_tree_equal (tree t1, tree t2)
*** 2095,2101 ****
  
  /* TRUE iff TYPE is publicly & uniquely derived from PARENT.  */
  
! bool publicly_uniquely_derived_p (tree, tree) { return false; }
  
  // forked from gcc/cp/typeck.cc comp_except_types
  
--- 2104,2114 ----
  
  /* TRUE iff TYPE is publicly & uniquely derived from PARENT.  */
  
! bool
! publicly_uniquely_derived_p (tree, tree)
! {
!   return false;
! }
  
  // forked from gcc/cp/typeck.cc comp_except_types
  
*************** release_tree_vector (vec<tree, va_gc> *v
*** 3375,3381 ****
  
  /* As above, but also check value-dependence of the expression as a whole.  */
  
! bool instantiation_dependent_expression_p (tree) { return false; }
  
  // forked from gcc/cp/cvt.cc cp_get_callee
  
--- 3388,3398 ----
  
  /* As above, but also check value-dependence of the expression as a whole.  */
  
! bool
! instantiation_dependent_expression_p (tree)
! {
!   return false;
! }
  
  // forked from gcc/cp/cvt.cc cp_get_callee
  
*************** scalarish_type_p (const_tree t)
*** 3425,3431 ****
     constructors are deleted.  This function implements the ABI notion of
     non-trivial copy, which has diverged from the one in the standard.  */
  
! bool type_has_nontrivial_copy_init (const_tree) { return false; }
  
  // forked from gcc/cp/tree.cc build_local_temp
  
--- 3442,3452 ----
     constructors are deleted.  This function implements the ABI notion of
     non-trivial copy, which has diverged from the one in the standard.  */
  
! bool
! type_has_nontrivial_copy_init (const_tree)
! {
!   return false;
! }
  
  // forked from gcc/cp/tree.cc build_local_temp
  
*************** build_local_temp (tree type)
*** 3448,3454 ****
  /* Returns true iff DECL is a capture proxy for a normal capture
     (i.e. without explicit initializer).  */
  
! bool is_normal_capture_proxy (tree) { return false; }
  
  // forked from gcc/cp/c-common.cc reject_gcc_builtin
  
--- 3469,3479 ----
  /* Returns true iff DECL is a capture proxy for a normal capture
     (i.e. without explicit initializer).  */
  
! bool
! is_normal_capture_proxy (tree)
! {
!   return false;
! }
  
  // forked from gcc/cp/c-common.cc reject_gcc_builtin
  
*************** is_bitfield_expr_with_lowered_type (cons
*** 3522,3528 ****
      case BIT_NOT_EXPR:
        return is_bitfield_expr_with_lowered_type (TREE_OPERAND (exp, 0));
  
!       case COMPONENT_REF: {
  	tree field;
  
  	field = TREE_OPERAND (exp, 1);
--- 3547,3554 ----
      case BIT_NOT_EXPR:
        return is_bitfield_expr_with_lowered_type (TREE_OPERAND (exp, 0));
  
!     case COMPONENT_REF:
!       {
  	tree field;
  
  	field = TREE_OPERAND (exp, 1);
*************** retry:
*** 3909,3915 ****
        break;
  
      case OFFSET_TYPE:
!       bad_member : {
  	tree member = TREE_OPERAND (value, 1);
  	if (is_overloaded_fn (member))
  	  member = get_first_fn (member);
--- 3935,3942 ----
        break;
  
      case OFFSET_TYPE:
!     bad_member:
!       {
  	tree member = TREE_OPERAND (value, 1);
  	if (is_overloaded_fn (member))
  	  member = get_first_fn (member);
*************** decl_constant_var_p (tree decl)
*** 3994,4006 ****
  /* Returns true iff DECL is a variable or function declared with an auto type
     that has not yet been deduced to a real type.  */
  
! bool undeduced_auto_decl (tree) { return false; }
  
  // forked from gcc/cp/decl.cc require_deduced_type
  
  /* Complain if DECL has an undeduced return type.  */
  
! bool require_deduced_type (tree, tsubst_flags_t) { return true; }
  
  /* Return the location of a tree passed to %+ formats.  */
  
--- 4021,4041 ----
  /* Returns true iff DECL is a variable or function declared with an auto type
     that has not yet been deduced to a real type.  */
  
! bool
! undeduced_auto_decl (tree)
! {
!   return false;
! }
  
  // forked from gcc/cp/decl.cc require_deduced_type
  
  /* Complain if DECL has an undeduced return type.  */
  
! bool
! require_deduced_type (tree, tsubst_flags_t)
! {
!   return true;
! }
  
  /* Return the location of a tree passed to %+ formats.  */
  
*************** struct GTY ((for_user)) source_location_
*** 4290,4299 ****
  
  } // namespace Rust
  
! extern void
! gt_pch_nx (Rust::source_location_table_entry &);
! extern void
! gt_pch_nx (Rust::source_location_table_entry *, gt_pointer_operator, void *);
  
  namespace Rust {
  
--- 4325,4333 ----
  
  } // namespace Rust
  
! extern void gt_pch_nx (Rust::source_location_table_entry &);
! extern void gt_pch_nx (Rust::source_location_table_entry *, gt_pointer_operator,
! 		       void *);
  
  namespace Rust {
  
*************** lvalue_kind (const_tree ref)
*** 4421,4427 ****
      case VIEW_CONVERT_EXPR:
        return lvalue_kind (TREE_OPERAND (ref, 0));
  
!       case ARRAY_REF: {
  	tree op1 = TREE_OPERAND (ref, 0);
  	if (TREE_CODE (TREE_TYPE (op1)) == ARRAY_TYPE)
  	  {
--- 4455,4462 ----
      case VIEW_CONVERT_EXPR:
        return lvalue_kind (TREE_OPERAND (ref, 0));
  
!     case ARRAY_REF:
!       {
  	tree op1 = TREE_OPERAND (ref, 0);
  	if (TREE_CODE (TREE_TYPE (op1)) == ARRAY_TYPE)
  	  {
*************** lvalue_kind (const_tree ref)
*** 4518,4524 ****
        op2_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 1));
        break;
  
!       case COND_EXPR: {
  	tree op1 = TREE_OPERAND (ref, 1);
  	if (!op1)
  	  op1 = TREE_OPERAND (ref, 0);
--- 4553,4560 ----
        op2_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 1));
        break;
  
!     case COND_EXPR:
!       {
  	tree op1 = TREE_OPERAND (ref, 1);
  	if (!op1)
  	  op1 = TREE_OPERAND (ref, 0);
diff -Nrcpad gcc-16-20250803/gcc/rust/backend/rust-tree.h gcc-16-20250810/gcc/rust/backend/rust-tree.h
*** gcc-16-20250803/gcc/rust/backend/rust-tree.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/backend/rust-tree.h	Sun Aug 10 22:32:08 2025
*************** extern GTY (()) tree cp_global_trees[CPT
*** 1543,1549 ****
  #if defined ENABLE_TREE_CHECKING
  
  #define LANG_DECL_MIN_CHECK(NODE)                                              \
!   __extension__({                                                              \
      struct lang_decl *lt = DECL_LANG_SPECIFIC (NODE);                          \
      if (!LANG_DECL_HAS_MIN (NODE))                                             \
        lang_check_failed (__FILE__, __LINE__, __FUNCTION__);                    \
--- 1543,1549 ----
  #if defined ENABLE_TREE_CHECKING
  
  #define LANG_DECL_MIN_CHECK(NODE)                                              \
!   __extension__ ({                                                             \
      struct lang_decl *lt = DECL_LANG_SPECIFIC (NODE);                          \
      if (!LANG_DECL_HAS_MIN (NODE))                                             \
        lang_check_failed (__FILE__, __LINE__, __FUNCTION__);                    \
*************** extern GTY (()) tree cp_global_trees[CPT
*** 1554,1560 ****
     template, not just on a FUNCTION_DECL.  So when looking for things in
     lang_decl_fn, look down through a TEMPLATE_DECL into its result.  */
  #define LANG_DECL_FN_CHECK(NODE)                                               \
!   __extension__({                                                              \
      struct lang_decl *lt = DECL_LANG_SPECIFIC (NODE);                          \
      if (!DECL_DECLARES_FUNCTION_P (NODE) || lt->u.base.selector != lds_fn)     \
        lang_check_failed (__FILE__, __LINE__, __FUNCTION__);                    \
--- 1554,1560 ----
     template, not just on a FUNCTION_DECL.  So when looking for things in
     lang_decl_fn, look down through a TEMPLATE_DECL into its result.  */
  #define LANG_DECL_FN_CHECK(NODE)                                               \
!   __extension__ ({                                                             \
      struct lang_decl *lt = DECL_LANG_SPECIFIC (NODE);                          \
      if (!DECL_DECLARES_FUNCTION_P (NODE) || lt->u.base.selector != lds_fn)     \
        lang_check_failed (__FILE__, __LINE__, __FUNCTION__);                    \
*************** extern GTY (()) tree cp_global_trees[CPT
*** 1562,1568 ****
    })
  
  #define LANG_DECL_NS_CHECK(NODE)                                               \
!   __extension__({                                                              \
      struct lang_decl *lt = DECL_LANG_SPECIFIC (NODE);                          \
      if (TREE_CODE (NODE) != NAMESPACE_DECL || lt->u.base.selector != lds_ns)   \
        lang_check_failed (__FILE__, __LINE__, __FUNCTION__);                    \
--- 1562,1568 ----
    })
  
  #define LANG_DECL_NS_CHECK(NODE)                                               \
!   __extension__ ({                                                             \
      struct lang_decl *lt = DECL_LANG_SPECIFIC (NODE);                          \
      if (TREE_CODE (NODE) != NAMESPACE_DECL || lt->u.base.selector != lds_ns)   \
        lang_check_failed (__FILE__, __LINE__, __FUNCTION__);                    \
*************** extern GTY (()) tree cp_global_trees[CPT
*** 1570,1576 ****
    })
  
  #define LANG_DECL_PARM_CHECK(NODE)                                             \
!   __extension__({                                                              \
      struct lang_decl *lt = DECL_LANG_SPECIFIC (NODE);                          \
      if (TREE_CODE (NODE) != PARM_DECL || lt->u.base.selector != lds_parm)      \
        lang_check_failed (__FILE__, __LINE__, __FUNCTION__);                    \
--- 1570,1576 ----
    })
  
  #define LANG_DECL_PARM_CHECK(NODE)                                             \
!   __extension__ ({                                                             \
      struct lang_decl *lt = DECL_LANG_SPECIFIC (NODE);                          \
      if (TREE_CODE (NODE) != PARM_DECL || lt->u.base.selector != lds_parm)      \
        lang_check_failed (__FILE__, __LINE__, __FUNCTION__);                    \
*************** extern GTY (()) tree cp_global_trees[CPT
*** 1578,1584 ****
    })
  
  #define LANG_DECL_DECOMP_CHECK(NODE)                                           \
!   __extension__({                                                              \
      struct lang_decl *lt = DECL_LANG_SPECIFIC (NODE);                          \
      if (!VAR_P (NODE) || lt->u.base.selector != lds_decomp)                    \
        lang_check_failed (__FILE__, __LINE__, __FUNCTION__);                    \
--- 1578,1584 ----
    })
  
  #define LANG_DECL_DECOMP_CHECK(NODE)                                           \
!   __extension__ ({                                                             \
      struct lang_decl *lt = DECL_LANG_SPECIFIC (NODE);                          \
      if (!VAR_P (NODE) || lt->u.base.selector != lds_decomp)                    \
        lang_check_failed (__FILE__, __LINE__, __FUNCTION__);                    \
*************** struct GTY (()) rust_cxx_saved_binding
*** 2060,2067 ****
  // forked from gcc/cp/name-lookup.h resort_type_member_vec
  
  /* needed for GTY annotation */
! extern void
! resort_type_member_vec (void *, void *, gt_pointer_operator, void *);
  
  // forked from gcc/cp/cp-tree.h saved_scope
  
--- 2060,2067 ----
  // forked from gcc/cp/name-lookup.h resort_type_member_vec
  
  /* needed for GTY annotation */
! extern void resort_type_member_vec (void *, void *, gt_pointer_operator,
! 				    void *);
  
  // forked from gcc/cp/cp-tree.h saved_scope
  
*************** enum compare_bounds_t
*** 2895,2902 ****
    bounds_first
  };
  
! extern tree
! convert_to_void (tree expr, impl_conv_void implicit);
  
  // The lvalue-to-rvalue conversion (7.1) is applied if and only if the
  // expression is a glvalue of volatile-qualified type and it is one of the
--- 2895,2901 ----
    bounds_first
  };
  
! extern tree convert_to_void (tree expr, impl_conv_void implicit);
  
  // The lvalue-to-rvalue conversion (7.1) is applied if and only if the
  // expression is a glvalue of volatile-qualified type and it is one of the
*************** convert_to_void (tree expr, impl_conv_vo
*** 2911,2973 ****
  //   operands are one of these expressions, or
  // * comma expression (8.19) where the right operand is one of these
  //   expressions.
! extern tree
! mark_discarded_use (tree expr);
  
  // Mark EXP as read, not just set, for set but not used -Wunused warning
  // purposes.
! extern void
! mark_exp_read (tree exp);
  
  // We've seen an actual use of EXPR.  Possibly replace an outer variable
  // reference inside with its constant value or a lambda capture.
! extern tree
! mark_use (tree expr, bool rvalue_p, bool read_p, location_t loc,
! 	  bool reject_builtin);
  
  // Called whenever the expression EXPR is used in an rvalue context.
  // When REJECT_BUILTIN is true the expression is checked to make sure
  // it doesn't make it possible to obtain the address of a GCC built-in
  // function with no library fallback (or any of its bits, such as in
  // a conversion to bool).
! extern tree
! mark_rvalue_use (tree, location_t = UNKNOWN_LOCATION,
! 		 bool reject_builtin = true);
  
  // Called whenever an expression is used in an lvalue context.
! extern tree
! mark_lvalue_use (tree expr);
  
  // As above, but don't consider this use a read.
! extern tree
! mark_lvalue_use_nonread (tree expr);
  
  // We are using a reference VAL for its value. Bash that reference all the way
  // down to its lowest form.
! extern tree
! convert_from_reference (tree val);
  
  // Subroutine of convert_to_void.  Warn if we're discarding something with
  // attribute [[nodiscard]].
! extern void
! maybe_warn_nodiscard (tree expr, impl_conv_void implicit);
  
! extern location_t
! expr_loc_or_loc (const_tree t, location_t or_loc);
  
! extern location_t
! expr_loc_or_input_loc (const_tree t);
  
  // FN is the callee of a CALL_EXPR or AGGR_INIT_EXPR; return the FUNCTION_DECL
  // if we can.
! extern tree
! get_fndecl_from_callee (tree fn);
  
  // FIXME some helpers from HIRCompileBase could probably be moved here over time
  
  // Return an expression for the address of BASE[INDEX], used in offset intrinsic
! extern tree
! pointer_offset_expression (tree base_tree, tree index_tree, location_t locus);
  
  /* A tree node, together with a location, so that we can track locations
     (and ranges) during parsing.
--- 2910,2961 ----
  //   operands are one of these expressions, or
  // * comma expression (8.19) where the right operand is one of these
  //   expressions.
! extern tree mark_discarded_use (tree expr);
  
  // Mark EXP as read, not just set, for set but not used -Wunused warning
  // purposes.
! extern void mark_exp_read (tree exp);
  
  // We've seen an actual use of EXPR.  Possibly replace an outer variable
  // reference inside with its constant value or a lambda capture.
! extern tree mark_use (tree expr, bool rvalue_p, bool read_p, location_t loc,
! 		      bool reject_builtin);
  
  // Called whenever the expression EXPR is used in an rvalue context.
  // When REJECT_BUILTIN is true the expression is checked to make sure
  // it doesn't make it possible to obtain the address of a GCC built-in
  // function with no library fallback (or any of its bits, such as in
  // a conversion to bool).
! extern tree mark_rvalue_use (tree, location_t = UNKNOWN_LOCATION,
! 			     bool reject_builtin = true);
  
  // Called whenever an expression is used in an lvalue context.
! extern tree mark_lvalue_use (tree expr);
  
  // As above, but don't consider this use a read.
! extern tree mark_lvalue_use_nonread (tree expr);
  
  // We are using a reference VAL for its value. Bash that reference all the way
  // down to its lowest form.
! extern tree convert_from_reference (tree val);
  
  // Subroutine of convert_to_void.  Warn if we're discarding something with
  // attribute [[nodiscard]].
! extern void maybe_warn_nodiscard (tree expr, impl_conv_void implicit);
  
! extern location_t expr_loc_or_loc (const_tree t, location_t or_loc);
  
! extern location_t expr_loc_or_input_loc (const_tree t);
  
  // FN is the callee of a CALL_EXPR or AGGR_INIT_EXPR; return the FUNCTION_DECL
  // if we can.
! extern tree get_fndecl_from_callee (tree fn);
  
  // FIXME some helpers from HIRCompileBase could probably be moved here over time
  
  // Return an expression for the address of BASE[INDEX], used in offset intrinsic
! extern tree pointer_offset_expression (tree base_tree, tree index_tree,
! 				       location_t locus);
  
  /* A tree node, together with a location, so that we can track locations
     (and ranges) during parsing.
*************** pointer_offset_expression (tree base_tre
*** 2978,2988 ****
  
  extern location_t rs_expr_location (const_tree);
  
! extern int
! is_empty_class (tree type);
  
! extern bool
! is_really_empty_class (tree, bool);
  
  extern bool builtin_valid_in_constant_expr_p (const_tree);
  
--- 2966,2974 ----
  
  extern location_t rs_expr_location (const_tree);
  
! extern int is_empty_class (tree type);
  
! extern bool is_really_empty_class (tree, bool);
  
  extern bool builtin_valid_in_constant_expr_p (const_tree);
  
*************** extern bool maybe_constexpr_fn (tree);
*** 2990,3004 ****
  
  extern bool var_in_maybe_constexpr_fn (tree);
  
! extern int
! rs_type_quals (const_tree type);
  
  inline bool type_unknown_p (const_tree);
  
  extern bool decl_maybe_constant_var_p (tree);
  
! extern void
! init_modules ();
  
  extern bool var_in_constexpr_fn (tree);
  
--- 2976,2988 ----
  
  extern bool var_in_maybe_constexpr_fn (tree);
  
! extern int rs_type_quals (const_tree type);
  
  inline bool type_unknown_p (const_tree);
  
  extern bool decl_maybe_constant_var_p (tree);
  
! extern void init_modules ();
  
  extern bool var_in_constexpr_fn (tree);
  
*************** inline tree ovl_first (tree) ATTRIBUTE_P
*** 3006,3016 ****
  
  inline bool type_unknown_p (const_tree);
  
! extern tree
! lookup_add (tree fns, tree lookup);
  
! extern tree
! ovl_make (tree fn, tree next = NULL_TREE);
  
  extern int is_overloaded_fn (tree) ATTRIBUTE_PURE;
  
--- 2990,2998 ----
  
  inline bool type_unknown_p (const_tree);
  
! extern tree lookup_add (tree fns, tree lookup);
  
! extern tree ovl_make (tree fn, tree next = NULL_TREE);
  
  extern int is_overloaded_fn (tree) ATTRIBUTE_PURE;
  
*************** extern tree make_conv_op_name (tree);
*** 3024,3042 ****
  
  extern int type_memfn_quals (const_tree);
  
! struct c_fileinfo *
! get_fileinfo (const char *);
  
! extern tree
! cxx_make_type (enum tree_code CXX_MEM_STAT_INFO);
  
! extern tree
! build_cplus_array_type (tree, tree, int is_dep = -1);
  
  extern bool is_byte_access_type (tree);
  
! extern bool
! comptypes (tree, tree, int);
  
  extern tree canonical_eh_spec (tree);
  
--- 3006,3020 ----
  
  extern int type_memfn_quals (const_tree);
  
! struct c_fileinfo *get_fileinfo (const char *);
  
! extern tree cxx_make_type (enum tree_code CXX_MEM_STAT_INFO);
  
! extern tree build_cplus_array_type (tree, tree, int is_dep = -1);
  
  extern bool is_byte_access_type (tree);
  
! extern bool comptypes (tree, tree, int);
  
  extern tree canonical_eh_spec (tree);
  
*************** extern bool rs_tree_equal (tree, tree);
*** 3046,3053 ****
  
  extern bool compparms (const_tree, const_tree);
  
! extern tree
! rs_build_qualified_type_real (tree, int, tsubst_flags_t);
  #define rs_build_qualified_type(TYPE, QUALS)                                   \
    rs_build_qualified_type_real ((TYPE), (QUALS), tf_warning_or_error)
  extern bool cv_qualified_p (const_tree);
--- 3024,3030 ----
  
  extern bool compparms (const_tree, const_tree);
  
! extern tree rs_build_qualified_type_real (tree, int, tsubst_flags_t);
  #define rs_build_qualified_type(TYPE, QUALS)                                   \
    rs_build_qualified_type_real ((TYPE), (QUALS), tf_warning_or_error)
  extern bool cv_qualified_p (const_tree);
*************** extern bool similar_type_p (tree, tree);
*** 3056,3076 ****
  
  extern bool rs_tree_equal (tree, tree);
  
! extern bool
! vector_targets_convertible_p (const_tree t1, const_tree t2);
  
  extern bool same_type_ignoring_top_level_qualifiers_p (tree, tree);
  
  extern bool comp_ptr_ttypes_const (tree, tree, compare_bounds_t);
  
! extern tree
! get_class_binding_direct (tree, tree, bool want_type = false);
  
  extern tree skip_artificial_parms_for (const_tree, tree);
  
! extern void
! lang_check_failed (const char *, int,
! 		   const char *) ATTRIBUTE_NORETURN ATTRIBUTE_COLD;
  
  extern tree default_init_uninitialized_part (tree);
  
--- 3033,3050 ----
  
  extern bool rs_tree_equal (tree, tree);
  
! extern bool vector_targets_convertible_p (const_tree t1, const_tree t2);
  
  extern bool same_type_ignoring_top_level_qualifiers_p (tree, tree);
  
  extern bool comp_ptr_ttypes_const (tree, tree, compare_bounds_t);
  
! extern tree get_class_binding_direct (tree, tree, bool want_type = false);
  
  extern tree skip_artificial_parms_for (const_tree, tree);
  
! extern void lang_check_failed (const char *, int,
! 			       const char *) ATTRIBUTE_NORETURN ATTRIBUTE_COLD;
  
  extern tree default_init_uninitialized_part (tree);
  
*************** extern tree in_class_defaulted_default_c
*** 3088,3095 ****
  
  extern bool is_instantiation_of_constexpr (tree);
  
! extern bool
! check_for_uninitialized_const_var (tree, bool, tsubst_flags_t);
  
  extern bool reduced_constant_expression_p (tree);
  
--- 3062,3068 ----
  
  extern bool is_instantiation_of_constexpr (tree);
  
! extern bool check_for_uninitialized_const_var (tree, bool, tsubst_flags_t);
  
  extern bool reduced_constant_expression_p (tree);
  
*************** extern tree is_bitfield_expr_with_lowere
*** 3108,3126 ****
  
  extern tree convert_bitfield_to_declared_type (tree);
  
! extern tree
! cp_fold_maybe_rvalue (tree, bool);
  
  extern tree maybe_undo_parenthesized_ref (tree);
  
! extern tree
! fold_offsetof (tree, tree = size_type_node, tree_code ctx = ERROR_MARK);
  
  extern tree cp_truthvalue_conversion (tree, tsubst_flags_t);
  
! extern tree
! fold_non_dependent_expr (tree, tsubst_flags_t = tf_warning_or_error,
! 			 bool = false, tree = NULL_TREE);
  
  extern int char_type_p (tree);
  
--- 3081,3097 ----
  
  extern tree convert_bitfield_to_declared_type (tree);
  
! extern tree cp_fold_maybe_rvalue (tree, bool);
  
  extern tree maybe_undo_parenthesized_ref (tree);
  
! extern tree fold_offsetof (tree, tree = size_type_node,
! 			   tree_code ctx = ERROR_MARK);
  
  extern tree cp_truthvalue_conversion (tree, tsubst_flags_t);
  
! extern tree fold_non_dependent_expr (tree, tsubst_flags_t = tf_warning_or_error,
! 				     bool = false, tree = NULL_TREE);
  
  extern int char_type_p (tree);
  
*************** extern tree build_new_constexpr_heap_typ
*** 3163,3175 ****
  
  extern bool is_empty_field (tree);
  
! extern bool
! in_immediate_context ();
  
  extern tree cp_get_callee_fndecl_nofold (tree);
  
! extern bool
! cxx_mark_addressable (tree, bool = false);
  
  extern tree fold_builtin_source_location (location_t);
  
--- 3134,3144 ----
  
  extern bool is_empty_field (tree);
  
! extern bool in_immediate_context ();
  
  extern tree cp_get_callee_fndecl_nofold (tree);
  
! extern bool cxx_mark_addressable (tree, bool = false);
  
  extern tree fold_builtin_source_location (location_t);
  
*************** extern bool glvalue_p (const_tree);
*** 3183,3207 ****
  
  extern cp_lvalue_kind lvalue_kind (const_tree);
  
! extern tree
! decl_constant_value (tree, bool);
  
  extern tree lookup_enumerator (tree, tree);
  
! extern int
! is_class_type (tree, int);
  
  extern tree braced_lists_to_strings (tree, tree);
  
! extern tree
! fold_builtin_is_pointer_inverconvertible_with_class (location_t, int, tree *);
  
  extern bool layout_compatible_type_p (tree, tree);
  
  extern tree finish_underlying_type (tree);
  
! extern tree
! c_common_type_for_mode (machine_mode, int);
  
  extern bool std_layout_type_p (const_tree);
  
--- 3152,3173 ----
  
  extern cp_lvalue_kind lvalue_kind (const_tree);
  
! extern tree decl_constant_value (tree, bool);
  
  extern tree lookup_enumerator (tree, tree);
  
! extern int is_class_type (tree, int);
  
  extern tree braced_lists_to_strings (tree, tree);
  
! extern tree fold_builtin_is_pointer_inverconvertible_with_class (location_t,
! 								 int, tree *);
  
  extern bool layout_compatible_type_p (tree, tree);
  
  extern tree finish_underlying_type (tree);
  
! extern tree c_common_type_for_mode (machine_mode, int);
  
  extern bool std_layout_type_p (const_tree);
  
*************** extern void note_failed_type_completion_
*** 3213,3237 ****
  
  extern tree complete_type_or_maybe_complain (tree, tree, tsubst_flags_t);
  
! extern bool
! next_common_initial_seqence (tree &, tree &);
  
  extern bool null_member_pointer_value_p (tree);
  
! extern tree
! fold_builtin_is_corresponding_member (location_t, int, tree *);
  
  extern tree cp_fold_rvalue (tree);
  
! extern tree
! maybe_constant_value (tree, tree = NULL_TREE, bool = false);
  
  extern tree lvalue_type (tree);
  
  extern void lvalue_error (location_t, enum lvalue_use);
  
! extern tree
! cp_fold_maybe_rvalue (tree, bool);
  
  extern tree get_first_fn (tree) ATTRIBUTE_PURE;
  
--- 3179,3199 ----
  
  extern tree complete_type_or_maybe_complain (tree, tree, tsubst_flags_t);
  
! extern bool next_common_initial_seqence (tree &, tree &);
  
  extern bool null_member_pointer_value_p (tree);
  
! extern tree fold_builtin_is_corresponding_member (location_t, int, tree *);
  
  extern tree cp_fold_rvalue (tree);
  
! extern tree maybe_constant_value (tree, tree = NULL_TREE, bool = false);
  
  extern tree lvalue_type (tree);
  
  extern void lvalue_error (location_t, enum lvalue_use);
  
! extern tree cp_fold_maybe_rvalue (tree, bool);
  
  extern tree get_first_fn (tree) ATTRIBUTE_PURE;
  
*************** enum
*** 3253,3265 ****
    ce_exact
  };
  
! extern tree
! rs_build_qualified_type_real (tree, int, tsubst_flags_t);
  #define rs_build_qualified_type(TYPE, QUALS)                                   \
    rs_build_qualified_type_real ((TYPE), (QUALS), tf_warning_or_error)
  
! extern tree
! rs_walk_subtrees (tree *, int *, walk_tree_fn, void *, hash_set<tree> *);
  #define rs_walk_tree(tp, func, data, pset)                                     \
    walk_tree_1 (tp, func, data, pset, rs_walk_subtrees)
  #define rs_walk_tree_without_duplicates(tp, func, data)                        \
--- 3215,3226 ----
    ce_exact
  };
  
! extern tree rs_build_qualified_type_real (tree, int, tsubst_flags_t);
  #define rs_build_qualified_type(TYPE, QUALS)                                   \
    rs_build_qualified_type_real ((TYPE), (QUALS), tf_warning_or_error)
  
! extern tree rs_walk_subtrees (tree *, int *, walk_tree_fn, void *,
! 			      hash_set<tree> *);
  #define rs_walk_tree(tp, func, data, pset)                                     \
    walk_tree_1 (tp, func, data, pset, rs_walk_subtrees)
  #define rs_walk_tree_without_duplicates(tp, func, data)                        \
*************** gnu_vector_type_p (const_tree type)
*** 3351,3361 ****
    return TREE_CODE (type) == VECTOR_TYPE && !TYPE_INDIVISIBLE_P (type);
  }
  
! extern vec<tree, va_gc> *
! make_tree_vector (void);
  
! extern void
! release_tree_vector (vec<tree, va_gc> *);
  
  /* Simplified unique_ptr clone to release a tree vec on exit.  */
  
--- 3312,3320 ----
    return TREE_CODE (type) == VECTOR_TYPE && !TYPE_INDIVISIBLE_P (type);
  }
  
! extern vec<tree, va_gc> *make_tree_vector (void);
  
! extern void release_tree_vector (vec<tree, va_gc> *);
  
  /* Simplified unique_ptr clone to release a tree vec on exit.  */
  
*************** public:
*** 3373,3379 ****
    releasing_vec &operator= (const releasing_vec &);
  
    vec_t &operator* () const { return *v; }
!   vec_t *operator-> () const { return v; }
    vec_t *get () const { return v; }
    operator vec_t * () const { return v; }
    vec_t **operator& () { return &v; }
--- 3332,3338 ----
    releasing_vec &operator= (const releasing_vec &);
  
    vec_t &operator* () const { return *v; }
!   vec_t *operator->() const { return v; }
    vec_t *get () const { return v; }
    operator vec_t * () const { return v; }
    vec_t **operator& () { return &v; }
*************** cxx_incomplete_type_error (const_tree va
*** 3442,3449 ****
    cxx_incomplete_type_diagnostic (value, type, diagnostics::kind::error);
  }
  
! extern location_t
! location_of (tree t);
  
  /* Helpers for IMPLICIT_RVALUE_P to look through automatic dereference.  */
  
--- 3401,3407 ----
    cxx_incomplete_type_diagnostic (value, type, diagnostics::kind::error);
  }
  
! extern location_t location_of (tree t);
  
  /* Helpers for IMPLICIT_RVALUE_P to look through automatic dereference.  */
  
*************** set_implicit_rvalue_p (tree ot)
*** 3465,3487 ****
  }
  
  namespace Compile {
! extern tree
! maybe_constant_init (tree, tree = NULL_TREE, bool = false);
  
! extern void
! explain_invalid_constexpr_fn (tree fun);
  
  extern bool potential_constant_expression (tree);
  
! extern bool
! literal_type_p (tree t);
  
! extern bool
! maybe_constexpr_fn (tree t);
  
! extern tree
! fold_non_dependent_init (tree, tsubst_flags_t = tf_warning_or_error,
! 			 bool = false, tree = NULL_TREE);
  } // namespace Compile
  
  } // namespace Rust
--- 3423,3440 ----
  }
  
  namespace Compile {
! extern tree maybe_constant_init (tree, tree = NULL_TREE, bool = false);
  
! extern void explain_invalid_constexpr_fn (tree fun);
  
  extern bool potential_constant_expression (tree);
  
! extern bool literal_type_p (tree t);
  
! extern bool maybe_constexpr_fn (tree t);
  
! extern tree fold_non_dependent_init (tree, tsubst_flags_t = tf_warning_or_error,
! 				     bool = false, tree = NULL_TREE);
  } // namespace Compile
  
  } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/borrowck/polonius/rust-polonius.h gcc-16-20250810/gcc/rust/checks/errors/borrowck/polonius/rust-polonius.h
*** gcc-16-20250803/gcc/rust/checks/errors/borrowck/polonius/rust-polonius.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/borrowck/polonius/rust-polonius.h	Sun Aug 10 22:32:08 2025
*************** struct Facts
*** 239,269 ****
   *
   * Output is not yet implemented and is only dumped to stdout.
   */
! extern "C" FFI::Output
! polonius_run (FFI::FactsView input, bool dump_enabled);
  
  // Helper functions for FFIVector to be used on Rust side
  extern "C" {
  
! FFI::FFIVector<size_t> *
! FFIVector__new ();
  
! FFI::FFIVectorPair *
! FFIVector__new_vec_pair ();
  
! FFI::FFIVectorTriple *
! FFIVector__new_vec_triple ();
  
! void
! FFIVector__push (FFI::FFIVector<size_t> *vector, size_t element);
  
  void
  FFIVector__push_vec_pair (FFI::FFIVectorPair *vector,
  			  FFI::Pair<size_t, FFI::FFIVector<size_t> *> element);
  
! void
! FFIVector__push_vec_triple (FFI::FFIVectorTriple *vector,
! 			    FFI::Triple<size_t, size_t, size_t> element);
  }
  
  } // namespace Polonius
--- 239,263 ----
   *
   * Output is not yet implemented and is only dumped to stdout.
   */
! extern "C" FFI::Output polonius_run (FFI::FactsView input, bool dump_enabled);
  
  // Helper functions for FFIVector to be used on Rust side
  extern "C" {
  
! FFI::FFIVector<size_t> *FFIVector__new ();
  
! FFI::FFIVectorPair *FFIVector__new_vec_pair ();
  
! FFI::FFIVectorTriple *FFIVector__new_vec_triple ();
  
! void FFIVector__push (FFI::FFIVector<size_t> *vector, size_t element);
  
  void
  FFIVector__push_vec_pair (FFI::FFIVectorPair *vector,
  			  FFI::Pair<size_t, FFI::FFIVector<size_t> *> element);
  
! void FFIVector__push_vec_triple (FFI::FFIVectorTriple *vector,
! 				 FFI::Triple<size_t, size_t, size_t> element);
  }
  
  } // namespace Polonius
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.cc gcc-16-20250810/gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
*** gcc-16-20250803/gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.cc	Sun Aug 10 22:32:08 2025
*************** ExprStmtBuilder::visit (HIR::ArrayExpr &
*** 240,246 ****
    auto &elems = expr.get_internal_elements ();
    switch (elems.get_array_expr_type ())
      {
!       case HIR::ArrayElems::VALUES: {
  	auto &elem_vals = (static_cast<HIR::ArrayElemsValues &> (elems));
  	auto init_values = visit_list (elem_vals.get_values ());
  	// collect locations
--- 240,247 ----
    auto &elems = expr.get_internal_elements ();
    switch (elems.get_array_expr_type ())
      {
!     case HIR::ArrayElems::VALUES:
!       {
  	auto &elem_vals = (static_cast<HIR::ArrayElemsValues &> (elems));
  	auto init_values = visit_list (elem_vals.get_values ());
  	// collect locations
*************** ExprStmtBuilder::visit (HIR::ArrayExpr &
*** 254,260 ****
  		     lookup_type (expr), expr.get_locus ());
  	break;
        }
!       case HIR::ArrayElems::COPIED: {
  	auto &elem_copied = (static_cast<HIR::ArrayElemsCopied &> (elems));
  	auto init = visit_expr (elem_copied.get_elem_to_copy ());
  	return_expr (new InitializerExpr ({init}), lookup_type (expr),
--- 255,262 ----
  		     lookup_type (expr), expr.get_locus ());
  	break;
        }
!     case HIR::ArrayElems::COPIED:
!       {
  	auto &elem_copied = (static_cast<HIR::ArrayElemsCopied &> (elems));
  	auto init = visit_expr (elem_copied.get_elem_to_copy ());
  	return_expr (new InitializerExpr ({init}), lookup_type (expr),
*************** ExprStmtBuilder::visit (HIR::LlvmInlineA
*** 329,334 ****
--- 331,340 ----
  {}
  
  void
+ ExprStmtBuilder::visit (HIR::OffsetOf &expr)
+ {}
+ 
+ void
  ExprStmtBuilder::visit (HIR::MethodCallExpr &expr)
  {}
  
*************** ExprStmtBuilder::visit (HIR::BlockExpr &
*** 415,420 ****
--- 421,438 ----
  }
  
  void
+ ExprStmtBuilder::visit (HIR::AnonConst &block)
+ {
+   rust_unreachable ();
+ }
+ 
+ void
+ ExprStmtBuilder::visit (HIR::ConstBlock &block)
+ {
+   rust_unreachable ();
+ }
+ 
+ void
  ExprStmtBuilder::visit (HIR::ContinueExpr &cont)
  {
    LoopAndLabelCtx info = cont.has_label () ? get_label_ctx (cont.get_label ())
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.h gcc-16-20250810/gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.h
*** gcc-16-20250803/gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.h	Sun Aug 10 22:32:08 2025
***************
*** 19,24 ****
--- 19,25 ----
  #ifndef RUST_BIR_BUILDER_EXPR_H
  #define RUST_BIR_BUILDER_EXPR_H
  
+ #include "rust-hir-expr.h"
  #include "rust-hir-visitor.h"
  #include "rust-bir-builder-internal.h"
  
*************** protected: // Expr
*** 84,89 ****
--- 85,92 ----
    void visit (HIR::MethodCallExpr &expr) override;
    void visit (HIR::FieldAccessExpr &expr) override;
    void visit (HIR::BlockExpr &block) override;
+   void visit (HIR::AnonConst &block) override;
+   void visit (HIR::ConstBlock &block) override;
    void visit (HIR::ContinueExpr &cont) override;
    void visit (HIR::BreakExpr &brk) override;
    void visit (HIR::RangeFromToExpr &range) override;
*************** protected: // Expr
*** 101,106 ****
--- 104,110 ----
    void visit (HIR::IfExprConseqElse &expr) override;
    void visit (HIR::InlineAsm &expr) override;
    void visit (HIR::LlvmInlineAsm &expr) override;
+   void visit (HIR::OffsetOf &expr) override;
  
    void visit (HIR::MatchExpr &expr) override;
    void visit (HIR::AwaitExpr &expr) override;
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/borrowck/rust-bir-builder-internal.h gcc-16-20250810/gcc/rust/checks/errors/borrowck/rust-bir-builder-internal.h
*** gcc-16-20250803/gcc/rust/checks/errors/borrowck/rust-bir-builder-internal.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/borrowck/rust-bir-builder-internal.h	Sun Aug 10 22:32:08 2025
***************
*** 27,32 ****
--- 27,34 ----
  #include "rust-name-resolver.h"
  #include "rust-bir.h"
  #include "rust-bir-free-region.h"
+ #include "rust-immutable-name-resolution-context.h"
+ #include "options.h"
  
  namespace Rust {
  
*************** protected: // HIR resolution helpers
*** 402,420 ****
    template <typename T> NodeId resolve_label (T &expr)
    {
      NodeId resolved_label;
!     bool ok
!       = ctx.resolver.lookup_resolved_label (expr.get_mappings ().get_nodeid (),
! 					    &resolved_label);
!     rust_assert (ok);
      return resolved_label;
    }
  
    template <typename T> PlaceId resolve_variable (T &variable)
    {
      NodeId variable_id;
!     bool ok = ctx.resolver.lookup_resolved_name (
!       variable.get_mappings ().get_nodeid (), &variable_id);
!     rust_assert (ok);
      return ctx.place_db.lookup_variable (variable_id);
    }
  
--- 404,443 ----
    template <typename T> NodeId resolve_label (T &expr)
    {
      NodeId resolved_label;
!     if (flag_name_resolution_2_0)
!       {
! 	auto &nr_ctx
! 	  = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
! 	auto res = nr_ctx.lookup (expr.get_mappings ().get_nodeid ());
! 	rust_assert (res.has_value ());
! 	resolved_label = res.value ();
!       }
!     else
!       {
! 	bool ok = ctx.resolver.lookup_resolved_label (
! 	  expr.get_mappings ().get_nodeid (), &resolved_label);
! 	rust_assert (ok);
!       }
      return resolved_label;
    }
  
    template <typename T> PlaceId resolve_variable (T &variable)
    {
      NodeId variable_id;
!     if (flag_name_resolution_2_0)
!       {
! 	auto &nr_ctx
! 	  = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
! 	auto res = nr_ctx.lookup (variable.get_mappings ().get_nodeid ());
! 	rust_assert (res.has_value ());
! 	variable_id = res.value ();
!       }
!     else
!       {
! 	bool ok = ctx.resolver.lookup_resolved_name (
! 	  variable.get_mappings ().get_nodeid (), &variable_id);
! 	rust_assert (ok);
!       }
      return ctx.place_db.lookup_variable (variable_id);
    }
  
*************** protected: // HIR resolution helpers
*** 425,433 ****
      // Unlike variables,
      // functions do not have to be declared in PlaceDB before use.
      NodeId variable_id;
!     bool ok = ctx.resolver.lookup_resolved_name (
!       variable.get_mappings ().get_nodeid (), &variable_id);
!     rust_assert (ok);
      if (ty->is<TyTy::FnType> ())
        return ctx.place_db.get_constant (ty);
      else
--- 448,467 ----
      // Unlike variables,
      // functions do not have to be declared in PlaceDB before use.
      NodeId variable_id;
!     if (flag_name_resolution_2_0)
!       {
! 	auto &nr_ctx
! 	  = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
! 	auto res = nr_ctx.lookup (variable.get_mappings ().get_nodeid ());
! 	rust_assert (res.has_value ());
! 	variable_id = res.value ();
!       }
!     else
!       {
! 	bool ok = ctx.resolver.lookup_resolved_name (
! 	  variable.get_mappings ().get_nodeid (), &variable_id);
! 	rust_assert (ok);
!       }
      if (ty->is<TyTy::FnType> ())
        return ctx.place_db.get_constant (ty);
      else
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h gcc-16-20250810/gcc/rust/checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h
*** gcc-16-20250803/gcc/rust/checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 169,174 ****
--- 169,182 ----
    {
      return_place (ExprStmtBuilder (ctx).build (expr), expr.get_locus ());
    }
+   void visit (HIR::AnonConst &expr) override
+   {
+     return_place (ExprStmtBuilder (ctx).build (expr), expr.get_locus ());
+   }
+   void visit (HIR::ConstBlock &expr) override
+   {
+     return_place (ExprStmtBuilder (ctx).build (expr), expr.get_locus ());
+   }
    void visit (HIR::UnsafeBlockExpr &expr) override
    {
      return_place (ExprStmtBuilder (ctx).build (expr), expr.get_locus ());
*************** public:
*** 208,213 ****
--- 216,222 ----
  
    void visit (HIR::InlineAsm &expr) override {}
    void visit (HIR::LlvmInlineAsm &expr) override {}
+   void visit (HIR::OffsetOf &expr) override {}
  
  protected: // Illegal at this position.
    void visit (HIR::StructExprFieldIdentifier &field) override
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/borrowck/rust-bir-builder-pattern.cc gcc-16-20250810/gcc/rust/checks/errors/borrowck/rust-bir-builder-pattern.cc
*** gcc-16-20250803/gcc/rust/checks/errors/borrowck/rust-bir-builder-pattern.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/borrowck/rust-bir-builder-pattern.cc	Sun Aug 10 22:32:08 2025
*************** PatternBindingBuilder::visit (HIR::Struc
*** 101,107 ****
      {
        switch (field->get_item_type ())
  	{
! 	  case HIR::StructPatternField::TUPLE_PAT: {
  	    auto tuple
  	      = static_cast<HIR::StructPatternFieldTuplePat *> (field.get ());
  
--- 101,108 ----
      {
        switch (field->get_item_type ())
  	{
! 	case HIR::StructPatternField::TUPLE_PAT:
! 	  {
  	    auto tuple
  	      = static_cast<HIR::StructPatternFieldTuplePat *> (field.get ());
  
*************** PatternBindingBuilder::visit (HIR::Struc
*** 123,129 ****
  	    tuple->get_tuple_pattern ().accept_vis (*this);
  	    break;
  	  }
! 	  case HIR::StructPatternField::IDENT_PAT: {
  	    auto ident_field
  	      = static_cast<HIR::StructPatternFieldIdentPat *> (field.get ());
  	    TyTy::StructFieldType *field_ty = nullptr;
--- 124,131 ----
  	    tuple->get_tuple_pattern ().accept_vis (*this);
  	    break;
  	  }
! 	case HIR::StructPatternField::IDENT_PAT:
! 	  {
  	    auto ident_field
  	      = static_cast<HIR::StructPatternFieldIdentPat *> (field.get ());
  	    TyTy::StructFieldType *field_ty = nullptr;
*************** PatternBindingBuilder::visit (HIR::Struc
*** 139,145 ****
  	    ident_field->get_pattern ().accept_vis (*this);
  	    break;
  	  }
! 	  case HIR::StructPatternField::IDENT: {
  	    auto ident_field
  	      = static_cast<HIR::StructPatternFieldIdent *> (field.get ());
  	    TyTy::StructFieldType *field_ty = nullptr;
--- 141,148 ----
  	    ident_field->get_pattern ().accept_vis (*this);
  	    break;
  	  }
! 	case HIR::StructPatternField::IDENT:
! 	  {
  	    auto ident_field
  	      = static_cast<HIR::StructPatternFieldIdent *> (field.get ());
  	    TyTy::StructFieldType *field_ty = nullptr;
*************** PatternBindingBuilder::visit (HIR::Tuple
*** 199,211 ****
    size_t index = 0;
    switch (pattern.get_items ().get_item_type ())
      {
!       case HIR::TuplePatternItems::MULTIPLE: {
  	auto &items = static_cast<HIR::TuplePatternItemsMultiple &> (
  	  pattern.get_items ());
  	visit_tuple_fields (items.get_patterns (), saved, index);
  	break;
        }
!       case HIR::TuplePatternItems::RANGED: {
  	auto &items
  	  = static_cast<HIR::TuplePatternItemsRanged &> (pattern.get_items ());
  
--- 202,216 ----
    size_t index = 0;
    switch (pattern.get_items ().get_item_type ())
      {
!     case HIR::TuplePatternItems::MULTIPLE:
!       {
  	auto &items = static_cast<HIR::TuplePatternItemsMultiple &> (
  	  pattern.get_items ());
  	visit_tuple_fields (items.get_patterns (), saved, index);
  	break;
        }
!     case HIR::TuplePatternItems::RANGED:
!       {
  	auto &items
  	  = static_cast<HIR::TuplePatternItemsRanged &> (pattern.get_items ());
  
*************** PatternBindingBuilder::visit (HIR::Tuple
*** 244,250 ****
    size_t index = 0;
    switch (pattern.get_items ().get_item_type ())
      {
!       case HIR::TupleStructItems::RANGED: {
  	auto &items
  	  = static_cast<HIR::TupleStructItemsRange &> (pattern.get_items ());
  
--- 249,256 ----
    size_t index = 0;
    switch (pattern.get_items ().get_item_type ())
      {
!     case HIR::TupleStructItems::RANGED:
!       {
  	auto &items
  	  = static_cast<HIR::TupleStructItemsRange &> (pattern.get_items ());
  
*************** PatternBindingBuilder::visit (HIR::Tuple
*** 261,267 ****
  	visit_tuple_fields (items.get_upper_patterns (), saved, index);
  	break;
        }
!       case HIR::TupleStructItems::MULTIPLE: {
  	auto &items
  	  = static_cast<HIR::TupleStructItemsNoRange &> (pattern.get_items ());
  	visit_tuple_fields (items.get_patterns (), saved, index);
--- 267,274 ----
  	visit_tuple_fields (items.get_upper_patterns (), saved, index);
  	break;
        }
!     case HIR::TupleStructItems::MULTIPLE:
!       {
  	auto &items
  	  = static_cast<HIR::TupleStructItemsNoRange &> (pattern.get_items ());
  	visit_tuple_fields (items.get_patterns (), saved, index);
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/borrowck/rust-bir-builder-struct.h gcc-16-20250810/gcc/rust/checks/errors/borrowck/rust-bir-builder-struct.h
*** gcc-16-20250803/gcc/rust/checks/errors/borrowck/rust-bir-builder-struct.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/borrowck/rust-bir-builder-struct.h	Sun Aug 10 22:32:08 2025
***************
*** 21,26 ****
--- 21,27 ----
  
  #include "rust-bir-builder-internal.h"
  #include "rust-bir-builder-expr-stmt.h"
+ #include "rust-hir-expr.h"
  
  namespace Rust {
  namespace BIR {
*************** protected:
*** 133,138 ****
--- 134,141 ----
    void visit (HIR::MethodCallExpr &expr) override { rust_unreachable (); }
    void visit (HIR::FieldAccessExpr &expr) override { rust_unreachable (); }
    void visit (HIR::BlockExpr &expr) override { rust_unreachable (); }
+   void visit (HIR::AnonConst &expr) override { rust_unreachable (); }
+   void visit (HIR::ConstBlock &expr) override { rust_unreachable (); }
    void visit (HIR::ClosureExpr &expr) override { rust_unreachable (); }
    void visit (HIR::ContinueExpr &expr) override { rust_unreachable (); }
    void visit (HIR::BreakExpr &expr) override { rust_unreachable (); }
*************** protected:
*** 154,159 ****
--- 157,163 ----
    void visit (HIR::AsyncBlockExpr &expr) override { rust_unreachable (); }
    void visit (HIR::InlineAsm &expr) override { rust_unreachable (); }
    void visit (HIR::LlvmInlineAsm &expr) override { rust_unreachable (); }
+   void visit (HIR::OffsetOf &expr) override { rust_unreachable (); }
    void visit (HIR::TypeParam &param) override { rust_unreachable (); }
    void visit (HIR::ConstGenericParam &param) override { rust_unreachable (); }
    void visit (HIR::LifetimeWhereClauseItem &item) override
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/borrowck/rust-bir-dump.cc gcc-16-20250810/gcc/rust/checks/errors/borrowck/rust-bir-dump.cc
*** gcc-16-20250803/gcc/rust/checks/errors/borrowck/rust-bir-dump.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/borrowck/rust-bir-dump.cc	Sun Aug 10 22:32:08 2025
*************** Dump::visit (const Statement &stmt)
*** 182,188 ****
    statement_place = stmt.get_place ();
    switch (stmt.get_kind ())
      {
!       case Statement::Kind::ASSIGNMENT: {
  	visit_place (stmt.get_place ());
  	stream << " = ";
  	stmt.get_expr ().accept_vis (*this);
--- 182,189 ----
    statement_place = stmt.get_place ();
    switch (stmt.get_kind ())
      {
!     case Statement::Kind::ASSIGNMENT:
!       {
  	visit_place (stmt.get_place ());
  	stream << " = ";
  	stmt.get_expr ().accept_vis (*this);
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h gcc-16-20250810/gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h
*** gcc-16-20250803/gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/borrowck/rust-bir-fact-collector.h	Sun Aug 10 22:32:08 2025
*************** protected: // Main collection entry poin
*** 232,273 ****
    {
      switch (stmt.get_kind ())
        {
! 	case Statement::Kind::ASSIGNMENT: {
  	  // TODO: for unwind, must had hadning for non-panic-only assignements
  	  issue_write_deep (stmt.get_place ());
  	  visit_assignment_expr (stmt.get_place (), stmt.get_expr ());
  	  break;
  	}
! 	case Statement::Kind::SWITCH: {
  	  issue_read_move (stmt.get_place ());
  	  issue_jumps ();
  	}
  	break;
! 	case Statement::Kind::GOTO: {
  	  issue_jumps ();
  	}
  	break;
! 	case Statement::Kind::RETURN: {
  	  issue_place_access (RETURN_VALUE_PLACE);
  	  issue_locals_dealloc ();
  	  break;
  	}
! 	case Statement::Kind::STORAGE_DEAD: {
  	  facts.path_moved_at_base.emplace_back (stmt.get_place ().value,
  						 get_current_point_mid ());
  	  facts.var_defined_at.emplace_back (stmt.get_place ().value,
  					     get_current_point_mid ());
  	  break;
  	}
! 	case Statement::Kind::STORAGE_LIVE: {
  	  issue_write_deep (stmt.get_place (), true);
  	  break;
  	}
! 	case Statement::Kind::USER_TYPE_ASCRIPTION: {
  	  issue_user_type_constraints (stmt.get_place (), stmt.get_type ());
  	  break;
  	}
! 	case Statement::Kind::FAKE_READ: {
  	  issue_place_access (stmt.get_place ());
  	  break;
  	}
--- 232,281 ----
    {
      switch (stmt.get_kind ())
        {
!       case Statement::Kind::ASSIGNMENT:
! 	{
  	  // TODO: for unwind, must had hadning for non-panic-only assignements
  	  issue_write_deep (stmt.get_place ());
  	  visit_assignment_expr (stmt.get_place (), stmt.get_expr ());
  	  break;
  	}
!       case Statement::Kind::SWITCH:
! 	{
  	  issue_read_move (stmt.get_place ());
  	  issue_jumps ();
  	}
  	break;
!       case Statement::Kind::GOTO:
! 	{
  	  issue_jumps ();
  	}
  	break;
!       case Statement::Kind::RETURN:
! 	{
  	  issue_place_access (RETURN_VALUE_PLACE);
  	  issue_locals_dealloc ();
  	  break;
  	}
!       case Statement::Kind::STORAGE_DEAD:
! 	{
  	  facts.path_moved_at_base.emplace_back (stmt.get_place ().value,
  						 get_current_point_mid ());
  	  facts.var_defined_at.emplace_back (stmt.get_place ().value,
  					     get_current_point_mid ());
  	  break;
  	}
!       case Statement::Kind::STORAGE_LIVE:
! 	{
  	  issue_write_deep (stmt.get_place (), true);
  	  break;
  	}
!       case Statement::Kind::USER_TYPE_ASCRIPTION:
! 	{
  	  issue_user_type_constraints (stmt.get_place (), stmt.get_type ());
  	  break;
  	}
!       case Statement::Kind::FAKE_READ:
! 	{
  	  issue_place_access (stmt.get_place ());
  	  break;
  	}
*************** protected: // Subset helpers.
*** 791,797 ****
  	  type->as<const TyTy::SliceType> ()->get_element_type (), region_start,
  	  regions);
        case TyTy::FNDEF:
! 	case TyTy::TUPLE: {
  	  for (auto &field : type->as<const TyTy::TupleType> ()->get_fields ())
  	    sanitize_constraints (field.get_tyty (), region_start, regions);
  	}
--- 799,806 ----
  	  type->as<const TyTy::SliceType> ()->get_element_type (), region_start,
  	  regions);
        case TyTy::FNDEF:
!       case TyTy::TUPLE:
! 	{
  	  for (auto &field : type->as<const TyTy::TupleType> ()->get_fields ())
  	    sanitize_constraints (field.get_tyty (), region_start, regions);
  	}
*************** protected: // Subset helpers.
*** 815,820 ****
--- 824,830 ----
        case TyTy::PLACEHOLDER:
        case TyTy::INFER:
        case TyTy::PARAM:
+       case TyTy::CONST:
        case TyTy::OPAQUE:
  	rust_unreachable ();
        }
*************** protected: // Subset helpers.
*** 874,880 ****
  
      return region_end;
    }
! }; // namespace BIR
  
  } // namespace BIR
  } // namespace Rust
--- 884,890 ----
  
      return region_end;
    }
! };
  
  } // namespace BIR
  } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/borrowck/rust-bir-place.h gcc-16-20250810/gcc/rust/checks/errors/borrowck/rust-bir-place.h
*** gcc-16-20250803/gcc/rust/checks/errors/borrowck/rust-bir-place.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/borrowck/rust-bir-place.h	Sun Aug 10 22:32:08 2025
*************** using Variance = TyTy::VarianceAnalysis:
*** 53,59 ****
  /** A unique identifier for a loan in the BIR. */
  struct LoanId
  {
!   uint32_t value;
    // some overloads for comparision
    bool operator== (const LoanId &rhs) const { return value == rhs.value; }
    bool operator!= (const LoanId &rhs) const { return !(operator== (rhs)); }
--- 53,59 ----
  /** A unique identifier for a loan in the BIR. */
  struct LoanId
  {
!   size_t value;
    // some overloads for comparision
    bool operator== (const LoanId &rhs) const { return value == rhs.value; }
    bool operator!= (const LoanId &rhs) const { return !(operator== (rhs)); }
*************** public:
*** 217,223 ****
    const T &operator[] (I pid) const { return internal_vector[pid.value]; }
  
    void push_back (T &&param) { internal_vector.push_back (std::move (param)); }
!   template <typename... Args> void emplace_back (Args &&... args)
    {
      internal_vector.emplace_back (std::forward<Args> (args)...);
    }
--- 217,223 ----
    const T &operator[] (I pid) const { return internal_vector[pid.value]; }
  
    void push_back (T &&param) { internal_vector.push_back (std::move (param)); }
!   template <typename... Args> void emplace_back (Args &&...args)
    {
      internal_vector.emplace_back (std::forward<Args> (args)...);
    }
*************** private:
*** 471,484 ****
        case TyTy::FNDEF:
        case TyTy::NEVER:
  	return true;
! 	case TyTy::TUPLE: {
  	  auto &fields = ty->as<TyTy::TupleType> ()->get_fields ();
  	  return std::all_of (fields.begin (), fields.end (),
  			      [] (const TyTy::TyVar &field) {
  				return is_type_copy (field.get_tyty ());
  			      });
  	}
! 	case TyTy::ARRAY: {
  	  return is_type_copy (ty->as<TyTy::ArrayType> ()->get_element_type ());
  	}
        case TyTy::INFER:
--- 471,486 ----
        case TyTy::FNDEF:
        case TyTy::NEVER:
  	return true;
!       case TyTy::TUPLE:
! 	{
  	  auto &fields = ty->as<TyTy::TupleType> ()->get_fields ();
  	  return std::all_of (fields.begin (), fields.end (),
  			      [] (const TyTy::TyVar &field) {
  				return is_type_copy (field.get_tyty ());
  			      });
  	}
!       case TyTy::ARRAY:
! 	{
  	  return is_type_copy (ty->as<TyTy::ArrayType> ()->get_element_type ());
  	}
        case TyTy::INFER:
*************** private:
*** 491,496 ****
--- 493,499 ----
        case TyTy::PROJECTION: // TODO: DUNNO
        case TyTy::CLOSURE:    // TODO: DUNNO
        case TyTy::DYNAMIC:    // TODO: dunno
+       case TyTy::CONST:
        case TyTy::OPAQUE:
  	return false;
        }
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/borrowck/rust-bir-visitor.h gcc-16-20250810/gcc/rust/checks/errors/borrowck/rust-bir-visitor.h
*** gcc-16-20250803/gcc/rust/checks/errors/borrowck/rust-bir-visitor.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/borrowck/rust-bir-visitor.h	Sun Aug 10 22:32:08 2025
*************** template <typename BASE, typename T> cla
*** 51,57 ****
  {
  public:
    template <typename... Args>
!   explicit VisitableImpl (Args &&... args) : BASE (std::forward<Args> (args)...)
    {}
  
    void accept_vis (Visitor &visitor) override
--- 51,57 ----
  {
  public:
    template <typename... Args>
!   explicit VisitableImpl (Args &&...args) : BASE (std::forward<Args> (args)...)
    {}
  
    void accept_vis (Visitor &visitor) override
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/borrowck/rust-function-collector.h gcc-16-20250810/gcc/rust/checks/errors/borrowck/rust-function-collector.h
*** gcc-16-20250803/gcc/rust/checks/errors/borrowck/rust-function-collector.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/borrowck/rust-function-collector.h	Sun Aug 10 22:32:08 2025
***************
*** 19,24 ****
--- 19,25 ----
  #ifndef RUST_HIR_FUNCTION_COLLECTOR_H
  #define RUST_HIR_FUNCTION_COLLECTOR_H
  
+ #include "rust-hir-expr.h"
  #include "rust-hir-item.h"
  #include "rust-hir-visitor.h"
  #include "rust-hir.h"
*************** public:
*** 104,109 ****
--- 105,112 ----
    void visit (HIR::MethodCallExpr &expr) override {}
    void visit (HIR::FieldAccessExpr &expr) override {}
    void visit (HIR::BlockExpr &expr) override {}
+   void visit (HIR::AnonConst &expr) override {}
+   void visit (HIR::ConstBlock &expr) override {}
    void visit (HIR::ContinueExpr &expr) override {}
    void visit (HIR::BreakExpr &expr) override {}
    void visit (HIR::RangeFromToExpr &expr) override {}
*************** public:
*** 124,129 ****
--- 127,133 ----
    void visit (HIR::AsyncBlockExpr &expr) override {}
    void visit (HIR::InlineAsm &expr) override {}
    void visit (HIR::LlvmInlineAsm &expr) override {}
+   void visit (HIR::OffsetOf &expr) override {}
    void visit (HIR::TypeParam &param) override {}
    void visit (HIR::ConstGenericParam &param) override {}
    void visit (HIR::LifetimeWhereClauseItem &item) override {}
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/privacy/rust-privacy-check.cc gcc-16-20250810/gcc/rust/checks/errors/privacy/rust-privacy-check.cc
*** gcc-16-20250803/gcc/rust/checks/errors/privacy/rust-privacy-check.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/privacy/rust-privacy-check.cc	Sun Aug 10 22:32:08 2025
***************
*** 25,32 ****
  #include "rust-pub-restricted-visitor.h"
  #include "rust-privacy-reporter.h"
  
! extern bool
! saw_errors (void);
  
  namespace Rust {
  namespace Privacy {
--- 25,31 ----
  #include "rust-pub-restricted-visitor.h"
  #include "rust-privacy-reporter.h"
  
! extern bool saw_errors (void);
  
  namespace Rust {
  namespace Privacy {
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/privacy/rust-privacy-ctx.h gcc-16-20250810/gcc/rust/checks/errors/privacy/rust-privacy-ctx.h
*** gcc-16-20250803/gcc/rust/checks/errors/privacy/rust-privacy-ctx.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/privacy/rust-privacy-ctx.h	Sun Aug 10 22:32:08 2025
*************** private:
*** 71,78 ****
  
  #if CHECKING_P
  namespace selftest {
! void
! rust_privacy_ctx_test (void);
  }
  #endif // !CHECKING_P
  
--- 71,77 ----
  
  #if CHECKING_P
  namespace selftest {
! void rust_privacy_ctx_test (void);
  }
  #endif // !CHECKING_P
  
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/privacy/rust-privacy-reporter.cc gcc-16-20250810/gcc/rust/checks/errors/privacy/rust-privacy-reporter.cc
*** gcc-16-20250803/gcc/rust/checks/errors/privacy/rust-privacy-reporter.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/privacy/rust-privacy-reporter.cc	Sun Aug 10 22:32:08 2025
*************** PrivacyReporter::check_for_privacy_viola
*** 157,163 ****
      {
      case ModuleVisibility::Public:
        break;
!       case ModuleVisibility::Restricted: {
  	// If we are in the crate, everything is restricted correctly, but we
  	// can't get a module for it
  	if (!current_module.has_value ())
--- 157,164 ----
      {
      case ModuleVisibility::Public:
        break;
!     case ModuleVisibility::Restricted:
!       {
  	// If we are in the crate, everything is restricted correctly, but we
  	// can't get a module for it
  	if (!current_module.has_value ())
*************** PrivacyReporter::check_base_type_privacy
*** 215,226 ****
      case TyTy::USIZE:
      case TyTy::ISIZE:
      case TyTy::ADT:
!       case TyTy::STR: {
  	auto ref_id = ty->get_ref ();
  	if (auto lookup_id = mappings.lookup_hir_to_node (ref_id))
  	  return check_for_privacy_violation (*lookup_id, locus);
- 	rust_unreachable ();
        }
      case TyTy::REF:
        return recursive_check (
  	static_cast<const TyTy::ReferenceType *> (ty)->get_base ());
--- 216,229 ----
      case TyTy::USIZE:
      case TyTy::ISIZE:
      case TyTy::ADT:
!     case TyTy::STR:
!       {
  	auto ref_id = ty->get_ref ();
  	if (auto lookup_id = mappings.lookup_hir_to_node (ref_id))
  	  return check_for_privacy_violation (*lookup_id, locus);
        }
+       break;
+ 
      case TyTy::REF:
        return recursive_check (
  	static_cast<const TyTy::ReferenceType *> (ty)->get_base ());
*************** PrivacyReporter::check_base_type_privacy
*** 243,249 ****
  	   static_cast<const TyTy::TupleType *> (ty)->get_fields ())
  	recursive_check (param.get_tyty ());
        return;
!       case TyTy::PLACEHOLDER: {
  	const auto p = static_cast<const TyTy::PlaceholderType *> (ty);
  	if (!p->can_resolve ())
  	  return;
--- 246,253 ----
  	   static_cast<const TyTy::TupleType *> (ty)->get_fields ())
  	recursive_check (param.get_tyty ());
        return;
!     case TyTy::PLACEHOLDER:
!       {
  	const auto p = static_cast<const TyTy::PlaceholderType *> (ty);
  	if (!p->can_resolve ())
  	  return;
*************** PrivacyReporter::check_base_type_privacy
*** 273,278 ****
--- 277,284 ----
        return;
      case TyTy::OPAQUE:
        return;
+     case TyTy::CONST:
+       return;
      case TyTy::ERROR:
        return;
      }
*************** PrivacyReporter::visit (HIR::LlvmInlineA
*** 310,315 ****
--- 316,327 ----
  {}
  
  void
+ PrivacyReporter::visit (HIR::OffsetOf &expr)
+ {
+   // TODO: Do we have to do anything?
+ }
+ 
+ void
  PrivacyReporter::visit (HIR::TypePath &path)
  {
    check_for_privacy_violation (path.get_mappings ().get_nodeid (),
*************** PrivacyReporter::visit (HIR::ArrayExpr &
*** 413,419 ****
    HIR::ArrayElems &elements = expr.get_internal_elements ();
    switch (elements.get_array_expr_type ())
      {
!       case HIR::ArrayElems::ArrayExprType::VALUES: {
  	auto &elems = static_cast<HIR::ArrayElemsValues &> (elements);
  	for (auto &value : elems.get_values ())
  	  value->accept_vis (*this);
--- 425,432 ----
    HIR::ArrayElems &elements = expr.get_internal_elements ();
    switch (elements.get_array_expr_type ())
      {
!     case HIR::ArrayElems::ArrayExprType::VALUES:
!       {
  	auto &elems = static_cast<HIR::ArrayElemsValues &> (elements);
  	for (auto &value : elems.get_values ())
  	  value->accept_vis (*this);
*************** PrivacyReporter::visit (HIR::BlockExpr &
*** 518,523 ****
--- 531,548 ----
  }
  
  void
+ PrivacyReporter::visit (HIR::AnonConst &expr)
+ {
+   expr.get_inner_expr ().accept_vis (*this);
+ }
+ 
+ void
+ PrivacyReporter::visit (HIR::ConstBlock &expr)
+ {
+   expr.get_const_expr ().accept_vis (*this);
+ }
+ 
+ void
  PrivacyReporter::visit (HIR::ContinueExpr &)
  {}
  
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/privacy/rust-privacy-reporter.h gcc-16-20250810/gcc/rust/checks/errors/privacy/rust-privacy-reporter.h
*** gcc-16-20250803/gcc/rust/checks/errors/privacy/rust-privacy-reporter.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/privacy/rust-privacy-reporter.h	Sun Aug 10 22:32:08 2025
***************
*** 19,24 ****
--- 19,25 ----
  #ifndef RUST_PRIVACY_REPORTER_H
  #define RUST_PRIVACY_REPORTER_H
  
+ #include "rust-hir-expr.h"
  #include "rust-hir-map.h"
  #include "rust-hir-visitor.h"
  #include "rust-mapping-common.h"
*************** types
*** 106,111 ****
--- 107,114 ----
    virtual void visit (HIR::MethodCallExpr &expr);
    virtual void visit (HIR::FieldAccessExpr &expr);
    virtual void visit (HIR::BlockExpr &expr);
+   virtual void visit (HIR::AnonConst &expr);
+   virtual void visit (HIR::ConstBlock &expr);
    virtual void visit (HIR::ContinueExpr &expr);
    virtual void visit (HIR::BreakExpr &expr);
    virtual void visit (HIR::RangeFromToExpr &expr);
*************** types
*** 126,131 ****
--- 129,135 ----
    virtual void visit (HIR::AsyncBlockExpr &expr);
    virtual void visit (HIR::InlineAsm &expr);
    virtual void visit (HIR::LlvmInlineAsm &expr);
+   virtual void visit (HIR::OffsetOf &expr);
  
    virtual void visit (HIR::EnumItemTuple &);
    virtual void visit (HIR::EnumItemStruct &);
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/privacy/rust-reachability.cc gcc-16-20250810/gcc/rust/checks/errors/privacy/rust-reachability.cc
*** gcc-16-20250803/gcc/rust/checks/errors/privacy/rust-reachability.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/privacy/rust-reachability.cc	Sun Aug 10 22:32:08 2025
*************** ReachabilityVisitor::visit (HIR::Enum &e
*** 158,164 ****
  
        switch (variant->get_enum_item_kind ())
  	{
! 	  case HIR::EnumItem::Tuple: {
  	    // Should we update the fields only if they are public? Similarly to
  	    // what we do in the ReachabilityVisitor for HIR::TupleStruct?
  	    auto tuple_variant
--- 158,165 ----
  
        switch (variant->get_enum_item_kind ())
  	{
! 	case HIR::EnumItem::Tuple:
! 	  {
  	    // Should we update the fields only if they are public? Similarly to
  	    // what we do in the ReachabilityVisitor for HIR::TupleStruct?
  	    auto tuple_variant
*************** ReachabilityVisitor::visit (HIR::Enum &e
*** 167,173 ****
  	      ctx.update_reachability (field.get_mappings (), variant_reach);
  	    break;
  	  }
! 	  case HIR::EnumItem::Struct: {
  	    // Should we update the fields only if they are public? Similarly to
  	    // what we do in the ReachabilityVisitor for HIR::StructStruct?
  	    auto struct_variant
--- 168,175 ----
  	      ctx.update_reachability (field.get_mappings (), variant_reach);
  	    break;
  	  }
! 	case HIR::EnumItem::Struct:
! 	  {
  	    // Should we update the fields only if they are public? Similarly to
  	    // what we do in the ReachabilityVisitor for HIR::StructStruct?
  	    auto struct_variant
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/privacy/rust-visibility-resolver.cc gcc-16-20250810/gcc/rust/checks/errors/privacy/rust-visibility-resolver.cc
*** gcc-16-20250803/gcc/rust/checks/errors/privacy/rust-visibility-resolver.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/privacy/rust-visibility-resolver.cc	Sun Aug 10 22:32:08 2025
*************** VisibilityResolver::resolve_visibility (
*** 127,133 ****
      case HIR::Visibility::PUBLIC:
        to_resolve = ModuleVisibility::create_public ();
        return true;
!       case HIR::Visibility::RESTRICTED: {
  	// FIXME: We also need to handle 2015 vs 2018 edition conflicts
  	auto id = UNKNOWN_DEFID;
  	auto result = resolve_module_path (visibility.get_path (), id);
--- 127,134 ----
      case HIR::Visibility::PUBLIC:
        to_resolve = ModuleVisibility::create_public ();
        return true;
!     case HIR::Visibility::RESTRICTED:
!       {
  	// FIXME: We also need to handle 2015 vs 2018 edition conflicts
  	auto id = UNKNOWN_DEFID;
  	auto result = resolve_module_path (visibility.get_path (), id);
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/rust-const-checker.cc gcc-16-20250810/gcc/rust/checks/errors/rust-const-checker.cc
*** gcc-16-20250803/gcc/rust/checks/errors/rust-const-checker.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/rust-const-checker.cc	Sun Aug 10 22:32:08 2025
*************** ConstChecker::visit (BlockExpr &expr)
*** 417,422 ****
--- 417,442 ----
  }
  
  void
+ ConstChecker::visit (AnonConst &expr)
+ {
+   const_context.enter (expr.get_mappings ().get_hirid ());
+ 
+   expr.get_inner_expr ().accept_vis (*this);
+ 
+   const_context.exit ();
+ }
+ 
+ void
+ ConstChecker::visit (ConstBlock &expr)
+ {
+   const_context.enter (expr.get_mappings ().get_hirid ());
+ 
+   expr.get_const_expr ().accept_vis (*this);
+ 
+   const_context.exit ();
+ }
+ 
+ void
  ConstChecker::visit (ContinueExpr &)
  {}
  
*************** ConstChecker::visit (LlvmInlineAsm &)
*** 541,546 ****
--- 561,570 ----
  {}
  
  void
+ ConstChecker::visit (OffsetOf &)
+ {}
+ 
+ void
  ConstChecker::visit (TypeParam &)
  {}
  
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/rust-const-checker.h gcc-16-20250810/gcc/rust/checks/errors/rust-const-checker.h
*** gcc-16-20250803/gcc/rust/checks/errors/rust-const-checker.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/rust-const-checker.h	Sun Aug 10 22:32:08 2025
*************** private:
*** 113,118 ****
--- 113,120 ----
    virtual void visit (FieldAccessExpr &expr) override;
    virtual void visit (ClosureExpr &expr) override;
    virtual void visit (BlockExpr &expr) override;
+   virtual void visit (AnonConst &expr) override;
+   virtual void visit (ConstBlock &expr) override;
    virtual void visit (ContinueExpr &expr) override;
    virtual void visit (BreakExpr &expr) override;
    virtual void visit (RangeFromToExpr &expr) override;
*************** private:
*** 133,138 ****
--- 135,141 ----
    virtual void visit (AsyncBlockExpr &expr) override;
    virtual void visit (InlineAsm &expr) override;
    virtual void visit (LlvmInlineAsm &expr) override;
+   virtual void visit (OffsetOf &expr) override;
  
    virtual void visit (TypeParam &param) override;
    virtual void visit (ConstGenericParam &param) override;
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/rust-feature.cc gcc-16-20250810/gcc/rust/checks/errors/rust-feature.cc
*** gcc-16-20250803/gcc/rust/checks/errors/rust-feature.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/rust-feature.cc	Sun Aug 10 22:32:08 2025
*************** const std::map<std::string, Feature::Nam
*** 84,90 ****
    {"exclusive_range_pattern", Feature::Name::EXCLUSIVE_RANGE_PATTERN},
    {"prelude_import", Feature::Name::PRELUDE_IMPORT},
    {"min_specialization", Feature::Name::MIN_SPECIALIZATION},
! }; // namespace Rust
  
  tl::optional<Feature::Name>
  Feature::as_name (const std::string &name)
--- 84,90 ----
    {"exclusive_range_pattern", Feature::Name::EXCLUSIVE_RANGE_PATTERN},
    {"prelude_import", Feature::Name::PRELUDE_IMPORT},
    {"min_specialization", Feature::Name::MIN_SPECIALIZATION},
! };
  
  tl::optional<Feature::Name>
  Feature::as_name (const std::string &name)
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/rust-hir-pattern-analysis.cc gcc-16-20250810/gcc/rust/checks/errors/rust-hir-pattern-analysis.cc
*** gcc-16-20250803/gcc/rust/checks/errors/rust-hir-pattern-analysis.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/rust-hir-pattern-analysis.cc	Sun Aug 10 22:32:08 2025
*************** PatternChecker::visit (BlockExpr &expr)
*** 295,300 ****
--- 295,312 ----
  }
  
  void
+ PatternChecker::visit (AnonConst &expr)
+ {
+   expr.get_inner_expr ().accept_vis (*this);
+ }
+ 
+ void
+ PatternChecker::visit (ConstBlock &expr)
+ {
+   expr.get_const_expr ().accept_vis (*this);
+ }
+ 
+ void
  PatternChecker::visit (ContinueExpr &)
  {}
  
*************** PatternChecker::visit (LlvmInlineAsm &ex
*** 427,432 ****
--- 439,448 ----
  {}
  
  void
+ PatternChecker::visit (OffsetOf &expr)
+ {}
+ 
+ void
  PatternChecker::visit (TypeParam &)
  {}
  
*************** Constructor::is_covered_by (const Constr
*** 728,750 ****
  
    switch (kind)
      {
!       case ConstructorKind::VARIANT: {
  	rust_assert (kind == ConstructorKind::VARIANT);
  	return variant_idx == o.variant_idx;
        }
        break;
!       case ConstructorKind::INT_RANGE: {
  	rust_assert (kind == ConstructorKind::INT_RANGE);
  	return int_range.lo >= o.int_range.lo && int_range.hi <= o.int_range.hi;
        }
        break;
!       case ConstructorKind::WILDCARD: {
  	// TODO: wildcard is covered by a variant of enum with a single
  	// variant
  	return false;
        }
        break;
!       case ConstructorKind::STRUCT: {
  	// Struct pattern is always covered by a other struct constructor.
  	return true;
        }
--- 744,770 ----
  
    switch (kind)
      {
!     case ConstructorKind::VARIANT:
!       {
  	rust_assert (kind == ConstructorKind::VARIANT);
  	return variant_idx == o.variant_idx;
        }
        break;
!     case ConstructorKind::INT_RANGE:
!       {
  	rust_assert (kind == ConstructorKind::INT_RANGE);
  	return int_range.lo >= o.int_range.lo && int_range.hi <= o.int_range.hi;
        }
        break;
!     case ConstructorKind::WILDCARD:
!       {
  	// TODO: wildcard is covered by a variant of enum with a single
  	// variant
  	return false;
        }
        break;
!     case ConstructorKind::STRUCT:
!       {
  	// Struct pattern is always covered by a other struct constructor.
  	return true;
        }
*************** PlaceInfo::specialize (const Constructor
*** 900,918 ****
    switch (c.get_kind ())
      {
      case Constructor::ConstructorKind::WILDCARD:
!       case Constructor::ConstructorKind::INT_RANGE: {
  	return {};
        }
        break;
      case Constructor::ConstructorKind::STRUCT:
!       case Constructor::ConstructorKind::VARIANT: {
  	rust_assert (ty->get_kind () == TyTy::TypeKind::ADT);
  	TyTy::ADTType *adt = static_cast<TyTy::ADTType *> (ty);
  	switch (adt->get_adt_kind ())
  	  {
  	  case TyTy::ADTType::ADTKind::ENUM:
  	  case TyTy::ADTType::ADTKind::STRUCT_STRUCT:
! 	    case TyTy::ADTType::ADTKind::TUPLE_STRUCT: {
  	      TyTy::VariantDef *variant
  		= adt->get_variants ().at (c.get_variant_index ());
  	      if (variant->get_variant_type ()
--- 920,941 ----
    switch (c.get_kind ())
      {
      case Constructor::ConstructorKind::WILDCARD:
!     case Constructor::ConstructorKind::INT_RANGE:
!       {
  	return {};
        }
        break;
      case Constructor::ConstructorKind::STRUCT:
!     case Constructor::ConstructorKind::VARIANT:
!       {
  	rust_assert (ty->get_kind () == TyTy::TypeKind::ADT);
  	TyTy::ADTType *adt = static_cast<TyTy::ADTType *> (ty);
  	switch (adt->get_adt_kind ())
  	  {
  	  case TyTy::ADTType::ADTKind::ENUM:
  	  case TyTy::ADTType::ADTKind::STRUCT_STRUCT:
! 	  case TyTy::ADTType::ADTKind::TUPLE_STRUCT:
! 	    {
  	      TyTy::VariantDef *variant
  		= adt->get_variants ().at (c.get_variant_index ());
  	      if (variant->get_variant_type ()
*************** PlaceInfo::specialize (const Constructor
*** 926,939 ****
  	      return new_place_infos;
  	    }
  	    break;
! 	    case TyTy::ADTType::ADTKind::UNION: {
  	      // TODO: support unions
  	      rust_unreachable ();
  	    }
  	  }
        }
        break;
!       default: {
  	rust_unreachable ();
        }
        break;
--- 949,964 ----
  	      return new_place_infos;
  	    }
  	    break;
! 	  case TyTy::ADTType::ADTKind::UNION:
! 	    {
  	      // TODO: support unions
  	      rust_unreachable ();
  	    }
  	  }
        }
        break;
!     default:
!       {
  	rust_unreachable ();
        }
        break;
*************** WitnessPat::to_string () const
*** 991,997 ****
  {
    switch (ctor.get_kind ())
      {
!       case Constructor::ConstructorKind::STRUCT: {
  	TyTy::ADTType *adt = static_cast<TyTy::ADTType *> (ty);
  	TyTy::VariantDef *variant
  	  = adt->get_variants ().at (ctor.get_variant_index ());
--- 1016,1023 ----
  {
    switch (ctor.get_kind ())
      {
!     case Constructor::ConstructorKind::STRUCT:
!       {
  	TyTy::ADTType *adt = static_cast<TyTy::ADTType *> (ty);
  	TyTy::VariantDef *variant
  	  = adt->get_variants ().at (ctor.get_variant_index ());
*************** WitnessPat::to_string () const
*** 1016,1022 ****
  	return buf;
        }
        break;
!       case Constructor::ConstructorKind::VARIANT: {
  	std::string buf;
  	TyTy::ADTType *adt = static_cast<TyTy::ADTType *> (ty);
  	buf += adt->get_identifier ();
--- 1042,1049 ----
  	return buf;
        }
        break;
!     case Constructor::ConstructorKind::VARIANT:
!       {
  	std::string buf;
  	TyTy::ADTType *adt = static_cast<TyTy::ADTType *> (ty);
  	buf += adt->get_identifier ();
*************** WitnessPat::to_string () const
*** 1026,1036 ****
  
  	switch (variant->get_variant_type ())
  	  {
! 	    case TyTy::VariantDef::VariantType::NUM: {
  	      return buf;
  	    }
  	    break;
! 	    case TyTy::VariantDef::VariantType::TUPLE: {
  	      buf += "(";
  	      for (size_t i = 0; i < fields.size (); i++)
  		{
--- 1053,1065 ----
  
  	switch (variant->get_variant_type ())
  	  {
! 	  case TyTy::VariantDef::VariantType::NUM:
! 	    {
  	      return buf;
  	    }
  	    break;
! 	  case TyTy::VariantDef::VariantType::TUPLE:
! 	    {
  	      buf += "(";
  	      for (size_t i = 0; i < fields.size (); i++)
  		{
*************** WitnessPat::to_string () const
*** 1042,1048 ****
  	      return buf;
  	    }
  	    break;
! 	    case TyTy::VariantDef::VariantType::STRUCT: {
  	      buf += " {";
  	      if (!fields.empty ())
  		buf += " ";
--- 1071,1078 ----
  	      return buf;
  	    }
  	    break;
! 	  case TyTy::VariantDef::VariantType::STRUCT:
! 	    {
  	      buf += " {";
  	      if (!fields.empty ())
  		buf += " ";
*************** WitnessPat::to_string () const
*** 1061,1067 ****
  	      buf += "}";
  	    }
  	    break;
! 	    default: {
  	      rust_unreachable ();
  	    }
  	    break;
--- 1091,1098 ----
  	      buf += "}";
  	    }
  	    break;
! 	  default:
! 	    {
  	      rust_unreachable ();
  	    }
  	    break;
*************** WitnessPat::to_string () const
*** 1069,1089 ****
  	return buf;
        }
        break;
!       case Constructor::ConstructorKind::INT_RANGE: {
  	// TODO: implement
  	rust_unreachable ();
        }
        break;
!       case Constructor::ConstructorKind::WILDCARD: {
  	return "_";
        }
        break;
!       case Constructor::ConstructorKind::REFERENCE: {
  	// TODO: implement
  	rust_unreachable ();
        }
        break;
!       default: {
  	rust_unreachable ();
        }
        break;
--- 1100,1124 ----
  	return buf;
        }
        break;
!     case Constructor::ConstructorKind::INT_RANGE:
!       {
  	// TODO: implement
  	rust_unreachable ();
        }
        break;
!     case Constructor::ConstructorKind::WILDCARD:
!       {
  	return "_";
        }
        break;
!     case Constructor::ConstructorKind::REFERENCE:
!       {
  	// TODO: implement
  	rust_unreachable ();
        }
        break;
!     default:
!       {
  	rust_unreachable ();
        }
        break;
*************** WitnessMatrix::apply_constructor (const
*** 1100,1111 ****
    // TODO: only support struct and variant ctor for now.
    switch (ctor.get_kind ())
      {
!       case Constructor::ConstructorKind::WILDCARD: {
  	arity = 0;
        }
        break;
      case Constructor::ConstructorKind::STRUCT:
!       case Constructor::ConstructorKind::VARIANT: {
  	if (ty->get_kind () == TyTy::TypeKind::ADT)
  	  {
  	    TyTy::ADTType *adt = static_cast<TyTy::ADTType *> (ty);
--- 1135,1148 ----
    // TODO: only support struct and variant ctor for now.
    switch (ctor.get_kind ())
      {
!     case Constructor::ConstructorKind::WILDCARD:
!       {
  	arity = 0;
        }
        break;
      case Constructor::ConstructorKind::STRUCT:
!     case Constructor::ConstructorKind::VARIANT:
!       {
  	if (ty->get_kind () == TyTy::TypeKind::ADT)
  	  {
  	    TyTy::ADTType *adt = static_cast<TyTy::ADTType *> (ty);
*************** WitnessMatrix::apply_constructor (const
*** 1118,1124 ****
  	  }
        }
        break;
!       default: {
  	rust_unreachable ();
        }
      }
--- 1155,1162 ----
  	  }
        }
        break;
!     default:
!       {
  	rust_unreachable ();
        }
      }
*************** WitnessMatrix::extend (const WitnessMatr
*** 1160,1168 ****
  }
  
  // forward declarations
! static DeconstructedPat
! lower_pattern (Resolver::TypeCheckContext *ctx, HIR::Pattern &pattern,
! 	       TyTy::BaseType *scrutinee_ty);
  
  static DeconstructedPat
  lower_tuple_pattern (Resolver::TypeCheckContext *ctx,
--- 1198,1206 ----
  }
  
  // forward declarations
! static DeconstructedPat lower_pattern (Resolver::TypeCheckContext *ctx,
! 				       HIR::Pattern &pattern,
! 				       TyTy::BaseType *scrutinee_ty);
  
  static DeconstructedPat
  lower_tuple_pattern (Resolver::TypeCheckContext *ctx,
*************** lower_tuple_pattern (Resolver::TypeCheck
*** 1175,1181 ****
    std::vector<DeconstructedPat> fields;
    switch (elems.get_item_type ())
      {
!       case HIR::TupleStructItems::ItemType::MULTIPLE: {
  	HIR::TupleStructItemsNoRange &multiple
  	  = static_cast<HIR::TupleStructItemsNoRange &> (elems);
  
--- 1213,1220 ----
    std::vector<DeconstructedPat> fields;
    switch (elems.get_item_type ())
      {
!     case HIR::TupleStructItems::ItemType::MULTIPLE:
!       {
  	HIR::TupleStructItemsNoRange &multiple
  	  = static_cast<HIR::TupleStructItemsNoRange &> (elems);
  
*************** lower_tuple_pattern (Resolver::TypeCheck
*** 1191,1202 ****
  	return DeconstructedPat (ctor, arity, fields, pattern.get_locus ());
        }
        break;
!       case HIR::TupleStructItems::ItemType::RANGED: {
  	// TODO: ranged tuple struct items
  	rust_unreachable ();
        }
        break;
!       default: {
  	rust_unreachable ();
        }
      }
--- 1230,1243 ----
  	return DeconstructedPat (ctor, arity, fields, pattern.get_locus ());
        }
        break;
!     case HIR::TupleStructItems::ItemType::RANGED:
!       {
  	// TODO: ranged tuple struct items
  	rust_unreachable ();
        }
        break;
!     default:
!       {
  	rust_unreachable ();
        }
      }
*************** lower_struct_pattern (Resolver::TypeChec
*** 1227,1233 ****
      {
        switch (elem->get_item_type ())
  	{
! 	  case HIR::StructPatternField::ItemType::IDENT: {
  	    HIR::StructPatternFieldIdent *ident
  	      = static_cast<HIR::StructPatternFieldIdent *> (elem.get ());
  	    int field_idx
--- 1268,1275 ----
      {
        switch (elem->get_item_type ())
  	{
! 	case HIR::StructPatternField::ItemType::IDENT:
! 	  {
  	    HIR::StructPatternFieldIdent *ident
  	      = static_cast<HIR::StructPatternFieldIdent *> (elem.get ());
  	    int field_idx
*************** lower_struct_pattern (Resolver::TypeChec
*** 1236,1242 ****
  	      = DeconstructedPat::make_wildcard (pattern.get_locus ());
  	  }
  	  break;
! 	  case HIR::StructPatternField::ItemType::IDENT_PAT: {
  	    HIR::StructPatternFieldIdentPat *ident_pat
  	      = static_cast<HIR::StructPatternFieldIdentPat *> (elem.get ());
  	    int field_idx
--- 1278,1285 ----
  	      = DeconstructedPat::make_wildcard (pattern.get_locus ());
  	  }
  	  break;
! 	case HIR::StructPatternField::ItemType::IDENT_PAT:
! 	  {
  	    HIR::StructPatternFieldIdentPat *ident_pat
  	      = static_cast<HIR::StructPatternFieldIdentPat *> (elem.get ());
  	    int field_idx
*************** lower_struct_pattern (Resolver::TypeChec
*** 1246,1257 ****
  	      variant->get_fields ().at (field_idx)->get_field_type ());
  	  }
  	  break;
! 	  case HIR::StructPatternField::ItemType::TUPLE_PAT: {
  	    // TODO: tuple: pat
  	    rust_unreachable ();
  	  }
  	  break;
! 	  default: {
  	    rust_unreachable ();
  	  }
  	}
--- 1289,1302 ----
  	      variant->get_fields ().at (field_idx)->get_field_type ());
  	  }
  	  break;
! 	case HIR::StructPatternField::ItemType::TUPLE_PAT:
! 	  {
  	    // TODO: tuple: pat
  	    rust_unreachable ();
  	  }
  	  break;
! 	default:
! 	  {
  	    rust_unreachable ();
  	  }
  	}
*************** lower_pattern (Resolver::TypeCheckContex
*** 1268,1278 ****
    switch (pat_type)
      {
      case HIR::Pattern::PatternType::WILDCARD:
!       case HIR::Pattern::PatternType::IDENTIFIER: {
  	return DeconstructedPat::make_wildcard (pattern.get_locus ());
        }
        break;
!       case HIR::Pattern::PatternType::PATH: {
  	// TODO: support constants, associated constants, enum variants and
  	// structs
  	// https://doc.rust-lang.org/reference/patterns.html#path-patterns
--- 1313,1325 ----
    switch (pat_type)
      {
      case HIR::Pattern::PatternType::WILDCARD:
!     case HIR::Pattern::PatternType::IDENTIFIER:
!       {
  	return DeconstructedPat::make_wildcard (pattern.get_locus ());
        }
        break;
!     case HIR::Pattern::PatternType::PATH:
!       {
  	// TODO: support constants, associated constants, enum variants and
  	// structs
  	// https://doc.rust-lang.org/reference/patterns.html#path-patterns
*************** lower_pattern (Resolver::TypeCheckContex
*** 1280,1292 ****
  	return DeconstructedPat::make_wildcard (pattern.get_locus ());
        }
        break;
!       case HIR::Pattern::PatternType::REFERENCE: {
  	// TODO: unimplemented. Treat this pattern as wildcard for now.
  	return DeconstructedPat::make_wildcard (pattern.get_locus ());
        }
        break;
      case HIR::Pattern::PatternType::STRUCT:
!       case HIR::Pattern::PatternType::TUPLE_STRUCT: {
  	HirId path_id = UNKNOWN_HIRID;
  	if (pat_type == HIR::Pattern::PatternType::STRUCT)
  	  {
--- 1327,1341 ----
  	return DeconstructedPat::make_wildcard (pattern.get_locus ());
        }
        break;
!     case HIR::Pattern::PatternType::REFERENCE:
!       {
  	// TODO: unimplemented. Treat this pattern as wildcard for now.
  	return DeconstructedPat::make_wildcard (pattern.get_locus ());
        }
        break;
      case HIR::Pattern::PatternType::STRUCT:
!     case HIR::Pattern::PatternType::TUPLE_STRUCT:
!       {
  	HirId path_id = UNKNOWN_HIRID;
  	if (pat_type == HIR::Pattern::PatternType::STRUCT)
  	  {
*************** lower_pattern (Resolver::TypeCheckContex
*** 1343,1379 ****
  	  }
        }
        break;
!       case HIR::Pattern::PatternType::TUPLE: {
  	// TODO: unimplemented. Treat this pattern as wildcard for now.
  	return DeconstructedPat::make_wildcard (pattern.get_locus ());
        }
        break;
!       case HIR::Pattern::PatternType::SLICE: {
  	// TODO: unimplemented. Treat this pattern as wildcard for now.
  	return DeconstructedPat::make_wildcard (pattern.get_locus ());
        }
        break;
!       case HIR::Pattern::PatternType::ALT: {
  	// TODO: unimplemented. Treat this pattern as wildcard for now.
  	return DeconstructedPat::make_wildcard (pattern.get_locus ());
        }
        break;
!       case HIR::Pattern::PatternType::LITERAL: {
  	// TODO: unimplemented. Treat this pattern as wildcard for now.
  	return DeconstructedPat::make_wildcard (pattern.get_locus ());
        }
        break;
!       case HIR::Pattern::PatternType::RANGE: {
  	// TODO: unimplemented. Treat this pattern as wildcard for now.
  	return DeconstructedPat::make_wildcard (pattern.get_locus ());
        }
        break;
!       case HIR::Pattern::PatternType::GROUPED: {
  	// TODO: unimplemented. Treat this pattern as wildcard for now.
  	return DeconstructedPat::make_wildcard (pattern.get_locus ());
        }
        break;
!       default: {
  	rust_unreachable ();
        }
      }
--- 1392,1435 ----
  	  }
        }
        break;
!     case HIR::Pattern::PatternType::TUPLE:
!       {
  	// TODO: unimplemented. Treat this pattern as wildcard for now.
  	return DeconstructedPat::make_wildcard (pattern.get_locus ());
        }
        break;
!     case HIR::Pattern::PatternType::SLICE:
!       {
  	// TODO: unimplemented. Treat this pattern as wildcard for now.
  	return DeconstructedPat::make_wildcard (pattern.get_locus ());
        }
        break;
!     case HIR::Pattern::PatternType::ALT:
!       {
  	// TODO: unimplemented. Treat this pattern as wildcard for now.
  	return DeconstructedPat::make_wildcard (pattern.get_locus ());
        }
        break;
!     case HIR::Pattern::PatternType::LITERAL:
!       {
  	// TODO: unimplemented. Treat this pattern as wildcard for now.
  	return DeconstructedPat::make_wildcard (pattern.get_locus ());
        }
        break;
!     case HIR::Pattern::PatternType::RANGE:
!       {
  	// TODO: unimplemented. Treat this pattern as wildcard for now.
  	return DeconstructedPat::make_wildcard (pattern.get_locus ());
        }
        break;
!     case HIR::Pattern::PatternType::GROUPED:
!       {
  	// TODO: unimplemented. Treat this pattern as wildcard for now.
  	return DeconstructedPat::make_wildcard (pattern.get_locus ());
        }
        break;
!     default:
!       {
  	rust_unreachable ();
        }
      }
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/rust-hir-pattern-analysis.h gcc-16-20250810/gcc/rust/checks/errors/rust-hir-pattern-analysis.h
*** gcc-16-20250803/gcc/rust/checks/errors/rust-hir-pattern-analysis.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/rust-hir-pattern-analysis.h	Sun Aug 10 22:32:08 2025
*************** namespace Analysis {
*** 33,41 ****
  
  using namespace HIR;
  
! void
! check_match_usefulness (Resolver::TypeCheckContext *ctx,
! 			TyTy::BaseType *scrutinee_ty, HIR::MatchExpr &expr);
  
  class PatternChecker : public HIR::HIRFullVisitor
  {
--- 33,41 ----
  
  using namespace HIR;
  
! void check_match_usefulness (Resolver::TypeCheckContext *ctx,
! 			     TyTy::BaseType *scrutinee_ty,
! 			     HIR::MatchExpr &expr);
  
  class PatternChecker : public HIR::HIRFullVisitor
  {
*************** private:
*** 86,91 ****
--- 86,93 ----
    virtual void visit (MethodCallExpr &expr) override;
    virtual void visit (FieldAccessExpr &expr) override;
    virtual void visit (BlockExpr &expr) override;
+   virtual void visit (AnonConst &expr) override;
+   virtual void visit (ConstBlock &expr) override;
    virtual void visit (ClosureExpr &expr) override;
    virtual void visit (ContinueExpr &expr) override;
    virtual void visit (BreakExpr &expr) override;
*************** private:
*** 107,112 ****
--- 109,115 ----
    virtual void visit (AsyncBlockExpr &expr) override;
    virtual void visit (InlineAsm &expr) override;
    virtual void visit (LlvmInlineAsm &expr) override;
+   virtual void visit (OffsetOf &expr) override;
    virtual void visit (TypeParam &param) override;
    virtual void visit (ConstGenericParam &param) override;
    virtual void visit (LifetimeWhereClauseItem &item) override;
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/rust-readonly-check2.cc gcc-16-20250810/gcc/rust/checks/errors/rust-readonly-check2.cc
*** gcc-16-20250803/gcc/rust/checks/errors/rust-readonly-check2.cc	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/rust/checks/errors/rust-readonly-check2.cc	Sun Aug 10 22:32:08 2025
***************
*** 0 ****
--- 1,253 ----
+ // Copyright (C) 2025 Free Software Foundation, Inc.
+ 
+ // This file is part of GCC.
+ 
+ // GCC is free software; you can redistribute it and/or modify it under
+ // the terms of the GNU General Public License as published by the Free
+ // Software Foundation; either version 3, or (at your option) any later
+ // version.
+ 
+ // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ // WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ // for more details.
+ 
+ // You should have received a copy of the GNU General Public License
+ // along with GCC; see the file COPYING3.  If not see
+ // <http://www.gnu.org/licenses/>.
+ 
+ #include "rust-readonly-check2.h"
+ #include "rust-hir-expr.h"
+ #include "rust-hir-node.h"
+ #include "rust-hir-path.h"
+ #include "rust-hir-map.h"
+ #include "rust-hir-pattern.h"
+ #include "rust-mapping-common.h"
+ #include "rust-system.h"
+ #include "rust-immutable-name-resolution-context.h"
+ #include "rust-tyty.h"
+ 
+ namespace Rust {
+ namespace HIR {
+ 
+ static std::set<HirId> already_assigned_variables = {};
+ 
+ ReadonlyChecker::ReadonlyChecker ()
+   : resolver (*Resolver::Resolver::get ()),
+     mappings (Analysis::Mappings::get ()),
+     context (*Resolver::TypeCheckContext::get ())
+ {}
+ 
+ void
+ ReadonlyChecker::go (Crate &crate)
+ {
+   for (auto &item : crate.get_items ())
+     item->accept_vis (*this);
+ }
+ 
+ void
+ ReadonlyChecker::visit (AssignmentExpr &expr)
+ {
+   Expr &lhs = expr.get_lhs ();
+   mutable_context.enter (expr.get_mappings ().get_hirid ());
+   lhs.accept_vis (*this);
+   mutable_context.exit ();
+ }
+ 
+ void
+ ReadonlyChecker::visit (PathInExpression &expr)
+ {
+   if (!mutable_context.is_in_context ())
+     return;
+ 
+   NodeId ast_node_id = expr.get_mappings ().get_nodeid ();
+   NodeId def_id;
+ 
+   auto &nr_ctx
+     = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
+   if (auto id = nr_ctx.lookup (ast_node_id))
+     def_id = *id;
+   else
+     return;
+ 
+   auto hir_id = mappings.lookup_node_to_hir (def_id);
+   if (!hir_id)
+     return;
+ 
+   // Check if the local variable is mutable.
+   auto maybe_pattern = mappings.lookup_hir_pattern (*hir_id);
+   if (maybe_pattern
+       && maybe_pattern.value ()->get_pattern_type ()
+ 	   == HIR::Pattern::PatternType::IDENTIFIER)
+     check_variable (static_cast<IdentifierPattern *> (maybe_pattern.value ()),
+ 		    expr.get_locus ());
+ 
+   // Check if the static item is mutable.
+   auto maybe_item = mappings.lookup_hir_item (*hir_id);
+   if (maybe_item
+       && maybe_item.value ()->get_item_kind () == HIR::Item::ItemKind::Static)
+     {
+       auto static_item = static_cast<HIR::StaticItem *> (*maybe_item);
+       if (!static_item->is_mut ())
+ 	rust_error_at (expr.get_locus (),
+ 		       "assignment of read-only location '%s'",
+ 		       static_item->get_identifier ().as_string ().c_str ());
+     }
+ 
+   // Check if the constant item is mutable.
+   if (maybe_item
+       && maybe_item.value ()->get_item_kind () == HIR::Item::ItemKind::Constant)
+     {
+       auto const_item = static_cast<HIR::ConstantItem *> (*maybe_item);
+       rust_error_at (expr.get_locus (), "assignment of read-only location '%s'",
+ 		     const_item->get_identifier ().as_string ().c_str ());
+     }
+ }
+ 
+ void
+ ReadonlyChecker::check_variable (IdentifierPattern *pattern,
+ 				 location_t assigned_loc)
+ {
+   if (!mutable_context.is_in_context ())
+     return;
+   if (pattern->is_mut ())
+     return;
+ 
+   auto hir_id = pattern->get_mappings ().get_hirid ();
+   if (already_assigned_variables.count (hir_id) > 0)
+     rust_error_at (assigned_loc, "assignment of read-only variable '%s'",
+ 		   pattern->as_string ().c_str ());
+   already_assigned_variables.insert (hir_id);
+ }
+ 
+ void
+ ReadonlyChecker::collect_assignment_identifier (IdentifierPattern &pattern,
+ 						bool has_init_expr)
+ {
+   if (has_init_expr)
+     {
+       HirId pattern_id = pattern.get_mappings ().get_hirid ();
+       already_assigned_variables.insert (pattern_id);
+     }
+ }
+ 
+ void
+ ReadonlyChecker::collect_assignment_tuple (TuplePattern &tuple_pattern,
+ 					   bool has_init_expr)
+ {
+   switch (tuple_pattern.get_items ().get_item_type ())
+     {
+     case HIR::TuplePatternItems::ItemType::MULTIPLE:
+       {
+ 	auto &items = static_cast<HIR::TuplePatternItemsMultiple &> (
+ 	  tuple_pattern.get_items ());
+ 	for (auto &sub : items.get_patterns ())
+ 	  {
+ 	    collect_assignment (*sub, has_init_expr);
+ 	  }
+       }
+       break;
+     default:
+       break;
+     }
+ }
+ 
+ void
+ ReadonlyChecker::collect_assignment (Pattern &pattern, bool has_init_expr)
+ {
+   switch (pattern.get_pattern_type ())
+     {
+     case HIR::Pattern::PatternType::IDENTIFIER:
+       {
+ 	collect_assignment_identifier (static_cast<IdentifierPattern &> (
+ 					 pattern),
+ 				       has_init_expr);
+       }
+       break;
+     case HIR::Pattern::PatternType::TUPLE:
+       {
+ 	auto &tuple_pattern = static_cast<HIR::TuplePattern &> (pattern);
+ 	collect_assignment_tuple (tuple_pattern, has_init_expr);
+       }
+       break;
+     default:
+       break;
+     }
+ }
+ 
+ void
+ ReadonlyChecker::visit (LetStmt &stmt)
+ {
+   HIR::Pattern &pattern = stmt.get_pattern ();
+   collect_assignment (pattern, stmt.has_init_expr ());
+ }
+ 
+ void
+ ReadonlyChecker::visit (FieldAccessExpr &expr)
+ {
+   if (mutable_context.is_in_context ())
+     {
+       expr.get_receiver_expr ().accept_vis (*this);
+     }
+ }
+ 
+ void
+ ReadonlyChecker::visit (TupleIndexExpr &expr)
+ {
+   if (mutable_context.is_in_context ())
+     {
+       expr.get_tuple_expr ().accept_vis (*this);
+     }
+ }
+ 
+ void
+ ReadonlyChecker::visit (ArrayIndexExpr &expr)
+ {
+   if (mutable_context.is_in_context ())
+     {
+       expr.get_array_expr ().accept_vis (*this);
+     }
+ }
+ 
+ void
+ ReadonlyChecker::visit (TupleExpr &expr)
+ {
+   if (mutable_context.is_in_context ())
+     {
+       // TODO: Add check for tuple expression
+     }
+ }
+ 
+ void
+ ReadonlyChecker::visit (LiteralExpr &expr)
+ {
+   if (mutable_context.is_in_context ())
+     {
+       rust_error_at (expr.get_locus (), "assignment of read-only location");
+     }
+ }
+ 
+ void
+ ReadonlyChecker::visit (DereferenceExpr &expr)
+ {
+   if (!mutable_context.is_in_context ())
+     return;
+   TyTy::BaseType *to_deref_type;
+   auto to_deref = expr.get_expr ().get_mappings ().get_hirid ();
+   if (!context.lookup_type (to_deref, &to_deref_type))
+     return;
+   if (to_deref_type->get_kind () == TyTy::TypeKind::REF)
+     {
+       auto ref_type = static_cast<TyTy::ReferenceType *> (to_deref_type);
+       if (!ref_type->is_mutable ())
+ 	rust_error_at (expr.get_locus (), "assignment of read-only location");
+     }
+   if (to_deref_type->get_kind () == TyTy::TypeKind::POINTER)
+     {
+       auto ptr_type = static_cast<TyTy::PointerType *> (to_deref_type);
+       if (!ptr_type->is_mutable ())
+ 	rust_error_at (expr.get_locus (), "assignment of read-only location");
+     }
+ }
+ } // namespace HIR
+ } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/rust-readonly-check2.h gcc-16-20250810/gcc/rust/checks/errors/rust-readonly-check2.h
*** gcc-16-20250803/gcc/rust/checks/errors/rust-readonly-check2.h	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/rust/checks/errors/rust-readonly-check2.h	Sun Aug 10 22:32:08 2025
***************
*** 0 ****
--- 1,67 ----
+ // Copyright (C) 2025 Free Software Foundation, Inc.
+ 
+ // This file is part of GCC.
+ 
+ // GCC is free software; you can redistribute it and/or modify it under
+ // the terms of the GNU General Public License as published by the Free
+ // Software Foundation; either version 3, or (at your option) any later
+ // version.
+ 
+ // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ // WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ // for more details.
+ 
+ // You should have received a copy of the GNU General Public License
+ // along with GCC; see the file COPYING3.  If not see
+ // <http://www.gnu.org/licenses/>.
+ 
+ #include "rust-hir-visitor.h"
+ #include "rust-name-resolver.h"
+ #include "rust-stacked-contexts.h"
+ #include "rust-hir-type-check.h"
+ 
+ namespace Rust {
+ namespace HIR {
+ class ReadonlyChecker : public DefaultHIRVisitor
+ {
+ public:
+   ReadonlyChecker ();
+ 
+   void go (HIR::Crate &crate);
+ 
+ private:
+   enum class lvalue_use
+   {
+     assign,
+     increment,
+     decrement,
+   };
+ 
+   Resolver::Resolver &resolver;
+   Analysis::Mappings &mappings;
+   Resolver::TypeCheckContext &context;
+   StackedContexts<HirId> mutable_context;
+ 
+   using DefaultHIRVisitor::visit;
+ 
+   virtual void visit (AssignmentExpr &expr) override;
+   virtual void visit (PathInExpression &expr) override;
+   virtual void visit (FieldAccessExpr &expr) override;
+   virtual void visit (ArrayIndexExpr &expr) override;
+   virtual void visit (TupleExpr &expr) override;
+   virtual void visit (TupleIndexExpr &expr) override;
+   virtual void visit (LetStmt &stmt) override;
+   virtual void visit (LiteralExpr &expr) override;
+   virtual void visit (DereferenceExpr &expr) override;
+ 
+   void collect_assignment (Pattern &pattern, bool has_init_expr);
+   void collect_assignment_identifier (IdentifierPattern &pattern,
+ 				      bool has_init_expr);
+   void collect_assignment_tuple (TuplePattern &pattern, bool has_init_expr);
+ 
+   void check_variable (IdentifierPattern *pattern, location_t assigned_loc);
+ };
+ 
+ } // namespace HIR
+ } // namespace Rust
\ No newline at end of file
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/rust-unsafe-checker.cc gcc-16-20250810/gcc/rust/checks/errors/rust-unsafe-checker.cc
*** gcc-16-20250803/gcc/rust/checks/errors/rust-unsafe-checker.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/rust-unsafe-checker.cc	Sun Aug 10 22:32:08 2025
*************** UnsafeChecker::visit (BlockExpr &expr)
*** 540,545 ****
--- 540,557 ----
  }
  
  void
+ UnsafeChecker::visit (AnonConst &expr)
+ {
+   expr.get_inner_expr ().accept_vis (*this);
+ }
+ 
+ void
+ UnsafeChecker::visit (ConstBlock &expr)
+ {
+   expr.get_const_expr ().accept_vis (*this);
+ }
+ 
+ void
  UnsafeChecker::visit (ContinueExpr &)
  {}
  
*************** UnsafeChecker::visit (LlvmInlineAsm &exp
*** 682,687 ****
--- 694,705 ----
  }
  
  void
+ UnsafeChecker::visit (OffsetOf &expr)
+ {
+   // nothing to do, offset_of!() is safe
+ }
+ 
+ void
  UnsafeChecker::visit (TypeParam &)
  {}
  
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/errors/rust-unsafe-checker.h gcc-16-20250810/gcc/rust/checks/errors/rust-unsafe-checker.h
*** gcc-16-20250803/gcc/rust/checks/errors/rust-unsafe-checker.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/errors/rust-unsafe-checker.h	Sun Aug 10 22:32:08 2025
*************** private:
*** 95,100 ****
--- 95,102 ----
    virtual void visit (FieldAccessExpr &expr) override;
    virtual void visit (ClosureExpr &expr) override;
    virtual void visit (BlockExpr &expr) override;
+   virtual void visit (AnonConst &expr) override;
+   virtual void visit (ConstBlock &expr) override;
    virtual void visit (ContinueExpr &expr) override;
    virtual void visit (BreakExpr &expr) override;
    virtual void visit (RangeFromToExpr &expr) override;
*************** private:
*** 115,120 ****
--- 117,123 ----
    virtual void visit (AsyncBlockExpr &expr) override;
    virtual void visit (InlineAsm &expr) override;
    virtual void visit (LlvmInlineAsm &expr) override;
+   virtual void visit (OffsetOf &expr) override;
    virtual void visit (TypeParam &param) override;
    virtual void visit (ConstGenericParam &param) override;
    virtual void visit (LifetimeWhereClauseItem &item) override;
diff -Nrcpad gcc-16-20250803/gcc/rust/checks/lints/rust-lint-unused-var.cc gcc-16-20250810/gcc/rust/checks/lints/rust-lint-unused-var.cc
*** gcc-16-20250803/gcc/rust/checks/lints/rust-lint-unused-var.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/checks/lints/rust-lint-unused-var.cc	Sun Aug 10 22:32:08 2025
*************** check_decl (tree *t)
*** 31,36 ****
--- 31,37 ----
    tree var_name = DECL_NAME (*t);
    const char *var_name_ptr = IDENTIFIER_POINTER (var_name);
    bool starts_with_under_score = strncmp (var_name_ptr, "_", 1) == 0;
+   bool is_self = strcmp (var_name_ptr, "self") == 0;
  
    bool is_constant = TREE_CODE (*t) == CONST_DECL;
    // if (!is_constant)
*************** check_decl (tree *t)
*** 43,49 ****
    //       	  starts_with_under_score ? "true" : "false", var_name_ptr);
    //   }
  
!   if (!TREE_USED (*t) && !DECL_ARTIFICIAL (*t) && !starts_with_under_score)
      {
        warning_at (DECL_SOURCE_LOCATION (*t),
  		  is_constant ? OPT_Wunused_const_variable_
--- 44,51 ----
    //       	  starts_with_under_score ? "true" : "false", var_name_ptr);
    //   }
  
!   if (!TREE_USED (*t) && !DECL_ARTIFICIAL (*t) && !starts_with_under_score
!       && !is_self)
      {
        warning_at (DECL_SOURCE_LOCATION (*t),
  		  is_constant ? OPT_Wunused_const_variable_
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-cfg-strip.cc gcc-16-20250810/gcc/rust/expand/rust-cfg-strip.cc
*** gcc-16-20250803/gcc/rust/expand/rust-cfg-strip.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-cfg-strip.cc	Sun Aug 10 22:32:08 2025
*************** CfgStrip::maybe_strip_generic_args (AST:
*** 289,295 ****
      {
        switch (arg.get_kind ())
  	{
! 	  case AST::GenericArg::Kind::Type: {
  	    auto &type = arg.get_type ();
  	    type.accept_vis (*this);
  
--- 289,296 ----
      {
        switch (arg.get_kind ())
  	{
! 	case AST::GenericArg::Kind::Type:
! 	  {
  	    auto &type = arg.get_type ();
  	    type.accept_vis (*this);
  
*************** CfgStrip::maybe_strip_generic_args (AST:
*** 298,304 ****
  			     "cannot strip type in this position");
  	    break;
  	  }
! 	  case AST::GenericArg::Kind::Const: {
  	    auto &expr = arg.get_expression ();
  	    expr.accept_vis (*this);
  
--- 299,306 ----
  			     "cannot strip type in this position");
  	    break;
  	  }
! 	case AST::GenericArg::Kind::Const:
! 	  {
  	    auto &expr = arg.get_expression ();
  	    expr.accept_vis (*this);
  
*************** CfgStrip::visit (AST::ClosureExprInnerTy
*** 1190,1196 ****
      rust_error_at (type.get_locus (), "cannot strip type in this position");
  
    // can't strip expression itself, but can strip sub-expressions
!   auto &definition_block = expr.get_definition_block ();
    definition_block.accept_vis (*this);
    if (definition_block.is_marked_for_strip ())
      rust_error_at (definition_block.get_locus (),
--- 1192,1198 ----
      rust_error_at (type.get_locus (), "cannot strip type in this position");
  
    // can't strip expression itself, but can strip sub-expressions
!   auto &definition_block = expr.get_definition_expr ();
    definition_block.accept_vis (*this);
    if (definition_block.is_marked_for_strip ())
      rust_error_at (definition_block.get_locus (),
*************** CfgStrip::visit (AST::Module &module)
*** 1763,1778 ****
        return;
      }
  
!   // A loaded module might have inner attributes
!   if (module.get_kind () == AST::Module::ModuleKind::LOADED)
      {
!       // strip test based on inner attrs
!       expand_cfg_attrs (module.get_inner_attrs ());
!       if (fails_cfg_with_expand (module.get_inner_attrs ()))
! 	{
! 	  module.mark_for_strip ();
! 	  return;
! 	}
      }
  
    // strip items if required
--- 1765,1781 ----
        return;
      }
  
!   if (module.get_kind () == AST::Module::UNLOADED)
      {
!       module.load_items ();
!     }
! 
!   // strip test based on inner attrs
!   expand_cfg_attrs (module.get_inner_attrs ());
!   if (fails_cfg_with_expand (module.get_inner_attrs ()))
!     {
!       module.mark_for_strip ();
!       return;
      }
  
    // strip items if required
*************** void
*** 2260,2271 ****
  CfgStrip::visit (AST::IdentifierPattern &pattern)
  {
    // can only strip sub-patterns of the inner pattern to bind
!   if (!pattern.has_pattern_to_bind ())
      return;
  
    AST::DefaultASTVisitor::visit (pattern);
  
!   auto &sub_pattern = pattern.get_pattern_to_bind ();
    if (sub_pattern.is_marked_for_strip ())
      rust_error_at (sub_pattern.get_locus (),
  		   "cannot strip pattern in this position");
--- 2263,2274 ----
  CfgStrip::visit (AST::IdentifierPattern &pattern)
  {
    // can only strip sub-patterns of the inner pattern to bind
!   if (!pattern.has_subpattern ())
      return;
  
    AST::DefaultASTVisitor::visit (pattern);
  
!   auto &sub_pattern = pattern.get_subpattern ();
    if (sub_pattern.is_marked_for_strip ())
      rust_error_at (sub_pattern.get_locus (),
  		   "cannot strip pattern in this position");
*************** CfgStrip::visit (AST::GroupedPattern &pa
*** 2475,2494 ****
  }
  
  void
! CfgStrip::visit (AST::SlicePattern &pattern)
  {
!   AST::DefaultASTVisitor::visit (pattern);
    // can't strip individual patterns, only sub-patterns
!   for (auto &item : pattern.get_items ())
      {
!       if (item->is_marked_for_strip ())
! 	rust_error_at (item->get_locus (),
  		       "cannot strip pattern in this position");
-       // TODO: quit stripping now? or keep going?
      }
  }
  
  void
  CfgStrip::visit (AST::AltPattern &pattern)
  {
    AST::DefaultASTVisitor::visit (pattern);
--- 2478,2521 ----
  }
  
  void
! CfgStrip::visit (AST::SlicePatternItemsNoRest &items)
  {
!   AST::DefaultASTVisitor::visit (items);
    // can't strip individual patterns, only sub-patterns
!   for (auto &pattern : items.get_patterns ())
      {
!       if (pattern->is_marked_for_strip ())
! 	rust_error_at (pattern->get_locus (),
  		       "cannot strip pattern in this position");
      }
  }
  
  void
+ CfgStrip::visit (AST::SlicePatternItemsHasRest &items)
+ {
+   AST::DefaultASTVisitor::visit (items);
+   // can't strip individual patterns, only sub-patterns
+   for (auto &pattern : items.get_lower_patterns ())
+     {
+       if (pattern->is_marked_for_strip ())
+ 	rust_error_at (pattern->get_locus (),
+ 		       "cannot strip pattern in this position");
+     }
+   for (auto &pattern : items.get_upper_patterns ())
+     {
+       if (pattern->is_marked_for_strip ())
+ 	rust_error_at (pattern->get_locus (),
+ 		       "cannot strip pattern in this position");
+     }
+ }
+ 
+ void
+ CfgStrip::visit (AST::SlicePattern &pattern)
+ {
+   AST::DefaultASTVisitor::visit (pattern);
+ }
+ 
+ void
  CfgStrip::visit (AST::AltPattern &pattern)
  {
    AST::DefaultASTVisitor::visit (pattern);
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-cfg-strip.h gcc-16-20250810/gcc/rust/expand/rust-cfg-strip.h
*** gcc-16-20250803/gcc/rust/expand/rust-cfg-strip.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-cfg-strip.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 172,177 ****
--- 172,179 ----
    void visit (AST::TuplePatternItemsMultiple &tuple_items) override;
    void visit (AST::TuplePatternItemsRanged &tuple_items) override;
    void visit (AST::GroupedPattern &pattern) override;
+   void visit (AST::SlicePatternItemsNoRest &items) override;
+   void visit (AST::SlicePatternItemsHasRest &items) override;
    void visit (AST::SlicePattern &pattern) override;
    void visit (AST::AltPattern &pattern) override;
  
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-derive-clone.h gcc-16-20250810/gcc/rust/expand/rust-derive-clone.h
*** gcc-16-20250803/gcc/rust/expand/rust-derive-clone.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-derive-clone.h	Sun Aug 10 22:32:08 2025
*************** class DeriveClone : DeriveVisitor
*** 29,35 ****
  public:
    DeriveClone (location_t loc);
  
!   std::unique_ptr<AST::Item> go (Item &item);
  
  private:
    std::unique_ptr<Item> expanded;
--- 29,35 ----
  public:
    DeriveClone (location_t loc);
  
!   std::unique_ptr<Item> go (Item &item);
  
  private:
    std::unique_ptr<Item> expanded;
*************** private:
*** 80,89 ****
    MatchCase clone_enum_struct (PathInExpression variant_path,
  			       const EnumItemStruct &variant);
  
!   virtual void visit_struct (StructStruct &item);
!   virtual void visit_tuple (TupleStruct &item);
!   virtual void visit_enum (Enum &item);
!   virtual void visit_union (Union &item);
  };
  
  } // namespace AST
--- 80,89 ----
    MatchCase clone_enum_struct (PathInExpression variant_path,
  			       const EnumItemStruct &variant);
  
!   virtual void visit_struct (StructStruct &item) override;
!   virtual void visit_tuple (TupleStruct &item) override;
!   virtual void visit_enum (Enum &item) override;
!   virtual void visit_union (Union &item) override;
  };
  
  } // namespace AST
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-derive-cmp-common.cc gcc-16-20250810/gcc/rust/expand/rust-derive-cmp-common.cc
*** gcc-16-20250803/gcc/rust/expand/rust-derive-cmp-common.cc	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/rust/expand/rust-derive-cmp-common.cc	Sun Aug 10 22:32:08 2025
***************
*** 0 ****
--- 1,191 ----
+ // Copyright (C) 2025 Free Software Foundation, Inc.
+ 
+ // This file is part of GCC.
+ 
+ // GCC is free software; you can redistribute it and/or modify it under
+ // the terms of the GNU General Public License as published by the Free
+ // Software Foundation; either version 3, or (at your option) any later
+ // version.
+ 
+ // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ // WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ // for more details.
+ 
+ // You should have received a copy of the GNU General Public License
+ // along with GCC; see the file COPYING3.  If not see
+ // <http://www.gnu.org/licenses/>.
+ 
+ #include "rust-derive-cmp-common.h"
+ #include "rust-ast-builder.h"
+ #include "rust-item.h"
+ 
+ namespace Rust {
+ namespace AST {
+ 
+ SelfOther
+ SelfOther::index (Builder builder, int idx)
+ {
+   return SelfOther{
+     builder.tuple_idx ("self", idx),
+     builder.tuple_idx ("other", idx),
+   };
+ }
+ 
+ std::vector<SelfOther>
+ SelfOther::indexes (Builder builder, const std::vector<TupleField> &fields)
+ {
+   std::vector<SelfOther> vec;
+ 
+   for (size_t i = 0; i < fields.size (); i++)
+     vec.emplace_back (SelfOther::index (builder, i));
+ 
+   return vec;
+ }
+ 
+ SelfOther
+ SelfOther::field (Builder builder, const std::string &field_name)
+ {
+   return SelfOther{
+     builder.field_access (builder.identifier ("self"), field_name),
+     builder.field_access (builder.identifier ("other"), field_name),
+   };
+ }
+ 
+ std::vector<SelfOther>
+ SelfOther::fields (Builder builder, const std::vector<StructField> &fields)
+ {
+   std::vector<SelfOther> vec;
+ 
+   for (const auto &field : fields)
+     vec.emplace_back (
+       SelfOther::field (builder, field.get_field_name ().as_string ()));
+ 
+   return vec;
+ }
+ 
+ MatchCase
+ EnumMatchBuilder::tuple (EnumItem &variant_raw)
+ {
+   auto &variant = static_cast<EnumItemTuple &> (variant_raw);
+ 
+   auto self_patterns = std::vector<std::unique_ptr<Pattern>> ();
+   auto other_patterns = std::vector<std::unique_ptr<Pattern>> ();
+ 
+   auto self_other_exprs = std::vector<SelfOther> ();
+ 
+   for (size_t i = 0; i < variant.get_tuple_fields ().size (); i++)
+     {
+       // The patterns we're creating for each field are `self_<i>` and
+       // `other_<i>` where `i` is the index of the field. It doesn't actually
+       // matter what we use, as long as it's ordered, unique, and that we can
+       // reuse it in the match case's return expression to check that they are
+       // equal.
+ 
+       auto self_pattern_str = "__self_" + std::to_string (i);
+       auto other_pattern_str = "__other_" + std::to_string (i);
+ 
+       self_patterns.emplace_back (
+ 	builder.identifier_pattern (self_pattern_str));
+       other_patterns.emplace_back (
+ 	builder.identifier_pattern (other_pattern_str));
+ 
+       self_other_exprs.emplace_back (SelfOther{
+ 	builder.identifier (self_pattern_str),
+ 	builder.identifier (other_pattern_str),
+       });
+     }
+ 
+   // TODO: Replace with `reconstruct()` instead of building these twice
+   auto self_variant_path = builder.variant_path (enum_path, variant_path);
+   auto other_variant_path = builder.variant_path (enum_path, variant_path);
+ 
+   auto self_pattern_items = std::unique_ptr<TupleStructItems> (
+     new TupleStructItemsNoRange (std::move (self_patterns)));
+   auto other_pattern_items = std::unique_ptr<TupleStructItems> (
+     new TupleStructItemsNoRange (std::move (other_patterns)));
+ 
+   auto self_pattern = std::unique_ptr<Pattern> (
+     new ReferencePattern (std::unique_ptr<Pattern> (new TupleStructPattern (
+ 			    self_variant_path, std::move (self_pattern_items))),
+ 			  false, false, builder.loc));
+   auto other_pattern = std::unique_ptr<Pattern> (new ReferencePattern (
+     std::unique_ptr<Pattern> (new TupleStructPattern (
+       other_variant_path, std::move (other_pattern_items))),
+     false, false, builder.loc));
+ 
+   auto tuple_items = std::make_unique<TuplePatternItemsMultiple> (
+     vec (std::move (self_pattern), std::move (other_pattern)));
+ 
+   auto pattern
+     = std::make_unique<TuplePattern> (std::move (tuple_items), builder.loc);
+ 
+   auto expr = fn (std::move (self_other_exprs));
+ 
+   return builder.match_case (std::move (pattern), std::move (expr));
+ }
+ 
+ MatchCase
+ EnumMatchBuilder::strukt (EnumItem &variant_raw)
+ {
+   auto &variant = static_cast<EnumItemStruct &> (variant_raw);
+ 
+   auto self_fields = std::vector<std::unique_ptr<StructPatternField>> ();
+   auto other_fields = std::vector<std::unique_ptr<StructPatternField>> ();
+ 
+   auto self_other_exprs = std::vector<SelfOther> ();
+ 
+   for (auto &field : variant.get_struct_fields ())
+     {
+       // The patterns we're creating for each field are `self_<field>` and
+       // `other_<field>` where `field` is the name of the field. It doesn't
+       // actually matter what we use, as long as it's ordered, unique, and that
+       // we can reuse it in the match case's return expression to check that
+       // they are equal.
+ 
+       auto field_name = field.get_field_name ().as_string ();
+ 
+       auto self_pattern_str = "__self_" + field_name;
+       auto other_pattern_str = "__other_" + field_name;
+ 
+       self_fields.emplace_back (builder.struct_pattern_ident_pattern (
+ 	field_name, builder.identifier_pattern (self_pattern_str)));
+       other_fields.emplace_back (builder.struct_pattern_ident_pattern (
+ 	field_name, builder.identifier_pattern (other_pattern_str)));
+ 
+       self_other_exprs.emplace_back (SelfOther{
+ 	builder.identifier (self_pattern_str),
+ 	builder.identifier (other_pattern_str),
+       });
+     }
+ 
+   // TODO: Replace with `reconstruct()` instead of building these twice
+   auto self_variant_path = builder.variant_path (enum_path, variant_path);
+   auto other_variant_path = builder.variant_path (enum_path, variant_path);
+ 
+   auto self_elts = StructPatternElements (std::move (self_fields));
+   auto other_elts = StructPatternElements (std::move (other_fields));
+ 
+   auto self_pattern = std::unique_ptr<Pattern> (new ReferencePattern (
+     std::unique_ptr<Pattern> (new StructPattern (self_variant_path, builder.loc,
+ 						 std::move (self_elts))),
+     false, false, builder.loc));
+   auto other_pattern = std::unique_ptr<Pattern> (
+     new ReferencePattern (std::unique_ptr<Pattern> (
+ 			    new StructPattern (other_variant_path, builder.loc,
+ 					       std::move (other_elts))),
+ 			  false, false, builder.loc));
+ 
+   auto tuple_items = std::make_unique<TuplePatternItemsMultiple> (
+     vec (std::move (self_pattern), std::move (other_pattern)));
+ 
+   auto pattern
+     = std::make_unique<TuplePattern> (std::move (tuple_items), builder.loc);
+ 
+   auto expr = fn (std::move (self_other_exprs));
+ 
+   return builder.match_case (std::move (pattern), std::move (expr));
+ }
+ 
+ } // namespace AST
+ } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-derive-cmp-common.h gcc-16-20250810/gcc/rust/expand/rust-derive-cmp-common.h
*** gcc-16-20250803/gcc/rust/expand/rust-derive-cmp-common.h	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/rust/expand/rust-derive-cmp-common.h	Sun Aug 10 22:32:08 2025
***************
*** 0 ****
--- 1,99 ----
+ // Copyright (C) 2025 Free Software Foundation, Inc.
+ 
+ // This file is part of GCC.
+ 
+ // GCC is free software; you can redistribute it and/or modify it under
+ // the terms of the GNU General Public License as published by the Free
+ // Software Foundation; either version 3, or (at your option) any later
+ // version.
+ 
+ // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ // WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ // for more details.
+ 
+ // You should have received a copy of the GNU General Public License
+ // along with GCC; see the file COPYING3.  If not see
+ // <http://www.gnu.org/licenses/>.
+ 
+ #ifndef RUST_DERIVE_CMP_COMMON_H
+ #define RUST_DERIVE_CMP_COMMON_H
+ 
+ #include "rust-ast.h"
+ #include "rust-ast-builder.h"
+ #include "rust-item.h"
+ #include "rust-path.h"
+ 
+ namespace Rust {
+ namespace AST {
+ 
+ /**
+  * A pair of two expressions from each instance being compared. E.g. this
+  * could be `self.0` and `other.0`, or `self.field` and `other.field`
+  */
+ struct SelfOther
+ {
+   std::unique_ptr<Expr> self_expr;
+   std::unique_ptr<Expr> other_expr;
+ 
+   /* Create a <self.i> and an <other.i> expression */
+   static SelfOther index (Builder builder, int idx);
+   static std::vector<SelfOther> indexes (Builder builder,
+ 					 const std::vector<TupleField> &fields);
+ 
+   /* Create a <self.field> and an <other.field> expression */
+   static SelfOther field (Builder builder, const std::string &field_name);
+   static std::vector<SelfOther> fields (Builder builder,
+ 					const std::vector<StructField> &fields);
+ };
+ 
+ /**
+  * Builder for common match cases used when comparing two enum instances. This
+  * builder takes care of creating the unique patterns for the `self` instance
+  * and `other` instance, as well as the entire `MatchCase` required for building
+  * a proper comparision expression for an implementation of a comparision trait
+  * for an enum type. The functions take a lambda to use when creating the
+  * expression of the generated `MatchCase`.
+  */
+ class EnumMatchBuilder
+ {
+ public:
+   /**
+    * The type of functions to call when creating the resulting expression in the
+    * generated `MatchCase`
+    */
+   using ExprFn
+     = std::function<std::unique_ptr<Expr> (std::vector<SelfOther> &&)>;
+ 
+   EnumMatchBuilder (const std::string &enum_path,
+ 		    const std::string &variant_path, ExprFn fn,
+ 		    Builder &builder)
+     : enum_path (enum_path), variant_path (variant_path), fn (fn),
+       builder (builder)
+   {}
+ 
+   /**
+    * Generate a `MatchCase` for an enum tuple variant
+    *
+    * (&Enum::Tuple(self0, self1), &Enum::Tuple(other0, other1)) => <fn>
+    */
+   MatchCase tuple (EnumItem &variant);
+ 
+   /**
+    * Generate a `MatchCase` for an enum struct variant
+    *
+    * (&Enum::Struct { a: self_a }, &Enum::Struct { a: other_a }) => <fn>
+    */
+   MatchCase strukt (EnumItem &variant);
+ 
+ private:
+   const std::string &enum_path;
+   const std::string &variant_path;
+   ExprFn fn;
+   Builder &builder;
+ };
+ 
+ } // namespace AST
+ } // namespace Rust
+ 
+ #endif // ! RUST_DERIVE_CMP_COMMON_H
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-derive-copy.h gcc-16-20250810/gcc/rust/expand/rust-derive-copy.h
*** gcc-16-20250803/gcc/rust/expand/rust-derive-copy.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-derive-copy.h	Sun Aug 10 22:32:08 2025
*************** private:
*** 44,53 ****
    copy_impl (std::string name,
  	     const std::vector<std::unique_ptr<GenericParam>> &type_generics);
  
!   virtual void visit_struct (StructStruct &item);
!   virtual void visit_tuple (TupleStruct &item);
!   virtual void visit_enum (Enum &item);
!   virtual void visit_union (Union &item);
  };
  
  } // namespace AST
--- 44,53 ----
    copy_impl (std::string name,
  	     const std::vector<std::unique_ptr<GenericParam>> &type_generics);
  
!   virtual void visit_struct (StructStruct &item) override;
!   virtual void visit_tuple (TupleStruct &item) override;
!   virtual void visit_enum (Enum &item) override;
!   virtual void visit_union (Union &item) override;
  };
  
  } // namespace AST
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-derive-default.cc gcc-16-20250810/gcc/rust/expand/rust-derive-default.cc
*** gcc-16-20250803/gcc/rust/expand/rust-derive-default.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-derive-default.cc	Sun Aug 10 22:32:08 2025
*************** DeriveDefault::visit_struct (StructStruc
*** 98,104 ****
    for (auto &field : item.get_fields ())
      {
        auto name = field.get_field_name ().as_string ();
!       auto expr = default_call (field.get_field_type ().clone_type ());
  
        cloned_fields.emplace_back (
  	builder.struct_expr_field (std::move (name), std::move (expr)));
--- 98,105 ----
    for (auto &field : item.get_fields ())
      {
        auto name = field.get_field_name ().as_string ();
!       auto type = field.get_field_type ().reconstruct ();
!       auto expr = default_call (std::move (type));
  
        cloned_fields.emplace_back (
  	builder.struct_expr_field (std::move (name), std::move (expr)));
*************** DeriveDefault::visit_tuple (TupleStruct
*** 119,125 ****
  
    for (auto &field : tuple_item.get_fields ())
      {
!       auto type = field.get_field_type ().clone_type ();
  
        defaulted_fields.emplace_back (default_call (std::move (type)));
      }
--- 120,126 ----
  
    for (auto &field : tuple_item.get_fields ())
      {
!       auto type = field.get_field_type ().reconstruct ();
  
        defaulted_fields.emplace_back (default_call (std::move (type)));
      }
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-derive-eq.cc gcc-16-20250810/gcc/rust/expand/rust-derive-eq.cc
*** gcc-16-20250803/gcc/rust/expand/rust-derive-eq.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-derive-eq.cc	Sun Aug 10 22:32:08 2025
*************** DeriveEq::visit_tuple (TupleStruct &item
*** 142,148 ****
    auto types = std::vector<std::unique_ptr<Type>> ();
  
    for (auto &field : item.get_fields ())
!     types.emplace_back (field.get_field_type ().clone_type ());
  
    expanded = eq_impls (assert_receiver_is_total_eq_fn (std::move (types)),
  		       item.get_identifier ().as_string (),
--- 142,148 ----
    auto types = std::vector<std::unique_ptr<Type>> ();
  
    for (auto &field : item.get_fields ())
!     types.emplace_back (field.get_field_type ().reconstruct ());
  
    expanded = eq_impls (assert_receiver_is_total_eq_fn (std::move (types)),
  		       item.get_identifier ().as_string (),
*************** DeriveEq::visit_struct (StructStruct &it
*** 155,161 ****
    auto types = std::vector<std::unique_ptr<Type>> ();
  
    for (auto &field : item.get_fields ())
!     types.emplace_back (field.get_field_type ().clone_type ());
  
    expanded = eq_impls (assert_receiver_is_total_eq_fn (std::move (types)),
  		       item.get_identifier ().as_string (),
--- 155,161 ----
    auto types = std::vector<std::unique_ptr<Type>> ();
  
    for (auto &field : item.get_fields ())
!     types.emplace_back (field.get_field_type ().reconstruct ());
  
    expanded = eq_impls (assert_receiver_is_total_eq_fn (std::move (types)),
  		       item.get_identifier ().as_string (),
*************** DeriveEq::visit_enum (Enum &item)
*** 175,193 ****
  	case EnumItem::Kind::Discriminant:
  	  // nothing to do as they contain no inner types
  	  continue;
! 	  case EnumItem::Kind::Tuple: {
  	    auto &tuple = static_cast<EnumItemTuple &> (*variant);
  
  	    for (auto &field : tuple.get_tuple_fields ())
! 	      types.emplace_back (field.get_field_type ().clone_type ());
! 
  	    break;
  	  }
! 	  case EnumItem::Kind::Struct: {
  	    auto &tuple = static_cast<EnumItemStruct &> (*variant);
  
  	    for (auto &field : tuple.get_struct_fields ())
! 	      types.emplace_back (field.get_field_type ().clone_type ());
  
  	    break;
  	  }
--- 175,194 ----
  	case EnumItem::Kind::Discriminant:
  	  // nothing to do as they contain no inner types
  	  continue;
! 	case EnumItem::Kind::Tuple:
! 	  {
  	    auto &tuple = static_cast<EnumItemTuple &> (*variant);
  
  	    for (auto &field : tuple.get_tuple_fields ())
! 	      types.emplace_back (field.get_field_type ().reconstruct ());
  	    break;
  	  }
! 	case EnumItem::Kind::Struct:
! 	  {
  	    auto &tuple = static_cast<EnumItemStruct &> (*variant);
  
  	    for (auto &field : tuple.get_struct_fields ())
! 	      types.emplace_back (field.get_field_type ().reconstruct ());
  
  	    break;
  	  }
*************** DeriveEq::visit_union (Union &item)
*** 205,211 ****
    auto types = std::vector<std::unique_ptr<Type>> ();
  
    for (auto &field : item.get_variants ())
!     types.emplace_back (field.get_field_type ().clone_type ());
  
    expanded = eq_impls (assert_receiver_is_total_eq_fn (std::move (types)),
  		       item.get_identifier ().as_string (),
--- 206,212 ----
    auto types = std::vector<std::unique_ptr<Type>> ();
  
    for (auto &field : item.get_variants ())
!     types.emplace_back (field.get_field_type ().reconstruct ());
  
    expanded = eq_impls (assert_receiver_is_total_eq_fn (std::move (types)),
  		       item.get_identifier ().as_string (),
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-derive-eq.h gcc-16-20250810/gcc/rust/expand/rust-derive-eq.h
*** gcc-16-20250803/gcc/rust/expand/rust-derive-eq.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-derive-eq.h	Sun Aug 10 22:32:08 2025
*************** class DeriveEq : DeriveVisitor
*** 31,37 ****
  public:
    DeriveEq (location_t loc);
  
!   std::vector<std::unique_ptr<AST::Item>> go (Item &item);
  
  private:
    std::vector<std::unique_ptr<Item>> expanded;
--- 31,37 ----
  public:
    DeriveEq (location_t loc);
  
!   std::vector<std::unique_ptr<Item>> go (Item &item);
  
  private:
    std::vector<std::unique_ptr<Item>> expanded;
*************** private:
*** 70,79 ****
     */
    std::unique_ptr<Stmt> assert_type_is_eq (std::unique_ptr<Type> &&type);
  
!   virtual void visit_struct (StructStruct &item);
!   virtual void visit_tuple (TupleStruct &item);
!   virtual void visit_enum (Enum &item);
!   virtual void visit_union (Union &item);
  };
  
  } // namespace AST
--- 70,79 ----
     */
    std::unique_ptr<Stmt> assert_type_is_eq (std::unique_ptr<Type> &&type);
  
!   virtual void visit_struct (StructStruct &item) override;
!   virtual void visit_tuple (TupleStruct &item) override;
!   virtual void visit_enum (Enum &item) override;
!   virtual void visit_union (Union &item) override;
  };
  
  } // namespace AST
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-derive-hash.cc gcc-16-20250810/gcc/rust/expand/rust-derive-hash.cc
*** gcc-16-20250803/gcc/rust/expand/rust-derive-hash.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-derive-hash.cc	Sun Aug 10 22:32:08 2025
*************** DeriveHash::visit_enum (Enum &item)
*** 231,244 ****
    auto cases = std::vector<MatchCase> ();
    auto type_name = item.get_identifier ().as_string ();
  
!   auto intrinsic = ptrify (
!     builder.path_in_expression ({"core", "intrinsics", "discriminant_value"},
! 				true));
! 
!   auto let_discr
!     = builder.let (builder.identifier_pattern (DeriveHash::discr), nullptr,
! 		   builder.call (std::move (intrinsic),
! 				 builder.identifier ("self")));
  
    auto discr_hash = builder.statementify (
      hash_call (builder.ref (builder.identifier (DeriveHash::discr))));
--- 231,237 ----
    auto cases = std::vector<MatchCase> ();
    auto type_name = item.get_identifier ().as_string ();
  
!   auto let_discr = builder.discriminant_value (DeriveHash::discr);
  
    auto discr_hash = builder.statementify (
      hash_call (builder.ref (builder.identifier (DeriveHash::discr))));
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-derive-hash.h gcc-16-20250810/gcc/rust/expand/rust-derive-hash.h
*** gcc-16-20250803/gcc/rust/expand/rust-derive-hash.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-derive-hash.h	Sun Aug 10 22:32:08 2025
*************** class DeriveHash : DeriveVisitor
*** 29,35 ****
  public:
    DeriveHash (location_t loc);
  
!   std::unique_ptr<AST::Item> go (Item &item);
  
  private:
    std::unique_ptr<Item> expanded;
--- 29,35 ----
  public:
    DeriveHash (location_t loc);
  
!   std::unique_ptr<Item> go (Item &item);
  
  private:
    std::unique_ptr<Item> expanded;
*************** private:
*** 49,58 ****
    MatchCase match_enum_struct (PathInExpression variant_path,
  			       const EnumItemStruct &variant);
  
!   virtual void visit_struct (StructStruct &item);
!   virtual void visit_tuple (TupleStruct &item);
!   virtual void visit_enum (Enum &item);
!   virtual void visit_union (Union &item);
  };
  
  } // namespace AST
--- 49,58 ----
    MatchCase match_enum_struct (PathInExpression variant_path,
  			       const EnumItemStruct &variant);
  
!   virtual void visit_struct (StructStruct &item) override;
!   virtual void visit_tuple (TupleStruct &item) override;
!   virtual void visit_enum (Enum &item) override;
!   virtual void visit_union (Union &item) override;
  };
  
  } // namespace AST
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-derive-ord.cc gcc-16-20250810/gcc/rust/expand/rust-derive-ord.cc
*** gcc-16-20250803/gcc/rust/expand/rust-derive-ord.cc	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/rust/expand/rust-derive-ord.cc	Sun Aug 10 22:32:08 2025
***************
*** 0 ****
--- 1,323 ----
+ // Copyright (C) 2025 Free Software Foundation, Inc.
+ 
+ // This file is part of GCC.
+ 
+ // GCC is free software; you can redistribute it and/or modify it under
+ // the terms of the GNU General Public License as published by the Free
+ // Software Foundation; either version 3, or (at your option) any later
+ // version.
+ 
+ // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ // WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ // for more details.
+ 
+ // You should have received a copy of the GNU General Public License
+ // along with GCC; see the file COPYING3.  If not see
+ // <http://www.gnu.org/licenses/>.
+ 
+ #include "rust-derive-ord.h"
+ #include "rust-ast.h"
+ #include "rust-derive-cmp-common.h"
+ #include "rust-derive.h"
+ #include "rust-item.h"
+ #include "rust-system.h"
+ 
+ namespace Rust {
+ namespace AST {
+ 
+ DeriveOrd::DeriveOrd (Ordering ordering, location_t loc)
+   : DeriveVisitor (loc), ordering (ordering)
+ {}
+ 
+ std::unique_ptr<Item>
+ DeriveOrd::go (Item &item)
+ {
+   item.accept_vis (*this);
+ 
+   return std::move (expanded);
+ }
+ 
+ std::unique_ptr<Expr>
+ DeriveOrd::cmp_call (std::unique_ptr<Expr> &&self_expr,
+ 		     std::unique_ptr<Expr> &&other_expr)
+ {
+   auto cmp_fn_path = builder.path_in_expression (
+     {"core", "cmp", trait (ordering), fn (ordering)}, true);
+ 
+   return builder.call (ptrify (cmp_fn_path),
+ 		       vec (builder.ref (std::move (self_expr)),
+ 			    builder.ref (std::move (other_expr))));
+ }
+ 
+ std::unique_ptr<Item>
+ DeriveOrd::cmp_impl (
+   std::unique_ptr<BlockExpr> &&fn_block, Identifier type_name,
+   const std::vector<std::unique_ptr<GenericParam>> &type_generics)
+ {
+   auto fn = cmp_fn (std::move (fn_block), type_name);
+ 
+   auto trait = ordering == Ordering::Partial ? "PartialOrd" : "Ord";
+   auto trait_path = builder.type_path ({"core", "cmp", trait}, true);
+ 
+   auto trait_bound
+     = builder.trait_bound (builder.type_path ({"core", "cmp", trait}, true));
+ 
+   auto trait_items = vec (std::move (fn));
+ 
+   auto cmp_generics
+     = setup_impl_generics (type_name.as_string (), type_generics,
+ 			   std::move (trait_bound));
+ 
+   return builder.trait_impl (trait_path, std::move (cmp_generics.self_type),
+ 			     std::move (trait_items),
+ 			     std::move (cmp_generics.impl));
+ }
+ 
+ std::unique_ptr<AssociatedItem>
+ DeriveOrd::cmp_fn (std::unique_ptr<BlockExpr> &&block, Identifier type_name)
+ {
+   // Ordering
+   auto return_type = builder.type_path ({"core", "cmp", "Ordering"}, true);
+ 
+   // In the case of PartialOrd, we return an Option<Ordering>
+   if (ordering == Ordering::Partial)
+     {
+       auto generic = GenericArg::create_type (ptrify (return_type));
+ 
+       auto generic_seg = builder.type_path_segment_generic (
+ 	"Option", GenericArgs ({}, {generic}, {}, loc));
+       auto core = builder.type_path_segment ("core");
+       auto option = builder.type_path_segment ("option");
+ 
+       return_type
+ 	= builder.type_path (vec (std::move (core), std::move (option),
+ 				  std::move (generic_seg)),
+ 			     true);
+     }
+ 
+   // &self, other: &Self
+   auto params = vec (
+     builder.self_ref_param (),
+     builder.function_param (builder.identifier_pattern ("other"),
+ 			    builder.reference_type (ptrify (
+ 			      builder.type_path (type_name.as_string ())))));
+ 
+   auto function_name = fn (ordering);
+ 
+   return builder.function (function_name, std::move (params),
+ 			   ptrify (return_type), std::move (block));
+ }
+ 
+ std::unique_ptr<Pattern>
+ DeriveOrd::make_equal ()
+ {
+   std::unique_ptr<Pattern> equal = ptrify (
+     builder.path_in_expression ({"core", "cmp", "Ordering", "Equal"}, true));
+ 
+   // We need to wrap the pattern in Option::Some if we are doing partial
+   // ordering
+   if (ordering == Ordering::Partial)
+     {
+       auto pattern_items = std::unique_ptr<TupleStructItems> (
+ 	new TupleStructItemsNoRange (vec (std::move (equal))));
+ 
+       equal
+ 	= std::make_unique<TupleStructPattern> (builder.path_in_expression (
+ 						  LangItem::Kind::OPTION_SOME),
+ 						std::move (pattern_items));
+     }
+ 
+   return equal;
+ }
+ 
+ std::pair<MatchArm, MatchArm>
+ DeriveOrd::make_cmp_arms ()
+ {
+   // All comparison results other than Ordering::Equal
+   auto non_equal = builder.identifier_pattern (DeriveOrd::not_equal);
+   auto equal = make_equal ();
+ 
+   return {builder.match_arm (std::move (equal)),
+ 	  builder.match_arm (std::move (non_equal))};
+ }
+ 
+ std::unique_ptr<Expr>
+ DeriveOrd::recursive_match (std::vector<SelfOther> &&members)
+ {
+   if (members.empty ())
+     {
+       std::unique_ptr<Expr> value = ptrify (
+ 	builder.path_in_expression ({"core", "cmp", "Ordering", "Equal"},
+ 				    true));
+ 
+       if (ordering == Ordering::Partial)
+ 	value = builder.call (ptrify (builder.path_in_expression (
+ 				LangItem::Kind::OPTION_SOME)),
+ 			      std::move (value));
+ 
+       return value;
+     }
+ 
+   std::unique_ptr<Expr> final_expr = nullptr;
+ 
+   for (auto it = members.rbegin (); it != members.rend (); it++)
+     {
+       auto &member = *it;
+ 
+       auto call = cmp_call (std::move (member.self_expr),
+ 			    std::move (member.other_expr));
+ 
+       // For the last member (so the first iterator), we just create a call
+       // expression
+       if (it == members.rbegin ())
+ 	{
+ 	  final_expr = std::move (call);
+ 	  continue;
+ 	}
+ 
+       // If we aren't dealing with the last member, then we need to wrap all of
+       // that in a big match expression and keep going
+       auto match_arms = make_cmp_arms ();
+ 
+       auto match_cases
+ 	= {builder.match_case (std::move (match_arms.first),
+ 			       std::move (final_expr)),
+ 	   builder.match_case (std::move (match_arms.second),
+ 			       builder.identifier (DeriveOrd::not_equal))};
+ 
+       final_expr = builder.match (std::move (call), std::move (match_cases));
+     }
+ 
+   return final_expr;
+ }
+ 
+ // we need to do a recursive match expression for all of the fields used in a
+ // struct so for something like struct Foo { a: i32, b: i32, c: i32 } we must
+ // first compare each `a` field, then `b`, then `c`, like this:
+ //
+ // match cmp_fn(self.<field>, other.<field>) {
+ //     Ordering::Equal => <recurse>,
+ //     cmp => cmp,
+ // }
+ //
+ // and the recurse will be the exact same expression, on the next field. so that
+ // our result looks like this:
+ //
+ // match cmp_fn(self.a, other.a) {
+ //     Ordering::Equal => match cmp_fn(self.b, other.b) {
+ //         Ordering::Equal =>cmp_fn(self.c, other.c),
+ //         cmp => cmp,
+ //     }
+ //     cmp => cmp,
+ // }
+ //
+ // the last field comparison needs not to be a match but just the function call.
+ // this is going to be annoying lol
+ void
+ DeriveOrd::visit_struct (StructStruct &item)
+ {
+   auto fields = SelfOther::fields (builder, item.get_fields ());
+ 
+   auto match_expr = recursive_match (std::move (fields));
+ 
+   expanded = cmp_impl (builder.block (std::move (match_expr)),
+ 		       item.get_identifier (), item.get_generic_params ());
+ }
+ 
+ // same as structs, but for each field index instead of each field name -
+ // straightforward once we have `visit_struct` working
+ void
+ DeriveOrd::visit_tuple (TupleStruct &item)
+ {
+   auto fields = SelfOther::indexes (builder, item.get_fields ());
+ 
+   auto match_expr = recursive_match (std::move (fields));
+ 
+   expanded = cmp_impl (builder.block (std::move (match_expr)),
+ 		       item.get_identifier (), item.get_generic_params ());
+ }
+ 
+ // for enums, we need to generate a match for each of the enum's variant that
+ // contains data and then do the same thing as visit_struct or visit_enum. if
+ // the two aren't the same variant, then compare the two discriminant values for
+ // all the dataless enum variants and in the general case.
+ //
+ // so for enum Foo { A(i32, i32), B, C } we need to do the following
+ //
+ // match (self, other) {
+ //     (A(self_0, self_1), A(other_0, other_1)) => {
+ //         match cmp_fn(self_0, other_0) {
+ //             Ordering::Equal => cmp_fn(self_1, other_1),
+ //             cmp => cmp,
+ //         },
+ //     _ => cmp_fn(discr_value(self), discr_value(other))
+ // }
+ void
+ DeriveOrd::visit_enum (Enum &item)
+ {
+   // NOTE: We can factor this even further with DerivePartialEq, but this is
+   // getting out of scope for this PR surely
+ 
+   auto cases = std::vector<MatchCase> ();
+   auto type_name = item.get_identifier ().as_string ();
+ 
+   auto let_sd = builder.discriminant_value (DeriveOrd::self_discr, "self");
+   auto let_od = builder.discriminant_value (DeriveOrd::other_discr, "other");
+ 
+   auto discr_cmp = cmp_call (builder.identifier (DeriveOrd::self_discr),
+ 			     builder.identifier (DeriveOrd::other_discr));
+ 
+   auto recursive_match_fn = [this] (std::vector<SelfOther> &&fields) {
+     return recursive_match (std::move (fields));
+   };
+ 
+   for (auto &variant : item.get_variants ())
+     {
+       auto enum_builder
+ 	= EnumMatchBuilder (type_name, variant->get_identifier ().as_string (),
+ 			    recursive_match_fn, builder);
+ 
+       switch (variant->get_enum_item_kind ())
+ 	{
+ 	case EnumItem::Kind::Struct:
+ 	  cases.emplace_back (enum_builder.strukt (*variant));
+ 	  break;
+ 	case EnumItem::Kind::Tuple:
+ 	  cases.emplace_back (enum_builder.tuple (*variant));
+ 	  break;
+ 	case EnumItem::Kind::Identifier:
+ 	case EnumItem::Kind::Discriminant:
+ 	  // We don't need to do anything for these, as they are handled by the
+ 	  // discriminant value comparison
+ 	  break;
+ 	}
+     }
+ 
+   // Add the last case which compares the discriminant values in case `self` and
+   // `other` are actually different variants of the enum
+   cases.emplace_back (
+     builder.match_case (builder.wildcard (), std::move (discr_cmp)));
+ 
+   auto match
+     = builder.match (builder.tuple (vec (builder.identifier ("self"),
+ 					 builder.identifier ("other"))),
+ 		     std::move (cases));
+ 
+   expanded
+     = cmp_impl (builder.block (vec (std::move (let_sd), std::move (let_od)),
+ 			       std::move (match)),
+ 		type_name, item.get_generic_params ());
+ }
+ 
+ void
+ DeriveOrd::visit_union (Union &item)
+ {
+   auto trait_name = trait (ordering);
+ 
+   rust_error_at (item.get_locus (), "derive(%s) cannot be used on unions",
+ 		 trait_name.c_str ());
+ }
+ 
+ } // namespace AST
+ } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-derive-ord.h gcc-16-20250810/gcc/rust/expand/rust-derive-ord.h
*** gcc-16-20250803/gcc/rust/expand/rust-derive-ord.h	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/rust/expand/rust-derive-ord.h	Sun Aug 10 22:32:08 2025
***************
*** 0 ****
--- 1,122 ----
+ // Copyright (C) 2025 Free Software Foundation, Inc.
+ 
+ // This file is part of GCC.
+ 
+ // GCC is free software; you can redistribute it and/or modify it under
+ // the terms of the GNU General Public License as published by the Free
+ // Software Foundation; either version 3, or (at your option) any later
+ // version.
+ 
+ // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ // WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ // for more details.
+ 
+ // You should have received a copy of the GNU General Public License
+ // along with GCC; see the file COPYING3.  If not see
+ // <http://www.gnu.org/licenses/>.
+ 
+ #ifndef RUST_DERIVE_ORD_H
+ #define RUST_DERIVE_ORD_H
+ 
+ #include "rust-ast.h"
+ #include "rust-derive-cmp-common.h"
+ #include "rust-derive.h"
+ 
+ namespace Rust {
+ namespace AST {
+ 
+ /**
+  * DeriveOrd is a bit special as the expansion of both `PartialOrd` and `Ord`
+  * is extremely similar. The only difference is that `PartialOrd` concerns
+  * partial-ordering, and thus its main method returns an `Option<Ordering>`,
+  * while `Ord` concerns total-ordering, and its main method returns an
+  * `Ordering`. Otherwise, the expansion logic is the same, so we factor both
+  * derives into one.
+  */
+ class DeriveOrd : public DeriveVisitor
+ {
+ public:
+   enum class Ordering
+   {
+     Total,
+     Partial
+   };
+ 
+   std::string fn (Ordering ordering)
+   {
+     if (ordering == Ordering::Total)
+       return "cmp";
+     else
+       return "partial_cmp";
+   }
+ 
+   std::string trait (Ordering ordering)
+   {
+     if (ordering == Ordering::Total)
+       return "Ord";
+     else
+       return "PartialOrd";
+   }
+ 
+   DeriveOrd (Ordering ordering, location_t loc);
+ 
+   std::unique_ptr<Item> go (Item &item);
+ 
+ private:
+   std::unique_ptr<Item> expanded;
+ 
+   Ordering ordering;
+ 
+   /* Identifier patterns for the non-equal match arms */
+   constexpr static const char *not_equal = "#non_eq";
+   constexpr static const char *self_discr = "#self_discr";
+   constexpr static const char *other_discr = "#other_discr";
+ 
+   /**
+    * Create the recursive matching structure used when implementing the
+    * comparison function on multiple sub items (fields, tuple indexes...)
+    */
+   std::unique_ptr<Expr> recursive_match (std::vector<SelfOther> &&members);
+ 
+   /**
+    * Create a pattern for the `Ordering::Equal` case. In the case of partial
+    * ordering, `Option::Some(Ordering::Equal)`.
+    */
+   std::unique_ptr<Pattern> make_equal ();
+ 
+   /**
+    * Make the match arms for one inner match in a comparison function block.
+    * This returns the "equal" match arm and the "rest" match arm, so something
+    * like `Ordering::Equal` and `non_eq` in the following match expression:
+    *
+    * match cmp(...) {
+    *     Ordering::Equal => match cmp(...) { ... }
+    *     non_eq => non_eq,
+    * }
+    */
+   std::pair<MatchArm, MatchArm> make_cmp_arms ();
+ 
+   /**
+    * Generate a call to the proper trait function, based on the ordering, in
+    * order to compare two given expressions
+    */
+   std::unique_ptr<Expr> cmp_call (std::unique_ptr<Expr> &&self_expr,
+ 				  std::unique_ptr<Expr> &&other_expr);
+ 
+   std::unique_ptr<Item>
+   cmp_impl (std::unique_ptr<BlockExpr> &&fn_block, Identifier type_name,
+ 	    const std::vector<std::unique_ptr<GenericParam>> &type_generics);
+   std::unique_ptr<AssociatedItem> cmp_fn (std::unique_ptr<BlockExpr> &&block,
+ 					  Identifier type_name);
+ 
+   virtual void visit_struct (StructStruct &item) override;
+   virtual void visit_tuple (TupleStruct &item) override;
+   virtual void visit_enum (Enum &item) override;
+   virtual void visit_union (Union &item) override;
+ };
+ 
+ } // namespace AST
+ } // namespace Rust
+ 
+ #endif // ! RUST_DERIVE_ORD_H
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-derive-partial-eq.cc gcc-16-20250810/gcc/rust/expand/rust-derive-partial-eq.cc
*** gcc-16-20250803/gcc/rust/expand/rust-derive-partial-eq.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-derive-partial-eq.cc	Sun Aug 10 22:32:08 2025
*************** DerivePartialEq::partialeq_impls (
*** 64,74 ****
  }
  
  std::unique_ptr<AssociatedItem>
! DerivePartialEq::eq_fn (std::unique_ptr<Expr> &&cmp_expression,
  			std::string type_name)
  {
-   auto block = builder.block (tl::nullopt, std::move (cmp_expression));
- 
    auto self_type
      = std::unique_ptr<TypeNoBounds> (new TypePath (builder.type_path ("Self")));
  
--- 64,72 ----
  }
  
  std::unique_ptr<AssociatedItem>
! DerivePartialEq::eq_fn (std::unique_ptr<BlockExpr> &&block,
  			std::string type_name)
  {
    auto self_type
      = std::unique_ptr<TypeNoBounds> (new TypePath (builder.type_path ("Self")));
  
*************** DerivePartialEq::eq_fn (std::unique_ptr<
*** 83,106 ****
  			   std::move (block));
  }
  
- DerivePartialEq::SelfOther
- DerivePartialEq::tuple_indexes (int idx)
- {
-   return SelfOther{
-     builder.tuple_idx ("self", idx),
-     builder.tuple_idx ("other", idx),
-   };
- }
- 
- DerivePartialEq::SelfOther
- DerivePartialEq::field_acccesses (const std::string &field_name)
- {
-   return SelfOther{
-     builder.field_access (builder.identifier ("self"), field_name),
-     builder.field_access (builder.identifier ("other"), field_name),
-   };
- }
- 
  std::unique_ptr<Expr>
  DerivePartialEq::build_eq_expression (
    std::vector<SelfOther> &&field_expressions)
--- 81,86 ----
*************** void
*** 134,145 ****
  DerivePartialEq::visit_tuple (TupleStruct &item)
  {
    auto type_name = item.get_struct_name ().as_string ();
!   auto fields = std::vector<SelfOther> ();
! 
!   for (size_t idx = 0; idx < item.get_fields ().size (); idx++)
!     fields.emplace_back (tuple_indexes (idx));
  
!   auto fn = eq_fn (build_eq_expression (std::move (fields)), type_name);
  
    expanded
      = partialeq_impls (std::move (fn), type_name, item.get_generic_params ());
--- 114,123 ----
  DerivePartialEq::visit_tuple (TupleStruct &item)
  {
    auto type_name = item.get_struct_name ().as_string ();
!   auto fields = SelfOther::indexes (builder, item.get_fields ());
  
!   auto fn = eq_fn (builder.block (build_eq_expression (std::move (fields))),
! 		   type_name);
  
    expanded
      = partialeq_impls (std::move (fn), type_name, item.get_generic_params ());
*************** void
*** 149,161 ****
  DerivePartialEq::visit_struct (StructStruct &item)
  {
    auto type_name = item.get_struct_name ().as_string ();
!   auto fields = std::vector<SelfOther> ();
! 
!   for (auto &field : item.get_fields ())
!     fields.emplace_back (
!       field_acccesses (field.get_field_name ().as_string ()));
  
!   auto fn = eq_fn (build_eq_expression (std::move (fields)), type_name);
  
    expanded
      = partialeq_impls (std::move (fn), type_name, item.get_generic_params ());
--- 127,136 ----
  DerivePartialEq::visit_struct (StructStruct &item)
  {
    auto type_name = item.get_struct_name ().as_string ();
!   auto fields = SelfOther::fields (builder, item.get_fields ());
  
!   auto fn = eq_fn (builder.block (build_eq_expression (std::move (fields))),
! 		   type_name);
  
    expanded
      = partialeq_impls (std::move (fn), type_name, item.get_generic_params ());
*************** DerivePartialEq::match_enum_tuple (PathI
*** 199,206 ****
        auto self_pattern_str = "__self_" + std::to_string (i);
        auto other_pattern_str = "__other_" + std::to_string (i);
  
-       rust_debug ("]ARTHUR[ %s", self_pattern_str.c_str ());
- 
        self_patterns.emplace_back (
  	builder.identifier_pattern (self_pattern_str));
        other_patterns.emplace_back (
--- 174,179 ----
*************** MatchCase
*** 240,254 ****
  DerivePartialEq::match_enum_struct (PathInExpression variant_path,
  				    const EnumItemStruct &variant)
  {
!   // NOTE: We currently do not support compiling struct patterns where an
!   // identifier is assigned a new pattern, e.g. Bloop { f0: x }
!   // This is what we should be using to compile PartialEq for enum struct
!   // variants, as we need to be comparing the field of each instance meaning we
!   // need to give two different names to two different instances of the same
!   // field. We cannot just use the field's name like we do when deriving
!   // `Clone`.
  
!   rust_unreachable ();
  }
  
  void
--- 213,267 ----
  DerivePartialEq::match_enum_struct (PathInExpression variant_path,
  				    const EnumItemStruct &variant)
  {
!   auto self_fields = std::vector<std::unique_ptr<StructPatternField>> ();
!   auto other_fields = std::vector<std::unique_ptr<StructPatternField>> ();
  
!   auto self_other_exprs = std::vector<SelfOther> ();
! 
!   for (auto &field : variant.get_struct_fields ())
!     {
!       // The patterns we're creating for each field are `self_<field>` and
!       // `other_<field>` where `field` is the name of the field. It doesn't
!       // actually matter what we use, as long as it's ordered, unique, and that
!       // we can reuse it in the match case's return expression to check that
!       // they are equal.
! 
!       auto field_name = field.get_field_name ().as_string ();
! 
!       auto self_pattern_str = "__self_" + field_name;
!       auto other_pattern_str = "__other_" + field_name;
! 
!       self_fields.emplace_back (builder.struct_pattern_ident_pattern (
! 	field_name, builder.identifier_pattern (self_pattern_str)));
!       other_fields.emplace_back (builder.struct_pattern_ident_pattern (
! 	field_name, builder.identifier_pattern (other_pattern_str)));
! 
!       self_other_exprs.emplace_back (SelfOther{
! 	builder.identifier (self_pattern_str),
! 	builder.identifier (other_pattern_str),
!       });
!     }
! 
!   auto self_elts = StructPatternElements (std::move (self_fields));
!   auto other_elts = StructPatternElements (std::move (other_fields));
! 
!   auto self_pattern = std::unique_ptr<Pattern> (
!     new ReferencePattern (std::unique_ptr<Pattern> (new StructPattern (
! 			    variant_path, loc, std::move (self_elts))),
! 			  false, false, loc));
!   auto other_pattern = std::unique_ptr<Pattern> (
!     new ReferencePattern (std::unique_ptr<Pattern> (new StructPattern (
! 			    variant_path, loc, std::move (other_elts))),
! 			  false, false, loc));
! 
!   auto tuple_items = std::make_unique<TuplePatternItemsMultiple> (
!     vec (std::move (self_pattern), std::move (other_pattern)));
! 
!   auto pattern = std::make_unique<TuplePattern> (std::move (tuple_items), loc);
! 
!   auto expr = build_eq_expression (std::move (self_other_exprs));
! 
!   return builder.match_case (std::move (pattern), std::move (expr));
  }
  
  void
*************** DerivePartialEq::visit_enum (Enum &item)
*** 257,302 ****
    auto cases = std::vector<MatchCase> ();
    auto type_name = item.get_identifier ().as_string ();
  
    for (auto &variant : item.get_variants ())
      {
!       auto variant_path
! 	= builder.variant_path (type_name,
! 				variant->get_identifier ().as_string ());
  
        switch (variant->get_enum_item_kind ())
  	{
- 	case EnumItem::Kind::Identifier:
- 	case EnumItem::Kind::Discriminant:
- 	  cases.emplace_back (match_enum_identifier (variant_path, variant));
- 	  break;
  	case EnumItem::Kind::Tuple:
! 	  cases.emplace_back (
! 	    match_enum_tuple (variant_path,
! 			      static_cast<EnumItemTuple &> (*variant)));
  	  break;
  	case EnumItem::Kind::Struct:
! 	  rust_sorry_at (
! 	    item.get_locus (),
! 	    "cannot derive(PartialEq) for enum struct variants yet");
  	  break;
  	}
      }
  
-   // NOTE: Mention using discriminant_value and skipping that last case, and
-   // instead skipping all identifiers/discriminant enum items and returning
-   // `true` in the wildcard case
- 
    // In case the two instances of `Self` don't have the same discriminant,
    // automatically return false.
    cases.emplace_back (
!     builder.match_case (builder.wildcard (), builder.literal_bool (false)));
  
    auto match
      = builder.match (builder.tuple (vec (builder.identifier ("self"),
  					 builder.identifier ("other"))),
  		     std::move (cases));
  
!   auto fn = eq_fn (std::move (match), type_name);
  
    expanded
      = partialeq_impls (std::move (fn), type_name, item.get_generic_params ());
--- 270,325 ----
    auto cases = std::vector<MatchCase> ();
    auto type_name = item.get_identifier ().as_string ();
  
+   auto eq_expr_fn = [this] (std::vector<SelfOther> &&fields) {
+     return build_eq_expression (std::move (fields));
+   };
+ 
+   auto let_sd
+     = builder.discriminant_value (DerivePartialEq::self_discr, "self");
+   auto let_od
+     = builder.discriminant_value (DerivePartialEq::other_discr, "other");
+ 
+   auto discr_cmp
+     = builder.comparison_expr (builder.identifier (DerivePartialEq::self_discr),
+ 			       builder.identifier (
+ 				 DerivePartialEq::other_discr),
+ 			       ComparisonOperator::EQUAL);
+ 
    for (auto &variant : item.get_variants ())
      {
!       auto enum_builder
! 	= EnumMatchBuilder (type_name, variant->get_identifier ().as_string (),
! 			    eq_expr_fn, builder);
  
        switch (variant->get_enum_item_kind ())
  	{
  	case EnumItem::Kind::Tuple:
! 	  cases.emplace_back (enum_builder.tuple (*variant));
  	  break;
  	case EnumItem::Kind::Struct:
! 	  cases.emplace_back (enum_builder.strukt (*variant));
! 	  break;
! 	case EnumItem::Kind::Identifier:
! 	case EnumItem::Kind::Discriminant:
! 	  // We don't need to do anything for these, as they are handled by the
! 	  // discriminant value comparison
  	  break;
  	}
      }
  
    // In case the two instances of `Self` don't have the same discriminant,
    // automatically return false.
    cases.emplace_back (
!     builder.match_case (builder.wildcard (), std::move (discr_cmp)));
  
    auto match
      = builder.match (builder.tuple (vec (builder.identifier ("self"),
  					 builder.identifier ("other"))),
  		     std::move (cases));
  
!   auto fn = eq_fn (builder.block (vec (std::move (let_sd), std::move (let_od)),
! 				  std::move (match)),
! 		   type_name);
  
    expanded
      = partialeq_impls (std::move (fn), type_name, item.get_generic_params ());
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-derive-partial-eq.h gcc-16-20250810/gcc/rust/expand/rust-derive-partial-eq.h
*** gcc-16-20250803/gcc/rust/expand/rust-derive-partial-eq.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-derive-partial-eq.h	Sun Aug 10 22:32:08 2025
***************
*** 21,26 ****
--- 21,27 ----
  
  #include "rust-derive.h"
  #include "rust-path.h"
+ #include "rust-derive-cmp-common.h"
  
  namespace Rust {
  namespace AST {
*************** class DerivePartialEq : DeriveVisitor
*** 30,36 ****
  public:
    DerivePartialEq (location_t loc);
  
!   std::vector<std::unique_ptr<AST::Item>> go (Item &item);
  
  private:
    std::vector<std::unique_ptr<Item>> expanded;
--- 31,37 ----
  public:
    DerivePartialEq (location_t loc);
  
!   std::vector<std::unique_ptr<Item>> go (Item &item);
  
  private:
    std::vector<std::unique_ptr<Item>> expanded;
*************** private:
*** 43,65 ****
      std::unique_ptr<AssociatedItem> &&eq_fn, std::string name,
      const std::vector<std::unique_ptr<GenericParam>> &type_generics);
  
!   std::unique_ptr<AssociatedItem> eq_fn (std::unique_ptr<Expr> &&cmp_expression,
  					 std::string type_name);
  
    /**
-    * A pair of two expressions from each instance being compared. E.g. this
-    * could be `self.0` and `other.0`, or `self.field` and `other.field`
-    */
-   struct SelfOther
-   {
-     std::unique_ptr<Expr> self_expr;
-     std::unique_ptr<Expr> other_expr;
-   };
- 
-   SelfOther tuple_indexes (int idx);
-   SelfOther field_acccesses (const std::string &field_name);
- 
-   /**
     * Build a suite of equality arithmetic expressions chained together by a
     * boolean AND operator
     */
--- 44,53 ----
      std::unique_ptr<AssociatedItem> &&eq_fn, std::string name,
      const std::vector<std::unique_ptr<GenericParam>> &type_generics);
  
!   std::unique_ptr<AssociatedItem> eq_fn (std::unique_ptr<BlockExpr> &&block,
  					 std::string type_name);
  
    /**
     * Build a suite of equality arithmetic expressions chained together by a
     * boolean AND operator
     */
*************** private:
*** 73,82 ****
    MatchCase match_enum_struct (PathInExpression variant_path,
  			       const EnumItemStruct &variant);
  
!   virtual void visit_struct (StructStruct &item);
!   virtual void visit_tuple (TupleStruct &item);
!   virtual void visit_enum (Enum &item);
!   virtual void visit_union (Union &item);
  };
  
  } // namespace AST
--- 61,73 ----
    MatchCase match_enum_struct (PathInExpression variant_path,
  			       const EnumItemStruct &variant);
  
!   constexpr static const char *self_discr = "#self_discr";
!   constexpr static const char *other_discr = "#other_discr";
! 
!   virtual void visit_struct (StructStruct &item) override;
!   virtual void visit_tuple (TupleStruct &item) override;
!   virtual void visit_enum (Enum &item) override;
!   virtual void visit_union (Union &item) override;
  };
  
  } // namespace AST
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-derive.cc gcc-16-20250810/gcc/rust/expand/rust-derive.cc
*** gcc-16-20250803/gcc/rust/expand/rust-derive.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-derive.cc	Sun Aug 10 22:32:08 2025
***************
*** 22,27 ****
--- 22,28 ----
  #include "rust-derive-debug.h"
  #include "rust-derive-default.h"
  #include "rust-derive-eq.h"
+ #include "rust-derive-ord.h"
  #include "rust-derive-partial-eq.h"
  #include "rust-derive-hash.h"
  
*************** DeriveVisitor::derive (Item &item, const
*** 59,68 ****
      case BuiltinMacro::Hash:
        return vec (DeriveHash (loc).go (item));
      case BuiltinMacro::Ord:
      case BuiltinMacro::PartialOrd:
      default:
!       rust_sorry_at (loc, "unimplemented builtin derive macro");
!       return {};
      };
  }
  
--- 60,70 ----
      case BuiltinMacro::Hash:
        return vec (DeriveHash (loc).go (item));
      case BuiltinMacro::Ord:
+       return vec (DeriveOrd (DeriveOrd::Ordering::Total, loc).go (item));
      case BuiltinMacro::PartialOrd:
+       return vec (DeriveOrd (DeriveOrd::Ordering::Partial, loc).go (item));
      default:
!       rust_unreachable ();
      };
  }
  
*************** DeriveVisitor::setup_impl_generics (
*** 79,85 ****
      {
        switch (generic->get_kind ())
  	{
! 	  case GenericParam::Kind::Lifetime: {
  	    LifetimeParam &lifetime_param = (LifetimeParam &) *generic.get ();
  
  	    Lifetime l = builder.new_lifetime (lifetime_param.get_lifetime ());
--- 81,88 ----
      {
        switch (generic->get_kind ())
  	{
! 	case GenericParam::Kind::Lifetime:
! 	  {
  	    LifetimeParam &lifetime_param = (LifetimeParam &) *generic.get ();
  
  	    Lifetime l = builder.new_lifetime (lifetime_param.get_lifetime ());
*************** DeriveVisitor::setup_impl_generics (
*** 91,97 ****
  	  }
  	  break;
  
! 	  case GenericParam::Kind::Type: {
  	    TypeParam &type_param = (TypeParam &) *generic.get ();
  
  	    std::unique_ptr<Type> associated_type = builder.single_type_path (
--- 94,101 ----
  	  }
  	  break;
  
! 	case GenericParam::Kind::Type:
! 	  {
  	    TypeParam &type_param = (TypeParam &) *generic.get ();
  
  	    std::unique_ptr<Type> associated_type = builder.single_type_path (
*************** DeriveVisitor::setup_impl_generics (
*** 104,110 ****
  	    std::vector<std::unique_ptr<TypeParamBound>> extra_bounds;
  
  	    if (extra_bound)
! 	      extra_bounds.emplace_back (std::move (*extra_bound));
  
  	    auto impl_type_param
  	      = builder.new_type_param (type_param, std::move (extra_bounds));
--- 108,115 ----
  	    std::vector<std::unique_ptr<TypeParamBound>> extra_bounds;
  
  	    if (extra_bound)
! 	      extra_bounds.emplace_back (
! 		extra_bound.value ()->clone_type_param_bound ());
  
  	    auto impl_type_param
  	      = builder.new_type_param (type_param, std::move (extra_bounds));
*************** DeriveVisitor::setup_impl_generics (
*** 113,129 ****
  	  }
  	  break;
  
! 	  case GenericParam::Kind::Const: {
! 	    rust_unreachable ();
  
! 	    // TODO
! 	    // const ConstGenericParam *const_param
! 	    //   = (const ConstGenericParam *) generic.get ();
! 	    // std::unique_ptr<Expr> const_expr = nullptr;
  
! 	    // GenericArg type_arg
! 	    //   = GenericArg::create_const (std::move (const_expr));
! 	    // generic_args.push_back (std::move (type_arg));
  	  }
  	  break;
  	}
--- 118,137 ----
  	  }
  	  break;
  
! 	case GenericParam::Kind::Const:
! 	  {
! 	    ConstGenericParam &const_param
! 	      = (ConstGenericParam &) *generic.get ();
  
! 	    std::unique_ptr<Type> associated_type
! 	      = builder.single_type_path (const_param.get_name ().as_string ());
  
! 	    GenericArg type_arg
! 	      = GenericArg::create_type (std::move (associated_type));
! 	    generic_args.push_back (std::move (type_arg));
! 
! 	    auto impl_const_param = builder.new_const_param (const_param);
! 	    impl_generics.push_back (std::move (impl_const_param));
  	  }
  	  break;
  	}
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-derive.h gcc-16-20250810/gcc/rust/expand/rust-derive.h
*** gcc-16-20250803/gcc/rust/expand/rust-derive.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-derive.h	Sun Aug 10 22:32:08 2025
*************** private:
*** 118,124 ****
    virtual void visit (LiteralExpr &expr) override final{};
    virtual void visit (AttrInputLiteral &attr_input) override final{};
    virtual void visit (MetaItemLitExpr &meta_item) override final{};
!   virtual void visit (MetaItemPathLit &meta_item) override final{};
    virtual void visit (BorrowExpr &expr) override final{};
    virtual void visit (DereferenceExpr &expr) override final{};
    virtual void visit (ErrorPropagationExpr &expr) override final{};
--- 118,124 ----
    virtual void visit (LiteralExpr &expr) override final{};
    virtual void visit (AttrInputLiteral &attr_input) override final{};
    virtual void visit (MetaItemLitExpr &meta_item) override final{};
!   virtual void visit (MetaItemPathExpr &meta_item) override final{};
    virtual void visit (BorrowExpr &expr) override final{};
    virtual void visit (DereferenceExpr &expr) override final{};
    virtual void visit (ErrorPropagationExpr &expr) override final{};
*************** private:
*** 147,152 ****
--- 147,154 ----
    virtual void visit (FieldAccessExpr &expr) override final{};
    virtual void visit (ClosureExprInner &expr) override final{};
    virtual void visit (BlockExpr &expr) override final{};
+   virtual void visit (AnonConst &expr) override final{};
+   virtual void visit (ConstBlock &expr) override final{};
    virtual void visit (ClosureExprInnerTyped &expr) override final{};
    virtual void visit (ContinueExpr &expr) override final{};
    virtual void visit (BreakExpr &expr) override final{};
*************** private:
*** 157,162 ****
--- 159,165 ----
    virtual void visit (RangeFromToInclExpr &expr) override final{};
    virtual void visit (RangeToInclExpr &expr) override final{};
    virtual void visit (ReturnExpr &expr) override final{};
+   virtual void visit (TryExpr &expr) override final{};
    virtual void visit (BoxExpr &expr) override final{};
    virtual void visit (UnsafeBlockExpr &expr) override final{};
    virtual void visit (LoopExpr &expr) override final{};
*************** private:
*** 228,233 ****
--- 231,238 ----
    virtual void visit (TuplePatternItemsRanged &tuple_items) override final{};
    virtual void visit (TuplePattern &pattern) override final{};
    virtual void visit (GroupedPattern &pattern) override final{};
+   virtual void visit (SlicePatternItemsNoRest &items) override final{};
+   virtual void visit (SlicePatternItemsHasRest &items) override final{};
    virtual void visit (SlicePattern &pattern) override final{};
    virtual void visit (AltPattern &pattern) override final{};
    virtual void visit (EmptyStmt &stmt) override final{};
*************** private:
*** 251,256 ****
--- 256,262 ----
    virtual void visit (FunctionParam &param) override final{};
    virtual void visit (VariadicParam &param) override final{};
    virtual void visit (FormatArgs &param) override final{};
+   virtual void visit (OffsetOf &param) override final{};
  };
  
  } // namespace AST
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-expand-format-args.cc gcc-16-20250810/gcc/rust/expand/rust-expand-format-args.cc
*** gcc-16-20250803/gcc/rust/expand/rust-expand-format-args.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-expand-format-args.cc	Sun Aug 10 22:32:08 2025
*************** expand_format_args (AST::FormatArgs &fmt
*** 85,95 ****
  	  static_pieces.emplace_back (
  	    builder.literal_string (node.string._0.to_string ()));
  	  break;
! 	  case ffi::Piece::Tag::NextArgument: {
  	    auto next_argument = node.next_argument._0;
  	    switch (node.next_argument._0.position.tag)
  	      {
! 		case ffi::Position::Tag::ArgumentImplicitlyIs: {
  		  auto idx = next_argument.position.argument_implicitly_is._0;
  		  auto trait = next_argument.format;
  		  auto arg = arguments.at (idx);
--- 85,97 ----
  	  static_pieces.emplace_back (
  	    builder.literal_string (node.string._0.to_string ()));
  	  break;
! 	case ffi::Piece::Tag::NextArgument:
! 	  {
  	    auto next_argument = node.next_argument._0;
  	    switch (node.next_argument._0.position.tag)
  	      {
! 	      case ffi::Position::Tag::ArgumentImplicitlyIs:
! 		{
  		  auto idx = next_argument.position.argument_implicitly_is._0;
  		  auto trait = next_argument.format;
  		  auto arg = arguments.at (idx);
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-expand-visitor.cc gcc-16-20250810/gcc/rust/expand/rust-expand-visitor.cc
*** gcc-16-20250803/gcc/rust/expand/rust-expand-visitor.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-expand-visitor.cc	Sun Aug 10 22:32:08 2025
*************** ExpandVisitor::expand_inner_items (
*** 233,242 ****
  	}
      }
  
!   std::function<std::unique_ptr<AST::Item> (AST::SingleASTNode)> extractor
!     = [] (AST::SingleASTNode node) { return node.take_item (); };
! 
!   expand_macro_children (items, extractor);
  
    expander.pop_context ();
  }
--- 233,239 ----
  	}
      }
  
!   expand_macro_children (items, &AST::SingleASTNode::take_item);
  
    expander.pop_context ();
  }
*************** ExpandVisitor::expand_inner_stmts (AST::
*** 324,333 ****
    if (!expr.has_tail_expr ())
      expr.normalize_tail_expr ();
  
!   std::function<std::unique_ptr<AST::Stmt> (AST::SingleASTNode)> extractor
!     = [] (AST::SingleASTNode node) { return node.take_stmt (); };
! 
!   expand_macro_children (stmts, extractor);
  
    expander.pop_context ();
  }
--- 321,327 ----
    if (!expr.has_tail_expr ())
      expr.normalize_tail_expr ();
  
!   expand_macro_children (stmts, &AST::SingleASTNode::take_stmt);
  
    expander.pop_context ();
  }
*************** ExpandVisitor::visit (AST::MetaItemLitEx
*** 544,550 ****
  {}
  
  void
! ExpandVisitor::visit (AST::MetaItemPathLit &)
  {}
  
  void
--- 538,544 ----
  {}
  
  void
! ExpandVisitor::visit (AST::MetaItemPathExpr &)
  {}
  
  void
*************** ExpandVisitor::visit (AST::ClosureExprIn
*** 641,647 ****
  
    maybe_expand_type (expr.get_return_type_ptr ());
  
!   visit (expr.get_definition_block ());
  }
  
  void
--- 635,641 ----
  
    maybe_expand_type (expr.get_return_type_ptr ());
  
!   visit (expr.get_definition_expr ());
  }
  
  void
*************** ExpandVisitor::visit (AST::Trait &trait)
*** 866,877 ****
  
    expander.push_context (MacroExpander::ContextType::TRAIT);
  
-   std::function<std::unique_ptr<AST::AssociatedItem> (AST::SingleASTNode)>
-     extractor
-     = [] (AST::SingleASTNode node) { return node.take_assoc_item (); };
- 
    expand_macro_children (MacroExpander::ContextType::TRAIT,
! 			 trait.get_trait_items (), extractor);
  
    expander.pop_context ();
  }
--- 860,868 ----
  
    expander.push_context (MacroExpander::ContextType::TRAIT);
  
    expand_macro_children (MacroExpander::ContextType::TRAIT,
! 			 trait.get_trait_items (),
! 			 &AST::SingleASTNode::take_assoc_item);
  
    expander.pop_context ();
  }
*************** ExpandVisitor::visit (AST::InherentImpl
*** 894,905 ****
    if (impl.has_where_clause ())
      expand_where_clause (impl.get_where_clause ());
  
-   std::function<std::unique_ptr<AST::AssociatedItem> (AST::SingleASTNode)>
-     extractor
-     = [] (AST::SingleASTNode node) { return node.take_assoc_item (); };
- 
    expand_macro_children (MacroExpander::ContextType::IMPL,
! 			 impl.get_impl_items (), extractor);
  }
  
  void
--- 885,893 ----
    if (impl.has_where_clause ())
      expand_where_clause (impl.get_where_clause ());
  
    expand_macro_children (MacroExpander::ContextType::IMPL,
! 			 impl.get_impl_items (),
! 			 &AST::SingleASTNode::take_assoc_item);
  }
  
  void
*************** ExpandVisitor::visit (AST::TraitImpl &im
*** 922,933 ****
    if (impl.has_where_clause ())
      expand_where_clause (impl.get_where_clause ());
  
-   std::function<std::unique_ptr<AST::AssociatedItem> (AST::SingleASTNode)>
-     extractor
-     = [] (AST::SingleASTNode node) { return node.take_assoc_item (); };
- 
    expand_macro_children (MacroExpander::ContextType::TRAIT_IMPL,
! 			 impl.get_impl_items (), extractor);
  }
  
  void
--- 910,918 ----
    if (impl.has_where_clause ())
      expand_where_clause (impl.get_where_clause ());
  
    expand_macro_children (MacroExpander::ContextType::TRAIT_IMPL,
! 			 impl.get_impl_items (),
! 			 &AST::SingleASTNode::take_assoc_item);
  }
  
  void
*************** void
*** 944,955 ****
  ExpandVisitor::visit (AST::ExternBlock &block)
  {
    visit_inner_attrs (block);
-   std::function<std::unique_ptr<AST::ExternalItem> (AST::SingleASTNode)>
-     extractor
-     = [] (AST::SingleASTNode node) { return node.take_external_item (); };
  
    expand_macro_children (MacroExpander::ContextType::EXTERN,
! 			 block.get_extern_items (), extractor);
  }
  
  void
--- 929,938 ----
  ExpandVisitor::visit (AST::ExternBlock &block)
  {
    visit_inner_attrs (block);
  
    expand_macro_children (MacroExpander::ContextType::EXTERN,
! 			 block.get_extern_items (),
! 			 &AST::SingleASTNode::take_external_item);
  }
  
  void
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-expand-visitor.h gcc-16-20250810/gcc/rust/expand/rust-expand-visitor.h
*** gcc-16-20250803/gcc/rust/expand/rust-expand-visitor.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-expand-visitor.h	Sun Aug 10 22:32:08 2025
*************** namespace Rust {
*** 28,41 ****
  /**
   * Whether or not an attribute is a derive attribute
   */
! bool
! is_derive (AST::Attribute &attr);
  
  /**
   * Whether or not an attribute is builtin
   */
! bool
! is_builtin (AST::Attribute &attr);
  
  class ExpandVisitor : public AST::DefaultASTVisitor
  {
--- 28,39 ----
  /**
   * Whether or not an attribute is a derive attribute
   */
! bool is_derive (AST::Attribute &attr);
  
  /**
   * Whether or not an attribute is builtin
   */
! bool is_builtin (AST::Attribute &attr);
  
  class ExpandVisitor : public AST::DefaultASTVisitor
  {
*************** public:
*** 107,113 ****
     */
    template <typename T, typename U>
    void expand_macro_children (MacroExpander::ContextType ctx, T &values,
! 			      std::function<U (AST::SingleASTNode)> extractor)
    {
      expander.push_context (ctx);
  
--- 105,111 ----
     */
    template <typename T, typename U>
    void expand_macro_children (MacroExpander::ContextType ctx, T &values,
! 			      U (AST::SingleASTNode::*extractor) (void))
    {
      expander.push_context (ctx);
  
*************** public:
*** 123,129 ****
     */
    template <typename T, typename U>
    void expand_macro_children (T &values,
! 			      std::function<U (AST::SingleASTNode)> extractor)
    {
      for (auto it = values.begin (); it != values.end ();)
        {
--- 121,127 ----
     */
    template <typename T, typename U>
    void expand_macro_children (T &values,
! 			      U (AST::SingleASTNode::*extractor) (void))
    {
      for (auto it = values.begin (); it != values.end ();)
        {
*************** public:
*** 140,146 ****
  	    it = values.erase (it);
  	    for (auto &node : final_fragment.get_nodes ())
  	      {
! 		U new_node = extractor (node);
  		if (new_node != nullptr)
  		  {
  		    it = values.insert (it, std::move (new_node));
--- 138,144 ----
  	    it = values.erase (it);
  	    for (auto &node : final_fragment.get_nodes ())
  	      {
! 		U new_node = (node.*extractor) ();
  		if (new_node != nullptr)
  		  {
  		    it = values.insert (it, std::move (new_node));
*************** public:
*** 211,217 ****
    void visit (AST::AttrInputLiteral &) override;
    void visit (AST::AttrInputMacro &) override;
    void visit (AST::MetaItemLitExpr &) override;
!   void visit (AST::MetaItemPathLit &) override;
    void visit (AST::ErrorPropagationExpr &expr) override;
    void visit (AST::ArithmeticOrLogicalExpr &expr) override;
    void visit (AST::ComparisonExpr &expr) override;
--- 209,215 ----
    void visit (AST::AttrInputLiteral &) override;
    void visit (AST::AttrInputMacro &) override;
    void visit (AST::MetaItemLitExpr &) override;
!   void visit (AST::MetaItemPathExpr &) override;
    void visit (AST::ErrorPropagationExpr &expr) override;
    void visit (AST::ArithmeticOrLogicalExpr &expr) override;
    void visit (AST::ComparisonExpr &expr) override;
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-macro-builtins-asm.cc gcc-16-20250810/gcc/rust/expand/rust-macro-builtins-asm.cc
*** gcc-16-20250803/gcc/rust/expand/rust-macro-builtins-asm.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-macro-builtins-asm.cc	Sun Aug 10 22:32:08 2025
***************
*** 25,42 ****
  #include "rust-parse.h"
  
  namespace Rust {
- std::map<AST::InlineAsmOption, std::string> InlineAsmOptionMap{
-   {AST::InlineAsmOption::PURE, "pure"},
-   {AST::InlineAsmOption::NOMEM, "nomem"},
-   {AST::InlineAsmOption::READONLY, "readonly"},
-   {AST::InlineAsmOption::PRESERVES_FLAGS, "preserves_flags"},
-   {AST::InlineAsmOption::NORETURN, "noreturn"},
-   {AST::InlineAsmOption::NOSTACK, "nostack"},
-   {AST::InlineAsmOption::MAY_UNWIND, "may_unwind"},
-   {AST::InlineAsmOption::ATT_SYNTAX, "att_syntax"},
-   {AST::InlineAsmOption::RAW, "raw"},
- };
- 
  std::set<std::string> potentially_nonpromoted_keywords
    = {"in", "out", "lateout", "inout", "inlateout", "const", "sym", "label"};
  
--- 25,30 ----
*************** parse_reg_operand_inout (InlineAsmContex
*** 396,401 ****
--- 384,390 ----
  {
    auto &parser = inline_asm_ctx.parser;
    auto token = parser.peek_current_token ();
+   location_t locus = token->get_locus ();
  
    if (!inline_asm_ctx.is_global_asm () && check_identifier (parser, "inout"))
      {
*************** parse_reg_operand_inout (InlineAsmContex
*** 413,422 ****
  
        // TODO: Is error propogation our top priority, the ? in rust's asm.rs is
        // doing a lot of work.
!       // TODO: Not sure how to use parse_expr
!       if (!check_identifier (parser, ""))
! 	rust_unreachable ();
!       // auto expr = parse_format_string (inline_asm_ctx);
  
        std::unique_ptr<AST::Expr> out_expr;
  
--- 402,409 ----
  
        // TODO: Is error propogation our top priority, the ? in rust's asm.rs is
        // doing a lot of work.
!       std::unique_ptr<AST::Expr> in_expr = parser.parse_expr ();
!       rust_assert (in_expr != nullptr);
  
        std::unique_ptr<AST::Expr> out_expr;
  
*************** parse_reg_operand_inout (InlineAsmContex
*** 426,436 ****
  	    {
  	      // auto result = parse_format_string (inline_asm_ctx);
  
! 	      if (!check_identifier (parser, ""))
! 		rust_unreachable ();
! 	      // out_expr = parser.parse_expr();
  	    }
  
  	  // TODO: Rembmer to pass in clone_expr() instead of nullptr
  	  // https://github.com/rust-lang/rust/blob/a3167859f2fd8ff2241295469876a2b687280bdc/compiler/rustc_builtin_macros/src/asm.rs#L135
  	  // RUST VERSION: ast::InlineAsmOperand::SplitInOut { reg, in_expr:
--- 413,431 ----
  	    {
  	      // auto result = parse_format_string (inline_asm_ctx);
  
! 	      out_expr = parser.parse_expr ();
! 
! 	      AST::InlineAsmOperand::SplitInOut splitinout (
! 		reg, false, std::move (in_expr), std::move (out_expr));
! 
! 	      inline_asm_ctx.inline_asm.operands.emplace_back (splitinout,
! 							       locus);
! 
! 	      return inline_asm_ctx;
  	    }
  
+ 	  rust_unreachable ();
+ 
  	  // TODO: Rembmer to pass in clone_expr() instead of nullptr
  	  // https://github.com/rust-lang/rust/blob/a3167859f2fd8ff2241295469876a2b687280bdc/compiler/rustc_builtin_macros/src/asm.rs#L135
  	  // RUST VERSION: ast::InlineAsmOperand::SplitInOut { reg, in_expr:
*************** parse_reg_operand_inout (InlineAsmContex
*** 444,449 ****
--- 439,446 ----
  	}
        else
  	{
+ 	  AST::InlineAsmOperand::InOut inout (reg, false, std::move (in_expr));
+ 	  inline_asm_ctx.inline_asm.operands.emplace_back (inout, locus);
  	  // https://github.com/rust-lang/rust/blob/a3167859f2fd8ff2241295469876a2b687280bdc/compiler/rustc_builtin_macros/src/asm.rs#L137
  	  // RUST VERSION: ast::InlineAsmOperand::InOut { reg, expr, late: false
  	  // }
*************** parse_reg_operand_unexpected (InlineAsmC
*** 500,506 ****
  }
  
  void
! check_and_set (InlineAsmContext &inline_asm_ctx, AST::InlineAsmOption option)
  {
    auto &parser = inline_asm_ctx.parser;
    auto &inline_asm = inline_asm_ctx.inline_asm;
--- 497,503 ----
  }
  
  void
! check_and_set (InlineAsmContext &inline_asm_ctx, AST::InlineAsm::Option option)
  {
    auto &parser = inline_asm_ctx.parser;
    auto &inline_asm = inline_asm_ctx.inline_asm;
*************** check_and_set (InlineAsmContext &inline_
*** 509,515 ****
        // TODO: report an error of duplication
        rust_error_at (parser.peek_current_token ()->get_locus (),
  		     "the %qs option was already provided",
! 		     InlineAsmOptionMap[option].c_str ());
        return;
      }
    else
--- 506,512 ----
        // TODO: report an error of duplication
        rust_error_at (parser.peek_current_token ()->get_locus (),
  		     "the %qs option was already provided",
! 		     AST::InlineAsm::option_to_string (option).c_str ());
        return;
      }
    else
*************** parse_options (InlineAsmContext &inline_
*** 536,574 ****
      {
        if (!is_global_asm && check_identifier (parser, "pure"))
  	{
! 	  check_and_set (inline_asm_ctx, AST::InlineAsmOption::PURE);
  	}
        else if (!is_global_asm && check_identifier (parser, "nomem"))
  	{
! 	  check_and_set (inline_asm_ctx, AST::InlineAsmOption::NOMEM);
  	}
        else if (!is_global_asm && check_identifier (parser, "readonly"))
  	{
! 	  check_and_set (inline_asm_ctx, AST::InlineAsmOption::READONLY);
  	}
        else if (!is_global_asm && check_identifier (parser, "preserves_flags"))
  	{
! 	  check_and_set (inline_asm_ctx, AST::InlineAsmOption::PRESERVES_FLAGS);
  	}
        else if (!is_global_asm && check_identifier (parser, "noreturn"))
  	{
! 	  check_and_set (inline_asm_ctx, AST::InlineAsmOption::NORETURN);
  	}
        else if (!is_global_asm && check_identifier (parser, "nostack"))
  	{
! 	  check_and_set (inline_asm_ctx, AST::InlineAsmOption::NOSTACK);
  	}
        else if (!is_global_asm && check_identifier (parser, "may_unwind"))
  	{
! 	  check_and_set (inline_asm_ctx, AST::InlineAsmOption::MAY_UNWIND);
  	}
        else if (check_identifier (parser, "att_syntax"))
  	{
! 	  check_and_set (inline_asm_ctx, AST::InlineAsmOption::ATT_SYNTAX);
  	}
        else if (check_identifier (parser, "raw"))
  	{
! 	  check_and_set (inline_asm_ctx, AST::InlineAsmOption::RAW);
  	}
        else
  	{
--- 533,572 ----
      {
        if (!is_global_asm && check_identifier (parser, "pure"))
  	{
! 	  check_and_set (inline_asm_ctx, AST::InlineAsm::Option::PURE);
  	}
        else if (!is_global_asm && check_identifier (parser, "nomem"))
  	{
! 	  check_and_set (inline_asm_ctx, AST::InlineAsm::Option::NOMEM);
  	}
        else if (!is_global_asm && check_identifier (parser, "readonly"))
  	{
! 	  check_and_set (inline_asm_ctx, AST::InlineAsm::Option::READONLY);
  	}
        else if (!is_global_asm && check_identifier (parser, "preserves_flags"))
  	{
! 	  check_and_set (inline_asm_ctx,
! 			 AST::InlineAsm::Option::PRESERVES_FLAGS);
  	}
        else if (!is_global_asm && check_identifier (parser, "noreturn"))
  	{
! 	  check_and_set (inline_asm_ctx, AST::InlineAsm::Option::NORETURN);
  	}
        else if (!is_global_asm && check_identifier (parser, "nostack"))
  	{
! 	  check_and_set (inline_asm_ctx, AST::InlineAsm::Option::NOSTACK);
  	}
        else if (!is_global_asm && check_identifier (parser, "may_unwind"))
  	{
! 	  check_and_set (inline_asm_ctx, AST::InlineAsm::Option::MAY_UNWIND);
  	}
        else if (check_identifier (parser, "att_syntax"))
  	{
! 	  check_and_set (inline_asm_ctx, AST::InlineAsm::Option::ATT_SYNTAX);
  	}
        else if (check_identifier (parser, "raw"))
  	{
! 	  check_and_set (inline_asm_ctx, AST::InlineAsm::Option::RAW);
  	}
        else
  	{
*************** expand_inline_asm_strings (InlineAsmCont
*** 807,813 ****
  	      auto next_argument = piece.next_argument._0;
  	      switch (piece.next_argument._0.position.tag)
  		{
! 		  case Fmt::ffi::Position::Tag::ArgumentImplicitlyIs: {
  		    auto idx = next_argument.position.argument_implicitly_is._0;
  		    /*auto trait = next_argument.format;*/
  		    /*auto arg = arguments.at (idx);*/
--- 805,812 ----
  	      auto next_argument = piece.next_argument._0;
  	      switch (piece.next_argument._0.position.tag)
  		{
! 		case Fmt::ffi::Position::Tag::ArgumentImplicitlyIs:
! 		  {
  		    auto idx = next_argument.position.argument_implicitly_is._0;
  		    /*auto trait = next_argument.format;*/
  		    /*auto arg = arguments.at (idx);*/
*************** expand_inline_asm_strings (InlineAsmCont
*** 829,834 ****
--- 828,838 ----
  		  }
  		  break;
  		case Fmt::ffi::Position::Tag::ArgumentIs:
+ 		  {
+ 		    auto idx = next_argument.position.argument_is._0;
+ 		    transformed_template_str += "%" + std::to_string (idx);
+ 		    break;
+ 		  }
  		case Fmt::ffi::Position::Tag::ArgumentNamed:
  		  rust_sorry_at (inline_asm.get_locus (),
  				 "unhandled argument position specifier");
*************** parse_format_strings (InlineAsmContext i
*** 933,939 ****
      {
        if (!parser.skip_token (COMMA))
  	{
! 	  break;
  	}
        // Ok after the comma is good, we better be parsing correctly
        // everything in here, which is formatted string in ABNF
--- 937,945 ----
      {
        if (!parser.skip_token (COMMA))
  	{
! 	  rust_error_at (parser.peek_current_token ()->get_locus (),
! 			 "expected token %qs", ";");
! 	  return tl::unexpected<InlineAsmParseError> (COMMITTED);
  	}
        // Ok after the comma is good, we better be parsing correctly
        // everything in here, which is formatted string in ABNF
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-macro-builtins-asm.h gcc-16-20250810/gcc/rust/expand/rust-macro-builtins-asm.h
*** gcc-16-20250803/gcc/rust/expand/rust-macro-builtins-asm.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-macro-builtins-asm.h	Sun Aug 10 22:32:08 2025
*************** tl::expected<InlineAsmContext, InlineAsm
*** 142,157 ****
  parse_reg_operand_unexpected (InlineAsmContext inline_asm_ctx);
  
  WARN_UNUSED_RESULT
! tl::optional<AST::Fragment>
! parse_asm (location_t invoc_locus, AST::MacroInvocData &invoc,
! 	   AST::InvocKind semicolon, AST::AsmKind is_global_asm);
  
  WARN_UNUSED_RESULT
! bool
! check_identifier (Parser<MacroInvocLexer> &parser, std::string ident);
  
! void
! check_and_set (InlineAsmContext &inline_asm_ctx, AST::InlineAsmOption option);
  
  // From rustc
  WARN_UNUSED_RESULT
--- 142,157 ----
  parse_reg_operand_unexpected (InlineAsmContext inline_asm_ctx);
  
  WARN_UNUSED_RESULT
! tl::optional<AST::Fragment> parse_asm (location_t invoc_locus,
! 				       AST::MacroInvocData &invoc,
! 				       AST::InvocKind semicolon,
! 				       AST::AsmKind is_global_asm);
  
  WARN_UNUSED_RESULT
! bool check_identifier (Parser<MacroInvocLexer> &parser, std::string ident);
  
! void check_and_set (InlineAsmContext &inline_asm_ctx,
! 		    AST::InlineAsm::Option option);
  
  // From rustc
  WARN_UNUSED_RESULT
*************** tl::optional<std::string>
*** 168,176 ****
  parse_format_string (InlineAsmContext &inline_asm_ctx);
  
  WARN_UNUSED_RESULT
! tl::optional<std::string>
! parse_label (Parser<MacroInvocLexer> &parser, TokenId last_token_id,
! 	     InlineAsmContext &inline_asm_ctx);
  
  // LLVM ASM bits
  
--- 168,176 ----
  parse_format_string (InlineAsmContext &inline_asm_ctx);
  
  WARN_UNUSED_RESULT
! tl::optional<std::string> parse_label (Parser<MacroInvocLexer> &parser,
! 				       TokenId last_token_id,
! 				       InlineAsmContext &inline_asm_ctx);
  
  // LLVM ASM bits
  
*************** public:
*** 188,204 ****
    {}
  };
  
! void
! parse_llvm_outputs (LlvmAsmContext &ctx);
  
! void
! parse_llvm_inputs (LlvmAsmContext &ctx);
  
! void
! parse_llvm_clobbers (LlvmAsmContext &ctx);
  
! void
! parse_llvm_options (LlvmAsmContext &ctx);
  
  WARN_UNUSED_RESULT tl::optional<AST::Fragment>
  parse_llvm_asm (location_t invoc_locus, AST::MacroInvocData &invoc,
--- 188,200 ----
    {}
  };
  
! void parse_llvm_outputs (LlvmAsmContext &ctx);
  
! void parse_llvm_inputs (LlvmAsmContext &ctx);
  
! void parse_llvm_clobbers (LlvmAsmContext &ctx);
  
! void parse_llvm_options (LlvmAsmContext &ctx);
  
  WARN_UNUSED_RESULT tl::optional<AST::Fragment>
  parse_llvm_asm (location_t invoc_locus, AST::MacroInvocData &invoc,
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-macro-builtins-format-args.cc gcc-16-20250810/gcc/rust/expand/rust-macro-builtins-format-args.cc
*** gcc-16-20250803/gcc/rust/expand/rust-macro-builtins-format-args.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-macro-builtins-format-args.cc	Sun Aug 10 22:32:08 2025
*************** format_args_parse_arguments (AST::MacroI
*** 52,59 ****
  
    // TODO: Handle the case where we're not parsing a string literal (macro
    // invocation for e.g.)
!   if (parser.peek_current_token ()->get_id () == STRING_LITERAL)
!     format_expr = parser.parse_literal_expr ();
  
    rust_assert (format_expr);
  
--- 52,66 ----
  
    // TODO: Handle the case where we're not parsing a string literal (macro
    // invocation for e.g.)
!   switch (parser.peek_current_token ()->get_id ())
!     {
!     case STRING_LITERAL:
!     case RAW_STRING_LITERAL:
!       format_expr = parser.parse_literal_expr ();
!     default:
!       // do nothing
!       ;
!     }
  
    rust_assert (format_expr);
  
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-macro-builtins-helpers.cc gcc-16-20250810/gcc/rust/expand/rust-macro-builtins-helpers.cc
*** gcc-16-20250803/gcc/rust/expand/rust-macro-builtins-helpers.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-macro-builtins-helpers.cc	Sun Aug 10 22:32:08 2025
*************** make_eager_builtin_invocation (
*** 68,73 ****
--- 68,74 ----
  {
    auto path_str = make_macro_path_str (kind);
  
+   auto token_stream = arguments.to_token_stream ();
    std::unique_ptr<AST::Expr> node = AST::MacroInvocation::Builtin (
      kind,
      AST::MacroInvocData (AST::SimplePath (
*************** make_eager_builtin_invocation (
*** 76,82 ****
      {}, locus, std::move (pending_invocations));
  
    return AST::Fragment ({AST::SingleASTNode (std::move (node))},
! 			arguments.to_token_stream ());
  }
  
  /* Match the end token of a macro given the start delimiter of the macro */
--- 77,83 ----
      {}, locus, std::move (pending_invocations));
  
    return AST::Fragment ({AST::SingleASTNode (std::move (node))},
! 			std::move (token_stream));
  }
  
  /* Match the end token of a macro given the start delimiter of the macro */
*************** std::unique_ptr<AST::LiteralExpr>
*** 110,118 ****
  try_extract_string_literal_from_fragment (const location_t &parent_locus,
  					  std::unique_ptr<AST::Expr> &node)
  {
-   auto maybe_lit = static_cast<AST::LiteralExpr *> (node.get ());
    if (!node || !node->is_literal ()
!       || maybe_lit->get_lit_type () != AST::Literal::STRING)
      {
        rust_error_at (parent_locus, "argument must be a string literal");
        if (node)
--- 111,119 ----
  try_extract_string_literal_from_fragment (const location_t &parent_locus,
  					  std::unique_ptr<AST::Expr> &node)
  {
    if (!node || !node->is_literal ()
!       || static_cast<AST::LiteralExpr &> (*node).get_lit_type ()
! 	   != AST::Literal::STRING)
      {
        rust_error_at (parent_locus, "argument must be a string literal");
        if (node)
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-macro-builtins-helpers.h gcc-16-20250810/gcc/rust/expand/rust-macro-builtins-helpers.h
*** gcc-16-20250803/gcc/rust/expand/rust-macro-builtins-helpers.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-macro-builtins-helpers.h	Sun Aug 10 22:32:08 2025
***************
*** 33,61 ****
  #include "rust-token.h"
  namespace Rust {
  
! std::string
! make_macro_path_str (BuiltinMacro kind);
  
! std::vector<std::unique_ptr<AST::MacroInvocation>>
! check_for_eager_invocations (
    std::vector<std::unique_ptr<AST::Expr>> &expressions);
  
  // Shorthand function for creating unique_ptr tokens
  
! std::unique_ptr<AST::Token>
! make_token (const TokenPtr tok);
  
! std::unique_ptr<AST::Expr>
! make_string (location_t locus, std::string value);
  // TODO: Is this correct?
! AST::Fragment
! make_eager_builtin_invocation (
    BuiltinMacro kind, location_t locus, AST::DelimTokenTree arguments,
    std::vector<std::unique_ptr<AST::MacroInvocation>> &&pending_invocations);
  // Match the end token of a macro given the start delimiter of the macro
! TokenId
! macro_end_token (AST::DelimTokenTree &invoc_token_tree,
! 		 Parser<MacroInvocLexer> &parser);
  // Expand and then extract a string literal from the macro
  std::unique_ptr<AST::LiteralExpr>
  try_extract_string_literal_from_fragment (const location_t &parent_locus,
--- 33,55 ----
  #include "rust-token.h"
  namespace Rust {
  
! std::string make_macro_path_str (BuiltinMacro kind);
  
! std::vector<std::unique_ptr<AST::MacroInvocation>> check_for_eager_invocations (
    std::vector<std::unique_ptr<AST::Expr>> &expressions);
  
  // Shorthand function for creating unique_ptr tokens
  
! std::unique_ptr<AST::Token> make_token (const TokenPtr tok);
  
! std::unique_ptr<AST::Expr> make_string (location_t locus, std::string value);
  // TODO: Is this correct?
! AST::Fragment make_eager_builtin_invocation (
    BuiltinMacro kind, location_t locus, AST::DelimTokenTree arguments,
    std::vector<std::unique_ptr<AST::MacroInvocation>> &&pending_invocations);
  // Match the end token of a macro given the start delimiter of the macro
! TokenId macro_end_token (AST::DelimTokenTree &invoc_token_tree,
! 			 Parser<MacroInvocLexer> &parser);
  // Expand and then extract a string literal from the macro
  std::unique_ptr<AST::LiteralExpr>
  try_extract_string_literal_from_fragment (const location_t &parent_locus,
*************** try_expand_many_expr (Parser<MacroInvocL
*** 70,90 ****
  //   and return the LiteralExpr for it. Allow for an optional trailing comma,
  //   but otherwise enforce that these are the only tokens.
  
! std::unique_ptr<AST::Expr>
! parse_single_string_literal (BuiltinMacro kind,
! 			     AST::DelimTokenTree &invoc_token_tree,
! 			     location_t invoc_locus, MacroExpander *expander,
! 			     bool is_semicoloned = false);
  
  // Treat PATH as a path relative to the source file currently being
  // compiled, and return the absolute path for it.
  
! std::string
! source_relative_path (std::string path, location_t locus);
  
  // Read the full contents of the file FILENAME and return them in a vector.
  // FIXME: platform specific.
! tl::optional<std::vector<uint8_t>>
! load_file_bytes (location_t invoc_locus, const char *filename);
  } // namespace Rust
  #endif // GCCRS_RUST_MACRO_BUILTINS_HELPERS_H
--- 64,81 ----
  //   and return the LiteralExpr for it. Allow for an optional trailing comma,
  //   but otherwise enforce that these are the only tokens.
  
! std::unique_ptr<AST::Expr> parse_single_string_literal (
!   BuiltinMacro kind, AST::DelimTokenTree &invoc_token_tree,
!   location_t invoc_locus, MacroExpander *expander, bool is_semicoloned = false);
  
  // Treat PATH as a path relative to the source file currently being
  // compiled, and return the absolute path for it.
  
! std::string source_relative_path (std::string path, location_t locus);
  
  // Read the full contents of the file FILENAME and return them in a vector.
  // FIXME: platform specific.
! tl::optional<std::vector<uint8_t>> load_file_bytes (location_t invoc_locus,
! 						    const char *filename);
  } // namespace Rust
  #endif // GCCRS_RUST_MACRO_BUILTINS_HELPERS_H
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-macro-builtins-offset-of.cc gcc-16-20250810/gcc/rust/expand/rust-macro-builtins-offset-of.cc
*** gcc-16-20250803/gcc/rust/expand/rust-macro-builtins-offset-of.cc	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/rust/expand/rust-macro-builtins-offset-of.cc	Sun Aug 10 22:32:08 2025
***************
*** 0 ****
--- 1,78 ----
+ // Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ 
+ // This file is part of GCC.
+ 
+ // GCC is free software; you can redistribute it and/or modify it under
+ // the terms of the GNU General Public License as published by the Free
+ // Software Foundation; either version 3, or (at your option) any later
+ // version.
+ 
+ // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ // WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ // for more details.
+ 
+ // You should have received a copy of the GNU General Public License
+ // along with GCC; see the file COPYING3.  If not see
+ // <http://www.gnu.org/licenses/>.
+ 
+ #include "optional.h"
+ #include "rust-ast-fragment.h"
+ #include "rust-ast.h"
+ #include "rust-builtin-ast-nodes.h"
+ #include "rust-diagnostics.h"
+ #include "rust-macro-builtins-helpers.h"
+ #include "rust-macro-builtins.h"
+ #include "rust-macro-invoc-lexer.h"
+ #include "rust-parse.h"
+ 
+ namespace Rust {
+ 
+ tl::optional<AST::Fragment>
+ MacroBuiltin::offset_of_handler (location_t invoc_locus,
+ 				 AST::MacroInvocData &invoc,
+ 				 AST::InvocKind semicolon)
+ {
+   MacroInvocLexer lex (invoc.get_delim_tok_tree ().to_token_stream ());
+   Parser<MacroInvocLexer> parser (lex);
+ 
+   auto last_token = macro_end_token (invoc.get_delim_tok_tree (), parser);
+ 
+   auto type = parser.parse_type ();
+ 
+   // if we don't see a type, there might be an eager macro expansion missing
+   // FIXME: handle that
+   if (!type)
+     {
+       rust_error_at (invoc_locus, "could not parse type argument for %qs",
+ 		     "offset_of");
+ 
+       // we skip so we can still parse the field arg and check if it is correct
+       while (parser.peek_current_token ()->get_id () != COMMA
+ 	     && parser.peek_current_token ()->get_id () != last_token)
+ 	parser.skip_token ();
+     }
+ 
+   parser.skip_token (COMMA);
+ 
+   auto field_tok = parser.parse_identifier_or_keyword_token ();
+   auto invalid_field = !field_tok || !field_tok->has_str ();
+ 
+   if (invalid_field)
+     rust_error_at (invoc_locus, "could not parse field argument for %qs",
+ 		   "offset_of");
+ 
+   if (!type || invalid_field)
+     return tl::nullopt;
+ 
+   auto field = Identifier (field_tok->get_str ());
+ 
+   // FIXME: Do we need to do anything to handle the optional comma at the end?
+   parser.maybe_skip_token (COMMA);
+ 
+   return AST::Fragment ({AST::SingleASTNode (std::make_unique<AST::OffsetOf> (
+ 			  std::move (type), field, invoc_locus))},
+ 			invoc.get_delim_tok_tree ().to_token_stream ());
+ }
+ 
+ } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-macro-builtins.cc gcc-16-20250810/gcc/rust/expand/rust-macro-builtins.cc
*** gcc-16-20250803/gcc/rust/expand/rust-macro-builtins.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-macro-builtins.cc	Sun Aug 10 22:32:08 2025
*************** std::unordered_map<std::string, AST::Mac
*** 162,167 ****
--- 162,170 ----
      {"Ord", MacroBuiltin::proc_macro_builtin},
      {"PartialOrd", MacroBuiltin::proc_macro_builtin},
      {"Hash", MacroBuiltin::proc_macro_builtin},
+     /* offset_of is not declared in Rust 1.49 but still needed for
+        Rust-for-Linux, so we still create a transcriber and warn the user */
+     {"offset_of", MacroBuiltin::offset_of_handler},
  };
  
  tl::optional<BuiltinMacro>
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-macro-builtins.h gcc-16-20250810/gcc/rust/expand/rust-macro-builtins.h
*** gcc-16-20250803/gcc/rust/expand/rust-macro-builtins.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-macro-builtins.h	Sun Aug 10 22:32:08 2025
***************
*** 19,24 ****
--- 19,25 ----
  #ifndef RUST_MACRO_BUILTINS_H
  #define RUST_MACRO_BUILTINS_H
  
+ #include "optional.h"
  #include "rust-ast.h"
  #include "rust-builtin-ast-nodes.h"
  #include "rust-ast-fragment.h"
*************** public:
*** 188,193 ****
--- 189,197 ----
    format_args_handler (location_t invoc_locus, AST::MacroInvocData &invoc,
  		       AST::InvocKind semicolon, AST::FormatArgs::Newline nl);
  
+   static tl::optional<AST::Fragment>
+   offset_of_handler (location_t, AST::MacroInvocData &, AST::InvocKind);
+ 
    static tl::optional<AST::Fragment> sorry (location_t invoc_locus,
  					    AST::MacroInvocData &invoc,
  					    AST::InvocKind semicolon);
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-macro-expand.cc gcc-16-20250810/gcc/rust/expand/rust-macro-expand.cc
*** gcc-16-20250803/gcc/rust/expand/rust-macro-expand.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-macro-expand.cc	Sun Aug 10 22:32:08 2025
***************
*** 19,24 ****
--- 19,25 ----
  #include "rust-macro-expand.h"
  #include "optional.h"
  #include "rust-ast-fragment.h"
+ #include "rust-macro-builtins.h"
  #include "rust-macro-substitute-ctx.h"
  #include "rust-ast-full.h"
  #include "rust-ast-visitor.h"
*************** MacroExpander::expand_invoc (AST::MacroI
*** 287,292 ****
--- 288,313 ----
    // lookup the rules
    auto rules_def = mappings.lookup_macro_invocation (invoc);
  
+   // We special case the `offset_of!()` macro if the flag is here and manually
+   // resolve to the builtin transcriber we have specified
+   auto assume_builtin_offset_of
+     = flag_assume_builtin_offset_of
+       && (invoc.get_invoc_data ().get_path ().as_string () == "offset_of")
+       && !rules_def;
+ 
+   // TODO: This is *massive hack* which should be removed as we progress to
+   // Rust 1.71 when offset_of gets added to core
+   if (assume_builtin_offset_of)
+     {
+       fragment = MacroBuiltin::offset_of_handler (invoc.get_locus (),
+ 						  invoc_data, semicolon)
+ 		   .value_or (AST::Fragment::create_empty ());
+ 
+       set_expanded_fragment (std::move (fragment));
+ 
+       return;
+     }
+ 
    // If there's no rule associated with the invocation, we can simply return
    // early. The early name resolver will have already emitted an error.
    if (!rules_def)
*************** MacroExpander::match_fragment (Parser<Ma
*** 430,436 ****
        parser.parse_visibility ();
        break;
  
!       case AST::MacroFragSpec::STMT: {
  	auto restrictions = ParseRestrictions ();
  	restrictions.consume_semi = false;
  	parser.parse_stmt (restrictions);
--- 451,458 ----
        parser.parse_visibility ();
        break;
  
!     case AST::MacroFragSpec::STMT:
!       {
  	auto restrictions = ParseRestrictions ();
  	restrictions.consume_semi = false;
  	parser.parse_stmt (restrictions);
*************** MacroExpander::match_matcher (Parser<Mac
*** 480,498 ****
    // this is used so we can check that we delimit the stream correctly.
    switch (delimiter->get_id ())
      {
!       case LEFT_PAREN: {
  	if (!check_delim (AST::DelimType::PARENS))
  	  return false;
        }
        break;
  
!       case LEFT_SQUARE: {
  	if (!check_delim (AST::DelimType::SQUARE))
  	  return false;
        }
        break;
  
!       case LEFT_CURLY: {
  	if (!check_delim (AST::DelimType::CURLY))
  	  return false;
        }
--- 502,523 ----
    // this is used so we can check that we delimit the stream correctly.
    switch (delimiter->get_id ())
      {
!     case LEFT_PAREN:
!       {
  	if (!check_delim (AST::DelimType::PARENS))
  	  return false;
        }
        break;
  
!     case LEFT_SQUARE:
!       {
  	if (!check_delim (AST::DelimType::SQUARE))
  	  return false;
        }
        break;
  
!     case LEFT_CURLY:
!       {
  	if (!check_delim (AST::DelimType::CURLY))
  	  return false;
        }
*************** MacroExpander::match_matcher (Parser<Mac
*** 510,516 ****
  
        switch (match->get_macro_match_type ())
  	{
! 	  case AST::MacroMatch::MacroMatchType::Fragment: {
  	    AST::MacroMatchFragment *fragment
  	      = static_cast<AST::MacroMatchFragment *> (match.get ());
  	    if (!match_fragment (parser, *fragment))
--- 535,542 ----
  
        switch (match->get_macro_match_type ())
  	{
! 	case AST::MacroMatch::MacroMatchType::Fragment:
! 	  {
  	    AST::MacroMatchFragment *fragment
  	      = static_cast<AST::MacroMatchFragment *> (match.get ());
  	    if (!match_fragment (parser, *fragment))
*************** MacroExpander::match_matcher (Parser<Mac
*** 524,537 ****
  	  }
  	  break;
  
! 	  case AST::MacroMatch::MacroMatchType::Tok: {
  	    AST::Token *tok = static_cast<AST::Token *> (match.get ());
  	    if (!match_token (parser, *tok))
  	      return false;
  	  }
  	  break;
  
! 	  case AST::MacroMatch::MacroMatchType::Repetition: {
  	    AST::MacroMatchRepetition *rep
  	      = static_cast<AST::MacroMatchRepetition *> (match.get ());
  	    if (!match_repetition (parser, *rep))
--- 550,565 ----
  	  }
  	  break;
  
! 	case AST::MacroMatch::MacroMatchType::Tok:
! 	  {
  	    AST::Token *tok = static_cast<AST::Token *> (match.get ());
  	    if (!match_token (parser, *tok))
  	      return false;
  	  }
  	  break;
  
! 	case AST::MacroMatch::MacroMatchType::Repetition:
! 	  {
  	    AST::MacroMatchRepetition *rep
  	      = static_cast<AST::MacroMatchRepetition *> (match.get ());
  	    if (!match_repetition (parser, *rep))
*************** MacroExpander::match_matcher (Parser<Mac
*** 539,545 ****
  	  }
  	  break;
  
! 	  case AST::MacroMatch::MacroMatchType::Matcher: {
  	    AST::MacroMatcher *m
  	      = static_cast<AST::MacroMatcher *> (match.get ());
  	    expansion_depth++;
--- 567,574 ----
  	  }
  	  break;
  
! 	case AST::MacroMatch::MacroMatchType::Matcher:
! 	  {
  	    AST::MacroMatcher *m
  	      = static_cast<AST::MacroMatcher *> (match.get ());
  	    expansion_depth++;
*************** MacroExpander::match_matcher (Parser<Mac
*** 556,574 ****
  
    switch (delimiter->get_id ())
      {
!       case LEFT_PAREN: {
  	if (!parser.skip_token (RIGHT_PAREN))
  	  return false;
        }
        break;
  
!       case LEFT_SQUARE: {
  	if (!parser.skip_token (RIGHT_SQUARE))
  	  return false;
        }
        break;
  
!       case LEFT_CURLY: {
  	if (!parser.skip_token (RIGHT_CURLY))
  	  return false;
        }
--- 585,606 ----
  
    switch (delimiter->get_id ())
      {
!     case LEFT_PAREN:
!       {
  	if (!parser.skip_token (RIGHT_PAREN))
  	  return false;
        }
        break;
  
!     case LEFT_SQUARE:
!       {
  	if (!parser.skip_token (RIGHT_SQUARE))
  	  return false;
        }
        break;
  
!     case LEFT_CURLY:
!       {
  	if (!parser.skip_token (RIGHT_CURLY))
  	  return false;
        }
*************** MacroExpander::match_n_matches (Parser<M
*** 617,623 ****
  	  size_t offs_begin = source.get_offs ();
  	  switch (match->get_macro_match_type ())
  	    {
! 	      case AST::MacroMatch::MacroMatchType::Fragment: {
  		AST::MacroMatchFragment *fragment
  		  = static_cast<AST::MacroMatchFragment *> (match.get ());
  		valid_current_match = match_fragment (parser, *fragment);
--- 649,656 ----
  	  size_t offs_begin = source.get_offs ();
  	  switch (match->get_macro_match_type ())
  	    {
! 	    case AST::MacroMatch::MacroMatchType::Fragment:
! 	      {
  		AST::MacroMatchFragment *fragment
  		  = static_cast<AST::MacroMatchFragment *> (match.get ());
  		valid_current_match = match_fragment (parser, *fragment);
*************** MacroExpander::match_n_matches (Parser<M
*** 632,651 ****
  	      }
  	      break;
  
! 	      case AST::MacroMatch::MacroMatchType::Tok: {
  		AST::Token *tok = static_cast<AST::Token *> (match.get ());
  		valid_current_match = match_token (parser, *tok);
  	      }
  	      break;
  
! 	      case AST::MacroMatch::MacroMatchType::Repetition: {
  		AST::MacroMatchRepetition *rep
  		  = static_cast<AST::MacroMatchRepetition *> (match.get ());
  		valid_current_match = match_repetition (parser, *rep);
  	      }
  	      break;
  
! 	      case AST::MacroMatch::MacroMatchType::Matcher: {
  		AST::MacroMatcher *m
  		  = static_cast<AST::MacroMatcher *> (match.get ());
  		valid_current_match = match_matcher (parser, *m, true);
--- 665,687 ----
  	      }
  	      break;
  
! 	    case AST::MacroMatch::MacroMatchType::Tok:
! 	      {
  		AST::Token *tok = static_cast<AST::Token *> (match.get ());
  		valid_current_match = match_token (parser, *tok);
  	      }
  	      break;
  
! 	    case AST::MacroMatch::MacroMatchType::Repetition:
! 	      {
  		AST::MacroMatchRepetition *rep
  		  = static_cast<AST::MacroMatchRepetition *> (match.get ());
  		valid_current_match = match_repetition (parser, *rep);
  	      }
  	      break;
  
! 	    case AST::MacroMatch::MacroMatchType::Matcher:
! 	      {
  		AST::MacroMatcher *m
  		  = static_cast<AST::MacroMatcher *> (match.get ());
  		valid_current_match = match_matcher (parser, *m, true);
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-macro-substitute-ctx.cc gcc-16-20250810/gcc/rust/expand/rust-macro-substitute-ctx.cc
*** gcc-16-20250803/gcc/rust/expand/rust-macro-substitute-ctx.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-macro-substitute-ctx.cc	Sun Aug 10 22:32:08 2025
*************** SubstituteCtx::substitute_token (size_t
*** 273,279 ****
        // don't substitute, dollar sign is alone/metavar is unknown
        return {std::vector<std::unique_ptr<AST::Token>> (), 0};
  
!       case LEFT_PAREN: {
  	// We need to parse up until the closing delimiter and expand this
  	// fragment->n times.
  	rust_debug ("expanding repetition");
--- 273,280 ----
        // don't substitute, dollar sign is alone/metavar is unknown
        return {std::vector<std::unique_ptr<AST::Token>> (), 0};
  
!     case LEFT_PAREN:
!       {
  	// We need to parse up until the closing delimiter and expand this
  	// fragment->n times.
  	rust_debug ("expanding repetition");
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-proc-macro.h gcc-16-20250810/gcc/rust/expand/rust-proc-macro.h
*** gcc-16-20250803/gcc/rust/expand/rust-proc-macro.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-proc-macro.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 82,92 ****
   *
   * @param The path to the shared object file to load.
   */
! const std::vector<ProcMacro::Procmacro>
! load_macros (std::string path);
  
! std::string
! generate_proc_macro_decls_symbol (std::uint32_t stable_crate_id);
  
  } // namespace Rust
  
--- 82,90 ----
   *
   * @param The path to the shared object file to load.
   */
! const std::vector<ProcMacro::Procmacro> load_macros (std::string path);
  
! std::string generate_proc_macro_decls_symbol (std::uint32_t stable_crate_id);
  
  } // namespace Rust
  
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-token-tree-desugar.cc gcc-16-20250810/gcc/rust/expand/rust-token-tree-desugar.cc
*** gcc-16-20250803/gcc/rust/expand/rust-token-tree-desugar.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-token-tree-desugar.cc	Sun Aug 10 22:32:08 2025
*************** TokenTreeDesugar::visit (Token &tts)
*** 68,72 ****
      }
  }
  
! }; // namespace AST
! }; // namespace Rust
--- 68,72 ----
      }
  }
  
! } // namespace AST
! } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/expand/rust-token-tree-desugar.h gcc-16-20250810/gcc/rust/expand/rust-token-tree-desugar.h
*** gcc-16-20250803/gcc/rust/expand/rust-token-tree-desugar.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/expand/rust-token-tree-desugar.h	Sun Aug 10 22:32:08 2025
*************** private:
*** 49,55 ****
    virtual void visit (Token &tts) override;
  };
  
! }; // namespace AST
! }; // namespace Rust
  
  #endif //! RUST_TOKEN_TREE_DESUGAR_H
--- 49,55 ----
    virtual void visit (Token &tts) override;
  };
  
! } // namespace AST
! } // namespace Rust
  
  #endif //! RUST_TOKEN_TREE_DESUGAR_H
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/rust-ast-lower-base.cc gcc-16-20250810/gcc/rust/hir/rust-ast-lower-base.cc
*** gcc-16-20250803/gcc/rust/hir/rust-ast-lower-base.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/rust-ast-lower-base.cc	Sun Aug 10 22:32:08 2025
*************** ASTLoweringBase::visit (AST::ErrorPropag
*** 47,52 ****
--- 47,73 ----
  }
  
  void
+ ASTLoweringBase::visit (AST::TryExpr &expr)
+ {
+   rust_fatal_error (expr.get_locus (), "missing desugar for try-blocks");
+   rust_unreachable ();
+ }
+ 
+ void
+ ASTLoweringBase::visit (AST::ForLoopExpr &expr)
+ {
+   rust_fatal_error (expr.get_locus (), "missing desugar for for-loops");
+   rust_unreachable ();
+ }
+ 
+ void
+ ASTLoweringBase::visit (AST::WhileLetLoopExpr &expr)
+ {
+   rust_fatal_error (expr.get_locus (), "missing desugar for while-let loops");
+   rust_unreachable ();
+ }
+ 
+ void
  ASTLoweringBase::visit (AST::Token &)
  {}
  void
*************** void
*** 115,121 ****
  ASTLoweringBase::visit (AST::MetaItemLitExpr &)
  {}
  void
! ASTLoweringBase::visit (AST::MetaItemPathLit &)
  {}
  void
  ASTLoweringBase::visit (AST::BorrowExpr &)
--- 136,142 ----
  ASTLoweringBase::visit (AST::MetaItemLitExpr &)
  {}
  void
! ASTLoweringBase::visit (AST::MetaItemPathExpr &)
  {}
  void
  ASTLoweringBase::visit (AST::BorrowExpr &)
*************** void
*** 201,206 ****
--- 222,233 ----
  ASTLoweringBase::visit (AST::BlockExpr &)
  {}
  void
+ ASTLoweringBase::visit (AST::AnonConst &)
+ {}
+ void
+ ASTLoweringBase::visit (AST::ConstBlock &)
+ {}
+ void
  ASTLoweringBase::visit (AST::ClosureExprInnerTyped &)
  {}
  void
*************** void
*** 245,256 ****
  ASTLoweringBase::visit (AST::WhileLoopExpr &)
  {}
  void
- ASTLoweringBase::visit (AST::WhileLetLoopExpr &)
- {}
- void
- ASTLoweringBase::visit (AST::ForLoopExpr &)
- {}
- void
  ASTLoweringBase::visit (AST::IfExpr &)
  {}
  void
--- 272,277 ----
*************** void
*** 474,479 ****
--- 495,506 ----
  ASTLoweringBase::visit (AST::GroupedPattern &)
  {}
  void
+ ASTLoweringBase::visit (AST::SlicePatternItemsNoRest &)
+ {}
+ void
+ ASTLoweringBase::visit (AST::SlicePatternItemsHasRest &)
+ {}
+ void
  ASTLoweringBase::visit (AST::SlicePattern &)
  {}
  void
*************** void
*** 551,556 ****
--- 578,587 ----
  ASTLoweringBase::visit (AST::FormatArgs &fmt)
  {}
  
+ void
+ ASTLoweringBase::visit (AST::OffsetOf &offset_of)
+ {}
+ 
  HIR::Lifetime
  ASTLoweringBase::lower_lifetime (AST::Lifetime &lifetime,
  				 bool default_to_static_lifetime)
*************** ASTLoweringBase::lower_generic_args (AST
*** 648,659 ****
      {
        switch (arg.get_kind ())
  	{
! 	  case AST::GenericArg::Kind::Type: {
  	    auto type = ASTLoweringType::translate (arg.get_type ());
  	    type_args.emplace_back (std::unique_ptr<HIR::Type> (type));
  	    break;
  	  }
! 	  case AST::GenericArg::Kind::Const: {
  	    auto expr = ASTLoweringExpr::translate (arg.get_expression ());
  	    const_args.emplace_back (
  	      HIR::ConstGenericArg (std::unique_ptr<HIR::Expr> (expr),
--- 679,692 ----
      {
        switch (arg.get_kind ())
  	{
! 	case AST::GenericArg::Kind::Type:
! 	  {
  	    auto type = ASTLoweringType::translate (arg.get_type ());
  	    type_args.emplace_back (std::unique_ptr<HIR::Type> (type));
  	    break;
  	  }
! 	case AST::GenericArg::Kind::Const:
! 	  {
  	    auto expr = ASTLoweringExpr::translate (arg.get_expression ());
  	    const_args.emplace_back (
  	      HIR::ConstGenericArg (std::unique_ptr<HIR::Expr> (expr),
*************** ASTLoweringBase::lower_range_pattern_bou
*** 887,893 ****
    std::unique_ptr<HIR::RangePatternBound> hir_bound = nullptr;
    switch (bound.get_bound_type ())
      {
!       case AST::RangePatternBound::RangePatternBoundType::LITERAL: {
  	AST::RangePatternBoundLiteral &ref
  	  = static_cast<AST::RangePatternBoundLiteral &> (bound);
  
--- 920,927 ----
    std::unique_ptr<HIR::RangePatternBound> hir_bound = nullptr;
    switch (bound.get_bound_type ())
      {
!     case AST::RangePatternBound::RangePatternBoundType::LITERAL:
!       {
  	AST::RangePatternBoundLiteral &ref
  	  = static_cast<AST::RangePatternBoundLiteral &> (bound);
  
*************** ASTLoweringBase::lower_range_pattern_bou
*** 898,904 ****
  					     ref.get_has_minus ()));
        }
        break;
!       case AST::RangePatternBound::RangePatternBoundType::PATH: {
  	auto &ref = static_cast<AST::RangePatternBoundPath &> (bound);
  
  	HIR::PathInExpression *path
--- 932,939 ----
  					     ref.get_has_minus ()));
        }
        break;
!     case AST::RangePatternBound::RangePatternBoundType::PATH:
!       {
  	auto &ref = static_cast<AST::RangePatternBoundPath &> (bound);
  
  	HIR::PathInExpression *path
*************** ASTLoweringBase::lower_range_pattern_bou
*** 908,914 ****
  	  new HIR::RangePatternBoundPath (*path));
        }
        break;
!       case AST::RangePatternBound::RangePatternBoundType::QUALPATH: {
  	auto &ref = static_cast<AST::RangePatternBoundQualPath &> (bound);
  
  	HIR::QualifiedPathInExpression *qualpath
--- 943,950 ----
  	  new HIR::RangePatternBoundPath (*path));
        }
        break;
!     case AST::RangePatternBound::RangePatternBoundType::QUALPATH:
!       {
  	auto &ref = static_cast<AST::RangePatternBoundQualPath &> (bound);
  
  	HIR::QualifiedPathInExpression *qualpath
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/rust-ast-lower-base.h gcc-16-20250810/gcc/rust/hir/rust-ast-lower-base.h
*** gcc-16-20250803/gcc/rust/hir/rust-ast-lower-base.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/rust-ast-lower-base.h	Sun Aug 10 22:32:08 2025
***************
*** 20,25 ****
--- 20,27 ----
  #define RUST_AST_LOWER_BASE
  
  #include "rust-ast.h"
+ #include "rust-builtin-ast-nodes.h"
+ #include "rust-expr.h"
  #include "rust-system.h"
  #include "rust-ast-full.h"
  #include "rust-ast-visitor.h"
*************** public:
*** 63,68 ****
--- 65,73 ----
    // Special casing nodes that should never reach the HIR lowering stage
    virtual void visit (AST::MacroInvocation &) override final;
    virtual void visit (AST::ErrorPropagationExpr &) override final;
+   virtual void visit (AST::ForLoopExpr &) override final;
+   virtual void visit (AST::TryExpr &) override final;
+   virtual void visit (AST::WhileLetLoopExpr &) override final;
  
    // visitor impl
    // rust-ast.h
*************** public:
*** 101,107 ****
    virtual void visit (AST::AttrInputLiteral &attr_input) override;
    virtual void visit (AST::AttrInputMacro &attr_input) override;
    virtual void visit (AST::MetaItemLitExpr &meta_item) override;
!   virtual void visit (AST::MetaItemPathLit &meta_item) override;
    virtual void visit (AST::BorrowExpr &expr) override;
    virtual void visit (AST::DereferenceExpr &expr) override;
    virtual void visit (AST::NegationExpr &expr) override;
--- 106,112 ----
    virtual void visit (AST::AttrInputLiteral &attr_input) override;
    virtual void visit (AST::AttrInputMacro &attr_input) override;
    virtual void visit (AST::MetaItemLitExpr &meta_item) override;
!   virtual void visit (AST::MetaItemPathExpr &meta_item) override;
    virtual void visit (AST::BorrowExpr &expr) override;
    virtual void visit (AST::DereferenceExpr &expr) override;
    virtual void visit (AST::NegationExpr &expr) override;
*************** public:
*** 131,136 ****
--- 136,143 ----
    virtual void visit (AST::FieldAccessExpr &expr) override;
    virtual void visit (AST::ClosureExprInner &expr) override;
    virtual void visit (AST::BlockExpr &expr) override;
+   virtual void visit (AST::AnonConst &expr) override;
+   virtual void visit (AST::ConstBlock &expr) override;
    virtual void visit (AST::ClosureExprInnerTyped &expr) override;
    virtual void visit (AST::ContinueExpr &expr) override;
    virtual void visit (AST::BreakExpr &expr) override;
*************** public:
*** 145,152 ****
    virtual void visit (AST::UnsafeBlockExpr &expr) override;
    virtual void visit (AST::LoopExpr &expr) override;
    virtual void visit (AST::WhileLoopExpr &expr) override;
-   virtual void visit (AST::WhileLetLoopExpr &expr) override;
-   virtual void visit (AST::ForLoopExpr &expr) override;
    virtual void visit (AST::IfExpr &expr) override;
    virtual void visit (AST::IfExprConseqElse &expr) override;
    virtual void visit (AST::IfLetExpr &expr) override;
--- 152,157 ----
*************** public:
*** 231,236 ****
--- 236,243 ----
    virtual void visit (AST::TuplePatternItemsRanged &tuple_items) override;
    virtual void visit (AST::TuplePattern &pattern) override;
    virtual void visit (AST::GroupedPattern &pattern) override;
+   virtual void visit (AST::SlicePatternItemsNoRest &items) override;
+   virtual void visit (AST::SlicePatternItemsHasRest &items) override;
    virtual void visit (AST::SlicePattern &pattern) override;
    virtual void visit (AST::AltPattern &pattern) override;
  
*************** public:
*** 259,264 ****
--- 266,272 ----
    virtual void visit (AST::SelfParam &param) override;
  
    virtual void visit (AST::FormatArgs &fmt) override;
+   virtual void visit (AST::OffsetOf &offset_of) override;
  
  protected:
    ASTLoweringBase ()
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/rust-ast-lower-block.h gcc-16-20250810/gcc/rust/hir/rust-ast-lower-block.h
*** gcc-16-20250803/gcc/rust/hir/rust-ast-lower-block.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/rust-ast-lower-block.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 213,220 ****
  
    void visit (AST::WhileLoopExpr &expr) override;
  
-   void visit (AST::ForLoopExpr &expr) override;
- 
    void visit (AST::MatchExpr &expr) override;
  
  private:
--- 213,218 ----
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/rust-ast-lower-expr.cc gcc-16-20250810/gcc/rust/hir/rust-ast-lower-expr.cc
*** gcc-16-20250803/gcc/rust/hir/rust-ast-lower-expr.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/rust-ast-lower-expr.cc	Sun Aug 10 22:32:08 2025
***************
*** 24,30 ****
--- 24,32 ----
  #include "rust-ast-lower-pattern.h"
  #include "rust-ast-lower-type.h"
  #include "rust-ast.h"
+ #include "rust-builtin-ast-nodes.h"
  #include "rust-diagnostics.h"
+ #include "rust-hir-map.h"
  #include "rust-system.h"
  #include "tree/rust-hir-expr.h"
  
*************** ASTLoweringExpr::visit (AST::BlockExpr &
*** 127,132 ****
--- 129,178 ----
  }
  
  void
+ ASTLoweringExpr::visit (AST::AnonConst &expr)
+ {
+   auto &mappings = Analysis::Mappings::get ();
+   auto crate_num = mappings.get_current_crate ();
+   auto mapping = Analysis::NodeMapping (crate_num, expr.get_node_id (),
+ 					mappings.get_next_hir_id (crate_num),
+ 					UNKNOWN_LOCAL_DEFID);
+ 
+   if (expr.is_deferred ())
+     {
+       translated = new HIR::AnonConst (std::move (mapping), expr.get_locus ());
+     }
+   else
+     {
+       auto inner_expr = ASTLoweringExpr::translate (expr.get_inner_expr ());
+ 
+       translated = new HIR::AnonConst (std::move (mapping),
+ 				       std::unique_ptr<Expr> (inner_expr),
+ 				       expr.get_locus ());
+     }
+ }
+ 
+ void
+ ASTLoweringExpr::visit (AST::ConstBlock &expr)
+ {
+   auto inner_expr = ASTLoweringExpr::translate (expr.get_const_expr ());
+ 
+   // we know this will always be an `AnonConst`, or we have an issue. Let's
+   // assert just to be sure.
+   rust_assert (inner_expr->get_expression_type () == Expr::ExprType::AnonConst);
+   auto anon_const = static_cast<AnonConst *> (inner_expr);
+ 
+   auto &mappings = Analysis::Mappings::get ();
+   auto crate_num = mappings.get_current_crate ();
+   auto mapping = Analysis::NodeMapping (crate_num, expr.get_node_id (),
+ 					mappings.get_next_hir_id (crate_num),
+ 					UNKNOWN_LOCAL_DEFID);
+ 
+   translated
+     = new HIR::ConstBlock (std::move (mapping), std::move (*anon_const),
+ 			   expr.get_locus (), expr.get_outer_attrs ());
+ }
+ 
+ void
  ASTLoweringExpr::visit (AST::UnsafeBlockExpr &expr)
  {
    translated = ASTLoweringBlock::translate (expr, &terminated);
*************** ASTLoweringExpr::visit (AST::WhileLoopEx
*** 589,600 ****
  }
  
  void
- ASTLoweringExpr::visit (AST::ForLoopExpr &expr)
- {
-   rust_unreachable ();
- }
- 
- void
  ASTLoweringExpr::visit (AST::BreakExpr &expr)
  {
    tl::optional<HIR::Lifetime> break_label = tl::nullopt;
--- 635,640 ----
*************** ASTLoweringExpr::visit (AST::ClosureExpr
*** 798,804 ****
  {
    HIR::Type *closure_return_type = nullptr;
    HIR::Expr *closure_expr
!     = ASTLoweringExpr::translate (expr.get_definition_block ());
  
    std::vector<HIR::ClosureParam> closure_params;
    for (auto &param : expr.get_params ())
--- 838,844 ----
  {
    HIR::Type *closure_return_type = nullptr;
    HIR::Expr *closure_expr
!     = ASTLoweringExpr::translate (expr.get_definition_expr ());
  
    std::vector<HIR::ClosureParam> closure_params;
    for (auto &param : expr.get_params ())
*************** translate_operand_out (const AST::Inline
*** 841,846 ****
--- 881,887 ----
  					     *out_value.expr.get ())));
    return out;
  }
+ 
  HIR::InlineAsmOperand
  translate_operand_inout (const AST::InlineAsmOperand &operand)
  {
*************** translate_operand_inout (const AST::Inli
*** 851,856 ****
--- 892,898 ----
  						 *inout_value.expr.get ())));
    return inout;
  }
+ 
  HIR::InlineAsmOperand
  translate_operand_split_in_out (const AST::InlineAsmOperand &operand)
  {
*************** translate_operand_split_in_out (const AS
*** 863,881 ****
        ASTLoweringExpr::translate (*split_in_out_value.out_expr.get ())));
    return split_in_out;
  }
  HIR::InlineAsmOperand
  translate_operand_const (const AST::InlineAsmOperand &operand)
  {
    auto const_value = operand.get_const ();
!   struct HIR::AnonConst anon_const (const_value.anon_const.id,
! 				    std::unique_ptr<Expr> (
! 				      ASTLoweringExpr::translate (
! 					*const_value.anon_const.expr.get ())));
!   struct HIR::InlineAsmOperand::Const cnst
!   {
!     anon_const
!   };
!   return cnst;
  }
  
  HIR::InlineAsmOperand
--- 905,925 ----
        ASTLoweringExpr::translate (*split_in_out_value.out_expr.get ())));
    return split_in_out;
  }
+ 
  HIR::InlineAsmOperand
  translate_operand_const (const AST::InlineAsmOperand &operand)
  {
    auto const_value = operand.get_const ();
! 
!   auto inner_expr = ASTLoweringExpr::translate (const_value.anon_const);
! 
!   // Like `ConstBlock`, we know this should only be an `AnonConst` - let's
!   // assert to make sure and static cast
!   rust_assert (inner_expr->get_expression_type () == Expr::ExprType::AnonConst);
! 
!   auto anon_const = static_cast<AnonConst *> (inner_expr);
! 
!   return HIR::InlineAsmOperand::Const{*anon_const};
  }
  
  HIR::InlineAsmOperand
*************** ASTLoweringExpr::visit (AST::FormatArgs
*** 1006,1010 ****
--- 1050,1069 ----
  		 "FormatArgs lowering is not implemented yet");
  }
  
+ void
+ ASTLoweringExpr::visit (AST::OffsetOf &offset_of)
+ {
+   auto type = std::unique_ptr<Type> (
+     ASTLoweringType::translate (offset_of.get_type ()));
+ 
+   auto crate_num = mappings.get_current_crate ();
+   Analysis::NodeMapping mapping (crate_num, offset_of.get_node_id (),
+ 				 mappings.get_next_hir_id (crate_num),
+ 				 mappings.get_next_localdef_id (crate_num));
+ 
+   translated = new HIR::OffsetOf (std::move (type), offset_of.get_field (),
+ 				  mapping, offset_of.get_locus ());
+ }
+ 
  } // namespace HIR
  } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/rust-ast-lower-expr.h gcc-16-20250810/gcc/rust/hir/rust-ast-lower-expr.h
*** gcc-16-20250803/gcc/rust/hir/rust-ast-lower-expr.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/rust-ast-lower-expr.h	Sun Aug 10 22:32:08 2025
***************
*** 21,26 ****
--- 21,27 ----
  
  #include "rust-ast-lower-base.h"
  #include "rust-ast.h"
+ #include "rust-expr.h"
  
  namespace Rust {
  namespace HIR {
*************** public:
*** 82,87 ****
--- 83,90 ----
    void visit (AST::IfLetExpr &expr) override;
    void visit (AST::IfLetExprConseqElse &expr) override;
    void visit (AST::BlockExpr &expr) override;
+   void visit (AST::AnonConst &expr) override;
+   void visit (AST::ConstBlock &expr) override;
    void visit (AST::UnsafeBlockExpr &expr) override;
    void visit (AST::PathInExpression &expr) override;
    void visit (AST::QualifiedPathInExpression &expr) override;
*************** public:
*** 108,114 ****
    void visit (AST::FieldAccessExpr &expr) override;
    void visit (AST::LoopExpr &expr) override;
    void visit (AST::WhileLoopExpr &expr) override;
-   void visit (AST::ForLoopExpr &expr) override;
    void visit (AST::BreakExpr &expr) override;
    void visit (AST::ContinueExpr &expr) override;
    void visit (AST::BorrowExpr &expr) override;
--- 111,116 ----
*************** public:
*** 124,131 ****
    void visit (AST::InlineAsm &expr) override;
    void visit (AST::LlvmInlineAsm &expr) override;
  
!   // Extra visitor for FormatArgs nodes
    void visit (AST::FormatArgs &fmt) override;
  
  private:
    ASTLoweringExpr ();
--- 126,134 ----
    void visit (AST::InlineAsm &expr) override;
    void visit (AST::LlvmInlineAsm &expr) override;
  
!   // Extra visitor for builtin macro nodes
    void visit (AST::FormatArgs &fmt) override;
+   void visit (AST::OffsetOf &offset_of) override;
  
  private:
    ASTLoweringExpr ();
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/rust-ast-lower-extern.h gcc-16-20250810/gcc/rust/hir/rust-ast-lower-extern.h
*** gcc-16-20250803/gcc/rust/hir/rust-ast-lower-extern.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/rust-ast-lower-extern.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 99,105 ****
  	  = static_cast<AST::IdentifierPattern &> (param.get_pattern ());
  	Identifier param_name = param_kind == AST::Pattern::Kind::Identifier
  				  ? param_ident.get_ident ()
! 				  : std::string ("_");
  
  	HIR::Type *param_type = ASTLoweringType::translate (param.get_type ());
  
--- 99,105 ----
  	  = static_cast<AST::IdentifierPattern &> (param.get_pattern ());
  	Identifier param_name = param_kind == AST::Pattern::Kind::Identifier
  				  ? param_ident.get_ident ()
! 				  : Identifier ("_", param.get_locus ());
  
  	HIR::Type *param_type = ASTLoweringType::translate (param.get_type ());
  
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/rust-ast-lower-implitem.cc gcc-16-20250810/gcc/rust/hir/rust-ast-lower-implitem.cc
*** gcc-16-20250803/gcc/rust/hir/rust-ast-lower-implitem.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/rust-ast-lower-implitem.cc	Sun Aug 10 22:32:08 2025
*************** ASTLowerImplItem::visit (AST::Function &
*** 138,144 ****
  
    std::unique_ptr<HIR::Type> return_type
      = function.has_return_type () ? std::unique_ptr<HIR::Type> (
! 	ASTLoweringType::translate (function.get_return_type ()))
  				  : nullptr;
  
    Defaultness defaultness
--- 138,145 ----
  
    std::unique_ptr<HIR::Type> return_type
      = function.has_return_type () ? std::unique_ptr<HIR::Type> (
! 	ASTLoweringType::translate (function.get_return_type (), false,
! 				    true /* impl trait is allowed here*/))
  				  : nullptr;
  
    Defaultness defaultness
*************** ASTLowerTraitItem::visit (AST::Function
*** 274,280 ****
        auto hir_param
  	= HIR::FunctionParam (mapping, std::move (translated_pattern),
  			      std::move (translated_type), param.get_locus ());
!       function_params.push_back (hir_param);
      }
  
    HIR::TraitFunctionDecl decl (func.get_function_name (),
--- 275,290 ----
        auto hir_param
  	= HIR::FunctionParam (mapping, std::move (translated_pattern),
  			      std::move (translated_type), param.get_locus ());
!       function_params.push_back (std::move (hir_param));
!     }
! 
!   if (func.has_self_param ())
!     {
!       // insert mappings for self
!       // TODO: Is this correct ? Looks fishy
!       mappings.insert_hir_self_param (&*self_param);
!       mappings.insert_location (self_param->get_mappings ().get_hirid (),
! 				self_param->get_locus ());
      }
  
    HIR::TraitFunctionDecl decl (func.get_function_name (),
*************** ASTLowerTraitItem::visit (AST::Function
*** 300,313 ****
      = new HIR::TraitItemFunc (mapping, std::move (decl), std::move (block_expr),
  			      func.get_outer_attrs (), func.get_locus ());
    translated = trait_item;
-   if (func.has_self_param ())
-     {
-       // insert mappings for self
-       // TODO: Is this correct ? Looks fishy
-       mappings.insert_hir_self_param (&*self_param);
-       mappings.insert_location (self_param->get_mappings ().get_hirid (),
- 				self_param->get_locus ());
-     }
  
    // add the mappings for the function params at the end
    for (auto &param : trait_item->get_decl ().get_function_params ())
--- 310,315 ----
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/rust-ast-lower-item.cc gcc-16-20250810/gcc/rust/hir/rust-ast-lower-item.cc
*** gcc-16-20250803/gcc/rust/hir/rust-ast-lower-item.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/rust-ast-lower-item.cc	Sun Aug 10 22:32:08 2025
*************** ASTLoweringItem::visit (AST::StructStruc
*** 217,223 ****
  					 field.get_outer_attrs ());
  
        if (struct_field_name_exists (fields, translated_field))
! 	break;
  
        fields.push_back (std::move (translated_field));
      }
--- 217,223 ----
  					 field.get_outer_attrs ());
  
        if (struct_field_name_exists (fields, translated_field))
! 	continue;
  
        fields.push_back (std::move (translated_field));
      }
*************** ASTLoweringItem::visit (AST::ConstantIte
*** 367,373 ****
    HIR::Visibility vis = translate_visibility (constant.get_visibility ());
  
    HIR::Type *type = ASTLoweringType::translate (constant.get_type (), true);
!   HIR::Expr *expr = ASTLoweringExpr::translate (constant.get_expr ());
  
    auto crate_num = mappings.get_current_crate ();
    Analysis::NodeMapping mapping (crate_num, constant.get_node_id (),
--- 367,375 ----
    HIR::Visibility vis = translate_visibility (constant.get_visibility ());
  
    HIR::Type *type = ASTLoweringType::translate (constant.get_type (), true);
!   HIR::Expr *expr = nullptr;
!   if (constant.has_expr ())
!     expr = ASTLoweringExpr::translate (constant.get_expr ());
  
    auto crate_num = mappings.get_current_crate ();
    Analysis::NodeMapping mapping (crate_num, constant.get_node_id (),
*************** ASTLoweringItem::visit (AST::Function &f
*** 411,417 ****
  
    std::unique_ptr<HIR::Type> return_type
      = function.has_return_type () ? std::unique_ptr<HIR::Type> (
! 	ASTLoweringType::translate (function.get_return_type ()))
  				  : nullptr;
  
    std::vector<HIR::FunctionParam> function_params;
--- 413,420 ----
  
    std::unique_ptr<HIR::Type> return_type
      = function.has_return_type () ? std::unique_ptr<HIR::Type> (
! 	ASTLoweringType::translate (function.get_return_type (), false,
! 				    true /* impl trait is allowed here*/))
  				  : nullptr;
  
    std::vector<HIR::FunctionParam> function_params;
*************** ASTLoweringItem::visit (AST::InherentImp
*** 494,500 ****
  	{
  	  switch (generic_param->get_kind ())
  	    {
! 	      case HIR::GenericParam::GenericKind::TYPE: {
  		const HIR::TypeParam &t
  		  = static_cast<const HIR::TypeParam &> (*generic_param);
  
--- 497,504 ----
  	{
  	  switch (generic_param->get_kind ())
  	    {
! 	    case HIR::GenericParam::GenericKind::TYPE:
! 	      {
  		const HIR::TypeParam &t
  		  = static_cast<const HIR::TypeParam &> (*generic_param);
  
*************** ASTLoweringItem::visit (AST::TraitImpl &
*** 651,657 ****
  	{
  	  switch (generic_param->get_kind ())
  	    {
! 	      case HIR::GenericParam::GenericKind::TYPE: {
  		const HIR::TypeParam &t
  		  = static_cast<const HIR::TypeParam &> (*generic_param);
  
--- 655,662 ----
  	{
  	  switch (generic_param->get_kind ())
  	    {
! 	    case HIR::GenericParam::GenericKind::TYPE:
! 	      {
  		const HIR::TypeParam &t
  		  = static_cast<const HIR::TypeParam &> (*generic_param);
  
*************** ASTLoweringItem::visit (AST::MacroRulesD
*** 729,734 ****
--- 734,758 ----
    lower_macro_definition (def);
  }
  
+ void
+ ASTLoweringItem::visit (AST::ExternCrate &extern_crate)
+ {
+   if (extern_crate.references_self ())
+     return;
+ 
+   auto &mappings = Analysis::Mappings::get ();
+   CrateNum num
+     = mappings.lookup_crate_name (extern_crate.get_referenced_crate ())
+ 	.value ();
+   AST::Crate &crate = mappings.get_ast_crate (num);
+ 
+   auto saved_crate_num = mappings.get_current_crate ();
+   mappings.set_current_crate (num);
+   auto lowered = ASTLowering::Resolve (crate);
+   mappings.insert_hir_crate (std::move (lowered));
+   mappings.set_current_crate (saved_crate_num);
+ }
+ 
  HIR::SimplePath
  ASTLoweringSimplePath::translate (const AST::SimplePath &path)
  {
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/rust-ast-lower-item.h gcc-16-20250810/gcc/rust/hir/rust-ast-lower-item.h
*** gcc-16-20250803/gcc/rust/hir/rust-ast-lower-item.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/rust-ast-lower-item.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 45,50 ****
--- 45,51 ----
    void visit (AST::TraitImpl &impl_block) override;
    void visit (AST::ExternBlock &extern_block) override;
    void visit (AST::MacroRulesDefinition &rules_def) override;
+   void visit (AST::ExternCrate &extern_crate) override;
  
  private:
    ASTLoweringItem () : translated (nullptr) {}
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/rust-ast-lower-pattern.cc gcc-16-20250810/gcc/rust/hir/rust-ast-lower-pattern.cc
*** gcc-16-20250803/gcc/rust/hir/rust-ast-lower-pattern.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/rust-ast-lower-pattern.cc	Sun Aug 10 22:32:08 2025
***************
*** 23,29 ****
  namespace Rust {
  namespace HIR {
  
! ASTLoweringPattern::ASTLoweringPattern () : translated (nullptr) {}
  
  HIR::Pattern *
  ASTLoweringPattern::translate (AST::Pattern &pattern, bool is_let_top_level)
--- 23,31 ----
  namespace Rust {
  namespace HIR {
  
! ASTLoweringPattern::ASTLoweringPattern ()
!   : translated (nullptr), is_let_top_level (false)
! {}
  
  HIR::Pattern *
  ASTLoweringPattern::translate (AST::Pattern &pattern, bool is_let_top_level)
*************** ASTLoweringPattern::visit (AST::Identifi
*** 49,61 ****
  				 mappings.get_next_hir_id (crate_num),
  				 UNKNOWN_LOCAL_DEFID);
  
!   std::unique_ptr<Pattern> to_bind;
    translated
      = new HIR::IdentifierPattern (mapping, pattern.get_ident (),
  				  pattern.get_locus (), pattern.get_is_ref (),
  				  pattern.get_is_mut () ? Mutability::Mut
  							: Mutability::Imm,
! 				  std::move (to_bind));
  }
  
  void
--- 51,68 ----
  				 mappings.get_next_hir_id (crate_num),
  				 UNKNOWN_LOCAL_DEFID);
  
!   std::unique_ptr<Pattern> subpattern;
!   if (pattern.has_subpattern ())
!     {
!       subpattern = std::unique_ptr<Pattern> (
! 	ASTLoweringPattern::translate (pattern.get_subpattern ()));
!     }
    translated
      = new HIR::IdentifierPattern (mapping, pattern.get_ident (),
  				  pattern.get_locus (), pattern.get_is_ref (),
  				  pattern.get_is_mut () ? Mutability::Mut
  							: Mutability::Imm,
! 				  std::move (subpattern));
  }
  
  void
*************** ASTLoweringPattern::visit (AST::TupleStr
*** 74,86 ****
    auto &items = pattern.get_items ();
    switch (items.get_item_type ())
      {
!       case AST::TupleStructItems::RANGE: {
  	// TODO
  	rust_unreachable ();
        }
        break;
  
!       case AST::TupleStructItems::NO_RANGE: {
  	AST::TupleStructItemsNoRange &items_no_range
  	  = static_cast<AST::TupleStructItemsNoRange &> (items);
  
--- 81,95 ----
    auto &items = pattern.get_items ();
    switch (items.get_item_type ())
      {
!     case AST::TupleStructItems::RANGE:
!       {
  	// TODO
  	rust_unreachable ();
        }
        break;
  
!     case AST::TupleStructItems::NO_RANGE:
!       {
  	AST::TupleStructItemsNoRange &items_no_range
  	  = static_cast<AST::TupleStructItemsNoRange &> (items);
  
*************** ASTLoweringPattern::visit (AST::StructPa
*** 120,126 ****
        HIR::StructPatternField *f = nullptr;
        switch (field->get_item_type ())
  	{
! 	  case AST::StructPatternField::ItemType::TUPLE_PAT: {
  	    auto &tuple
  	      = static_cast<AST::StructPatternFieldTuplePat &> (*field);
  
--- 129,136 ----
        HIR::StructPatternField *f = nullptr;
        switch (field->get_item_type ())
  	{
! 	case AST::StructPatternField::ItemType::TUPLE_PAT:
! 	  {
  	    auto &tuple
  	      = static_cast<AST::StructPatternFieldTuplePat &> (*field);
  
*************** ASTLoweringPattern::visit (AST::StructPa
*** 140,146 ****
  	  }
  	  break;
  
! 	  case AST::StructPatternField::ItemType::IDENT_PAT: {
  	    AST::StructPatternFieldIdentPat &ident
  	      = static_cast<AST::StructPatternFieldIdentPat &> (*field);
  
--- 150,157 ----
  	  }
  	  break;
  
! 	case AST::StructPatternField::ItemType::IDENT_PAT:
! 	  {
  	    AST::StructPatternFieldIdentPat &ident
  	      = static_cast<AST::StructPatternFieldIdentPat &> (*field);
  
*************** ASTLoweringPattern::visit (AST::StructPa
*** 160,166 ****
  	  }
  	  break;
  
! 	  case AST::StructPatternField::ItemType::IDENT: {
  	    AST::StructPatternFieldIdent &ident
  	      = static_cast<AST::StructPatternFieldIdent &> (*field.get ());
  
--- 171,178 ----
  	  }
  	  break;
  
! 	case AST::StructPatternField::ItemType::IDENT:
! 	  {
  	    AST::StructPatternFieldIdent &ident
  	      = static_cast<AST::StructPatternFieldIdent &> (*field.get ());
  
*************** ASTLoweringPattern::visit (AST::TuplePat
*** 213,219 ****
    std::unique_ptr<HIR::TuplePatternItems> items;
    switch (pattern.get_items ().get_pattern_type ())
      {
!       case AST::TuplePatternItems::TuplePatternItemType::MULTIPLE: {
  	AST::TuplePatternItemsMultiple &ref
  	  = static_cast<AST::TuplePatternItemsMultiple &> (
  	    pattern.get_items ());
--- 225,232 ----
    std::unique_ptr<HIR::TuplePatternItems> items;
    switch (pattern.get_items ().get_pattern_type ())
      {
!     case AST::TuplePatternItems::TuplePatternItemType::MULTIPLE:
!       {
  	AST::TuplePatternItemsMultiple &ref
  	  = static_cast<AST::TuplePatternItemsMultiple &> (
  	    pattern.get_items ());
*************** ASTLoweringPattern::visit (AST::TuplePat
*** 221,227 ****
        }
        break;
  
!       case AST::TuplePatternItems::TuplePatternItemType::RANGED: {
  	AST::TuplePatternItemsRanged &ref
  	  = static_cast<AST::TuplePatternItemsRanged &> (pattern.get_items ());
  	items = lower_tuple_pattern_ranged (ref);
--- 234,241 ----
        }
        break;
  
!     case AST::TuplePatternItems::TuplePatternItemType::RANGED:
!       {
  	AST::TuplePatternItemsRanged &ref
  	  = static_cast<AST::TuplePatternItemsRanged &> (pattern.get_items ());
  	items = lower_tuple_pattern_ranged (ref);
*************** void
*** 309,318 ****
  ASTLoweringPattern::visit (AST::SlicePattern &pattern)
  {
    std::vector<std::unique_ptr<HIR::Pattern>> items;
!   for (auto &p : pattern.get_items ())
      {
!       HIR::Pattern *item = ASTLoweringPattern::translate (*p);
!       items.push_back (std::unique_ptr<HIR::Pattern> (item));
      }
  
    auto crate_num = mappings.get_current_crate ();
--- 323,349 ----
  ASTLoweringPattern::visit (AST::SlicePattern &pattern)
  {
    std::vector<std::unique_ptr<HIR::Pattern>> items;
! 
!   switch (pattern.get_items ().get_pattern_type ())
      {
!     case AST::SlicePatternItems::SlicePatternItemType::NO_REST:
!       {
! 	AST::SlicePatternItemsNoRest &ref
! 	  = static_cast<AST::SlicePatternItemsNoRest &> (pattern.get_items ());
! 	for (auto &p : ref.get_patterns ())
! 	  {
! 	    HIR::Pattern *item = ASTLoweringPattern::translate (*p);
! 	    items.push_back (std::unique_ptr<HIR::Pattern> (item));
! 	  }
!       }
!       break;
!     case AST::SlicePatternItems::SlicePatternItemType::HAS_REST:
!       {
! 	rust_error_at (pattern.get_locus (),
! 		       "lowering of slice patterns with rest elements are not "
! 		       "supported yet");
!       }
!       break;
      }
  
    auto crate_num = mappings.get_current_crate ();
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/rust-ast-lower-type.cc gcc-16-20250810/gcc/rust/hir/rust-ast-lower-type.cc
*** gcc-16-20250803/gcc/rust/hir/rust-ast-lower-type.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/rust-ast-lower-type.cc	Sun Aug 10 22:32:08 2025
*************** ASTLowerQualifiedPathInType::visit (AST:
*** 209,218 ****
  					     path.get_locus ());
  }
  
  HIR::Type *
! ASTLoweringType::translate (AST::Type &type, bool default_to_static_lifetime)
  {
!   ASTLoweringType resolver (default_to_static_lifetime);
    type.accept_vis (resolver);
  
    rust_assert (resolver.translated != nullptr);
--- 209,225 ----
  					     path.get_locus ());
  }
  
+ ASTLoweringType::ASTLoweringType (bool default_to_static_lifetime,
+ 				  bool impl_trait_allowed)
+   : ASTLoweringBase (), default_to_static_lifetime (default_to_static_lifetime),
+     impl_trait_allowed (impl_trait_allowed), translated (nullptr)
+ {}
+ 
  HIR::Type *
! ASTLoweringType::translate (AST::Type &type, bool default_to_static_lifetime,
! 			    bool impl_trait_allowed)
  {
!   ASTLoweringType resolver (default_to_static_lifetime, impl_trait_allowed);
    type.accept_vis (resolver);
  
    rust_assert (resolver.translated != nullptr);
*************** ASTLoweringType::visit (AST::BareFunctio
*** 260,266 ****
  
        HIR::Type *param_type
  	= ASTLoweringType::translate (param.get_type (),
! 				      default_to_static_lifetime);
  
        HIR::MaybeNamedParam p (param.get_name (), kind,
  			      std::unique_ptr<HIR::Type> (param_type),
--- 267,274 ----
  
        HIR::Type *param_type
  	= ASTLoweringType::translate (param.get_type (),
! 				      default_to_static_lifetime,
! 				      impl_trait_allowed);
  
        HIR::MaybeNamedParam p (param.get_name (), kind,
  			      std::unique_ptr<HIR::Type> (param_type),
*************** ASTLoweringType::visit (AST::BareFunctio
*** 272,278 ****
    if (fntype.has_return_type ())
      {
        return_type = ASTLoweringType::translate (fntype.get_return_type (),
! 						default_to_static_lifetime);
      }
  
    auto crate_num = mappings.get_current_crate ();
--- 280,287 ----
    if (fntype.has_return_type ())
      {
        return_type = ASTLoweringType::translate (fntype.get_return_type (),
! 						default_to_static_lifetime,
! 						impl_trait_allowed);
      }
  
    auto crate_num = mappings.get_current_crate ();
*************** ASTLoweringType::visit (AST::TupleType &
*** 292,299 ****
    std::vector<std::unique_ptr<HIR::Type>> elems;
    for (auto &e : tuple.get_elems ())
      {
!       HIR::Type *t
! 	= ASTLoweringType::translate (*e, default_to_static_lifetime);
        elems.push_back (std::unique_ptr<HIR::Type> (t));
      }
  
--- 301,308 ----
    std::vector<std::unique_ptr<HIR::Type>> elems;
    for (auto &e : tuple.get_elems ())
      {
!       HIR::Type *t = ASTLoweringType::translate (*e, default_to_static_lifetime,
! 						 impl_trait_allowed);
        elems.push_back (std::unique_ptr<HIR::Type> (t));
      }
  
*************** ASTLoweringType::visit (AST::ArrayType &
*** 323,329 ****
  {
    HIR::Type *translated_type
      = ASTLoweringType::translate (type.get_elem_type (),
! 				  default_to_static_lifetime);
    HIR::Expr *array_size = ASTLoweringExpr::translate (type.get_size_expr ());
  
    auto crate_num = mappings.get_current_crate ();
--- 332,339 ----
  {
    HIR::Type *translated_type
      = ASTLoweringType::translate (type.get_elem_type (),
! 				  default_to_static_lifetime,
! 				  impl_trait_allowed);
    HIR::Expr *array_size = ASTLoweringExpr::translate (type.get_size_expr ());
  
    auto crate_num = mappings.get_current_crate ();
*************** ASTLoweringType::visit (AST::ReferenceTy
*** 343,351 ****
    HIR::Lifetime lifetime
      = lower_lifetime (type.get_lifetime (), default_to_static_lifetime);
  
!   HIR::Type *base_type
!     = ASTLoweringType::translate (type.get_base_type (),
! 				  default_to_static_lifetime);
  
    auto crate_num = mappings.get_current_crate ();
    Analysis::NodeMapping mapping (crate_num, type.get_node_id (),
--- 353,361 ----
    HIR::Lifetime lifetime
      = lower_lifetime (type.get_lifetime (), default_to_static_lifetime);
  
!   HIR::Type *base_type = ASTLoweringType::translate (type.get_base_type (),
! 						     default_to_static_lifetime,
! 						     impl_trait_allowed);
  
    auto crate_num = mappings.get_current_crate ();
    Analysis::NodeMapping mapping (crate_num, type.get_node_id (),
*************** ASTLoweringType::visit (AST::RawPointerT
*** 364,370 ****
  {
    HIR::Type *base_type
      = ASTLoweringType::translate (type.get_type_pointed_to (),
! 				  default_to_static_lifetime);
  
    auto crate_num = mappings.get_current_crate ();
    Analysis::NodeMapping mapping (crate_num, type.get_node_id (),
--- 374,381 ----
  {
    HIR::Type *base_type
      = ASTLoweringType::translate (type.get_type_pointed_to (),
! 				  default_to_static_lifetime,
! 				  impl_trait_allowed);
  
    auto crate_num = mappings.get_current_crate ();
    Analysis::NodeMapping mapping (crate_num, type.get_node_id (),
*************** ASTLoweringType::visit (AST::RawPointerT
*** 384,392 ****
  void
  ASTLoweringType::visit (AST::SliceType &type)
  {
!   HIR::Type *base_type
!     = ASTLoweringType::translate (type.get_elem_type (),
! 				  default_to_static_lifetime);
  
    auto crate_num = mappings.get_current_crate ();
    Analysis::NodeMapping mapping (crate_num, type.get_node_id (),
--- 395,403 ----
  void
  ASTLoweringType::visit (AST::SliceType &type)
  {
!   HIR::Type *base_type = ASTLoweringType::translate (type.get_elem_type (),
! 						     default_to_static_lifetime,
! 						     impl_trait_allowed);
  
    auto crate_num = mappings.get_current_crate ();
    Analysis::NodeMapping mapping (crate_num, type.get_node_id (),
*************** void
*** 463,469 ****
  ASTLoweringType::visit (AST::ParenthesisedType &type)
  {
    auto *inner = ASTLoweringType::translate (*type.get_type_in_parens (),
! 					    default_to_static_lifetime);
  
    auto crate_num = mappings.get_current_crate ();
    Analysis::NodeMapping mapping (crate_num, type.get_node_id (),
--- 474,481 ----
  ASTLoweringType::visit (AST::ParenthesisedType &type)
  {
    auto *inner = ASTLoweringType::translate (*type.get_type_in_parens (),
! 					    default_to_static_lifetime,
! 					    impl_trait_allowed);
  
    auto crate_num = mappings.get_current_crate ();
    Analysis::NodeMapping mapping (crate_num, type.get_node_id (),
*************** ASTLoweringType::visit (AST::Parenthesis
*** 480,485 ****
--- 492,500 ----
  void
  ASTLoweringType::visit (AST::ImplTraitType &type)
  {
+   if (!impl_trait_allowed)
+     emit_impl_trait_error (type.get_locus ());
+ 
    std::vector<std::unique_ptr<HIR::TypeParamBound>> bounds;
    for (auto &bound : type.get_type_param_bounds ())
      {
*************** ASTLoweringType::visit (AST::ImplTraitTy
*** 499,507 ****
  void
  ASTLoweringType::visit (AST::ImplTraitTypeOneBound &type)
  {
    std::vector<std::unique_ptr<HIR::TypeParamBound>> bounds;
  
!   auto b = ASTLoweringTypeBounds::translate (type.get_trait_bound ());
    bounds.push_back (std::unique_ptr<HIR::TypeParamBound> (b));
  
    auto crate_num = mappings.get_current_crate ();
--- 514,525 ----
  void
  ASTLoweringType::visit (AST::ImplTraitTypeOneBound &type)
  {
+   if (!impl_trait_allowed)
+     emit_impl_trait_error (type.get_locus ());
+ 
    std::vector<std::unique_ptr<HIR::TypeParamBound>> bounds;
  
!   auto b = ASTLoweringTypeBounds::translate (*type.get_trait_bound ().get ());
    bounds.push_back (std::unique_ptr<HIR::TypeParamBound> (b));
  
    auto crate_num = mappings.get_current_crate ();
*************** ASTLoweringType::visit (AST::ImplTraitTy
*** 513,518 ****
--- 531,545 ----
      = new HIR::ImplTraitType (mapping, std::move (bounds), type.get_locus ());
  }
  
+ void
+ ASTLoweringType::emit_impl_trait_error (location_t locus)
+ {
+   rich_location r (line_table, locus);
+   rust_error_at (r, ErrorCode::E0562,
+ 		 "%<impl Trait%> not allowed outside of function and inherent "
+ 		 "method return types");
+ }
+ 
  HIR::GenericParam *
  ASTLowerGenericParam::translate (AST::GenericParam &param)
  {
*************** ASTLowerGenericParam::visit (AST::TypePa
*** 593,599 ****
    translated
      = new HIR::TypeParam (mapping, param.get_type_representation (),
  			  param.get_locus (), std::move (type_param_bounds),
! 			  std::move (type), param.get_outer_attrs ());
  }
  
  HIR::TypeParamBound *
--- 620,627 ----
    translated
      = new HIR::TypeParam (mapping, param.get_type_representation (),
  			  param.get_locus (), std::move (type_param_bounds),
! 			  std::move (type), param.get_outer_attrs (),
! 			  param.from_impl_trait ());
  }
  
  HIR::TypeParamBound *
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/rust-ast-lower-type.h gcc-16-20250810/gcc/rust/hir/rust-ast-lower-type.h
*** gcc-16-20250803/gcc/rust/hir/rust-ast-lower-type.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/rust-ast-lower-type.h	Sun Aug 10 22:32:08 2025
*************** class ASTLoweringType : public ASTLoweri
*** 66,72 ****
  
  public:
    static HIR::Type *translate (AST::Type &type,
! 			       bool default_to_static_lifetime = false);
  
    void visit (AST::BareFunctionType &fntype) override;
    void visit (AST::TupleType &tuple) override;
--- 66,73 ----
  
  public:
    static HIR::Type *translate (AST::Type &type,
! 			       bool default_to_static_lifetime = false,
! 			       bool impl_trait_allowed = false);
  
    void visit (AST::BareFunctionType &fntype) override;
    void visit (AST::TupleType &tuple) override;
*************** public:
*** 81,99 ****
    void visit (AST::TraitObjectTypeOneBound &type) override;
    void visit (AST::TraitObjectType &type) override;
    void visit (AST::ParenthesisedType &type) override;
- 
    void visit (AST::ImplTraitType &type) override;
    void visit (AST::ImplTraitTypeOneBound &type) override;
  
  private:
!   ASTLoweringType (bool default_to_static_lifetime)
!     : ASTLoweringBase (),
!       default_to_static_lifetime (default_to_static_lifetime),
!       translated (nullptr)
!   {}
  
    /** Used when compiling const and static items. */
    bool default_to_static_lifetime;
  
    HIR::Type *translated;
  };
--- 82,98 ----
    void visit (AST::TraitObjectTypeOneBound &type) override;
    void visit (AST::TraitObjectType &type) override;
    void visit (AST::ParenthesisedType &type) override;
    void visit (AST::ImplTraitType &type) override;
    void visit (AST::ImplTraitTypeOneBound &type) override;
  
+   void emit_impl_trait_error (location_t locus);
+ 
  private:
!   ASTLoweringType (bool default_to_static_lifetime, bool impl_trait_allowed);
  
    /** Used when compiling const and static items. */
    bool default_to_static_lifetime;
+   bool impl_trait_allowed;
  
    HIR::Type *translated;
  };
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/rust-ast-lower.cc gcc-16-20250810/gcc/rust/hir/rust-ast-lower.cc
*** gcc-16-20250803/gcc/rust/hir/rust-ast-lower.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/rust-ast-lower.cc	Sun Aug 10 22:32:08 2025
*************** ASTLoweringExprWithBlock::visit (AST::Wh
*** 423,434 ****
  }
  
  void
- ASTLoweringExprWithBlock::visit (AST::ForLoopExpr &expr)
- {
-   rust_unreachable ();
- }
- 
- void
  ASTLoweringExprWithBlock::visit (AST::MatchExpr &expr)
  {
    HIR::Expr *branch_value
--- 423,428 ----
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/rust-ast-lower.h gcc-16-20250810/gcc/rust/hir/rust-ast-lower.h
*** gcc-16-20250803/gcc/rust/hir/rust-ast-lower.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/rust-ast-lower.h	Sun Aug 10 22:32:08 2025
*************** namespace HIR {
*** 28,43 ****
  
  /* Checks whether the name of a field already exists.  Returns true
     and produces an error if so.  */
! bool
! struct_field_name_exists (std::vector<HIR::StructField> &fields,
! 			  HIR::StructField &new_field);
  
  /**
   * Lowers a Visibility from the AST into an HIR Visibility, desugaring it in
   * the process
   */
! Visibility
! translate_visibility (const AST::Visibility &vis);
  
  /**
   * Main base class used for lowering AST to HIR.
--- 28,41 ----
  
  /* Checks whether the name of a field already exists.  Returns true
     and produces an error if so.  */
! bool struct_field_name_exists (std::vector<HIR::StructField> &fields,
! 			       HIR::StructField &new_field);
  
  /**
   * Lowers a Visibility from the AST into an HIR Visibility, desugaring it in
   * the process
   */
! Visibility translate_visibility (const AST::Visibility &vis);
  
  /**
   * Main base class used for lowering AST to HIR.
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/rust-hir-dump.cc gcc-16-20250810/gcc/rust/hir/rust-hir-dump.cc
*** gcc-16-20250803/gcc/rust/hir/rust-hir-dump.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/rust-hir-dump.cc	Sun Aug 10 22:32:08 2025
*************** Dump::go (HIR::Crate &e)
*** 92,98 ****
    end ("Crate");
  }
  
! Dump::Dump (std::ostream &stream) : stream (stream) {}
  
  /**
   * Writes TEXT with a final newline if ENDLINE is true.
--- 92,98 ----
    end ("Crate");
  }
  
! Dump::Dump (std::ostream &stream) : beg_of_line (false), stream (stream) {}
  
  /**
   * Writes TEXT with a final newline if ENDLINE is true.
*************** Dump::visit (BlockExpr &e)
*** 1297,1302 ****
--- 1297,1327 ----
  }
  
  void
+ Dump::visit (AnonConst &e)
+ {
+   begin ("AnonConst");
+   do_expr (e);
+ 
+   if (e.is_deferred ())
+     put_field ("inner", "_");
+   else
+     visit_field ("inner", e.get_inner_expr ());
+ 
+   end ("AnonConst");
+ }
+ 
+ void
+ Dump::visit (ConstBlock &e)
+ {
+   begin ("ConstBlock");
+   do_expr (e);
+ 
+   visit_field ("inner", e.get_const_expr ());
+ 
+   end ("ConstBlock");
+ }
+ 
+ void
  Dump::visit (ContinueExpr &e)
  {
    begin ("ContinueExpr");
*************** Dump::visit (AsyncBlockExpr &e)
*** 1507,1519 ****
  
  void
  Dump::visit (InlineAsm &e)
! {}
  
  void
  Dump::visit (LlvmInlineAsm &e)
  {}
  
  void
  Dump::visit (TypeParam &e)
  {
    begin ("TypeParam");
--- 1532,1622 ----
  
  void
  Dump::visit (InlineAsm &e)
! {
!   begin ("InlineAsm");
!   do_expr (e);
!   for (auto &temp : e.get_template_ ())
!     {
!       put_field ("template", temp.string);
!     }
! 
!   for (auto &temp_str : e.get_template_strs ())
!     {
!       put_field ("template_str", temp_str.symbol);
!     }
! 
!   for (auto &operand : e.get_operands ())
!     {
!       switch (operand.get_register_type ())
! 	{
! 	case HIR::InlineAsmOperand::RegisterType::In:
! 	  {
! 	    const auto &in = operand.get_in ();
! 	    visit_field ("in expr", *in.expr);
! 	    break;
! 	  }
! 	case HIR::InlineAsmOperand::RegisterType::Out:
! 	  {
! 	    const auto &out = operand.get_out ();
! 	    visit_field ("out expr", *out.expr);
! 	    break;
! 	  }
! 	case HIR::InlineAsmOperand::RegisterType::InOut:
! 	  {
! 	    const auto &inout = operand.get_in_out ();
! 	    visit_field ("inout expr", *inout.expr);
! 	    break;
! 	  }
! 	case HIR::InlineAsmOperand::RegisterType::SplitInOut:
! 	  {
! 	    const auto &inout = operand.get_split_in_out ();
! 	    begin ("Split in out");
! 	    visit_field ("in expr", *inout.in_expr);
! 	    visit_field ("out expr", *inout.out_expr);
! 	    end ("Split in out");
! 
! 	    break;
! 	  }
! 	case HIR::InlineAsmOperand::RegisterType::Const:
! 	  {
! 	    auto &cnst = operand.get_const ();
! 	    visit_field ("const expr", cnst.anon_const.get_inner_expr ());
! 	    break;
! 	  }
! 	case HIR::InlineAsmOperand::RegisterType::Sym:
! 	  {
! 	    auto &sym = operand.get_sym ();
! 	    visit_field ("sym expr", *sym.expr);
! 	    break;
! 	  }
! 	case HIR::InlineAsmOperand::RegisterType::Label:
! 	  {
! 	    auto &label = operand.get_label ();
! 	    put_field ("label name", label.label_name);
! 	    do_expr (*label.expr);
! 	    break;
! 	  }
! 	}
!     }
!   end ("InlineAsm");
! }
  
  void
  Dump::visit (LlvmInlineAsm &e)
  {}
  
  void
+ Dump::visit (OffsetOf &e)
+ {
+   begin ("OffsetOf");
+ 
+   put_field ("type", e.get_type ().as_string ());
+   put_field ("field", e.get_field ());
+ 
+   end ("OffsetOf");
+ }
+ 
+ void
  Dump::visit (TypeParam &e)
  {
    begin ("TypeParam");
*************** Dump::visit (UseTreeGlob &e)
*** 1602,1608 ****
      case UseTreeGlob::PathType::GLOBAL:
        glob = "::*";
        break;
!       case UseTreeGlob::PathType::PATH_PREFIXED: {
  	path = e.get_path ().as_string ();
  	glob = "::*";
  	break;
--- 1705,1712 ----
      case UseTreeGlob::PathType::GLOBAL:
        glob = "::*";
        break;
!     case UseTreeGlob::PathType::PATH_PREFIXED:
!       {
  	path = e.get_path ().as_string ();
  	glob = "::*";
  	break;
*************** Dump::visit (UseTreeList &e)
*** 1630,1636 ****
      case UseTreeList::PathType::GLOBAL:
        path_type = "::*";
        break;
!       case UseTreeList::PathType::PATH_PREFIXED: {
  	path = e.get_path ().as_string ();
  	path_type = "::*";
  	break;
--- 1734,1741 ----
      case UseTreeList::PathType::GLOBAL:
        path_type = "::*";
        break;
!     case UseTreeList::PathType::PATH_PREFIXED:
!       {
  	path = e.get_path ().as_string ();
  	path_type = "::*";
  	break;
*************** Dump::visit (ConstantItem &e)
*** 1902,1908 ****
    do_vis_item (e);
    put_field ("identifier", e.get_identifier ().as_string ());
    visit_field ("type", e.get_type ());
!   visit_field ("const_expr", e.get_expr ());
    end ("ConstantItem");
  }
  
--- 2007,2014 ----
    do_vis_item (e);
    put_field ("identifier", e.get_identifier ().as_string ());
    visit_field ("type", e.get_type ());
!   if (e.has_expr ())
!     visit_field ("const_expr", e.get_expr ());
    end ("ConstantItem");
  }
  
*************** Dump::visit (IdentifierPattern &e)
*** 2091,2100 ****
    put_field ("is_ref", std::to_string (e.get_is_ref ()));
    put_field ("mut", std::to_string (e.is_mut ()));
  
!   if (e.has_pattern_to_bind ())
!     put_field ("to_bind", e.get_to_bind ().as_string ());
    else
!     put_field ("to_bind", "none");
  
    end ("IdentifierPattern");
  }
--- 2197,2206 ----
    put_field ("is_ref", std::to_string (e.get_is_ref ()));
    put_field ("mut", std::to_string (e.is_mut ()));
  
!   if (e.has_subpattern ())
!     visit_field ("subpattern", e.get_subpattern ());
    else
!     put_field ("subpattern", "none");
  
    end ("IdentifierPattern");
  }
*************** Dump::visit (StructPatternFieldIdentPat
*** 2172,2178 ****
    auto oa = e.get_outer_attrs ();
    do_outer_attrs (oa);
    put_field ("ident", e.get_identifier ().as_string ());
!   put_field ("ident_pattern", e.get_pattern ().as_string ());
    end ("StructPatternFieldIdentPat");
  }
  
--- 2278,2284 ----
    auto oa = e.get_outer_attrs ();
    do_outer_attrs (oa);
    put_field ("ident", e.get_identifier ().as_string ());
!   visit_field ("ident_pattern", e.get_pattern ());
    end ("StructPatternFieldIdentPat");
  }
  
*************** Dump::visit (LetStmt &e)
*** 2290,2296 ****
    auto oa = e.get_outer_attrs ();
    do_outer_attrs (oa);
  
!   put_field ("variable_pattern", e.get_pattern ().as_string ());
  
    if (e.has_type ())
      visit_field ("type", e.get_type ());
--- 2396,2402 ----
    auto oa = e.get_outer_attrs ();
    do_outer_attrs (oa);
  
!   visit_field ("variable_pattern", e.get_pattern ());
  
    if (e.has_type ())
      visit_field ("type", e.get_type ());
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/rust-hir-dump.h gcc-16-20250810/gcc/rust/hir/rust-hir-dump.h
*** gcc-16-20250803/gcc/rust/hir/rust-hir-dump.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/rust-hir-dump.h	Sun Aug 10 22:32:08 2025
*************** private:
*** 146,151 ****
--- 146,153 ----
    virtual void visit (FieldAccessExpr &) override;
    virtual void visit (ClosureExpr &) override;
    virtual void visit (BlockExpr &) override;
+   virtual void visit (AnonConst &) override;
+   virtual void visit (ConstBlock &) override;
    virtual void visit (ContinueExpr &) override;
    virtual void visit (BreakExpr &) override;
    virtual void visit (RangeFromToExpr &) override;
*************** private:
*** 167,172 ****
--- 169,175 ----
    virtual void visit (AsyncBlockExpr &) override;
    virtual void visit (InlineAsm &) override;
    virtual void visit (LlvmInlineAsm &) override;
+   virtual void visit (OffsetOf &) override;
  
    virtual void visit (TypeParam &) override;
    virtual void visit (ConstGenericParam &) override;
*************** private:
*** 252,258 ****
  } // namespace Rust
  
  // In the global namespace to make it easier to call from debugger
! void
! debug (Rust::HIR::FullVisitable &v);
  
  #endif // !RUST_HIR_DUMP_H
--- 255,260 ----
  } // namespace Rust
  
  // In the global namespace to make it easier to call from debugger
! void debug (Rust::HIR::FullVisitable &v);
  
  #endif // !RUST_HIR_DUMP_H
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/tree/rust-hir-expr-abstract.h gcc-16-20250810/gcc/rust/hir/tree/rust-hir-expr-abstract.h
*** gcc-16-20250803/gcc/rust/hir/tree/rust-hir-expr-abstract.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/tree/rust-hir-expr-abstract.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 43,49 ****
      WITHOUT_BLOCK,
    };
  
!   enum ExprType
    {
      Lit,
      Operator,
--- 43,49 ----
      WITHOUT_BLOCK,
    };
  
!   enum class ExprType
    {
      Lit,
      Operator,
*************** public:
*** 58,63 ****
--- 58,65 ----
      FieldAccess,
      Closure,
      Block,
+     AnonConst,
+     ConstBlock,
      Continue,
      Break,
      Range,
*************** public:
*** 72,77 ****
--- 74,80 ----
      Path,
      InlineAsm,
      LlvmInlineAsm,
+     OffsetOf,
    };
  
    BaseKind get_hir_kind () override final { return Node::BaseKind::EXPR; }
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/tree/rust-hir-expr.cc gcc-16-20250810/gcc/rust/hir/tree/rust-hir-expr.cc
*** gcc-16-20250803/gcc/rust/hir/tree/rust-hir-expr.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/tree/rust-hir-expr.cc	Sun Aug 10 22:32:08 2025
***************
*** 17,22 ****
--- 17,24 ----
  // <http://www.gnu.org/licenses/>.
  
  #include "rust-hir-expr.h"
+ #include "rust-hir-map.h"
+ #include "optional.h"
  #include "rust-operators.h"
  #include "rust-hir-stmt.h"
  
*************** BlockExpr::operator= (BlockExpr const &o
*** 790,795 ****
--- 792,852 ----
    return *this;
  }
  
+ AnonConst::AnonConst (Analysis::NodeMapping mappings,
+ 		      std::unique_ptr<Expr> &&expr, location_t locus)
+   : ExprWithBlock (std::move (mappings), {}), locus (locus),
+     kind (Kind::Explicit), expr (std::move (expr))
+ {
+   rust_assert (this->expr.value ());
+ }
+ 
+ AnonConst::AnonConst (Analysis::NodeMapping mappings, location_t locus)
+   : ExprWithBlock (std::move (mappings), {}), locus (locus),
+     kind (Kind::DeferredInference), expr (tl::nullopt)
+ {}
+ 
+ AnonConst::AnonConst (const AnonConst &other)
+   : ExprWithBlock (other), locus (other.locus), kind (other.kind)
+ {
+   if (other.expr)
+     expr = other.expr.value ()->clone_expr ();
+ }
+ 
+ AnonConst
+ AnonConst::operator= (const AnonConst &other)
+ {
+   ExprWithBlock::operator= (other);
+ 
+   locus = other.locus;
+   kind = other.kind;
+ 
+   if (other.expr)
+     expr = other.expr.value ()->clone_expr ();
+ 
+   return *this;
+ }
+ 
+ ConstBlock::ConstBlock (Analysis::NodeMapping mappings, AnonConst &&expr,
+ 			location_t locus, AST::AttrVec outer_attrs)
+   : ExprWithBlock (std::move (mappings), std::move (outer_attrs)),
+     expr (std::move (expr)), locus (locus)
+ {}
+ 
+ ConstBlock::ConstBlock (const ConstBlock &other)
+   : ExprWithBlock (other), expr (other.expr), locus (other.locus)
+ {}
+ 
+ ConstBlock
+ ConstBlock::operator= (const ConstBlock &other)
+ {
+   ExprWithBlock::operator= (other);
+ 
+   expr = other.expr;
+   locus = other.locus;
+ 
+   return *this;
+ }
+ 
  ContinueExpr::ContinueExpr (Analysis::NodeMapping mappings, location_t locus,
  			    tl::optional<Lifetime> label,
  			    AST::AttrVec outer_attribs)
*************** AsyncBlockExpr::operator= (AsyncBlockExp
*** 1277,1335 ****
  OperatorExprMeta::OperatorExprMeta (HIR::CompoundAssignmentExpr &expr)
    : node_mappings (expr.get_mappings ()),
      lvalue_mappings (expr.get_expr ().get_mappings ()),
!     locus (expr.get_locus ())
  {}
  
  OperatorExprMeta::OperatorExprMeta (HIR::ArithmeticOrLogicalExpr &expr)
    : node_mappings (expr.get_mappings ()),
      lvalue_mappings (expr.get_expr ().get_mappings ()),
!     locus (expr.get_locus ())
  {}
  
  OperatorExprMeta::OperatorExprMeta (HIR::NegationExpr &expr)
    : node_mappings (expr.get_mappings ()),
      lvalue_mappings (expr.get_expr ().get_mappings ()),
      locus (expr.get_locus ())
  {}
  
  OperatorExprMeta::OperatorExprMeta (HIR::DereferenceExpr &expr)
    : node_mappings (expr.get_mappings ()),
      lvalue_mappings (expr.get_expr ().get_mappings ()),
      locus (expr.get_locus ())
  {}
  
  OperatorExprMeta::OperatorExprMeta (HIR::ArrayIndexExpr &expr)
    : node_mappings (expr.get_mappings ()),
      lvalue_mappings (expr.get_array_expr ().get_mappings ()),
      locus (expr.get_locus ())
  {}
  
  OperatorExprMeta::OperatorExprMeta (HIR::ComparisonExpr &expr)
    : node_mappings (expr.get_mappings ()),
      lvalue_mappings (expr.get_expr ().get_mappings ()),
!     locus (expr.get_locus ())
  {}
  
- AnonConst::AnonConst (NodeId id, std::unique_ptr<Expr> expr)
-   : id (id), expr (std::move (expr))
- {
-   rust_assert (this->expr != nullptr);
- }
- 
- AnonConst::AnonConst (const AnonConst &other)
- {
-   id = other.id;
-   expr = other.expr->clone_expr ();
- }
- 
- AnonConst
- AnonConst::operator= (const AnonConst &other)
- {
-   id = other.id;
-   expr = other.expr->clone_expr ();
-   return *this;
- }
- 
  InlineAsmOperand::In::In (
    const tl::optional<struct AST::InlineAsmRegOrRegClass> &reg,
    std::unique_ptr<Expr> expr)
--- 1334,1375 ----
  OperatorExprMeta::OperatorExprMeta (HIR::CompoundAssignmentExpr &expr)
    : node_mappings (expr.get_mappings ()),
      lvalue_mappings (expr.get_expr ().get_mappings ()),
!     rvalue_mappings (expr.get_rhs ().get_mappings ()), locus (expr.get_locus ())
  {}
  
  OperatorExprMeta::OperatorExprMeta (HIR::ArithmeticOrLogicalExpr &expr)
    : node_mappings (expr.get_mappings ()),
      lvalue_mappings (expr.get_expr ().get_mappings ()),
!     rvalue_mappings (expr.get_rhs ().get_mappings ()), locus (expr.get_locus ())
  {}
  
  OperatorExprMeta::OperatorExprMeta (HIR::NegationExpr &expr)
    : node_mappings (expr.get_mappings ()),
      lvalue_mappings (expr.get_expr ().get_mappings ()),
+     rvalue_mappings (Analysis::NodeMapping::get_error ()),
      locus (expr.get_locus ())
  {}
  
  OperatorExprMeta::OperatorExprMeta (HIR::DereferenceExpr &expr)
    : node_mappings (expr.get_mappings ()),
      lvalue_mappings (expr.get_expr ().get_mappings ()),
+     rvalue_mappings (Analysis::NodeMapping::get_error ()),
      locus (expr.get_locus ())
  {}
  
  OperatorExprMeta::OperatorExprMeta (HIR::ArrayIndexExpr &expr)
    : node_mappings (expr.get_mappings ()),
      lvalue_mappings (expr.get_array_expr ().get_mappings ()),
+     rvalue_mappings (expr.get_index_expr ().get_mappings ()),
      locus (expr.get_locus ())
  {}
  
  OperatorExprMeta::OperatorExprMeta (HIR::ComparisonExpr &expr)
    : node_mappings (expr.get_mappings ()),
      lvalue_mappings (expr.get_expr ().get_mappings ()),
!     rvalue_mappings (expr.get_rhs ().get_mappings ()), locus (expr.get_locus ())
  {}
  
  InlineAsmOperand::In::In (
    const tl::optional<struct AST::InlineAsmRegOrRegClass> &reg,
    std::unique_ptr<Expr> expr)
*************** InlineAsm::InlineAsm (location_t locus,
*** 1476,1482 ****
  		      std::vector<AST::TupleTemplateStr> template_strs,
  		      std::vector<HIR::InlineAsmOperand> operands,
  		      std::vector<AST::TupleClobber> clobber_abi,
! 		      std::set<AST::InlineAsmOption> options,
  		      Analysis::NodeMapping mappings,
  		      AST::AttrVec outer_attribs)
    : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
--- 1516,1522 ----
  		      std::vector<AST::TupleTemplateStr> template_strs,
  		      std::vector<HIR::InlineAsmOperand> operands,
  		      std::vector<AST::TupleClobber> clobber_abi,
! 		      std::set<AST::InlineAsm::Option> options,
  		      Analysis::NodeMapping mappings,
  		      AST::AttrVec outer_attribs)
    : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
*************** InlineAsm::InlineAsm (location_t locus,
*** 1486,1490 ****
--- 1526,1566 ----
      clobber_abi (std::move (clobber_abi)), options (std::move (options))
  {}
  
+ OffsetOf &
+ OffsetOf::operator= (const OffsetOf &other)
+ {
+   ExprWithoutBlock::operator= (other);
+ 
+   type = other.type->clone_type ();
+   field = other.field;
+   loc = other.loc;
+ 
+   return *this;
+ }
+ 
+ ExprWithoutBlock *
+ OffsetOf::clone_expr_without_block_impl () const
+ {
+   return new OffsetOf (*this);
+ }
+ 
+ std::string
+ OffsetOf::as_string () const
+ {
+   return "OffsetOf(" + type->as_string () + ", " + field.as_string () + ")";
+ }
+ 
+ void
+ OffsetOf::accept_vis (HIRExpressionVisitor &vis)
+ {
+   vis.visit (*this);
+ }
+ 
+ void
+ OffsetOf::accept_vis (HIRFullVisitor &vis)
+ {
+   vis.visit (*this);
+ }
+ 
  } // namespace HIR
  } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/tree/rust-hir-expr.h gcc-16-20250810/gcc/rust/hir/tree/rust-hir-expr.h
*** gcc-16-20250803/gcc/rust/hir/tree/rust-hir-expr.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/tree/rust-hir-expr.h	Sun Aug 10 22:32:08 2025
***************
*** 19,30 ****
--- 19,33 ----
  #ifndef RUST_HIR_EXPR_H
  #define RUST_HIR_EXPR_H
  
+ #include "rust-ast.h"
  #include "rust-hir-expr-abstract.h"
  #include "rust-hir-literal.h"
  #include "rust-common.h"
  #include "rust-hir-bound.h"
  #include "rust-hir-attrs.h"
  #include "rust-expr.h"
+ #include "rust-hir-map.h"
+ #include "rust-mapping-common.h"
  
  namespace Rust {
  namespace HIR {
*************** protected:
*** 1800,1805 ****
--- 1803,1894 ----
    }
  };
  
+ class AnonConst : public ExprWithBlock
+ {
+ public:
+   enum class Kind
+   {
+     Explicit,
+     DeferredInference
+   };
+ 
+   AnonConst (Analysis::NodeMapping mappings, std::unique_ptr<Expr> &&expr,
+ 	     location_t locus = UNKNOWN_LOCATION);
+   AnonConst (Analysis::NodeMapping mappings,
+ 	     location_t locus = UNKNOWN_LOCATION);
+   AnonConst (const AnonConst &other);
+   AnonConst operator= (const AnonConst &other);
+ 
+   std::string as_string () const override;
+ 
+   void accept_vis (HIRFullVisitor &vis) override;
+   void accept_vis (HIRExpressionVisitor &vis) override;
+ 
+   ExprType get_expression_type () const final override
+   {
+     return ExprType::AnonConst;
+   }
+ 
+   location_t get_locus () const override { return locus; }
+ 
+   Expr &get_inner_expr ()
+   {
+     rust_assert (kind == Kind::Explicit);
+     return *expr.value ();
+   }
+ 
+   const Expr &get_inner_expr () const
+   {
+     rust_assert (kind == Kind::Explicit);
+     return *expr.value ();
+   }
+ 
+   bool is_deferred () const { return kind == Kind::DeferredInference; }
+ 
+ private:
+   location_t locus;
+   Kind kind;
+   tl::optional<std::unique_ptr<Expr>> expr;
+ 
+   AnonConst *clone_expr_with_block_impl () const override
+   {
+     return new AnonConst (*this);
+   }
+ };
+ 
+ class ConstBlock : public ExprWithBlock
+ {
+ public:
+   ConstBlock (Analysis::NodeMapping mappings, AnonConst &&expr,
+ 	      location_t locus = UNKNOWN_LOCATION,
+ 	      AST::AttrVec outer_attrs = {});
+   ConstBlock (const ConstBlock &other);
+   ConstBlock operator= (const ConstBlock &other);
+ 
+   void accept_vis (HIRFullVisitor &vis) override;
+   void accept_vis (HIRExpressionVisitor &vis) override;
+ 
+   std::string as_string () const override;
+ 
+   ExprType get_expression_type () const final override
+   {
+     return ExprType::ConstBlock;
+   }
+ 
+   location_t get_locus () const override { return locus; }
+   AnonConst &get_const_expr () { return expr; }
+   const AnonConst &get_const_expr () const { return expr; }
+ 
+ private:
+   AnonConst expr;
+   location_t locus;
+ 
+   ConstBlock *clone_expr_with_block_impl () const override
+   {
+     return new ConstBlock (*this);
+   }
+ };
+ 
  // HIR node representing continue expression within loops
  class ContinueExpr : public ExprWithoutBlock
  {
*************** public:
*** 2631,2636 ****
--- 2720,2727 ----
    Expr &get_guard_expr () { return *guard_expr; }
  
    location_t get_locus () const { return locus; }
+ 
+   AST::AttrVec &get_outer_attrs () { return outer_attrs; }
  };
  
  /* A "match case" - a correlated match arm and resulting expression. Not
*************** public:
*** 2823,2828 ****
--- 2914,2935 ----
  
    OperatorExprMeta (HIR::ComparisonExpr &expr);
  
+   OperatorExprMeta (const OperatorExprMeta &other)
+     : node_mappings (other.node_mappings),
+       lvalue_mappings (other.lvalue_mappings),
+       rvalue_mappings (other.rvalue_mappings), locus (other.locus)
+   {}
+ 
+   OperatorExprMeta &operator= (const OperatorExprMeta &other)
+   {
+     node_mappings = other.node_mappings;
+     lvalue_mappings = other.lvalue_mappings;
+     rvalue_mappings = other.rvalue_mappings;
+     locus = other.locus;
+ 
+     return *this;
+   }
+ 
    const Analysis::NodeMapping &get_mappings () const { return node_mappings; }
  
    const Analysis::NodeMapping &get_lvalue_mappings () const
*************** public:
*** 2830,2840 ****
      return lvalue_mappings;
    }
  
    location_t get_locus () const { return locus; }
  
  private:
!   const Analysis::NodeMapping node_mappings;
!   const Analysis::NodeMapping lvalue_mappings;
    location_t locus;
  };
  
--- 2937,2958 ----
      return lvalue_mappings;
    }
  
+   const Analysis::NodeMapping &get_rvalue_mappings () const
+   {
+     return rvalue_mappings;
+   }
+ 
+   bool has_rvalue_mappings () const
+   {
+     return rvalue_mappings.get_hirid () != UNKNOWN_HIRID;
+   }
+ 
    location_t get_locus () const { return locus; }
  
  private:
!   Analysis::NodeMapping node_mappings;
!   Analysis::NodeMapping lvalue_mappings;
!   Analysis::NodeMapping rvalue_mappings;
    location_t locus;
  };
  
*************** class InlineAsmRegClass
*** 2892,2909 ****
    std::string placeholder;
  };
  
- struct AnonConst
- {
-   NodeId id;
-   std::unique_ptr<Expr> expr;
- 
-   AnonConst (NodeId id, std::unique_ptr<Expr> expr);
- 
-   AnonConst (const AnonConst &other);
- 
-   AnonConst operator= (const AnonConst &other);
- };
- 
  class InlineAsmOperand
  {
  public:
--- 3010,3015 ----
*************** public:
*** 2992,2999 ****
      Label operator= (const struct Label &other);
    };
  
- private:
    using RegisterType = AST::InlineAsmOperand::RegisterType;
    AST::InlineAsmOperand::RegisterType register_type;
  
    tl::optional<struct In> in;
--- 3098,3106 ----
      Label operator= (const struct Label &other);
    };
  
    using RegisterType = AST::InlineAsmOperand::RegisterType;
+ 
+ private:
    AST::InlineAsmOperand::RegisterType register_type;
  
    tl::optional<struct In> in;
*************** public:
*** 3037,3049 ****
    RegisterType get_register_type () const { return register_type; }
  
    // Potentially unsafe without get_register_type() check
!   struct In get_in () const { return in.value (); }
!   struct Out get_out () const { return out.value (); }
!   struct InOut get_in_out () const { return in_out.value (); }
!   struct SplitInOut get_split_in_out () const { return split_in_out.value (); }
!   struct Const get_const () const { return cnst.value (); }
!   struct Sym get_sym () const { return sym.value (); }
!   struct Label get_label () const { return label.value (); }
  };
  
  // Inline Assembly Node
--- 3144,3167 ----
    RegisterType get_register_type () const { return register_type; }
  
    // Potentially unsafe without get_register_type() check
!   const struct In &get_in () const { return in.value (); }
!   const struct Out &get_out () const { return out.value (); }
!   const struct InOut &get_in_out () const { return in_out.value (); }
!   const struct SplitInOut &get_split_in_out () const
!   {
!     return split_in_out.value ();
!   }
!   const struct Const &get_const () const { return cnst.value (); }
!   const struct Sym &get_sym () const { return sym.value (); }
!   const struct Label &get_label () const { return label.value (); }
! 
!   struct In &get_in () { return in.value (); }
!   struct Out &get_out () { return out.value (); }
!   struct InOut &get_in_out () { return in_out.value (); }
!   struct SplitInOut &get_split_in_out () { return split_in_out.value (); }
!   struct Const &get_const () { return cnst.value (); }
!   struct Sym &get_sym () { return sym.value (); }
!   struct Label &get_label () { return label.value (); }
  };
  
  // Inline Assembly Node
*************** public:
*** 3059,3065 ****
    std::vector<AST::TupleTemplateStr> template_strs;
    std::vector<HIR::InlineAsmOperand> operands;
    std::vector<AST::TupleClobber> clobber_abi;
!   std::set<AST::InlineAsmOption> options;
  
    std::vector<location_t> line_spans;
  
--- 3177,3183 ----
    std::vector<AST::TupleTemplateStr> template_strs;
    std::vector<HIR::InlineAsmOperand> operands;
    std::vector<AST::TupleClobber> clobber_abi;
!   std::set<AST::InlineAsm::Option> options;
  
    std::vector<location_t> line_spans;
  
*************** public:
*** 3090,3100 ****
      return template_strs;
    }
  
!   std::vector<HIR::InlineAsmOperand> get_operands () { return operands; }
  
    std::vector<AST::TupleClobber> get_clobber_abi () { return clobber_abi; }
  
!   std::set<AST::InlineAsmOption> get_options () { return options; }
  
    bool is_simple_asm ()
    {
--- 3208,3218 ----
      return template_strs;
    }
  
!   std::vector<HIR::InlineAsmOperand> &get_operands () { return operands; }
  
    std::vector<AST::TupleClobber> get_clobber_abi () { return clobber_abi; }
  
!   std::set<AST::InlineAsm::Option> get_options () { return options; }
  
    bool is_simple_asm ()
    {
*************** public:
*** 3113,3123 ****
  	     std::vector<AST::TupleTemplateStr> template_strs,
  	     std::vector<HIR::InlineAsmOperand> operands,
  	     std::vector<AST::TupleClobber> clobber_abi,
! 	     std::set<AST::InlineAsmOption> options,
  	     Analysis::NodeMapping mappings,
  	     AST::AttrVec outer_attribs = AST::AttrVec ());
  };
  
  struct LlvmOperand
  {
    std::string constraint;
--- 3231,3277 ----
  	     std::vector<AST::TupleTemplateStr> template_strs,
  	     std::vector<HIR::InlineAsmOperand> operands,
  	     std::vector<AST::TupleClobber> clobber_abi,
! 	     std::set<AST::InlineAsm::Option> options,
  	     Analysis::NodeMapping mappings,
  	     AST::AttrVec outer_attribs = AST::AttrVec ());
  };
  
+ class OffsetOf : public ExprWithoutBlock
+ {
+ public:
+   OffsetOf (std::unique_ptr<Type> &&type, Identifier field,
+ 	    Analysis::NodeMapping mappings, location_t loc)
+     : ExprWithoutBlock (mappings), type (std::move (type)), field (field),
+       loc (loc)
+   {}
+ 
+   OffsetOf (const OffsetOf &other)
+     : ExprWithoutBlock (other), type (other.type->clone_type ()),
+       field (other.field), loc (other.loc)
+   {}
+ 
+   OffsetOf &operator= (const OffsetOf &other);
+ 
+   ExprWithoutBlock *clone_expr_without_block_impl () const override;
+   std::string as_string () const override;
+ 
+   void accept_vis (HIRExpressionVisitor &vis) override;
+   void accept_vis (HIRFullVisitor &vis) override;
+ 
+   ExprType get_expression_type () const override { return ExprType::OffsetOf; }
+ 
+   location_t get_locus () const override { return loc; }
+ 
+   Type &get_type () { return *type; }
+   const Type &get_type () const { return *type; }
+   const Identifier &get_field () const { return field; }
+ 
+ private:
+   std::unique_ptr<Type> type;
+   Identifier field;
+   location_t loc;
+ };
+ 
  struct LlvmOperand
  {
    std::string constraint;
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/tree/rust-hir-full-decls.h gcc-16-20250810/gcc/rust/hir/tree/rust-hir-full-decls.h
*** gcc-16-20250803/gcc/rust/hir/tree/rust-hir-full-decls.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/tree/rust-hir-full-decls.h	Sun Aug 10 22:32:08 2025
*************** class FieldAccessExpr;
*** 95,100 ****
--- 95,102 ----
  struct ClosureParam;
  class ClosureExpr;
  class BlockExpr;
+ class AnonConst;
+ class ConstBlock;
  class ContinueExpr;
  class BreakExpr;
  class RangeExpr;
*************** class AwaitExpr;
*** 123,132 ****
  class AsyncBlockExpr;
  class InlineAsmReg;
  class InlineAsmRegClass;
- struct AnonConst;
  class InlineAsmOperand;
  class InlineAsm;
  class LlvmInlineAsm;
  
  // rust-stmt.h
  class EmptyStmt;
--- 125,134 ----
  class AsyncBlockExpr;
  class InlineAsmReg;
  class InlineAsmRegClass;
  class InlineAsmOperand;
  class InlineAsm;
  class LlvmInlineAsm;
+ class OffsetOf;
  
  // rust-stmt.h
  class EmptyStmt;
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/tree/rust-hir-generic-param.h gcc-16-20250810/gcc/rust/hir/tree/rust-hir-generic-param.h
*** gcc-16-20250803/gcc/rust/hir/tree/rust-hir-generic-param.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/tree/rust-hir-generic-param.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 150,156 ****
  
    location_t get_locus () const override final { return locus; };
  
!   bool has_default_expression () { return default_expression != nullptr; }
  
    std::string get_name () { return name; }
    Type &get_type ()
--- 150,156 ----
  
    location_t get_locus () const override final { return locus; };
  
!   bool has_default_expression () const { return default_expression != nullptr; }
  
    std::string get_name () { return name; }
    Type &get_type ()
*************** public:
*** 160,165 ****
--- 160,167 ----
    }
    Expr &get_default_expression () { return *default_expression; }
  
+   const Expr &get_default_expression () const { return *default_expression; }
+ 
  protected:
    /* Use covariance to implement clone function as returning this object rather
     * than base */
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/tree/rust-hir-item.cc gcc-16-20250810/gcc/rust/hir/tree/rust-hir-item.cc
*** gcc-16-20250803/gcc/rust/hir/tree/rust-hir-item.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/tree/rust-hir-item.cc	Sun Aug 10 22:32:08 2025
*************** TypeParam::TypeParam (
*** 26,41 ****
    Analysis::NodeMapping mappings, Identifier type_representation,
    location_t locus,
    std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds,
!   tl::optional<std::unique_ptr<Type>> type, AST::AttrVec outer_attrs)
    : GenericParam (mappings), outer_attrs (std::move (outer_attrs)),
      type_representation (std::move (type_representation)),
      type_param_bounds (std::move (type_param_bounds)), type (std::move (type)),
!     locus (locus)
  {}
  
  TypeParam::TypeParam (TypeParam const &other)
    : GenericParam (other.mappings), outer_attrs (other.outer_attrs),
!     type_representation (other.type_representation), locus (other.locus)
  {
    // guard to prevent null pointer dereference
    if (other.has_type ())
--- 26,43 ----
    Analysis::NodeMapping mappings, Identifier type_representation,
    location_t locus,
    std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds,
!   tl::optional<std::unique_ptr<Type>> type, AST::AttrVec outer_attrs,
!   bool was_impl_trait)
    : GenericParam (mappings), outer_attrs (std::move (outer_attrs)),
      type_representation (std::move (type_representation)),
      type_param_bounds (std::move (type_param_bounds)), type (std::move (type)),
!     locus (locus), was_impl_trait (was_impl_trait)
  {}
  
  TypeParam::TypeParam (TypeParam const &other)
    : GenericParam (other.mappings), outer_attrs (other.outer_attrs),
!     type_representation (other.type_representation), locus (other.locus),
!     was_impl_trait (other.was_impl_trait)
  {
    // guard to prevent null pointer dereference
    if (other.has_type ())
*************** TypeParam::operator= (TypeParam const &o
*** 55,60 ****
--- 57,63 ----
    outer_attrs = other.outer_attrs;
    locus = other.locus;
    mappings = other.mappings;
+   was_impl_trait = other.was_impl_trait;
  
    // guard to prevent null pointer dereference
    if (other.has_type ())
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/tree/rust-hir-item.h gcc-16-20250810/gcc/rust/hir/tree/rust-hir-item.h
*** gcc-16-20250803/gcc/rust/hir/tree/rust-hir-item.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/tree/rust-hir-item.h	Sun Aug 10 22:32:08 2025
*************** protected:
*** 95,111 ****
  class TypeParam : public GenericParam
  {
    AST::AttrVec outer_attrs;
- 
    Identifier type_representation;
! 
!   // bool has_type_param_bounds;
!   // TypeParamBounds type_param_bounds;
!   std::vector<std::unique_ptr<TypeParamBound>>
!     type_param_bounds; // inlined form
! 
    tl::optional<std::unique_ptr<Type>> type;
- 
    location_t locus;
  
  public:
    // Returns whether the type of the type param has been specified.
--- 95,105 ----
  class TypeParam : public GenericParam
  {
    AST::AttrVec outer_attrs;
    Identifier type_representation;
!   std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds;
    tl::optional<std::unique_ptr<Type>> type;
    location_t locus;
+   bool was_impl_trait;
  
  public:
    // Returns whether the type of the type param has been specified.
*************** public:
*** 121,129 ****
    TypeParam (Analysis::NodeMapping mappings, Identifier type_representation,
  	     location_t locus = UNDEF_LOCATION,
  	     std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds
! 	     = std::vector<std::unique_ptr<TypeParamBound>> (),
  	     tl::optional<std::unique_ptr<Type>> type = tl::nullopt,
! 	     AST::AttrVec outer_attrs = std::vector<AST::Attribute> ());
  
    // Copy constructor uses clone
    TypeParam (TypeParam const &other);
--- 115,123 ----
    TypeParam (Analysis::NodeMapping mappings, Identifier type_representation,
  	     location_t locus = UNDEF_LOCATION,
  	     std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds
! 	     = {},
  	     tl::optional<std::unique_ptr<Type>> type = tl::nullopt,
! 	     AST::AttrVec outer_attrs = {}, bool was_impl_trait = false);
  
    // Copy constructor uses clone
    TypeParam (TypeParam const &other);
*************** public:
*** 154,159 ****
--- 148,155 ----
  
    std::vector<std::unique_ptr<TypeParamBound>> &get_type_param_bounds ();
  
+   bool from_impl_trait () const { return was_impl_trait; }
+ 
  protected:
    // Clone function implementation as (not pure) virtual method
    TypeParam *clone_generic_param_impl () const override
*************** public:
*** 213,218 ****
--- 209,216 ----
  
    std::string as_string () const override;
  
+   location_t get_locus () const { return locus; }
+ 
    void accept_vis (HIRFullVisitor &vis) override;
  
    Lifetime &get_lifetime () { return lifetime; }
*************** public:
*** 406,411 ****
--- 404,411 ----
  
    const Lifetime &get_lifetime () const { return lifetime.value (); }
  
+   Lifetime &get_lifetime () { return lifetime.value (); }
+ 
    std::string as_string () const;
  
    location_t get_locus () const { return locus; }
*************** public:
*** 1801,1806 ****
--- 1801,1808 ----
      return *type;
    }
  
+   bool has_expr () const { return const_expr != nullptr; }
+ 
    Expr &get_expr () { return *const_expr; }
  
    Identifier get_identifier () const { return identifier; }
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/tree/rust-hir-path.h gcc-16-20250810/gcc/rust/hir/tree/rust-hir-path.h
*** gcc-16-20250803/gcc/rust/hir/tree/rust-hir-path.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/tree/rust-hir-path.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 41,51 ****
      : segment_name (std::move (segment_name))
    {}
  
!   /* TODO: insert check in constructor for this? Or is this a semantic error
!    * best handled then? */
  
!   /* TODO: does this require visitor? pretty sure this isn't polymorphic, but
!    * not entirely sure */
  
    // Creates an error PathIdentSegment.
    static PathIdentSegment create_error () { return PathIdentSegment (""); }
--- 41,55 ----
      : segment_name (std::move (segment_name))
    {}
  
!   PathIdentSegment (const PathIdentSegment &other)
!     : segment_name (other.segment_name)
!   {}
  
!   PathIdentSegment &operator= (PathIdentSegment const &other)
!   {
!     segment_name = other.segment_name;
!     return *this;
!   }
  
    // Creates an error PathIdentSegment.
    static PathIdentSegment create_error () { return PathIdentSegment (""); }
*************** public:
*** 128,133 ****
--- 132,139 ----
  
    std::unique_ptr<Expr> &get_expression () { return expression; }
  
+   location_t get_locus () const { return locus; }
+ 
  private:
    std::unique_ptr<Expr> expression;
    location_t locus;
*************** public:
*** 146,152 ****
    bool has_generic_args () const
    {
      return !(lifetime_args.empty () && type_args.empty ()
! 	     && binding_args.empty ());
    }
  
    GenericArgs (std::vector<Lifetime> lifetime_args,
--- 152,158 ----
    bool has_generic_args () const
    {
      return !(lifetime_args.empty () && type_args.empty ()
! 	     && binding_args.empty () && const_args.empty ());
    }
  
    GenericArgs (std::vector<Lifetime> lifetime_args,
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/tree/rust-hir-pattern.h gcc-16-20250810/gcc/rust/hir/tree/rust-hir-pattern.h
*** gcc-16-20250803/gcc/rust/hir/tree/rust-hir-pattern.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/tree/rust-hir-pattern.h	Sun Aug 10 22:32:08 2025
*************** class IdentifierPattern : public Pattern
*** 80,86 ****
    Identifier variable_ident;
    bool is_ref;
    Mutability mut;
!   std::unique_ptr<Pattern> to_bind;
    location_t locus;
    Analysis::NodeMapping mappings;
  
--- 80,86 ----
    Identifier variable_ident;
    bool is_ref;
    Mutability mut;
!   std::unique_ptr<Pattern> subpattern;
    location_t locus;
    Analysis::NodeMapping mappings;
  
*************** public:
*** 88,102 ****
    std::string as_string () const override;
  
    // Returns whether the IdentifierPattern has a pattern to bind.
!   bool has_pattern_to_bind () const { return to_bind != nullptr; }
  
    // Constructor
    IdentifierPattern (Analysis::NodeMapping mappings, Identifier ident,
  		     location_t locus, bool is_ref = false,
  		     Mutability mut = Mutability::Imm,
! 		     std::unique_ptr<Pattern> to_bind = nullptr)
      : variable_ident (std::move (ident)), is_ref (is_ref), mut (mut),
!       to_bind (std::move (to_bind)), locus (locus), mappings (mappings)
    {}
  
    // Copy constructor with clone
--- 88,102 ----
    std::string as_string () const override;
  
    // Returns whether the IdentifierPattern has a pattern to bind.
!   bool has_subpattern () const { return subpattern != nullptr; }
  
    // Constructor
    IdentifierPattern (Analysis::NodeMapping mappings, Identifier ident,
  		     location_t locus, bool is_ref = false,
  		     Mutability mut = Mutability::Imm,
! 		     std::unique_ptr<Pattern> subpattern = nullptr)
      : variable_ident (std::move (ident)), is_ref (is_ref), mut (mut),
!       subpattern (std::move (subpattern)), locus (locus), mappings (mappings)
    {}
  
    // Copy constructor with clone
*************** public:
*** 105,112 ****
        mut (other.mut), locus (other.locus), mappings (other.mappings)
    {
      // fix to get prevent null pointer dereference
!     if (other.to_bind != nullptr)
!       to_bind = other.to_bind->clone_pattern ();
    }
  
    // Overload assignment operator to use clone
--- 105,112 ----
        mut (other.mut), locus (other.locus), mappings (other.mappings)
    {
      // fix to get prevent null pointer dereference
!     if (other.subpattern != nullptr)
!       subpattern = other.subpattern->clone_pattern ();
    }
  
    // Overload assignment operator to use clone
*************** public:
*** 119,126 ****
      mappings = other.mappings;
  
      // fix to get prevent null pointer dereference
!     if (other.to_bind != nullptr)
!       to_bind = other.to_bind->clone_pattern ();
  
      return *this;
    }
--- 119,126 ----
      mappings = other.mappings;
  
      // fix to get prevent null pointer dereference
!     if (other.subpattern != nullptr)
!       subpattern = other.subpattern->clone_pattern ();
  
      return *this;
    }
*************** public:
*** 133,139 ****
  
    bool is_mut () const { return mut == Mutability::Mut; }
    bool get_is_ref () const { return is_ref; }
!   Pattern &get_to_bind () { return *to_bind; }
  
    void accept_vis (HIRFullVisitor &vis) override;
    void accept_vis (HIRPatternVisitor &vis) override;
--- 133,139 ----
  
    bool is_mut () const { return mut == Mutability::Mut; }
    bool get_is_ref () const { return is_ref; }
!   Pattern &get_subpattern () { return *subpattern; }
  
    void accept_vis (HIRFullVisitor &vis) override;
    void accept_vis (HIRPatternVisitor &vis) override;
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/tree/rust-hir-visibility.h gcc-16-20250810/gcc/rust/hir/tree/rust-hir-visibility.h
*** gcc-16-20250803/gcc/rust/hir/tree/rust-hir-visibility.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/tree/rust-hir-visibility.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 73,78 ****
--- 73,80 ----
    }
  
    std::string as_string () const;
+ 
+   location_t get_locus () const { return locus; }
  };
  } // namespace HIR
  } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/tree/rust-hir-visitor.cc gcc-16-20250810/gcc/rust/hir/tree/rust-hir-visitor.cc
*** gcc-16-20250803/gcc/rust/hir/tree/rust-hir-visitor.cc	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/rust/hir/tree/rust-hir-visitor.cc	Sun Aug 10 22:32:08 2025
***************
*** 0 ****
--- 1,1187 ----
+ // Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ 
+ // This file is part of GCC.
+ 
+ // GCC is free software; you can redistribute it and/or modify it under
+ // the terms of the GNU General Public License as published by the Free
+ // Software Foundation; either version 3, or (at your option) any later
+ // version.
+ 
+ // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ // WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ // for more details.
+ 
+ // You should have received a copy of the GNU General Public License
+ // along with GCC; see the file COPYING3.  If not see
+ // <http://www.gnu.org/licenses/>.
+ 
+ #include "rust-expr.h"
+ #include "rust-hir-full-decls.h"
+ #include "rust-hir-visitor.h"
+ #include "rust-hir-full.h"
+ #include "rust-system.h"
+ 
+ namespace Rust {
+ namespace HIR {
+ 
+ void
+ DefaultHIRVisitor::walk (Lifetime &)
+ {}
+ 
+ void
+ DefaultHIRVisitor::walk (LifetimeParam &lifetime_param)
+ {
+   visit_outer_attrs (lifetime_param);
+   lifetime_param.get_lifetime ().accept_vis (*this);
+   for (Lifetime &lifetime_bound : lifetime_param.get_lifetime_bounds ())
+     lifetime_bound.accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::visit_generic_args (GenericArgs &generic_args)
+ {
+   for (auto &lifetime : generic_args.get_lifetime_args ())
+     lifetime.accept_vis (*this);
+   for (auto &type : generic_args.get_type_args ())
+     type->accept_vis (*this);
+   for (auto &binding : generic_args.get_binding_args ())
+     binding.get_type ().accept_vis (*this);
+   for (auto &const_arg : generic_args.get_const_args ())
+     const_arg.get_expression ()->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (PathInExpression &path_in_expr)
+ {
+   visit_outer_attrs (path_in_expr);
+   if (!path_in_expr.is_lang_item ())
+     for (auto &segment : path_in_expr.get_segments ())
+       visit_path_expr_segment (segment);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (TypePathSegment &)
+ {}
+ 
+ void
+ DefaultHIRVisitor::walk (TypePathSegmentFunction &segment_function)
+ {
+   TypePathFunction &function_path = segment_function.get_function_path ();
+   if (function_path.has_inputs ())
+     for (auto &param : function_path.get_params ())
+       param->accept_vis (*this);
+   if (function_path.has_return_type ())
+     function_path.get_return_type ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (TypePathSegmentGeneric &segment_generic)
+ {
+   if (segment_generic.has_generic_args ())
+     visit_generic_args (segment_generic.get_generic_args ());
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (TypePath &type_path)
+ {
+   for (auto &segment : type_path.get_segments ())
+     segment->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::visit_qualified_path_type (QualifiedPathType &path)
+ {
+   path.get_type ().accept_vis (*this);
+   if (path.has_as_clause ())
+     path.get_trait ().accept_vis (*this);
+ }
+ 
+ // TODO: Implement visit_path_expr_segment
+ void
+ DefaultHIRVisitor::visit_path_expr_segment (PathExprSegment &segment)
+ {
+   if (segment.has_generic_args ())
+     visit_generic_args (segment.get_generic_args ());
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (QualifiedPathInExpression &path_in_expr)
+ {
+   visit_outer_attrs (path_in_expr);
+   visit_qualified_path_type (path_in_expr.get_path_type ());
+   for (auto &segment : path_in_expr.get_segments ())
+     visit_path_expr_segment (segment);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (QualifiedPathInType &path_in_type)
+ {
+   visit_qualified_path_type (path_in_type.get_path_type ());
+   path_in_type.get_associated_segment ().accept_vis (*this);
+   for (auto &segment : path_in_type.get_segments ())
+     segment->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (LiteralExpr &expr)
+ {
+   visit_outer_attrs (expr);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (BorrowExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   expr.get_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (DereferenceExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   expr.get_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ErrorPropagationExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   expr.get_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (NegationExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   expr.get_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ArithmeticOrLogicalExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   expr.get_lhs ().accept_vis (*this);
+   expr.get_rhs ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ComparisonExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   expr.get_lhs ().accept_vis (*this);
+   expr.get_rhs ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (LazyBooleanExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   expr.get_lhs ().accept_vis (*this);
+   expr.get_rhs ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (TypeCastExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   expr.get_expr ().accept_vis (*this);
+   expr.get_type_to_convert_to ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (AssignmentExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   expr.get_lhs ().accept_vis (*this);
+   expr.get_rhs ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (CompoundAssignmentExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   expr.get_lhs ().accept_vis (*this);
+   expr.get_rhs ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (GroupedExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   visit_inner_attrs (expr);
+   expr.get_expr_in_parens ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ArrayElemsValues &elems)
+ {
+   for (auto &elem : elems.get_values ())
+     elem->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ArrayElemsCopied &elems)
+ {
+   elems.get_elem_to_copy ().accept_vis (*this);
+   elems.get_num_copies_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ArrayExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   visit_inner_attrs (expr);
+   expr.get_internal_elements ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ArrayIndexExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   expr.get_array_expr ().accept_vis (*this);
+   expr.get_index_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (TupleExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   visit_inner_attrs (expr);
+   for (auto &elem : expr.get_tuple_elems ())
+     elem->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (TupleIndexExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   expr.get_tuple_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (StructExprStruct &expr)
+ {
+   visit_outer_attrs (expr);
+   visit_inner_attrs (expr);
+   expr.get_struct_name ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (StructExprFieldIdentifier &)
+ {}
+ 
+ void
+ DefaultHIRVisitor::walk (StructExprFieldIdentifierValue &field)
+ {
+   field.get_value ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (StructExprFieldIndexValue &field)
+ {
+   field.get_value ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (StructExprStructFields &expr)
+ {
+   visit_outer_attrs (expr);
+   visit_inner_attrs (expr);
+   expr.get_struct_name ().accept_vis (*this);
+   if (expr.has_struct_base ())
+     {
+       StructBase &base = expr.get_struct_base ();
+       base.get_base ().accept_vis (*this);
+     }
+   for (auto &field : expr.get_fields ())
+     field->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (StructExprStructBase &expr)
+ {
+   visit_outer_attrs (expr);
+   visit_inner_attrs (expr);
+   expr.get_struct_name ().accept_vis (*this);
+   StructBase &base = expr.get_struct_base ();
+   base.get_base ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (CallExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   expr.get_fnexpr ().accept_vis (*this);
+   for (auto &arg : expr.get_arguments ())
+     arg->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (MethodCallExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   expr.get_receiver ().accept_vis (*this);
+   visit_path_expr_segment (expr.get_method_name ());
+   for (auto &arg : expr.get_arguments ())
+     arg->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (FieldAccessExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   expr.get_receiver_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::visit_closure_param (ClosureParam &param)
+ {
+   visit_outer_attrs (param);
+   param.get_pattern ().accept_vis (*this);
+   if (param.has_type_given ())
+     {
+       param.get_type ().accept_vis (*this);
+     }
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ClosureExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   for (auto &param : expr.get_params ())
+     visit_closure_param (param);
+   if (expr.has_return_type ())
+     expr.get_return_type ().accept_vis (*this);
+   expr.get_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (BlockExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   visit_inner_attrs (expr);
+   for (auto &stmt : expr.get_statements ())
+     stmt->accept_vis (*this);
+   if (expr.has_expr ())
+     expr.get_final_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (AnonConst &expr)
+ {
+   if (!expr.is_deferred ())
+     expr.get_inner_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ConstBlock &expr)
+ {
+   expr.get_const_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ContinueExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   if (expr.has_label ())
+     expr.get_label ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (BreakExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   if (expr.has_label ())
+     expr.get_label ().accept_vis (*this);
+ 
+   if (expr.has_break_expr ())
+     expr.get_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (RangeFromToExpr &expr)
+ {
+   expr.get_from_expr ().accept_vis (*this);
+   expr.get_to_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (RangeFromExpr &expr)
+ {
+   expr.get_from_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (RangeToExpr &expr)
+ {
+   expr.get_to_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (RangeFullExpr &)
+ {}
+ 
+ void
+ DefaultHIRVisitor::walk (RangeFromToInclExpr &expr)
+ {
+   expr.get_from_expr ().accept_vis (*this);
+   expr.get_to_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (RangeToInclExpr &expr)
+ {
+   expr.get_to_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ReturnExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   if (expr.has_return_expr ())
+     expr.get_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (UnsafeBlockExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   expr.get_block_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::visit_loop_label (LoopLabel &label)
+ {
+   label.get_lifetime ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (LoopExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   if (expr.has_loop_label ())
+     visit_loop_label (expr.get_loop_label ());
+   expr.get_loop_block ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (WhileLoopExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   if (expr.has_loop_label ())
+     visit_loop_label (expr.get_loop_label ());
+   expr.get_predicate_expr ().accept_vis (*this);
+   expr.get_loop_block ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (WhileLetLoopExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   for (auto &pattern : expr.get_patterns ())
+     pattern->accept_vis (*this);
+   if (expr.has_loop_label ())
+     visit_loop_label (expr.get_loop_label ());
+   expr.get_cond ().accept_vis (*this);
+   expr.get_loop_block ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (IfExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   expr.get_if_condition ().accept_vis (*this);
+   expr.get_if_block ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (IfExprConseqElse &expr)
+ {
+   expr.IfExpr::accept_vis (*this);
+   expr.get_else_block ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::visit_match_arm (MatchArm &arm)
+ {
+   // visit_outer_attrs (arm);
+   for (auto &pattern : arm.get_patterns ())
+     pattern->accept_vis (*this);
+   if (arm.has_match_arm_guard ())
+     arm.get_guard_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::visit_match_case (MatchCase &arm)
+ {
+   visit_match_arm (arm.get_arm ());
+   arm.get_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (MatchExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   visit_inner_attrs (expr);
+   expr.get_scrutinee_expr ().accept_vis (*this);
+   for (auto &arm : expr.get_match_cases ())
+     visit_match_case (arm);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (AwaitExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   expr.get_awaited_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (AsyncBlockExpr &expr)
+ {
+   visit_outer_attrs (expr);
+   expr.get_block_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (InlineAsm &expr)
+ {
+   visit_outer_attrs (expr);
+   auto &operands = expr.get_operands ();
+   using RegisterType = AST::InlineAsmOperand::RegisterType;
+   for (auto &operand : operands)
+     {
+       switch (operand.get_register_type ())
+ 	{
+ 	case RegisterType::In:
+ 	  {
+ 	    operand.get_in ().expr->accept_vis (*this);
+ 	    break;
+ 	  }
+ 	case RegisterType::Out:
+ 	  {
+ 	    operand.get_out ().expr->accept_vis (*this);
+ 	    break;
+ 	  }
+ 	case RegisterType::InOut:
+ 	  {
+ 	    operand.get_in_out ().expr->accept_vis (*this);
+ 	    break;
+ 	  }
+ 	case RegisterType::SplitInOut:
+ 	  {
+ 	    operand.get_split_in_out ().in_expr->accept_vis (*this);
+ 	    operand.get_split_in_out ().out_expr->accept_vis (*this);
+ 	    break;
+ 	  }
+ 	case RegisterType::Const:
+ 	  {
+ 	    operand.get_const ().anon_const.get_inner_expr ().accept_vis (
+ 	      *this);
+ 	    break;
+ 	  }
+ 	case RegisterType::Sym:
+ 	  {
+ 	    operand.get_sym ().expr->accept_vis (*this);
+ 	    break;
+ 	  }
+ 	case RegisterType::Label:
+ 	  {
+ 	    operand.get_label ().expr->accept_vis (*this);
+ 	    break;
+ 	  }
+ 	}
+     }
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (LlvmInlineAsm &expr)
+ {
+   for (auto &output : expr.outputs)
+     output.expr->accept_vis (*this);
+   for (auto &input : expr.inputs)
+     input.expr->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (OffsetOf &expr)
+ {
+   expr.get_type ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (TypeParam &param)
+ {
+   visit_outer_attrs (param);
+   for (auto &bounds : param.get_type_param_bounds ())
+     bounds->accept_vis (*this);
+   if (param.has_type ())
+     param.get_type ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ConstGenericParam &const_param)
+ {
+   visit_outer_attrs (const_param);
+   const_param.get_type ().accept_vis (*this);
+   if (const_param.has_default_expression ())
+     const_param.get_default_expression ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (LifetimeWhereClauseItem &item)
+ {
+   item.get_lifetime ().accept_vis (*this);
+   for (auto &bound : item.get_lifetime_bounds ())
+     bound.accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (TypeBoundWhereClauseItem &item)
+ {
+   for (auto &lifetime : item.get_for_lifetimes ())
+     lifetime.accept_vis (*this);
+   item.get_bound_type ().accept_vis (*this);
+   for (auto &param : item.get_type_param_bounds ())
+     param->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (Module &module)
+ {
+   visit_outer_attrs (module);
+   visit_inner_attrs (module);
+   for (auto &item : module.get_items ())
+     item->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ExternCrate &crate)
+ {
+   visit_outer_attrs (crate);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (UseTreeGlob &)
+ {}
+ 
+ void
+ DefaultHIRVisitor::walk (UseTreeList &)
+ {}
+ 
+ void
+ DefaultHIRVisitor::walk (UseTreeRebind &)
+ {}
+ 
+ void
+ DefaultHIRVisitor::walk (UseDeclaration &)
+ {}
+ 
+ void
+ DefaultHIRVisitor::visit_function_param (FunctionParam &param)
+ {
+   param.get_param_name ().accept_vis (*this);
+   param.get_type ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (Function &function)
+ {
+   visit_outer_attrs (function);
+   for (auto &generic : function.get_generic_params ())
+     generic->accept_vis (*this);
+   for (auto &param : function.get_function_params ())
+     visit_function_param (param);
+   if (function.has_return_type ())
+     function.get_return_type ().accept_vis (*this);
+   if (function.has_where_clause ())
+     visit_where_clause (function.get_where_clause ());
+   function.get_definition ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (TypeAlias &type_alias)
+ {
+   visit_outer_attrs (type_alias);
+   for (auto &generic : type_alias.get_generic_params ())
+     generic->accept_vis (*this);
+   if (type_alias.has_where_clause ())
+     visit_where_clause (type_alias.get_where_clause ());
+   type_alias.get_type_aliased ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::visit_struct_field (StructField &field)
+ {
+   field.get_field_type ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (StructStruct &struct_item)
+ {
+   visit_outer_attrs (struct_item);
+   for (auto &generic : struct_item.get_generic_params ())
+     generic->accept_vis (*this);
+   if (struct_item.has_where_clause ())
+     visit_where_clause (struct_item.get_where_clause ());
+   for (auto &field : struct_item.get_fields ())
+     visit_struct_field (field);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (TupleStruct &tuple_struct)
+ {
+   visit_outer_attrs (tuple_struct);
+   for (auto &generic : tuple_struct.get_generic_params ())
+     generic->accept_vis (*this);
+   if (tuple_struct.has_where_clause ())
+     visit_where_clause (tuple_struct.get_where_clause ());
+   for (auto &field : tuple_struct.get_fields ())
+     field.get_field_type ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (EnumItem &item)
+ {
+   visit_outer_attrs (item);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (EnumItemTuple &item_tuple)
+ {
+   item_tuple.EnumItem::accept_vis (*this);
+   for (auto &field : item_tuple.get_tuple_fields ())
+     field.get_field_type ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (EnumItemStruct &item_struct)
+ {
+   item_struct.EnumItem::accept_vis (*this);
+   for (auto &field : item_struct.get_struct_fields ())
+     field.get_field_type ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (EnumItemDiscriminant &item)
+ {
+   item.EnumItem::accept_vis (*this);
+   item.get_discriminant_expression ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (Enum &enum_item)
+ {
+   visit_outer_attrs (enum_item);
+   for (auto &generic : enum_item.get_generic_params ())
+     generic->accept_vis (*this);
+   if (enum_item.has_where_clause ())
+     visit_where_clause (enum_item.get_where_clause ());
+   for (auto &item : enum_item.get_variants ())
+     item->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (Union &union_item)
+ {
+   visit_outer_attrs (union_item);
+   for (auto &generic : union_item.get_generic_params ())
+     generic->accept_vis (*this);
+   if (union_item.has_where_clause ())
+     visit_where_clause (union_item.get_where_clause ());
+   for (auto &variant : union_item.get_variants ())
+     visit_struct_field (variant);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ConstantItem &const_item)
+ {
+   visit_outer_attrs (const_item);
+   const_item.get_type ().accept_vis (*this);
+   const_item.get_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (StaticItem &static_item)
+ {
+   visit_outer_attrs (static_item);
+   static_item.get_type ().accept_vis (*this);
+   static_item.get_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::visit_self_param (SelfParam &self_param)
+ {
+   if (self_param.has_lifetime ())
+     {
+       Lifetime lifetime = self_param.get_lifetime ();
+       lifetime.accept_vis (*this);
+     }
+   if (self_param.has_type ())
+     self_param.get_type ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (TraitItemFunc &item)
+ {
+   visit_outer_attrs (item);
+   TraitFunctionDecl &decl = item.get_decl ();
+   for (auto &generic : decl.get_generic_params ())
+     generic->accept_vis (*this);
+   if (decl.get_self ().has_value ())
+     visit_self_param (decl.get_self ().value ());
+   for (auto &param : decl.get_function_params ())
+     visit_function_param (param);
+   if (decl.has_return_type ())
+     decl.get_return_type ().accept_vis (*this);
+   if (decl.has_where_clause ())
+     visit_where_clause (decl.get_where_clause ());
+   if (item.has_definition ())
+     item.get_block_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (TraitItemConst &item)
+ {
+   visit_outer_attrs (item);
+   item.get_type ().accept_vis (*this);
+   if (item.has_expr ())
+     item.get_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (TraitItemType &item)
+ {
+   visit_outer_attrs (item);
+   for (auto &bound : item.get_type_param_bounds ())
+     bound->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::visit_where_clause (const WhereClause &where_clause)
+ {
+   for (auto &item : where_clause.get_items ())
+     item->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::visit_where_clause (WhereClause &where_clause)
+ {
+   for (auto &item : where_clause.get_items ())
+     {
+       item->accept_vis (*this);
+     }
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (WhereClauseItem &node)
+ {}
+ 
+ void
+ DefaultHIRVisitor::walk (Trait &trait)
+ {
+   visit_outer_attrs (trait);
+   for (auto &generic : trait.get_generic_params ())
+     generic->accept_vis (*this);
+   if (trait.has_where_clause ())
+     visit_where_clause (trait.get_where_clause ());
+   for (auto &bound : trait.get_type_param_bounds ())
+     bound->accept_vis (*this);
+   for (auto &item : trait.get_trait_items ())
+     item->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ImplBlock &impl)
+ {
+   visit_outer_attrs (impl);
+   for (auto &generic : impl.get_generic_params ())
+     generic->accept_vis (*this);
+   if (impl.has_trait_ref ())
+     impl.get_trait_ref ().accept_vis (*this);
+   impl.get_type ().accept_vis (*this);
+   if (impl.has_where_clause ())
+     visit_where_clause (impl.get_where_clause ());
+   visit_inner_attrs (impl);
+   for (auto &item : impl.get_impl_items ())
+     item->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ExternalStaticItem &item)
+ {
+   visit_outer_attrs (item);
+   item.get_item_type ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::visit_named_function_param (NamedFunctionParam &param)
+ {
+   param.get_type ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ExternalFunctionItem &item)
+ {
+   visit_outer_attrs (item);
+   for (auto &generic : item.get_generic_params ())
+     generic->accept_vis (*this);
+   for (auto &param : item.get_function_params ())
+     visit_named_function_param (param);
+   if (item.has_return_type ())
+     item.get_return_type ().accept_vis (*this);
+   if (item.has_where_clause ())
+     visit_where_clause (item.get_where_clause ());
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ExternalTypeItem &item)
+ {
+   visit_outer_attrs (item);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ExternBlock &block)
+ {
+   visit_outer_attrs (block);
+   visit_inner_attrs (block);
+   for (auto &item : block.get_extern_items ())
+     item->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (LiteralPattern &)
+ {}
+ 
+ void
+ DefaultHIRVisitor::walk (IdentifierPattern &pattern)
+ {
+   if (pattern.has_subpattern ())
+     pattern.get_subpattern ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (WildcardPattern &)
+ {}
+ 
+ void
+ DefaultHIRVisitor::walk (RangePatternBoundLiteral &)
+ {}
+ 
+ void
+ DefaultHIRVisitor::walk (RangePatternBoundPath &bound)
+ {
+   bound.get_path ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (RangePatternBoundQualPath &bound)
+ {
+   bound.get_qualified_path ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (RangePattern &pattern)
+ {
+   pattern.get_lower_bound ().accept_vis (*this);
+   pattern.get_upper_bound ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ReferencePattern &pattern)
+ {
+   pattern.get_referenced_pattern ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (StructPatternFieldTuplePat &field)
+ {
+   visit_outer_attrs (field);
+   field.get_tuple_pattern ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (StructPatternFieldIdentPat &field)
+ {
+   visit_outer_attrs (field);
+   field.get_pattern ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (StructPatternFieldIdent &field)
+ {
+   visit_outer_attrs (field);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (StructPattern &pattern)
+ {
+   pattern.get_path ().accept_vis (*this);
+   StructPatternElements &elements = pattern.get_struct_pattern_elems ();
+   for (auto &field : elements.get_struct_pattern_fields ())
+     field->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (TupleStructItemsNoRange &tuple_items)
+ {
+   for (auto &item : tuple_items.get_patterns ())
+     item->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (TupleStructItemsRange &tuple_items)
+ {
+   for (auto &lower : tuple_items.get_lower_patterns ())
+     lower->accept_vis (*this);
+   for (auto &upper : tuple_items.get_upper_patterns ())
+     upper->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (TupleStructPattern &pattern)
+ {
+   pattern.get_path ().accept_vis (*this);
+   pattern.get_items ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (TuplePatternItemsMultiple &tuple_items)
+ {
+   for (auto &pattern : tuple_items.get_patterns ())
+     pattern->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (TuplePatternItemsRanged &tuple_items)
+ {
+   for (auto &lower : tuple_items.get_lower_patterns ())
+     lower->accept_vis (*this);
+   for (auto &upper : tuple_items.get_upper_patterns ())
+     upper->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (TuplePattern &pattern)
+ {
+   pattern.get_items ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (SlicePattern &pattern)
+ {
+   for (auto &item : pattern.get_items ())
+     item->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (AltPattern &pattern)
+ {
+   for (auto &item : pattern.get_alts ())
+     item->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (EmptyStmt &stmt)
+ {}
+ 
+ void
+ DefaultHIRVisitor::walk (LetStmt &stmt)
+ {
+   visit_outer_attrs (stmt);
+   stmt.get_pattern ().accept_vis (*this);
+   if (stmt.has_type ())
+     stmt.get_type ().accept_vis (*this);
+   if (stmt.has_init_expr ())
+     stmt.get_init_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ExprStmt &stmt)
+ {
+   stmt.get_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (TraitBound &bound)
+ {
+   for (auto &lifetime : bound.get_for_lifetimes ())
+     lifetime.accept_vis (*this);
+   bound.get_path ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ImplTraitType &type)
+ {
+   for (auto &bound : type.get_type_param_bounds ())
+     bound->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (TraitObjectType &type)
+ {
+   for (auto &bound : type.get_type_param_bounds ())
+     bound->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ParenthesisedType &type)
+ {
+   type.get_type_in_parens ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (TupleType &type)
+ {
+   for (auto &elem : type.get_elems ())
+     elem->accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (NeverType &type)
+ {}
+ 
+ void
+ DefaultHIRVisitor::walk (RawPointerType &type)
+ {
+   type.get_type ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ReferenceType &type)
+ {
+   if (type.has_lifetime ())
+     type.get_lifetime ().accept_vis (*this);
+   type.get_base_type ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (ArrayType &type)
+ {
+   type.get_element_type ().accept_vis (*this);
+   type.get_size_expr ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (SliceType &type)
+ {
+   type.get_element_type ().accept_vis (*this);
+ }
+ 
+ void
+ DefaultHIRVisitor::walk (InferredType &type)
+ {}
+ 
+ void
+ DefaultHIRVisitor::walk (BareFunctionType &type)
+ {
+   for (auto &lifetime : type.get_for_lifetimes ())
+     lifetime.accept_vis (*this);
+   for (auto &param : type.get_function_params ())
+     param.get_type ().accept_vis (*this);
+   if (type.has_return_type ())
+     type.get_return_type ().accept_vis (*this);
+ }
+ 
+ } // namespace HIR
+ } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/tree/rust-hir-visitor.h gcc-16-20250810/gcc/rust/hir/tree/rust-hir-visitor.h
*** gcc-16-20250803/gcc/rust/hir/tree/rust-hir-visitor.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/tree/rust-hir-visitor.h	Sun Aug 10 22:32:08 2025
***************
*** 20,25 ****
--- 20,26 ----
  #define RUST_HIR_VISITOR_H
  
  #include "rust-hir-full-decls.h"
+ #include "rust-ast.h"
  
  namespace Rust {
  namespace HIR {
*************** public:
*** 64,69 ****
--- 65,72 ----
    virtual void visit (MethodCallExpr &expr) = 0;
    virtual void visit (FieldAccessExpr &expr) = 0;
    virtual void visit (BlockExpr &expr) = 0;
+   virtual void visit (AnonConst &expr) = 0;
+   virtual void visit (ConstBlock &expr) = 0;
    virtual void visit (ClosureExpr &expr) = 0;
    virtual void visit (ContinueExpr &expr) = 0;
    virtual void visit (BreakExpr &expr) = 0;
*************** public:
*** 85,90 ****
--- 88,94 ----
    virtual void visit (AsyncBlockExpr &expr) = 0;
    virtual void visit (InlineAsm &expr) = 0;
    virtual void visit (LlvmInlineAsm &expr) = 0;
+   virtual void visit (OffsetOf &expr) = 0;
    virtual void visit (TypeParam &param) = 0;
    virtual void visit (ConstGenericParam &param) = 0;
    virtual void visit (LifetimeWhereClauseItem &item) = 0;
*************** public:
*** 153,158 ****
--- 157,468 ----
    virtual void visit (BareFunctionType &type) = 0;
  };
  
+ class DefaultHIRVisitor : public HIRFullVisitor
+ {
+ public:
+   virtual void visit_where_clause (WhereClause &);
+   virtual void visit_where_clause (const WhereClause &);
+   virtual void visit_named_function_param (NamedFunctionParam &param);
+   virtual void visit_function_param (FunctionParam &param);
+   virtual void visit_self_param (SelfParam &param);
+   virtual void visit_match_arm (MatchArm &arm);
+   virtual void visit_match_case (MatchCase &);
+   virtual void visit_struct_field (StructField &field);
+   virtual void visit_generic_args (GenericArgs &args);
+   virtual void visit_qualified_path_type (QualifiedPathType &);
+   virtual void visit_path_expr_segment (PathExprSegment &segment);
+   virtual void visit_closure_param (ClosureParam &param);
+   virtual void visit_loop_label (LoopLabel &);
+ 
+   virtual void visit_attribute (AST::Attribute &attr)
+   {
+     visit_attribute (static_cast<const AST::Attribute &> (attr));
+   }
+   virtual void visit_attribute (const AST::Attribute &attr) {}
+   template <typename T> void visit_outer_attrs (T &node)
+   {
+     for (auto &attr : node.get_outer_attrs ())
+       visit_attribute (attr);
+   }
+   template <typename T> void visit_inner_attrs (T &node)
+   {
+     for (auto &attr : node.get_inner_attrs ())
+       visit_attribute (attr);
+   }
+ 
+   virtual void visit (WhereClauseItem &node) { walk (node); }
+ 
+   virtual void visit (Lifetime &node) override { walk (node); }
+   virtual void visit (LifetimeParam &node) override { walk (node); }
+   virtual void visit (PathInExpression &node) override { walk (node); }
+   virtual void visit (TypePathSegment &node) override { walk (node); }
+   virtual void visit (TypePathSegmentGeneric &node) override { walk (node); }
+   virtual void visit (TypePathSegmentFunction &node) override { walk (node); }
+   virtual void visit (TypePath &node) override { walk (node); }
+   virtual void visit (QualifiedPathInExpression &node) override { walk (node); }
+   virtual void visit (QualifiedPathInType &node) override { walk (node); }
+   virtual void visit (LiteralExpr &node) override { walk (node); }
+   virtual void visit (BorrowExpr &node) override { walk (node); }
+   virtual void visit (DereferenceExpr &node) override { walk (node); }
+   virtual void visit (ErrorPropagationExpr &node) override { walk (node); }
+   virtual void visit (NegationExpr &node) override { walk (node); }
+   virtual void visit (ArithmeticOrLogicalExpr &node) override { walk (node); }
+   virtual void visit (ComparisonExpr &node) override { walk (node); }
+   virtual void visit (LazyBooleanExpr &node) override { walk (node); }
+   virtual void visit (TypeCastExpr &node) override { walk (node); }
+   virtual void visit (AssignmentExpr &node) override { walk (node); }
+   virtual void visit (CompoundAssignmentExpr &node) override { walk (node); }
+   virtual void visit (GroupedExpr &node) override { walk (node); }
+   virtual void visit (ArrayElemsValues &node) override { walk (node); }
+   virtual void visit (ArrayElemsCopied &node) override { walk (node); }
+   virtual void visit (ArrayExpr &node) override { walk (node); }
+   virtual void visit (ArrayIndexExpr &node) override { walk (node); }
+   virtual void visit (TupleExpr &node) override { walk (node); }
+   virtual void visit (TupleIndexExpr &node) override { walk (node); }
+   virtual void visit (StructExprStruct &node) override { walk (node); }
+   virtual void visit (StructExprFieldIdentifier &node) override { walk (node); }
+   virtual void visit (StructExprFieldIdentifierValue &node) override
+   {
+     walk (node);
+   }
+   virtual void visit (StructExprFieldIndexValue &node) override { walk (node); }
+   virtual void visit (StructExprStructFields &node) override { walk (node); }
+   virtual void visit (StructExprStructBase &node) override { walk (node); }
+   virtual void visit (CallExpr &node) override { walk (node); }
+   virtual void visit (MethodCallExpr &node) override { walk (node); }
+   virtual void visit (FieldAccessExpr &node) override { walk (node); }
+   virtual void visit (ClosureExpr &node) override { walk (node); }
+   virtual void visit (BlockExpr &node) override { walk (node); }
+   virtual void visit (AnonConst &node) override { walk (node); }
+   virtual void visit (ConstBlock &node) override { walk (node); }
+   virtual void visit (ContinueExpr &node) override { walk (node); }
+   virtual void visit (BreakExpr &node) override { walk (node); }
+   virtual void visit (RangeFromToExpr &node) override { walk (node); }
+   virtual void visit (RangeFromExpr &node) override { walk (node); }
+   virtual void visit (RangeToExpr &node) override { walk (node); }
+   virtual void visit (RangeFullExpr &node) override { walk (node); }
+   virtual void visit (RangeFromToInclExpr &node) override { walk (node); }
+   virtual void visit (RangeToInclExpr &node) override { walk (node); }
+   virtual void visit (ReturnExpr &node) override { walk (node); }
+   virtual void visit (UnsafeBlockExpr &node) override { walk (node); }
+   virtual void visit (LoopExpr &node) override { walk (node); }
+   virtual void visit (WhileLoopExpr &node) override { walk (node); }
+   virtual void visit (WhileLetLoopExpr &node) override { walk (node); }
+   virtual void visit (IfExpr &node) override { walk (node); }
+   virtual void visit (IfExprConseqElse &node) override { walk (node); }
+   virtual void visit (MatchExpr &node) override { walk (node); }
+   virtual void visit (AwaitExpr &node) override { walk (node); }
+   virtual void visit (AsyncBlockExpr &node) override { walk (node); }
+   virtual void visit (InlineAsm &node) override { walk (node); }
+   virtual void visit (LlvmInlineAsm &node) override { walk (node); }
+   virtual void visit (OffsetOf &node) override { walk (node); }
+   virtual void visit (TypeParam &node) override { walk (node); }
+   virtual void visit (ConstGenericParam &node) override { walk (node); }
+   virtual void visit (LifetimeWhereClauseItem &node) override { walk (node); }
+   virtual void visit (TypeBoundWhereClauseItem &node) override { walk (node); }
+   virtual void visit (Module &node) override { walk (node); }
+   virtual void visit (ExternCrate &node) override { walk (node); }
+   virtual void visit (UseTreeGlob &node) override { walk (node); }
+   virtual void visit (UseTreeList &node) override { walk (node); }
+   virtual void visit (UseTreeRebind &node) override { walk (node); }
+   virtual void visit (UseDeclaration &node) override { walk (node); }
+   virtual void visit (Function &node) override { walk (node); }
+   virtual void visit (TypeAlias &node) override { walk (node); }
+   virtual void visit (StructStruct &node) override { walk (node); }
+   virtual void visit (TupleStruct &node) override { walk (node); }
+   virtual void visit (EnumItem &node) override { walk (node); }
+   virtual void visit (EnumItemTuple &node) override { walk (node); }
+   virtual void visit (EnumItemStruct &node) override { walk (node); }
+   virtual void visit (EnumItemDiscriminant &node) override { walk (node); }
+   virtual void visit (Enum &node) override { walk (node); }
+   virtual void visit (Union &node) override { walk (node); }
+   virtual void visit (ConstantItem &node) override { walk (node); }
+   virtual void visit (StaticItem &node) override { walk (node); }
+   virtual void visit (TraitItemFunc &node) override { walk (node); }
+   virtual void visit (TraitItemConst &node) override { walk (node); }
+   virtual void visit (TraitItemType &node) override { walk (node); }
+   virtual void visit (Trait &node) override { walk (node); }
+   virtual void visit (ImplBlock &node) override { walk (node); }
+   virtual void visit (ExternalStaticItem &node) override { walk (node); }
+   virtual void visit (ExternalFunctionItem &node) override { walk (node); }
+   virtual void visit (ExternalTypeItem &node) override { walk (node); }
+   virtual void visit (ExternBlock &node) override { walk (node); }
+   virtual void visit (LiteralPattern &node) override { walk (node); }
+   virtual void visit (IdentifierPattern &node) override { walk (node); }
+   virtual void visit (WildcardPattern &node) override { walk (node); }
+   virtual void visit (RangePatternBoundLiteral &node) override { walk (node); }
+   virtual void visit (RangePatternBoundPath &node) override { walk (node); }
+   virtual void visit (RangePatternBoundQualPath &node) override { walk (node); }
+   virtual void visit (RangePattern &node) override { walk (node); }
+   virtual void visit (ReferencePattern &node) override { walk (node); }
+   virtual void visit (StructPatternFieldTuplePat &node) override
+   {
+     walk (node);
+   }
+   virtual void visit (StructPatternFieldIdentPat &node) override
+   {
+     walk (node);
+   }
+   virtual void visit (StructPatternFieldIdent &node) override { walk (node); }
+   virtual void visit (StructPattern &node) override { walk (node); }
+   virtual void visit (TupleStructItemsNoRange &node) override { walk (node); }
+   virtual void visit (TupleStructItemsRange &node) override { walk (node); }
+   virtual void visit (TupleStructPattern &node) override { walk (node); }
+   virtual void visit (TuplePatternItemsMultiple &node) override { walk (node); }
+   virtual void visit (TuplePatternItemsRanged &node) override { walk (node); }
+   virtual void visit (TuplePattern &node) override { walk (node); }
+   virtual void visit (SlicePattern &node) override { walk (node); }
+   virtual void visit (AltPattern &node) override { walk (node); }
+   virtual void visit (EmptyStmt &node) override { walk (node); }
+   virtual void visit (LetStmt &node) override { walk (node); }
+   virtual void visit (ExprStmt &node) override { walk (node); }
+   virtual void visit (TraitBound &node) override { walk (node); }
+   virtual void visit (ImplTraitType &node) override { walk (node); }
+   virtual void visit (TraitObjectType &node) override { walk (node); }
+   virtual void visit (ParenthesisedType &node) override { walk (node); }
+   virtual void visit (TupleType &node) override { walk (node); }
+   virtual void visit (NeverType &node) override { walk (node); }
+   virtual void visit (RawPointerType &node) override { walk (node); }
+   virtual void visit (ReferenceType &node) override { walk (node); }
+   virtual void visit (ArrayType &node) override { walk (node); }
+   virtual void visit (SliceType &node) override { walk (node); }
+   virtual void visit (InferredType &node) override { walk (node); }
+   virtual void visit (BareFunctionType &node) override { walk (node); }
+ 
+ protected:
+   virtual void walk (WhereClauseItem &) final;
+ 
+   virtual void walk (Lifetime &) final;
+   virtual void walk (LifetimeParam &) final;
+   virtual void walk (PathInExpression &) final;
+   virtual void walk (TypePathSegment &) final;
+   virtual void walk (TypePathSegmentGeneric &) final;
+   virtual void walk (TypePathSegmentFunction &) final;
+   virtual void walk (TypePath &) final;
+   virtual void walk (QualifiedPathInExpression &) final;
+   virtual void walk (QualifiedPathInType &) final;
+ 
+   virtual void walk (LiteralExpr &) final;
+   virtual void walk (BorrowExpr &) final;
+   virtual void walk (DereferenceExpr &) final;
+   virtual void walk (ErrorPropagationExpr &) final;
+   virtual void walk (NegationExpr &) final;
+   virtual void walk (ArithmeticOrLogicalExpr &) final;
+   virtual void walk (ComparisonExpr &) final;
+   virtual void walk (LazyBooleanExpr &) final;
+   virtual void walk (TypeCastExpr &) final;
+   virtual void walk (AssignmentExpr &) final;
+   virtual void walk (CompoundAssignmentExpr &) final;
+   virtual void walk (GroupedExpr &) final;
+ 
+   virtual void walk (ArrayElemsValues &) final;
+   virtual void walk (ArrayElemsCopied &) final;
+   virtual void walk (ArrayExpr &) final;
+   virtual void walk (ArrayIndexExpr &) final;
+   virtual void walk (TupleExpr &) final;
+   virtual void walk (TupleIndexExpr &) final;
+   virtual void walk (StructExprStruct &) final;
+   virtual void walk (StructExprFieldIdentifier &) final;
+   virtual void walk (StructExprFieldIdentifierValue &) final;
+   virtual void walk (StructExprFieldIndexValue &) final;
+   virtual void walk (StructExprStructFields &) final;
+   virtual void walk (StructExprStructBase &) final;
+   virtual void walk (CallExpr &) final;
+   virtual void walk (MethodCallExpr &) final;
+   virtual void walk (FieldAccessExpr &) final;
+   virtual void walk (ClosureExpr &) final;
+   virtual void walk (BlockExpr &) final;
+   virtual void walk (AnonConst &) final;
+   virtual void walk (ConstBlock &) final;
+   virtual void walk (ContinueExpr &) final;
+   virtual void walk (BreakExpr &) final;
+   virtual void walk (RangeFromToExpr &) final;
+   virtual void walk (RangeFromExpr &) final;
+   virtual void walk (RangeToExpr &) final;
+   virtual void walk (RangeFullExpr &) final;
+   virtual void walk (RangeFromToInclExpr &) final;
+   virtual void walk (RangeToInclExpr &) final;
+   virtual void walk (ReturnExpr &) final;
+   virtual void walk (UnsafeBlockExpr &) final;
+   virtual void walk (LoopExpr &) final;
+   virtual void walk (WhileLoopExpr &) final;
+   virtual void walk (WhileLetLoopExpr &) final;
+   virtual void walk (IfExpr &) final;
+   virtual void walk (IfExprConseqElse &) final;
+   virtual void walk (MatchExpr &) final;
+   virtual void walk (AwaitExpr &) final;
+   virtual void walk (AsyncBlockExpr &) final;
+   virtual void walk (InlineAsm &) final;
+   virtual void walk (LlvmInlineAsm &) final;
+   virtual void walk (OffsetOf &) final;
+   virtual void walk (TypeParam &) final;
+   virtual void walk (ConstGenericParam &) final;
+   virtual void walk (LifetimeWhereClauseItem &) final;
+   virtual void walk (TypeBoundWhereClauseItem &) final;
+   virtual void walk (Module &) final;
+   virtual void walk (ExternCrate &) final;
+   virtual void walk (UseTreeGlob &) final;
+   virtual void walk (UseTreeList &) final;
+   virtual void walk (UseTreeRebind &) final;
+   virtual void walk (UseDeclaration &) final;
+   virtual void walk (Function &) final;
+   virtual void walk (TypeAlias &) final;
+   virtual void walk (StructStruct &) final;
+   virtual void walk (TupleStruct &) final;
+   virtual void walk (EnumItem &) final;
+   virtual void walk (EnumItemTuple &) final;
+   virtual void walk (EnumItemStruct &) final;
+   virtual void walk (EnumItemDiscriminant &) final;
+   virtual void walk (Enum &) final;
+   virtual void walk (Union &) final;
+   virtual void walk (ConstantItem &) final;
+   virtual void walk (StaticItem &) final;
+   virtual void walk (TraitItemFunc &) final;
+   virtual void walk (TraitItemConst &) final;
+   virtual void walk (TraitItemType &) final;
+   virtual void walk (Trait &) final;
+   virtual void walk (ImplBlock &) final;
+   virtual void walk (ExternalStaticItem &) final;
+   virtual void walk (ExternalFunctionItem &) final;
+   virtual void walk (ExternalTypeItem &) final;
+   virtual void walk (ExternBlock &) final;
+   virtual void walk (LiteralPattern &) final;
+   virtual void walk (IdentifierPattern &) final;
+   virtual void walk (WildcardPattern &) final;
+   virtual void walk (RangePatternBoundLiteral &) final;
+   virtual void walk (RangePatternBoundPath &) final;
+   virtual void walk (RangePatternBoundQualPath &) final;
+   virtual void walk (RangePattern &) final;
+   virtual void walk (ReferencePattern &) final;
+   virtual void walk (StructPatternFieldTuplePat &) final;
+   virtual void walk (StructPatternFieldIdentPat &) final;
+   virtual void walk (StructPatternFieldIdent &) final;
+   virtual void walk (StructPattern &) final;
+   virtual void walk (TupleStructItemsNoRange &) final;
+   virtual void walk (TupleStructItemsRange &) final;
+   virtual void walk (TupleStructPattern &) final;
+   virtual void walk (TuplePatternItemsMultiple &) final;
+   virtual void walk (TuplePatternItemsRanged &) final;
+   virtual void walk (TuplePattern &) final;
+   virtual void walk (SlicePattern &) final;
+   virtual void walk (AltPattern &) final;
+   virtual void walk (EmptyStmt &) final;
+   virtual void walk (LetStmt &) final;
+   virtual void walk (ExprStmt &) final;
+   virtual void walk (TraitBound &) final;
+   virtual void walk (ImplTraitType &) final;
+   virtual void walk (TraitObjectType &) final;
+   virtual void walk (ParenthesisedType &) final;
+   virtual void walk (TupleType &) final;
+   virtual void walk (NeverType &) final;
+   virtual void walk (RawPointerType &) final;
+   virtual void walk (ReferenceType &) final;
+   virtual void walk (ArrayType &) final;
+   virtual void walk (SliceType &) final;
+   virtual void walk (InferredType &) final;
+   virtual void walk (BareFunctionType &) final;
+ };
+ 
  class HIRFullVisitorBase : public HIRFullVisitor
  {
  public:
*************** public:
*** 201,206 ****
--- 511,518 ----
    virtual void visit (FieldAccessExpr &) override {}
    virtual void visit (ClosureExpr &) override {}
    virtual void visit (BlockExpr &) override {}
+   virtual void visit (AnonConst &) override {}
+   virtual void visit (ConstBlock &) override {}
    virtual void visit (ContinueExpr &) override {}
    virtual void visit (BreakExpr &) override {}
    virtual void visit (RangeFromToExpr &) override {}
*************** public:
*** 222,227 ****
--- 534,540 ----
    virtual void visit (AsyncBlockExpr &) override {}
    virtual void visit (InlineAsm &) override {}
    virtual void visit (LlvmInlineAsm &) override {}
+   virtual void visit (OffsetOf &) override {}
  
    virtual void visit (TypeParam &) override {}
    virtual void visit (ConstGenericParam &) override {}
*************** public:
*** 427,432 ****
--- 740,747 ----
    virtual void visit (MethodCallExpr &expr) = 0;
    virtual void visit (FieldAccessExpr &expr) = 0;
    virtual void visit (BlockExpr &expr) = 0;
+   virtual void visit (AnonConst &expr) = 0;
+   virtual void visit (ConstBlock &expr) = 0;
    virtual void visit (ContinueExpr &expr) = 0;
    virtual void visit (BreakExpr &expr) = 0;
    virtual void visit (RangeFromToExpr &expr) = 0;
*************** public:
*** 443,448 ****
--- 758,764 ----
    virtual void visit (IfExpr &expr) = 0;
    virtual void visit (IfExprConseqElse &expr) = 0;
    virtual void visit (InlineAsm &expr) = 0;
+   virtual void visit (OffsetOf &expr) = 0;
    virtual void visit (LlvmInlineAsm &expr) = 0;
    virtual void visit (MatchExpr &expr) = 0;
    virtual void visit (AwaitExpr &expr) = 0;
diff -Nrcpad gcc-16-20250803/gcc/rust/hir/tree/rust-hir.cc gcc-16-20250810/gcc/rust/hir/tree/rust-hir.cc
*** gcc-16-20250803/gcc/rust/hir/tree/rust-hir.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/hir/tree/rust-hir.cc	Sun Aug 10 22:32:08 2025
*************** UseTreeGlob::as_string () const
*** 577,583 ****
        return "*";
      case GLOBAL:
        return "::*";
!       case PATH_PREFIXED: {
  	std::string path_str = path.as_string ();
  	return path_str + "::*";
        }
--- 577,584 ----
        return "*";
      case GLOBAL:
        return "::*";
!     case PATH_PREFIXED:
!       {
  	std::string path_str = path.as_string ();
  	return path_str + "::*";
        }
*************** UseTreeList::as_string () const
*** 600,606 ****
      case GLOBAL:
        path_str = "::{";
        break;
!       case PATH_PREFIXED: {
  	path_str = path.as_string () + "::{";
  	break;
        }
--- 601,608 ----
      case GLOBAL:
        path_str = "::{";
        break;
!     case PATH_PREFIXED:
!       {
  	path_str = path.as_string () + "::{";
  	break;
        }
*************** BlockExpr::as_string () const
*** 1048,1053 ****
--- 1050,1085 ----
  }
  
  std::string
+ AnonConst::as_string () const
+ {
+   std::string istr = indent_spaces (enter);
+   std::string str = istr + "AnonConst:\n" + istr;
+ 
+   if (expr.has_value ())
+     str += get_inner_expr ().as_string ();
+   else
+     str += "_";
+ 
+   str += "\n" + indent_spaces (out);
+ 
+   return str;
+ }
+ 
+ std::string
+ ConstBlock::as_string () const
+ {
+   std::string istr = indent_spaces (enter);
+ 
+   std::string str = istr + "ConstBlock:\n" + istr;
+ 
+   str += get_const_expr ().as_string ();
+ 
+   str += "\n" + indent_spaces (out);
+ 
+   return str;
+ }
+ 
+ std::string
  TypeAlias::as_string () const
  {
    std::string str = VisItem::as_string ();
*************** IdentifierPattern::as_string () const
*** 2579,2587 ****
  
    str += variable_ident.as_string ();
  
!   if (has_pattern_to_bind ())
      {
!       str += " @ " + to_bind->as_string ();
      }
  
    return str;
--- 2611,2619 ----
  
    str += variable_ident.as_string ();
  
!   if (has_subpattern ())
      {
!       str += " @ " + subpattern->as_string ();
      }
  
    return str;
*************** BlockExpr::accept_vis (HIRFullVisitor &v
*** 4055,4060 ****
--- 4087,4104 ----
  }
  
  void
+ AnonConst::accept_vis (HIRFullVisitor &vis)
+ {
+   vis.visit (*this);
+ }
+ 
+ void
+ ConstBlock::accept_vis (HIRFullVisitor &vis)
+ {
+   vis.visit (*this);
+ }
+ 
+ void
  ContinueExpr::accept_vis (HIRFullVisitor &vis)
  {
    vis.visit (*this);
*************** BlockExpr::accept_vis (HIRExpressionVisi
*** 5025,5030 ****
--- 5069,5086 ----
  {
    vis.visit (*this);
  }
+ 
+ void
+ AnonConst::accept_vis (HIRExpressionVisitor &vis)
+ {
+   vis.visit (*this);
+ }
+ 
+ void
+ ConstBlock::accept_vis (HIRExpressionVisitor &vis)
+ {
+   vis.visit (*this);
+ }
  
  void
  Function::accept_vis (HIRStmtVisitor &vis)
diff -Nrcpad gcc-16-20250803/gcc/rust/lang.opt gcc-16-20250810/gcc/rust/lang.opt
*** gcc-16-20250803/gcc/rust/lang.opt	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/lang.opt	Sun Aug 10 22:32:08 2025
*************** EnumValue
*** 205,211 ****
  Enum(frust_compile_until) String(end) Value(13)
  
  frust-name-resolution-2.0
! Rust Var(flag_name_resolution_2_0)
  Use the temporary and experimental name resolution pipeline instead of the stable one
  
  frust-borrowcheck
--- 205,211 ----
  Enum(frust_compile_until) String(end) Value(13)
  
  frust-name-resolution-2.0
! Rust Var(flag_name_resolution_2_0) Init(1)
  Use the temporary and experimental name resolution pipeline instead of the stable one
  
  frust-borrowcheck
*************** frust-overflow-checks
*** 229,232 ****
--- 229,236 ----
  Rust Var(flag_overflow_checks) Init(1)
  Enable the overflow checks in code generation
  
+ frust-assume-builtin-offset-of
+ Rust Var(flag_assume_builtin_offset_of)
+ Define a built-in offset_of macro in the compiler and assume it is present
+ 
  ; This comment is to ensure we retain the blank line above.
diff -Nrcpad gcc-16-20250803/gcc/rust/lex/rust-lex.cc gcc-16-20250810/gcc/rust/lex/rust-lex.cc
*** gcc-16-20250803/gcc/rust/lex/rust-lex.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/lex/rust-lex.cc	Sun Aug 10 22:32:08 2025
*************** Lexer::parse_escape (char opening_char)
*** 1317,1323 ****
  
    switch (current_char.value)
      {
!       case 'x': {
  	auto hex_escape_pair = parse_partial_hex_escape ();
  	long hexLong = hex_escape_pair.first;
  	additional_length_offset += hex_escape_pair.second;
--- 1317,1324 ----
  
    switch (current_char.value)
      {
!     case 'x':
!       {
  	auto hex_escape_pair = parse_partial_hex_escape ();
  	long hexLong = hex_escape_pair.first;
  	additional_length_offset += hex_escape_pair.second;
*************** Lexer::parse_utf8_escape ()
*** 1400,1406 ****
  
    switch (current_char.value)
      {
!       case 'x': {
  	auto hex_escape_pair = parse_partial_hex_escape ();
  	long hexLong = hex_escape_pair.first;
  	additional_length_offset += hex_escape_pair.second;
--- 1401,1408 ----
  
    switch (current_char.value)
      {
!     case 'x':
!       {
  	auto hex_escape_pair = parse_partial_hex_escape ();
  	long hexLong = hex_escape_pair.first;
  	additional_length_offset += hex_escape_pair.second;
*************** Lexer::parse_utf8_escape ()
*** 1438,1444 ****
      case '"':
        output_char = '"';
        break;
!       case 'u': {
  	auto unicode_escape_pair = parse_partial_unicode_escape ();
  	output_char = unicode_escape_pair.first;
  	additional_length_offset += unicode_escape_pair.second;
--- 1440,1447 ----
      case '"':
        output_char = '"';
        break;
!     case 'u':
!       {
  	auto unicode_escape_pair = parse_partial_unicode_escape ();
  	output_char = unicode_escape_pair.first;
  	additional_length_offset += unicode_escape_pair.second;
*************** Lexer::parse_raw_byte_string (location_t
*** 1894,1899 ****
--- 1897,1907 ----
  	      break;
  	    }
  	}
+       else if (current_char.is_eof ())
+ 	{
+ 	  rust_error_at (string_begin_locus, "unended raw byte string literal");
+ 	  return Token::make (END_OF_FILE, get_current_location ());
+ 	}
        else if (current_char.value > 127)
  	{
  	  rust_error_at (get_current_location (),
*************** Lexer::parse_raw_byte_string (location_t
*** 1901,1911 ****
  			 current_char.as_string ().c_str ());
  	  current_char = 0;
  	}
-       else if (current_char.is_eof ())
- 	{
- 	  rust_error_at (string_begin_locus, "unended raw byte string literal");
- 	  return Token::make (END_OF_FILE, get_current_location ());
- 	}
  
        length++;
        current_column++;
--- 1909,1914 ----
diff -Nrcpad gcc-16-20250803/gcc/rust/lex/rust-lex.h gcc-16-20250810/gcc/rust/lex/rust-lex.h
*** gcc-16-20250803/gcc/rust/lex/rust-lex.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/lex/rust-lex.h	Sun Aug 10 22:32:08 2025
*************** private:
*** 263,270 ****
  #if CHECKING_P
  
  namespace selftest {
! void
! rust_input_source_test ();
  
  } // namespace selftest
  
--- 263,269 ----
  #if CHECKING_P
  
  namespace selftest {
! void rust_input_source_test ();
  
  } // namespace selftest
  
diff -Nrcpad gcc-16-20250803/gcc/rust/lex/rust-token.cc gcc-16-20250810/gcc/rust/lex/rust-token.cc
*** gcc-16-20250803/gcc/rust/lex/rust-token.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/lex/rust-token.cc	Sun Aug 10 22:32:08 2025
***************
*** 20,25 ****
--- 20,26 ----
  #include "rust-token.h"
  #include "rust-diagnostics.h"
  #include "rust-unicode.h"
+ #include "rust-ast.h"
  
  namespace Rust {
  // Hackily defined way to get token description for enum value using x-macros
*************** token_id_keyword_string (TokenId id)
*** 88,94 ****
    switch (id)
      {
  #define RS_TOKEN_KEYWORD_2015(id, str_ptr)                                     \
!     case id: {                                                                 \
        static const std::string str (str_ptr);                                  \
        return str;                                                              \
      }                                                                          \
--- 89,96 ----
    switch (id)
      {
  #define RS_TOKEN_KEYWORD_2015(id, str_ptr)                                     \
!   case id:                                                                     \
!     {                                                                          \
        static const std::string str (str_ptr);                                  \
        return str;                                                              \
      }                                                                          \
*************** escape_special_chars (const std::string
*** 234,239 ****
--- 236,248 ----
  
  } // namespace
  
+ TokenPtr
+ Token::make_identifier (const Identifier &ident)
+ {
+   std::string str = ident;
+   return make_identifier (ident.get_locus (), std::move (str));
+ }
+ 
  std::string
  Token::as_string () const
  {
diff -Nrcpad gcc-16-20250803/gcc/rust/lex/rust-token.h gcc-16-20250810/gcc/rust/lex/rust-token.h
*** gcc-16-20250803/gcc/rust/lex/rust-token.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/lex/rust-token.h	Sun Aug 10 22:32:08 2025
***************
*** 24,29 ****
--- 24,33 ----
  #include "rust-unicode.h"
  
  namespace Rust {
+ 
+ // used by Rust::Token::make_identifier
+ class Identifier;
+ 
  // "Primitive core types" in Rust - the different int and float types, as well
  // as some others
  enum PrimitiveCoreType
*************** typedef std::shared_ptr<Token> TokenPtr;
*** 221,245 ****
  typedef std::shared_ptr<const Token> const_TokenPtr;
  
  // Hackily defined way to get token description for enum value using x-macros
! const char *
! get_token_description (TokenId id);
  /* Hackily defined way to get token description as a string for enum value using
   * x-macros */
! const char *
! token_id_to_str (TokenId id);
  /* checks if a token is a keyword */
! bool
! token_id_is_keyword (TokenId id);
  /* gets the string associated with a keyword */
! const std::string &
! token_id_keyword_string (TokenId id);
  // Get type hint description as a string.
! const char *
! get_type_hint_string (PrimitiveCoreType type);
  
  /* Normalize string if a token is a identifier */
! std::string
! nfc_normalize_token_string (location_t loc, TokenId id, const std::string &str);
  
  // Represents a single token. Create using factory static methods.
  class Token
--- 225,244 ----
  typedef std::shared_ptr<const Token> const_TokenPtr;
  
  // Hackily defined way to get token description for enum value using x-macros
! const char *get_token_description (TokenId id);
  /* Hackily defined way to get token description as a string for enum value using
   * x-macros */
! const char *token_id_to_str (TokenId id);
  /* checks if a token is a keyword */
! bool token_id_is_keyword (TokenId id);
  /* gets the string associated with a keyword */
! const std::string &token_id_keyword_string (TokenId id);
  // Get type hint description as a string.
! const char *get_type_hint_string (PrimitiveCoreType type);
  
  /* Normalize string if a token is a identifier */
! std::string nfc_normalize_token_string (location_t loc, TokenId id,
! 					const std::string &str);
  
  // Represents a single token. Create using factory static methods.
  class Token
*************** public:
*** 329,334 ****
--- 328,335 ----
      return TokenPtr (new Token (IDENTIFIER, locus, std::move (str)));
    }
  
+   static TokenPtr make_identifier (const Identifier &ident);
+ 
    // Makes and returns a new TokenPtr of type INT_LITERAL.
    static TokenPtr make_int (location_t locus, std::string &&str,
  			    PrimitiveCoreType type_hint = CORETYPE_UNKNOWN)
diff -Nrcpad gcc-16-20250803/gcc/rust/metadata/rust-export-metadata.cc gcc-16-20250810/gcc/rust/metadata/rust-export-metadata.cc
*** gcc-16-20250803/gcc/rust/metadata/rust-export-metadata.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/metadata/rust-export-metadata.cc	Sun Aug 10 22:32:08 2025
*************** PublicInterface::write_to_path (const st
*** 263,270 ****
    FILE *nfd = fopen (path.c_str (), "wb");
    if (nfd == NULL)
      {
!       rust_error_at (UNDEF_LOCATION,
! 		     "failed to open file %qs for writing: %s",
  		     path.c_str (), xstrerror (errno));
        return;
      }
--- 263,269 ----
    FILE *nfd = fopen (path.c_str (), "wb");
    if (nfd == NULL)
      {
!       rust_error_at (UNDEF_LOCATION, "failed to open file %qs for writing: %s",
  		     path.c_str (), xstrerror (errno));
        return;
      }
diff -Nrcpad gcc-16-20250803/gcc/rust/metadata/rust-import-archive.cc gcc-16-20250810/gcc/rust/metadata/rust-import-archive.cc
*** gcc-16-20250803/gcc/rust/metadata/rust-import-archive.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/metadata/rust-import-archive.cc	Sun Aug 10 22:32:08 2025
*************** public:
*** 683,689 ****
  
    const Header &operator* () const { return this->header_; }
  
!   const Header *operator-> () const { return &this->header_; }
  
    Archive_iterator &operator++ ()
    {
--- 683,689 ----
  
    const Header &operator* () const { return this->header_; }
  
!   const Header *operator->() const { return &this->header_; }
  
    Archive_iterator &operator++ ()
    {
diff -Nrcpad gcc-16-20250803/gcc/rust/metadata/rust-imports.h gcc-16-20250810/gcc/rust/metadata/rust-imports.h
*** gcc-16-20250803/gcc/rust/metadata/rust-imports.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/metadata/rust-imports.h	Sun Aug 10 22:32:08 2025
***************
*** 11,18 ****
  
  namespace Rust {
  
! extern void
! add_search_path (const std::string &path);
  
  class Import
  {
--- 11,17 ----
  
  namespace Rust {
  
! extern void add_search_path (const std::string &path);
  
  class Import
  {
diff -Nrcpad gcc-16-20250803/gcc/rust/parse/rust-cfg-parser.h gcc-16-20250810/gcc/rust/parse/rust-cfg-parser.h
*** gcc-16-20250803/gcc/rust/parse/rust-cfg-parser.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/parse/rust-cfg-parser.h	Sun Aug 10 22:32:08 2025
*************** namespace Rust {
*** 36,50 ****
   *
   * @return false if the given input was invalid, true otherwise
   */
! bool
! parse_cfg_option (std::string &input, std::string &key, std::string &value);
  } // namespace Rust
  
  #if CHECKING_P
  
  namespace selftest {
! extern void
! rust_cfg_parser_test (void);
  } // namespace selftest
  
  #endif // CHECKING_P
--- 36,49 ----
   *
   * @return false if the given input was invalid, true otherwise
   */
! bool parse_cfg_option (std::string &input, std::string &key,
! 		       std::string &value);
  } // namespace Rust
  
  #if CHECKING_P
  
  namespace selftest {
! extern void rust_cfg_parser_test (void);
  } // namespace selftest
  
  #endif // CHECKING_P
diff -Nrcpad gcc-16-20250803/gcc/rust/parse/rust-parse-impl-lexer.cc gcc-16-20250810/gcc/rust/parse/rust-parse-impl-lexer.cc
*** gcc-16-20250803/gcc/rust/parse/rust-parse-impl-lexer.cc	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/rust/parse/rust-parse-impl-lexer.cc	Sun Aug 10 22:32:08 2025
***************
*** 0 ****
--- 1,25 ----
+ // Copyright (C) 2025 Free Software Foundation, Inc.
+ 
+ // This file is part of GCC.
+ 
+ // GCC is free software; you can redistribute it and/or modify it under
+ // the terms of the GNU General Public License as published by the Free
+ // Software Foundation; either version 3, or (at your option) any later
+ // version.
+ 
+ // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ // WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ // for more details.
+ 
+ // You should have received a copy of the GNU General Public License
+ // along with GCC; see the file COPYING3.  If not see
+ // <http://www.gnu.org/licenses/>.
+ 
+ #include "rust-parse-impl.h"
+ 
+ namespace Rust {
+ 
+ template class Parser<Lexer>;
+ 
+ } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/parse/rust-parse-impl-macro.cc gcc-16-20250810/gcc/rust/parse/rust-parse-impl-macro.cc
*** gcc-16-20250803/gcc/rust/parse/rust-parse-impl-macro.cc	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/rust/parse/rust-parse-impl-macro.cc	Sun Aug 10 22:32:08 2025
***************
*** 0 ****
--- 1,26 ----
+ // Copyright (C) 2025 Free Software Foundation, Inc.
+ 
+ // This file is part of GCC.
+ 
+ // GCC is free software; you can redistribute it and/or modify it under
+ // the terms of the GNU General Public License as published by the Free
+ // Software Foundation; either version 3, or (at your option) any later
+ // version.
+ 
+ // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ // WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ // for more details.
+ 
+ // You should have received a copy of the GNU General Public License
+ // along with GCC; see the file COPYING3.  If not see
+ // <http://www.gnu.org/licenses/>.
+ 
+ #include "rust-parse-impl.h"
+ #include "rust-macro-invoc-lexer.h"
+ 
+ namespace Rust {
+ 
+ template class Parser<MacroInvocLexer>;
+ 
+ } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/parse/rust-parse-impl-proc-macro.cc gcc-16-20250810/gcc/rust/parse/rust-parse-impl-proc-macro.cc
*** gcc-16-20250803/gcc/rust/parse/rust-parse-impl-proc-macro.cc	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/rust/parse/rust-parse-impl-proc-macro.cc	Sun Aug 10 22:32:08 2025
***************
*** 0 ****
--- 1,34 ----
+ // Copyright (C) 2025 Free Software Foundation, Inc.
+ 
+ // This file is part of GCC.
+ 
+ // GCC is free software; you can redistribute it and/or modify it under
+ // the terms of the GNU General Public License as published by the Free
+ // Software Foundation; either version 3, or (at your option) any later
+ // version.
+ 
+ // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ // WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ // for more details.
+ 
+ // You should have received a copy of the GNU General Public License
+ // along with GCC; see the file COPYING3.  If not see
+ // <http://www.gnu.org/licenses/>.
+ 
+ #include "rust-parse-impl.h"
+ #include "rust-proc-macro-invoc-lexer.h"
+ 
+ namespace Rust {
+ 
+ template std::unique_ptr<AST::Item>
+ Parser<ProcMacroInvocLexer>::parse_item (bool);
+ 
+ template std::unique_ptr<AST::Stmt>
+   Parser<ProcMacroInvocLexer>::parse_stmt (ParseRestrictions);
+ 
+ // instantiate entire class (or just more functions) if necessary
+ 
+ // template class Parser<ProcMacroInvocLexer>;
+ 
+ } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/parse/rust-parse-impl.h gcc-16-20250810/gcc/rust/parse/rust-parse-impl.h
*** gcc-16-20250803/gcc/rust/parse/rust-parse-impl.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/parse/rust-parse-impl.h	Sun Aug 10 22:32:08 2025
***************
*** 19,31 ****
  /* Template implementation for Rust::Parser. Previously in rust-parse.cc (before
   * Parser was template). Separated from rust-parse.h for readability. */
  
! /* DO NOT INCLUDE ANYWHERE - this is automatically included with rust-parse.h
   * This is also the reason why there are no include guards. */
  
  #include "rust-common.h"
  #include "rust-expr.h"
  #include "rust-item.h"
  #include "rust-common.h"
  #include "rust-token.h"
  #define INCLUDE_ALGORITHM
  #include "rust-diagnostics.h"
--- 19,35 ----
  /* Template implementation for Rust::Parser. Previously in rust-parse.cc (before
   * Parser was template). Separated from rust-parse.h for readability. */
  
! /* DO NOT INCLUDE ANYWHERE - this is automatically included
!  *   by rust-parse-impl-*.cc
   * This is also the reason why there are no include guards. */
  
+ #include "expected.h"
+ #include "rust-ast.h"
  #include "rust-common.h"
  #include "rust-expr.h"
  #include "rust-item.h"
  #include "rust-common.h"
+ #include "rust-parse.h"
  #include "rust-token.h"
  #define INCLUDE_ALGORITHM
  #include "rust-diagnostics.h"
*************** Parser<ManagedTokenSource>::skip_generic
*** 227,245 ****
        // this is good - skip token
        lexer.skip_token ();
        return true;
!       case RIGHT_SHIFT: {
  	// new implementation that should be better
  	lexer.split_current_token (RIGHT_ANGLE, RIGHT_ANGLE);
  	lexer.skip_token ();
  	return true;
        }
!       case GREATER_OR_EQUAL: {
  	// new implementation that should be better
  	lexer.split_current_token (RIGHT_ANGLE, EQUAL);
  	lexer.skip_token ();
  	return true;
        }
!       case RIGHT_SHIFT_EQ: {
  	// new implementation that should be better
  	lexer.split_current_token (RIGHT_ANGLE, GREATER_OR_EQUAL);
  	lexer.skip_token ();
--- 231,252 ----
        // this is good - skip token
        lexer.skip_token ();
        return true;
!     case RIGHT_SHIFT:
!       {
  	// new implementation that should be better
  	lexer.split_current_token (RIGHT_ANGLE, RIGHT_ANGLE);
  	lexer.skip_token ();
  	return true;
        }
!     case GREATER_OR_EQUAL:
!       {
  	// new implementation that should be better
  	lexer.split_current_token (RIGHT_ANGLE, EQUAL);
  	lexer.skip_token ();
  	return true;
        }
!     case RIGHT_SHIFT_EQ:
!       {
  	// new implementation that should be better
  	lexer.split_current_token (RIGHT_ANGLE, GREATER_OR_EQUAL);
  	lexer.skip_token ();
*************** Parser<ManagedTokenSource>::parse_simple
*** 651,660 ****
    // Parse all other simple path segments
    while (lexer.peek_token ()->get_id () == SCOPE_RESOLUTION)
      {
!       // Skip scope resolution operator
!       lexer.skip_token ();
! 
!       AST::SimplePathSegment new_segment = parse_simple_path_segment ();
  
        // Return path as currently constructed if segment in error state.
        if (new_segment.is_error ())
--- 658,664 ----
    // Parse all other simple path segments
    while (lexer.peek_token ()->get_id () == SCOPE_RESOLUTION)
      {
!       AST::SimplePathSegment new_segment = parse_simple_path_segment (1);
  
        // Return path as currently constructed if segment in error state.
        if (new_segment.is_error ())
*************** Parser<ManagedTokenSource>::parse_simple
*** 682,716 ****
  }
  
  /* Parses a single SimplePathSegment (does not handle the scope resolution
!  * operators) */
  template <typename ManagedTokenSource>
  AST::SimplePathSegment
! Parser<ManagedTokenSource>::parse_simple_path_segment ()
  {
    using namespace Values;
!   const_TokenPtr t = lexer.peek_token ();
    switch (t->get_id ())
      {
      case IDENTIFIER:
!       lexer.skip_token ();
  
        return AST::SimplePathSegment (t->get_str (), t->get_locus ());
      case SUPER:
!       lexer.skip_token ();
  
        return AST::SimplePathSegment (Keywords::SUPER, t->get_locus ());
      case SELF:
!       lexer.skip_token ();
  
        return AST::SimplePathSegment (Keywords::SELF, t->get_locus ());
      case CRATE:
!       lexer.skip_token ();
  
        return AST::SimplePathSegment (Keywords::CRATE, t->get_locus ());
      case DOLLAR_SIGN:
!       if (lexer.peek_token (1)->get_id () == CRATE)
  	{
! 	  lexer.skip_token (1);
  
  	  return AST::SimplePathSegment ("$crate", t->get_locus ());
  	}
--- 686,721 ----
  }
  
  /* Parses a single SimplePathSegment (does not handle the scope resolution
!  * operators)
!  * Starts parsing at an offset of base_peek */
  template <typename ManagedTokenSource>
  AST::SimplePathSegment
! Parser<ManagedTokenSource>::parse_simple_path_segment (int base_peek)
  {
    using namespace Values;
!   const_TokenPtr t = lexer.peek_token (base_peek);
    switch (t->get_id ())
      {
      case IDENTIFIER:
!       lexer.skip_token (base_peek);
  
        return AST::SimplePathSegment (t->get_str (), t->get_locus ());
      case SUPER:
!       lexer.skip_token (base_peek);
  
        return AST::SimplePathSegment (Keywords::SUPER, t->get_locus ());
      case SELF:
!       lexer.skip_token (base_peek);
  
        return AST::SimplePathSegment (Keywords::SELF, t->get_locus ());
      case CRATE:
!       lexer.skip_token (base_peek);
  
        return AST::SimplePathSegment (Keywords::CRATE, t->get_locus ());
      case DOLLAR_SIGN:
!       if (lexer.peek_token (base_peek + 1)->get_id () == CRATE)
  	{
! 	  lexer.skip_token (base_peek + 1);
  
  	  return AST::SimplePathSegment ("$crate", t->get_locus ());
  	}
*************** Parser<ManagedTokenSource>::parse_attr_i
*** 790,796 ****
      {
      case LEFT_PAREN:
      case LEFT_SQUARE:
!       case LEFT_CURLY: {
  	// must be a delimited token tree, so parse that
  	std::unique_ptr<AST::AttrInput> input_tree (
  	  new AST::DelimTokenTree (parse_delim_token_tree ()));
--- 795,802 ----
      {
      case LEFT_PAREN:
      case LEFT_SQUARE:
!     case LEFT_CURLY:
!       {
  	// must be a delimited token tree, so parse that
  	std::unique_ptr<AST::AttrInput> input_tree (
  	  new AST::DelimTokenTree (parse_delim_token_tree ()));
*************** Parser<ManagedTokenSource>::parse_attr_i
*** 799,805 ****
  
  	return input_tree;
        }
!       case EQUAL: {
  	// = LiteralExpr
  	lexer.skip_token ();
  
--- 805,812 ----
  
  	return input_tree;
        }
!     case EQUAL:
!       {
  	// = LiteralExpr
  	lexer.skip_token ();
  
*************** Parser<ManagedTokenSource>::parse_attr_i
*** 877,883 ****
--- 884,893 ----
  	return attr_input_lit;
        }
        break;
+     case RIGHT_PAREN:
      case RIGHT_SQUARE:
+     case RIGHT_CURLY:
+     case END_OF_FILE:
        // means AttrInput is missing, which is allowed
        return nullptr;
      default:
*************** Parser<ManagedTokenSource>::parse_macro_
*** 2117,2123 ****
      {
      case LEFT_PAREN:
      case LEFT_SQUARE:
!       case LEFT_CURLY: {
  	// must be macro matcher as delimited
  	AST::MacroMatcher matcher = parse_macro_matcher ();
  	if (matcher.is_error ())
--- 2127,2134 ----
      {
      case LEFT_PAREN:
      case LEFT_SQUARE:
!     case LEFT_CURLY:
!       {
  	// must be macro matcher as delimited
  	AST::MacroMatcher matcher = parse_macro_matcher ();
  	if (matcher.is_error ())
*************** Parser<ManagedTokenSource>::parse_macro_
*** 2131,2137 ****
  	return std::unique_ptr<AST::MacroMatcher> (
  	  new AST::MacroMatcher (std::move (matcher)));
        }
!       case DOLLAR_SIGN: {
  	// have to do more lookahead to determine if fragment or repetition
  	const_TokenPtr t2 = lexer.peek_token (1);
  	switch (t2->get_id ())
--- 2142,2149 ----
  	return std::unique_ptr<AST::MacroMatcher> (
  	  new AST::MacroMatcher (std::move (matcher)));
        }
!     case DOLLAR_SIGN:
!       {
  	// have to do more lookahead to determine if fragment or repetition
  	const_TokenPtr t2 = lexer.peek_token (1);
  	switch (t2->get_id ())
*************** Parser<ManagedTokenSource>::parse_visibi
*** 2402,2408 ****
        skip_token (RIGHT_PAREN);
  
        return AST::Visibility::create_super (path_loc, vis_loc);
!       case IN: {
  	lexer.skip_token ();
  
  	// parse the "in" path as well
--- 2414,2421 ----
        skip_token (RIGHT_PAREN);
  
        return AST::Visibility::create_super (path_loc, vis_loc);
!     case IN:
!       {
  	lexer.skip_token ();
  
  	// parse the "in" path as well
*************** Parser<ManagedTokenSource>::parse_module
*** 2466,2472 ****
  	new AST::Module (std::move (name), std::move (vis),
  			 std::move (outer_attrs), locus, safety,
  			 lexer.get_filename (), inline_module_stack));
!       case LEFT_CURLY: {
  	lexer.skip_token ();
  
  	// parse inner attributes
--- 2479,2486 ----
  	new AST::Module (std::move (name), std::move (vis),
  			 std::move (outer_attrs), locus, safety,
  			 lexer.get_filename (), inline_module_stack));
!     case LEFT_CURLY:
!       {
  	lexer.skip_token ();
  
  	// parse inner attributes
*************** Parser<ManagedTokenSource>::parse_use_tr
*** 2730,2736 ****
  	    return std::unique_ptr<AST::UseTreeGlob> (
  	      new AST::UseTreeGlob (AST::UseTreeGlob::NO_PATH,
  				    AST::SimplePath::create_empty (), locus));
! 	  case LEFT_CURLY: {
  	    // nested tree UseTree type
  	    lexer.skip_token ();
  
--- 2744,2751 ----
  	    return std::unique_ptr<AST::UseTreeGlob> (
  	      new AST::UseTreeGlob (AST::UseTreeGlob::NO_PATH,
  				    AST::SimplePath::create_empty (), locus));
! 	case LEFT_CURLY:
! 	  {
  	    // nested tree UseTree type
  	    lexer.skip_token ();
  
*************** Parser<ManagedTokenSource>::parse_use_tr
*** 2794,2851 ****
      }
    else
      {
-       /* Due to aforementioned implementation issues, the trailing :: token is
-        * consumed by the path, so it can not be used as a disambiguator.
-        * NOPE, not true anymore - TODO what are the consequences of this? */
- 
        const_TokenPtr t = lexer.peek_token ();
        switch (t->get_id ())
  	{
! 	case ASTERISK:
! 	  // glob UseTree type
! 	  lexer.skip_token ();
! 
! 	  return std::unique_ptr<AST::UseTreeGlob> (
! 	    new AST::UseTreeGlob (AST::UseTreeGlob::PATH_PREFIXED,
! 				  std::move (path), locus));
! 	  case LEFT_CURLY: {
! 	    // nested tree UseTree type
! 	    lexer.skip_token ();
! 
! 	    std::vector<std::unique_ptr<AST::UseTree>> use_trees;
! 
! 	    // TODO: think of better control structure
! 	    const_TokenPtr t = lexer.peek_token ();
! 	    while (t->get_id () != RIGHT_CURLY)
! 	      {
! 		std::unique_ptr<AST::UseTree> use_tree = parse_use_tree ();
! 		if (use_tree == nullptr)
! 		  {
! 		    break;
! 		  }
! 
! 		use_trees.push_back (std::move (use_tree));
! 
! 		if (lexer.peek_token ()->get_id () != COMMA)
! 		  break;
! 
! 		lexer.skip_token ();
! 		t = lexer.peek_token ();
! 	      }
! 
! 	    // skip end curly delimiter
! 	    if (!skip_token (RIGHT_CURLY))
! 	      {
! 		// skip after somewhere?
! 		return nullptr;
! 	      }
! 
! 	    return std::unique_ptr<AST::UseTreeList> (
! 	      new AST::UseTreeList (AST::UseTreeList::PATH_PREFIXED,
! 				    std::move (path), std::move (use_trees),
! 				    locus));
! 	  }
! 	  case AS: {
  	    // rebind UseTree type
  	    lexer.skip_token ();
  
--- 2809,2820 ----
      }
    else
      {
        const_TokenPtr t = lexer.peek_token ();
+ 
        switch (t->get_id ())
  	{
! 	case AS:
! 	  {
  	    // rebind UseTree type
  	    lexer.skip_token ();
  
*************** Parser<ManagedTokenSource>::parse_use_tr
*** 2884,2899 ****
  
  	  // don't skip semicolon - handled in parse_use_tree
  	  // lexer.skip_token();
- 
- 	  return std::unique_ptr<AST::UseTreeRebind> (
- 	    new AST::UseTreeRebind (AST::UseTreeRebind::NONE, std::move (path),
- 				    locus));
  	case COMMA:
  	case RIGHT_CURLY:
  	  // this may occur in recursive calls - assume it is ok and ignore it
  	  return std::unique_ptr<AST::UseTreeRebind> (
  	    new AST::UseTreeRebind (AST::UseTreeRebind::NONE, std::move (path),
  				    locus));
  	default:
  	  add_error (Error (t->get_locus (),
  			    "unexpected token %qs in use tree with valid path",
--- 2853,2924 ----
  
  	  // don't skip semicolon - handled in parse_use_tree
  	  // lexer.skip_token();
  	case COMMA:
  	case RIGHT_CURLY:
  	  // this may occur in recursive calls - assume it is ok and ignore it
  	  return std::unique_ptr<AST::UseTreeRebind> (
  	    new AST::UseTreeRebind (AST::UseTreeRebind::NONE, std::move (path),
  				    locus));
+ 	case SCOPE_RESOLUTION:
+ 	  // keep going
+ 	  break;
+ 	default:
+ 	  add_error (Error (t->get_locus (),
+ 			    "unexpected token %qs in use tree with valid path",
+ 			    t->get_token_description ()));
+ 	  return nullptr;
+ 	}
+ 
+       skip_token ();
+       t = lexer.peek_token ();
+ 
+       switch (t->get_id ())
+ 	{
+ 	case ASTERISK:
+ 	  // glob UseTree type
+ 	  lexer.skip_token ();
+ 
+ 	  return std::unique_ptr<AST::UseTreeGlob> (
+ 	    new AST::UseTreeGlob (AST::UseTreeGlob::PATH_PREFIXED,
+ 				  std::move (path), locus));
+ 	case LEFT_CURLY:
+ 	  {
+ 	    // nested tree UseTree type
+ 	    lexer.skip_token ();
+ 
+ 	    std::vector<std::unique_ptr<AST::UseTree>> use_trees;
+ 
+ 	    // TODO: think of better control structure
+ 	    const_TokenPtr t = lexer.peek_token ();
+ 	    while (t->get_id () != RIGHT_CURLY)
+ 	      {
+ 		std::unique_ptr<AST::UseTree> use_tree = parse_use_tree ();
+ 		if (use_tree == nullptr)
+ 		  {
+ 		    break;
+ 		  }
+ 
+ 		use_trees.push_back (std::move (use_tree));
+ 
+ 		if (lexer.peek_token ()->get_id () != COMMA)
+ 		  break;
+ 
+ 		lexer.skip_token ();
+ 		t = lexer.peek_token ();
+ 	      }
+ 
+ 	    // skip end curly delimiter
+ 	    if (!skip_token (RIGHT_CURLY))
+ 	      {
+ 		// skip after somewhere?
+ 		return nullptr;
+ 	      }
+ 
+ 	    return std::unique_ptr<AST::UseTreeList> (
+ 	      new AST::UseTreeList (AST::UseTreeList::PATH_PREFIXED,
+ 				    std::move (path), std::move (use_trees),
+ 				    locus));
+ 	  }
  	default:
  	  add_error (Error (t->get_locus (),
  			    "unexpected token %qs in use tree with valid path",
*************** Parser<ManagedTokenSource>::parse_generi
*** 3100,3106 ****
  
    switch (token->get_id ())
      {
!       case LIFETIME: {
  	auto lifetime = parse_lifetime (false);
  	if (!lifetime)
  	  {
--- 3125,3132 ----
  
    switch (token->get_id ())
      {
!     case LIFETIME:
!       {
  	auto lifetime = parse_lifetime (false);
  	if (!lifetime)
  	  {
*************** Parser<ManagedTokenSource>::parse_generi
*** 3126,3132 ****
  	  std::move (outer_attrs), token->get_locus ()));
  	break;
        }
!       case IDENTIFIER: {
  	auto type_ident = token->get_str ();
  	lexer.skip_token ();
  
--- 3152,3159 ----
  	  std::move (outer_attrs), token->get_locus ()));
  	break;
        }
!     case IDENTIFIER:
!       {
  	auto type_ident = token->get_str ();
  	lexer.skip_token ();
  
*************** Parser<ManagedTokenSource>::parse_generi
*** 3161,3167 ****
  			      std::move (outer_attrs)));
  	break;
        }
!       case CONST: {
  	lexer.skip_token ();
  
  	auto name_token = expect_token (IDENTIFIER);
--- 3188,3195 ----
  			      std::move (outer_attrs)));
  	break;
        }
!     case CONST:
!       {
  	lexer.skip_token ();
  
  	auto name_token = expect_token (IDENTIFIER);
*************** Parser<ManagedTokenSource>::parse_lifeti
*** 3345,3351 ****
  
  /* Parses lifetime generic parameters (objects). Will also consume any
   * trailing comma. No extra checks for end token.
!  * TODO: is this best solution? implements most of the same algorithm. */
  template <typename ManagedTokenSource>
  std::vector<AST::LifetimeParam>
  Parser<ManagedTokenSource>::parse_lifetime_params_objs ()
--- 3373,3380 ----
  
  /* Parses lifetime generic parameters (objects). Will also consume any
   * trailing comma. No extra checks for end token.
!  * TODO: is this best solution? implements most of the same algorithm.
!  * TODO: seems to be unused, remove? */
  template <typename ManagedTokenSource>
  std::vector<AST::LifetimeParam>
  Parser<ManagedTokenSource>::parse_lifetime_params_objs ()
*************** Parser<ManagedTokenSource>::parse_lifeti
*** 3363,3369 ****
  	  break;
  	}
  
!       lifetime_params.push_back (std::move (lifetime_param));
  
        if (lexer.peek_token ()->get_id () != COMMA)
  	break;
--- 3392,3398 ----
  	  break;
  	}
  
!       lifetime_params.push_back (std::move (lifetime_param.value ()));
  
        if (lexer.peek_token ()->get_id () != COMMA)
  	break;
*************** Parser<ManagedTokenSource>::parse_struct
*** 4356,4362 ****
    const_TokenPtr t = lexer.peek_token ();
    switch (t->get_id ())
      {
!       case LEFT_CURLY: {
  	// struct with body
  
  	// skip curly bracket
--- 4385,4392 ----
    const_TokenPtr t = lexer.peek_token ();
    switch (t->get_id ())
      {
!     case LEFT_CURLY:
!       {
  	// struct with body
  
  	// skip curly bracket
*************** Parser<ManagedTokenSource>::parse_enum_i
*** 4759,4765 ****
    const_TokenPtr t = lexer.peek_token ();
    switch (t->get_id ())
      {
!       case LEFT_PAREN: {
  	// tuple enum item
  	lexer.skip_token ();
  
--- 4789,4796 ----
    const_TokenPtr t = lexer.peek_token ();
    switch (t->get_id ())
      {
!     case LEFT_PAREN:
!       {
  	// tuple enum item
  	lexer.skip_token ();
  
*************** Parser<ManagedTokenSource>::parse_enum_i
*** 4780,4786 ****
  	  std::move (item_name), std::move (vis), std::move (tuple_fields),
  	  std::move (outer_attrs), item_name_tok->get_locus ()));
        }
!       case LEFT_CURLY: {
  	// struct enum item
  	lexer.skip_token ();
  
--- 4811,4818 ----
  	  std::move (item_name), std::move (vis), std::move (tuple_fields),
  	  std::move (outer_attrs), item_name_tok->get_locus ()));
        }
!     case LEFT_CURLY:
!       {
  	// struct enum item
  	lexer.skip_token ();
  
*************** Parser<ManagedTokenSource>::parse_enum_i
*** 4797,4803 ****
  	  std::move (item_name), std::move (vis), std::move (struct_fields),
  	  std::move (outer_attrs), item_name_tok->get_locus ()));
        }
!       case EQUAL: {
  	// discriminant enum item
  	lexer.skip_token ();
  
--- 4829,4836 ----
  	  std::move (item_name), std::move (vis), std::move (struct_fields),
  	  std::move (outer_attrs), item_name_tok->get_locus ()));
        }
!     case EQUAL:
!       {
  	// discriminant enum item
  	lexer.skip_token ();
  
*************** Parser<ManagedTokenSource>::parse_inhere
*** 5450,5456 ****
      case SUPER:
      case SELF:
      case CRATE:
!       case PUB: {
  	// visibility, so not a macro invocation semi - must be constant,
  	// function, or method
  	AST::Visibility vis = parse_visibility ();
--- 5483,5490 ----
      case SUPER:
      case SELF:
      case CRATE:
!     case PUB:
!       {
  	// visibility, so not a macro invocation semi - must be constant,
  	// function, or method
  	AST::Visibility vis = parse_visibility ();
*************** Parser<ManagedTokenSource>::parse_inhere
*** 5581,5587 ****
    // param
    auto initial_param = parse_self_param ();
  
!   if (!initial_param.has_value () && initial_param.error () != NOT_SELF)
      return nullptr;
  
    /* FIXME: ensure that self param doesn't accidently consume tokens for a
--- 5615,5622 ----
    // param
    auto initial_param = parse_self_param ();
  
!   if (!initial_param.has_value ()
!       && initial_param.error () != ParseSelfError::NOT_SELF)
      return nullptr;
  
    /* FIXME: ensure that self param doesn't accidently consume tokens for a
*************** Parser<ManagedTokenSource>::parse_trait_
*** 5780,5786 ****
    // param
    auto initial_param = parse_self_param ();
  
!   if (!initial_param.has_value () && initial_param.error () != NOT_SELF)
      return nullptr;
  
    // FIXME: ensure that self param doesn't accidently consume tokens for a
--- 5815,5822 ----
    // param
    auto initial_param = parse_self_param ();
  
!   if (!initial_param.has_value ()
!       && initial_param.error () != ParseSelfError::NOT_SELF)
      return nullptr;
  
    // FIXME: ensure that self param doesn't accidently consume tokens for a
*************** Parser<ManagedTokenSource>::parse_extern
*** 5964,5970 ****
      {
      case IDENTIFIER:
        return parse_macro_invocation_semi (outer_attrs);
!       case STATIC_KW: {
  	// parse extern static item
  	lexer.skip_token ();
  
--- 6000,6007 ----
      {
      case IDENTIFIER:
        return parse_macro_invocation_semi (outer_attrs);
!     case STATIC_KW:
!       {
  	// parse extern static item
  	lexer.skip_token ();
  
*************** Parser<ManagedTokenSource>::parse_generi
*** 6261,6267 ****
  
    switch (tok->get_id ())
      {
!       case IDENTIFIER: {
  	// This is a bit of a weird situation: With an identifier token, we
  	// could either have a valid type or a macro (FIXME: anything else?). So
  	// we need one bit of lookahead to differentiate if this is really
--- 6298,6305 ----
  
    switch (tok->get_id ())
      {
!     case IDENTIFIER:
!       {
  	// This is a bit of a weird situation: With an identifier token, we
  	// could either have a valid type or a macro (FIXME: anything else?). So
  	// we need one bit of lookahead to differentiate if this is really
*************** Parser<ManagedTokenSource>::parse_generi
*** 6309,6317 ****
      case FALSE_LITERAL:
        expr = parse_literal_expr ();
        break;
!       // FIXME: Because of this, error reporting is garbage for const generic
!       // parameter's default values
!       default: {
  	auto type = parse_type ();
  	// FIXME: Find a better way to do this?
  	if (type)
--- 6347,6356 ----
      case FALSE_LITERAL:
        expr = parse_literal_expr ();
        break;
!     // FIXME: Because of this, error reporting is garbage for const generic
!     // parameter's default values
!     default:
!       {
  	auto type = parse_type ();
  	// FIXME: Find a better way to do this?
  	if (type)
*************** Parser<ManagedTokenSource>::parse_type_p
*** 6510,6516 ****
    switch (t->get_id ())
      {
      case LEFT_SHIFT:
!       case LEFT_ANGLE: {
  	// parse generic args
  	AST::GenericArgs generic_args = parse_path_generic_args ();
  
--- 6549,6556 ----
    switch (t->get_id ())
      {
      case LEFT_SHIFT:
!     case LEFT_ANGLE:
!       {
  	// parse generic args
  	AST::GenericArgs generic_args = parse_path_generic_args ();
  
*************** Parser<ManagedTokenSource>::parse_type_p
*** 6519,6525 ****
  					   has_separating_scope_resolution,
  					   std::move (generic_args), locus));
        }
!       case LEFT_PAREN: {
  	// parse type path function
  	AST::TypePathFunction type_path_function
  	  = parse_type_path_function (locus);
--- 6559,6566 ----
  					   has_separating_scope_resolution,
  					   std::move (generic_args), locus));
        }
!     case LEFT_PAREN:
!       {
  	// parse type path function
  	AST::TypePathFunction type_path_function
  	  = parse_type_path_function (locus);
*************** Parser<ManagedTokenSource>::parse_expr_s
*** 7068,7083 ****
      case SELF:
      case SELF_ALIAS:
      case DOLLAR_SIGN:
!       case SCOPE_RESOLUTION: {
  	AST::PathInExpression path = parse_path_in_expression ();
  	std::unique_ptr<AST::Expr> null_denotation;
  
  	if (lexer.peek_token ()->get_id () == EXCLAM)
  	  {
! 	    // Bind a reference to avoid -Wredundant-move on post-P1825R0
! 	    // compilers. Change to non-reference type and remove the moves
! 	    // below once C++20 is required to build gcc.
! 	    std::unique_ptr<AST::MacroInvocation> &&invoc
  	      = parse_macro_invocation_partial (std::move (path),
  						std::move (outer_attrs));
  
--- 7109,7122 ----
      case SELF:
      case SELF_ALIAS:
      case DOLLAR_SIGN:
!     case SCOPE_RESOLUTION:
!       {
  	AST::PathInExpression path = parse_path_in_expression ();
  	std::unique_ptr<AST::Expr> null_denotation;
  
  	if (lexer.peek_token ()->get_id () == EXCLAM)
  	  {
! 	    std::unique_ptr<AST::MacroInvocation> invoc
  	      = parse_macro_invocation_partial (std::move (path),
  						std::move (outer_attrs));
  
*************** Parser<ManagedTokenSource>::parse_expr_s
*** 7085,7091 ****
  	      {
  		invoc->add_semicolon ();
  		// Macro invocation with semicolon.
! 		return std::move (invoc);
  	      }
  
  	    TokenId after_macro = lexer.peek_token ()->get_id ();
--- 7124,7130 ----
  	      {
  		invoc->add_semicolon ();
  		// Macro invocation with semicolon.
! 		return invoc;
  	      }
  
  	    TokenId after_macro = lexer.peek_token ()->get_id ();
*************** Parser<ManagedTokenSource>::parse_expr_s
*** 7093,7106 ****
  	    if (restrictions.allow_close_after_expr_stmt
  		&& (after_macro == RIGHT_PAREN || after_macro == RIGHT_CURLY
  		    || after_macro == RIGHT_SQUARE))
! 	      return std::move (invoc);
  
  	    if (invoc->get_invoc_data ().get_delim_tok_tree ().get_delim_type ()
  		  == AST::CURLY
  		&& after_macro != DOT && after_macro != QUESTION_MARK)
  	      {
  		rust_debug ("braced macro statement");
! 		return std::move (invoc);
  	      }
  
  	    null_denotation = std::move (invoc);
--- 7132,7145 ----
  	    if (restrictions.allow_close_after_expr_stmt
  		&& (after_macro == RIGHT_PAREN || after_macro == RIGHT_CURLY
  		    || after_macro == RIGHT_SQUARE))
! 	      return invoc;
  
  	    if (invoc->get_invoc_data ().get_delim_tok_tree ().get_delim_type ()
  		  == AST::CURLY
  		&& after_macro != DOT && after_macro != QUESTION_MARK)
  	      {
  		rust_debug ("braced macro statement");
! 		return invoc;
  	      }
  
  	    null_denotation = std::move (invoc);
*************** Parser<ManagedTokenSource>::parse_block_
*** 7238,7243 ****
--- 7277,7327 ----
  			std::move (label), locus, end_locus));
  }
  
+ /* Parse an anonymous const expression. This can be a regular const expression
+  * or an underscore for deferred const inference */
+ template <typename ManagedTokenSource>
+ tl::expected<AST::AnonConst, AnonConstError>
+ Parser<ManagedTokenSource>::parse_anon_const ()
+ {
+   auto current = lexer.peek_token ();
+   auto locus = current->get_locus ();
+ 
+   // Special case deferred inference constants
+   if (maybe_skip_token (UNDERSCORE))
+     return AST::AnonConst (locus);
+ 
+   auto expr = parse_expr ();
+ 
+   if (!expr)
+     return tl::make_unexpected (AnonConstError::InvalidSizeExpr);
+ 
+   return AST::AnonConst (std::move (expr), locus);
+ }
+ 
+ /* Parse a "const block", a block preceded by the `const` keyword whose
+  * statements can be const evaluated and used in constant contexts */
+ template <typename ManagedTokenSource>
+ std::unique_ptr<AST::ConstBlock>
+ Parser<ManagedTokenSource>::parse_const_block_expr (AST::AttrVec outer_attrs,
+ 						    location_t locus)
+ {
+   auto block = parse_block_expr ();
+ 
+   if (!block)
+     {
+       add_error (Error (locus, "failed to parse inner block in const block"));
+       skip_after_end_block ();
+ 
+       return nullptr;
+     }
+ 
+   auto block_locus = block->get_locus ();
+ 
+   return std::make_unique<AST::ConstBlock> (AST::AnonConst (std::move (block),
+ 							    block_locus),
+ 					    locus, std::move (outer_attrs));
+ }
+ 
  /* Parses a "grouped" expression (expression in parentheses), used to control
   * precedence. */
  template <typename ManagedTokenSource>
*************** Parser<ManagedTokenSource>::parse_return
*** 7518,7523 ****
--- 7602,7635 ----
  			 locus));
  }
  
+ // Parses a try expression.
+ template <typename ManagedTokenSource>
+ std::unique_ptr<AST::TryExpr>
+ Parser<ManagedTokenSource>::parse_try_expr (AST::AttrVec outer_attrs,
+ 					    location_t pratt_parsed_loc)
+ {
+   location_t locus = pratt_parsed_loc;
+   if (locus == UNKNOWN_LOCATION)
+     {
+       locus = lexer.peek_token ()->get_locus ();
+       skip_token (TRY);
+     }
+ 
+   std::unique_ptr<AST::BlockExpr> block_expr = parse_block_expr ();
+ 
+   if (!block_expr)
+     {
+       Error error (lexer.peek_token ()->get_locus (),
+ 		   "failed to parse try block expression");
+       add_error (std::move (error));
+ 
+       return nullptr;
+     }
+ 
+   return std::unique_ptr<AST::TryExpr> (
+     new AST::TryExpr (std::move (block_expr), std::move (outer_attrs), locus));
+ }
+ 
  /* Parses a break expression (including any label to break to AND any return
   * expression). */
  template <typename ManagedTokenSource>
*************** Parser<ManagedTokenSource>::parse_if_exp
*** 7675,7681 ****
        const_TokenPtr t = lexer.peek_token ();
        switch (t->get_id ())
  	{
! 	  case LEFT_CURLY: {
  	    // double selection - else
  	    // parse else block expr (required)
  	    std::unique_ptr<AST::BlockExpr> else_body = parse_block_expr ();
--- 7787,7794 ----
        const_TokenPtr t = lexer.peek_token ();
        switch (t->get_id ())
  	{
! 	case LEFT_CURLY:
! 	  {
  	    // double selection - else
  	    // parse else block expr (required)
  	    std::unique_ptr<AST::BlockExpr> else_body = parse_block_expr ();
*************** Parser<ManagedTokenSource>::parse_if_exp
*** 7696,7702 ****
  					 std::move (else_body),
  					 std::move (outer_attrs), locus));
  	  }
! 	  case IF: {
  	    // multiple selection - else if or else if let
  	    // branch on whether next token is 'let' or not
  	    if (lexer.peek_token (1)->get_id () == LET)
--- 7809,7816 ----
  					 std::move (else_body),
  					 std::move (outer_attrs), locus));
  	  }
! 	case IF:
! 	  {
  	    // multiple selection - else if or else if let
  	    // branch on whether next token is 'let' or not
  	    if (lexer.peek_token (1)->get_id () == LET)
*************** Parser<ManagedTokenSource>::parse_if_let
*** 7857,7863 ****
        const_TokenPtr t = lexer.peek_token ();
        switch (t->get_id ())
  	{
! 	  case LEFT_CURLY: {
  	    // double selection - else
  	    // parse else block expr (required)
  	    std::unique_ptr<AST::BlockExpr> else_body = parse_block_expr ();
--- 7971,7978 ----
        const_TokenPtr t = lexer.peek_token ();
        switch (t->get_id ())
  	{
! 	case LEFT_CURLY:
! 	  {
  	    // double selection - else
  	    // parse else block expr (required)
  	    std::unique_ptr<AST::BlockExpr> else_body = parse_block_expr ();
*************** Parser<ManagedTokenSource>::parse_if_let
*** 7879,7885 ****
  					    std::move (else_body),
  					    std::move (outer_attrs), locus));
  	  }
! 	  case IF: {
  	    // multiple selection - else if or else if let
  	    // branch on whether next token is 'let' or not
  	    if (lexer.peek_token (1)->get_id () == LET)
--- 7994,8001 ----
  					    std::move (else_body),
  					    std::move (outer_attrs), locus));
  	  }
! 	case IF:
! 	  {
  	    // multiple selection - else if or else if let
  	    // branch on whether next token is 'let' or not
  	    if (lexer.peek_token (1)->get_id () == LET)
*************** Parser<ManagedTokenSource>::parse_type (
*** 8931,8937 ****
        // slice type or array type - requires further disambiguation
        return parse_slice_or_array_type ();
      case LEFT_SHIFT:
!       case LEFT_ANGLE: {
  	// qualified path in type
  	AST::QualifiedPathInType path = parse_qualified_path_in_type ();
  	if (path.is_error ())
--- 9047,9054 ----
        // slice type or array type - requires further disambiguation
        return parse_slice_or_array_type ();
      case LEFT_SHIFT:
!     case LEFT_ANGLE:
!       {
  	// qualified path in type
  	AST::QualifiedPathInType path = parse_qualified_path_in_type ();
  	if (path.is_error ())
*************** Parser<ManagedTokenSource>::parse_type (
*** 8960,8966 ****
      case LOGICAL_AND:
        // reference type
        return parse_reference_type ();
!       case LIFETIME: {
  	/* probably a lifetime bound, so probably type param bounds in
  	 * TraitObjectType */
  	std::vector<std::unique_ptr<AST::TypeParamBound>> bounds
--- 9077,9084 ----
      case LOGICAL_AND:
        // reference type
        return parse_reference_type ();
!     case LIFETIME:
!       {
  	/* probably a lifetime bound, so probably type param bounds in
  	 * TraitObjectType */
  	std::vector<std::unique_ptr<AST::TypeParamBound>> bounds
*************** Parser<ManagedTokenSource>::parse_type (
*** 8976,8982 ****
      case SELF_ALIAS:
      case CRATE:
      case DOLLAR_SIGN:
!       case SCOPE_RESOLUTION: {
  	// macro invocation or type path - requires further disambiguation.
  	/* for parsing path component of each rule, perhaps parse it as a
  	 * typepath and attempt conversion to simplepath if a trailing '!' is
--- 9094,9101 ----
      case SELF_ALIAS:
      case CRATE:
      case DOLLAR_SIGN:
!     case SCOPE_RESOLUTION:
!       {
  	// macro invocation or type path - requires further disambiguation.
  	/* for parsing path component of each rule, perhaps parse it as a
  	 * typepath and attempt conversion to simplepath if a trailing '!' is
*************** Parser<ManagedTokenSource>::parse_type (
*** 9006,9012 ****
  	t = lexer.peek_token ();
  	switch (t->get_id ())
  	  {
! 	    case EXCLAM: {
  	      // macro invocation
  	      // convert to simple path
  	      AST::SimplePath macro_path = path.as_simple_path ();
--- 9125,9132 ----
  	t = lexer.peek_token ();
  	switch (t->get_id ())
  	  {
! 	  case EXCLAM:
! 	    {
  	      // macro invocation
  	      // convert to simple path
  	      AST::SimplePath macro_path = path.as_simple_path ();
*************** Parser<ManagedTokenSource>::parse_type (
*** 9032,9038 ****
  				     std::move (tok_tree)),
  		{}, locus);
  	    }
! 	    case PLUS: {
  	      // type param bounds
  	      std::vector<std::unique_ptr<AST::TypeParamBound>> bounds;
  
--- 9152,9159 ----
  				     std::move (tok_tree)),
  		{}, locus);
  	    }
! 	  case PLUS:
! 	    {
  	      // type param bounds
  	      std::vector<std::unique_ptr<AST::TypeParamBound>> bounds;
  
*************** Parser<ManagedTokenSource>::parse_type (
*** 9117,9130 ****
  	  t = lexer.peek_token ();
  	  if (t->get_id () != PLUS)
  	    {
- 	      // convert trait bound to value object
- 	      AST::TraitBound value_bound (*initial_bound);
- 
- 	      // DEBUG: removed as unique ptr, so should auto-delete
- 	      // delete initial_bound;
- 
  	      return std::unique_ptr<AST::ImplTraitTypeOneBound> (
! 		new AST::ImplTraitTypeOneBound (std::move (value_bound),
  						locus));
  	    }
  
--- 9238,9245 ----
  	  t = lexer.peek_token ();
  	  if (t->get_id () != PLUS)
  	    {
  	      return std::unique_ptr<AST::ImplTraitTypeOneBound> (
! 		new AST::ImplTraitTypeOneBound (std::move (initial_bound),
  						locus));
  	    }
  
*************** Parser<ManagedTokenSource>::parse_type (
*** 9152,9158 ****
  	    new AST::ImplTraitType (std::move (bounds), locus));
  	}
      case DYN:
!       case QUESTION_MARK: {
  	// either TraitObjectType or TraitObjectTypeOneBound
  	bool has_dyn = false;
  	if (t->get_id () == DYN)
--- 9267,9274 ----
  	    new AST::ImplTraitType (std::move (bounds), locus));
  	}
      case DYN:
!     case QUESTION_MARK:
!       {
  	// either TraitObjectType or TraitObjectTypeOneBound
  	bool has_dyn = false;
  	if (t->get_id () == DYN)
*************** Parser<ManagedTokenSource>::parse_for_pr
*** 9405,9411 ****
      case SELF:
      case SELF_ALIAS:
      case CRATE:
!       case DOLLAR_SIGN: {
  	// path, so trait type
  
  	// parse type path to finish parsing trait bound
--- 9521,9528 ----
      case SELF:
      case SELF_ALIAS:
      case CRATE:
!     case DOLLAR_SIGN:
!       {
  	// path, so trait type
  
  	// parse type path to finish parsing trait bound
*************** Parser<ManagedTokenSource>::parse_slice_
*** 9751,9763 ****
  
        return std::unique_ptr<AST::SliceType> (
  	new AST::SliceType (std::move (inner_type), locus));
!       case SEMICOLON: {
  	// array type
  	lexer.skip_token ();
  
  	// parse required array size expression
! 	std::unique_ptr<AST::Expr> size = parse_expr ();
! 	if (size == nullptr)
  	  {
  	    Error error (lexer.peek_token ()->get_locus (),
  			 "failed to parse size expression in array type");
--- 9868,9882 ----
  
        return std::unique_ptr<AST::SliceType> (
  	new AST::SliceType (std::move (inner_type), locus));
!     case SEMICOLON:
!       {
  	// array type
  	lexer.skip_token ();
  
  	// parse required array size expression
! 	auto size = parse_anon_const ();
! 
! 	if (!size)
  	  {
  	    Error error (lexer.peek_token ()->get_locus (),
  			 "failed to parse size expression in array type");
*************** Parser<ManagedTokenSource>::parse_slice_
*** 9772,9778 ****
  	  }
  
  	return std::unique_ptr<AST::ArrayType> (
! 	  new AST::ArrayType (std::move (inner_type), std::move (size), locus));
        }
      default:
        // error
--- 9891,9898 ----
  	  }
  
  	return std::unique_ptr<AST::ArrayType> (
! 	  new AST::ArrayType (std::move (inner_type), std::move (*size),
! 			      locus));
        }
      default:
        // error
*************** Parser<ManagedTokenSource>::parse_type_n
*** 9802,9808 ****
        // slice type or array type - requires further disambiguation
        return parse_slice_or_array_type ();
      case LEFT_SHIFT:
!       case LEFT_ANGLE: {
  	// qualified path in type
  	AST::QualifiedPathInType path = parse_qualified_path_in_type ();
  	if (path.is_error ())
--- 9922,9929 ----
        // slice type or array type - requires further disambiguation
        return parse_slice_or_array_type ();
      case LEFT_SHIFT:
!     case LEFT_ANGLE:
!       {
  	// qualified path in type
  	AST::QualifiedPathInType path = parse_qualified_path_in_type ();
  	if (path.is_error ())
*************** Parser<ManagedTokenSource>::parse_type_n
*** 9843,9849 ****
      case SELF_ALIAS:
      case CRATE:
      case DOLLAR_SIGN:
!       case SCOPE_RESOLUTION: {
  	// macro invocation or type path - requires further disambiguation.
  	/* for parsing path component of each rule, perhaps parse it as a
  	 * typepath and attempt conversion to simplepath if a trailing '!' is
--- 9964,9971 ----
      case SELF_ALIAS:
      case CRATE:
      case DOLLAR_SIGN:
!     case SCOPE_RESOLUTION:
!       {
  	// macro invocation or type path - requires further disambiguation.
  	/* for parsing path component of each rule, perhaps parse it as a
  	 * typepath and attempt conversion to simplepath if a trailing '!' is
*************** Parser<ManagedTokenSource>::parse_type_n
*** 9871,9877 ****
  	t = lexer.peek_token ();
  	switch (t->get_id ())
  	  {
! 	    case EXCLAM: {
  	      // macro invocation
  	      // convert to simple path
  	      AST::SimplePath macro_path = path.as_simple_path ();
--- 9993,10000 ----
  	t = lexer.peek_token ();
  	switch (t->get_id ())
  	  {
! 	  case EXCLAM:
! 	    {
  	      // macro invocation
  	      // convert to simple path
  	      AST::SimplePath macro_path = path.as_simple_path ();
*************** Parser<ManagedTokenSource>::parse_type_n
*** 9955,9968 ****
  	      return nullptr;
  	    }
  
- 	  // convert trait bound to value object
- 	  AST::TraitBound value_bound (*initial_bound);
- 
  	  return std::unique_ptr<AST::ImplTraitTypeOneBound> (
! 	    new AST::ImplTraitTypeOneBound (std::move (value_bound), locus));
  	}
      case DYN:
!       case QUESTION_MARK: {
  	// either TraitObjectTypeOneBound
  	bool has_dyn = false;
  	if (t->get_id () == DYN)
--- 10078,10089 ----
  	      return nullptr;
  	    }
  
  	  return std::unique_ptr<AST::ImplTraitTypeOneBound> (
! 	    new AST::ImplTraitTypeOneBound (std::move (initial_bound), locus));
  	}
      case DYN:
!     case QUESTION_MARK:
!       {
  	// either TraitObjectTypeOneBound
  	bool has_dyn = false;
  	if (t->get_id () == DYN)
*************** Parser<ManagedTokenSource>::parse_range_
*** 10303,10309 ****
      case SELF_ALIAS:
      case CRATE:
      case SCOPE_RESOLUTION:
!       case DOLLAR_SIGN: {
  	// path in expression
  	AST::PathInExpression path = parse_path_in_expression ();
  	if (path.is_error ())
--- 10424,10431 ----
      case SELF_ALIAS:
      case CRATE:
      case SCOPE_RESOLUTION:
!     case DOLLAR_SIGN:
!       {
  	// path in expression
  	AST::PathInExpression path = parse_path_in_expression ();
  	if (path.is_error ())
*************** Parser<ManagedTokenSource>::parse_range_
*** 10319,10325 ****
  	  new AST::RangePatternBoundPath (std::move (path)));
        }
      case LEFT_SHIFT:
!       case LEFT_ANGLE: {
  	// qualified path in expression
  	AST::QualifiedPathInExpression path
  	  = parse_qualified_path_in_expression ();
--- 10441,10448 ----
  	  new AST::RangePatternBoundPath (std::move (path)));
        }
      case LEFT_SHIFT:
!     case LEFT_ANGLE:
!       {
  	// qualified path in expression
  	AST::QualifiedPathInExpression path
  	  = parse_qualified_path_in_expression ();
*************** Parser<ManagedTokenSource>::parse_patter
*** 10464,10470 ****
        // slice pattern
        return parse_slice_pattern ();
      case LEFT_SHIFT:
!       case LEFT_ANGLE: {
  	// qualified path in expression or qualified range pattern bound
  	AST::QualifiedPathInExpression path
  	  = parse_qualified_path_in_expression ();
--- 10587,10594 ----
        // slice pattern
        return parse_slice_pattern ();
      case LEFT_SHIFT:
!     case LEFT_ANGLE:
!       {
  	// qualified path in expression or qualified range pattern bound
  	AST::QualifiedPathInExpression path
  	  = parse_qualified_path_in_expression ();
*************** Parser<ManagedTokenSource>::parse_patter
*** 10500,10506 ****
      case SELF_ALIAS:
      case CRATE:
      case SCOPE_RESOLUTION:
!       case DOLLAR_SIGN: {
  	// path in expression or range pattern bound
  	AST::PathInExpression path = parse_path_in_expression ();
  
--- 10624,10631 ----
      case SELF_ALIAS:
      case CRATE:
      case SCOPE_RESOLUTION:
!     case DOLLAR_SIGN:
!       {
  	// path in expression or range pattern bound
  	AST::PathInExpression path = parse_path_in_expression ();
  
*************** Parser<ManagedTokenSource>::parse_patter
*** 10509,10515 ****
  	  {
  	  case DOT_DOT_EQ:
  	  case DOT_DOT:
! 	    case ELLIPSIS: {
  	      // qualified range pattern bound, so parse rest of range pattern
  	      AST::RangeKind kind = AST::tokenid_to_rangekind (next->get_id ());
  	      lexer.skip_token ();
--- 10634,10641 ----
  	  {
  	  case DOT_DOT_EQ:
  	  case DOT_DOT:
! 	  case ELLIPSIS:
! 	    {
  	      // qualified range pattern bound, so parse rest of range pattern
  	      AST::RangeKind kind = AST::tokenid_to_rangekind (next->get_id ());
  	      lexer.skip_token ();
*************** Parser<ManagedTokenSource>::parse_patter
*** 10527,10533 ****
  	  case EXCLAM:
  	    return parse_macro_invocation_partial (std::move (path),
  						   AST::AttrVec ());
! 	    case LEFT_PAREN: {
  	      // tuple struct
  	      lexer.skip_token ();
  
--- 10653,10660 ----
  	  case EXCLAM:
  	    return parse_macro_invocation_partial (std::move (path),
  						   AST::AttrVec ());
! 	  case LEFT_PAREN:
! 	    {
  	      // tuple struct
  	      lexer.skip_token ();
  
*************** Parser<ManagedTokenSource>::parse_patter
*** 10552,10558 ****
  		new AST::TupleStructPattern (std::move (path),
  					     std::move (items)));
  	    }
! 	    case LEFT_CURLY: {
  	      // struct
  	      lexer.skip_token ();
  
--- 10679,10686 ----
  		new AST::TupleStructPattern (std::move (path),
  					     std::move (items)));
  	    }
! 	  case LEFT_CURLY:
! 	    {
  	      // struct
  	      lexer.skip_token ();
  
*************** Parser<ManagedTokenSource>::parse_groupe
*** 10722,10728 ****
  
        return std::unique_ptr<AST::GroupedPattern> (
  	new AST::GroupedPattern (std::move (initial_pattern), paren_locus));
!       case COMMA: {
  	// tuple pattern
  	lexer.skip_token ();
  
--- 10850,10857 ----
  
        return std::unique_ptr<AST::GroupedPattern> (
  	new AST::GroupedPattern (std::move (initial_pattern), paren_locus));
!     case COMMA:
!       {
  	// tuple pattern
  	lexer.skip_token ();
  
*************** Parser<ManagedTokenSource>::parse_slice_
*** 10835,10861 ****
  {
    location_t square_locus = lexer.peek_token ()->get_locus ();
    std::vector<std::unique_ptr<AST::Pattern>> patterns;
    skip_token (LEFT_SQUARE);
  
    if (lexer.peek_token ()->get_id () == RIGHT_SQUARE)
      {
        skip_token (RIGHT_SQUARE);
        return std::unique_ptr<AST::SlicePattern> (
! 	new AST::SlicePattern (std::move (patterns), square_locus));
      }
  
    // parse initial pattern (required)
!   std::unique_ptr<AST::Pattern> initial_pattern = parse_pattern ();
!   if (initial_pattern == nullptr)
      {
!       Error error (lexer.peek_token ()->get_locus (),
! 		   "failed to parse initial pattern in slice pattern");
!       add_error (std::move (error));
! 
!       return nullptr;
      }
  
!   patterns.push_back (std::move (initial_pattern));
  
    const_TokenPtr t = lexer.peek_token ();
    while (t->get_id () == COMMA)
--- 10964,11010 ----
  {
    location_t square_locus = lexer.peek_token ()->get_locus ();
    std::vector<std::unique_ptr<AST::Pattern>> patterns;
+   tl::optional<std::vector<std::unique_ptr<AST::Pattern>>> upper_patterns
+     = tl::nullopt;
+ 
+   // lambda function to determine which vector to push new patterns into
+   auto get_pattern_ref
+     = [&] () -> std::vector<std::unique_ptr<AST::Pattern>> & {
+     return upper_patterns.has_value () ? upper_patterns.value () : patterns;
+   };
+ 
    skip_token (LEFT_SQUARE);
  
    if (lexer.peek_token ()->get_id () == RIGHT_SQUARE)
      {
        skip_token (RIGHT_SQUARE);
+       std::unique_ptr<AST::SlicePatternItemsNoRest> items (
+ 	new AST::SlicePatternItemsNoRest (std::move (patterns)));
        return std::unique_ptr<AST::SlicePattern> (
! 	new AST::SlicePattern (std::move (items), square_locus));
      }
  
    // parse initial pattern (required)
!   if (lexer.peek_token ()->get_id () == DOT_DOT)
      {
!       lexer.skip_token ();
!       upper_patterns = std::vector<std::unique_ptr<AST::Pattern>> ();
      }
+   else
+     {
+       // Not a rest pattern `..`, parse normally
+       std::unique_ptr<AST::Pattern> initial_pattern = parse_pattern ();
+       if (initial_pattern == nullptr)
+ 	{
+ 	  Error error (lexer.peek_token ()->get_locus (),
+ 		       "failed to parse initial pattern in slice pattern");
+ 	  add_error (std::move (error));
  
! 	  return nullptr;
! 	}
! 
!       patterns.push_back (std::move (initial_pattern));
!     }
  
    const_TokenPtr t = lexer.peek_token ();
    while (t->get_id () == COMMA)
*************** Parser<ManagedTokenSource>::parse_slice_
*** 10866,10871 ****
--- 11015,11037 ----
        if (lexer.peek_token ()->get_id () == RIGHT_SQUARE)
  	break;
  
+       if (lexer.peek_token ()->get_id () == DOT_DOT)
+ 	{
+ 	  if (upper_patterns.has_value ())
+ 	    {
+ 	      // DOT_DOT has been parsed before
+ 	      Error error (lexer.peek_token ()->get_locus (), "%s",
+ 			   "`..` can only be used once per slice pattern");
+ 	      add_error (std::move (error));
+ 
+ 	      return nullptr;
+ 	    }
+ 	  upper_patterns = std::vector<std::unique_ptr<AST::Pattern>> ();
+ 	  lexer.skip_token ();
+ 	  t = lexer.peek_token ();
+ 	  continue;
+ 	}
+ 
        // parse pattern (required)
        std::unique_ptr<AST::Pattern> pattern = parse_pattern ();
        if (pattern == nullptr)
*************** Parser<ManagedTokenSource>::parse_slice_
*** 10876,10882 ****
  
  	  return nullptr;
  	}
!       patterns.push_back (std::move (pattern));
  
        t = lexer.peek_token ();
      }
--- 11042,11048 ----
  
  	  return nullptr;
  	}
!       get_pattern_ref ().push_back (std::move (pattern));
  
        t = lexer.peek_token ();
      }
*************** Parser<ManagedTokenSource>::parse_slice_
*** 10886,10893 ****
        return nullptr;
      }
  
    return std::unique_ptr<AST::SlicePattern> (
!     new AST::SlicePattern (std::move (patterns), square_locus));
  }
  
  /* Parses an identifier pattern (pattern that binds a value matched to a
--- 11052,11072 ----
        return nullptr;
      }
  
+   if (upper_patterns.has_value ())
+     {
+       // Slice pattern with rest
+       std::unique_ptr<AST::SlicePatternItemsHasRest> items (
+ 	new AST::SlicePatternItemsHasRest (
+ 	  std::move (patterns), std::move (upper_patterns.value ())));
+       return std::unique_ptr<AST::SlicePattern> (
+ 	new AST::SlicePattern (std::move (items), square_locus));
+     }
+ 
+   // Rest-less slice pattern
+   std::unique_ptr<AST::SlicePatternItemsNoRest> items (
+     new AST::SlicePatternItemsNoRest (std::move (patterns)));
    return std::unique_ptr<AST::SlicePattern> (
!     new AST::SlicePattern (std::move (items), square_locus));
  }
  
  /* Parses an identifier pattern (pattern that binds a value matched to a
*************** Parser<ManagedTokenSource>::parse_ident_
*** 10979,10985 ****
      {
      case EXCLAM:
        return parse_macro_invocation_partial (std::move (path), AST::AttrVec ());
!       case LEFT_PAREN: {
  	// tuple struct
  	lexer.skip_token ();
  
--- 11158,11165 ----
      {
      case EXCLAM:
        return parse_macro_invocation_partial (std::move (path), AST::AttrVec ());
!     case LEFT_PAREN:
!       {
  	// tuple struct
  	lexer.skip_token ();
  
*************** Parser<ManagedTokenSource>::parse_ident_
*** 11012,11018 ****
  	return std::unique_ptr<AST::TupleStructPattern> (
  	  new AST::TupleStructPattern (std::move (path), std::move (items)));
        }
!       case LEFT_CURLY: {
  	// struct
  	lexer.skip_token ();
  
--- 11192,11199 ----
  	return std::unique_ptr<AST::TupleStructPattern> (
  	  new AST::TupleStructPattern (std::move (path), std::move (items)));
        }
!     case LEFT_CURLY:
!       {
  	// struct
  	lexer.skip_token ();
  
*************** Parser<ManagedTokenSource>::parse_ident_
*** 11033,11039 ****
        }
      case DOT_DOT_EQ:
      case DOT_DOT:
!       case ELLIPSIS: {
  	// range
  	AST::RangeKind kind
  	  = AST::tokenid_to_rangekind (lexer.peek_token ()->get_id ());
--- 11214,11221 ----
        }
      case DOT_DOT_EQ:
      case DOT_DOT:
!     case ELLIPSIS:
!       {
  	// range
  	AST::RangeKind kind
  	  = AST::tokenid_to_rangekind (lexer.peek_token ()->get_id ());
*************** Parser<ManagedTokenSource>::parse_ident_
*** 11050,11056 ****
  				 std::move (upper_bound), kind,
  				 t->get_locus ()));
        }
!       case PATTERN_BIND: {
  	// only allow on single-segment paths
  	if (path.is_single_segment ())
  	  {
--- 11232,11239 ----
  				 std::move (upper_bound), kind,
  				 t->get_locus ()));
        }
!     case PATTERN_BIND:
!       {
  	// only allow on single-segment paths
  	if (path.is_single_segment ())
  	  {
*************** Parser<ManagedTokenSource>::parse_tuple_
*** 11188,11194 ****
      case RIGHT_PAREN:
        return std::unique_ptr<AST::TupleStructItemsNoRange> (
  	new AST::TupleStructItemsNoRange (std::move (lower_patterns)));
!       case DOT_DOT: {
  	// has an upper range that must be parsed separately
  	lexer.skip_token ();
  
--- 11371,11378 ----
      case RIGHT_PAREN:
        return std::unique_ptr<AST::TupleStructItemsNoRange> (
  	new AST::TupleStructItemsNoRange (std::move (lower_patterns)));
!     case DOT_DOT:
!       {
  	// has an upper range that must be parsed separately
  	lexer.skip_token ();
  
*************** Parser<ManagedTokenSource>::parse_struct
*** 11308,11314 ****
    const_TokenPtr t = lexer.peek_token ();
    switch (t->get_id ())
      {
!       case INT_LITERAL: {
  	// tuple index
  	std::string index_str = t->get_str ();
  	int index = atoi (index_str.c_str ());
--- 11492,11499 ----
    const_TokenPtr t = lexer.peek_token ();
    switch (t->get_id ())
      {
!     case INT_LITERAL:
!       {
  	// tuple index
  	std::string index_str = t->get_str ();
  	int index = atoi (index_str.c_str ());
*************** Parser<ManagedTokenSource>::parse_struct
*** 11342,11348 ****
        // branch on next token
        switch (lexer.peek_token (1)->get_id ())
  	{
! 	  case COLON: {
  	    // identifier-pattern
  	    Identifier ident{t};
  	    lexer.skip_token ();
--- 11527,11534 ----
        // branch on next token
        switch (lexer.peek_token (1)->get_id ())
  	{
! 	case COLON:
! 	  {
  	    // identifier-pattern
  	    Identifier ident{t};
  	    lexer.skip_token ();
*************** Parser<ManagedTokenSource>::parse_struct
*** 11367,11373 ****
  						   t->get_locus ()));
  	  }
  	case COMMA:
! 	  case RIGHT_CURLY: {
  	    // identifier only
  	    Identifier ident = {t};
  	    lexer.skip_token ();
--- 11553,11560 ----
  						   t->get_locus ()));
  	  }
  	case COMMA:
! 	case RIGHT_CURLY:
! 	  {
  	    // identifier only
  	    Identifier ident = {t};
  	    lexer.skip_token ();
*************** Parser<ManagedTokenSource>::parse_struct
*** 11386,11392 ****
  	  return nullptr;
  	}
      case REF:
!       case MUT: {
  	// only identifier
  	bool has_ref = false;
  	if (t->get_id () == REF)
--- 11573,11580 ----
  	  return nullptr;
  	}
      case REF:
!     case MUT:
!       {
  	// only identifier
  	bool has_ref = false;
  	if (t->get_id () == REF)
*************** Parser<ManagedTokenSource>::parse_stmt_o
*** 11458,11464 ****
    t = lexer.peek_token ();
    switch (t->get_id ())
      {
!       case LET: {
  	// let statement
  	std::unique_ptr<AST::LetStmt> stmt (
  	  parse_let_stmt (std::move (outer_attrs)));
--- 11646,11653 ----
    t = lexer.peek_token ();
    switch (t->get_id ())
      {
!     case LET:
!       {
  	// let statement
  	std::unique_ptr<AST::LetStmt> stmt (
  	  parse_let_stmt (std::move (outer_attrs)));
*************** Parser<ManagedTokenSource>::parse_stmt_o
*** 11476,11517 ****
      case STATIC_KW:
      case AUTO:
      case TRAIT:
!       case IMPL: {
  	std::unique_ptr<AST::VisItem> item (
  	  parse_vis_item (std::move (outer_attrs)));
  	return ExprOrStmt (std::move (item));
        }
!       /* TODO: implement union keyword but not really because of
!        * context-dependence crappy hack way to parse a union written below to
!        * separate it from the good code. */
!       // case UNION:
!       case UNSAFE: { // maybe - unsafe traits are a thing
  	/* if any of these (should be all possible VisItem prefixes), parse a
  	 * VisItem - can't parse item because would require reparsing outer
  	 * attributes */
  	const_TokenPtr t2 = lexer.peek_token (1);
  	switch (t2->get_id ())
  	  {
! 	    case LEFT_CURLY: {
  	      // unsafe block: parse as expression
  	      expr = parse_expr (std::move (outer_attrs), restrictions);
  	      break;
  	    }
  	  case AUTO:
! 	    case TRAIT: {
  	      // unsafe trait
  	      std::unique_ptr<AST::VisItem> item (
  		parse_vis_item (std::move (outer_attrs)));
  	      return ExprOrStmt (std::move (item));
  	    }
  	  case EXTERN_KW:
! 	    case FN_KW: {
  	      // unsafe function
  	      std::unique_ptr<AST::VisItem> item (
  		parse_vis_item (std::move (outer_attrs)));
  	      return ExprOrStmt (std::move (item));
  	    }
! 	    case IMPL: {
  	      // unsafe trait impl
  	      std::unique_ptr<AST::VisItem> item (
  		parse_vis_item (std::move (outer_attrs)));
--- 11665,11712 ----
      case STATIC_KW:
      case AUTO:
      case TRAIT:
!     case IMPL:
!       {
  	std::unique_ptr<AST::VisItem> item (
  	  parse_vis_item (std::move (outer_attrs)));
  	return ExprOrStmt (std::move (item));
        }
!     /* TODO: implement union keyword but not really because of
!      * context-dependence crappy hack way to parse a union written below to
!      * separate it from the good code. */
!     // case UNION:
!     case UNSAFE:
!       { // maybe - unsafe traits are a thing
  	/* if any of these (should be all possible VisItem prefixes), parse a
  	 * VisItem - can't parse item because would require reparsing outer
  	 * attributes */
  	const_TokenPtr t2 = lexer.peek_token (1);
  	switch (t2->get_id ())
  	  {
! 	  case LEFT_CURLY:
! 	    {
  	      // unsafe block: parse as expression
  	      expr = parse_expr (std::move (outer_attrs), restrictions);
  	      break;
  	    }
  	  case AUTO:
! 	  case TRAIT:
! 	    {
  	      // unsafe trait
  	      std::unique_ptr<AST::VisItem> item (
  		parse_vis_item (std::move (outer_attrs)));
  	      return ExprOrStmt (std::move (item));
  	    }
  	  case EXTERN_KW:
! 	  case FN_KW:
! 	    {
  	      // unsafe function
  	      std::unique_ptr<AST::VisItem> item (
  		parse_vis_item (std::move (outer_attrs)));
  	      return ExprOrStmt (std::move (item));
  	    }
! 	  case IMPL:
! 	    {
  	      // unsafe trait impl
  	      std::unique_ptr<AST::VisItem> item (
  		parse_vis_item (std::move (outer_attrs)));
*************** Parser<ManagedTokenSource>::parse_stmt_o
*** 11556,11562 ****
      case SELF_ALIAS:
      case CRATE:
      case SCOPE_RESOLUTION:
!       case DOLLAR_SIGN: {
  	AST::PathInExpression path = parse_path_in_expression ();
  	std::unique_ptr<AST::Expr> null_denotation;
  
--- 11751,11758 ----
      case SELF_ALIAS:
      case CRATE:
      case SCOPE_RESOLUTION:
!     case DOLLAR_SIGN:
!       {
  	AST::PathInExpression path = parse_path_in_expression ();
  	std::unique_ptr<AST::Expr> null_denotation;
  
*************** Parser<ManagedTokenSource>::parse_struct
*** 11680,11686 ****
  						std::move (outer_attrs),
  						t->get_locus ()));
  	}
!       case INT_LITERAL: {
  	// parse tuple index field
  	int index = atoi (t->get_str ().c_str ());
  	lexer.skip_token ();
--- 11876,11883 ----
  						std::move (outer_attrs),
  						t->get_locus ()));
  	}
!     case INT_LITERAL:
!       {
  	// parse tuple index field
  	int index = atoi (t->get_str ().c_str ());
  	lexer.skip_token ();
*************** Parser<ManagedTokenSource>::parse_struct
*** 11725,11735 ****
  }
  
  // "Unexpected token" panic mode - flags gcc error at unexpected token
  template <typename ManagedTokenSource>
  void
  Parser<ManagedTokenSource>::unexpected_token (const_TokenPtr t)
  {
!   Error error (t->get_locus (), "unexpected token %qs\n",
  	       t->get_token_description ());
    add_error (std::move (error));
  }
--- 11922,11933 ----
  }
  
  // "Unexpected token" panic mode - flags gcc error at unexpected token
+ // TODO: seems to be unused, remove?
  template <typename ManagedTokenSource>
  void
  Parser<ManagedTokenSource>::unexpected_token (const_TokenPtr t)
  {
!   Error error (t->get_locus (), "unexpected token %qs",
  	       t->get_token_description ());
    add_error (std::move (error));
  }
*************** Parser<ManagedTokenSource>::skip_after_e
*** 11920,11926 ****
  {
    const_TokenPtr t = lexer.peek_token ();
  
!   while (t->get_id () != RIGHT_SQUARE)
      {
        lexer.skip_token ();
        t = lexer.peek_token ();
--- 12118,12124 ----
  {
    const_TokenPtr t = lexer.peek_token ();
  
!   while (t->get_id () != RIGHT_SQUARE && t->get_id () != END_OF_FILE)
      {
        lexer.skip_token ();
        t = lexer.peek_token ();
*************** Parser<ManagedTokenSource>::null_denotat
*** 12050,12056 ****
      case SELF_ALIAS:
      case DOLLAR_SIGN:
      case CRATE:
!       case SUPER: {
  	// DEBUG
  	rust_debug ("beginning null denotation identifier handling");
  
--- 12248,12255 ----
      case SELF_ALIAS:
      case DOLLAR_SIGN:
      case CRATE:
!     case SUPER:
!       {
  	// DEBUG
  	rust_debug ("beginning null denotation identifier handling");
  
*************** Parser<ManagedTokenSource>::null_denotat
*** 12061,12067 ****
  	return null_denotation_path (std::move (path), std::move (outer_attrs),
  				     restrictions);
        }
!       case SCOPE_RESOLUTION: {
  	// TODO: fix: this is for global paths, i.e. std::string::whatever
  	Error error (tok->get_locus (),
  		     "found null denotation scope resolution operator, and "
--- 12260,12267 ----
  	return null_denotation_path (std::move (path), std::move (outer_attrs),
  				     restrictions);
        }
!     case SCOPE_RESOLUTION:
!       {
  	// TODO: fix: this is for global paths, i.e. std::string::whatever
  	Error error (tok->get_locus (),
  		     "found null denotation scope resolution operator, and "
*************** Parser<ManagedTokenSource>::null_denotat
*** 12103,12109 ****
        // macro
        return parse_macro_invocation_partial (std::move (path),
  					     std::move (outer_attrs));
!       case LEFT_CURLY: {
  	bool not_a_block = lexer.peek_token (1)->get_id () == IDENTIFIER
  			   && (lexer.peek_token (2)->get_id () == COMMA
  			       || (lexer.peek_token (2)->get_id () == COLON
--- 12303,12310 ----
        // macro
        return parse_macro_invocation_partial (std::move (path),
  					     std::move (outer_attrs));
!     case LEFT_CURLY:
!       {
  	bool not_a_block = lexer.peek_token (1)->get_id () == IDENTIFIER
  			   && (lexer.peek_token (2)->get_id () == COMMA
  			       || (lexer.peek_token (2)->get_id () == COLON
*************** Parser<ManagedTokenSource>::null_denotat
*** 12179,12185 ****
      {
      // FIXME: Handle in null_denotation_path?
      case LEFT_SHIFT:
!       case LEFT_ANGLE: {
  	// qualified path
  	// HACK: add outer attrs to path
  	AST::QualifiedPathInExpression path
--- 12380,12387 ----
      {
      // FIXME: Handle in null_denotation_path?
      case LEFT_SHIFT:
!     case LEFT_ANGLE:
!       {
  	// qualified path
  	// HACK: add outer attrs to path
  	AST::QualifiedPathInExpression path
*************** Parser<ManagedTokenSource>::null_denotat
*** 12237,12259 ****
        return parse_grouped_or_tuple_expr (std::move (outer_attrs),
  					  tok->get_locus ());
  
!       /*case PLUS: { // unary plus operator
! 	  // invoke parse_expr recursively with appropriate priority, etc. for
!       below AST::Expr* expr = parse_expr(LBP_UNARY_PLUS);
  
! 	  if (expr == nullptr)
! 	      return nullptr;
! 	  // can only apply to integer and float expressions
! 	  if (expr->get_type() != integer_type_node || expr->get_type() !=
!       float_type_node) { rust_error_at(tok->get_locus(), "operand of unary
!       plus must be int or float but it is %s", print_type(expr->get_type()));
!       return nullptr;
! 	  }
  
! 	  return Tree(expr, tok->get_locus());
!       }*/
!       // Rust has no unary plus operator
!       case MINUS: { // unary minus
  	ParseRestrictions entered_from_unary;
  	entered_from_unary.entered_from_unary = true;
  	if (!restrictions.can_be_struct_expr)
--- 12439,12462 ----
        return parse_grouped_or_tuple_expr (std::move (outer_attrs),
  					  tok->get_locus ());
  
!     /*case PLUS: { // unary plus operator
! 	// invoke parse_expr recursively with appropriate priority, etc. for
!     below AST::Expr* expr = parse_expr(LBP_UNARY_PLUS);
  
! 	if (expr == nullptr)
! 	    return nullptr;
! 	// can only apply to integer and float expressions
! 	if (expr->get_type() != integer_type_node || expr->get_type() !=
!     float_type_node) { rust_error_at(tok->get_locus(), "operand of unary
!     plus must be int or float but it is %s", print_type(expr->get_type()));
!     return nullptr;
! 	}
  
! 	return Tree(expr, tok->get_locus());
!     }*/
!     // Rust has no unary plus operator
!     case MINUS:
!       { // unary minus
  	ParseRestrictions entered_from_unary;
  	entered_from_unary.entered_from_unary = true;
  	if (!restrictions.can_be_struct_expr)
*************** Parser<ManagedTokenSource>::null_denotat
*** 12280,12286 ****
  	  new AST::NegationExpr (std::move (expr), NegationOperator::NEGATE,
  				 std::move (outer_attrs), tok->get_locus ()));
        }
!       case EXCLAM: { // logical or bitwise not
  	ParseRestrictions entered_from_unary;
  	entered_from_unary.entered_from_unary = true;
  	if (!restrictions.can_be_struct_expr)
--- 12483,12490 ----
  	  new AST::NegationExpr (std::move (expr), NegationOperator::NEGATE,
  				 std::move (outer_attrs), tok->get_locus ()));
        }
!     case EXCLAM:
!       { // logical or bitwise not
  	ParseRestrictions entered_from_unary;
  	entered_from_unary.entered_from_unary = true;
  	if (!restrictions.can_be_struct_expr)
*************** Parser<ManagedTokenSource>::null_denotat
*** 12305,12311 ****
  	  new AST::NegationExpr (std::move (expr), NegationOperator::NOT,
  				 std::move (outer_attrs), tok->get_locus ()));
        }
!       case ASTERISK: {
  	/* pointer dereference only - HACK: as struct expressions should
  	 * always be value expressions, cannot be dereferenced */
  	ParseRestrictions entered_from_unary;
--- 12509,12516 ----
  	  new AST::NegationExpr (std::move (expr), NegationOperator::NOT,
  				 std::move (outer_attrs), tok->get_locus ()));
        }
!     case ASTERISK:
!       {
  	/* pointer dereference only - HACK: as struct expressions should
  	 * always be value expressions, cannot be dereferenced */
  	ParseRestrictions entered_from_unary;
*************** Parser<ManagedTokenSource>::null_denotat
*** 12318,12324 ****
  	  new AST::DereferenceExpr (std::move (expr), std::move (outer_attrs),
  				    tok->get_locus ()));
        }
!       case AMP: {
  	// (single) "borrow" expression - shared (mutable) or immutable
  	std::unique_ptr<AST::Expr> expr = nullptr;
  	Mutability mutability = Mutability::Imm;
--- 12523,12530 ----
  	  new AST::DereferenceExpr (std::move (expr), std::move (outer_attrs),
  				    tok->get_locus ()));
        }
!     case AMP:
!       {
  	// (single) "borrow" expression - shared (mutable) or immutable
  	std::unique_ptr<AST::Expr> expr = nullptr;
  	Mutability mutability = Mutability::Imm;
*************** Parser<ManagedTokenSource>::null_denotat
*** 12375,12381 ****
  	  new AST::BorrowExpr (std::move (expr), mutability, raw_borrow, false,
  			       std::move (outer_attrs), tok->get_locus ()));
        }
!       case LOGICAL_AND: {
  	// (double) "borrow" expression - shared (mutable) or immutable
  	std::unique_ptr<AST::Expr> expr = nullptr;
  	Mutability mutability = Mutability::Imm;
--- 12581,12588 ----
  	  new AST::BorrowExpr (std::move (expr), mutability, raw_borrow, false,
  			       std::move (outer_attrs), tok->get_locus ()));
        }
!     case LOGICAL_AND:
!       {
  	// (double) "borrow" expression - shared (mutable) or immutable
  	std::unique_ptr<AST::Expr> expr = nullptr;
  	Mutability mutability = Mutability::Imm;
*************** Parser<ManagedTokenSource>::null_denotat
*** 12414,12419 ****
--- 12621,12629 ----
      case RETURN_KW:
        // FIXME: is this really a null denotation expression?
        return parse_return_expr (std::move (outer_attrs), tok->get_locus ());
+     case TRY:
+       // FIXME: is this really a null denotation expression?
+       return parse_try_expr (std::move (outer_attrs), tok->get_locus ());
      case BREAK:
        // FIXME: is this really a null denotation expression?
        return parse_break_expr (std::move (outer_attrs), tok->get_locus ());
*************** Parser<ManagedTokenSource>::null_denotat
*** 12469,12474 ****
--- 12679,12687 ----
  	       "use of %qs is not allowed on the right-side of an assignment",
  	       tok->get_token_description ()));
        return nullptr;
+     case CONST:
+       return parse_const_block_expr (std::move (outer_attrs),
+ 				     tok->get_locus ());
      default:
        if (!restrictions.expr_can_be_null)
  	add_error (Error (tok->get_locus (),
*************** Parser<ManagedTokenSource>::left_denotat
*** 12491,12498 ****
    // Token passed in has already been skipped, so peek gives "next" token
    switch (tok->get_id ())
      {
!       // FIXME: allow for outer attributes to be applied
!       case QUESTION_MARK: {
  	location_t left_locus = left->get_locus ();
  	// error propagation expression - unary postfix
  	return std::unique_ptr<AST::ErrorPropagationExpr> (
--- 12704,12712 ----
    // Token passed in has already been skipped, so peek gives "next" token
    switch (tok->get_id ())
      {
!     // FIXME: allow for outer attributes to be applied
!     case QUESTION_MARK:
!       {
  	location_t left_locus = left->get_locus ();
  	// error propagation expression - unary postfix
  	return std::unique_ptr<AST::ErrorPropagationExpr> (
*************** Parser<ManagedTokenSource>::left_denotat
*** 12746,12752 ****
  	       "function - this should probably be handled elsewhere"));
  
        return nullptr;
!       case DOT: {
  	/* field expression or method call - relies on parentheses after next
  	 * identifier or await if token after is "await" (unary postfix) or
  	 * tuple index if token after is a decimal int literal */
--- 12960,12967 ----
  	       "function - this should probably be handled elsewhere"));
  
        return nullptr;
!     case DOT:
!       {
  	/* field expression or method call - relies on parentheses after next
  	 * identifier or await if token after is "await" (unary postfix) or
  	 * tuple index if token after is a decimal int literal */
*************** Parser<ManagedTokenSource>::parse_struct
*** 14062,14068 ****
         * algorithm should work too. As such, AST type not happening. */
      case IDENTIFIER:
      case HASH:
!       case INT_LITERAL: {
  	// struct with struct expr fields
  
  	// parse struct expr fields
--- 14277,14284 ----
         * algorithm should work too. As such, AST type not happening. */
      case IDENTIFIER:
      case HASH:
!     case INT_LITERAL:
!       {
  	// struct with struct expr fields
  
  	// parse struct expr fields
*************** Parser<ManagedTokenSource>::parse_closur
*** 14359,14365 ****
      case OR:
        // no parameters, don't skip token
        break;
!       case PIPE: {
  	// actually may have parameters
  	// don't skip token
  	const_TokenPtr t = lexer.peek_token ();
--- 14575,14582 ----
      case OR:
        // no parameters, don't skip token
        break;
!     case PIPE:
!       {
  	// actually may have parameters
  	// don't skip token
  	const_TokenPtr t = lexer.peek_token ();
diff -Nrcpad gcc-16-20250803/gcc/rust/parse/rust-parse.cc gcc-16-20250810/gcc/rust/parse/rust-parse.cc
*** gcc-16-20250803/gcc/rust/parse/rust-parse.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/parse/rust-parse.cc	Sun Aug 10 22:32:08 2025
*************** extract_module_path (const AST::AttrVec
*** 42,49 ****
      {
        rust_error_at (
  	path_attr.get_locus (),
! 	// Split the format string so that -Wformat-diag does not complain...
! 	"path attributes must contain a filename: '%s'", "#![path = \"file\"]");
        return name;
      }
  
--- 42,48 ----
      {
        rust_error_at (
  	path_attr.get_locus (),
! 	"path attributes must contain a filename: %<#[path = \"file\"]%>");
        return name;
      }
  
*************** extract_module_path (const AST::AttrVec
*** 67,74 ****
      {
        rust_error_at (
  	path_attr.get_locus (),
! 	// Split the format string so that -Wformat-diag does not complain...
! 	"path attributes must contain a filename: '%s'", "#[path = \"file\"]");
        return name;
      }
  
--- 66,72 ----
      {
        rust_error_at (
  	path_attr.get_locus (),
! 	"path attributes must contain a filename: %<#[path = \"file\"]%>");
        return name;
      }
  
*************** extract_module_path (const AST::AttrVec
*** 80,85 ****
--- 78,92 ----
    // a character that is not an equal sign or whitespace
    auto filename_begin = path_value.find_first_not_of ("=\t ");
  
+   // If the path consists of only whitespace, then we have an error
+   if (filename_begin == std::string::npos)
+     {
+       rust_error_at (
+ 	path_attr.get_locus (),
+ 	"path attributes must contain a filename: %<#[path = \"file\"]%>");
+       return name;
+     }
+ 
    auto path = path_value.substr (filename_begin);
  
    // On windows, the path might mix '/' and '\' separators. Replace the
*************** peculiar_fragment_match_compatible_fragm
*** 144,153 ****
      = contains (fragment_follow_set[last_spec.get_kind ()], spec.get_kind ());
  
    if (!is_valid)
!     rust_error_at (
!       match_locus,
!       "fragment specifier %qs is not allowed after %qs fragments",
!       spec.as_string ().c_str (), last_spec.as_string ().c_str ());
  
    return is_valid;
  }
--- 151,159 ----
      = contains (fragment_follow_set[last_spec.get_kind ()], spec.get_kind ());
  
    if (!is_valid)
!     rust_error_at (match_locus,
! 		   "fragment specifier %qs is not allowed after %qs fragments",
! 		   spec.as_string ().c_str (), last_spec.as_string ().c_str ());
  
    return is_valid;
  }
*************** peculiar_fragment_match_compatible (cons
*** 244,250 ****
    // the error.
    switch (match.get_macro_match_type ())
      {
!       case AST::MacroMatch::Tok: {
  	auto tok = static_cast<const AST::Token *> (&match);
  	if (contains (allowed_toks, tok->get_id ()))
  	  return true;
--- 250,257 ----
    // the error.
    switch (match.get_macro_match_type ())
      {
!     case AST::MacroMatch::Tok:
!       {
  	auto tok = static_cast<const AST::Token *> (&match);
  	if (contains (allowed_toks, tok->get_id ()))
  	  return true;
*************** peculiar_fragment_match_compatible (cons
*** 254,260 ****
  	break;
        }
        break;
!       case AST::MacroMatch::Repetition: {
  	auto repetition
  	  = static_cast<const AST::MacroMatchRepetition *> (&match);
  	auto &matches = repetition->get_matches ();
--- 261,268 ----
  	break;
        }
        break;
!     case AST::MacroMatch::Repetition:
!       {
  	auto repetition
  	  = static_cast<const AST::MacroMatchRepetition *> (&match);
  	auto &matches = repetition->get_matches ();
*************** peculiar_fragment_match_compatible (cons
*** 263,269 ****
  	  return peculiar_fragment_match_compatible (last_match, *first_frag);
  	break;
        }
!       case AST::MacroMatch::Matcher: {
  	auto matcher = static_cast<const AST::MacroMatcher *> (&match);
  	auto first_token = matcher->get_delim_type ();
  	TokenId delim_id;
--- 271,278 ----
  	  return peculiar_fragment_match_compatible (last_match, *first_frag);
  	break;
        }
!     case AST::MacroMatch::Matcher:
!       {
  	auto matcher = static_cast<const AST::MacroMatcher *> (&match);
  	auto first_token = matcher->get_delim_type ();
  	TokenId delim_id;
*************** peculiar_fragment_match_compatible (cons
*** 289,295 ****
  	error_locus = matcher->get_match_locus ();
  	break;
        }
!       case AST::MacroMatch::Fragment: {
  	auto last_spec = last_match.get_frag_spec ();
  	auto fragment = static_cast<const AST::MacroMatchFragment *> (&match);
  	if (last_spec.has_follow_set_fragment_restrictions ())
--- 298,305 ----
  	error_locus = matcher->get_match_locus ();
  	break;
        }
!     case AST::MacroMatch::Fragment:
!       {
  	auto last_spec = last_match.get_frag_spec ();
  	auto fragment = static_cast<const AST::MacroMatchFragment *> (&match);
  	if (last_spec.has_follow_set_fragment_restrictions ())
*************** is_match_compatible (const AST::MacroMat
*** 328,337 ****
  
    switch (last_match.get_macro_match_type ())
      {
!       // This is our main stop condition: When we are finally looking at the
!       // last match (or its actual last component), and it is a fragment, it
!       // may contain some follow up restrictions.
!       case AST::MacroMatch::Fragment: {
  	auto fragment
  	  = static_cast<const AST::MacroMatchFragment *> (&last_match);
  	if (fragment->get_frag_spec ().has_follow_set_restrictions ())
--- 338,348 ----
  
    switch (last_match.get_macro_match_type ())
      {
!     // This is our main stop condition: When we are finally looking at the
!     // last match (or its actual last component), and it is a fragment, it
!     // may contain some follow up restrictions.
!     case AST::MacroMatch::Fragment:
!       {
  	auto fragment
  	  = static_cast<const AST::MacroMatchFragment *> (&last_match);
  	if (fragment->get_frag_spec ().has_follow_set_restrictions ())
*************** is_match_compatible (const AST::MacroMat
*** 339,345 ****
  	else
  	  return true;
        }
!       case AST::MacroMatch::Repetition: {
  	// A repetition on the left hand side means we want to make sure the
  	// last match of the repetition is compatible with the new match
  	auto repetition
--- 350,357 ----
  	else
  	  return true;
        }
!     case AST::MacroMatch::Repetition:
!       {
  	// A repetition on the left hand side means we want to make sure the
  	// last match of the repetition is compatible with the new match
  	auto repetition
diff -Nrcpad gcc-16-20250803/gcc/rust/parse/rust-parse.h gcc-16-20250810/gcc/rust/parse/rust-parse.h
*** gcc-16-20250803/gcc/rust/parse/rust-parse.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/parse/rust-parse.h	Sun Aug 10 22:32:08 2025
*************** along with GCC; see the file COPYING3.
*** 17,22 ****
--- 17,23 ----
  #ifndef RUST_PARSE_H
  #define RUST_PARSE_H
  
+ #include "rust-ast.h"
  #include "rust-item.h"
  #include "rust-lex.h"
  #include "rust-ast-full.h"
*************** class ParseLifetimeParamError
*** 33,44 ****
  class ParseLifetimeError
  {
  };
  enum class ParseLoopLabelError
  {
    NOT_LOOP_LABEL,
    MISSING_COLON,
  };
! enum ParseSelfError
  {
    SELF_PTR,
    PARSING,
--- 34,52 ----
  class ParseLifetimeError
  {
  };
+ 
+ enum class AnonConstError
+ {
+   InvalidSizeExpr,
+ };
+ 
  enum class ParseLoopLabelError
  {
    NOT_LOOP_LABEL,
    MISSING_COLON,
  };
! 
! enum class ParseSelfError
  {
    SELF_PTR,
    PARSING,
*************** public:
*** 165,170 ****
--- 173,184 ----
  		    tl::optional<AST::LoopLabel> = tl::nullopt,
  		    location_t pratt_parsed_loc = UNKNOWN_LOCATION);
  
+   tl::expected<AST::AnonConst, AnonConstError> parse_anon_const ();
+ 
+   std::unique_ptr<AST::ConstBlock>
+   parse_const_block_expr (AST::AttrVec outer_attrs = AST::AttrVec (),
+ 			  location_t loc = UNKNOWN_LOCATION);
+ 
    bool is_macro_rules_def (const_TokenPtr t);
    std::unique_ptr<AST::Item> parse_item (bool called_from_statement);
    std::unique_ptr<AST::Pattern> parse_pattern ();
*************** private:
*** 222,228 ****
  
    // Path-related
    AST::SimplePath parse_simple_path ();
!   AST::SimplePathSegment parse_simple_path_segment ();
    AST::TypePath parse_type_path ();
    std::unique_ptr<AST::TypePathSegment> parse_type_path_segment ();
    AST::PathIdentSegment parse_path_ident_segment ();
--- 236,242 ----
  
    // Path-related
    AST::SimplePath parse_simple_path ();
!   AST::SimplePathSegment parse_simple_path_segment (int base_peek = 0);
    AST::TypePath parse_type_path ();
    std::unique_ptr<AST::TypePathSegment> parse_type_path_segment ();
    AST::PathIdentSegment parse_path_ident_segment ();
*************** private:
*** 644,649 ****
--- 658,666 ----
    std::unique_ptr<AST::ReturnExpr>
    parse_return_expr (AST::AttrVec outer_attrs = AST::AttrVec (),
  		     location_t pratt_parsed_loc = UNKNOWN_LOCATION);
+   std::unique_ptr<AST::TryExpr>
+   parse_try_expr (AST::AttrVec outer_attrs = AST::AttrVec (),
+ 		  location_t pratt_parsed_loc = UNKNOWN_LOCATION);
    std::unique_ptr<AST::BreakExpr>
    parse_break_expr (AST::AttrVec outer_attrs = AST::AttrVec (),
  		    location_t pratt_parsed_loc = UNKNOWN_LOCATION);
*************** private:
*** 762,772 ****
      }
      ~InlineModuleStackScope () { parser.inline_module_stack.pop_back (); }
    };
  };
  
! std::string
! extract_module_path (const AST::AttrVec &inner_attrs,
! 		     const AST::AttrVec &outer_attrs, const std::string &name);
  
  /**
   * Check if a MacroMatch is allowed to follow the last parsed MacroMatch.
--- 779,793 ----
      }
      ~InlineModuleStackScope () { parser.inline_module_stack.pop_back (); }
    };
+ 
+   // don't want to make things *only* AttributeParser uses public
+   // TODO: fold more of AttributeParser into Parser?
+   friend class ::Rust::AST::AttributeParser;
  };
  
! std::string extract_module_path (const AST::AttrVec &inner_attrs,
! 				 const AST::AttrVec &outer_attrs,
! 				 const std::string &name);
  
  /**
   * Check if a MacroMatch is allowed to follow the last parsed MacroMatch.
*************** extract_module_path (const AST::AttrVec
*** 776,787 ****
   *
   * @return true if the follow-up is valid, false otherwise
   */
! bool
! is_match_compatible (const AST::MacroMatch &last_match,
! 		     const AST::MacroMatch &current_match);
  } // namespace Rust
  
- // as now template, include implementations of all methods
- #include "rust-parse-impl.h"
- 
  #endif // RUST_PARSE_H
--- 797,804 ----
   *
   * @return true if the follow-up is valid, false otherwise
   */
! bool is_match_compatible (const AST::MacroMatch &last_match,
! 			  const AST::MacroMatch &current_match);
  } // namespace Rust
  
  #endif // RUST_PARSE_H
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-ast-resolve-base.cc gcc-16-20250810/gcc/rust/resolve/rust-ast-resolve-base.cc
*** gcc-16-20250803/gcc/rust/resolve/rust-ast-resolve-base.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-ast-resolve-base.cc	Sun Aug 10 22:32:08 2025
*************** ResolverBase::visit (AST::MetaItemLitExp
*** 116,122 ****
  {}
  
  void
! ResolverBase::visit (AST::MetaItemPathLit &)
  {}
  
  void
--- 116,122 ----
  {}
  
  void
! ResolverBase::visit (AST::MetaItemPathExpr &)
  {}
  
  void
*************** ResolverBase::visit (AST::BlockExpr &)
*** 232,237 ****
--- 232,245 ----
  {}
  
  void
+ ResolverBase::visit (AST::AnonConst &)
+ {}
+ 
+ void
+ ResolverBase::visit (AST::ConstBlock &)
+ {}
+ 
+ void
  ResolverBase::visit (AST::ClosureExprInnerTyped &)
  {}
  
*************** ResolverBase::visit (AST::ReturnExpr &)
*** 276,281 ****
--- 284,293 ----
  {}
  
  void
+ ResolverBase::visit (AST::TryExpr &)
+ {}
+ 
+ void
  ResolverBase::visit (AST::UnsafeBlockExpr &)
  {}
  
*************** ResolverBase::visit (AST::GroupedPattern
*** 572,577 ****
--- 584,597 ----
  {}
  
  void
+ ResolverBase::visit (AST::SlicePatternItemsNoRest &)
+ {}
+ 
+ void
+ ResolverBase::visit (AST::SlicePatternItemsHasRest &)
+ {}
+ 
+ void
  ResolverBase::visit (AST::SlicePattern &)
  {}
  
*************** void
*** 663,667 ****
--- 683,691 ----
  ResolverBase::visit (AST::FormatArgs &fmt)
  {}
  
+ void
+ ResolverBase::visit (AST::OffsetOf &offset_of)
+ {}
+ 
  } // namespace Resolver
  } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-ast-resolve-base.h gcc-16-20250810/gcc/rust/resolve/rust-ast-resolve-base.h
*** gcc-16-20250803/gcc/rust/resolve/rust-ast-resolve-base.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-ast-resolve-base.h	Sun Aug 10 22:32:08 2025
***************
*** 21,26 ****
--- 21,28 ----
  
  #include "rust-ast-visitor.h"
  #include "rust-ast.h"
+ #include "rust-builtin-ast-nodes.h"
+ #include "rust-expr.h"
  #include "rust-name-resolver.h"
  #include "rust-diagnostics.h"
  #include "rust-location.h"
*************** public:
*** 56,62 ****
    void visit (AST::AttrInputLiteral &);
    void visit (AST::AttrInputMacro &);
    void visit (AST::MetaItemLitExpr &);
!   void visit (AST::MetaItemPathLit &);
    void visit (AST::BorrowExpr &);
    void visit (AST::DereferenceExpr &);
    void visit (AST::ErrorPropagationExpr &);
--- 58,64 ----
    void visit (AST::AttrInputLiteral &);
    void visit (AST::AttrInputMacro &);
    void visit (AST::MetaItemLitExpr &);
!   void visit (AST::MetaItemPathExpr &);
    void visit (AST::BorrowExpr &);
    void visit (AST::DereferenceExpr &);
    void visit (AST::ErrorPropagationExpr &);
*************** public:
*** 85,90 ****
--- 87,94 ----
    void visit (AST::FieldAccessExpr &);
    void visit (AST::ClosureExprInner &);
    void visit (AST::BlockExpr &);
+   void visit (AST::AnonConst &);
+   void visit (AST::ConstBlock &);
    void visit (AST::ClosureExprInnerTyped &);
    void visit (AST::ContinueExpr &);
    void visit (AST::BreakExpr &);
*************** public:
*** 96,101 ****
--- 100,106 ----
    void visit (AST::RangeToInclExpr &);
    void visit (AST::BoxExpr &);
    void visit (AST::ReturnExpr &);
+   void visit (AST::TryExpr &);
    void visit (AST::UnsafeBlockExpr &);
    void visit (AST::LoopExpr &);
    void visit (AST::WhileLoopExpr &);
*************** public:
*** 181,186 ****
--- 186,193 ----
    void visit (AST::TuplePatternItemsRanged &);
    void visit (AST::TuplePattern &);
    void visit (AST::GroupedPattern &);
+   void visit (AST::SlicePatternItemsNoRest &);
+   void visit (AST::SlicePatternItemsHasRest &);
    void visit (AST::SlicePattern &);
    void visit (AST::AltPattern &);
  
*************** public:
*** 207,212 ****
--- 214,220 ----
    void visit (AST::SelfParam &param);
  
    void visit (AST::FormatArgs &fmt);
+   void visit (AST::OffsetOf &offset_of);
  
  protected:
    ResolverBase ()
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-ast-resolve-expr.cc gcc-16-20250810/gcc/rust/resolve/rust-ast-resolve-expr.cc
*** gcc-16-20250803/gcc/rust/resolve/rust-ast-resolve-expr.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-ast-resolve-expr.cc	Sun Aug 10 22:32:08 2025
*************** ResolveExpr::visit (AST::BlockExpr &expr
*** 315,320 ****
--- 315,332 ----
  }
  
  void
+ ResolveExpr::visit (AST::AnonConst &expr)
+ {
+   ResolveExpr::go (expr.get_inner_expr (), prefix, canonical_prefix);
+ }
+ 
+ void
+ ResolveExpr::visit (AST::ConstBlock &expr)
+ {
+   ResolveExpr::go (expr.get_const_expr (), prefix, canonical_prefix);
+ }
+ 
+ void
  translate_operand (AST::InlineAsm &expr, const CanonicalPath &prefix,
  		   const CanonicalPath &canonical_prefix)
  {
*************** translate_operand (AST::InlineAsm &expr,
*** 324,361 ****
      {
        switch (operand.get_register_type ())
  	{
! 	  case RegisterType::In: {
  	    auto in = operand.get_in ();
  	    ResolveExpr::go (*in.expr, prefix, canonical_prefix);
  	    break;
  	  }
! 	  case RegisterType::Out: {
  	    auto out = operand.get_out ();
  	    ResolveExpr::go (*out.expr, prefix, canonical_prefix);
  	    break;
  	  }
! 	  case RegisterType::InOut: {
  	    auto in_out = operand.get_in_out ();
  	    ResolveExpr::go (*in_out.expr, prefix, canonical_prefix);
  	    break;
  	  }
! 	  case RegisterType::SplitInOut: {
  	    auto split_in_out = operand.get_split_in_out ();
  	    ResolveExpr::go (*split_in_out.in_expr, prefix, canonical_prefix);
  	    ResolveExpr::go (*split_in_out.out_expr, prefix, canonical_prefix);
  	    break;
  	  }
! 	  case RegisterType::Const: {
  	    auto anon_const = operand.get_const ().anon_const;
! 	    ResolveExpr::go (*anon_const.expr, prefix, canonical_prefix);
  	    break;
  	  }
! 	  case RegisterType::Sym: {
  	    auto sym = operand.get_sym ();
  	    ResolveExpr::go (*sym.expr, prefix, canonical_prefix);
  	    break;
  	  }
! 	  case RegisterType::Label: {
  	    auto label = operand.get_label ();
  	    ResolveExpr::go (*label.expr, prefix, canonical_prefix);
  	    break;
--- 336,381 ----
      {
        switch (operand.get_register_type ())
  	{
! 	case RegisterType::In:
! 	  {
  	    auto in = operand.get_in ();
  	    ResolveExpr::go (*in.expr, prefix, canonical_prefix);
  	    break;
  	  }
! 	case RegisterType::Out:
! 	  {
  	    auto out = operand.get_out ();
  	    ResolveExpr::go (*out.expr, prefix, canonical_prefix);
  	    break;
  	  }
! 	case RegisterType::InOut:
! 	  {
  	    auto in_out = operand.get_in_out ();
  	    ResolveExpr::go (*in_out.expr, prefix, canonical_prefix);
  	    break;
  	  }
! 	case RegisterType::SplitInOut:
! 	  {
  	    auto split_in_out = operand.get_split_in_out ();
  	    ResolveExpr::go (*split_in_out.in_expr, prefix, canonical_prefix);
  	    ResolveExpr::go (*split_in_out.out_expr, prefix, canonical_prefix);
  	    break;
  	  }
! 	case RegisterType::Const:
! 	  {
  	    auto anon_const = operand.get_const ().anon_const;
! 	    ResolveExpr::go (anon_const.get_inner_expr (), prefix,
! 			     canonical_prefix);
  	    break;
  	  }
! 	case RegisterType::Sym:
! 	  {
  	    auto sym = operand.get_sym ();
  	    ResolveExpr::go (*sym.expr, prefix, canonical_prefix);
  	    break;
  	  }
! 	case RegisterType::Label:
! 	  {
  	    auto label = operand.get_label ();
  	    ResolveExpr::go (*label.expr, prefix, canonical_prefix);
  	    break;
*************** ResolveExpr::visit (AST::ClosureExprInne
*** 766,772 ****
  
    resolver->push_closure_context (expr.get_node_id ());
  
!   ResolveExpr::go (expr.get_definition_block (), prefix, canonical_prefix);
  
    resolver->pop_closure_context ();
  
--- 786,792 ----
  
    resolver->push_closure_context (expr.get_node_id ());
  
!   ResolveExpr::go (expr.get_definition_expr (), prefix, canonical_prefix);
  
    resolver->pop_closure_context ();
  
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-ast-resolve-expr.h gcc-16-20250810/gcc/rust/resolve/rust-ast-resolve-expr.h
*** gcc-16-20250803/gcc/rust/resolve/rust-ast-resolve-expr.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-ast-resolve-expr.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 56,61 ****
--- 56,63 ----
    void visit (AST::IfLetExpr &expr) override;
    void visit (AST::IfLetExprConseqElse &expr) override;
    void visit (AST::BlockExpr &expr) override;
+   void visit (AST::AnonConst &expr) override;
+   void visit (AST::ConstBlock &expr) override;
    void visit (AST::InlineAsm &expr) override;
    void visit (AST::LlvmInlineAsm &expr) override;
    void visit (AST::UnsafeBlockExpr &expr) override;
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-ast-resolve-item.cc gcc-16-20250810/gcc/rust/resolve/rust-ast-resolve-item.cc
*** gcc-16-20250803/gcc/rust/resolve/rust-ast-resolve-item.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-ast-resolve-item.cc	Sun Aug 10 22:32:08 2025
*************** ResolveItem::visit (AST::ConstantItem &c
*** 453,459 ****
    resolve_visibility (constant.get_visibility ());
  
    ResolveType::go (constant.get_type ());
!   ResolveExpr::go (constant.get_expr (), path, cpath);
  }
  
  void
--- 453,460 ----
    resolve_visibility (constant.get_visibility ());
  
    ResolveType::go (constant.get_type ());
!   if (constant.has_expr ())
!     ResolveExpr::go (constant.get_expr (), path, cpath);
  }
  
  void
*************** ResolveItem::visit (AST::InherentImpl &i
*** 608,617 ****
      }
    else
      {
!       std::string seg_buf = "<impl " + self_cpath.get () + ">";
!       CanonicalPath seg
! 	= CanonicalPath::new_seg (impl_block.get_node_id (), seg_buf);
!       cpath = canonical_prefix.append (seg);
      }
  
    // done setup paths
--- 609,615 ----
      }
    else
      {
!       cpath = canonical_prefix.append (impl_type_seg);
      }
  
    // done setup paths
*************** ResolveItem::visit (AST::TraitImpl &impl
*** 732,744 ****
      }
    else
      {
!       std::string projection_str = canonical_projection.get ();
!       std::string seg_buf
! 	= "<impl " + projection_str.substr (1, projection_str.size () - 2)
! 	  + ">";
!       CanonicalPath seg
! 	= CanonicalPath::new_seg (impl_block.get_node_id (), seg_buf);
!       cpath = canonical_prefix.append (seg);
      }
  
    // DONE setup canonical-path
--- 730,736 ----
      }
    else
      {
!       cpath = canonical_prefix.append (canonical_projection);
      }
  
    // DONE setup canonical-path
*************** ResolveItem::resolve_extern_item (AST::E
*** 838,866 ****
    ResolveExternItem::go (item, prefix, canonical_prefix);
  }
  
! static void
! flatten_glob (const AST::UseTreeGlob &glob, std::vector<Import> &imports);
! static void
! flatten_rebind (const AST::UseTreeRebind &glob, std::vector<Import> &imports);
! static void
! flatten_list (const AST::UseTreeList &glob, std::vector<Import> &imports);
  
  static void
  flatten (const AST::UseTree *tree, std::vector<Import> &imports)
  {
    switch (tree->get_kind ())
      {
!       case AST::UseTree::Glob: {
  	auto glob = static_cast<const AST::UseTreeGlob *> (tree);
  	flatten_glob (*glob, imports);
  	break;
        }
!       case AST::UseTree::Rebind: {
  	auto rebind = static_cast<const AST::UseTreeRebind *> (tree);
  	flatten_rebind (*rebind, imports);
  	break;
        }
!       case AST::UseTree::List: {
  	auto list = static_cast<const AST::UseTreeList *> (tree);
  	flatten_list (*list, imports);
  	break;
--- 830,861 ----
    ResolveExternItem::go (item, prefix, canonical_prefix);
  }
  
! static void flatten_glob (const AST::UseTreeGlob &glob,
! 			  std::vector<Import> &imports);
! static void flatten_rebind (const AST::UseTreeRebind &glob,
! 			    std::vector<Import> &imports);
! static void flatten_list (const AST::UseTreeList &glob,
! 			  std::vector<Import> &imports);
  
  static void
  flatten (const AST::UseTree *tree, std::vector<Import> &imports)
  {
    switch (tree->get_kind ())
      {
!     case AST::UseTree::Glob:
!       {
  	auto glob = static_cast<const AST::UseTreeGlob *> (tree);
  	flatten_glob (*glob, imports);
  	break;
        }
!     case AST::UseTree::Rebind:
!       {
  	auto rebind = static_cast<const AST::UseTreeRebind *> (tree);
  	flatten_rebind (*rebind, imports);
  	break;
        }
!     case AST::UseTree::List:
!       {
  	auto list = static_cast<const AST::UseTreeList *> (tree);
  	flatten_list (*list, imports);
  	break;
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-ast-resolve-item.h gcc-16-20250810/gcc/rust/resolve/rust-ast-resolve-item.h
*** gcc-16-20250803/gcc/rust/resolve/rust-ast-resolve-item.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-ast-resolve-item.h	Sun Aug 10 22:32:08 2025
*************** private:
*** 153,160 ****
  #if CHECKING_P
  
  namespace selftest {
! extern void
! rust_simple_path_resolve_test (void);
  } // namespace selftest
  
  #endif // CHECKING_P
--- 153,159 ----
  #if CHECKING_P
  
  namespace selftest {
! extern void rust_simple_path_resolve_test (void);
  } // namespace selftest
  
  #endif // CHECKING_P
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-ast-resolve-pattern.cc gcc-16-20250810/gcc/rust/resolve/rust-ast-resolve-pattern.cc
*** gcc-16-20250803/gcc/rust/resolve/rust-ast-resolve-pattern.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-ast-resolve-pattern.cc	Sun Aug 10 22:32:08 2025
*************** PatternDeclaration::go (AST::Pattern &pa
*** 62,67 ****
--- 62,72 ----
  void
  PatternDeclaration::visit (AST::IdentifierPattern &pattern)
  {
+   if (pattern.has_subpattern ())
+     {
+       pattern.get_subpattern ().accept_vis (*this);
+     }
+ 
    Mutability mut = pattern.get_is_mut () ? Mutability::Mut : Mutability::Imm;
    add_new_binding (pattern.get_ident (), pattern.get_node_id (),
  		   BindingTypeInfo (mut, pattern.get_is_ref (),
*************** PatternDeclaration::visit (AST::TupleStr
*** 94,106 ****
    AST::TupleStructItems &items = pattern.get_items ();
    switch (items.get_item_type ())
      {
!       case AST::TupleStructItems::RANGE: {
  	// TODO
  	rust_unreachable ();
        }
        break;
  
!       case AST::TupleStructItems::NO_RANGE: {
  	auto &items_no_range
  	  = static_cast<AST::TupleStructItemsNoRange &> (items);
  
--- 99,113 ----
    AST::TupleStructItems &items = pattern.get_items ();
    switch (items.get_item_type ())
      {
!     case AST::TupleStructItems::RANGE:
!       {
  	// TODO
  	rust_unreachable ();
        }
        break;
  
!     case AST::TupleStructItems::NO_RANGE:
!       {
  	auto &items_no_range
  	  = static_cast<AST::TupleStructItemsNoRange &> (items);
  
*************** PatternDeclaration::visit (AST::StructPa
*** 123,129 ****
      {
        switch (field->get_item_type ())
  	{
! 	  case AST::StructPatternField::ItemType::TUPLE_PAT: {
  	    AST::StructPatternFieldTuplePat &tuple
  	      = static_cast<AST::StructPatternFieldTuplePat &> (*field);
  
--- 130,137 ----
      {
        switch (field->get_item_type ())
  	{
! 	case AST::StructPatternField::ItemType::TUPLE_PAT:
! 	  {
  	    AST::StructPatternFieldTuplePat &tuple
  	      = static_cast<AST::StructPatternFieldTuplePat &> (*field);
  
*************** PatternDeclaration::visit (AST::StructPa
*** 131,137 ****
  	  }
  	  break;
  
! 	  case AST::StructPatternField::ItemType::IDENT_PAT: {
  	    AST::StructPatternFieldIdentPat &ident
  	      = static_cast<AST::StructPatternFieldIdentPat &> (*field);
  
--- 139,146 ----
  	  }
  	  break;
  
! 	case AST::StructPatternField::ItemType::IDENT_PAT:
! 	  {
  	    AST::StructPatternFieldIdentPat &ident
  	      = static_cast<AST::StructPatternFieldIdentPat &> (*field);
  
*************** PatternDeclaration::visit (AST::StructPa
*** 139,145 ****
  	  }
  	  break;
  
! 	  case AST::StructPatternField::ItemType::IDENT: {
  	    auto &ident = static_cast<AST::StructPatternFieldIdent &> (*field);
  
  	    Mutability mut
--- 148,155 ----
  	  }
  	  break;
  
! 	case AST::StructPatternField::ItemType::IDENT:
! 	  {
  	    auto &ident = static_cast<AST::StructPatternFieldIdent &> (*field);
  
  	    Mutability mut
*************** PatternDeclaration::visit (AST::TuplePat
*** 160,166 ****
    auto &items = pattern.get_items ();
    switch (items.get_pattern_type ())
      {
!       case AST::TuplePatternItems::TuplePatternItemType::MULTIPLE: {
  	auto &ref = static_cast<AST::TuplePatternItemsMultiple &> (
  	  pattern.get_items ());
  
--- 170,177 ----
    auto &items = pattern.get_items ();
    switch (items.get_pattern_type ())
      {
!     case AST::TuplePatternItems::TuplePatternItemType::MULTIPLE:
!       {
  	auto &ref = static_cast<AST::TuplePatternItemsMultiple &> (
  	  pattern.get_items ());
  
*************** PatternDeclaration::visit (AST::TuplePat
*** 169,175 ****
        }
        break;
  
!       case AST::TuplePatternItems::TuplePatternItemType::RANGED: {
  	auto &ref
  	  = static_cast<AST::TuplePatternItemsRanged &> (pattern.get_items ());
  
--- 180,187 ----
        }
        break;
  
!     case AST::TuplePatternItems::TuplePatternItemType::RANGED:
!       {
  	auto &ref
  	  = static_cast<AST::TuplePatternItemsRanged &> (pattern.get_items ());
  
*************** resolve_range_pattern_bound (AST::RangeP
*** 348,361 ****
        // Nothing to resolve for a literal.
        break;
  
!       case AST::RangePatternBound::RangePatternBoundType::PATH: {
  	auto &ref = static_cast<AST::RangePatternBoundPath &> (bound);
  
  	ResolvePath::go (ref.get_path ());
        }
        break;
  
!       case AST::RangePatternBound::RangePatternBoundType::QUALPATH: {
  	auto &ref = static_cast<AST::RangePatternBoundQualPath &> (bound);
  
  	ResolvePath::go (ref.get_qualified_path ());
--- 360,375 ----
        // Nothing to resolve for a literal.
        break;
  
!     case AST::RangePatternBound::RangePatternBoundType::PATH:
!       {
  	auto &ref = static_cast<AST::RangePatternBoundPath &> (bound);
  
  	ResolvePath::go (ref.get_path ());
        }
        break;
  
!     case AST::RangePatternBound::RangePatternBoundType::QUALPATH:
!       {
  	auto &ref = static_cast<AST::RangePatternBoundQualPath &> (bound);
  
  	ResolvePath::go (ref.get_qualified_path ());
*************** PatternDeclaration::visit (AST::RangePat
*** 374,382 ****
  void
  PatternDeclaration::visit (AST::SlicePattern &pattern)
  {
!   for (auto &p : pattern.get_items ())
      {
!       p->accept_vis (*this);
      }
  }
  
--- 388,417 ----
  void
  PatternDeclaration::visit (AST::SlicePattern &pattern)
  {
!   auto &items = pattern.get_items ();
!   switch (items.get_pattern_type ())
      {
!     case AST::SlicePatternItems::SlicePatternItemType::NO_REST:
!       {
! 	auto &ref
! 	  = static_cast<AST::SlicePatternItemsNoRest &> (pattern.get_items ());
! 
! 	for (auto &p : ref.get_patterns ())
! 	  p->accept_vis (*this);
!       }
!       break;
! 
!     case AST::SlicePatternItems::SlicePatternItemType::HAS_REST:
!       {
! 	auto &ref
! 	  = static_cast<AST::SlicePatternItemsHasRest &> (pattern.get_items ());
! 
! 	for (auto &p : ref.get_lower_patterns ())
! 	  p->accept_vis (*this);
! 	for (auto &p : ref.get_upper_patterns ())
! 	  p->accept_vis (*this);
!       }
!       break;
      }
  }
  
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-ast-resolve-stmt.h gcc-16-20250810/gcc/rust/resolve/rust-ast-resolve-stmt.h
*** gcc-16-20250803/gcc/rust/resolve/rust-ast-resolve-stmt.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-ast-resolve-stmt.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 67,73 ****
        });
  
      ResolveType::go (constant.get_type ());
!     ResolveExpr::go (constant.get_expr (), prefix, canonical_prefix);
    }
  
    void visit (AST::LetStmt &stmt) override
--- 67,74 ----
        });
  
      ResolveType::go (constant.get_type ());
!     if (constant.has_expr ())
!       ResolveExpr::go (constant.get_expr (), prefix, canonical_prefix);
    }
  
    void visit (AST::LetStmt &stmt) override
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-ast-resolve-type.cc gcc-16-20250810/gcc/rust/resolve/rust-ast-resolve-type.cc
*** gcc-16-20250803/gcc/rust/resolve/rust-ast-resolve-type.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-ast-resolve-type.cc	Sun Aug 10 22:32:08 2025
*************** ResolveType::visit (AST::ImplTraitType &
*** 140,146 ****
  void
  ResolveType::visit (AST::ImplTraitTypeOneBound &type)
  {
!   ResolveTypeBound::go (type.get_trait_bound ());
  }
  
  // resolve relative type-paths
--- 140,146 ----
  void
  ResolveType::visit (AST::ImplTraitTypeOneBound &type)
  {
!   ResolveTypeBound::go (*type.get_trait_bound ().get ());
  }
  
  // resolve relative type-paths
*************** ResolveRelativeTypePath::go (AST::TypePa
*** 210,216 ****
  
        switch (segment->get_type ())
  	{
! 	  case AST::TypePathSegment::SegmentType::GENERIC: {
  	    AST::TypePathSegmentGeneric *s
  	      = static_cast<AST::TypePathSegmentGeneric *> (segment.get ());
  	    if (s->has_generic_args ())
--- 210,217 ----
  
        switch (segment->get_type ())
  	{
! 	case AST::TypePathSegment::SegmentType::GENERIC:
! 	  {
  	    AST::TypePathSegmentGeneric *s
  	      = static_cast<AST::TypePathSegmentGeneric *> (segment.get ());
  	    if (s->has_generic_args ())
*************** ResolveTypeToCanonicalPath::visit (AST::
*** 509,515 ****
        auto &final_seg = path.get_segments ().back ();
        switch (final_seg->get_type ())
  	{
! 	  case AST::TypePathSegment::SegmentType::GENERIC: {
  	    AST::TypePathSegmentGeneric *s
  	      = static_cast<AST::TypePathSegmentGeneric *> (final_seg.get ());
  
--- 510,517 ----
        auto &final_seg = path.get_segments ().back ();
        switch (final_seg->get_type ())
  	{
! 	case AST::TypePathSegment::SegmentType::GENERIC:
! 	  {
  	    AST::TypePathSegmentGeneric *s
  	      = static_cast<AST::TypePathSegmentGeneric *> (final_seg.get ());
  
*************** ResolveTypeToCanonicalPath::visit (AST::
*** 651,657 ****
  
        switch (additional_bound->get_bound_type ())
  	{
! 	  case AST::TypeParamBound::TRAIT: {
  	    auto bound_path = CanonicalPath::create_empty ();
  
  	    auto &bound_type_path
--- 653,660 ----
  
        switch (additional_bound->get_bound_type ())
  	{
! 	case AST::TypeParamBound::TRAIT:
! 	  {
  	    auto bound_path = CanonicalPath::create_empty ();
  
  	    auto &bound_type_path
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-ast-resolve.cc gcc-16-20250810/gcc/rust/resolve/rust-ast-resolve.cc
*** gcc-16-20250803/gcc/rust/resolve/rust-ast-resolve.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-ast-resolve.cc	Sun Aug 10 22:32:08 2025
***************
*** 24,31 ****
  #include "rust-ast-resolve-expr.h"
  #include "rust-ast-resolve-struct-expr-field.h"
  
! extern bool
! saw_errors (void);
  
  namespace Rust {
  namespace Resolver {
--- 24,30 ----
  #include "rust-ast-resolve-expr.h"
  #include "rust-ast-resolve-struct-expr-field.h"
  
! extern bool saw_errors (void);
  
  namespace Rust {
  namespace Resolver {
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-default-resolver.cc gcc-16-20250810/gcc/rust/resolve/rust-default-resolver.cc
*** gcc-16-20250803/gcc/rust/resolve/rust-default-resolver.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-default-resolver.cc	Sun Aug 10 22:32:08 2025
*************** namespace Rust {
*** 25,30 ****
--- 25,45 ----
  namespace Resolver2_0 {
  
  void
+ DefaultResolver::visit (AST::Crate &crate)
+ {
+   auto inner_fn = [this, &crate] () { AST::DefaultASTVisitor::visit (crate); };
+ 
+   auto &mappings = Analysis::Mappings::get ();
+ 
+   auto crate_num = mappings.lookup_crate_num (crate.get_node_id ());
+   rust_assert (crate_num.has_value ());
+   auto crate_name = mappings.get_crate_name (*crate_num);
+   rust_assert (crate_name.has_value ());
+ 
+   ctx.canonical_ctx.scope_crate (crate.get_node_id (), *crate_name, inner_fn);
+ }
+ 
+ void
  DefaultResolver::visit (AST::BlockExpr &expr)
  {
    // extracting the lambda from the `scoped` call otherwise the code looks like
*************** DefaultResolver::visit (AST::BlockExpr &
*** 38,56 ****
  void
  DefaultResolver::visit (AST::Module &module)
  {
!   auto item_fn = [this, &module] () { AST::DefaultASTVisitor::visit (module); };
  
!   ctx.scoped (Rib::Kind::Module, module.get_node_id (), item_fn,
  	      module.get_name ());
  }
  
  void
  DefaultResolver::visit (AST::Function &function)
  {
!   auto def_fn
      = [this, &function] () { AST::DefaultASTVisitor::visit (function); };
  
!   ctx.scoped (Rib::Kind::Function, function.get_node_id (), def_fn);
  }
  
  void
--- 53,84 ----
  void
  DefaultResolver::visit (AST::Module &module)
  {
!   auto item_fn_1
!     = [this, &module] () { AST::DefaultASTVisitor::visit (module); };
  
!   auto item_fn_2 = [this, &module, &item_fn_1] () {
!     ctx.canonical_ctx.scope (module.get_node_id (), module.get_name (),
! 			     std::move (item_fn_1));
!   };
! 
!   ctx.scoped (Rib::Kind::Module, module.get_node_id (), item_fn_2,
  	      module.get_name ());
  }
  
  void
  DefaultResolver::visit (AST::Function &function)
  {
!   auto def_fn_1
      = [this, &function] () { AST::DefaultASTVisitor::visit (function); };
  
!   auto def_fn_2 = [this, &function, &def_fn_1] () {
!     ctx.canonical_ctx.scope (function.get_node_id (),
! 			     function.get_function_name (),
! 			     std::move (def_fn_1));
!   };
! 
!   ctx.scoped (Rib::Kind::Function, function.get_node_id (), def_fn_2,
! 	      function.get_function_name ());
  }
  
  void
*************** DefaultResolver::visit (AST::ForLoopExpr
*** 61,133 ****
  }
  
  void
  DefaultResolver::visit (AST::Trait &trait)
  {
!   auto inner_fn = [this, &trait] () { AST::DefaultASTVisitor::visit (trait); };
  
!   ctx.scoped (Rib::Kind::TraitOrImpl, trait.get_node_id (), inner_fn,
  	      trait.get_identifier () /* FIXME: Is that valid?*/);
  }
  
  void
  DefaultResolver::visit (AST::InherentImpl &impl)
  {
!   auto inner_fn = [this, &impl] () { AST::DefaultASTVisitor::visit (impl); };
  
!   ctx.scoped (Rib::Kind::TraitOrImpl, impl.get_node_id (), inner_fn);
  }
  
  void
  DefaultResolver::visit (AST::TraitImpl &impl)
  {
!   auto inner_fn = [this, &impl] () { AST::DefaultASTVisitor::visit (impl); };
  
!   ctx.scoped (Rib::Kind::TraitOrImpl, impl.get_node_id (), inner_fn);
  }
  
  void
  DefaultResolver::visit (AST::StructStruct &type)
  {
!   auto inner_fn = [this, &type] () { AST::DefaultASTVisitor::visit (type); };
  
    ctx.scoped (Rib::Kind::Item /* FIXME: Correct? */, type.get_node_id (),
! 	      inner_fn, type.get_struct_name ());
  }
  
  void
  DefaultResolver::visit (AST::TupleStruct &type)
  {
!   auto inner_fn = [this, &type] () { AST::DefaultASTVisitor::visit (type); };
  
    ctx.scoped (Rib::Kind::Item /* FIXME: Correct? */, type.get_node_id (),
! 	      inner_fn, type.get_struct_name ());
  }
  
  void
  DefaultResolver::visit (AST::Enum &type)
  {
!   auto variant_fn = [this, &type] () { AST::DefaultASTVisitor::visit (type); };
  
    ctx.scoped (Rib::Kind::Item /* FIXME: Correct? */, type.get_node_id (),
! 	      variant_fn, type.get_identifier ());
  }
  
  void
  DefaultResolver::visit (AST::Union &type)
  {
!   auto inner_fn = [this, &type] () { AST::DefaultASTVisitor::visit (type); };
  
    ctx.scoped (Rib::Kind::Item /* FIXME: Correct? */, type.get_node_id (),
! 	      inner_fn, type.get_identifier ());
  }
  
  void
  DefaultResolver::visit (AST::TypeAlias &type)
  {
!   auto inner_fn = [this, &type] () { AST::DefaultASTVisitor::visit (type); };
  
    ctx.scoped (Rib::Kind::Item /* FIXME: Correct? */, type.get_node_id (),
! 	      inner_fn, type.get_new_type_name ());
  }
  
  void
--- 89,340 ----
  }
  
  void
+ DefaultResolver::visit_if_let_patterns (AST::IfLetExpr &expr)
+ {
+   for (auto &pattern : expr.get_patterns ())
+     visit (pattern);
+ }
+ 
+ void
+ DefaultResolver::visit (AST::IfLetExpr &expr)
+ {
+   auto inner_vis = [this, &expr] () {
+     visit_if_let_patterns (expr);
+     visit (expr.get_if_block ());
+   };
+ 
+   visit_outer_attrs (expr);
+ 
+   visit (expr.get_value_expr ());
+ 
+   ctx.scoped (Rib::Kind::Normal, expr.get_node_id (), inner_vis);
+ }
+ 
+ void
+ DefaultResolver::visit (AST::IfLetExprConseqElse &expr)
+ {
+   DefaultResolver::visit (static_cast<AST::IfLetExpr &> (expr));
+   visit (expr.get_else_block ());
+ }
+ 
+ void
  DefaultResolver::visit (AST::Trait &trait)
  {
!   visit_outer_attrs (trait);
!   visit (trait.get_visibility ());
!   visit_inner_attrs (trait);
  
!   auto inner_fn_1 = [this, &trait] () {
!     for (auto &item : trait.get_trait_items ())
!       visit (item);
!   };
! 
!   auto inner_fn_2 = [this, &trait, &inner_fn_1] () {
!     visit (trait.get_implicit_self ());
!     for (auto &generic : trait.get_generic_params ())
!       visit (generic);
!     if (trait.has_where_clause ())
!       visit (trait.get_where_clause ());
!     for (auto &bound : trait.get_type_param_bounds ())
!       visit (bound);
! 
!     ctx.scoped (Rib::Kind::TraitOrImpl, trait.get_node_id (), inner_fn_1);
!   };
! 
!   auto inner_fn_3 = [this, &trait, &inner_fn_2] () {
!     ctx.canonical_ctx.scope (trait.get_node_id (), trait.get_identifier (),
! 			     std::move (inner_fn_2));
!   };
! 
!   ctx.scoped (Rib::Kind::Generics, trait.get_node_id (), inner_fn_3,
  	      trait.get_identifier () /* FIXME: Is that valid?*/);
  }
  
  void
  DefaultResolver::visit (AST::InherentImpl &impl)
  {
!   visit_outer_attrs (impl);
!   visit (impl.get_visibility ());
!   visit_inner_attrs (impl);
  
!   auto inner_fn_1 = [this, &impl] () {
!     for (auto &item : impl.get_impl_items ())
!       visit (item);
!   };
! 
!   auto inner_fn_2 = [this, &impl, &inner_fn_1] () {
!     maybe_insert_big_self (impl);
!     for (auto &generic : impl.get_generic_params ())
!       visit (generic);
!     if (impl.has_where_clause ())
!       visit (impl.get_where_clause ());
!     visit_impl_type (impl.get_type ());
! 
!     ctx.scoped (Rib::Kind::TraitOrImpl, impl.get_node_id (), inner_fn_1);
!   };
! 
!   auto inner_fn_3 = [this, &impl, &inner_fn_2] () {
!     ctx.canonical_ctx.scope_impl (impl, std::move (inner_fn_2));
!   };
! 
!   ctx.scoped (Rib::Kind::Generics, impl.get_node_id (), inner_fn_3);
  }
  
  void
  DefaultResolver::visit (AST::TraitImpl &impl)
  {
!   visit_outer_attrs (impl);
!   visit (impl.get_visibility ());
!   visit_inner_attrs (impl);
  
!   auto inner_fn_1 = [this, &impl] () {
!     for (auto &item : impl.get_impl_items ())
!       visit (item);
!   };
! 
!   auto inner_fn_2 = [this, &impl, &inner_fn_1] () {
!     maybe_insert_big_self (impl);
!     for (auto &generic : impl.get_generic_params ())
!       visit (generic);
!     if (impl.has_where_clause ())
!       visit (impl.get_where_clause ());
!     visit_impl_type (impl.get_type ());
!     visit (impl.get_trait_path ());
! 
!     ctx.scoped (Rib::Kind::TraitOrImpl, impl.get_node_id (), inner_fn_1);
!   };
! 
!   auto inner_fn_3 = [this, &impl, &inner_fn_2] () {
!     ctx.canonical_ctx.scope_impl (impl, std::move (inner_fn_2));
!   };
! 
!   ctx.scoped (Rib::Kind::Generics, impl.get_node_id (), inner_fn_3);
  }
  
  void
  DefaultResolver::visit (AST::StructStruct &type)
  {
!   auto inner_fn_1 = [this, &type] () { AST::DefaultASTVisitor::visit (type); };
! 
!   auto inner_fn_2 = [this, &type, &inner_fn_1] () {
!     ctx.canonical_ctx.scope (type.get_node_id (), type.get_struct_name (),
! 			     std::move (inner_fn_1));
!   };
  
    ctx.scoped (Rib::Kind::Item /* FIXME: Correct? */, type.get_node_id (),
! 	      inner_fn_2, type.get_struct_name ());
  }
  
  void
  DefaultResolver::visit (AST::TupleStruct &type)
  {
!   auto inner_fn_1 = [this, &type] () { AST::DefaultASTVisitor::visit (type); };
! 
!   auto inner_fn_2 = [this, &type, &inner_fn_1] () {
!     ctx.canonical_ctx.scope (type.get_node_id (), type.get_struct_name (),
! 			     std::move (inner_fn_1));
!   };
  
    ctx.scoped (Rib::Kind::Item /* FIXME: Correct? */, type.get_node_id (),
! 	      inner_fn_2, type.get_struct_name ());
! }
! 
! void
! DefaultResolver::visit (AST::EnumItem &item)
! {
!   auto inner_fn = [this, &item] () { AST::DefaultASTVisitor::visit (item); };
! 
!   ctx.canonical_ctx.scope (item.get_node_id (), item.get_identifier (),
! 			   inner_fn);
! }
! 
! void
! DefaultResolver::visit (AST::EnumItemTuple &item)
! {
!   auto inner_fn = [this, &item] () { AST::DefaultASTVisitor::visit (item); };
! 
!   ctx.canonical_ctx.scope (item.get_node_id (), item.get_identifier (),
! 			   inner_fn);
! }
! 
! void
! DefaultResolver::visit (AST::EnumItemStruct &item)
! {
!   auto inner_fn = [this, &item] () { AST::DefaultASTVisitor::visit (item); };
! 
!   ctx.canonical_ctx.scope (item.get_node_id (), item.get_identifier (),
! 			   inner_fn);
! }
! 
! void
! DefaultResolver::visit (AST::EnumItemDiscriminant &item)
! {
!   auto inner_fn = [this, &item] () { AST::DefaultASTVisitor::visit (item); };
! 
!   ctx.canonical_ctx.scope (item.get_node_id (), item.get_identifier (),
! 			   inner_fn);
  }
  
  void
  DefaultResolver::visit (AST::Enum &type)
  {
!   auto inner_fn_1 = [this, &type] () { AST::DefaultASTVisitor::visit (type); };
! 
!   auto inner_fn_2 = [this, &type, &inner_fn_1] () {
!     ctx.canonical_ctx.scope (type.get_node_id (), type.get_identifier (),
! 			     std::move (inner_fn_1));
!   };
  
    ctx.scoped (Rib::Kind::Item /* FIXME: Correct? */, type.get_node_id (),
! 	      inner_fn_2, type.get_identifier ());
  }
  
  void
  DefaultResolver::visit (AST::Union &type)
  {
!   auto inner_fn_1 = [this, &type] () { AST::DefaultASTVisitor::visit (type); };
! 
!   auto inner_fn_2 = [this, &type, &inner_fn_1] () {
!     ctx.canonical_ctx.scope (type.get_node_id (), type.get_identifier (),
! 			     std::move (inner_fn_1));
!   };
  
    ctx.scoped (Rib::Kind::Item /* FIXME: Correct? */, type.get_node_id (),
! 	      inner_fn_2, type.get_identifier ());
  }
  
  void
  DefaultResolver::visit (AST::TypeAlias &type)
  {
!   auto inner_fn_1 = [this, &type] () { AST::DefaultASTVisitor::visit (type); };
! 
!   auto inner_fn_2 = [this, &type, &inner_fn_1] () {
!     ctx.canonical_ctx.scope (type.get_node_id (), type.get_new_type_name (),
! 			     std::move (inner_fn_1));
!   };
  
    ctx.scoped (Rib::Kind::Item /* FIXME: Correct? */, type.get_node_id (),
! 	      inner_fn_2, type.get_new_type_name ());
! }
! 
! void
! DefaultResolver::visit_closure_params (AST::ClosureExpr &expr)
! {
!   for (auto &param : expr.get_params ())
!     visit (param);
! }
! 
! void
! DefaultResolver::visit (AST::ClosureExpr &expr)
! {
!   auto expr_fn = [this, &expr] () {
!     visit_closure_params (expr);
!     visit (expr.get_definition_expr ());
!   };
! 
!   visit_outer_attrs (expr);
! 
!   ctx.scoped (Rib::Kind::Normal, expr.get_node_id (), expr_fn);
  }
  
  void
*************** DefaultResolver::visit (AST::ClosureExpr
*** 136,142 ****
    if (expr.is_marked_for_strip ())
      return;
  
!   AST::DefaultASTVisitor::visit (expr);
  }
  
  void
--- 343,349 ----
    if (expr.is_marked_for_strip ())
      return;
  
!   visit (static_cast<AST::ClosureExpr &> (expr));
  }
  
  void
*************** DefaultResolver::visit (AST::ClosureExpr
*** 145,151 ****
    if (expr.is_marked_for_strip ())
      return;
  
!   AST::DefaultASTVisitor::visit (expr);
  }
  
  void
--- 352,359 ----
    if (expr.is_marked_for_strip ())
      return;
  
!   visit (static_cast<AST::ClosureExpr &> (expr));
!   visit (expr.get_return_type ());
  }
  
  void
*************** DefaultResolver::visit (AST::MatchExpr &
*** 160,182 ****
  void
  DefaultResolver::visit (AST::ConstantItem &item)
  {
!   if (item.has_expr ())
!     {
!       auto expr_vis
! 	= [this, &item] () { AST::DefaultASTVisitor::visit (item); };
  
!       // FIXME: Why do we need a Rib here?
!       ctx.scoped (Rib::Kind::ConstantItem, item.get_node_id (), expr_vis);
!     }
  }
  
  void
  DefaultResolver::visit (AST::StaticItem &item)
  {
!   auto expr_vis = [this, &item] () { AST::DefaultASTVisitor::visit (item); };
  
    // FIXME: Why do we need a Rib here?
!   ctx.scoped (Rib::Kind::ConstantItem, item.get_node_id (), expr_vis);
  }
  
  void
--- 368,396 ----
  void
  DefaultResolver::visit (AST::ConstantItem &item)
  {
!   auto expr_vis_1 = [this, &item] () { AST::DefaultASTVisitor::visit (item); };
  
!   auto expr_vis_2 = [this, &item, &expr_vis_1] () {
!     ctx.canonical_ctx.scope (item.get_node_id (), item.get_identifier (),
! 			     std::move (expr_vis_1));
!   };
! 
!   // FIXME: Why do we need a Rib here?
!   ctx.scoped (Rib::Kind::ConstantItem, item.get_node_id (), expr_vis_2);
  }
  
  void
  DefaultResolver::visit (AST::StaticItem &item)
  {
!   auto expr_vis_1 = [this, &item] () { AST::DefaultASTVisitor::visit (item); };
! 
!   auto expr_vis_2 = [this, &item, &expr_vis_1] () {
!     ctx.canonical_ctx.scope (item.get_node_id (), item.get_identifier (),
! 			     std::move (expr_vis_1));
!   };
  
    // FIXME: Why do we need a Rib here?
!   ctx.scoped (Rib::Kind::ConstantItem, item.get_node_id (), expr_vis_2);
  }
  
  void
*************** DefaultResolver::visit (AST::TypeParam &
*** 187,191 ****
--- 401,446 ----
    ctx.scoped (Rib::Kind::ForwardTypeParamBan, param.get_node_id (), expr_vis);
  }
  
+ void
+ DefaultResolver::visit_extern_crate (AST::ExternCrate &extern_crate,
+ 				     AST::Crate &crate, CrateNum num)
+ {
+   visit (crate);
+ }
+ 
+ void
+ DefaultResolver::visit (AST::ExternCrate &crate)
+ {
+   auto &mappings = Analysis::Mappings::get ();
+   auto num_opt = mappings.lookup_crate_name (crate.get_referenced_crate ());
+ 
+   if (!num_opt)
+     {
+       rust_error_at (crate.get_locus (), "unknown crate %qs",
+ 		     crate.get_referenced_crate ().c_str ());
+       return;
+     }
+ 
+   CrateNum num = *num_opt;
+ 
+   AST::Crate &referenced_crate = mappings.get_ast_crate (num);
+ 
+   auto sub_visitor_1
+     = [&, this] () { visit_extern_crate (crate, referenced_crate, num); };
+ 
+   auto sub_visitor_2 = [&] () {
+     ctx.canonical_ctx.scope_crate (referenced_crate.get_node_id (),
+ 				   crate.get_referenced_crate (),
+ 				   std::move (sub_visitor_1));
+   };
+ 
+   if (crate.has_as_clause ())
+     ctx.scoped (Rib::Kind::Module, referenced_crate.get_node_id (),
+ 		sub_visitor_2, crate.get_as_clause ());
+   else
+     ctx.scoped (Rib::Kind::Module, referenced_crate.get_node_id (),
+ 		sub_visitor_2, crate.get_referenced_crate ());
+ }
+ 
  } // namespace Resolver2_0
  } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-default-resolver.h gcc-16-20250810/gcc/rust/resolve/rust-default-resolver.h
*** gcc-16-20250803/gcc/rust/resolve/rust-default-resolver.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-default-resolver.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 39,44 ****
--- 39,45 ----
  
    virtual ~DefaultResolver () {}
  
+   void visit (AST::Crate &) override;
    // First, our lexical scope expressions - these visit their sub nodes, always
    // these nodes create new scopes and ribs - they are often used to declare new
    // variables, such as a for loop's iterator, or a function's arguments
*************** public:
*** 46,65 ****
--- 47,81 ----
    void visit (AST::Module &) override;
    void visit (AST::Function &) override;
    void visit (AST::ForLoopExpr &expr) override;
+   virtual void visit_if_let_patterns (AST::IfLetExpr &expr);
+   void visit (AST::IfLetExpr &expr) override;
+   void visit (AST::IfLetExprConseqElse &expr) override;
    void visit (AST::Trait &) override;
+   // used to handle Self insertion in TopLevel
+   virtual void maybe_insert_big_self (AST::Impl &) {}
+   virtual void visit_impl_type (AST::Type &type) { visit (type); }
    void visit (AST::InherentImpl &) override;
    void visit (AST::TraitImpl &) override;
  
    void visit (AST::TypeParam &) override;
  
+   virtual void visit_extern_crate (AST::ExternCrate &, AST::Crate &, CrateNum);
+   void visit (AST::ExternCrate &) override;
+ 
    // type dec nodes, which visit their fields or variants by default
    void visit (AST::StructStruct &) override;
    void visit (AST::TupleStruct &) override;
+   void visit (AST::EnumItem &) override;
+   void visit (AST::EnumItemTuple &) override;
+   void visit (AST::EnumItemStruct &) override;
+   void visit (AST::EnumItemDiscriminant &) override;
    void visit (AST::Enum &) override;
    void visit (AST::Union &) override;
    void visit (AST::TypeAlias &) override;
  
    // Visitors that visit their expression node(s)
+   virtual void visit_closure_params (AST::ClosureExpr &);
+   virtual void visit (AST::ClosureExpr &);
    void visit (AST::ClosureExprInner &) override;
    void visit (AST::ClosureExprInnerTyped &) override;
    void visit (AST::MatchExpr &) override;
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-early-name-resolver-2.0.cc gcc-16-20250810/gcc/rust/resolve/rust-early-name-resolver-2.0.cc
*** gcc-16-20250803/gcc/rust/resolve/rust-early-name-resolver-2.0.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-early-name-resolver-2.0.cc	Sun Aug 10 22:32:08 2025
***************
*** 17,24 ****
  // <http://www.gnu.org/licenses/>.
  
  #include "rust-early-name-resolver-2.0.h"
! #include "rust-ast-full.h"
  #include "rust-diagnostics.h"
  #include "rust-toplevel-name-resolver-2.0.h"
  #include "rust-attributes.h"
  #include "rust-finalize-imports-2.0.h"
--- 17,27 ----
  // <http://www.gnu.org/licenses/>.
  
  #include "rust-early-name-resolver-2.0.h"
! #include "optional.h"
! #include "options.h"
  #include "rust-diagnostics.h"
+ #include "rust-hir-map.h"
+ #include "rust-item.h"
  #include "rust-toplevel-name-resolver-2.0.h"
  #include "rust-attributes.h"
  #include "rust-finalize-imports-2.0.h"
*************** Early::go (AST::Crate &crate)
*** 62,69 ****
    // We now proceed with resolving macros, which can be nested in almost any
    // items
    textual_scope.push ();
!   for (auto &item : crate.items)
!     item->accept_vis (*this);
    textual_scope.pop ();
  }
  
--- 65,73 ----
    // We now proceed with resolving macros, which can be nested in almost any
    // items
    textual_scope.push ();
! 
!   visit (crate);
! 
    textual_scope.pop ();
  }
  
*************** Early::resolve_glob_import (NodeId use_d
*** 74,81 ****
    if (!resolved.has_value ())
      return false;
  
!   auto result
!     = Analysis::Mappings::get ().lookup_ast_module (resolved->get_node_id ());
    if (!result)
      return false;
  
--- 78,86 ----
    if (!resolved.has_value ())
      return false;
  
!   auto result = Analysis::Mappings::get ().lookup_glob_container (
!     resolved->get_node_id ());
! 
    if (!result)
      return false;
  
*************** Early::visit (AST::Module &module)
*** 249,255 ****
  void
  Early::visit (AST::MacroInvocation &invoc)
  {
!   auto path = invoc.get_invoc_data ().get_path ();
  
    if (invoc.get_kind () == AST::MacroInvocation::InvocKind::Builtin)
      for (auto &pending_invoc : invoc.get_pending_eager_invocations ())
--- 254,265 ----
  void
  Early::visit (AST::MacroInvocation &invoc)
  {
!   auto &path = invoc.get_invoc_data ().get_path ();
! 
!   // We special case the `offset_of!()` macro if the flag is here, otherwise
!   // we accept whatever `offset_of!()` definition we resolved to.
!   auto resolve_offset_of
!     = flag_assume_builtin_offset_of && (path.as_string () == "offset_of");
  
    if (invoc.get_kind () == AST::MacroInvocation::InvocKind::Builtin)
      for (auto &pending_invoc : invoc.get_pending_eager_invocations ())
*************** Early::visit (AST::MacroInvocation &invo
*** 272,285 ****
    // we won't have changed `definition` from `nullopt` if there are more
    // than one segments in our path
    if (!definition.has_value ())
!     definition = ctx.resolve_path (path.get_segments (), Namespace::Macros);
  
!   // if the definition still does not have a value, then it's an error
    if (!definition.has_value ())
      {
!       collect_error (Error (invoc.get_locus (), ErrorCode::E0433,
! 			    "could not resolve macro invocation %qs",
! 			    path.as_string ().c_str ()));
        return;
      }
  
--- 282,297 ----
    // we won't have changed `definition` from `nullopt` if there are more
    // than one segments in our path
    if (!definition.has_value ())
!     definition = ctx.resolve_path (path, Namespace::Macros);
  
!   // if the definition still does not have a value, then it's an error - unless
!   // we should automatically resolve offset_of!() calls
    if (!definition.has_value ())
      {
!       if (!resolve_offset_of)
! 	collect_error (Error (invoc.get_locus (), ErrorCode::E0433,
! 			      "could not resolve macro invocation %qs",
! 			      path.as_string ().c_str ()));
        return;
      }
  
*************** Early::visit_attributes (std::vector<AST
*** 314,321 ****
  	  auto traits = attr.get_traits_to_derive ();
  	  for (auto &trait : traits)
  	    {
! 	      auto definition = ctx.resolve_path (trait.get ().get_segments (),
! 						  Namespace::Macros);
  	      if (!definition.has_value ())
  		{
  		  // FIXME: Change to proper error message
--- 326,333 ----
  	  auto traits = attr.get_traits_to_derive ();
  	  for (auto &trait : traits)
  	    {
! 	      auto definition
! 		= ctx.resolve_path (trait.get (), Namespace::Macros);
  	      if (!definition.has_value ())
  		{
  		  // FIXME: Change to proper error message
*************** Early::visit_attributes (std::vector<AST
*** 337,344 ****
  		 ->lookup_builtin (name)
  		 .is_error ()) // Do not resolve builtins
  	{
! 	  auto definition = ctx.resolve_path (attr.get_path ().get_segments (),
! 					      Namespace::Macros);
  	  if (!definition.has_value ())
  	    {
  	      // FIXME: Change to proper error message
--- 349,356 ----
  		 ->lookup_builtin (name)
  		 .is_error ()) // Do not resolve builtins
  	{
! 	  auto definition
! 	    = ctx.resolve_path (attr.get_path (), Namespace::Macros);
  	  if (!definition.has_value ())
  	    {
  	      // FIXME: Change to proper error message
*************** Early::visit_attributes (std::vector<AST
*** 350,356 ****
  	  auto pm_def = mappings.lookup_attribute_proc_macro_def (
  	    definition->get_node_id ());
  
! 	  rust_assert (pm_def.has_value ());
  
  	  mappings.insert_attribute_proc_macro_invocation (attr.get_path (),
  							   pm_def.value ());
--- 362,369 ----
  	  auto pm_def = mappings.lookup_attribute_proc_macro_def (
  	    definition->get_node_id ());
  
! 	  if (!pm_def.has_value ())
! 	    return;
  
  	  mappings.insert_attribute_proc_macro_invocation (attr.get_path (),
  							   pm_def.value ());
*************** void
*** 392,403 ****
  Early::finalize_glob_import (NameResolutionContext &ctx,
  			     const Early::ImportPair &mapping)
  {
!   auto module = Analysis::Mappings::get ().lookup_ast_module (
!     mapping.data.module ().get_node_id ());
!   rust_assert (module);
  
!   GlobbingVisitor glob_visitor (ctx);
!   glob_visitor.go (module.value ());
  }
  
  void
--- 405,416 ----
  Early::finalize_glob_import (NameResolutionContext &ctx,
  			     const Early::ImportPair &mapping)
  {
!   auto container = Analysis::Mappings::get ().lookup_glob_container (
!     mapping.data.container ().get_node_id ());
  
!   rust_assert (container);
! 
!   GlobbingVisitor (ctx).go (container.value ());
  }
  
  void
*************** Early::finalize_rebind_import (const Ear
*** 419,425 ****
        declared_name = rebind.get_identifier ().as_string ();
        locus = rebind.get_identifier ().get_locus ();
        break;
!       case AST::UseTreeRebind::NewBindType::NONE: {
  	const auto &segments = path.get_segments ();
  	// We don't want to insert `self` with `use module::self`
  	if (path.get_final_segment ().is_lower_self_seg ())
--- 432,439 ----
        declared_name = rebind.get_identifier ().as_string ();
        locus = rebind.get_identifier ().get_locus ();
        break;
!     case AST::UseTreeRebind::NewBindType::NONE:
!       {
  	const auto &segments = path.get_segments ();
  	// We don't want to insert `self` with `use module::self`
  	if (path.get_final_segment ().is_lower_self_seg ())
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-early-name-resolver-2.0.h gcc-16-20250810/gcc/rust/resolve/rust-early-name-resolver-2.0.h
*** gcc-16-20250803/gcc/rust/resolve/rust-early-name-resolver-2.0.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-early-name-resolver-2.0.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 83,97 ****
        return ImportData (Kind::Rebind, std::move (definitions));
      }
  
!     static ImportData Glob (Rib::Definition module)
      {
!       return ImportData (Kind::Glob, module);
      }
  
!     Rib::Definition module () const
      {
        rust_assert (kind == Kind::Glob);
!       return glob_module;
      }
  
      std::vector<std::pair<Rib::Definition, Namespace>> definitions () const
--- 83,97 ----
        return ImportData (Kind::Rebind, std::move (definitions));
      }
  
!     static ImportData Glob (Rib::Definition container)
      {
!       return ImportData (Kind::Glob, container);
      }
  
!     Rib::Definition container () const
      {
        rust_assert (kind == Kind::Glob);
!       return glob_container;
      }
  
      std::vector<std::pair<Rib::Definition, Namespace>> definitions () const
*************** public:
*** 107,114 ****
        : kind (kind), resolved_definitions (std::move (definitions))
      {}
  
!     ImportData (Kind kind, Rib::Definition module)
!       : kind (kind), glob_module (module)
      {}
  
      // TODO: Should this be a union?
--- 107,114 ----
        : kind (kind), resolved_definitions (std::move (definitions))
      {}
  
!     ImportData (Kind kind, Rib::Definition container)
!       : kind (kind), glob_container (container)
      {}
  
      // TODO: Should this be a union?
*************** public:
*** 117,123 ****
      std::vector<std::pair<Rib::Definition, Namespace>> resolved_definitions;
  
      // For Glob
!     Rib::Definition glob_module;
    };
  
    struct ImportPair
--- 117,123 ----
      std::vector<std::pair<Rib::Definition, Namespace>> resolved_definitions;
  
      // For Glob
!     Rib::Definition glob_container;
    };
  
    struct ImportPair
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-early-name-resolver.cc gcc-16-20250810/gcc/rust/resolve/rust-early-name-resolver.cc
*** gcc-16-20250803/gcc/rust/resolve/rust-early-name-resolver.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-early-name-resolver.cc	Sun Aug 10 22:32:08 2025
*************** EarlyNameResolver::visit (AST::MetaItemL
*** 205,211 ****
  {}
  
  void
! EarlyNameResolver::visit (AST::MetaItemPathLit &)
  {}
  
  void
--- 205,211 ----
  {}
  
  void
! EarlyNameResolver::visit (AST::MetaItemPathExpr &)
  {}
  
  void
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-early-name-resolver.h gcc-16-20250810/gcc/rust/resolve/rust-early-name-resolver.h
*** gcc-16-20250803/gcc/rust/resolve/rust-early-name-resolver.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-early-name-resolver.h	Sun Aug 10 22:32:08 2025
*************** private:
*** 142,148 ****
    virtual void visit (AST::AttrInputLiteral &attr_input);
    virtual void visit (AST::AttrInputMacro &attr_input);
    virtual void visit (AST::MetaItemLitExpr &meta_item);
!   virtual void visit (AST::MetaItemPathLit &meta_item);
    virtual void visit (AST::StructExprStruct &expr);
    virtual void visit (AST::StructExprFieldIdentifier &field);
    virtual void visit (AST::StructExprStructBase &expr);
--- 142,148 ----
    virtual void visit (AST::AttrInputLiteral &attr_input);
    virtual void visit (AST::AttrInputMacro &attr_input);
    virtual void visit (AST::MetaItemLitExpr &meta_item);
!   virtual void visit (AST::MetaItemPathExpr &meta_item);
    virtual void visit (AST::StructExprStruct &expr);
    virtual void visit (AST::StructExprFieldIdentifier &field);
    virtual void visit (AST::StructExprStructBase &expr);
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-finalize-imports-2.0.cc gcc-16-20250810/gcc/rust/resolve/rust-finalize-imports-2.0.cc
*** gcc-16-20250803/gcc/rust/resolve/rust-finalize-imports-2.0.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-finalize-imports-2.0.cc	Sun Aug 10 22:32:08 2025
***************
*** 21,39 ****
  #include "rust-hir-map.h"
  #include "rust-name-resolution-context.h"
  #include "rust-rib.h"
  #include "rust-toplevel-name-resolver-2.0.h"
  
  namespace Rust {
  namespace Resolver2_0 {
  
  void
! GlobbingVisitor::go (AST::Module *module)
  {
!   for (auto &i : module->get_items ())
      visit (i);
  }
  
  void
  GlobbingVisitor::visit (AST::Module &module)
  {
    if (module.get_visibility ().is_public ())
--- 21,64 ----
  #include "rust-hir-map.h"
  #include "rust-name-resolution-context.h"
  #include "rust-rib.h"
+ #include "rust-system.h"
  #include "rust-toplevel-name-resolver-2.0.h"
  
  namespace Rust {
  namespace Resolver2_0 {
  
  void
! GlobbingVisitor::go (AST::Item *container)
  {
!   switch (container->get_item_kind ())
!     {
!     case AST::Item::Kind::Module:
!       visit_module_container (static_cast<AST::Module &> (*container));
!       break;
!     case AST::Item::Kind::Enum:
!       visit_enum_container (static_cast<AST::Enum &> (*container));
!       break;
!     default:
!       rust_unreachable ();
!     }
! }
! 
! void
! GlobbingVisitor::visit_module_container (AST::Module &module)
! {
!   for (auto &i : module.get_items ())
      visit (i);
  }
  
  void
+ GlobbingVisitor::visit_enum_container (AST::Enum &item)
+ {
+   for (auto &variant : item.get_variants ())
+     ctx.insert_globbed (variant->get_identifier (), variant->get_node_id (),
+ 			Namespace::Types);
+ }
+ 
+ void
  GlobbingVisitor::visit (AST::Module &module)
  {
    if (module.get_visibility ().is_public ())
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-finalize-imports-2.0.h gcc-16-20250810/gcc/rust/resolve/rust-finalize-imports-2.0.h
*** gcc-16-20250803/gcc/rust/resolve/rust-finalize-imports-2.0.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-finalize-imports-2.0.h	Sun Aug 10 22:32:08 2025
***************
*** 18,23 ****
--- 18,24 ----
  
  #include "rust-ast.h"
  #include "rust-expr.h"
+ #include "rust-item.h"
  #include "rust-name-resolution-context.h"
  #include "rust-toplevel-name-resolver-2.0.h"
  #include "rust-early-name-resolver-2.0.h"
*************** class GlobbingVisitor : public AST::Defa
*** 32,38 ****
  public:
    GlobbingVisitor (NameResolutionContext &ctx) : ctx (ctx) {}
  
!   void go (AST::Module *module);
    void visit (AST::Module &module) override;
    void visit (AST::MacroRulesDefinition &macro) override;
    void visit (AST::Function &function) override;
--- 33,43 ----
  public:
    GlobbingVisitor (NameResolutionContext &ctx) : ctx (ctx) {}
  
!   void go (AST::Item *container);
! 
!   void visit_module_container (AST::Module &module);
!   void visit_enum_container (AST::Enum &item);
! 
    void visit (AST::Module &module) override;
    void visit (AST::MacroRulesDefinition &macro) override;
    void visit (AST::Function &function) override;
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-forever-stack.h gcc-16-20250810/gcc/rust/resolve/rust-forever-stack.h
*** gcc-16-20250803/gcc/rust/resolve/rust-forever-stack.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-forever-stack.h	Sun Aug 10 22:32:08 2025
*************** private:
*** 543,548 ****
--- 543,555 ----
    Node root;
  };
  
+ enum class ResolutionMode
+ {
+   Normal,
+   FromRoot,
+   FromExtern, // extern prelude
+ };
+ 
  template <Namespace N> class ForeverStack
  {
  public:
*************** public:
*** 672,685 ****
     */
    template <typename S>
    tl::optional<Rib::Definition> resolve_path (
!     const std::vector<S> &segments, bool has_opening_scope_resolution,
      std::function<void (const S &, NodeId)> insert_segment_resolution,
      std::vector<Error> &collect_errors);
  
    // FIXME: Documentation
-   tl::optional<Resolver::CanonicalPath> to_canonical_path (NodeId id) const;
- 
-   // FIXME: Documentation
    tl::optional<Rib &> to_rib (NodeId rib_id);
    tl::optional<const Rib &> to_rib (NodeId rib_id) const;
  
--- 679,689 ----
     */
    template <typename S>
    tl::optional<Rib::Definition> resolve_path (
!     const std::vector<S> &segments, ResolutionMode mode,
      std::function<void (const S &, NodeId)> insert_segment_resolution,
      std::vector<Error> &collect_errors);
  
    // FIXME: Documentation
    tl::optional<Rib &> to_rib (NodeId rib_id);
    tl::optional<const Rib &> to_rib (NodeId rib_id) const;
  
*************** private:
*** 739,744 ****
--- 743,751 ----
      tl::optional<Node &> parent; // `None` only if the node is a root
    };
  
+   // private overload which allows specifying a starting point
+   tl::optional<Rib::Definition> get (Node &start, const Identifier &name);
+ 
    /* Should we keep going upon seeing a Rib? */
    enum class KeepGoing
    {
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-forever-stack.hxx gcc-16-20250810/gcc/rust/resolve/rust-forever-stack.hxx
*** gcc-16-20250803/gcc/rust/resolve/rust-forever-stack.hxx	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-forever-stack.hxx	Sun Aug 10 22:32:08 2025
*************** ForeverStack<N>::update_cursor (Node &ne
*** 291,302 ****
  
  template <Namespace N>
  tl::optional<Rib::Definition>
! ForeverStack<N>::get (const Identifier &name)
  {
    tl::optional<Rib::Definition> resolved_definition = tl::nullopt;
  
    // TODO: Can we improve the API? have `reverse_iter` return an optional?
!   reverse_iter ([&resolved_definition, &name] (Node &current) {
      auto candidate = current.rib.get (name.as_string ());
  
      return candidate.map_or (
--- 291,306 ----
  
  template <Namespace N>
  tl::optional<Rib::Definition>
! ForeverStack<N>::get (Node &start, const Identifier &name)
  {
    tl::optional<Rib::Definition> resolved_definition = tl::nullopt;
  
    // TODO: Can we improve the API? have `reverse_iter` return an optional?
!   reverse_iter (start, [&resolved_definition, &name] (Node &current) {
!     // we can't reference associated types/functions like this
!     if (current.rib.kind == Rib::Kind::TraitOrImpl)
!       return KeepGoing::Yes;
! 
      auto candidate = current.rib.get (name.as_string ());
  
      return candidate.map_or (
*************** ForeverStack<N>::get (const Identifier &
*** 320,325 ****
--- 324,336 ----
  
  template <Namespace N>
  tl::optional<Rib::Definition>
+ ForeverStack<N>::get (const Identifier &name)
+ {
+   return get (cursor (), name);
+ }
+ 
+ template <Namespace N>
+ tl::optional<Rib::Definition>
  ForeverStack<N>::get_lang_prelude (const Identifier &name)
  {
    return lang_prelude.rib.get (name.as_string ());
*************** ForeverStack<N>::resolve_segments (
*** 542,547 ****
--- 553,566 ----
        bool searched_prelude = false;
        while (true)
  	{
+ 	  if (is_start (iterator, segments)
+ 	      && current_node->rib.kind == Rib::Kind::TraitOrImpl)
+ 	    {
+ 	      // we can't reference associated types/functions like this
+ 	      current_node = &current_node->parent.value ();
+ 	      continue;
+ 	    }
+ 
  	  // may set the value of child
  	  for (auto &kv : current_node->children)
  	    {
*************** template <Namespace N>
*** 625,712 ****
  template <typename S>
  tl::optional<Rib::Definition>
  ForeverStack<N>::resolve_path (
!   const std::vector<S> &segments, bool has_opening_scope_resolution,
    std::function<void (const S &, NodeId)> insert_segment_resolution,
    std::vector<Error> &collect_errors)
  {
!   // TODO: What to do if segments.empty() ?
  
!   // handle paths with opening scopes
!   std::function<void (void)> cleanup_current = [] () {};
!   if (has_opening_scope_resolution)
      {
!       Node *last_current = &cursor_reference.get ();
!       if (get_rust_edition () == Edition::E2015)
! 	cursor_reference = root;
!       else
! 	cursor_reference = extern_prelude;
!       cleanup_current
! 	= [this, last_current] () { cursor_reference = *last_current; };
      }
  
    // if there's only one segment, we just use `get`
    if (segments.size () == 1)
      {
!       auto &seg = segments.front ();
!       if (auto lang_item = unwrap_segment_get_lang_item (seg))
  	{
  	  NodeId seg_id = Analysis::Mappings::get ().get_lang_item_node (
  	    lang_item.value ());
  
! 	  insert_segment_resolution (seg, seg_id);
! 	  cleanup_current ();
  	  // TODO: does NonShadowable matter?
  	  return Rib::Definition::NonShadowable (seg_id);
  	}
  
        tl::optional<Rib::Definition> res
! 	= get (unwrap_type_segment (segments.back ()).as_string ());
  
        if (!res)
! 	res = get_lang_prelude (
! 	  unwrap_type_segment (segments.back ()).as_string ());
  
        if (res && !res->is_ambiguous ())
! 	insert_segment_resolution (segments.back (), res->get_node_id ());
!       cleanup_current ();
        return res;
      }
  
!   std::reference_wrapper<Node> starting_point = cursor ();
  
!   auto res
!     = find_starting_point (segments, starting_point, insert_segment_resolution,
! 			   collect_errors)
! 	.and_then (
! 	  [this, &segments, &starting_point, &insert_segment_resolution,
! 	   &collect_errors] (typename std::vector<S>::const_iterator iterator) {
! 	    return resolve_segments (starting_point.get (), segments, iterator,
! 				     insert_segment_resolution, collect_errors);
! 	  })
! 	.and_then ([this, &segments, &insert_segment_resolution] (
! 		     Node &final_node) -> tl::optional<Rib::Definition> {
! 	  // leave resolution within impl blocks to type checker
! 	  if (final_node.rib.kind == Rib::Kind::TraitOrImpl)
! 	    return tl::nullopt;
  
! 	  auto &seg = unwrap_type_segment (segments.back ());
! 	  std::string seg_name = seg.as_string ();
  
! 	  // assuming this can't be a lang item segment
! 	  tl::optional<Rib::Definition> res
! 	    = resolve_final_segment (final_node, seg_name,
! 				     seg.is_lower_self_seg ());
! 	  // Ok we didn't find it in the rib, Lets try the prelude...
! 	  if (!res)
! 	    res = get_lang_prelude (seg_name);
  
! 	  if (res && !res->is_ambiguous ())
! 	    insert_segment_resolution (segments.back (), res->get_node_id ());
  
! 	  return res;
! 	});
!   cleanup_current ();
!   return res;
  }
  
  template <Namespace N>
--- 644,801 ----
  template <typename S>
  tl::optional<Rib::Definition>
  ForeverStack<N>::resolve_path (
!   const std::vector<S> &segments, ResolutionMode mode,
    std::function<void (const S &, NodeId)> insert_segment_resolution,
    std::vector<Error> &collect_errors)
  {
!   rust_assert (!segments.empty ());
  
!   std::reference_wrapper<Node> starting_point = cursor ();
!   switch (mode)
      {
!     case ResolutionMode::Normal:
!       break; // default
!     case ResolutionMode::FromRoot:
!       starting_point = root;
!       break;
!     case ResolutionMode::FromExtern:
!       starting_point = extern_prelude;
!       break;
!     default:
!       rust_unreachable ();
      }
  
    // if there's only one segment, we just use `get`
    if (segments.size () == 1)
      {
!       auto &outer_seg = segments.front ();
!       if (auto lang_item = unwrap_segment_get_lang_item (outer_seg))
  	{
  	  NodeId seg_id = Analysis::Mappings::get ().get_lang_item_node (
  	    lang_item.value ());
  
! 	  insert_segment_resolution (outer_seg, seg_id);
  	  // TODO: does NonShadowable matter?
  	  return Rib::Definition::NonShadowable (seg_id);
  	}
  
+       auto &seg = unwrap_type_segment (outer_seg);
+ 
        tl::optional<Rib::Definition> res
! 	= get (starting_point.get (), seg.as_string ());
  
        if (!res)
! 	res = get_lang_prelude (seg.as_string ());
! 
!       if (N == Namespace::Types && !res)
! 	{
! 	  if (seg.is_crate_path_seg ())
! 	    {
! 	      insert_segment_resolution (outer_seg, root.id);
! 	      // TODO: does NonShadowable matter?
! 	      return Rib::Definition::NonShadowable (root.id);
! 	    }
! 	  else if (seg.is_lower_self_seg ())
! 	    {
! 	      NodeId id = find_closest_module (starting_point.get ()).id;
! 	      insert_segment_resolution (outer_seg, id);
! 	      // TODO: does NonShadowable matter?
! 	      return Rib::Definition::NonShadowable (id);
! 	    }
! 	  else if (seg.is_super_path_seg ())
! 	    {
! 	      Node &closest_module
! 		= find_closest_module (starting_point.get ());
! 	      if (closest_module.is_root ())
! 		{
! 		  rust_error_at (seg.get_locus (), ErrorCode::E0433,
! 				 "too many leading %<super%> keywords");
! 		  return tl::nullopt;
! 		}
! 
! 	      NodeId id
! 		= find_closest_module (closest_module.parent.value ()).id;
! 	      insert_segment_resolution (outer_seg, id);
! 	      // TODO: does NonShadowable matter?
! 	      return Rib::Definition::NonShadowable (id);
! 	    }
! 	  else
! 	    {
! 	      // HACK: check for a module after we check the language prelude
! 	      for (auto &kv :
! 		   find_closest_module (starting_point.get ()).children)
! 		{
! 		  auto &link = kv.first;
! 
! 		  if (link.path.map_or (
! 			[&seg] (Identifier path) {
! 			  auto &path_str = path.as_string ();
! 			  return path_str == seg.as_string ();
! 			},
! 			false))
! 		    {
! 		      insert_segment_resolution (outer_seg, kv.second.id);
! 		      return Rib::Definition::NonShadowable (kv.second.id);
! 		    }
! 		}
! 	    }
! 	}
  
        if (res && !res->is_ambiguous ())
! 	insert_segment_resolution (outer_seg, res->get_node_id ());
        return res;
      }
  
!   return find_starting_point (segments, starting_point,
! 			      insert_segment_resolution, collect_errors)
!     .and_then (
!       [this, &segments, &starting_point, &insert_segment_resolution,
!        &collect_errors] (typename std::vector<S>::const_iterator iterator) {
! 	return resolve_segments (starting_point.get (), segments, iterator,
! 				 insert_segment_resolution, collect_errors);
!       })
!     .and_then ([this, &segments, &insert_segment_resolution] (
! 		 Node &final_node) -> tl::optional<Rib::Definition> {
!       // leave resolution within impl blocks to type checker
!       if (final_node.rib.kind == Rib::Kind::TraitOrImpl)
! 	return tl::nullopt;
  
!       auto &seg = unwrap_type_segment (segments.back ());
!       std::string seg_name = seg.as_string ();
  
!       // assuming this can't be a lang item segment
!       tl::optional<Rib::Definition> res
! 	= resolve_final_segment (final_node, seg_name,
! 				 seg.is_lower_self_seg ());
!       // Ok we didn't find it in the rib, Lets try the prelude...
!       if (!res)
! 	res = get_lang_prelude (seg_name);
  
!       if (N == Namespace::Types && !res)
! 	{
! 	  // HACK: check for a module after we check the language prelude
! 	  for (auto &kv : final_node.children)
! 	    {
! 	      auto &link = kv.first;
  
! 	      if (link.path.map_or (
! 		    [&seg_name] (Identifier path) {
! 		      auto &path_str = path.as_string ();
! 		      return path_str == seg_name;
! 		    },
! 		    false))
! 		{
! 		  insert_segment_resolution (segments.back (), kv.second.id);
! 		  return Rib::Definition::NonShadowable (kv.second.id);
! 		}
! 	    }
! 	}
  
!       if (res && !res->is_ambiguous ())
! 	insert_segment_resolution (segments.back (), res->get_node_id ());
! 
!       return res;
!     });
  }
  
  template <Namespace N>
*************** ForeverStack<N>::dfs (const ForeverStack
*** 771,837 ****
  }
  
  template <Namespace N>
- tl::optional<Resolver::CanonicalPath>
- ForeverStack<N>::to_canonical_path (NodeId id) const
- {
-   // find the id in the current forever stack, starting from the root,
-   // performing either a BFS or DFS once the Node containing the ID is found, go
-   // back up to the root (parent().parent().parent()...) accumulate link
-   // segments reverse them that's your canonical path
- 
-   return dfs (root, id).map ([this, id] (ConstDfsResult tuple) {
-     auto containing_node = tuple.first;
-     auto name = tuple.second;
- 
-     auto segments = std::vector<Resolver::CanonicalPath> ();
- 
-     reverse_iter (containing_node, [&segments] (const Node &current) {
-       if (current.is_root ())
- 	return KeepGoing::No;
- 
-       auto children = current.parent.value ().children;
-       const Link *outer_link = nullptr;
- 
-       for (auto &kv : children)
- 	{
- 	  auto &link = kv.first;
- 	  auto &child = kv.second;
- 
- 	  if (current.id == child.id)
- 	    {
- 	      outer_link = &link;
- 	      break;
- 	    }
- 	}
- 
-       rust_assert (outer_link);
- 
-       outer_link->path.map ([&segments, outer_link] (Identifier path) {
- 	segments.emplace (segments.begin (),
- 			  Resolver::CanonicalPath::new_seg (outer_link->id,
- 							    path.as_string ()));
-       });
- 
-       return KeepGoing::Yes;
-     });
- 
-     auto &mappings = Analysis::Mappings::get ();
-     CrateNum crate_num = mappings.lookup_crate_num (root.id).value ();
-     auto path = Resolver::CanonicalPath::new_seg (
-       root.id, mappings.get_crate_name (crate_num).value ());
-     path.set_crate_num (crate_num);
- 
-     for (const auto &segment : segments)
-       path = path.append (segment);
- 
-     // Finally, append the name
-     path = path.append (Resolver::CanonicalPath::new_seg (id, name));
- 
-     return path;
-   });
- }
- 
- template <Namespace N>
  tl::optional<Rib &>
  ForeverStack<N>::dfs_rib (ForeverStack<N>::Node &starting_point, NodeId to_find)
  {
--- 860,865 ----
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-late-name-resolver-2.0.cc gcc-16-20250810/gcc/rust/resolve/rust-late-name-resolver-2.0.cc
*** gcc-16-20250803/gcc/rust/resolve/rust-late-name-resolver-2.0.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-late-name-resolver-2.0.cc	Sun Aug 10 22:32:08 2025
***************
*** 19,24 ****
--- 19,25 ----
  #include "optional.h"
  #include "rust-ast-full.h"
  #include "rust-diagnostics.h"
+ #include "rust-expr.h"
  #include "rust-hir-map.h"
  #include "rust-late-name-resolver-2.0.h"
  #include "rust-default-resolver.h"
***************
*** 33,39 ****
  namespace Rust {
  namespace Resolver2_0 {
  
! Late::Late (NameResolutionContext &ctx) : DefaultResolver (ctx) {}
  
  static NodeId
  next_node_id ()
--- 34,42 ----
  namespace Rust {
  namespace Resolver2_0 {
  
! Late::Late (NameResolutionContext &ctx)
!   : DefaultResolver (ctx), funny_error (false), block_big_self (false)
! {}
  
  static NodeId
  next_node_id ()
*************** Late::go (AST::Crate &crate)
*** 114,121 ****
  {
    setup_builtin_types ();
  
!   for (auto &item : crate.items)
!     item->accept_vis (*this);
  }
  
  void
--- 117,123 ----
  {
    setup_builtin_types ();
  
!   visit (crate);
  }
  
  void
*************** Late::visit (AST::ForLoopExpr &expr)
*** 140,163 ****
    ctx.bindings.exit ();
  
    visit (expr.get_iterator_expr ());
!   visit (expr.get_loop_label ());
    visit (expr.get_loop_block ());
  }
  
  void
! Late::visit (AST::IfLetExpr &expr)
  {
!   visit_outer_attrs (expr);
! 
!   ctx.bindings.enter (BindingSource::Let);
  
!   for (auto &pattern : expr.get_patterns ())
!     visit (pattern);
  
    ctx.bindings.exit ();
- 
-   visit (expr.get_value_expr ());
-   visit (expr.get_if_block ());
  }
  
  void
--- 142,162 ----
    ctx.bindings.exit ();
  
    visit (expr.get_iterator_expr ());
! 
!   if (expr.has_loop_label ())
!     visit (expr.get_loop_label ());
! 
    visit (expr.get_loop_block ());
  }
  
  void
! Late::visit_if_let_patterns (AST::IfLetExpr &expr)
  {
!   ctx.bindings.enter (BindingSource::IfLet);
  
!   DefaultResolver::visit_if_let_patterns (expr);
  
    ctx.bindings.exit ();
  }
  
  void
*************** Late::visit (AST::LetStmt &let)
*** 214,258 ****
  }
  
  void
! Late::visit (AST::IdentifierPattern &identifier)
  {
    // do we insert in labels or in values
    // but values does not allow shadowing... since functions cannot shadow
    // do we insert functions in labels as well?
  
!   if (ctx.bindings.peek ().is_and_bound (identifier.get_ident ()))
      {
        if (ctx.bindings.peek ().get_source () == BindingSource::Param)
  	rust_error_at (
! 	  identifier.get_locus (), ErrorCode::E0415,
  	  "identifier %qs is bound more than once in the same parameter list",
! 	  identifier.as_string ().c_str ());
        else
  	rust_error_at (
! 	  identifier.get_locus (), ErrorCode::E0416,
  	  "identifier %qs is bound more than once in the same pattern",
! 	  identifier.as_string ().c_str ());
        return;
      }
  
!   ctx.bindings.peek ().insert_ident (identifier.get_ident ());
  
!   if (ctx.bindings.peek ().is_or_bound (identifier.get_ident ()))
      {
!       // FIXME: map usage instead
!       std::ignore = ctx.values.insert_shadowable (identifier.get_ident (),
! 						  identifier.get_node_id ());
      }
    else
      {
        // We do want to ignore duplicated data because some situations rely on
        // it.
!       std::ignore = ctx.values.insert_shadowable (identifier.get_ident (),
! 						  identifier.get_node_id ());
      }
  }
  
  void
  Late::visit (AST::AltPattern &pattern)
  {
    ctx.bindings.peek ().push (Binding::Kind::Or);
--- 213,292 ----
  }
  
  void
! Late::visit (AST::WhileLetLoopExpr &while_let)
! {
!   DefaultASTVisitor::visit_outer_attrs (while_let);
! 
!   if (while_let.has_loop_label ())
!     visit (while_let.get_loop_label ());
! 
!   // visit expression before pattern
!   // this makes variable shadowing work properly
!   visit (while_let.get_scrutinee_expr ());
! 
!   ctx.bindings.enter (BindingSource::WhileLet);
! 
!   for (auto &pattern : while_let.get_patterns ())
!     visit (pattern);
! 
!   ctx.bindings.exit ();
! 
!   visit (while_let.get_loop_block ());
! }
! 
! static void
! visit_identifier_as_pattern (NameResolutionContext &ctx,
! 			     const Identifier &ident, location_t locus,
! 			     NodeId node_id, bool is_ref, bool is_mut)
  {
    // do we insert in labels or in values
    // but values does not allow shadowing... since functions cannot shadow
    // do we insert functions in labels as well?
  
!   if (ctx.bindings.peek ().is_and_bound (ident))
      {
        if (ctx.bindings.peek ().get_source () == BindingSource::Param)
  	rust_error_at (
! 	  locus, ErrorCode::E0415,
  	  "identifier %qs is bound more than once in the same parameter list",
! 	  ident.as_string ().c_str ());
        else
  	rust_error_at (
! 	  locus, ErrorCode::E0416,
  	  "identifier %qs is bound more than once in the same pattern",
! 	  ident.as_string ().c_str ());
        return;
      }
  
!   ctx.bindings.peek ().insert_ident (ident.as_string (), locus, is_ref, is_mut);
  
!   if (ctx.bindings.peek ().is_or_bound (ident))
      {
!       auto res = ctx.values.get (ident);
!       rust_assert (res.has_value () && !res->is_ambiguous ());
!       ctx.map_usage (Usage (node_id), Definition (res->get_node_id ()));
      }
    else
      {
        // We do want to ignore duplicated data because some situations rely on
        // it.
!       std::ignore = ctx.values.insert_shadowable (ident, node_id);
      }
  }
  
  void
+ Late::visit (AST::IdentifierPattern &identifier)
+ {
+   DefaultResolver::visit (identifier);
+ 
+   visit_identifier_as_pattern (ctx, identifier.get_ident (),
+ 			       identifier.get_locus (),
+ 			       identifier.get_node_id (),
+ 			       identifier.get_is_ref (),
+ 			       identifier.get_is_mut ());
+ }
+ 
+ void
  Late::visit (AST::AltPattern &pattern)
  {
    ctx.bindings.peek ().push (Binding::Kind::Or);
*************** Late::visit_function_params (AST::Functi
*** 279,287 ****
  void
  Late::visit (AST::StructPatternFieldIdent &field)
  {
!   // We do want to ignore duplicated data because some situations rely on it.
!   std::ignore = ctx.values.insert_shadowable (field.get_identifier (),
! 					      field.get_node_id ());
  }
  
  void
--- 313,321 ----
  void
  Late::visit (AST::StructPatternFieldIdent &field)
  {
!   visit_identifier_as_pattern (ctx, field.get_identifier (), field.get_locus (),
! 			       field.get_node_id (), field.is_ref (),
! 			       field.is_mut ());
  }
  
  void
*************** Late::visit (AST::IdentifierExpr &expr)
*** 375,381 ****
      }
    else if (funny_error)
      {
!       diagnostics::text_finalizer (global_dc) = Resolver::funny_ice_text_finalizer;
        emit_diagnostic (diagnostics::kind::ice_nobt, expr.get_locus (), -1,
  		       "are you trying to break %s? how dare you?",
  		       expr.as_string ().c_str ());
--- 409,416 ----
      }
    else if (funny_error)
      {
!       diagnostics::text_finalizer (global_dc)
! 	= Resolver::funny_ice_text_finalizer;
        emit_diagnostic (diagnostics::kind::ice_nobt, expr.get_locus (), -1,
  		       "are you trying to break %s? how dare you?",
  		       expr.as_string ().c_str ());
*************** Late::visit (AST::PathInExpression &expr
*** 477,482 ****
--- 512,527 ----
  }
  
  void
+ Late::visit_impl_type (AST::Type &type)
+ {
+   // TODO: does this have to handle reentrancy?
+   rust_assert (!block_big_self);
+   block_big_self = true;
+   visit (type);
+   block_big_self = false;
+ }
+ 
+ void
  Late::visit (AST::TypePath &type)
  {
    // should we add type path resolution in `ForeverStack` directly? Since it's
*************** Late::visit (AST::TypePath &type)
*** 486,491 ****
--- 531,546 ----
  
    DefaultResolver::visit (type);
  
+   // prevent "impl Self {}" and similar
+   if (type.get_segments ().size () == 1
+       && !type.get_segments ().front ()->is_lang_item ()
+       && type.get_segments ().front ()->is_big_self_seg () && block_big_self)
+     {
+       rust_error_at (type.get_locus (),
+ 		     "%<Self%> is not valid in the self type of an impl block");
+       return;
+     }
+ 
    // this *should* mostly work
    // TODO: make sure typepath-like path resolution (?) is working
    auto resolved = ctx.resolve_path (type, Namespace::Types);
*************** Late::visit (AST::TypePath &type)
*** 493,507 ****
    if (!resolved.has_value ())
      {
        if (!ctx.lookup (type.get_segments ().front ()->get_node_id ()))
! 	rust_error_at (type.get_locus (), "could not resolve type path %qs",
! 		       type.as_string ().c_str ());
        return;
      }
  
    if (resolved->is_ambiguous ())
      {
        rust_error_at (type.get_locus (), ErrorCode::E0659, "%qs is ambiguous",
! 		     type.as_string ().c_str ());
        return;
      }
  
--- 548,563 ----
    if (!resolved.has_value ())
      {
        if (!ctx.lookup (type.get_segments ().front ()->get_node_id ()))
! 	rust_error_at (type.get_locus (), ErrorCode::E0412,
! 		       "could not resolve type path %qs",
! 		       type.make_debug_string ().c_str ());
        return;
      }
  
    if (resolved->is_ambiguous ())
      {
        rust_error_at (type.get_locus (), ErrorCode::E0659, "%qs is ambiguous",
! 		     type.make_debug_string ().c_str ());
        return;
      }
  
*************** Late::visit (AST::TypePath &type)
*** 518,523 ****
--- 574,635 ----
  }
  
  void
+ Late::visit (AST::Visibility &vis)
+ {
+   if (!vis.has_path ())
+     return;
+ 
+   AST::SimplePath &path = vis.get_path ();
+ 
+   rust_assert (path.get_segments ().size ());
+   auto &first_seg = path.get_segments ()[0];
+ 
+   auto mode = ResolutionMode::Normal;
+ 
+   if (path.has_opening_scope_resolution ())
+     {
+       if (get_rust_edition () == Edition::E2015)
+ 	mode = ResolutionMode::FromRoot;
+       else
+ 	mode = ResolutionMode::FromExtern;
+     }
+   else if (!first_seg.is_crate_path_seg () && !first_seg.is_super_path_seg ()
+ 	   && !first_seg.is_lower_self_seg ())
+     {
+       if (get_rust_edition () == Edition::E2015)
+ 	{
+ 	  mode = ResolutionMode::FromRoot;
+ 	}
+       else
+ 	{
+ 	  rust_error_at (path.get_locus (),
+ 			 "relative paths are not supported in visibilities in "
+ 			 "2018 edition or later");
+ 	  return;
+ 	}
+     }
+ 
+   auto res = ctx.resolve_path (path.get_segments (), mode, Namespace::Types);
+ 
+   if (!res.has_value ())
+     {
+       rust_error_at (path.get_locus (), ErrorCode::E0433,
+ 		     "could not resolve path %qs", path.as_string ().c_str ());
+       return;
+     }
+ 
+   // TODO: is this possible?
+   if (res->is_ambiguous ())
+     {
+       rust_error_at (path.get_locus (), ErrorCode::E0659, "%qs is ambiguous",
+ 		     path.as_string ().c_str ());
+       return;
+     }
+ 
+   ctx.map_usage (Usage (path.get_node_id ()), Definition (res->get_node_id ()));
+ }
+ 
+ void
  Late::visit (AST::Trait &trait)
  {
    // kind of weird how this is done
*************** Late::visit (AST::Trait &trait)
*** 531,543 ****
  }
  
  void
- Late::visit (AST::StructStruct &s)
- {
-   auto s_vis = [this, &s] () { AST::DefaultASTVisitor::visit (s); };
-   ctx.scoped (Rib::Kind::Item, s.get_node_id (), s_vis);
- }
- 
- void
  Late::visit (AST::StructExprStruct &s)
  {
    visit_outer_attrs (s);
--- 643,648 ----
*************** Late::visit (AST::GenericArg &arg)
*** 613,663 ****
    DefaultResolver::visit (arg);
  }
  
- template <class Closure>
- static void
- add_captures (Closure &closure, NameResolutionContext &ctx)
- {
-   auto vals = ctx.values.peek ().get_values ();
-   for (auto &val : vals)
-     {
-       ctx.mappings.add_capture (closure.get_node_id (),
- 				val.second.get_node_id ());
-     }
- }
- 
  void
! Late::visit (AST::ClosureExprInner &closure)
  {
-   add_captures (closure, ctx);
- 
-   visit_outer_attrs (closure);
- 
    ctx.bindings.enter (BindingSource::Param);
  
!   for (auto &param : closure.get_params ())
!     visit (param);
  
    ctx.bindings.exit ();
- 
-   visit (closure.get_definition_expr ());
  }
  
  void
! Late::visit (AST::ClosureExprInnerTyped &closure)
  {
!   add_captures (closure, ctx);
! 
!   visit_outer_attrs (closure);
! 
!   ctx.bindings.enter (BindingSource::Param);
! 
!   for (auto &param : closure.get_params ())
!     visit (param);
! 
!   ctx.bindings.exit ();
  
!   visit (closure.get_return_type ());
!   visit (closure.get_definition_block ());
  }
  
  } // namespace Resolver2_0
--- 718,744 ----
    DefaultResolver::visit (arg);
  }
  
  void
! Late::visit_closure_params (AST::ClosureExpr &closure)
  {
    ctx.bindings.enter (BindingSource::Param);
  
!   DefaultResolver::visit_closure_params (closure);
  
    ctx.bindings.exit ();
  }
  
  void
! Late::visit (AST::ClosureExpr &expr)
  {
!   // add captures
!   auto vals = ctx.values.peek ().get_values ();
!   for (auto &val : vals)
!     {
!       ctx.mappings.add_capture (expr.get_node_id (), val.second.get_node_id ());
!     }
  
!   DefaultResolver::visit (expr);
  }
  
  } // namespace Resolver2_0
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-late-name-resolver-2.0.h gcc-16-20250810/gcc/rust/resolve/rust-late-name-resolver-2.0.h
*** gcc-16-20250803/gcc/rust/resolve/rust-late-name-resolver-2.0.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-late-name-resolver-2.0.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 42,47 ****
--- 42,48 ----
  
    // some more label declarations
    void visit (AST::LetStmt &) override;
+   void visit (AST::WhileLetLoopExpr &) override;
    // TODO: Do we need this?
    // void visit (AST::Method &) override;
    void visit (AST::IdentifierPattern &) override;
*************** public:
*** 50,56 ****
    void visit (AST::SelfParam &) override;
    void visit (AST::MatchArm &) override;
    void visit (AST::ForLoopExpr &) override;
!   void visit (AST::IfLetExpr &) override;
  
    // resolutions
    void visit (AST::IdentifierExpr &) override;
--- 51,57 ----
    void visit (AST::SelfParam &) override;
    void visit (AST::MatchArm &) override;
    void visit (AST::ForLoopExpr &) override;
!   void visit_if_let_patterns (AST::IfLetExpr &) override;
  
    // resolutions
    void visit (AST::IdentifierExpr &) override;
*************** public:
*** 59,74 ****
    void visit (AST::ContinueExpr &) override;
    void visit (AST::LoopLabel &) override;
    void visit (AST::PathInExpression &) override;
    void visit (AST::TypePath &) override;
    void visit (AST::Trait &) override;
    void visit (AST::StructExprStruct &) override;
    void visit (AST::StructExprStructBase &) override;
    void visit (AST::StructExprStructFields &) override;
-   void visit (AST::StructStruct &) override;
    void visit (AST::GenericArgs &) override;
    void visit (AST::GenericArg &);
!   void visit (AST::ClosureExprInner &) override;
!   void visit (AST::ClosureExprInnerTyped &) override;
  
  private:
    void resolve_label (AST::Lifetime &lifetime);
--- 60,76 ----
    void visit (AST::ContinueExpr &) override;
    void visit (AST::LoopLabel &) override;
    void visit (AST::PathInExpression &) override;
+   void visit_impl_type (AST::Type &) override;
    void visit (AST::TypePath &) override;
+   void visit (AST::Visibility &) override;
    void visit (AST::Trait &) override;
    void visit (AST::StructExprStruct &) override;
    void visit (AST::StructExprStructBase &) override;
    void visit (AST::StructExprStructFields &) override;
    void visit (AST::GenericArgs &) override;
    void visit (AST::GenericArg &);
!   void visit_closure_params (AST::ClosureExpr &) override;
!   void visit (AST::ClosureExpr &) override;
  
  private:
    void resolve_label (AST::Lifetime &lifetime);
*************** private:
*** 77,82 ****
--- 79,87 ----
    void setup_builtin_types ();
  
    bool funny_error;
+ 
+   /* used to prevent "impl Self {}", "impl (Self, i32) {}", etc */
+   bool block_big_self;
  };
  
  // TODO: Add missing mappings and data structures
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-name-resolution-context.cc gcc-16-20250810/gcc/rust/resolve/rust-name-resolution-context.cc
*** gcc-16-20250803/gcc/rust/resolve/rust-name-resolution-context.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-name-resolution-context.cc	Sun Aug 10 22:32:08 2025
*************** BindingLayer::bind_test (Identifier iden
*** 33,39 ****
  {
    for (auto &bind : bindings)
      {
!       if (bind.set.find (ident) != bind.set.cend () && bind.kind == kind)
  	{
  	  return true;
  	}
--- 33,40 ----
  {
    for (auto &bind : bindings)
      {
!       if (bind.idents.find (ident.as_string ()) != bind.idents.cend ()
! 	  && bind.kind == kind)
  	{
  	  return true;
  	}
*************** BindingLayer::is_or_bound (Identifier id
*** 60,79 ****
  }
  
  void
! BindingLayer::insert_ident (Identifier ident)
  {
!   bindings.back ().set.insert (ident);
  }
  
  void
  BindingLayer::merge ()
  {
!   auto last_binding = bindings.back ();
    bindings.pop_back ();
!   for (auto &value : last_binding.set)
      {
!       bindings.back ().set.insert (value);
      }
  }
  
  BindingSource
--- 61,126 ----
  }
  
  void
! BindingLayer::insert_ident (std::string ident, location_t locus, bool is_ref,
! 			    bool is_mut)
  {
!   bindings.back ().idents.emplace (
!     std::move (ident), std::make_pair (locus, IdentifierMode (is_ref, is_mut)));
  }
  
  void
  BindingLayer::merge ()
  {
!   auto last_binding = std::move (bindings.back ());
    bindings.pop_back ();
! 
!   if (bindings.back ().has_expected_bindings)
      {
!       for (auto &value : bindings.back ().idents)
! 	{
! 	  auto ident = value.first;
! 	  if (last_binding.idents.find (ident) == last_binding.idents.end ())
! 	    {
! 	      location_t locus = value.second.first;
! 	      rust_error_at (locus, ErrorCode::E0408,
! 			     "variable %qs is not bound in all patterns",
! 			     ident.c_str ());
! 	    }
! 	}
!     }
! 
!   for (auto &value : last_binding.idents)
!     {
!       auto res = bindings.back ().idents.emplace (value);
!       if (res.second)
! 	{
! 	  if (bindings.back ().has_expected_bindings)
! 	    {
! 	      auto &ident = value.first;
! 	      location_t locus = value.second.first;
! 	      rust_error_at (locus, ErrorCode::E0408,
! 			     "variable %qs is not bound in all patterns",
! 			     ident.c_str ());
! 	    }
! 	}
!       else
! 	{
! 	  auto this_mode = value.second.second;
! 	  auto other_mode = res.first->second.second;
! 	  if (this_mode != other_mode)
! 	    {
! 	      auto &ident = value.first;
! 	      location_t locus = value.second.first;
! 	      rust_error_at (locus, ErrorCode::E0409,
! 			     "variable %qs is bound inconsistently across "
! 			     "pattern alternatives",
! 			     ident.c_str ());
! 	    }
! 	}
      }
+ 
+   if (bindings.back ().kind == Binding::Kind::Or)
+     bindings.back ().has_expected_bindings = true;
  }
  
  BindingSource
*************** BindingLayer::get_source () const
*** 82,89 ****
    return source;
  }
  
  NameResolutionContext::NameResolutionContext ()
!   : mappings (Analysis::Mappings::get ())
  {}
  
  tl::expected<NodeId, DuplicateNameError>
--- 129,191 ----
    return source;
  }
  
+ Resolver::CanonicalPath
+ CanonicalPathRecordCrateRoot::as_path (const NameResolutionContext &)
+ {
+   auto ret = Resolver::CanonicalPath::new_seg (node_id, seg);
+   ret.set_crate_num (crate_num);
+   return ret;
+ }
+ 
+ Resolver::CanonicalPath
+ CanonicalPathRecordNormal::as_path (const NameResolutionContext &ctx)
+ {
+   auto parent_path = get_parent ().as_path (ctx);
+   return parent_path.append (Resolver::CanonicalPath::new_seg (node_id, seg));
+ }
+ 
+ Resolver::CanonicalPath
+ CanonicalPathRecordLookup::as_path (const NameResolutionContext &ctx)
+ {
+   if (!cache)
+     {
+       auto res = ctx.lookup (lookup_id).and_then (
+ 	[&ctx] (NodeId id) { return ctx.canonical_ctx.get_record_opt (id); });
+ 
+       if (!res)
+ 	{
+ 	  // HACK: use a dummy value
+ 	  // this should bring us roughly to parity with nr1.0
+ 	  // since nr1.0 doesn't seem to handle canonical paths for generics
+ 	  //   quite right anyways
+ 	  return Resolver::CanonicalPath::new_seg (UNKNOWN_NODEID, "XXX");
+ 	}
+ 
+       cache = res.value ();
+     }
+   return cache->as_path (ctx);
+ }
+ 
+ Resolver::CanonicalPath
+ CanonicalPathRecordImpl::as_path (const NameResolutionContext &ctx)
+ {
+   auto parent_path = get_parent ().as_path (ctx);
+   return parent_path.append (
+     Resolver::CanonicalPath::inherent_impl_seg (impl_id,
+ 						type_record.as_path (ctx)));
+ }
+ 
+ Resolver::CanonicalPath
+ CanonicalPathRecordTraitImpl::as_path (const NameResolutionContext &ctx)
+ {
+   auto parent_path = get_parent ().as_path (ctx);
+   return parent_path.append (
+     Resolver::CanonicalPath::trait_impl_projection_seg (
+       impl_id, trait_path_record.as_path (ctx), type_record.as_path (ctx)));
+ }
+ 
  NameResolutionContext::NameResolutionContext ()
!   : mappings (Analysis::Mappings::get ()), canonical_ctx (*this)
  {}
  
  tl::expected<NodeId, DuplicateNameError>
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-name-resolution-context.h gcc-16-20250810/gcc/rust/resolve/rust-name-resolution-context.h
*** gcc-16-20250803/gcc/rust/resolve/rust-name-resolution-context.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-name-resolution-context.h	Sun Aug 10 22:32:08 2025
***************
*** 24,29 ****
--- 24,30 ----
  #include "rust-hir-map.h"
  #include "rust-rib.h"
  #include "rust-stacked-contexts.h"
+ #include "rust-item.h"
  
  namespace Rust {
  namespace Resolver2_0 {
*************** public:
*** 157,162 ****
--- 158,179 ----
    NodeId id;
  };
  
+ struct IdentifierMode
+ {
+   bool is_ref;
+   bool is_mut;
+ 
+   IdentifierMode (bool is_ref, bool is_mut) : is_ref (is_ref), is_mut (is_mut)
+   {}
+ 
+   bool operator== (const IdentifierMode &other)
+   {
+     return other.is_ref == is_ref && other.is_mut == is_mut;
+   }
+ 
+   bool operator!= (const IdentifierMode &other) { return !(*this == other); }
+ };
+ 
  struct Binding
  {
    enum class Kind
*************** struct Binding
*** 165,173 ****
      Or,
    } kind;
  
!   std::unordered_set<Identifier> set;
  
!   Binding (Binding::Kind kind) : kind (kind) {}
  };
  
  /**
--- 182,193 ----
      Or,
    } kind;
  
!   // used to check the correctness of or-bindings
!   bool has_expected_bindings;
  
!   std::unordered_map<std::string, std::pair<location_t, IdentifierMode>> idents;
! 
!   Binding (Binding::Kind kind) : kind (kind), has_expected_bindings (false) {}
  };
  
  /**
*************** enum class BindingSource
*** 177,182 ****
--- 197,204 ----
  {
    Match,
    Let,
+   IfLet,
+   WhileLet,
    For,
    /* Closure param or function param */
    Param
*************** public:
*** 206,218 ****
     */
    bool is_or_bound (Identifier ident);
  
!   void insert_ident (Identifier ident);
  
    void merge ();
  
    BindingSource get_source () const;
  };
  
  // Now our resolver, which keeps track of all the `ForeverStack`s we could want
  class NameResolutionContext
  {
--- 228,483 ----
     */
    bool is_or_bound (Identifier ident);
  
!   void insert_ident (std::string ident, location_t locus, bool is_ref,
! 		     bool is_mut);
  
    void merge ();
  
    BindingSource get_source () const;
  };
  
+ class NameResolutionContext;
+ /*
+  * Used to handle canonical paths
+  * Similar to ForeverStack, but namespace independent and more specialized
+  */
+ class CanonicalPathRecord
+ {
+ public:
+   virtual Resolver::CanonicalPath as_path (const NameResolutionContext &) = 0;
+ 
+   virtual bool is_root () const = 0;
+ 
+   virtual ~CanonicalPathRecord () = default;
+ };
+ 
+ class CanonicalPathRecordWithParent : public CanonicalPathRecord
+ {
+ public:
+   CanonicalPathRecordWithParent (CanonicalPathRecord &parent) : parent (&parent)
+   {}
+ 
+   CanonicalPathRecord &get_parent () { return *parent; }
+ 
+   bool is_root () const override final { return false; }
+ 
+ private:
+   CanonicalPathRecord *parent;
+ };
+ 
+ class CanonicalPathRecordCrateRoot : public CanonicalPathRecord
+ {
+ public:
+   CanonicalPathRecordCrateRoot (NodeId node_id, std::string seg)
+     : node_id (node_id), seg (std::move (seg))
+   {
+     rust_assert (Analysis::Mappings::get ().node_is_crate (node_id));
+     crate_num = Analysis::Mappings::get ().lookup_crate_num (node_id).value ();
+   }
+ 
+   Resolver::CanonicalPath as_path (const NameResolutionContext &) override;
+ 
+   bool is_root () const override final { return true; }
+ 
+ private:
+   NodeId node_id;
+   CrateNum crate_num;
+   std::string seg;
+ };
+ 
+ class CanonicalPathRecordNormal : public CanonicalPathRecordWithParent
+ {
+ public:
+   CanonicalPathRecordNormal (CanonicalPathRecord &parent, NodeId node_id,
+ 			     std::string seg)
+     : CanonicalPathRecordWithParent (parent), node_id (node_id),
+       seg (std::move (seg))
+   {
+     rust_assert (!Analysis::Mappings::get ().node_is_crate (node_id));
+   }
+ 
+   Resolver::CanonicalPath as_path (const NameResolutionContext &) override;
+ 
+ private:
+   NodeId node_id;
+   std::string seg;
+ };
+ 
+ class CanonicalPathRecordLookup : public CanonicalPathRecord
+ {
+ public:
+   CanonicalPathRecordLookup (NodeId lookup_id)
+     : lookup_id (lookup_id), cache (nullptr)
+   {}
+ 
+   Resolver::CanonicalPath as_path (const NameResolutionContext &) override;
+ 
+   bool is_root () const override final { return true; }
+ 
+ private:
+   NodeId lookup_id;
+   CanonicalPathRecord *cache;
+ };
+ 
+ class CanonicalPathRecordImpl : public CanonicalPathRecordWithParent
+ {
+ public:
+   CanonicalPathRecordImpl (CanonicalPathRecord &parent, NodeId impl_id,
+ 			   NodeId type_id)
+     : CanonicalPathRecordWithParent (parent), impl_id (impl_id),
+       type_record (type_id)
+   {}
+ 
+   Resolver::CanonicalPath as_path (const NameResolutionContext &) override;
+ 
+ private:
+   NodeId impl_id;
+   CanonicalPathRecordLookup type_record;
+ };
+ 
+ class CanonicalPathRecordTraitImpl : public CanonicalPathRecordWithParent
+ {
+ public:
+   CanonicalPathRecordTraitImpl (CanonicalPathRecord &parent, NodeId impl_id,
+ 				NodeId type_id, NodeId trait_path_id)
+     : CanonicalPathRecordWithParent (parent), impl_id (impl_id),
+       type_record (type_id), trait_path_record (trait_path_id)
+   {}
+ 
+   Resolver::CanonicalPath as_path (const NameResolutionContext &) override;
+ 
+ private:
+   NodeId impl_id;
+   CanonicalPathRecordLookup type_record;
+   CanonicalPathRecordLookup trait_path_record;
+ };
+ 
+ class CanonicalPathCtx
+ {
+ public:
+   CanonicalPathCtx (const NameResolutionContext &ctx)
+     : current_record (nullptr), nr_ctx (&ctx)
+   {}
+ 
+   Resolver::CanonicalPath get_path (NodeId id) const
+   {
+     return get_record (id).as_path (*nr_ctx);
+   }
+ 
+   CanonicalPathRecord &get_record (NodeId id) const
+   {
+     auto it = records.find (id);
+     rust_assert (it != records.end ());
+     return *it->second;
+   }
+ 
+   tl::optional<CanonicalPathRecord *> get_record_opt (NodeId id) const
+   {
+     auto it = records.find (id);
+     if (it == records.end ())
+       return tl::nullopt;
+     else
+       return it->second.get ();
+   }
+ 
+   void insert_record (NodeId id, const Identifier &ident)
+   {
+     insert_record (id, ident.as_string ());
+   }
+ 
+   void insert_record (NodeId id, std::string seg)
+   {
+     rust_assert (current_record != nullptr);
+ 
+     auto it = records.find (id);
+     if (it == records.end ())
+       {
+ 	auto record = new CanonicalPathRecordNormal (*current_record, id,
+ 						     std::move (seg));
+ 	bool ok
+ 	  = records.emplace (id, std::unique_ptr<CanonicalPathRecord> (record))
+ 	      .second;
+ 	rust_assert (ok);
+       }
+   }
+ 
+   template <typename F> void scope (NodeId id, const Identifier &ident, F &&f)
+   {
+     scope (id, ident.as_string (), std::forward<F> (f));
+   }
+ 
+   template <typename F> void scope (NodeId id, std::string seg, F &&f)
+   {
+     rust_assert (current_record != nullptr);
+ 
+     scope_inner (id, std::forward<F> (f), [this, id, &seg] () {
+       return new CanonicalPathRecordNormal (*current_record, id,
+ 					    std::move (seg));
+     });
+   }
+ 
+   template <typename F> void scope_impl (AST::InherentImpl &impl, F &&f)
+   {
+     rust_assert (current_record != nullptr);
+ 
+     NodeId id = impl.get_node_id ();
+     scope_inner (id, std::forward<F> (f), [this, id, &impl] () {
+       return new CanonicalPathRecordImpl (*current_record, id,
+ 					  impl.get_type ().get_node_id ());
+     });
+   }
+ 
+   template <typename F> void scope_impl (AST::TraitImpl &impl, F &&f)
+   {
+     rust_assert (current_record != nullptr);
+ 
+     NodeId id = impl.get_node_id ();
+     scope_inner (id, std::forward<F> (f), [this, id, &impl] () {
+       return new CanonicalPathRecordTraitImpl (
+ 	*current_record, id, impl.get_type ().get_node_id (),
+ 	impl.get_trait_path ().get_node_id ());
+     });
+   }
+ 
+   template <typename F>
+   void scope_crate (NodeId node_id, std::string crate_name, F &&f)
+   {
+     scope_inner (node_id, std::forward<F> (f), [node_id, &crate_name] () {
+       return new CanonicalPathRecordCrateRoot (node_id, std::move (crate_name));
+     });
+   }
+ 
+ private:
+   template <typename FCreate, typename FCallback>
+   void scope_inner (NodeId id, FCallback &&f_callback, FCreate &&f_create)
+   {
+     auto it = records.find (id);
+     if (it == records.end ())
+       {
+ 	CanonicalPathRecord *record = std::forward<FCreate> (f_create) ();
+ 	it = records.emplace (id, std::unique_ptr<CanonicalPathRecord> (record))
+ 	       .first;
+       }
+ 
+     rust_assert (it->second->is_root ()
+ 		 || &static_cast<CanonicalPathRecordWithParent &> (*it->second)
+ 			.get_parent ()
+ 		      == current_record);
+ 
+     CanonicalPathRecord *stash = it->second.get ();
+     std::swap (stash, current_record);
+ 
+     std::forward<FCallback> (f_callback) ();
+ 
+     std::swap (stash, current_record);
+   }
+ 
+   std::unordered_map<NodeId, std::unique_ptr<CanonicalPathRecord>> records;
+   CanonicalPathRecord *current_record;
+ 
+   const NameResolutionContext *nr_ctx;
+ };
+ 
  // Now our resolver, which keeps track of all the `ForeverStack`s we could want
  class NameResolutionContext
  {
*************** public:
*** 271,286 ****
    Analysis::Mappings &mappings;
    StackedContexts<BindingLayer> bindings;
  
    // TODO: Rename
    // TODO: Use newtype pattern for Usage and Definition
    void map_usage (Usage usage, Definition definition);
  
    tl::optional<NodeId> lookup (NodeId usage) const;
  
    template <typename S>
    tl::optional<Rib::Definition>
!   resolve_path (const std::vector<S> &segments,
! 		bool has_opening_scope_resolution,
  		std::vector<Error> &collect_errors, Namespace ns)
    {
      std::function<void (const S &, NodeId)> insert_segment_resolution
--- 536,557 ----
    Analysis::Mappings &mappings;
    StackedContexts<BindingLayer> bindings;
  
+   CanonicalPathCtx canonical_ctx;
+ 
    // TODO: Rename
    // TODO: Use newtype pattern for Usage and Definition
    void map_usage (Usage usage, Definition definition);
  
    tl::optional<NodeId> lookup (NodeId usage) const;
  
+   Resolver::CanonicalPath to_canonical_path (NodeId id) const
+   {
+     return canonical_ctx.get_path (id);
+   }
+ 
    template <typename S>
    tl::optional<Rib::Definition>
!   resolve_path (const std::vector<S> &segments, ResolutionMode mode,
  		std::vector<Error> &collect_errors, Namespace ns)
    {
      std::function<void (const S &, NodeId)> insert_segment_resolution
*************** public:
*** 292,308 ****
      switch (ns)
        {
        case Namespace::Values:
! 	return values.resolve_path (segments, has_opening_scope_resolution,
! 				    insert_segment_resolution, collect_errors);
        case Namespace::Types:
! 	return types.resolve_path (segments, has_opening_scope_resolution,
! 				   insert_segment_resolution, collect_errors);
        case Namespace::Macros:
! 	return macros.resolve_path (segments, has_opening_scope_resolution,
! 				    insert_segment_resolution, collect_errors);
        case Namespace::Labels:
! 	return labels.resolve_path (segments, has_opening_scope_resolution,
! 				    insert_segment_resolution, collect_errors);
        default:
  	rust_unreachable ();
        }
--- 563,579 ----
      switch (ns)
        {
        case Namespace::Values:
! 	return values.resolve_path (segments, mode, insert_segment_resolution,
! 				    collect_errors);
        case Namespace::Types:
! 	return types.resolve_path (segments, mode, insert_segment_resolution,
! 				   collect_errors);
        case Namespace::Macros:
! 	return macros.resolve_path (segments, mode, insert_segment_resolution,
! 				    collect_errors);
        case Namespace::Labels:
! 	return labels.resolve_path (segments, mode, insert_segment_resolution,
! 				    collect_errors);
        default:
  	rust_unreachable ();
        }
*************** public:
*** 310,317 ****
  
    template <typename S, typename... Args>
    tl::optional<Rib::Definition>
!   resolve_path (const std::vector<S> &segments,
! 		bool has_opening_scope_resolution,
  		tl::optional<std::vector<Error> &> collect_errors,
  		Namespace ns_first, Args... ns_args)
    {
--- 581,587 ----
  
    template <typename S, typename... Args>
    tl::optional<Rib::Definition>
!   resolve_path (const std::vector<S> &segments, ResolutionMode mode,
  		tl::optional<std::vector<Error> &> collect_errors,
  		Namespace ns_first, Args... ns_args)
    {
*************** public:
*** 320,327 ****
      for (auto ns : namespaces)
        {
  	std::vector<Error> collect_errors_inner;
! 	if (auto ret = resolve_path (segments, has_opening_scope_resolution,
! 				     collect_errors_inner, ns))
  	  return ret;
  	if (!collect_errors_inner.empty ())
  	  {
--- 590,596 ----
      for (auto ns : namespaces)
        {
  	std::vector<Error> collect_errors_inner;
! 	if (auto ret = resolve_path (segments, mode, collect_errors_inner, ns))
  	  return ret;
  	if (!collect_errors_inner.empty ())
  	  {
*************** public:
*** 343,394 ****
      return tl::nullopt;
    }
  
!   template <typename... Args>
    tl::optional<Rib::Definition>
!   resolve_path (const AST::SimplePath &path,
  		tl::optional<std::vector<Error> &> collect_errors,
  		Namespace ns_first, Args... ns_args)
    {
!     return resolve_path (path.get_segments (),
! 			 path.has_opening_scope_resolution (), collect_errors,
! 			 ns_first, ns_args...);
    }
  
!   template <typename... Args>
    tl::optional<Rib::Definition>
!   resolve_path (const AST::PathInExpression &path,
! 		tl::optional<std::vector<Error> &> collect_errors,
! 		Namespace ns_first, Args... ns_args)
    {
!     return resolve_path (path.get_segments (), path.opening_scope_resolution (),
! 			 collect_errors, ns_first, ns_args...);
    }
  
!   template <typename... Args>
    tl::optional<Rib::Definition>
!   resolve_path (const AST::TypePath &path,
! 		tl::optional<std::vector<Error> &> collect_errors,
  		Namespace ns_first, Args... ns_args)
    {
      return resolve_path (path.get_segments (),
! 			 path.has_opening_scope_resolution_op (),
! 			 collect_errors, ns_first, ns_args...);
    }
  
!   template <typename P, typename... Args>
!   tl::optional<Rib::Definition> resolve_path (const P &path, Namespace ns_first,
! 					      Args... ns_args)
    {
!     return resolve_path (path, tl::nullopt, ns_first, ns_args...);
    }
  
!   template <typename P, typename... Args>
!   tl::optional<Rib::Definition>
!   resolve_path (const P &path_segments, bool has_opening_scope_resolution,
! 		Namespace ns_first, Args... ns_args)
    {
!     return resolve_path (path_segments, has_opening_scope_resolution,
! 			 tl::nullopt, ns_first, ns_args...);
    }
  
  private:
--- 612,679 ----
      return tl::nullopt;
    }
  
!   template <typename S, typename... Args>
    tl::optional<Rib::Definition>
!   resolve_path (const std::vector<S> &path_segments,
! 		bool has_opening_scope_resolution,
  		tl::optional<std::vector<Error> &> collect_errors,
  		Namespace ns_first, Args... ns_args)
    {
!     auto mode = ResolutionMode::Normal;
!     if (has_opening_scope_resolution)
!       {
! 	if (get_rust_edition () == Edition::E2015)
! 	  mode = ResolutionMode::FromRoot;
! 	else
! 	  mode = ResolutionMode::FromExtern;
!       }
!     return resolve_path (path_segments, mode, collect_errors, ns_first,
! 			 ns_args...);
    }
  
!   template <typename S, typename... Args>
    tl::optional<Rib::Definition>
!   resolve_path (const std::vector<S> &path_segments,
! 		bool has_opening_scope_resolution, Namespace ns_first,
! 		Args... ns_args)
    {
!     return resolve_path (path_segments, has_opening_scope_resolution,
! 			 tl::nullopt, ns_first, ns_args...);
    }
  
!   template <typename S, typename... Args>
    tl::optional<Rib::Definition>
!   resolve_path (const std::vector<S> &path_segments, ResolutionMode mode,
  		Namespace ns_first, Args... ns_args)
    {
+     return resolve_path (path_segments, mode, tl::nullopt, ns_first,
+ 			 ns_args...);
+   }
+ 
+   template <typename... Args>
+   tl::optional<Rib::Definition> resolve_path (const AST::SimplePath &path,
+ 					      Args &&...args)
+   {
      return resolve_path (path.get_segments (),
! 			 path.has_opening_scope_resolution (),
! 			 std::forward<Args> (args)...);
    }
  
!   template <typename... Args>
!   tl::optional<Rib::Definition> resolve_path (const AST::PathInExpression &path,
! 					      Args &&...args)
    {
!     return resolve_path (path.get_segments (), path.opening_scope_resolution (),
! 			 std::forward<Args> (args)...);
    }
  
!   template <typename... Args>
!   tl::optional<Rib::Definition> resolve_path (const AST::TypePath &path,
! 					      Args &&...args)
    {
!     return resolve_path (path.get_segments (),
! 			 path.has_opening_scope_resolution_op (),
! 			 std::forward<Args> (args)...);
    }
  
  private:
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-rib.h gcc-16-20250810/gcc/rust/resolve/rust-rib.h
*** gcc-16-20250803/gcc/rust/resolve/rust-rib.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-rib.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 188,193 ****
--- 188,195 ----
       * restriction that you cannot `use` items from the Prelude
       */
      Prelude,
+     /* Generic rib, used to store generics */
+     Generics,
    } kind;
  
    static std::string kind_to_string (Rib::Kind kind)
*************** public:
*** 214,222 ****
  	return "Forward type param ban";
        case Rib::Kind::ConstParamType:
  	return "Const Param Type";
!       default:
! 	rust_unreachable ();
        }
    }
  
    Rib (Kind kind);
--- 216,228 ----
  	return "Forward type param ban";
        case Rib::Kind::ConstParamType:
  	return "Const Param Type";
!       case Kind::Prelude:
! 	return "Prelude";
!       case Kind::Generics:
! 	return "Generics";
        }
+ 
+     rust_unreachable ();
    }
  
    Rib (Kind kind);
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc gcc-16-20250810/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc
*** gcc-16-20250803/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc	Sun Aug 10 22:32:08 2025
*************** TopLevel::go (AST::Crate &crate)
*** 95,135 ****
    // times in a row in a fixed-point fashion, so it would make the code
    // responsible for this ugly and perfom a lot of error checking.
  
!   for (auto &item : crate.items)
!     item->accept_vis (*this);
  }
  
  void
  TopLevel::visit (AST::Module &module)
  {
-   insert_or_error_out (module.get_name (), module, Namespace::Types);
- 
-   // Parse the module's items if they haven't been expanded and the file
-   // should be parsed (i.e isn't hidden behind an untrue or impossible cfg
-   // directive
-   // TODO: make sure this is right
-   // TODO: avoid loading items if cfg attributes are present?
-   //       might not be needed if this runs after early resolution?
-   // This was copied from the old early resolver method
-   // 'accumulate_escaped_macros'
-   if (module.get_kind () == AST::Module::UNLOADED)
-     {
-       module.load_items ();
- 
-       // If the module was previously unloaded, then we don't want to visit it
-       // this time around as the CfgStrip hasn't run on its inner items yet.
-       // Skip it for now, mark the visitor as dirty and try again
- 
-       dirty = true;
- 
-       return;
-     }
- 
    DefaultResolver::visit (module);
  
!   if (Analysis::Mappings::get ().lookup_ast_module (module.get_node_id ())
        == tl::nullopt)
!     Analysis::Mappings::get ().insert_ast_module (&module);
  }
  
  void
--- 95,111 ----
    // times in a row in a fixed-point fashion, so it would make the code
    // responsible for this ugly and perfom a lot of error checking.
  
!   visit (crate);
  }
  
  void
  TopLevel::visit (AST::Module &module)
  {
    DefaultResolver::visit (module);
  
!   if (Analysis::Mappings::get ().lookup_glob_container (module.get_node_id ())
        == tl::nullopt)
!     Analysis::Mappings::get ().insert_glob_container (&module);
  }
  
  void
*************** TopLevel::visit (AST::Trait &trait)
*** 141,173 ****
  }
  
  void
! TopLevel::visit (AST::InherentImpl &impl)
! {
!   auto inner_fn = [this, &impl] () {
!     insert_or_error_out (Identifier ("Self", impl.get_type ().get_locus ()),
! 			 impl.get_type (), Namespace::Types);
! 
!     // We do want to visit with the default visitor instead of default resolver
!     // because we don't want to insert the scope twice.
!     AST::DefaultASTVisitor::visit (impl);
!   };
! 
!   ctx.scoped (Rib::Kind::TraitOrImpl, impl.get_node_id (), inner_fn);
! }
! 
! void
! TopLevel::visit (AST::TraitImpl &impl)
  {
!   auto inner_fn = [this, &impl] () {
!     insert_or_error_out (Identifier ("Self", impl.get_type ().get_locus ()),
! 			 impl.get_type (), Namespace::Types);
! 
!     // We do want to visit using the default visitor instead of default resolver
!     // because we don't want to insert the scope twice.
!     AST::DefaultASTVisitor::visit (impl);
!   };
! 
!   ctx.scoped (Rib::Kind::TraitOrImpl, impl.get_node_id (), inner_fn);
  }
  
  void
--- 117,126 ----
  }
  
  void
! TopLevel::maybe_insert_big_self (AST::Impl &impl)
  {
!   insert_or_error_out (Identifier ("Self", impl.get_type ().get_locus ()),
! 		       impl.get_type (), Namespace::Types);
  }
  
  void
*************** insert_macros (std::vector<PROC_MACRO> &
*** 197,215 ****
  }
  
  void
! TopLevel::visit (AST::ExternCrate &crate)
  {
    auto &mappings = Analysis::Mappings::get ();
-   auto num_opt = mappings.lookup_crate_name (crate.get_referenced_crate ());
- 
-   if (!num_opt)
-     {
-       rust_error_at (crate.get_locus (), "unknown crate %qs",
- 		     crate.get_referenced_crate ().c_str ());
-       return;
-     }
- 
-   CrateNum num = *num_opt;
  
    auto attribute_macros = mappings.lookup_attribute_proc_macros (num);
  
--- 150,159 ----
  }
  
  void
! TopLevel::visit_extern_crate (AST::ExternCrate &extern_crate, AST::Crate &crate,
! 			      CrateNum num)
  {
    auto &mappings = Analysis::Mappings::get ();
  
    auto attribute_macros = mappings.lookup_attribute_proc_macros (num);
  
*************** TopLevel::visit (AST::ExternCrate &crate
*** 217,250 ****
  
    auto derive_macros = mappings.lookup_derive_proc_macros (num);
  
!   auto sub_visitor = [&] () {
!     // TODO: Find a way to keep this part clean without the double dispatch.
!     if (derive_macros.has_value ())
!       {
! 	insert_macros (derive_macros.value (), ctx);
! 	for (auto &macro : derive_macros.value ())
! 	  mappings.insert_derive_proc_macro_def (macro);
!       }
!     if (attribute_macros.has_value ())
!       {
! 	insert_macros (attribute_macros.value (), ctx);
! 	for (auto &macro : attribute_macros.value ())
! 	  mappings.insert_attribute_proc_macro_def (macro);
!       }
!     if (bang_macros.has_value ())
!       {
! 	insert_macros (bang_macros.value (), ctx);
! 	for (auto &macro : bang_macros.value ())
! 	  mappings.insert_bang_proc_macro_def (macro);
!       }
!   };
  
!   if (crate.has_as_clause ())
!     ctx.scoped (Rib::Kind::Module, crate.get_node_id (), sub_visitor,
! 		crate.get_as_clause ());
!   else
!     ctx.scoped (Rib::Kind::Module, crate.get_node_id (), sub_visitor,
! 		crate.get_referenced_crate ());
  }
  
  static bool
--- 161,187 ----
  
    auto derive_macros = mappings.lookup_derive_proc_macros (num);
  
!   // TODO: Find a way to keep this part clean without the double dispatch.
!   if (derive_macros.has_value ())
!     {
!       insert_macros (derive_macros.value (), ctx);
!       for (auto &macro : derive_macros.value ())
! 	mappings.insert_derive_proc_macro_def (macro);
!     }
!   if (attribute_macros.has_value ())
!     {
!       insert_macros (attribute_macros.value (), ctx);
!       for (auto &macro : attribute_macros.value ())
! 	mappings.insert_attribute_proc_macro_def (macro);
!     }
!   if (bang_macros.has_value ())
!     {
!       insert_macros (bang_macros.value (), ctx);
!       for (auto &macro : bang_macros.value ())
! 	mappings.insert_bang_proc_macro_def (macro);
!     }
  
!   visit (crate);
  }
  
  static bool
*************** TopLevel::visit (AST::ExternalStaticItem
*** 321,334 ****
  void
  TopLevel::visit (AST::StructStruct &struct_item)
  {
!   auto generic_vis = [this, &struct_item] () {
!     for (auto &g : struct_item.get_generic_params ())
!       {
! 	g->accept_vis (*this);
!       }
!   };
! 
!   ctx.scoped (Rib::Kind::Item, struct_item.get_node_id (), generic_vis);
  
    insert_or_error_out (struct_item.get_struct_name (), struct_item,
  		       Namespace::Types);
--- 258,264 ----
  void
  TopLevel::visit (AST::StructStruct &struct_item)
  {
!   DefaultResolver::visit (struct_item);
  
    insert_or_error_out (struct_item.get_struct_name (), struct_item,
  		       Namespace::Types);
*************** void
*** 374,397 ****
--- 304,335 ----
  TopLevel::visit (AST::EnumItem &variant)
  {
    insert_enum_variant_or_error_out (variant.get_identifier (), variant);
+ 
+   DefaultResolver::visit (variant);
  }
  
  void
  TopLevel::visit (AST::EnumItemTuple &variant)
  {
    insert_enum_variant_or_error_out (variant.get_identifier (), variant);
+ 
+   DefaultResolver::visit (variant);
  }
  
  void
  TopLevel::visit (AST::EnumItemStruct &variant)
  {
    insert_enum_variant_or_error_out (variant.get_identifier (), variant);
+ 
+   DefaultResolver::visit (variant);
  }
  
  void
  TopLevel::visit (AST::EnumItemDiscriminant &variant)
  {
    insert_or_error_out (variant.get_identifier (), variant, Namespace::Types);
+ 
+   DefaultResolver::visit (variant);
  }
  
  void
*************** TopLevel::visit (AST::Enum &enum_item)
*** 401,406 ****
--- 339,351 ----
  		       Namespace::Types);
  
    DefaultResolver::visit (enum_item);
+ 
+   // Since enums can be containers for imports, we need to insert them like we
+   // do for modules
+   if (Analysis::Mappings::get ().lookup_glob_container (
+ 	enum_item.get_node_id ())
+       == tl::nullopt)
+     Analysis::Mappings::get ().insert_glob_container (&enum_item);
  }
  
  void
*************** TopLevel::visit (AST::TypeAlias &type_it
*** 430,450 ****
    DefaultResolver::visit (type_item);
  }
  
! static void
! flatten_rebind (
    const AST::UseTreeRebind &glob,
    std::vector<std::pair<AST::SimplePath, AST::UseTreeRebind>> &rebind_paths);
  
! static void
! flatten_list (
    const AST::UseTreeList &glob, std::vector<AST::SimplePath> &paths,
    std::vector<AST::SimplePath> &glob_paths,
    std::vector<std::pair<AST::SimplePath, AST::UseTreeRebind>> &rebind_paths,
    NameResolutionContext &ctx);
! static void
! flatten_glob (const AST::UseTreeGlob &glob,
! 	      std::vector<AST::SimplePath> &glob_paths,
! 	      NameResolutionContext &ctx);
  
  static void
  flatten (
--- 375,392 ----
    DefaultResolver::visit (type_item);
  }
  
! static void flatten_rebind (
    const AST::UseTreeRebind &glob,
    std::vector<std::pair<AST::SimplePath, AST::UseTreeRebind>> &rebind_paths);
  
! static void flatten_list (
    const AST::UseTreeList &glob, std::vector<AST::SimplePath> &paths,
    std::vector<AST::SimplePath> &glob_paths,
    std::vector<std::pair<AST::SimplePath, AST::UseTreeRebind>> &rebind_paths,
    NameResolutionContext &ctx);
! static void flatten_glob (const AST::UseTreeGlob &glob,
! 			  std::vector<AST::SimplePath> &glob_paths,
! 			  NameResolutionContext &ctx);
  
  static void
  flatten (
*************** flatten (
*** 455,471 ****
  {
    switch (tree->get_kind ())
      {
!       case AST::UseTree::Rebind: {
  	auto rebind = static_cast<const AST::UseTreeRebind *> (tree);
  	flatten_rebind (*rebind, rebind_paths);
  	break;
        }
!       case AST::UseTree::List: {
  	auto list = static_cast<const AST::UseTreeList *> (tree);
  	flatten_list (*list, paths, glob_paths, rebind_paths, ctx);
  	break;
        }
!       case AST::UseTree::Glob: {
  	auto glob = static_cast<const AST::UseTreeGlob *> (tree);
  	flatten_glob (*glob, glob_paths, ctx);
  	break;
--- 397,416 ----
  {
    switch (tree->get_kind ())
      {
!     case AST::UseTree::Rebind:
!       {
  	auto rebind = static_cast<const AST::UseTreeRebind *> (tree);
  	flatten_rebind (*rebind, rebind_paths);
  	break;
        }
!     case AST::UseTree::List:
!       {
  	auto list = static_cast<const AST::UseTreeList *> (tree);
  	flatten_list (*list, paths, glob_paths, rebind_paths, ctx);
  	break;
        }
!     case AST::UseTree::Glob:
!       {
  	auto glob = static_cast<const AST::UseTreeGlob *> (tree);
  	flatten_glob (*glob, glob_paths, ctx);
  	break;
diff -Nrcpad gcc-16-20250803/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.h gcc-16-20250810/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.h
*** gcc-16-20250803/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.h	Sun Aug 10 22:32:08 2025
*************** private:
*** 160,167 ****
  
    void visit (AST::Module &module) override;
    void visit (AST::Trait &trait) override;
!   void visit (AST::InherentImpl &impl) override;
!   void visit (AST::TraitImpl &impl) override;
    void visit (AST::TraitItemType &trait_item) override;
    void visit (AST::MacroRulesDefinition &macro) override;
    void visit (AST::Function &function) override;
--- 160,166 ----
  
    void visit (AST::Module &module) override;
    void visit (AST::Trait &trait) override;
!   void maybe_insert_big_self (AST::Impl &impl) override;
    void visit (AST::TraitItemType &trait_item) override;
    void visit (AST::MacroRulesDefinition &macro) override;
    void visit (AST::Function &function) override;
*************** private:
*** 177,183 ****
    void visit (AST::Union &union_item) override;
    void visit (AST::ConstantItem &const_item) override;
    void visit (AST::TypeAlias &type_item) override;
!   void visit (AST::ExternCrate &crate) override;
    void visit (AST::TypeParam &type_param) override;
    void visit (AST::ConstGenericParam &const_param) override;
  
--- 176,182 ----
    void visit (AST::Union &union_item) override;
    void visit (AST::ConstantItem &const_item) override;
    void visit (AST::TypeAlias &type_item) override;
!   void visit_extern_crate (AST::ExternCrate &, AST::Crate &, CrateNum) override;
    void visit (AST::TypeParam &type_param) override;
    void visit (AST::ConstGenericParam &const_param) override;
  
diff -Nrcpad gcc-16-20250803/gcc/rust/rust-attribs.cc gcc-16-20250810/gcc/rust/rust-attribs.cc
*** gcc-16-20250803/gcc/rust/rust-attribs.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/rust-attribs.cc	Sun Aug 10 22:32:08 2025
*************** along with GCC; see the file COPYING3.
*** 38,72 ****
   * future.
   */
  
! extern const attribute_spec grs_langhook_common_attribute_table[];
  
  /* Internal attribute handlers for built-in functions.  */
! static tree
! handle_noreturn_attribute (tree *, tree, tree, int, bool *);
! static tree
! handle_leaf_attribute (tree *, tree, tree, int, bool *);
! static tree
! handle_const_attribute (tree *, tree, tree, int, bool *);
! static tree
! handle_malloc_attribute (tree *, tree, tree, int, bool *);
! static tree
! handle_pure_attribute (tree *, tree, tree, int, bool *);
! static tree
! handle_novops_attribute (tree *, tree, tree, int, bool *);
! static tree
! handle_nonnull_attribute (tree *, tree, tree, int, bool *);
! static tree
! handle_nothrow_attribute (tree *, tree, tree, int, bool *);
! static tree
! handle_type_generic_attribute (tree *, tree, tree, int, bool *);
! static tree
! handle_transaction_pure_attribute (tree *, tree, tree, int, bool *);
! static tree
! handle_returns_twice_attribute (tree *, tree, tree, int, bool *);
! static tree
! handle_fnspec_attribute (tree *, tree, tree, int, bool *);
! static tree
! handle_omp_declare_simd_attribute (tree *, tree, tree, int, bool *);
  
  /* Helper to define attribute exclusions.  */
  #define ATTR_EXCL(name, function, type, variable)                              \
--- 38,64 ----
   * future.
   */
  
! extern const struct scoped_attribute_specs grs_langhook_gnu_attribute_table;
! extern const struct scoped_attribute_specs grs_langhook_common_attribute_table;
  
  /* Internal attribute handlers for built-in functions.  */
! static tree handle_noreturn_attribute (tree *, tree, tree, int, bool *);
! static tree handle_leaf_attribute (tree *, tree, tree, int, bool *);
! static tree handle_const_attribute (tree *, tree, tree, int, bool *);
! static tree handle_malloc_attribute (tree *, tree, tree, int, bool *);
! static tree handle_pure_attribute (tree *, tree, tree, int, bool *);
! static tree handle_novops_attribute (tree *, tree, tree, int, bool *);
! static tree handle_nonnull_attribute (tree *, tree, tree, int, bool *);
! static tree handle_nothrow_attribute (tree *, tree, tree, int, bool *);
! static tree handle_type_generic_attribute (tree *, tree, tree, int, bool *);
! static tree handle_transaction_pure_attribute (tree *, tree, tree, int, bool *);
! static tree handle_returns_twice_attribute (tree *, tree, tree, int, bool *);
! static tree handle_fnspec_attribute (tree *, tree, tree, int, bool *);
! static tree handle_omp_declare_simd_attribute (tree *, tree, tree, int, bool *);
! 
! /* Rust attribute handlers for user defined attributes.  */
! static tree handle_cold_attribute (tree *, tree, tree, int, bool *);
! static tree handle_hot_attribute (tree *, tree, tree, int, bool *);
  
  /* Helper to define attribute exclusions.  */
  #define ATTR_EXCL(name, function, type, variable)                              \
*************** handle_omp_declare_simd_attribute (tree
*** 74,79 ****
--- 66,75 ----
      name, function, type, variable                                             \
    }
  
+ // clang-format off
+ // Disabling clang-format because it insists in having several ATTR_EXCL() on a
+ // single line.
+ 
  static const struct attribute_spec::exclusions attr_noreturn_exclusions[] = {
    //  ATTR_EXCL ("alloc_size", true, true, true),
    ATTR_EXCL ("const", true, true, true),
*************** static const struct attribute_spec::excl
*** 89,99 ****
      ATTR_EXCL (NULL, false, false, false),
  };
  
  static const struct attribute_spec::exclusions attr_const_pure_exclusions[] = {
    // ATTR_EXCL ("alloc_size", true, true, true),
    ATTR_EXCL ("const", true, true, true),
    ATTR_EXCL ("noreturn", true, true, true),
!   ATTR_EXCL ("pure", true, true, true), ATTR_EXCL (NULL, false, false, false)};
  
  /* Helper to define an attribute.  */
  #define ATTR_SPEC(name, min_len, max_len, decl_req, type_req, fn_type_req,     \
--- 85,106 ----
      ATTR_EXCL (NULL, false, false, false),
  };
  
+ extern const struct attribute_spec::exclusions attr_cold_hot_exclusions[] = {
+ 
+   ATTR_EXCL ("cold", true, true, true),
+   ATTR_EXCL ("hot", true, true, true),
+   ATTR_EXCL (NULL, false, false, false)
+ };
+ 
  static const struct attribute_spec::exclusions attr_const_pure_exclusions[] = {
    // ATTR_EXCL ("alloc_size", true, true, true),
    ATTR_EXCL ("const", true, true, true),
    ATTR_EXCL ("noreturn", true, true, true),
!   ATTR_EXCL ("pure", true, true, true),
!   ATTR_EXCL (NULL, false, false, false)
! };
! 
! // clang-format on
  
  /* Helper to define an attribute.  */
  #define ATTR_SPEC(name, min_len, max_len, decl_req, type_req, fn_type_req,     \
*************** static const struct attribute_spec::excl
*** 105,111 ****
  
  /* Table of machine-independent attributes.
     For internal use (marking of built-ins) only.  */
! const attribute_spec grs_langhook_common_attribute_table[] = {
    ATTR_SPEC ("noreturn", 0, 0, true, false, false, false,
  	     handle_noreturn_attribute, attr_noreturn_exclusions),
    ATTR_SPEC ("leaf", 0, 0, true, false, false, false, handle_leaf_attribute,
--- 112,118 ----
  
  /* Table of machine-independent attributes.
     For internal use (marking of built-ins) only.  */
! static const attribute_spec grs_langhook_common_attributes[] = {
    ATTR_SPEC ("noreturn", 0, 0, true, false, false, false,
  	     handle_noreturn_attribute, attr_noreturn_exclusions),
    ATTR_SPEC ("leaf", 0, 0, true, false, false, false, handle_leaf_attribute,
*************** const attribute_spec grs_langhook_common
*** 132,140 ****
  	     NULL),
    ATTR_SPEC ("omp declare simd", 0, -1, true, false, false, false,
  	     handle_omp_declare_simd_attribute, NULL),
-   ATTR_SPEC (NULL, 0, 0, false, false, false, false, NULL, NULL),
  };
  
  /* Built-in attribute handlers.
     These functions take the arguments:
     (tree *node, tree name, tree args, int flags, bool *no_add_attrs)  */
--- 139,159 ----
  	     NULL),
    ATTR_SPEC ("omp declare simd", 0, -1, true, false, false, false,
  	     handle_omp_declare_simd_attribute, NULL),
  };
  
+ const scoped_attribute_specs grs_langhook_common_attribute_table
+   = {"gnu", {grs_langhook_common_attributes}};
+ 
+ static const attribute_spec grs_langhook_gnu_attributes[] = {
+   ATTR_SPEC ("cold", 0, 0, true, false, false, false, handle_cold_attribute,
+ 	     attr_cold_hot_exclusions),
+   ATTR_SPEC ("hot", 0, 0, true, false, false, false, handle_hot_attribute,
+ 	     attr_cold_hot_exclusions),
+ };
+ 
+ const scoped_attribute_specs grs_langhook_gnu_attribute_table
+   = {"gnu", {grs_langhook_gnu_attributes}};
+ 
  /* Built-in attribute handlers.
     These functions take the arguments:
     (tree *node, tree name, tree args, int flags, bool *no_add_attrs)  */
*************** handle_const_attribute (tree *node, tree
*** 204,210 ****
  /* Handle a "malloc" attribute; arguments as in
     struct attribute_spec.handler.  */
  
! tree
  handle_malloc_attribute (tree *node, tree, tree, int, bool *)
  {
    gcc_assert (TREE_CODE (*node) == FUNCTION_DECL
--- 223,229 ----
  /* Handle a "malloc" attribute; arguments as in
     struct attribute_spec.handler.  */
  
! static tree
  handle_malloc_attribute (tree *node, tree, tree, int, bool *)
  {
    gcc_assert (TREE_CODE (*node) == FUNCTION_DECL
*************** handle_malloc_attribute (tree *node, tre
*** 217,225 ****
     struct attribute_spec.handler.  */
  
  static tree
! handle_pure_attribute (tree *node, tree, tree, int, bool *)
  {
!   gcc_assert (TREE_CODE (*node) == FUNCTION_DECL);
    DECL_PURE_P (*node) = 1;
    return NULL_TREE;
  }
--- 236,249 ----
     struct attribute_spec.handler.  */
  
  static tree
! handle_pure_attribute (tree *node, tree name, tree, int, bool *no_add_attrs)
  {
!   if (TREE_CODE (*node) != FUNCTION_DECL)
!     {
!       warning (OPT_Wattributes, "%qE attribute ignored", name);
!       *no_add_attrs = true;
!     }
! 
    DECL_PURE_P (*node) = 1;
    return NULL_TREE;
  }
*************** handle_pure_attribute (tree *node, tree,
*** 228,236 ****
     struct attribute_spec.handler.  */
  
  static tree
! handle_novops_attribute (tree *node, tree, tree, int, bool *)
  {
!   gcc_assert (TREE_CODE (*node) == FUNCTION_DECL);
    DECL_IS_NOVOPS (*node) = 1;
    return NULL_TREE;
  }
--- 252,265 ----
     struct attribute_spec.handler.  */
  
  static tree
! handle_novops_attribute (tree *node, tree name, tree, int, bool *no_add_attrs)
  {
!   if (TREE_CODE (*node) != FUNCTION_DECL)
!     {
!       warning (OPT_Wattributes, "%qE attribute ignored", name);
!       *no_add_attrs = true;
!     }
! 
    DECL_IS_NOVOPS (*node) = 1;
    return NULL_TREE;
  }
*************** handle_nonnull_attribute (tree *node, tr
*** 301,309 ****
     struct attribute_spec.handler.  */
  
  static tree
! handle_nothrow_attribute (tree *node, tree, tree, int, bool *)
  {
!   gcc_assert (TREE_CODE (*node) == FUNCTION_DECL);
    TREE_NOTHROW (*node) = 1;
    return NULL_TREE;
  }
--- 330,343 ----
     struct attribute_spec.handler.  */
  
  static tree
! handle_nothrow_attribute (tree *node, tree name, tree, int, bool *no_add_attrs)
  {
!   if (TREE_CODE (*node) != FUNCTION_DECL)
!     {
!       warning (OPT_Wattributes, "%qE attribute ignored", name);
!       *no_add_attrs = true;
!     }
! 
    TREE_NOTHROW (*node) = 1;
    return NULL_TREE;
  }
*************** handle_transaction_pure_attribute (tree
*** 339,347 ****
     struct attribute_spec.handler.  */
  
  static tree
! handle_returns_twice_attribute (tree *node, tree, tree, int, bool *)
  {
!   gcc_assert (TREE_CODE (*node) == FUNCTION_DECL);
  
    DECL_IS_RETURNS_TWICE (*node) = 1;
  
--- 373,386 ----
     struct attribute_spec.handler.  */
  
  static tree
! handle_returns_twice_attribute (tree *node, tree name, tree, int,
! 				bool *no_add_attrs)
  {
!   if (TREE_CODE (*node) != FUNCTION_DECL)
!     {
!       warning (OPT_Wattributes, "%qE attribute ignored", name);
!       *no_add_attrs = true;
!     }
  
    DECL_IS_RETURNS_TWICE (*node) = 1;
  
*************** handle_returns_twice_attribute (tree *no
*** 351,357 ****
  /* Handle a "fn spec" attribute; arguments as in
     struct attribute_spec.handler.  */
  
! tree
  handle_fnspec_attribute (tree *, tree, tree args, int, bool *)
  {
    gcc_assert (args && TREE_CODE (TREE_VALUE (args)) == STRING_CST
--- 390,396 ----
  /* Handle a "fn spec" attribute; arguments as in
     struct attribute_spec.handler.  */
  
! static tree
  handle_fnspec_attribute (tree *, tree, tree args, int, bool *)
  {
    gcc_assert (args && TREE_CODE (TREE_VALUE (args)) == STRING_CST
*************** handle_fnspec_attribute (tree *, tree, t
*** 362,370 ****
  /* Handle an "omp declare simd" attribute; arguments as in
     struct attribute_spec.handler.  */
  
! tree
! handle_omp_declare_simd_attribute (tree *node, tree, tree, int, bool *)
  {
!   gcc_assert (TREE_CODE (*node) == FUNCTION_DECL);
    return NULL_TREE;
  }
--- 401,446 ----
  /* Handle an "omp declare simd" attribute; arguments as in
     struct attribute_spec.handler.  */
  
! static tree
! handle_omp_declare_simd_attribute (tree *node, tree name, tree, int,
! 				   bool *no_add_attrs)
  {
!   if (TREE_CODE (*node) != FUNCTION_DECL)
!     {
!       warning (OPT_Wattributes, "%qE attribute ignored", name);
!       *no_add_attrs = true;
!     }
! 
!   return NULL_TREE;
! }
! 
! /* Language specific attribute handlers.
!    These functions take the arguments:
!    (tree *node, tree name, tree args, int flags, bool *no_add_attrs)  */
! 
! /* Handle a "cold" and attribute; arguments as in
!    struct attribute_spec.handler.  */
! 
! static tree
! handle_cold_attribute (tree *node, tree name, tree, int, bool *no_add_attrs)
! {
!   if (TREE_CODE (*node) != FUNCTION_DECL)
!     {
!       warning (OPT_Wattributes, "%qE attribute ignored", name);
!       *no_add_attrs = true;
!     }
! 
!   return NULL_TREE;
! }
! 
! static tree
! handle_hot_attribute (tree *node, tree name, tree, int, bool *no_add_attrs)
! {
!   if (TREE_CODE (*node) != FUNCTION_DECL)
!     {
!       warning (OPT_Wattributes, "%qE attribute ignored", name);
!       *no_add_attrs = true;
!     }
! 
    return NULL_TREE;
  }
diff -Nrcpad gcc-16-20250803/gcc/rust/rust-backend.h gcc-16-20250810/gcc/rust/rust-backend.h
*** gcc-16-20250803/gcc/rust/rust-backend.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/rust-backend.h	Sun Aug 10 22:32:08 2025
***************
*** 27,32 ****
--- 27,34 ----
  #include "rust-linemap.h"
  #include "rust-diagnostics.h"
  #include "util/rust-operators.h"
+ #include "util/rust-ggc.h"
+ #include "util/optional.h"
  #include "tree.h"
  #include "rust-gcc.h"
  
*************** class Bvariable;
*** 42,110 ****
  
  namespace Backend {
  
! void
! init ();
  
  // Name/type/location.  Used for function parameters, struct fields,
  // interface methods.
  struct typed_identifier
  {
!   std::string name;
    tree type;
    location_t location;
  
!   typed_identifier () : name (), type (NULL_TREE), location (UNKNOWN_LOCATION)
!   {}
! 
!   typed_identifier (const std::string &a_name, tree a_type,
! 		    location_t a_location)
      : name (a_name), type (a_type), location (a_location)
    {}
  };
  
  // debug
  void debug (tree);
! void
! debug (Bvariable *);
  
! tree
! get_identifier_node (const std::string &str);
  
  // Types.
  
  // Get the wchar type
! tree
! wchar_type ();
  
  // Get the Host pointer size in bits
! int
! get_pointer_size ();
  
  // Get the raw str type const char*
! tree
! raw_str_type ();
  
  // Get an unnamed integer type with the given signedness and number
  // of bits.
! tree
! integer_type (bool is_unsigned, int bits);
  
  // Get an unnamed floating point type with the given number of bits
  // (32 or 64).
! tree
! float_type (int bits);
  
  // Get a pointer type.
! tree
! pointer_type (tree to_type);
  
  // Get a reference type.
! tree
! reference_type (tree to_type);
  
  // make type immutable
! tree
! immutable_type (tree base);
  
  // Get a function type.  The receiver, parameter, and results are
  // generated from the types in the Function_type.  The Function_type
--- 44,103 ----
  
  namespace Backend {
  
! namespace GGC {
! 
! using Rust::GGC::Ident;
! 
! } // namespace GGC
! 
! void init ();
  
  // Name/type/location.  Used for function parameters, struct fields,
  // interface methods.
  struct typed_identifier
  {
!   GGC::Ident name;
    tree type;
    location_t location;
  
!   typed_identifier (GGC::Ident a_name, tree a_type, location_t a_location)
      : name (a_name), type (a_type), location (a_location)
    {}
  };
  
  // debug
  void debug (tree);
! void debug (Bvariable *);
  
! tree get_identifier_node (const std::string &str);
  
  // Types.
  
  // Get the wchar type
! tree wchar_type ();
  
  // Get the Host pointer size in bits
! int get_pointer_size ();
  
  // Get the raw str type const char*
! tree raw_str_type ();
  
  // Get an unnamed integer type with the given signedness and number
  // of bits.
! tree integer_type (bool is_unsigned, int bits);
  
  // Get an unnamed floating point type with the given number of bits
  // (32 or 64).
! tree float_type (int bits);
  
  // Get a pointer type.
! tree pointer_type (tree to_type);
  
  // Get a reference type.
! tree reference_type (tree to_type);
  
  // make type immutable
! tree immutable_type (tree base);
  
  // Get a function type.  The receiver, parameter, and results are
  // generated from the types in the Function_type.  The Function_type
*************** immutable_type (tree base);
*** 115,155 ****
  // one result, RESULT_STRUCT is a struct type to hold the results,
  // and RESULTS may be ignored; if there are zero or one results,
  // RESULT_STRUCT is NULL.
! tree
! function_type (const typed_identifier &receiver,
! 	       const std::vector<typed_identifier> &parameters,
! 	       const std::vector<typed_identifier> &results, tree result_struct,
! 	       location_t location);
  
! tree
! function_type_variadic (const typed_identifier &receiver,
! 			const std::vector<typed_identifier> &parameters,
! 			const std::vector<typed_identifier> &results,
! 			tree result_struct, location_t location);
  
! tree
! function_ptr_type (tree result, const std::vector<tree> &praameters,
! 		   location_t location);
  
  // Get a struct type.
! tree
! struct_type (const std::vector<typed_identifier> &fields, bool layout = true);
  
  // Get a union type.
! tree
! union_type (const std::vector<typed_identifier> &fields, bool layout = true);
  
  // Get an array type.
! tree
! array_type (tree element_type, tree length);
  
  // Return a named version of a type.  The location is the location
  // of the type definition.  This will not be called for a type
  // created via placeholder_pointer_type, placeholder_struct_type, or
  // placeholder_array_type..  (It may be called for a pointer,
  // struct, or array type in a case like "type P *byte; type Q P".)
! tree
! named_type (const std::string &name, tree, location_t);
  
  // Return the size of a type.
  int64_t type_size (tree);
--- 108,143 ----
  // one result, RESULT_STRUCT is a struct type to hold the results,
  // and RESULTS may be ignored; if there are zero or one results,
  // RESULT_STRUCT is NULL.
! tree function_type (const typed_identifier &receiver,
! 		    const std::vector<typed_identifier> &parameters,
! 		    const std::vector<typed_identifier> &results,
! 		    tree result_struct, location_t location);
  
! tree function_type_variadic (const typed_identifier &receiver,
! 			     const std::vector<typed_identifier> &parameters,
! 			     const std::vector<typed_identifier> &results,
! 			     tree result_struct, location_t location);
  
! tree function_ptr_type (tree result, const std::vector<tree> &praameters,
! 			location_t location);
  
  // Get a struct type.
! tree struct_type (const std::vector<typed_identifier> &fields,
! 		  bool layout = true);
  
  // Get a union type.
! tree union_type (const std::vector<typed_identifier> &fields,
! 		 bool layout = true);
  
  // Get an array type.
! tree array_type (tree element_type, tree length);
  
  // Return a named version of a type.  The location is the location
  // of the type definition.  This will not be called for a type
  // created via placeholder_pointer_type, placeholder_struct_type, or
  // placeholder_array_type..  (It may be called for a pointer,
  // struct, or array type in a case like "type P *byte; type Q P".)
! tree named_type (GGC::Ident name, tree, location_t);
  
  // Return the size of a type.
  int64_t type_size (tree);
*************** int64_t type_field_alignment (tree);
*** 164,171 ****
  // Return the offset of field INDEX in a struct type.  INDEX is the
  // entry in the FIELDS std::vector parameter of struct_type or
  // set_placeholder_struct_type.
! int64_t
! type_field_offset (tree, size_t index);
  
  // Expressions.
  
--- 152,158 ----
  // Return the offset of field INDEX in a struct type.  INDEX is the
  // entry in the FIELDS std::vector parameter of struct_type or
  // set_placeholder_struct_type.
! int64_t type_field_offset (tree, size_t index);
  
  // Expressions.
  
*************** type_field_offset (tree, size_t index);
*** 175,329 ****
  tree zero_expression (tree);
  
  // Create a reference to a variable.
! tree
! var_expression (Bvariable *var, location_t);
  
  // Return an expression for the floating point value VAL in BTYPE.
! tree
! float_constant_expression (tree btype, mpfr_t val);
  
  // Return an expression for the string value VAL.
! tree
! string_constant_expression (const std::string &val);
  
  // Get a char literal
! tree
! char_constant_expression (char c);
  
  // Get a char literal
! tree
! wchar_constant_expression (wchar_t c);
  
  // Return an expression for the boolean value VAL.
! tree
! boolean_constant_expression (bool val);
  
  // Return an expression that converts EXPR to TYPE.
! tree
! convert_expression (tree type, tree expr, location_t);
  
  // Return an expression for the field at INDEX in BSTRUCT.
! tree
! struct_field_expression (tree bstruct, size_t index, location_t);
  
  // Create an expression that executes BSTAT before BEXPR.
! tree
! compound_expression (tree bstat, tree bexpr, location_t);
  
  // Return an expression that executes THEN_EXPR if CONDITION is true, or
  // ELSE_EXPR otherwise and returns the result as type BTYPE, within the
  // specified function FUNCTION.  ELSE_EXPR may be NULL.  BTYPE may be NULL.
! tree
! conditional_expression (tree function, tree btype, tree condition,
! 			tree then_expr, tree else_expr, location_t);
  
  // Return an expression for the negation operation OP EXPR.
  // Supported values of OP are enumerated in NegationOperator.
! tree
! negation_expression (NegationOperator op, tree expr, location_t);
  
  // Return an expression for the operation LEFT OP RIGHT.
  // Supported values of OP are enumerated in ArithmeticOrLogicalOperator.
! tree
! arithmetic_or_logical_expression (ArithmeticOrLogicalOperator op, tree left,
! 				  tree right, location_t loc);
  
  // Return an expression for the operation LEFT OP RIGHT.
  // Supported values of OP are enumerated in ArithmeticOrLogicalOperator.
  // This function adds overflow checking and returns a list of statements to
  // add to the current function context. The `receiver` variable refers to the
  // variable which will contain the result of that operation.
! tree
! arithmetic_or_logical_expression_checked (ArithmeticOrLogicalOperator op,
! 					  tree left, tree right, location_t loc,
! 					  Bvariable *receiver);
  
  // Return an expression for the operation LEFT OP RIGHT.
  // Supported values of OP are enumerated in ComparisonOperator.
! tree
! comparison_expression (ComparisonOperator op, tree left, tree right,
! 		       location_t loc);
  
  // Return an expression for the operation LEFT OP RIGHT.
  // Supported values of OP are enumerated in LazyBooleanOperator.
! tree
! lazy_boolean_expression (LazyBooleanOperator op, tree left, tree right,
! 			 location_t);
  
  // Return an expression that constructs BTYPE with VALS.  BTYPE must be the
  // backend representation a of struct.  VALS must be in the same order as the
  // corresponding fields in BTYPE.
! tree
! constructor_expression (tree btype, bool is_variant,
! 			const std::vector<tree> &vals, int, location_t);
  
  // Return an expression that constructs an array of BTYPE with INDEXES and
  // VALS.  INDEXES and VALS must have the same amount of elements. Each index
  // in INDEXES must be in the same order as the corresponding value in VALS.
! tree
! array_constructor_expression (tree btype,
! 			      const std::vector<unsigned long> &indexes,
! 			      const std::vector<tree> &vals, location_t);
  
! tree
! array_initializer (tree, tree, tree, tree, tree, tree *, location_t);
  
  // Return an expression for ARRAY[INDEX] as an l-value.  ARRAY is a valid
  // fixed-length array, not a slice.
! tree
! array_index_expression (tree array, tree index, location_t);
  
  // Create an expression for a call to FN with ARGS, taking place within
  // caller CALLER.
! tree
! call_expression (tree fn, const std::vector<tree> &args, tree static_chain,
! 		 location_t);
  
  // Statements.
  
  // Create a variable initialization statement in the specified
  // function.  This initializes a local variable at the point in the
  // program flow where it is declared.
! tree
! init_statement (tree, Bvariable *var, tree init);
  
  // Create an assignment statement within the specified function.
! tree
! assignment_statement (tree lhs, tree rhs, location_t);
  
  // Create return statement for an decl for a value (can be NULL_TREE) at a
  // location
! tree
! return_statement (tree fndecl, tree val, location_t);
  
  // Create an if statement within a function.  ELSE_BLOCK may be NULL.
! tree
! if_statement (tree, tree condition, tree then_block, tree else_block,
! 	      location_t);
  
  // infinite loop expressions
! tree
! loop_expression (tree body, location_t);
  
  // exit expressions
! tree
! exit_expression (tree condition, location_t);
  
  // Create a single statement from two statements.
  tree compound_statement (tree, tree);
  
  // Create a single statement from a list of statements.
! tree
! statement_list (const std::vector<tree> &);
  
  // Create a statement that attempts to execute BSTAT and calls EXCEPT_STMT if
  // an exception occurs. EXCEPT_STMT may be NULL.  FINALLY_STMT may be NULL and
  // if not NULL, it will always be executed.  This is used for handling defers
  // in Go functions.  In C++, the resulting code is of this form:
  //   try { BSTAT; } catch { EXCEPT_STMT; } finally { FINALLY_STMT; }
! tree
! exception_handler_statement (tree bstat, tree except_stmt, tree finally_stmt,
! 			     location_t);
  
  // Blocks.
  
--- 162,296 ----
  tree zero_expression (tree);
  
  // Create a reference to a variable.
! tree var_expression (Bvariable *var, location_t);
  
  // Return an expression for the floating point value VAL in BTYPE.
! tree float_constant_expression (tree btype, mpfr_t val);
  
  // Return an expression for the string value VAL.
! tree string_constant_expression (const std::string &val);
  
  // Get a char literal
! tree char_constant_expression (char c);
  
  // Get a char literal
! tree wchar_constant_expression (wchar_t c);
! 
! // Get a size literal
! tree size_constant_expression (size_t val);
  
  // Return an expression for the boolean value VAL.
! tree boolean_constant_expression (bool val);
  
  // Return an expression that converts EXPR to TYPE.
! tree convert_expression (tree type, tree expr, location_t);
  
  // Return an expression for the field at INDEX in BSTRUCT.
! tree struct_field_expression (tree bstruct, size_t index, location_t);
  
  // Create an expression that executes BSTAT before BEXPR.
! tree compound_expression (tree bstat, tree bexpr, location_t);
  
  // Return an expression that executes THEN_EXPR if CONDITION is true, or
  // ELSE_EXPR otherwise and returns the result as type BTYPE, within the
  // specified function FUNCTION.  ELSE_EXPR may be NULL.  BTYPE may be NULL.
! tree conditional_expression (tree function, tree btype, tree condition,
! 			     tree then_expr, tree else_expr, location_t);
  
  // Return an expression for the negation operation OP EXPR.
  // Supported values of OP are enumerated in NegationOperator.
! tree negation_expression (NegationOperator op, tree expr, location_t);
  
  // Return an expression for the operation LEFT OP RIGHT.
  // Supported values of OP are enumerated in ArithmeticOrLogicalOperator.
! tree arithmetic_or_logical_expression (ArithmeticOrLogicalOperator op,
! 				       tree left, tree right, location_t loc);
  
  // Return an expression for the operation LEFT OP RIGHT.
  // Supported values of OP are enumerated in ArithmeticOrLogicalOperator.
  // This function adds overflow checking and returns a list of statements to
  // add to the current function context. The `receiver` variable refers to the
  // variable which will contain the result of that operation.
! tree arithmetic_or_logical_expression_checked (ArithmeticOrLogicalOperator op,
! 					       tree left, tree right,
! 					       location_t loc,
! 					       Bvariable *receiver);
  
  // Return an expression for the operation LEFT OP RIGHT.
  // Supported values of OP are enumerated in ComparisonOperator.
! tree comparison_expression (ComparisonOperator op, tree left, tree right,
! 			    location_t loc);
  
  // Return an expression for the operation LEFT OP RIGHT.
  // Supported values of OP are enumerated in LazyBooleanOperator.
! tree lazy_boolean_expression (LazyBooleanOperator op, tree left, tree right,
! 			      location_t);
  
  // Return an expression that constructs BTYPE with VALS.  BTYPE must be the
  // backend representation a of struct.  VALS must be in the same order as the
  // corresponding fields in BTYPE.
! tree constructor_expression (tree btype, bool is_variant,
! 			     const std::vector<tree> &vals, int, location_t);
  
  // Return an expression that constructs an array of BTYPE with INDEXES and
  // VALS.  INDEXES and VALS must have the same amount of elements. Each index
  // in INDEXES must be in the same order as the corresponding value in VALS.
! tree array_constructor_expression (tree btype,
! 				   const std::vector<unsigned long> &indexes,
! 				   const std::vector<tree> &vals, location_t);
  
! tree array_initializer (tree, tree, tree, tree, tree, tree *, location_t);
  
  // Return an expression for ARRAY[INDEX] as an l-value.  ARRAY is a valid
  // fixed-length array, not a slice.
! tree array_index_expression (tree array, tree index, location_t);
! 
! // Return an expresison for SLICE[INDEX] as an l-value.  SLICE is represented
! // with a DST.
! tree slice_index_expression (tree slice, tree index, location_t);
  
  // Create an expression for a call to FN with ARGS, taking place within
  // caller CALLER.
! tree call_expression (tree fn, const std::vector<tree> &args, tree static_chain,
! 		      location_t);
  
  // Statements.
  
  // Create a variable initialization statement in the specified
  // function.  This initializes a local variable at the point in the
  // program flow where it is declared.
! tree init_statement (tree, Bvariable *var, tree init);
  
  // Create an assignment statement within the specified function.
! tree assignment_statement (tree lhs, tree rhs, location_t);
  
  // Create return statement for an decl for a value (can be NULL_TREE) at a
  // location
! tree return_statement (tree fndecl, tree val, location_t);
  
  // Create an if statement within a function.  ELSE_BLOCK may be NULL.
! tree if_statement (tree, tree condition, tree then_block, tree else_block,
! 		   location_t);
  
  // infinite loop expressions
! tree loop_expression (tree body, location_t);
  
  // exit expressions
! tree exit_expression (tree condition, location_t);
  
  // Create a single statement from two statements.
  tree compound_statement (tree, tree);
  
  // Create a single statement from a list of statements.
! tree statement_list (const std::vector<tree> &);
  
  // Create a statement that attempts to execute BSTAT and calls EXCEPT_STMT if
  // an exception occurs. EXCEPT_STMT may be NULL.  FINALLY_STMT may be NULL and
  // if not NULL, it will always be executed.  This is used for handling defers
  // in Go functions.  In C++, the resulting code is of this form:
  //   try { BSTAT; } catch { EXCEPT_STMT; } finally { FINALLY_STMT; }
! tree exception_handler_statement (tree bstat, tree except_stmt,
! 				  tree finally_stmt, location_t);
  
  // Blocks.
  
*************** exception_handler_statement (tree bstat,
*** 337,352 ****
  // the initial curly brace.  END_LOCATION is the location of the end
  // of the block, more or less the location of the final curly brace.
  // The statements will be added after the block is created.
! tree
! block (tree function, tree enclosing, const std::vector<Bvariable *> &vars,
!        location_t start_location, location_t end_location);
  
  // Add the statements to a block.  The block is created first.  Then
  // the statements are created.  Then the statements are added to the
  // block.  This will called exactly once per block.  The vector may
  // be empty if there are no statements.
! void
! block_add_statements (tree, const std::vector<tree> &);
  
  // Variables.
  
--- 304,317 ----
  // the initial curly brace.  END_LOCATION is the location of the end
  // of the block, more or less the location of the final curly brace.
  // The statements will be added after the block is created.
! tree block (tree function, tree enclosing, const std::vector<Bvariable *> &vars,
! 	    location_t start_location, location_t end_location);
  
  // Add the statements to a block.  The block is created first.  Then
  // the statements are created.  Then the statements are added to the
  // block.  This will called exactly once per block.  The vector may
  // be empty if there are no statements.
! void block_add_statements (tree, const std::vector<tree> &);
  
  // Variables.
  
*************** block_add_statements (tree, const std::v
*** 360,369 ****
  // be put into a unique section if possible; this is intended to
  // permit the linker to garbage collect the variable if it is not
  // referenced.  LOCATION is where the variable was defined.
! Bvariable *
! global_variable (const std::string &name, const std::string &asm_name,
! 		 tree btype, bool is_external, bool is_hidden,
! 		 bool in_unique_section, location_t location);
  
  // A global variable will 1) be initialized to zero, or 2) be
  // initialized to a constant value, or 3) be initialized in the init
--- 325,333 ----
  // be put into a unique section if possible; this is intended to
  // permit the linker to garbage collect the variable if it is not
  // referenced.  LOCATION is where the variable was defined.
! Bvariable *global_variable (GGC::Ident name, GGC::Ident asm_name, tree btype,
! 			    bool is_external, bool is_hidden,
! 			    bool in_unique_section, location_t location);
  
  // A global variable will 1) be initialized to zero, or 2) be
  // initialized to a constant value, or 3) be initialized in the init
*************** global_variable (const std::string &name
*** 371,378 ****
  // global_variable_set_init to set the initial value.  If this is
  // not called, the backend should initialize a global variable to 0.
  // The init function may then assign a value to it.
! void
! global_variable_set_init (Bvariable *, tree);
  
  // Create a local variable.  The frontend will create the local
  // variables first, and then create the block which contains them.
--- 335,341 ----
  // global_variable_set_init to set the initial value.  If this is
  // not called, the backend should initialize a global variable to 0.
  // The init function may then assign a value to it.
! void global_variable_set_init (Bvariable *, tree);
  
  // Create a local variable.  The frontend will create the local
  // variables first, and then create the block which contains them.
*************** global_variable_set_init (Bvariable *, t
*** 386,406 ****
  // the function, as otherwise the variable would be on the heap).
  // LOCATION is where the variable is defined.  For each local variable
  // the frontend will call init_statement to set the initial value.
! Bvariable *
! local_variable (tree function, const std::string &name, tree type,
! 		Bvariable *decl_var, location_t location);
  
  // Create a function parameter.  This is an incoming parameter, not
  // a result parameter (result parameters are treated as local
  // variables).  The arguments are as for local_variable.
! Bvariable *
! parameter_variable (tree function, const std::string &name, tree type,
! 		    location_t location);
  
  // Create a static chain parameter.  This is the closure parameter.
! Bvariable *
! static_chain_variable (tree function, const std::string &name, tree type,
! 		       location_t location);
  
  // Create a temporary variable.  A temporary variable has no name,
  // just a type.  We pass in FUNCTION and BLOCK in case they are
--- 349,366 ----
  // the function, as otherwise the variable would be on the heap).
  // LOCATION is where the variable is defined.  For each local variable
  // the frontend will call init_statement to set the initial value.
! Bvariable *local_variable (tree function, GGC::Ident name, tree type,
! 			   Bvariable *decl_var, location_t location);
  
  // Create a function parameter.  This is an incoming parameter, not
  // a result parameter (result parameters are treated as local
  // variables).  The arguments are as for local_variable.
! Bvariable *parameter_variable (tree function, GGC::Ident name, tree type,
! 			       location_t location);
  
  // Create a static chain parameter.  This is the closure parameter.
! Bvariable *static_chain_variable (tree function, GGC::Ident name, tree type,
! 				  location_t location);
  
  // Create a temporary variable.  A temporary variable has no name,
  // just a type.  We pass in FUNCTION and BLOCK in case they are
*************** static_chain_variable (tree function, co
*** 413,430 ****
  // variable, and may not be very useful.  This function should
  // return a variable which can be referenced later and should set
  // *PSTATEMENT to a statement which initializes the variable.
! Bvariable *
! temporary_variable (tree fndecl, tree bind_tree, tree type, tree init,
! 		    bool address_is_taken, location_t location,
! 		    tree *pstatement);
  
  // Labels.
  
! // Create a new label.  NAME will be empty if this is a label
  // created by the frontend for a loop construct.  The location is
  // where the label is defined.
! tree
! label (tree, const std::string &name, location_t);
  
  // Create a statement which defines a label.  This statement will be
  // put into the codestream at the point where the label should be
--- 373,388 ----
  // variable, and may not be very useful.  This function should
  // return a variable which can be referenced later and should set
  // *PSTATEMENT to a statement which initializes the variable.
! Bvariable *temporary_variable (tree fndecl, tree bind_tree, tree type,
! 			       tree init, bool address_is_taken,
! 			       location_t location, tree *pstatement);
  
  // Labels.
  
! // Create a new label.  NAME will be tl::nullopt if this is a label
  // created by the frontend for a loop construct.  The location is
  // where the label is defined.
! tree label (tree, tl::optional<GGC::Ident> name, location_t);
  
  // Create a statement which defines a label.  This statement will be
  // put into the codestream at the point where the label should be
*************** tree goto_statement (tree, location_t);
*** 439,444 ****
--- 397,408 ----
  // recover.
  tree label_address (tree, location_t);
  
+ // Lookup a field from a type given its name.
+ // Build the `component` tree with `Backend::get_identifier_node`.
+ //
+ // Forked from the C frontend.
+ tree lookup_field (const_tree, tree);
+ 
  // Functions.
  
  // Bit flags to pass to the function method.
*************** static const unsigned int function_does_
*** 460,502 ****
  static const unsigned int function_in_unique_section = 1 << 3;
  
  // Declare or define a function of FNTYPE.
! // NAME is the Go name of the function.  ASM_NAME, if not the empty
! // string, is the name that should be used in the symbol table; this
  // will be non-empty if a magic extern comment is used.  FLAGS is
  // bit flags described above.
! tree
! function (tree fntype, const std::string &name, const std::string &asm_name,
! 	  unsigned int flags, location_t);
  
  // Create a statement that runs all deferred calls for FUNCTION.  This should
  // be a statement that looks like this in C++:
  //   finish:
  //     try { DEFER_RETURN; } catch { CHECK_DEFER; goto finish; }
! tree
! function_defer_statement (tree function, tree undefer, tree check_defer,
! 			  location_t);
  
  // Record PARAM_VARS as the variables to use for the parameters of FUNCTION.
  // This will only be called for a function definition.  Returns true on
  // success, false on failure.
! bool
! function_set_parameters (tree function,
! 			 const std::vector<Bvariable *> &param_vars);
  
  // Utility.
  
  // Write the definitions for all TYPE_DECLS, CONSTANT_DECLS,
  // FUNCTION_DECLS, and VARIABLE_DECLS declared globally.
! void
! write_global_definitions (const std::vector<tree> &type_decls,
! 			  const std::vector<tree> &constant_decls,
! 			  const std::vector<tree> &function_decls,
! 			  const std::vector<Bvariable *> &variable_decls);
  
  // TODO: make static
  
! tree
! fill_in_fields (tree, const std::vector<typed_identifier> &, bool);
  
  tree fill_in_array (tree, tree, tree);
  
--- 424,461 ----
  static const unsigned int function_in_unique_section = 1 << 3;
  
  // Declare or define a function of FNTYPE.
! // NAME is the Go name of the function.  ASM_NAME, if not tl::nullopt,
! // is the name that should be used in the symbol table; this
  // will be non-empty if a magic extern comment is used.  FLAGS is
  // bit flags described above.
! tree function (tree fntype, GGC::Ident name, tl::optional<GGC::Ident> asm_name,
! 	       unsigned int flags, location_t);
  
  // Create a statement that runs all deferred calls for FUNCTION.  This should
  // be a statement that looks like this in C++:
  //   finish:
  //     try { DEFER_RETURN; } catch { CHECK_DEFER; goto finish; }
! tree function_defer_statement (tree function, tree undefer, tree check_defer,
! 			       location_t);
  
  // Record PARAM_VARS as the variables to use for the parameters of FUNCTION.
  // This will only be called for a function definition.  Returns true on
  // success, false on failure.
! bool function_set_parameters (tree function,
! 			      const std::vector<Bvariable *> &param_vars);
  
  // Utility.
  
  // Write the definitions for all TYPE_DECLS, CONSTANT_DECLS,
  // FUNCTION_DECLS, and VARIABLE_DECLS declared globally.
! void write_global_definitions (const std::vector<tree> &type_decls,
! 			       const std::vector<tree> &constant_decls,
! 			       const std::vector<tree> &function_decls,
! 			       const std::vector<Bvariable *> &variable_decls);
  
  // TODO: make static
  
! tree fill_in_fields (tree, const std::vector<typed_identifier> &, bool);
  
  tree fill_in_array (tree, tree, tree);
  
diff -Nrcpad gcc-16-20250803/gcc/rust/rust-diagnostics.cc gcc-16-20250810/gcc/rust/rust-diagnostics.cc
*** gcc-16-20250803/gcc/rust/rust-diagnostics.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/rust-diagnostics.cc	Sun Aug 10 22:32:08 2025
*************** expand_format (const char *fmt)
*** 48,74 ****
        c++;
        switch (*c)
  	{
! 	  case '\0': {
  	    // malformed format string
  	    rust_unreachable ();
  	  }
! 	  case '%': {
  	    ss << "%";
  	    break;
  	  }
! 	  case 'm': {
  	    ss << mformat_value ();
  	    break;
  	  }
! 	  case '<': {
  	    ss << rust_open_quote ();
  	    break;
  	  }
! 	  case '>': {
  	    ss << rust_close_quote ();
  	    break;
  	  }
! 	  case 'q': {
  	    ss << rust_open_quote ();
  	    c++;
  	    if (*c == 'm')
--- 48,80 ----
        c++;
        switch (*c)
  	{
! 	case '\0':
! 	  {
  	    // malformed format string
  	    rust_unreachable ();
  	  }
! 	case '%':
! 	  {
  	    ss << "%";
  	    break;
  	  }
! 	case 'm':
! 	  {
  	    ss << mformat_value ();
  	    break;
  	  }
! 	case '<':
! 	  {
  	    ss << rust_open_quote ();
  	    break;
  	  }
! 	case '>':
! 	  {
  	    ss << rust_close_quote ();
  	    break;
  	  }
! 	case 'q':
! 	  {
  	    ss << rust_open_quote ();
  	    c++;
  	    if (*c == 'm')
*************** expand_format (const char *fmt)
*** 82,88 ****
  	    ss << rust_close_quote ();
  	    break;
  	  }
! 	  default: {
  	    ss << "%" << *c;
  	  }
  	}
--- 88,95 ----
  	    ss << rust_close_quote ();
  	    break;
  	  }
! 	default:
! 	  {
  	    ss << "%" << *c;
  	  }
  	}
*************** expand_format (const char *fmt)
*** 104,111 ****
  // calling function must need to have attribute gnu_printf as well, even
  // though there is already an attribute declaration for it.
  
! static std::string
! expand_message (const char *fmt, va_list ap) RUST_ATTRIBUTE_GCC_DIAG (1, 0);
  
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wsuggest-attribute=format"
--- 111,118 ----
  // calling function must need to have attribute gnu_printf as well, even
  // though there is already an attribute declaration for it.
  
! static std::string expand_message (const char *fmt, va_list ap)
!   RUST_ATTRIBUTE_GCC_DIAG (1, 0);
  
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wsuggest-attribute=format"
*************** namespace Rust {
*** 420,443 ****
   */
  
  // simple location
! static Error
! va_constructor (Error::Kind kind, location_t locus, const char *fmt,
! 		va_list args) RUST_ATTRIBUTE_GCC_DIAG (3, 0);
  
  // simple location + error code
! static Error
! va_constructor (Error::Kind kind, location_t locus, const ErrorCode code,
! 		const char *fmt, va_list args) RUST_ATTRIBUTE_GCC_DIAG (4, 0);
  
  // rich location
! static Error
! va_constructor (Error::Kind kind, rich_location *r_locus, const char *fmt,
! 		va_list args) RUST_ATTRIBUTE_GCC_DIAG (3, 0);
  
  // rich location + error code
! static Error
! va_constructor (Error::Kind kind, rich_location *r_locus, const ErrorCode code,
! 		const char *fmt, va_list args) RUST_ATTRIBUTE_GCC_DIAG (4, 0);
  
  // simple location
  static Error
--- 427,450 ----
   */
  
  // simple location
! static Error va_constructor (Error::Kind kind, location_t locus,
! 			     const char *fmt, va_list args)
!   RUST_ATTRIBUTE_GCC_DIAG (3, 0);
  
  // simple location + error code
! static Error va_constructor (Error::Kind kind, location_t locus,
! 			     const ErrorCode code, const char *fmt,
! 			     va_list args) RUST_ATTRIBUTE_GCC_DIAG (4, 0);
  
  // rich location
! static Error va_constructor (Error::Kind kind, rich_location *r_locus,
! 			     const char *fmt, va_list args)
!   RUST_ATTRIBUTE_GCC_DIAG (3, 0);
  
  // rich location + error code
! static Error va_constructor (Error::Kind kind, rich_location *r_locus,
! 			     const ErrorCode code, const char *fmt,
! 			     va_list args) RUST_ATTRIBUTE_GCC_DIAG (4, 0);
  
  // simple location
  static Error
diff -Nrcpad gcc-16-20250803/gcc/rust/rust-diagnostics.h gcc-16-20250810/gcc/rust/rust-diagnostics.h
*** gcc-16-20250803/gcc/rust/rust-diagnostics.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/rust-diagnostics.h	Sun Aug 10 22:32:08 2025
***************
*** 31,37 ****
  #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)
  #define RUST_ATTRIBUTE_GCC_DIAG(m, n)                                          \
    __attribute__ ((__format__ (__gcc_tdiag__, m, n)))                           \
!     __attribute__ ((__nonnull__ (m)))
  #else
  #define RUST_ATTRIBUTE_GCC_DIAG(m, n)
  #endif
--- 31,37 ----
  #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)
  #define RUST_ATTRIBUTE_GCC_DIAG(m, n)                                          \
    __attribute__ ((__format__ (__gcc_tdiag__, m, n)))                           \
!   __attribute__ ((__nonnull__ (m)))
  #else
  #define RUST_ATTRIBUTE_GCC_DIAG(m, n)
  #endif
*************** rust_error_at(rich_location *richloc, co
*** 119,128 ****
  // These interfaces provide a way for the front end to ask for
  // the open/close quote characters it should use when formatting
  // diagnostics (warnings, errors).
! extern const char *
! rust_open_quote ();
! extern const char *
! rust_close_quote ();
  
  // These interfaces are used by utilities above to pass warnings and
  // errors (once format specifiers have been expanded) to the back end,
--- 119,126 ----
  // These interfaces provide a way for the front end to ask for
  // the open/close quote characters it should use when formatting
  // diagnostics (warnings, errors).
! extern const char *rust_open_quote ();
! extern const char *rust_close_quote ();
  
  // These interfaces are used by utilities above to pass warnings and
  // errors (once format specifiers have been expanded) to the back end,
*************** struct Error
*** 185,191 ****
    Error (Kind kind, location_t locus, std::string message)
      : kind (kind), locus (locus), message (std::move (message))
    {
!     message.shrink_to_fit ();
    }
    // simple location + error code
    Error (Kind kind, location_t locus, ErrorCode code, std::string message)
--- 183,189 ----
    Error (Kind kind, location_t locus, std::string message)
      : kind (kind), locus (locus), message (std::move (message))
    {
!     this->message.shrink_to_fit ();
    }
    // simple location + error code
    Error (Kind kind, location_t locus, ErrorCode code, std::string message)
*************** struct Error
*** 193,205 ****
        message (std::move (message))
    {
      is_errorcode = true;
!     message.shrink_to_fit ();
    }
    // rich location
    Error (Kind kind, rich_location *richlocus, std::string message)
      : kind (kind), richlocus (richlocus), message (std::move (message))
    {
!     message.shrink_to_fit ();
    }
    // rich location + error code
    Error (Kind kind, rich_location *richlocus, ErrorCode code,
--- 191,203 ----
        message (std::move (message))
    {
      is_errorcode = true;
!     this->message.shrink_to_fit ();
    }
    // rich location
    Error (Kind kind, rich_location *richlocus, std::string message)
      : kind (kind), richlocus (richlocus), message (std::move (message))
    {
!     this->message.shrink_to_fit ();
    }
    // rich location + error code
    Error (Kind kind, rich_location *richlocus, ErrorCode code,
*************** struct Error
*** 208,214 ****
        message (std::move (message))
    {
      is_errorcode = true;
!     message.shrink_to_fit ();
    }
    // simple location
    Error (location_t locus, std::string message)
--- 206,212 ----
        message (std::move (message))
    {
      is_errorcode = true;
!     this->message.shrink_to_fit ();
    }
    // simple location
    Error (location_t locus, std::string message)
*************** struct Error
*** 306,313 ****
  
  #define rust_sorry_at(location, ...) sorry_at (location, __VA_ARGS__)
  
! void
! rust_debug_loc (const location_t location, const char *fmt,
! 		...) ATTRIBUTE_PRINTF_2;
  
  #endif // !defined(RUST_DIAGNOSTICS_H)
--- 304,310 ----
  
  #define rust_sorry_at(location, ...) sorry_at (location, __VA_ARGS__)
  
! void rust_debug_loc (const location_t location, const char *fmt,
! 		     ...) ATTRIBUTE_PRINTF_2;
  
  #endif // !defined(RUST_DIAGNOSTICS_H)
diff -Nrcpad gcc-16-20250803/gcc/rust/rust-gcc.cc gcc-16-20250810/gcc/rust/rust-gcc.cc
*** gcc-16-20250803/gcc/rust/rust-gcc.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/rust-gcc.cc	Sun Aug 10 22:32:08 2025
*************** Bvariable::error_variable ()
*** 91,102 ****
  
  // A helper function to create a GCC identifier from a C++ string.
  
- static inline tree
- get_identifier_from_string (const std::string &str)
- {
-   return get_identifier_with_length (str.data (), str.length ());
- }
- 
  namespace Backend {
  
  // Define the built-in functions that are exposed to GCCRust.
--- 91,96 ----
*************** fill_in_fields (tree fill, const std::ve
*** 609,615 ****
    tree *pp = &field_trees;
    for (const auto &p : fields)
      {
!       tree name_tree = get_identifier_from_string (p.name);
        tree type_tree = p.type;
        if (error_operand_p (type_tree))
  	return error_mark_node;
--- 603,609 ----
    tree *pp = &field_trees;
    for (const auto &p : fields)
      {
!       tree name_tree = p.name.as_tree ();
        tree type_tree = p.type;
        if (error_operand_p (type_tree))
  	return error_mark_node;
*************** fill_in_array (tree fill, tree element_t
*** 675,681 ****
  // Return a named version of a type.
  
  tree
! named_type (const std::string &name, tree type, location_t location)
  {
    if (error_operand_p (type))
      return error_mark_node;
--- 669,675 ----
  // Return a named version of a type.
  
  tree
! named_type (GGC::Ident name, tree type, location_t location)
  {
    if (error_operand_p (type))
      return error_mark_node;
*************** named_type (const std::string &name, tre
*** 688,702 ****
  	  || TREE_CODE (type) == COMPLEX_TYPE
  	  || TREE_CODE (type) == BOOLEAN_TYPE))
      {
!       tree decl = build_decl (BUILTINS_LOCATION, TYPE_DECL,
! 			      get_identifier_from_string (name), type);
        TYPE_NAME (type) = decl;
        return type;
      }
  
    tree copy = build_variant_type_copy (type);
!   tree decl
!     = build_decl (location, TYPE_DECL, get_identifier_from_string (name), copy);
    DECL_ORIGINAL_TYPE (decl) = type;
    TYPE_NAME (copy) = decl;
    return copy;
--- 682,695 ----
  	  || TREE_CODE (type) == COMPLEX_TYPE
  	  || TREE_CODE (type) == BOOLEAN_TYPE))
      {
!       tree decl
! 	= build_decl (BUILTINS_LOCATION, TYPE_DECL, name.as_tree (), type);
        TYPE_NAME (type) = decl;
        return type;
      }
  
    tree copy = build_variant_type_copy (type);
!   tree decl = build_decl (location, TYPE_DECL, name.as_tree (), copy);
    DECL_ORIGINAL_TYPE (decl) = type;
    TYPE_NAME (copy) = decl;
    return copy;
*************** char_constant_expression (char c)
*** 825,830 ****
--- 818,829 ----
    return build_int_cst (char_type_node, c);
  }
  
+ tree
+ size_constant_expression (size_t val)
+ {
+   return size_int (val);
+ }
+ 
  // Make a constant boolean expression.
  
  tree
*************** array_index_expression (tree array_tree,
*** 1505,1510 ****
--- 1504,1537 ----
    return ret;
  }
  
+ // Return an expression representing SLICE[INDEX]
+ 
+ tree
+ slice_index_expression (tree slice_tree, tree index_tree, location_t location)
+ {
+   if (error_operand_p (slice_tree) || error_operand_p (index_tree))
+     return error_mark_node;
+ 
+   // A slice is created in TyTyResolvecompile::create_slice_type_record
+   // For example:
+   //   &[i32] is turned directly into a struct { i32* data, usize len };
+   //   [i32] is also turned into struct { i32* data, usize len }
+ 
+   // it should have RS_DST_FLAG set to 1
+   rust_assert (RS_DST_FLAG_P (TREE_TYPE (slice_tree)));
+ 
+   tree data_field = struct_field_expression (slice_tree, 0, location);
+   tree data_field_deref = build_fold_indirect_ref_loc (location, data_field);
+ 
+   tree element_type = TREE_TYPE (data_field_deref);
+   tree data_pointer = TREE_OPERAND (data_field_deref, 0);
+   rust_assert (POINTER_TYPE_P (TREE_TYPE (data_pointer)));
+   tree data_offset_expr
+     = Rust::pointer_offset_expression (data_pointer, index_tree, location);
+ 
+   return build1_loc (location, INDIRECT_REF, element_type, data_offset_expr);
+ }
+ 
  // Create an expression for a call to FN_EXPR with FN_ARGS.
  tree
  call_expression (tree fn, const std::vector<tree> &fn_args, tree chain_expr,
*************** non_zero_size_type (tree type)
*** 1876,1882 ****
  	}
        return rust_non_zero_struct;
  
!       case ARRAY_TYPE: {
  	tree element_type = non_zero_size_type (TREE_TYPE (type));
  	return build_array_type_nelts (element_type, 1);
        }
--- 1903,1910 ----
  	}
        return rust_non_zero_struct;
  
!     case ARRAY_TYPE:
!       {
  	tree element_type = non_zero_size_type (TREE_TYPE (type));
  	return build_array_type_nelts (element_type, 1);
        }
*************** convert_tree (tree type_tree, tree expr_
*** 1923,1931 ****
  // Make a global variable.
  
  Bvariable *
! global_variable (const std::string &var_name, const std::string &asm_name,
! 		 tree type_tree, bool is_external, bool is_hidden,
! 		 bool in_unique_section, location_t location)
  {
    if (error_operand_p (type_tree))
      return Bvariable::error_variable ();
--- 1951,1959 ----
  // Make a global variable.
  
  Bvariable *
! global_variable (GGC::Ident var_name, GGC::Ident asm_name, tree type_tree,
! 		 bool is_external, bool is_hidden, bool in_unique_section,
! 		 location_t location)
  {
    if (error_operand_p (type_tree))
      return Bvariable::error_variable ();
*************** global_variable (const std::string &var_
*** 1935,1942 ****
    if ((is_external || !is_hidden) && int_size_in_bytes (type_tree) == 0)
      type_tree = non_zero_size_type (type_tree);
  
!   tree decl = build_decl (location, VAR_DECL,
! 			  get_identifier_from_string (var_name), type_tree);
    if (is_external)
      DECL_EXTERNAL (decl) = 1;
    else
--- 1963,1969 ----
    if ((is_external || !is_hidden) && int_size_in_bytes (type_tree) == 0)
      type_tree = non_zero_size_type (type_tree);
  
!   tree decl = build_decl (location, VAR_DECL, var_name.as_tree (), type_tree);
    if (is_external)
      DECL_EXTERNAL (decl) = 1;
    else
*************** global_variable (const std::string &var_
*** 1944,1954 ****
    if (!is_hidden)
      {
        TREE_PUBLIC (decl) = 1;
!       SET_DECL_ASSEMBLER_NAME (decl, get_identifier_from_string (asm_name));
      }
    else
      {
!       SET_DECL_ASSEMBLER_NAME (decl, get_identifier_from_string (asm_name));
      }
  
    TREE_USED (decl) = 1;
--- 1971,1981 ----
    if (!is_hidden)
      {
        TREE_PUBLIC (decl) = 1;
!       SET_DECL_ASSEMBLER_NAME (decl, asm_name.as_tree ());
      }
    else
      {
!       SET_DECL_ASSEMBLER_NAME (decl, asm_name.as_tree ());
      }
  
    TREE_USED (decl) = 1;
*************** global_variable_set_init (Bvariable *var
*** 1988,2000 ****
  // Make a local variable.
  
  Bvariable *
! local_variable (tree function, const std::string &name, tree type_tree,
  		Bvariable *decl_var, location_t location)
  {
    if (error_operand_p (type_tree))
      return Bvariable::error_variable ();
!   tree decl = build_decl (location, VAR_DECL, get_identifier_from_string (name),
! 			  type_tree);
    DECL_CONTEXT (decl) = function;
  
    if (decl_var != NULL)
--- 2015,2026 ----
  // Make a local variable.
  
  Bvariable *
! local_variable (tree function, GGC::Ident name, tree type_tree,
  		Bvariable *decl_var, location_t location)
  {
    if (error_operand_p (type_tree))
      return Bvariable::error_variable ();
!   tree decl = build_decl (location, VAR_DECL, name.as_tree (), type_tree);
    DECL_CONTEXT (decl) = function;
  
    if (decl_var != NULL)
*************** local_variable (tree function, const std
*** 2009,2021 ****
  // Make a function parameter variable.
  
  Bvariable *
! parameter_variable (tree function, const std::string &name, tree type_tree,
  		    location_t location)
  {
    if (error_operand_p (type_tree))
      return Bvariable::error_variable ();
!   tree decl = build_decl (location, PARM_DECL,
! 			  get_identifier_from_string (name), type_tree);
    DECL_CONTEXT (decl) = function;
    DECL_ARG_TYPE (decl) = type_tree;
  
--- 2035,2046 ----
  // Make a function parameter variable.
  
  Bvariable *
! parameter_variable (tree function, GGC::Ident name, tree type_tree,
  		    location_t location)
  {
    if (error_operand_p (type_tree))
      return Bvariable::error_variable ();
!   tree decl = build_decl (location, PARM_DECL, name.as_tree (), type_tree);
    DECL_CONTEXT (decl) = function;
    DECL_ARG_TYPE (decl) = type_tree;
  
*************** parameter_variable (tree function, const
*** 2026,2038 ****
  // Make a static chain variable.
  
  Bvariable *
! static_chain_variable (tree fndecl, const std::string &name, tree type_tree,
  		       location_t location)
  {
    if (error_operand_p (type_tree))
      return Bvariable::error_variable ();
!   tree decl = build_decl (location, PARM_DECL,
! 			  get_identifier_from_string (name), type_tree);
    DECL_CONTEXT (decl) = fndecl;
    DECL_ARG_TYPE (decl) = type_tree;
    TREE_USED (decl) = 1;
--- 2051,2062 ----
  // Make a static chain variable.
  
  Bvariable *
! static_chain_variable (tree fndecl, GGC::Ident name, tree type_tree,
  		       location_t location)
  {
    if (error_operand_p (type_tree))
      return Bvariable::error_variable ();
!   tree decl = build_decl (location, PARM_DECL, name.as_tree (), type_tree);
    DECL_CONTEXT (decl) = fndecl;
    DECL_ARG_TYPE (decl) = type_tree;
    TREE_USED (decl) = 1;
*************** temporary_variable (tree fndecl, tree bi
*** 2123,2132 ****
  // Make a label.
  
  tree
! label (tree func_tree, const std::string &name, location_t location)
  {
    tree decl;
!   if (name.empty ())
      {
        if (DECL_STRUCT_FUNCTION (func_tree) == NULL)
  	push_struct_function (func_tree);
--- 2147,2156 ----
  // Make a label.
  
  tree
! label (tree func_tree, tl::optional<GGC::Ident> name, location_t location)
  {
    tree decl;
!   if (!name.has_value ())
      {
        if (DECL_STRUCT_FUNCTION (func_tree) == NULL)
  	push_struct_function (func_tree);
*************** label (tree func_tree, const std::string
*** 2139,2145 ****
      }
    else
      {
!       tree id = get_identifier_from_string (name);
        decl = build_decl (location, LABEL_DECL, id, void_type_node);
        DECL_CONTEXT (decl) = func_tree;
      }
--- 2163,2169 ----
      }
    else
      {
!       tree id = name->as_tree ();
        decl = build_decl (location, LABEL_DECL, id, void_type_node);
        DECL_CONTEXT (decl) = func_tree;
      }
*************** label_address (tree label, location_t lo
*** 2178,2184 ****
  // Declare or define a new function.
  
  tree
! function (tree functype, const std::string &name, const std::string &asm_name,
  	  unsigned int flags, location_t location)
  {
    if (error_operand_p (functype))
--- 2202,2208 ----
  // Declare or define a new function.
  
  tree
! function (tree functype, GGC::Ident name, tl::optional<GGC::Ident> asm_name,
  	  unsigned int flags, location_t location)
  {
    if (error_operand_p (functype))
*************** function (tree functype, const std::stri
*** 2186,2198 ****
  
    gcc_assert (FUNCTION_POINTER_TYPE_P (functype));
    functype = TREE_TYPE (functype);
!   tree id = get_identifier_from_string (name);
    if (error_operand_p (id))
      return error_mark_node;
  
    tree decl = build_decl (location, FUNCTION_DECL, id, functype);
!   if (!asm_name.empty ())
!     SET_DECL_ASSEMBLER_NAME (decl, get_identifier_from_string (asm_name));
  
    if ((flags & function_is_declaration) != 0)
      DECL_EXTERNAL (decl) = 1;
--- 2210,2222 ----
  
    gcc_assert (FUNCTION_POINTER_TYPE_P (functype));
    functype = TREE_TYPE (functype);
!   tree id = name.as_tree ();
    if (error_operand_p (id))
      return error_mark_node;
  
    tree decl = build_decl (location, FUNCTION_DECL, id, functype);
!   if (asm_name.has_value ())
!     SET_DECL_ASSEMBLER_NAME (decl, asm_name->as_tree ());
  
    if ((flags & function_is_declaration) != 0)
      DECL_EXTERNAL (decl) = 1;
*************** function_defer_statement (tree function,
*** 2235,2241 ****
      push_cfun (DECL_STRUCT_FUNCTION (function));
  
    tree stmt_list = NULL;
!   tree label = Backend::label (function, "", location);
    tree label_def = label_definition_statement (label);
    append_to_statement_list (label_def, &stmt_list);
  
--- 2259,2265 ----
      push_cfun (DECL_STRUCT_FUNCTION (function));
  
    tree stmt_list = NULL;
!   tree label = Backend::label (function, tl::nullopt, location);
    tree label_def = label_definition_statement (label);
    append_to_statement_list (label_def, &stmt_list);
  
*************** write_global_definitions (const std::vec
*** 2342,2345 ****
--- 2366,2395 ----
    delete[] defs;
  }
  
+ tree
+ lookup_field (const_tree type, tree component)
+ {
+   tree field;
+ 
+   for (field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field))
+     {
+       if (DECL_NAME (field) == NULL_TREE
+ 	  && RECORD_OR_UNION_TYPE_P (TREE_TYPE (field)))
+ 	{
+ 	  tree anon = lookup_field (TREE_TYPE (field), component);
+ 
+ 	  if (anon)
+ 	    return tree_cons (NULL_TREE, field, anon);
+ 	}
+ 
+       if (DECL_NAME (field) == component)
+ 	break;
+     }
+ 
+   if (field == NULL_TREE)
+     return NULL_TREE;
+ 
+   return tree_cons (NULL_TREE, field, NULL_TREE);
+ }
+ 
  } // namespace Backend
diff -Nrcpad gcc-16-20250803/gcc/rust/rust-lang.cc gcc-16-20250810/gcc/rust/rust-lang.cc
*** gcc-16-20250803/gcc/rust/rust-lang.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/rust-lang.cc	Sun Aug 10 22:32:08 2025
***************
*** 51,60 ****
  // FIXME: test saving intellisense
  #include "options.h"
  
! // version check to stop compiling if c++ isn't c++11 or higher
! #if __cplusplus < 201103
  #error                                                                         \
!   "GCC Rust frontend requires C++11 or higher. You can compile the g++ frontend first and then compile the Rust frontend using that."
  #endif
  // TODO: is this best way to do it? Is it allowed? (should be)
  
--- 51,60 ----
  // FIXME: test saving intellisense
  #include "options.h"
  
! // version check to stop compiling if c++ isn't c++14 or higher
! #if __cplusplus < 201402
  #error                                                                         \
!   "GCC Rust frontend requires C++14 or higher. You can compile the g++ frontend first and then compile the Rust frontend using that."
  #endif
  // TODO: is this best way to do it? Is it allowed? (should be)
  
*************** rust_localize_identifier (const char *id
*** 373,379 ****
    return identifier_to_locale (ident);
  }
  
! extern const attribute_spec grs_langhook_common_attribute_table[];
  
  /* The language hooks data structure. This is the main interface between the GCC
   * front-end and the GCC middle-end/back-end. A list of language hooks could be
--- 373,385 ----
    return identifier_to_locale (ident);
  }
  
! extern const struct scoped_attribute_specs grs_langhook_gnu_attribute_table;
! extern const struct scoped_attribute_specs grs_langhook_common_attribute_table;
! 
! const scoped_attribute_specs *const grs_langhook_attribute_table[] = {
!   &grs_langhook_gnu_attribute_table,
!   &grs_langhook_common_attribute_table,
! };
  
  /* The language hooks data structure. This is the main interface between the GCC
   * front-end and the GCC middle-end/back-end. A list of language hooks could be
*************** extern const attribute_spec grs_langhook
*** 394,401 ****
  #undef LANG_HOOKS_WRITE_GLOBALS
  #undef LANG_HOOKS_GIMPLIFY_EXPR
  #undef LANG_HOOKS_EH_PERSONALITY
! 
! #undef LANG_HOOKS_COMMON_ATTRIBUTE_TABLE
  
  #define LANG_HOOKS_NAME "GNU Rust"
  #define LANG_HOOKS_INIT grs_langhook_init
--- 400,406 ----
  #undef LANG_HOOKS_WRITE_GLOBALS
  #undef LANG_HOOKS_GIMPLIFY_EXPR
  #undef LANG_HOOKS_EH_PERSONALITY
! #undef LANG_HOOKS_ATTRIBUTE_TABLE
  
  #define LANG_HOOKS_NAME "GNU Rust"
  #define LANG_HOOKS_INIT grs_langhook_init
*************** extern const attribute_spec grs_langhook
*** 417,423 ****
  #define LANG_HOOKS_GIMPLIFY_EXPR grs_langhook_gimplify_expr
  #define LANG_HOOKS_EH_PERSONALITY grs_langhook_eh_personality
  
! #define LANG_HOOKS_COMMON_ATTRIBUTE_TABLE grs_langhook_common_attribute_table
  
  #if CHECKING_P
  
--- 422,428 ----
  #define LANG_HOOKS_GIMPLIFY_EXPR grs_langhook_gimplify_expr
  #define LANG_HOOKS_EH_PERSONALITY grs_langhook_eh_personality
  
! #define LANG_HOOKS_ATTRIBUTE_TABLE grs_langhook_attribute_table
  
  #if CHECKING_P
  
diff -Nrcpad gcc-16-20250803/gcc/rust/rust-object-export.h gcc-16-20250810/gcc/rust/rust-object-export.h
*** gcc-16-20250803/gcc/rust/rust-object-export.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/rust-object-export.h	Sun Aug 10 22:32:08 2025
***************
*** 21,33 ****
  
  #include "rust-system.h"
  
! extern unsigned int
! rust_field_alignment (tree t);
  
! extern const char *
! rust_read_export_data (int fd, off_t offset, char **pbuf, size_t *plen,
! 		       int *perr);
! extern void
! rust_write_export_data (const char *bytes, unsigned int size);
  
  #endif // RUST_OBJECT_EXPORT_H
--- 21,30 ----
  
  #include "rust-system.h"
  
! extern unsigned int rust_field_alignment (tree t);
  
! extern const char *rust_read_export_data (int fd, off_t offset, char **pbuf,
! 					  size_t *plen, int *perr);
! extern void rust_write_export_data (const char *bytes, unsigned int size);
  
  #endif // RUST_OBJECT_EXPORT_H
diff -Nrcpad gcc-16-20250803/gcc/rust/rust-session-manager.cc gcc-16-20250810/gcc/rust/rust-session-manager.cc
*** gcc-16-20250803/gcc/rust/rust-session-manager.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/rust-session-manager.cc	Sun Aug 10 22:32:08 2025
***************
*** 20,26 ****
--- 20,28 ----
  #include "rust-collect-lang-items.h"
  #include "rust-desugar-for-loops.h"
  #include "rust-desugar-question-mark.h"
+ #include "rust-desugar-apit.h"
  #include "rust-diagnostics.h"
+ #include "rust-expression-yeast.h"
  #include "rust-hir-pattern-analysis.h"
  #include "rust-immutable-name-resolution-context.h"
  #include "rust-unsafe-checker.h"
***************
*** 61,71 ****
  #include "tm.h"
  #include "rust-target.h"
  
! extern bool
! saw_errors (void);
  
! extern Linemap *
! rust_get_linemap ();
  
  namespace Rust {
  
--- 63,71 ----
  #include "tm.h"
  #include "rust-target.h"
  
! extern bool saw_errors (void);
  
! extern Linemap *rust_get_linemap ();
  
  namespace Rust {
  
*************** validate_crate_name (const std::string &
*** 150,158 ****
      {
        if (!(is_alphabetic (c.value) || is_numeric (c.value) || c.value == '_'))
  	{
! 	  error = Error (UNDEF_LOCATION,
! 			 "invalid character %qs in crate name: %qs",
! 			 c.as_string ().c_str (), crate_name.c_str ());
  	  return false;
  	}
      }
--- 150,158 ----
      {
        if (!(is_alphabetic (c.value) || is_numeric (c.value) || c.value == '_'))
  	{
! 	  error
! 	    = Error (UNDEF_LOCATION, "invalid character %qs in crate name: %qs",
! 		     c.as_string ().c_str (), crate_name.c_str ());
  	  return false;
  	}
      }
*************** Session::handle_option (
*** 203,216 ****
    switch (code)
      {
      case OPT_I:
!       case OPT_L: {
  	// TODO: add search path
  	const std::string p = std::string (arg);
  	add_search_path (p);
        }
        break;
  
!       case OPT_frust_extern_: {
  	std::string input (arg);
  	ret = handle_extern_option (input);
        }
--- 203,218 ----
    switch (code)
      {
      case OPT_I:
!     case OPT_L:
!       {
  	// TODO: add search path
  	const std::string p = std::string (arg);
  	add_search_path (p);
        }
        break;
  
!     case OPT_frust_extern_:
!       {
  	std::string input (arg);
  	ret = handle_extern_option (input);
        }
*************** Session::handle_option (
*** 251,257 ****
        Compile::Mangler::set_mangling (flag_rust_mangling);
        break;
  
!       case OPT_frust_cfg_: {
  	auto string_arg = std::string (arg);
  	ret = handle_cfg_option (string_arg);
  	break;
--- 253,260 ----
        Compile::Mangler::set_mangling (flag_rust_mangling);
        break;
  
!     case OPT_frust_cfg_:
!       {
  	auto string_arg = std::string (arg);
  	ret = handle_cfg_option (string_arg);
  	break;
*************** Session::compile_crate (const char *file
*** 617,625 ****
  
    expansion (parsed_crate, name_resolution_ctx);
  
-   AST::DesugarForLoops ().go (parsed_crate);
-   AST::DesugarQuestionMark ().go (parsed_crate);
- 
    rust_debug ("\033[0;31mSUCCESSFULLY FINISHED EXPANSION \033[0m");
    if (options.dump_option_enabled (CompileOptions::EXPANSION_DUMP))
      {
--- 620,625 ----
*************** Session::compile_crate (const char *file
*** 682,687 ****
--- 682,688 ----
    Resolver2_0::ImmutableNameResolutionContext::init (name_resolution_ctx);
  
    // type resolve
+   Compile::Context *ctx = Compile::Context::get ();
    Resolver::TypeResolution::Resolve (hir);
  
    Resolver::TypeCheckContext::get ()->get_variance_analysis_ctx ().solve ();
*************** Session::compile_crate (const char *file
*** 729,744 ****
      return;
  
    // do compile to gcc generic
!   Compile::Context ctx;
!   Compile::CompileCrate::Compile (hir, &ctx);
  
    // we can't do static analysis if there are errors to worry about
    if (!saw_errors ())
      {
        // lints
        Analysis::ScanDeadcode::Scan (hir);
!       Analysis::UnusedVariables::Lint (ctx);
!       Analysis::ReadonlyCheck::Lint (ctx);
  
        // metadata
        bool specified_emit_metadata
--- 730,744 ----
      return;
  
    // do compile to gcc generic
!   Compile::CompileCrate::Compile (hir, ctx);
  
    // we can't do static analysis if there are errors to worry about
    if (!saw_errors ())
      {
        // lints
        Analysis::ScanDeadcode::Scan (hir);
!       Analysis::UnusedVariables::Lint (*ctx);
!       Analysis::ReadonlyCheck::Lint (*ctx);
  
        // metadata
        bool specified_emit_metadata
*************** Session::compile_crate (const char *file
*** 759,765 ****
      }
  
    // pass to GCC middle-end
!   ctx.write_to_backend ();
  }
  
  void
--- 759,765 ----
      }
  
    // pass to GCC middle-end
!   ctx->write_to_backend ();
  }
  
  void
*************** Session::expansion (AST::Crate &crate, R
*** 983,988 ****
--- 983,1002 ----
        rust_error_at (range, "reached recursion limit");
      }
  
+   // handle AST desugaring
+   if (!saw_errors ())
+     {
+       AST::ExpressionYeast ().go (crate);
+ 
+       AST::DesugarApit ().go (crate);
+ 
+       // HACK: we may need a final TopLevel pass
+       // however, this should not count towards the recursion limit
+       // and we don't need a full Early pass
+       if (flag_name_resolution_2_0)
+ 	Resolver2_0::TopLevel (ctx).go (crate);
+     }
+ 
    // error reporting - check unused macros, get missing fragment specifiers
  
    // build test harness
*************** Session::load_extern_crate (const std::s
*** 1108,1115 ****
    if (stream == NULL	       // No stream and
        && proc_macros.empty ()) // no proc macros
      {
!       rust_error_at (locus, "failed to locate crate %qs",
! 		     import_name.c_str ());
        return UNKNOWN_NODEID;
      }
  
--- 1122,1128 ----
    if (stream == NULL	       // No stream and
        && proc_macros.empty ()) // no proc macros
      {
!       rust_error_at (locus, "failed to locate crate %qs", import_name.c_str ());
        return UNKNOWN_NODEID;
      }
  
*************** Session::load_extern_crate (const std::s
*** 1177,1192 ****
    mappings.insert_bang_proc_macros (crate_num, bang_macros);
    mappings.insert_derive_proc_macros (crate_num, derive_macros);
  
!   // name resolve it
!   Resolver::NameResolution::Resolve (parsed_crate);
! 
!   // perform hir lowering
!   std::unique_ptr<HIR::Crate> lowered
!     = HIR::ASTLowering::Resolve (parsed_crate);
!   HIR::Crate &hir = mappings.insert_hir_crate (std::move (lowered));
! 
!   // perform type resolution
!   Resolver::TypeResolution::Resolve (hir);
  
    // always restore the crate_num
    mappings.set_current_crate (saved_crate_num);
--- 1190,1202 ----
    mappings.insert_bang_proc_macros (crate_num, bang_macros);
    mappings.insert_derive_proc_macros (crate_num, derive_macros);
  
!   // if flag_name_resolution_2_0 is enabled
!   // then we perform resolution later
!   if (!flag_name_resolution_2_0)
!     {
!       // name resolve it
!       Resolver::NameResolution::Resolve (parsed_crate);
!     }
  
    // always restore the crate_num
    mappings.set_current_crate (saved_crate_num);
diff -Nrcpad gcc-16-20250803/gcc/rust/rust-session-manager.h gcc-16-20250810/gcc/rust/rust-session-manager.h
*** gcc-16-20250803/gcc/rust/rust-session-manager.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/rust-session-manager.h	Sun Aug 10 22:32:08 2025
*************** private:
*** 441,448 ****
  
  #if CHECKING_P
  namespace selftest {
! extern void
! rust_crate_name_validation_test (void);
  }
  #endif // CHECKING_P
  
--- 441,447 ----
  
  #if CHECKING_P
  namespace selftest {
! extern void rust_crate_name_validation_test (void);
  }
  #endif // CHECKING_P
  
diff -Nrcpad gcc-16-20250803/gcc/rust/rust-system.h gcc-16-20250810/gcc/rust/rust-system.h
*** gcc-16-20250803/gcc/rust/rust-system.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/rust-system.h	Sun Aug 10 22:32:08 2025
*************** constexpr static const char *file_separa
*** 88,97 ****
   */
  #define rust_unreachable() (fancy_abort (__FILE__, __LINE__, __FUNCTION__))
  
! extern void
! rust_preserve_from_gc (tree t);
  
! extern const char *
! rust_localize_identifier (const char *ident);
  
  #endif // !defined(RUST_SYSTEM_H)
--- 88,95 ----
   */
  #define rust_unreachable() (fancy_abort (__FILE__, __LINE__, __FUNCTION__))
  
! extern void rust_preserve_from_gc (tree t);
  
! extern const char *rust_localize_identifier (const char *ident);
  
  #endif // !defined(RUST_SYSTEM_H)
diff -Nrcpad gcc-16-20250803/gcc/rust/rust-target.h gcc-16-20250810/gcc/rust/rust-target.h
*** gcc-16-20250803/gcc/rust/rust-target.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/rust-target.h	Sun Aug 10 22:32:08 2025
***************
*** 26,33 ****
  #include "rust-target.def"
  
  /* Used by target to add target-related info.  */
! extern void
! rust_add_target_info (const char *, const char *);
  
  /* Each target can provide their own.  */
  extern struct gcc_targetrustm targetrustm;
--- 26,32 ----
  #include "rust-target.def"
  
  /* Used by target to add target-related info.  */
! extern void rust_add_target_info (const char *, const char *);
  
  /* Each target can provide their own.  */
  extern struct gcc_targetrustm targetrustm;
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-autoderef.cc gcc-16-20250810/gcc/rust/typecheck/rust-autoderef.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-autoderef.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-autoderef.cc	Sun Aug 10 22:32:08 2025
***************
*** 26,33 ****
  namespace Rust {
  namespace Resolver {
  
! static bool
! resolve_operator_overload_fn (
    LangItem::Kind lang_item_type, TyTy::BaseType *ty, TyTy::FnType **resolved_fn,
    Adjustment::AdjustmentType *requires_ref_adjustment);
  
--- 26,32 ----
  namespace Rust {
  namespace Resolver {
  
! static bool resolve_operator_overload_fn (
    LangItem::Kind lang_item_type, TyTy::BaseType *ty, TyTy::FnType **resolved_fn,
    Adjustment::AdjustmentType *requires_ref_adjustment);
  
*************** resolve_operator_overload_fn (
*** 248,254 ****
  	  const TyTy::ADTType *adt = static_cast<const TyTy::ADTType *> (lhs);
  
  	  auto s = fn->get_self_type ()->get_root ();
- 	  rust_assert (s->can_eq (adt, false));
  	  rust_assert (s->get_kind () == TyTy::TypeKind::ADT);
  	  const TyTy::ADTType *self_adt
  	    = static_cast<const TyTy::ADTType *> (s);
--- 247,252 ----
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-casts.cc gcc-16-20250810/gcc/rust/typecheck/rust-casts.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-casts.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-casts.cc	Sun Aug 10 22:32:08 2025
***************
*** 17,22 ****
--- 17,23 ----
  // <http://www.gnu.org/licenses/>.
  
  #include "rust-casts.h"
+ #include "rust-tyty-util.h"
  
  namespace Rust {
  namespace Resolver {
*************** TypeCastRules::TypeCastRules (location_t
*** 28,42 ****
  
  TypeCoercionRules::CoercionResult
  TypeCastRules::resolve (location_t locus, TyTy::TyWithLocation from,
! 			TyTy::TyWithLocation to)
  {
    TypeCastRules cast_rules (locus, from, to);
!   return cast_rules.check ();
  }
  
  TypeCoercionRules::CoercionResult
! TypeCastRules::check ()
  {
    // https://github.com/rust-lang/rust/blob/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/compiler/rustc_typeck/src/check/cast.rs#L565-L582
    auto possible_coercion
      = TypeCoercionRules::TryCoerce (from.get_ty (), to.get_ty (), locus,
--- 29,48 ----
  
  TypeCoercionRules::CoercionResult
  TypeCastRules::resolve (location_t locus, TyTy::TyWithLocation from,
! 			TyTy::TyWithLocation to, bool emit_error)
  {
    TypeCastRules cast_rules (locus, from, to);
!   return cast_rules.check (emit_error);
  }
  
  TypeCoercionRules::CoercionResult
! TypeCastRules::check (bool emit_error)
  {
+   // try the simple cast rules
+   auto simple_cast = cast_rules ();
+   if (!simple_cast.is_error ())
+     return simple_cast;
+ 
    // https://github.com/rust-lang/rust/blob/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/compiler/rustc_typeck/src/check/cast.rs#L565-L582
    auto possible_coercion
      = TypeCoercionRules::TryCoerce (from.get_ty (), to.get_ty (), locus,
*************** TypeCastRules::check ()
*** 51,63 ****
  					true /*is_cast_site*/);
      }
  
!   // try the simple cast rules
!   auto simple_cast = cast_rules ();
!   if (!simple_cast.is_error ())
!     return simple_cast;
  
-   // failed to cast
-   emit_cast_error ();
    return TypeCoercionRules::CoercionResult::get_error ();
  }
  
--- 57,65 ----
  					true /*is_cast_site*/);
      }
  
!   if (emit_error)
!     TypeCastRules::emit_cast_error (locus, from, to);
  
    return TypeCoercionRules::CoercionResult::get_error ();
  }
  
*************** TypeCastRules::cast_rules ()
*** 73,79 ****
  	      to.get_ty ()->debug_str ().c_str ());
    switch (from_type->get_kind ())
      {
!       case TyTy::TypeKind::INFER: {
  	TyTy::InferType *from_infer
  	  = static_cast<TyTy::InferType *> (from_type);
  	switch (from_infer->get_infer_kind ())
--- 75,82 ----
  	      to.get_ty ()->debug_str ().c_str ());
    switch (from_type->get_kind ())
      {
!     case TyTy::TypeKind::INFER:
!       {
  	TyTy::InferType *from_infer
  	  = static_cast<TyTy::InferType *> (from_type);
  	switch (from_infer->get_infer_kind ())
*************** TypeCastRules::cast_rules ()
*** 85,91 ****
  	  case TyTy::InferType::InferTypeKind::INTEGRAL:
  	    switch (to.get_ty ()->get_kind ())
  	      {
! 		case TyTy::TypeKind::CHAR: {
  		  // only u8 and char
  		  bool was_uint
  		    = from.get_ty ()->get_kind () == TyTy::TypeKind::UINT;
--- 88,95 ----
  	  case TyTy::InferType::InferTypeKind::INTEGRAL:
  	    switch (to.get_ty ()->get_kind ())
  	      {
! 	      case TyTy::TypeKind::CHAR:
! 		{
  		  // only u8 and char
  		  bool was_uint
  		    = from.get_ty ()->get_kind () == TyTy::TypeKind::UINT;
*************** TypeCastRules::cast_rules ()
*** 108,114 ****
  		return TypeCoercionRules::CoercionResult{
  		  {}, to.get_ty ()->clone ()};
  
! 		case TyTy::TypeKind::INFER: {
  		  TyTy::InferType *to_infer
  		    = static_cast<TyTy::InferType *> (to.get_ty ());
  
--- 112,119 ----
  		return TypeCoercionRules::CoercionResult{
  		  {}, to.get_ty ()->clone ()};
  
! 	      case TyTy::TypeKind::INFER:
! 		{
  		  TyTy::InferType *to_infer
  		    = static_cast<TyTy::InferType *> (to.get_ty ());
  
*************** TypeCastRules::cast_rules ()
*** 140,146 ****
  		return TypeCoercionRules::CoercionResult{
  		  {}, to.get_ty ()->clone ()};
  
! 		case TyTy::TypeKind::INFER: {
  		  TyTy::InferType *to_infer
  		    = static_cast<TyTy::InferType *> (to.get_ty ());
  
--- 145,152 ----
  		return TypeCoercionRules::CoercionResult{
  		  {}, to.get_ty ()->clone ()};
  
! 	      case TyTy::TypeKind::INFER:
! 		{
  		  TyTy::InferType *to_infer
  		    = static_cast<TyTy::InferType *> (to.get_ty ());
  
*************** TypeCastRules::cast_rules ()
*** 187,193 ****
      case TyTy::TypeKind::INT:
        switch (to.get_ty ()->get_kind ())
  	{
! 	  case TyTy::TypeKind::CHAR: {
  	    // only u8 and char
  	    bool was_uint = from.get_ty ()->get_kind () == TyTy::TypeKind::UINT;
  	    bool was_u8 = was_uint
--- 193,200 ----
      case TyTy::TypeKind::INT:
        switch (to.get_ty ()->get_kind ())
  	{
! 	case TyTy::TypeKind::CHAR:
! 	  {
  	    // only u8 and char
  	    bool was_uint = from.get_ty ()->get_kind () == TyTy::TypeKind::UINT;
  	    bool was_u8 = was_uint
*************** TypeCastRules::cast_rules ()
*** 200,206 ****
  	  }
  	  break;
  
! 	  case TyTy::TypeKind::FLOAT: {
  	    // can only do this for number types not char
  	    bool from_char
  	      = from.get_ty ()->get_kind () == TyTy::TypeKind::CHAR;
--- 207,214 ----
  	  }
  	  break;
  
! 	case TyTy::TypeKind::FLOAT:
! 	  {
  	    // can only do this for number types not char
  	    bool from_char
  	      = from.get_ty ()->get_kind () == TyTy::TypeKind::CHAR;
*************** TypeCastRules::cast_rules ()
*** 210,216 ****
  	  }
  	  break;
  
! 	  case TyTy::TypeKind::POINTER: {
  	    // char can't be casted as a ptr
  	    bool from_char
  	      = from.get_ty ()->get_kind () == TyTy::TypeKind::CHAR;
--- 218,225 ----
  	  }
  	  break;
  
! 	case TyTy::TypeKind::POINTER:
! 	  {
  	    // char can't be casted as a ptr
  	    bool from_char
  	      = from.get_ty ()->get_kind () == TyTy::TypeKind::CHAR;
*************** TypeCastRules::cast_rules ()
*** 244,250 ****
  	case TyTy::TypeKind::FLOAT:
  	  return TypeCoercionRules::CoercionResult{{}, to.get_ty ()->clone ()};
  
! 	  case TyTy::TypeKind::INFER: {
  	    TyTy::InferType *to_infer
  	      = static_cast<TyTy::InferType *> (to.get_ty ());
  
--- 253,260 ----
  	case TyTy::TypeKind::FLOAT:
  	  return TypeCoercionRules::CoercionResult{{}, to.get_ty ()->clone ()};
  
! 	case TyTy::TypeKind::INFER:
! 	  {
  	    TyTy::InferType *to_infer
  	      = static_cast<TyTy::InferType *> (to.get_ty ());
  
*************** TypeCastRules::cast_rules ()
*** 273,279 ****
  	case TyTy::TypeKind::USIZE:
  	case TyTy::TypeKind::ISIZE:
  	case TyTy::TypeKind::UINT:
! 	  case TyTy::TypeKind::INT: {
  	    // refs should not cast to numeric type
  	    bool from_ptr
  	      = from.get_ty ()->get_kind () == TyTy::TypeKind::POINTER;
--- 283,290 ----
  	case TyTy::TypeKind::USIZE:
  	case TyTy::TypeKind::ISIZE:
  	case TyTy::TypeKind::UINT:
! 	case TyTy::TypeKind::INT:
! 	  {
  	    // refs should not cast to numeric type
  	    bool from_ptr
  	      = from.get_ty ()->get_kind () == TyTy::TypeKind::POINTER;
*************** TypeCastRules::check_ptr_ptr_cast ()
*** 320,326 ****
      }
    else if (from_is_ref && to_is_ref)
      {
!       // mutability must be coercedable
        TyTy::ReferenceType &f
  	= static_cast<TyTy::ReferenceType &> (*from.get_ty ());
        TyTy::ReferenceType &t
--- 331,357 ----
      }
    else if (from_is_ref && to_is_ref)
      {
!       const auto &from_ref = *from.get_ty ()->as<TyTy::ReferenceType> ();
!       const auto &to_ref = *to.get_ty ()->as<TyTy::ReferenceType> ();
! 
!       if (from_ref.is_dyn_object () != to_ref.is_dyn_object ())
! 	{
! 	  // this needs to be handled by coercion logic
! 	  return TypeCoercionRules::CoercionResult::get_error ();
! 	}
! 
!       // are the underlying types safely simple castable?
!       const auto to_underly = to_ref.get_base ();
!       const auto from_underly = from_ref.get_base ();
!       auto res = resolve (locus, TyTy::TyWithLocation (from_underly),
! 			  TyTy::TyWithLocation (to_underly), false);
!       if (res.is_error ())
! 	{
! 	  // this needs to be handled by coercion logic
! 	  return TypeCoercionRules::CoercionResult::get_error ();
! 	}
! 
!       // mutability must be coerceable
        TyTy::ReferenceType &f
  	= static_cast<TyTy::ReferenceType &> (*from.get_ty ());
        TyTy::ReferenceType &t
*************** TypeCastRules::check_ptr_ptr_cast ()
*** 337,343 ****
  }
  
  void
! TypeCastRules::emit_cast_error () const
  {
    rich_location r (line_table, locus);
    r.add_range (from.get_locus ());
--- 368,375 ----
  }
  
  void
! TypeCastRules::emit_cast_error (location_t locus, TyTy::TyWithLocation from,
! 				TyTy::TyWithLocation to)
  {
    rich_location r (line_table, locus);
    r.add_range (from.get_locus ());
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-casts.h gcc-16-20250810/gcc/rust/typecheck/rust-casts.h
*** gcc-16-20250803/gcc/rust/typecheck/rust-casts.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-casts.h	Sun Aug 10 22:32:08 2025
*************** class TypeCastRules
*** 30,44 ****
  public:
    static TypeCoercionRules::CoercionResult resolve (location_t locus,
  						    TyTy::TyWithLocation from,
! 						    TyTy::TyWithLocation to);
  
  protected:
!   TypeCoercionRules::CoercionResult check ();
    TypeCoercionRules::CoercionResult cast_rules ();
    TypeCoercionRules::CoercionResult check_ptr_ptr_cast ();
  
-   void emit_cast_error () const;
- 
  protected:
    TypeCastRules (location_t locus, TyTy::TyWithLocation from,
  		 TyTy::TyWithLocation to);
--- 30,46 ----
  public:
    static TypeCoercionRules::CoercionResult resolve (location_t locus,
  						    TyTy::TyWithLocation from,
! 						    TyTy::TyWithLocation to,
! 						    bool emit_error = true);
! 
!   static void emit_cast_error (location_t locus, TyTy::TyWithLocation from,
! 			       TyTy::TyWithLocation to);
  
  protected:
!   TypeCoercionRules::CoercionResult check (bool emit_error);
    TypeCoercionRules::CoercionResult cast_rules ();
    TypeCoercionRules::CoercionResult check_ptr_ptr_cast ();
  
  protected:
    TypeCastRules (location_t locus, TyTy::TyWithLocation from,
  		 TyTy::TyWithLocation to);
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-coercion.cc gcc-16-20250810/gcc/rust/typecheck/rust-coercion.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-coercion.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-coercion.cc	Sun Aug 10 22:32:08 2025
*************** TypeCoercionRules::do_coercion (TyTy::Ba
*** 125,137 ****
    // pointers
    switch (expected->get_kind ())
      {
!       case TyTy::TypeKind::POINTER: {
  	TyTy::PointerType *ptr = static_cast<TyTy::PointerType *> (expected);
  	try_result = coerce_unsafe_ptr (receiver, ptr, ptr->mutability ());
  	return !try_result.is_error ();
        }
  
!       case TyTy::TypeKind::REF: {
  	TyTy::ReferenceType *ptr
  	  = static_cast<TyTy::ReferenceType *> (expected);
  	try_result
--- 125,139 ----
    // pointers
    switch (expected->get_kind ())
      {
!     case TyTy::TypeKind::POINTER:
!       {
  	TyTy::PointerType *ptr = static_cast<TyTy::PointerType *> (expected);
  	try_result = coerce_unsafe_ptr (receiver, ptr, ptr->mutability ());
  	return !try_result.is_error ();
        }
  
!     case TyTy::TypeKind::REF:
!       {
  	TyTy::ReferenceType *ptr
  	  = static_cast<TyTy::ReferenceType *> (expected);
  	try_result
*************** TypeCoercionRules::do_coercion (TyTy::Ba
*** 147,153 ****
    // https://github.com/rust-lang/rust/blob/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/compiler/rustc_typeck/src/check/coercion.rs#L210
    switch (receiver->get_kind ())
      {
!       default: {
  	rust_debug (
  	  "do_coercion default unify and infer expected: %s receiver %s",
  	  receiver->debug_str ().c_str (), expected->debug_str ().c_str ());
--- 149,156 ----
    // https://github.com/rust-lang/rust/blob/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/compiler/rustc_typeck/src/check/coercion.rs#L210
    switch (receiver->get_kind ())
      {
!     default:
!       {
  	rust_debug (
  	  "do_coercion default unify and infer expected: %s receiver %s",
  	  receiver->debug_str ().c_str (), expected->debug_str ().c_str ());
*************** TypeCoercionRules::coerce_unsafe_ptr (Ty
*** 182,188 ****
    TyTy::BaseType *element = nullptr;
    switch (receiver->get_kind ())
      {
!       case TyTy::TypeKind::REF: {
  	TyTy::ReferenceType *ref
  	  = static_cast<TyTy::ReferenceType *> (receiver);
  	from_mutbl = ref->mutability ();
--- 185,192 ----
    TyTy::BaseType *element = nullptr;
    switch (receiver->get_kind ())
      {
!     case TyTy::TypeKind::REF:
!       {
  	TyTy::ReferenceType *ref
  	  = static_cast<TyTy::ReferenceType *> (receiver);
  	from_mutbl = ref->mutability ();
*************** TypeCoercionRules::coerce_unsafe_ptr (Ty
*** 190,205 ****
        }
        break;
  
!       case TyTy::TypeKind::POINTER: {
  	TyTy::PointerType *ref = static_cast<TyTy::PointerType *> (receiver);
  	from_mutbl = ref->mutability ();
  	element = ref->get_base ();
        }
        break;
  
!       default: {
! 	// FIXME this can probably turn into a unify_and
! 	if (receiver->can_eq (expected, false))
  	  return CoercionResult{{}, expected->clone ()};
  
  	return CoercionResult::get_error ();
--- 194,212 ----
        }
        break;
  
!     case TyTy::TypeKind::POINTER:
!       {
  	TyTy::PointerType *ref = static_cast<TyTy::PointerType *> (receiver);
  	from_mutbl = ref->mutability ();
  	element = ref->get_base ();
        }
        break;
  
!     default:
!       {
! 	if (types_compatable (TyTy::TyWithLocation (receiver),
! 			      TyTy::TyWithLocation (expected), UNKNOWN_LOCATION,
! 			      false))
  	  return CoercionResult{{}, expected->clone ()};
  
  	return CoercionResult::get_error ();
*************** TypeCoercionRules::coerce_borrowed_point
*** 264,280 ****
    Mutability from_mutbl = Mutability::Imm;
    switch (receiver->get_kind ())
      {
!       case TyTy::TypeKind::REF: {
  	TyTy::ReferenceType *from
  	  = static_cast<TyTy::ReferenceType *> (receiver);
  	from_mutbl = from->mutability ();
        }
        break;
  
!       default: {
! 	// FIXME
! 	// we might be able to replace this with a can_eq because we default
! 	// back to a final unity anyway
  	rust_debug ("coerce_borrowed_pointer -- unify");
  	TyTy::BaseType *result
  	  = unify_site_and (receiver->get_ref (),
--- 271,286 ----
    Mutability from_mutbl = Mutability::Imm;
    switch (receiver->get_kind ())
      {
!     case TyTy::TypeKind::REF:
!       {
  	TyTy::ReferenceType *from
  	  = static_cast<TyTy::ReferenceType *> (receiver);
  	from_mutbl = from->mutability ();
        }
        break;
  
!     default:
!       {
  	rust_debug ("coerce_borrowed_pointer -- unify");
  	TyTy::BaseType *result
  	  = unify_site_and (receiver->get_ref (),
*************** TypeCoercionRules::coerce_unsized (TyTy:
*** 393,399 ****
  
    if (expect_dyn && need_unsize)
      {
!       bool bounds_compatible = b->bounds_compatible (*a, locus, true);
        if (!bounds_compatible)
  	{
  	  unsafe_error = true;
--- 399,405 ----
  
    if (expect_dyn && need_unsize)
      {
!       bool bounds_compatible = b->bounds_compatible (*a, locus, false);
        if (!bounds_compatible)
  	{
  	  unsafe_error = true;
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-hir-dot-operator.cc gcc-16-20250810/gcc/rust/typecheck/rust-hir-dot-operator.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-hir-dot-operator.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-hir-dot-operator.cc	Sun Aug 10 22:32:08 2025
*************** MethodResolver::try_hook (const TyTy::Ba
*** 102,127 ****
      }
  }
  
! bool
! MethodResolver::select (TyTy::BaseType &receiver)
  {
!   rust_debug ("MethodResolver::select reciever=[%s] path=[%s]",
! 	      receiver.debug_str ().c_str (),
! 	      segment_name.as_string ().c_str ());
! 
!   struct impl_item_candidate
!   {
!     HIR::Function *item;
!     HIR::ImplBlock *impl_block;
!     TyTy::FnType *ty;
!   };
! 
    const TyTy::BaseType *raw = receiver.destructure ();
    bool receiver_is_raw_ptr = raw->get_kind () == TyTy::TypeKind::POINTER;
    bool receiver_is_ref = raw->get_kind () == TyTy::TypeKind::REF;
  
!   // assemble inherent impl items
!   std::vector<impl_item_candidate> inherent_impl_fns;
    mappings.iterate_impl_items (
      [&] (HirId id, HIR::ImplItem *item, HIR::ImplBlock *impl) mutable -> bool {
        bool is_trait_impl = impl->has_trait_ref ();
--- 102,117 ----
      }
  }
  
! std::vector<MethodResolver::impl_item_candidate>
! MethodResolver::assemble_inherent_impl_candidates (
!   const TyTy::BaseType &receiver)
  {
!   std::vector<impl_item_candidate> inherent_impl_fns;
    const TyTy::BaseType *raw = receiver.destructure ();
    bool receiver_is_raw_ptr = raw->get_kind () == TyTy::TypeKind::POINTER;
    bool receiver_is_ref = raw->get_kind () == TyTy::TypeKind::REF;
  
!   // Assemble inherent impl items (non-trait impl blocks)
    mappings.iterate_impl_items (
      [&] (HirId id, HIR::ImplItem *item, HIR::ImplBlock *impl) mutable -> bool {
        bool is_trait_impl = impl->has_trait_ref ();
*************** MethodResolver::select (TyTy::BaseType &
*** 190,205 ****
        return true;
      });
  
!   struct trait_item_candidate
!   {
!     const HIR::TraitItemFunc *item;
!     const HIR::Trait *trait;
!     TyTy::FnType *ty;
!     const TraitReference *reference;
!     const TraitItemReference *item_ref;
!   };
  
-   std::vector<trait_item_candidate> trait_fns;
    mappings.iterate_impl_blocks ([&] (HirId id,
  				     HIR::ImplBlock *impl) mutable -> bool {
      bool is_trait_impl = impl->has_trait_ref ();
--- 180,198 ----
        return true;
      });
  
!   return inherent_impl_fns;
! }
! 
! void
! MethodResolver::assemble_trait_impl_candidates (
!   const TyTy::BaseType &receiver,
!   std::vector<impl_item_candidate> &impl_candidates,
!   std::vector<trait_item_candidate> &trait_candidates)
! {
!   const TyTy::BaseType *raw = receiver.destructure ();
!   bool receiver_is_raw_ptr = raw->get_kind () == TyTy::TypeKind::POINTER;
!   bool receiver_is_ref = raw->get_kind () == TyTy::TypeKind::REF;
  
    mappings.iterate_impl_blocks ([&] (HirId id,
  				     HIR::ImplBlock *impl) mutable -> bool {
      bool is_trait_impl = impl->has_trait_ref ();
*************** MethodResolver::select (TyTy::BaseType &
*** 266,272 ****
  	      continue;
  	  }
  
! 	inherent_impl_fns.push_back ({func, impl, fnty});
  	return true;
        }
  
--- 259,265 ----
  	      continue;
  	  }
  
! 	impl_candidates.push_back ({func, impl, fnty});
  	return true;
        }
  
*************** MethodResolver::select (TyTy::BaseType &
*** 293,318 ****
      TyTy::FnType *fnty = static_cast<TyTy::FnType *> (ty);
  
      trait_item_candidate candidate{func, trait, fnty, trait_ref, item_ref};
!     trait_fns.push_back (candidate);
  
      return true;
    });
  
!   // lookup specified bounds for an associated item
!   struct precdicate_candidate
!   {
!     TyTy::TypeBoundPredicateItem lookup;
!     TyTy::FnType *fntype;
!   };
! 
!   // https://github.com/rust-lang/rust/blob/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/compiler/rustc_typeck/src/check/method/probe.rs#L580-L694
! 
!   rust_debug ("inherent_impl_fns found {%lu}, trait_fns found {%lu}, "
! 	      "predicate_items found {%lu}",
! 	      (unsigned long) inherent_impl_fns.size (),
! 	      (unsigned long) trait_fns.size (),
! 	      (unsigned long) predicate_items.size ());
! 
    bool found_possible_candidate = false;
    for (const auto &predicate : predicate_items)
      {
--- 286,300 ----
      TyTy::FnType *fnty = static_cast<TyTy::FnType *> (ty);
  
      trait_item_candidate candidate{func, trait, fnty, trait_ref, item_ref};
!     trait_candidates.push_back (candidate);
  
      return true;
    });
+ }
  
! bool
! MethodResolver::try_select_predicate_candidates (TyTy::BaseType &receiver)
! {
    bool found_possible_candidate = false;
    for (const auto &predicate : predicate_items)
      {
*************** MethodResolver::select (TyTy::BaseType &
*** 346,405 ****
  	  found_possible_candidate = true;
  	}
      }
!   if (found_possible_candidate)
!     {
!       return true;
!     }
  
!   for (auto &impl_item : inherent_impl_fns)
      {
        bool is_trait_impl_block = impl_item.impl_block->has_trait_ref ();
!       if (is_trait_impl_block)
  	continue;
! 
!       TyTy::FnType *fn = impl_item.ty;
!       rust_assert (fn->is_method ());
! 
!       TyTy::BaseType *fn_self = fn->get_self_type ();
!       rust_debug ("dot-operator impl_item fn_self={%s} can_eq receiver={%s}",
! 		  fn_self->debug_str ().c_str (),
! 		  receiver.debug_str ().c_str ());
! 
!       auto res
! 	= TypeCoercionRules::TryCoerce (&receiver, fn_self, UNDEF_LOCATION,
! 					false /*allow-autoderef*/);
!       bool ok = !res.is_error ();
!       if (ok)
! 	{
! 	  std::vector<Adjustment> adjs = append_adjustments (res.adjustments);
! 	  PathProbeCandidate::ImplItemCandidate c{impl_item.item,
! 						  impl_item.impl_block};
! 	  auto try_result = MethodCandidate{
! 	    PathProbeCandidate (PathProbeCandidate::CandidateType::IMPL_FUNC,
! 				fn, impl_item.item->get_locus (), c),
! 	    adjs};
! 	  result.insert (std::move (try_result));
! 	  found_possible_candidate = true;
! 	}
!     }
!   if (found_possible_candidate)
!     {
!       return true;
!     }
! 
!   for (auto &impl_item : inherent_impl_fns)
!     {
!       bool is_trait_impl_block = impl_item.impl_block->has_trait_ref ();
!       if (!is_trait_impl_block)
  	continue;
  
        TyTy::FnType *fn = impl_item.ty;
        rust_assert (fn->is_method ());
  
        TyTy::BaseType *fn_self = fn->get_self_type ();
!       rust_debug (
! 	"dot-operator trait_impl_item fn_self={%s} can_eq receiver={%s}",
! 	fn_self->debug_str ().c_str (), receiver.debug_str ().c_str ());
  
        auto res
  	= TypeCoercionRules::TryCoerce (&receiver, fn_self, UNDEF_LOCATION,
--- 328,360 ----
  	  found_possible_candidate = true;
  	}
      }
!   return found_possible_candidate;
! }
  
! bool
! MethodResolver::try_select_inherent_impl_candidates (
!   TyTy::BaseType &receiver, const std::vector<impl_item_candidate> &candidates,
!   bool trait_impl_blocks_only)
! {
!   bool found_possible_candidate = false;
!   for (auto &impl_item : candidates)
      {
        bool is_trait_impl_block = impl_item.impl_block->has_trait_ref ();
!       if (trait_impl_blocks_only && !is_trait_impl_block)
  	continue;
!       if (!trait_impl_blocks_only && is_trait_impl_block)
  	continue;
  
        TyTy::FnType *fn = impl_item.ty;
        rust_assert (fn->is_method ());
  
        TyTy::BaseType *fn_self = fn->get_self_type ();
! 
!       const char *debug_prefix
! 	= trait_impl_blocks_only ? "trait_impl_item" : "impl_item";
!       rust_debug ("dot-operator %s fn_self={%s} can_eq receiver={%s}",
! 		  debug_prefix, fn_self->debug_str ().c_str (),
! 		  receiver.debug_str ().c_str ());
  
        auto res
  	= TypeCoercionRules::TryCoerce (&receiver, fn_self, UNDEF_LOCATION,
*************** MethodResolver::select (TyTy::BaseType &
*** 418,429 ****
  	  found_possible_candidate = true;
  	}
      }
!   if (found_possible_candidate)
!     {
!       return true;
!     }
  
!   for (auto trait_item : trait_fns)
      {
        TyTy::FnType *fn = trait_item.ty;
        rust_assert (fn->is_method ());
--- 373,387 ----
  	  found_possible_candidate = true;
  	}
      }
!   return found_possible_candidate;
! }
  
! bool
! MethodResolver::try_select_trait_impl_candidates (
!   TyTy::BaseType &receiver, const std::vector<trait_item_candidate> &candidates)
! {
!   bool found_possible_candidate = false;
!   for (auto trait_item : candidates)
      {
        TyTy::FnType *fn = trait_item.ty;
        rust_assert (fn->is_method ());
*************** MethodResolver::select (TyTy::BaseType &
*** 451,460 ****
  	  found_possible_candidate = true;
  	}
      }
- 
    return found_possible_candidate;
  }
  
  std::vector<MethodResolver::predicate_candidate>
  MethodResolver::get_predicate_items (
    const HIR::PathIdentSegment &segment_name, const TyTy::BaseType &receiver,
--- 409,461 ----
  	  found_possible_candidate = true;
  	}
      }
    return found_possible_candidate;
  }
  
+ bool
+ MethodResolver::select (TyTy::BaseType &receiver)
+ {
+   rust_debug ("MethodResolver::select reciever=[%s] path=[%s]",
+ 	      receiver.debug_str ().c_str (),
+ 	      segment_name.as_string ().c_str ());
+ 
+   // Assemble candidates
+   std::vector<impl_item_candidate> inherent_impl_fns
+     = assemble_inherent_impl_candidates (receiver);
+   std::vector<impl_item_candidate> trait_impl_fns;
+   std::vector<trait_item_candidate> trait_fns;
+   assemble_trait_impl_candidates (receiver, trait_impl_fns, trait_fns);
+ 
+   // Combine inherent and trait impl functions
+   inherent_impl_fns.insert (inherent_impl_fns.end (), trait_impl_fns.begin (),
+ 			    trait_impl_fns.end ());
+ 
+   // https://github.com/rust-lang/rust/blob/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/compiler/rustc_typeck/src/check/method/probe.rs#L580-L694
+ 
+   rust_debug ("inherent_impl_fns found {%lu}, trait_fns found {%lu}, "
+ 	      "predicate_items found {%lu}",
+ 	      (unsigned long) inherent_impl_fns.size (),
+ 	      (unsigned long) trait_fns.size (),
+ 	      (unsigned long) predicate_items.size ());
+ 
+   // Try selection in the priority order defined by Rust's method resolution:
+ 
+   // 1. Try predicate candidates first (highest priority)
+   if (try_select_predicate_candidates (receiver))
+     return true;
+ 
+   // 2. Try inherent impl functions (non-trait impl blocks)
+   if (try_select_inherent_impl_candidates (receiver, inherent_impl_fns, false))
+     return true;
+ 
+   // 3. Try inherent impl functions from trait impl blocks
+   if (try_select_inherent_impl_candidates (receiver, inherent_impl_fns, true))
+     return true;
+ 
+   // 4. Try trait functions (lowest priority)
+   return try_select_trait_impl_candidates (receiver, trait_fns);
+ }
+ 
  std::vector<MethodResolver::predicate_candidate>
  MethodResolver::get_predicate_items (
    const HIR::PathIdentSegment &segment_name, const TyTy::BaseType &receiver,
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-hir-dot-operator.h gcc-16-20250810/gcc/rust/typecheck/rust-hir-dot-operator.h
*** gcc-16-20250803/gcc/rust/typecheck/rust-hir-dot-operator.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-hir-dot-operator.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 65,70 ****
--- 65,86 ----
      const HIR::PathIdentSegment &segment_name, const TyTy::BaseType &receiver,
      const std::vector<TyTy::TypeBoundPredicate> &specified_bounds);
  
+   struct impl_item_candidate
+   {
+     HIR::Function *item;
+     HIR::ImplBlock *impl_block;
+     TyTy::FnType *ty;
+   };
+ 
+   struct trait_item_candidate
+   {
+     const HIR::TraitItemFunc *item;
+     const HIR::Trait *trait;
+     TyTy::FnType *ty;
+     const TraitReference *reference;
+     const TraitItemReference *item_ref;
+   };
+ 
  protected:
    MethodResolver (bool autoderef_flag,
  		  const HIR::PathIdentSegment &segment_name);
*************** private:
*** 77,82 ****
--- 93,117 ----
    std::vector<Adjustment>
    append_adjustments (const std::vector<Adjustment> &adjustments) const;
  
+   std::vector<impl_item_candidate>
+   assemble_inherent_impl_candidates (const TyTy::BaseType &receiver);
+ 
+   void assemble_trait_impl_candidates (
+     const TyTy::BaseType &receiver,
+     std::vector<impl_item_candidate> &impl_candidates,
+     std::vector<trait_item_candidate> &trait_candidates);
+ 
+   bool try_select_predicate_candidates (TyTy::BaseType &receiver);
+ 
+   bool try_select_inherent_impl_candidates (
+     TyTy::BaseType &receiver,
+     const std::vector<impl_item_candidate> &candidates,
+     bool trait_impl_blocks_only);
+ 
+   bool try_select_trait_impl_candidates (
+     TyTy::BaseType &receiver,
+     const std::vector<trait_item_candidate> &candidates);
+ 
  private:
    // search
    const HIR::PathIdentSegment &segment_name;
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-hir-inherent-impl-overlap.h gcc-16-20250810/gcc/rust/typecheck/rust-hir-inherent-impl-overlap.h
*** gcc-16-20250803/gcc/rust/typecheck/rust-hir-inherent-impl-overlap.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-hir-inherent-impl-overlap.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 79,105 ****
  	    if (query == candidate)
  	      continue;
  
! 	    if (query->can_eq (candidate, false))
! 	      {
! 		// we might be in the case that we have:
! 		//
! 		// *const T vs *const [T]
! 		//
! 		// so lets use an equality check when the
! 		// candidates are both generic to be sure we dont emit a false
! 		// positive
  
! 		bool a = query->is_concrete ();
! 		bool b = candidate->is_concrete ();
! 		bool both_generic = !a && !b;
! 		if (both_generic)
! 		  {
! 		    if (!query->is_equal (*candidate))
! 		      continue;
! 		  }
  
! 		possible_collision (it->second, iy->second);
  	      }
  	  }
        }
    }
--- 79,107 ----
  	    if (query == candidate)
  	      continue;
  
! 	    if (!types_compatable (TyTy::TyWithLocation (query),
! 				   TyTy::TyWithLocation (candidate),
! 				   UNKNOWN_LOCATION, false))
! 	      continue;
  
! 	    // we might be in the case that we have:
! 	    //
! 	    // *const T vs *const [T]
! 	    //
! 	    // so lets use an equality check when the
! 	    // candidates are both generic to be sure we dont emit a false
! 	    // positive
  
! 	    bool a = query->is_concrete ();
! 	    bool b = candidate->is_concrete ();
! 	    bool both_generic = !a && !b;
! 	    if (both_generic)
! 	      {
! 		if (!query->is_equal (*candidate))
! 		  continue;
  	      }
+ 
+ 	    possible_collision (it->second, iy->second);
  	  }
        }
    }
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-hir-path-probe.cc gcc-16-20250810/gcc/rust/typecheck/rust-hir-path-probe.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-hir-path-probe.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-hir-path-probe.cc	Sun Aug 10 22:32:08 2025
*************** PathProbeCandidate::operator< (const Pat
*** 137,143 ****
  
  // PathProbeType
  
! PathProbeType::PathProbeType (const TyTy::BaseType *receiver,
  			      const HIR::PathIdentSegment &query,
  			      DefId specific_trait_id)
    : TypeCheckBase (), receiver (receiver), search (query),
--- 137,143 ----
  
  // PathProbeType
  
! PathProbeType::PathProbeType (TyTy::BaseType *receiver,
  			      const HIR::PathIdentSegment &query,
  			      DefId specific_trait_id)
    : TypeCheckBase (), receiver (receiver), search (query),
*************** PathProbeType::PathProbeType (const TyTy
*** 145,151 ****
  {}
  
  std::set<PathProbeCandidate>
! PathProbeType::Probe (const TyTy::BaseType *receiver,
  		      const HIR::PathIdentSegment &segment_name,
  		      bool probe_impls, bool probe_bounds,
  		      bool ignore_mandatory_trait_items,
--- 145,151 ----
  {}
  
  std::set<PathProbeCandidate>
! PathProbeType::Probe (TyTy::BaseType *receiver,
  		      const HIR::PathIdentSegment &segment_name,
  		      bool probe_impls, bool probe_bounds,
  		      bool ignore_mandatory_trait_items,
*************** PathProbeType::is_receiver_generic () co
*** 443,449 ****
  
  // PathProbImplTrait
  
! PathProbeImplTrait::PathProbeImplTrait (const TyTy::BaseType *receiver,
  					const HIR::PathIdentSegment &query,
  					const TraitReference *trait_reference)
    : PathProbeType (receiver, query, UNKNOWN_DEFID),
--- 443,449 ----
  
  // PathProbImplTrait
  
! PathProbeImplTrait::PathProbeImplTrait (TyTy::BaseType *receiver,
  					const HIR::PathIdentSegment &query,
  					const TraitReference *trait_reference)
    : PathProbeType (receiver, query, UNKNOWN_DEFID),
*************** PathProbeImplTrait::PathProbeImplTrait (
*** 451,457 ****
  {}
  
  std::set<PathProbeCandidate>
! PathProbeImplTrait::Probe (const TyTy::BaseType *receiver,
  			   const HIR::PathIdentSegment &segment_name,
  			   const TraitReference *trait_reference)
  {
--- 451,457 ----
  {}
  
  std::set<PathProbeCandidate>
! PathProbeImplTrait::Probe (TyTy::BaseType *receiver,
  			   const HIR::PathIdentSegment &segment_name,
  			   const TraitReference *trait_reference)
  {
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-hir-path-probe.h gcc-16-20250810/gcc/rust/typecheck/rust-hir-path-probe.h
*** gcc-16-20250803/gcc/rust/typecheck/rust-hir-path-probe.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-hir-path-probe.h	Sun Aug 10 22:32:08 2025
*************** class PathProbeType : public TypeCheckBa
*** 108,116 ****
  {
  public:
    static std::set<PathProbeCandidate>
!   Probe (const TyTy::BaseType *receiver,
! 	 const HIR::PathIdentSegment &segment_name, bool probe_impls,
! 	 bool probe_bounds, bool ignore_mandatory_trait_items,
  	 DefId specific_trait_id = UNKNOWN_DEFID);
  
    void visit (HIR::TypeAlias &alias) override;
--- 108,115 ----
  {
  public:
    static std::set<PathProbeCandidate>
!   Probe (TyTy::BaseType *receiver, const HIR::PathIdentSegment &segment_name,
! 	 bool probe_impls, bool probe_bounds, bool ignore_mandatory_trait_items,
  	 DefId specific_trait_id = UNKNOWN_DEFID);
  
    void visit (HIR::TypeAlias &alias) override;
*************** protected:
*** 135,142 ****
  				    bool ignore_mandatory_trait_items);
  
  protected:
!   PathProbeType (const TyTy::BaseType *receiver,
! 		 const HIR::PathIdentSegment &query, DefId specific_trait_id);
  
    std::vector<std::pair<const TraitReference *, HIR::ImplBlock *>>
    union_bounds (
--- 134,141 ----
  				    bool ignore_mandatory_trait_items);
  
  protected:
!   PathProbeType (TyTy::BaseType *receiver, const HIR::PathIdentSegment &query,
! 		 DefId specific_trait_id);
  
    std::vector<std::pair<const TraitReference *, HIR::ImplBlock *>>
    union_bounds (
*************** protected:
*** 147,153 ****
  
    bool is_receiver_generic () const;
  
!   const TyTy::BaseType *receiver;
    const HIR::PathIdentSegment &search;
    std::set<PathProbeCandidate> candidates;
    HIR::ImplBlock *current_impl;
--- 146,152 ----
  
    bool is_receiver_generic () const;
  
!   TyTy::BaseType *receiver;
    const HIR::PathIdentSegment &search;
    std::set<PathProbeCandidate> candidates;
    HIR::ImplBlock *current_impl;
*************** class PathProbeImplTrait : public PathPr
*** 178,189 ****
  {
  public:
    static std::set<PathProbeCandidate>
!   Probe (const TyTy::BaseType *receiver,
! 	 const HIR::PathIdentSegment &segment_name,
  	 const TraitReference *trait_reference);
  
  private:
!   PathProbeImplTrait (const TyTy::BaseType *receiver,
  		      const HIR::PathIdentSegment &query,
  		      const TraitReference *trait_reference);
  
--- 177,187 ----
  {
  public:
    static std::set<PathProbeCandidate>
!   Probe (TyTy::BaseType *receiver, const HIR::PathIdentSegment &segment_name,
  	 const TraitReference *trait_reference);
  
  private:
!   PathProbeImplTrait (TyTy::BaseType *receiver,
  		      const HIR::PathIdentSegment &query,
  		      const TraitReference *trait_reference);
  
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-hir-trait-reference.cc gcc-16-20250810/gcc/rust/typecheck/rust-hir-trait-reference.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-hir-trait-reference.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-hir-trait-reference.cc	Sun Aug 10 22:32:08 2025
*************** TraitReference::on_resolved ()
*** 342,348 ****
  {
    for (auto &item : item_refs)
      {
!       item.on_resolved ();
      }
  }
  
--- 342,356 ----
  {
    for (auto &item : item_refs)
      {
!       if (item.get_trait_item_type ()
! 	  == TraitItemReference::TraitItemType::TYPE)
! 	item.on_resolved ();
!     }
!   for (auto &item : item_refs)
!     {
!       if (item.get_trait_item_type ()
! 	  != TraitItemReference::TraitItemType::TYPE)
! 	item.on_resolved ();
      }
  }
  
*************** TraitReference::trait_has_generics () co
*** 424,430 ****
    return !trait_substs.empty ();
  }
  
! std::vector<TyTy::SubstitutionParamMapping>
  TraitReference::get_trait_substs () const
  {
    return trait_substs;
--- 432,444 ----
    return !trait_substs.empty ();
  }
  
! std::vector<TyTy::SubstitutionParamMapping> &
! TraitReference::get_trait_substs ()
! {
!   return trait_substs;
! }
! 
! const std::vector<TyTy::SubstitutionParamMapping> &
  TraitReference::get_trait_substs () const
  {
    return trait_substs;
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-hir-trait-reference.h gcc-16-20250810/gcc/rust/typecheck/rust-hir-trait-reference.h
*** gcc-16-20250803/gcc/rust/typecheck/rust-hir-trait-reference.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-hir-trait-reference.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 224,230 ****
  
    bool trait_has_generics () const;
  
!   std::vector<TyTy::SubstitutionParamMapping> get_trait_substs () const;
  
    bool satisfies_bound (const TraitReference &reference) const;
  
--- 224,232 ----
  
    bool trait_has_generics () const;
  
!   std::vector<TyTy::SubstitutionParamMapping> &get_trait_substs ();
! 
!   const std::vector<TyTy::SubstitutionParamMapping> &get_trait_substs () const;
  
    bool satisfies_bound (const TraitReference &reference) const;
  
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-hir-trait-resolve.cc gcc-16-20250810/gcc/rust/typecheck/rust-hir-trait-resolve.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-hir-trait-resolve.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-hir-trait-resolve.cc	Sun Aug 10 22:32:08 2025
***************
*** 22,30 ****
  #include "rust-type-util.h"
  #include "rust-immutable-name-resolution-context.h"
  
- // used for flag_name_resolution_2_0
- #include "options.h"
- 
  namespace Rust {
  namespace Resolver {
  
--- 22,27 ----
*************** bool
*** 123,150 ****
  TraitResolver::resolve_path_to_trait (const HIR::TypePath &path,
  				      HIR::Trait **resolved) const
  {
    NodeId ref;
!   bool ok;
!   if (flag_name_resolution_2_0)
      {
!       auto &nr_ctx
! 	= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
! 
!       auto ref_opt = nr_ctx.lookup (path.get_mappings ().get_nodeid ());
! 
!       if ((ok = ref_opt.has_value ()))
! 	ref = *ref_opt;
      }
    else
      {
-       auto path_nodeid = path.get_mappings ().get_nodeid ();
-       ok = resolver->lookup_resolved_type (path_nodeid, &ref)
- 	   || resolver->lookup_resolved_name (path_nodeid, &ref)
- 	   || resolver->lookup_resolved_macro (path_nodeid, &ref);
-     }
- 
-   if (!ok)
-     {
        rust_error_at (path.get_locus (), "Failed to resolve path to node-id");
        return false;
      }
--- 120,135 ----
  TraitResolver::resolve_path_to_trait (const HIR::TypePath &path,
  				      HIR::Trait **resolved) const
  {
+   auto &nr_ctx
+     = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
+ 
    NodeId ref;
!   if (auto ref_opt = nr_ctx.lookup (path.get_mappings ().get_nodeid ()))
      {
!       ref = *ref_opt;
      }
    else
      {
        rust_error_at (path.get_locus (), "Failed to resolve path to node-id");
        return false;
      }
*************** TraitResolver::resolve_trait (HIR::Trait
*** 224,230 ****
  	  // handling.
  	  break;
  
! 	  case HIR::GenericParam::GenericKind::TYPE: {
  	    auto &typaram = static_cast<HIR::TypeParam &> (*generic_param);
  	    bool is_self
  	      = typaram.get_type_representation ().as_string ().compare ("Self")
--- 209,216 ----
  	  // handling.
  	  break;
  
! 	case HIR::GenericParam::GenericKind::TYPE:
! 	  {
  	    auto &typaram = static_cast<HIR::TypeParam &> (*generic_param);
  	    bool is_self
  	      = typaram.get_type_representation ().as_string ().compare ("Self")
*************** TraitResolver::resolve_trait (HIR::Trait
*** 287,293 ****
  
  	      auto predicate = get_predicate_from_bound (
  		b->get_path (),
! 		tl::nullopt /*this will setup a PLACEHOLDER for self*/);
  	      if (predicate.is_error ())
  		return &TraitReference::error_node ();
  
--- 273,280 ----
  
  	      auto predicate = get_predicate_from_bound (
  		b->get_path (),
! 		tl::nullopt /*this will setup a PLACEHOLDER for self*/,
! 		BoundPolarity::RegularBound, false, true);
  	      if (predicate.is_error ())
  		return &TraitReference::error_node ();
  
*************** TraitItemReference::associated_type_set
*** 443,453 ****
--- 430,456 ----
  {
    rust_assert (get_trait_item_type () == TraitItemType::TYPE);
  
+   // this isnt super safe there are cases like the FnTraits where the type is
+   // set to the impls placeholder associated type. For example
+   //
+   // type Output = F::Output; -- see the fn trait impls in libcore
+   //
+   // then this projection ends up resolving back to this placeholder so it just
+   // ends up being cyclical
+ 
    TyTy::BaseType *item_ty = get_tyty ();
    rust_assert (item_ty->get_kind () == TyTy::TypeKind::PLACEHOLDER);
    TyTy::PlaceholderType *placeholder
      = static_cast<TyTy::PlaceholderType *> (item_ty);
  
+   if (ty->is<TyTy::ProjectionType> ())
+     {
+       const auto &projection = *static_cast<const TyTy::ProjectionType *> (ty);
+       const auto resolved = projection.get ();
+       if (resolved == item_ty)
+ 	return;
+     }
+ 
    placeholder->set_associated_type (ty->get_ty_ref ());
  }
  
*************** AssociatedImplTrait::setup_associated_ty
*** 543,549 ****
  	  // handling.
  	  break;
  
! 	  case HIR::GenericParam::GenericKind::TYPE: {
  	    TyTy::BaseType *l = nullptr;
  	    bool ok = context->lookup_type (
  	      generic_param->get_mappings ().get_hirid (), &l);
--- 546,553 ----
  	  // handling.
  	  break;
  
! 	case HIR::GenericParam::GenericKind::TYPE:
! 	  {
  	    TyTy::BaseType *l = nullptr;
  	    bool ok = context->lookup_type (
  	      generic_param->get_mappings ().get_hirid (), &l);
*************** AssociatedImplTrait::setup_associated_ty
*** 580,587 ****
  	}
        else
  	{
! 	  TyTy::ParamType *param = p.get_param_ty ();
! 	  TyTy::BaseType *resolved = param->destructure ();
  	  subst_args.push_back (TyTy::SubstitutionArg (&p, resolved));
  	  param_mappings[param->get_symbol ()] = resolved->get_ref ();
  	}
--- 584,591 ----
  	}
        else
  	{
! 	  auto param = p.get_param_ty ();
! 	  auto resolved = param->destructure ();
  	  subst_args.push_back (TyTy::SubstitutionArg (&p, resolved));
  	  param_mappings[param->get_symbol ()] = resolved->get_ref ();
  	}
*************** AssociatedImplTrait::setup_associated_ty
*** 609,616 ****
        if (i == 0)
  	continue;
  
!       const TyTy::ParamType *p = arg.get_param_ty ();
!       TyTy::BaseType *r = p->resolve ();
        if (!r->is_concrete ())
  	{
  	  r = SubstMapperInternal::Resolve (r, infer_arguments);
--- 613,620 ----
        if (i == 0)
  	continue;
  
!       const auto p = arg.get_param_ty ();
!       auto r = p->resolve ();
        if (!r->is_concrete ())
  	{
  	  r = SubstMapperInternal::Resolve (r, infer_arguments);
*************** AssociatedImplTrait::setup_associated_ty
*** 626,633 ****
        if (i == 0)
  	continue;
  
!       const TyTy::ParamType *p = arg.get_param_ty ();
!       TyTy::BaseType *r = p->resolve ();
        if (!r->is_concrete ())
  	{
  	  r = SubstMapperInternal::Resolve (r, infer_arguments);
--- 630,637 ----
        if (i == 0)
  	continue;
  
!       const auto p = arg.get_param_ty ();
!       auto r = p->resolve ();
        if (!r->is_concrete ())
  	{
  	  r = SubstMapperInternal::Resolve (r, infer_arguments);
*************** TraitItemReference::is_object_safe () co
*** 753,759 ****
    // https://doc.rust-lang.org/reference/items/traits.html#object-safety
    switch (get_trait_item_type ())
      {
!       case TraitItemReference::TraitItemType::FN: {
  	// lets be boring and just check that this is indeed a method will do
  	// for now
  	const HIR::TraitItem *item = get_hir_trait_item ();
--- 757,764 ----
    // https://doc.rust-lang.org/reference/items/traits.html#object-safety
    switch (get_trait_item_type ())
      {
!     case TraitItemReference::TraitItemType::FN:
!       {
  	// lets be boring and just check that this is indeed a method will do
  	// for now
  	const HIR::TraitItem *item = get_hir_trait_item ();
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-bounds.h gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-bounds.h
*** gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-bounds.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-bounds.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 37,43 ****
  
  private:
    void scan ();
!   void assemble_sized_builtin ();
    void add_trait_bound (HIR::Trait *trait);
    void assemble_builtin_candidate (LangItem::Kind item);
  
--- 37,47 ----
  
  private:
    void scan ();
!   bool
!   process_impl_block (HirId id, HIR::ImplBlock *impl,
! 		      std::vector<std::pair<HIR::TypePath *, HIR::ImplBlock *>>
! 			&possible_trait_paths);
!   void assemble_marker_builtins ();
    void add_trait_bound (HIR::Trait *trait);
    void assemble_builtin_candidate (LangItem::Kind item);
  
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-base.cc gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-base.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-base.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-base.cc	Sun Aug 10 22:32:08 2025
***************
*** 17,44 ****
  // <http://www.gnu.org/licenses/>.
  
  #include "rust-hir-type-check-base.h"
  #include "rust-hir-type-check-expr.h"
  #include "rust-hir-type-check-type.h"
  #include "rust-hir-trait-resolve.h"
  #include "rust-type-util.h"
  #include "rust-attribute-values.h"
  
  namespace Rust {
  namespace Resolver {
  
  TypeCheckBase::TypeCheckBase ()
!   : mappings (Analysis::Mappings::get ()), resolver (Resolver::get ()),
!     context (TypeCheckContext::get ())
  {}
  
  void
  TypeCheckBase::ResolveGenericParams (
    const std::vector<std::unique_ptr<HIR::GenericParam>> &generic_params,
    std::vector<TyTy::SubstitutionParamMapping> &substitutions, bool is_foreign,
    ABI abi)
  {
    TypeCheckBase ctx;
!   ctx.resolve_generic_params (generic_params, substitutions, is_foreign, abi);
  }
  
  static void
--- 17,49 ----
  // <http://www.gnu.org/licenses/>.
  
  #include "rust-hir-type-check-base.h"
+ #include "rust-compile-base.h"
+ #include "rust-hir-item.h"
  #include "rust-hir-type-check-expr.h"
  #include "rust-hir-type-check-type.h"
  #include "rust-hir-trait-resolve.h"
  #include "rust-type-util.h"
  #include "rust-attribute-values.h"
+ #include "rust-tyty.h"
+ #include "tree.h"
  
  namespace Rust {
  namespace Resolver {
  
  TypeCheckBase::TypeCheckBase ()
!   : mappings (Analysis::Mappings::get ()), context (TypeCheckContext::get ())
  {}
  
  void
  TypeCheckBase::ResolveGenericParams (
+   const HIR::Item::ItemKind item_kind, location_t item_locus,
    const std::vector<std::unique_ptr<HIR::GenericParam>> &generic_params,
    std::vector<TyTy::SubstitutionParamMapping> &substitutions, bool is_foreign,
    ABI abi)
  {
    TypeCheckBase ctx;
!   ctx.resolve_generic_params (item_kind, item_locus, generic_params,
! 			      substitutions, is_foreign, abi);
  }
  
  static void
*************** walk_types_to_constrain (std::set<HirId>
*** 47,56 ****
  {
    for (const auto &c : constraints.get_mappings ())
      {
!       const TyTy::BaseType *arg = c.get_tyty ();
        if (arg != nullptr)
  	{
! 	  const TyTy::BaseType *p = arg->get_root ();
  	  constrained_symbols.insert (p->get_ty_ref ());
  	  if (p->has_substitutions_defined ())
  	    {
--- 52,61 ----
  {
    for (const auto &c : constraints.get_mappings ())
      {
!       auto arg = c.get_tyty ();
        if (arg != nullptr)
  	{
! 	  const auto p = arg->get_root ();
  	  constrained_symbols.insert (p->get_ty_ref ());
  	  if (p->has_substitutions_defined ())
  	    {
*************** TypeCheckBase::check_for_unconstrained (
*** 66,72 ****
    const std::vector<TyTy::SubstitutionParamMapping> &params_to_constrain,
    const TyTy::SubstitutionArgumentMappings &constraint_a,
    const TyTy::SubstitutionArgumentMappings &constraint_b,
!   const TyTy::BaseType *reference)
  {
    bool check_result = false;
    bool check_completed
--- 71,77 ----
    const std::vector<TyTy::SubstitutionParamMapping> &params_to_constrain,
    const TyTy::SubstitutionArgumentMappings &constraint_a,
    const TyTy::SubstitutionArgumentMappings &constraint_b,
!   TyTy::BaseType *reference)
  {
    bool check_result = false;
    bool check_completed
*************** TypeCheckBase::resolve_literal (const An
*** 124,130 ****
    TyTy::BaseType *infered = nullptr;
    switch (literal.get_lit_type ())
      {
!       case HIR::Literal::LitType::INT: {
  	bool ok = false;
  
  	switch (literal.get_type_hint ())
--- 129,136 ----
    TyTy::BaseType *infered = nullptr;
    switch (literal.get_lit_type ())
      {
!     case HIR::Literal::LitType::INT:
!       {
  	bool ok = false;
  
  	switch (literal.get_type_hint ())
*************** TypeCheckBase::resolve_literal (const An
*** 191,197 ****
        }
        break;
  
!       case HIR::Literal::LitType::FLOAT: {
  	bool ok = false;
  
  	switch (literal.get_type_hint ())
--- 197,204 ----
        }
        break;
  
!     case HIR::Literal::LitType::FLOAT:
!       {
  	bool ok = false;
  
  	switch (literal.get_type_hint ())
*************** TypeCheckBase::resolve_literal (const An
*** 216,240 ****
        }
        break;
  
!       case HIR::Literal::LitType::BOOL: {
  	auto ok = context->lookup_builtin ("bool", &infered);
  	rust_assert (ok);
        }
        break;
  
!       case HIR::Literal::LitType::CHAR: {
  	auto ok = context->lookup_builtin ("char", &infered);
  	rust_assert (ok);
        }
        break;
  
!       case HIR::Literal::LitType::BYTE: {
  	auto ok = context->lookup_builtin ("u8", &infered);
  	rust_assert (ok);
        }
        break;
  
!       case HIR::Literal::LitType::STRING: {
  	TyTy::BaseType *base = nullptr;
  	auto ok = context->lookup_builtin ("str", &base);
  	rust_assert (ok);
--- 223,251 ----
        }
        break;
  
!     case HIR::Literal::LitType::BOOL:
!       {
  	auto ok = context->lookup_builtin ("bool", &infered);
  	rust_assert (ok);
        }
        break;
  
!     case HIR::Literal::LitType::CHAR:
!       {
  	auto ok = context->lookup_builtin ("char", &infered);
  	rust_assert (ok);
        }
        break;
  
!     case HIR::Literal::LitType::BYTE:
!       {
  	auto ok = context->lookup_builtin ("u8", &infered);
  	rust_assert (ok);
        }
        break;
  
!     case HIR::Literal::LitType::STRING:
!       {
  	TyTy::BaseType *base = nullptr;
  	auto ok = context->lookup_builtin ("str", &base);
  	rust_assert (ok);
*************** TypeCheckBase::resolve_literal (const An
*** 246,252 ****
        }
        break;
  
!       case HIR::Literal::LitType::BYTE_STRING: {
  	/* This is an arraytype of u8 reference (&[u8;size]). It isn't in
  	   UTF-8, but really just a byte array. Code to construct the array
  	   reference copied from ArrayElemsValues and ArrayType. */
--- 257,264 ----
        }
        break;
  
!     case HIR::Literal::LitType::BYTE_STRING:
!       {
  	/* This is an arraytype of u8 reference (&[u8;size]). It isn't in
  	   UTF-8, but really just a byte array. Code to construct the array
  	   reference copied from ArrayElemsValues and ArrayType. */
*************** TypeCheckBase::resolve_literal (const An
*** 280,289 ****
  					       crate_num),
  					     UNKNOWN_LOCAL_DEFID);
  
  	TyTy::ArrayType *array
  	  = new TyTy::ArrayType (array_mapping.get_hirid (), locus,
! 				 *literal_capacity,
! 				 TyTy::TyVar (u8->get_ref ()));
  	context->insert_type (array_mapping, array);
  
  	infered = new TyTy::ReferenceType (expr_mappings.get_hirid (),
--- 292,312 ----
  					       crate_num),
  					     UNKNOWN_LOCAL_DEFID);
  
+ 	auto ctx = Compile::Context::get ();
+ 	tree capacity = Compile::HIRCompileBase::query_compile_const_expr (
+ 	  ctx, expected_ty, *literal_capacity);
+ 
+ 	TyTy::ConstType *capacity_expr
+ 	  = new TyTy::ConstType (TyTy::ConstType::ConstKind::Value, "",
+ 				 expected_ty, capacity, {},
+ 				 literal_capacity->get_locus (),
+ 				 literal_capacity->get_mappings ().get_hirid (),
+ 				 literal_capacity->get_mappings ().get_hirid (),
+ 				 {});
+ 
  	TyTy::ArrayType *array
  	  = new TyTy::ArrayType (array_mapping.get_hirid (), locus,
! 				 capacity_expr, TyTy::TyVar (u8->get_ref ()));
  	context->insert_type (array_mapping, array);
  
  	infered = new TyTy::ReferenceType (expr_mappings.get_hirid (),
*************** TypeCheckBase::parse_repr_options (const
*** 432,437 ****
--- 455,461 ----
  
  void
  TypeCheckBase::resolve_generic_params (
+   const HIR::Item::ItemKind item_kind, location_t item_locus,
    const std::vector<std::unique_ptr<HIR::GenericParam>> &generic_params,
    std::vector<TyTy::SubstitutionParamMapping> &substitutions, bool is_foreign,
    ABI abi)
*************** TypeCheckBase::resolve_generic_params (
*** 440,446 ****
      {
        switch (generic_param->get_kind ())
  	{
! 	  case HIR::GenericParam::GenericKind::LIFETIME: {
  	    auto lifetime_param
  	      = static_cast<HIR::LifetimeParam &> (*generic_param);
  	    auto lifetime = lifetime_param.get_lifetime ();
--- 464,471 ----
      {
        switch (generic_param->get_kind ())
  	{
! 	case HIR::GenericParam::GenericKind::LIFETIME:
! 	  {
  	    auto lifetime_param
  	      = static_cast<HIR::LifetimeParam &> (*generic_param);
  	    auto lifetime = lifetime_param.get_lifetime ();
*************** TypeCheckBase::resolve_generic_params (
*** 449,455 ****
  	  }
  	  break;
  
! 	  case HIR::GenericParam::GenericKind::CONST: {
  	    if (is_foreign && abi != Rust::ABI::INTRINSIC)
  	      {
  		rust_error_at (generic_param->get_locus (), ErrorCode::E0044,
--- 474,481 ----
  	  }
  	  break;
  
! 	case HIR::GenericParam::GenericKind::CONST:
! 	  {
  	    if (is_foreign && abi != Rust::ABI::INTRINSIC)
  	      {
  		rust_error_at (generic_param->get_locus (), ErrorCode::E0044,
*************** TypeCheckBase::resolve_generic_params (
*** 462,467 ****
--- 488,514 ----
  
  	    if (param.has_default_expression ())
  	      {
+ 		switch (item_kind)
+ 		  {
+ 		  case HIR::Item::ItemKind::Struct:
+ 		  case HIR::Item::ItemKind::Enum:
+ 		  case HIR::Item::ItemKind::TypeAlias:
+ 		  case HIR::Item::ItemKind::Trait:
+ 		  case HIR::Item::ItemKind::Union:
+ 		    break;
+ 
+ 		  default:
+ 		    {
+ 		      rich_location r (line_table, item_locus);
+ 		      r.add_fixit_remove (param.get_locus ());
+ 		      rust_error_at (
+ 			r,
+ 			"default values for const generic parameters are not "
+ 			"allowed here");
+ 		    }
+ 		    break;
+ 		  }
+ 
  		auto expr_type
  		  = TypeCheckExpr::Resolve (param.get_default_expression ());
  
*************** TypeCheckBase::resolve_generic_params (
*** 471,484 ****
  				 expr_type,
  				 param.get_default_expression ().get_locus ()),
  			       param.get_locus ());
  	      }
  
! 	    context->insert_type (generic_param->get_mappings (),
! 				  specified_type);
  	  }
  	  break;
  
! 	  case HIR::GenericParam::GenericKind::TYPE: {
  	    if (is_foreign && abi != Rust::ABI::INTRINSIC)
  	      {
  		rust_error_at (generic_param->get_locus (), ErrorCode::E0044,
--- 518,556 ----
  				 expr_type,
  				 param.get_default_expression ().get_locus ()),
  			       param.get_locus ());
+ 
+ 		// fold the default value
+ 		auto ctx = Compile::Context::get ();
+ 		auto &expr = param.get_default_expression ();
+ 		tree default_value
+ 		  = Compile::HIRCompileBase::query_compile_const_expr (
+ 		    ctx, specified_type, expr);
+ 
+ 		TyTy::ConstType *default_const_decl
+ 		  = new TyTy::ConstType (TyTy::ConstType::ConstKind::Value,
+ 					 param.get_name (), specified_type,
+ 					 default_value, {}, param.get_locus (),
+ 					 expr.get_mappings ().get_hirid (),
+ 					 expr.get_mappings ().get_hirid (), {});
+ 
+ 		context->insert_type (expr.get_mappings (), default_const_decl);
  	      }
  
! 	    TyTy::ConstType *const_decl
! 	      = new TyTy::ConstType (TyTy::ConstType::ConstKind::Decl,
! 				     param.get_name (), specified_type,
! 				     error_mark_node, {}, param.get_locus (),
! 				     param.get_mappings ().get_hirid (),
! 				     param.get_mappings ().get_hirid (), {});
! 
! 	    context->insert_type (generic_param->get_mappings (), const_decl);
! 	    TyTy::SubstitutionParamMapping p (*generic_param, const_decl);
! 	    substitutions.push_back (p);
  	  }
  	  break;
  
! 	case HIR::GenericParam::GenericKind::TYPE:
! 	  {
  	    if (is_foreign && abi != Rust::ABI::INTRINSIC)
  	      {
  		rust_error_at (generic_param->get_locus (), ErrorCode::E0044,
*************** TypeCheckBase::resolve_generic_params (
*** 489,496 ****
  	      *generic_param, false /*resolve_trait_bounds*/);
  	    context->insert_type (generic_param->get_mappings (), param_type);
  
! 	    auto &param = static_cast<HIR::TypeParam &> (*generic_param);
! 	    TyTy::SubstitutionParamMapping p (param, param_type);
  	    substitutions.push_back (p);
  	  }
  	  break;
--- 561,567 ----
  	      *generic_param, false /*resolve_trait_bounds*/);
  	    context->insert_type (generic_param->get_mappings (), param_type);
  
! 	    TyTy::SubstitutionParamMapping p (*generic_param, param_type);
  	    substitutions.push_back (p);
  	  }
  	  break;
*************** TypeCheckBase::resolve_generic_params (
*** 500,508 ****
    // now walk them to setup any specified type param bounds
    for (auto &subst : substitutions)
      {
!       auto pty = subst.get_param_ty ();
!       TypeResolveGenericParam::ApplyAnyTraitBounds (subst.get_generic_param (),
! 						    pty);
      }
  }
  
--- 571,586 ----
    // now walk them to setup any specified type param bounds
    for (auto &subst : substitutions)
      {
!       auto &generic = subst.get_generic_param ();
!       if (generic.get_kind () != HIR::GenericParam::GenericKind::TYPE)
! 	continue;
! 
!       auto &type_param = static_cast<HIR::TypeParam &> (generic);
!       auto bpty = subst.get_param_ty ();
!       rust_assert (bpty->get_kind () == TyTy::TypeKind::PARAM);
!       auto pty = static_cast<TyTy::ParamType *> (bpty);
! 
!       TypeResolveGenericParam::ApplyAnyTraitBounds (type_param, pty);
      }
  }
  
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-base.h gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-base.h
*** gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-base.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-base.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 33,38 ****
--- 33,39 ----
    virtual ~TypeCheckBase () {}
  
    static void ResolveGenericParams (
+     const HIR::Item::ItemKind item_kind, location_t item_locus,
      const std::vector<std::unique_ptr<HIR::GenericParam>> &generic_params,
      std::vector<TyTy::SubstitutionParamMapping> &substitutions, bool is_foreign,
      ABI abi);
*************** protected:
*** 46,58 ****
      HIR::TypePath &path,
      tl::optional<std::reference_wrapper<HIR::Type>> associated_self,
      BoundPolarity polarity = BoundPolarity::RegularBound,
!     bool is_qualified_type = false);
  
    bool check_for_unconstrained (
      const std::vector<TyTy::SubstitutionParamMapping> &params_to_constrain,
      const TyTy::SubstitutionArgumentMappings &constraint_a,
      const TyTy::SubstitutionArgumentMappings &constraint_b,
!     const TyTy::BaseType *reference);
  
    TyTy::BaseType *resolve_literal (const Analysis::NodeMapping &mappings,
  				   HIR::Literal &literal, location_t locus);
--- 47,59 ----
      HIR::TypePath &path,
      tl::optional<std::reference_wrapper<HIR::Type>> associated_self,
      BoundPolarity polarity = BoundPolarity::RegularBound,
!     bool is_qualified_type = false, bool is_super_trait = false);
  
    bool check_for_unconstrained (
      const std::vector<TyTy::SubstitutionParamMapping> &params_to_constrain,
      const TyTy::SubstitutionArgumentMappings &constraint_a,
      const TyTy::SubstitutionArgumentMappings &constraint_b,
!     TyTy::BaseType *reference);
  
    TyTy::BaseType *resolve_literal (const Analysis::NodeMapping &mappings,
  				   HIR::Literal &literal, location_t locus);
*************** protected:
*** 61,66 ****
--- 62,68 ----
  						 location_t locus);
  
    void resolve_generic_params (
+     const HIR::Item::ItemKind item_kind, location_t item_locus,
      const std::vector<std::unique_ptr<HIR::GenericParam>> &generic_params,
      std::vector<TyTy::SubstitutionParamMapping> &substitutions,
      bool is_foreign = false, ABI abi = ABI::RUST);
*************** protected:
*** 69,75 ****
  						 location_t locus);
  
    Analysis::Mappings &mappings;
-   Resolver *resolver;
    TypeCheckContext *context;
  };
  
--- 71,76 ----
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-enumitem.cc gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-enumitem.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-enumitem.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-enumitem.cc	Sun Aug 10 22:32:08 2025
***************
*** 23,31 ****
  #include "rust-type-util.h"
  #include "rust-immutable-name-resolution-context.h"
  
- // for flag_name_resolution_2_0
- #include "options.h"
- 
  namespace Rust {
  namespace Resolver {
  
--- 23,28 ----
*************** TypeCheckEnumItem::visit (HIR::EnumItem
*** 79,103 ****
    rust_assert (ok);
    context->insert_type (mapping, isize);
  
!   tl::optional<CanonicalPath> canonical_path;
! 
!   if (flag_name_resolution_2_0)
!     {
!       auto &nr_ctx
! 	= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
! 
!       canonical_path
! 	= nr_ctx.types.to_canonical_path (item.get_mappings ().get_nodeid ());
!     }
!   else
!     {
!       canonical_path
! 	= mappings.lookup_canonical_path (item.get_mappings ().get_nodeid ());
!     }
  
!   rust_assert (canonical_path.has_value ());
  
!   RustIdent ident{*canonical_path, item.get_locus ()};
    variant = new TyTy::VariantDef (item.get_mappings ().get_hirid (),
  				  item.get_mappings ().get_defid (),
  				  item.get_identifier ().as_string (), ident,
--- 76,88 ----
    rust_assert (ok);
    context->insert_type (mapping, isize);
  
!   auto &nr_ctx
!     = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!   CanonicalPath canonical_path
!     = nr_ctx.to_canonical_path (item.get_mappings ().get_nodeid ());
  
!   RustIdent ident{canonical_path, item.get_locus ()};
    variant = new TyTy::VariantDef (item.get_mappings ().get_hirid (),
  				  item.get_mappings ().get_defid (),
  				  item.get_identifier ().as_string (), ident,
*************** TypeCheckEnumItem::visit (HIR::EnumItemD
*** 123,147 ****
  	      TyTy::TyWithLocation (expected_ty),
  	      TyTy::TyWithLocation (capacity_type), item.get_locus ());
  
!   tl::optional<CanonicalPath> canonical_path;
! 
!   if (flag_name_resolution_2_0)
!     {
!       auto &nr_ctx
! 	= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
! 
!       canonical_path
! 	= nr_ctx.types.to_canonical_path (item.get_mappings ().get_nodeid ());
!     }
!   else
!     {
!       canonical_path
! 	= mappings.lookup_canonical_path (item.get_mappings ().get_nodeid ());
!     }
  
!   rust_assert (canonical_path.has_value ());
  
!   RustIdent ident{*canonical_path, item.get_locus ()};
    variant
      = new TyTy::VariantDef (item.get_mappings ().get_hirid (),
  			    item.get_mappings ().get_defid (),
--- 108,120 ----
  	      TyTy::TyWithLocation (expected_ty),
  	      TyTy::TyWithLocation (capacity_type), item.get_locus ());
  
!   auto &nr_ctx
!     = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!   CanonicalPath canonical_path
!     = nr_ctx.to_canonical_path (item.get_mappings ().get_nodeid ());
  
!   RustIdent ident{canonical_path, item.get_locus ()};
    variant
      = new TyTy::VariantDef (item.get_mappings ().get_hirid (),
  			    item.get_mappings ().get_defid (),
*************** TypeCheckEnumItem::visit (HIR::EnumItemT
*** 185,209 ****
    rust_assert (ok);
    context->insert_type (mapping, isize);
  
!   tl::optional<CanonicalPath> canonical_path;
! 
!   if (flag_name_resolution_2_0)
!     {
!       auto &nr_ctx
! 	= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
! 
!       canonical_path
! 	= nr_ctx.types.to_canonical_path (item.get_mappings ().get_nodeid ());
!     }
!   else
!     {
!       canonical_path
! 	= mappings.lookup_canonical_path (item.get_mappings ().get_nodeid ());
!     }
  
!   rust_assert (canonical_path.has_value ());
  
!   RustIdent ident{*canonical_path, item.get_locus ()};
    variant = new TyTy::VariantDef (item.get_mappings ().get_hirid (),
  				  item.get_mappings ().get_defid (),
  				  item.get_identifier ().as_string (), ident,
--- 158,170 ----
    rust_assert (ok);
    context->insert_type (mapping, isize);
  
!   auto &nr_ctx
!     = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!   CanonicalPath canonical_path
!     = nr_ctx.to_canonical_path (item.get_mappings ().get_nodeid ());
  
!   RustIdent ident{canonical_path, item.get_locus ()};
    variant = new TyTy::VariantDef (item.get_mappings ().get_hirid (),
  				  item.get_mappings ().get_defid (),
  				  item.get_identifier ().as_string (), ident,
*************** TypeCheckEnumItem::visit (HIR::EnumItemS
*** 245,269 ****
    rust_assert (ok);
    context->insert_type (mapping, isize);
  
!   tl::optional<CanonicalPath> canonical_path;
! 
!   if (flag_name_resolution_2_0)
!     {
!       auto &nr_ctx
! 	= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
! 
!       canonical_path
! 	= nr_ctx.types.to_canonical_path (item.get_mappings ().get_nodeid ());
!     }
!   else
!     {
!       canonical_path
! 	= mappings.lookup_canonical_path (item.get_mappings ().get_nodeid ());
!     }
  
!   rust_assert (canonical_path.has_value ());
  
!   RustIdent ident{*canonical_path, item.get_locus ()};
    variant = new TyTy::VariantDef (item.get_mappings ().get_hirid (),
  				  item.get_mappings ().get_defid (),
  				  item.get_identifier ().as_string (), ident,
--- 206,218 ----
    rust_assert (ok);
    context->insert_type (mapping, isize);
  
!   auto &nr_ctx
!     = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!   CanonicalPath canonical_path
!     = nr_ctx.to_canonical_path (item.get_mappings ().get_nodeid ());
  
!   RustIdent ident{canonical_path, item.get_locus ()};
    variant = new TyTy::VariantDef (item.get_mappings ().get_hirid (),
  				  item.get_mappings ().get_defid (),
  				  item.get_identifier ().as_string (), ident,
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-expr.cc gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-expr.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-expr.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-expr.cc	Sun Aug 10 22:32:08 2025
***************
*** 17,22 ****
--- 17,23 ----
  // <http://www.gnu.org/licenses/>.
  
  #include "optional.h"
+ #include "rust-common.h"
  #include "rust-hir-expr.h"
  #include "rust-system.h"
  #include "rust-tyty-call.h"
***************
*** 31,39 ****
  #include "rust-hir-type-check-item.h"
  #include "rust-type-util.h"
  #include "rust-immutable-name-resolution-context.h"
! 
! // for flag_name_resolution_2_0
! #include "options.h"
  
  namespace Rust {
  namespace Resolver {
--- 32,40 ----
  #include "rust-hir-type-check-item.h"
  #include "rust-type-util.h"
  #include "rust-immutable-name-resolution-context.h"
! #include "rust-compile-base.h"
! #include "rust-tyty-util.h"
! #include "tree.h"
  
  namespace Rust {
  namespace Resolver {
*************** TypeCheckExpr::Resolve (HIR::Expr &expr)
*** 58,63 ****
--- 59,77 ----
    return resolver.infered;
  }
  
+ TyTy::BaseType *
+ TypeCheckExpr::ResolveOpOverload (LangItem::Kind lang_item_type,
+ 				  HIR::OperatorExprMeta expr,
+ 				  TyTy::BaseType *lhs, TyTy::BaseType *rhs,
+ 				  HIR::PathIdentSegment specified_segment)
+ {
+   TypeCheckExpr resolver;
+ 
+   resolver.resolve_operator_overload (lang_item_type, expr, lhs, rhs,
+ 				      specified_segment);
+   return resolver.infered;
+ }
+ 
  void
  TypeCheckExpr::visit (HIR::TupleIndexExpr &expr)
  {
*************** TypeCheckExpr::visit (HIR::ArithmeticOrL
*** 373,379 ****
    switch (expr.get_expr_type ())
      {
      case ArithmeticOrLogicalOperator::LEFT_SHIFT:
!       case ArithmeticOrLogicalOperator::RIGHT_SHIFT: {
  	TyTy::TyWithLocation from (rhs, expr.get_rhs ().get_locus ());
  	TyTy::TyWithLocation to (lhs, expr.get_lhs ().get_locus ());
  	infered = cast_site (expr.get_mappings ().get_hirid (), from, to,
--- 387,394 ----
    switch (expr.get_expr_type ())
      {
      case ArithmeticOrLogicalOperator::LEFT_SHIFT:
!     case ArithmeticOrLogicalOperator::RIGHT_SHIFT:
!       {
  	TyTy::TyWithLocation from (rhs, expr.get_rhs ().get_locus ());
  	TyTy::TyWithLocation to (lhs, expr.get_lhs ().get_locus ());
  	infered = cast_site (expr.get_mappings ().get_hirid (), from, to,
*************** TypeCheckExpr::visit (HIR::ArithmeticOrL
*** 381,387 ****
        }
        break;
  
!       default: {
  	infered = unify_site (
  	  expr.get_mappings ().get_hirid (),
  	  TyTy::TyWithLocation (lhs, expr.get_lhs ().get_locus ()),
--- 396,403 ----
        }
        break;
  
!     default:
!       {
  	infered = unify_site (
  	  expr.get_mappings ().get_hirid (),
  	  TyTy::TyWithLocation (lhs, expr.get_lhs ().get_locus ()),
*************** TypeCheckExpr::visit (HIR::NegationExpr
*** 470,476 ****
    // https://doc.rust-lang.org/reference/expressions/operator-expr.html#negation-operators
    switch (expr.get_expr_type ())
      {
!       case NegationOperator::NEGATE: {
  	bool valid
  	  = (negated_expr_ty->get_kind () == TyTy::TypeKind::INT)
  	    || (negated_expr_ty->get_kind () == TyTy::TypeKind::UINT)
--- 486,493 ----
    // https://doc.rust-lang.org/reference/expressions/operator-expr.html#negation-operators
    switch (expr.get_expr_type ())
      {
!     case NegationOperator::NEGATE:
!       {
  	bool valid
  	  = (negated_expr_ty->get_kind () == TyTy::TypeKind::INT)
  	    || (negated_expr_ty->get_kind () == TyTy::TypeKind::UINT)
*************** TypeCheckExpr::visit (HIR::NegationExpr
*** 492,498 ****
        }
        break;
  
!       case NegationOperator::NOT: {
  	bool valid
  	  = (negated_expr_ty->get_kind () == TyTy::TypeKind::BOOL)
  	    || (negated_expr_ty->get_kind () == TyTy::TypeKind::INT)
--- 509,516 ----
        }
        break;
  
!     case NegationOperator::NOT:
!       {
  	bool valid
  	  = (negated_expr_ty->get_kind () == TyTy::TypeKind::BOOL)
  	    || (negated_expr_ty->get_kind () == TyTy::TypeKind::INT)
*************** TypeCheckExpr::visit (HIR::BlockExpr &ex
*** 643,648 ****
--- 661,693 ----
  }
  
  void
+ TypeCheckExpr::visit (HIR::AnonConst &expr)
+ {
+   if (!expr.is_deferred ())
+     {
+       infered = TypeCheckExpr::Resolve (expr.get_inner_expr ());
+       return;
+     }
+ 
+   auto locus = expr.get_locus ();
+   auto infer_ty_var = TyTy::TyVar::get_implicit_infer_var (locus);
+ 
+   HirId next = mappings.get_next_hir_id ();
+   infered = new TyTy::ConstType (TyTy::ConstType::ConstKind::Infer, "",
+ 				 infer_ty_var.get_tyty (), error_mark_node, {},
+ 				 locus, next, next, {});
+ 
+   context->insert_implicit_type (infered->get_ref (), infered);
+   mappings.insert_location (infered->get_ref (), locus);
+ }
+ 
+ void
+ TypeCheckExpr::visit (HIR::ConstBlock &expr)
+ {
+   infered = TypeCheckExpr::Resolve (expr.get_const_expr ());
+ }
+ 
+ void
  TypeCheckExpr::visit (HIR::RangeFromToExpr &expr)
  {
    auto lang_item_type = LangItem::Kind::RANGE;
*************** typecheck_inline_asm_operand (HIR::Inlin
*** 790,827 ****
      {
        switch (operand.get_register_type ())
  	{
! 	  case RegisterType::In: {
  	    auto in = operand.get_in ();
  	    TypeCheckExpr::Resolve (*in.expr);
  	    break;
  	  }
! 	  case RegisterType::Out: {
  	    auto out = operand.get_out ();
  	    TypeCheckExpr::Resolve (*out.expr);
  	    break;
  	  }
! 	  case RegisterType::InOut: {
  	    auto in_out = operand.get_in_out ();
  	    TypeCheckExpr::Resolve (*in_out.expr);
  	    break;
  	  }
! 	  case RegisterType::SplitInOut: {
  	    auto split_in_out = operand.get_split_in_out ();
  	    TypeCheckExpr::Resolve (*split_in_out.in_expr);
  	    TypeCheckExpr::Resolve (*split_in_out.out_expr);
  	    break;
  	  }
! 	  case RegisterType::Const: {
  	    auto anon_const = operand.get_const ().anon_const;
! 	    TypeCheckExpr::Resolve (*anon_const.expr);
  	    break;
  	  }
! 	  case RegisterType::Sym: {
  	    auto sym = operand.get_sym ();
  	    TypeCheckExpr::Resolve (*sym.expr);
  	    break;
  	  }
! 	  case RegisterType::Label: {
  	    auto label = operand.get_label ();
  	    TypeCheckExpr::Resolve (*label.expr);
  	    break;
--- 835,879 ----
      {
        switch (operand.get_register_type ())
  	{
! 	case RegisterType::In:
! 	  {
  	    auto in = operand.get_in ();
  	    TypeCheckExpr::Resolve (*in.expr);
  	    break;
  	  }
! 	case RegisterType::Out:
! 	  {
  	    auto out = operand.get_out ();
  	    TypeCheckExpr::Resolve (*out.expr);
  	    break;
  	  }
! 	case RegisterType::InOut:
! 	  {
  	    auto in_out = operand.get_in_out ();
  	    TypeCheckExpr::Resolve (*in_out.expr);
  	    break;
  	  }
! 	case RegisterType::SplitInOut:
! 	  {
  	    auto split_in_out = operand.get_split_in_out ();
  	    TypeCheckExpr::Resolve (*split_in_out.in_expr);
  	    TypeCheckExpr::Resolve (*split_in_out.out_expr);
  	    break;
  	  }
! 	case RegisterType::Const:
! 	  {
  	    auto anon_const = operand.get_const ().anon_const;
! 	    TypeCheckExpr::Resolve (anon_const.get_inner_expr ());
  	    break;
  	  }
! 	case RegisterType::Sym:
! 	  {
  	    auto sym = operand.get_sym ();
  	    TypeCheckExpr::Resolve (*sym.expr);
  	    break;
  	  }
! 	case RegisterType::Label:
! 	  {
  	    auto label = operand.get_label ();
  	    TypeCheckExpr::Resolve (*label.expr);
  	    break;
*************** TypeCheckExpr::visit (HIR::InlineAsm &ex
*** 837,843 ****
    // NOTE: Hoise out if we have noreturn as an option
    // to return a never type
    // TODO : new keyword for memory seems sooooo shaky
!   if (expr.options.count (AST::InlineAsmOption::NORETURN) == 1)
      infered = new TyTy::NeverType (expr.get_mappings ().get_hirid ());
    else
      infered = TyTy::TupleType::get_unit_type ();
--- 889,895 ----
    // NOTE: Hoise out if we have noreturn as an option
    // to return a never type
    // TODO : new keyword for memory seems sooooo shaky
!   if (expr.options.count (AST::InlineAsm::Option::NORETURN) == 1)
      infered = new TyTy::NeverType (expr.get_mappings ().get_hirid ());
    else
      infered = TyTy::TupleType::get_unit_type ();
*************** TypeCheckExpr::visit (HIR::LlvmInlineAsm
*** 857,862 ****
--- 909,927 ----
  }
  
  void
+ TypeCheckExpr::visit (HIR::OffsetOf &expr)
+ {
+   TypeCheckType::Resolve (expr.get_type ());
+ 
+   // FIXME: Does offset_of always return a usize?
+   TyTy::BaseType *size_ty;
+   bool ok = context->lookup_builtin ("usize", &size_ty);
+   rust_assert (ok);
+ 
+   infered = size_ty;
+ }
+ 
+ void
  TypeCheckExpr::visit (HIR::RangeFullExpr &expr)
  {
    auto lang_item_type = LangItem::Kind::RANGE_FULL;
*************** TypeCheckExpr::visit (HIR::ArrayIndexExp
*** 960,966 ****
    bool ok = context->lookup_builtin ("usize", &size_ty);
    rust_assert (ok);
  
!   bool maybe_simple_array_access = index_expr_ty->can_eq (size_ty, false);
    if (maybe_simple_array_access
        && direct_array_expr_ty->get_kind () == TyTy::TypeKind::ARRAY)
      {
--- 1025,1034 ----
    bool ok = context->lookup_builtin ("usize", &size_ty);
    rust_assert (ok);
  
!   bool maybe_simple_array_access
!     = types_compatable (TyTy::TyWithLocation (index_expr_ty),
! 			TyTy::TyWithLocation (size_ty), expr.get_locus (),
! 			false);
    if (maybe_simple_array_access
        && direct_array_expr_ty->get_kind () == TyTy::TypeKind::ARRAY)
      {
*************** TypeCheckExpr::visit (HIR::ArrayIndexExp
*** 996,1003 ****
    rich_location r (line_table, expr.get_locus ());
    r.add_range (expr.get_array_expr ().get_locus ());
    r.add_range (expr.get_index_expr ().get_locus ());
!   rust_error_at (r, ErrorCode::E0277,
! 		 "the type %qs cannot be indexed by %qs",
  		 array_expr_ty->get_name ().c_str (),
  		 index_expr_ty->get_name ().c_str ());
  }
--- 1064,1070 ----
    rich_location r (line_table, expr.get_locus ());
    r.add_range (expr.get_array_expr ().get_locus ());
    r.add_range (expr.get_index_expr ().get_locus ());
!   rust_error_at (r, ErrorCode::E0277, "the type %qs cannot be indexed by %qs",
  		 array_expr_ty->get_name ().c_str (),
  		 index_expr_ty->get_name ().c_str ());
  }
*************** TypeCheckExpr::visit (HIR::ArrayExpr &ex
*** 1007,1041 ****
  {
    auto &elements = expr.get_internal_elements ();
  
    HIR::Expr *capacity_expr = nullptr;
    TyTy::BaseType *element_type = nullptr;
    switch (elements.get_array_expr_type ())
      {
!       case HIR::ArrayElems::ArrayExprType::COPIED: {
  	HIR::ArrayElemsCopied &elems
  	  = static_cast<HIR::ArrayElemsCopied &> (elements);
  	element_type = TypeCheckExpr::Resolve (elems.get_elem_to_copy ());
  
! 	auto capacity_type
  	  = TypeCheckExpr::Resolve (elems.get_num_copies_expr ());
  
- 	TyTy::BaseType *expected_ty = nullptr;
- 	bool ok = context->lookup_builtin ("usize", &expected_ty);
- 	rust_assert (ok);
  	context->insert_type (elems.get_num_copies_expr ().get_mappings (),
  			      expected_ty);
  
! 	unify_site (expr.get_mappings ().get_hirid (),
! 		    TyTy::TyWithLocation (expected_ty),
! 		    TyTy::TyWithLocation (
! 		      capacity_type, elems.get_num_copies_expr ().get_locus ()),
! 		    expr.get_locus ());
  
  	capacity_expr = &elems.get_num_copies_expr ();
        }
        break;
  
!       case HIR::ArrayElems::ArrayExprType::VALUES: {
  	HIR::ArrayElemsValues &elems
  	  = static_cast<HIR::ArrayElemsValues &> (elements);
  
--- 1074,1113 ----
  {
    auto &elements = expr.get_internal_elements ();
  
+   TyTy::BaseType *expected_ty = nullptr;
+   bool ok = context->lookup_builtin ("usize", &expected_ty);
+   rust_assert (ok);
+ 
    HIR::Expr *capacity_expr = nullptr;
    TyTy::BaseType *element_type = nullptr;
+   TyTy::BaseType *capacity_type = nullptr;
    switch (elements.get_array_expr_type ())
      {
!     case HIR::ArrayElems::ArrayExprType::COPIED:
!       {
  	HIR::ArrayElemsCopied &elems
  	  = static_cast<HIR::ArrayElemsCopied &> (elements);
  	element_type = TypeCheckExpr::Resolve (elems.get_elem_to_copy ());
  
! 	auto capacity_expr_ty
  	  = TypeCheckExpr::Resolve (elems.get_num_copies_expr ());
  
  	context->insert_type (elems.get_num_copies_expr ().get_mappings (),
  			      expected_ty);
  
! 	unify_site (
! 	  expr.get_mappings ().get_hirid (), TyTy::TyWithLocation (expected_ty),
! 	  TyTy::TyWithLocation (capacity_expr_ty,
! 				elems.get_num_copies_expr ().get_locus ()),
! 	  expr.get_locus ());
  
  	capacity_expr = &elems.get_num_copies_expr ();
+ 	capacity_type = expected_ty;
        }
        break;
  
!     case HIR::ArrayElems::ArrayExprType::VALUES:
!       {
  	HIR::ArrayElemsValues &elems
  	  = static_cast<HIR::ArrayElemsValues &> (elements);
  
*************** TypeCheckExpr::visit (HIR::ArrayExpr &ex
*** 1068,1084 ****
  					      UNDEF_LOCATION, {});
  
  	// mark the type for this implicit node
- 	TyTy::BaseType *expected_ty = nullptr;
- 	bool ok = context->lookup_builtin ("usize", &expected_ty);
- 	rust_assert (ok);
  	context->insert_type (mapping, expected_ty);
        }
        break;
      }
  
!   infered = new TyTy::ArrayType (expr.get_mappings ().get_hirid (),
! 				 expr.get_locus (), *capacity_expr,
! 				 TyTy::TyVar (element_type->get_ref ()));
  }
  
  // empty struct
--- 1140,1165 ----
  					      UNDEF_LOCATION, {});
  
  	// mark the type for this implicit node
  	context->insert_type (mapping, expected_ty);
+ 	capacity_type = expected_ty;
        }
        break;
      }
  
!   rust_assert (capacity_expr);
!   rust_assert (capacity_type);
!   auto ctx = Compile::Context::get ();
!   tree capacity_value
!     = Compile::HIRCompileBase::query_compile_const_expr (ctx, capacity_type,
! 							 *capacity_expr);
!   HirId size_id = capacity_expr->get_mappings ().get_hirid ();
!   TyTy::ConstType *const_type
!     = new TyTy::ConstType (TyTy::ConstType::ConstKind::Value, "", expected_ty,
! 			   capacity_value, {}, capacity_expr->get_locus (),
! 			   size_id, size_id);
!   infered
!     = new TyTy::ArrayType (expr.get_mappings ().get_hirid (), expr.get_locus (),
! 			   const_type, TyTy::TyVar (element_type->get_ref ()));
  }
  
  // empty struct
*************** TypeCheckExpr::visit (HIR::MethodCallExp
*** 1408,1433 ****
    // store the expected fntype
    context->insert_type (expr.get_method_name ().get_mappings (), lookup);
  
!   if (flag_name_resolution_2_0)
!     {
!       auto &nr_ctx = const_cast<Resolver2_0::NameResolutionContext &> (
! 	Resolver2_0::ImmutableNameResolutionContext::get ().resolver ());
  
!       nr_ctx.map_usage (Resolver2_0::Usage (expr.get_mappings ().get_nodeid ()),
! 			Resolver2_0::Definition (resolved_node_id));
!     }
!   // set up the resolved name on the path
!   else if (resolver->get_name_scope ().decl_was_declared_here (
! 	     resolved_node_id))
!     {
!       resolver->insert_resolved_name (expr.get_mappings ().get_nodeid (),
! 				      resolved_node_id);
!     }
!   else
!     {
!       resolver->insert_resolved_misc (expr.get_mappings ().get_nodeid (),
! 				      resolved_node_id);
!     }
  
    // return the result of the function back
    infered = function_ret_tyty;
--- 1489,1499 ----
    // store the expected fntype
    context->insert_type (expr.get_method_name ().get_mappings (), lookup);
  
!   auto &nr_ctx = const_cast<Resolver2_0::NameResolutionContext &> (
!     Resolver2_0::ImmutableNameResolutionContext::get ().resolver ());
  
!   nr_ctx.map_usage (Resolver2_0::Usage (expr.get_mappings ().get_nodeid ()),
! 		    Resolver2_0::Definition (resolved_node_id));
  
    // return the result of the function back
    infered = function_ret_tyty;
*************** TypeCheckExpr::visit (HIR::MatchExpr &ex
*** 1702,1717 ****
  void
  TypeCheckExpr::visit (HIR::ClosureExpr &expr)
  {
!   TypeCheckContextItem current_context = context->peek_context ();
!   TyTy::FnType *current_context_fndecl = current_context.get_context_type ();
! 
    HirId ref = expr.get_mappings ().get_hirid ();
    DefId id = expr.get_mappings ().get_defid ();
!   RustIdent ident{current_context_fndecl->get_ident ().path, expr.get_locus ()};
  
!   // get from parent context
!   std::vector<TyTy::SubstitutionParamMapping> subst_refs
!     = current_context_fndecl->clone_substs ();
  
    std::vector<TyTy::TyVar> parameter_types;
    for (auto &p : expr.get_params ())
--- 1768,1789 ----
  void
  TypeCheckExpr::visit (HIR::ClosureExpr &expr)
  {
!   std::vector<TyTy::SubstitutionParamMapping> subst_refs;
    HirId ref = expr.get_mappings ().get_hirid ();
    DefId id = expr.get_mappings ().get_defid ();
!   RustIdent ident{CanonicalPath::create_empty (), expr.get_locus ()};
  
!   if (context->have_function_context ())
!     {
!       TypeCheckContextItem current_context = context->peek_context ();
!       TyTy::FnType *current_context_fndecl
! 	= current_context.get_context_type ();
! 
!       ident = RustIdent{current_context_fndecl->get_ident ().path,
! 			expr.get_locus ()};
! 
!       subst_refs = current_context_fndecl->clone_substs ();
!     }
  
    std::vector<TyTy::TyVar> parameter_types;
    for (auto &p : expr.get_params ())
*************** TypeCheckExpr::visit (HIR::ClosureExpr &
*** 1763,1781 ****
    // Resolve closure captures
  
    std::set<NodeId> captures;
!   if (flag_name_resolution_2_0)
!     {
!       auto &nr_ctx = const_cast<Resolver2_0::NameResolutionContext &> (
! 	Resolver2_0::ImmutableNameResolutionContext::get ().resolver ());
  
!       if (auto opt_cap = nr_ctx.mappings.lookup_captures (closure_node_id))
! 	for (auto cap : opt_cap.value ())
! 	  captures.insert (cap);
!     }
!   else
!     {
!       captures = resolver->get_captures (closure_node_id);
!     }
  
    infered = new TyTy::ClosureType (ref, id, ident, closure_args, result_type,
  				   subst_refs, captures);
--- 1835,1846 ----
    // Resolve closure captures
  
    std::set<NodeId> captures;
!   auto &nr_ctx = const_cast<Resolver2_0::NameResolutionContext &> (
!     Resolver2_0::ImmutableNameResolutionContext::get ().resolver ());
  
!   if (auto opt_cap = nr_ctx.mappings.lookup_captures (closure_node_id))
!     for (auto cap : opt_cap.value ())
!       captures.insert (cap);
  
    infered = new TyTy::ClosureType (ref, id, ident, closure_args, result_type,
  				   subst_refs, captures);
*************** TypeCheckExpr::visit (HIR::ClosureExpr &
*** 1826,1832 ****
    args.get_type_args ().push_back (std::unique_ptr<HIR::Type> (implicit_tuple));
  
    // apply the arguments
!   predicate.apply_generic_arguments (&args, false);
  
    // finally inherit the trait bound
    infered->inherit_bounds ({predicate});
--- 1891,1897 ----
    args.get_type_args ().push_back (std::unique_ptr<HIR::Type> (implicit_tuple));
  
    // apply the arguments
!   predicate.apply_generic_arguments (&args, false, false);
  
    // finally inherit the trait bound
    infered->inherit_bounds ({predicate});
*************** TypeCheckExpr::resolve_operator_overload
*** 1845,1851 ****
--- 1910,1925 ----
    // probe for the lang-item
    if (!lang_item_defined)
      return false;
+ 
    DefId &respective_lang_item_id = lang_item_defined.value ();
+   auto def_lookup = mappings.lookup_defid (respective_lang_item_id);
+   rust_assert (def_lookup.has_value ());
+ 
+   HIR::Item *def_item = def_lookup.value ();
+   rust_assert (def_item->get_item_kind () == HIR::Item::ItemKind::Trait);
+   HIR::Trait &trait = *static_cast<HIR::Trait *> (def_item);
+   TraitReference *defid_trait_reference = TraitResolver::Resolve (trait);
+   rust_assert (!defid_trait_reference->is_error ());
  
    // we might be in a static or const context and unknown is fine
    TypeCheckContextItem current_context = TypeCheckContextItem::get_error ();
*************** TypeCheckExpr::resolve_operator_overload
*** 1889,1903 ****
  
    if (selected_candidates.size () > 1)
      {
!       // mutliple candidates
!       rich_location r (line_table, expr.get_locus ());
!       for (auto &c : resolved_candidates)
! 	r.add_range (c.candidate.locus);
  
!       rust_error_at (
! 	r, "multiple candidates found for possible operator overload");
  
!       return false;
      }
  
    // Get the adjusted self
--- 1963,2011 ----
  
    if (selected_candidates.size () > 1)
      {
!       auto infer
! 	= TyTy::TyVar::get_implicit_infer_var (expr.get_locus ()).get_tyty ();
!       auto trait_subst = defid_trait_reference->get_trait_substs ();
!       rust_assert (trait_subst.size () > 0);
  
!       TyTy::TypeBoundPredicate pred (respective_lang_item_id, trait_subst,
! 				     BoundPolarity::RegularBound,
! 				     expr.get_locus ());
  
!       std::vector<TyTy::SubstitutionArg> mappings;
!       auto &self_param_mapping = trait_subst[0];
!       mappings.push_back (TyTy::SubstitutionArg (&self_param_mapping, lhs));
! 
!       if (rhs != nullptr)
! 	{
! 	  rust_assert (trait_subst.size () == 2);
! 	  auto &rhs_param_mapping = trait_subst[1];
! 	  mappings.push_back (TyTy::SubstitutionArg (&rhs_param_mapping, lhs));
! 	}
! 
!       std::map<std::string, TyTy::BaseType *> binding_args;
!       binding_args["Output"] = infer;
! 
!       TyTy::SubstitutionArgumentMappings arg_mappings (mappings, binding_args,
! 						       TyTy::RegionParamList (
! 							 trait_subst.size ()),
! 						       expr.get_locus ());
!       pred.apply_argument_mappings (arg_mappings, false);
! 
!       infer->inherit_bounds ({pred});
!       DeferredOpOverload defer (expr.get_mappings ().get_hirid (),
! 				lang_item_type, specified_segment, pred, expr);
!       context->insert_deferred_operator_overload (std::move (defer));
! 
!       if (rhs != nullptr)
! 	lhs = unify_site (expr.get_mappings ().get_hirid (),
! 			  TyTy::TyWithLocation (lhs),
! 			  TyTy::TyWithLocation (rhs), expr.get_locus ());
! 
!       infered = unify_site (expr.get_mappings ().get_hirid (),
! 			    TyTy::TyWithLocation (lhs),
! 			    TyTy::TyWithLocation (infer), expr.get_locus ());
!       return true;
      }
  
    // Get the adjusted self
*************** TypeCheckExpr::resolve_operator_overload
*** 2040,2058 ****
    context->insert_operator_overload (expr.get_mappings ().get_hirid (), type);
  
    // set up the resolved name on the path
!   if (flag_name_resolution_2_0)
!     {
!       auto &nr_ctx = const_cast<Resolver2_0::NameResolutionContext &> (
! 	Resolver2_0::ImmutableNameResolutionContext::get ().resolver ());
  
!       nr_ctx.map_usage (Resolver2_0::Usage (expr.get_mappings ().get_nodeid ()),
! 			Resolver2_0::Definition (resolved_node_id));
!     }
!   else
!     {
!       resolver->insert_resolved_name (expr.get_mappings ().get_nodeid (),
! 				      resolved_node_id);
!     }
  
    // return the result of the function back
    infered = function_ret_tyty;
--- 2148,2158 ----
    context->insert_operator_overload (expr.get_mappings ().get_hirid (), type);
  
    // set up the resolved name on the path
!   auto &nr_ctx = const_cast<Resolver2_0::NameResolutionContext &> (
!     Resolver2_0::ImmutableNameResolutionContext::get ().resolver ());
  
!   nr_ctx.map_usage (Resolver2_0::Usage (expr.get_mappings ().get_nodeid ()),
! 		    Resolver2_0::Definition (resolved_node_id));
  
    // return the result of the function back
    infered = function_ret_tyty;
*************** TypeCheckExpr::resolve_operator_overload
*** 2062,2077 ****
  
  HIR::PathIdentSegment
  TypeCheckExpr::resolve_possible_fn_trait_call_method_name (
!   TyTy::BaseType &receiver, TyTy::TypeBoundPredicate *associated_predicate)
  {
-   // Question
-   // do we need to probe possible bounds here? I think not, i think when we
-   // support Fn traits they are explicitly specified
- 
    // FIXME
    // the logic to map the FnTrait to their respective call trait-item is
    // duplicated over in the backend/rust-compile-expr.cc
!   for (auto &bound : receiver.get_specified_bounds ())
      {
        bool found_fn = bound.get_name ().compare ("Fn") == 0;
        bool found_fn_mut = bound.get_name ().compare ("FnMut") == 0;
--- 2162,2174 ----
  
  HIR::PathIdentSegment
  TypeCheckExpr::resolve_possible_fn_trait_call_method_name (
!   const TyTy::BaseType &receiver,
!   TyTy::TypeBoundPredicate *associated_predicate)
  {
    // FIXME
    // the logic to map the FnTrait to their respective call trait-item is
    // duplicated over in the backend/rust-compile-expr.cc
!   for (const auto &bound : receiver.get_specified_bounds ())
      {
        bool found_fn = bound.get_name ().compare ("Fn") == 0;
        bool found_fn_mut = bound.get_name ().compare ("FnMut") == 0;
*************** TypeCheckExpr::resolve_possible_fn_trait
*** 2094,2099 ****
--- 2191,2224 ----
  	}
      }
  
+   if (receiver.is<TyTy::ReferenceType> ())
+     {
+       const auto &ref = static_cast<const TyTy::ReferenceType &> (receiver);
+       const auto &underlying = *ref.get_base ();
+       for (const auto &bound : underlying.get_specified_bounds ())
+ 	{
+ 	  bool found_fn = bound.get_name ().compare ("Fn") == 0;
+ 	  bool found_fn_mut = bound.get_name ().compare ("FnMut") == 0;
+ 	  bool found_fn_once = bound.get_name ().compare ("FnOnce") == 0;
+ 
+ 	  if (found_fn)
+ 	    {
+ 	      *associated_predicate = bound;
+ 	      return HIR::PathIdentSegment ("call");
+ 	    }
+ 	  else if (found_fn_mut)
+ 	    {
+ 	      *associated_predicate = bound;
+ 	      return HIR::PathIdentSegment ("call_mut");
+ 	    }
+ 	  else if (found_fn_once)
+ 	    {
+ 	      *associated_predicate = bound;
+ 	      return HIR::PathIdentSegment ("call_once");
+ 	    }
+ 	}
+     }
+ 
    // nothing
    *associated_predicate = TyTy::TypeBoundPredicate::error ();
    return HIR::PathIdentSegment ("");
*************** TypeCheckExpr::resolve_fn_trait_call (HI
*** 2220,2251 ****
    context->insert_operator_overload (expr.get_mappings ().get_hirid (), fn);
  
    // set up the resolved name on the path
!   if (flag_name_resolution_2_0)
!     {
!       auto &nr_ctx = const_cast<Resolver2_0::NameResolutionContext &> (
! 	Resolver2_0::ImmutableNameResolutionContext::get ().resolver ());
  
!       auto existing = nr_ctx.lookup (expr.get_mappings ().get_nodeid ());
!       if (existing)
! 	rust_assert (*existing == resolved_node_id);
!       else
! 	nr_ctx.map_usage (Resolver2_0::Usage (
! 			    expr.get_mappings ().get_nodeid ()),
! 			  Resolver2_0::Definition (resolved_node_id));
!     }
    else
!     {
!       NodeId existing = UNKNOWN_NODEID;
!       bool ok
! 	= resolver->lookup_resolved_name (expr.get_mappings ().get_nodeid (),
! 					  &existing);
! 
!       if (ok)
! 	rust_assert (existing == resolved_node_id);
!       else
! 	resolver->insert_resolved_name (expr.get_mappings ().get_nodeid (),
! 					resolved_node_id);
!     }
  
    // return the result of the function back
    *result = function_ret_tyty;
--- 2345,2359 ----
    context->insert_operator_overload (expr.get_mappings ().get_hirid (), fn);
  
    // set up the resolved name on the path
!   auto &nr_ctx = const_cast<Resolver2_0::NameResolutionContext &> (
!     Resolver2_0::ImmutableNameResolutionContext::get ().resolver ());
  
!   auto existing = nr_ctx.lookup (expr.get_mappings ().get_nodeid ());
!   if (existing)
!     rust_assert (*existing == resolved_node_id);
    else
!     nr_ctx.map_usage (Resolver2_0::Usage (expr.get_mappings ().get_nodeid ()),
! 		      Resolver2_0::Definition (resolved_node_id));
  
    // return the result of the function back
    *result = function_ret_tyty;
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-expr.h gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-expr.h
*** gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-expr.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-expr.h	Sun Aug 10 22:32:08 2025
***************
*** 19,24 ****
--- 19,25 ----
  #ifndef RUST_HIR_TYPE_CHECK_EXPR
  #define RUST_HIR_TYPE_CHECK_EXPR
  
+ #include "rust-hir-expr.h"
  #include "rust-hir-type-check-base.h"
  #include "rust-hir-visitor.h"
  #include "rust-tyty.h"
*************** class TypeCheckExpr : private TypeCheckB
*** 31,36 ****
--- 32,42 ----
  public:
    static TyTy::BaseType *Resolve (HIR::Expr &expr);
  
+   static TyTy::BaseType *
+   ResolveOpOverload (LangItem::Kind lang_item_type, HIR::OperatorExprMeta expr,
+ 		     TyTy::BaseType *lhs, TyTy::BaseType *rhs,
+ 		     HIR::PathIdentSegment specified_segment);
+ 
    void visit (HIR::TupleIndexExpr &expr) override;
    void visit (HIR::TupleExpr &expr) override;
    void visit (HIR::ReturnExpr &expr) override;
*************** public:
*** 46,51 ****
--- 52,59 ----
    void visit (HIR::IfExpr &expr) override;
    void visit (HIR::IfExprConseqElse &expr) override;
    void visit (HIR::BlockExpr &expr) override;
+   void visit (HIR::AnonConst &expr) override;
+   void visit (HIR::ConstBlock &expr) override;
    void visit (HIR::UnsafeBlockExpr &expr) override;
    void visit (HIR::ArrayIndexExpr &expr) override;
    void visit (HIR::ArrayExpr &expr) override;
*************** public:
*** 71,76 ****
--- 79,85 ----
    void visit (HIR::ClosureExpr &expr) override;
    void visit (HIR::InlineAsm &expr) override;
    void visit (HIR::LlvmInlineAsm &expr) override;
+   void visit (HIR::OffsetOf &expr) override;
  
    // TODO
    void visit (HIR::ErrorPropagationExpr &) override {}
*************** protected:
*** 107,113 ****
  			      TyTy::BaseType **result);
  
    HIR::PathIdentSegment resolve_possible_fn_trait_call_method_name (
!     TyTy::BaseType &receiver, TyTy::TypeBoundPredicate *associated_predicate);
  
  private:
    TypeCheckExpr ();
--- 116,123 ----
  			      TyTy::BaseType **result);
  
    HIR::PathIdentSegment resolve_possible_fn_trait_call_method_name (
!     const TyTy::BaseType &receiver,
!     TyTy::TypeBoundPredicate *associated_predicate);
  
  private:
    TypeCheckExpr ();
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-implitem.cc gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-implitem.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-implitem.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-implitem.cc	Sun Aug 10 22:32:08 2025
***************
*** 28,36 ****
  #include "rust-tyty.h"
  #include "rust-immutable-name-resolution-context.h"
  
- // for flag_name_resolution_2_0
- #include "options.h"
- 
  namespace Rust {
  namespace Resolver {
  
--- 28,33 ----
*************** TypeCheckTopLevelExternItem::visit (HIR:
*** 73,79 ****
    std::vector<TyTy::SubstitutionParamMapping> substitutions;
    if (function.has_generics ())
      {
!       resolve_generic_params (function.get_generic_params (), substitutions,
  			      true /*is_foreign*/, parent.get_abi ());
      }
  
--- 70,78 ----
    std::vector<TyTy::SubstitutionParamMapping> substitutions;
    if (function.has_generics ())
      {
!       resolve_generic_params (HIR::Item::ItemKind::Function,
! 			      function.get_locus (),
! 			      function.get_generic_params (), substitutions,
  			      true /*is_foreign*/, parent.get_abi ());
      }
  
*************** TypeCheckImplItem::visit (HIR::Function
*** 203,209 ****
    auto binder_pin = context->push_lifetime_binder ();
  
    if (function.has_generics ())
!     resolve_generic_params (function.get_generic_params (), substitutions);
  
    TyTy::RegionConstraints region_constraints;
    for (auto &where_clause_item : function.get_where_clause ().get_items ())
--- 202,210 ----
    auto binder_pin = context->push_lifetime_binder ();
  
    if (function.has_generics ())
!     resolve_generic_params (HIR::Item::ItemKind::Function,
! 			    function.get_locus (),
! 			    function.get_generic_params (), substitutions);
  
    TyTy::RegionConstraints region_constraints;
    for (auto &where_clause_item : function.get_where_clause ().get_items ())
*************** TypeCheckImplItem::visit (HIR::Function
*** 266,272 ****
  	      self_type = self->clone ();
  	      break;
  
! 	      case HIR::SelfParam::IMM_REF: {
  		tl::optional<TyTy::Region> region;
  		if (self_param.has_lifetime ())
  		  {
--- 267,274 ----
  	      self_type = self->clone ();
  	      break;
  
! 	    case HIR::SelfParam::IMM_REF:
! 	      {
  		tl::optional<TyTy::Region> region;
  		if (self_param.has_lifetime ())
  		  {
*************** TypeCheckImplItem::visit (HIR::Function
*** 290,296 ****
  	      }
  	      break;
  
! 	      case HIR::SelfParam::MUT_REF: {
  		tl::optional<TyTy::Region> region;
  		if (self_param.has_lifetime ())
  		  {
--- 292,299 ----
  	      }
  	      break;
  
! 	    case HIR::SelfParam::MUT_REF:
! 	      {
  		tl::optional<TyTy::Region> region;
  		if (self_param.has_lifetime ())
  		  {
*************** TypeCheckImplItem::visit (HIR::Function
*** 336,360 ****
  	TyTy::FnParam (param.get_param_name ().clone_pattern (), param_tyty));
      }
  
!   tl::optional<CanonicalPath> canonical_path;
! 
!   if (flag_name_resolution_2_0)
!     {
!       auto &nr_ctx
! 	= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
! 
!       canonical_path = nr_ctx.values.to_canonical_path (
! 	function.get_mappings ().get_nodeid ());
!     }
!   else
!     {
!       canonical_path = mappings.lookup_canonical_path (
! 	function.get_mappings ().get_nodeid ());
!     }
  
!   rust_assert (canonical_path.has_value ());
  
!   RustIdent ident{*canonical_path, function.get_locus ()};
    auto fnType = new TyTy::FnType (
      function.get_mappings ().get_hirid (),
      function.get_mappings ().get_defid (),
--- 339,351 ----
  	TyTy::FnParam (param.get_param_name ().clone_pattern (), param_tyty));
      }
  
!   auto &nr_ctx
!     = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!   CanonicalPath canonical_path
!     = nr_ctx.to_canonical_path (function.get_mappings ().get_nodeid ());
  
!   RustIdent ident{canonical_path, function.get_locus ()};
    auto fnType = new TyTy::FnType (
      function.get_mappings ().get_hirid (),
      function.get_mappings ().get_defid (),
*************** TypeCheckImplItem::visit (HIR::TypeAlias
*** 410,416 ****
    auto binder_pin = context->push_lifetime_binder ();
  
    if (alias.has_generics ())
!     resolve_generic_params (alias.get_generic_params (), substitutions);
  
    TyTy::BaseType *actual_type
      = TypeCheckType::Resolve (alias.get_type_aliased ());
--- 401,408 ----
    auto binder_pin = context->push_lifetime_binder ();
  
    if (alias.has_generics ())
!     resolve_generic_params (HIR::Item::ItemKind::TypeAlias, alias.get_locus (),
! 			    alias.get_generic_params (), substitutions);
  
    TyTy::BaseType *actual_type
      = TypeCheckType::Resolve (alias.get_type_aliased ());
*************** TypeCheckImplItemWithTrait::visit (HIR::
*** 494,503 ****
        rich_location r (line_table, constant.get_locus ());
        r.add_range (resolved_trait_item.get_locus ());
  
!       rust_error_at (
! 	r, "constant %qs has an incompatible type for trait %qs",
! 	constant.get_identifier ().as_string ().c_str (),
! 	trait_reference.get_name ().c_str ());
      }
  }
  
--- 486,494 ----
        rich_location r (line_table, constant.get_locus ());
        r.add_range (resolved_trait_item.get_locus ());
  
!       rust_error_at (r, "constant %qs has an incompatible type for trait %qs",
! 		     constant.get_identifier ().as_string ().c_str (),
! 		     trait_reference.get_name ().c_str ());
      }
  }
  
*************** TypeCheckImplItemWithTrait::visit (HIR::
*** 545,554 ****
        rich_location r (line_table, type.get_locus ());
        r.add_range (resolved_trait_item.get_locus ());
  
!       rust_error_at (
! 	r, "type alias %qs has an incompatible type for trait %qs",
! 	type.get_new_type_name ().as_string ().c_str (),
! 	trait_reference.get_name ().c_str ());
      }
  
    // its actually a projection, since we need a way to actually bind the
--- 536,544 ----
        rich_location r (line_table, type.get_locus ());
        r.add_range (resolved_trait_item.get_locus ());
  
!       rust_error_at (r, "type alias %qs has an incompatible type for trait %qs",
! 		     type.get_new_type_name ().as_string ().c_str (),
! 		     trait_reference.get_name ().c_str ());
      }
  
    // its actually a projection, since we need a way to actually bind the
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-item.cc gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-item.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-item.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-item.cc	Sun Aug 10 22:32:08 2025
***************
*** 20,25 ****
--- 20,26 ----
  #include "optional.h"
  #include "rust-canonical-path.h"
  #include "rust-diagnostics.h"
+ #include "rust-hir-item.h"
  #include "rust-hir-type-check-enumitem.h"
  #include "rust-hir-type-check-implitem.h"
  #include "rust-hir-type-check-type.h"
***************
*** 33,41 ****
  #include "rust-type-util.h"
  #include "rust-tyty-variance-analysis.h"
  
- // for flag_name_resolution_2_0
- #include "options.h"
- 
  namespace Rust {
  namespace Resolver {
  
--- 34,39 ----
*************** TypeCheckItem::ResolveImplBlockSelfWithI
*** 121,128 ****
  	}
        else
  	{
! 	  TyTy::ParamType *param = p.get_param_ty ();
! 	  TyTy::BaseType *resolved = param->destructure ();
  	  args.push_back (TyTy::SubstitutionArg (&p, resolved));
  	}
      }
--- 119,126 ----
  	}
        else
  	{
! 	  auto param = p.get_param_ty ();
! 	  auto resolved = param->destructure ();
  	  args.push_back (TyTy::SubstitutionArg (&p, resolved));
  	}
      }
*************** TypeCheckItem::visit (HIR::TupleStruct &
*** 170,176 ****
  
    std::vector<TyTy::SubstitutionParamMapping> substitutions;
    if (struct_decl.has_generics ())
!     resolve_generic_params (struct_decl.get_generic_params (), substitutions);
  
    TyTy::RegionConstraints region_constraints;
    for (auto &where_clause_item : struct_decl.get_where_clause ().get_items ())
--- 168,176 ----
  
    std::vector<TyTy::SubstitutionParamMapping> substitutions;
    if (struct_decl.has_generics ())
!     resolve_generic_params (HIR::Item::ItemKind::Struct,
! 			    struct_decl.get_locus (),
! 			    struct_decl.get_generic_params (), substitutions);
  
    TyTy::RegionConstraints region_constraints;
    for (auto &where_clause_item : struct_decl.get_where_clause ().get_items ())
*************** TypeCheckItem::visit (HIR::TupleStruct &
*** 195,219 ****
  
    // get the path
  
!   auto path = CanonicalPath::create_empty ();
! 
!   // FIXME: HACK: ARTHUR: Disgusting
!   if (flag_name_resolution_2_0)
!     {
!       auto &nr_ctx
! 	= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!       path = nr_ctx.values
! 	       .to_canonical_path (struct_decl.get_mappings ().get_nodeid ())
! 	       .value ();
!     }
!   else
!     {
!       path
! 	= mappings
! 	    .lookup_canonical_path (struct_decl.get_mappings ().get_nodeid ())
! 	    .value ();
!     }
  
    RustIdent ident{path, struct_decl.get_locus ()};
  
--- 195,205 ----
  
    // get the path
  
!   auto &nr_ctx
!     = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!   CanonicalPath path
!     = nr_ctx.to_canonical_path (struct_decl.get_mappings ().get_nodeid ());
  
    RustIdent ident{path, struct_decl.get_locus ()};
  
*************** TypeCheckItem::visit (HIR::StructStruct
*** 255,261 ****
  
    std::vector<TyTy::SubstitutionParamMapping> substitutions;
    if (struct_decl.has_generics ())
!     resolve_generic_params (struct_decl.get_generic_params (), substitutions);
  
    TyTy::RegionConstraints region_constraints;
    for (auto &where_clause_item : struct_decl.get_where_clause ().get_items ())
--- 241,249 ----
  
    std::vector<TyTy::SubstitutionParamMapping> substitutions;
    if (struct_decl.has_generics ())
!     resolve_generic_params (HIR::Item::ItemKind::Struct,
! 			    struct_decl.get_locus (),
! 			    struct_decl.get_generic_params (), substitutions);
  
    TyTy::RegionConstraints region_constraints;
    for (auto &where_clause_item : struct_decl.get_where_clause ().get_items ())
*************** TypeCheckItem::visit (HIR::StructStruct
*** 276,302 ****
        context->insert_type (field.get_mappings (), ty_field->get_field_type ());
      }
  
!   auto path = CanonicalPath::create_empty ();
! 
!   // FIXME: HACK: ARTHUR: Disgusting
!   if (flag_name_resolution_2_0)
!     {
!       auto &nr_ctx
! 	= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
!       auto canonical_path = nr_ctx.types.to_canonical_path (
! 	struct_decl.get_mappings ().get_nodeid ());
  
!       if (!canonical_path.has_value ())
! 	rust_unreachable ();
!       path = canonical_path.value ();
!     }
!   else
!     {
!       path
! 	= mappings
! 	    .lookup_canonical_path (struct_decl.get_mappings ().get_nodeid ())
! 	    .value ();
!     }
  
    RustIdent ident{path, struct_decl.get_locus ()};
  
--- 264,274 ----
        context->insert_type (field.get_mappings (), ty_field->get_field_type ());
      }
  
!   auto &nr_ctx
!     = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!   CanonicalPath path
!     = nr_ctx.to_canonical_path (struct_decl.get_mappings ().get_nodeid ());
  
    RustIdent ident{path, struct_decl.get_locus ()};
  
*************** TypeCheckItem::visit (HIR::Enum &enum_de
*** 337,343 ****
    auto lifetime_pin = context->push_clean_lifetime_resolver ();
    std::vector<TyTy::SubstitutionParamMapping> substitutions;
    if (enum_decl.has_generics ())
!     resolve_generic_params (enum_decl.get_generic_params (), substitutions);
  
    // Process #[repr(X)] attribute, if any
    const AST::AttrVec &attrs = enum_decl.get_outer_attrs ();
--- 309,316 ----
    auto lifetime_pin = context->push_clean_lifetime_resolver ();
    std::vector<TyTy::SubstitutionParamMapping> substitutions;
    if (enum_decl.has_generics ())
!     resolve_generic_params (HIR::Item::ItemKind::Enum, enum_decl.get_locus (),
! 			    enum_decl.get_generic_params (), substitutions);
  
    // Process #[repr(X)] attribute, if any
    const AST::AttrVec &attrs = enum_decl.get_outer_attrs ();
*************** TypeCheckItem::visit (HIR::Enum &enum_de
*** 367,392 ****
  	}
      }
  
!   // get the path
!   tl::optional<CanonicalPath> canonical_path;
! 
!   if (flag_name_resolution_2_0)
!     {
!       auto &nr_ctx
! 	= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
! 
!       canonical_path = nr_ctx.types.to_canonical_path (
! 	enum_decl.get_mappings ().get_nodeid ());
!     }
!   else
!     {
!       canonical_path = mappings.lookup_canonical_path (
! 	enum_decl.get_mappings ().get_nodeid ());
!     }
  
!   rust_assert (canonical_path.has_value ());
  
!   RustIdent ident{*canonical_path, enum_decl.get_locus ()};
  
    // multi variant ADT
    auto *type
--- 340,353 ----
  	}
      }
  
!   auto &nr_ctx
!     = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!   // get the path
!   CanonicalPath canonical_path
!     = nr_ctx.to_canonical_path (enum_decl.get_mappings ().get_nodeid ());
  
!   RustIdent ident{canonical_path, enum_decl.get_locus ()};
  
    // multi variant ADT
    auto *type
*************** TypeCheckItem::visit (HIR::Union &union_
*** 409,415 ****
    auto lifetime_pin = context->push_clean_lifetime_resolver ();
    std::vector<TyTy::SubstitutionParamMapping> substitutions;
    if (union_decl.has_generics ())
!     resolve_generic_params (union_decl.get_generic_params (), substitutions);
  
    TyTy::RegionConstraints region_constraints;
    for (auto &where_clause_item : union_decl.get_where_clause ().get_items ())
--- 370,377 ----
    auto lifetime_pin = context->push_clean_lifetime_resolver ();
    std::vector<TyTy::SubstitutionParamMapping> substitutions;
    if (union_decl.has_generics ())
!     resolve_generic_params (HIR::Item::ItemKind::Union, union_decl.get_locus (),
! 			    union_decl.get_generic_params (), substitutions);
  
    TyTy::RegionConstraints region_constraints;
    for (auto &where_clause_item : union_decl.get_where_clause ().get_items ())
*************** TypeCheckItem::visit (HIR::Union &union_
*** 431,456 ****
  			    ty_variant->get_field_type ());
      }
  
!   // get the path
!   tl::optional<CanonicalPath> canonical_path;
! 
!   if (flag_name_resolution_2_0)
!     {
!       auto &nr_ctx
! 	= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
! 
!       canonical_path = nr_ctx.types.to_canonical_path (
! 	union_decl.get_mappings ().get_nodeid ());
!     }
!   else
!     {
!       canonical_path = mappings.lookup_canonical_path (
! 	union_decl.get_mappings ().get_nodeid ());
!     }
  
!   rust_assert (canonical_path.has_value ());
  
!   RustIdent ident{*canonical_path, union_decl.get_locus ()};
  
    // there is only a single variant
    std::vector<TyTy::VariantDef *> variants;
--- 393,406 ----
  			    ty_variant->get_field_type ());
      }
  
!   auto &nr_ctx
!     = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!   // get the path
!   CanonicalPath canonical_path
!     = nr_ctx.to_canonical_path (union_decl.get_mappings ().get_nodeid ());
  
!   RustIdent ident{canonical_path, union_decl.get_locus ()};
  
    // there is only a single variant
    std::vector<TyTy::VariantDef *> variants;
*************** TypeCheckItem::visit (HIR::Function &fun
*** 569,576 ****
    auto lifetime_pin = context->push_clean_lifetime_resolver ();
    std::vector<TyTy::SubstitutionParamMapping> substitutions;
    if (function.has_generics ())
!     resolve_generic_params (function.get_generic_params (),
! 			    substitutions); // TODO resolve constraints
  
    TyTy::RegionConstraints region_constraints;
    for (auto &where_clause_item : function.get_where_clause ().get_items ())
--- 519,527 ----
    auto lifetime_pin = context->push_clean_lifetime_resolver ();
    std::vector<TyTy::SubstitutionParamMapping> substitutions;
    if (function.has_generics ())
!     resolve_generic_params (HIR::Item::ItemKind::Function,
! 			    function.get_locus (),
! 			    function.get_generic_params (), substitutions);
  
    TyTy::RegionConstraints region_constraints;
    for (auto &where_clause_item : function.get_where_clause ().get_items ())
*************** TypeCheckItem::visit (HIR::Function &fun
*** 607,630 ****
  	TyTy::FnParam (param.get_param_name ().clone_pattern (), param_tyty));
      }
  
!   auto path = CanonicalPath::create_empty ();
! 
!   // FIXME: HACK: ARTHUR: Disgusting
!   if (flag_name_resolution_2_0)
!     {
!       auto &nr_ctx
! 	= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
!       auto canonical_path = nr_ctx.values.to_canonical_path (
! 	function.get_mappings ().get_nodeid ());
  
!       path = canonical_path.value ();
!     }
!   else
!     {
!       path = mappings
! 	       .lookup_canonical_path (function.get_mappings ().get_nodeid ())
! 	       .value ();
!     }
  
    RustIdent ident{path, function.get_locus ()};
  
--- 558,568 ----
  	TyTy::FnParam (param.get_param_name ().clone_pattern (), param_tyty));
      }
  
!   auto &nr_ctx
!     = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!   CanonicalPath path
!     = nr_ctx.to_canonical_path (function.get_mappings ().get_nodeid ());
  
    RustIdent ident{path, function.get_locus ()};
  
*************** TypeCheckItem::visit (HIR::ExternBlock &
*** 745,757 ****
      }
  }
  
  std::pair<std::vector<TyTy::SubstitutionParamMapping>, TyTy::RegionConstraints>
  TypeCheckItem::resolve_impl_block_substitutions (HIR::ImplBlock &impl_block,
  						 bool &failure_flag)
  {
    std::vector<TyTy::SubstitutionParamMapping> substitutions;
    if (impl_block.has_generics ())
!     resolve_generic_params (impl_block.get_generic_params (), substitutions);
  
    TyTy::RegionConstraints region_constraints;
    for (auto &where_clause_item : impl_block.get_where_clause ().get_items ())
--- 683,715 ----
      }
  }
  
+ void
+ TypeCheckItem::visit (HIR::ExternCrate &extern_crate)
+ {
+   if (extern_crate.references_self ())
+     return;
+ 
+   auto &mappings = Analysis::Mappings::get ();
+   CrateNum num
+     = mappings.lookup_crate_name (extern_crate.get_referenced_crate ())
+ 	.value ();
+   HIR::Crate &crate = mappings.get_hir_crate (num);
+ 
+   CrateNum saved_crate_num = mappings.get_current_crate ();
+   mappings.set_current_crate (num);
+   for (auto &item : crate.get_items ())
+     TypeCheckItem::Resolve (*item);
+   mappings.set_current_crate (saved_crate_num);
+ }
+ 
  std::pair<std::vector<TyTy::SubstitutionParamMapping>, TyTy::RegionConstraints>
  TypeCheckItem::resolve_impl_block_substitutions (HIR::ImplBlock &impl_block,
  						 bool &failure_flag)
  {
    std::vector<TyTy::SubstitutionParamMapping> substitutions;
    if (impl_block.has_generics ())
!     resolve_generic_params (HIR::Item::ItemKind::Impl, impl_block.get_locus (),
! 			    impl_block.get_generic_params (), substitutions);
  
    TyTy::RegionConstraints region_constraints;
    for (auto &where_clause_item : impl_block.get_where_clause ().get_items ())
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-item.h gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-item.h
*** gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-item.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-item.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 51,59 ****
    void visit (HIR::ImplBlock &impl_block) override;
    void visit (HIR::ExternBlock &extern_block) override;
    void visit (HIR::Trait &trait_block) override;
  
    // nothing to do
-   void visit (HIR::ExternCrate &) override {}
    void visit (HIR::UseDeclaration &) override {}
  
  protected:
--- 51,59 ----
    void visit (HIR::ImplBlock &impl_block) override;
    void visit (HIR::ExternBlock &extern_block) override;
    void visit (HIR::Trait &trait_block) override;
+   void visit (HIR::ExternCrate &extern_crate) override;
  
    // nothing to do
    void visit (HIR::UseDeclaration &) override {}
  
  protected:
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-path.cc gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-path.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-path.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-path.cc	Sun Aug 10 22:32:08 2025
*************** TypeCheckExpr::visit (HIR::QualifiedPath
*** 157,176 ****
    bool fully_resolved = expr.get_segments ().size () <= 1;
    if (fully_resolved)
      {
!       if (flag_name_resolution_2_0)
! 	{
! 	  auto &nr_ctx = const_cast<Resolver2_0::NameResolutionContext &> (
! 	    Resolver2_0::ImmutableNameResolutionContext::get ().resolver ());
  
! 	  nr_ctx.map_usage (Resolver2_0::Usage (
! 			      expr.get_mappings ().get_nodeid ()),
! 			    Resolver2_0::Definition (root_resolved_node_id));
! 	}
!       else
! 	{
! 	  resolver->insert_resolved_name (expr.get_mappings ().get_nodeid (),
! 					  root_resolved_node_id);
! 	}
        return;
      }
  
--- 157,167 ----
    bool fully_resolved = expr.get_segments ().size () <= 1;
    if (fully_resolved)
      {
!       auto &nr_ctx = const_cast<Resolver2_0::NameResolutionContext &> (
! 	Resolver2_0::ImmutableNameResolutionContext::get ().resolver ());
  
!       nr_ctx.map_usage (Resolver2_0::Usage (expr.get_mappings ().get_nodeid ()),
! 			Resolver2_0::Definition (root_resolved_node_id));
        return;
      }
  
*************** TypeCheckExpr::resolve_root_path (HIR::P
*** 264,287 ****
        bool is_root = *offset == 0;
        NodeId ast_node_id = seg.get_mappings ().get_nodeid ();
  
!       // then lookup the reference_node_id
!       NodeId ref_node_id = UNKNOWN_NODEID;
  
!       if (flag_name_resolution_2_0)
  	{
! 	  auto &nr_ctx
! 	    = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
! 
! 	  // assign the ref_node_id if we've found something
! 	  nr_ctx.lookup (ast_node_id).map ([&ref_node_id] (NodeId resolved) {
! 	    ref_node_id = resolved;
! 	  });
  	}
!       else if (!resolver->lookup_resolved_name (ast_node_id, &ref_node_id))
! 	resolver->lookup_resolved_type (ast_node_id, &ref_node_id);
! 
!       // ref_node_id is the NodeId that the segments refers to.
!       if (ref_node_id == UNKNOWN_NODEID)
  	{
  	  if (root_tyty != nullptr && *offset > 0)
  	    {
--- 255,270 ----
        bool is_root = *offset == 0;
        NodeId ast_node_id = seg.get_mappings ().get_nodeid ();
  
!       auto &nr_ctx
! 	= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!       // lookup the reference_node_id
!       NodeId ref_node_id;
!       if (auto res = nr_ctx.lookup (ast_node_id))
  	{
! 	  ref_node_id = *res;
  	}
!       else
  	{
  	  if (root_tyty != nullptr && *offset > 0)
  	    {
*************** TypeCheckExpr::resolve_segments (NodeId
*** 561,593 ****
      }
  
    rust_assert (resolved_node_id != UNKNOWN_NODEID);
-   if (flag_name_resolution_2_0)
-     {
-       auto &nr_ctx = const_cast<Resolver2_0::NameResolutionContext &> (
- 	Resolver2_0::ImmutableNameResolutionContext::get ().resolver ());
  
!       nr_ctx.map_usage (Resolver2_0::Usage (expr_mappings.get_nodeid ()),
! 			Resolver2_0::Definition (resolved_node_id));
!     }
!   // name scope first
!   else if (resolver->get_name_scope ().decl_was_declared_here (
! 	     resolved_node_id))
!     {
!       resolver->insert_resolved_name (expr_mappings.get_nodeid (),
! 				      resolved_node_id);
!     }
!   // check the type scope
!   else if (resolver->get_type_scope ().decl_was_declared_here (
! 	     resolved_node_id))
!     {
!       resolver->insert_resolved_type (expr_mappings.get_nodeid (),
! 				      resolved_node_id);
!     }
!   else
!     {
!       resolver->insert_resolved_misc (expr_mappings.get_nodeid (),
! 				      resolved_node_id);
!     }
  
    infered = tyseg;
  }
--- 544,555 ----
      }
  
    rust_assert (resolved_node_id != UNKNOWN_NODEID);
  
!   auto &nr_ctx = const_cast<Resolver2_0::NameResolutionContext &> (
!     Resolver2_0::ImmutableNameResolutionContext::get ().resolver ());
! 
!   nr_ctx.map_usage (Resolver2_0::Usage (expr_mappings.get_nodeid ()),
! 		    Resolver2_0::Definition (resolved_node_id));
  
    infered = tyseg;
  }
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-pattern.cc gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-pattern.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-pattern.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-pattern.cc	Sun Aug 10 22:32:08 2025
***************
*** 22,30 ****
  #include "rust-type-util.h"
  #include "rust-immutable-name-resolution-context.h"
  
- // for flag_name_resolution_2_0
- #include "options.h"
- 
  namespace Rust {
  namespace Resolver {
  
--- 22,27 ----
*************** TypeCheckPattern::visit (HIR::PathInExpr
*** 54,76 ****
    NodeId ref_node_id = UNKNOWN_NODEID;
    bool maybe_item = false;
  
!   if (flag_name_resolution_2_0)
!     {
!       auto &nr_ctx
! 	= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!       if (auto id = nr_ctx.lookup (pattern.get_mappings ().get_nodeid ()))
! 	{
! 	  ref_node_id = *id;
! 	  maybe_item = true;
! 	}
!     }
!   else
      {
!       maybe_item |= resolver->lookup_resolved_name (
! 	pattern.get_mappings ().get_nodeid (), &ref_node_id);
!       maybe_item |= resolver->lookup_resolved_type (
! 	pattern.get_mappings ().get_nodeid (), &ref_node_id);
      }
  
    bool path_is_const_item = false;
--- 51,63 ----
    NodeId ref_node_id = UNKNOWN_NODEID;
    bool maybe_item = false;
  
!   auto &nr_ctx
!     = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!   if (auto id = nr_ctx.lookup (pattern.get_mappings ().get_nodeid ()))
      {
!       ref_node_id = *id;
!       maybe_item = true;
      }
  
    bool path_is_const_item = false;
*************** TypeCheckPattern::visit (HIR::TupleStruc
*** 213,225 ****
    auto &items = pattern.get_items ();
    switch (items.get_item_type ())
      {
!       case HIR::TupleStructItems::RANGED: {
  	// TODO
  	rust_unreachable ();
        }
        break;
  
!       case HIR::TupleStructItems::MULTIPLE: {
  	HIR::TupleStructItemsNoRange &items_no_range
  	  = static_cast<HIR::TupleStructItemsNoRange &> (items);
  
--- 200,214 ----
    auto &items = pattern.get_items ();
    switch (items.get_item_type ())
      {
!     case HIR::TupleStructItems::RANGED:
!       {
  	// TODO
  	rust_unreachable ();
        }
        break;
  
!     case HIR::TupleStructItems::MULTIPLE:
!       {
  	HIR::TupleStructItemsNoRange &items_no_range
  	  = static_cast<HIR::TupleStructItemsNoRange &> (items);
  
*************** TypeCheckPattern::visit (HIR::StructPatt
*** 333,345 ****
      {
        switch (field->get_item_type ())
  	{
! 	  case HIR::StructPatternField::ItemType::TUPLE_PAT: {
  	    // TODO
  	    rust_unreachable ();
  	  }
  	  break;
  
! 	  case HIR::StructPatternField::ItemType::IDENT_PAT: {
  	    HIR::StructPatternFieldIdentPat &ident
  	      = static_cast<HIR::StructPatternFieldIdentPat &> (*field);
  
--- 322,336 ----
      {
        switch (field->get_item_type ())
  	{
! 	case HIR::StructPatternField::ItemType::TUPLE_PAT:
! 	  {
  	    // TODO
  	    rust_unreachable ();
  	  }
  	  break;
  
! 	case HIR::StructPatternField::ItemType::IDENT_PAT:
! 	  {
  	    HIR::StructPatternFieldIdentPat &ident
  	      = static_cast<HIR::StructPatternFieldIdentPat &> (*field);
  
*************** TypeCheckPattern::visit (HIR::StructPatt
*** 358,364 ****
  	  }
  	  break;
  
! 	  case HIR::StructPatternField::ItemType::IDENT: {
  	    HIR::StructPatternFieldIdent &ident
  	      = static_cast<HIR::StructPatternFieldIdent &> (*field);
  
--- 349,356 ----
  	  }
  	  break;
  
! 	case HIR::StructPatternField::ItemType::IDENT:
! 	  {
  	    HIR::StructPatternFieldIdent &ident
  	      = static_cast<HIR::StructPatternFieldIdent &> (*field);
  
*************** TypeCheckPattern::visit (HIR::StructPatt
*** 397,403 ****
  	    case HIR::StructPatternField::ItemType::IDENT:
  	    case HIR::StructPatternField::ItemType::IDENT_PAT:
  	      break;
! 	      default: {
  		auto first_elem
  		  = struct_pattern_elems.get_struct_pattern_fields ()
  		      .at (0)
--- 389,396 ----
  	    case HIR::StructPatternField::ItemType::IDENT:
  	    case HIR::StructPatternField::ItemType::IDENT_PAT:
  	      break;
! 	    default:
! 	      {
  		auto first_elem
  		  = struct_pattern_elems.get_struct_pattern_fields ()
  		      .at (0)
*************** void
*** 457,481 ****
  TypeCheckPattern::visit (HIR::TuplePattern &pattern)
  {
    std::unique_ptr<HIR::TuplePatternItems> items;
    switch (pattern.get_items ().get_item_type ())
      {
!       case HIR::TuplePatternItems::ItemType::MULTIPLE: {
  	auto &ref = static_cast<HIR::TuplePatternItemsMultiple &> (
  	  pattern.get_items ());
  
- 	auto resolved_parent = parent->destructure ();
- 	if (resolved_parent->get_kind () != TyTy::TUPLE)
- 	  {
- 	    rust_error_at (pattern.get_locus (), "expected %s, found tuple",
- 			   parent->as_string ().c_str ());
- 	    break;
- 	  }
- 
  	const auto &patterns = ref.get_patterns ();
  	size_t nitems_to_resolve = patterns.size ();
  
- 	TyTy::TupleType &par
- 	  = *static_cast<TyTy::TupleType *> (resolved_parent);
  	if (patterns.size () != par.get_fields ().size ())
  	  {
  	    emit_pattern_size_error (pattern, par.get_fields ().size (),
--- 450,476 ----
  TypeCheckPattern::visit (HIR::TuplePattern &pattern)
  {
    std::unique_ptr<HIR::TuplePatternItems> items;
+ 
+   // Check whether parent is tuple
+   auto resolved_parent = parent->destructure ();
+   if (resolved_parent->get_kind () != TyTy::TUPLE)
+     {
+       rust_error_at (pattern.get_locus (), "expected %s, found tuple",
+ 		     parent->as_string ().c_str ());
+       return;
+     }
+   TyTy::TupleType &par = *static_cast<TyTy::TupleType *> (resolved_parent);
+ 
    switch (pattern.get_items ().get_item_type ())
      {
!     case HIR::TuplePatternItems::ItemType::MULTIPLE:
!       {
  	auto &ref = static_cast<HIR::TuplePatternItemsMultiple &> (
  	  pattern.get_items ());
  
  	const auto &patterns = ref.get_patterns ();
  	size_t nitems_to_resolve = patterns.size ();
  
  	if (patterns.size () != par.get_fields ().size ())
  	  {
  	    emit_pattern_size_error (pattern, par.get_fields ().size (),
*************** TypeCheckPattern::visit (HIR::TuplePatte
*** 498,509 ****
        }
        break;
  
!       case HIR::TuplePatternItems::ItemType::RANGED: {
! 	// HIR::TuplePatternItemsRanged &ref
! 	//   = *static_cast<HIR::TuplePatternItemsRanged *> (
! 	//     pattern.get_items ().get ());
! 	// TODO
! 	rust_unreachable ();
        }
        break;
      }
--- 493,547 ----
        }
        break;
  
!     case HIR::TuplePatternItems::ItemType::RANGED:
!       {
! 	HIR::TuplePatternItemsRanged &ref
! 	  = static_cast<HIR::TuplePatternItemsRanged &> (pattern.get_items ());
! 
! 	const auto &lower = ref.get_lower_patterns ();
! 	const auto &upper = ref.get_upper_patterns ();
! 	size_t min_size_required = lower.size () + upper.size ();
! 
! 	// Ensure that size of lower and upper patterns <= parent size
! 	if (min_size_required > par.get_fields ().size ())
! 	  {
! 	    emit_pattern_size_error (pattern, par.get_fields ().size (),
! 				     min_size_required);
! 	    // TODO attempt to continue to do typechecking even after wrong size
! 	    break;
! 	  }
! 
! 	// Resolve lower patterns
! 	std::vector<TyTy::TyVar> pattern_elems;
! 	for (size_t i = 0; i < lower.size (); i++)
! 	  {
! 	    auto &p = lower[i];
! 	    TyTy::BaseType *par_type = par.get_field (i);
! 
! 	    TyTy::BaseType *elem = TypeCheckPattern::Resolve (*p, par_type);
! 	    pattern_elems.push_back (TyTy::TyVar (elem->get_ref ()));
! 	  }
! 
! 	// Pad pattern_elems until needing to resolve upper patterns
! 	size_t rest_end = par.get_fields ().size () - upper.size ();
! 	for (size_t i = lower.size (); i < rest_end; i++)
! 	  {
! 	    TyTy::BaseType *par_type = par.get_field (i);
! 	    pattern_elems.push_back (TyTy::TyVar (par_type->get_ref ()));
! 	  }
! 
! 	// Resolve upper patterns
! 	for (size_t i = 0; i < upper.size (); i++)
! 	  {
! 	    auto &p = upper[i];
! 	    TyTy::BaseType *par_type = par.get_field (rest_end + i);
! 
! 	    TyTy::BaseType *elem = TypeCheckPattern::Resolve (*p, par_type);
! 	    pattern_elems.push_back (TyTy::TyVar (elem->get_ref ()));
! 	  }
! 
! 	infered = new TyTy::TupleType (pattern.get_mappings ().get_hirid (),
! 				       pattern.get_locus (), pattern_elems);
        }
        break;
      }
*************** TypeCheckPattern::visit (HIR::TuplePatte
*** 512,519 ****
  void
  TypeCheckPattern::visit (HIR::LiteralPattern &pattern)
  {
!   infered = resolve_literal (pattern.get_mappings (), pattern.get_literal (),
! 			     pattern.get_locus ());
  }
  
  void
--- 550,567 ----
  void
  TypeCheckPattern::visit (HIR::LiteralPattern &pattern)
  {
!   TyTy::BaseType *resolved
!     = resolve_literal (pattern.get_mappings (), pattern.get_literal (),
! 		       pattern.get_locus ());
!   if (resolved->get_kind () == TyTy::TypeKind::ERROR)
!     {
!       infered = resolved;
!       return;
!     }
! 
!   infered = unify_site (pattern.get_mappings ().get_hirid (),
! 			TyTy::TyWithLocation (parent),
! 			TyTy::TyWithLocation (resolved), pattern.get_locus ());
  }
  
  void
*************** TypeCheckPattern::visit (HIR::RangePatte
*** 538,543 ****
--- 586,596 ----
  void
  TypeCheckPattern::visit (HIR::IdentifierPattern &pattern)
  {
+   if (pattern.has_subpattern ())
+     {
+       TypeCheckPattern::Resolve (pattern.get_subpattern (), parent);
+     }
+ 
    if (!pattern.get_is_ref ())
      {
        infered = parent;
*************** TypeCheckPattern::visit (HIR::ReferenceP
*** 580,587 ****
  void
  TypeCheckPattern::visit (HIR::SlicePattern &pattern)
  {
!   rust_sorry_at (pattern.get_locus (),
! 		 "type checking qualified path patterns not supported");
  }
  
  void
--- 633,704 ----
  void
  TypeCheckPattern::visit (HIR::SlicePattern &pattern)
  {
!   auto resolved_parent = parent->destructure ();
!   TyTy::BaseType *parent_element_ty = nullptr;
!   switch (resolved_parent->get_kind ())
!     {
!     case TyTy::ARRAY:
!       {
! 	auto &array_ty_ty = static_cast<TyTy::ArrayType &> (*parent);
! 	parent_element_ty = array_ty_ty.get_element_type ();
! 	auto capacity = array_ty_ty.get_capacity ();
! 	tree cap = capacity->get_value ();
! 	if (error_operand_p (cap))
! 	  {
! 	    rust_error_at (parent->get_locus (),
! 			   "capacity of array %qs is not known at compile time",
! 			   array_ty_ty.get_name ().c_str ());
! 	    break;
! 	  }
! 	auto cap_wi = wi::to_wide (cap).to_uhwi ();
! 	if (cap_wi != pattern.get_items ().size ())
! 	  {
! 	    rust_error_at (pattern.get_locus (), ErrorCode::E0527,
! 			   "pattern requires %lu elements but array has %lu",
! 			   (unsigned long) pattern.get_items ().size (),
! 			   (unsigned long) cap_wi);
! 	    break;
! 	  }
! 	break;
!       }
!     case TyTy::SLICE:
!       {
! 	auto &slice_ty_ty = static_cast<TyTy::SliceType &> (*parent);
! 	parent_element_ty = slice_ty_ty.get_element_type ();
! 	break;
!       }
!     case TyTy::REF:
!       {
! 	auto &ref_ty_ty = static_cast<TyTy::ReferenceType &> (*parent);
! 	const TyTy::SliceType *slice = nullptr;
! 	if (!ref_ty_ty.is_dyn_slice_type (&slice))
! 	  {
! 	    rust_error_at (pattern.get_locus (), "expected %s, found slice",
! 			   parent->as_string ().c_str ());
! 	    return;
! 	  }
! 	parent_element_ty = slice->get_element_type ();
! 	break;
!       }
!     default:
!       {
! 	rust_error_at (pattern.get_locus (), "expected %s, found slice",
! 		       parent->as_string ().c_str ());
! 	return;
!       }
!     }
! 
!   rust_assert (parent_element_ty != nullptr);
!   // infered inherits array/slice typing from parent
!   infered = parent->clone ();
!   infered->set_ref (pattern.get_mappings ().get_hirid ());
! 
!   // Type check every item in the SlicePattern against parent's element ty
!   // TODO update this after adding support for RestPattern in SlicePattern
!   for (const auto &item : pattern.get_items ())
!     {
!       TypeCheckPattern::Resolve (*item, parent_element_ty);
!     }
  }
  
  void
*************** TypeCheckPattern::typecheck_range_patter
*** 608,614 ****
    TyTy::BaseType *resolved_bound = nullptr;
    switch (bound.get_bound_type ())
      {
!       case HIR::RangePatternBound::RangePatternBoundType::LITERAL: {
  	auto &ref = static_cast<HIR::RangePatternBoundLiteral &> (bound);
  
  	HIR::Literal lit = ref.get_literal ();
--- 725,732 ----
    TyTy::BaseType *resolved_bound = nullptr;
    switch (bound.get_bound_type ())
      {
!     case HIR::RangePatternBound::RangePatternBoundType::LITERAL:
!       {
  	auto &ref = static_cast<HIR::RangePatternBoundLiteral &> (bound);
  
  	HIR::Literal lit = ref.get_literal ();
*************** TypeCheckPattern::typecheck_range_patter
*** 617,630 ****
        }
        break;
  
!       case HIR::RangePatternBound::RangePatternBoundType::PATH: {
  	auto &ref = static_cast<HIR::RangePatternBoundPath &> (bound);
  
  	resolved_bound = TypeCheckExpr::Resolve (ref.get_path ());
        }
        break;
  
!       case HIR::RangePatternBound::RangePatternBoundType::QUALPATH: {
  	auto &ref = static_cast<HIR::RangePatternBoundQualPath &> (bound);
  
  	resolved_bound = TypeCheckExpr::Resolve (ref.get_qualified_path ());
--- 735,750 ----
        }
        break;
  
!     case HIR::RangePatternBound::RangePatternBoundType::PATH:
!       {
  	auto &ref = static_cast<HIR::RangePatternBoundPath &> (bound);
  
  	resolved_bound = TypeCheckExpr::Resolve (ref.get_path ());
        }
        break;
  
!     case HIR::RangePatternBound::RangePatternBoundType::QUALPATH:
!       {
  	auto &ref = static_cast<HIR::RangePatternBoundQualPath &> (bound);
  
  	resolved_bound = TypeCheckExpr::Resolve (ref.get_qualified_path ());
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-stmt.cc gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-stmt.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-stmt.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-stmt.cc	Sun Aug 10 22:32:08 2025
*************** void
*** 60,65 ****
--- 60,71 ----
  TypeCheckStmt::visit (HIR::ConstantItem &constant)
  {
    TyTy::BaseType *type = TypeCheckType::Resolve (constant.get_type ());
+   if (!constant.has_expr ())
+     {
+       infered = type;
+       return;
+     }
+ 
    TyTy::BaseType *expr_type = TypeCheckExpr::Resolve (constant.get_expr ());
  
    infered = coercion_site (
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-struct.cc gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-struct.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-struct.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-struct.cc	Sun Aug 10 22:32:08 2025
*************** TypeCheckStructExpr::visit (HIR::StructE
*** 329,336 ****
        repeat_location.add_range (prev_field_locus);
  
        rust_error_at (repeat_location, ErrorCode::E0062,
! 		     "field %qs specified more than once",
! 		     field_name.c_str ());
        return false;
      }
  
--- 329,335 ----
        repeat_location.add_range (prev_field_locus);
  
        rust_error_at (repeat_location, ErrorCode::E0062,
! 		     "field %qs specified more than once", field_name.c_str ());
        return false;
      }
  
*************** TypeCheckStructExpr::visit (HIR::StructE
*** 363,369 ****
    if (!ok)
      {
        rust_error_at (field.get_locus (), "unknown field");
!       return true;
      }
  
    auto it = adtFieldIndexToField.find (field_index);
--- 362,368 ----
    if (!ok)
      {
        rust_error_at (field.get_locus (), "unknown field");
!       return false;
      }
  
    auto it = adtFieldIndexToField.find (field_index);
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-type.cc gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-type.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check-type.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check-type.cc	Sun Aug 10 22:32:08 2025
***************
*** 29,34 ****
--- 29,35 ----
  #include "rust-substitution-mapper.h"
  #include "rust-type-util.h"
  #include "rust-system.h"
+ #include "rust-compile-base.h"
  
  namespace Rust {
  namespace Resolver {
*************** TypeCheckType::resolve_root_path (HIR::T
*** 335,353 ****
  	  seg->get_lang_item ());
        else
  	{
! 	  // FIXME: HACK: ARTHUR: Remove this
! 	  if (flag_name_resolution_2_0)
! 	    {
! 	      auto &nr_ctx = Resolver2_0::ImmutableNameResolutionContext::get ()
! 			       .resolver ();
  
! 	      // assign the ref_node_id if we've found something
! 	      nr_ctx.lookup (ast_node_id)
! 		.map (
! 		  [&ref_node_id] (NodeId resolved) { ref_node_id = resolved; });
! 	    }
! 	  else if (!resolver->lookup_resolved_name (ast_node_id, &ref_node_id))
! 	    resolver->lookup_resolved_type (ast_node_id, &ref_node_id);
  	}
  
        // ref_node_id is the NodeId that the segments refers to.
--- 336,348 ----
  	  seg->get_lang_item ());
        else
  	{
! 	  auto &nr_ctx
! 	    = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
! 	  // assign the ref_node_id if we've found something
! 	  nr_ctx.lookup (ast_node_id).map ([&ref_node_id] (NodeId resolved) {
! 	    ref_node_id = resolved;
! 	  });
  	}
  
        // ref_node_id is the NodeId that the segments refers to.
*************** TypeCheckType::resolve_segments (
*** 549,556 ****
        bool selfResolveOk = false;
  
        if (first_segment && tySegIsBigSelf
! 	  && context->block_context ().is_in_context ()
! 	  && context->block_context ().peek ().is_impl_block ())
  	{
  	  TypeCheckBlockContextItem ctx = context->block_context ().peek ();
  	  TyTy::BaseType *lookup = nullptr;
--- 544,550 ----
        bool selfResolveOk = false;
  
        if (first_segment && tySegIsBigSelf
! 	  && context->block_context ().is_in_context ())
  	{
  	  TypeCheckBlockContextItem ctx = context->block_context ().peek ();
  	  TyTy::BaseType *lookup = nullptr;
*************** TypeCheckType::visit (HIR::Parenthesised
*** 695,700 ****
--- 689,695 ----
  void
  TypeCheckType::visit (HIR::ArrayType &type)
  {
+   auto element_type = TypeCheckType::Resolve (type.get_element_type ());
    auto capacity_type = TypeCheckExpr::Resolve (type.get_size_expr ());
    if (capacity_type->get_kind () == TyTy::TypeKind::ERROR)
      return;
*************** TypeCheckType::visit (HIR::ArrayType &ty
*** 704,719 ****
    rust_assert (ok);
    context->insert_type (type.get_size_expr ().get_mappings (), expected_ty);
  
!   unify_site (type.get_size_expr ().get_mappings ().get_hirid (),
! 	      TyTy::TyWithLocation (expected_ty),
! 	      TyTy::TyWithLocation (capacity_type,
! 				    type.get_size_expr ().get_locus ()),
! 	      type.get_size_expr ().get_locus ());
  
!   TyTy::BaseType *base = TypeCheckType::Resolve (type.get_element_type ());
!   translated = new TyTy::ArrayType (type.get_mappings ().get_hirid (),
! 				    type.get_locus (), type.get_size_expr (),
! 				    TyTy::TyVar (base->get_ref ()));
  }
  
  void
--- 699,736 ----
    rust_assert (ok);
    context->insert_type (type.get_size_expr ().get_mappings (), expected_ty);
  
!   TyTy::ConstType *const_type = nullptr;
!   if (capacity_type->get_kind () == TyTy::TypeKind::CONST)
!     {
!       const_type = static_cast<TyTy::ConstType *> (capacity_type);
  
!       unify_site (type.get_size_expr ().get_mappings ().get_hirid (),
! 		  TyTy::TyWithLocation (expected_ty),
! 		  TyTy::TyWithLocation (const_type->get_ty (),
! 					type.get_size_expr ().get_locus ()),
! 		  type.get_size_expr ().get_locus ());
!     }
!   else
!     {
!       HirId size_id = type.get_size_expr ().get_mappings ().get_hirid ();
!       unify_site (size_id, TyTy::TyWithLocation (expected_ty),
! 		  TyTy::TyWithLocation (capacity_type,
! 					type.get_size_expr ().get_locus ()),
! 		  type.get_size_expr ().get_locus ());
! 
!       auto ctx = Compile::Context::get ();
!       tree capacity_expr = Compile::HIRCompileBase::query_compile_const_expr (
! 	ctx, capacity_type, type.get_size_expr ());
! 
!       const_type = new TyTy::ConstType (TyTy::ConstType::ConstKind::Value, "",
! 					expected_ty, capacity_expr, {},
! 					type.get_size_expr ().get_locus (),
! 					size_id, size_id);
!     }
! 
!   translated
!     = new TyTy::ArrayType (type.get_mappings ().get_hirid (), type.get_locus (),
! 			   const_type, TyTy::TyVar (element_type->get_ref ()));
  }
  
  void
*************** TypeResolveGenericParam::visit (HIR::Typ
*** 850,859 ****
    if (param.has_type ())
      TypeCheckType::Resolve (param.get_type ());
  
!   resolved
!     = new TyTy::ParamType (param.get_type_representation ().as_string (),
! 			   param.get_locus (),
! 			   param.get_mappings ().get_hirid (), param, {});
  
    if (resolve_trait_bounds)
      apply_trait_bounds (param, resolved);
--- 867,875 ----
    if (param.has_type ())
      TypeCheckType::Resolve (param.get_type ());
  
!   resolved = new TyTy::ParamType (param.get_type_representation ().as_string (),
! 				  param.get_locus (),
! 				  param.get_mappings ().get_hirid (), {});
  
    if (resolve_trait_bounds)
      apply_trait_bounds (param, resolved);
*************** TypeResolveGenericParam::apply_trait_bou
*** 872,878 ****
        HirId implicit_id = mappings.get_next_hir_id ();
        TyTy::ParamType *p
  	= new TyTy::ParamType (param.get_type_representation ().as_string (),
! 			       param.get_locus (), implicit_id, param,
  			       {} /*empty specified bounds*/);
        context->insert_implicit_type (implicit_id, p);
  
--- 888,894 ----
        HirId implicit_id = mappings.get_next_hir_id ();
        TyTy::ParamType *p
  	= new TyTy::ParamType (param.get_type_representation ().as_string (),
! 			       param.get_locus (), implicit_id,
  			       {} /*empty specified bounds*/);
        context->insert_implicit_type (implicit_id, p);
  
*************** TypeResolveGenericParam::apply_trait_bou
*** 908,914 ****
  	{
  	  switch (bound->get_bound_type ())
  	    {
! 	      case HIR::TypeParamBound::BoundType::TRAITBOUND: {
  		HIR::TraitBound &b = static_cast<HIR::TraitBound &> (*bound);
  
  		TyTy::TypeBoundPredicate predicate = get_predicate_from_bound (
--- 924,931 ----
  	{
  	  switch (bound->get_bound_type ())
  	    {
! 	    case HIR::TypeParamBound::BoundType::TRAITBOUND:
! 	      {
  		HIR::TraitBound &b = static_cast<HIR::TraitBound &> (*bound);
  
  		TyTy::TypeBoundPredicate predicate = get_predicate_from_bound (
*************** TypeResolveGenericParam::apply_trait_bou
*** 920,926 ****
  		  {
  		    switch (predicate.get_polarity ())
  		      {
! 			case BoundPolarity::AntiBound: {
  			  bool found = predicates.find (predicate.get_id ())
  				       != predicates.end ();
  			  if (found)
--- 937,944 ----
  		  {
  		    switch (predicate.get_polarity ())
  		      {
! 		      case BoundPolarity::AntiBound:
! 			{
  			  bool found = predicates.find (predicate.get_id ())
  				       != predicates.end ();
  			  if (found)
*************** TypeResolveGenericParam::apply_trait_bou
*** 937,943 ****
  			}
  			break;
  
! 			default: {
  			  if (predicates.find (predicate.get_id ())
  			      == predicates.end ())
  			    {
--- 955,962 ----
  			}
  			break;
  
! 		      default:
! 			{
  			  if (predicates.find (predicate.get_id ())
  			      == predicates.end ())
  			    {
*************** ResolveWhereClauseItem::visit (HIR::Type
*** 1033,1039 ****
      {
        switch (bound->get_bound_type ())
  	{
! 	  case HIR::TypeParamBound::BoundType::TRAITBOUND: {
  	    auto *b = static_cast<HIR::TraitBound *> (bound.get ());
  
  	    TyTy::TypeBoundPredicate predicate
--- 1052,1059 ----
      {
        switch (bound->get_bound_type ())
  	{
! 	case HIR::TypeParamBound::BoundType::TRAITBOUND:
! 	  {
  	    auto *b = static_cast<HIR::TraitBound *> (bound.get ());
  
  	    TyTy::TypeBoundPredicate predicate
*************** ResolveWhereClauseItem::visit (HIR::Type
*** 1042,1048 ****
  	      specified_bounds.push_back (std::move (predicate));
  	  }
  	  break;
! 	  case HIR::TypeParamBound::BoundType::LIFETIME: {
  	    if (auto param = binding->try_as<TyTy::ParamType> ())
  	      {
  		auto *b = static_cast<HIR::Lifetime *> (bound.get ());
--- 1062,1069 ----
  	      specified_bounds.push_back (std::move (predicate));
  	  }
  	  break;
! 	case HIR::TypeParamBound::BoundType::LIFETIME:
! 	  {
  	    if (auto param = binding->try_as<TyTy::ParamType> ())
  	      {
  		auto *b = static_cast<HIR::Lifetime *> (bound.get ());
*************** ResolveWhereClauseItem::visit (HIR::Type
*** 1071,1093 ****
  
    // then lookup the reference_node_id
    NodeId ref_node_id = UNKNOWN_NODEID;
-   if (flag_name_resolution_2_0)
-     {
-       auto &nr_ctx
- 	= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!       if (auto id = nr_ctx.lookup (ast_node_id))
! 	ref_node_id = *id;
!     }
!   else
!     {
!       NodeId id = UNKNOWN_NODEID;
  
!       if (resolver->lookup_resolved_type (ast_node_id, &id))
! 	ref_node_id = id;
      }
! 
!   if (ref_node_id == UNKNOWN_NODEID)
      {
        // FIXME
        rust_error_at (UNDEF_LOCATION,
--- 1092,1106 ----
  
    // then lookup the reference_node_id
    NodeId ref_node_id = UNKNOWN_NODEID;
  
!   auto &nr_ctx
!     = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!   if (auto id = nr_ctx.lookup (ast_node_id))
!     {
!       ref_node_id = *id;
      }
!   else
      {
        // FIXME
        rust_error_at (UNDEF_LOCATION,
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check.cc gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check.cc	Sun Aug 10 22:32:08 2025
***************
*** 26,36 ****
  #include "rust-hir-type-check-struct-field.h"
  #include "rust-immutable-name-resolution-context.h"
  
! // for flag_name_resolution_2_0
! #include "options.h"
! 
! extern bool
! saw_errors (void);
  
  namespace Rust {
  namespace Resolver {
--- 26,32 ----
  #include "rust-hir-type-check-struct-field.h"
  #include "rust-immutable-name-resolution-context.h"
  
! extern bool saw_errors (void);
  
  namespace Rust {
  namespace Resolver {
*************** TraitItemReference::get_type_from_fn (/*
*** 165,171 ****
    HIR::TraitFunctionDecl &function = fn.get_decl ();
    if (function.has_generics ())
      {
!       TypeCheckBase::ResolveGenericParams (function.get_generic_params (),
  					   substitutions, false /*is_foreign*/,
  					   ABI::RUST);
      }
--- 161,169 ----
    HIR::TraitFunctionDecl &function = fn.get_decl ();
    if (function.has_generics ())
      {
!       TypeCheckBase::ResolveGenericParams (HIR::Item::ItemKind::Function,
! 					   fn.get_locus (),
! 					   function.get_generic_params (),
  					   substitutions, false /*is_foreign*/,
  					   ABI::RUST);
      }
*************** TraitItemReference::get_type_from_fn (/*
*** 231,237 ****
  	      break;
  
  	    case HIR::SelfParam::IMM_REF:
! 	      case HIR::SelfParam::MUT_REF: {
  		auto mutability
  		  = self_param.get_self_kind () == HIR::SelfParam::IMM_REF
  		      ? Mutability::Imm
--- 229,236 ----
  	      break;
  
  	    case HIR::SelfParam::IMM_REF:
! 	    case HIR::SelfParam::MUT_REF:
! 	      {
  		auto mutability
  		  = self_param.get_self_kind () == HIR::SelfParam::IMM_REF
  		      ? Mutability::Imm
*************** TraitItemReference::get_type_from_fn (/*
*** 275,300 ****
  	TyTy::FnParam (param.get_param_name ().clone_pattern (), param_tyty));
      }
  
!   auto &mappings = Analysis::Mappings::get ();
! 
!   tl::optional<CanonicalPath> canonical_path;
!   if (flag_name_resolution_2_0)
!     {
!       auto &nr_ctx
! 	= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
! 
!       canonical_path
! 	= nr_ctx.values.to_canonical_path (fn.get_mappings ().get_nodeid ());
!     }
!   else
!     {
!       canonical_path
! 	= mappings.lookup_canonical_path (fn.get_mappings ().get_nodeid ());
!     }
  
!   rust_assert (canonical_path);
  
!   RustIdent ident{*canonical_path, fn.get_locus ()};
    auto resolved = new TyTy::FnType (
      fn.get_mappings ().get_hirid (), fn.get_mappings ().get_defid (),
      function.get_function_name ().as_string (), ident,
--- 274,286 ----
  	TyTy::FnParam (param.get_param_name ().clone_pattern (), param_tyty));
      }
  
!   auto &nr_ctx
!     = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
!   CanonicalPath canonical_path
!     = nr_ctx.to_canonical_path (fn.get_mappings ().get_nodeid ());
  
!   RustIdent ident{canonical_path, fn.get_locus ()};
    auto resolved = new TyTy::FnType (
      fn.get_mappings ().get_hirid (), fn.get_mappings ().get_defid (),
      function.get_function_name ().as_string (), ident,
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check.h gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check.h
*** gcc-16-20250803/gcc/rust/typecheck/rust-hir-type-check.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-hir-type-check.h	Sun Aug 10 22:32:08 2025
***************
*** 20,25 ****
--- 20,26 ----
  #define RUST_HIR_TYPE_CHECK
  
  #include "rust-hir-map.h"
+ #include "rust-mapping-common.h"
  #include "rust-tyty.h"
  #include "rust-hir-trait-reference.h"
  #include "rust-stacked-contexts.h"
*************** public:
*** 157,162 ****
--- 158,196 ----
    WARN_UNUSED_RESULT Lifetime next () { return Lifetime (interner_index++); }
  };
  
+ struct DeferredOpOverload
+ {
+   HirId expr_id;
+   LangItem::Kind lang_item_type;
+   HIR::PathIdentSegment specified_segment;
+   TyTy::TypeBoundPredicate predicate;
+   HIR::OperatorExprMeta op;
+ 
+   DeferredOpOverload (HirId expr_id, LangItem::Kind lang_item_type,
+ 		      HIR::PathIdentSegment specified_segment,
+ 		      TyTy::TypeBoundPredicate &predicate,
+ 		      HIR::OperatorExprMeta op)
+     : expr_id (expr_id), lang_item_type (lang_item_type),
+       specified_segment (specified_segment), predicate (predicate), op (op)
+   {}
+ 
+   DeferredOpOverload (const struct DeferredOpOverload &other)
+     : expr_id (other.expr_id), lang_item_type (other.lang_item_type),
+       specified_segment (other.specified_segment), predicate (other.predicate),
+       op (other.op)
+   {}
+ 
+   DeferredOpOverload &operator= (struct DeferredOpOverload const &other)
+   {
+     expr_id = other.expr_id;
+     lang_item_type = other.lang_item_type;
+     specified_segment = other.specified_segment;
+     op = other.op;
+ 
+     return *this;
+   }
+ };
+ 
  class TypeCheckContext
  {
  public:
*************** public:
*** 215,224 ****
    bool lookup_associated_type_mapping (HirId id, HirId *mapping);
  
    void insert_associated_impl_mapping (HirId trait_id,
! 				       const TyTy::BaseType *impl_type,
  				       HirId impl_id);
    bool lookup_associated_impl_mapping_for_self (HirId trait_id,
! 						const TyTy::BaseType *self,
  						HirId *mapping);
  
    void insert_autoderef_mappings (HirId id,
--- 249,258 ----
    bool lookup_associated_type_mapping (HirId id, HirId *mapping);
  
    void insert_associated_impl_mapping (HirId trait_id,
! 				       TyTy::BaseType *impl_type,
  				       HirId impl_id);
    bool lookup_associated_impl_mapping_for_self (HirId trait_id,
! 						TyTy::BaseType *self,
  						HirId *mapping);
  
    void insert_autoderef_mappings (HirId id,
*************** public:
*** 237,242 ****
--- 271,283 ----
    void insert_operator_overload (HirId id, TyTy::FnType *call_site);
    bool lookup_operator_overload (HirId id, TyTy::FnType **call);
  
+   void insert_deferred_operator_overload (DeferredOpOverload deferred);
+   bool lookup_deferred_operator_overload (HirId id,
+ 					  DeferredOpOverload *deferred);
+ 
+   void iterate_deferred_operator_overloads (
+     std::function<bool (HirId, DeferredOpOverload &)> cb);
+ 
    void insert_unconstrained_check_marker (HirId id, bool status);
    bool have_checked_for_unconstrained (HirId id, bool *result);
  
*************** public:
*** 263,275 ****
    WARN_UNUSED_RESULT std::vector<TyTy::Region>
    regions_from_generic_args (const HIR::GenericArgs &args) const;
  
!   void compute_inference_variables (bool error);
  
    TyTy::VarianceAnalysis::CrateCtx &get_variance_analysis_ctx ();
  
  private:
    TypeCheckContext ();
  
    std::map<NodeId, HirId> node_id_refs;
    std::map<HirId, TyTy::BaseType *> resolved;
    std::vector<std::unique_ptr<TyTy::BaseType>> builtins;
--- 304,319 ----
    WARN_UNUSED_RESULT std::vector<TyTy::Region>
    regions_from_generic_args (const HIR::GenericArgs &args) const;
  
!   void compute_inference_variables (bool emit_error);
  
    TyTy::VarianceAnalysis::CrateCtx &get_variance_analysis_ctx ();
  
  private:
    TypeCheckContext ();
  
+   bool compute_infer_var (HirId id, TyTy::BaseType *ty, bool emit_error);
+   bool compute_ambigious_op_overload (HirId id, DeferredOpOverload &op);
+ 
    std::map<NodeId, HirId> node_id_refs;
    std::map<HirId, TyTy::BaseType *> resolved;
    std::vector<std::unique_ptr<TyTy::BaseType>> builtins;
*************** private:
*** 281,287 ****
    std::map<HirId, AssociatedImplTrait> associated_impl_traits;
  
    // trait-id -> list of < self-tyty:impl-id>
!   std::map<HirId, std::vector<std::pair<const TyTy::BaseType *, HirId>>>
      associated_traits_to_impls;
  
    std::map<HirId, HirId> associated_type_mappings;
--- 325,331 ----
    std::map<HirId, AssociatedImplTrait> associated_impl_traits;
  
    // trait-id -> list of < self-tyty:impl-id>
!   std::map<HirId, std::vector<std::pair<TyTy::BaseType *, HirId>>>
      associated_traits_to_impls;
  
    std::map<HirId, HirId> associated_type_mappings;
*************** private:
*** 306,311 ****
--- 350,358 ----
    std::set<HirId> querys_in_progress;
    std::set<DefId> trait_queries_in_progress;
  
+   // deferred operator overload
+   std::map<HirId, DeferredOpOverload> deferred_operator_overloads;
+ 
    // variance analysis
    TyTy::VarianceAnalysis::CrateCtx variance_analysis_ctx;
  
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-substitution-mapper.cc gcc-16-20250810/gcc/rust/typecheck/rust-substitution-mapper.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-substitution-mapper.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-substitution-mapper.cc	Sun Aug 10 22:32:08 2025
*************** SubstMapperInternal::visit (TyTy::ParamT
*** 268,273 ****
--- 268,279 ----
  }
  
  void
+ SubstMapperInternal::visit (TyTy::ConstType &type)
+ {
+   resolved = type.handle_substitions (mappings);
+ }
+ 
+ void
  SubstMapperInternal::visit (TyTy::PlaceholderType &type)
  {
    rust_assert (type.can_resolve ());
*************** SubstMapperInternal::visit (TyTy::Dynami
*** 374,380 ****
  void
  SubstMapperInternal::visit (TyTy::OpaqueType &type)
  {
!   resolved = type.handle_substitions (mappings);
  }
  
  // SubstMapperFromExisting
--- 380,386 ----
  void
  SubstMapperInternal::visit (TyTy::OpaqueType &type)
  {
!   resolved = type.clone ();
  }
  
  // SubstMapperFromExisting
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-substitution-mapper.h gcc-16-20250810/gcc/rust/typecheck/rust-substitution-mapper.h
*** gcc-16-20250803/gcc/rust/typecheck/rust-substitution-mapper.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-substitution-mapper.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 61,66 ****
--- 61,67 ----
    void visit (TyTy::ReferenceType &) override { rust_unreachable (); }
    void visit (TyTy::PointerType &) override { rust_unreachable (); }
    void visit (TyTy::ParamType &) override { rust_unreachable (); }
+   void visit (TyTy::ConstType &) override { rust_unreachable (); }
    void visit (TyTy::StrType &) override { rust_unreachable (); }
    void visit (TyTy::NeverType &) override { rust_unreachable (); }
    void visit (TyTy::DynamicObjectType &) override { rust_unreachable (); }
*************** public:
*** 92,97 ****
--- 93,99 ----
    void visit (TyTy::ReferenceType &type) override;
    void visit (TyTy::PointerType &type) override;
    void visit (TyTy::ParamType &type) override;
+   void visit (TyTy::ConstType &type) override;
    void visit (TyTy::PlaceholderType &type) override;
    void visit (TyTy::ProjectionType &type) override;
    void visit (TyTy::ClosureType &type) override;
*************** public:
*** 145,150 ****
--- 147,153 ----
    void visit (TyTy::ReferenceType &) override { rust_unreachable (); }
    void visit (TyTy::PointerType &) override { rust_unreachable (); }
    void visit (TyTy::ParamType &) override { rust_unreachable (); }
+   void visit (TyTy::ConstType &) override { rust_unreachable (); }
    void visit (TyTy::StrType &) override { rust_unreachable (); }
    void visit (TyTy::NeverType &) override { rust_unreachable (); }
    void visit (TyTy::PlaceholderType &) override { rust_unreachable (); }
*************** public:
*** 185,196 ****
    void visit (const TyTy::ReferenceType &) override {}
    void visit (const TyTy::PointerType &) override {}
    void visit (const TyTy::ParamType &) override {}
    void visit (const TyTy::StrType &) override {}
    void visit (const TyTy::NeverType &) override {}
    void visit (const TyTy::PlaceholderType &) override {}
    void visit (const TyTy::ProjectionType &) override {}
    void visit (const TyTy::DynamicObjectType &) override {}
!   void visit (const TyTy::OpaqueType &type) override {}
  
  private:
    GetUsedSubstArgs ();
--- 188,200 ----
    void visit (const TyTy::ReferenceType &) override {}
    void visit (const TyTy::PointerType &) override {}
    void visit (const TyTy::ParamType &) override {}
+   void visit (const TyTy::ConstType &) override {}
    void visit (const TyTy::StrType &) override {}
    void visit (const TyTy::NeverType &) override {}
    void visit (const TyTy::PlaceholderType &) override {}
    void visit (const TyTy::ProjectionType &) override {}
    void visit (const TyTy::DynamicObjectType &) override {}
!   void visit (const TyTy::OpaqueType &) override {}
  
  private:
    GetUsedSubstArgs ();
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-type-util.cc gcc-16-20250810/gcc/rust/typecheck/rust-type-util.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-type-util.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-type-util.cc	Sun Aug 10 22:32:08 2025
***************
*** 24,29 ****
--- 24,30 ----
  #include "rust-hir-type-check.h"
  #include "rust-hir-type-check-type.h"
  #include "rust-casts.h"
+ #include "rust-mapping-common.h"
  #include "rust-unify.h"
  #include "rust-coercion.h"
  #include "rust-hir-type-bounds.h"
*************** bool
*** 37,51 ****
  query_type (HirId reference, TyTy::BaseType **result)
  {
    auto &mappings = Analysis::Mappings::get ();
-   auto &resolver = *Resolver::get ();
    TypeCheckContext *context = TypeCheckContext::get ();
  
-   if (context->query_in_progress (reference))
-     return false;
- 
    if (context->lookup_type (reference, result))
      return true;
  
    context->insert_query (reference);
  
    std::pair<HIR::Enum *, HIR::EnumItem *> enum_candidiate
--- 38,51 ----
  query_type (HirId reference, TyTy::BaseType **result)
  {
    auto &mappings = Analysis::Mappings::get ();
    TypeCheckContext *context = TypeCheckContext::get ();
  
    if (context->lookup_type (reference, result))
      return true;
  
+   if (context->query_in_progress (reference))
+     return false;
+ 
    context->insert_query (reference);
  
    std::pair<HIR::Enum *, HIR::EnumItem *> enum_candidiate
*************** query_type (HirId reference, TyTy::BaseT
*** 103,120 ****
  	  NodeId ref_node_id = UNKNOWN_NODEID;
  	  NodeId ast_node_id = ty.get_mappings ().get_nodeid ();
  
! 	  if (flag_name_resolution_2_0)
! 	    {
! 	      auto &nr_ctx = Resolver2_0::ImmutableNameResolutionContext::get ()
! 			       .resolver ();
  
! 	      // assign the ref_node_id if we've found something
! 	      nr_ctx.lookup (ast_node_id)
! 		.map (
! 		  [&ref_node_id] (NodeId resolved) { ref_node_id = resolved; });
! 	    }
! 	  else if (!resolver.lookup_resolved_name (ast_node_id, &ref_node_id))
! 	    resolver.lookup_resolved_type (ast_node_id, &ref_node_id);
  
  	  if (ref_node_id != UNKNOWN_NODEID)
  	    {
--- 103,115 ----
  	  NodeId ref_node_id = UNKNOWN_NODEID;
  	  NodeId ast_node_id = ty.get_mappings ().get_nodeid ();
  
! 	  auto &nr_ctx
! 	    = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
  
! 	  // assign the ref_node_id if we've found something
! 	  nr_ctx.lookup (ast_node_id).map ([&ref_node_id] (NodeId resolved) {
! 	    ref_node_id = resolved;
! 	  });
  
  	  if (ref_node_id != UNKNOWN_NODEID)
  	    {
*************** unify_site_and (HirId id, TyTy::TyWithLo
*** 192,201 ****
    TyTy::BaseType *expected = lhs.get_ty ();
    TyTy::BaseType *expr = rhs.get_ty ();
  
!   rust_debug (
!     "unify_site_and commit %s infer %s id={%u} expected={%s} expr={%s}",
!     commit_if_ok ? "true" : "false", implicit_infer_vars ? "true" : "false", id,
!     expected->debug_str ().c_str (), expr->debug_str ().c_str ());
  
    std::vector<UnifyRules::CommitSite> commits;
    std::vector<UnifyRules::InferenceSite> infers;
--- 187,198 ----
    TyTy::BaseType *expected = lhs.get_ty ();
    TyTy::BaseType *expr = rhs.get_ty ();
  
!   rust_debug_loc (
!     unify_locus,
!     "begin unify_site_and commit %s infer %s id={%u} expected={%s} expr={%s}",
!     commit_if_ok ? "true" : "false", implicit_infer_vars ? "true" : "false",
!     id == UNKNOWN_HIRID ? 0 : id, expected->debug_str ().c_str (),
!     expr->debug_str ().c_str ());
  
    std::vector<UnifyRules::CommitSite> commits;
    std::vector<UnifyRules::InferenceSite> infers;
*************** unify_site_and (HirId id, TyTy::TyWithLo
*** 203,208 ****
--- 200,214 ----
      = UnifyRules::Resolve (lhs, rhs, unify_locus, false /*commit inline*/,
  			   emit_errors, implicit_infer_vars, commits, infers);
    bool ok = result->get_kind () != TyTy::TypeKind::ERROR;
+ 
+   rust_debug_loc (unify_locus,
+ 		  "unify_site_and done ok=%s commit %s infer %s id={%u} "
+ 		  "expected={%s} expr={%s}",
+ 		  ok ? "true" : "false", commit_if_ok ? "true" : "false",
+ 		  implicit_infer_vars ? "true" : "false",
+ 		  id == UNKNOWN_HIRID ? 0 : id, expected->debug_str ().c_str (),
+ 		  expr->debug_str ().c_str ());
+ 
    if (ok && commit_if_ok)
      {
        for (auto &c : commits)
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-type-util.h gcc-16-20250810/gcc/rust/typecheck/rust-type-util.h
*** gcc-16-20250803/gcc/rust/typecheck/rust-type-util.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-type-util.h	Sun Aug 10 22:32:08 2025
***************
*** 25,57 ****
  namespace Rust {
  namespace Resolver {
  
! bool
! query_type (HirId reference, TyTy::BaseType **result);
  
! bool
! types_compatable (TyTy::TyWithLocation lhs, TyTy::TyWithLocation rhs,
! 		  location_t unify_locus, bool emit_errors);
  
! TyTy::BaseType *
! unify_site (HirId id, TyTy::TyWithLocation lhs, TyTy::TyWithLocation rhs,
! 	    location_t unify_locus);
  
! TyTy::BaseType *
! unify_site_and (HirId id, TyTy::TyWithLocation lhs, TyTy::TyWithLocation rhs,
! 		location_t unify_locus, bool emit_errors, bool commit_if_ok,
! 		bool implicit_infer_vars, bool cleanup);
  
! TyTy::BaseType *
! coercion_site (HirId id, TyTy::TyWithLocation lhs, TyTy::TyWithLocation rhs,
! 	       location_t coercion_locus);
  
! TyTy::BaseType *
! try_coercion (HirId id, TyTy::TyWithLocation lhs, TyTy::TyWithLocation rhs,
! 	      location_t coercion_locus);
  
! TyTy::BaseType *
! cast_site (HirId id, TyTy::TyWithLocation from, TyTy::TyWithLocation to,
! 	   location_t cast_locus);
  
  AssociatedImplTrait *
  lookup_associated_impl_block (const TyTy::TypeBoundPredicate &bound,
--- 25,54 ----
  namespace Rust {
  namespace Resolver {
  
! bool query_type (HirId reference, TyTy::BaseType **result);
  
! bool types_compatable (TyTy::TyWithLocation lhs, TyTy::TyWithLocation rhs,
! 		       location_t unify_locus, bool emit_errors);
  
! TyTy::BaseType *unify_site (HirId id, TyTy::TyWithLocation lhs,
! 			    TyTy::TyWithLocation rhs, location_t unify_locus);
  
! TyTy::BaseType *unify_site_and (HirId id, TyTy::TyWithLocation lhs,
! 				TyTy::TyWithLocation rhs,
! 				location_t unify_locus, bool emit_errors,
! 				bool commit_if_ok, bool implicit_infer_vars,
! 				bool cleanup);
  
! TyTy::BaseType *coercion_site (HirId id, TyTy::TyWithLocation lhs,
! 			       TyTy::TyWithLocation rhs,
! 			       location_t coercion_locus);
  
! TyTy::BaseType *try_coercion (HirId id, TyTy::TyWithLocation lhs,
! 			      TyTy::TyWithLocation rhs,
! 			      location_t coercion_locus);
  
! TyTy::BaseType *cast_site (HirId id, TyTy::TyWithLocation from,
! 			   TyTy::TyWithLocation to, location_t cast_locus);
  
  AssociatedImplTrait *
  lookup_associated_impl_block (const TyTy::TypeBoundPredicate &bound,
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-typecheck-context.cc gcc-16-20250810/gcc/rust/typecheck/rust-typecheck-context.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-typecheck-context.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-typecheck-context.cc	Sun Aug 10 22:32:08 2025
***************
*** 18,23 ****
--- 18,24 ----
  
  #include "rust-hir-type-check.h"
  #include "rust-type-util.h"
+ #include "rust-hir-type-check-expr.h"
  
  namespace Rust {
  namespace Resolver {
*************** TypeCheckContext::lookup_associated_type
*** 299,306 ****
  }
  
  void
! TypeCheckContext::insert_associated_impl_mapping (
!   HirId trait_id, const TyTy::BaseType *impl_type, HirId impl_id)
  {
    auto it = associated_traits_to_impls.find (trait_id);
    if (it == associated_traits_to_impls.end ())
--- 300,308 ----
  }
  
  void
! TypeCheckContext::insert_associated_impl_mapping (HirId trait_id,
! 						  TyTy::BaseType *impl_type,
! 						  HirId impl_id)
  {
    auto it = associated_traits_to_impls.find (trait_id);
    if (it == associated_traits_to_impls.end ())
*************** TypeCheckContext::insert_associated_impl
*** 312,319 ****
  }
  
  bool
! TypeCheckContext::lookup_associated_impl_mapping_for_self (
!   HirId trait_id, const TyTy::BaseType *self, HirId *mapping)
  {
    auto it = associated_traits_to_impls.find (trait_id);
    if (it == associated_traits_to_impls.end ())
--- 314,322 ----
  }
  
  bool
! TypeCheckContext::lookup_associated_impl_mapping_for_self (HirId trait_id,
! 							   TyTy::BaseType *self,
! 							   HirId *mapping)
  {
    auto it = associated_traits_to_impls.find (trait_id);
    if (it == associated_traits_to_impls.end ())
*************** TypeCheckContext::lookup_associated_impl
*** 321,327 ****
  
    for (auto &item : it->second)
      {
!       if (item.first->can_eq (self, false))
  	{
  	  *mapping = item.second;
  	  return true;
--- 324,332 ----
  
    for (auto &item : it->second)
      {
!       if (types_compatable (TyTy::TyWithLocation (item.first),
! 			    TyTy::TyWithLocation (self), UNKNOWN_LOCATION,
! 			    false))
  	{
  	  *mapping = item.second;
  	  return true;
*************** TypeCheckContext::lookup_operator_overlo
*** 409,414 ****
--- 414,451 ----
  }
  
  void
+ TypeCheckContext::insert_deferred_operator_overload (
+   DeferredOpOverload deferred)
+ {
+   HirId expr_id = deferred.expr_id;
+   deferred_operator_overloads.emplace (std::make_pair (expr_id, deferred));
+ }
+ 
+ bool
+ TypeCheckContext::lookup_deferred_operator_overload (
+   HirId id, DeferredOpOverload *deferred)
+ {
+   auto it = deferred_operator_overloads.find (id);
+   if (it == deferred_operator_overloads.end ())
+     return false;
+ 
+   *deferred = it->second;
+   return true;
+ }
+ 
+ void
+ TypeCheckContext::iterate_deferred_operator_overloads (
+   std::function<bool (HirId, DeferredOpOverload &)> cb)
+ {
+   for (auto it = deferred_operator_overloads.begin ();
+        it != deferred_operator_overloads.end (); it++)
+     {
+       if (!cb (it->first, it->second))
+ 	return;
+     }
+ }
+ 
+ void
  TypeCheckContext::insert_unconstrained_check_marker (HirId id, bool status)
  {
    unconstrained[id] = status;
*************** TypeCheckContext::regions_from_generic_a
*** 574,617 ****
    return regions;
  }
  
  void
! TypeCheckContext::compute_inference_variables (bool error)
  {
!   auto &mappings = Analysis::Mappings::get ();
  
-   // default inference variables if possible
    iterate ([&] (HirId id, TyTy::BaseType *ty) mutable -> bool {
!     // nothing to do
!     if (ty->get_kind () != TyTy::TypeKind::INFER)
!       return true;
  
!     TyTy::InferType *infer_var = static_cast<TyTy::InferType *> (ty);
!     TyTy::BaseType *default_type;
  
!     rust_debug_loc (mappings.lookup_location (id),
! 		    "trying to default infer-var: %s",
! 		    infer_var->as_string ().c_str ());
!     bool ok = infer_var->default_type (&default_type);
!     if (!ok)
!       {
! 	if (error)
! 	  rust_error_at (mappings.lookup_location (id), ErrorCode::E0282,
! 			 "type annotations needed");
! 	return true;
!       }
  
!     auto result
!       = unify_site (id, TyTy::TyWithLocation (ty),
! 		    TyTy::TyWithLocation (default_type), UNDEF_LOCATION);
!     rust_assert (result);
!     rust_assert (result->get_kind () != TyTy::TypeKind::ERROR);
!     result->set_ref (id);
!     insert_type (Analysis::NodeMapping (mappings.get_current_crate (), 0, id,
! 					UNKNOWN_LOCAL_DEFID),
! 		 result);
  
!     return true;
!   });
  }
  
  TyTy::VarianceAnalysis::CrateCtx &
--- 611,687 ----
    return regions;
  }
  
+ bool
+ TypeCheckContext::compute_ambigious_op_overload (HirId id,
+ 						 DeferredOpOverload &op)
+ {
+   rust_debug ("attempting resolution of op overload: %s",
+ 	      op.predicate.as_string ().c_str ());
+ 
+   TyTy::BaseType *lhs = nullptr;
+   bool ok = lookup_type (op.op.get_lvalue_mappings ().get_hirid (), &lhs);
+   rust_assert (ok);
+ 
+   TyTy::BaseType *rhs = nullptr;
+   if (op.op.has_rvalue_mappings ())
+     {
+       bool ok = lookup_type (op.op.get_rvalue_mappings ().get_hirid (), &rhs);
+       rust_assert (ok);
+     }
+ 
+   TypeCheckExpr::ResolveOpOverload (op.lang_item_type, op.op, lhs, rhs,
+ 				    op.specified_segment);
+ 
+   return true;
+ }
+ 
  void
! TypeCheckContext::compute_inference_variables (bool emit_error)
  {
!   iterate_deferred_operator_overloads (
!     [&] (HirId id, DeferredOpOverload &op) mutable -> bool {
!       return compute_ambigious_op_overload (id, op);
!     });
  
    iterate ([&] (HirId id, TyTy::BaseType *ty) mutable -> bool {
!     return compute_infer_var (id, ty, emit_error);
!   });
! }
  
! bool
! TypeCheckContext::compute_infer_var (HirId id, TyTy::BaseType *ty,
! 				     bool emit_error)
! {
!   auto &mappings = Analysis::Mappings::get ();
  
!   // nothing to do
!   if (ty->get_kind () != TyTy::TypeKind::INFER)
!     return true;
  
!   TyTy::InferType *infer_var = static_cast<TyTy::InferType *> (ty);
!   TyTy::BaseType *default_type;
  
!   rust_debug_loc (mappings.lookup_location (id),
! 		  "trying to default infer-var: %s",
! 		  infer_var->as_string ().c_str ());
!   bool ok = infer_var->default_type (&default_type);
!   if (!ok)
!     {
!       if (emit_error)
! 	rust_error_at (mappings.lookup_location (id), ErrorCode::E0282,
! 		       "type annotations needed");
!       return true;
!     }
! 
!   auto result
!     = unify_site (id, TyTy::TyWithLocation (ty),
! 		  TyTy::TyWithLocation (default_type), UNDEF_LOCATION);
!   rust_assert (result);
!   rust_assert (result->get_kind () != TyTy::TypeKind::ERROR);
!   result->set_ref (id);
!   insert_implicit_type (id, result);
! 
!   return true;
  }
  
  TyTy::VarianceAnalysis::CrateCtx &
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-tyty-bounds.cc gcc-16-20250810/gcc/rust/typecheck/rust-tyty-bounds.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-tyty-bounds.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-tyty-bounds.cc	Sun Aug 10 22:32:08 2025
*************** TypeBoundsProbe::is_bound_satisfied_for_
*** 61,66 ****
--- 61,99 ----
    return false;
  }
  
+ bool
+ TypeBoundsProbe::process_impl_block (
+   HirId id, HIR::ImplBlock *impl,
+   std::vector<std::pair<HIR::TypePath *, HIR::ImplBlock *>>
+     &possible_trait_paths)
+ {
+   // we are filtering for trait-impl-blocks
+   if (!impl->has_trait_ref ())
+     return true;
+ 
+   // can be recursive trait resolution
+   HIR::Trait *t = TraitResolver::ResolveHirItem (impl->get_trait_ref ());
+   if (t == nullptr)
+     return true;
+   // DefId trait_id = t->get_mappings ().get_defid ();
+   // if (context->trait_query_in_progress (trait_id))
+   //   return true;
+ 
+   HirId impl_ty_id = impl->get_type ().get_mappings ().get_hirid ();
+   TyTy::BaseType *impl_type = nullptr;
+   if (!query_type (impl_ty_id, &impl_type))
+     return true;
+ 
+   if (!receiver->can_eq (impl_type, false))
+     {
+       if (!impl_type->can_eq (receiver, false))
+ 	return true;
+     }
+ 
+   possible_trait_paths.push_back ({&impl->get_trait_ref (), impl});
+   return true;
+ }
+ 
  void
  TypeBoundsProbe::scan ()
  {
*************** TypeBoundsProbe::scan ()
*** 68,98 ****
      possible_trait_paths;
    mappings.iterate_impl_blocks (
      [&] (HirId id, HIR::ImplBlock *impl) mutable -> bool {
!       // we are filtering for trait-impl-blocks
!       if (!impl->has_trait_ref ())
! 	return true;
! 
!       // can be recursive trait resolution
!       HIR::Trait *t = TraitResolver::ResolveHirItem (impl->get_trait_ref ());
!       if (t == nullptr)
! 	return true;
!       DefId trait_id = t->get_mappings ().get_defid ();
!       if (context->trait_query_in_progress (trait_id))
! 	return true;
! 
!       HirId impl_ty_id = impl->get_type ().get_mappings ().get_hirid ();
!       TyTy::BaseType *impl_type = nullptr;
!       if (!query_type (impl_ty_id, &impl_type))
! 	return true;
! 
!       if (!receiver->can_eq (impl_type, false))
! 	{
! 	  if (!impl_type->can_eq (receiver, false))
! 	    return true;
! 	}
! 
!       possible_trait_paths.push_back ({&impl->get_trait_ref (), impl});
!       return true;
      });
  
    for (auto &path : possible_trait_paths)
--- 101,107 ----
      possible_trait_paths;
    mappings.iterate_impl_blocks (
      [&] (HirId id, HIR::ImplBlock *impl) mutable -> bool {
!       return process_impl_block (id, impl, possible_trait_paths);
      });
  
    for (auto &path : possible_trait_paths)
*************** TypeBoundsProbe::scan ()
*** 105,111 ****
      }
  
    // marker traits...
!   assemble_sized_builtin ();
  
    // add auto trait bounds
    for (auto *auto_trait : mappings.get_auto_traits ())
--- 114,120 ----
      }
  
    // marker traits...
!   assemble_marker_builtins ();
  
    // add auto trait bounds
    for (auto *auto_trait : mappings.get_auto_traits ())
*************** TypeBoundsProbe::scan ()
*** 113,119 ****
  }
  
  void
! TypeBoundsProbe::assemble_sized_builtin ()
  {
    const TyTy::BaseType *raw = receiver->destructure ();
  
--- 122,128 ----
  }
  
  void
! TypeBoundsProbe::assemble_marker_builtins ()
  {
    const TyTy::BaseType *raw = receiver->destructure ();
  
*************** TypeBoundsProbe::assemble_sized_builtin
*** 132,138 ****
      case TyTy::POINTER:
      case TyTy::PARAM:
      case TyTy::FNDEF:
-     case TyTy::FNPTR:
      case TyTy::BOOL:
      case TyTy::CHAR:
      case TyTy::INT:
--- 141,146 ----
*************** TypeBoundsProbe::assemble_sized_builtin
*** 140,146 ****
      case TyTy::FLOAT:
      case TyTy::USIZE:
      case TyTy::ISIZE:
-     case TyTy::CLOSURE:
      case TyTy::INFER:
      case TyTy::NEVER:
      case TyTy::PLACEHOLDER:
--- 148,153 ----
*************** TypeBoundsProbe::assemble_sized_builtin
*** 149,154 ****
--- 156,169 ----
        assemble_builtin_candidate (LangItem::Kind::SIZED);
        break;
  
+     case TyTy::FNPTR:
+     case TyTy::CLOSURE:
+       assemble_builtin_candidate (LangItem::Kind::SIZED);
+       assemble_builtin_candidate (LangItem::Kind::FN_ONCE);
+       assemble_builtin_candidate (LangItem::Kind::FN);
+       assemble_builtin_candidate (LangItem::Kind::FN_MUT);
+       break;
+ 
        // FIXME str and slice need to be moved and test cases updated
      case TyTy::SLICE:
      case TyTy::STR:
*************** TypeBoundsProbe::assemble_sized_builtin
*** 158,163 ****
--- 173,179 ----
        assemble_builtin_candidate (LangItem::Kind::SIZED);
        break;
  
+     case TyTy::CONST:
      case TyTy::DYNAMIC:
      case TyTy::ERROR:
        break;
*************** TyTy::TypeBoundPredicate
*** 206,212 ****
  TypeCheckBase::get_predicate_from_bound (
    HIR::TypePath &type_path,
    tl::optional<std::reference_wrapper<HIR::Type>> associated_self,
!   BoundPolarity polarity, bool is_qualified_type_path)
  {
    TyTy::TypeBoundPredicate lookup = TyTy::TypeBoundPredicate::error ();
    bool already_resolved
--- 222,228 ----
  TypeCheckBase::get_predicate_from_bound (
    HIR::TypePath &type_path,
    tl::optional<std::reference_wrapper<HIR::Type>> associated_self,
!   BoundPolarity polarity, bool is_qualified_type_path, bool is_super_trait)
  {
    TyTy::TypeBoundPredicate lookup = TyTy::TypeBoundPredicate::error ();
    bool already_resolved
*************** TypeCheckBase::get_predicate_from_bound
*** 226,232 ****
    auto &final_seg = type_path.get_final_segment ();
    switch (final_seg.get_type ())
      {
!       case HIR::TypePathSegment::SegmentType::GENERIC: {
  	auto &final_generic_seg
  	  = static_cast<HIR::TypePathSegmentGeneric &> (final_seg);
  	if (final_generic_seg.has_generic_args ())
--- 242,249 ----
    auto &final_seg = type_path.get_final_segment ();
    switch (final_seg.get_type ())
      {
!     case HIR::TypePathSegment::SegmentType::GENERIC:
!       {
  	auto &final_generic_seg
  	  = static_cast<HIR::TypePathSegmentGeneric &> (final_seg);
  	if (final_generic_seg.has_generic_args ())
*************** TypeCheckBase::get_predicate_from_bound
*** 251,257 ****
        }
        break;
  
!       case HIR::TypePathSegment::SegmentType::FUNCTION: {
  	auto &final_function_seg
  	  = static_cast<HIR::TypePathSegmentFunction &> (final_seg);
  	auto &fn = final_function_seg.get_function_path ();
--- 268,275 ----
        }
        break;
  
!     case HIR::TypePathSegment::SegmentType::FUNCTION:
!       {
  	auto &final_function_seg
  	  = static_cast<HIR::TypePathSegmentFunction &> (final_seg);
  	auto &fn = final_function_seg.get_function_path ();
*************** TypeCheckBase::get_predicate_from_bound
*** 327,333 ****
    if (!args.is_empty () || predicate.requires_generic_args ())
      {
        // this is applying generic arguments to a trait reference
!       predicate.apply_generic_arguments (&args, associated_self.has_value ());
      }
  
    context->insert_resolved_predicate (type_path.get_mappings ().get_hirid (),
--- 345,352 ----
    if (!args.is_empty () || predicate.requires_generic_args ())
      {
        // this is applying generic arguments to a trait reference
!       predicate.apply_generic_arguments (&args, associated_self.has_value (),
! 					 is_super_trait);
      }
  
    context->insert_resolved_predicate (type_path.get_mappings ().get_hirid (),
*************** TypeBoundPredicate::is_object_safe (bool
*** 508,514 ****
  
  void
  TypeBoundPredicate::apply_generic_arguments (HIR::GenericArgs *generic_args,
! 					     bool has_associated_self)
  {
    rust_assert (!substitutions.empty ());
    if (has_associated_self)
--- 527,534 ----
  
  void
  TypeBoundPredicate::apply_generic_arguments (HIR::GenericArgs *generic_args,
! 					     bool has_associated_self,
! 					     bool is_super_trait)
  {
    rust_assert (!substitutions.empty ());
    if (has_associated_self)
*************** TypeBoundPredicate::apply_generic_argume
*** 529,551 ****
      Resolver::TypeCheckContext::get ()->regions_from_generic_args (
        *generic_args));
  
!   apply_argument_mappings (args);
  }
  
  void
  TypeBoundPredicate::apply_argument_mappings (
!   SubstitutionArgumentMappings &arguments)
  {
    used_arguments = arguments;
    error_flag |= used_arguments.is_error ();
    auto &subst_mappings = used_arguments;
    for (auto &sub : get_substs ())
      {
        SubstitutionArg arg = SubstitutionArg::error ();
        bool ok
  	= subst_mappings.get_argument_for_symbol (sub.get_param_ty (), &arg);
        if (ok && arg.get_tyty () != nullptr)
! 	sub.fill_param_ty (subst_mappings, subst_mappings.get_locus ());
      }
  
    // associated argument mappings
--- 549,574 ----
      Resolver::TypeCheckContext::get ()->regions_from_generic_args (
        *generic_args));
  
!   apply_argument_mappings (args, is_super_trait);
  }
  
  void
  TypeBoundPredicate::apply_argument_mappings (
!   SubstitutionArgumentMappings &arguments, bool is_super_trait)
  {
    used_arguments = arguments;
    error_flag |= used_arguments.is_error ();
    auto &subst_mappings = used_arguments;
+ 
+   bool substs_need_bounds_check = !is_super_trait;
    for (auto &sub : get_substs ())
      {
        SubstitutionArg arg = SubstitutionArg::error ();
        bool ok
  	= subst_mappings.get_argument_for_symbol (sub.get_param_ty (), &arg);
        if (ok && arg.get_tyty () != nullptr)
! 	sub.fill_param_ty (subst_mappings, subst_mappings.get_locus (),
! 			   substs_need_bounds_check);
      }
  
    // associated argument mappings
*************** TypeBoundPredicate::apply_argument_mappi
*** 566,572 ****
        auto adjusted
  	= super_trait.adjust_mappings_for_this (used_arguments,
  						true /*trait mode*/);
!       super_trait.apply_argument_mappings (adjusted);
      }
  }
  
--- 589,595 ----
        auto adjusted
  	= super_trait.adjust_mappings_for_this (used_arguments,
  						true /*trait mode*/);
!       super_trait.apply_argument_mappings (adjusted, is_super_trait);
      }
  }
  
*************** TypeBoundPredicate::handle_substitions (
*** 699,705 ****
        if (sub.get_param_ty () == nullptr)
  	continue;
  
!       ParamType *p = sub.get_param_ty ();
        BaseType *r = p->resolve ();
        BaseType *s = Resolver::SubstMapperInternal::Resolve (r, subst_mappings);
  
--- 722,728 ----
        if (sub.get_param_ty () == nullptr)
  	continue;
  
!       auto p = sub.get_param_ty ();
        BaseType *r = p->resolve ();
        BaseType *s = Resolver::SubstMapperInternal::Resolve (r, subst_mappings);
  
*************** size_t
*** 746,761 ****
  TypeBoundPredicate::get_num_associated_bindings () const
  {
    size_t count = 0;
    auto trait_ref = get ();
!   for (const auto &trait_item : trait_ref->get_trait_items ())
      {
!       bool is_associated_type
! 	= trait_item.get_trait_item_type ()
! 	  == Resolver::TraitItemReference::TraitItemType::TYPE;
!       if (is_associated_type)
! 	count++;
      }
-   return count;
  }
  
  TypeBoundPredicateItem
--- 769,802 ----
  TypeBoundPredicate::get_num_associated_bindings () const
  {
    size_t count = 0;
+ 
+   get_trait_hierachy ([&count] (const Resolver::TraitReference &ref) {
+     for (const auto &trait_item : ref.get_trait_items ())
+       {
+ 	bool is_associated_type
+ 	  = trait_item.get_trait_item_type ()
+ 	    == Resolver::TraitItemReference::TraitItemType::TYPE;
+ 	if (is_associated_type)
+ 	  count++;
+       }
+   });
+ 
+   return count;
+ }
+ 
+ void
+ TypeBoundPredicate::get_trait_hierachy (
+   std::function<void (const Resolver::TraitReference &)> callback) const
+ {
    auto trait_ref = get ();
!   callback (*trait_ref);
! 
!   for (auto &super : super_traits)
      {
!       const auto &super_trait_ref = *super.get ();
!       callback (super_trait_ref);
!       super.get_trait_hierachy (callback);
      }
  }
  
  TypeBoundPredicateItem
*************** TypeBoundPredicate::is_equal (const Type
*** 808,828 ****
    // then match the generics applied
    for (size_t i = 0; i < get_num_substitutions (); i++)
      {
!       const SubstitutionParamMapping &a = substitutions.at (i);
!       const SubstitutionParamMapping &b = other.substitutions.at (i);
  
!       const ParamType *ap = a.get_param_ty ();
!       const ParamType *bp = b.get_param_ty ();
  
!       const BaseType *apd = ap->destructure ();
!       const BaseType *bpd = bp->destructure ();
  
!       // FIXME use the unify_and infer inteface or try coerce
!       if (!apd->can_eq (bpd, false /*emit_errors*/))
! 	{
! 	  if (!bpd->can_eq (apd, false /*emit_errors*/))
! 	    return false;
! 	}
      }
  
    return true;
--- 849,867 ----
    // then match the generics applied
    for (size_t i = 0; i < get_num_substitutions (); i++)
      {
!       SubstitutionParamMapping a = substitutions.at (i);
!       SubstitutionParamMapping b = other.substitutions.at (i);
  
!       auto ap = a.get_param_ty ();
!       auto bp = b.get_param_ty ();
  
!       BaseType *apd = ap->destructure ();
!       BaseType *bpd = bp->destructure ();
  
!       if (!Resolver::types_compatable (TyTy::TyWithLocation (apd),
! 				       TyTy::TyWithLocation (bpd),
! 				       UNKNOWN_LOCATION, false))
! 	return false;
      }
  
    return true;
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-tyty-call.cc gcc-16-20250810/gcc/rust/typecheck/rust-tyty-call.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-tyty-call.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-tyty-call.cc	Sun Aug 10 22:32:08 2025
*************** TypeCheckCallExpr::visit (FnType &type)
*** 171,177 ****
  	    {
  	    case TyTy::TypeKind::ERROR:
  	      return;
! 	      case TyTy::TypeKind::INT: {
  		auto &int_ty
  		  = static_cast<TyTy::IntType &> (*argument_expr_tyty);
  		if ((int_ty.get_int_kind () == TyTy::IntType::IntKind::I8)
--- 171,178 ----
  	    {
  	    case TyTy::TypeKind::ERROR:
  	      return;
! 	    case TyTy::TypeKind::INT:
! 	      {
  		auto &int_ty
  		  = static_cast<TyTy::IntType &> (*argument_expr_tyty);
  		if ((int_ty.get_int_kind () == TyTy::IntType::IntKind::I8)
*************** TypeCheckCallExpr::visit (FnType &type)
*** 186,192 ****
  		  }
  		break;
  	      }
! 	      case TyTy::TypeKind::UINT: {
  		auto &uint_ty
  		  = static_cast<TyTy::UintType &> (*argument_expr_tyty);
  		if ((uint_ty.get_uint_kind () == TyTy::UintType::UintKind::U8)
--- 187,194 ----
  		  }
  		break;
  	      }
! 	    case TyTy::TypeKind::UINT:
! 	      {
  		auto &uint_ty
  		  = static_cast<TyTy::UintType &> (*argument_expr_tyty);
  		if ((uint_ty.get_uint_kind () == TyTy::UintType::UintKind::U8)
*************** TypeCheckCallExpr::visit (FnType &type)
*** 202,208 ****
  		  }
  		break;
  	      }
! 	      case TyTy::TypeKind::FLOAT: {
  		if (static_cast<TyTy::FloatType &> (*argument_expr_tyty)
  		      .get_float_kind ()
  		    == TyTy::FloatType::FloatKind::F32)
--- 204,211 ----
  		  }
  		break;
  	      }
! 	    case TyTy::TypeKind::FLOAT:
! 	      {
  		if (static_cast<TyTy::FloatType &> (*argument_expr_tyty)
  		      .get_float_kind ()
  		    == TyTy::FloatType::FloatKind::F32)
*************** TypeCheckCallExpr::visit (FnType &type)
*** 216,229 ****
  		  }
  		break;
  	      }
! 	      case TyTy::TypeKind::BOOL: {
  		rich_location richloc (line_table, arg_locus);
  		richloc.add_fixit_replace ("cast the value to c_int: as c_int");
  		rust_error_at (arg_locus, ErrorCode::E0617,
  			       "expected %<c_int%> variadic argument");
  		return;
  	      }
! 	      case TyTy::TypeKind::FNDEF: {
  		rust_error_at (
  		  arg_locus, ErrorCode::E0617,
  		  "unexpected function definition type as variadic "
--- 219,234 ----
  		  }
  		break;
  	      }
! 	    case TyTy::TypeKind::BOOL:
! 	      {
  		rich_location richloc (line_table, arg_locus);
  		richloc.add_fixit_replace ("cast the value to c_int: as c_int");
  		rust_error_at (arg_locus, ErrorCode::E0617,
  			       "expected %<c_int%> variadic argument");
  		return;
  	      }
! 	    case TyTy::TypeKind::FNDEF:
! 	      {
  		rust_error_at (
  		  arg_locus, ErrorCode::E0617,
  		  "unexpected function definition type as variadic "
*************** TypeCheckCallExpr::visit (FnType &type)
*** 246,252 ****
      }
  
    type.monomorphize ();
!   resolved = type.get_return_type ()->clone ();
  }
  
  void
--- 251,257 ----
      }
  
    type.monomorphize ();
!   resolved = type.get_return_type ()->monomorphized_clone ();
  }
  
  void
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-tyty-call.h gcc-16-20250810/gcc/rust/typecheck/rust-tyty-call.h
*** gcc-16-20250803/gcc/rust/typecheck/rust-tyty-call.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-tyty-call.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 62,67 ****
--- 62,68 ----
    void visit (DynamicObjectType &) override { rust_unreachable (); }
    void visit (ClosureType &type) override { rust_unreachable (); }
    void visit (OpaqueType &type) override { rust_unreachable (); }
+   void visit (ConstType &type) override { rust_unreachable (); }
  
    // tuple-structs
    void visit (ADTType &type) override;
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-tyty-cmp.h gcc-16-20250810/gcc/rust/typecheck/rust-tyty-cmp.h
*** gcc-16-20250803/gcc/rust/typecheck/rust-tyty-cmp.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-tyty-cmp.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 447,452 ****
--- 447,468 ----
        }
    }
  
+   virtual void visit (const ConstType &type) override
+   {
+     ok = false;
+     if (emit_error_flag)
+       {
+ 	location_t ref_locus = mappings.lookup_location (type.get_ref ());
+ 	location_t base_locus
+ 	  = mappings.lookup_location (get_base ()->get_ref ());
+ 	rich_location r (line_table, ref_locus);
+ 	r.add_range (base_locus);
+ 	rust_error_at (r, "expected [%s] got [%s]",
+ 		       get_base ()->as_string ().c_str (),
+ 		       type.as_string ().c_str ());
+       }
+   }
+ 
  protected:
    BaseCmp (const BaseType *base, bool emit_errors)
      : mappings (Analysis::Mappings::get ()),
*************** public:
*** 621,627 ****
  	ok = true;
  	return;
  
! 	case InferType::InferTypeKind::INTEGRAL: {
  	  if (type.get_infer_kind () == InferType::InferTypeKind::INTEGRAL)
  	    {
  	      ok = true;
--- 637,644 ----
  	ok = true;
  	return;
  
!       case InferType::InferTypeKind::INTEGRAL:
! 	{
  	  if (type.get_infer_kind () == InferType::InferTypeKind::INTEGRAL)
  	    {
  	      ok = true;
*************** public:
*** 635,641 ****
  	}
  	break;
  
! 	case InferType::InferTypeKind::FLOAT: {
  	  if (type.get_infer_kind () == InferType::InferTypeKind::FLOAT)
  	    {
  	      ok = true;
--- 652,659 ----
  	}
  	break;
  
!       case InferType::InferTypeKind::FLOAT:
! 	{
  	  if (type.get_infer_kind () == InferType::InferTypeKind::FLOAT)
  	    {
  	      ok = true;
*************** private:
*** 1604,1609 ****
--- 1622,1644 ----
    const OpaqueType *base;
  };
  
+ class ConstCmp : public BaseCmp
+ {
+   using Rust::TyTy::BaseCmp::visit;
+ 
+ public:
+   ConstCmp (const ConstType *base, bool emit_errors)
+     : BaseCmp (base, emit_errors), base (base)
+   {}
+ 
+   // TODO
+ 
+ private:
+   const BaseType *get_base () const override { return base; }
+ 
+   const ConstType *base;
+ };
+ 
  } // namespace TyTy
  } // namespace Rust
  
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-tyty-subst.cc gcc-16-20250810/gcc/rust/typecheck/rust-tyty-subst.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-tyty-subst.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-tyty-subst.cc	Sun Aug 10 22:32:08 2025
***************
*** 18,35 ****
  
  #include "rust-tyty-subst.h"
  
  #include "rust-system.h"
  #include "rust-tyty.h"
  #include "rust-hir-type-check.h"
  #include "rust-substitution-mapper.h"
  #include "rust-hir-type-check-type.h"
  #include "rust-type-util.h"
  
  namespace Rust {
  namespace TyTy {
  
! SubstitutionParamMapping::SubstitutionParamMapping (HIR::TypeParam &generic,
! 						    ParamType *param)
    : generic (generic), param (param)
  {}
  
--- 18,39 ----
  
  #include "rust-tyty-subst.h"
  
+ #include "rust-hir-generic-param.h"
  #include "rust-system.h"
  #include "rust-tyty.h"
  #include "rust-hir-type-check.h"
  #include "rust-substitution-mapper.h"
  #include "rust-hir-type-check-type.h"
+ #include "rust-hir-type-check-expr.h"
+ #include "rust-compile-base.h"
  #include "rust-type-util.h"
+ #include "tree.h"
  
  namespace Rust {
  namespace TyTy {
  
! SubstitutionParamMapping::SubstitutionParamMapping (HIR::GenericParam &generic,
! 						    BaseGeneric *param)
    : generic (generic), param (param)
  {}
  
*************** SubstitutionParamMapping::clone () const
*** 54,83 ****
  				   static_cast<ParamType *> (param->clone ()));
  }
  
! ParamType *
  SubstitutionParamMapping::get_param_ty ()
  {
    return param;
  }
  
! const ParamType *
  SubstitutionParamMapping::get_param_ty () const
  {
    return param;
  }
  
! HIR::TypeParam &
  SubstitutionParamMapping::get_generic_param ()
  {
    return generic;
  }
  
  bool
  SubstitutionParamMapping::needs_substitution () const
  {
    return !(get_param_ty ()->is_concrete ());
  }
  
  location_t
  SubstitutionParamMapping::get_param_locus () const
  {
--- 58,99 ----
  				   static_cast<ParamType *> (param->clone ()));
  }
  
! BaseGeneric *
  SubstitutionParamMapping::get_param_ty ()
  {
    return param;
  }
  
! const BaseGeneric *
  SubstitutionParamMapping::get_param_ty () const
  {
    return param;
  }
  
! HIR::GenericParam &
  SubstitutionParamMapping::get_generic_param ()
  {
    return generic;
  }
  
+ const HIR::GenericParam &
+ SubstitutionParamMapping::get_generic_param () const
+ {
+   return generic;
+ }
+ 
  bool
  SubstitutionParamMapping::needs_substitution () const
  {
    return !(get_param_ty ()->is_concrete ());
  }
  
+ Identifier
+ SubstitutionParamMapping::get_type_representation () const
+ {
+   return param->get_symbol ();
+ }
+ 
  location_t
  SubstitutionParamMapping::get_param_locus () const
  {
*************** SubstitutionParamMapping::get_param_locu
*** 87,99 ****
  bool
  SubstitutionParamMapping::param_has_default_ty () const
  {
!   return generic.has_type ();
  }
  
  BaseType *
  SubstitutionParamMapping::get_default_ty () const
  {
!   TyVar var (generic.get_type_mappings ().get_hirid ());
    return var.get_tyty ();
  }
  
--- 103,137 ----
  bool
  SubstitutionParamMapping::param_has_default_ty () const
  {
!   if (generic.get_kind () == HIR::GenericParam::GenericKind::TYPE)
!     {
!       const auto &type_param = static_cast<const HIR::TypeParam &> (generic);
!       return type_param.has_type ();
!     }
! 
!   rust_assert (generic.get_kind () == HIR::GenericParam::GenericKind::CONST);
!   const auto &const_param
!     = static_cast<const HIR::ConstGenericParam &> (generic);
!   return const_param.has_default_expression ();
  }
  
  BaseType *
  SubstitutionParamMapping::get_default_ty () const
  {
!   if (generic.get_kind () == HIR::GenericParam::GenericKind::TYPE)
!     {
!       const auto &type_param = static_cast<const HIR::TypeParam &> (generic);
!       TyVar var (type_param.get_type_mappings ().get_hirid ());
!       return var.get_tyty ();
!     }
! 
!   rust_assert (generic.get_kind () == HIR::GenericParam::GenericKind::CONST);
!   const auto &const_param
!     = static_cast<const HIR::ConstGenericParam &> (generic);
!   rust_assert (const_param.has_default_expression ());
! 
!   const auto &expr = const_param.get_default_expression ();
!   TyVar var (expr.get_mappings ().get_hirid ());
    return var.get_tyty ();
  }
  
*************** SubstitutionParamMapping::need_substitut
*** 109,115 ****
  
  bool
  SubstitutionParamMapping::fill_param_ty (
!   SubstitutionArgumentMappings &subst_mappings, location_t locus)
  {
    SubstitutionArg arg = SubstitutionArg::error ();
    bool ok = subst_mappings.get_argument_for_symbol (get_param_ty (), &arg);
--- 147,154 ----
  
  bool
  SubstitutionParamMapping::fill_param_ty (
!   SubstitutionArgumentMappings &subst_mappings, location_t locus,
!   bool needs_bounds_check)
  {
    SubstitutionArg arg = SubstitutionArg::error ();
    bool ok = subst_mappings.get_argument_for_symbol (get_param_ty (), &arg);
*************** SubstitutionParamMapping::fill_param_ty
*** 124,140 ****
  
    if (type.get_kind () == TypeKind::PARAM)
      {
!       // delete param;
!       param = static_cast<ParamType *> (type.clone ());
      }
!   else
      {
        // check the substitution is compatible with bounds
        rust_debug_loc (locus,
  		      "fill_param_ty bounds_compatible: param %s type %s",
  		      param->get_name ().c_str (), type.get_name ().c_str ());
! 
!       if (!param->is_implicit_self_trait ())
  	{
  	  if (!param->bounds_compatible (type, locus, true))
  	    return false;
--- 163,183 ----
  
    if (type.get_kind () == TypeKind::PARAM)
      {
!       param = static_cast<BaseGeneric *> (type.clone ());
      }
!   else if (type.get_kind () == TyTy::TypeKind::CONST)
      {
+       param = static_cast<BaseGeneric *> (type.clone ());
+     }
+   else if (param->get_kind () == TypeKind::PARAM)
+     {
+       auto &p = *static_cast<TyTy::ParamType *> (param);
+ 
        // check the substitution is compatible with bounds
        rust_debug_loc (locus,
  		      "fill_param_ty bounds_compatible: param %s type %s",
  		      param->get_name ().c_str (), type.get_name ().c_str ());
!       if (needs_bounds_check && !p.is_implicit_self_trait ())
  	{
  	  if (!param->bounds_compatible (type, locus, true))
  	    return false;
*************** SubstitutionParamMapping::fill_param_ty
*** 145,151 ****
  	bound.handle_substitions (subst_mappings);
  
        param->set_ty_ref (type.get_ref ());
!       subst_mappings.on_param_subst (*param, arg);
      }
  
    return true;
--- 188,194 ----
  	bound.handle_substitions (subst_mappings);
  
        param->set_ty_ref (type.get_ref ());
!       subst_mappings.on_param_subst (p, arg);
      }
  
    return true;
*************** SubstitutionArg::operator= (const Substi
*** 191,202 ****
  }
  
  BaseType *
- SubstitutionArg::get_tyty ()
- {
-   return argument;
- }
- 
- const BaseType *
  SubstitutionArg::get_tyty () const
  {
    return argument;
--- 234,239 ----
*************** SubstitutionArg::get_param_mapping () co
*** 208,214 ****
    return param;
  }
  
! const ParamType *
  SubstitutionArg::get_param_ty () const
  {
    return original_param;
--- 245,251 ----
    return param;
  }
  
! const BaseGeneric *
  SubstitutionArg::get_param_ty () const
  {
    return original_param;
*************** SubstitutionArgumentMappings::is_error (
*** 313,323 ****
  
  bool
  SubstitutionArgumentMappings::get_argument_for_symbol (
!   const ParamType *param_to_find, SubstitutionArg *argument) const
  {
    for (const auto &mapping : mappings)
      {
!       const ParamType *p = mapping.get_param_ty ();
        if (p->get_symbol () == param_to_find->get_symbol ())
  	{
  	  *argument = mapping;
--- 350,360 ----
  
  bool
  SubstitutionArgumentMappings::get_argument_for_symbol (
!   const BaseGeneric *param_to_find, SubstitutionArg *argument) const
  {
    for (const auto &mapping : mappings)
      {
!       const auto *p = mapping.get_param_ty ();
        if (p->get_symbol () == param_to_find->get_symbol ())
  	{
  	  *argument = mapping;
*************** SubstitutionRef::get_mappings_from_gener
*** 618,624 ****
  	  if (args.get_binding_args ().size () > get_num_associated_bindings ())
  	    {
  	      rich_location r (line_table, args.get_locus ());
- 
  	      rust_error_at (r,
  			     "generic item takes at most %lu type binding "
  			     "arguments but %lu were supplied",
--- 655,660 ----
*************** SubstitutionRef::get_mappings_from_gener
*** 666,676 ****
  
    // for inherited arguments
    size_t offs = used_arguments.size ();
!   if (args.get_type_args ().size () + offs > substitutions.size ())
      {
        rich_location r (line_table, args.get_locus ());
        if (!substitutions.empty ())
! 	r.add_range (substitutions.front ().get_param_locus ());
  
        rust_error_at (
  	r,
--- 702,718 ----
  
    // for inherited arguments
    size_t offs = used_arguments.size ();
!   size_t total_arguments
!     = args.get_type_args ().size () + args.get_const_args ().size () + offs;
!   if (total_arguments > substitutions.size ())
      {
        rich_location r (line_table, args.get_locus ());
        if (!substitutions.empty ())
! 	{
! 	  const auto &subst = substitutions.front ();
! 	  const auto &generic = subst.get_generic_param ();
! 	  r.add_range (generic.get_locus ());
! 	}
  
        rust_error_at (
  	r,
*************** SubstitutionRef::get_mappings_from_gener
*** 680,689 ****
        return SubstitutionArgumentMappings::error ();
      }
  
!   if (args.get_type_args ().size () + offs < min_required_substitutions ())
      {
        rich_location r (line_table, args.get_locus ());
!       r.add_range (substitutions.front ().get_param_locus ());
  
        rust_error_at (
  	r, ErrorCode::E0107,
--- 722,736 ----
        return SubstitutionArgumentMappings::error ();
      }
  
!   if (total_arguments < min_required_substitutions ())
      {
        rich_location r (line_table, args.get_locus ());
!       if (!substitutions.empty ())
! 	{
! 	  const auto &subst = substitutions.front ();
! 	  const auto &generic = subst.get_generic_param ();
! 	  r.add_range (generic.get_locus ());
! 	}
  
        rust_error_at (
  	r, ErrorCode::E0107,
*************** SubstitutionRef::get_mappings_from_gener
*** 702,708 ****
  	  return SubstitutionArgumentMappings::error ();
  	}
  
!       SubstitutionArg subst_arg (&substitutions.at (offs), resolved);
        offs++;
        mappings.push_back (std::move (subst_arg));
      }
--- 749,839 ----
  	  return SubstitutionArgumentMappings::error ();
  	}
  
!       const auto &param_mapping = substitutions.at (offs);
!       const auto &generic = param_mapping.get_generic_param ();
!       if (generic.get_kind () == HIR::GenericParam::GenericKind::TYPE)
! 	{
! 	  const auto &type_param
! 	    = static_cast<const HIR::TypeParam &> (generic);
! 	  if (type_param.from_impl_trait ())
! 	    {
! 	      rich_location r (line_table, arg->get_locus ());
! 	      r.add_fixit_remove (arg->get_locus ());
! 	      rust_error_at (r, ErrorCode::E0632,
! 			     "cannot provide explicit generic arguments when "
! 			     "%<impl Trait%> is used in argument position");
! 	      return SubstitutionArgumentMappings::error ();
! 	    }
! 	}
!       else if (generic.get_kind () == HIR::GenericParam::GenericKind::CONST)
! 	{
! 	  if (!resolved->is<ConstType> ())
! 	    {
! 	      rich_location r (line_table, arg->get_locus ());
! 	      r.add_fixit_remove (arg->get_locus ());
! 	      rust_error_at (r, ErrorCode::E0747,
! 			     "type provided when a constant was expected");
! 	      return SubstitutionArgumentMappings::error ();
! 	    }
! 	}
! 
!       SubstitutionArg subst_arg (&param_mapping, resolved);
!       offs++;
!       mappings.push_back (std::move (subst_arg));
!     }
! 
!   for (auto &arg : args.get_const_args ())
!     {
!       auto &expr = *arg.get_expression ().get ();
!       BaseType *expr_type = Resolver::TypeCheckExpr::Resolve (expr);
!       if (expr_type == nullptr || expr_type->is<ErrorType> ())
! 	return SubstitutionArgumentMappings::error ();
! 
!       // validate this param is really a const generic
!       const auto &param_mapping = substitutions.at (offs);
!       const auto &generic = param_mapping.get_generic_param ();
!       if (generic.get_kind () != HIR::GenericParam::GenericKind::CONST)
! 	{
! 	  rich_location r (line_table, arg.get_locus ());
! 	  r.add_fixit_remove (expr.get_locus ());
! 	  rust_error_at (r, "invalid position for a const generic argument");
! 	  return SubstitutionArgumentMappings::error ();
! 	}
! 
!       // get the const generic specified type
!       const auto base_generic = param_mapping.get_param_ty ();
!       rust_assert (base_generic->is<ConstType> ());
!       const auto const_param
! 	= static_cast<const TyTy::ConstType *> (base_generic);
!       auto specified_type = const_param->get_ty ();
! 
!       // validate this const generic is of the correct type
!       auto coereced_type
! 	= Resolver::coercion_site (expr.get_mappings ().get_hirid (),
! 				   TyTy::TyWithLocation (specified_type),
! 				   TyTy::TyWithLocation (expr_type,
! 							 expr.get_locus ()),
! 				   arg.get_locus ());
!       if (coereced_type->is<ErrorType> ())
! 	return SubstitutionArgumentMappings::error ();
! 
!       // const fold it
!       auto ctx = Compile::Context::get ();
!       tree folded
! 	= Compile::HIRCompileBase::query_compile_const_expr (ctx, coereced_type,
! 							     expr);
! 
!       if (folded == error_mark_node)
! 	return SubstitutionArgumentMappings::error ();
! 
!       // create const type
!       auto const_value
! 	= new TyTy::ConstType (TyTy::ConstType::ConstKind::Value, "",
! 			       coereced_type, folded, {}, expr.get_locus (),
! 			       expr.get_mappings ().get_hirid (),
! 			       expr.get_mappings ().get_hirid (), {});
! 
!       SubstitutionArg subst_arg (&param_mapping, const_value);
        offs++;
        mappings.push_back (std::move (subst_arg));
      }
*************** SubstitutionRef::infer_substitions (loca
*** 754,759 ****
--- 885,891 ----
      {
        if (p.needs_substitution ())
  	{
+ 	  const HIR::GenericParam &generic = p.get_generic_param ();
  	  const std::string &symbol = p.get_param_ty ()->get_symbol ();
  	  auto it = argument_mappings.find (symbol);
  	  bool have_mapping = it != argument_mappings.end ();
*************** SubstitutionRef::infer_substitions (loca
*** 762,773 ****
  	    {
  	      args.push_back (SubstitutionArg (&p, it->second));
  	    }
! 	  else
  	    {
  	      TyVar infer_var = TyVar::get_implicit_infer_var (locus);
  	      args.push_back (SubstitutionArg (&p, infer_var.get_tyty ()));
  	      argument_mappings[symbol] = infer_var.get_tyty ();
  	    }
  	}
        else
  	{
--- 894,917 ----
  	    {
  	      args.push_back (SubstitutionArg (&p, it->second));
  	    }
! 	  else if (generic.get_kind () == HIR::GenericParam::GenericKind::TYPE)
  	    {
  	      TyVar infer_var = TyVar::get_implicit_infer_var (locus);
  	      args.push_back (SubstitutionArg (&p, infer_var.get_tyty ()));
  	      argument_mappings[symbol] = infer_var.get_tyty ();
  	    }
+ 	  else if (generic.get_kind () == HIR::GenericParam::GenericKind::CONST)
+ 	    {
+ 	      const auto const_param = p.get_param_ty ();
+ 	      rust_assert (const_param->is<TyTy::ConstType> ());
+ 	      const auto &const_type
+ 		= *static_cast<const TyTy::ConstType *> (const_param);
+ 
+ 	      TyVar infer_var
+ 		= TyVar::get_implicit_const_infer_var (const_type, locus);
+ 	      args.push_back (SubstitutionArg (&p, infer_var.get_tyty ()));
+ 	      argument_mappings[symbol] = infer_var.get_tyty ();
+ 	    }
  	}
        else
  	{
*************** SubstitutionRef::prepare_higher_ranked_b
*** 905,911 ****
  {
    for (const auto &subst : get_substs ())
      {
!       const TyTy::ParamType *pty = subst.get_param_ty ();
        for (const auto &bound : pty->get_specified_bounds ())
  	{
  	  const auto ref = bound.get ();
--- 1049,1055 ----
  {
    for (const auto &subst : get_substs ())
      {
!       const auto pty = subst.get_param_ty ();
        for (const auto &bound : pty->get_specified_bounds ())
  	{
  	  const auto ref = bound.get ();
*************** SubstitutionRef::monomorphize ()
*** 919,926 ****
  {
    for (const auto &subst : get_substs ())
      {
!       const TyTy::ParamType *pty = subst.get_param_ty ();
! 
        if (!pty->can_resolve ())
  	continue;
  
--- 1063,1069 ----
  {
    for (const auto &subst : get_substs ())
      {
!       const auto pty = subst.get_param_ty ();
        if (!pty->can_resolve ())
  	continue;
  
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-tyty-subst.h gcc-16-20250810/gcc/rust/typecheck/rust-tyty-subst.h
*** gcc-16-20250803/gcc/rust/typecheck/rust-tyty-subst.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-tyty-subst.h	Sun Aug 10 22:32:08 2025
***************
*** 24,35 ****
--- 24,37 ----
  #include "rust-hir-full-decls.h"
  #include "rust-tyty-bounds.h"
  #include "rust-tyty-region.h"
+ #include "rust-ast.h"
  #include "optional.h"
  
  namespace Rust {
  namespace TyTy {
  
  class ParamType;
+ class BaseGeneric;
  
  struct RegionConstraints
  {
*************** class SubstitutionArgumentMappings;
*** 44,65 ****
  class SubstitutionParamMapping
  {
  public:
!   SubstitutionParamMapping (HIR::TypeParam &generic, ParamType *param);
  
    SubstitutionParamMapping (const SubstitutionParamMapping &other);
  
    std::string as_string () const;
  
    bool fill_param_ty (SubstitutionArgumentMappings &subst_mappings,
! 		      location_t locus);
  
    SubstitutionParamMapping clone () const;
  
!   ParamType *get_param_ty ();
  
!   const ParamType *get_param_ty () const;
  
!   HIR::TypeParam &get_generic_param ();
  
    // this is used for the backend to override the HirId ref of the param to
    // what the concrete type is for the rest of the context
--- 46,69 ----
  class SubstitutionParamMapping
  {
  public:
!   SubstitutionParamMapping (HIR::GenericParam &generic, BaseGeneric *param);
  
    SubstitutionParamMapping (const SubstitutionParamMapping &other);
  
    std::string as_string () const;
  
    bool fill_param_ty (SubstitutionArgumentMappings &subst_mappings,
! 		      location_t locus, bool needs_bounds_check = true);
  
    SubstitutionParamMapping clone () const;
  
!   BaseGeneric *get_param_ty ();
!   const BaseGeneric *get_param_ty () const;
  
!   HIR::GenericParam &get_generic_param ();
!   const HIR::GenericParam &get_generic_param () const;
  
!   Identifier get_type_representation () const;
  
    // this is used for the backend to override the HirId ref of the param to
    // what the concrete type is for the rest of the context
*************** public:
*** 76,83 ****
    bool need_substitution () const;
  
  private:
!   HIR::TypeParam &generic;
!   ParamType *param;
  };
  
  /**
--- 80,87 ----
    bool need_substitution () const;
  
  private:
!   HIR::GenericParam &generic;
!   BaseGeneric *param;
  };
  
  /**
*************** public:
*** 147,159 ****
  
    SubstitutionArg &operator= (const SubstitutionArg &other);
  
!   BaseType *get_tyty ();
! 
!   const BaseType *get_tyty () const;
  
    const SubstitutionParamMapping *get_param_mapping () const;
  
!   const ParamType *get_param_ty () const;
  
    static SubstitutionArg error ();
  
--- 151,161 ----
  
    SubstitutionArg &operator= (const SubstitutionArg &other);
  
!   BaseType *get_tyty () const;
  
    const SubstitutionParamMapping *get_param_mapping () const;
  
!   const BaseGeneric *get_param_ty () const;
  
    static SubstitutionArg error ();
  
*************** public:
*** 165,171 ****
  
  private:
    const SubstitutionParamMapping *param;
!   const ParamType *original_param;
    BaseType *argument;
  };
  
--- 167,173 ----
  
  private:
    const SubstitutionParamMapping *param;
!   const BaseGeneric *original_param;
    BaseType *argument;
  };
  
*************** public:
*** 205,211 ****
  
    bool is_error () const;
  
!   bool get_argument_for_symbol (const ParamType *param_to_find,
  				SubstitutionArg *argument) const;
  
    /** Return type parameter index for symbol */
--- 207,213 ----
  
    bool is_error () const;
  
!   bool get_argument_for_symbol (const BaseGeneric *param_to_find,
  				SubstitutionArg *argument) const;
  
    /** Return type parameter index for symbol */
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-tyty-util.cc gcc-16-20250810/gcc/rust/typecheck/rust-tyty-util.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-tyty-util.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-tyty-util.cc	Sun Aug 10 22:32:08 2025
***************
*** 17,22 ****
--- 17,24 ----
  // <http://www.gnu.org/licenses/>.
  
  #include "rust-hir-type-check.h"
+ #include "rust-mapping-common.h"
+ #include "rust-system.h"
  #include "rust-tyty.h"
  
  namespace Rust {
*************** TyVar::get_implicit_infer_var (location_
*** 47,60 ****
    auto &mappings = Analysis::Mappings::get ();
    auto context = Resolver::TypeCheckContext::get ();
  
!   InferType *infer = new InferType (mappings.get_next_hir_id (),
! 				    InferType::InferTypeKind::GENERAL,
! 				    InferType::TypeHint::Default (), locus);
!   context->insert_type (Analysis::NodeMapping (mappings.get_current_crate (),
! 					       UNKNOWN_NODEID,
! 					       infer->get_ref (),
! 					       UNKNOWN_LOCAL_DEFID),
! 			infer);
    mappings.insert_location (infer->get_ref (), locus);
  
    return TyVar (infer->get_ref ());
--- 49,78 ----
    auto &mappings = Analysis::Mappings::get ();
    auto context = Resolver::TypeCheckContext::get ();
  
!   HirId next = mappings.get_next_hir_id ();
!   auto infer = new InferType (next, InferType::InferTypeKind::GENERAL,
! 			      InferType::TypeHint::Default (), locus);
! 
!   context->insert_implicit_type (infer->get_ref (), infer);
!   mappings.insert_location (infer->get_ref (), locus);
! 
!   return TyVar (infer->get_ref ());
! }
! 
! TyVar
! TyVar::get_implicit_const_infer_var (const ConstType &const_type,
! 				     location_t locus)
! {
!   auto &mappings = Analysis::Mappings::get ();
!   auto context = Resolver::TypeCheckContext::get ();
! 
!   HirId next = mappings.get_next_hir_id ();
!   auto infer
!     = new ConstType (ConstType::ConstKind::Infer, const_type.get_symbol (),
! 		     const_type.get_ty (), error_mark_node,
! 		     const_type.get_specified_bounds (), locus, next, next, {});
! 
!   context->insert_implicit_type (infer->get_ref (), infer);
    mappings.insert_location (infer->get_ref (), locus);
  
    return TyVar (infer->get_ref ());
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-tyty-util.h gcc-16-20250810/gcc/rust/typecheck/rust-tyty-util.h
*** gcc-16-20250803/gcc/rust/typecheck/rust-tyty-util.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-tyty-util.h	Sun Aug 10 22:32:08 2025
*************** namespace Rust {
*** 25,30 ****
--- 25,31 ----
  namespace TyTy {
  
  class BaseType;
+ class ConstType;
  
  // this is a placeholder for types that can change like inference variables
  class TyVar
*************** public:
*** 42,47 ****
--- 43,51 ----
  
    static TyVar get_implicit_infer_var (location_t locus);
  
+   static TyVar get_implicit_const_infer_var (const TyTy::ConstType &const_type,
+ 					     location_t locus);
+ 
    static TyVar subst_covariant_var (TyTy::BaseType *orig,
  				    TyTy::BaseType *subst);
  
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-tyty-variance-analysis-private.h gcc-16-20250810/gcc/rust/typecheck/rust-tyty-variance-analysis-private.h
*** gcc-16-20250803/gcc/rust/typecheck/rust-tyty-variance-analysis-private.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-tyty-variance-analysis-private.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 170,175 ****
--- 170,177 ----
    }
  
    void visit (OpaqueType &type) override {}
+ 
+   void visit (ConstType &type) override {}
  };
  
  /** Per crate context for generic type variance analysis. */
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-tyty-variance-analysis.cc gcc-16-20250810/gcc/rust/typecheck/rust-tyty-variance-analysis.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-tyty-variance-analysis.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-tyty-variance-analysis.cc	Sun Aug 10 22:32:08 2025
*************** GenericTyPerCrateCtx::debug_print_soluti
*** 199,207 ****
  	    {
  	      if (i > solution_index)
  		result += ", ";
! 	      result += param.get_generic_param ()
! 			  .get_type_representation ()
! 			  .as_string ();
  	      result += "=";
  	      result += solutions[i].as_string ();
  	      i++;
--- 199,205 ----
  	    {
  	      if (i > solution_index)
  		result += ", ";
! 	      result += param.get_type_representation ().as_string ();
  	      result += "=";
  	      result += solutions[i].as_string ();
  	      i++;
*************** GenericTyVisitorCtx::process_type (ADTTy
*** 239,246 ****
    first_type = first_lifetime + ty.get_used_arguments ().get_regions ().size ();
  
    for (auto &param : ty.get_substs ())
!     param_names.push_back (
!       param.get_generic_param ().get_type_representation ().as_string ());
  
    for (const auto &variant : ty.get_variants ())
      {
--- 237,243 ----
    first_type = first_lifetime + ty.get_used_arguments ().get_regions ().size ();
  
    for (auto &param : ty.get_substs ())
!     param_names.push_back (param.get_type_representation ().as_string ());
  
    for (const auto &variant : ty.get_variants ())
      {
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-tyty-variance-analysis.h gcc-16-20250810/gcc/rust/typecheck/rust-tyty-variance-analysis.h
*** gcc-16-20250803/gcc/rust/typecheck/rust-tyty-variance-analysis.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-tyty-variance-analysis.h	Sun Aug 10 22:32:08 2025
*************** private:
*** 41,49 ****
    std::unique_ptr<GenericTyPerCrateCtx> private_ctx;
  };
  
! std::vector<size_t>
! query_field_regions (const ADTType *parent, size_t variant_index,
! 		     size_t field_index, const FreeRegions &parent_regions);
  
  /** Variance semilattice */
  class Variance
--- 41,50 ----
    std::unique_ptr<GenericTyPerCrateCtx> private_ctx;
  };
  
! std::vector<size_t> query_field_regions (const ADTType *parent,
! 					 size_t variant_index,
! 					 size_t field_index,
! 					 const FreeRegions &parent_regions);
  
  /** Variance semilattice */
  class Variance
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-tyty-visitor.h gcc-16-20250810/gcc/rust/typecheck/rust-tyty-visitor.h
*** gcc-16-20250803/gcc/rust/typecheck/rust-tyty-visitor.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-tyty-visitor.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 45,50 ****
--- 45,51 ----
    virtual void visit (ReferenceType &type) = 0;
    virtual void visit (PointerType &type) = 0;
    virtual void visit (ParamType &type) = 0;
+   virtual void visit (ConstType &type) = 0;
    virtual void visit (StrType &type) = 0;
    virtual void visit (NeverType &type) = 0;
    virtual void visit (PlaceholderType &type) = 0;
*************** public:
*** 75,80 ****
--- 76,82 ----
    virtual void visit (const ReferenceType &type) = 0;
    virtual void visit (const PointerType &type) = 0;
    virtual void visit (const ParamType &type) = 0;
+   virtual void visit (const ConstType &type) = 0;
    virtual void visit (const StrType &type) = 0;
    virtual void visit (const NeverType &type) = 0;
    virtual void visit (const PlaceholderType &type) = 0;
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-tyty.cc gcc-16-20250810/gcc/rust/typecheck/rust-tyty.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-tyty.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-tyty.cc	Sun Aug 10 22:32:08 2025
***************
*** 19,24 ****
--- 19,25 ----
  #include "rust-tyty.h"
  
  #include "optional.h"
+ #include "rust-tyty-subst.h"
  #include "rust-tyty-visitor.h"
  #include "rust-hir-map.h"
  #include "rust-location.h"
***************
*** 30,38 ****
--- 31,44 ----
  #include "rust-tyty-cmp.h"
  #include "rust-type-util.h"
  #include "rust-hir-type-bounds.h"
+ #include "print-tree.h"
+ #include "tree-pretty-print.h"
  
  #include "options.h"
  #include "rust-system.h"
+ #include "tree.h"
+ #include "fold-const.h"
+ #include <string>
  
  namespace Rust {
  namespace TyTy {
*************** TypeKindFormat::to_string (TypeKind kind
*** 114,119 ****
--- 120,128 ----
      case TypeKind::OPAQUE:
        return "Opaque";
  
+     case TypeKind::CONST:
+       return "Const";
+ 
      case TypeKind::ERROR:
        return "ERROR";
      }
*************** BaseType::is_unit () const
*** 223,228 ****
--- 232,238 ----
      case OPAQUE:
      case STR:
      case DYNAMIC:
+     case CONST:
      case ERROR:
        return false;
  
*************** BaseType::is_unit () const
*** 230,240 ****
      case NEVER:
        return true;
  
!       case TUPLE: {
  	return x->as<const TupleType> ()->num_fields () == 0;
        }
  
!       case ADT: {
  	auto adt = x->as<const ADTType> ();
  	if (adt->is_enum ())
  	  return false;
--- 240,252 ----
      case NEVER:
        return true;
  
!     case TUPLE:
!       {
  	return x->as<const TupleType> ()->num_fields () == 0;
        }
  
!     case ADT:
!       {
  	auto adt = x->as<const ADTType> ();
  	if (adt->is_enum ())
  	  return false;
*************** BaseType::inherit_bounds (
*** 438,448 ****
      }
  }
  
! const BaseType *
! BaseType::get_root () const
  {
!   // FIXME this needs to be it its own visitor class with a vector adjustments
!   const TyTy::BaseType *root = this;
  
    if (const auto r = root->try_as<const ReferenceType> ())
      {
--- 450,459 ----
      }
  }
  
! BaseType *
! BaseType::get_root ()
  {
!   TyTy::BaseType *root = this;
  
    if (const auto r = root->try_as<const ReferenceType> ())
      {
*************** BaseType::destructure () const
*** 546,562 ****
  	{
  	  x = p->get ();
  	}
!       // else if (auto p = x->try_as<const OpaqueType> ())
!       //   {
!       //     auto pr = p->resolve ();
! 
!       //     rust_debug ("XXXXXX")
! 
!       //     if (pr == x)
!       //       return pr;
  
!       //     x = pr;
!       //   }
        else
  	{
  	  return x;
--- 557,570 ----
  	{
  	  x = p->get ();
  	}
!       else if (auto p = x->try_as<const OpaqueType> ())
! 	{
! 	  auto pr = p->resolve ();
! 	  if (pr == x)
! 	    return pr;
  
! 	  x = pr;
! 	}
        else
  	{
  	  return x;
*************** BaseType::monomorphized_clone () const
*** 575,581 ****
      {
        TyVar elm = arr->get_var_element_type ().monomorphized_clone ();
        return new ArrayType (arr->get_ref (), arr->get_ty_ref (), ident.locus,
! 			    arr->get_capacity_expr (), elm,
  			    arr->get_combined_refs ());
      }
    else if (auto slice = x->try_as<const SliceType> ())
--- 583,589 ----
      {
        TyVar elm = arr->get_var_element_type ().monomorphized_clone ();
        return new ArrayType (arr->get_ref (), arr->get_ty_ref (), ident.locus,
! 			    arr->get_capacity (), elm,
  			    arr->get_combined_refs ());
      }
    else if (auto slice = x->try_as<const SliceType> ())
*************** BaseType::is_concrete () const
*** 824,830 ****
      }
    else if (auto arr = x->try_as<const ArrayType> ())
      {
!       return arr->get_element_type ()->is_concrete ();
      }
    else if (auto slice = x->try_as<const SliceType> ())
      {
--- 832,839 ----
      }
    else if (auto arr = x->try_as<const ArrayType> ())
      {
!       return arr->get_element_type ()->is_concrete ()
! 	     && arr->get_capacity ()->is_concrete ();
      }
    else if (auto slice = x->try_as<const SliceType> ())
      {
*************** BaseType::is_concrete () const
*** 853,858 ****
--- 862,871 ----
  	return false;
        return closure->get_result_type ().is_concrete ();
      }
+   else if (auto const_type = x->try_as<const ConstType> ())
+     {
+       return const_type->get_value () != error_mark_node;
+     }
    else if (x->is<InferType> () || x->is<BoolType> () || x->is<CharType> ()
  	   || x->is<IntType> () || x->is<UintType> () || x->is<FloatType> ()
  	   || x->is<USizeType> () || x->is<ISizeType> () || x->is<NeverType> ()
*************** BaseType::has_substitutions_defined () c
*** 891,921 ****
      case TUPLE:
      case PARAM:
      case PLACEHOLDER:
      case OPAQUE:
        return false;
  
!       case PROJECTION: {
  	const ProjectionType &p = *static_cast<const ProjectionType *> (x);
  	const SubstitutionRef &ref = static_cast<const SubstitutionRef &> (p);
  	return ref.has_substitutions ();
        }
        break;
  
!       case FNDEF: {
  	const FnType &fn = *static_cast<const FnType *> (x);
  	const SubstitutionRef &ref = static_cast<const SubstitutionRef &> (fn);
  	return ref.has_substitutions ();
        }
        break;
  
!       case ADT: {
  	const ADTType &adt = *static_cast<const ADTType *> (x);
  	const SubstitutionRef &ref = static_cast<const SubstitutionRef &> (adt);
  	return ref.has_substitutions ();
        }
        break;
  
!       case CLOSURE: {
  	const ClosureType &closure = *static_cast<const ClosureType *> (x);
  	const SubstitutionRef &ref
  	  = static_cast<const SubstitutionRef &> (closure);
--- 904,939 ----
      case TUPLE:
      case PARAM:
      case PLACEHOLDER:
+     case CONST:
      case OPAQUE:
        return false;
  
!     case PROJECTION:
!       {
  	const ProjectionType &p = *static_cast<const ProjectionType *> (x);
  	const SubstitutionRef &ref = static_cast<const SubstitutionRef &> (p);
  	return ref.has_substitutions ();
        }
        break;
  
!     case FNDEF:
!       {
  	const FnType &fn = *static_cast<const FnType *> (x);
  	const SubstitutionRef &ref = static_cast<const SubstitutionRef &> (fn);
  	return ref.has_substitutions ();
        }
        break;
  
!     case ADT:
!       {
  	const ADTType &adt = *static_cast<const ADTType *> (x);
  	const SubstitutionRef &ref = static_cast<const SubstitutionRef &> (adt);
  	return ref.has_substitutions ();
        }
        break;
  
!     case CLOSURE:
!       {
  	const ClosureType &closure = *static_cast<const ClosureType *> (x);
  	const SubstitutionRef &ref
  	  = static_cast<const SubstitutionRef &> (closure);
*************** BaseType::needs_generic_substitutions ()
*** 953,983 ****
      case TUPLE:
      case PARAM:
      case PLACEHOLDER:
      case OPAQUE:
        return false;
  
!       case PROJECTION: {
  	const ProjectionType &p = *static_cast<const ProjectionType *> (x);
  	const SubstitutionRef &ref = static_cast<const SubstitutionRef &> (p);
  	return ref.needs_substitution ();
        }
        break;
  
!       case FNDEF: {
  	const FnType &fn = *static_cast<const FnType *> (x);
  	const SubstitutionRef &ref = static_cast<const SubstitutionRef &> (fn);
  	return ref.needs_substitution ();
        }
        break;
  
!       case ADT: {
  	const ADTType &adt = *static_cast<const ADTType *> (x);
  	const SubstitutionRef &ref = static_cast<const SubstitutionRef &> (adt);
  	return ref.needs_substitution ();
        }
        break;
  
!       case CLOSURE: {
  	const ClosureType &closure = *static_cast<const ClosureType *> (x);
  	const SubstitutionRef &ref
  	  = static_cast<const SubstitutionRef &> (closure);
--- 971,1006 ----
      case TUPLE:
      case PARAM:
      case PLACEHOLDER:
+     case CONST:
      case OPAQUE:
        return false;
  
!     case PROJECTION:
!       {
  	const ProjectionType &p = *static_cast<const ProjectionType *> (x);
  	const SubstitutionRef &ref = static_cast<const SubstitutionRef &> (p);
  	return ref.needs_substitution ();
        }
        break;
  
!     case FNDEF:
!       {
  	const FnType &fn = *static_cast<const FnType *> (x);
  	const SubstitutionRef &ref = static_cast<const SubstitutionRef &> (fn);
  	return ref.needs_substitution ();
        }
        break;
  
!     case ADT:
!       {
  	const ADTType &adt = *static_cast<const ADTType *> (x);
  	const SubstitutionRef &ref = static_cast<const SubstitutionRef &> (adt);
  	return ref.needs_substitution ();
        }
        break;
  
!     case CLOSURE:
!       {
  	const ClosureType &closure = *static_cast<const ClosureType *> (x);
  	const SubstitutionRef &ref
  	  = static_cast<const SubstitutionRef &> (closure);
*************** BaseType::get_subst_argument_mappings ()
*** 996,1023 ****
    const TyTy::BaseType *x = destructure ();
    switch (x->get_kind ())
      {
!       case PROJECTION: {
  	const auto &p = *static_cast<const ProjectionType *> (x);
  	const auto &ref = static_cast<const SubstitutionRef &> (p);
  	return ref.get_substitution_arguments ();
        }
        break;
  
!       case FNDEF: {
  	const auto &fn = *static_cast<const FnType *> (x);
  	const auto &ref = static_cast<const SubstitutionRef &> (fn);
  	return ref.get_substitution_arguments ();
        }
        break;
  
!       case ADT: {
  	const auto &adt = *static_cast<const ADTType *> (x);
  	const auto &ref = static_cast<const SubstitutionRef &> (adt);
  	return ref.get_substitution_arguments ();
        }
        break;
  
!       case CLOSURE: {
  	const auto &closure = *static_cast<const ClosureType *> (x);
  	const auto &ref = static_cast<const SubstitutionRef &> (closure);
  	return ref.get_substitution_arguments ();
--- 1019,1050 ----
    const TyTy::BaseType *x = destructure ();
    switch (x->get_kind ())
      {
!     case PROJECTION:
!       {
  	const auto &p = *static_cast<const ProjectionType *> (x);
  	const auto &ref = static_cast<const SubstitutionRef &> (p);
  	return ref.get_substitution_arguments ();
        }
        break;
  
!     case FNDEF:
!       {
  	const auto &fn = *static_cast<const FnType *> (x);
  	const auto &ref = static_cast<const SubstitutionRef &> (fn);
  	return ref.get_substitution_arguments ();
        }
        break;
  
!     case ADT:
!       {
  	const auto &adt = *static_cast<const ADTType *> (x);
  	const auto &ref = static_cast<const SubstitutionRef &> (adt);
  	return ref.get_substitution_arguments ();
        }
        break;
  
!     case CLOSURE:
!       {
  	const auto &closure = *static_cast<const ClosureType *> (x);
  	const auto &ref = static_cast<const SubstitutionRef &> (closure);
  	return ref.get_substitution_arguments ();
*************** InferType::default_type (BaseType **type
*** 1140,1152 ****
  	case GENERAL:
  	  return false;
  
! 	  case INTEGRAL: {
  	    ok = context->lookup_builtin ("i32", type);
  	    rust_assert (ok);
  	    return ok;
  	  }
  
! 	  case FLOAT: {
  	    ok = context->lookup_builtin ("f64", type);
  	    rust_assert (ok);
  	    return ok;
--- 1167,1181 ----
  	case GENERAL:
  	  return false;
  
! 	case INTEGRAL:
! 	  {
  	    ok = context->lookup_builtin ("i32", type);
  	    rust_assert (ok);
  	    return ok;
  	  }
  
! 	case FLOAT:
! 	  {
  	    ok = context->lookup_builtin ("f64", type);
  	    rust_assert (ok);
  	    return ok;
*************** InferType::apply_primitive_type_hint (co
*** 1269,1275 ****
        default_hint.kind = hint.get_kind ();
        break;
  
!       case INT: {
  	infer_kind = INTEGRAL;
  	default_hint.kind = hint.get_kind ();
  	default_hint.shint = TypeHint::SignedHint::SIGNED;
--- 1298,1305 ----
        default_hint.kind = hint.get_kind ();
        break;
  
!     case INT:
!       {
  	infer_kind = INTEGRAL;
  	default_hint.kind = hint.get_kind ();
  	default_hint.shint = TypeHint::SignedHint::SIGNED;
*************** InferType::apply_primitive_type_hint (co
*** 1294,1300 ****
        }
        break;
  
!       case UINT: {
  	infer_kind = INTEGRAL;
  	default_hint.kind = hint.get_kind ();
  	default_hint.shint = TypeHint::SignedHint::UNSIGNED;
--- 1324,1331 ----
        }
        break;
  
!     case UINT:
!       {
  	infer_kind = INTEGRAL;
  	default_hint.kind = hint.get_kind ();
  	default_hint.shint = TypeHint::SignedHint::UNSIGNED;
*************** InferType::apply_primitive_type_hint (co
*** 1319,1325 ****
        }
        break;
  
!       case TypeKind::FLOAT: {
  	infer_kind = FLOAT;
  	default_hint.shint = TypeHint::SignedHint::SIGNED;
  	default_hint.kind = hint.get_kind ();
--- 1350,1357 ----
        }
        break;
  
!     case TypeKind::FLOAT:
!       {
  	infer_kind = FLOAT;
  	default_hint.shint = TypeHint::SignedHint::SIGNED;
  	default_hint.kind = hint.get_kind ();
*************** ADTType::is_equal (const BaseType &other
*** 1800,1810 ****
  	  const SubstitutionParamMapping &a = substitutions.at (i);
  	  const SubstitutionParamMapping &b = other2->substitutions.at (i);
  
! 	  const ParamType *aa = a.get_param_ty ();
! 	  const ParamType *bb = b.get_param_ty ();
! 	  BaseType *aaa = aa->resolve ();
! 	  BaseType *bbb = bb->resolve ();
! 	  if (!aaa->is_equal (*bbb))
  	    return false;
  	}
      }
--- 1832,1840 ----
  	  const SubstitutionParamMapping &a = substitutions.at (i);
  	  const SubstitutionParamMapping &b = other2->substitutions.at (i);
  
! 	  const auto &aa = a.get_param_ty ();
! 	  const auto &bb = b.get_param_ty ();
! 	  if (!aa->is_equal (*bb))
  	    return false;
  	}
      }
*************** TupleType::get_name () const
*** 1992,1998 ****
    std::string fields_buffer;
    for (const TyVar &field : get_fields ())
      {
!       fields_buffer += field.get_tyty ()->as_string ();
        bool has_next = (i + 1) < get_fields ().size ();
        fields_buffer += has_next ? ", " : "";
        i++;
--- 2022,2028 ----
    std::string fields_buffer;
    for (const TyVar &field : get_fields ())
      {
!       fields_buffer += field.get_tyty ()->get_name ();
        bool has_next = (i + 1) < get_fields ().size ();
        fields_buffer += has_next ? ", " : "";
        i++;
*************** FnType::is_equal (const BaseType &other)
*** 2129,2137 ****
  	  const SubstitutionParamMapping &a = get_substs ().at (i);
  	  const SubstitutionParamMapping &b = ofn.get_substs ().at (i);
  
! 	  const ParamType *pa = a.get_param_ty ();
! 	  const ParamType *pb = b.get_param_ty ();
! 
  	  if (!pa->is_equal (*pb))
  	    return false;
  	}
--- 2159,2166 ----
  	  const SubstitutionParamMapping &a = get_substs ().at (i);
  	  const SubstitutionParamMapping &b = ofn.get_substs ().at (i);
  
! 	  const auto *pa = a.get_param_ty ();
! 	  const auto *pb = b.get_param_ty ();
  	  if (!pa->is_equal (*pb))
  	    return false;
  	}
*************** ArrayType::accept_vis (TyConstVisitor &v
*** 2470,2476 ****
  std::string
  ArrayType::as_string () const
  {
!   return "[" + get_element_type ()->as_string () + ":" + "CAPACITY" + "]";
  }
  
  bool
--- 2499,2506 ----
  std::string
  ArrayType::as_string () const
  {
!   return "[" + get_element_type ()->as_string () + "; " + capacity->as_string ()
! 	 + "]";
  }
  
  bool
*************** ArrayType::get_var_element_type () const
*** 2509,2515 ****
  BaseType *
  ArrayType::clone () const
  {
!   return new ArrayType (get_ref (), get_ty_ref (), ident.locus, capacity_expr,
  			element_type, get_combined_refs ());
  }
  
--- 2539,2545 ----
  BaseType *
  ArrayType::clone () const
  {
!   return new ArrayType (get_ref (), get_ty_ref (), ident.locus, capacity,
  			element_type, get_combined_refs ());
  }
  
*************** ArrayType::handle_substitions (Substitut
*** 2526,2531 ****
--- 2556,2568 ----
    BaseType *concrete = Resolver::SubstMapperInternal::Resolve (base, mappings);
    ref->element_type = TyVar::subst_covariant_var (base, concrete);
  
+   // handle capacity type
+   auto cap = ref->get_capacity ();
+   BaseType *concrete_cap
+     = Resolver::SubstMapperInternal::Resolve (cap, mappings);
+   rust_assert (concrete_cap->get_kind () == TyTy::TypeKind::CONST);
+   ref->capacity = static_cast<TyTy::ConstType *> (concrete_cap);
+ 
    return ref;
  }
  
*************** PointerType::handle_substitions (Substit
*** 3382,3414 ****
  // PARAM Type
  
  ParamType::ParamType (std::string symbol, location_t locus, HirId ref,
- 		      HIR::GenericParam &param,
  		      std::vector<TypeBoundPredicate> specified_bounds,
  		      std::set<HirId> refs)
!   : BaseType (ref, ref, KIND,
! 	      {Resolver::CanonicalPath::new_seg (UNKNOWN_NODEID, symbol),
! 	       locus},
! 	      specified_bounds, refs),
!     is_trait_self (false), symbol (symbol), param (param)
  {}
  
  ParamType::ParamType (bool is_trait_self, std::string symbol, location_t locus,
! 		      HirId ref, HirId ty_ref, HIR::GenericParam &param,
  		      std::vector<TypeBoundPredicate> specified_bounds,
  		      std::set<HirId> refs)
!   : BaseType (ref, ty_ref, KIND,
! 	      {Resolver::CanonicalPath::new_seg (UNKNOWN_NODEID, symbol),
! 	       locus},
! 	      specified_bounds, refs),
!     is_trait_self (is_trait_self), symbol (symbol), param (param)
  {}
  
- HIR::GenericParam &
- ParamType::get_generic_param ()
- {
-   return param;
- }
- 
  bool
  ParamType::can_resolve () const
  {
--- 3419,3444 ----
  // PARAM Type
  
  ParamType::ParamType (std::string symbol, location_t locus, HirId ref,
  		      std::vector<TypeBoundPredicate> specified_bounds,
  		      std::set<HirId> refs)
!   : BaseGeneric (ref, ref, KIND,
! 		 {Resolver::CanonicalPath::new_seg (UNKNOWN_NODEID, symbol),
! 		  locus},
! 		 specified_bounds, refs),
!     is_trait_self (false), symbol (symbol)
  {}
  
  ParamType::ParamType (bool is_trait_self, std::string symbol, location_t locus,
! 		      HirId ref, HirId ty_ref,
  		      std::vector<TypeBoundPredicate> specified_bounds,
  		      std::set<HirId> refs)
!   : BaseGeneric (ref, ty_ref, KIND,
! 		 {Resolver::CanonicalPath::new_seg (UNKNOWN_NODEID, symbol),
! 		  locus},
! 		 specified_bounds, refs),
!     is_trait_self (is_trait_self), symbol (symbol)
  {}
  
  bool
  ParamType::can_resolve () const
  {
*************** BaseType *
*** 3459,3465 ****
  ParamType::clone () const
  {
    return new ParamType (is_trait_self, get_symbol (), ident.locus, get_ref (),
! 			get_ty_ref (), param, get_specified_bounds (),
  			get_combined_refs ());
  }
  
--- 3489,3495 ----
  ParamType::clone () const
  {
    return new ParamType (is_trait_self, get_symbol (), ident.locus, get_ref (),
! 			get_ty_ref (), get_specified_bounds (),
  			get_combined_refs ());
  }
  
*************** ParamType::handle_substitions (Substitut
*** 3529,3540 ****
    ParamType *p = static_cast<ParamType *> (clone ());
    subst_mappings.on_param_subst (*p, arg);
  
!   // there are two cases one where we substitute directly to a new PARAM and
!   // otherwise
!   if (arg.get_tyty ()->get_kind () == TyTy::TypeKind::PARAM)
      {
!       p->set_ty_ref (arg.get_tyty ()->get_ref ());
!       return p;
      }
  
    // this is the new subst that this needs to pass
--- 3559,3570 ----
    ParamType *p = static_cast<ParamType *> (clone ());
    subst_mappings.on_param_subst (*p, arg);
  
!   const BaseType *resolved = arg.get_tyty ();
!   if (resolved->get_kind () == TyTy::TypeKind::PARAM)
      {
!       const ParamType &pp = *static_cast<const ParamType *> (resolved);
!       if (pp.can_resolve ())
! 	resolved = pp.resolve ();
      }
  
    // this is the new subst that this needs to pass
*************** ParamType::is_implicit_self_trait () con
*** 3556,3561 ****
--- 3586,3742 ----
    return is_trait_self;
  }
  
+ // ConstType
+ 
+ ConstType::ConstType (ConstKind kind, std::string symbol, TyTy::BaseType *ty,
+ 		      tree value,
+ 		      std::vector<TypeBoundPredicate> specified_bounds,
+ 		      location_t locus, HirId ref, HirId ty_ref,
+ 		      std::set<HirId> refs)
+   : BaseGeneric (ref, ty_ref, KIND,
+ 		 {Resolver::CanonicalPath::new_seg (UNKNOWN_NODEID,
+ 						    symbol.empty () ? "<n/a>"
+ 								    : symbol),
+ 		  locus},
+ 		 specified_bounds, refs),
+     const_kind (kind), ty (ty), value (value), symbol (symbol)
+ {}
+ 
+ void
+ ConstType::accept_vis (TyVisitor &vis)
+ {
+   vis.visit (*this);
+ }
+ 
+ void
+ ConstType::accept_vis (TyConstVisitor &vis) const
+ {
+   vis.visit (*this);
+ }
+ 
+ void
+ ConstType::set_value (tree v)
+ {
+   value = v;
+   const_kind = ConstType::ConstKind::Value;
+ }
+ 
+ std::string
+ ConstType::as_string () const
+ {
+   return get_name ();
+ }
+ 
+ bool
+ ConstType::can_eq (const BaseType *other, bool emit_errors) const
+ {
+   ConstCmp r (this, emit_errors);
+   return r.can_eq (other);
+ }
+ 
+ BaseType *
+ ConstType::clone () const
+ {
+   return new ConstType (const_kind, symbol, ty, value, get_specified_bounds (),
+ 			ident.locus, ref, ty_ref, get_combined_refs ());
+ }
+ 
+ std::string
+ ConstType::get_symbol () const
+ {
+   return symbol;
+ }
+ 
+ bool
+ ConstType::can_resolve () const
+ {
+   return false;
+ }
+ 
+ BaseType *
+ ConstType::resolve () const
+ {
+   rust_unreachable ();
+   return nullptr;
+ }
+ 
+ static std::string
+ generate_tree_str (tree value)
+ {
+   char *buf = nullptr;
+   size_t size = 0;
+ 
+   FILE *stream = open_memstream (&buf, &size);
+   if (!stream)
+     return "<error>";
+ 
+   print_generic_stmt (stream, value, TDF_NONE);
+   fclose (stream);
+ 
+   std::string result = (buf ? std::string (buf, size) : "<error>");
+   free (buf);
+ 
+   if (!result.empty () && result.back () == '\n')
+     result.pop_back ();
+ 
+   return result;
+ }
+ 
+ std::string
+ ConstType::get_name () const
+ {
+   if (value == error_mark_node)
+     {
+       switch (get_const_kind ())
+ 	{
+ 	case Rust::TyTy::ConstType::Decl:
+ 	  return "ConstType:<" + get_ty ()->get_name () + " " + get_symbol ()
+ 		 + ">";
+ 
+ 	case Rust::TyTy::ConstType::Infer:
+ 	  return "ConstType:<" + get_ty ()->get_name () + " ?" + ">";
+ 
+ 	default:
+ 	  return "ConstType:<" + get_ty ()->get_name () + " - <error>" + ">";
+ 	}
+     }
+ 
+   return generate_tree_str (value);
+ }
+ 
+ bool
+ ConstType::is_equal (const BaseType &other) const
+ {
+   if (get_kind () != other.get_kind ())
+     {
+       return false;
+     }
+ 
+   const ConstType &rhs = static_cast<const ConstType &> (other);
+   if (!get_ty ()->is_equal (*rhs.get_ty ()))
+     return false;
+ 
+   tree lv = get_value ();
+   tree rv = rhs.get_value ();
+ 
+   return operand_equal_p (lv, rv, 0);
+ }
+ 
+ ConstType *
+ ConstType::handle_substitions (SubstitutionArgumentMappings &mappings)
+ {
+   SubstitutionArg arg = SubstitutionArg::error ();
+   bool found = mappings.get_argument_for_symbol (this, &arg);
+   if (found && !arg.is_error ())
+     {
+       TyTy::BaseType *subst = arg.get_tyty ();
+       rust_assert (subst->is<TyTy::ConstType> ());
+       return static_cast<TyTy::ConstType *> (subst);
+     }
+ 
+   return this;
+ }
+ 
  // OpaqueType
  
  OpaqueType::OpaqueType (location_t locus, HirId ref,
*************** BaseType *
*** 3624,3651 ****
  OpaqueType::resolve () const
  {
    TyVar var (get_ty_ref ());
!   BaseType *r = var.get_tyty ();
! 
!   while (r->get_kind () == TypeKind::OPAQUE)
!     {
!       OpaqueType *rr = static_cast<OpaqueType *> (r);
!       if (!rr->can_resolve ())
! 	break;
! 
!       TyVar v (rr->get_ty_ref ());
!       BaseType *n = v.get_tyty ();
! 
!       // fix infinite loop
!       if (r == n)
! 	break;
! 
!       r = n;
!     }
! 
!   if (r->get_kind () == TypeKind::OPAQUE && (r->get_ref () == r->get_ty_ref ()))
!     return TyVar (r->get_ty_ref ()).get_tyty ();
! 
!   return r;
  }
  
  bool
--- 3805,3811 ----
  OpaqueType::resolve () const
  {
    TyVar var (get_ty_ref ());
!   return var.get_tyty ();
  }
  
  bool
*************** OpaqueType::is_equal (const BaseType &ot
*** 3655,3695 ****
    if (can_resolve () != other2.can_resolve ())
      return false;
  
-   if (can_resolve ())
-     return resolve ()->can_eq (other2.resolve (), false);
- 
    return bounds_compatible (other, UNDEF_LOCATION, false);
  }
  
- OpaqueType *
- OpaqueType::handle_substitions (SubstitutionArgumentMappings &subst_mappings)
- {
-   // SubstitutionArg arg = SubstitutionArg::error ();
-   // bool ok = subst_mappings.get_argument_for_symbol (this, &arg);
-   // if (!ok || arg.is_error ())
-   //   return this;
- 
-   // OpaqueType *p = static_cast<OpaqueType *> (clone ());
-   // subst_mappings.on_param_subst (*p, arg);
- 
-   // // there are two cases one where we substitute directly to a new PARAM and
-   // // otherwise
-   // if (arg.get_tyty ()->get_kind () == TyTy::TypeKind::PARAM)
-   //   {
-   //     p->set_ty_ref (arg.get_tyty ()->get_ref ());
-   //     return p;
-   //   }
- 
-   // // this is the new subst that this needs to pass
-   // p->set_ref (mappings.get_next_hir_id ());
-   // p->set_ty_ref (arg.get_tyty ()->get_ref ());
- 
-   // return p;
- 
-   rust_unreachable ();
-   return nullptr;
- }
- 
  // StrType
  
  StrType::StrType (HirId ref, std::set<HirId> refs)
--- 3815,3823 ----
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-tyty.h gcc-16-20250810/gcc/rust/typecheck/rust-tyty.h
*** gcc-16-20250803/gcc/rust/typecheck/rust-tyty.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-tyty.h	Sun Aug 10 22:32:08 2025
***************
*** 19,24 ****
--- 19,25 ----
  #ifndef RUST_TYTY
  #define RUST_TYTY
  
+ #include "optional.h"
  #include "rust-hir-map.h"
  #include "rust-common.h"
  #include "rust-identifier.h"
***************
*** 29,34 ****
--- 30,36 ----
  #include "rust-tyty-region.h"
  #include "rust-system.h"
  #include "rust-hir.h"
+ #include "tree.h"
  
  namespace Rust {
  
*************** enum TypeKind
*** 56,61 ****
--- 58,64 ----
    REF,
    POINTER,
    PARAM,
+   CONST,
    ARRAY,
    SLICE,
    FNDEF,
*************** enum TypeKind
*** 78,85 ****
    ERROR
  };
  
! extern bool
! is_primitive_type_kind (TypeKind kind);
  
  class TypeKindFormat
  {
--- 81,87 ----
    ERROR
  };
  
! extern bool is_primitive_type_kind (TypeKind kind);
  
  class TypeKindFormat
  {
*************** public:
*** 165,172 ****
  
    void debug () const;
  
!   // FIXME this will eventually go away
!   const BaseType *get_root () const;
  
    // This will get the monomorphized type from Params, Placeholders or
    // Projections if available or error
--- 167,173 ----
  
    void debug () const;
  
!   BaseType *get_root ();
  
    // This will get the monomorphized type from Params, Placeholders or
    // Projections if available or error
*************** public:
*** 268,275 ****
    {}
  
    WARN_UNUSED_RESULT virtual size_t get_num_params () const = 0;
!   WARN_UNUSED_RESULT virtual BaseType *
!   get_param_type_at (size_t index) const = 0;
    WARN_UNUSED_RESULT virtual BaseType *get_return_type () const = 0;
  };
  
--- 269,276 ----
    {}
  
    WARN_UNUSED_RESULT virtual size_t get_num_params () const = 0;
!   WARN_UNUSED_RESULT virtual BaseType *get_param_type_at (size_t index) const
!     = 0;
    WARN_UNUSED_RESULT virtual BaseType *get_return_type () const = 0;
  };
  
*************** public:
*** 365,382 ****
    std::string get_name () const override final;
  };
  
! class ParamType : public BaseType
  {
  public:
    static constexpr auto KIND = TypeKind::PARAM;
  
    ParamType (std::string symbol, location_t locus, HirId ref,
- 	     HIR::GenericParam &param,
  	     std::vector<TypeBoundPredicate> specified_bounds,
  	     std::set<HirId> refs = std::set<HirId> ());
  
    ParamType (bool is_trait_self, std::string symbol, location_t locus,
! 	     HirId ref, HirId ty_ref, HIR::GenericParam &param,
  	     std::vector<TypeBoundPredicate> specified_bounds,
  	     std::set<HirId> refs = std::set<HirId> ());
  
--- 366,399 ----
    std::string get_name () const override final;
  };
  
! class BaseGeneric : public BaseType
! {
! public:
!   virtual std::string get_symbol () const = 0;
! 
!   virtual bool can_resolve () const = 0;
! 
!   virtual BaseType *resolve () const = 0;
! 
! protected:
!   BaseGeneric (HirId ref, HirId ty_ref, TypeKind kind, RustIdent ident,
! 	       std::vector<TypeBoundPredicate> specified_bounds,
! 	       std::set<HirId> refs = std::set<HirId> ())
!     : BaseType (ref, ty_ref, kind, ident, specified_bounds, refs)
!   {}
! };
! 
! class ParamType : public BaseGeneric
  {
  public:
    static constexpr auto KIND = TypeKind::PARAM;
  
    ParamType (std::string symbol, location_t locus, HirId ref,
  	     std::vector<TypeBoundPredicate> specified_bounds,
  	     std::set<HirId> refs = std::set<HirId> ());
  
    ParamType (bool is_trait_self, std::string symbol, location_t locus,
! 	     HirId ref, HirId ty_ref,
  	     std::vector<TypeBoundPredicate> specified_bounds,
  	     std::set<HirId> refs = std::set<HirId> ());
  
*************** public:
*** 389,401 ****
  
    BaseType *clone () const final override;
  
!   std::string get_symbol () const;
! 
!   HIR::GenericParam &get_generic_param ();
  
!   bool can_resolve () const;
  
!   BaseType *resolve () const;
  
    std::string get_name () const override final;
  
--- 406,416 ----
  
    BaseType *clone () const final override;
  
!   std::string get_symbol () const override final;
  
!   bool can_resolve () const override final;
  
!   BaseType *resolve () const override final;
  
    std::string get_name () const override final;
  
*************** public:
*** 409,415 ****
  private:
    bool is_trait_self;
    std::string symbol;
!   HIR::GenericParam &param;
  };
  
  class OpaqueType : public BaseType
--- 424,481 ----
  private:
    bool is_trait_self;
    std::string symbol;
! };
! 
! class ConstType : public BaseGeneric
! {
! public:
!   static constexpr auto KIND = TypeKind::CONST;
! 
!   enum ConstKind
!   {
!     Decl,
!     Value,
!     Infer,
!     Error
!   };
! 
!   ConstType (ConstKind kind, std::string symbol, TyTy::BaseType *ty, tree value,
! 	     std::vector<TypeBoundPredicate> specified_bounds, location_t locus,
! 	     HirId ref, HirId ty_ref,
! 	     std::set<HirId> refs = std::set<HirId> ());
! 
!   void accept_vis (TyVisitor &vis) override;
!   void accept_vis (TyConstVisitor &vis) const override;
! 
!   ConstKind get_const_kind () const { return const_kind; }
!   TyTy::BaseType *get_ty () const { return ty; }
!   tree get_value () const { return value; }
! 
!   void set_value (tree value);
! 
!   std::string as_string () const override;
! 
!   bool can_eq (const BaseType *other, bool emit_errors) const override final;
! 
!   BaseType *clone () const final override;
! 
!   std::string get_symbol () const override final;
! 
!   bool can_resolve () const override final;
! 
!   BaseType *resolve () const override final;
! 
!   std::string get_name () const override final;
! 
!   bool is_equal (const BaseType &other) const override;
! 
!   ConstType *handle_substitions (SubstitutionArgumentMappings &mappings);
! 
! private:
!   ConstKind const_kind;
!   TyTy::BaseType *ty;
!   tree value;
!   std::string symbol;
  };
  
  class OpaqueType : public BaseType
*************** public:
*** 441,448 ****
    std::string get_name () const override final;
  
    bool is_equal (const BaseType &other) const override;
- 
-   OpaqueType *handle_substitions (SubstitutionArgumentMappings &mappings);
  };
  
  class StructFieldType
--- 507,512 ----
*************** public:
*** 541,554 ****
  
    std::string get_name () const;
  
!   // check that this predicate is object-safe see:
    // https://doc.rust-lang.org/reference/items/traits.html#object-safety
    bool is_object_safe (bool emit_error, location_t locus) const;
  
    void apply_generic_arguments (HIR::GenericArgs *generic_args,
! 				bool has_associated_self);
  
!   void apply_argument_mappings (SubstitutionArgumentMappings &arguments);
  
    bool contains_item (const std::string &search) const;
  
--- 605,619 ----
  
    std::string get_name () const;
  
!   // check that this  is object-safe see:
    // https://doc.rust-lang.org/reference/items/traits.html#object-safety
    bool is_object_safe (bool emit_error, location_t locus) const;
  
    void apply_generic_arguments (HIR::GenericArgs *generic_args,
! 				bool has_associated_self, bool is_super_trait);
  
!   void apply_argument_mappings (SubstitutionArgumentMappings &arguments,
! 				bool is_super_trait);
  
    bool contains_item (const std::string &search) const;
  
*************** private:
*** 596,601 ****
--- 661,669 ----
  
    TypeBoundPredicate (mark_is_error);
  
+   void get_trait_hierachy (
+     std::function<void (const Resolver::TraitReference &)> callback) const;
+ 
    DefId reference;
    location_t locus;
    bool error_flag;
*************** class ArrayType : public BaseType
*** 1156,1174 ****
  public:
    static constexpr auto KIND = TypeKind::ARRAY;
  
!   ArrayType (HirId ref, location_t locus, HIR::Expr &capacity_expr, TyVar base,
  	     std::set<HirId> refs = std::set<HirId> ())
      : BaseType (ref, ref, TypeKind::ARRAY,
  		{Resolver::CanonicalPath::create_empty (), locus}, refs),
!       element_type (base), capacity_expr (capacity_expr)
    {}
  
!   ArrayType (HirId ref, HirId ty_ref, location_t locus,
! 	     HIR::Expr &capacity_expr, TyVar base,
! 	     std::set<HirId> refs = std::set<HirId> ())
      : BaseType (ref, ty_ref, TypeKind::ARRAY,
  		{Resolver::CanonicalPath::create_empty (), locus}, refs),
!       element_type (base), capacity_expr (capacity_expr)
    {}
  
    void accept_vis (TyVisitor &vis) override;
--- 1224,1241 ----
  public:
    static constexpr auto KIND = TypeKind::ARRAY;
  
!   ArrayType (HirId ref, location_t locus, ConstType *capacity, TyVar base,
  	     std::set<HirId> refs = std::set<HirId> ())
      : BaseType (ref, ref, TypeKind::ARRAY,
  		{Resolver::CanonicalPath::create_empty (), locus}, refs),
!       element_type (base), capacity (capacity)
    {}
  
!   ArrayType (HirId ref, HirId ty_ref, location_t locus, ConstType *capacity,
! 	     TyVar base, std::set<HirId> refs = std::set<HirId> ())
      : BaseType (ref, ty_ref, TypeKind::ARRAY,
  		{Resolver::CanonicalPath::create_empty (), locus}, refs),
!       element_type (base), capacity (capacity)
    {}
  
    void accept_vis (TyVisitor &vis) override;
*************** public:
*** 1187,1201 ****
  
    BaseType *clone () const final override;
  
!   HIR::Expr &get_capacity_expr () const { return capacity_expr; }
  
    ArrayType *handle_substitions (SubstitutionArgumentMappings &mappings);
  
  private:
    TyVar element_type;
!   // FIXME: I dont think this should be in tyty - tyty should already be const
!   // evaluated
!   HIR::Expr &capacity_expr;
  };
  
  class SliceType : public BaseType
--- 1254,1266 ----
  
    BaseType *clone () const final override;
  
!   ConstType *get_capacity () const { return capacity; }
  
    ArrayType *handle_substitions (SubstitutionArgumentMappings &mappings);
  
  private:
    TyVar element_type;
!   ConstType *capacity;
  };
  
  class SliceType : public BaseType
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-unify.cc gcc-16-20250810/gcc/rust/typecheck/rust-unify.cc
*** gcc-16-20250803/gcc/rust/typecheck/rust-unify.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-unify.cc	Sun Aug 10 22:32:08 2025
***************
*** 17,22 ****
--- 17,25 ----
  // <http://www.gnu.org/licenses/>.
  
  #include "rust-unify.h"
+ #include "fold-const.h"
+ #include "rust-tyty.h"
+ #include "tree.h"
  
  namespace Rust {
  namespace Resolver {
*************** UnifyRules::Resolve (TyTy::TyWithLocatio
*** 53,58 ****
--- 56,77 ----
  }
  
  TyTy::BaseType *
+ UnifyRules::resolve_subtype (TyTy::TyWithLocation lhs, TyTy::TyWithLocation rhs)
+ {
+   TyTy::BaseType *result
+     = UnifyRules::Resolve (lhs, rhs, locus, commit_flag, emit_error, infer_flag,
+ 			   commits, infers);
+ 
+   // If the recursive call resulted in an error and would have emitted an error
+   // message, disable error emission for the current level to avoid duplicate
+   // errors
+   if (result->get_kind () == TyTy::TypeKind::ERROR && emit_error)
+     emit_error = false;
+ 
+   return result;
+ }
+ 
+ TyTy::BaseType *
  UnifyRules::get_base ()
  {
    return lhs.get_ty ()->destructure ();
*************** UnifyRules::commit (TyTy::BaseType *base
*** 69,75 ****
  		    TyTy::BaseType *resolved)
  {
    TypeCheckContext &context = *TypeCheckContext::get ();
-   Analysis::Mappings &mappings = Analysis::Mappings::get ();
  
    TyTy::BaseType *b = base->destructure ();
    TyTy::BaseType *o = other->destructure ();
--- 88,93 ----
*************** UnifyRules::commit (TyTy::BaseType *base
*** 102,114 ****
  	    continue;
  
  	  // if any of the types are inference variables lets fix them
! 	  if (ref_tyty->get_kind () == TyTy::TypeKind::INFER)
! 	    {
! 	      auto node = Analysis::NodeMapping (mappings.get_current_crate (),
! 						 UNKNOWN_NODEID, ref,
! 						 UNKNOWN_LOCAL_DEFID);
! 	      context.insert_type (node, resolved->clone ());
! 	    }
  	}
      }
  }
--- 120,127 ----
  	    continue;
  
  	  // if any of the types are inference variables lets fix them
! 	  if (ref_tyty->is<TyTy::InferType> ())
! 	    context.insert_implicit_type (ref, resolved);
  	}
      }
  }
*************** UnifyRules::go ()
*** 315,320 ****
--- 328,336 ----
      case TyTy::OPAQUE:
        return expect_opaque (static_cast<TyTy::OpaqueType *> (ltype), rtype);
  
+     case TyTy::CONST:
+       return expect_const (static_cast<TyTy::ConstType *> (ltype), rtype);
+ 
      case TyTy::ERROR:
        return new TyTy::ErrorType (0);
      }
*************** UnifyRules::expect_inference_variable (T
*** 328,357 ****
  {
    switch (rtype->get_kind ())
      {
!       case TyTy::INFER: {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	switch (ltype->get_infer_kind ())
  	  {
  	  case TyTy::InferType::InferTypeKind::GENERAL:
  	    return rtype->clone ();
  
! 	    case TyTy::InferType::InferTypeKind::INTEGRAL: {
  	      bool is_valid = r->get_infer_kind ()
  				== TyTy::InferType::InferTypeKind::INTEGRAL
  			      || r->get_infer_kind ()
  				   == TyTy::InferType::InferTypeKind::GENERAL;
  	      if (is_valid)
! 		return rtype->clone ();
  	    }
  	    break;
  
! 	    case TyTy::InferType::InferTypeKind::FLOAT: {
  	      bool is_valid
  		= r->get_infer_kind () == TyTy::InferType::InferTypeKind::FLOAT
  		  || r->get_infer_kind ()
  		       == TyTy::InferType::InferTypeKind::GENERAL;
  	      if (is_valid)
! 		return rtype->clone ();
  	    }
  	    break;
  	  }
--- 344,376 ----
  {
    switch (rtype->get_kind ())
      {
!     case TyTy::INFER:
!       {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	switch (ltype->get_infer_kind ())
  	  {
  	  case TyTy::InferType::InferTypeKind::GENERAL:
  	    return rtype->clone ();
  
! 	  case TyTy::InferType::InferTypeKind::INTEGRAL:
! 	    {
  	      bool is_valid = r->get_infer_kind ()
  				== TyTy::InferType::InferTypeKind::INTEGRAL
  			      || r->get_infer_kind ()
  				   == TyTy::InferType::InferTypeKind::GENERAL;
  	      if (is_valid)
! 		return rtype;
  	    }
  	    break;
  
! 	  case TyTy::InferType::InferTypeKind::FLOAT:
! 	    {
  	      bool is_valid
  		= r->get_infer_kind () == TyTy::InferType::InferTypeKind::FLOAT
  		  || r->get_infer_kind ()
  		       == TyTy::InferType::InferTypeKind::GENERAL;
  	      if (is_valid)
! 		return rtype;
  	    }
  	    break;
  	  }
*************** UnifyRules::expect_inference_variable (T
*** 361,367 ****
      case TyTy::INT:
      case TyTy::UINT:
      case TyTy::USIZE:
!       case TyTy::ISIZE: {
  	bool is_valid = (ltype->get_infer_kind ()
  			 == TyTy::InferType::InferTypeKind::GENERAL)
  			|| (ltype->get_infer_kind ()
--- 380,387 ----
      case TyTy::INT:
      case TyTy::UINT:
      case TyTy::USIZE:
!     case TyTy::ISIZE:
!       {
  	bool is_valid = (ltype->get_infer_kind ()
  			 == TyTy::InferType::InferTypeKind::GENERAL)
  			|| (ltype->get_infer_kind ()
*************** UnifyRules::expect_inference_variable (T
*** 369,380 ****
  	if (is_valid)
  	  {
  	    ltype->apply_primitive_type_hint (*rtype);
! 	    return rtype->clone ();
  	  }
        }
        break;
  
!       case TyTy::FLOAT: {
  	bool is_valid = (ltype->get_infer_kind ()
  			 == TyTy::InferType::InferTypeKind::GENERAL)
  			|| (ltype->get_infer_kind ()
--- 389,401 ----
  	if (is_valid)
  	  {
  	    ltype->apply_primitive_type_hint (*rtype);
! 	    return rtype;
  	  }
        }
        break;
  
!     case TyTy::FLOAT:
!       {
  	bool is_valid = (ltype->get_infer_kind ()
  			 == TyTy::InferType::InferTypeKind::GENERAL)
  			|| (ltype->get_infer_kind ()
*************** UnifyRules::expect_inference_variable (T
*** 382,388 ****
  	if (is_valid)
  	  {
  	    ltype->apply_primitive_type_hint (*rtype);
! 	    return rtype->clone ();
  	  }
        }
        break;
--- 403,409 ----
  	if (is_valid)
  	  {
  	    ltype->apply_primitive_type_hint (*rtype);
! 	    return rtype;
  	  }
        }
        break;
*************** UnifyRules::expect_inference_variable (T
*** 404,410 ****
      case TyTy::PROJECTION:
      case TyTy::DYNAMIC:
      case TyTy::CLOSURE:
!       case TyTy::OPAQUE: {
  	bool is_valid = (ltype->get_infer_kind ()
  			 == TyTy::InferType::InferTypeKind::GENERAL);
  	if (is_valid)
--- 425,433 ----
      case TyTy::PROJECTION:
      case TyTy::DYNAMIC:
      case TyTy::CLOSURE:
!     case TyTy::CONST:
!     case TyTy::OPAQUE:
!       {
  	bool is_valid = (ltype->get_infer_kind ()
  			 == TyTy::InferType::InferTypeKind::GENERAL);
  	if (is_valid)
*************** UnifyRules::expect_adt (TyTy::ADTType *l
*** 424,430 ****
  {
    switch (rtype->get_kind ())
      {
!       case TyTy::INFER: {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
--- 447,454 ----
  {
    switch (rtype->get_kind ())
      {
!     case TyTy::INFER:
!       {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
*************** UnifyRules::expect_adt (TyTy::ADTType *l
*** 433,439 ****
        }
        break;
  
!       case TyTy::ADT: {
  	TyTy::ADTType &type = *static_cast<TyTy::ADTType *> (rtype);
  	if (ltype->get_adt_kind () != type.get_adt_kind ())
  	  {
--- 457,464 ----
        }
        break;
  
!     case TyTy::ADT:
!       {
  	TyTy::ADTType &type = *static_cast<TyTy::ADTType *> (rtype);
  	if (ltype->get_adt_kind () != type.get_adt_kind ())
  	  {
*************** UnifyRules::expect_adt (TyTy::ADTType *l
*** 469,479 ****
  		TyTy::BaseType *other_field_ty = other_field->get_field_type ();
  
  		TyTy::BaseType *unified_ty
! 		  = UnifyRules::Resolve (TyTy::TyWithLocation (this_field_ty),
! 					 TyTy::TyWithLocation (other_field_ty),
! 					 locus, commit_flag,
! 					 false /* emit_error */, infer_flag,
! 					 commits, infers);
  		if (unified_ty->get_kind () == TyTy::TypeKind::ERROR)
  		  {
  		    return new TyTy::ErrorType (0);
--- 494,501 ----
  		TyTy::BaseType *other_field_ty = other_field->get_field_type ();
  
  		TyTy::BaseType *unified_ty
! 		  = resolve_subtype (TyTy::TyWithLocation (this_field_ty),
! 				     TyTy::TyWithLocation (other_field_ty));
  		if (unified_ty->get_kind () == TyTy::TypeKind::ERROR)
  		  {
  		    return new TyTy::ErrorType (0);
*************** UnifyRules::expect_adt (TyTy::ADTType *l
*** 495,505 ****
  		auto pa = a.get_param_ty ();
  		auto pb = b.get_param_ty ();
  
! 		auto res
! 		  = UnifyRules::Resolve (TyTy::TyWithLocation (pa),
! 					 TyTy::TyWithLocation (pb), locus,
! 					 commit_flag, false /* emit_error */,
! 					 infer_flag, commits, infers);
  		if (res->get_kind () == TyTy::TypeKind::ERROR)
  		  {
  		    return new TyTy::ErrorType (0);
--- 517,524 ----
  		auto pa = a.get_param_ty ();
  		auto pb = b.get_param_ty ();
  
! 		auto res = resolve_subtype (TyTy::TyWithLocation (pa),
! 					    TyTy::TyWithLocation (pb));
  		if (res->get_kind () == TyTy::TypeKind::ERROR)
  		  {
  		    return new TyTy::ErrorType (0);
*************** UnifyRules::expect_adt (TyTy::ADTType *l
*** 533,538 ****
--- 552,558 ----
      case TyTy::DYNAMIC:
      case TyTy::CLOSURE:
      case TyTy::OPAQUE:
+     case TyTy::CONST:
      case TyTy::ERROR:
        return new TyTy::ErrorType (0);
      }
*************** UnifyRules::expect_str (TyTy::StrType *l
*** 544,550 ****
  {
    switch (rtype->get_kind ())
      {
!       case TyTy::INFER: {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
--- 564,571 ----
  {
    switch (rtype->get_kind ())
      {
!     case TyTy::INFER:
!       {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
*************** UnifyRules::expect_str (TyTy::StrType *l
*** 578,583 ****
--- 599,605 ----
      case TyTy::DYNAMIC:
      case TyTy::CLOSURE:
      case TyTy::OPAQUE:
+     case TyTy::CONST:
      case TyTy::ERROR:
        return new TyTy::ErrorType (0);
      }
*************** UnifyRules::expect_reference (TyTy::Refe
*** 589,595 ****
  {
    switch (rtype->get_kind ())
      {
!       case TyTy::INFER: {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
--- 611,618 ----
  {
    switch (rtype->get_kind ())
      {
!     case TyTy::INFER:
!       {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
*************** UnifyRules::expect_reference (TyTy::Refe
*** 598,613 ****
        }
        break;
  
!       case TyTy::REF: {
  	TyTy::ReferenceType &type = *static_cast<TyTy::ReferenceType *> (rtype);
  	auto base_type = ltype->get_base ();
  	auto other_base_type = type.get_base ();
  
  	TyTy::BaseType *base_resolved
! 	  = UnifyRules::Resolve (TyTy::TyWithLocation (base_type),
! 				 TyTy::TyWithLocation (other_base_type), locus,
! 				 commit_flag, false /* emit_error */,
! 				 infer_flag, commits, infers);
  	if (base_resolved->get_kind () == TyTy::TypeKind::ERROR)
  	  {
  	    return new TyTy::ErrorType (0);
--- 621,635 ----
        }
        break;
  
!     case TyTy::REF:
!       {
  	TyTy::ReferenceType &type = *static_cast<TyTy::ReferenceType *> (rtype);
  	auto base_type = ltype->get_base ();
  	auto other_base_type = type.get_base ();
  
  	TyTy::BaseType *base_resolved
! 	  = resolve_subtype (TyTy::TyWithLocation (base_type),
! 			     TyTy::TyWithLocation (other_base_type));
  	if (base_resolved->get_kind () == TyTy::TypeKind::ERROR)
  	  {
  	    return new TyTy::ErrorType (0);
*************** UnifyRules::expect_reference (TyTy::Refe
*** 649,654 ****
--- 671,677 ----
      case TyTy::DYNAMIC:
      case TyTy::CLOSURE:
      case TyTy::OPAQUE:
+     case TyTy::CONST:
      case TyTy::ERROR:
        return new TyTy::ErrorType (0);
      }
*************** UnifyRules::expect_pointer (TyTy::Pointe
*** 660,666 ****
  {
    switch (rtype->get_kind ())
      {
!       case TyTy::INFER: {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
--- 683,690 ----
  {
    switch (rtype->get_kind ())
      {
!     case TyTy::INFER:
!       {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
*************** UnifyRules::expect_pointer (TyTy::Pointe
*** 669,684 ****
        }
        break;
  
!       case TyTy::POINTER: {
  	TyTy::PointerType &type = *static_cast<TyTy::PointerType *> (rtype);
  	auto base_type = ltype->get_base ();
  	auto other_base_type = type.get_base ();
  
  	TyTy::BaseType *base_resolved
! 	  = UnifyRules::Resolve (TyTy::TyWithLocation (base_type),
! 				 TyTy::TyWithLocation (other_base_type), locus,
! 				 commit_flag, false /* emit_error */,
! 				 infer_flag, commits, infers);
  	if (base_resolved->get_kind () == TyTy::TypeKind::ERROR)
  	  {
  	    return new TyTy::ErrorType (0);
--- 693,707 ----
        }
        break;
  
!     case TyTy::POINTER:
!       {
  	TyTy::PointerType &type = *static_cast<TyTy::PointerType *> (rtype);
  	auto base_type = ltype->get_base ();
  	auto other_base_type = type.get_base ();
  
  	TyTy::BaseType *base_resolved
! 	  = resolve_subtype (TyTy::TyWithLocation (base_type),
! 			     TyTy::TyWithLocation (other_base_type));
  	if (base_resolved->get_kind () == TyTy::TypeKind::ERROR)
  	  {
  	    return new TyTy::ErrorType (0);
*************** UnifyRules::expect_pointer (TyTy::Pointe
*** 720,725 ****
--- 743,749 ----
      case TyTy::DYNAMIC:
      case TyTy::CLOSURE:
      case TyTy::OPAQUE:
+     case TyTy::CONST:
      case TyTy::ERROR:
        return new TyTy::ErrorType (0);
      }
*************** UnifyRules::expect_param (TyTy::ParamTyp
*** 731,737 ****
  {
    switch (rtype->get_kind ())
      {
!       case TyTy::INFER: {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
--- 755,762 ----
  {
    switch (rtype->get_kind ())
      {
!     case TyTy::INFER:
!       {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
*************** UnifyRules::expect_param (TyTy::ParamTyp
*** 740,746 ****
        }
        break;
  
!       case TyTy::PARAM: {
  	TyTy::ParamType &type = *static_cast<TyTy::ParamType *> (rtype);
  	// bool symbol_matches
  	//   = ltype->get_symbol ().compare (type.get_symbol ()) == 0;
--- 765,772 ----
        }
        break;
  
!     case TyTy::PARAM:
!       {
  	TyTy::ParamType &type = *static_cast<TyTy::ParamType *> (rtype);
  	// bool symbol_matches
  	//   = ltype->get_symbol ().compare (type.get_symbol ()) == 0;
*************** UnifyRules::expect_param (TyTy::ParamTyp
*** 782,787 ****
--- 808,814 ----
      case TyTy::DYNAMIC:
      case TyTy::CLOSURE:
      case TyTy::OPAQUE:
+     case TyTy::CONST:
      case TyTy::ERROR:
        return new TyTy::ErrorType (0);
      }
*************** UnifyRules::expect_array (TyTy::ArrayTyp
*** 793,799 ****
  {
    switch (rtype->get_kind ())
      {
!       case TyTy::INFER: {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
--- 820,827 ----
  {
    switch (rtype->get_kind ())
      {
!     case TyTy::INFER:
!       {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
*************** UnifyRules::expect_array (TyTy::ArrayTyp
*** 802,822 ****
        }
        break;
  
!       case TyTy::ARRAY: {
  	TyTy::ArrayType &type = *static_cast<TyTy::ArrayType *> (rtype);
! 	TyTy::BaseType *element_unify = UnifyRules::Resolve (
! 	  TyTy::TyWithLocation (ltype->get_element_type ()),
! 	  TyTy::TyWithLocation (type.get_element_type ()), locus, commit_flag,
! 	  false /* emit_error*/, infer_flag, commits, infers);
  
! 	if (element_unify->get_kind () != TyTy::TypeKind::ERROR)
! 	  {
! 	    return new TyTy::ArrayType (type.get_ref (), type.get_ty_ref (),
! 					type.get_ident ().locus,
! 					type.get_capacity_expr (),
! 					TyTy::TyVar (
! 					  element_unify->get_ref ()));
! 	  }
        }
        break;
  
--- 830,861 ----
        }
        break;
  
!     case TyTy::ARRAY:
!       {
  	TyTy::ArrayType &type = *static_cast<TyTy::ArrayType *> (rtype);
! 	TyTy::BaseType *element_unify
! 	  = resolve_subtype (TyTy::TyWithLocation (ltype->get_element_type ()),
! 			     TyTy::TyWithLocation (type.get_element_type ()));
  
! 	if (element_unify->get_kind () == TyTy::TypeKind::ERROR)
! 	  return new TyTy::ErrorType (0);
! 
! 	bool save_emit_error = emit_error;
! 	emit_error = false;
! 	TyTy::BaseType *capacity_unify
! 	  = resolve_subtype (TyTy::TyWithLocation (ltype->get_capacity ()),
! 			     TyTy::TyWithLocation (type.get_capacity ()));
! 	emit_error = save_emit_error;
! 
! 	if (capacity_unify->get_kind () != TyTy::TypeKind::CONST)
! 	  return new TyTy::ErrorType (0);
! 
! 	TyTy::ConstType *capacity_type_unify
! 	  = static_cast<TyTy::ConstType *> (capacity_unify);
! 	return new TyTy::ArrayType (type.get_ref (), type.get_ty_ref (),
! 				    type.get_ident ().locus,
! 				    capacity_type_unify,
! 				    TyTy::TyVar (element_unify->get_ref ()));
        }
        break;
  
*************** UnifyRules::expect_array (TyTy::ArrayTyp
*** 842,847 ****
--- 881,887 ----
      case TyTy::DYNAMIC:
      case TyTy::CLOSURE:
      case TyTy::OPAQUE:
+     case TyTy::CONST:
      case TyTy::ERROR:
        return new TyTy::ErrorType (0);
      }
*************** UnifyRules::expect_slice (TyTy::SliceTyp
*** 853,859 ****
  {
    switch (rtype->get_kind ())
      {
!       case TyTy::INFER: {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
--- 893,900 ----
  {
    switch (rtype->get_kind ())
      {
!     case TyTy::INFER:
!       {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
*************** UnifyRules::expect_slice (TyTy::SliceTyp
*** 862,873 ****
        }
        break;
  
!       case TyTy::SLICE: {
  	TyTy::SliceType &type = *static_cast<TyTy::SliceType *> (rtype);
! 	TyTy::BaseType *element_unify = UnifyRules::Resolve (
! 	  TyTy::TyWithLocation (ltype->get_element_type ()),
! 	  TyTy::TyWithLocation (type.get_element_type ()), locus, commit_flag,
! 	  false /* emit_error*/, infer_flag, commits, infers);
  
  	if (element_unify->get_kind () != TyTy::TypeKind::ERROR)
  	  {
--- 903,914 ----
        }
        break;
  
!     case TyTy::SLICE:
!       {
  	TyTy::SliceType &type = *static_cast<TyTy::SliceType *> (rtype);
! 	TyTy::BaseType *element_unify
! 	  = resolve_subtype (TyTy::TyWithLocation (ltype->get_element_type ()),
! 			     TyTy::TyWithLocation (type.get_element_type ()));
  
  	if (element_unify->get_kind () != TyTy::TypeKind::ERROR)
  	  {
*************** UnifyRules::expect_slice (TyTy::SliceTyp
*** 901,906 ****
--- 942,948 ----
      case TyTy::DYNAMIC:
      case TyTy::CLOSURE:
      case TyTy::OPAQUE:
+     case TyTy::CONST:
      case TyTy::ERROR:
        return new TyTy::ErrorType (0);
      }
*************** UnifyRules::expect_fndef (TyTy::FnType *
*** 912,918 ****
  {
    switch (rtype->get_kind ())
      {
!       case TyTy::INFER: {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
--- 954,961 ----
  {
    switch (rtype->get_kind ())
      {
!     case TyTy::INFER:
!       {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
*************** UnifyRules::expect_fndef (TyTy::FnType *
*** 921,927 ****
        }
        break;
  
!       case TyTy::FNDEF: {
  	TyTy::FnType &type = *static_cast<TyTy::FnType *> (rtype);
  	if (ltype->num_params () != type.num_params ())
  	  {
--- 964,971 ----
        }
        break;
  
!     case TyTy::FNDEF:
!       {
  	TyTy::FnType &type = *static_cast<TyTy::FnType *> (rtype);
  	if (ltype->num_params () != type.num_params ())
  	  {
*************** UnifyRules::expect_fndef (TyTy::FnType *
*** 933,953 ****
  	    auto a = ltype->param_at (i).get_type ();
  	    auto b = type.param_at (i).get_type ();
  
! 	    auto unified_param
! 	      = UnifyRules::Resolve (TyTy::TyWithLocation (a),
! 				     TyTy::TyWithLocation (b), locus,
! 				     commit_flag, false /* emit_errors */,
! 				     infer_flag, commits, infers);
  	    if (unified_param->get_kind () == TyTy::TypeKind::ERROR)
  	      {
  		return new TyTy::ErrorType (0);
  	      }
  	  }
  
! 	auto unified_return = UnifyRules::Resolve (
! 	  TyTy::TyWithLocation (ltype->get_return_type ()),
! 	  TyTy::TyWithLocation (type.get_return_type ()), locus, commit_flag,
! 	  false /* emit_errors */, infer_flag, commits, infers);
  	if (unified_return->get_kind () == TyTy::TypeKind::ERROR)
  	  {
  	    return new TyTy::ErrorType (0);
--- 977,993 ----
  	    auto a = ltype->param_at (i).get_type ();
  	    auto b = type.param_at (i).get_type ();
  
! 	    auto unified_param = resolve_subtype (TyTy::TyWithLocation (a),
! 						  TyTy::TyWithLocation (b));
  	    if (unified_param->get_kind () == TyTy::TypeKind::ERROR)
  	      {
  		return new TyTy::ErrorType (0);
  	      }
  	  }
  
! 	auto unified_return
! 	  = resolve_subtype (TyTy::TyWithLocation (ltype->get_return_type ()),
! 			     TyTy::TyWithLocation (type.get_return_type ()));
  	if (unified_return->get_kind () == TyTy::TypeKind::ERROR)
  	  {
  	    return new TyTy::ErrorType (0);
*************** UnifyRules::expect_fndef (TyTy::FnType *
*** 992,997 ****
--- 1032,1038 ----
      case TyTy::DYNAMIC:
      case TyTy::CLOSURE:
      case TyTy::OPAQUE:
+     case TyTy::CONST:
      case TyTy::ERROR:
        return new TyTy::ErrorType (0);
      }
*************** UnifyRules::expect_fnptr (TyTy::FnPtr *l
*** 1003,1009 ****
  {
    switch (rtype->get_kind ())
      {
!       case TyTy::INFER: {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
--- 1044,1051 ----
  {
    switch (rtype->get_kind ())
      {
!     case TyTy::INFER:
!       {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
*************** UnifyRules::expect_fnptr (TyTy::FnPtr *l
*** 1012,1018 ****
        }
        break;
  
!       case TyTy::FNPTR: {
  	TyTy::FnPtr &type = *static_cast<TyTy::FnPtr *> (rtype);
  	if (ltype->num_params () != type.num_params ())
  	  {
--- 1054,1061 ----
        }
        break;
  
!     case TyTy::FNPTR:
!       {
  	TyTy::FnPtr &type = *static_cast<TyTy::FnPtr *> (rtype);
  	if (ltype->num_params () != type.num_params ())
  	  {
*************** UnifyRules::expect_fnptr (TyTy::FnPtr *l
*** 1024,1044 ****
  	    auto a = ltype->get_param_type_at (i);
  	    auto b = type.get_param_type_at (i);
  
! 	    auto unified_param
! 	      = UnifyRules::Resolve (TyTy::TyWithLocation (a),
! 				     TyTy::TyWithLocation (b), locus,
! 				     commit_flag, false /* emit_errors */,
! 				     infer_flag, commits, infers);
  	    if (unified_param->get_kind () == TyTy::TypeKind::ERROR)
  	      {
  		return new TyTy::ErrorType (0);
  	      }
  	  }
  
! 	auto unified_return = UnifyRules::Resolve (
! 	  TyTy::TyWithLocation (ltype->get_return_type ()),
! 	  TyTy::TyWithLocation (type.get_return_type ()), locus, commit_flag,
! 	  false /* emit_errors */, infer_flag, commits, infers);
  	if (unified_return->get_kind () == TyTy::TypeKind::ERROR)
  	  {
  	    return new TyTy::ErrorType (0);
--- 1067,1083 ----
  	    auto a = ltype->get_param_type_at (i);
  	    auto b = type.get_param_type_at (i);
  
! 	    auto unified_param = resolve_subtype (TyTy::TyWithLocation (a),
! 						  TyTy::TyWithLocation (b));
  	    if (unified_param->get_kind () == TyTy::TypeKind::ERROR)
  	      {
  		return new TyTy::ErrorType (0);
  	      }
  	  }
  
! 	auto unified_return
! 	  = resolve_subtype (TyTy::TyWithLocation (ltype->get_return_type ()),
! 			     TyTy::TyWithLocation (type.get_return_type ()));
  	if (unified_return->get_kind () == TyTy::TypeKind::ERROR)
  	  {
  	    return new TyTy::ErrorType (0);
*************** UnifyRules::expect_fnptr (TyTy::FnPtr *l
*** 1048,1063 ****
        }
        break;
  
!       case TyTy::FNDEF: {
  	TyTy::FnType &type = *static_cast<TyTy::FnType *> (rtype);
  	auto this_ret_type = ltype->get_return_type ();
  	auto other_ret_type = type.get_return_type ();
  
  	auto unified_result
! 	  = UnifyRules::Resolve (TyTy::TyWithLocation (this_ret_type),
! 				 TyTy::TyWithLocation (other_ret_type), locus,
! 				 commit_flag, false /*emit_errors*/, infer_flag,
! 				 commits, infers);
  	if (unified_result->get_kind () == TyTy::TypeKind::ERROR)
  	  {
  	    return new TyTy::ErrorType (0);
--- 1087,1101 ----
        }
        break;
  
!     case TyTy::FNDEF:
!       {
  	TyTy::FnType &type = *static_cast<TyTy::FnType *> (rtype);
  	auto this_ret_type = ltype->get_return_type ();
  	auto other_ret_type = type.get_return_type ();
  
  	auto unified_result
! 	  = resolve_subtype (TyTy::TyWithLocation (this_ret_type),
! 			     TyTy::TyWithLocation (other_ret_type));
  	if (unified_result->get_kind () == TyTy::TypeKind::ERROR)
  	  {
  	    return new TyTy::ErrorType (0);
*************** UnifyRules::expect_fnptr (TyTy::FnPtr *l
*** 1074,1083 ****
  	    auto other_param = type.param_at (i).get_type ();
  
  	    auto unified_param
! 	      = UnifyRules::Resolve (TyTy::TyWithLocation (this_param),
! 				     TyTy::TyWithLocation (other_param), locus,
! 				     commit_flag, false /* emit_errors */,
! 				     infer_flag, commits, infers);
  	    if (unified_param->get_kind () == TyTy::TypeKind::ERROR)
  	      {
  		return new TyTy::ErrorType (0);
--- 1112,1156 ----
  	    auto other_param = type.param_at (i).get_type ();
  
  	    auto unified_param
! 	      = resolve_subtype (TyTy::TyWithLocation (this_param),
! 				 TyTy::TyWithLocation (other_param));
! 	    if (unified_param->get_kind () == TyTy::TypeKind::ERROR)
! 	      {
! 		return new TyTy::ErrorType (0);
! 	      }
! 	  }
! 
! 	return ltype->clone ();
!       }
!       break;
! 
!     case TyTy::CLOSURE:
!       {
! 	TyTy::ClosureType &type = *static_cast<TyTy::ClosureType *> (rtype);
! 	auto this_ret_type = ltype->get_return_type ();
! 	auto other_ret_type = type.get_return_type ();
! 
! 	auto unified_result
! 	  = resolve_subtype (TyTy::TyWithLocation (this_ret_type),
! 			     TyTy::TyWithLocation (other_ret_type));
! 	if (unified_result->get_kind () == TyTy::TypeKind::ERROR)
! 	  {
! 	    return new TyTy::ErrorType (0);
! 	  }
! 
! 	if (ltype->num_params () != type.get_num_params ())
! 	  {
! 	    return new TyTy::ErrorType (0);
! 	  }
! 
! 	for (size_t i = 0; i < ltype->num_params (); i++)
! 	  {
! 	    auto this_param = ltype->get_param_type_at (i);
! 	    auto other_param = type.get_param_type_at (i);
! 
! 	    auto unified_param
! 	      = resolve_subtype (TyTy::TyWithLocation (this_param),
! 				 TyTy::TyWithLocation (other_param));
  	    if (unified_param->get_kind () == TyTy::TypeKind::ERROR)
  	      {
  		return new TyTy::ErrorType (0);
*************** UnifyRules::expect_fnptr (TyTy::FnPtr *l
*** 1107,1114 ****
      case TyTy::PLACEHOLDER:
      case TyTy::PROJECTION:
      case TyTy::DYNAMIC:
-     case TyTy::CLOSURE:
      case TyTy::OPAQUE:
      case TyTy::ERROR:
        return new TyTy::ErrorType (0);
      }
--- 1180,1187 ----
      case TyTy::PLACEHOLDER:
      case TyTy::PROJECTION:
      case TyTy::DYNAMIC:
      case TyTy::OPAQUE:
+     case TyTy::CONST:
      case TyTy::ERROR:
        return new TyTy::ErrorType (0);
      }
*************** UnifyRules::expect_tuple (TyTy::TupleTyp
*** 1120,1126 ****
  {
    switch (rtype->get_kind ())
      {
!       case TyTy::INFER: {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
--- 1193,1200 ----
  {
    switch (rtype->get_kind ())
      {
!     case TyTy::INFER:
!       {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
*************** UnifyRules::expect_tuple (TyTy::TupleTyp
*** 1129,1135 ****
        }
        break;
  
!       case TyTy::TUPLE: {
  	TyTy::TupleType &type = *static_cast<TyTy::TupleType *> (rtype);
  	if (ltype->num_fields () != type.num_fields ())
  	  {
--- 1203,1210 ----
        }
        break;
  
!     case TyTy::TUPLE:
!       {
  	TyTy::TupleType &type = *static_cast<TyTy::TupleType *> (rtype);
  	if (ltype->num_fields () != type.num_fields ())
  	  {
*************** UnifyRules::expect_tuple (TyTy::TupleTyp
*** 1143,1152 ****
  	    TyTy::BaseType *fo = type.get_field (i);
  
  	    TyTy::BaseType *unified_ty
! 	      = UnifyRules::Resolve (TyTy::TyWithLocation (bo),
! 				     TyTy::TyWithLocation (fo), locus,
! 				     commit_flag, false /* emit_errors */,
! 				     infer_flag, commits, infers);
  	    if (unified_ty->get_kind () == TyTy::TypeKind::ERROR)
  	      return new TyTy::ErrorType (0);
  
--- 1218,1225 ----
  	    TyTy::BaseType *fo = type.get_field (i);
  
  	    TyTy::BaseType *unified_ty
! 	      = resolve_subtype (TyTy::TyWithLocation (bo),
! 				 TyTy::TyWithLocation (fo));
  	    if (unified_ty->get_kind () == TyTy::TypeKind::ERROR)
  	      return new TyTy::ErrorType (0);
  
*************** UnifyRules::expect_tuple (TyTy::TupleTyp
*** 1180,1185 ****
--- 1253,1259 ----
      case TyTy::DYNAMIC:
      case TyTy::CLOSURE:
      case TyTy::OPAQUE:
+     case TyTy::CONST:
      case TyTy::ERROR:
        return new TyTy::ErrorType (0);
      }
*************** UnifyRules::expect_bool (TyTy::BoolType
*** 1191,1197 ****
  {
    switch (rtype->get_kind ())
      {
!       case TyTy::INFER: {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
--- 1265,1272 ----
  {
    switch (rtype->get_kind ())
      {
!     case TyTy::INFER:
!       {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
*************** UnifyRules::expect_bool (TyTy::BoolType
*** 1228,1233 ****
--- 1303,1309 ----
      case TyTy::DYNAMIC:
      case TyTy::CLOSURE:
      case TyTy::OPAQUE:
+     case TyTy::CONST:
      case TyTy::ERROR:
        return new TyTy::ErrorType (0);
      }
*************** UnifyRules::expect_char (TyTy::CharType
*** 1239,1245 ****
  {
    switch (rtype->get_kind ())
      {
!       case TyTy::INFER: {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
--- 1315,1322 ----
  {
    switch (rtype->get_kind ())
      {
!     case TyTy::INFER:
!       {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
*************** UnifyRules::expect_char (TyTy::CharType
*** 1276,1281 ****
--- 1353,1359 ----
      case TyTy::DYNAMIC:
      case TyTy::CLOSURE:
      case TyTy::OPAQUE:
+     case TyTy::CONST:
      case TyTy::ERROR:
        return new TyTy::ErrorType (0);
      }
*************** UnifyRules::expect_int (TyTy::IntType *l
*** 1287,1293 ****
  {
    switch (rtype->get_kind ())
      {
!       case TyTy::INFER: {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL
--- 1365,1372 ----
  {
    switch (rtype->get_kind ())
      {
!     case TyTy::INFER:
!       {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL
*************** UnifyRules::expect_int (TyTy::IntType *l
*** 1300,1306 ****
        }
        break;
  
!       case TyTy::INT: {
  	TyTy::IntType &type = *static_cast<TyTy::IntType *> (rtype);
  	bool is_valid = ltype->get_int_kind () == type.get_int_kind ();
  	if (is_valid)
--- 1379,1386 ----
        }
        break;
  
!     case TyTy::INT:
!       {
  	TyTy::IntType &type = *static_cast<TyTy::IntType *> (rtype);
  	bool is_valid = ltype->get_int_kind () == type.get_int_kind ();
  	if (is_valid)
*************** UnifyRules::expect_int (TyTy::IntType *l
*** 1331,1336 ****
--- 1411,1417 ----
      case TyTy::DYNAMIC:
      case TyTy::CLOSURE:
      case TyTy::OPAQUE:
+     case TyTy::CONST:
      case TyTy::ERROR:
        return new TyTy::ErrorType (0);
      }
*************** UnifyRules::expect_uint (TyTy::UintType
*** 1342,1348 ****
  {
    switch (rtype->get_kind ())
      {
!       case TyTy::INFER: {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL
--- 1423,1430 ----
  {
    switch (rtype->get_kind ())
      {
!     case TyTy::INFER:
!       {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL
*************** UnifyRules::expect_uint (TyTy::UintType
*** 1355,1361 ****
        }
        break;
  
!       case TyTy::UINT: {
  	TyTy::UintType &type = *static_cast<TyTy::UintType *> (rtype);
  	bool is_valid = ltype->get_uint_kind () == type.get_uint_kind ();
  	if (is_valid)
--- 1437,1444 ----
        }
        break;
  
!     case TyTy::UINT:
!       {
  	TyTy::UintType &type = *static_cast<TyTy::UintType *> (rtype);
  	bool is_valid = ltype->get_uint_kind () == type.get_uint_kind ();
  	if (is_valid)
*************** UnifyRules::expect_uint (TyTy::UintType
*** 1386,1391 ****
--- 1469,1475 ----
      case TyTy::DYNAMIC:
      case TyTy::CLOSURE:
      case TyTy::OPAQUE:
+     case TyTy::CONST:
      case TyTy::ERROR:
        return new TyTy::ErrorType (0);
      }
*************** UnifyRules::expect_float (TyTy::FloatTyp
*** 1397,1403 ****
  {
    switch (rtype->get_kind ())
      {
!       case TyTy::INFER: {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL
--- 1481,1488 ----
  {
    switch (rtype->get_kind ())
      {
!     case TyTy::INFER:
!       {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL
*************** UnifyRules::expect_float (TyTy::FloatTyp
*** 1410,1416 ****
        }
        break;
  
!       case TyTy::FLOAT: {
  	TyTy::FloatType &type = *static_cast<TyTy::FloatType *> (rtype);
  	bool is_valid = ltype->get_float_kind () == type.get_float_kind ();
  	if (is_valid)
--- 1495,1502 ----
        }
        break;
  
!     case TyTy::FLOAT:
!       {
  	TyTy::FloatType &type = *static_cast<TyTy::FloatType *> (rtype);
  	bool is_valid = ltype->get_float_kind () == type.get_float_kind ();
  	if (is_valid)
*************** UnifyRules::expect_float (TyTy::FloatTyp
*** 1441,1446 ****
--- 1527,1533 ----
      case TyTy::DYNAMIC:
      case TyTy::CLOSURE:
      case TyTy::OPAQUE:
+     case TyTy::CONST:
      case TyTy::ERROR:
        return new TyTy::ErrorType (0);
      }
*************** UnifyRules::expect_isize (TyTy::ISizeTyp
*** 1452,1458 ****
  {
    switch (rtype->get_kind ())
      {
!       case TyTy::INFER: {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () != TyTy::InferType::InferTypeKind::FLOAT;
--- 1539,1546 ----
  {
    switch (rtype->get_kind ())
      {
!     case TyTy::INFER:
!       {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () != TyTy::InferType::InferTypeKind::FLOAT;
*************** UnifyRules::expect_isize (TyTy::ISizeTyp
*** 1489,1494 ****
--- 1577,1583 ----
      case TyTy::DYNAMIC:
      case TyTy::CLOSURE:
      case TyTy::OPAQUE:
+     case TyTy::CONST:
      case TyTy::ERROR:
        return new TyTy::ErrorType (0);
      }
*************** UnifyRules::expect_usize (TyTy::USizeTyp
*** 1500,1506 ****
  {
    switch (rtype->get_kind ())
      {
!       case TyTy::INFER: {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () != TyTy::InferType::InferTypeKind::FLOAT;
--- 1589,1596 ----
  {
    switch (rtype->get_kind ())
      {
!     case TyTy::INFER:
!       {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () != TyTy::InferType::InferTypeKind::FLOAT;
*************** UnifyRules::expect_usize (TyTy::USizeTyp
*** 1537,1542 ****
--- 1627,1633 ----
      case TyTy::DYNAMIC:
      case TyTy::CLOSURE:
      case TyTy::OPAQUE:
+     case TyTy::CONST:
      case TyTy::ERROR:
        return new TyTy::ErrorType (0);
      }
*************** UnifyRules::expect_never (TyTy::NeverTyp
*** 1548,1554 ****
  {
    switch (rtype->get_kind ())
      {
!       case TyTy::INFER: {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
--- 1639,1646 ----
  {
    switch (rtype->get_kind ())
      {
!     case TyTy::INFER:
!       {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
*************** UnifyRules::expect_placeholder (TyTy::Pl
*** 1569,1575 ****
  {
    switch (rtype->get_kind ())
      {
!       case TyTy::INFER: {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
--- 1661,1668 ----
  {
    switch (rtype->get_kind ())
      {
!     case TyTy::INFER:
!       {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
*************** UnifyRules::expect_placeholder (TyTy::Pl
*** 1607,1612 ****
--- 1700,1706 ----
  	return rtype->clone ();
        gcc_fallthrough ();
  
+     case TyTy::CONST:
      case TyTy::ERROR:
        return new TyTy::ErrorType (0);
      }
*************** UnifyRules::expect_projection (TyTy::Pro
*** 1619,1625 ****
  {
    switch (rtype->get_kind ())
      {
!       case TyTy::INFER: {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
--- 1713,1720 ----
  {
    switch (rtype->get_kind ())
      {
!     case TyTy::INFER:
!       {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
*************** UnifyRules::expect_projection (TyTy::Pro
*** 1655,1660 ****
--- 1750,1756 ----
      case TyTy::NEVER:
      case TyTy::PLACEHOLDER:
      case TyTy::OPAQUE:
+     case TyTy::CONST:
      case TyTy::ERROR:
        return new TyTy::ErrorType (0);
      }
*************** UnifyRules::expect_dyn (TyTy::DynamicObj
*** 1666,1672 ****
  {
    switch (rtype->get_kind ())
      {
!       case TyTy::INFER: {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
--- 1762,1769 ----
  {
    switch (rtype->get_kind ())
      {
!     case TyTy::INFER:
!       {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
*************** UnifyRules::expect_dyn (TyTy::DynamicObj
*** 1675,1681 ****
        }
        break;
  
!       case TyTy::DYNAMIC: {
  	TyTy::DynamicObjectType &type
  	  = *static_cast<TyTy::DynamicObjectType *> (rtype);
  	if (ltype->num_specified_bounds () != type.num_specified_bounds ())
--- 1772,1779 ----
        }
        break;
  
!     case TyTy::DYNAMIC:
!       {
  	TyTy::DynamicObjectType &type
  	  = *static_cast<TyTy::DynamicObjectType *> (rtype);
  	if (ltype->num_specified_bounds () != type.num_specified_bounds ())
*************** UnifyRules::expect_dyn (TyTy::DynamicObj
*** 1714,1719 ****
--- 1812,1818 ----
      case TyTy::PLACEHOLDER:
      case TyTy::PROJECTION:
      case TyTy::OPAQUE:
+     case TyTy::CONST:
      case TyTy::ERROR:
        return new TyTy::ErrorType (0);
      }
*************** UnifyRules::expect_closure (TyTy::Closur
*** 1725,1731 ****
  {
    switch (rtype->get_kind ())
      {
!       case TyTy::INFER: {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
--- 1824,1831 ----
  {
    switch (rtype->get_kind ())
      {
!     case TyTy::INFER:
!       {
  	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
  	bool is_valid
  	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
*************** UnifyRules::expect_closure (TyTy::Closur
*** 1734,1759 ****
        }
        break;
  
!       case TyTy::CLOSURE: {
  	TyTy::ClosureType &type = *static_cast<TyTy::ClosureType *> (rtype);
  	if (ltype->get_def_id () != type.get_def_id ())
  	  {
  	    return new TyTy::ErrorType (0);
  	  }
  
! 	TyTy::BaseType *args_res = UnifyRules::Resolve (
! 	  TyTy::TyWithLocation (&ltype->get_parameters ()),
! 	  TyTy::TyWithLocation (&type.get_parameters ()), locus, commit_flag,
! 	  false /* emit_error */, infer_flag, commits, infers);
  	if (args_res->get_kind () == TyTy::TypeKind::ERROR)
  	  {
  	    return new TyTy::ErrorType (0);
  	  }
  
! 	TyTy::BaseType *res = UnifyRules::Resolve (
! 	  TyTy::TyWithLocation (&ltype->get_result_type ()),
! 	  TyTy::TyWithLocation (&type.get_result_type ()), locus, commit_flag,
! 	  false /* emit_error */, infer_flag, commits, infers);
  	if (res == nullptr || res->get_kind () == TyTy::TypeKind::ERROR)
  	  {
  	    return new TyTy::ErrorType (0);
--- 1834,1858 ----
        }
        break;
  
!     case TyTy::CLOSURE:
!       {
  	TyTy::ClosureType &type = *static_cast<TyTy::ClosureType *> (rtype);
  	if (ltype->get_def_id () != type.get_def_id ())
  	  {
  	    return new TyTy::ErrorType (0);
  	  }
  
! 	TyTy::BaseType *args_res
! 	  = resolve_subtype (TyTy::TyWithLocation (&ltype->get_parameters ()),
! 			     TyTy::TyWithLocation (&type.get_parameters ()));
  	if (args_res->get_kind () == TyTy::TypeKind::ERROR)
  	  {
  	    return new TyTy::ErrorType (0);
  	  }
  
! 	TyTy::BaseType *res
! 	  = resolve_subtype (TyTy::TyWithLocation (&ltype->get_result_type ()),
! 			     TyTy::TyWithLocation (&type.get_result_type ()));
  	if (res == nullptr || res->get_kind () == TyTy::TypeKind::ERROR)
  	  {
  	    return new TyTy::ErrorType (0);
*************** UnifyRules::expect_closure (TyTy::Closur
*** 1785,1790 ****
--- 1884,1890 ----
      case TyTy::PROJECTION:
      case TyTy::DYNAMIC:
      case TyTy::OPAQUE:
+     case TyTy::CONST:
      case TyTy::ERROR:
        return new TyTy::ErrorType (0);
      }
*************** UnifyRules::expect_closure (TyTy::Closur
*** 1794,1851 ****
  TyTy::BaseType *
  UnifyRules::expect_opaque (TyTy::OpaqueType *ltype, TyTy::BaseType *rtype)
  {
!   switch (rtype->get_kind ())
      {
!       case TyTy::INFER: {
! 	TyTy::InferType *r = static_cast<TyTy::InferType *> (rtype);
! 	bool is_valid
! 	  = r->get_infer_kind () == TyTy::InferType::InferTypeKind::GENERAL;
! 	if (is_valid)
! 	  return ltype->clone ();
!       }
!       break;
  
!       case TyTy::OPAQUE: {
! 	auto &type = *static_cast<TyTy::OpaqueType *> (rtype);
! 	if (ltype->num_specified_bounds () != type.num_specified_bounds ())
! 	  {
! 	    return new TyTy::ErrorType (0);
! 	  }
  
! 	if (!ltype->bounds_compatible (type, locus, true))
! 	  {
  	    return new TyTy::ErrorType (0);
! 	  }
  
! 	return ltype->clone ();
!       }
!       break;
  
-     case TyTy::CLOSURE:
-     case TyTy::SLICE:
-     case TyTy::PARAM:
-     case TyTy::POINTER:
-     case TyTy::STR:
-     case TyTy::ADT:
-     case TyTy::REF:
-     case TyTy::ARRAY:
-     case TyTy::FNDEF:
-     case TyTy::FNPTR:
-     case TyTy::TUPLE:
-     case TyTy::BOOL:
-     case TyTy::CHAR:
-     case TyTy::INT:
-     case TyTy::UINT:
-     case TyTy::FLOAT:
-     case TyTy::USIZE:
-     case TyTy::ISIZE:
-     case TyTy::NEVER:
-     case TyTy::PLACEHOLDER:
-     case TyTy::PROJECTION:
-     case TyTy::DYNAMIC:
-     case TyTy::ERROR:
        return new TyTy::ErrorType (0);
      }
    return new TyTy::ErrorType (0);
  }
  
--- 1894,2006 ----
  TyTy::BaseType *
  UnifyRules::expect_opaque (TyTy::OpaqueType *ltype, TyTy::BaseType *rtype)
  {
!   if (rtype->is<TyTy::OpaqueType> ())
      {
!       TyTy::OpaqueType *ro = rtype->as<TyTy::OpaqueType> ();
!       if (!ltype->is_equal (*ro))
! 	return new TyTy::ErrorType (0);
  
!       if (ltype->can_resolve () && ro->can_resolve ())
! 	{
! 	  auto lr = ltype->resolve ();
! 	  auto rr = ro->resolve ();
  
! 	  auto res = resolve_subtype (TyTy::TyWithLocation (lr),
! 				      TyTy::TyWithLocation (rr));
! 	  if (res->get_kind () == TyTy::TypeKind::ERROR)
  	    return new TyTy::ErrorType (0);
! 	}
!       else if (ltype->can_resolve ())
! 	{
! 	  auto lr = ltype->resolve ();
! 	  ro->set_ty_ref (lr->get_ref ());
! 	}
!       else if (ro->can_resolve ())
! 	{
! 	  auto rr = ro->resolve ();
! 	  ltype->set_ty_ref (rr->get_ref ());
! 	}
!     }
!   else if (ltype->can_resolve ())
!     {
!       auto underly = ltype->resolve ();
!       auto res = resolve_subtype (TyTy::TyWithLocation (underly),
! 				  TyTy::TyWithLocation (rtype));
!       if (res->get_kind () == TyTy::TypeKind::ERROR)
! 	return new TyTy::ErrorType (0);
!     }
!   else
!     {
!       ltype->set_ty_ref (rtype->get_ref ());
!     }
  
!   return ltype;
! }
! 
! TyTy::BaseType *
! UnifyRules::expect_const (TyTy::ConstType *ltype, TyTy::BaseType *rtype)
! {
!   if (rtype->get_kind () != TyTy::TypeKind::CONST)
!     return new TyTy::ErrorType (0);
! 
!   TyTy::ConstType &lhs = *ltype;
!   TyTy::ConstType &rhs = *static_cast<TyTy::ConstType *> (rtype);
! 
!   auto res = resolve_subtype (TyTy::TyWithLocation (lhs.get_ty ()),
! 			      TyTy::TyWithLocation (rhs.get_ty ()));
!   if (res->get_kind () == TyTy::TypeKind::ERROR)
!     return new TyTy::ErrorType (0);
! 
!   tree lv = lhs.get_value ();
!   tree rv = rhs.get_value ();
! 
!   if (error_operand_p (lv) && error_operand_p (rv))
!     {
!       // this is only allowed for some silly senarios like:
!       // gcc/testsuite/rust/compile/issue-const_generics_5.rs
!       if (lhs.get_const_kind () == rhs.get_const_kind ())
! 	{
! 	  return new TyTy::ConstType (lhs.get_const_kind (), lhs.get_symbol (),
! 				      res, error_mark_node,
! 				      lhs.get_specified_bounds (),
! 				      lhs.get_locus (), lhs.get_ref (),
! 				      lhs.get_ty_ref (),
! 				      lhs.get_combined_refs ());
! 	}
  
        return new TyTy::ErrorType (0);
      }
+ 
+   bool equal = operand_equal_p (lv, rv, 0);
+   if (equal)
+     {
+       return new TyTy::ConstType (TyTy::ConstType::ConstKind::Value,
+ 				  lhs.get_symbol (), res, lv,
+ 				  lhs.get_specified_bounds (), lhs.get_locus (),
+ 				  lhs.get_ref (), lhs.get_ty_ref (),
+ 				  lhs.get_combined_refs ());
+     }
+ 
+   if (lhs.get_const_kind () == TyTy::ConstType::Infer && !error_operand_p (rv))
+     {
+       lhs.set_value (rv);
+       return new TyTy::ConstType (TyTy::ConstType::ConstKind::Value,
+ 				  lhs.get_symbol (), res, rv,
+ 				  lhs.get_specified_bounds (), lhs.get_locus (),
+ 				  lhs.get_ref (), lhs.get_ty_ref (),
+ 				  lhs.get_combined_refs ());
+     }
+   else if (rhs.get_const_kind () == TyTy::ConstType::Infer
+ 	   && !error_operand_p (lv))
+     {
+       rhs.set_value (lv);
+       return new TyTy::ConstType (TyTy::ConstType::ConstKind::Value,
+ 				  rhs.get_symbol (), res, lv,
+ 				  rhs.get_specified_bounds (), rhs.get_locus (),
+ 				  rhs.get_ref (), rhs.get_ty_ref (),
+ 				  rhs.get_combined_refs ());
+     }
+ 
    return new TyTy::ErrorType (0);
  }
  
diff -Nrcpad gcc-16-20250803/gcc/rust/typecheck/rust-unify.h gcc-16-20250810/gcc/rust/typecheck/rust-unify.h
*** gcc-16-20250803/gcc/rust/typecheck/rust-unify.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/typecheck/rust-unify.h	Sun Aug 10 22:32:08 2025
*************** protected:
*** 84,89 ****
--- 84,90 ----
  				  TyTy::BaseType *rtype);
    TyTy::BaseType *expect_opaque (TyTy::OpaqueType *ltype,
  				 TyTy::BaseType *rtype);
+   TyTy::BaseType *expect_const (TyTy::ConstType *ltype, TyTy::BaseType *rtype);
  
  private:
    UnifyRules (TyTy::TyWithLocation lhs, TyTy::TyWithLocation rhs,
*************** private:
*** 91,96 ****
--- 92,100 ----
  	      std::vector<CommitSite> &commits,
  	      std::vector<InferenceSite> &infers);
  
+   TyTy::BaseType *resolve_subtype (TyTy::TyWithLocation lhs,
+ 				   TyTy::TyWithLocation rhs);
+ 
    void emit_type_mismatch () const;
    void emit_abi_mismatch (const TyTy::FnType &expected,
  			  const TyTy::FnType &got) const;
diff -Nrcpad gcc-16-20250803/gcc/rust/util/optional.h gcc-16-20250810/gcc/rust/util/optional.h
*** gcc-16-20250803/gcc/rust/util/optional.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/util/optional.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 1364,1370 ****
        this->m_has_value = false;
      }
    }
! }; // namespace tl
  
  /// Compares two optional objects
  template <class T, class U>
--- 1364,1370 ----
        this->m_has_value = false;
      }
    }
! };
  
  /// Compares two optional objects
  template <class T, class U>
*************** public:
*** 2110,2116 ****
  
  private:
    T *m_value;
! }; // namespace tl
  
  
  
--- 2110,2116 ----
  
  private:
    T *m_value;
! };
  
  
  
*************** template <class T> struct hash<tl::optio
*** 2128,2131 ****
  };
  } // namespace std
  
! #endif
\ No newline at end of file
--- 2128,2131 ----
  };
  } // namespace std
  
! #endif
diff -Nrcpad gcc-16-20250803/gcc/rust/util/rust-abi.h gcc-16-20250810/gcc/rust/util/rust-abi.h
*** gcc-16-20250803/gcc/rust/util/rust-abi.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/util/rust-abi.h	Sun Aug 10 22:32:08 2025
*************** enum ABI
*** 34,44 ****
    SYSV64
  };
  
! extern Rust::ABI
! get_abi_from_string (const std::string &abi);
  
! extern std::string
! get_string_from_abi (Rust::ABI abi);
  
  } // namespace Rust
  
--- 34,42 ----
    SYSV64
  };
  
! extern Rust::ABI get_abi_from_string (const std::string &abi);
  
! extern std::string get_string_from_abi (Rust::ABI abi);
  
  } // namespace Rust
  
diff -Nrcpad gcc-16-20250803/gcc/rust/util/rust-attribute-values.h gcc-16-20250810/gcc/rust/util/rust-attribute-values.h
*** gcc-16-20250803/gcc/rust/util/rust-attribute-values.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/util/rust-attribute-values.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 85,90 ****
--- 85,97 ----
    static constexpr auto &NON_EXHAUSTIVE = "non_exhaustive";
  
    static constexpr auto &RUSTFMT = "rustfmt";
+ 
+   static constexpr auto &TEST = "test";
+ 
+   static constexpr auto &SIMD_TEST = "simd_test";
+ 
+   static constexpr auto &RUSTC_ARGS_REQUIRED_CONST
+     = "rustc_args_required_const";
  };
  } // namespace Values
  } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/util/rust-attributes.cc gcc-16-20250810/gcc/rust/util/rust-attributes.cc
*** gcc-16-20250803/gcc/rust/util/rust-attributes.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/util/rust-attributes.cc	Sun Aug 10 22:32:08 2025
*************** static const BuiltinAttrDefinition __def
*** 88,93 ****
--- 88,96 ----
  
       {Attrs::RUSTC_LAYOUT_SCALAR_VALID_RANGE_START, CODE_GENERATION},
  
+      // TODO: be careful about calling functions marked with this?
+      {Attrs::RUSTC_ARGS_REQUIRED_CONST, CODE_GENERATION},
+ 
       {Attrs::PRELUDE_IMPORT, NAME_RESOLUTION},
  
       {Attrs::RUSTC_DIAGNOSTIC_ITEM, STATIC_ANALYSIS},
*************** static const BuiltinAttrDefinition __def
*** 95,101 ****
  
       {Attrs::FUNDAMENTAL, TYPE_CHECK},
       {Attrs::NON_EXHAUSTIVE, TYPE_CHECK},
!      {Attrs::RUSTFMT, EXTERNAL}};
  
  BuiltinAttributeMappings *
  BuiltinAttributeMappings::get ()
--- 98,107 ----
  
       {Attrs::FUNDAMENTAL, TYPE_CHECK},
       {Attrs::NON_EXHAUSTIVE, TYPE_CHECK},
!      {Attrs::RUSTFMT, EXTERNAL},
! 
!      {Attrs::TEST, CODE_GENERATION},
!      {Attrs::SIMD_TEST, CODE_GENERATION}};
  
  BuiltinAttributeMappings *
  BuiltinAttributeMappings::get ()
*************** check_doc_attribute (const AST::Attribut
*** 221,227 ****
        break;
        // FIXME: Handle them as well
  
!       case AST::AttrInput::TOKEN_TREE: {
  	// FIXME: This doesn't check for #[doc(alias(...))]
  	const auto &option = static_cast<const AST::DelimTokenTree &> (
  	  attribute.get_attr_input ());
--- 227,234 ----
        break;
        // FIXME: Handle them as well
  
!     case AST::AttrInput::TOKEN_TREE:
!       {
  	// FIXME: This doesn't check for #[doc(alias(...))]
  	const auto &option = static_cast<const AST::DelimTokenTree &> (
  	  attribute.get_attr_input ());
*************** AttributeChecker::visit (AST::MetaItemLi
*** 388,394 ****
  {}
  
  void
! AttributeChecker::visit (AST::MetaItemPathLit &)
  {}
  
  void
--- 395,401 ----
  {}
  
  void
! AttributeChecker::visit (AST::MetaItemPathExpr &)
  {}
  
  void
diff -Nrcpad gcc-16-20250803/gcc/rust/util/rust-attributes.h gcc-16-20250810/gcc/rust/util/rust-attributes.h
*** gcc-16-20250803/gcc/rust/util/rust-attributes.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/util/rust-attributes.h	Sun Aug 10 22:32:08 2025
*************** private:
*** 130,136 ****
    void visit (AST::AttrInputLiteral &attr_input) override;
    void visit (AST::AttrInputMacro &attr_input) override;
    void visit (AST::MetaItemLitExpr &meta_item) override;
!   void visit (AST::MetaItemPathLit &meta_item) override;
    void visit (AST::BorrowExpr &expr) override;
    void visit (AST::DereferenceExpr &expr) override;
    void visit (AST::ErrorPropagationExpr &expr) override;
--- 130,136 ----
    void visit (AST::AttrInputLiteral &attr_input) override;
    void visit (AST::AttrInputMacro &attr_input) override;
    void visit (AST::MetaItemLitExpr &meta_item) override;
!   void visit (AST::MetaItemPathExpr &meta_item) override;
    void visit (AST::BorrowExpr &expr) override;
    void visit (AST::DereferenceExpr &expr) override;
    void visit (AST::ErrorPropagationExpr &expr) override;
diff -Nrcpad gcc-16-20250803/gcc/rust/util/rust-base62.h gcc-16-20250810/gcc/rust/util/rust-base62.h
*** gcc-16-20250803/gcc/rust/util/rust-base62.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/util/rust-base62.h	Sun Aug 10 22:32:08 2025
*************** namespace Rust {
*** 26,33 ****
  /**
   * Get the Base62 representation of an integer
   */
! std::string
! base62_integer (uint64_t value);
  
  } // namespace Rust
  
--- 26,32 ----
  /**
   * Get the Base62 representation of an integer
   */
! std::string base62_integer (uint64_t value);
  
  } // namespace Rust
  
diff -Nrcpad gcc-16-20250803/gcc/rust/util/rust-canonical-path.h gcc-16-20250810/gcc/rust/util/rust-canonical-path.h
*** gcc-16-20250803/gcc/rust/util/rust-canonical-path.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/util/rust-canonical-path.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 57,66 ****
      return *this;
    }
  
!   static CanonicalPath new_seg (NodeId id, const std::string &path)
    {
      rust_assert (!path.empty ());
!     return CanonicalPath ({std::pair<NodeId, std::string> (id, path)},
  			  UNKNOWN_CRATENUM);
    }
  
--- 57,67 ----
      return *this;
    }
  
!   static CanonicalPath new_seg (NodeId id, std::string path)
    {
      rust_assert (!path.empty ());
!     return CanonicalPath ({std::pair<NodeId, std::string> (id,
! 							   std::move (path))},
  			  UNKNOWN_CRATENUM);
    }
  
*************** public:
*** 68,81 ****
    trait_impl_projection_seg (NodeId id, const CanonicalPath &trait_seg,
  			     const CanonicalPath &impl_type_seg)
    {
!     return CanonicalPath::new_seg (id, "<" + impl_type_seg.get () + " as "
  					 + trait_seg.get () + ">");
    }
  
    static CanonicalPath inherent_impl_seg (NodeId id,
  					  const CanonicalPath &impl_type_seg)
    {
!     return CanonicalPath::new_seg (id, "<" + impl_type_seg.get () + ">");
    }
  
    std::string get () const
--- 69,86 ----
    trait_impl_projection_seg (NodeId id, const CanonicalPath &trait_seg,
  			     const CanonicalPath &impl_type_seg)
    {
!     // https://doc.rust-lang.org/reference/paths.html#canonical-paths
!     // should be "<X>"?
!     return CanonicalPath::new_seg (id, "<impl " + impl_type_seg.get () + " as "
  					 + trait_seg.get () + ">");
    }
  
    static CanonicalPath inherent_impl_seg (NodeId id,
  					  const CanonicalPath &impl_type_seg)
    {
!     // https://doc.rust-lang.org/reference/paths.html#canonical-paths
!     // should be "<X as Y>"?
!     return CanonicalPath::new_seg (id, "<impl " + impl_type_seg.get () + ">");
    }
  
    std::string get () const
diff -Nrcpad gcc-16-20250803/gcc/rust/util/rust-dir-owner.h gcc-16-20250810/gcc/rust/util/rust-dir-owner.h
*** gcc-16-20250803/gcc/rust/util/rust-dir-owner.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/util/rust-dir-owner.h	Sun Aug 10 22:32:08 2025
***************
*** 26,33 ****
  namespace Rust {
  
  // extracts the owned subdirectory name from a file name
! bool
! get_file_subdir (const std::string &filename, std::string &subdir);
  
  } // namespace Rust
  
--- 26,32 ----
  namespace Rust {
  
  // extracts the owned subdirectory name from a file name
! bool get_file_subdir (const std::string &filename, std::string &subdir);
  
  } // namespace Rust
  
diff -Nrcpad gcc-16-20250803/gcc/rust/util/rust-edition.h gcc-16-20250810/gcc/rust/util/rust-edition.h
*** gcc-16-20250803/gcc/rust/util/rust-edition.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/util/rust-edition.h	Sun Aug 10 22:32:08 2025
*************** enum class Edition
*** 33,40 ****
    E2021
  };
  
! Edition
! get_rust_edition ();
  
  } // namespace Rust
  
--- 33,39 ----
    E2021
  };
  
! Edition get_rust_edition ();
  
  } // namespace Rust
  
diff -Nrcpad gcc-16-20250803/gcc/rust/util/rust-ggc.cc gcc-16-20250810/gcc/rust/util/rust-ggc.cc
*** gcc-16-20250803/gcc/rust/util/rust-ggc.cc	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/rust/util/rust-ggc.cc	Sun Aug 10 22:32:08 2025
***************
*** 0 ****
--- 1,41 ----
+ // Copyright (C) 2025 Free Software Foundation, Inc.
+ 
+ // This file is part of GCC.
+ 
+ // GCC is free software; you can redistribute it and/or modify it under
+ // the terms of the GNU General Public License as published by the Free
+ // Software Foundation; either version 3, or (at your option) any later
+ // version.
+ 
+ // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ // WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ // for more details.
+ 
+ // You should have received a copy of the GNU General Public License
+ // along with GCC; see the file COPYING3.  If not see
+ // <http://www.gnu.org/licenses/>.
+ 
+ #include "rust-ggc.h"
+ #include "stringpool.h"
+ 
+ namespace Rust {
+ 
+ namespace GGC {
+ 
+ Ident::Ident (const char *str) : inner (get_identifier (str)) {}
+ 
+ Ident::Ident (const std::string &str)
+   : inner (get_identifier_with_length (str.c_str (), str.length ()))
+ {}
+ 
+ bool
+ Ident::operator== (const std::string &other) const
+ {
+   // maybe_get_identifier_with_length doesn't seem to exist
+   return maybe_get_identifier (other.c_str ()) == inner;
+ }
+ 
+ } // namespace GGC
+ 
+ } // namespace Rust
diff -Nrcpad gcc-16-20250803/gcc/rust/util/rust-ggc.h gcc-16-20250810/gcc/rust/util/rust-ggc.h
*** gcc-16-20250803/gcc/rust/util/rust-ggc.h	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/rust/util/rust-ggc.h	Sun Aug 10 22:32:08 2025
***************
*** 0 ****
--- 1,63 ----
+ // Copyright (C) 2025 Free Software Foundation, Inc.
+ 
+ // This file is part of GCC.
+ 
+ // GCC is free software; you can redistribute it and/or modify it under
+ // the terms of the GNU General Public License as published by the Free
+ // Software Foundation; either version 3, or (at your option) any later
+ // version.
+ 
+ // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+ // WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ // for more details.
+ 
+ // You should have received a copy of the GNU General Public License
+ // along with GCC; see the file COPYING3.  If not see
+ // <http://www.gnu.org/licenses/>.
+ 
+ #ifndef RUST_GGC_H
+ #define RUST_GGC_H
+ 
+ #include "rust-system.h"
+ #include "tree.h"
+ 
+ namespace Rust {
+ 
+ namespace GGC {
+ 
+ class Ident
+ {
+   tree inner;
+ 
+ public:
+   Ident (const char *str);
+   Ident (const std::string &str);
+ 
+   bool operator== (const Ident &other) const { return inner == other.inner; }
+   bool operator== (const std::string &other) const;
+ 
+   const char *c_str () const { return IDENTIFIER_POINTER (inner); }
+   size_t size () const { return IDENTIFIER_LENGTH (inner); }
+ 
+   bool empty () const { return !size (); }
+ 
+   std::string as_string () const
+   {
+     return std::string (c_str (), c_str () + size ());
+   }
+ 
+   tree as_tree () const { return inner; }
+ };
+ 
+ static inline bool
+ operator== (const std::string &a, const Ident &b)
+ {
+   return b == a;
+ }
+ 
+ } // namespace GGC
+ 
+ } // namespace Rust
+ 
+ #endif // RUST_GGC_H
diff -Nrcpad gcc-16-20250803/gcc/rust/util/rust-hir-map.cc gcc-16-20250810/gcc/rust/util/rust-hir-map.cc
*** gcc-16-20250803/gcc/rust/util/rust-hir-map.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/util/rust-hir-map.cc	Sun Aug 10 22:32:08 2025
*************** Mappings::lookup_module_children (NodeId
*** 1148,1164 ****
  }
  
  void
! Mappings::insert_ast_module (AST::Module *module)
  {
!   rust_assert (modules.find (module->get_node_id ()) == modules.end ());
!   modules[module->get_node_id ()] = module;
  }
  
! tl::optional<AST::Module *>
! Mappings::lookup_ast_module (NodeId id)
  {
!   auto it = modules.find (id);
!   if (it == modules.end ())
      return tl::nullopt;
  
    return {it->second};
--- 1148,1166 ----
  }
  
  void
! Mappings::insert_glob_container (AST::Item *container)
  {
!   rust_assert (glob_containers.find (container->get_node_id ())
! 	       == glob_containers.end ());
! 
!   glob_containers[container->get_node_id ()] = container;
  }
  
! tl::optional<AST::Item *>
! Mappings::lookup_glob_container (NodeId id)
  {
!   auto it = glob_containers.find (id);
!   if (it == glob_containers.end ())
      return tl::nullopt;
  
    return {it->second};
diff -Nrcpad gcc-16-20250803/gcc/rust/util/rust-hir-map.h gcc-16-20250810/gcc/rust/util/rust-hir-map.h
*** gcc-16-20250803/gcc/rust/util/rust-hir-map.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/util/rust-hir-map.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 321,328 ****
    void insert_visibility (NodeId id, Privacy::ModuleVisibility visibility);
    tl::optional<Privacy::ModuleVisibility &> lookup_visibility (NodeId id);
  
!   void insert_ast_module (AST::Module *);
!   tl::optional<AST::Module *> lookup_ast_module (NodeId id);
    void insert_module_child (NodeId module, NodeId child);
    tl::optional<std::vector<NodeId> &> lookup_module_children (NodeId module);
  
--- 321,328 ----
    void insert_visibility (NodeId id, Privacy::ModuleVisibility visibility);
    tl::optional<Privacy::ModuleVisibility &> lookup_visibility (NodeId id);
  
!   void insert_glob_container (AST::Item *);
!   tl::optional<AST::Item *> lookup_glob_container (NodeId id);
    void insert_module_child (NodeId module, NodeId child);
    tl::optional<std::vector<NodeId> &> lookup_module_children (NodeId module);
  
*************** private:
*** 436,442 ****
    std::map<NodeId, std::vector<NodeId>> module_child_map;
    std::map<NodeId, std::vector<Resolver::CanonicalPath>> module_child_items;
    std::map<NodeId, NodeId> child_to_parent_module_map;
!   std::map<NodeId, AST::Module *> modules;
  
    // AST mappings
    std::map<NodeId, AST::Item *> ast_item_mappings;
--- 436,442 ----
    std::map<NodeId, std::vector<NodeId>> module_child_map;
    std::map<NodeId, std::vector<Resolver::CanonicalPath>> module_child_items;
    std::map<NodeId, NodeId> child_to_parent_module_map;
!   std::map<NodeId, AST::Item *> glob_containers;
  
    // AST mappings
    std::map<NodeId, AST::Item *> ast_item_mappings;
diff -Nrcpad gcc-16-20250803/gcc/rust/util/rust-punycode.h gcc-16-20250810/gcc/rust/util/rust-punycode.h
*** gcc-16-20250803/gcc/rust/util/rust-punycode.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/util/rust-punycode.h	Sun Aug 10 22:32:08 2025
*************** namespace Rust {
*** 27,34 ****
  /* Encode a string as punycode. Returns a string if encoding is successful.
   * Returns nullopt otherwise. Note that a returned string contains only ASCII
   * characters and does not start with `xn--`. */
! tl::optional<std::string>
! encode_punycode (const Utf8String &src);
  
  } // namespace Rust
  
--- 27,33 ----
  /* Encode a string as punycode. Returns a string if encoding is successful.
   * Returns nullopt otherwise. Note that a returned string contains only ASCII
   * characters and does not start with `xn--`. */
! tl::optional<std::string> encode_punycode (const Utf8String &src);
  
  } // namespace Rust
  
*************** encode_punycode (const Utf8String &src);
*** 36,43 ****
  
  namespace selftest {
  
! void
! rust_punycode_encode_test ();
  
  } // namespace selftest
  
--- 35,41 ----
  
  namespace selftest {
  
! void rust_punycode_encode_test ();
  
  } // namespace selftest
  
diff -Nrcpad gcc-16-20250803/gcc/rust/util/rust-token-converter.cc gcc-16-20250810/gcc/rust/util/rust-token-converter.cc
*** gcc-16-20250803/gcc/rust/util/rust-token-converter.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/util/rust-token-converter.cc	Sun Aug 10 22:32:08 2025
*************** convert (const std::vector<const_TokenPt
*** 202,208 ****
  	case PERCENT_EQ:
  	case SCOPE_RESOLUTION:
  	case NOT_EQUAL:
! 	  case EQUAL_EQUAL: {
  	    auto str = token->as_string ();
  	    auto it = str.cbegin ();
  	    for (; it != str.cend () - 1; it++)
--- 202,209 ----
  	case PERCENT_EQ:
  	case SCOPE_RESOLUTION:
  	case NOT_EQUAL:
! 	case EQUAL_EQUAL:
! 	  {
  	    auto str = token->as_string ();
  	    auto it = str.cbegin ();
  	    for (; it != str.cend () - 1; it++)
*************** convert (const std::vector<const_TokenPt
*** 260,268 ****
    return trees.back ();
  }
  
! static void
! from_tokenstream (const ProcMacro::TokenStream &ts,
! 		  std::vector<const_TokenPtr> &result);
  
  /**
   * Append the token corresponding to a given Ident to a vector.
--- 261,268 ----
    return trees.back ();
  }
  
! static void from_tokenstream (const ProcMacro::TokenStream &ts,
! 			      std::vector<const_TokenPtr> &result);
  
  /**
   * Append the token corresponding to a given Ident to a vector.
diff -Nrcpad gcc-16-20250803/gcc/rust/util/rust-token-converter.h gcc-16-20250810/gcc/rust/util/rust-token-converter.h
*** gcc-16-20250803/gcc/rust/util/rust-token-converter.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/util/rust-token-converter.h	Sun Aug 10 22:32:08 2025
***************
*** 23,36 ****
  
  namespace Rust {
  
! ProcMacro::TokenStream
! convert (const std::vector<const_TokenPtr> &tokens);
  
! std::vector<const_TokenPtr>
! convert (const ProcMacro::TokenStream &ts);
  
! ProcMacro::Literal
! convert_literal (const_TokenPtr lit);
  
  } // namespace Rust
  
--- 23,33 ----
  
  namespace Rust {
  
! ProcMacro::TokenStream convert (const std::vector<const_TokenPtr> &tokens);
  
! std::vector<const_TokenPtr> convert (const ProcMacro::TokenStream &ts);
  
! ProcMacro::Literal convert_literal (const_TokenPtr lit);
  
  } // namespace Rust
  
diff -Nrcpad gcc-16-20250803/gcc/rust/util/rust-unicode.h gcc-16-20250810/gcc/rust/util/rust-unicode.h
*** gcc-16-20250803/gcc/rust/util/rust-unicode.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/util/rust-unicode.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 59,78 ****
    Utf8String nfc_normalize () const;
  };
  
! bool
! is_alphabetic (uint32_t codepoint);
  
! bool
! is_ascii_only (const std::string &str);
  
! bool
! is_numeric (uint32_t codepoint);
  
! bool
! is_nfc_qc_no (uint32_t codepoint);
  
! bool
! is_nfc_qc_maybe (uint32_t codepoint);
  
  enum class QuickCheckResult
  {
--- 59,73 ----
    Utf8String nfc_normalize () const;
  };
  
! bool is_alphabetic (uint32_t codepoint);
  
! bool is_ascii_only (const std::string &str);
  
! bool is_numeric (uint32_t codepoint);
  
! bool is_nfc_qc_no (uint32_t codepoint);
  
! bool is_nfc_qc_maybe (uint32_t codepoint);
  
  enum class QuickCheckResult
  {
*************** enum class QuickCheckResult
*** 81,88 ****
    MAYBE
  };
  
! QuickCheckResult
! nfc_quick_check (const std::vector<Codepoint> &s);
  
  } // namespace Rust
  
--- 76,82 ----
    MAYBE
  };
  
! QuickCheckResult nfc_quick_check (const std::vector<Codepoint> &s);
  
  } // namespace Rust
  
*************** nfc_quick_check (const std::vector<Codep
*** 90,103 ****
  
  namespace selftest {
  
! void
! rust_nfc_qc_test ();
  
! void
! rust_utf8_normalize_test ();
  
! void
! rust_utf8_property_test ();
  
  } // namespace selftest
  
--- 84,94 ----
  
  namespace selftest {
  
! void rust_nfc_qc_test ();
  
! void rust_utf8_normalize_test ();
  
! void rust_utf8_property_test ();
  
  } // namespace selftest
  
diff -Nrcpad gcc-16-20250803/gcc/rust/util/rust-unwrap-segment.h gcc-16-20250810/gcc/rust/util/rust-unwrap-segment.h
*** gcc-16-20250803/gcc/rust/util/rust-unwrap-segment.h	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/rust/util/rust-unwrap-segment.h	Sun Aug 10 22:32:08 2025
*************** public:
*** 83,96 ****
  /*
   * Used to get the node id of a path segment object
   */
! NodeId
! unwrap_segment_node_id (const AST::TypePathSegment &seg);
  
! NodeId
! unwrap_segment_node_id (const AST::SimplePathSegment &seg);
  
! NodeId
! unwrap_segment_node_id (const AST::PathExprSegment &seg);
  
  template <class T>
  NodeId
--- 83,93 ----
  /*
   * Used to get the node id of a path segment object
   */
! NodeId unwrap_segment_node_id (const AST::TypePathSegment &seg);
  
! NodeId unwrap_segment_node_id (const AST::SimplePathSegment &seg);
  
! NodeId unwrap_segment_node_id (const AST::PathExprSegment &seg);
  
  template <class T>
  NodeId
diff -Nrcpad gcc-16-20250803/gcc/sarif-replay.cc gcc-16-20250810/gcc/sarif-replay.cc
*** gcc-16-20250803/gcc/sarif-replay.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/sarif-replay.cc	Sun Aug 10 22:32:08 2025
*************** static const char *const usage_msg = (
*** 93,98 ****
--- 93,103 ----
  "\n"
  "  --usage\n"
  "     Print this message and exit.\n"
+ "\n"
+ "Options for maintainers:\n"
+ "\n"
+ "  -fdebug-physical-locations\n"
+ "    Dump debugging information about physical locations to stderr.\n"
  "\n");
  
  static void
*************** parse_options (int argc, char **argv,
*** 182,188 ****
  	  print_version ();
  	  exit (0);
  	}
! 
        if (!handled)
  	{
  	  if (option[0] == '-')
--- 187,197 ----
  	  print_version ();
  	  exit (0);
  	}
!       else if (strcmp (option, "-fdebug-physical-locations") == 0)
! 	{
! 	  opts.m_replay_opts.m_debug_physical_locations = true;
! 	  handled = true;
! 	}
        if (!handled)
  	{
  	  if (option[0] == '-')
*************** main (int argc, char **argv)
*** 245,250 ****
--- 254,261 ----
  	  note.finish ("about to replay %qs...", filename);
  	}
        libgdiagnostics::manager playback_mgr;
+       playback_mgr.set_debug_physical_locations
+ 	(opts.m_replay_opts.m_debug_physical_locations);
        playback_mgr.add_text_sink (stderr,
  				  opts.m_replay_opts.m_diagnostics_colorize);
        for (auto spec : opts.m_extra_output_specs)
diff -Nrcpad gcc-16-20250803/gcc/simplify-rtx.cc gcc-16-20250810/gcc/simplify-rtx.cc
*** gcc-16-20250803/gcc/simplify-rtx.cc	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/simplify-rtx.cc	Sun Aug 10 22:32:08 2025
*************** simplify_context::simplify_gen_subreg (m
*** 8460,8473 ****
  
    if (GET_CODE (op) == SUBREG
        || GET_CODE (op) == CONCAT
!       || GET_MODE (op) == VOIDmode)
!     return NULL_RTX;
! 
!   if (MODE_COMPOSITE_P (outermode)
!       && (CONST_SCALAR_INT_P (op)
! 	  || CONST_DOUBLE_AS_FLOAT_P (op)
! 	  || CONST_FIXED_P (op)
! 	  || GET_CODE (op) == CONST_VECTOR))
      return NULL_RTX;
  
    if (validate_subreg (outermode, innermode, op, byte))
--- 8460,8469 ----
  
    if (GET_CODE (op) == SUBREG
        || GET_CODE (op) == CONCAT
!       || CONST_SCALAR_INT_P (op)
!       || CONST_DOUBLE_AS_FLOAT_P (op)
!       || CONST_FIXED_P (op)
!       || GET_CODE (op) == CONST_VECTOR)
      return NULL_RTX;
  
    if (validate_subreg (outermode, innermode, op, byte))
diff -Nrcpad gcc-16-20250803/gcc/testsuite/ChangeLog gcc-16-20250810/gcc/testsuite/ChangeLog
*** gcc-16-20250803/gcc/testsuite/ChangeLog	Sun Aug  3 22:32:20 2025
--- gcc-16-20250810/gcc/testsuite/ChangeLog	Sun Aug 10 22:32:08 2025
***************
*** 1,3 ****
--- 1,1049 ----
+ 2025-08-09  H.J. Lu  <hjl.tools@gmail.com>
+ 
+ 	PR testsuite/121205
+ 	* gcc.target/i386/asm-hard-reg-2.c (z): Use long long for -m32
+ 	to trigger RA error.
+ 
+ 2025-08-09  Dimitar Dimitrov  <dimitar@dinux.eu>
+ 
+ 	* g++.dg/modules/class-11_a.H: Skip test for effective
+ 	default_packed targets.
+ 	* g++.dg/modules/class-11_b.C: Ditto.
+ 
+ 2025-08-09  Paul Thomas  <pault@gcc.gnu.org>
+ 
+ 	PR fortran/121182
+ 	* gfortran.dg/generic_stmt_1.f90: New test.
+ 	* gfortran.dg/generic_stmt_2.f90: New test.
+ 	* gfortran.dg/generic_stmt_3.f90: New test.
+ 	* gfortran.dg/generic_stmt_4.f90: New test.
+ 
+ 2025-08-09  Dimitar Dimitrov  <dimitar@dinux.eu>
+ 
+ 	* gcc.dg/torture/hardbool-ai.c: Require target that supports
+ 	atomic operations on int types.
+ 
+ 2025-08-08  Andrew Pinski  <quic_apinski@quicinc.com>
+ 
+ 	PR tree-optimization/120599
+ 	* g++.dg/torture/noncall-eh-1.C: New test.
+ 
+ 2025-08-08  Andrew Pinski  <quic_apinski@quicinc.com>
+ 
+ 	PR tree-optimization/118946
+ 	PR tree-optimization/121422
+ 	* gcc.dg/pr118946-1.c: New test.
+ 	* gcc.dg/torture/pr121422-1.c: New test.
+ 	* gcc.dg/torture/pr121422-2.c: New test.
+ 
+ 2025-08-08  David Malcolm  <dmalcolm@redhat.com>
+ 
+ 	PR diagnostics/116253
+ 	* g++.dg/concepts/nested-diagnostics-1-truncated.C: Update for
+ 	renamed keys to -fdiagnostics-set-output=text
+ 	* g++.dg/concepts/nested-diagnostics-1.C: Likewise.
+ 	* g++.dg/concepts/nested-diagnostics-2.C: Likewise.
+ 	* gcc.dg/plugin/diagnostic-test-nesting-no-show-nesting.c: New
+ 	test.
+ 	* gcc.dg/plugin/diagnostic-test-nesting-show-nesting.c: New test.
+ 	* gcc.dg/plugin/diagnostic-test-nesting-text-indented-show-levels.c:
+ 	Update for renamed keys to -fdiagnostics-set-output=text.
+ 	* gcc.dg/plugin/diagnostic-test-nesting-text-indented-unicode.c:
+ 	Likewise.
+ 	* gcc.dg/plugin/diagnostic-test-nesting-text-indented.c: Likewise.
+ 	* gcc.dg/plugin/plugin.exp: Add the new tests.
+ 
+ 2025-08-08  Christophe Lyon  <christophe.lyon@linaro.org>
+ 
+ 	PR target/120977
+ 	* gcc.target/arm/cmse/cmse-18.c: Check only the case when FPCXT is
+ 	not enabled.
+ 	* gcc.target/arm/cmse/cmse-19.c: New test.
+ 
+ 2025-08-08  Pengfei Li  <Pengfei.Li2@arm.com>
+ 
+ 	PR target/121449
+ 	* g++.target/aarch64/sve/pr121449.C: New test.
+ 
+ 2025-08-08  Alex Coplan  <alex.coplan@arm.com>
+ 
+ 	PR target/120986
+ 	* gcc.target/aarch64/torture/pr120986-2.c: New test.
+ 
+ 2025-08-08  Alex Coplan  <alex.coplan@arm.com>
+ 
+ 	PR target/120986
+ 	* gcc.target/aarch64/pr120986-1.c: New test.
+ 
+ 2025-08-08  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR middle-end/121389
+ 	* c-c++-common/asan/pr121389-1.c: New test.
+ 	* c-c++-common/asan/pr121389-2.c: New test.
+ 	* c-c++-common/asan/pr121389-3.c: New test.
+ 	* c-c++-common/asan/pr121389-4.c: New test.
+ 
+ 2025-08-07  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR c++/117783
+ 	* g++.dg/cpp26/decomp13.C: New test.
+ 	* g++.dg/cpp26/decomp14.C: New test.
+ 	* g++.dg/cpp26/decomp15.C: New test.
+ 	* g++.dg/cpp26/decomp16.C: New test.
+ 	* g++.dg/cpp26/decomp17.C: New test.
+ 	* g++.dg/cpp26/decomp18.C: New test.
+ 	* g++.dg/cpp26/decomp19.C: New test.
+ 	* g++.dg/cpp26/decomp20.C: New test.
+ 	* g++.dg/cpp26/decomp21.C: New test.
+ 	* g++.dg/cpp26/feat-cxx26.C (__cpp_structured_bindings): Expect
+ 	202411 rather than 202403.
+ 
+ 2025-08-07  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	PR target/121414
+ 	* gcc.target/aarch64/sme/pr121414_1.c: New test.
+ 
+ 2025-08-07  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	PR rtl-optimization/120718
+ 	* gcc.target/aarch64/sve/acle/general/pr120718.c: New test.
+ 
+ 2025-08-07  Richard Biener  <rguenther@suse.de>
+ 
+ 	PR tree-optimization/121405
+ 	* gcc.dg/tree-ssa/ssa-fre-107.c: New testcase.
+ 	* gcc.target/i386/pr90579.c: Adjust.
+ 
+ 2025-08-07  Pengfei Li  <Pengfei.Li2@arm.com>
+ 
+ 	* gcc.target/aarch64/sve/peel_ind_11.c: New test.
+ 	* gcc.target/aarch64/sve/peel_ind_11_run.c: New test.
+ 	* gcc.target/aarch64/sve/peel_ind_12.c: New test.
+ 	* gcc.target/aarch64/sve/peel_ind_12_run.c: New test.
+ 	* gcc.target/aarch64/sve/peel_ind_13.c: New test.
+ 	* gcc.target/aarch64/sve/peel_ind_13_run.c: New test.
+ 
+ 2025-08-07  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR preprocessor/120778
+ 	* g++.dg/DRs/dr2577-1.C: New test.
+ 	* g++.dg/DRs/dr2577-2.C: New test.
+ 	* g++.dg/DRs/dr2577-2.h: New file.
+ 	* g++.dg/DRs/dr2577-3.C: New test.
+ 	* g++.dg/DRs/dr2577-3.h: New file.
+ 
+ 2025-08-07  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR preprocessor/120778
+ 	* g++.dg/DRs/dr2575.C: New test.
+ 
+ 2025-08-07  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR preprocessor/120778
+ 	* g++.dg/DRs/dr2576.C: New test.
+ 
+ 2025-08-07  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR preprocessor/120778
+ 	* gcc.dg/Wkeyword-macro-1.c: New test.
+ 	* gcc.dg/Wkeyword-macro-2.c: New test.
+ 	* gcc.dg/Wkeyword-macro-3.c: New test.
+ 	* gcc.dg/Wkeyword-macro-4.c: New test.
+ 	* gcc.dg/Wkeyword-macro-5.c: New test.
+ 	* gcc.dg/Wkeyword-macro-6.c: New test.
+ 	* gcc.dg/Wkeyword-macro-7.c: New test.
+ 	* gcc.dg/Wkeyword-macro-8.c: New test.
+ 	* gcc.dg/Wkeyword-macro-9.c: New test.
+ 	* g++.dg/warn/Wkeyword-macro-1.C: New test.
+ 	* g++.dg/warn/Wkeyword-macro-2.C: New test.
+ 	* g++.dg/warn/Wkeyword-macro-3.C: New test.
+ 	* g++.dg/warn/Wkeyword-macro-4.C: New test.
+ 	* g++.dg/warn/Wkeyword-macro-5.C: New test.
+ 	* g++.dg/warn/Wkeyword-macro-6.C: New test.
+ 	* g++.dg/warn/Wkeyword-macro-7.C: New test.
+ 	* g++.dg/warn/Wkeyword-macro-8.C: New test.
+ 	* g++.dg/warn/Wkeyword-macro-9.C: New test.
+ 	* g++.dg/warn/Wkeyword-macro-10.C: New test.
+ 	* g++.dg/opt/pr82577.C: Don't #define register to nothing for
+ 	C++17 and later.  Instead define reg macro to nothing for C++17
+ 	and later or to register and use it instead of register.
+ 	* g++.dg/modules/atom-preamble-3.C: Add -Wno-keyword-macro to
+ 	dg-additional-options.
+ 	* g++.dg/template/sfinae17.C (static_assert): Rename macro to ...
+ 	(my_static_assert): ... this.
+ 	(main): Use my_static_assert instead of static_assert.
+ 
+ 2025-08-07  Stefan Schulze Frielinghaus  <stefansf@gcc.gnu.org>
+ 
+ 	* gcc.target/s390/bitint-1.c: New test.
+ 	* gcc.target/s390/bitint-2.c: New test.
+ 	* gcc.target/s390/bitint-3.c: New test.
+ 	* gcc.target/s390/bitint-4.c: New test.
+ 
+ 2025-08-06  Sam James  <sam@gentoo.org>
+ 
+ 	* g++.dg/cpp26/constexpr-new3.C: Escape '[' and ']'.
+ 
+ 2025-08-06  Alexandre Oliva  <oliva@adacore.com>
+ 
+ 	* gcc.dg/torture/hardbool-ai.c: New.
+ 	* gcc.dg/torture/hardbool-vi.c: New.
+ 	* gcc.dg/torture/hardbool.c: Handle NO_BITFIELDS.
+ 	(add1, preinc, postinc, sub1, predec, postdec): New.
+ 	(main): Exercise them.
+ 
+ 2025-08-06  Martin Uecker  <uecker@tugraz.at>
+ 
+ 	PR c/108931
+ 	* gcc.dg/vla-tert-1.c: New test.
+ 
+ 2025-08-06  Patrick Palka  <ppalka@redhat.com>
+ 
+ 	PR c++/121231
+ 	PR c++/119688
+ 	PR c++/94511
+ 	* g++.dg/abi/mangle82.C: New test.
+ 	* g++.dg/cpp2a/nontype-class73.C: New test.
+ 
+ 2025-08-06  Jason Merrill  <jason@redhat.com>
+ 
+ 	* g++.dg/cpp26/constexpr-new3.C: Tweak diagnostic.
+ 
+ 2025-08-06  Richard Biener  <rguenther@suse.de>
+ 
+ 	* gcc.dg/vect/vect-gather-1.c: Adjust to hide N.
+ 
+ 2025-08-06  Tejas Belagod  <tejas.belagod@arm.com>
+ 
+ 	* gcc.target/aarch64/sve/acle/general/cops.c: Fix test.
+ 
+ 2025-08-06  Yang Yujie  <yangyujie@loongson.cn>
+ 
+ 	* gcc.dg/torture/bitint-84.c: New test.
+ 
+ 2025-08-06  Yang Yujie  <yangyujie@loongson.cn>
+ 
+ 	* gcc.dg/torture/bitint-83.c: New test.
+ 
+ 2025-08-06  Yang Yujie  <yangyujie@loongson.cn>
+ 
+ 	* gcc.dg/bitintext.h (BEXTC1): Define.  Convert the copied
+ 	object back to the original type before comparison.
+ 	(BEXTC): Use BEXTC1 for both the signed and the unsigned case.
+ 
+ 2025-08-06  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR tree-optimization/121413
+ 	* gcc.dg/torture/bitint-85.c: New test.
+ 
+ 2025-08-06  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR tree-optimization/121127
+ 	* gcc.dg/bitint-125.c: New test.
+ 
+ 2025-08-06  Yuao Ma  <c8ef@outlook.com>
+ 
+ 	* gfortran.dg/c_f_pointer_shape_tests_2.f03: Use the new driver.
+ 	* gfortran.dg/c_f_pointer_shape_tests_4.f03: Ditto.
+ 	* gfortran.dg/c_f_pointer_shape_tests_4_driver.c: Removed.
+ 	* gfortran.dg/c_f_pointer_shape_tests_2_driver.c: Renamed to ...
+ 	* gfortran.dg/c_f_pointer_shape_tests_driver.c: ... this; format
+ 	with gcc style.
+ 
+ 2025-08-06  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR preprocessor/120778
+ 	* c-c++-common/cpp/comment-ff-1.c: New test.
+ 	* c-c++-common/cpp/comment-vtab-1.c: New test.
+ 
+ 2025-08-06  Martin Uecker  <uecker@tugraz.at>
+ 
+ 	PR c/121217
+ 	* gcc.dg/pr121217.c: New test.
+ 
+ 2025-08-06  Kito Cheng  <kito.cheng@sifive.com>
+ 
+ 	* gcc.target/riscv/arch-unset-1.c: New test.
+ 	* gcc.target/riscv/arch-unset-2.c: New test.
+ 	* gcc.target/riscv/arch-unset-3.c: New test.
+ 	* gcc.target/riscv/arch-unset-4.c: New test.
+ 	* gcc.target/riscv/arch-unset-5.c: New test.
+ 
+ 2025-08-06  Kwok Cheung Yeung  <kcyeung@baylibre.com>
+ 
+ 	* c-c++-common/gomp/target-update-iterators-1.c: New.
+ 	* c-c++-common/gomp/target-update-iterators-2.c: New.
+ 	* c-c++-common/gomp/target-update-iterators-3.c: New.
+ 
+ 2025-08-06  Kwok Cheung Yeung  <kcyeung@baylibre.com>
+ 	    Andrew Stubbs  <ams@baylibre.com>
+ 
+ 	* c-c++-common/gomp/map-6.c (foo): Amend expected error message.
+ 	* c-c++-common/gomp/target-map-iterators-1.c: New.
+ 	* c-c++-common/gomp/target-map-iterators-2.c: New.
+ 	* c-c++-common/gomp/target-map-iterators-3.c: New.
+ 	* c-c++-common/gomp/target-map-iterators-4.c: New.
+ 
+ 2025-08-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+ 
+ 	PR libfortran/121234
+ 	* gfortran.dg/pr121234.f90: New test.
+ 
+ 2025-08-05  Jason Merrill  <jason@redhat.com>
+ 
+ 	PR c++/121068
+ 	* g++.dg/cpp26/constexpr-new5.C: New test.
+ 
+ 2025-08-05  Mikael Morin  <morin-mikael@orange.fr>
+ 
+ 	* gfortran.dg/pointer_assign_16.f90: New test.
+ 
+ 2025-08-05  H.J. Lu  <hjl.tools@gmail.com>
+ 
+ 	PR target/121410
+ 	* gcc.target/i386/pr121410.c: New test.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* rust/execute/torture/offset_of1.rs: New test.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/execute/torture/const-generics-1.rs: New test.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/generics8.rs: extra error message
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/issue-3546.rs: New test.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/issue-3885.rs: New test.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/const_generics_3.rs: this works now
+ 	* rust/compile/const_generics_5.rs: likewise
+ 	* rust/compile/const_generics_8.rs: move the failure to another test case
+ 	* rust/compile/const_generics_10.rs: New test.
+ 	* rust/compile/const_generics_11.rs: New test.
+ 	* rust/compile/const_generics_12.rs: New test.
+ 	* rust/compile/const_generics_13.rs: New test.
+ 	* rust/compile/const_generics_14.rs: New test.
+ 	* rust/compile/const_generics_15.rs: New test.
+ 	* rust/compile/const_generics_16.rs: New test.
+ 	* rust/compile/const_generics_9.rs: New test.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/issue-3960.rs: New test.
+ 
+ 2025-08-05  Ryutaro Okada  <1015ryu88@gmail.com>
+ 
+ 	* rust/compile/auto_traits2.rs:
+ 	emove warning for unused `self` parameter
+ 	* rust/compile/derive-debug1.rs:
+ 	emove warning for unused `self` parameter
+ 	* rust/compile/derive_macro1.rs:
+ 	Remove warning for unused `self` parameter
+ 	* rust/compile/format_args_basic_expansion.rs:
+ 	Remove warning for unused `self` parameter
+ 	* rust/compile/format_args_extra_comma.rs:
+ 	Remove warning for unused `self` parameter
+ 	* rust/compile/issue-2043.rs:
+ 	Remove warning for unused `self` parameter
+ 	* rust/compile/issue-2166.rs:
+ 	Remove warning for unused `self` parameter
+ 	* rust/compile/issue-2238.rs:
+ 	Remove warning for unused `self` parameter
+ 	* rust/compile/issue-2907.rs:
+ 	Remove warning for unused `self` parameter
+ 	* rust/compile/min_specialization1.rs:
+ 	Remove warning for unused `self` parameter
+ 	* rust/compile/name_resolution2.rs:
+ 	Remove warning for unused `self` parameter
+ 	* rust/compile/name_resolution4.rs:
+ 	Remove warning for unused `self` parameter
+ 	* rust/compile/torture/generics29.rs:
+ 	Remove warning for unused `self` parameter
+ 	* rust/compile/torture/generics30.rs:
+ 	Remove warning for unused `self` parameter
+ 	* rust/compile/torture/traits3.rs:
+ 	Remove warning for unused `self` parameter
+ 	* rust/compile/torture/traits7.rs:
+ 	Remove warning for unused `self` parameter
+ 	* rust/execute/torture/impl_trait3.rs:
+ 	Remove warning for unused `self` parameter
+ 	* rust/execute/torture/min_specialization2.rs:
+ 	Remove warning for unused `self` parameter
+ 	* rust/execute/torture/trait10.rs:
+ 	Remove warning for unused `self` parameter
+ 	* rust/execute/torture/trait11.rs:
+ 	Remove warning for unused `self` parameter
+ 	* rust/execute/torture/trait12.rs:
+ 	Remove warning for unused `self` parameter
+ 	* rust/execute/torture/trait13.rs:
+ 	Remove warning for unused `self` parameter
+ 	* rust/execute/torture/trait9.rs:
+ 	Remove warning for unused `self` parameter
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* rust/compile/while_let1.rs: New test.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* rust/compile/offset_of2.rs: New test.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* rust/compile/offset_of1.rs: New test.
+ 
+ 2025-08-05  Pierre-Emmanuel Patry  <pierre-emmanuel.patry@embecosm.com>
+ 
+ 	* rust/compile/issue-4006.rs: New test.
+ 
+ 2025-08-05  Pierre-Emmanuel Patry  <pierre-emmanuel.patry@embecosm.com>
+ 
+ 	* rust/execute/inline_asm_inout_ident.rs: New test.
+ 	* rust/execute/inline_asm_inout_var.rs: New test.
+ 
+ 2025-08-05  Yap Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* rust/compile/match-slicepattern-slice.rs: New file.
+ 	* rust/execute/torture/match-slicepattern-slice-1.rs: New file.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* rust/compile/try_block1.rs: New test.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* rust/compile/deferred_const_inference.rs: New test.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* rust/compile/glob_import_enum.rs: New test.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/issue-3915.rs: New test.
+ 	* rust/execute/torture/sip-hasher.rs: New test.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/issue-3916.rs: New test.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/issue-3978.rs: New test.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* rust/compile/parse_simple_path_fail_1.rs: New test.
+ 	* rust/compile/parse_simple_path_fail_2.rs: New test.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/issue-3524.rs: New test.
+ 
+ 2025-08-05  lishin  <lishin1008@gmail.com>
+ 
+ 	* rust/compile/loop_constant_context.rs: New test.
+ 	* rust/compile/issue-3618.rs:
+ 
+ 2025-08-05  Yap Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* rust/compile/match-slicepattern-array.rs: New file.
+ 	* rust/execute/torture/match-slicepattern-array-1.rs: New file.
+ 
+ 2025-08-05  Yap Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* rust/compile/slicepattern-size-mismatch.rs: New file.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/execute/torture/issue-2005.rs: New test.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/issue-1048.rs: New test.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/issue-3144.rs: New test.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/issue-3599.rs: New test.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/issue-3876.rs: New test.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/issue-2680.rs: New test.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/derive_partial_ord1.rs: this is now fully supported
+ 	* rust/execute/torture/basic_partial_ord1.rs: add missing i32 impl
+ 	* rust/execute/torture/basic_partial_ord2.rs: likewise
+ 	* rust/compile/issue-3836.rs: New test.
+ 	* rust/execute/torture/issue-3836.rs: New test.
+ 	* rust/execute/torture/partial-ord-6.rs: New test.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/issue-3874.rs: New test.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/all-cast.rs: shows array capacity now
+ 	* rust/compile/arrays2.rs: likewise
+ 	* rust/compile/const3.rs: fix error message
+ 	* rust/compile/const_generics_3.rs: disable until typecheck we get proper errors now!
+ 	* rust/compile/usize1.rs: proper capacity error message
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* rust/compile/while_let_without_label.rs: New test.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* rust/compile/additional-trait-bounds2nr2.rs: Remove
+ 	-frust-name-resolution-2.0 usage.
+ 	* rust/compile/const_generics_3.rs: Likewise.
+ 	* rust/compile/enum_variant_name.rs: Likewise.
+ 	* rust/compile/generics9.rs: Likewise.
+ 	* rust/compile/invalid_label_name.rs: Likewise.
+ 	* rust/compile/issue-3304.rs: Likewise.
+ 	* rust/compile/macros/mbe/macro-issue3708.rs: Likewise.
+ 	* rust/compile/macros/mbe/macro-issue3709-2.rs: Likewise.
+ 	* rust/compile/name_resolution10.rs: Likewise.
+ 	* rust/compile/name_resolution11.rs: Likewise.
+ 	* rust/compile/name_resolution12.rs: Likewise.
+ 	* rust/compile/name_resolution13.rs: Likewise.
+ 	* rust/compile/name_resolution14.rs: Likewise.
+ 	* rust/compile/name_resolution15.rs: Likewise.
+ 	* rust/compile/name_resolution16.rs: Likewise.
+ 	* rust/compile/name_resolution17.rs: Likewise.
+ 	* rust/compile/name_resolution18.rs: Likewise.
+ 	* rust/compile/name_resolution20.rs: Likewise.
+ 	* rust/compile/name_resolution22.rs: Likewise.
+ 	* rust/compile/name_resolution23.rs: Likewise.
+ 	* rust/compile/name_resolution24.rs: Likewise.
+ 	* rust/compile/name_resolution25.rs: Likewise.
+ 	* rust/compile/name_resolution6.rs: Likewise.
+ 	* rust/compile/name_resolution7.rs: Likewise.
+ 	* rust/compile/name_resolution8.rs: Likewise.
+ 	* rust/compile/name_resolution9.rs: Likewise.
+ 	* rust/compile/nested_macro_definition.rs: Likewise.
+ 	* rust/compile/pub_restricted_1.rs: Likewise.
+ 	* rust/compile/pub_restricted_2.rs: Likewise.
+ 	* rust/compile/self-in-impl.rs: Likewise.
+ 	* rust/compile/self_import_namespace.rs: Likewise.
+ 	* rust/compile/use_1.rs: Likewise.
+ 	* rust/compile/xfail/name_resolution21.rs: Likewise.
+ 	* rust/execute/torture/name_resolution.rs: Likewise.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* rust/compile/nr2/compile.exp: Removed.
+ 	* rust/compile/nr2/exclude: Removed.
+ 
+ 2025-08-05  Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* rust/compile/match-restpattern-tuple-1.rs: New file.
+ 	* rust/compile/match-restpattern-tuple-2.rs: New file.
+ 	* rust/execute/torture/match-restpattern-tuple.rs: New file.
+ 
+ 2025-08-05  Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* rust/compile/tuple_mismatch.rs: Include RestPattern in test.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* rust/compile/nr2/exclude: Remove issue-3315-2.rs.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* rust/compile/nr2/exclude: Remove torture/alt_patterns1.rs.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* rust/compile/macros/builtin/recurse2.rs: Match "abheyho\0" as
+ 	well as "abheyho", to handle slight differences in assembly
+ 	output for null-terminated strings.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/issue-3525.rs: New test.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/issue-3551.rs: New test.
+ 
+ 2025-08-05  Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* rust/compile/match-tuplestructpattern.rs: New file.
+ 	* rust/execute/torture/match-tuplestructpattern.rs: New file.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* rust/compile/nr2/exclude: Remove issue-3642.rs.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/silly-order-bug.rs: New test.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* rust/compile/nr2/exclude: Remove entries.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/execute/torture/issue-1481.rs: New test.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/nr2/exclude: nr2 puts out an extra error
+ 	* rust/compile/issue-3642.rs: New test.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* rust/execute/black_box.rs: Return 0 from main.
+ 	* rust/execute/match-identifierpattern-enum.rs: Move to...
+ 	* rust/execute/xfail/match-identifierpattern-enum.rs: ...here.
+ 	* rust/execute/execute.exp: New file.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/bug-with-default-generic.rs: New test.
+ 	* rust/execute/torture/partial-eq-1.rs: New test.
+ 	* rust/execute/torture/partial-eq-2.rs: New test.
+ 	* rust/execute/torture/partial-eq-3.rs: New test.
+ 	* rust/execute/torture/partial-eq-4.rs: New test.
+ 	* rust/execute/torture/partial-ord-1.rs: New test.
+ 	* rust/execute/torture/partial-ord-2.rs: New test.
+ 	* rust/execute/torture/partial-ord-3.rs: New test.
+ 	* rust/execute/torture/partial-ord-4.rs: New test.
+ 	* rust/execute/torture/partial-ord-5.rs: New test.
+ 
+ 2025-08-05  Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* rust/compile/match-identifierpattern-enum.rs: New file.
+ 	* rust/execute/match-identifierpattern-enum.rs: New file.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* rust/compile/nr2/exclude: Remove entries.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* rust/compile/derive_partial_ord1.rs: New test.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* rust/execute/torture/derive-partialeq2.rs: Add declaration for
+ 	discriminant_value.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/execute/torture/basic_partial_ord1.rs: New test.
+ 	* rust/execute/torture/basic_partial_ord2.rs: New test.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/const_generics_3.rs:
+ 	* rust/compile/issue-3660.rs: New test.
+ 
+ 2025-08-05  Zhi Heng  <yapzhhg@gmail.com>
+ 
+ 	* rust/compile/match-identifierpattern.rs: New file.
+ 	* rust/execute/torture/match-identifierpattern.rs: New file.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* rust/compile/nr2/exclude: Remove entries.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* rust/compile/nr2/exclude: Remove entries.
+ 	* rust/compile/pub_restricted_1.rs: Adjust expected error
+ 	messages and only run with name resolution 2.0 enabled.
+ 	* rust/compile/pub_restricted_2.rs: Likewise.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* rust/compile/nr2/exclude: Remove canonical_paths1.rs.
+ 
+ 2025-08-05  Vishruth-Thimmaiah  <vishruththimmaiah@gmail.com>
+ 
+ 	* rust/compile/torture/unended-raw-byte-string.rs:
+ 	New test to ensure correct error message for unended raw byte string.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* rust/compile/issue-3671.rs: Remove usage of Self.
+ 	* rust/compile/nr2/exclude: Remove issue-3671.rs.
+ 	* rust/compile/self-in-impl.rs: New test.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* rust/compile/nr2/exclude: Remove entries.
+ 
+ 2025-08-05  Vishruth-Thimmaiah  <vishruththimmaiah@gmail.com>
+ 
+ 	* rust/compile/torture/extern_mod2.rs:
+ 	New test to ensure an error is emitted for empty path attributes.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* rust/execute/torture/const_block1.rs: New test.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/traits9.rs: update errors
+ 	* rust/compile/unify-errors1.rs: New test.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/bad-rpit1.rs: New test.
+ 	* rust/execute/torture/impl_rpit1.rs: New test.
+ 	* rust/execute/torture/impl_rpit2.rs: New test.
+ 	* rust/execute/torture/impl_rpit3.rs: New test.
+ 
+ 2025-08-05  Parthib  <parthibdutta02@gmail.com>
+ 
+ 	* lib/rust.exp: Remove timeout.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* rust/execute/torture/for-loop1.rs: Adjust paths.
+ 	* rust/execute/torture/for-loop2.rs: Likewise.
+ 	* rust/execute/torture/iter1.rs: Likewise.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* rust/execute/torture/builtin_abort.rs: Fix path to
+ 	intrinsics::abort.
+ 
+ 2025-08-05  Tom Schollenberger  <tss2344@g.rit.edu>
+ 
+ 	* rust/compile/issue-3661.rs: Test NR2 has expected behavior
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* rust/compile/macros/mbe/meta-param.rs: New test.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* rust/execute/same_field_name.rs: Move to...
+ 	* rust/compile/same_field_name.rs: ...here and adjust expected
+ 	errors.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/nr2/exclude: these are fixed now
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* rust/compile/nr2/exclude: Remove entries.
+ 
+ 2025-08-05  Tom Schollenberger  <tss2344@g.rit.edu>
+ 
+ 	* rust/compile/issue-3618.rs: Test empty loops error properly.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/nr2/exclude: nr2 cant handle this
+ 	* rust/compile/impl_trait_generic_arg.rs: New test.
+ 
+ 2025-08-05  Owen Avery  <powerboat9.gamer@gmail.com>
+ 
+ 	* rust/execute/torture/struct-pattern-match.rs: New test.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/issue-2015.rs: fully supported now
+ 	* rust/compile/nr2/exclude: nr2 cant handle some of these
+ 	* rust/compile/issue-1487.rs: New test.
+ 	* rust/compile/issue-3454.rs: New test.
+ 	* rust/execute/torture/impl_desugar-2.rs: New test.
+ 	* rust/execute/torture/impl_desugar.rs: New test.
+ 	* rust/execute/torture/impl_trait1.rs: New test.
+ 	* rust/execute/torture/impl_trait2.rs: New test.
+ 	* rust/execute/torture/impl_trait3.rs: New test.
+ 	* rust/execute/torture/impl_trait4.rs: New test.
+ 	* rust/execute/torture/issue-1482.rs: New test.
+ 
+ 2025-08-05  Philip Herron  <herron.philip@googlemail.com>
+ 
+ 	* rust/compile/impl_trait_diag.rs: New test.
+ 	* rust/compile/issue-1485.rs: New test.
+ 
+ 2025-08-05  CohenArthur  <cohenarthur.dev@gmail.com>
+ 	    Pierre-Emmanuel Patry  <pierre-emmanuel.patry@embecosm.com>
+ 
+ 	* rust/execute/torture/derive-partialeq2.rs: Add missing terminating nul char.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* rust/execute/torture/derive-partialeq2.rs: New test.
+ 
+ 2025-08-05  Arthur Cohen  <arthur.cohen@embecosm.com>
+ 
+ 	* rust/execute/torture/struct_pattern1.rs: New test.
+ 
+ 2025-08-05  Georg-Johann Lay  <avr@gjlay.de>
+ 
+ 	PR target/121359
+ 	* gcc.target/avr/torture/pr118591-1.c: Remove -mlra.
+ 	* gcc.target/avr/torture/pr118591-2.c: Same.
+ 
+ 2025-08-05  Richard Biener  <rguenther@suse.de>
+ 
+ 	PR tree-optimization/121395
+ 	* gcc.dg/vect/pr59984.c: Adjust.
+ 
+ 2025-08-05  Richard Biener  <rguenther@suse.de>
+ 
+ 	PR tree-optimization/121382
+ 	* gcc.dg/torture/pr121382.c: New testcase.
+ 
+ 2025-08-05  Richard Biener  <rguenther@suse.de>
+ 
+ 	PR tree-optimization/121370
+ 	* gcc.dg/torture/pr121370.c: New testcase.
+ 
+ 2025-08-05  Yang Yujie  <yangyujie@loongson.cn>
+ 
+ 	* gcc.dg/bitintext.h (S, CEIL, PROMOTED_SIZE): Define.
+ 	(BEXTC): Generalize to only check extension within PROMOTED_SIZE bits.
+ 
+ 2025-08-05  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR preprocessor/120778
+ 	* g++.dg/DRs/dr2579.C: New test.
+ 	* c-c++-common/cpp/va-opt-6.c: Expect ' rather than \" around
+ 	tokens in incorrect pasting diagnostics.
+ 	* gcc.dg/c23-attr-syntax-6.c: Likewise.
+ 	* gcc.dg/cpp/paste12.c: Likewise.
+ 	* gcc.dg/cpp/paste12-2.c: Likewise.
+ 	* gcc.dg/cpp/paste14.c: Likewise.
+ 	* gcc.dg/cpp/paste14-2.c: Likewise.
+ 
+ 2025-08-05  Pan Li  <pan2.li@intel.com>
+ 
+ 	* gcc.target/riscv/sat/sat_u_mul-1-u32-from-u64.c: Add mulhu
+ 	asm check.
+ 	* gcc.target/riscv/sat/sat_u_mul-1-u64-from-u128.c: Ditto.
+ 
+ 2025-08-04  Patrick Palka  <ppalka@redhat.com>
+ 
+ 	PR c++/121351
+ 	* g++.dg/cpp2a/concepts-using6.C: New test.
+ 
+ 2025-08-04  Patrick Palka  <ppalka@redhat.com>
+ 
+ 	PR c++/121351
+ 	PR c++/119859
+ 	* g++.dg/cpp2a/concepts-using5.C: New test.
+ 	* g++.dg/cpp2a/concepts-using5a.C: New test.
+ 
+ 2025-08-04  Patrick Palka  <ppalka@redhat.com>
+ 
+ 	PR c++/120620
+ 	* g++.dg/cpp2a/constexpr-dynamic19.C: New test.
+ 	* g++.dg/cpp2a/constexpr-dynamic1a.C: New test.
+ 
+ 2025-08-04  David Malcolm  <dmalcolm@redhat.com>
+ 
+ 	PR diagnostics/116253
+ 	* gcc.dg/plugin/diagnostic-test-nesting-html.c: New test.
+ 	* gcc.dg/plugin/diagnostic-test-nesting-html.py: New test script.
+ 	* gcc.dg/plugin/plugin.exp: Add it.
+ 	* libgdiagnostics.dg/test-multiple-lines.c: Update expected output
+ 	to show fix-it hint.
+ 	* sarif-replay.dg/2.1.0-valid/nested-diagnostics-1.sarif: New test.
+ 
+ 2025-08-04  David Malcolm  <dmalcolm@redhat.com>
+ 
+ 	PR diagnostics/116792
+ 	* gcc.dg/plugin/diagnostic-test-graphs-html.py: Remove trailing
+ 	space from expected text of message.
+ 	* sarif-replay.dg/2.1.0-valid/embedded-links-check-html.py:
+ 	Likewise.
+ 	* sarif-replay.dg/2.1.0-valid/graphs-check-html.py: Likewise.
+ 
+ 2025-08-04  Konstantinos Eleftheriou  <konstantinos.eleftheriou@vrull.eu>
+ 
+ 	PR rtl-optimization/121303
+ 	* gcc.target/i386/pr121303.c: New test.
+ 
+ 2025-08-04  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR preprocessor/120778
+ 	* g++.dg/DRs/dr2580.C: New test.
+ 
+ 2025-08-04  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR preprocessor/120778
+ 	* g++.dg/DRs/dr2578.C: New test.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	* gcc.target/aarch64/sve/acle/general/dupq_13.c: New test.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	* gcc.target/aarch64/sve/acle/general/dup_1.c: New test.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	* gcc.target/aarch64/sve/acle/general/pnext_3.c: New test.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	* gcc.target/aarch64/sve2/acle/general/match_4.c: New test.
+ 	* gcc.target/aarch64/sve2/acle/general/nmatch_1.c: Likewise.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	* gcc.target/aarch64/sve/acle/general/acge_1.c: New test.
+ 	* gcc.target/aarch64/sve/acle/general/acgt_1.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/acle_1.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/aclt_1.c: Likewise.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	* gcc.target/aarch64/sve/acle/general/cmpeq_6.c: New test.
+ 	* gcc.target/aarch64/sve/acle/general/cmpge_9.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmpgt_9.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmple_9.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmplt_9.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmpne_5.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmpuo_1.c: Likewise.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	* gcc.target/aarch64/sve/acle/general/cmpeq_5.c: New test.
+ 	* gcc.target/aarch64/sve/acle/general/cmpge_7.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmpge_8.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmpgt_7.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmpgt_8.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmple_7.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmple_8.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmplt_7.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmplt_8.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmpne_4.c: Likewise.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	* gcc.target/aarch64/sve/acle/general/cmpeq_1.c: Check the number
+ 	of PTRUEs.
+ 	* gcc.target/aarch64/sve/acle/general/cmpge_5.c: New test.
+ 	* gcc.target/aarch64/sve/acle/general/cmpge_6.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmpgt_5.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmpgt_6.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmple_5.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmple_6.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmplt_5.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmplt_6.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmpne_3.c: Likewise.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	* gcc.target/aarch64/sve/acle/general/cmpeq_1.c: Add more tests.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	* gcc.target/aarch64/sve/pred_clobber_1.c: Disable combine.
+ 	* gcc.target/aarch64/sve/pred_clobber_2.c: Likewise.
+ 	* gcc.target/aarch64/sve/pred_clobber_3.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmpeq_2.c: Add more cases.
+ 	* gcc.target/aarch64/sve/acle/general/cmpeq_4.c: New test.
+ 	* gcc.target/aarch64/sve/acle/general/cmpge_1.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmpge_2.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmpge_3.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmpge_4.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmpgt_1.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmpgt_2.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmpgt_3.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmpgt_4.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmple_1.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmple_2.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmple_3.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmple_4.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmplt_1.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmplt_2.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmplt_3.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmplt_4.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmpne_1.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/cmpne_2.c: Likewise.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	* gcc.target/aarch64/sve/acle/general/unpkhi_1.c: New test.
+ 	* gcc.target/aarch64/sve/acle/general/unpklo_1.c: Likewise.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	PR target/121294
+ 	* gcc.target/aarch64/sve/acle/general/rev_2.c: New test.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	PR target/121294
+ 	* gcc.target/aarch64/sve/acle/general/perm_2.c: New test.
+ 	* gcc.target/aarch64/sve/acle/general/perm_3.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/perm_4.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/perm_5.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/perm_6.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/perm_7.c: Likewise.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	PR testsuite/121118
+ 	* gcc.target/aarch64/sve/acle/general/pr121118_1.c: New test.
+ 	* gcc.target/aarch64/sve/acle/general/whilele_13.c: Likewise.
+ 	* gcc.target/aarch64/sve/acle/general/whilelt_6.c: Likewise.
+ 	* gcc.target/aarch64/sve2/acle/general/whilege_1.c: Likewise.
+ 	* gcc.target/aarch64/sve2/acle/general/whilegt_1.c: Likewise.
+ 	* gcc.target/aarch64/sve2/acle/general/whilerw_5.c: Likewise.
+ 	* gcc.target/aarch64/sve2/acle/general/whilewr_5.c: Likewise.
+ 
+ 2025-08-04  Richard Sandiford  <richard.sandiford@arm.com>
+ 
+ 	PR target/121293
+ 	* gcc.target/aarch64/sve/acle/general/dupq_lane_9.c: New test.
+ 
+ 2025-08-04  Richard Biener  <rguenther@suse.de>
+ 
+ 	PR tree-optimization/121362
+ 	* gcc.dg/tree-ssa/ssa-fre-105.c: New testcase.
+ 	* gcc.dg/tree-ssa/ssa-fre-106.c: Likewise.
+ 
+ 2025-08-04  H.J. Lu  <hjl.tools@gmail.com>
+ 
+ 	PR target/120941
+ 	* gcc.target/i386/pr120941-1.c: New test.
+ 
+ 2025-08-03  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR preprocessor/120778
+ 	* g++.dg/DRs/dr1709.C: New test.
+ 
+ 2025-08-03  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR c++/120845
+ 	* g++.dg/modules/cpp-21.C: New test.
+ 
  2025-08-02  Martin Uecker  <uecker@tugraz.at>
  
  	* gcc.dg/Warray-parameter-11.c: Change Warray-parameter to
***************
*** 1956,1962 ****
  
  2025-07-11  Paul Thomas  <pault@gcc.gnu.org>
  
! 	PR fortran/106135
  	* gfortran.dg/import3.f90: Use -std=f2008 and comment on change
  	in error message texts with f2018.
  	* gfortran.dg/import12.f90: New test.
--- 3002,3008 ----
  
  2025-07-11  Paul Thomas  <pault@gcc.gnu.org>
  
! 	PR fortran/106035
  	* gfortran.dg/import3.f90: Use -std=f2008 and comment on change
  	in error message texts with f2018.
  	* gfortran.dg/import12.f90: New test.
diff -Nrcpad gcc-16-20250803/gcc/testsuite/c-c++-common/asan/pr121389-1.c gcc-16-20250810/gcc/testsuite/c-c++-common/asan/pr121389-1.c
*** gcc-16-20250803/gcc/testsuite/c-c++-common/asan/pr121389-1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/c-c++-common/asan/pr121389-1.c	Sun Aug 10 22:32:09 2025
***************
*** 0 ****
--- 1,23 ----
+ // PR middle-end/121389
+ // { dg-do compile { target musttail } }
+ // { dg-options "-fsanitize=address" }
+ 
+ int foo (void);
+ int bar (void);
+ int baz (unsigned *);
+ 
+ int
+ bar (void)
+ {
+   do
+     {
+       unsigned t;
+       int u = baz (&t);
+       if (u == 42)
+ 	[[gnu::musttail]] return foo ();
+       if (u == -42)
+ 	break;
+     }
+   while (1);
+   return 42;
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/c-c++-common/asan/pr121389-2.c gcc-16-20250810/gcc/testsuite/c-c++-common/asan/pr121389-2.c
*** gcc-16-20250803/gcc/testsuite/c-c++-common/asan/pr121389-2.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/c-c++-common/asan/pr121389-2.c	Sun Aug 10 22:32:09 2025
***************
*** 0 ****
--- 1,37 ----
+ // PR middle-end/121389
+ // { dg-do compile { target musttail } }
+ // { dg-options "-fsanitize=address" }
+ 
+ int foo (void);
+ int bar (void);
+ int baz (unsigned *);
+ 
+ int
+ bar (void)
+ {
+   for (int a = 0; a < 420; ++a)
+     {
+       for (int b = 0; b < 420; ++b)
+ 	{
+ 	  for (int c = 0; c < 420; ++c)
+ 	    {
+ 	      unsigned t;
+ 	      int u = baz (&t);
+ 	      if (u == 42)
+ 		[[gnu::musttail]] return foo ();
+ 	      if (u == -42)
+ 		break;
+ 	      if (u == 16)
+ 		goto l1;
+ 	      if (u == 18)
+ 		goto l2;
+ 	      if (u == 20)
+ 		goto l3;
+ 	    }
+ 	  l3:;
+ 	}
+       l2:;
+     }
+   l1:;
+   return 42;
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/c-c++-common/asan/pr121389-3.c gcc-16-20250810/gcc/testsuite/c-c++-common/asan/pr121389-3.c
*** gcc-16-20250803/gcc/testsuite/c-c++-common/asan/pr121389-3.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/c-c++-common/asan/pr121389-3.c	Sun Aug 10 22:32:09 2025
***************
*** 0 ****
--- 1,130 ----
+ // PR middle-end/121389
+ // { dg-do compile { target musttail } }
+ // { dg-options "-fsanitize=address" }
+ 
+ int foo (void);
+ int bar (void);
+ int baz (unsigned *);
+ 
+ int
+ bar (void)
+ {
+   for (int a = 0; a < 420; ++a)
+     {
+       for (int b = 0; b < 420; ++b)
+ 	{
+ 	  for (int c = 0; c < 420; ++c)
+ 	    {
+ 	      unsigned t;
+ 	      int u = baz (&t);
+ 	      if (u == 42)
+ 		[[gnu::musttail]] return foo ();
+ 	      if (u == -42)
+ 		break;
+ 	      if (u == 16)
+ 		goto l1;
+ 	      if (u == 18)
+ 		goto l2;
+ 	      if (u == 20)
+ 		goto l3;
+ 	      switch (u)
+ 		{
+ 		case 100: goto l100;
+ 		case 101: goto l101;
+ 		case 102: goto l102;
+ 		case 103: goto l103;
+ 		case 104: goto l104;
+ 		case 105: goto l105;
+ 		case 106: goto l106;
+ 		case 107: goto l107;
+ 		case 108: goto l108;
+ 		case 109: goto l109;
+ 		case 110: goto l110;
+ 		case 111: goto l111;
+ 		case 112: goto l112;
+ 		case 113: goto l113;
+ 		case 114: goto l114;
+ 		case 115: goto l115;
+ 		case 116: goto l116;
+ 		case 117: goto l117;
+ 		case 118: goto l118;
+ 		case 119: goto l119;
+ 		case 120: goto l120;
+ 		case 121: goto l121;
+ 		case 122: goto l122;
+ 		case 123: goto l123;
+ 		case 124: goto l124;
+ 		case 125: goto l125;
+ 		case 126: goto l126;
+ 		case 127: goto l127;
+ 		case 128: goto l128;
+ 		case 129: goto l129;
+ 		}
+ 	    }
+ 	  l3:;
+ 	  foo ();
+ 	  l100:
+ 	  foo ();
+ 	  l101:
+ 	  foo ();
+ 	  l102:
+ 	  foo ();
+ 	  l103:
+ 	  foo ();
+ 	  l104:
+ 	  foo ();
+ 	  l105:
+ 	  foo ();
+ 	  l106:
+ 	  foo ();
+ 	  l107:
+ 	  foo ();
+ 	  l108:
+ 	  foo ();
+ 	  l109:;
+ 	}
+       l2:;
+       foo ();
+       l110:
+       foo ();
+       l111:
+       foo ();
+       l112:
+       foo ();
+       l113:
+       foo ();
+       l114:
+       foo ();
+       l115:
+       foo ();
+       l116:
+       foo ();
+       l117:
+       foo ();
+       l118:
+       foo ();
+       l119:;
+     }
+   l1:;
+   foo ();
+   l120:
+   foo ();
+   l121:
+   foo ();
+   l122:
+   foo ();
+   l123:
+   foo ();
+   l124:
+   foo ();
+   l125:
+   foo ();
+   l126:
+   foo ();
+   l127:
+   foo ();
+   l128:
+   foo ();
+   l129:;
+   return 42;
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/c-c++-common/asan/pr121389-4.c gcc-16-20250810/gcc/testsuite/c-c++-common/asan/pr121389-4.c
*** gcc-16-20250803/gcc/testsuite/c-c++-common/asan/pr121389-4.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/c-c++-common/asan/pr121389-4.c	Sun Aug 10 22:32:09 2025
***************
*** 0 ****
--- 1,6 ----
+ // PR middle-end/121389
+ // { dg-do compile { target musttail } }
+ // { dg-options "-fsanitize=address -fdisable-tree-switchlower_O0" }
+ // { dg-skip-if "" { *-*-* } { "*" } { "-O0" } }
+ 
+ #include "pr121389-3.c"
diff -Nrcpad gcc-16-20250803/gcc/testsuite/c-c++-common/cpp/comment-ff-1.c gcc-16-20250810/gcc/testsuite/c-c++-common/cpp/comment-ff-1.c
*** gcc-16-20250803/gcc/testsuite/c-c++-common/cpp/comment-ff-1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/c-c++-common/cpp/comment-ff-1.c	Sun Aug 10 22:32:09 2025
***************
*** 0 ****
--- 1,12 ----
+ // C++26 P2843R3 - Preprocessing is never undefined
+ // Test that form-feed followed by non-whitespace
+ // in line comments are accepted.
+ // { dg-do compile }
+ // { dg-options "-pedantic-errors -Wall -W" }
+ 
+ // 
+ int a;
+ //   	
+ int b;
+ //  comment
+ int c;
diff -Nrcpad gcc-16-20250803/gcc/testsuite/c-c++-common/cpp/comment-vtab-1.c gcc-16-20250810/gcc/testsuite/c-c++-common/cpp/comment-vtab-1.c
*** gcc-16-20250803/gcc/testsuite/c-c++-common/cpp/comment-vtab-1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/c-c++-common/cpp/comment-vtab-1.c	Sun Aug 10 22:32:09 2025
***************
*** 0 ****
--- 1,12 ----
+ // C++26 P2843R3 - Preprocessing is never undefined
+ // Test that vertical tab followed by non-whitespace
+ // in line comments are accepted.
+ // { dg-do compile }
+ // { dg-options "-pedantic-errors -Wall -W" }
+ 
+ // 
+ int a;
+ //   	
+ int b;
+ //  comment
+ int c;
diff -Nrcpad gcc-16-20250803/gcc/testsuite/c-c++-common/cpp/va-opt-6.c gcc-16-20250810/gcc/testsuite/c-c++-common/cpp/va-opt-6.c
*** gcc-16-20250803/gcc/testsuite/c-c++-common/cpp/va-opt-6.c	Sun Aug  3 22:32:21 2025
--- gcc-16-20250810/gcc/testsuite/c-c++-common/cpp/va-opt-6.c	Sun Aug 10 22:32:09 2025
***************
*** 3,17 ****
  /* { dg-options "-std=c++20" { target c++ } } */
  
  #define a ""
! #define b(...) a ## #__VA_OPT__(1)	/* { dg-error "pasting \"a\" and \"\"\"\" does not give a valid preprocessing token" } */
! #define c(...) a ## #__VA_OPT__(1)	/* { dg-error "pasting \"a\" and \"\"1\"\" does not give a valid preprocessing token" } */
  #define d(...) #__VA_OPT__(1) ## !
  #define e(...) #__VA_OPT__(1) ## !
  #define f(...) #__VA_OPT__(. ## !)
  #define g(...) #__VA_OPT__(. ## !)
  b()
  c(1)
! d(   )		/* { dg-error "pasting \"\"\"\" and \"!\" does not give a valid preprocessing token" } */
! e(  1 )		/* { dg-error "pasting \"\"1\"\" and \"!\" does not give a valid preprocessing token" } */
  f()
! g(0)		/* { dg-error "pasting \".\" and \"!\" does not give a valid preprocessing token" } */
--- 3,17 ----
  /* { dg-options "-std=c++20" { target c++ } } */
  
  #define a ""
! #define b(...) a ## #__VA_OPT__(1)	/* { dg-error "pasting 'a' and '\"\"' does not give a valid preprocessing token" } */
! #define c(...) a ## #__VA_OPT__(1)	/* { dg-error "pasting 'a' and '\"1\"' does not give a valid preprocessing token" } */
  #define d(...) #__VA_OPT__(1) ## !
  #define e(...) #__VA_OPT__(1) ## !
  #define f(...) #__VA_OPT__(. ## !)
  #define g(...) #__VA_OPT__(. ## !)
  b()
  c(1)
! d(   )		/* { dg-error "pasting '\"\"' and '!' does not give a valid preprocessing token" } */
! e(  1 )		/* { dg-error "pasting '\"1\"' and '!' does not give a valid preprocessing token" } */
  f()
! g(0)		/* { dg-error "pasting '.' and '!' does not give a valid preprocessing token" } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/c-c++-common/gomp/map-6.c gcc-16-20250810/gcc/testsuite/c-c++-common/gomp/map-6.c
*** gcc-16-20250803/gcc/testsuite/c-c++-common/gomp/map-6.c	Sun Aug  3 22:32:21 2025
--- gcc-16-20250810/gcc/testsuite/c-c++-common/gomp/map-6.c	Sun Aug 10 22:32:09 2025
*************** foo (void)
*** 13,32 ****
    #pragma omp target map (to:a)
    ;
  
!   #pragma omp target map (a to: b) /* { dg-error "'map' clause with map-type modifier other than 'always', 'close', 'mapper' or 'present'" "" { target c++ } } */
!   ; /* { dg-error "'map' clause with map-type modifier other than 'always', 'close', 'mapper' or 'present' before 'a'" "" { target c } .-1 }  */
  
!   #pragma omp target map (close, a to: b) /* { dg-error "'map' clause with map-type modifier other than 'always', 'close', 'mapper' or 'present'" "" { target c++ } } */
!   ; /* { dg-error "'map' clause with map-type modifier other than 'always', 'close', 'mapper' or 'present' before 'a'" "" { target c } .-1 }  */
  
!   #pragma omp target enter data map(b7) map (close, a to: b) /* { dg-error "'map' clause with map-type modifier other than 'always', 'close', 'mapper' or 'present'" "" { target c++ } } */
!   ; /* { dg-error "'map' clause with map-type modifier other than 'always', 'close', 'mapper' or 'present' before 'a'" "" { target c } .-1 }  */
  
!   #pragma omp target exit data map(b7) map (close, a from: b) /* { dg-error "'map' clause with map-type modifier other than 'always', 'close', 'mapper' or 'present'" "" { target c++ } } */
!   ; /* { dg-error "'map' clause with map-type modifier other than 'always', 'close', 'mapper' or 'present' before 'a'" "" { target c } .-1 }  */
  
!   #pragma omp target data map(b7) map (close, a from: b) /* { dg-error "'map' clause with map-type modifier other than 'always', 'close', 'mapper' or 'present'" "" { target c++ } } */
!   ; /* { dg-error "'map' clause with map-type modifier other than 'always', 'close', 'mapper' or 'present' before 'a'" "" { target c } .-1 }  */
  
  
    #pragma omp target map (close a) /* { dg-error "'close' undeclared" "" { target c } } */ 
--- 13,32 ----
    #pragma omp target map (to:a)
    ;
  
!   #pragma omp target map (a to: b) /* { dg-error "'map' clause with map-type modifier other than 'always', 'close', 'iterator', 'mapper' or 'present'" "" { target c++ } } */
!   ; /* { dg-error "'map' clause with map-type modifier other than 'always', 'close', 'iterator', 'mapper' or 'present' before 'a'" "" { target c } .-1 }  */
  
!   #pragma omp target map (close, a to: b) /* { dg-error "'map' clause with map-type modifier other than 'always', 'close', 'iterator', 'mapper' or 'present'" "" { target c++ } } */
!   ; /* { dg-error "'map' clause with map-type modifier other than 'always', 'close', 'iterator', 'mapper' or 'present' before 'a'" "" { target c } .-1 }  */
  
!   #pragma omp target enter data map(b7) map (close, a to: b) /* { dg-error "'map' clause with map-type modifier other than 'always', 'close', 'iterator', 'mapper' or 'present'" "" { target c++ } } */
!   ; /* { dg-error "'map' clause with map-type modifier other than 'always', 'close', 'iterator', 'mapper' or 'present' before 'a'" "" { target c } .-1 }  */
  
!   #pragma omp target exit data map(b7) map (close, a from: b) /* { dg-error "'map' clause with map-type modifier other than 'always', 'close', 'iterator', 'mapper' or 'present'" "" { target c++ } } */
!   ; /* { dg-error "'map' clause with map-type modifier other than 'always', 'close', 'iterator', 'mapper' or 'present' before 'a'" "" { target c } .-1 }  */
  
!   #pragma omp target data map(b7) map (close, a from: b) /* { dg-error "'map' clause with map-type modifier other than 'always', 'close', 'iterator', 'mapper' or 'present'" "" { target c++ } } */
!   ; /* { dg-error "'map' clause with map-type modifier other than 'always', 'close', 'iterator', 'mapper' or 'present' before 'a'" "" { target c } .-1 }  */
  
  
    #pragma omp target map (close a) /* { dg-error "'close' undeclared" "" { target c } } */ 
diff -Nrcpad gcc-16-20250803/gcc/testsuite/c-c++-common/gomp/target-map-iterators-1.c gcc-16-20250810/gcc/testsuite/c-c++-common/gomp/target-map-iterators-1.c
*** gcc-16-20250803/gcc/testsuite/c-c++-common/gomp/target-map-iterators-1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/c-c++-common/gomp/target-map-iterators-1.c	Sun Aug 10 22:32:09 2025
***************
*** 0 ****
--- 1,23 ----
+ /* { dg-do compile } */
+ /* { dg-options "-fopenmp" } */
+ 
+ #define DIM1 17
+ #define DIM2 39
+ 
+ void f (int **x, int **y)
+ {
+   #pragma omp target map(iterator(i=0:DIM1), to: x[i][:DIM2])
+     ;
+ 
+   #pragma omp target map(iterator(i=0:DIM1), to: x[i][:DIM2], y[i][:DIM2])
+     ;
+ 
+   #pragma omp target map(iterator(i=0:DIM1), to: x[i][:DIM2] + 2) /* { dg-message "unsupported map expression" } */
+     ;
+ 
+   #pragma omp target map(iterator(i=0:DIM1), iterator(j=0:DIM2), to: x[i][j]) /* { dg-error "too many 'iterator' modifiers" } */
+     ;
+ 
+   #pragma omp target map(iterator(i=0:DIM1), to: (i % 2 == 0) ? x[i] : y[i]) /* { dg-message "unsupported map expression" } */
+     ;
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/c-c++-common/gomp/target-map-iterators-2.c gcc-16-20250810/gcc/testsuite/c-c++-common/gomp/target-map-iterators-2.c
*** gcc-16-20250803/gcc/testsuite/c-c++-common/gomp/target-map-iterators-2.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/c-c++-common/gomp/target-map-iterators-2.c	Sun Aug 10 22:32:09 2025
***************
*** 0 ****
--- 1,41 ----
+ /* { dg-do compile } */
+ /* { dg-options "-fopenmp -fdump-tree-gimple" } */
+ 
+ void f (int *x, float *y, double *z)
+ {
+   #pragma omp target map(iterator(i=0:10), to: x) /* { dg-warning "iterator variable 'i' not used in clause expression" } */
+     /* Add a reference to x to ensure that the 'to' clause does not get
+        dropped.  */
+     x[0] = 0;
+ 
+   #pragma omp target map(iterator(i2=0:10, j2=0:20), from: x[i2]) /* { dg-warning "iterator variable 'j2' not used in clause expression" } */
+     ;
+ 
+   #pragma omp target map(iterator(i3=0:10, j3=0:20, k3=0:30), to: x[i3+j3], y[j3+k3], z[k3+i3])
+   /* { dg-warning "iterator variable 'i3' not used in clause expression" "" { target *-*-* } .-1 } */
+   /* { dg-warning "iterator variable 'j3' not used in clause expression" "" { target *-*-* } .-2 } */
+   /* { dg-warning "iterator variable 'k3' not used in clause expression" "" { target *-*-* } .-3 } */
+     ;
+ 
+   /* Test iterator with zero iterations.  */
+   #pragma omp target map(iterator(i4=0:0), to: x[i4]) /* { dg-warning "iteration count is zero" } */
+     ;
+ 
+   /* Test iterator where the beginning is greater than the end.  */
+   #pragma omp target map(iterator(i5=10:0), to: x[i5]) /* { dg-warning "iteration count is zero" } */
+     ;
+ 
+   /* Test iterator where the beginning is greater than the end, but with a
+      negative step.  */
+   #pragma omp target map(iterator(i6=10:0:-1), to: x[i6])
+     ;
+ }
+ 
+ /* { dg-final { scan-tree-dump-times "map\\\(to:x" 1 "gimple" } } */
+ /* { dg-final { scan-tree-dump-times "map\\\(iterator\\\(int i2=0:10:1, loop_label=\[^\\\)\]+\\\):from:" 1 "gimple" } } */
+ /* { dg-final { scan-tree-dump-times "map\\\(iterator\\\(int i3=0:10:1, int j3=0:20:1, loop_label=\[^\\\)\]+\\\):to:" 1 "gimple" } } */
+ /* { dg-final { scan-tree-dump-times "map\\\(iterator\\\(int j3=0:20:1, int k3=0:30:1, loop_label=\[^\\\)\]+\\\):to:" 1 "gimple" } } */
+ /* { dg-final { scan-tree-dump-times "map\\\(iterator\\\(int i3=0:10:1, int k3=0:30:1, loop_label=\[^\\\)\]+\\\):to:" 1 "gimple" } } */
+ /* { dg-final { scan-tree-dump-times "map\\\(iterator\\\(int i4=0:0:1, loop_label=\[^\\\)\]+\\\):to:" 1 "gimple" } } */
+ /* { dg-final { scan-tree-dump-times "map\\\(iterator\\\(int i5=10:0:1, loop_label=\[^\\\)\]+\\\):to:" 1 "gimple" } } */
+ /* { dg-final { scan-tree-dump-times "map\\\(iterator\\\(int i6=10:0:-1, loop_label=\[^\\\)\]+\\\):to:" 1 "gimple" } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/c-c++-common/gomp/target-map-iterators-3.c gcc-16-20250810/gcc/testsuite/c-c++-common/gomp/target-map-iterators-3.c
*** gcc-16-20250803/gcc/testsuite/c-c++-common/gomp/target-map-iterators-3.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/c-c++-common/gomp/target-map-iterators-3.c	Sun Aug 10 22:32:09 2025
***************
*** 0 ****
--- 1,23 ----
+ /* { dg-do compile } */
+ /* { dg-options "-fopenmp -fdump-tree-gimple" } */
+ 
+ #define DIM1 10
+ #define DIM2 20
+ #define DIM3 30
+ 
+ void f (int ***x, float ***y, double **z)
+ {
+   #pragma omp target \
+       map(to: x, y) \
+       map(iterator(i=0:DIM1, j=0:DIM2), to: x[i][j][:DIM3], y[i][j][:DIM3]) \
+       map(from: z) \
+       map(iterator(i=0:DIM1), from: z[i][:DIM2])
+     ;
+ }
+ 
+ /* { dg-final { scan-tree-dump-times "if \\(i <= 9\\) goto <D\\\.\[0-9\]+>; else goto <D\\\.\[0-9\]+>;" 3 "gimple" } } */
+ /* { dg-final { scan-tree-dump-times "if \\(j <= 19\\) goto <D\\\.\[0-9\]+>; else goto <D\\\.\[0-9\]+>;" 1 "gimple" } } */
+ /* { dg-final { scan-tree-dump-times "map\\(iterator\\(int i=0:10:1, loop_label=<D\\\.\[0-9\]+>, elems=omp_iter_data\\\.\[0-9\]+, index=D\\\.\[0-9\]+\\):from:\\*D\\\.\[0-9\]+" 1 "gimple" } } */
+ /* { dg-final { scan-tree-dump-times "map\\(iterator\\(int i=0:10:1, loop_label=<D\\\.\[0-9\]+>, elems=omp_iter_data\\\.\[0-9\]+, index=D\\\.\[0-9\]+\\):attach:\\*D\\\.\[0-9\]+" 1 "gimple" } } */
+ /* { dg-final { scan-tree-dump-times "map\\(iterator\\(int i=0:10:1, int j=0:20:1, loop_label=<D\\\.\[0-9\]+>, elems=omp_iter_data\\\.\[0-9\]+, index=D\\\.\[0-9\]+\\):to:\\*D\\\.\[0-9\]+" 2 "gimple" } } */
+ /* { dg-final { scan-tree-dump-times "map\\(iterator\\(int i=0:10:1, int j=0:20:1, loop_label=<D\\\.\[0-9\]+>, elems=omp_iter_data\\\.\[0-9\]+, index=D\\\.\[0-9\]+\\):attach:\\*D\\\.\[0-9\]+" 4 "gimple" } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/c-c++-common/gomp/target-map-iterators-4.c gcc-16-20250810/gcc/testsuite/c-c++-common/gomp/target-map-iterators-4.c
*** gcc-16-20250803/gcc/testsuite/c-c++-common/gomp/target-map-iterators-4.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/c-c++-common/gomp/target-map-iterators-4.c	Sun Aug 10 22:32:09 2025
***************
*** 0 ****
--- 1,18 ----
+ /* { dg-do compile } */
+ /* { dg-options "-fopenmp -fdump-tree-gimple" } */
+ /* { dg-additional-options "-std=c++98" { target c++ } } */
+ 
+ int bar (int, int);
+ void baz (int, int *);
+ #pragma omp declare target enter (baz)
+ 
+ void
+ foo (int x, int *p)
+ {
+   #pragma omp target map (iterator (i=0:4), to: p[bar (x, i)])
+     baz (x, p);
+ }
+ 
+ /* { dg-final { scan-tree-dump "firstprivate\\\(x\\\)" "gimple" } } */
+ /* { dg-final { scan-tree-dump-times "bar \\\(x, i\\\)" 2 "gimple" } } */
+ /* { dg-final { scan-tree-dump-times "map\\\(iterator\\\(int i=0:4:1, loop_label=" 2 "gimple" } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/c-c++-common/gomp/target-update-iterators-1.c gcc-16-20250810/gcc/testsuite/c-c++-common/gomp/target-update-iterators-1.c
*** gcc-16-20250803/gcc/testsuite/c-c++-common/gomp/target-update-iterators-1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/c-c++-common/gomp/target-update-iterators-1.c	Sun Aug 10 22:32:09 2025
***************
*** 0 ****
--- 1,21 ----
+ /* { dg-do compile } */
+ /* { dg-options "-fopenmp" } */
+ 
+ #define DIM1 17
+ #define DIM2 39
+ 
+ void f (int **x, float **y)
+ {
+   #pragma omp target update to (iterator(i=0:DIM1): x[i][:DIM2])
+ 
+   #pragma omp target update to (iterator(i=0:DIM1): x[i][:DIM2], y[i][:DIM2])
+ 
+   #pragma omp target update to (iterator(i=0:DIM1), present: x[i][:DIM2])
+ 
+   #pragma omp target update to (iterator(i=0:DIM1), iterator(j=0:DIM2): x[i][j]) /* { dg-error "too many 'iterator' modifiers" } */
+   /* { dg-error "'#pragma omp target update' must contain at least one 'from' or 'to' clauses" "" { target *-*-* } .-1 } */
+ 
+   #pragma omp target update from (iterator(i=0:DIM1), something: x[i][j]) /* { dg-error "'from' clause with modifier other than 'iterator' or 'present'" } */
+   /* { dg-error "expected '\\)' before 'something'" "" { target c } .-1 } */
+   /* { dg-error "'#pragma omp target update' must contain at least one 'from' or 'to' clauses" "" { target *-*-* } .-2 } */
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/c-c++-common/gomp/target-update-iterators-2.c gcc-16-20250810/gcc/testsuite/c-c++-common/gomp/target-update-iterators-2.c
*** gcc-16-20250803/gcc/testsuite/c-c++-common/gomp/target-update-iterators-2.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/c-c++-common/gomp/target-update-iterators-2.c	Sun Aug 10 22:32:09 2025
***************
*** 0 ****
--- 1,23 ----
+ /* { dg-do compile } */
+ /* { dg-options "-fopenmp -fdump-tree-gimple" } */
+ 
+ void f (int *x, float *y, double *z)
+ {
+   #pragma omp target update to(iterator(i=0:10): x) /* { dg-warning "iterator variable 'i' not used in clause expression" }*/
+     ;
+ 
+   #pragma omp target update from(iterator(i2=0:10, j2=0:20): x[i2]) /* { dg-warning "iterator variable 'j2' not used in clause expression" }*/
+     ;
+ 
+   #pragma omp target update to(iterator(i3=0:10, j3=0:20, k3=0:30): x[i3+j3], y[j3+k3], z[k3+i3])
+   /* { dg-warning "iterator variable 'i3' not used in clause expression" "" { target *-*-* } .-1 } */
+   /* { dg-warning "iterator variable 'j3' not used in clause expression" "" { target *-*-* } .-2 } */
+   /* { dg-warning "iterator variable 'k3' not used in clause expression" "" { target *-*-* } .-3 } */
+     ;
+ }
+ 
+ /* { dg-final { scan-tree-dump "update to\\\(x " "gimple" } } */
+ /* { dg-final { scan-tree-dump "update from\\\(iterator\\\(int i2=0:10:1, loop_label=" "gimple" } } */
+ /* { dg-final { scan-tree-dump "to\\\(iterator\\\(int i3=0:10:1, int k3=0:30:1, loop_label=" "gimple" } } */
+ /* { dg-final { scan-tree-dump "to\\\(iterator\\\(int j3=0:20:1, int k3=0:30:1, loop_label=" "gimple" } } */
+ /* { dg-final { scan-tree-dump "to\\\(iterator\\\(int i3=0:10:1, int j3=0:20:1, loop_label=" "gimple" } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/c-c++-common/gomp/target-update-iterators-3.c gcc-16-20250810/gcc/testsuite/c-c++-common/gomp/target-update-iterators-3.c
*** gcc-16-20250803/gcc/testsuite/c-c++-common/gomp/target-update-iterators-3.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/c-c++-common/gomp/target-update-iterators-3.c	Sun Aug 10 22:32:09 2025
***************
*** 0 ****
--- 1,17 ----
+ /* { dg-do compile } */
+ /* { dg-options "-fopenmp -fdump-tree-gimple" } */
+ 
+ #define DIM1 10
+ #define DIM2 20
+ #define DIM3 30
+ 
+ void f (int ***x, float ***y, double **z)
+ {
+   #pragma omp target update to (iterator(i=0:DIM1, j=0:DIM2): x[i][j][:DIM3], y[i][j][:DIM3])
+   #pragma omp target update from (iterator(i=0:DIM1): z[i][:DIM2])
+ }
+ 
+ /* { dg-final { scan-tree-dump-times "if \\(i <= 9\\) goto <D\.\[0-9\]+>; else goto <D\.\[0-9\]+>;" 2 "gimple" } } */
+ /* { dg-final { scan-tree-dump-times "if \\(j <= 19\\) goto <D\.\[0-9\]+>; else goto <D\.\[0-9\]+>;" 1 "gimple" } } */
+ /* { dg-final { scan-tree-dump-times "to\\(iterator\\(int i=0:10:1, int j=0:20:1, loop_label=<D\.\[0-9\]+>, elems=omp_iter_data\.\[0-9\]+, index=D\.\[0-9\]+\\):\\*D\.\[0-9\]+" 2 "gimple" } } */
+ /* { dg-final { scan-tree-dump-times "from\\(iterator\\(int i=0:10:1, loop_label=<D\.\[0-9\]+>, elems=omp_iter_data\.\[0-9\]+, index=D\.\[0-9\]+\\):\\*D\.\[0-9\]+" 1 "gimple" } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/DRs/dr2575.C gcc-16-20250810/gcc/testsuite/g++.dg/DRs/dr2575.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/DRs/dr2575.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/DRs/dr2575.C	Sun Aug 10 22:32:10 2025
***************
*** 0 ****
--- 1,51 ----
+ // DR 2575 - Undefined behavior when macro-replacing "defined" operator
+ // { dg-do preprocess }
+ // { dg-options "-pedantic-errors" }
+ 
+ #define A defined
+ #if !A(A)		// { dg-error "this use of 'defined' may not be portable" }
+ #error
+ #endif
+ #if A(B)		// { dg-error "this use of 'defined' may not be portable" }
+ #error
+ #endif
+ #if !A A		// { dg-error "this use of 'defined' may not be portable" }
+ #error
+ #endif
+ #if A B			// { dg-error "this use of 'defined' may not be portable" }
+ #error
+ #endif
+ #if defined A + B
+ #else
+ #error
+ #endif
+ #if defined +B		// { dg-error "operator 'defined' requires an identifier" }
+ #endif			// { dg-error "missing binary operator before token 'B'" "" { target *-*-* } .-1 }
+ #if defined 1		// { dg-error "operator 'defined' requires an identifier" }
+ #endif
+ #if defined		// { dg-error "operator 'defined' requires an identifier" }
+ #endif
+ #if defined (A + B)	// { dg-error "missing '\\\)' after 'defined'" }
+ #endif			// { dg-error "missing binary operator before token 'B'" "" { target *-*-* } .-1 }
+ #if defined (+B)	// { dg-error "operator 'defined' requires an identifier" }
+ #endif			// { dg-error "missing binary operator before token 'B'" "" { target *-*-* } .-1 }
+ #if defined (1)		// { dg-error "operator 'defined' requires an identifier" }
+ #endif			// { dg-error "missing '\\\(' in expression" "" { target *-*-* } .-1 }
+ #if defined ()		// { dg-error "operator 'defined' requires an identifier" }
+ #endif
+ #if defined A, B	// { dg-error "comma operator in operand of #if" }
+ #endif
+ #if defined (A), B	// { dg-error "comma operator in operand of #if" }
+ #endif
+ #if (defined A), B	// { dg-error "comma operator in operand of #if" }
+ #endif
+ #if defined (A, B)	// { dg-error "missing '\\\)' after 'defined'" }
+ #endif			// { dg-error "missing binary operator before token 'B'" "" { target *-*-* } .-1 }
+ #if defined (A) + B
+ #else
+ #error
+ #endif
+ #if (defined A) + B
+ #else
+ #error
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/DRs/dr2576.C gcc-16-20250810/gcc/testsuite/g++.dg/DRs/dr2576.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/DRs/dr2576.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/DRs/dr2576.C	Sun Aug 10 22:32:10 2025
***************
*** 0 ****
--- 1,47 ----
+ // DR 2576 - Undefined behavior with macro-expanded #include directives
+ // { dg-do preprocess }
+ // { dg-options "-pedantic-errors" }
+ 
+ #define A <cstddef>
+ #include A
+ #define B "cstddef"
+ #include B
+ #define C(x) #x
+ #define D(x) C(x)
+ #include D(cstddef)
+ #include "cstddef" ""		// { dg-error "extra tokens at end of '#include' directive" }
+ #include "cstddef"".h"		// { dg-error "extra tokens at end of '#include' directive" }
+ #include			// { dg-error "'#include' expects '\"FILENAME\"' or '<FILENAME>'" }
+ #include E			// { dg-error "'#include' expects '\"FILENAME\"' or '<FILENAME>'" }
+ #include <cstddef
+ 				// { dg-error "missing terminating '>' character" "" { target *-*-* } .-1 }
+ #include "cstddef
+ 				// { dg-error "missing terminating \" character" "" { target *-*-* } .-1 }
+ 				// { dg-error "'#include' expects '\"FILENAME\"' or '<FILENAME>'" "" { target *-*-* } .-2 }
+ #define F cstddef
+ #include F			// { dg-error "'#include' expects '\"FILENAME\"' or '<FILENAME>'" }
+ // There is implementation divergence on the following cases (G H through M N)
+ // between e.g. GCC and clang++.  clang++ fails on trying to include ' cstddef'
+ // and 'cstd def' and 'stddef .h' and 'cstddef ' headers.
+ // https://eel.is/c++draft/cpp.include#7.sentence-3 makes the whitespace
+ // handling implementation defined and the way GCC handles it can allow
+ // certain use cases which aren't otherwise possible.  One can still
+ // insert spaces into the <> filenames if it is from the same macro.
+ #define G <
+ #define H cstddef>
+ #include G H
+ #define I <cstd
+ #define J def>
+ #include I J
+ #define K <stddef
+ #define L .h>
+ #include K L
+ #define M <cstddef
+ #define N >
+ #include M N
+ #define O <cstddef> <cstddef>
+ #include O			// { dg-error "extra tokens at end of '#include' directive" }
+ #define P "cstddef" ""
+ #include P			// { dg-error "extra tokens at end of '#include' directive" }
+ #define Q "cstddef"".h"
+ #include Q			// { dg-error "extra tokens at end of '#include' directive" }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/DRs/dr2577-1.C gcc-16-20250810/gcc/testsuite/g++.dg/DRs/dr2577-1.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/DRs/dr2577-1.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/DRs/dr2577-1.C	Sun Aug 10 22:32:10 2025
***************
*** 0 ****
--- 1,40 ----
+ // DR 2577 - Undefined behavior for preprocessing directives in macro arguments
+ // { dg-do preprocess }
+ // { dg-options "-pedantic-errors" }
+ 
+ #define A(x)
+ #define B(x, y)
+ A(
+ #if 1				// { dg-error "embedding a directive within macro arguments is not portable" }
+ 1
+ #else				// { dg-error "embedding a directive within macro arguments is not portable" }
+ 2
+ #endif				// { dg-error "embedding a directive within macro arguments is not portable" }
+ )
+ B(1,
+ #line 234			// { dg-error "embedding a directive within macro arguments is not portable" }
+ )
+ #line 18
+ A(
+ #define C 1			// { dg-error "embedding a directive within macro arguments is not portable" }
+ )
+ A(
+ #undef C			// { dg-error "embedding a directive within macro arguments is not portable" }
+ )
+ B(42,
+ # 234 "dr2577-1.C"		// { dg-error "embedding a directive within macro arguments is not portable" }
+ )				// { dg-error "style of line directive is a GCC extension" "" { target *-*-* } .-1 }
+ #line 28 "dr2577-1.C"
+ B(
+ #warning "foobar"		// { dg-error "embedding a directive within macro arguments is not portable" }
+ , 12)				// { dg-error "'#warning' before C\\\+\\\+23 is a GCC extension" "" { target c++20_down } .-1 }
+ 				// { dg-warning "#warning \"foobar\"" "" { target *-*-* } .-2 }
+ A(
+ #pragma GCC diagnostics push	// { dg-error "embedding a directive within macro arguments is not portable" }
+ )
+ B(5,
+ #pragma GCC diagnostics pop	// { dg-error "embedding a directive within macro arguments is not portable" }
+ )
+ A(
+ #error foobar			// { dg-error "embedding a directive within macro arguments is not portable" }
+ )				// { dg-error "#error foobar" "" { target *-*-* } .-1 }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/DRs/dr2577-2.C gcc-16-20250810/gcc/testsuite/g++.dg/DRs/dr2577-2.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/DRs/dr2577-2.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/DRs/dr2577-2.C	Sun Aug 10 22:32:10 2025
***************
*** 0 ****
--- 1,13 ----
+ // DR 2577 - Undefined behavior for preprocessing directives in macro arguments
+ // { dg-do preprocess }
+ // { dg-options "-pedantic-errors" }
+ 
+ #define A(x, y, z) x + y + z
+ int a = A(
+ #include "dr2577-2.h"		// { dg-error "embedding a directive within macro arguments is not portable" }
+ ,
+ #include "dr2577-2.h"
+ ,
+ #include "dr2577-2.h"
+ );
+ // { dg-error "unterminated argument list invoking macro 'A'" "" { target *-*-* } 0 }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/DRs/dr2577-2.h gcc-16-20250810/gcc/testsuite/g++.dg/DRs/dr2577-2.h
*** gcc-16-20250803/gcc/testsuite/g++.dg/DRs/dr2577-2.h	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/DRs/dr2577-2.h	Sun Aug 10 22:32:10 2025
***************
*** 0 ****
--- 1 ----
+ 1
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/DRs/dr2577-3.C gcc-16-20250810/gcc/testsuite/g++.dg/DRs/dr2577-3.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/DRs/dr2577-3.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/DRs/dr2577-3.C	Sun Aug 10 22:32:10 2025
***************
*** 0 ****
--- 1,7 ----
+ // DR 2577 - Undefined behavior for preprocessing directives in macro arguments
+ // { dg-do preprocess }
+ // { dg-options "-pedantic-errors" }
+ 
+ #define A(x) x
+ int a = A(
+ #include "dr2577-3.h"		// { dg-error "embedding a directive within macro arguments is not portable" }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/DRs/dr2577-3.h gcc-16-20250810/gcc/testsuite/g++.dg/DRs/dr2577-3.h
*** gcc-16-20250803/gcc/testsuite/g++.dg/DRs/dr2577-3.h	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/DRs/dr2577-3.h	Sun Aug 10 22:32:10 2025
***************
*** 0 ****
--- 1 ----
+ 1)
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/DRs/dr2578.C gcc-16-20250810/gcc/testsuite/g++.dg/DRs/dr2578.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/DRs/dr2578.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/DRs/dr2578.C	Sun Aug 10 22:32:10 2025
***************
*** 0 ****
--- 1,10 ----
+ // DR 2578 - Undefined behavior when creating an invalid string literal via stringizing
+ // { dg-do preprocess }
+ // { dg-options "-pedantic-errors" }
+ 
+ #define A(a) #a
+ #define B(a) A(a)
+ #define C \\
+ 
+ const char *x = B(C);	// { dg-warning "invalid string literal, ignoring final '\\\\'" "" { target c++23_down } }
+ // { dg-error "invalid string literal, ignoring final '\\\\'" "" { target c++26 }  .-1 }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/DRs/dr2579.C gcc-16-20250810/gcc/testsuite/g++.dg/DRs/dr2579.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/DRs/dr2579.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/DRs/dr2579.C	Sun Aug 10 22:32:10 2025
***************
*** 0 ****
--- 1,9 ----
+ // DR 2579 - Undefined behavior when token pasting does not create a preprocessing token
+ // { dg-do preprocess }
+ // { dg-options "-pedantic-errors" }
+ 
+ #define A(a, b) a ## b
+ A(5,6)
+ A(-,32)			// { dg-error "pasting '-' and '32' does not give a valid preprocessing token" }
+ A("","")		// { dg-error "pasting '\"\"' and '\"\"' does not give a valid preprocessing token" }
+ A(\,u0393)
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/DRs/dr2580.C gcc-16-20250810/gcc/testsuite/g++.dg/DRs/dr2580.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/DRs/dr2580.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/DRs/dr2580.C	Sun Aug 10 22:32:10 2025
***************
*** 0 ****
--- 1,87 ----
+ // DR 2580 - Undefined behavior with #line
+ // { dg-do preprocess }
+ 
+ #line 630 "foobar.h"
+ #line 6 "dr2580.C"
+ #line 0				// { dg-error "line number out of range" }
+ #line 8
+ #line 2147483648		// { dg-error "line number out of range" }
+ #line 10
+ #line 4294967295		// { dg-error "line number out of range" }
+ #line 12
+ #line 12345678912345		// { dg-error "line number out of range" }
+ #line 14
+ #line 15 ""
+ #line 16 "foobar.h"
+ #line 17 "/a/b/c/baz.h"
+ #line 18 "dr2580.C"
+ #line 0 "dr2580.C"		// { dg-error "line number out of range" }
+ #line 20
+ #line 2147483648 "dr2580.C"	// { dg-error "line number out of range" }
+ #line 22
+ #line 4294967295 "dr2580.C"	// { dg-error "line number out of range" }
+ #line 24
+ #line 12345678912345 "dr2580.C"	// { dg-error "line number out of range" }
+ #line 26
+ #line 27 1			// { dg-error "'1' is not a valid filename" }
+ #line 28
+ #line 29 foo bar baz		// { dg-error "'foo' is not a valid filename" }
+ #line 30
+ #line 31 "dr2580.C" 1		// { dg-error "extra tokens at end of '#line' directive" }
+ #line 32
+ #line 33 "dr2580.C" foo bar baz	// { dg-error "extra tokens at end of '#line' directive" }
+ #define A 35
+ #line A
+ #define B 0
+ #line B				// { dg-error "line number out of range" }
+ #line 38
+ #define C 2147483648
+ #line C				// { dg-error "line number out of range" }
+ #line 41
+ #define D 4294967295
+ #line D				// { dg-error "line number out of range" }
+ #line 44
+ #define E 12345678912345
+ #line E				// { dg-error "line number out of range" }
+ #line 47
+ #define F 49 "dr2580.C"
+ #line F
+ #define G 0 "dr2580.C"
+ #line G				// { dg-error "line number out of range" }
+ #line 52 "dr2580.C"
+ #define H 2147483647 "dr2580.C"
+ #line H				// { dg-error "line number out of range" "" { target c++98_only } }
+ #line 55
+ #define I 2147483648 "dr2580.C"
+ #line I				// { dg-error "line number out of range" }
+ #line 58
+ #define J 4294967295 "dr2580.C"
+ #line J				// { dg-error "line number out of range" }
+ #line 61
+ #define K 12345678912345 "dr2580.C"
+ #line K				// { dg-error "line number out of range" }
+ #line 64
+ #define M 7 0
+ #line M				// { dg-error "'0' is not a valid filename" }
+ #line 67
+ #define N 90 foo bar baz
+ #line N				// { dg-error "'foo' is not a valid filename" }
+ #line 70
+ #define O 75 "dr2580.C" 2
+ #line O				// { dg-error "extra tokens at end of '#line' directive" }
+ #line 73
+ #define P 90 "dr2580.C" foo bar baz
+ #line P				// { dg-error "extra tokens at end of '#line' directive" }
+ #line 76
+ #line -5			// { dg-error "'-' after '#line' is not a positive integer" }
+ #line 78
+ #line -7 "dr2580.C"		// { dg-error "'-' after '#line' is not a positive integer" }
+ #line 80
+ #line 32767
+ #line 82
+ #line 32768			// { dg-error "line number out of range" "" { target c++98_only } }
+ #line 84
+ #line 32767 "dr2580.C"
+ #line 86
+ #line 32768 "dr2580.C"		// { dg-error "line number out of range" "" { target c++98_only } }
+ #line 88
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/abi/mangle82.C gcc-16-20250810/gcc/testsuite/g++.dg/abi/mangle82.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/abi/mangle82.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/abi/mangle82.C	Sun Aug 10 22:32:10 2025
***************
*** 0 ****
--- 1,85 ----
+ // Test mangling of C++20 class NTTP objects with implicitly zeroed
+ // non-trailing subojects.
+ // PR c++/121231
+ // { dg-do compile { target c++20 } }
+ 
+ struct A {
+   int x, y, z;
+ 
+   static constexpr A make(int x, int y, int z) {
+     A a{};
+     if (x != 0)
+       a.x = x;
+     if (y != 0)
+       a.y = y;
+     if (z != 0)
+       a.z = z;
+     return a;
+   }
+ };
+ 
+ struct B : A {
+   int w;
+ 
+   static constexpr B make(int x, int y, int z, int w) {
+     B b{};
+     if (x != 0 || y != 0 || z != 0)
+       static_cast<A&>(b) = A::make(x, y, z);
+     if (w != 0)
+       b.w = w;
+     return b;
+   }
+ };
+ 
+ struct C {
+   int xyz[3];
+ 
+   static constexpr C make(int x, int y, int z) {
+     C c{};
+     if (x != 0)
+       c.xyz[0] = x;
+     if (y != 0)
+       c.xyz[1] = y;
+     if (z != 0)
+       c.xyz[2] = z;
+     return c;
+   }
+ };
+ 
+ template<int N, A a> void f();
+ template<int N, B b> void g();
+ template<int N, C c> void h();
+ 
+ int main() {
+   f<0, A::make(0, 0, 1)>();    // void f<0, A{0, 0, 1}>()
+   f<1, A::make(0, 1, 0)>();    // void f<1, A{0, 1}>()
+   f<2, A::make(0, 0, 0)>();    // void f<2, A{}>()
+   f<3, A::make(1, 0, 1)>();    // void f<3, A{1, 0, 1}>()
+ 
+   g<0, B::make(0, 0, 0, 1)>(); // void g<0, B{A{}, 1}>()
+   g<1, B::make(0, 0, 1, 0)>(); // void g<1, B{A{0, 0, 1}}>()
+   g<2, B::make(0, 1, 0, 0)>(); // void g<2, B{A{0, 1}}>()
+   g<3, B::make(0, 0, 0, 0)>(); // void g<3, B{}>()
+   g<4, B::make(1, 0, 1, 0)>(); // void g<4, B{A{1, 0, 1}}>()
+ 
+   h<0, C::make(0, 0, 1)>();    // void h<0, C{int [3]{0, 0, 1}}>()
+   h<1, C::make(0, 1, 0)>();    // void h<1, C{int [3]{0, 1}}>()
+   h<2, C::make(0, 0, 0)>();    // void h<2, C{}>()
+   h<3, C::make(1, 0, 1)>();    // void h<3, C{int [3]{1, 0, 1}}>()
+ }
+ 
+ // { dg-final { scan-assembler "_Z1fILi0EXtl1ALi0ELi0ELi1EEEEvv" } }
+ // { dg-final { scan-assembler "_Z1fILi1EXtl1ALi0ELi1EEEEvv" } }
+ // { dg-final { scan-assembler "_Z1fILi2EXtl1AEEEvv" } }
+ // { dg-final { scan-assembler "_Z1fILi3EXtl1ALi1ELi0ELi1EEEEvv" } }
+ 
+ // { dg-final { scan-assembler "_Z1gILi0EXtl1Btl1AELi1EEEEvv" } }
+ // { dg-final { scan-assembler "_Z1gILi1EXtl1Btl1ALi0ELi0ELi1EEEEEvv" } }
+ // { dg-final { scan-assembler "_Z1gILi2EXtl1Btl1ALi0ELi1EEEEEvv" } }
+ // { dg-final { scan-assembler "_Z1gILi3EXtl1BEEEvv" } }
+ // { dg-final { scan-assembler "_Z1gILi4EXtl1Btl1ALi1ELi0ELi1EEEEEvv" } }
+ 
+ // { dg-final { scan-assembler "_Z1hILi0EXtl1CtlA3_iLi0ELi0ELi1EEEEEvv" } }
+ // { dg-final { scan-assembler "_Z1hILi1EXtl1CtlA3_iLi0ELi1EEEEEvv" } }
+ // { dg-final { scan-assembler "_Z1hILi2EXtl1CEEEvv" } }
+ // { dg-final { scan-assembler "_Z1hILi3EXtl1CtlA3_iLi1ELi0ELi1EEEEEvv" } }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/concepts/nested-diagnostics-1-truncated.C gcc-16-20250810/gcc/testsuite/g++.dg/concepts/nested-diagnostics-1-truncated.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/concepts/nested-diagnostics-1-truncated.C	Sun Aug  3 22:32:22 2025
--- gcc-16-20250810/gcc/testsuite/g++.dg/concepts/nested-diagnostics-1-truncated.C	Sun Aug 10 22:32:10 2025
***************
*** 1,6 ****
  // { dg-do compile { target c++17 } }
  // { dg-options "-fconcepts" }
! // { dg-additional-options "-fdiagnostics-set-output=text:experimental-nesting=yes,experimental-nesting-show-locations=no" }
  
  struct dog {};
  struct cat {};
--- 1,6 ----
  // { dg-do compile { target c++17 } }
  // { dg-options "-fconcepts" }
! // { dg-additional-options "-fdiagnostics-set-output=text:show-nesting=yes,show-nesting-locations=no" }
  
  struct dog {};
  struct cat {};
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/concepts/nested-diagnostics-1.C gcc-16-20250810/gcc/testsuite/g++.dg/concepts/nested-diagnostics-1.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/concepts/nested-diagnostics-1.C	Sun Aug  3 22:32:22 2025
--- gcc-16-20250810/gcc/testsuite/g++.dg/concepts/nested-diagnostics-1.C	Sun Aug 10 22:32:10 2025
***************
*** 1,6 ****
  // { dg-do compile { target c++17 } }
  // { dg-options "-fconcepts" }
! // { dg-additional-options "-fdiagnostics-set-output=text:experimental-nesting=yes,experimental-nesting-show-locations=no" }
  // { dg-additional-options "-fconcepts-diagnostics-depth=3" }
  
  struct dog {};
--- 1,6 ----
  // { dg-do compile { target c++17 } }
  // { dg-options "-fconcepts" }
! // { dg-additional-options "-fdiagnostics-set-output=text:show-nesting=yes,show-nesting-locations=no" }
  // { dg-additional-options "-fconcepts-diagnostics-depth=3" }
  
  struct dog {};
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/concepts/nested-diagnostics-2.C gcc-16-20250810/gcc/testsuite/g++.dg/concepts/nested-diagnostics-2.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/concepts/nested-diagnostics-2.C	Sun Aug  3 22:32:22 2025
--- gcc-16-20250810/gcc/testsuite/g++.dg/concepts/nested-diagnostics-2.C	Sun Aug 10 22:32:10 2025
***************
*** 1,6 ****
  // { dg-do compile { target c++17 } }
  // { dg-options "-fconcepts" }
! // { dg-additional-options "-fdiagnostics-set-output=text:experimental-nesting=yes,experimental-nesting-show-locations=no" }
  
  struct dog{};
  struct cat{};
--- 1,6 ----
  // { dg-do compile { target c++17 } }
  // { dg-options "-fconcepts" }
! // { dg-additional-options "-fdiagnostics-set-output=text:show-nesting=yes,show-nesting-locations=no" }
  
  struct dog{};
  struct cat{};
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/cpp26/constexpr-new3.C gcc-16-20250810/gcc/testsuite/g++.dg/cpp26/constexpr-new3.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/cpp26/constexpr-new3.C	Sun Aug  3 22:32:23 2025
--- gcc-16-20250810/gcc/testsuite/g++.dg/cpp26/constexpr-new3.C	Sun Aug 10 22:32:11 2025
*************** baz ()
*** 37,43 ****
  {
    std::allocator<int> a;
    auto b = a.allocate (2);
!   new (b) long (42);		// { dg-error "accessing value of 'heap ' through a 'long int' glvalue in a constant expression" }
    a.deallocate (b, 2);
    return true;
  }
--- 37,43 ----
  {
    std::allocator<int> a;
    auto b = a.allocate (2);
!   new (b) long (42);		// { dg-error "accessing value of 'int \\\[2\\\]' object through a 'long int' glvalue in a constant expression" }
    a.deallocate (b, 2);
    return true;
  }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/cpp26/constexpr-new5.C gcc-16-20250810/gcc/testsuite/g++.dg/cpp26/constexpr-new5.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/cpp26/constexpr-new5.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/cpp26/constexpr-new5.C	Sun Aug 10 22:32:11 2025
***************
*** 0 ****
--- 1,43 ----
+ // PR c++/121068
+ // { dg-do compile { target c++26 } }
+ 
+ #include <new>
+ 
+ struct S
+ {
+   constexpr S() = default;
+   constexpr S(int x) : s(x) {}
+   constexpr S(S&& x) : s(x.s) {}
+   constexpr S& operator=(S&& x) { s = x.s; return *this; }
+   unsigned char s;
+ };
+ 
+ constexpr
+ int foo()
+ {
+   union { S a[20]; };
+   new (&a) S[20](); // OK
+   for (int i = 0; i < 20; ++i)
+     a[i].~S();
+ 
+   auto* sf = ::new(&a[2]) S(11);
+   return 1;
+ }
+ 
+ static_assert(foo());
+ 
+ constexpr
+ int foo2()
+ {
+   union { S a[20]; };
+   new (&a) S[20]; // ILL-FORMED
+   for (int i = 0; i < 20; ++i)
+     a[i].~S();
+ 
+   auto* sf = ::new(&a[2]) S(11);
+   return 1;
+ }
+ 
+ static_assert(foo2());
+ 
+ auto p = foo2;
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/cpp26/decomp13.C gcc-16-20250810/gcc/testsuite/g++.dg/cpp26/decomp13.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/cpp26/decomp13.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/cpp26/decomp13.C	Sun Aug 10 22:32:11 2025
***************
*** 0 ****
--- 1,52 ----
+ // P1061R10 - Structured Bindings can introduce a Pack
+ // { dg-do compile { target c++11 } }
+ // { dg-options "" }
+ 
+ namespace std {
+   template<typename T> struct tuple_size;
+   template<int, typename> struct tuple_element;
+ }
+ 
+ struct S { int a, b, c, d; };
+ struct T {
+   int a[5];
+   template <int I> int &get () { return a[I]; }
+ };
+ 
+ template<> struct std::tuple_size<T> { static const int value = 5; };
+ template<int I> struct std::tuple_element<I,T> { using type = int; };
+ 
+ template <int N>
+ void
+ foo ()
+ {
+   auto [a, ...b, c] = S ();		// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   auto [...d] = S ();			// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   auto [...e, f, ...g, h] = S ();	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-error "multiple packs in structured binding declaration" "" { target *-*-* } .-2 }
+   auto [i, j, k, l, ...m, n] = S ();	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-error "6 names provided for structured binding" "" { target *-*-* } .-2 }
+ 					// { dg-message "while 'S' decomposes into 4 elements" "" { target *-*-* } .-3 }
+   auto [o, ...p, q, r, s] = S ();	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   auto [t, u, v, w, x, ...y, z] = T ();	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-error "7 names provided for structured binding" "" { target *-*-* } .-2 }
+ 					// { dg-message "while 'T' decomposes into 5 elements" "" { target *-*-* } .-3 }
+   int aa[] = { 1, 2, 3 };
+   const auto & [ab, ...ac, ad, ae, af] = aa; // { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-error "5 names provided for structured binding" "" { target *-*-* } .-2 }
+ 					// { dg-message "while 'const int \\\[3\\\]' decomposes into 3 elements" "" { target *-*-* } .-3 }
+ }
+ 
+ void
+ bar ()
+ {
+   auto [a, ...b, c, d] = S ();		// { dg-error "structured binding pack outside of template" }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/cpp26/decomp14.C gcc-16-20250810/gcc/testsuite/g++.dg/cpp26/decomp14.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/cpp26/decomp14.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/cpp26/decomp14.C	Sun Aug 10 22:32:11 2025
***************
*** 0 ****
--- 1,474 ----
+ // P1061R10 - Structured Bindings can introduce a Pack
+ // { dg-do run { target c++11 } }
+ // { dg-options "" }
+ 
+ struct S {
+   int a; long long b; short c;
+   explicit operator bool () const noexcept { return true; }
+ };
+ namespace std {
+   template <typename T> struct tuple_size;
+   template <int, typename> struct tuple_element;
+ }
+ struct T {
+   short c; int a; long long b;
+   template <int I>
+   typename std::tuple_element<I, T>::type &get ();
+   template <int I>
+   typename std::tuple_element<I, const T>::type &get () const;
+   explicit operator bool () const noexcept { return false; }
+ };
+ template <>
+ struct std::tuple_size<T> { static constexpr int value = 3; };
+ template <>
+ struct std::tuple_element<0, T> { typedef int type; };
+ template <>
+ struct std::tuple_element<1, T> { typedef long long type; };
+ template <>
+ struct std::tuple_element<2, T> { typedef short type; };
+ template <>
+ std::tuple_element<0, T>::type &T::get <0> () { return a; }
+ template <>
+ std::tuple_element<1, T>::type &T::get <1> () { return b; }
+ template <>
+ std::tuple_element<2, T>::type &T::get <2> () { return c; }
+ template <>
+ struct std::tuple_size<const T> { static constexpr int value = 3; };
+ template <>
+ struct std::tuple_element<0, const T> { typedef const int type; };
+ template <>
+ struct std::tuple_element<1, const T> { typedef const long long type; };
+ template <>
+ struct std::tuple_element<2, const T> { typedef const short type; };
+ template <>
+ std::tuple_element<0, const T>::type &T::get <0> () const { return a; }
+ template <>
+ std::tuple_element<1, const T>::type &T::get <1> () const { return b; }
+ template <>
+ std::tuple_element<2, const T>::type &T::get <2> () const { return c; }
+ template <typename T, typename U>
+ struct same_type { static const bool value = false; };
+ template <typename T>
+ struct same_type<T, T> { static const bool value = true; };
+ 
+ int
+ sum ()
+ {
+   return 0;
+ }
+ 
+ template <typename T, typename ...A>
+ T
+ sum (T x, A... y)
+ {
+   return x + sum (y...);
+ }
+ 
+ template <typename T>
+ T
+ square (T x)
+ {
+   return x * x;
+ }
+ 
+ template <typename T>
+ T &
+ ref (T &x)
+ {
+   return x;
+ }
+ 
+ using size_t = decltype (sizeof 0);
+ 
+ template <int N>
+ size_t
+ foo ()
+ {
+   S s = S { 1, 2, 3 };
+   auto [sa, sb, sc] = S { 1, 2, 3 };	// { dg-warning "structured bindings only available with" "" { target c++14_down } }
+   static_assert (same_type <decltype (sa), int>::value, "");
+   static_assert (same_type <decltype (sb), long long>::value, "");
+   static_assert (same_type <decltype (sc), short>::value, "");
+   auto [sd, ...se] = S { 1, 2, 3 };	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   constexpr size_t ses = sizeof... (se);
+   static_assert (sizeof... (se) == 2, "");
+   static_assert (same_type <decltype (sd), int>::value, "");
+   static_assert (same_type <decltype (se...[0]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (se...[1]), short>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   const auto & [...sf [[]], sg] = s;	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (sf) == 2, "");
+   static_assert (same_type <decltype (sf...[0]), const int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (sf...[1]), const long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (sg), const short>::value, "");
+   auto [sh, si, sj [[]], ...sk] = S { 1, 2, 3 };// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (sk) == 0, "");
+   static_assert (same_type <decltype (sh), int>::value, "");
+   static_assert (same_type <decltype (si), long long>::value, "");
+   static_assert (same_type <decltype (sj), short>::value, "");
+   auto && [sl, ...sm [[maybe_unused]], sn] = s; // { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (sm) == 1, "");
+   static_assert (same_type <decltype (sl), int>::value, "");
+   static_assert (same_type <decltype (sm...[0]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (sn), short>::value, "");
+   auto [...so] = S { 1, 2, 3 };		// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (so) == 3, "");
+   static_assert (same_type <decltype (so...[0]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (so...[1]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (so...[2]), short>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   auto [...sp, sq, sr, ss [[maybe_unused]]] = S { 1, 2, 3 };// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (sp) == 0, "");
+   static_assert (same_type <decltype (sq), int>::value, "");
+   static_assert (same_type <decltype (sr), long long>::value, "");
+   static_assert (same_type <decltype (ss), short>::value, "");
+   auto [st, ...su, sv, sw] = S { 1, 2, 3 };// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (su) == 0, "");
+   static_assert (same_type <decltype (st), int>::value, "");
+   static_assert (same_type <decltype (sv), long long>::value, "");
+   static_assert (same_type <decltype (sw), short>::value, "");
+   if (sa != 1 || sb != 2 || sc != 3
+       || sd != 1 || se...[0] != 2 || se...[1] != 3	// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || sf...[0] != 1 || sf...[1] != 2 || sg != 3	// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || sh != 1 || si != 2 || sj != 3
+       || sl != 1 || sm...[0] != 2 || sn != 3		// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || so...[0] != 1 || so...[1] != 2 || so...[2] != 3// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || sq != 1 || sr != 2 || ss != 3
+       || st != 1 || sv != 2 || sw != 3
+       || sum (se...) != 5
+       || sum <decltype (se)...> (se...) != 5
+       || sum (square (square (se))...) != 97
+       || sum (sf...) != 3
+       || sum (sk...) != 0
+       || sum (sm...) != 2
+       || sum (so...) != 6
+       || sum <decltype (so)...> (so...) != 6
+       || sum (square (so)...) != 14
+       || sum (sp...) != 0
+       || sum (su...) != 0
+       || (se + ...) != 5		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (... + sf) != 3		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (0 + ... + sk) != 0		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (sm + ... + 0) != 2		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (so + ...) != 6		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (sp + ... + 0) != 0		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (0 + ... + su) != 0)		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+     __builtin_abort ();
+   S s2[] = { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } };
+   int i = 0;
+   for (auto [sx, ...sy [[]]] : s2)	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+     {					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+       static_assert (sizeof... (sy) == 2, "");
+       static_assert (same_type <decltype (sx), int>::value, "");
+       static_assert (same_type <decltype (sy...[0]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (sy...[1]), short>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       if (sx != i * 3 + 1 || sum (sy...) != i * 6 + 5)
+ 	__builtin_abort ();
+       auto fn1 = [&] () { if (sum (sy...) != i * 6 + 5) __builtin_abort (); }; // { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn1 ();
+       auto fn2 = [&sy..., &i] () { if (sum (sy...) != i * 6 + 5) __builtin_abort (); }; // { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn2 ();
+       auto fn3 = [&...sy2 = sy, &i] () { if (sum (sy2...) != i * 6 + 5) __builtin_abort (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn3 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+       auto fn4 = [&...sy3 = ref (sy), &i] () { if (sum (sy3...) != i * 6 + 5) __builtin_abort (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn4 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+       auto fn5 = [=] () { if (sum (sy...) != i * 6 + 5) __builtin_abort (); }; // { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn5 ();
+       auto fn6 = [sy..., i] () { if (sum (sy...) != i * 6 + 5) __builtin_abort (); }; // { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn6 ();
+       auto fn7 = [...sy2 = sy, i] () { if (sum (sy2...) != i * 6 + 5) __builtin_abort (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn7 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+       auto fn8 = [...sy3 = square (sy), i] () { if (sum (sy3...) != (i * 3 + 2) * (i * 3 + 2) + (i * 3 + 3) * (i * 3 + 3)) __builtin_abort (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn8 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+       auto fn9 = [&] () { auto fn = [&] () { if (sum (sy...) != i * 6 + 5) __builtin_abort (); }; fn (); }; // { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn9 ();
+       auto fn10 = [&sy..., &i] () { auto fn = [&] () { if (sum (sy...) != i * 6 + 5) __builtin_abort (); }; fn (); }; // { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn10 ();
+       auto fn11 = [&] () { auto fn = [&...sy2 = sy, &i] () { if (sum (sy2...) != i * 6 + 5) __builtin_abort (); }; fn (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn11 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+ 					// { dg-warning "captured structured bindings are" "" { target c++17_down } .-2 }
+       auto fn12 = [&sy..., &i] () { auto fn = [&...sy3 = ref (sy), &i] () { if (sum (sy3...) != i * 6 + 5) __builtin_abort (); }; fn (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn12 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+ 					// { dg-warning "captured structured bindings are" "" { target c++17_down } .-2 }
+       auto fn13 = [=] () { auto fn = [=] () { if (sum (sy...) != i * 6 + 5) __builtin_abort (); }; fn (); }; // { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn13 ();
+       auto fn14 = [sy..., i] () { auto fn = [=] () { if (sum (sy...) != i * 6 + 5) __builtin_abort (); }; fn (); }; // { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn14 ();
+       auto fn15 = [=] () { auto fn = [...sy2 = sy, i] () { if (sum (sy2...) != i * 6 + 5) __builtin_abort (); }; fn (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn15 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+ 					// { dg-warning "captured structured bindings are" "" { target c++17_down } .-2 }
+       auto fn16 = [&sy..., &i] () { auto fn = [...sy3 = square (sy), i] () { if (sum (sy3...) != (i * 3 + 2) * (i * 3 + 2) + (i * 3 + 3) * (i * 3 + 3)) __builtin_abort (); }; fn (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn16 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+ 					// { dg-warning "captured structured bindings are" "" { target c++17_down } .-2 }
+       ++i;
+     }
+   i = 0;
+   for (auto [...sz] : s2)		// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+     {					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+       static_assert (sizeof... (sz) == 3, "");
+       static_assert (same_type <decltype (sz...[0]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (sz...[1]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (sz...[2]), short>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       if (sum (sz...) != i * 9 + 6)
+ 	__builtin_abort ();
+       auto fn = [=] () { if (sum (sz...) != i * 9 + 6) __builtin_abort (); };	// { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn ();
+       ++i;
+     }
+   if (auto [...sx, sy] = s)		// { dg-warning "structured bindings in conditions only available with" "" { target c++23_down } }
+     {
+       static_assert (sizeof... (sx) == 2, "");
+       static_assert (same_type <decltype (sx...[0]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (sx...[1]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (sy), short>::value, "");
+       if (sum (sx...) != 3 || sy != 3)
+ 	__builtin_abort ();
+     }
+   else
+     __builtin_abort ();
+   T t = T { 3, 1, 2 };
+   auto [ta, tb, tc] = T { 3, 1, 2 };	// { dg-warning "structured bindings only available with" "" { target c++14_down } }
+   static_assert (same_type <decltype (ta), int>::value, "");
+   static_assert (same_type <decltype (tb), long long>::value, "");
+   static_assert (same_type <decltype (tc), short>::value, "");
+   auto [td [[maybe_unused]], ...te] = T { 3, 1, 2 }; // { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (te) == 2, "");
+   static_assert (same_type <decltype (td), int>::value, "");
+   static_assert (same_type <decltype (te...[0]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (te...[1]), short>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   auto [...tf [[maybe_unused]], tg] = T { 3, 1, 2 }; // { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (tf) == 2, "");
+   static_assert (same_type <decltype (tf...[0]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (tf...[1]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (tg), short>::value, "");
+   const auto & [th, ti, tj, ...tk] = t;	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (tk) == 0, "");
+   static_assert (same_type <decltype (th), const int>::value, "");
+   static_assert (same_type <decltype (ti), const long long>::value, "");
+   static_assert (same_type <decltype (tj), const short>::value, "");
+   auto [tl [[]], ...tm [[]], tn [[]]] = T { 3, 1, 2 }; // { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (tm) == 1, "");
+   static_assert (same_type <decltype (tl), int>::value, "");
+   static_assert (same_type <decltype (tm...[0]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (tn), short>::value, "");
+   auto && [...to] = t;			// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (to) == 3, "");
+   static_assert (same_type <decltype (to...[0]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (to...[1]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (to...[2]), short>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   auto [...tp, tq [[]], tr, ts] = T { 3, 1, 2 };// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (tp) == 0, "");
+   static_assert (same_type <decltype (tq), int>::value, "");
+   static_assert (same_type <decltype (tr), long long>::value, "");
+   static_assert (same_type <decltype (ts), short>::value, "");
+   auto [tt, ...tu [[]], tv, tw] = T { 3, 1, 2 };// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (tu) == 0, "");
+   static_assert (same_type <decltype (tt), int>::value, "");
+   static_assert (same_type <decltype (tv), long long>::value, "");
+   static_assert (same_type <decltype (tw), short>::value, "");
+   if (ta != 1 || tb != 2 || tc != 3
+       || td != 1 || te...[0] != 2 || te...[1] != 3	// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || tf...[0] != 1 || tf...[1] != 2 || tg != 3	// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || th != 1 || ti != 2 || tj != 3
+       || tl != 1 || tm...[0] != 2 || tn != 3		// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || to...[0] != 1 || to...[1] != 2 || to...[2] != 3// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || tq != 1 || tr != 2 || ts != 3
+       || tt != 1 || tv != 2 || tw != 3
+       || sum (te...) != 5
+       || sum <decltype (te)...> (te...) != 5
+       || sum (square (square (te))...) != 97
+       || sum (tf...) != 3
+       || sum (tk...) != 0
+       || sum (tm...) != 2
+       || sum (to...) != 6
+       || sum <decltype (to)...> (to...) != 6
+       || sum (square (to)...) != 14
+       || sum (tp...) != 0
+       || sum (tu...) != 0
+       || (te + ...) != 5		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (... + tf) != 3		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (0 + ... + tk) != 0		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (tm + ... + 0) != 2		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (to + ...) != 6		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (tp + ... + 0) != 0		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (0 + ... + tu) != 0)		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+     __builtin_abort ();
+   T t2[] = { { 3, 1, 2 }, { 6, 4, 5 }, { 9, 7, 8 } };
+   i = 0;
+   for (auto [tx, ...ty] : t2)		// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+     {					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+       static_assert (sizeof... (ty) == 2, "");
+       static_assert (same_type <decltype (tx), int>::value, "");
+       static_assert (same_type <decltype (ty...[0]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (ty...[1]), short>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       if (tx != i * 3 + 1 || sum (ty...) != i * 6 + 5)
+ 	__builtin_abort ();
+       auto fn1 = [&] () { if (sum (ty...) != i * 6 + 5) __builtin_abort (); };
+       fn1 ();
+       auto fn2 = [&ty..., &i] () { if (sum (ty...) != i * 6 + 5) __builtin_abort (); }; // { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn2 ();
+       auto fn3 = [&...ty2 = ty, &i] () { if (sum (ty2...) != i * 6 + 5) __builtin_abort (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn3 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+       auto fn4 = [&...ty3 = ref (ty), &i] () { if (sum (ty3...) != i * 6 + 5) __builtin_abort (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn4 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+       auto fn5 = [=] () { if (sum (ty...) != i * 6 + 5) __builtin_abort (); };
+       fn5 ();
+       auto fn6 = [ty..., i] () { if (sum (ty...) != i * 6 + 5) __builtin_abort (); }; // { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn6 ();
+       auto fn7 = [...ty2 = ty, i] () { if (sum (ty2...) != i * 6 + 5) __builtin_abort (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn7 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+       auto fn8 = [...ty3 = square (ty), i] () { if (sum (ty3...) != (i * 3 + 2) * (i * 3 + 2) + (i * 3 + 3) * (i * 3 + 3)) __builtin_abort (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn8 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+       auto fn9 = [&] () { auto fn = [&] () { if (sum (ty...) != i * 6 + 5) __builtin_abort (); }; fn (); };
+       fn9 ();
+       auto fn10 = [&ty..., &i] () { auto fn = [&] () { if (sum (ty...) != i * 6 + 5) __builtin_abort (); }; fn (); }; // { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn10 ();
+       auto fn11 = [&] () { auto fn = [&...ty2 = ty, &i] () { if (sum (ty2...) != i * 6 + 5) __builtin_abort (); }; fn (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn11 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+       auto fn12 = [&ty..., &i] () { auto fn = [&...ty3 = ref (ty), &i] () { if (sum (ty3...) != i * 6 + 5) __builtin_abort (); }; fn (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn12 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+ 					// { dg-warning "captured structured bindings are" "" { target c++17_down } .-2 }
+       auto fn13 = [=] () { auto fn = [=] () { if (sum (ty...) != i * 6 + 5) __builtin_abort (); }; fn (); };
+       fn13 ();
+       auto fn14 = [ty..., i] () { auto fn = [=] () { if (sum (ty...) != i * 6 + 5) __builtin_abort (); }; fn (); }; // { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn14 ();
+       auto fn15 = [=] () { auto fn = [...ty2 = ty, i] () { if (sum (ty2...) != i * 6 + 5) __builtin_abort (); }; fn (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn15 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+       auto fn16 = [&ty..., &i] () { auto fn = [...ty3 = square (ty), i] () { if (sum (ty3...) != (i * 3 + 2) * (i * 3 + 2) + (i * 3 + 3) * (i * 3 + 3)) __builtin_abort (); }; fn (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn16 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+ 					// { dg-warning "captured structured bindings are" "" { target c++17_down } .-2 }
+       ++i;
+     }
+   i = 0;
+   for (auto [...tz] : t2)		// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+     {					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+       static_assert (sizeof... (tz) == 3, "");
+       static_assert (same_type <decltype (tz...[0]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (tz...[1]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (tz...[2]), short>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       if (sum (tz...) != i * 9 + 6)
+ 	__builtin_abort ();
+       auto fn = [=] () { if (sum (tz...) != i * 9 + 6) __builtin_abort (); };
+       fn ();
+       ++i;
+     }
+   if (auto [...tx [[maybe_unused]], ty] = t) // { dg-warning "structured bindings in conditions only available with" "" { target c++23_down } }
+     __builtin_abort ();
+   else
+     {
+       static_assert (sizeof... (tx) == 2, "");
+       static_assert (same_type <decltype (tx...[0]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (tx...[1]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (ty), short>::value, "");
+       if (sum (tx...) != 3 || ty != 3)
+ 	__builtin_abort ();
+     }
+   int a[3] = { 1, 2, 3 };
+   auto [aa, ab, ac] = a;	// { dg-warning "structured bindings only available with" "" { target c++14_down } }
+   static_assert (same_type <decltype (aa), int>::value, "");
+   static_assert (same_type <decltype (ab), int>::value, "");
+   static_assert (same_type <decltype (ac), int>::value, "");
+   auto [ad [[maybe_unused]], ...ae [[maybe_unused]]] = a; // { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 				// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 				// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (ae) == 2, "");
+   static_assert (same_type <decltype (ad), int>::value, "");
+   static_assert (same_type <decltype (ae...[0]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (ae...[1]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   auto [...af, ag] = a;		// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 				// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (af) == 2, "");
+   static_assert (same_type <decltype (af...[0]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (af...[1]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (ag), int>::value, "");
+   auto [ah, ai [[]], aj, ...ak [[]]] = a; // { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 				// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 				// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (ak) == 0, "");
+   static_assert (same_type <decltype (ah), int>::value, "");
+   static_assert (same_type <decltype (ai), int>::value, "");
+   static_assert (same_type <decltype (aj), int>::value, "");
+   auto [al, ...am [[]], an] = a;// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 				// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 				// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (am) == 1, "");
+   static_assert (same_type <decltype (al), int>::value, "");
+   static_assert (same_type <decltype (am...[0]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (an), int>::value, "");
+   const auto &[...ao] = a;	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 				// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (ao) == 3, "");
+   static_assert (same_type <decltype (ao...[0]), const int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (ao...[1]), const int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (ao...[2]), const int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   auto &&[...ap, aq, ar [[]], as] = a;// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 				// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 				// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (ap) == 0, "");
+   static_assert (same_type <decltype (aq), int>::value, "");
+   static_assert (same_type <decltype (ar), int>::value, "");
+   static_assert (same_type <decltype (as), int>::value, "");
+   auto [at, ...au, av, aw] = a;	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 				// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (au) == 0, "");
+   static_assert (same_type <decltype (at), int>::value, "");
+   static_assert (same_type <decltype (av), int>::value, "");
+   static_assert (same_type <decltype (aw), int>::value, "");
+   if (aa != 1 || ab != 2 || ac != 3
+       || ad != 1 || ae...[0] != 2 || ae...[1] != 3	// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || af...[0] != 1 || af...[1] != 2 || ag != 3	// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || ah != 1 || ai != 2 || aj != 3
+       || al != 1 || am...[0] != 2 || an != 3		// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || ao...[0] != 1 || ao...[1] != 2 || ao...[2] != 3// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || aq != 1 || ar != 2 || as != 3
+       || at != 1 || av != 2 || aw != 3
+       || sum (ae...) != 5
+       || sum <decltype (ae)...> (ae...) != 5
+       || sum (square (square (ae))...) != 97
+       || sum (af...) != 3
+       || sum (ak...) != 0
+       || sum (am...) != 2
+       || sum (ao...) != 6
+       || sum <decltype (ao)...> (ao...) != 6
+       || sum (square (ao)...) != 14
+       || sum (ap...) != 0
+       || sum (au...) != 0
+       || (ae + ...) != 5		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (... + af) != 3		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (0 + ... + ak) != 0		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (am + ... + 0) != 2		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (ao + ...) != 6		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (ap + ... + 0) != 0		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (0 + ... + au) != 0)		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+     __builtin_abort ();
+   return ses;
+ }
+ 
+ int
+ main ()
+ {
+   if (foo <0> () != 2)
+     __builtin_abort ();
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/cpp26/decomp15.C gcc-16-20250810/gcc/testsuite/g++.dg/cpp26/decomp15.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/cpp26/decomp15.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/cpp26/decomp15.C	Sun Aug 10 22:32:11 2025
***************
*** 0 ****
--- 1,474 ----
+ // P1061R10 - Structured Bindings can introduce a Pack
+ // { dg-do run { target c++11 } }
+ // { dg-options "" }
+ 
+ struct S {
+   int a; long long b; short c;
+   explicit operator bool () const noexcept { return true; }
+ };
+ namespace std {
+   template <typename T> struct tuple_size;
+   template <int, typename> struct tuple_element;
+ }
+ struct T {
+   short c; int a; long long b;
+   template <int I>
+   typename std::tuple_element<I, T>::type &get ();
+   template <int I>
+   typename std::tuple_element<I, const T>::type &get () const;
+   explicit operator bool () const noexcept { return false; }
+ };
+ template <>
+ struct std::tuple_size<T> { static constexpr int value = 3; };
+ template <>
+ struct std::tuple_element<0, T> { typedef int type; };
+ template <>
+ struct std::tuple_element<1, T> { typedef long long type; };
+ template <>
+ struct std::tuple_element<2, T> { typedef short type; };
+ template <>
+ std::tuple_element<0, T>::type &T::get <0> () { return a; }
+ template <>
+ std::tuple_element<1, T>::type &T::get <1> () { return b; }
+ template <>
+ std::tuple_element<2, T>::type &T::get <2> () { return c; }
+ template <>
+ struct std::tuple_size<const T> { static constexpr int value = 3; };
+ template <>
+ struct std::tuple_element<0, const T> { typedef const int type; };
+ template <>
+ struct std::tuple_element<1, const T> { typedef const long long type; };
+ template <>
+ struct std::tuple_element<2, const T> { typedef const short type; };
+ template <>
+ std::tuple_element<0, const T>::type &T::get <0> () const { return a; }
+ template <>
+ std::tuple_element<1, const T>::type &T::get <1> () const { return b; }
+ template <>
+ std::tuple_element<2, const T>::type &T::get <2> () const { return c; }
+ template <typename T, typename U>
+ struct same_type { static const bool value = false; };
+ template <typename T>
+ struct same_type<T, T> { static const bool value = true; };
+ 
+ int
+ sum ()
+ {
+   return 0;
+ }
+ 
+ template <typename T, typename ...A>
+ T
+ sum (T x, A... y)
+ {
+   return x + sum (y...);
+ }
+ 
+ template <typename T>
+ T
+ square (T x)
+ {
+   return x * x;
+ }
+ 
+ template <typename T>
+ T &
+ ref (T &x)
+ {
+   return x;
+ }
+ 
+ using size_t = decltype (sizeof 0);
+ 
+ template <typename S, typename T, typename U>
+ size_t
+ foo ()
+ {
+   S s = S { 1, 2, 3 };
+   auto [sa, sb, sc] = S { 1, 2, 3 };	// { dg-warning "structured bindings only available with" "" { target c++14_down } }
+   static_assert (same_type <decltype (sa), int>::value, "");
+   static_assert (same_type <decltype (sb), long long>::value, "");
+   static_assert (same_type <decltype (sc), short>::value, "");
+   auto [sd, ...se] = S { 1, 2, 3 };	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (se) == 2, "");
+   static_assert (same_type <decltype (sd), int>::value, "");
+   static_assert (same_type <decltype (se...[0]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (se...[1]), short>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   const auto & [...sf [[]], sg] = s;	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (sf) == 2, "");
+   static_assert (same_type <decltype (sf...[0]), const int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (sf...[1]), const long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (sg), const short>::value, "");
+   auto [sh, si, sj [[]], ...sk] = S { 1, 2, 3 };// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (sk) == 0, "");
+   static_assert (same_type <decltype (sh), int>::value, "");
+   static_assert (same_type <decltype (si), long long>::value, "");
+   static_assert (same_type <decltype (sj), short>::value, "");
+   auto && [sl, ...sm [[maybe_unused]], sn] = s; // { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (sm) == 1, "");
+   static_assert (same_type <decltype (sl), int>::value, "");
+   static_assert (same_type <decltype (sm...[0]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (sn), short>::value, "");
+   auto [...so] = S { 1, 2, 3 };		// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (so) == 3, "");
+   static_assert (same_type <decltype (so...[0]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (so...[1]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (so...[2]), short>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   auto [...sp, sq, sr, ss [[maybe_unused]]] = S { 1, 2, 3 };// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (sp) == 0, "");
+   static_assert (same_type <decltype (sq), int>::value, "");
+   static_assert (same_type <decltype (sr), long long>::value, "");
+   static_assert (same_type <decltype (ss), short>::value, "");
+   auto [st, ...su, sv, sw] = S { 1, 2, 3 };// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (su) == 0, "");
+   static_assert (same_type <decltype (st), int>::value, "");
+   static_assert (same_type <decltype (sv), long long>::value, "");
+   static_assert (same_type <decltype (sw), short>::value, "");
+   if (sa != 1 || sb != 2 || sc != 3
+       || sd != 1 || se...[0] != 2 || se...[1] != 3	// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || sf...[0] != 1 || sf...[1] != 2 || sg != 3	// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || sh != 1 || si != 2 || sj != 3
+       || sl != 1 || sm...[0] != 2 || sn != 3		// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || so...[0] != 1 || so...[1] != 2 || so...[2] != 3// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || sq != 1 || sr != 2 || ss != 3
+       || st != 1 || sv != 2 || sw != 3
+       || sum (se...) != 5
+       || sum <decltype (se)...> (se...) != 5
+       || sum (square (square (se))...) != 97
+       || sum (sf...) != 3
+       || sum (sk...) != 0
+       || sum (sm...) != 2
+       || sum (so...) != 6
+       || sum <decltype (so)...> (so...) != 6
+       || sum (square (so)...) != 14
+       || sum (sp...) != 0
+       || sum (su...) != 0
+       || (se + ...) != 5		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (... + sf) != 3		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (0 + ... + sk) != 0		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (sm + ... + 0) != 2		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (so + ...) != 6		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (sp + ... + 0) != 0		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (0 + ... + su) != 0)		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+     __builtin_abort ();
+   S s2[] = { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } };
+   int i = 0;
+   for (auto [sx, ...sy [[]]] : s2)	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+     {					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+       static_assert (sizeof... (sy) == 2, "");
+       static_assert (same_type <decltype (sx), int>::value, "");
+       static_assert (same_type <decltype (sy...[0]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (sy...[1]), short>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       if (sx != i * 3 + 1 || sum (sy...) != i * 6 + 5)
+ 	__builtin_abort ();
+       auto fn1 = [&] () { if (sum (sy...) != i * 6 + 5) __builtin_abort (); }; // { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn1 ();
+       auto fn2 = [&sy..., &i] () { if (sum (sy...) != i * 6 + 5) __builtin_abort (); }; // { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn2 ();
+       auto fn3 = [&...sy2 = sy, &i] () { if (sum (sy2...) != i * 6 + 5) __builtin_abort (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn3 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+       auto fn4 = [&...sy3 = ref (sy), &i] () { if (sum (sy3...) != i * 6 + 5) __builtin_abort (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn4 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+       auto fn5 = [=] () { if (sum (sy...) != i * 6 + 5) __builtin_abort (); }; // { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn5 ();
+       auto fn6 = [sy..., i] () { if (sum (sy...) != i * 6 + 5) __builtin_abort (); }; // { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn6 ();
+       auto fn7 = [...sy2 = sy, i] () { if (sum (sy2...) != i * 6 + 5) __builtin_abort (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn7 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+       auto fn8 = [...sy3 = square (sy), i] () { if (sum (sy3...) != (i * 3 + 2) * (i * 3 + 2) + (i * 3 + 3) * (i * 3 + 3)) __builtin_abort (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn8 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+       auto fn9 = [&] () { auto fn = [&] () { if (sum (sy...) != i * 6 + 5) __builtin_abort (); }; fn (); }; // { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn9 ();
+       auto fn10 = [&sy..., &i] () { auto fn = [&] () { if (sum (sy...) != i * 6 + 5) __builtin_abort (); }; fn (); }; // { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn10 ();
+       auto fn11 = [&] () { auto fn = [&...sy2 = sy, &i] () { if (sum (sy2...) != i * 6 + 5) __builtin_abort (); }; fn (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn11 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+ 					// { dg-warning "captured structured bindings are" "" { target c++17_down } .-2 }
+       auto fn12 = [&sy..., &i] () { auto fn = [&...sy3 = ref (sy), &i] () { if (sum (sy3...) != i * 6 + 5) __builtin_abort (); }; fn (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn12 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+ 					// { dg-warning "captured structured bindings are" "" { target c++17_down } .-2 }
+       auto fn13 = [=] () { auto fn = [=] () { if (sum (sy...) != i * 6 + 5) __builtin_abort (); }; fn (); }; // { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn13 ();
+       auto fn14 = [sy..., i] () { auto fn = [=] () { if (sum (sy...) != i * 6 + 5) __builtin_abort (); }; fn (); }; // { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn14 ();
+       auto fn15 = [=] () { auto fn = [...sy2 = sy, i] () { if (sum (sy2...) != i * 6 + 5) __builtin_abort (); }; fn (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn15 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+ 					// { dg-warning "captured structured bindings are" "" { target c++17_down } .-2 }
+       auto fn16 = [&sy..., &i] () { auto fn = [...sy3 = square (sy), i] () { if (sum (sy3...) != (i * 3 + 2) * (i * 3 + 2) + (i * 3 + 3) * (i * 3 + 3)) __builtin_abort (); }; fn (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn16 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+ 					// { dg-warning "captured structured bindings are" "" { target c++17_down } .-2 }
+       ++i;
+     }
+   i = 0;
+   for (auto [...sz] : s2)		// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+     {					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+       static_assert (sizeof... (sz) == 3, "");
+       static_assert (same_type <decltype (sz...[0]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (sz...[1]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (sz...[2]), short>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       if (sum (sz...) != i * 9 + 6)
+ 	__builtin_abort ();
+       auto fn = [=] () { if (sum (sz...) != i * 9 + 6) __builtin_abort (); };	// { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn ();
+       ++i;
+     }
+   if (auto [...sx, sy] = s)		// { dg-warning "structured bindings in conditions only available with" "" { target c++23_down } }
+     {
+       static_assert (sizeof... (sx) == 2, "");
+       static_assert (same_type <decltype (sx...[0]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (sx...[1]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (sy), short>::value, "");
+       if (sum (sx...) != 3 || sy != 3)
+ 	__builtin_abort ();
+     }
+   else
+     __builtin_abort ();
+   T t = T { 3, 1, 2 };
+   auto [ta, tb, tc] = T { 3, 1, 2 };	// { dg-warning "structured bindings only available with" "" { target c++14_down } }
+   static_assert (same_type <decltype (ta), int>::value, "");
+   static_assert (same_type <decltype (tb), long long>::value, "");
+   static_assert (same_type <decltype (tc), short>::value, "");
+   auto [td [[maybe_unused]], ...te] = T { 3, 1, 2 }; // { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (te) == 2, "");
+   static_assert (same_type <decltype (td), int>::value, "");
+   static_assert (same_type <decltype (te...[0]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (te...[1]), short>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   auto [...tf [[maybe_unused]], tg] = T { 3, 1, 2 }; // { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (tf) == 2, "");
+   static_assert (same_type <decltype (tf...[0]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (tf...[1]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (tg), short>::value, "");
+   const auto & [th, ti, tj, ...tk] = t;	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (tk) == 0, "");
+   static_assert (same_type <decltype (th), const int>::value, "");
+   static_assert (same_type <decltype (ti), const long long>::value, "");
+   static_assert (same_type <decltype (tj), const short>::value, "");
+   auto [tl [[]], ...tm [[]], tn [[]]] = T { 3, 1, 2 }; // { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (tm) == 1, "");
+   static_assert (same_type <decltype (tl), int>::value, "");
+   static_assert (same_type <decltype (tm...[0]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (tn), short>::value, "");
+   auto && [...to] = t;			// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (to) == 3, "");
+   constexpr size_t tos = sizeof... (to);
+   static_assert (same_type <decltype (to...[0]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (to...[1]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (to...[2]), short>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   auto [...tp, tq [[]], tr, ts] = T { 3, 1, 2 };// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (tp) == 0, "");
+   static_assert (same_type <decltype (tq), int>::value, "");
+   static_assert (same_type <decltype (tr), long long>::value, "");
+   static_assert (same_type <decltype (ts), short>::value, "");
+   auto [tt, ...tu [[]], tv, tw] = T { 3, 1, 2 };// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (tu) == 0, "");
+   static_assert (same_type <decltype (tt), int>::value, "");
+   static_assert (same_type <decltype (tv), long long>::value, "");
+   static_assert (same_type <decltype (tw), short>::value, "");
+   if (ta != 1 || tb != 2 || tc != 3
+       || td != 1 || te...[0] != 2 || te...[1] != 3	// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || tf...[0] != 1 || tf...[1] != 2 || tg != 3	// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || th != 1 || ti != 2 || tj != 3
+       || tl != 1 || tm...[0] != 2 || tn != 3		// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || to...[0] != 1 || to...[1] != 2 || to...[2] != 3// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || tq != 1 || tr != 2 || ts != 3
+       || tt != 1 || tv != 2 || tw != 3
+       || sum (te...) != 5
+       || sum <decltype (te)...> (te...) != 5
+       || sum (square (square (te))...) != 97
+       || sum (tf...) != 3
+       || sum (tk...) != 0
+       || sum (tm...) != 2
+       || sum (to...) != 6
+       || sum <decltype (to)...> (to...) != 6
+       || sum (square (to)...) != 14
+       || sum (tp...) != 0
+       || sum (tu...) != 0
+       || (te + ...) != 5		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (... + tf) != 3		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (0 + ... + tk) != 0		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (tm + ... + 0) != 2		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (to + ...) != 6		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (tp + ... + 0) != 0		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (0 + ... + tu) != 0)		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+     __builtin_abort ();
+   T t2[] = { { 3, 1, 2 }, { 6, 4, 5 }, { 9, 7, 8 } };
+   i = 0;
+   for (auto [tx, ...ty] : t2)		// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+     {					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+       static_assert (sizeof... (ty) == 2, "");
+       static_assert (same_type <decltype (tx), int>::value, "");
+       static_assert (same_type <decltype (ty...[0]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (ty...[1]), short>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       if (tx != i * 3 + 1 || sum (ty...) != i * 6 + 5)
+ 	__builtin_abort ();
+       auto fn1 = [&] () { if (sum (ty...) != i * 6 + 5) __builtin_abort (); };
+       fn1 ();
+       auto fn2 = [&ty..., &i] () { if (sum (ty...) != i * 6 + 5) __builtin_abort (); }; // { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn2 ();
+       auto fn3 = [&...ty2 = ty, &i] () { if (sum (ty2...) != i * 6 + 5) __builtin_abort (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn3 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+       auto fn4 = [&...ty3 = ref (ty), &i] () { if (sum (ty3...) != i * 6 + 5) __builtin_abort (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn4 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+       auto fn5 = [=] () { if (sum (ty...) != i * 6 + 5) __builtin_abort (); };
+       fn5 ();
+       auto fn6 = [ty..., i] () { if (sum (ty...) != i * 6 + 5) __builtin_abort (); }; // { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn6 ();
+       auto fn7 = [...ty2 = ty, i] () { if (sum (ty2...) != i * 6 + 5) __builtin_abort (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn7 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+       auto fn8 = [...ty3 = square (ty), i] () { if (sum (ty3...) != (i * 3 + 2) * (i * 3 + 2) + (i * 3 + 3) * (i * 3 + 3)) __builtin_abort (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn8 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+       auto fn9 = [&] () { auto fn = [&] () { if (sum (ty...) != i * 6 + 5) __builtin_abort (); }; fn (); };
+       fn9 ();
+       auto fn10 = [&ty..., &i] () { auto fn = [&] () { if (sum (ty...) != i * 6 + 5) __builtin_abort (); }; fn (); }; // { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn10 ();
+       auto fn11 = [&] () { auto fn = [&...ty2 = ty, &i] () { if (sum (ty2...) != i * 6 + 5) __builtin_abort (); }; fn (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn11 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+       auto fn12 = [&ty..., &i] () { auto fn = [&...ty3 = ref (ty), &i] () { if (sum (ty3...) != i * 6 + 5) __builtin_abort (); }; fn (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn12 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+ 					// { dg-warning "captured structured bindings are" "" { target c++17_down } .-2 }
+       auto fn13 = [=] () { auto fn = [=] () { if (sum (ty...) != i * 6 + 5) __builtin_abort (); }; fn (); };
+       fn13 ();
+       auto fn14 = [ty..., i] () { auto fn = [=] () { if (sum (ty...) != i * 6 + 5) __builtin_abort (); }; fn (); }; // { dg-warning "captured structured bindings are" "" { target c++17_down } }
+       fn14 ();
+       auto fn15 = [=] () { auto fn = [...ty2 = ty, i] () { if (sum (ty2...) != i * 6 + 5) __builtin_abort (); }; fn (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn15 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+       auto fn16 = [&ty..., &i] () { auto fn = [...ty3 = square (ty), i] () { if (sum (ty3...) != (i * 3 + 2) * (i * 3 + 2) + (i * 3 + 3) * (i * 3 + 3)) __builtin_abort (); }; fn (); }; // { dg-warning "pack init-capture only available with" "" { target c++17_down } }
+       fn16 ();				// { dg-warning "lambda capture initializers only available with" "" { target c++11_only } .-1 }
+ 					// { dg-warning "captured structured bindings are" "" { target c++17_down } .-2 }
+       ++i;
+     }
+   i = 0;
+   for (auto [...tz] : t2)		// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+     {					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+       static_assert (sizeof... (tz) == 3, "");
+       static_assert (same_type <decltype (tz...[0]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (tz...[1]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (tz...[2]), short>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       if (sum (tz...) != i * 9 + 6)
+ 	__builtin_abort ();
+       auto fn = [=] () { if (sum (tz...) != i * 9 + 6) __builtin_abort (); };
+       fn ();
+       ++i;
+     }
+   if (auto [...tx [[maybe_unused]], ty] = t) // { dg-warning "structured bindings in conditions only available with" "" { target c++23_down } }
+     __builtin_abort ();
+   else
+     {
+       static_assert (sizeof... (tx) == 2, "");
+       static_assert (same_type <decltype (tx...[0]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (tx...[1]), long long>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (ty), short>::value, "");
+       if (sum (tx...) != 3 || ty != 3)
+ 	__builtin_abort ();
+     }
+   U a[3] = { 1, 2, 3 };
+   auto [aa, ab, ac] = a;	// { dg-warning "structured bindings only available with" "" { target c++14_down } }
+   static_assert (same_type <decltype (aa), int>::value, "");
+   static_assert (same_type <decltype (ab), int>::value, "");
+   static_assert (same_type <decltype (ac), int>::value, "");
+   auto [ad [[maybe_unused]], ...ae [[maybe_unused]]] = a; // { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 				// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 				// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (ae) == 2, "");
+   static_assert (same_type <decltype (ad), int>::value, "");
+   static_assert (same_type <decltype (ae...[0]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (ae...[1]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   auto [...af, ag] = a;		// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 				// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (af) == 2, "");
+   static_assert (same_type <decltype (af...[0]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (af...[1]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (ag), int>::value, "");
+   auto [ah, ai [[]], aj, ...ak [[]]] = a; // { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 				// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 				// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (ak) == 0, "");
+   static_assert (same_type <decltype (ah), int>::value, "");
+   static_assert (same_type <decltype (ai), int>::value, "");
+   static_assert (same_type <decltype (aj), int>::value, "");
+   auto [al, ...am [[]], an] = a;// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 				// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 				// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (am) == 1, "");
+   static_assert (same_type <decltype (al), int>::value, "");
+   static_assert (same_type <decltype (am...[0]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (an), int>::value, "");
+   const auto &[...ao] = a;	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 				// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (ao) == 3, "");
+   static_assert (same_type <decltype (ao...[0]), const int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (ao...[1]), const int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (ao...[2]), const int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   auto &&[...ap, aq, ar [[]], as] = a;// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 				// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 				// { dg-warning "structured bindings with attributed identifiers only available with" "" { target { c++17 && c++23_down } } .-2 }
+   static_assert (sizeof... (ap) == 0, "");
+   static_assert (same_type <decltype (aq), int>::value, "");
+   static_assert (same_type <decltype (ar), int>::value, "");
+   static_assert (same_type <decltype (as), int>::value, "");
+   auto [at, ...au, av, aw] = a;	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 				// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (au) == 0, "");
+   static_assert (same_type <decltype (at), int>::value, "");
+   static_assert (same_type <decltype (av), int>::value, "");
+   static_assert (same_type <decltype (aw), int>::value, "");
+   if (aa != 1 || ab != 2 || ac != 3
+       || ad != 1 || ae...[0] != 2 || ae...[1] != 3	// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || af...[0] != 1 || af...[1] != 2 || ag != 3	// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || ah != 1 || ai != 2 || aj != 3
+       || al != 1 || am...[0] != 2 || an != 3		// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || ao...[0] != 1 || ao...[1] != 2 || ao...[2] != 3// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || aq != 1 || ar != 2 || as != 3
+       || at != 1 || av != 2 || aw != 3
+       || sum (ae...) != 5
+       || sum <decltype (ae)...> (ae...) != 5
+       || sum (square (square (ae))...) != 97
+       || sum (af...) != 3
+       || sum (ak...) != 0
+       || sum (am...) != 2
+       || sum (ao...) != 6
+       || sum <decltype (ao)...> (ao...) != 6
+       || sum (square (ao)...) != 14
+       || sum (ap...) != 0
+       || sum (au...) != 0
+       || (ae + ...) != 5		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (... + af) != 3		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (0 + ... + ak) != 0		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (am + ... + 0) != 2		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (ao + ...) != 6		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (ap + ... + 0) != 0		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (0 + ... + au) != 0)		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+     __builtin_abort ();
+   return tos;
+ }
+ 
+ int
+ main ()
+ {
+   if (foo <S, T, int> () != 3)
+     __builtin_abort ();
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/cpp26/decomp16.C gcc-16-20250810/gcc/testsuite/g++.dg/cpp26/decomp16.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/cpp26/decomp16.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/cpp26/decomp16.C	Sun Aug 10 22:32:11 2025
***************
*** 0 ****
--- 1,240 ----
+ // P1061R10 - Structured Bindings can introduce a Pack
+ // { dg-do run { target c++11 } }
+ // { dg-options "" }
+ 
+ int
+ sum ()
+ {
+   return 0;
+ }
+ 
+ template <typename T, typename ...A>
+ T
+ sum (T x, A... y)
+ {
+   return x + sum (y...);
+ }
+ 
+ template <typename T>
+ T
+ square (T x)
+ {
+   return x * x;
+ }
+ 
+ template <typename T, typename U>
+ struct same_type { static const bool value = false; };
+ 
+ template <typename T>
+ struct same_type<T, T> { static const bool value = true; };
+ 
+ typedef int V __attribute__((vector_size (16 * sizeof (int))));
+ 
+ template <int N>
+ void
+ foo ()
+ {
+   V v = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
+   auto [...va] = v;			// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (va) == 16, "");
+   static_assert (same_type <decltype (va...[5]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (va...[13]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   auto [vb, ...vc, vd, ve] = v;		// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (vc) == 13, "");
+   static_assert (same_type <decltype (vb), int>::value, "");
+   static_assert (same_type <decltype (vc...[0]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (vc...[12]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (vd), int>::value, "");
+   static_assert (same_type <decltype (ve), int>::value, "");
+   auto [vf, vg, vh, vi, ...vj] = v;	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (vj) == 12, "");
+   static_assert (same_type <decltype (vf), int>::value, "");
+   static_assert (same_type <decltype (vg), int>::value, "");
+   static_assert (same_type <decltype (vh), int>::value, "");
+   static_assert (same_type <decltype (vi), int>::value, "");
+   static_assert (same_type <decltype (vj...[2]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (vj...[10]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   if (va...[13] != 14			// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || sum (va...) != 8 * 17
+       || sum (square (va)...) != 1496
+       || vb != 1
+       || vc...[10] != 12		// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || sum (vc...) != 15 * 7 - 1
+       || sum <decltype (vc)...> (vc...) != 15 * 7 - 1
+       || vd != 15 || ve != 16
+       || vf != 1 || vg != 2 || vh != 3 || vi != 4
+       || sum (vj...) != 8 * 17 - 10
+       || (va + ...) != 8 * 17		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (... + vc) != 15 * 7 - 1	// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (0 + ... + vj) != 8 * 17 - 10)	// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+     __builtin_abort ();
+   V v2[3] = { v, v + 1, v + 2 };
+   int i = 0;
+   for (auto [vk, ...vl, vm] : v2)	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+     {					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+       static_assert (sizeof... (vl) == 14, "");
+       static_assert (same_type <decltype (vk), int>::value, "");
+       static_assert (same_type <decltype (vl...[1]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (vl...[9]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (vm), int>::value, "");
+       if (vk != i + 1 || sum (vl...) != i * 14 + 15 * 8 - 1 || vm != i + 16)
+ 	__builtin_abort ();
+       ++i;
+     }
+   _Complex double c = 1.0 + 2.0i;
+   auto [...ca] = c;			// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (ca) == 2, "");
+   static_assert (same_type <decltype (ca...[0]), double>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (ca...[1]), double>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   auto [cb, ...cc, cd] = c;		// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (cc) == 0, "");
+   static_assert (same_type <decltype (cb), double>::value, "");
+   static_assert (same_type <decltype (cd), double>::value, "");
+   auto [ce, ...cf] = c;			// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (cf) == 1, "");
+   static_assert (same_type <decltype (ce), double>::value, "");
+   static_assert (same_type <decltype (cf...[0]), double>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   auto [...cg, ch] = c;			// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (cg) == 1, "");
+   static_assert (same_type <decltype (cg...[0]), double>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (ch), double>::value, "");
+   if (ca...[0] != 1.0 || ca...[1] != 2.0// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || sum (ca...) != 3.0
+       || sum <decltype (ca)...> (ca...) != 3.0
+       || sum (square (square (square (ca)))...) != 257.0
+       || cb != 1.0 || cd != 2.0
+       || ce != 1.0 || cf...[0] != 2.0	// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || sum (cf...) != 2.0
+       || cg...[0] != 1.0 || ch != 2.0	// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || sum (cg...) != 1.0
+       || (ca + ...) != 3.0		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (0.0 + ... + cc) != 0.0	// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (... + cf) != 2.0		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (cg + ... + 0.0) != 1.0)	// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+     __builtin_abort ();
+   _Complex float c2[3] = { 1.0f + 2.0fi, 2.0f + 3.0fi, 3.0f + 4.0fi };
+   i = 0;
+   for (auto [...ci] : c2)		// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+     {					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+       static_assert (sizeof... (ci) == 2, "");
+       static_assert (same_type <decltype (ci...[0]), float>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (ci...[1]), float>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       if (sum (ci...) != i * 2 + 3.0f)
+ 	__builtin_abort ();
+       ++i;
+     }
+ }
+ 
+ template <typename V, typename C, typename D>
+ void
+ bar ()
+ {
+   V v = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
+   auto [...va] = v;			// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (va) == 16, "");
+   static_assert (same_type <decltype (va...[5]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (va...[13]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   auto [vb, ...vc, vd, ve] = v;		// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (vc) == 13, "");
+   static_assert (same_type <decltype (vb), int>::value, "");
+   static_assert (same_type <decltype (vc...[0]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (vc...[12]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (vd), int>::value, "");
+   static_assert (same_type <decltype (ve), int>::value, "");
+   auto [vf, vg, vh, vi, ...vj] = v;	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (vj) == 12, "");
+   static_assert (same_type <decltype (vf), int>::value, "");
+   static_assert (same_type <decltype (vg), int>::value, "");
+   static_assert (same_type <decltype (vh), int>::value, "");
+   static_assert (same_type <decltype (vi), int>::value, "");
+   static_assert (same_type <decltype (vj...[2]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (vj...[10]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   if (va...[13] != 14			// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || sum (va...) != 8 * 17
+       || vb != 1
+       || vc...[10] != 12		// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || sum (vc...) != 15 * 7 - 1
+       || sum <decltype (vc)...> (vc...) != 15 * 7 - 1
+       || vd != 15 || ve != 16
+       || vf != 1 || vg != 2 || vh != 3 || vi != 4
+       || sum (vj...) != 8 * 17 - 10
+       || (va + ...) != 8 * 17		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (... + vc) != 15 * 7 - 1	// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (0 + ... + vj) != 8 * 17 - 10)	// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+     __builtin_abort ();
+   V v2[3] = { v, v + 1, v + 2 };
+   int i = 0;
+   for (auto [vk, ...vl, vm] : v2)	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+     {					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+       static_assert (sizeof... (vl) == 14, "");
+       static_assert (same_type <decltype (vk), int>::value, "");
+       static_assert (same_type <decltype (vl...[1]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (vl...[9]), int>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (vm), int>::value, "");
+       if (vk != i + 1 || sum (vl...) != i * 14 + 15 * 8 - 1 || vm != i + 16)
+ 	__builtin_abort ();
+       ++i;
+     }
+   C c = 1.0 + 2.0i;
+   auto [...ca] = c;			// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (ca) == 2, "");
+   static_assert (same_type <decltype (ca...[0]), double>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (ca...[1]), double>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   auto [cb, ...cc, cd] = c;		// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (cc) == 0, "");
+   static_assert (same_type <decltype (cb), double>::value, "");
+   static_assert (same_type <decltype (cd), double>::value, "");
+   auto [ce, ...cf] = c;			// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (cf) == 1, "");
+   static_assert (same_type <decltype (ce), double>::value, "");
+   static_assert (same_type <decltype (cf...[0]), double>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   auto [...cg, ch] = c;			// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (cg) == 1, "");
+   static_assert (same_type <decltype (cg...[0]), double>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   static_assert (same_type <decltype (ch), double>::value, "");
+   if (ca...[0] != 1.0 || ca...[1] != 2.0// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || sum (ca...) != 3.0
+       || sum <decltype (ca)...> (ca...) != 3.0
+       || cb != 1.0 || cd != 2.0
+       || ce != 1.0 || cf...[0] != 2.0	// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || sum (cf...) != 2.0
+       || cg...[0] != 1.0 || ch != 2.0	// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       || sum (cg...) != 1.0
+       || (ca + ...) != 3.0		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (0.0 + ... + cc) != 0.0	// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (... + cf) != 2.0		// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+       || (cg + ... + 0.0) != 1.0)	// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+     __builtin_abort ();
+   D c2[3] = { 1.0f + 2.0fi, 2.0f + 3.0fi, 3.0f + 4.0fi };
+   i = 0;
+   for (auto [...ci] : c2)		// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+     {					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+       static_assert (sizeof... (ci) == 2, "");
+       static_assert (same_type <decltype (ci...[0]), float>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       static_assert (same_type <decltype (ci...[1]), float>::value, ""); // { dg-warning "pack indexing only available with" "" { target c++23_down } }
+       if (sum (ci...) != i * 2 + 3.0f)
+ 	__builtin_abort ();
+       ++i;
+     }
+ }
+ 
+ int
+ main ()
+ {
+   foo <0> ();
+   bar <V, _Complex double, _Complex float> ();
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/cpp26/decomp17.C gcc-16-20250810/gcc/testsuite/g++.dg/cpp26/decomp17.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/cpp26/decomp17.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/cpp26/decomp17.C	Sun Aug 10 22:32:11 2025
***************
*** 0 ****
--- 1,28 ----
+ // P1061R10 - Structured Bindings can introduce a Pack
+ // { dg-do compile { target c++11 } }
+ // { dg-options "" }
+ 
+ typedef int V __attribute__((vector_size (16 * sizeof (int))));
+ 
+ template <int N>
+ void
+ foo ()
+ {
+   V v = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
+   auto [va, vb, vc, vd, ...ve, vf, vg, vh, vi, vj, vk, vl, vm, vn, vo, vp, vq, vr] = v;
+ 					// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } .-1 }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-2 }
+ 					// { dg-error "18 names provided for structured binding" "" { target *-*-* } .-3 }
+ 					// { dg-message "while '__vector\\\(16\\\) int' decomposes into 16 elements" "" { target *-*-* } .-4 }
+   _Complex double c = 1.0 + 2.0i;
+   auto [...ca, cb, cc, cd] = c;		// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-error "4 names provided for structured binding" "" { target *-*-* } .-2 }
+ 					// { dg-message "while '__complex__ double' decomposes into 2 elements" "" { target *-*-* } .-3 }
+ }
+ 
+ int
+ main ()
+ {
+   foo <0> ();
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/cpp26/decomp18.C gcc-16-20250810/gcc/testsuite/g++.dg/cpp26/decomp18.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/cpp26/decomp18.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/cpp26/decomp18.C	Sun Aug 10 22:32:11 2025
***************
*** 0 ****
--- 1,109 ----
+ // P1061R10 - Structured Bindings can introduce a Pack
+ // { dg-do run { target c++11 } }
+ // { dg-options "" }
+ 
+ struct S { int a, b, c; };
+ namespace std {
+   template <typename T> struct tuple_size;
+   template <int, typename> struct tuple_element;
+ }
+ struct T {
+   int a[3];
+   template <int I>
+   int &get () { return a[2 - I]; }
+ };
+ template <>
+ struct std::tuple_size<T> { static constexpr int value = 3; };
+ template <int N>
+ struct std::tuple_element<N, T> { typedef int type; };
+ 
+ template <int N>
+ inline int
+ foo ()
+ {
+   static int a[4] = { N, N + 1, N + 2, N + 3 };
+   static auto [...aa] = a;		// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured binding declaration can be 'static' only in" "" { target c++17_down } .-2 }
+   aa...[1]++;				// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   return (... + aa);			// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+ }
+ 
+ template <int N>
+ inline int
+ bar ()
+ {
+   static S s = { N, N + 1, N + 2 };
+   static auto [...sa] = s;		// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured binding declaration can be 'static' only in" "" { target c++17_down } .-2 }
+   sa...[1]++;				// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   return (sa + ...);			// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+ }
+ 
+ template <int N>
+ inline int
+ baz ()
+ {
+   static T t = { { N, N + 1, N + 2 } };
+   static auto [ta, ...tb, tc, td] = t;	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured binding declaration can be 'static' only in" "" { target c++17_down } .-2 }
+   tc++;
+   return ((ta + tc + td) + ... + tb);	// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+ }
+ 
+ template <int N>
+ inline int
+ qux ()
+ {
+   thread_local int a[4] = { N, N + 1, N + 2, N + 3 };
+   thread_local auto [...aa] = a;	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured binding declaration can be 'thread_local' only in" "" { target c++17_down } .-2 }
+   aa...[1]++;				// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   return (... + aa);			// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+ }
+ 
+ template <int N>
+ inline int
+ freddy ()
+ {
+   thread_local S s = { N, N + 1, N + 2 };
+   thread_local auto [...sa] = s;	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured binding declaration can be 'thread_local' only in" "" { target c++17_down } .-2 }
+   sa...[1]++;				// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+   return (sa + ...);			// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+ }
+ 
+ template <int N>
+ inline int
+ corge ()
+ {
+   thread_local T t = { { N, N + 1, N + 2 } };
+   thread_local auto [ta, ...tb, tc, td] = t;	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured binding declaration can be 'thread_local' only in" "" { target c++17_down } .-2 }
+   tc++;
+   return ((ta + tc + td) + ... + tb);	// { dg-warning "fold-expressions only available with" "" { target c++14_down } }
+ }
+ 
+ int
+ main ()
+ {
+   if (foo <2> () != 15 || foo <2> () != 16 || foo <2> () != 17
+       || foo <42> () != 175 || foo <42> () != 176
+       || bar <5> () != 19 || bar <5> () != 20 || bar <5> () != 21
+       || bar <18> () != 58 || bar <18> () != 59
+       || baz <3> () != 13 || baz <3> () != 14 || baz <3> () != 15
+       || baz <22> () != 70 || baz <22> () != 71)
+     __builtin_abort ();
+   if (qux <2> () != 15 || qux <2> () != 16 || qux <2> () != 17
+       || qux <42> () != 175 || qux <42> () != 176
+       || freddy <5> () != 19 || freddy <5> () != 20 || freddy <5> () != 21
+       || freddy <18> () != 58 || freddy <18> () != 59
+       || corge <3> () != 13 || corge <3> () != 14 || corge <3> () != 15
+       || corge <22> () != 70 || corge <22> () != 71)
+     __builtin_abort ();
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/cpp26/decomp19.C gcc-16-20250810/gcc/testsuite/g++.dg/cpp26/decomp19.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/cpp26/decomp19.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/cpp26/decomp19.C	Sun Aug 10 22:32:11 2025
***************
*** 0 ****
--- 1,46 ----
+ // P1061R10 - Structured Bindings can introduce a Pack
+ // { dg-do compile { target c++11 } }
+ // { dg-options "" }
+ 
+ namespace std {
+   template <typename T> struct tuple_size;
+   template <int, typename> struct tuple_element;
+ }
+ struct T {
+   int a[3];
+   template <int I>
+   int &get () { return a[2 - I]; }
+ };
+ template <>
+ struct std::tuple_size<T> { static constexpr int value = 3; };
+ template <int N>
+ struct std::tuple_element<N, T> { typedef int type; };
+ 
+ template <int N>
+ inline void
+ foo ()
+ {
+   static T t = { { N, N + 1, N + 2 } };
+   static auto [ta, ...tb, tc] = t;	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured binding declaration can be 'static' only in" "" { target c++17_down } .-2 }
+ 					// { dg-message "mangling of structured binding pack elements not implemented yet" "" { target *-*-* } .-3 }
+ }
+ 
+ template <int N>
+ inline void
+ bar ()
+ {
+   thread_local T t = { { N, N + 1, N + 2 } };
+   thread_local auto [...ta] = t;	// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 					// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+ 					// { dg-warning "structured binding declaration can be 'thread_local' only in" "" { target c++17_down } .-2 }
+ 					// { dg-message "mangling of structured binding pack elements not implemented yet" "" { target *-*-* } .-3 }
+ }
+ 
+ int
+ main ()
+ {
+   foo <0> ();
+   bar <0> ();
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/cpp26/decomp20.C gcc-16-20250810/gcc/testsuite/g++.dg/cpp26/decomp20.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/cpp26/decomp20.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/cpp26/decomp20.C	Sun Aug 10 22:32:11 2025
***************
*** 0 ****
--- 1,53 ----
+ // P1061R10 - Structured Bindings can introduce a Pack
+ // { dg-do compile { target c++11 } }
+ // { dg-options "" }
+ 
+ struct S {
+   explicit operator bool () const noexcept { return true; }
+ };
+ namespace std {
+   template <typename T> struct tuple_size;
+   template <int, typename> struct tuple_element;
+ }
+ int x;
+ struct T {
+   template <int I>
+   int &get () { return x; }
+   explicit operator bool () const noexcept { return false; }
+ };
+ template <>
+ struct std::tuple_size<T> { static constexpr int value = 0; };
+ template <int N>
+ struct std::tuple_element<N, T> { typedef int type; };
+ 
+ template <int N>
+ void
+ foo ()
+ {
+   int a[0] = {};
+   auto [...aa] = a;		// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 				// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (aa) == 0, "");
+   S s = {};
+   auto [...sa] = s;		// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 				// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (sa) == 0, "");
+   T t = {};
+   auto [...ta] = t;		// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 				// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (ta) == 0, "");
+   if (auto [...sb] = s)		// { dg-warning "structured bindings in conditions only available with" "" { target c++23_down } }
+     static_assert (sizeof... (sb) == 0, "");
+   else
+     __builtin_abort ();
+   if (auto [...tb] = t)		// { dg-warning "structured bindings in conditions only available with" "" { target c++23_down } }
+     __builtin_abort ();
+   else
+     static_assert (sizeof... (tb) == 0, "");
+ }
+ 
+ int
+ main ()
+ {
+   foo <0> ();
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/cpp26/decomp21.C gcc-16-20250810/gcc/testsuite/g++.dg/cpp26/decomp21.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/cpp26/decomp21.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/cpp26/decomp21.C	Sun Aug 10 22:32:11 2025
***************
*** 0 ****
--- 1,103 ----
+ // P1061R10 - Structured Bindings can introduce a Pack
+ // { dg-do run { target c++11 } }
+ // { dg-options "" }
+ 
+ using size_t = decltype (sizeof 0);
+ 
+ auto g () -> int (&)[4]
+ {
+   static int a[4] = { 1, 2, 3, 4 };
+   return a;
+ }
+ 
+ template <size_t N>
+ void
+ h (int (&arr)[N])
+ {
+   auto [a, ...b, c] = arr;				// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 							// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (b) == 2, "");
+   auto &[f, ...g, h] = arr;				// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 							// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (g) == 2, "");
+   if (&f != &arr[0] || &h != &arr[3]
+       || &g...[0] != &arr[1] || &g...[1] != &arr[2])	// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+     __builtin_abort ();
+   auto &[...e] = arr;					// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 							// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof ... (e) == 4, "");
+   if (&e...[0] != &arr[0] || &e...[3] != &arr[3])	// { dg-warning "pack indexing only available with" "" { target c++23_down } }
+     __builtin_abort ();
+ }
+ 
+ struct C { int x, y, z; };
+ 
+ template <class T>
+ void
+ now_i_know_my ()
+ {
+   auto [a, b, c] = C ();				// { dg-warning "structured bindings only available with" "" { target c++14_down } }
+   auto [d, ...e] = C ();				// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 							// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (e) == 2, "");
+   auto [...f, g] = C ();				// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 							// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (f) == 2, "");
+   auto [h, i, j, ...k] = C ();				// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 							// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (k) == 0, "");
+ //  auto [l, m, n, o, ...p] = C ();
+ }
+ 
+ auto foo () -> int (&)[2]
+ {
+   static int a[2] = { 1, 2 };
+   return a;
+ }
+ 
+ template <class T>
+ void
+ bar ()
+ {
+   auto [...a] = foo ();					// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 							// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (a) == 2, "");
+   auto [b, c, ...d] = foo ();				// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 							// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   static_assert (sizeof... (d) == 0, "");
+ }
+ 
+ struct D { };
+ 
+ void
+ baz (...)
+ {
+   __builtin_abort ();
+ }
+ 
+ template <typename T>
+ void
+ qux ()
+ {
+   D arr[1] = {};
+   auto [...e] = arr;					// { dg-warning "structured binding packs only available with" "" { target { c++17 && c++23_down } } }
+ 							// { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 }
+   baz (e...);
+ }
+ 
+ int d;
+ 
+ void
+ baz (D)
+ {
+   d = 1;
+ }
+ 
+ int
+ main ()
+ {
+   h (g ());
+   now_i_know_my <int> ();
+   bar <int> ();
+   qux <int> ();
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/cpp26/feat-cxx26.C gcc-16-20250810/gcc/testsuite/g++.dg/cpp26/feat-cxx26.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/cpp26/feat-cxx26.C	Sun Aug  3 22:32:23 2025
--- gcc-16-20250810/gcc/testsuite/g++.dg/cpp26/feat-cxx26.C	Sun Aug 10 22:32:11 2025
***************
*** 395,402 ****
  
  #ifndef __cpp_structured_bindings
  #  error "__cpp_structured_bindings"
! #elif __cpp_structured_bindings != 202403
! #  error "__cpp_structured_bindings != 202403"
  #endif
  
  #ifndef __cpp_template_template_args
--- 395,402 ----
  
  #ifndef __cpp_structured_bindings
  #  error "__cpp_structured_bindings"
! #elif __cpp_structured_bindings != 202411
! #  error "__cpp_structured_bindings != 202411"
  #endif
  
  #ifndef __cpp_template_template_args
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/cpp2a/concepts-using5.C gcc-16-20250810/gcc/testsuite/g++.dg/cpp2a/concepts-using5.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/cpp2a/concepts-using5.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/cpp2a/concepts-using5.C	Sun Aug 10 22:32:11 2025
***************
*** 0 ****
--- 1,19 ----
+ // PR c++/121351
+ // { dg-do compile { target c++20 } }
+ 
+ template<class T> concept C = true;
+ 
+ template<class T>
+ struct A {
+   template<class U> void f(U) requires C<T> = delete; // #1
+ };
+ 
+ struct B : A<int> {
+   using A::f;
+   template<class U> void f(U) requires C<int>; // #2
+ };
+ 
+ int main() {
+   B b;
+   b.f(42); // OK, #2 corresponds to and therefore hides #1
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/cpp2a/concepts-using5a.C gcc-16-20250810/gcc/testsuite/g++.dg/cpp2a/concepts-using5a.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/cpp2a/concepts-using5a.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/cpp2a/concepts-using5a.C	Sun Aug 10 22:32:11 2025
***************
*** 0 ****
--- 1,20 ----
+ // PR c++/121351
+ // { dg-do compile { target c++20 } }
+ // A version of concepts-using5a.C where B instead of A is a template.
+ 
+ template<class T> concept C = true;
+ 
+ struct A {
+   template<class U> void f(U) requires C<int> = delete; // #1
+ };
+ 
+ template<class T>
+ struct B : A {
+   using A::f;
+   template<class U> void f(U) requires C<T>; // #2
+ };
+ 
+ int main() {
+   B<int> b;
+   b.f(42); // OK, #2 corresponds to and therefore hides #1
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/cpp2a/concepts-using6.C gcc-16-20250810/gcc/testsuite/g++.dg/cpp2a/concepts-using6.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/cpp2a/concepts-using6.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/cpp2a/concepts-using6.C	Sun Aug 10 22:32:11 2025
***************
*** 0 ****
--- 1,20 ----
+ // PR c++/121351
+ // { dg-do compile { target c++20 } }
+ 
+ template<class T> concept C = true;
+ 
+ template<class T>
+ struct A {
+   template<class U> void f(U) requires C<T>; // #1
+ };
+ 
+ template<class T>
+ struct B : A<T*> {
+   using A<T*>::f;
+   template<class U> void f(U) requires C<T>; // #2
+ };
+ 
+ int main() {
+   B<int> b;
+   b.f(42); // { dg-error "ambiguous" } #1 and #2 don't correspond
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic19.C gcc-16-20250810/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic19.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic19.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic19.C	Sun Aug 10 22:32:11 2025
***************
*** 0 ****
--- 1,10 ----
+ // PR c++/120620
+ // { dg-do compile }
+ 
+ #include <cxxabi.h>
+ 
+ struct A* a;
+ 
+ void f() {
+   void* const p = abi::__dynamic_cast(&a, 0, 0, 42);
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic1a.C gcc-16-20250810/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic1a.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic1a.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic1a.C	Sun Aug 10 22:32:11 2025
***************
*** 0 ****
--- 1,6 ----
+ // Test that including <cxxabi.h>, whence the actual abi:__dynamic_cast
+ // is declared, doesn't affect our constexpr dynamic_cast handling.
+ // { dg-do compile { target c++20 } }
+ 
+ #include <cxxabi.h>
+ #include "constexpr-dynamic1.C"
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/cpp2a/nontype-class73.C gcc-16-20250810/gcc/testsuite/g++.dg/cpp2a/nontype-class73.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/cpp2a/nontype-class73.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/cpp2a/nontype-class73.C	Sun Aug 10 22:32:12 2025
***************
*** 0 ****
--- 1,30 ----
+ // PR c++/119688
+ // { dg-do compile { target c++20 } }
+ 
+ template<int N>
+ struct builder {
+   bool value[256]{};
+   constexpr builder(char const (&s)[N]) {
+     for(int i = 0 ; i < N; ++i)
+       value[static_cast<unsigned char>(s[i])] = true;
+   }
+ };
+ 
+ template<builder A>
+ constexpr auto operator""_ar() {
+   return A.value;
+ }
+ 
+ constexpr auto first = "ab"_ar;
+ static_assert( first['a']);
+ static_assert( first['b']);
+ static_assert(!first['c']);
+ static_assert(!first['d']);
+ static_assert(!first['z']);
+ 
+ constexpr auto second = "cd"_ar;
+ static_assert(!second['a']);
+ static_assert(!second['b']);
+ static_assert(!second['z']);
+ static_assert( second['c']);
+ static_assert( second['d']);
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/modules/atom-preamble-3.C gcc-16-20250810/gcc/testsuite/g++.dg/modules/atom-preamble-3.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/modules/atom-preamble-3.C	Sun Aug  3 22:32:26 2025
--- gcc-16-20250810/gcc/testsuite/g++.dg/modules/atom-preamble-3.C	Sun Aug 10 22:32:14 2025
***************
*** 1,4 ****
! // { dg-additional-options "-fmodules-ts" }
  #define import import
  import malcolm; // { dg-error "object-like macro" }
  // { dg-error "failed to read" "" { target *-*-* } 0 }
--- 1,4 ----
! // { dg-additional-options "-fmodules-ts -Wno-keyword-macro" }
  #define import import
  import malcolm; // { dg-error "object-like macro" }
  // { dg-error "failed to read" "" { target *-*-* } 0 }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/modules/class-11_a.H gcc-16-20250810/gcc/testsuite/g++.dg/modules/class-11_a.H
*** gcc-16-20250803/gcc/testsuite/g++.dg/modules/class-11_a.H	Sun Aug  3 22:32:26 2025
--- gcc-16-20250810/gcc/testsuite/g++.dg/modules/class-11_a.H	Sun Aug 10 22:32:14 2025
***************
*** 1,6 ****
--- 1,7 ----
  // Check for some additional lang_type flags that we'd missed.
  // { dg-additional-options "-fmodule-header -fabi-version=21 -Wabi=15" }
  // { dg-module-cmi {} }
+ // { dg-skip-if "test assumes that structs have padding" { default_packed } }
  
  #if __cpp_trivial_relocatability < 202502L
  #define trivially_relocatable_if_eligible __trivially_relocatable_if_eligible
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/modules/class-11_b.C gcc-16-20250810/gcc/testsuite/g++.dg/modules/class-11_b.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/modules/class-11_b.C	Sun Aug  3 22:32:26 2025
--- gcc-16-20250810/gcc/testsuite/g++.dg/modules/class-11_b.C	Sun Aug 10 22:32:14 2025
***************
*** 1,4 ****
--- 1,5 ----
  // { dg-additional-options "-fmodules -fabi-version=21 -Wabi=15" }
+ // { dg-skip-if "test assumes that structs have padding" { default_packed } }
  
  import "class-11_a.H";
  
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/opt/pr82577.C gcc-16-20250810/gcc/testsuite/g++.dg/opt/pr82577.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/opt/pr82577.C	Sun Aug  3 22:32:26 2025
--- gcc-16-20250810/gcc/testsuite/g++.dg/opt/pr82577.C	Sun Aug 10 22:32:14 2025
***************
*** 3,9 ****
  
  #if __cplusplus > 201500L
  // register is no longer a keyword in C++17.
! #define register
  #endif
  
  class a {
--- 3,11 ----
  
  #if __cplusplus > 201500L
  // register is no longer a keyword in C++17.
! #define reg
! #else
! #define reg register
  #endif
  
  class a {
*************** struct c {
*** 14,21 ****
    int d;
    a e;
  } f;
! void fn1(register c *g) {
!   register int *h;
    do
      (h) = g->e.b() + (g)->d;
    while (&f);
--- 16,23 ----
    int d;
    a e;
  } f;
! void fn1(reg c *g) {
!   reg int *h;
    do
      (h) = g->e.b() + (g)->d;
    while (&f);
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/template/sfinae17.C gcc-16-20250810/gcc/testsuite/g++.dg/template/sfinae17.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/template/sfinae17.C	Sun Aug  3 22:32:28 2025
--- gcc-16-20250810/gcc/testsuite/g++.dg/template/sfinae17.C	Sun Aug 10 22:32:14 2025
***************
*** 1,7 ****
  // The conversion from D* to B* is ambiguous, but that should not produce
  // an error, it should remove the first f overload by SFINAE.
  
! #define static_assert(TEST,STR) \
    do { int ar[(TEST)?1:-1]; } while (0);
  
  struct B {};
--- 1,7 ----
  // The conversion from D* to B* is ambiguous, but that should not produce
  // an error, it should remove the first f overload by SFINAE.
  
! #define my_static_assert(TEST,STR) \
    do { int ar[(TEST)?1:-1]; } while (0);
  
  struct B {};
*************** template <class T>
*** 23,28 ****
  
  int main()
  {
!   static_assert(sizeof f<int>(0) == sizeof(two), "");
!   static_assert(sizeof f<B *>(0) == sizeof(two), "");
  }
--- 23,28 ----
  
  int main()
  {
!   my_static_assert(sizeof f<int>(0) == sizeof(two), "");
!   my_static_assert(sizeof f<B *>(0) == sizeof(two), "");
  }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/torture/noncall-eh-1.C gcc-16-20250810/gcc/testsuite/g++.dg/torture/noncall-eh-1.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/torture/noncall-eh-1.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/torture/noncall-eh-1.C	Sun Aug 10 22:32:14 2025
***************
*** 0 ****
--- 1,26 ----
+ // { dg-do compile }
+ // For slim LTO there's no optimized dump
+ // { dg-skip-if "" { *-*-* } { "-flto" } { "" } }
+ // { dg-additional-options "-fnon-call-exceptions -fexceptions -fdump-tree-optimized-eh" }
+ 
+ // PR tree-optimization/120599
+ // Copying prop for aggregates should not touch `a = *__val` since that statement
+ //  can throw (internally) so we need to be able to keep the landing pad.
+ 
+ struct RefitOption {
+   char subtype;
+   int string;
+ } n;
+ void h(RefitOption) __attribute__((nothrow));
+ void k(RefitOption *__val, RefitOption a)
+ {
+   try {
+     a = *__val;
+     RefitOption __trans_tmp_2 = a;
+     h(__trans_tmp_2);
+   }
+   catch(...){}
+ }
+ 
+ // Make sure There is a landing pad for the non-call exception from the aggregate load.
+ // { dg-final { scan-tree-dump "LP " "optimized" } }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/warn/Wkeyword-macro-1.C gcc-16-20250810/gcc/testsuite/g++.dg/warn/Wkeyword-macro-1.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/warn/Wkeyword-macro-1.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/warn/Wkeyword-macro-1.C	Sun Aug 10 22:32:15 2025
***************
*** 0 ****
--- 1,112 ----
+ // C++26 P2843R3 - Preprocessing is never undefined
+ // [cpp.replace.general]/9
+ // { dg-do preprocess }
+ // { dg-options "-pedantic-errors" }
+ // { dg-additional-options "-fmodules" { target c++20 } }
+ 
+ // [lex.key]
+ #define alignas 1			// { dg-error "keyword 'alignas' defined as macro" "" { target c++26 } }
+ #define alignof 1			// { dg-error "keyword 'alignof' defined as macro" "" { target c++26 } }
+ #define asm 1				// { dg-error "keyword 'asm' defined as macro" "" { target c++26 } }
+ #define auto 1				// { dg-error "keyword 'auto' defined as macro" "" { target c++26 } }
+ #define bool 1				// { dg-error "keyword 'bool' defined as macro" "" { target c++26 } }
+ #define break 1				// { dg-error "keyword 'break' defined as macro" "" { target c++26 } }
+ #define case 1				// { dg-error "keyword 'case' defined as macro" "" { target c++26 } }
+ #define catch 1				// { dg-error "keyword 'catch' defined as macro" "" { target c++26 } }
+ #define char 1				// { dg-error "keyword 'char' defined as macro" "" { target c++26 } }
+ #define char16_t 1			// { dg-error "keyword 'char16_t' defined as macro" "" { target c++26 } }
+ #define char32_t 1			// { dg-error "keyword 'char32_t' defined as macro" "" { target c++26 } }
+ #define char8_t 1			// { dg-error "keyword 'char8_t' defined as macro" "" { target c++26 } }
+ #define class 1				// { dg-error "keyword 'class' defined as macro" "" { target c++26 } }
+ #define co_await 1			// { dg-error "keyword 'co_await' defined as macro" "" { target c++26 } }
+ #define concept 1			// { dg-error "keyword 'concept' defined as macro" "" { target c++26 } }
+ #define const 1				// { dg-error "keyword 'const' defined as macro" "" { target c++26 } }
+ #define const_cast 1			// { dg-error "keyword 'const_cast' defined as macro" "" { target c++26 } }
+ #define consteval 1			// { dg-error "keyword 'consteval' defined as macro" "" { target c++26 } }
+ #define constexpr 1			// { dg-error "keyword 'constexpr' defined as macro" "" { target c++26 } }
+ #define constinit 1			// { dg-error "keyword 'constinit' defined as macro" "" { target c++26 } }
+ #define continue 1			// { dg-error "keyword 'continue' defined as macro" "" { target c++26 } }
+ #define contract_assert 1
+ #define co_return 1			// { dg-error "keyword 'co_return' defined as macro" "" { target c++26 } }
+ #define co_yield 1			// { dg-error "keyword 'co_yield' defined as macro" "" { target c++26 } }
+ #define decltype 1			// { dg-error "keyword 'decltype' defined as macro" "" { target c++26 } }
+ #define default 1			// { dg-error "keyword 'default' defined as macro" "" { target c++26 } }
+ #define delete 1			// { dg-error "keyword 'delete' defined as macro" "" { target c++26 } }
+ #define do 1				// { dg-error "keyword 'do' defined as macro" "" { target c++26 } }
+ #define double 1			// { dg-error "keyword 'double' defined as macro" "" { target c++26 } }
+ #define dynamic_cast 1			// { dg-error "keyword 'dynamic_cast' defined as macro" "" { target c++26 } }
+ #define else 1				// { dg-error "keyword 'else' defined as macro" "" { target c++26 } }
+ #define enum 1				// { dg-error "keyword 'enum' defined as macro" "" { target c++26 } }
+ #define explicit 1			// { dg-error "keyword 'explicit' defined as macro" "" { target c++26 } }
+ #define export 1			// { dg-error "keyword 'export' defined as macro" "" { target c++26 } }
+ #define extern 1			// { dg-error "keyword 'extern' defined as macro" "" { target c++26 } }
+ #define false 1				// { dg-error "keyword 'false' defined as macro" "" { target c++26 } }
+ #define float 1				// { dg-error "keyword 'float' defined as macro" "" { target c++26 } }
+ #define for 1				// { dg-error "keyword 'for' defined as macro" "" { target c++26 } }
+ #define friend 1			// { dg-error "keyword 'friend' defined as macro" "" { target c++26 } }
+ #define goto 1				// { dg-error "keyword 'goto' defined as macro" "" { target c++26 } }
+ #define if 1				// { dg-error "keyword 'if' defined as macro" "" { target c++26 } }
+ #define inline 1			// { dg-error "keyword 'inline' defined as macro" "" { target c++26 } }
+ #define int 1				// { dg-error "keyword 'int' defined as macro" "" { target c++26 } }
+ #define long 1				// { dg-error "keyword 'long' defined as macro" "" { target c++26 } }
+ #define mutable 1			// { dg-error "keyword 'mutable' defined as macro" "" { target c++26 } }
+ #define namespace 1			// { dg-error "keyword 'namespace' defined as macro" "" { target c++26 } }
+ #define new 1				// { dg-error "keyword 'new' defined as macro" "" { target c++26 } }
+ #define noexcept 1			// { dg-error "keyword 'noexcept' defined as macro" "" { target c++26 } }
+ #define nullptr 1			// { dg-error "keyword 'nullptr' defined as macro" "" { target c++26 } }
+ #define operator 1			// { dg-error "keyword 'operator' defined as macro" "" { target c++26 } }
+ #define private 1			// { dg-error "keyword 'private' defined as macro" "" { target c++26 } }
+ #define protected 1			// { dg-error "keyword 'protected' defined as macro" "" { target c++26 } }
+ #define public 1			// { dg-error "keyword 'public' defined as macro" "" { target c++26 } }
+ #define register 1			// { dg-error "keyword 'register' defined as macro" "" { target c++26 } }
+ #define reinterpret_cast 1		// { dg-error "keyword 'reinterpret_cast' defined as macro" "" { target c++26 } }
+ #define requires 1			// { dg-error "keyword 'requires' defined as macro" "" { target c++26 } }
+ #define return 1			// { dg-error "keyword 'return' defined as macro" "" { target c++26 } }
+ #define short 1				// { dg-error "keyword 'short' defined as macro" "" { target c++26 } }
+ #define signed 1			// { dg-error "keyword 'signed' defined as macro" "" { target c++26 } }
+ #define sizeof 1			// { dg-error "keyword 'sizeof' defined as macro" "" { target c++26 } }
+ #define static 1			// { dg-error "keyword 'static' defined as macro" "" { target c++26 } }
+ #define static_assert 1			// { dg-error "keyword 'static_assert' defined as macro" "" { target c++26 } }
+ #define static_cast 1			// { dg-error "keyword 'static_cast' defined as macro" "" { target c++26 } }
+ #define struct 1			// { dg-error "keyword 'struct' defined as macro" "" { target c++26 } }
+ #define switch 1			// { dg-error "keyword 'switch' defined as macro" "" { target c++26 } }
+ #define template 1			// { dg-error "keyword 'template' defined as macro" "" { target c++26 } }
+ #define this 1				// { dg-error "keyword 'this' defined as macro" "" { target c++26 } }
+ #define thread_local 1			// { dg-error "keyword 'thread_local' defined as macro" "" { target c++26 } }
+ #define throw 1				// { dg-error "keyword 'throw' defined as macro" "" { target c++26 } }
+ #define true 1				// { dg-error "keyword 'true' defined as macro" "" { target c++26 } }
+ #define try 1				// { dg-error "keyword 'try' defined as macro" "" { target c++26 } }
+ #define typedef 1			// { dg-error "keyword 'typedef' defined as macro" "" { target c++26 } }
+ #define typeid 1			// { dg-error "keyword 'typeid' defined as macro" "" { target c++26 } }
+ #define typename 1			// { dg-error "keyword 'typename' defined as macro" "" { target c++26 } }
+ #define union 1				// { dg-error "keyword 'union' defined as macro" "" { target c++26 } }
+ #define unsigned 1			// { dg-error "keyword 'unsigned' defined as macro" "" { target c++26 } }
+ #define using 1				// { dg-error "keyword 'using' defined as macro" "" { target c++26 } }
+ #define virtual 1			// { dg-error "keyword 'virtual' defined as macro" "" { target c++26 } }
+ #define void 1				// { dg-error "keyword 'void' defined as macro" "" { target c++26 } }
+ #define volatile 1			// { dg-error "keyword 'volatile' defined as macro" "" { target c++26 } }
+ #define wchar_t 1			// { dg-error "keyword 'wchar_t' defined as macro" "" { target c++26 } }
+ #define while 1				// { dg-error "keyword 'while' defined as macro" "" { target c++26 } }
+ 
+ // [lex.name]
+ #define final 1				// { dg-error "keyword 'final' defined as macro" "" { target c++26 } }
+ #define import 1			// { dg-error "keyword 'import' defined as macro" "" { target c++26 } }
+ #define module 1			// { dg-error "keyword 'module' defined as macro" "" { target c++26 } }
+ #define override 1			// { dg-error "keyword 'override' defined as macro" "" { target c++26 } }
+ #define post 1
+ #define pre 1
+ #define replaceable_if_eligible 1	// { dg-error "keyword 'replaceable_if_eligible' defined as macro" "" { target c++26 } }
+ #define trivially_relocatable_if_eligible 1	// { dg-error "keyword 'trivially_relocatable_if_eligible' defined as macro" "" { target c++26 } }
+ 
+ // [dcl.attr]
+ #define assume 1			// { dg-error "keyword 'assume' defined as macro" "" { target c++26 } }
+ #define carries_dependency 1
+ #define deprecated 1			// { dg-error "keyword 'deprecated' defined as macro" "" { target c++26 } }
+ #define fallthrough 1			// { dg-error "keyword 'fallthrough' defined as macro" "" { target c++26 } }
+ #define indeterminate 1
+ #define likely 1			// { dg-error "keyword 'likely' defined as macro" "" { target c++26 } }
+ #define maybe_unused 1			// { dg-error "keyword 'maybe_unused' defined as macro" "" { target c++26 } }
+ #define nodiscard 1			// { dg-error "keyword 'nodiscard' defined as macro" "" { target c++26 } }
+ #define noreturn 1			// { dg-error "keyword 'noreturn' defined as macro" "" { target c++26 } }
+ #define no_unique_address 1		// { dg-error "keyword 'no_unique_address' defined as macro" "" { target c++26 } }
+ #define unlikely 1			// { dg-error "keyword 'unlikely' defined as macro" "" { target c++26 } }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/warn/Wkeyword-macro-10.C gcc-16-20250810/gcc/testsuite/g++.dg/warn/Wkeyword-macro-10.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/warn/Wkeyword-macro-10.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/warn/Wkeyword-macro-10.C	Sun Aug 10 22:32:15 2025
***************
*** 0 ****
--- 1,23 ----
+ // C++26 P2843R3 - Preprocessing is never undefined
+ // [cpp.replace.general]/9
+ // { dg-do preprocess }
+ // { dg-options "-Wkeyword-macro" }
+ 
+ #undef for				// { dg-warning "undefining keyword 'for'" }
+ #define for for				// { dg-warning "keyword 'for' defined as macro" }
+ #undef for				// { dg-warning "undefining keyword 'for'" }
+ #define while do			// { dg-warning "keyword 'while' defined as macro" }
+ #define while do			// { dg-warning "keyword 'while' defined as macro" }
+ #define while for			// { dg-warning "keyword 'while' defined as macro" }
+ 					// { dg-warning "'while' redefined" "" { target *-*-* } .-1 }
+ #undef while				// { dg-warning "undefining keyword 'while'" }
+ #define while while			// { dg-warning "keyword 'while' defined as macro" }
+ #define private public			// { dg-warning "keyword 'private' defined as macro" }
+ #define inline				// { dg-warning "keyword 'inline' defined as macro" }
+ #undef inline				// { dg-warning "undefining keyword 'inline'" }
+ #define inline __inline__ __attribute__((__always_inline__))	// { dg-warning "keyword 'inline' defined as macro" }
+ #define likely(a) a
+ #undef likely				// { dg-warning "undefining keyword 'likely'" "" { target c++20 } }
+ #define unlikely(a, b, c) a + b + c
+ #define unlikely(a, b, c) a + b + c
+ #undef unlikely				// { dg-warning "undefining keyword 'unlikely'" "" { target c++20 } }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/warn/Wkeyword-macro-2.C gcc-16-20250810/gcc/testsuite/g++.dg/warn/Wkeyword-macro-2.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/warn/Wkeyword-macro-2.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/warn/Wkeyword-macro-2.C	Sun Aug 10 22:32:15 2025
***************
*** 0 ****
--- 1,112 ----
+ // C++26 P2843R3 - Preprocessing is never undefined
+ // [cpp.replace.general]/9
+ // { dg-do preprocess }
+ // { dg-options "-pedantic" }
+ // { dg-additional-options "-fmodules" { target c++20 } }
+ 
+ // [lex.key]
+ #define alignas 1			// { dg-warning "keyword 'alignas' defined as macro" "" { target c++26 } }
+ #define alignof 1			// { dg-warning "keyword 'alignof' defined as macro" "" { target c++26 } }
+ #define asm 1				// { dg-warning "keyword 'asm' defined as macro" "" { target c++26 } }
+ #define auto 1				// { dg-warning "keyword 'auto' defined as macro" "" { target c++26 } }
+ #define bool 1				// { dg-warning "keyword 'bool' defined as macro" "" { target c++26 } }
+ #define break 1				// { dg-warning "keyword 'break' defined as macro" "" { target c++26 } }
+ #define case 1				// { dg-warning "keyword 'case' defined as macro" "" { target c++26 } }
+ #define catch 1				// { dg-warning "keyword 'catch' defined as macro" "" { target c++26 } }
+ #define char 1				// { dg-warning "keyword 'char' defined as macro" "" { target c++26 } }
+ #define char16_t 1			// { dg-warning "keyword 'char16_t' defined as macro" "" { target c++26 } }
+ #define char32_t 1			// { dg-warning "keyword 'char32_t' defined as macro" "" { target c++26 } }
+ #define char8_t 1			// { dg-warning "keyword 'char8_t' defined as macro" "" { target c++26 } }
+ #define class 1				// { dg-warning "keyword 'class' defined as macro" "" { target c++26 } }
+ #define co_await 1			// { dg-warning "keyword 'co_await' defined as macro" "" { target c++26 } }
+ #define concept 1			// { dg-warning "keyword 'concept' defined as macro" "" { target c++26 } }
+ #define const 1				// { dg-warning "keyword 'const' defined as macro" "" { target c++26 } }
+ #define const_cast 1			// { dg-warning "keyword 'const_cast' defined as macro" "" { target c++26 } }
+ #define consteval 1			// { dg-warning "keyword 'consteval' defined as macro" "" { target c++26 } }
+ #define constexpr 1			// { dg-warning "keyword 'constexpr' defined as macro" "" { target c++26 } }
+ #define constinit 1			// { dg-warning "keyword 'constinit' defined as macro" "" { target c++26 } }
+ #define continue 1			// { dg-warning "keyword 'continue' defined as macro" "" { target c++26 } }
+ #define contract_assert 1
+ #define co_return 1			// { dg-warning "keyword 'co_return' defined as macro" "" { target c++26 } }
+ #define co_yield 1			// { dg-warning "keyword 'co_yield' defined as macro" "" { target c++26 } }
+ #define decltype 1			// { dg-warning "keyword 'decltype' defined as macro" "" { target c++26 } }
+ #define default 1			// { dg-warning "keyword 'default' defined as macro" "" { target c++26 } }
+ #define delete 1			// { dg-warning "keyword 'delete' defined as macro" "" { target c++26 } }
+ #define do 1				// { dg-warning "keyword 'do' defined as macro" "" { target c++26 } }
+ #define double 1			// { dg-warning "keyword 'double' defined as macro" "" { target c++26 } }
+ #define dynamic_cast 1			// { dg-warning "keyword 'dynamic_cast' defined as macro" "" { target c++26 } }
+ #define else 1				// { dg-warning "keyword 'else' defined as macro" "" { target c++26 } }
+ #define enum 1				// { dg-warning "keyword 'enum' defined as macro" "" { target c++26 } }
+ #define explicit 1			// { dg-warning "keyword 'explicit' defined as macro" "" { target c++26 } }
+ #define export 1			// { dg-warning "keyword 'export' defined as macro" "" { target c++26 } }
+ #define extern 1			// { dg-warning "keyword 'extern' defined as macro" "" { target c++26 } }
+ #define false 1				// { dg-warning "keyword 'false' defined as macro" "" { target c++26 } }
+ #define float 1				// { dg-warning "keyword 'float' defined as macro" "" { target c++26 } }
+ #define for 1				// { dg-warning "keyword 'for' defined as macro" "" { target c++26 } }
+ #define friend 1			// { dg-warning "keyword 'friend' defined as macro" "" { target c++26 } }
+ #define goto 1				// { dg-warning "keyword 'goto' defined as macro" "" { target c++26 } }
+ #define if 1				// { dg-warning "keyword 'if' defined as macro" "" { target c++26 } }
+ #define inline 1			// { dg-warning "keyword 'inline' defined as macro" "" { target c++26 } }
+ #define int 1				// { dg-warning "keyword 'int' defined as macro" "" { target c++26 } }
+ #define long 1				// { dg-warning "keyword 'long' defined as macro" "" { target c++26 } }
+ #define mutable 1			// { dg-warning "keyword 'mutable' defined as macro" "" { target c++26 } }
+ #define namespace 1			// { dg-warning "keyword 'namespace' defined as macro" "" { target c++26 } }
+ #define new 1				// { dg-warning "keyword 'new' defined as macro" "" { target c++26 } }
+ #define noexcept 1			// { dg-warning "keyword 'noexcept' defined as macro" "" { target c++26 } }
+ #define nullptr 1			// { dg-warning "keyword 'nullptr' defined as macro" "" { target c++26 } }
+ #define operator 1			// { dg-warning "keyword 'operator' defined as macro" "" { target c++26 } }
+ #define private 1			// { dg-warning "keyword 'private' defined as macro" "" { target c++26 } }
+ #define protected 1			// { dg-warning "keyword 'protected' defined as macro" "" { target c++26 } }
+ #define public 1			// { dg-warning "keyword 'public' defined as macro" "" { target c++26 } }
+ #define register 1			// { dg-warning "keyword 'register' defined as macro" "" { target c++26 } }
+ #define reinterpret_cast 1		// { dg-warning "keyword 'reinterpret_cast' defined as macro" "" { target c++26 } }
+ #define requires 1			// { dg-warning "keyword 'requires' defined as macro" "" { target c++26 } }
+ #define return 1			// { dg-warning "keyword 'return' defined as macro" "" { target c++26 } }
+ #define short 1				// { dg-warning "keyword 'short' defined as macro" "" { target c++26 } }
+ #define signed 1			// { dg-warning "keyword 'signed' defined as macro" "" { target c++26 } }
+ #define sizeof 1			// { dg-warning "keyword 'sizeof' defined as macro" "" { target c++26 } }
+ #define static 1			// { dg-warning "keyword 'static' defined as macro" "" { target c++26 } }
+ #define static_assert 1			// { dg-warning "keyword 'static_assert' defined as macro" "" { target c++26 } }
+ #define static_cast 1			// { dg-warning "keyword 'static_cast' defined as macro" "" { target c++26 } }
+ #define struct 1			// { dg-warning "keyword 'struct' defined as macro" "" { target c++26 } }
+ #define switch 1			// { dg-warning "keyword 'switch' defined as macro" "" { target c++26 } }
+ #define template 1			// { dg-warning "keyword 'template' defined as macro" "" { target c++26 } }
+ #define this 1				// { dg-warning "keyword 'this' defined as macro" "" { target c++26 } }
+ #define thread_local 1			// { dg-warning "keyword 'thread_local' defined as macro" "" { target c++26 } }
+ #define throw 1				// { dg-warning "keyword 'throw' defined as macro" "" { target c++26 } }
+ #define true 1				// { dg-warning "keyword 'true' defined as macro" "" { target c++26 } }
+ #define try 1				// { dg-warning "keyword 'try' defined as macro" "" { target c++26 } }
+ #define typedef 1			// { dg-warning "keyword 'typedef' defined as macro" "" { target c++26 } }
+ #define typeid 1			// { dg-warning "keyword 'typeid' defined as macro" "" { target c++26 } }
+ #define typename 1			// { dg-warning "keyword 'typename' defined as macro" "" { target c++26 } }
+ #define union 1				// { dg-warning "keyword 'union' defined as macro" "" { target c++26 } }
+ #define unsigned 1			// { dg-warning "keyword 'unsigned' defined as macro" "" { target c++26 } }
+ #define using 1				// { dg-warning "keyword 'using' defined as macro" "" { target c++26 } }
+ #define virtual 1			// { dg-warning "keyword 'virtual' defined as macro" "" { target c++26 } }
+ #define void 1				// { dg-warning "keyword 'void' defined as macro" "" { target c++26 } }
+ #define volatile 1			// { dg-warning "keyword 'volatile' defined as macro" "" { target c++26 } }
+ #define wchar_t 1			// { dg-warning "keyword 'wchar_t' defined as macro" "" { target c++26 } }
+ #define while 1				// { dg-warning "keyword 'while' defined as macro" "" { target c++26 } }
+ 
+ // [lex.name]
+ #define final 1				// { dg-warning "keyword 'final' defined as macro" "" { target c++26 } }
+ #define import 1			// { dg-warning "keyword 'import' defined as macro" "" { target c++26 } }
+ #define module 1			// { dg-warning "keyword 'module' defined as macro" "" { target c++26 } }
+ #define override 1			// { dg-warning "keyword 'override' defined as macro" "" { target c++26 } }
+ #define post 1
+ #define pre 1
+ #define replaceable_if_eligible 1	// { dg-warning "keyword 'replaceable_if_eligible' defined as macro" "" { target c++26 } }
+ #define trivially_relocatable_if_eligible 1	// { dg-warning "keyword 'trivially_relocatable_if_eligible' defined as macro" "" { target c++26 } }
+ 
+ // [dcl.attr]
+ #define assume 1			// { dg-warning "keyword 'assume' defined as macro" "" { target c++26 } }
+ #define carries_dependency 1
+ #define deprecated 1			// { dg-warning "keyword 'deprecated' defined as macro" "" { target c++26 } }
+ #define fallthrough 1			// { dg-warning "keyword 'fallthrough' defined as macro" "" { target c++26 } }
+ #define indeterminate 1
+ #define likely 1			// { dg-warning "keyword 'likely' defined as macro" "" { target c++26 } }
+ #define maybe_unused 1			// { dg-warning "keyword 'maybe_unused' defined as macro" "" { target c++26 } }
+ #define nodiscard 1			// { dg-warning "keyword 'nodiscard' defined as macro" "" { target c++26 } }
+ #define noreturn 1			// { dg-warning "keyword 'noreturn' defined as macro" "" { target c++26 } }
+ #define no_unique_address 1		// { dg-warning "keyword 'no_unique_address' defined as macro" "" { target c++26 } }
+ #define unlikely 1			// { dg-warning "keyword 'unlikely' defined as macro" "" { target c++26 } }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/warn/Wkeyword-macro-3.C gcc-16-20250810/gcc/testsuite/g++.dg/warn/Wkeyword-macro-3.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/warn/Wkeyword-macro-3.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/warn/Wkeyword-macro-3.C	Sun Aug 10 22:32:15 2025
***************
*** 0 ****
--- 1,7 ----
+ // C++26 P2843R3 - Preprocessing is never undefined
+ // [cpp.replace.general]/9
+ // { dg-do preprocess }
+ // { dg-options "" }
+ // { dg-additional-options "-fmodules" { target c++20 } }
+ 
+ #include "Wkeyword-macro-1.C"
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/warn/Wkeyword-macro-4.C gcc-16-20250810/gcc/testsuite/g++.dg/warn/Wkeyword-macro-4.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/warn/Wkeyword-macro-4.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/warn/Wkeyword-macro-4.C	Sun Aug 10 22:32:15 2025
***************
*** 0 ****
--- 1,112 ----
+ // C++26 P2843R3 - Preprocessing is never undefined
+ // [cpp.replace.general]/9
+ // { dg-do preprocess }
+ // { dg-options "-pedantic-errors" }
+ // { dg-additional-options "-fmodules" { target c++20 } }
+ 
+ // [lex.key]
+ #undef alignas 				// { dg-error "undefining keyword 'alignas'" "" { target c++26 } }
+ #undef alignof 				// { dg-error "undefining keyword 'alignof'" "" { target c++26 } }
+ #undef asm 				// { dg-error "undefining keyword 'asm'" "" { target c++26 } }
+ #undef auto 				// { dg-error "undefining keyword 'auto'" "" { target c++26 } }
+ #undef bool 				// { dg-error "undefining keyword 'bool'" "" { target c++26 } }
+ #undef break 				// { dg-error "undefining keyword 'break'" "" { target c++26 } }
+ #undef case 				// { dg-error "undefining keyword 'case'" "" { target c++26 } }
+ #undef catch 				// { dg-error "undefining keyword 'catch'" "" { target c++26 } }
+ #undef char 				// { dg-error "undefining keyword 'char'" "" { target c++26 } }
+ #undef char16_t 			// { dg-error "undefining keyword 'char16_t'" "" { target c++26 } }
+ #undef char32_t 			// { dg-error "undefining keyword 'char32_t'" "" { target c++26 } }
+ #undef char8_t 				// { dg-error "undefining keyword 'char8_t'" "" { target c++26 } }
+ #undef class 				// { dg-error "undefining keyword 'class'" "" { target c++26 } }
+ #undef co_await 			// { dg-error "undefining keyword 'co_await'" "" { target c++26 } }
+ #undef concept 				// { dg-error "undefining keyword 'concept'" "" { target c++26 } }
+ #undef const 				// { dg-error "undefining keyword 'const'" "" { target c++26 } }
+ #undef const_cast 			// { dg-error "undefining keyword 'const_cast'" "" { target c++26 } }
+ #undef consteval 			// { dg-error "undefining keyword 'consteval'" "" { target c++26 } }
+ #undef constexpr 			// { dg-error "undefining keyword 'constexpr'" "" { target c++26 } }
+ #undef constinit 			// { dg-error "undefining keyword 'constinit'" "" { target c++26 } }
+ #undef continue 			// { dg-error "undefining keyword 'continue'" "" { target c++26 } }
+ #undef contract_assert
+ #undef co_return 			// { dg-error "undefining keyword 'co_return'" "" { target c++26 } }
+ #undef co_yield 			// { dg-error "undefining keyword 'co_yield'" "" { target c++26 } }
+ #undef decltype 			// { dg-error "undefining keyword 'decltype'" "" { target c++26 } }
+ #undef default 				// { dg-error "undefining keyword 'default'" "" { target c++26 } }
+ #undef delete 				// { dg-error "undefining keyword 'delete'" "" { target c++26 } }
+ #undef do 				// { dg-error "undefining keyword 'do'" "" { target c++26 } }
+ #undef double 				// { dg-error "undefining keyword 'double'" "" { target c++26 } }
+ #undef dynamic_cast 			// { dg-error "undefining keyword 'dynamic_cast'" "" { target c++26 } }
+ #undef else 				// { dg-error "undefining keyword 'else'" "" { target c++26 } }
+ #undef enum 				// { dg-error "undefining keyword 'enum'" "" { target c++26 } }
+ #undef explicit 			// { dg-error "undefining keyword 'explicit'" "" { target c++26 } }
+ #undef export 				// { dg-error "undefining keyword 'export'" "" { target c++26 } }
+ #undef extern 				// { dg-error "undefining keyword 'extern'" "" { target c++26 } }
+ #undef false 				// { dg-error "undefining keyword 'false'" "" { target c++26 } }
+ #undef float 				// { dg-error "undefining keyword 'float'" "" { target c++26 } }
+ #undef for 				// { dg-error "undefining keyword 'for'" "" { target c++26 } }
+ #undef friend 				// { dg-error "undefining keyword 'friend'" "" { target c++26 } }
+ #undef goto 				// { dg-error "undefining keyword 'goto'" "" { target c++26 } }
+ #undef if 				// { dg-error "undefining keyword 'if'" "" { target c++26 } }
+ #undef inline 				// { dg-error "undefining keyword 'inline'" "" { target c++26 } }
+ #undef int 				// { dg-error "undefining keyword 'int'" "" { target c++26 } }
+ #undef long 				// { dg-error "undefining keyword 'long'" "" { target c++26 } }
+ #undef mutable 				// { dg-error "undefining keyword 'mutable'" "" { target c++26 } }
+ #undef namespace 			// { dg-error "undefining keyword 'namespace'" "" { target c++26 } }
+ #undef new 				// { dg-error "undefining keyword 'new'" "" { target c++26 } }
+ #undef noexcept 			// { dg-error "undefining keyword 'noexcept'" "" { target c++26 } }
+ #undef nullptr 				// { dg-error "undefining keyword 'nullptr'" "" { target c++26 } }
+ #undef operator 			// { dg-error "undefining keyword 'operator'" "" { target c++26 } }
+ #undef private 				// { dg-error "undefining keyword 'private'" "" { target c++26 } }
+ #undef protected 			// { dg-error "undefining keyword 'protected'" "" { target c++26 } }
+ #undef public 				// { dg-error "undefining keyword 'public'" "" { target c++26 } }
+ #undef register 			// { dg-error "undefining keyword 'register'" "" { target c++26 } }
+ #undef reinterpret_cast 		// { dg-error "undefining keyword 'reinterpret_cast'" "" { target c++26 } }
+ #undef requires 			// { dg-error "undefining keyword 'requires'" "" { target c++26 } }
+ #undef return 				// { dg-error "undefining keyword 'return'" "" { target c++26 } }
+ #undef short 				// { dg-error "undefining keyword 'short'" "" { target c++26 } }
+ #undef signed 				// { dg-error "undefining keyword 'signed'" "" { target c++26 } }
+ #undef sizeof 				// { dg-error "undefining keyword 'sizeof'" "" { target c++26 } }
+ #undef static 				// { dg-error "undefining keyword 'static'" "" { target c++26 } }
+ #undef static_assert 			// { dg-error "undefining keyword 'static_assert'" "" { target c++26 } }
+ #undef static_cast 			// { dg-error "undefining keyword 'static_cast'" "" { target c++26 } }
+ #undef struct 				// { dg-error "undefining keyword 'struct'" "" { target c++26 } }
+ #undef switch 				// { dg-error "undefining keyword 'switch'" "" { target c++26 } }
+ #undef template 			// { dg-error "undefining keyword 'template'" "" { target c++26 } }
+ #undef this 				// { dg-error "undefining keyword 'this'" "" { target c++26 } }
+ #undef thread_local 			// { dg-error "undefining keyword 'thread_local'" "" { target c++26 } }
+ #undef throw 				// { dg-error "undefining keyword 'throw'" "" { target c++26 } }
+ #undef true 				// { dg-error "undefining keyword 'true'" "" { target c++26 } }
+ #undef try 				// { dg-error "undefining keyword 'try'" "" { target c++26 } }
+ #undef typedef 				// { dg-error "undefining keyword 'typedef'" "" { target c++26 } }
+ #undef typeid 				// { dg-error "undefining keyword 'typeid'" "" { target c++26 } }
+ #undef typename 			// { dg-error "undefining keyword 'typename'" "" { target c++26 } }
+ #undef union 				// { dg-error "undefining keyword 'union'" "" { target c++26 } }
+ #undef unsigned 			// { dg-error "undefining keyword 'unsigned'" "" { target c++26 } }
+ #undef using 				// { dg-error "undefining keyword 'using'" "" { target c++26 } }
+ #undef virtual 				// { dg-error "undefining keyword 'virtual'" "" { target c++26 } }
+ #undef void 				// { dg-error "undefining keyword 'void'" "" { target c++26 } }
+ #undef volatile 			// { dg-error "undefining keyword 'volatile'" "" { target c++26 } }
+ #undef wchar_t 				// { dg-error "undefining keyword 'wchar_t'" "" { target c++26 } }
+ #undef while 				// { dg-error "undefining keyword 'while'" "" { target c++26 } }
+ 
+ // [lex.name]
+ #undef final 				// { dg-error "undefining keyword 'final'" "" { target c++26 } }
+ #undef import 				// { dg-error "undefining keyword 'import'" "" { target c++26 } }
+ #undef module 				// { dg-error "undefining keyword 'module'" "" { target c++26 } }
+ #undef override 			// { dg-error "undefining keyword 'override'" "" { target c++26 } }
+ #undef post
+ #undef pre
+ #undef replaceable_if_eligible 	// { dg-error "undefining keyword 'replaceable_if_eligible'" "" { target c++26 } }
+ #undef trivially_relocatable_if_eligible 	// { dg-error "undefining keyword 'trivially_relocatable_if_eligible'" "" { target c++26 } }
+ 
+ // [dcl.attr]
+ #undef assume				// { dg-error "undefining keyword 'assume'" "" { target c++26 } }
+ #undef carries_dependency
+ #undef deprecated			// { dg-error "undefining keyword 'deprecated'" "" { target c++26 } }
+ #undef fallthrough			// { dg-error "undefining keyword 'fallthrough'" "" { target c++26 } }
+ #undef indeterminate
+ #undef likely				// { dg-error "undefining keyword 'likely'" "" { target c++26 } }
+ #undef maybe_unused			// { dg-error "undefining keyword 'maybe_unused'" "" { target c++26 } }
+ #undef nodiscard			// { dg-error "undefining keyword 'nodiscard'" "" { target c++26 } }
+ #undef noreturn				// { dg-error "undefining keyword 'noreturn'" "" { target c++26 } }
+ #undef no_unique_address		// { dg-error "undefining keyword 'no_unique_address'" "" { target c++26 } }
+ #undef unlikely				// { dg-error "undefining keyword 'unlikely'" "" { target c++26 } }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/warn/Wkeyword-macro-5.C gcc-16-20250810/gcc/testsuite/g++.dg/warn/Wkeyword-macro-5.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/warn/Wkeyword-macro-5.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/warn/Wkeyword-macro-5.C	Sun Aug 10 22:32:15 2025
***************
*** 0 ****
--- 1,112 ----
+ // C++26 P2843R3 - Preprocessing is never undefined
+ // [cpp.replace.general]/9
+ // { dg-do preprocess }
+ // { dg-options "-pedantic" }
+ // { dg-additional-options "-fmodules" { target c++20 } }
+ 
+ // [lex.key]
+ #undef alignas 				// { dg-warning "undefining keyword 'alignas'" "" { target c++26 } }
+ #undef alignof 				// { dg-warning "undefining keyword 'alignof'" "" { target c++26 } }
+ #undef asm 				// { dg-warning "undefining keyword 'asm'" "" { target c++26 } }
+ #undef auto 				// { dg-warning "undefining keyword 'auto'" "" { target c++26 } }
+ #undef bool 				// { dg-warning "undefining keyword 'bool'" "" { target c++26 } }
+ #undef break 				// { dg-warning "undefining keyword 'break'" "" { target c++26 } }
+ #undef case 				// { dg-warning "undefining keyword 'case'" "" { target c++26 } }
+ #undef catch 				// { dg-warning "undefining keyword 'catch'" "" { target c++26 } }
+ #undef char 				// { dg-warning "undefining keyword 'char'" "" { target c++26 } }
+ #undef char16_t 			// { dg-warning "undefining keyword 'char16_t'" "" { target c++26 } }
+ #undef char32_t 			// { dg-warning "undefining keyword 'char32_t'" "" { target c++26 } }
+ #undef char8_t 				// { dg-warning "undefining keyword 'char8_t'" "" { target c++26 } }
+ #undef class 				// { dg-warning "undefining keyword 'class'" "" { target c++26 } }
+ #undef co_await 			// { dg-warning "undefining keyword 'co_await'" "" { target c++26 } }
+ #undef concept 				// { dg-warning "undefining keyword 'concept'" "" { target c++26 } }
+ #undef const 				// { dg-warning "undefining keyword 'const'" "" { target c++26 } }
+ #undef const_cast 			// { dg-warning "undefining keyword 'const_cast'" "" { target c++26 } }
+ #undef consteval 			// { dg-warning "undefining keyword 'consteval'" "" { target c++26 } }
+ #undef constexpr 			// { dg-warning "undefining keyword 'constexpr'" "" { target c++26 } }
+ #undef constinit 			// { dg-warning "undefining keyword 'constinit'" "" { target c++26 } }
+ #undef continue 			// { dg-warning "undefining keyword 'continue'" "" { target c++26 } }
+ #undef contract_assert
+ #undef co_return 			// { dg-warning "undefining keyword 'co_return'" "" { target c++26 } }
+ #undef co_yield 			// { dg-warning "undefining keyword 'co_yield'" "" { target c++26 } }
+ #undef decltype 			// { dg-warning "undefining keyword 'decltype'" "" { target c++26 } }
+ #undef default 				// { dg-warning "undefining keyword 'default'" "" { target c++26 } }
+ #undef delete 				// { dg-warning "undefining keyword 'delete'" "" { target c++26 } }
+ #undef do 				// { dg-warning "undefining keyword 'do'" "" { target c++26 } }
+ #undef double 				// { dg-warning "undefining keyword 'double'" "" { target c++26 } }
+ #undef dynamic_cast 			// { dg-warning "undefining keyword 'dynamic_cast'" "" { target c++26 } }
+ #undef else 				// { dg-warning "undefining keyword 'else'" "" { target c++26 } }
+ #undef enum 				// { dg-warning "undefining keyword 'enum'" "" { target c++26 } }
+ #undef explicit 			// { dg-warning "undefining keyword 'explicit'" "" { target c++26 } }
+ #undef export 				// { dg-warning "undefining keyword 'export'" "" { target c++26 } }
+ #undef extern 				// { dg-warning "undefining keyword 'extern'" "" { target c++26 } }
+ #undef false 				// { dg-warning "undefining keyword 'false'" "" { target c++26 } }
+ #undef float 				// { dg-warning "undefining keyword 'float'" "" { target c++26 } }
+ #undef for 				// { dg-warning "undefining keyword 'for'" "" { target c++26 } }
+ #undef friend 				// { dg-warning "undefining keyword 'friend'" "" { target c++26 } }
+ #undef goto 				// { dg-warning "undefining keyword 'goto'" "" { target c++26 } }
+ #undef if 				// { dg-warning "undefining keyword 'if'" "" { target c++26 } }
+ #undef inline 				// { dg-warning "undefining keyword 'inline'" "" { target c++26 } }
+ #undef int 				// { dg-warning "undefining keyword 'int'" "" { target c++26 } }
+ #undef long 				// { dg-warning "undefining keyword 'long'" "" { target c++26 } }
+ #undef mutable 				// { dg-warning "undefining keyword 'mutable'" "" { target c++26 } }
+ #undef namespace 			// { dg-warning "undefining keyword 'namespace'" "" { target c++26 } }
+ #undef new 				// { dg-warning "undefining keyword 'new'" "" { target c++26 } }
+ #undef noexcept 			// { dg-warning "undefining keyword 'noexcept'" "" { target c++26 } }
+ #undef nullptr 				// { dg-warning "undefining keyword 'nullptr'" "" { target c++26 } }
+ #undef operator 			// { dg-warning "undefining keyword 'operator'" "" { target c++26 } }
+ #undef private 				// { dg-warning "undefining keyword 'private'" "" { target c++26 } }
+ #undef protected 			// { dg-warning "undefining keyword 'protected'" "" { target c++26 } }
+ #undef public 				// { dg-warning "undefining keyword 'public'" "" { target c++26 } }
+ #undef register 			// { dg-warning "undefining keyword 'register'" "" { target c++26 } }
+ #undef reinterpret_cast 		// { dg-warning "undefining keyword 'reinterpret_cast'" "" { target c++26 } }
+ #undef requires 			// { dg-warning "undefining keyword 'requires'" "" { target c++26 } }
+ #undef return 				// { dg-warning "undefining keyword 'return'" "" { target c++26 } }
+ #undef short 				// { dg-warning "undefining keyword 'short'" "" { target c++26 } }
+ #undef signed 				// { dg-warning "undefining keyword 'signed'" "" { target c++26 } }
+ #undef sizeof 				// { dg-warning "undefining keyword 'sizeof'" "" { target c++26 } }
+ #undef static 				// { dg-warning "undefining keyword 'static'" "" { target c++26 } }
+ #undef static_assert 			// { dg-warning "undefining keyword 'static_assert'" "" { target c++26 } }
+ #undef static_cast 			// { dg-warning "undefining keyword 'static_cast'" "" { target c++26 } }
+ #undef struct 				// { dg-warning "undefining keyword 'struct'" "" { target c++26 } }
+ #undef switch 				// { dg-warning "undefining keyword 'switch'" "" { target c++26 } }
+ #undef template 			// { dg-warning "undefining keyword 'template'" "" { target c++26 } }
+ #undef this 				// { dg-warning "undefining keyword 'this'" "" { target c++26 } }
+ #undef thread_local 			// { dg-warning "undefining keyword 'thread_local'" "" { target c++26 } }
+ #undef throw 				// { dg-warning "undefining keyword 'throw'" "" { target c++26 } }
+ #undef true 				// { dg-warning "undefining keyword 'true'" "" { target c++26 } }
+ #undef try 				// { dg-warning "undefining keyword 'try'" "" { target c++26 } }
+ #undef typedef 				// { dg-warning "undefining keyword 'typedef'" "" { target c++26 } }
+ #undef typeid 				// { dg-warning "undefining keyword 'typeid'" "" { target c++26 } }
+ #undef typename 			// { dg-warning "undefining keyword 'typename'" "" { target c++26 } }
+ #undef union 				// { dg-warning "undefining keyword 'union'" "" { target c++26 } }
+ #undef unsigned 			// { dg-warning "undefining keyword 'unsigned'" "" { target c++26 } }
+ #undef using 				// { dg-warning "undefining keyword 'using'" "" { target c++26 } }
+ #undef virtual 				// { dg-warning "undefining keyword 'virtual'" "" { target c++26 } }
+ #undef void 				// { dg-warning "undefining keyword 'void'" "" { target c++26 } }
+ #undef volatile 			// { dg-warning "undefining keyword 'volatile'" "" { target c++26 } }
+ #undef wchar_t 				// { dg-warning "undefining keyword 'wchar_t'" "" { target c++26 } }
+ #undef while 				// { dg-warning "undefining keyword 'while'" "" { target c++26 } }
+ 
+ // [lex.name]
+ #undef final 				// { dg-warning "undefining keyword 'final'" "" { target c++26 } }
+ #undef import 				// { dg-warning "undefining keyword 'import'" "" { target c++26 } }
+ #undef module 				// { dg-warning "undefining keyword 'module'" "" { target c++26 } }
+ #undef override 			// { dg-warning "undefining keyword 'override'" "" { target c++26 } }
+ #undef post
+ #undef pre
+ #undef replaceable_if_eligible 	// { dg-warning "undefining keyword 'replaceable_if_eligible'" "" { target c++26 } }
+ #undef trivially_relocatable_if_eligible 	// { dg-warning "undefining keyword 'trivially_relocatable_if_eligible'" "" { target c++26 } }
+ 
+ // [dcl.attr]
+ #undef assume				// { dg-warning "undefining keyword 'assume'" "" { target c++26 } }
+ #undef carries_dependency
+ #undef deprecated			// { dg-warning "undefining keyword 'deprecated'" "" { target c++26 } }
+ #undef fallthrough			// { dg-warning "undefining keyword 'fallthrough'" "" { target c++26 } }
+ #undef indeterminate
+ #undef likely				// { dg-warning "undefining keyword 'likely'" "" { target c++26 } }
+ #undef maybe_unused			// { dg-warning "undefining keyword 'maybe_unused'" "" { target c++26 } }
+ #undef nodiscard			// { dg-warning "undefining keyword 'nodiscard'" "" { target c++26 } }
+ #undef noreturn				// { dg-warning "undefining keyword 'noreturn'" "" { target c++26 } }
+ #undef no_unique_address		// { dg-warning "undefining keyword 'no_unique_address'" "" { target c++26 } }
+ #undef unlikely				// { dg-warning "undefining keyword 'unlikely'" "" { target c++26 } }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/warn/Wkeyword-macro-6.C gcc-16-20250810/gcc/testsuite/g++.dg/warn/Wkeyword-macro-6.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/warn/Wkeyword-macro-6.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/warn/Wkeyword-macro-6.C	Sun Aug 10 22:32:15 2025
***************
*** 0 ****
--- 1,7 ----
+ // C++26 P2843R3 - Preprocessing is never undefined
+ // [cpp.replace.general]/9
+ // { dg-do preprocess }
+ // { dg-options "" }
+ // { dg-additional-options "-fmodules" { target c++20 } }
+ 
+ #include "Wkeyword-macro-4.C"
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/warn/Wkeyword-macro-7.C gcc-16-20250810/gcc/testsuite/g++.dg/warn/Wkeyword-macro-7.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/warn/Wkeyword-macro-7.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/warn/Wkeyword-macro-7.C	Sun Aug 10 22:32:15 2025
***************
*** 0 ****
--- 1,112 ----
+ // C++26 P2843R3 - Preprocessing is never undefined
+ // [cpp.replace.general]/9
+ // { dg-do preprocess }
+ // { dg-options "-Wkeyword-macro" }
+ // { dg-additional-options "-fmodules" { target c++20 } }
+ 
+ // [lex.key]
+ #define alignas 1			// { dg-warning "keyword 'alignas' defined as macro" "" { target c++11 } }
+ #define alignof 1			// { dg-warning "keyword 'alignof' defined as macro" "" { target c++11 } }
+ #define asm 1				// { dg-warning "keyword 'asm' defined as macro" }
+ #define auto 1				// { dg-warning "keyword 'auto' defined as macro" }
+ #define bool 1				// { dg-warning "keyword 'bool' defined as macro" }
+ #define break 1				// { dg-warning "keyword 'break' defined as macro" }
+ #define case 1				// { dg-warning "keyword 'case' defined as macro" }
+ #define catch 1				// { dg-warning "keyword 'catch' defined as macro" }
+ #define char 1				// { dg-warning "keyword 'char' defined as macro" }
+ #define char16_t 1			// { dg-warning "keyword 'char16_t' defined as macro" "" { target c++11 } }
+ #define char32_t 1			// { dg-warning "keyword 'char32_t' defined as macro" "" { target c++11 } }
+ #define char8_t 1			// { dg-warning "keyword 'char8_t' defined as macro" "" { target c++20 } }
+ #define class 1				// { dg-warning "keyword 'class' defined as macro" }
+ #define co_await 1			// { dg-warning "keyword 'co_await' defined as macro" "" { target c++20 } }
+ #define concept 1			// { dg-warning "keyword 'concept' defined as macro" "" { target c++20 } }
+ #define const 1				// { dg-warning "keyword 'const' defined as macro" }
+ #define const_cast 1			// { dg-warning "keyword 'const_cast' defined as macro" }
+ #define consteval 1			// { dg-warning "keyword 'consteval' defined as macro" "" { target c++20 } }
+ #define constexpr 1			// { dg-warning "keyword 'constexpr' defined as macro" "" { target c++11 } }
+ #define constinit 1			// { dg-warning "keyword 'constinit' defined as macro" "" { target c++20 } }
+ #define continue 1			// { dg-warning "keyword 'continue' defined as macro" }
+ #define contract_assert 1
+ #define co_return 1			// { dg-warning "keyword 'co_return' defined as macro" "" { target c++20 } }
+ #define co_yield 1			// { dg-warning "keyword 'co_yield' defined as macro" "" { target c++20 } }
+ #define decltype 1			// { dg-warning "keyword 'decltype' defined as macro" "" { target c++11 } }
+ #define default 1			// { dg-warning "keyword 'default' defined as macro" }
+ #define delete 1			// { dg-warning "keyword 'delete' defined as macro" }
+ #define do 1				// { dg-warning "keyword 'do' defined as macro" }
+ #define double 1			// { dg-warning "keyword 'double' defined as macro" }
+ #define dynamic_cast 1			// { dg-warning "keyword 'dynamic_cast' defined as macro" }
+ #define else 1				// { dg-warning "keyword 'else' defined as macro" }
+ #define enum 1				// { dg-warning "keyword 'enum' defined as macro" }
+ #define explicit 1			// { dg-warning "keyword 'explicit' defined as macro" }
+ #define export 1			// { dg-warning "keyword 'export' defined as macro" }
+ #define extern 1			// { dg-warning "keyword 'extern' defined as macro" }
+ #define false 1				// { dg-warning "keyword 'false' defined as macro" }
+ #define float 1				// { dg-warning "keyword 'float' defined as macro" }
+ #define for 1				// { dg-warning "keyword 'for' defined as macro" }
+ #define friend 1			// { dg-warning "keyword 'friend' defined as macro" }
+ #define goto 1				// { dg-warning "keyword 'goto' defined as macro" }
+ #define if 1				// { dg-warning "keyword 'if' defined as macro" }
+ #define inline 1			// { dg-warning "keyword 'inline' defined as macro" }
+ #define int 1				// { dg-warning "keyword 'int' defined as macro" }
+ #define long 1				// { dg-warning "keyword 'long' defined as macro" }
+ #define mutable 1			// { dg-warning "keyword 'mutable' defined as macro" }
+ #define namespace 1			// { dg-warning "keyword 'namespace' defined as macro" }
+ #define new 1				// { dg-warning "keyword 'new' defined as macro" }
+ #define noexcept 1			// { dg-warning "keyword 'noexcept' defined as macro" "" { target c++11 } }
+ #define nullptr 1			// { dg-warning "keyword 'nullptr' defined as macro" "" { target c++11 } }
+ #define operator 1			// { dg-warning "keyword 'operator' defined as macro" }
+ #define private 1			// { dg-warning "keyword 'private' defined as macro" }
+ #define protected 1			// { dg-warning "keyword 'protected' defined as macro" }
+ #define public 1			// { dg-warning "keyword 'public' defined as macro" }
+ #define register 1			// { dg-warning "keyword 'register' defined as macro" }
+ #define reinterpret_cast 1		// { dg-warning "keyword 'reinterpret_cast' defined as macro" }
+ #define requires 1			// { dg-warning "keyword 'requires' defined as macro" "" { target c++20 } }
+ #define return 1			// { dg-warning "keyword 'return' defined as macro" }
+ #define short 1				// { dg-warning "keyword 'short' defined as macro" }
+ #define signed 1			// { dg-warning "keyword 'signed' defined as macro" }
+ #define sizeof 1			// { dg-warning "keyword 'sizeof' defined as macro" }
+ #define static 1			// { dg-warning "keyword 'static' defined as macro" }
+ #define static_assert 1			// { dg-warning "keyword 'static_assert' defined as macro" "" { target c++11 } }
+ #define static_cast 1			// { dg-warning "keyword 'static_cast' defined as macro" }
+ #define struct 1			// { dg-warning "keyword 'struct' defined as macro" }
+ #define switch 1			// { dg-warning "keyword 'switch' defined as macro" }
+ #define template 1			// { dg-warning "keyword 'template' defined as macro" }
+ #define this 1				// { dg-warning "keyword 'this' defined as macro" }
+ #define thread_local 1			// { dg-warning "keyword 'thread_local' defined as macro" "" { target c++11 } }
+ #define throw 1				// { dg-warning "keyword 'throw' defined as macro" }
+ #define true 1				// { dg-warning "keyword 'true' defined as macro" }
+ #define try 1				// { dg-warning "keyword 'try' defined as macro" }
+ #define typedef 1			// { dg-warning "keyword 'typedef' defined as macro" }
+ #define typeid 1			// { dg-warning "keyword 'typeid' defined as macro" }
+ #define typename 1			// { dg-warning "keyword 'typename' defined as macro" }
+ #define union 1				// { dg-warning "keyword 'union' defined as macro" }
+ #define unsigned 1			// { dg-warning "keyword 'unsigned' defined as macro" }
+ #define using 1				// { dg-warning "keyword 'using' defined as macro" }
+ #define virtual 1			// { dg-warning "keyword 'virtual' defined as macro" }
+ #define void 1				// { dg-warning "keyword 'void' defined as macro" }
+ #define volatile 1			// { dg-warning "keyword 'volatile' defined as macro" }
+ #define wchar_t 1			// { dg-warning "keyword 'wchar_t' defined as macro" }
+ #define while 1				// { dg-warning "keyword 'while' defined as macro" }
+ 
+ // [lex.name]
+ #define final 1				// { dg-warning "keyword 'final' defined as macro" "" { target c++11 } }
+ #define import 1			// { dg-warning "keyword 'import' defined as macro" "" { target c++20 } }
+ #define module 1			// { dg-warning "keyword 'module' defined as macro" "" { target c++20 } }
+ #define override 1			// { dg-warning "keyword 'override' defined as macro" "" { target c++11 } }
+ #define post 1
+ #define pre 1
+ #define replaceable_if_eligible 1	// { dg-warning "keyword 'replaceable_if_eligible' defined as macro" "" { target c++26 } }
+ #define trivially_relocatable_if_eligible 1	// { dg-warning "keyword 'trivially_relocatable_if_eligible' defined as macro" "" { target c++26 } }
+ 
+ // [dcl.attr]
+ #define assume 1			// { dg-warning "keyword 'assume' defined as macro" "" { target c++23 } }
+ #define carries_dependency 1		// { dg-warning "keyword 'carries_dependency' defined as macro" "" { target { c++11 && c++23_down } } }
+ #define deprecated 1			// { dg-warning "keyword 'deprecated' defined as macro" "" { target c++14 } }
+ #define fallthrough 1			// { dg-warning "keyword 'fallthrough' defined as macro" "" { target c++17 } }
+ #define indeterminate 1
+ #define likely 1			// { dg-warning "keyword 'likely' defined as macro" "" { target c++20 } }
+ #define maybe_unused 1			// { dg-warning "keyword 'maybe_unused' defined as macro" "" { target c++17 } }
+ #define nodiscard 1			// { dg-warning "keyword 'nodiscard' defined as macro" "" { target c++17 } }
+ #define noreturn 1			// { dg-warning "keyword 'noreturn' defined as macro" "" { target c++11 } }
+ #define no_unique_address 1		// { dg-warning "keyword 'no_unique_address' defined as macro" "" { target c++20 } }
+ #define unlikely 1			// { dg-warning "keyword 'unlikely' defined as macro" "" { target c++20 } }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/warn/Wkeyword-macro-8.C gcc-16-20250810/gcc/testsuite/g++.dg/warn/Wkeyword-macro-8.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/warn/Wkeyword-macro-8.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/warn/Wkeyword-macro-8.C	Sun Aug 10 22:32:15 2025
***************
*** 0 ****
--- 1,112 ----
+ // C++26 P2843R3 - Preprocessing is never undefined
+ // [cpp.replace.general]/9
+ // { dg-do preprocess }
+ // { dg-options "-Wkeyword-macro" }
+ // { dg-additional-options "-fmodules" { target c++20 } }
+ 
+ // [lex.key]
+ #undef alignas				// { dg-warning "undefining keyword 'alignas'" "" { target c++11 } }
+ #undef alignof				// { dg-warning "undefining keyword 'alignof'" "" { target c++11 } }
+ #undef asm				// { dg-warning "undefining keyword 'asm'" }
+ #undef auto				// { dg-warning "undefining keyword 'auto'" }
+ #undef bool				// { dg-warning "undefining keyword 'bool'" }
+ #undef break				// { dg-warning "undefining keyword 'break'" }
+ #undef case				// { dg-warning "undefining keyword 'case'" }
+ #undef catch				// { dg-warning "undefining keyword 'catch'" }
+ #undef char				// { dg-warning "undefining keyword 'char'" }
+ #undef char16_t				// { dg-warning "undefining keyword 'char16_t'" "" { target c++11 } }
+ #undef char32_t				// { dg-warning "undefining keyword 'char32_t'" "" { target c++11 } }
+ #undef char8_t				// { dg-warning "undefining keyword 'char8_t'" "" { target c++20 } }
+ #undef class				// { dg-warning "undefining keyword 'class'" }
+ #undef co_await				// { dg-warning "undefining keyword 'co_await'" "" { target c++20 } }
+ #undef concept				// { dg-warning "undefining keyword 'concept'" "" { target c++20 } }
+ #undef const				// { dg-warning "undefining keyword 'const'" }
+ #undef const_cast			// { dg-warning "undefining keyword 'const_cast'" }
+ #undef consteval			// { dg-warning "undefining keyword 'consteval'" "" { target c++20 } }
+ #undef constexpr			// { dg-warning "undefining keyword 'constexpr'" "" { target c++11 } }
+ #undef constinit			// { dg-warning "undefining keyword 'constinit'" "" { target c++20 } }
+ #undef continue				// { dg-warning "undefining keyword 'continue'" }
+ #undef contract_assert
+ #undef co_return			// { dg-warning "undefining keyword 'co_return'" "" { target c++20 } }
+ #undef co_yield				// { dg-warning "undefining keyword 'co_yield'" "" { target c++20 } }
+ #undef decltype				// { dg-warning "undefining keyword 'decltype'" "" { target c++11 } }
+ #undef default				// { dg-warning "undefining keyword 'default'" }
+ #undef delete				// { dg-warning "undefining keyword 'delete'" }
+ #undef do				// { dg-warning "undefining keyword 'do'" }
+ #undef double				// { dg-warning "undefining keyword 'double'" }
+ #undef dynamic_cast			// { dg-warning "undefining keyword 'dynamic_cast'" }
+ #undef else				// { dg-warning "undefining keyword 'else'" }
+ #undef enum				// { dg-warning "undefining keyword 'enum'" }
+ #undef explicit				// { dg-warning "undefining keyword 'explicit'" }
+ #undef export				// { dg-warning "undefining keyword 'export'" }
+ #undef extern				// { dg-warning "undefining keyword 'extern'" }
+ #undef false				// { dg-warning "undefining keyword 'false'" }
+ #undef float				// { dg-warning "undefining keyword 'float'" }
+ #undef for				// { dg-warning "undefining keyword 'for'" }
+ #undef friend				// { dg-warning "undefining keyword 'friend'" }
+ #undef goto				// { dg-warning "undefining keyword 'goto'" }
+ #undef if				// { dg-warning "undefining keyword 'if'" }
+ #undef inline				// { dg-warning "undefining keyword 'inline'" }
+ #undef int				// { dg-warning "undefining keyword 'int'" }
+ #undef long				// { dg-warning "undefining keyword 'long'" }
+ #undef mutable				// { dg-warning "undefining keyword 'mutable'" }
+ #undef namespace			// { dg-warning "undefining keyword 'namespace'" }
+ #undef new				// { dg-warning "undefining keyword 'new'" }
+ #undef noexcept				// { dg-warning "undefining keyword 'noexcept'" "" { target c++11 } }
+ #undef nullptr				// { dg-warning "undefining keyword 'nullptr'" "" { target c++11 } }
+ #undef operator				// { dg-warning "undefining keyword 'operator'" }
+ #undef private				// { dg-warning "undefining keyword 'private'" }
+ #undef protected			// { dg-warning "undefining keyword 'protected'" }
+ #undef public				// { dg-warning "undefining keyword 'public'" }
+ #undef register				// { dg-warning "undefining keyword 'register'" }
+ #undef reinterpret_cast			// { dg-warning "undefining keyword 'reinterpret_cast'" }
+ #undef requires				// { dg-warning "undefining keyword 'requires'" "" { target c++20 } }
+ #undef return				// { dg-warning "undefining keyword 'return'" }
+ #undef short				// { dg-warning "undefining keyword 'short'" }
+ #undef signed				// { dg-warning "undefining keyword 'signed'" }
+ #undef sizeof				// { dg-warning "undefining keyword 'sizeof'" }
+ #undef static				// { dg-warning "undefining keyword 'static'" }
+ #undef static_assert			// { dg-warning "undefining keyword 'static_assert'" "" { target c++11 } }
+ #undef static_cast			// { dg-warning "undefining keyword 'static_cast'" }
+ #undef struct				// { dg-warning "undefining keyword 'struct'" }
+ #undef switch				// { dg-warning "undefining keyword 'switch'" }
+ #undef template				// { dg-warning "undefining keyword 'template'" }
+ #undef this				// { dg-warning "undefining keyword 'this'" }
+ #undef thread_local			// { dg-warning "undefining keyword 'thread_local'" "" { target c++11 } }
+ #undef throw				// { dg-warning "undefining keyword 'throw'" }
+ #undef true				// { dg-warning "undefining keyword 'true'" }
+ #undef try				// { dg-warning "undefining keyword 'try'" }
+ #undef typedef				// { dg-warning "undefining keyword 'typedef'" }
+ #undef typeid				// { dg-warning "undefining keyword 'typeid'" }
+ #undef typename				// { dg-warning "undefining keyword 'typename'" }
+ #undef union				// { dg-warning "undefining keyword 'union'" }
+ #undef unsigned				// { dg-warning "undefining keyword 'unsigned'" }
+ #undef using				// { dg-warning "undefining keyword 'using'" }
+ #undef virtual				// { dg-warning "undefining keyword 'virtual'" }
+ #undef void				// { dg-warning "undefining keyword 'void'" }
+ #undef volatile				// { dg-warning "undefining keyword 'volatile'" }
+ #undef wchar_t				// { dg-warning "undefining keyword 'wchar_t'" }
+ #undef while				// { dg-warning "undefining keyword 'while'" }
+ 
+ // [lex.name]
+ #undef final				// { dg-warning "undefining keyword 'final'" "" { target c++11 } }
+ #undef import				// { dg-warning "undefining keyword 'import'" "" { target c++20 } }
+ #undef module				// { dg-warning "undefining keyword 'module'" "" { target c++20 } }
+ #undef override				// { dg-warning "undefining keyword 'override'" "" { target c++11 } }
+ #undef post
+ #undef pre
+ #undef replaceable_if_eligible		// { dg-warning "undefining keyword 'replaceable_if_eligible'" "" { target c++26 } }
+ #undef trivially_relocatable_if_eligible	// { dg-warning "undefining keyword 'trivially_relocatable_if_eligible'" "" { target c++26 } }
+ 
+ // [dcl.attr]
+ #undef assume				// { dg-warning "undefining keyword 'assume'" "" { target c++23 } }
+ #undef carries_dependency		// { dg-warning "undefining keyword 'carries_dependency'" "" { target { c++11 && c++23_down } } }
+ #undef deprecated			// { dg-warning "undefining keyword 'deprecated'" "" { target c++14 } }
+ #undef fallthrough			// { dg-warning "undefining keyword 'fallthrough'" "" { target c++17 } }
+ #undef indeterminate
+ #undef likely				// { dg-warning "undefining keyword 'likely'" "" { target c++20 } }
+ #undef maybe_unused			// { dg-warning "undefining keyword 'maybe_unused'" "" { target c++17 } }
+ #undef nodiscard			// { dg-warning "undefining keyword 'nodiscard'" "" { target c++17 } }
+ #undef noreturn				// { dg-warning "undefining keyword 'noreturn'" "" { target c++11 } }
+ #undef no_unique_address		// { dg-warning "undefining keyword 'no_unique_address'" "" { target c++20 } }
+ #undef unlikely				// { dg-warning "undefining keyword 'unlikely'" "" { target c++20 } }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.dg/warn/Wkeyword-macro-9.C gcc-16-20250810/gcc/testsuite/g++.dg/warn/Wkeyword-macro-9.C
*** gcc-16-20250803/gcc/testsuite/g++.dg/warn/Wkeyword-macro-9.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.dg/warn/Wkeyword-macro-9.C	Sun Aug 10 22:32:15 2025
***************
*** 0 ****
--- 1,22 ----
+ // C++26 P2843R3 - Preprocessing is never undefined
+ // [cpp.replace.general]/9
+ // { dg-do preprocess }
+ // { dg-options "-pedantic-errors" }
+ 
+ #undef for				// { dg-error "undefining keyword 'for'" "" { target c++26 } }
+ #define for for				// { dg-error "keyword 'for' defined as macro" "" { target c++26 } }
+ #undef for				// { dg-error "undefining keyword 'for'" "" { target c++26 } }
+ #define while do			// { dg-error "keyword 'while' defined as macro" "" { target c++26 } }
+ #define while do			// { dg-error "keyword 'while' defined as macro" "" { target c++26 } }
+ #define while for			// { dg-error "keyword 'while' defined as macro" "" { target c++26 } }
+ 					// { dg-error "'while' redefined" "" { target *-*-* } .-1 }
+ #undef while				// { dg-error "undefining keyword 'while'" "" { target c++26 } }
+ #define while while			// { dg-error "keyword 'while' defined as macro" "" { target c++26 } }
+ #define private public			// { dg-error "keyword 'private' defined as macro" "" { target c++26 } }
+ #define inline				// { dg-error "keyword 'inline' defined as macro" "" { target c++26 } }
+ #undef inline				// { dg-error "undefining keyword 'inline'" "" { target c++26 } }
+ #define inline __inline__ __attribute__((__always_inline__))	// { dg-error "keyword 'inline' defined as macro" "" { target c++26 } }
+ #define likely(a) a
+ #undef likely				// { dg-error "undefining keyword 'likely'" "" { target c++26 } }
+ #define unlikely(a, b, c) a + b + c
+ #define unlikely(a, b, c) a + b + c
diff -Nrcpad gcc-16-20250803/gcc/testsuite/g++.target/aarch64/sve/pr121449.C gcc-16-20250810/gcc/testsuite/g++.target/aarch64/sve/pr121449.C
*** gcc-16-20250803/gcc/testsuite/g++.target/aarch64/sve/pr121449.C	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/g++.target/aarch64/sve/pr121449.C	Sun Aug 10 22:32:16 2025
***************
*** 0 ****
--- 1,44 ----
+ /* PR target/121449 */
+ /* { dg-do assemble { target aarch64_asm_sve_ok } } */
+ /* { dg-options "-O3 -save-temps" } */
+ 
+ struct example;
+ 
+ struct array {
+   unsigned length();
+   example *operator[](unsigned i) {
+     example **data = reinterpret_cast<example **>(this);
+     return data[i];
+   }
+ };
+ 
+ struct example {
+   int a[16];
+   bool is_even;
+   int version;
+   int count() { return is_even ? 2 : 1; }
+   void fun1(int, long);
+   void fun2(unsigned, unsigned);
+   void process(array &, array &);
+ };
+ 
+ bool found;
+ 
+ void example::process(array &a, array &b) {
+   for (unsigned i = 1; a.length(); i++) {
+     long total = 0;
+     for (unsigned k = 0; k <= i; k++) {
+       total += a[k]->count();
+     }
+     for (unsigned j = 0; j < i; j++) {
+       int major = b[j]->version;
+       if (found)
+         major += i;
+       fun1(i + 1, total);
+       fun2(j, major);
+     }
+   }
+ }
+ 
+ /* { dg-final { scan-assembler-not {\tld1b\t(z[0-9]+)\.d, p[0-7]/z, \[(z[0-9]+)\.d, #64\]} } } */
+ 
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/Wkeyword-macro-1.c gcc-16-20250810/gcc/testsuite/gcc.dg/Wkeyword-macro-1.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/Wkeyword-macro-1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/Wkeyword-macro-1.c	Sun Aug 10 22:32:17 2025
***************
*** 0 ****
--- 1,62 ----
+ // { dg-do preprocess }
+ // { dg-options "-Wkeyword-macro -std=c23" }
+ 
+ #define _Alignas 1			// { dg-warning "keyword '_Alignas' defined as macro" }
+ #define _Alignof 1			// { dg-warning "keyword '_Alignof' defined as macro" }
+ #define _Atomic 1			// { dg-warning "keyword '_Atomic' defined as macro" }
+ #define _BitInt 1			// { dg-warning "keyword '_BitInt' defined as macro" }
+ #define _Bool 1				// { dg-warning "keyword '_Bool' defined as macro" }
+ #define _Complex 1			// { dg-warning "keyword '_Complex' defined as macro" }
+ #define _Decimal128 1			// { dg-warning "keyword '_Decimal128' defined as macro" }
+ #define _Decimal32 1			// { dg-warning "keyword '_Decimal32' defined as macro" }
+ #define _Decimal64 1			// { dg-warning "keyword '_Decimal64' defined as macro" }
+ #define _Generic 1			// { dg-warning "keyword '_Generic' defined as macro" }
+ #define _Imaginary 1			// { dg-warning "keyword '_Imaginary' defined as macro" }
+ #define _Noreturn 1			// { dg-warning "keyword '_Noreturn' defined as macro" }
+ #define _Static_assert 1		// { dg-warning "keyword '_Static_assert' defined as macro" }
+ #define _Thread_local 1			// { dg-warning "keyword '_Thread_local' defined as macro" }
+ #define alignas 1			// { dg-warning "keyword 'alignas' defined as macro" }
+ #define alignof 1			// { dg-warning "keyword 'alignof' defined as macro" }
+ #define auto 1				// { dg-warning "keyword 'auto' defined as macro" }
+ #define bool 1				// { dg-warning "keyword 'bool' defined as macro" }
+ #define break 1				// { dg-warning "keyword 'break' defined as macro" }
+ #define case 1				// { dg-warning "keyword 'case' defined as macro" }
+ #define char 1				// { dg-warning "keyword 'char' defined as macro" }
+ #define const 1				// { dg-warning "keyword 'const' defined as macro" }
+ #define constexpr 1			// { dg-warning "keyword 'constexpr' defined as macro" }
+ #define continue 1			// { dg-warning "keyword 'continue' defined as macro" }
+ #define default 1			// { dg-warning "keyword 'default' defined as macro" }
+ #define do 1				// { dg-warning "keyword 'do' defined as macro" }
+ #define double 1			// { dg-warning "keyword 'double' defined as macro" }
+ #define else 1				// { dg-warning "keyword 'else' defined as macro" }
+ #define enum 1				// { dg-warning "keyword 'enum' defined as macro" }
+ #define extern 1			// { dg-warning "keyword 'extern' defined as macro" }
+ #define false 1				// { dg-warning "keyword 'false' defined as macro" }
+ #define float 1				// { dg-warning "keyword 'float' defined as macro" }
+ #define for 1				// { dg-warning "keyword 'for' defined as macro" }
+ #define goto 1				// { dg-warning "keyword 'goto' defined as macro" }
+ #define if 1				// { dg-warning "keyword 'if' defined as macro" }
+ #define inline 1			// { dg-warning "keyword 'inline' defined as macro" }
+ #define int 1				// { dg-warning "keyword 'int' defined as macro" }
+ #define long 1				// { dg-warning "keyword 'long' defined as macro" }
+ #define nullptr 1			// { dg-warning "keyword 'nullptr' defined as macro" }
+ #define register 1			// { dg-warning "keyword 'register' defined as macro" }
+ #define restrict 1			// { dg-warning "keyword 'restrict' defined as macro" }
+ #define return 1			// { dg-warning "keyword 'return' defined as macro" }
+ #define short 1				// { dg-warning "keyword 'short' defined as macro" }
+ #define signed 1			// { dg-warning "keyword 'signed' defined as macro" }
+ #define sizeof 1			// { dg-warning "keyword 'sizeof' defined as macro" }
+ #define static 1			// { dg-warning "keyword 'static' defined as macro" }
+ #define static_assert 1			// { dg-warning "keyword 'static_assert' defined as macro" }
+ #define struct 1			// { dg-warning "keyword 'struct' defined as macro" }
+ #define switch 1			// { dg-warning "keyword 'switch' defined as macro" }
+ #define thread_local 1			// { dg-warning "keyword 'thread_local' defined as macro" }
+ #define true 1				// { dg-warning "keyword 'true' defined as macro" }
+ #define typedef 1			// { dg-warning "keyword 'typedef' defined as macro" }
+ #define typeof 1			// { dg-warning "keyword 'typeof' defined as macro" }
+ #define typeof_unqual 1			// { dg-warning "keyword 'typeof_unqual' defined as macro" }
+ #define union 1				// { dg-warning "keyword 'union' defined as macro" }
+ #define unsigned 1			// { dg-warning "keyword 'unsigned' defined as macro" }
+ #define void 1				// { dg-warning "keyword 'void' defined as macro" }
+ #define volatile 1			// { dg-warning "keyword 'volatile' defined as macro" }
+ #define while 1				// { dg-warning "keyword 'while' defined as macro" }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/Wkeyword-macro-2.c gcc-16-20250810/gcc/testsuite/gcc.dg/Wkeyword-macro-2.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/Wkeyword-macro-2.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/Wkeyword-macro-2.c	Sun Aug 10 22:32:17 2025
***************
*** 0 ****
--- 1,4 ----
+ // { dg-do preprocess }
+ // { dg-options "-std=c23" }
+ 
+ #include "Wkeyword-macro-1.c"
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/Wkeyword-macro-3.c gcc-16-20250810/gcc/testsuite/gcc.dg/Wkeyword-macro-3.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/Wkeyword-macro-3.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/Wkeyword-macro-3.c	Sun Aug 10 22:32:17 2025
***************
*** 0 ****
--- 1,62 ----
+ // { dg-do preprocess }
+ // { dg-options "-Wkeyword-macro -std=c23" }
+ 
+ #undef _Alignas			// { dg-warning "undefining keyword '_Alignas'" }
+ #undef _Alignof			// { dg-warning "undefining keyword '_Alignof'" }
+ #undef _Atomic			// { dg-warning "undefining keyword '_Atomic'" }
+ #undef _BitInt			// { dg-warning "undefining keyword '_BitInt'" }
+ #undef _Bool			// { dg-warning "undefining keyword '_Bool'" }
+ #undef _Complex			// { dg-warning "undefining keyword '_Complex'" }
+ #undef _Decimal128		// { dg-warning "undefining keyword '_Decimal128'" }
+ #undef _Decimal32		// { dg-warning "undefining keyword '_Decimal32'" }
+ #undef _Decimal64		// { dg-warning "undefining keyword '_Decimal64'" }
+ #undef _Generic			// { dg-warning "undefining keyword '_Generic'" }
+ #undef _Imaginary		// { dg-warning "undefining keyword '_Imaginary'" }
+ #undef _Noreturn		// { dg-warning "undefining keyword '_Noreturn'" }
+ #undef _Static_assert		// { dg-warning "undefining keyword '_Static_assert'" }
+ #undef _Thread_local		// { dg-warning "undefining keyword '_Thread_local'" }
+ #undef alignas			// { dg-warning "undefining keyword 'alignas'" }
+ #undef alignof			// { dg-warning "undefining keyword 'alignof'" }
+ #undef auto			// { dg-warning "undefining keyword 'auto'" }
+ #undef bool			// { dg-warning "undefining keyword 'bool'" }
+ #undef break			// { dg-warning "undefining keyword 'break'" }
+ #undef case			// { dg-warning "undefining keyword 'case'" }
+ #undef char			// { dg-warning "undefining keyword 'char'" }
+ #undef const			// { dg-warning "undefining keyword 'const'" }
+ #undef constexpr		// { dg-warning "undefining keyword 'constexpr'" }
+ #undef continue			// { dg-warning "undefining keyword 'continue'" }
+ #undef default			// { dg-warning "undefining keyword 'default'" }
+ #undef do			// { dg-warning "undefining keyword 'do'" }
+ #undef double			// { dg-warning "undefining keyword 'double'" }
+ #undef else			// { dg-warning "undefining keyword 'else'" }
+ #undef enum			// { dg-warning "undefining keyword 'enum'" }
+ #undef extern			// { dg-warning "undefining keyword 'extern'" }
+ #undef false			// { dg-warning "undefining keyword 'false'" }
+ #undef float			// { dg-warning "undefining keyword 'float'" }
+ #undef for			// { dg-warning "undefining keyword 'for'" }
+ #undef goto			// { dg-warning "undefining keyword 'goto'" }
+ #undef if			// { dg-warning "undefining keyword 'if'" }
+ #undef inline			// { dg-warning "undefining keyword 'inline'" }
+ #undef int			// { dg-warning "undefining keyword 'int'" }
+ #undef long			// { dg-warning "undefining keyword 'long'" }
+ #undef nullptr			// { dg-warning "undefining keyword 'nullptr'" }
+ #undef register			// { dg-warning "undefining keyword 'register'" }
+ #undef restrict			// { dg-warning "undefining keyword 'restrict'" }
+ #undef return			// { dg-warning "undefining keyword 'return'" }
+ #undef short			// { dg-warning "undefining keyword 'short'" }
+ #undef signed			// { dg-warning "undefining keyword 'signed'" }
+ #undef sizeof			// { dg-warning "undefining keyword 'sizeof'" }
+ #undef static			// { dg-warning "undefining keyword 'static'" }
+ #undef static_assert		// { dg-warning "undefining keyword 'static_assert'" }
+ #undef struct			// { dg-warning "undefining keyword 'struct'" }
+ #undef switch			// { dg-warning "undefining keyword 'switch'" }
+ #undef thread_local		// { dg-warning "undefining keyword 'thread_local'" }
+ #undef true			// { dg-warning "undefining keyword 'true'" }
+ #undef typedef			// { dg-warning "undefining keyword 'typedef'" }
+ #undef typeof			// { dg-warning "undefining keyword 'typeof'" }
+ #undef typeof_unqual		// { dg-warning "undefining keyword 'typeof_unqual'" }
+ #undef union			// { dg-warning "undefining keyword 'union'" }
+ #undef unsigned			// { dg-warning "undefining keyword 'unsigned'" }
+ #undef void			// { dg-warning "undefining keyword 'void'" }
+ #undef volatile			// { dg-warning "undefining keyword 'volatile'" }
+ #undef while			// { dg-warning "undefining keyword 'while'" }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/Wkeyword-macro-4.c gcc-16-20250810/gcc/testsuite/gcc.dg/Wkeyword-macro-4.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/Wkeyword-macro-4.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/Wkeyword-macro-4.c	Sun Aug 10 22:32:17 2025
***************
*** 0 ****
--- 1,4 ----
+ // { dg-do preprocess }
+ // { dg-options "-std=c23" }
+ 
+ #include "Wkeyword-macro-3.c"
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/Wkeyword-macro-5.c gcc-16-20250810/gcc/testsuite/gcc.dg/Wkeyword-macro-5.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/Wkeyword-macro-5.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/Wkeyword-macro-5.c	Sun Aug 10 22:32:17 2025
***************
*** 0 ****
--- 1,47 ----
+ // { dg-do preprocess }
+ // { dg-options "-Wkeyword-macro -std=c17" }
+ 
+ #define _Alignas 1			// { dg-warning "keyword '_Alignas' defined as macro" }
+ #define _Alignof 1			// { dg-warning "keyword '_Alignof' defined as macro" }
+ #define _Atomic 1			// { dg-warning "keyword '_Atomic' defined as macro" }
+ #define _Bool 1				// { dg-warning "keyword '_Bool' defined as macro" }
+ #define _Complex 1			// { dg-warning "keyword '_Complex' defined as macro" }
+ #define _Generic 1			// { dg-warning "keyword '_Generic' defined as macro" }
+ #define _Imaginary 1			// { dg-warning "keyword '_Imaginary' defined as macro" }
+ #define _Noreturn 1			// { dg-warning "keyword '_Noreturn' defined as macro" }
+ #define _Static_assert 1		// { dg-warning "keyword '_Static_assert' defined as macro" }
+ #define _Thread_local 1			// { dg-warning "keyword '_Thread_local' defined as macro" }
+ #define auto 1				// { dg-warning "keyword 'auto' defined as macro" }
+ #define break 1				// { dg-warning "keyword 'break' defined as macro" }
+ #define case 1				// { dg-warning "keyword 'case' defined as macro" }
+ #define char 1				// { dg-warning "keyword 'char' defined as macro" }
+ #define const 1				// { dg-warning "keyword 'const' defined as macro" }
+ #define continue 1			// { dg-warning "keyword 'continue' defined as macro" }
+ #define default 1			// { dg-warning "keyword 'default' defined as macro" }
+ #define do 1				// { dg-warning "keyword 'do' defined as macro" }
+ #define double 1			// { dg-warning "keyword 'double' defined as macro" }
+ #define else 1				// { dg-warning "keyword 'else' defined as macro" }
+ #define enum 1				// { dg-warning "keyword 'enum' defined as macro" }
+ #define extern 1			// { dg-warning "keyword 'extern' defined as macro" }
+ #define float 1				// { dg-warning "keyword 'float' defined as macro" }
+ #define for 1				// { dg-warning "keyword 'for' defined as macro" }
+ #define goto 1				// { dg-warning "keyword 'goto' defined as macro" }
+ #define if 1				// { dg-warning "keyword 'if' defined as macro" }
+ #define inline 1			// { dg-warning "keyword 'inline' defined as macro" }
+ #define int 1				// { dg-warning "keyword 'int' defined as macro" }
+ #define long 1				// { dg-warning "keyword 'long' defined as macro" }
+ #define register 1			// { dg-warning "keyword 'register' defined as macro" }
+ #define restrict 1			// { dg-warning "keyword 'restrict' defined as macro" }
+ #define return 1			// { dg-warning "keyword 'return' defined as macro" }
+ #define short 1				// { dg-warning "keyword 'short' defined as macro" }
+ #define signed 1			// { dg-warning "keyword 'signed' defined as macro" }
+ #define sizeof 1			// { dg-warning "keyword 'sizeof' defined as macro" }
+ #define static 1			// { dg-warning "keyword 'static' defined as macro" }
+ #define struct 1			// { dg-warning "keyword 'struct' defined as macro" }
+ #define switch 1			// { dg-warning "keyword 'switch' defined as macro" }
+ #define typedef 1			// { dg-warning "keyword 'typedef' defined as macro" }
+ #define union 1				// { dg-warning "keyword 'union' defined as macro" }
+ #define unsigned 1			// { dg-warning "keyword 'unsigned' defined as macro" }
+ #define void 1				// { dg-warning "keyword 'void' defined as macro" }
+ #define volatile 1			// { dg-warning "keyword 'volatile' defined as macro" }
+ #define while 1				// { dg-warning "keyword 'while' defined as macro" }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/Wkeyword-macro-6.c gcc-16-20250810/gcc/testsuite/gcc.dg/Wkeyword-macro-6.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/Wkeyword-macro-6.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/Wkeyword-macro-6.c	Sun Aug 10 22:32:17 2025
***************
*** 0 ****
--- 1,4 ----
+ // { dg-do preprocess }
+ // { dg-options "-std=c17" }
+ 
+ #include "Wkeyword-macro-5.c"
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/Wkeyword-macro-7.c gcc-16-20250810/gcc/testsuite/gcc.dg/Wkeyword-macro-7.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/Wkeyword-macro-7.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/Wkeyword-macro-7.c	Sun Aug 10 22:32:17 2025
***************
*** 0 ****
--- 1,47 ----
+ // { dg-do preprocess }
+ // { dg-options "-Wkeyword-macro -std=c17" }
+ 
+ #undef _Alignas			// { dg-warning "undefining keyword '_Alignas'" }
+ #undef _Alignof			// { dg-warning "undefining keyword '_Alignof'" }
+ #undef _Atomic			// { dg-warning "undefining keyword '_Atomic'" }
+ #undef _Bool			// { dg-warning "undefining keyword '_Bool'" }
+ #undef _Complex			// { dg-warning "undefining keyword '_Complex'" }
+ #undef _Generic			// { dg-warning "undefining keyword '_Generic'" }
+ #undef _Imaginary		// { dg-warning "undefining keyword '_Imaginary'" }
+ #undef _Noreturn		// { dg-warning "undefining keyword '_Noreturn'" }
+ #undef _Static_assert		// { dg-warning "undefining keyword '_Static_assert'" }
+ #undef _Thread_local		// { dg-warning "undefining keyword '_Thread_local'" }
+ #undef auto			// { dg-warning "undefining keyword 'auto'" }
+ #undef break			// { dg-warning "undefining keyword 'break'" }
+ #undef case			// { dg-warning "undefining keyword 'case'" }
+ #undef char			// { dg-warning "undefining keyword 'char'" }
+ #undef const			// { dg-warning "undefining keyword 'const'" }
+ #undef continue			// { dg-warning "undefining keyword 'continue'" }
+ #undef default			// { dg-warning "undefining keyword 'default'" }
+ #undef do			// { dg-warning "undefining keyword 'do'" }
+ #undef double			// { dg-warning "undefining keyword 'double'" }
+ #undef else			// { dg-warning "undefining keyword 'else'" }
+ #undef enum			// { dg-warning "undefining keyword 'enum'" }
+ #undef extern			// { dg-warning "undefining keyword 'extern'" }
+ #undef float			// { dg-warning "undefining keyword 'float'" }
+ #undef for			// { dg-warning "undefining keyword 'for'" }
+ #undef goto			// { dg-warning "undefining keyword 'goto'" }
+ #undef if			// { dg-warning "undefining keyword 'if'" }
+ #undef inline			// { dg-warning "undefining keyword 'inline'" }
+ #undef int			// { dg-warning "undefining keyword 'int'" }
+ #undef long			// { dg-warning "undefining keyword 'long'" }
+ #undef register			// { dg-warning "undefining keyword 'register'" }
+ #undef restrict			// { dg-warning "undefining keyword 'restrict'" }
+ #undef return			// { dg-warning "undefining keyword 'return'" }
+ #undef short			// { dg-warning "undefining keyword 'short'" }
+ #undef signed			// { dg-warning "undefining keyword 'signed'" }
+ #undef sizeof			// { dg-warning "undefining keyword 'sizeof'" }
+ #undef static			// { dg-warning "undefining keyword 'static'" }
+ #undef struct			// { dg-warning "undefining keyword 'struct'" }
+ #undef switch			// { dg-warning "undefining keyword 'switch'" }
+ #undef typedef			// { dg-warning "undefining keyword 'typedef'" }
+ #undef union			// { dg-warning "undefining keyword 'union'" }
+ #undef unsigned			// { dg-warning "undefining keyword 'unsigned'" }
+ #undef void			// { dg-warning "undefining keyword 'void'" }
+ #undef volatile			// { dg-warning "undefining keyword 'volatile'" }
+ #undef while			// { dg-warning "undefining keyword 'while'" }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/Wkeyword-macro-8.c gcc-16-20250810/gcc/testsuite/gcc.dg/Wkeyword-macro-8.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/Wkeyword-macro-8.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/Wkeyword-macro-8.c	Sun Aug 10 22:32:17 2025
***************
*** 0 ****
--- 1,4 ----
+ // { dg-do preprocess }
+ // { dg-options "-std=c17" }
+ 
+ #include "Wkeyword-macro-7.c"
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/Wkeyword-macro-9.c gcc-16-20250810/gcc/testsuite/gcc.dg/Wkeyword-macro-9.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/Wkeyword-macro-9.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/Wkeyword-macro-9.c	Sun Aug 10 22:32:17 2025
***************
*** 0 ****
--- 1,15 ----
+ // { dg-do preprocess }
+ // { dg-options "-Wkeyword-macro" }
+ 
+ #undef for				// { dg-warning "undefining keyword 'for'" }
+ #define for for				// { dg-warning "keyword 'for' defined as macro" }
+ #undef for				// { dg-warning "undefining keyword 'for'" }
+ #define while do			// { dg-warning "keyword 'while' defined as macro" }
+ #define while do			// { dg-warning "keyword 'while' defined as macro" }
+ #define while for			// { dg-warning "keyword 'while' defined as macro" }
+ 					// { dg-warning "'while' redefined" "" { target *-*-* } .-1 }
+ #undef while				// { dg-warning "undefining keyword 'while'" }
+ #define while while			// { dg-warning "keyword 'while' defined as macro" }
+ #define inline				// { dg-warning "keyword 'inline' defined as macro" }
+ #undef inline				// { dg-warning "undefining keyword 'inline'" }
+ #define inline __inline__ __attribute__((__always_inline__))	// { dg-warning "keyword 'inline' defined as macro" }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/asm-hard-reg-1.c gcc-16-20250810/gcc/testsuite/gcc.dg/asm-hard-reg-1.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/asm-hard-reg-1.c	Sun Aug  3 22:32:35 2025
--- gcc-16-20250810/gcc/testsuite/gcc.dg/asm-hard-reg-1.c	Sun Aug 10 22:32:17 2025
***************
*** 22,31 ****
  /* { dg-final { scan-assembler-times "foo\t%r4" 8 { target { s390*-*-* } } } } */
  #elif defined (__x86_64__)
  # define GPR "{rcx}"
! /* { dg-final { scan-assembler-times "foo\t%cl" 2 { target { x86_64-*-* } } } } */
! /* { dg-final { scan-assembler-times "foo\t%cx" 2 { target { x86_64-*-* } } } } */
! /* { dg-final { scan-assembler-times "foo\t%ecx" 2 { target { x86_64-*-* } } } } */
! /* { dg-final { scan-assembler-times "foo\t%rcx" 2 { target { x86_64-*-* } } } } */
  #endif
  
  char
--- 22,32 ----
  /* { dg-final { scan-assembler-times "foo\t%r4" 8 { target { s390*-*-* } } } } */
  #elif defined (__x86_64__)
  # define GPR "{rcx}"
! /* { dg-final { scan-assembler-times "foo\t%cl" 2 { target { i?86-*-* x86_64-*-* } } } } */
! /* { dg-final { scan-assembler-times "foo\t%cx" 2 { target { i?86-*-* x86_64-*-* } } } } */
! /* { dg-final { scan-assembler-times "foo\t%ecx" 2 { target { { i?86-*-* x86_64-*-* } && lp64 } } } } */
! /* { dg-final { scan-assembler-times "foo\t%rcx" 2 { target { { i?86-*-* x86_64-*-* } && lp64 } } } } */
! /* { dg-final { scan-assembler-times "foo\t%ecx" 4 { target { { i?86-*-* x86_64-*-* } && { ! lp64 } } } } } */
  #endif
  
  char
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/asm-hard-reg-2.c gcc-16-20250810/gcc/testsuite/gcc.dg/asm-hard-reg-2.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/asm-hard-reg-2.c	Sun Aug  3 22:32:35 2025
--- gcc-16-20250810/gcc/testsuite/gcc.dg/asm-hard-reg-2.c	Sun Aug 10 22:32:17 2025
***************
*** 1,4 ****
! /* { dg-do compile { target aarch64*-*-* powerpc64*-*-* riscv64-*-* s390*-*-* x86_64-*-* } } */
  /* { dg-options "-std=c99" } we need long long */
  
  #if defined (__aarch64__)
--- 1,4 ----
! /* { dg-do compile { target { { aarch64*-*-* powerpc64*-*-* riscv64-*-* s390*-*-* } || { { i?86-*-* x86_64-*-* } && { ! ia32 } } } } } */
  /* { dg-options "-std=c99" } we need long long */
  
  #if defined (__aarch64__)
***************
*** 15,21 ****
  /* { dg-final { scan-assembler-times "foo\t%r4" 2 { target { s390*-*-* } } } } */
  #elif defined (__x86_64__)
  # define GPR "{rcx}"
! /* { dg-final { scan-assembler-times "foo\t%rcx" 2 { target { x86_64-*-* } } } } */
  #endif
  
  long long
--- 15,21 ----
  /* { dg-final { scan-assembler-times "foo\t%r4" 2 { target { s390*-*-* } } } } */
  #elif defined (__x86_64__)
  # define GPR "{rcx}"
! /* { dg-final { scan-assembler-times "foo\t%rcx" 2 { target { i?86-*-* x86_64-*-* } } } } */
  #endif
  
  long long
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/asm-hard-reg-4.c gcc-16-20250810/gcc/testsuite/gcc.dg/asm-hard-reg-4.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/asm-hard-reg-4.c	Sun Aug  3 22:32:35 2025
--- gcc-16-20250810/gcc/testsuite/gcc.dg/asm-hard-reg-4.c	Sun Aug 10 22:32:17 2025
***************
*** 1,4 ****
! /* { dg-do compile { target aarch64*-*-* arm*-*-* powerpc*-*-* riscv*-*-* s390*-*-* x86_64-*-* } } */
  
  #if defined (__aarch64__)
  # define FPR "{d5}"
--- 1,5 ----
! /* { dg-do compile { target aarch64*-*-* arm*-*-* i?86-*-* powerpc*-*-* riscv*-*-* s390*-*-* x86_64-*-* } } */
! /* { dg-additional-options "-msse2" { target i?86-*-* x86_64-*-* } } */
  
  #if defined (__aarch64__)
  # define FPR "{d5}"
***************
*** 16,24 ****
  #elif defined (__s390__)
  # define FPR "{f5}"
  /* { dg-final { scan-assembler-times "foo\t%f5" 4 { target { s390*-*-* } } } } */
! #elif defined (__x86_64__)
  # define FPR "{xmm5}"
! /* { dg-final { scan-assembler-times "foo\t%xmm5" 4 { target { x86_64-*-* } } } } */
  #endif
  
  float
--- 17,25 ----
  #elif defined (__s390__)
  # define FPR "{f5}"
  /* { dg-final { scan-assembler-times "foo\t%f5" 4 { target { s390*-*-* } } } } */
! #elif defined (__i386__) || defined (__x86_64__)
  # define FPR "{xmm5}"
! /* { dg-final { scan-assembler-times "foo\t%xmm5" 4 { target { i?86-*-* x86_64-*-* } } } } */
  #endif
  
  float
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/asm-hard-reg-5.c gcc-16-20250810/gcc/testsuite/gcc.dg/asm-hard-reg-5.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/asm-hard-reg-5.c	Sun Aug  3 22:32:35 2025
--- gcc-16-20250810/gcc/testsuite/gcc.dg/asm-hard-reg-5.c	Sun Aug 10 22:32:17 2025
***************
*** 1,4 ****
! /* { dg-do compile { target aarch64*-*-* powerpc64*-*-* riscv64-*-* s390*-*-* x86_64-*-* } } */
  
  typedef int V __attribute__ ((vector_size (4 * sizeof (int))));
  
--- 1,4 ----
! /* { dg-do compile { target { { aarch64*-*-* powerpc64*-*-* riscv64-*-* s390*-*-* } || { { i?86-*-* x86_64-*-* } && { ! ia32 } } } } } */
  
  typedef int V __attribute__ ((vector_size (4 * sizeof (int))));
  
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/asm-hard-reg-6.c gcc-16-20250810/gcc/testsuite/gcc.dg/asm-hard-reg-6.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/asm-hard-reg-6.c	Sun Aug  3 22:32:35 2025
--- gcc-16-20250810/gcc/testsuite/gcc.dg/asm-hard-reg-6.c	Sun Aug 10 22:32:17 2025
***************
*** 19,26 ****
  # define GPR1 "{eax}"
  # define GPR2 "{ebx}"
  # define GPR3 "{ecx}"
! /* { dg-final { scan-assembler-times "foo\t4\\(%esp\\),%ecx" 1 { target { i?86-*-* } } } } */
! /* { dg-final { scan-assembler-times "bar\t%ebx,\\(%eax\\)" 1 { target { i?86-*-* } } } } */
  #elif defined (__powerpc__) || defined (__POWERPC__)
  # define GPR1 "{r4}"
  # define GPR2 "{r5}"
--- 19,26 ----
  # define GPR1 "{eax}"
  # define GPR2 "{ebx}"
  # define GPR3 "{ecx}"
! /* { dg-final { scan-assembler-times "foo\t4\\(%esp\\),%ecx" 1 { target { { i?86-*-* x86_64-*-* } && { ia32 } } } } } */
! /* { dg-final { scan-assembler-times "bar\t%ebx,\\(%eax\\)" 1 { target { { i?86-*-* x86_64-*-* } && { ia32 } } } } } */
  #elif defined (__powerpc__) || defined (__POWERPC__)
  # define GPR1 "{r4}"
  # define GPR2 "{r5}"
***************
*** 43,50 ****
  # define GPR1 "{eax}"
  # define GPR2 "{ebx}"
  # define GPR3 "{rcx}"
! /* { dg-final { scan-assembler-times "foo\t%eax,%rcx" 1 { target { x86_64-*-* } } } } */
! /* { dg-final { scan-assembler-times "bar\t%ebx,\\(%rsi\\)" 1 { target { x86_64-*-* } } } } */
  #endif
  
  void
--- 43,52 ----
  # define GPR1 "{eax}"
  # define GPR2 "{ebx}"
  # define GPR3 "{rcx}"
! /* { dg-final { scan-assembler-times "foo\t%eax,%rcx" 1 { target { { i?86-*-* x86_64-*-* } && lp64 } } } } */
! /* { dg-final { scan-assembler-times "bar\t%ebx,\\(%rsi\\)" 1 { target { { i?86-*-* x86_64-*-* } && lp64 } } } } */
! /* { dg-final { scan-assembler-times "foo\t%eax,%ecx" 1 { target { { i?86-*-* x86_64-*-* } && x32 } } } } */
! /* { dg-final { scan-assembler-times "bar\t%ebx,\\(%esi\\)" 1 { target { { i?86-*-* x86_64-*-* } && x32 } } } } */
  #endif
  
  void
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/bitint-125.c gcc-16-20250810/gcc/testsuite/gcc.dg/bitint-125.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/bitint-125.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/bitint-125.c	Sun Aug 10 22:32:17 2025
***************
*** 0 ****
--- 1,15 ----
+ /* PR tree-optimization/121127 */
+ /* { dg-do compile { target bitint } } */
+ /* { dg-options "-O2 -w" } */
+ 
+ #if __BITINT_MAXWIDTH__ >= 576
+ _BitInt(575)
+ foo (void)
+ {
+   _BitInt(576) d;
+   _BitInt(575) e = d * 42wb;
+   return e;
+ }
+ #else
+ int i;
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/bitintext.h gcc-16-20250810/gcc/testsuite/gcc.dg/bitintext.h
*** gcc-16-20250803/gcc/testsuite/gcc.dg/bitintext.h	Sun Aug  3 22:32:35 2025
--- gcc-16-20250810/gcc/testsuite/gcc.dg/bitintext.h	Sun Aug 10 22:32:18 2025
*************** do_copy (void *p, const void *q, __SIZE_
*** 4,28 ****
    __builtin_memcpy (p, q, r);
  }
  
  /* Macro to test whether (on targets where psABI requires it) _BitInt
     with padding bits have those filled with sign or zero extension.  */
  #if defined(__s390x__) || defined(__arm__) || defined(__loongarch__)
  #define BEXTC(x) \
!   do {								\
!     if ((typeof (x)) -1 < 0)					\
!       {								\
! 	_BitInt(sizeof (x) * __CHAR_BIT__) __x;			\
! 	do_copy (&__x, &(x), sizeof (__x));			\
! 	if (__x != (x))						\
! 	  __builtin_abort ();					\
!       }								\
!     else							\
!       {								\
! 	unsigned _BitInt(sizeof (x) * __CHAR_BIT__) __x;	\
! 	do_copy (&__x, &(x), sizeof (__x));			\
! 	if (__x != (x))						\
! 	  __builtin_abort ();					\
!       }								\
    } while (0)
  #else
  #define BEXTC(x) do { (void) (x); } while (0)
--- 4,44 ----
    __builtin_memcpy (p, q, r);
  }
  
+ /* Obtain the value of N from a _BitInt(N)-typed expression X
+    at compile time.  */
+ #define S(x) \
+   ((typeof (x)) -1 < 0                                                   \
+    ? __builtin_clrsbg (__builtin_choose_expr ((typeof (x)) -1 < 0,       \
+ 					      (typeof (x)) -1, -1)) + 1  \
+    : __builtin_popcountg (__builtin_choose_expr ((typeof (x)) -1 < 0,    \
+ 						 0U, (typeof (x)) -1)))
+ 
+ #define CEIL(x,y) (((x) + (y) - 1) / (y))
+ 
+ /* Promote a _BitInt type to include its padding bits.  */
+ #if defined (__s390x__) || defined(__arm__)
+ #define PROMOTED_SIZE(x) sizeof (x)
+ #elif defined(__loongarch__)
+ #define PROMOTED_SIZE(x) (sizeof (x) > 8 ? CEIL (S (x), 64) * 8 : sizeof (x))
+ #endif
+ 
  /* Macro to test whether (on targets where psABI requires it) _BitInt
     with padding bits have those filled with sign or zero extension.  */
  #if defined(__s390x__) || defined(__arm__) || defined(__loongarch__)
+ #define BEXTC1(x, uns) \
+   do {							  \
+     uns _BitInt(PROMOTED_SIZE (x) * __CHAR_BIT__) __x;	  \
+     do_copy (&__x, &(x), sizeof (__x));			  \
+     if (__x != (typeof (x)) __x)			  \
+       __builtin_abort ();				  \
+   } while (0)
+ 
  #define BEXTC(x) \
!   do {				\
!     if ((typeof (x)) -1 < 0)	\
!       BEXTC1 ((x), signed);	\
!     else			\
!       BEXTC1 ((x), unsigned);	\
    } while (0)
  #else
  #define BEXTC(x) do { (void) (x); } while (0)
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/c23-attr-syntax-6.c gcc-16-20250810/gcc/testsuite/gcc.dg/c23-attr-syntax-6.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/c23-attr-syntax-6.c	Sun Aug  3 22:32:35 2025
--- gcc-16-20250810/gcc/testsuite/gcc.dg/c23-attr-syntax-6.c	Sun Aug 10 22:32:18 2025
*************** typedef int [[__extension__ __extension_
*** 45,51 ****
  typedef int [[__extension__ unknown_attribute]] b3; /* { dg-error {'unknown_attribute' attribute ignored} } */
  typedef int [[__extension__ gnu:vector_size(4)]] b4; /* { dg-error {expected '\]' before ':'} } */
  /* { dg-error {'gnu' attribute ignored} "" { target *-*-* } .-1 } */
! typedef int [[__extension__ gnu JOIN2(:,:) vector_size (4)]] b5; /* { dg-error {pasting ":" and ":" does not give a valid preprocessing token} } */
  /* { dg-error {expected '\]' before ':'} "" { target *-*-* } .-1 } */
  /* { dg-error {'gnu' attribute ignored} "" { target *-*-* } .-2 } */
  typedef int [[__extension__ gnu : : vector_size (4)]] b6; /* { dg-error {expected '\]' before ':'} } */
--- 45,51 ----
  typedef int [[__extension__ unknown_attribute]] b3; /* { dg-error {'unknown_attribute' attribute ignored} } */
  typedef int [[__extension__ gnu:vector_size(4)]] b4; /* { dg-error {expected '\]' before ':'} } */
  /* { dg-error {'gnu' attribute ignored} "" { target *-*-* } .-1 } */
! typedef int [[__extension__ gnu JOIN2(:,:) vector_size (4)]] b5; /* { dg-error {pasting ':' and ':' does not give a valid preprocessing token} } */
  /* { dg-error {expected '\]' before ':'} "" { target *-*-* } .-1 } */
  /* { dg-error {'gnu' attribute ignored} "" { target *-*-* } .-2 } */
  typedef int [[__extension__ gnu : : vector_size (4)]] b6; /* { dg-error {expected '\]' before ':'} } */
*************** typedef int [[gnu :: vector_size (4)]] b
*** 81,87 ****
  typedef int [[gnu FOO vector_size (4)]] b19; /* { dg-error {attributes before C23} } */
  typedef int [[gnu :: vector_size (sizeof (void (*)(...)))]] b20; /* { dg-error {attributes before C23} } */
  /* { dg-error {requires a named argument before} "" { target *-*-* } .-1 } */
! typedef int [[gnu JOIN2(:,:) vector_size (4)]] b21; /* { dg-error {pasting ":" and ":" does not give a valid preprocessing token} } */
  /* { dg-error {expected '\]' before ':'} "" { target *-*-* } .-1 } */
  /* { dg-error {'gnu' attribute ignored} "" { target *-*-* } .-2 } */
  /* { dg-error {attributes before C23} "" { target *-*-* } .-3 } */
--- 81,87 ----
  typedef int [[gnu FOO vector_size (4)]] b19; /* { dg-error {attributes before C23} } */
  typedef int [[gnu :: vector_size (sizeof (void (*)(...)))]] b20; /* { dg-error {attributes before C23} } */
  /* { dg-error {requires a named argument before} "" { target *-*-* } .-1 } */
! typedef int [[gnu JOIN2(:,:) vector_size (4)]] b21; /* { dg-error {pasting ':' and ':' does not give a valid preprocessing token} } */
  /* { dg-error {expected '\]' before ':'} "" { target *-*-* } .-1 } */
  /* { dg-error {'gnu' attribute ignored} "" { target *-*-* } .-2 } */
  /* { dg-error {attributes before C23} "" { target *-*-* } .-3 } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/cpp/paste12-2.c gcc-16-20250810/gcc/testsuite/gcc.dg/cpp/paste12-2.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/cpp/paste12-2.c	Sun Aug  3 22:32:35 2025
--- gcc-16-20250810/gcc/testsuite/gcc.dg/cpp/paste12-2.c	Sun Aug 10 22:32:18 2025
***************
*** 6,11 ****
  /* Test correct diagnostics when pasting in #include.
     Source: PR preprocessor/6780.  */
  
! #define inc2(a,b) <##a.b>  /* { dg-error "pasting \"<\" and \"stdio\" does not" } */
  #define INC(X) inc2(X,h)
  #include INC(stdio)
--- 6,11 ----
  /* Test correct diagnostics when pasting in #include.
     Source: PR preprocessor/6780.  */
  
! #define inc2(a,b) <##a.b>  /* { dg-error "pasting '<' and 'stdio' does not" } */
  #define INC(X) inc2(X,h)
  #include INC(stdio)
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/cpp/paste12.c gcc-16-20250810/gcc/testsuite/gcc.dg/cpp/paste12.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/cpp/paste12.c	Sun Aug  3 22:32:35 2025
--- gcc-16-20250810/gcc/testsuite/gcc.dg/cpp/paste12.c	Sun Aug 10 22:32:18 2025
***************
*** 8,11 ****
  
  #define inc2(a,b) <##a.b>
  #define INC(X) inc2(X,h)
! #include INC(stdio) /* { dg-error "pasting \"<\" and \"stdio\" does not" } */
--- 8,11 ----
  
  #define inc2(a,b) <##a.b>
  #define INC(X) inc2(X,h)
! #include INC(stdio) /* { dg-error "pasting '<' and 'stdio' does not" } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/cpp/paste14-2.c gcc-16-20250810/gcc/testsuite/gcc.dg/cpp/paste14-2.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/cpp/paste14-2.c	Sun Aug  3 22:32:35 2025
--- gcc-16-20250810/gcc/testsuite/gcc.dg/cpp/paste14-2.c	Sun Aug 10 22:32:18 2025
***************
*** 4,11 ****
     { dg-do preprocess }
  */
  
! #define foo - ## >> /* { dg-error "pasting \"-\" and \">>\"" } */
  foo
! #define bar = ## == /* { dg-error "pasting \"=\" and \"==\"" } */
  bar
  
--- 4,11 ----
     { dg-do preprocess }
  */
  
! #define foo - ## >> /* { dg-error "pasting '-' and '>>'" } */
  foo
! #define bar = ## == /* { dg-error "pasting '=' and '=='" } */
  bar
  
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/cpp/paste14.c gcc-16-20250810/gcc/testsuite/gcc.dg/cpp/paste14.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/cpp/paste14.c	Sun Aug  3 22:32:35 2025
--- gcc-16-20250810/gcc/testsuite/gcc.dg/cpp/paste14.c	Sun Aug 10 22:32:18 2025
***************
*** 5,10 ****
  */
  
  #define foo - ## >>
! foo		/* { dg-error "pasting \"-\" and \">>\"" } */
  #define bar = ## ==
! bar		/* { dg-error "pasting \"=\" and \"==\"" } */
--- 5,10 ----
  */
  
  #define foo - ## >>
! foo		/* { dg-error "pasting '-' and '>>'" } */
  #define bar = ## ==
! bar		/* { dg-error "pasting '=' and '=='" } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/plugin/diagnostic-test-graphs-html.py gcc-16-20250810/gcc/testsuite/gcc.dg/plugin/diagnostic-test-graphs-html.py
*** gcc-16-20250803/gcc/testsuite/gcc.dg/plugin/diagnostic-test-graphs-html.py	Sun Aug  3 22:32:38 2025
--- gcc-16-20250810/gcc/testsuite/gcc.dg/plugin/diagnostic-test-graphs-html.py	Sun Aug 10 22:32:20 2025
*************** def test_result_graph(html_tree):
*** 26,32 ****
      assert message.attrib['id'] == 'gcc-diag-0-message'
  
      assert message[0].tag == make_tag('strong')
!     assert message[0].tail == ' this is a placeholder error, with graphs '
  
      graph = diag.find("./xhtml:div[@class='gcc-directed-graph']", ns)
      assert graph is not None
--- 26,32 ----
      assert message.attrib['id'] == 'gcc-diag-0-message'
  
      assert message[0].tag == make_tag('strong')
!     assert message[0].tail == ' this is a placeholder error, with graphs'
  
      graph = diag.find("./xhtml:div[@class='gcc-directed-graph']", ns)
      assert graph is not None
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-html.c gcc-16-20250810/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-html.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-html.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-html.c	Sun Aug 10 22:32:20 2025
***************
*** 0 ****
--- 1,13 ----
+ /* { dg-do compile } */
+ /* { dg-options "-fdiagnostics-add-output=experimental-html:javascript=no" } */
+ 
+ extern void foo (void);
+ 
+ void test_nesting (void)
+ {
+   foo (); /* { dg-error "top-level error" } */
+ }
+ 
+ /* Use a Python script to verify various properties about the generated
+    .html file:
+    { dg-final { run-html-pytest diagnostic-test-nesting-html.c "diagnostic-test-nesting-html.py" } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-html.py gcc-16-20250810/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-html.py
*** gcc-16-20250803/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-html.py	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-html.py	Sun Aug 10 22:32:20 2025
***************
*** 0 ****
--- 1,69 ----
+ # Verify that nesting works in HTML output.
+ 
+ from htmltest import *
+ 
+ import pytest
+ 
+ @pytest.fixture(scope='function', autouse=True)
+ def html_tree():
+     return html_tree_from_env()
+ 
+ def test_nesting(html_tree):
+     root = html_tree.getroot ()
+     assert root.tag == make_tag('html')
+ 
+     body = root.find('xhtml:body', ns)
+     assert body is not None
+ 
+     diag_list = body.find('xhtml:div', ns)
+     assert diag_list is not None
+     assert diag_list.attrib['class'] == 'gcc-diagnostic-list'
+ 
+     diag = diag_list.find('xhtml:div', ns)
+     assert diag is not None
+ 
+     message = diag.find("./xhtml:div[@class='gcc-message']", ns)
+     assert message.attrib['id'] == 'gcc-diag-0-message'
+ 
+     assert message[0].tag == make_tag('strong')
+     assert message[0].tail == ' top-level error'
+ 
+     # We expect 12 messages, with the given IDs and text:
+     for i in range(12):
+         child = diag.find(".//xhtml:div[@id='gcc-diag-%i']" % (i + 1),
+                           ns)
+         assert child is not None
+ 
+         message = child.find("./xhtml:div[@class='gcc-message']", ns)
+         assert message.attrib['id'] == 'gcc-diag-%i-message' % (i + 1)
+ 
+         if i % 4 == 0:
+             assert message.text == 'child %i' % (i / 4)
+         else:
+             assert message.text == 'grandchild %i %i' % ((i / 4), (i % 4) - 1)
+ 
+     # We expect the messages to be organized into nested <ul> with
+     # "nesting-level" set, all below a <ul>
+     child_ul = diag.find("./xhtml:ul[@nesting-level='1']", ns)
+     assert child_ul is not None
+     msg_id = 1
+     for i in range(3):
+         child_li = child_ul.find("./xhtml:li[@nesting-level='1'][%i]" % (i + 1), ns)
+         assert child_li is not None
+         child = child_li.find("./xhtml:div[@id='gcc-diag-%i']" % msg_id, ns)
+         assert child is not None
+         message = child.find("./xhtml:div[@class='gcc-message']", ns)
+         assert message.attrib['id'] == 'gcc-diag-%i-message' % msg_id
+         assert message.text == 'child %i' % i
+         msg_id += 1
+         grandchild_ul = child_ul.find("./xhtml:ul[@nesting-level='2'][%i]" % (i + 1), ns)
+         assert grandchild_ul is not None
+         for j in range(3):
+             grandchild_li = grandchild_ul.find("./xhtml:li[@nesting-level='2'][%i]" % (j + 1), ns)
+             assert grandchild_li is not None
+             grandchild = grandchild_li.find("./xhtml:div[@id='gcc-diag-%i']" % msg_id, ns)
+             assert grandchild is not None
+             message = grandchild.find("./xhtml:div[@class='gcc-message']", ns)
+             assert message.attrib['id'] == 'gcc-diag-%i-message' % msg_id
+             assert message.text == 'grandchild %i %i' % (i, j)
+             msg_id += 1
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-no-show-nesting.c gcc-16-20250810/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-no-show-nesting.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-no-show-nesting.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-no-show-nesting.c	Sun Aug 10 22:32:20 2025
***************
*** 0 ****
--- 1,9 ----
+ /* { dg-do compile } */
+ /* { dg-options "-fno-diagnostics-show-nesting" } */
+ 
+ extern void foo (void);
+ 
+ void test_nesting (void)
+ {
+   foo (); /* { dg-error "top-level error" } */
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-show-nesting.c gcc-16-20250810/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-show-nesting.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-show-nesting.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-show-nesting.c	Sun Aug 10 22:32:20 2025
***************
*** 0 ****
--- 1,24 ----
+ /* { dg-do compile } */
+ /* { dg-options "-fdiagnostics-show-nesting" } */
+ 
+ extern void foo (void);
+ 
+ void test_nesting (void)
+ {
+   foo (); /* { dg-error "top-level error" } */
+ }
+ 
+ /* { dg-begin-multiline-output "" }
+   * child 0
+     * grandchild 0 0
+     * grandchild 0 1
+     * grandchild 0 2
+   * child 1
+     * grandchild 1 0
+     * grandchild 1 1
+     * grandchild 1 2
+   * child 2
+     * grandchild 2 0
+     * grandchild 2 1
+     * grandchild 2 2
+    { dg-end-multiline-output "" } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-text-indented-show-levels.c gcc-16-20250810/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-text-indented-show-levels.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-text-indented-show-levels.c	Sun Aug  3 22:32:38 2025
--- gcc-16-20250810/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-text-indented-show-levels.c	Sun Aug 10 22:32:20 2025
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-fdiagnostics-set-output=text:experimental-nesting=yes,experimental-nesting-show-levels=yes" } */
  
  extern void foo (void);
  
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-fdiagnostics-set-output=text:show-nesting=yes,show-nesting-levels=yes" } */
  
  extern void foo (void);
  
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-text-indented-unicode.c gcc-16-20250810/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-text-indented-unicode.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-text-indented-unicode.c	Sun Aug  3 22:32:38 2025
--- gcc-16-20250810/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-text-indented-unicode.c	Sun Aug 10 22:32:20 2025
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-fdiagnostics-set-output=text:experimental-nesting=yes -fdiagnostics-text-art-charset=unicode" } */
  
  extern void foo (void);
  
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-fdiagnostics-set-output=text:show-nesting=yes -fdiagnostics-text-art-charset=unicode" } */
  
  extern void foo (void);
  
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-text-indented.c gcc-16-20250810/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-text-indented.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-text-indented.c	Sun Aug  3 22:32:38 2025
--- gcc-16-20250810/gcc/testsuite/gcc.dg/plugin/diagnostic-test-nesting-text-indented.c	Sun Aug 10 22:32:20 2025
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-fdiagnostics-set-output=text:experimental-nesting=yes" } */
  
  extern void foo (void);
  
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-fdiagnostics-set-output=text:show-nesting=yes" } */
  
  extern void foo (void);
  
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/plugin/plugin.exp gcc-16-20250810/gcc/testsuite/gcc.dg/plugin/plugin.exp
*** gcc-16-20250803/gcc/testsuite/gcc.dg/plugin/plugin.exp	Sun Aug  3 22:32:38 2025
--- gcc-16-20250810/gcc/testsuite/gcc.dg/plugin/plugin.exp	Sun Aug 10 22:32:20 2025
*************** set plugin_test_list [list \
*** 112,121 ****
--- 112,124 ----
  	  diagnostic-test-graphs-html.c \
  	  diagnostic-test-graphs-sarif.c } \
      { diagnostic_plugin_test_nesting.cc \
+ 	  diagnostic-test-nesting-show-nesting.c \
+ 	  diagnostic-test-nesting-no-show-nesting.c \
  	  diagnostic-test-nesting-text-plain.c \
  	  diagnostic-test-nesting-text-indented.c \
  	  diagnostic-test-nesting-text-indented-show-levels.c \
  	  diagnostic-test-nesting-text-indented-unicode.c \
+ 	  diagnostic-test-nesting-html.c \
  	  diagnostic-test-nesting-sarif.c } \
      { diagnostic_plugin_test_paths.cc \
  	  diagnostic-test-paths-1.c \
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/pr118946-1.c gcc-16-20250810/gcc/testsuite/gcc.dg/pr118946-1.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/pr118946-1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/pr118946-1.c	Sun Aug 10 22:32:20 2025
***************
*** 0 ****
--- 1,15 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2 -fdump-tree-optimized -fdump-tree-forwprop1-details" } */
+ 
+ /* PR tree-optimization/118946 */
+ 
+ void f(char *a)
+ {
+   char t[1024] = {};
+   __builtin_memcpy(a, t, 10);
+ }
+ 
+ /* We should be able to optimize the memcpy into a memset here. */
+ /* { dg-final { scan-tree-dump-times "after previous" 1 "forwprop1"} } */
+ /* { dg-final { scan-tree-dump-times "memset " 1 "optimized" } } */
+ /* { dg-final { scan-tree-dump-not "memcpy " "optimized" } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/pr121217.c gcc-16-20250810/gcc/testsuite/gcc.dg/pr121217.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/pr121217.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/pr121217.c	Sun Aug 10 22:32:20 2025
***************
*** 0 ****
--- 1,19 ----
+ /* { dg-do compile } */
+ /* { dg-options "-std=gnu17" } */
+ 
+ typedef union{
+         char *nordic_ref;
+         unsigned long long int bit_number;
+         enum PinMode mode : 2;		/* { dg-warning "narrower" } */
+ 					/* { dg-error "field 'mode'" "" { target *-*-* } .-1 } */
+         unsigned char value;
+     } s; typedef struct{
+         union{
+             char *nordic_ref;
+             unsigned long long int bit_number;
+             enum PinMode mode : 2;	/* { dg-warning "narrower" } */
+ 					/* { dg-error "field 'mode'" "" { target *-*-* } .-1 } */
+             unsigned char value;
+         } s;
+ }					/* { dg-error "expected identifier" } */
+ 
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/torture/bitint-83.c gcc-16-20250810/gcc/testsuite/gcc.dg/torture/bitint-83.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/torture/bitint-83.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/torture/bitint-83.c	Sun Aug 10 22:32:20 2025
***************
*** 0 ****
--- 1,48 ----
+ /* Derived from a test in gcc.dg/torture/bitint-16.c */
+ /* { dg-do run { target bitint } } */
+ /* { dg-options "-std=c23 -pedantic-errors" } */
+ /* { dg-skip-if "" { ! run_expensive_tests }  { "*" } { "-O0" "-O2" } } */
+ /* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
+ 
+ #include "../bitintext.h"
+ 
+ #define BASIC_TESTS \
+   TEST(8)	    \
+   TEST(16)	    \
+   TEST(32)
+ 
+ #if __BITINT_MAXWIDTH__ >= 519
+ #define ALL_TESTS \
+   BASIC_TESTS	  \
+   TEST(64)	  \
+   TEST(128)	  \
+   TEST(256)	  \
+   TEST(512)
+ #else
+ #define ALL_TESTS BASIC_TESTS
+ #endif
+ 
+ #define TEST(N) \
+ void						    \
+ test##N (unsigned _BitInt(N + 7) *t, _BitInt(N) x)  \
+ {						    \
+   *t = -x;					    \
+ }
+ ALL_TESTS
+ #undef TEST
+ 
+ volatile int y = 0;
+ 
+ int
+ main (void)
+ {
+ #define TEST(N)	\
+   {				\
+     unsigned _BitInt(N + 7) t;	\
+     _BitInt(N) x = y + N;	\
+     test##N (&t, x);		\
+     BEXTC (t);			\
+   }
+   ALL_TESTS
+ #undef TEST
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/torture/bitint-84.c gcc-16-20250810/gcc/testsuite/gcc.dg/torture/bitint-84.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/torture/bitint-84.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/torture/bitint-84.c	Sun Aug 10 22:32:20 2025
***************
*** 0 ****
--- 1,18 ----
+ /* A simple variant of gcc.dg/torture/bitint-64.c */
+ /* { dg-do run { target bitint } } */
+ /* { dg-options "-std=c23" } */
+ /* { dg-skip-if "" { ! run_expensive_tests }  { "*" } { "-O0" "-O2" } } */
+ /* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
+ 
+ #include "../bitintext.h"
+ 
+ enum E : char { E22 = 22 } e = E22;
+ 
+ int
+ main ()
+ {
+   _Atomic _BitInt (5) b = 0;
+   b += e;
+   BEXTC (b);
+   return 0;
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/torture/bitint-85.c gcc-16-20250810/gcc/testsuite/gcc.dg/torture/bitint-85.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/torture/bitint-85.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/torture/bitint-85.c	Sun Aug 10 22:32:20 2025
***************
*** 0 ****
--- 1,34 ----
+ /* { dg-do run { target bitint } } */
+ /* { dg-options "-std=c23 -pedantic-errors" } */
+ /* { dg-skip-if "" { ! run_expensive_tests }  { "*" } { "-O0" "-O2" } } */
+ /* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
+ 
+ #if __BITINT_MAXWIDTH__ >= 1024
+ constexpr _BitInt(1024) d = -541140097068598424394740839221562143161511518875518765552323978870598341733206554363735813878577506997168480201818027232521wb;
+ int c;
+ 
+ static inline void
+ foo (_BitInt(1024) b, _BitInt(1024) *r)
+ {
+   if (c)
+     b = 0;
+   *r = b;
+ }
+ 
+ [[gnu::noipa]] void
+ bar (_BitInt(1024) y)
+ {
+   if (y != d)
+     __builtin_abort ();
+ }
+ #endif
+ 
+ int
+ main ()
+ {
+ #if __BITINT_MAXWIDTH__ >= 1024
+   _BitInt(1024) x;
+   foo (d, &x);
+   bar (x);
+ #endif
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/torture/hardbool-ai.c gcc-16-20250810/gcc/testsuite/gcc.dg/torture/hardbool-ai.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/torture/hardbool-ai.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/torture/hardbool-ai.c	Sun Aug 10 22:32:20 2025
***************
*** 0 ****
--- 1,8 ----
+ /* { dg-do run } */
+ /* { dg-require-effective-target sync_int_long } */
+ 
+ #define basetype _Atomic int
+ 
+ #define NO_BITFIELDS 1
+ 
+ #include "hardbool.c"
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/torture/hardbool-vi.c gcc-16-20250810/gcc/testsuite/gcc.dg/torture/hardbool-vi.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/torture/hardbool-vi.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/torture/hardbool-vi.c	Sun Aug 10 22:32:20 2025
***************
*** 0 ****
--- 1,5 ----
+ /* { dg-do run } */
+ 
+ #define basetype volatile int
+ 
+ #include "hardbool.c"
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/torture/hardbool.c gcc-16-20250810/gcc/testsuite/gcc.dg/torture/hardbool.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/torture/hardbool.c	Sun Aug  3 22:32:39 2025
--- gcc-16-20250810/gcc/testsuite/gcc.dg/torture/hardbool.c	Sun Aug 10 22:32:20 2025
*************** typedef unsigned char __attribute__ ((__
*** 21,28 ****
--- 21,32 ----
  
  struct hs {
    hbool a[2];
+ #ifndef NO_BITFIELDS
    hbool x:2;
    hbool y:5;
+ #else
+   hbool x, y;
+ #endif
    zbool z:1;
  };
  
*************** int ghs(hbool s) {
*** 57,62 ****
--- 61,90 ----
  
  int t = (hbool)2;
  
+ hbool add1(hbool *s) {
+   return *s += 1;
+ }
+ 
+ hbool preinc(hbool *s) {
+   return ++*s;
+ }
+ 
+ hbool postinc(hbool *s) {
+   return (*s)++;
+ }
+ 
+ hbool sub1(hbool *s) {
+   return *s -= 1;
+ }
+ 
+ hbool predec(hbool *s) {
+   return --*s;
+ }
+ 
+ hbool postdec(hbool *s) {
+   return (*s)--;
+ }
+ 
  void check_pfalse (hbool *p)
  {
    assert (!*p);
*************** int main () {
*** 114,118 ****
    check_vtrue (h2 (2));
    check_vtrue (h2 (1));
    check_vfalse (h2 (0));
- }
  
--- 142,184 ----
    check_vtrue (h2 (2));
    check_vtrue (h2 (1));
    check_vfalse (h2 (0));
  
+   hbool v;
+   v = 0;
+   check_vtrue (add1 (&v));
+   assert (v);
+   v = 0;
+   check_vtrue (preinc (&v));
+   assert (v);
+   v = 0;
+   check_vfalse (postinc (&v));
+   assert (v);
+   v = 0;
+   check_vtrue (sub1 (&v));
+   assert (v);
+   v = 0;
+   check_vtrue (predec (&v));
+   assert (v);
+   v = 0;
+   check_vfalse (postdec (&v));
+   assert (v);
+   
+   v = 1;
+   check_vtrue (add1 (&v));
+   assert (v);
+   v = 1;
+   check_vtrue (preinc (&v));
+   assert (v);
+   v = 1;
+   check_vtrue (postinc (&v));
+   assert (v);
+   v = 1;
+   check_vfalse (sub1 (&v));
+   assert (!v);
+   v = 1;
+   check_vfalse (predec (&v));
+   assert (!v);
+   v = 1;
+   check_vtrue (postdec (&v));
+   assert (!v);
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/torture/pr121370.c gcc-16-20250810/gcc/testsuite/gcc.dg/torture/pr121370.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/torture/pr121370.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/torture/pr121370.c	Sun Aug 10 22:32:20 2025
***************
*** 0 ****
--- 1,25 ----
+ /* { dg-do run } */
+ /* { dg-require-effective-target int32plus } */
+ 
+ int a;
+ int main()
+ {
+   int c = -2147483647;
+   int d = -2147483647;
+   int e = 2147483647;
+   if (0)
+   f:
+     e = d + e - 2;
+ g:
+   if (d - c - e > 0) {
+     a = -c;
+     if (a + d) {
+       d = 1;
+       goto g;
+     }
+     return 0;
+   }
+   if (e)
+     goto f;
+   return 0;
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/torture/pr121382.c gcc-16-20250810/gcc/testsuite/gcc.dg/torture/pr121382.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/torture/pr121382.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/torture/pr121382.c	Sun Aug 10 22:32:20 2025
***************
*** 0 ****
--- 1,23 ----
+ /* { dg-do run } */
+ /* { dg-require-effective-target int32plus } */
+ 
+ int a, b, c;
+ __attribute__((noipa))
+ static void d(int e, int f)
+ {
+   if (e != 5 && e != 2147483647)
+     __builtin_abort();
+   f = 2147483647;
+   do {
+     f = f - e;
+     if (c - 9 * f) {
+       __builtin_abort();
+     }
+   } while (c);
+ }
+ __attribute__((noipa))
+ int main(void)
+ {
+   d(2147483647, 2147483647);
+   return 0;
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/torture/pr121422-1.c gcc-16-20250810/gcc/testsuite/gcc.dg/torture/pr121422-1.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/torture/pr121422-1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/torture/pr121422-1.c	Sun Aug 10 22:32:20 2025
***************
*** 0 ****
--- 1,35 ----
+ /* { dg-do run } */
+ /* PR tree-optimization/121422 */
+ 
+ struct s1
+ {
+   char a[4];
+ };
+ struct s1 b;
+ char t[4];
+ 
+ /* if both t and b startout zero initialized before this function,
+    t should end up being:
+    {0, 0, 1, 0}
+    while b.a should end up being:
+    {0, 0, 0, 1} 
+ */
+ __attribute__((noipa,noinline))
+ void f(void)
+ {
+   b = (struct s1){};
+   b.a[3] = 1;
+   /* This memcpy should stay a memcpy and not become memset. */
+   __builtin_memcpy(&t[0], &b.a[1], 3*sizeof(t[0]));
+ }
+ 
+ 
+ int main()
+ {
+   f();
+   for(int i = 0; i < 4; i++)
+   {
+         if (t[i] != (i == 2 ? 1 : 0))
+           __builtin_abort();
+   }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/torture/pr121422-2.c gcc-16-20250810/gcc/testsuite/gcc.dg/torture/pr121422-2.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/torture/pr121422-2.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/torture/pr121422-2.c	Sun Aug 10 22:32:20 2025
***************
*** 0 ****
--- 1,36 ----
+ /* { dg-do run } */
+ /* PR tree-optimization/121422 */
+ 
+ struct s1
+ {
+   char a[4];
+ };
+ struct s1 b;
+ char t[4];
+ 
+ /* if both t and b startout zero initialized before this function,
+    t should end up being:
+    {0, 0, 1, 0}
+    while b.a should end up being:
+    {0, 0, 0, 1}
+ */
+ __attribute__((noipa,noinline))
+ void f(void)
+ {
+   __builtin_memset(&b.a[1], 0, 2);
+   b.a[3] = 1;
+   /* This memcpy should stay a memcpy and not become memset. */
+   __builtin_memcpy(&t[0], &b.a[1], 3);
+ }
+ 
+ 
+ int main()
+ {
+   f();
+   for(int i = 0; i < 4; i++)
+   {
+         if (t[i] != (i == 2 ? 1 : 0))
+           __builtin_abort();
+   }
+ }
+ 
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-105.c gcc-16-20250810/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-105.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-105.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-105.c	Sun Aug 10 22:32:20 2025
***************
*** 0 ****
--- 1,33 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O -fno-tree-sra -fdump-tree-fre1-details" } */
+ 
+ struct s1
+ {
+   int t, t1;
+ };
+ 
+ struct s3
+ {
+   struct s1 t;
+ };
+ 
+ struct s2
+ {
+   struct s3 t;
+ };
+ 
+ void f(int, int);
+ void l();
+ void g(int a, int b, int *p)
+ {
+   struct s2 c;
+   {
+     struct s1 tmp = {a,b};
+     struct s3 *t = &c.t;
+     t->t = tmp;
+   }
+   f(c.t.t.t, c.t.t.t1);
+ }
+ 
+ /* { dg-final { scan-tree-dump "Replaced c.t.t.t1 with b" "fre1" } } */
+ /* { dg-final { scan-tree-dump "Replaced c.t.t.t with a" "fre1" } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-106.c gcc-16-20250810/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-106.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-106.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-106.c	Sun Aug 10 22:32:20 2025
***************
*** 0 ****
--- 1,33 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O -fno-tree-sra -fdump-tree-fre1-details" } */
+ 
+ struct s1
+ {
+   int t, t1;
+ };
+ 
+ struct s3
+ {
+   struct s1 t;
+ };
+ 
+ struct s2
+ {
+   struct s3 t;
+ };
+ 
+ void f(int, int);
+ void l();
+ void g(int a, int b, int *p)
+ {
+   struct s2 c;
+   {
+     struct s1 tmp = {a,b};
+     c.t.t = tmp;
+   }
+   struct s1 *t = &c.t.t;
+   f(t->t, t->t1);
+ }
+ 
+ /* { dg-final { scan-tree-dump "Replaced \[^\r\n\]*.t1 with b" "fre1" } } */
+ /* { dg-final { scan-tree-dump "Replaced \[^\r\n\]*.t with a" "fre1" } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-107.c gcc-16-20250810/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-107.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-107.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-107.c	Sun Aug 10 22:32:20 2025
***************
*** 0 ****
--- 1,29 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O -fdump-tree-optimized" } */
+ 
+ struct vec_char_16
+ {
+   unsigned char raw[2];
+ };
+ 
+ static inline struct vec_char_16
+ Dup128VecFromValues(unsigned char t0, unsigned char t1)
+ {
+   struct vec_char_16 result;
+   result.raw[0] = t0;
+   result.raw[1] = t1;
+   return result;
+ }
+ 
+ int f(unsigned char t0, unsigned char t1)
+ {
+   struct vec_char_16 a = Dup128VecFromValues(t0, t1);
+   struct vec_char_16 b;
+   __builtin_memcpy(&b, &a, sizeof(a));
+   return b.raw[0] + b.raw[1];
+ }
+ 
+ /* Ideally we'd optimize this at FRE1 time but we only replace
+    the loads from b.raw[] with BIT_FIELD_REFs which get optimized
+    only later in the next FRE.  */
+ /* { dg-final { scan-tree-dump-not "MEM" "optimized" } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/vect/pr59984.c gcc-16-20250810/gcc/testsuite/gcc.dg/vect/pr59984.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/vect/pr59984.c	Sun Aug  3 22:32:39 2025
--- gcc-16-20250810/gcc/testsuite/gcc.dg/vect/pr59984.c	Sun Aug 10 22:32:20 2025
*************** main ()
*** 64,66 ****
--- 64,70 ----
    return 0;
  }
  
+ /* { dg-final { scan-tree-dump "31:17: optimized: loop vectorized" "vect" } } */
+ /* { dg-final { scan-tree-dump "37:7: optimized: loop vectorized" "vect" } } */
+ /* { dg-final { scan-tree-dump "44:17: optimized: loop vectorized" "vect" } } */
+ /* { dg-final { scan-tree-dump "50:7: optimized: loop vectorized" "vect" } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/vect/vect-gather-1.c gcc-16-20250810/gcc/testsuite/gcc.dg/vect/vect-gather-1.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/vect/vect-gather-1.c	Sun Aug  3 22:32:40 2025
--- gcc-16-20250810/gcc/testsuite/gcc.dg/vect/vect-gather-1.c	Sun Aug 10 22:32:20 2025
***************
*** 3,11 ****
  #define N 16
  
  void __attribute__((noipa))
! f (int *restrict y, int *restrict x, int *restrict indices)
  {
!   for (int i = 0; i < N; ++i)
      {
        y[i * 2] = x[indices[i * 2]] + 1;
        y[i * 2 + 1] = x[indices[i * 2 + 1]] + 2;
--- 3,11 ----
  #define N 16
  
  void __attribute__((noipa))
! f (int *restrict y, int *restrict x, int *restrict indices, int n)
  {
!   for (int i = 0; i < n; ++i)
      {
        y[i * 2] = x[indices[i * 2]] + 1;
        y[i * 2 + 1] = x[indices[i * 2 + 1]] + 2;
*************** main (void)
*** 49,55 ****
  {
    check_vect ();
  
!   f (y, x, indices);
  #pragma GCC novector
    for (int i = 0; i < 32; ++i)
      if (y[i] != expected[i])
--- 49,55 ----
  {
    check_vect ();
  
!   f (y, x, indices, N);
  #pragma GCC novector
    for (int i = 0; i < 32; ++i)
      if (y[i] != expected[i])
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.dg/vla-tert-1.c gcc-16-20250810/gcc/testsuite/gcc.dg/vla-tert-1.c
*** gcc-16-20250803/gcc/testsuite/gcc.dg/vla-tert-1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.dg/vla-tert-1.c	Sun Aug 10 22:32:20 2025
***************
*** 0 ****
--- 1,293 ----
+ /* { dg-do run }
+  * { dg-options "-std=c99" }
+  * */
+ 
+ 
+ // For the conditional operator and variably modified types,
+ // verify that the size expression on the selected branch
+ // is evaluated and the correct result is returned.
+ 
+ 
+ // keep track which side was evaluated.
+ static int fc[2] = { 0 };
+ 
+ static int f(int s, int c)
+ {
+ 	fc[c]++;
+ 	return s;
+ }
+ 
+ 
+ int main()
+ {
+ 	// two VLAs, constant condition
+ 
+ 	fc[0] = fc[1] = 0;
+ 
+ 	if (5 != sizeof(*(1 ? (char(*)[ f(5, 0) ])0 : (char(*)[ f(3, 1) ])0)))
+ 		__builtin_abort();
+ 
+ 	if ((1 != fc[0]) || (0 != fc[1]))
+ 		__builtin_abort();
+ 
+ 	fc[0] = fc[1] = 0;
+ 
+ 	if (3 != sizeof(*(0 ? (char(*)[ f(5, 0) ])0 : (char(*)[ f(3, 1) ])0)))
+ 		__builtin_abort();	// fails
+ 
+ 	if ((0 != fc[0]) || (1 != fc[1]))
+ 		__builtin_abort();	// fails
+ 
+ 	// two VLAs 
+ 
+ 	int c = 0;
+ 	fc[0] = fc[1] = 0;
+ 
+ 	if (3 != sizeof(*(c ? (char(*)[ f(5, 0) ])0 : (char(*)[ f(3, 1) ])0)))
+ 		__builtin_abort();	// fails
+ 
+ 	if ((0 != fc[0]) || (1 != fc[1]))
+ 		__builtin_abort();
+ 
+ 	c = 1;
+ 	fc[0] = fc[1] = 0;
+ 
+ 	if (5 != sizeof(*(c ? (char(*)[ f(5, 0) ])0 : (char(*)[ f(3, 1) ])0)))
+ 		__builtin_abort();
+ 
+ 	if ((1 != fc[0]) || (0 != fc[1]))
+ 		__builtin_abort();
+ 
+ 	// VLA + array of unknown size, VLA side is evaluated, defined
+ 
+ 	c = 0;
+ 	fc[0] = fc[1] = 0;
+ 
+ 	if (3 != sizeof(*(c ? (char(*)[ ])0 : (char(*)[ f(3, 1) ])0)))
+ 		__builtin_abort();
+ 
+ 	if ((0 != fc[0]) || (1 != fc[1]))
+ 		__builtin_abort();
+ 
+ 	c = 1;
+ 	fc[0] = fc[1] = 0;
+ 
+ 	if (5 != sizeof(*(c ? (char(*)[ f(5, 0) ])0 : (char(*)[ ])0)))
+ 		__builtin_abort();
+ 
+ 	if ((1 != fc[0]) || (0 != fc[1]))
+ 		__builtin_abort();
+ 
+ 	// VLA + array of unknown size, VLA side is not evaluated
+ 
+ 	c = 1;
+ 	fc[0] = fc[1] = 0;
+ 
+ 	sizeof(*(c ? (char(*)[ ])0 : (char(*)[ f(3, 1) ])0));
+ 
+ 	if ((0 != fc[0]) || (0 != fc[1]))
+ 		__builtin_abort();
+ 
+ 	// without sizeof
+ 
+ 	fc[0] = fc[1] = 0;
+ 
+ 	(c ? (char(*)[ ])0 : (char(*)[ f(3, 1) ])0);
+ 
+ 	if ((0 != fc[0]) || (0 != fc[1]))
+ 		__builtin_abort();
+ 
+ 	c = 0;
+ 	fc[0] = fc[1] = 0;
+ 
+ 	sizeof(*(c ? (char(*)[ f(5, 0) ])0 : (char(*)[ ])0));
+ 
+ 	if ((0 != fc[0]) || (0 != fc[1]))
+ 		__builtin_abort();
+ 
+ 	// without sizeof
+ 
+ 	fc[0] = fc[1] = 0;
+ 
+ 	(c ? (char(*)[ f(5, 0) ])0 : (char(*)[ ])0);
+ 
+ 	if ((0 != fc[0]) || (0 != fc[1]))
+ 		__builtin_abort();
+ 
+ 
+ 	// VLA + array of known size, VLA side is evaluated
+ 
+ 	c = 0;
+ 	fc[0] = fc[1] = 0;
+ 
+ 	if (3 != sizeof(*(c ? (char(*)[3])0 : (char(*)[ f(3, 1) ])0)))
+ 		__builtin_abort();
+ 
+ 	// sizeof is not evaluated because not a VLA
+ 	if ((0 != fc[0]) || (0 != fc[1]))
+ 		__builtin_abort();
+ 
+ 	c = 0;
+ 	fc[0] = fc[1] = 0;
+ 
+ 	// without sizeof
+ 
+ 	(c ? (char(*)[3])0 : (char(*)[ f(3, 1) ])0);
+ 
+ 	if ((0 != fc[0]) || (1 != fc[1]))
+ 		__builtin_abort();
+ 
+ 	c = 1;
+ 	fc[0] = fc[1] = 0;
+ 
+ 	if (5 != sizeof(*(c ? (char(*)[ f(5, 0) ])0 : (char(*)[5])0)))
+ 		__builtin_abort();
+ 
+ 	// sizeof is not evaluated because not a VLA
+ 	if ((0 != fc[0]) || (0 != fc[1]))
+ 		__builtin_abort();
+ 
+ 	// without sizeof
+ 
+ 	fc[0] = fc[1] = 0;
+ 
+ 	(c ? (char(*)[ f(5, 0) ])0 : (char(*)[ 5 ])0);
+ 
+ 	if ((1 != fc[0]) || (0 != fc[1]))
+ 		__builtin_abort();
+ 
+ 	// VLA + array of known size, VLA side is not evaluated
+ 
+ 	c = 0;
+ 	fc[0] = fc[1] = 0;
+ 
+ 	if (3 != sizeof(*(c ? (char(*)[ f(3, 0) ])0 : (char(*)[ 3 ])0)))
+ 		__builtin_abort();
+ 
+ 	if ((0 != fc[0]) || (0 != fc[1]))
+ 		__builtin_abort();
+ 
+ 	c = 1;
+ 	fc[0] = fc[1] = 0;
+ 
+ 	if (5 != sizeof(*(c ? (char(*)[ 5 ])0 : (char(*)[ f(5, 1) ])0)))
+ 		__builtin_abort();
+ 
+ 	if ((0 != fc[0]) || (0 != fc[1]))
+ 		__builtin_abort();
+ 
+ 	// VM type on one side, null pointer on the other side
+ 
+ 	c = 0;
+ 	fc[0] = fc[1] = 0;
+ 
+ 	if (3 != sizeof(*(c ? (void*)0 : (char(*)[ f(3, 1) ])0)))
+ 		__builtin_abort();
+ 
+ 	if ((0 != fc[0]) || (1 != fc[1]))
+ 		__builtin_abort();
+ 
+ 	c = 1;
+ 	fc[0] = fc[1] = 0;
+ 
+ 	if (5 != sizeof(*(c ? (char(*)[ f(5, 0) ])0 : (void*)0)))
+ 		__builtin_abort();
+ 
+ 	if ((1 != fc[0]) || (0 != fc[1]))
+ 		__builtin_abort();
+ 
+ #if 0
+ 	// these cases are not fixable
+ 	// VM types on one side, null pointer on the other side
+ 	c = 1;
+ 	fc[0] = fc[1] = 0;
+ 
+ 	if (3 != sizeof(*(c ? (void*)0 : (char(*)[ f(3, 1) ])0)))
+ 		__builtin_abort();
+ 
+ 	if ((0 != fc[0]) || (1 != fc[1]))
+ 		__builtin_abort();
+ 
+ 	c = 0;
+ 	fc[0] = fc[1] = 0;
+ 
+ 	if (5 != sizeof(*(c ? (char(*)[ f(5, 0) ])0 : (void*)0)))
+ 		__builtin_abort();
+ 
+ 	if ((1 != fc[0]) || (0 != fc[1]))
+ 		__builtin_abort();
+ #endif
+ 
+ 	// VLA + void*
+ 	void* p = 0;
+ 	c = 0;
+ 	fc[0] = fc[1] = 0;
+ 
+ 	if (1 != sizeof(*(c ? p : (char(*)[ f(3, 1) ])0)))
+ 		__builtin_abort();
+ 
+ 	// not a VLA or evaluated
+ 	if ((0 != fc[0]) || (0 != fc[1]))
+ 		__builtin_abort();
+ 
+ 	// .. without sizeof
+ 
+ 	(c ? p : (char(*)[ f(3, 1) ])0);
+ 
+ 	if ((0 != fc[0]) || (1 != fc[1]))
+ 		__builtin_abort();
+ 
+ 	c = 1;
+ 	fc[0] = fc[1] = 0;
+ 
+ 	if (1 != sizeof(*(c ? (char(*)[ f(5, 0) ])0 : p)))
+ 		__builtin_abort();
+ 
+ 	// not a VLA
+ 	if ((0 != fc[0]) || (0 != fc[1]))
+ 		__builtin_abort();
+ 
+ 	// .. without sizeof
+ 
+ 	(c ? (char(*)[ f(5, 0) ])0 : p);
+ 
+ 	if ((1 != fc[0]) || (0 != fc[1]))
+ 		__builtin_abort();
+ 
+ 	// VLA + void*, VLA side not evaluated
+ 
+ 	c = 1;
+ 	fc[0] = fc[1] = 0;
+ 
+ 	if (1 != sizeof(*(c ? p : (char(*)[ f(3, 1) ])0)))
+ 		__builtin_abort();
+ 
+ 	if ((0 != fc[0]) || (0 != fc[1]))
+ 		__builtin_abort();
+ 
+ 	// .. without sizeof
+ 
+ 	(c ? p : (char(*)[ f(3, 1) ])0);
+ 
+ 	if ((0 != fc[0]) || (0 != fc[1]))
+ 		__builtin_abort();
+ 
+ 	c = 0;
+ 	fc[0] = fc[1] = 0;
+ 
+ 	if (1 != sizeof(*(c ? (char(*)[ f(5, 0) ])0 : p)))
+ 		__builtin_abort();
+ 
+ 	if ((0 != fc[0]) || (0 != fc[1]))
+ 		__builtin_abort();
+ 
+ 	// .. without sizeof
+ 
+ 	(c ? (char(*)[ f(5, 0) ])0 : p);
+ 
+ 	if ((0 != fc[0]) || (0 != fc[1]))
+ 		__builtin_abort();
+ 
+ 	return 0;
+ }
+ 
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/pr120986-1.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/pr120986-1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/pr120986-1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/pr120986-1.c	Sun Aug 10 22:32:21 2025
***************
*** 0 ****
--- 1,10 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2 -march=armv8.2-a+sve2+fp8dot2" } */
+ #include <arm_sve.h>
+ 
+ /* This triggered an ICE with an unrecognizable insn due to incorrect gating of
+    the insn in the backend.  */
+ svfloat16_t foo(svfloat16_t a, svmfloat8_t b, svmfloat8_t c, unsigned long fpm)
+ {
+   return svdot_lane_fpm (a, b, c, 0, fpm);
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sme/pr121414_1.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sme/pr121414_1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sme/pr121414_1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sme/pr121414_1.c	Sun Aug 10 22:32:22 2025
***************
*** 0 ****
--- 1,27 ----
+ #pragma GCC target "+sme2"
+ 
+ void f1() __arm_streaming_compatible {}
+ void f2() __arm_streaming {}
+ void f3() __arm_in("za") {}
+ void f4() __arm_out("za") {}
+ void f5() __arm_inout("za") {}
+ void f6() __arm_in("zt0") {}
+ void f7() __arm_out("zt0") {}
+ void f8() __arm_inout("zt0") {}
+ 
+ __arm_locally_streaming void g1() {}
+ __arm_new("za") void g2() {}
+ __arm_new("zt0") void g3() {}
+ 
+ /* { dg-final { scan-assembler {\t\.variant_pcs\tf1\n} } } */
+ /* { dg-final { scan-assembler {\t\.variant_pcs\tf2\n} } } */
+ /* { dg-final { scan-assembler {\t\.variant_pcs\tf3\n} } } */
+ /* { dg-final { scan-assembler {\t\.variant_pcs\tf4\n} } } */
+ /* { dg-final { scan-assembler {\t\.variant_pcs\tf5\n} } } */
+ /* { dg-final { scan-assembler {\t\.variant_pcs\tf6\n} } } */
+ /* { dg-final { scan-assembler {\t\.variant_pcs\tf7\n} } } */
+ /* { dg-final { scan-assembler {\t\.variant_pcs\tf8\n} } } */
+ 
+ /* { dg-final { scan-assembler-not {\t\.variant_pcs\tg1\n} } } */
+ /* { dg-final { scan-assembler-not {\t\.variant_pcs\tg2\n} } } */
+ /* { dg-final { scan-assembler-not {\t\.variant_pcs\tg3\n} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/acge_1.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/acge_1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/acge_1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/acge_1.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,104 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	facge	p0\.h, p0/z, z0\.h, z1\.h
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t pg, svfloat16_t x, svfloat16_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svacge (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	facge	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t pg, svfloat32_t x, svfloat32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svacge (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	facge	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t pg, svfloat32_t x, svfloat32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svacge (pg, x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test4:
+ **	facge	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test4 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svacge (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test5:
+ **	facge	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test5 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svacge (pg, x, y),
+ 		  svptrue_b8 ());
+ }
+ 
+ /*
+ ** test6:
+ **	facge	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test6 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svacge (pg, x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ /*
+ ** test7:
+ **	facge	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test7 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svacge (pg, x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/acgt_1.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/acgt_1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/acgt_1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/acgt_1.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,104 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	facgt	p0\.h, p0/z, z0\.h, z1\.h
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t pg, svfloat16_t x, svfloat16_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svacgt (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	facgt	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t pg, svfloat32_t x, svfloat32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svacgt (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	facgt	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t pg, svfloat32_t x, svfloat32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svacgt (pg, x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test4:
+ **	facgt	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test4 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svacgt (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test5:
+ **	facgt	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test5 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svacgt (pg, x, y),
+ 		  svptrue_b8 ());
+ }
+ 
+ /*
+ ** test6:
+ **	facgt	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test6 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svacgt (pg, x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ /*
+ ** test7:
+ **	facgt	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test7 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svacgt (pg, x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/acle_1.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/acle_1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/acle_1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/acle_1.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,104 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	facle	p0\.h, p0/z, z0\.h, z1\.h
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t pg, svfloat16_t x, svfloat16_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svacle (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	facle	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t pg, svfloat32_t x, svfloat32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svacle (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	facle	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t pg, svfloat32_t x, svfloat32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svacle (pg, x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test4:
+ **	facle	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test4 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svacle (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test5:
+ **	facle	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test5 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svacle (pg, x, y),
+ 		  svptrue_b8 ());
+ }
+ 
+ /*
+ ** test6:
+ **	facle	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test6 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svacle (pg, x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ /*
+ ** test7:
+ **	facle	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test7 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svacle (pg, x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/aclt_1.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/aclt_1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/aclt_1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/aclt_1.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,104 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	faclt	p0\.h, p0/z, z0\.h, z1\.h
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t pg, svfloat16_t x, svfloat16_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svaclt (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	faclt	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t pg, svfloat32_t x, svfloat32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svaclt (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	faclt	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t pg, svfloat32_t x, svfloat32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svaclt (pg, x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test4:
+ **	faclt	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test4 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svaclt (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test5:
+ **	faclt	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test5 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svaclt (pg, x, y),
+ 		  svptrue_b8 ());
+ }
+ 
+ /*
+ ** test6:
+ **	faclt	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test6 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svaclt (pg, x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ /*
+ ** test7:
+ **	faclt	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test7 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svaclt (pg, x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_1.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_1.c	Sun Aug  3 22:32:47 2025
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_1.c	Sun Aug 10 22:32:23 2025
*************** test2 (svbool_t pg, svint8_t x, svint64_
*** 18,22 ****
    return svptest_any (pg, res);
  }
  
! /* { dg-final { scan-assembler-times {\tcmpeq\t} 2 } } */
  /* { dg-final { scan-assembler-not {\tptest\t} } } */
--- 18,74 ----
    return svptest_any (pg, res);
  }
  
! void
! test3 (svint8_t x, svint64_t y, int *any, svbool_t *ptr)
! {
!   svbool_t pg = svptrue_b8 ();
!   svbool_t res = svcmpeq_wide (pg, x, y);
!   *any = svptest_any (pg, res);
!   *ptr = res;
! }
! 
! int
! test4 (svint8_t x, svint64_t y, int *any)
! {
!   svbool_t pg = svptrue_b8 ();
!   svbool_t res = svcmpeq_wide (pg, x, y);
!   return svptest_any (pg, res);
! }
! 
! void
! test5 (svint16_t x, svint64_t y, int *any, svbool_t *ptr)
! {
!   svbool_t pg = svptrue_b16 ();
!   svbool_t res = svcmpeq_wide (pg, x, y);
!   *any = svptest_any (pg, res);
!   *ptr = res;
! }
! 
! int
! test6 (svint16_t x, svint64_t y, int *any)
! {
!   svbool_t pg = svptrue_b16 ();
!   svbool_t res = svcmpeq_wide (pg, x, y);
!   return svptest_any (pg, res);
! }
! 
! void
! test7 (svint32_t x, svint64_t y, int *any, svbool_t *ptr)
! {
!   svbool_t pg = svptrue_b32 ();
!   svbool_t res = svcmpeq_wide (pg, x, y);
!   *any = svptest_any (pg, res);
!   *ptr = res;
! }
! 
! int
! test8 (svint32_t x, svint64_t y, int *any)
! {
!   svbool_t pg = svptrue_b32 ();
!   svbool_t res = svcmpeq_wide (pg, x, y);
!   return svptest_any (pg, res);
! }
! 
! /* { dg-final { scan-assembler-times {\tcmpeq\t} 8 } } */
! /* { dg-final { scan-assembler-times {\tptrue\t} 6 } } */
  /* { dg-final { scan-assembler-not {\tptest\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_2.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_2.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_2.c	Sun Aug  3 22:32:47 2025
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_2.c	Sun Aug 10 22:32:23 2025
*************** test4 (svbool_t pg, svint8_t x, int *any
*** 33,38 ****
    return svptest_any (pg, res);
  }
  
! /* { dg-final { scan-assembler-times {\tcmpeq\t} 4 } } */
! /* { dg-final { scan-assembler-times {\tcmpeq\t[^\n]*, #10} 2 } } */
  /* { dg-final { scan-assembler-not {\tptest\t} } } */
--- 33,140 ----
    return svptest_any (pg, res);
  }
  
! void
! test5 (svint16_t x, svint16_t y, int *any, svbool_t *ptr)
! {
!   svbool_t pg = svptrue_b16 ();
!   svbool_t res = svcmpeq (pg, x, y);
!   *any = svptest_any (pg, res);
!   *ptr = res;
! }
! 
! int
! test6 (svint16_t x, svint16_t y)
! {
!   svbool_t pg = svptrue_b16 ();
!   svbool_t res = svcmpeq (pg, x, y);
!   return svptest_any (pg, res);
! }
! 
! void
! test7 (svint16_t x, int *any, svbool_t *ptr)
! {
!   svbool_t pg = svptrue_b16 ();
!   svbool_t res = svcmpeq (pg, x, 10);
!   *any = svptest_any (pg, res);
!   *ptr = res;
! }
! 
! int
! test8 (svint16_t x)
! {
!   svbool_t pg = svptrue_b16 ();
!   svbool_t res = svcmpeq (pg, x, 10);
!   return svptest_any (pg, res);
! }
! 
! void
! test9 (svint32_t x, svint32_t y, int *any, svbool_t *ptr)
! {
!   svbool_t pg = svptrue_b32 ();
!   svbool_t res = svcmpeq (pg, x, y);
!   *any = svptest_any (pg, res);
!   *ptr = res;
! }
! 
! int
! test10 (svint32_t x, svint32_t y)
! {
!   svbool_t pg = svptrue_b32 ();
!   svbool_t res = svcmpeq (pg, x, y);
!   return svptest_any (pg, res);
! }
! 
! void
! test11 (svint32_t x, int *any, svbool_t *ptr)
! {
!   svbool_t pg = svptrue_b32 ();
!   svbool_t res = svcmpeq (pg, x, 10);
!   *any = svptest_any (pg, res);
!   *ptr = res;
! }
! 
! int
! test12 (svint32_t x)
! {
!   svbool_t pg = svptrue_b32 ();
!   svbool_t res = svcmpeq (pg, x, 10);
!   return svptest_any (pg, res);
! }
! 
! void
! test13 (svint64_t x, svint64_t y, int *any, svbool_t *ptr)
! {
!   svbool_t pg = svptrue_b64 ();
!   svbool_t res = svcmpeq (pg, x, y);
!   *any = svptest_any (pg, res);
!   *ptr = res;
! }
! 
! int
! test14 (svint64_t x, svint64_t y)
! {
!   svbool_t pg = svptrue_b64 ();
!   svbool_t res = svcmpeq (pg, x, y);
!   return svptest_any (pg, res);
! }
! 
! void
! test15 (svint64_t x, int *any, svbool_t *ptr)
! {
!   svbool_t pg = svptrue_b64 ();
!   svbool_t res = svcmpeq (pg, x, 10);
!   *any = svptest_any (pg, res);
!   *ptr = res;
! }
! 
! int
! test16 (svint64_t x)
! {
!   svbool_t pg = svptrue_b64 ();
!   svbool_t res = svcmpeq (pg, x, 10);
!   return svptest_any (pg, res);
! }
! 
! /* { dg-final { scan-assembler-times {\tcmpeq\t} 16 } } */
! /* { dg-final { scan-assembler-times {\tcmpeq\t[^\n]*, #10} 8 } } */
  /* { dg-final { scan-assembler-not {\tptest\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_4.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_4.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_4.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_4.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,157 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	cmpeq	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t p0, svint8_t x, svint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpeq (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test2:
+ **	cmpeq	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t p0, svint8_t x, svint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmpeq (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test3:
+ **	cmpeq	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t p0, svint8_t x, svint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmpeq (pg, x, y), pg);
+ }
+ 
+ /*
+ ** test4:
+ **	cmpeq	p0\.b, p0/z, z0\.b, #10
+ **	ret
+ */
+ svbool_t
+ test4 (svbool_t p0, svint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpeq (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test5:
+ **	cmpeq	p0\.b, p0/z, z0\.b, #10
+ **	ret
+ */
+ svbool_t
+ test5 (svbool_t p0, svint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmpeq (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test6:
+ **	cmpeq	p0\.b, p0/z, z0\.b, #10
+ **	ret
+ */
+ svbool_t
+ test6 (svbool_t p0, svint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmpeq (pg, x, 10), pg);
+ }
+ 
+ /*
+ ** test7:
+ **	cmpeq	p0\.h, p0/z, z0\.h, z1\.h
+ **	ret
+ */
+ svbool_t
+ test7 (svbool_t p0, svint16_t x, svint16_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpeq (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test8:
+ **	cmpeq	p0\.h, p0/z, z0\.h, #10
+ **	ret
+ */
+ svbool_t
+ test8 (svbool_t p0, svint16_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmpeq (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test9:
+ **	cmpeq	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test9 (svbool_t p0, svint32_t x, svint32_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpeq (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test10:
+ **	cmpeq	p0\.s, p0/z, z0\.s, #10
+ **	ret
+ */
+ svbool_t
+ test10 (svbool_t p0, svint32_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmpeq (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test11:
+ **	cmpeq	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test11 (svbool_t p0, svint64_t x, svint64_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpeq (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test12:
+ **	cmpeq	p0\.d, p0/z, z0\.d, #10
+ **	ret
+ */
+ svbool_t
+ test12 (svbool_t p0, svint64_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmpeq (pg, x, 10), p0);
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_5.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_5.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_5.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_5.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,52 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	cmpeq	p0\.h, p0/z, z0\.h, z1\.d
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t pg, svint16_t x, svint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpeq_wide (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	cmpeq	p0\.s, p0/z, z0\.s, z1\.d
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t pg, svint32_t x, svint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpeq_wide (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	cmpeq	p0\.s, p0/z, z0\.s, z1\.d
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t pg, svint32_t x, svint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpeq_wide (pg, x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_6.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_6.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_6.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_6.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,104 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	fcmeq	p0\.h, p0/z, z0\.h, z1\.h
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t pg, svfloat16_t x, svfloat16_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpeq (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	fcmeq	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t pg, svfloat32_t x, svfloat32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpeq (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	fcmeq	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t pg, svfloat32_t x, svfloat32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpeq (pg, x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test4:
+ **	fcmeq	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test4 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpeq (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test5:
+ **	fcmeq	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test5 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svcmpeq (pg, x, y),
+ 		  svptrue_b8 ());
+ }
+ 
+ /*
+ ** test6:
+ **	fcmeq	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test6 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpeq (pg, x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ /*
+ ** test7:
+ **	fcmeq	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test7 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svcmpeq (pg, x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_1.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_1.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,140 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ void
+ test1 (svbool_t pg, svint8_t x, svint8_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmpge (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test2 (svbool_t pg, svint8_t x, svint8_t y, int *any)
+ {
+   svbool_t res = svcmpge (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test3 (svbool_t pg, svint8_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmpge (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test4 (svbool_t pg, svint8_t x, int *any)
+ {
+   svbool_t res = svcmpge (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test5 (svint16_t x, svint16_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpge (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test6 (svint16_t x, svint16_t y)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpge (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test7 (svint16_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpge (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test8 (svint16_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpge (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test9 (svint32_t x, svint32_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpge (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test10 (svint32_t x, svint32_t y)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpge (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test11 (svint32_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpge (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test12 (svint32_t x)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpge (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test13 (svint64_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmpge (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test14 (svint64_t x, svint64_t y)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmpge (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test15 (svint64_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmpge (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test16 (svint64_t x)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmpge (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ /* { dg-final { scan-assembler-times {\tcmpge\t} 16 } } */
+ /* { dg-final { scan-assembler-times {\tcmpge\t[^\n]*, #10} 8 } } */
+ /* { dg-final { scan-assembler-not {\tptest\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_2.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_2.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_2.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_2.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,140 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ void
+ test1 (svbool_t pg, svuint8_t x, svuint8_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmpge (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test2 (svbool_t pg, svuint8_t x, svuint8_t y, int *any)
+ {
+   svbool_t res = svcmpge (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test3 (svbool_t pg, svuint8_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmpge (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test4 (svbool_t pg, svuint8_t x, int *any)
+ {
+   svbool_t res = svcmpge (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test5 (svuint16_t x, svuint16_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpge (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test6 (svuint16_t x, svuint16_t y)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpge (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test7 (svuint16_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpge (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test8 (svuint16_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpge (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test9 (svuint32_t x, svuint32_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpge (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test10 (svuint32_t x, svuint32_t y)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpge (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test11 (svuint32_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpge (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test12 (svuint32_t x)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpge (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test13 (svuint64_t x, svuint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmpge (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test14 (svuint64_t x, svuint64_t y)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmpge (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test15 (svuint64_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmpge (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test16 (svuint64_t x)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmpge (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ /* { dg-final { scan-assembler-times {\tcmphs\t} 16 } } */
+ /* { dg-final { scan-assembler-times {\tcmphs\t[^\n]*, #10} 8 } } */
+ /* { dg-final { scan-assembler-not {\tptest\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_3.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_3.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_3.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_3.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,169 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	cmpge	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t p0, svint8_t x, svint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpge (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test2:
+ **	cmpge	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t p0, svint8_t x, svint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmpge (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test3:
+ **	cmpge	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t p0, svint8_t x, svint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmpge (pg, x, y), pg);
+ }
+ 
+ /*
+ ** test4:
+ ** (
+ **	cmpge	p0\.b, p0/z, z0\.b, #10
+ ** |
+ **	cmpgt	p0\.b, p0/z, z0\.b, #9
+ ** )
+ **	ret
+ */
+ svbool_t
+ test4 (svbool_t p0, svint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpge (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test5:
+ ** (
+ **	cmpge	p0\.b, p0/z, z0\.b, #10
+ ** |
+ **	cmpgt	p0\.b, p0/z, z0\.b, #9
+ ** )
+ **	ret
+ */
+ svbool_t
+ test5 (svbool_t p0, svint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmpge (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test6:
+ ** (
+ **	cmpge	p0\.b, p0/z, z0\.b, #10
+ ** |
+ **	cmpgt	p0\.b, p0/z, z0\.b, #9
+ ** )
+ **	ret
+ */
+ svbool_t
+ test6 (svbool_t p0, svint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmpge (pg, x, 10), pg);
+ }
+ 
+ /*
+ ** test7:
+ **	cmpge	p0\.h, p0/z, z0\.h, z1\.h
+ **	ret
+ */
+ svbool_t
+ test7 (svbool_t p0, svint16_t x, svint16_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpge (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test8:
+ **	cmpge	p0\.h, p0/z, z0\.h, #10
+ **	ret
+ */
+ svbool_t
+ test8 (svbool_t p0, svint16_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmpge (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test9:
+ **	cmpge	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test9 (svbool_t p0, svint32_t x, svint32_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpge (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test10:
+ **	cmpge	p0\.s, p0/z, z0\.s, #10
+ **	ret
+ */
+ svbool_t
+ test10 (svbool_t p0, svint32_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmpge (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test11:
+ **	cmpge	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test11 (svbool_t p0, svint64_t x, svint64_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpge (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test12:
+ **	cmpge	p0\.d, p0/z, z0\.d, #10
+ **	ret
+ */
+ svbool_t
+ test12 (svbool_t p0, svint64_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmpge (pg, x, 10), p0);
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_4.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_4.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_4.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_4.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,169 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	cmphs	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t p0, svuint8_t x, svuint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpge (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test2:
+ **	cmphs	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t p0, svuint8_t x, svuint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmpge (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test3:
+ **	cmphs	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t p0, svuint8_t x, svuint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmpge (pg, x, y), pg);
+ }
+ 
+ /*
+ ** test4:
+ ** (
+ **	cmphs	p0\.b, p0/z, z0\.b, #10
+ ** |
+ **	cmphi	p0\.b, p0/z, z0\.b, #9
+ ** )
+ **	ret
+ */
+ svbool_t
+ test4 (svbool_t p0, svuint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpge (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test5:
+ ** (
+ **	cmphs	p0\.b, p0/z, z0\.b, #10
+ ** |
+ **	cmphi	p0\.b, p0/z, z0\.b, #9
+ ** )
+ **	ret
+ */
+ svbool_t
+ test5 (svbool_t p0, svuint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmpge (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test6:
+ ** (
+ **	cmphs	p0\.b, p0/z, z0\.b, #10
+ ** |
+ **	cmphi	p0\.b, p0/z, z0\.b, #9
+ ** )
+ **	ret
+ */
+ svbool_t
+ test6 (svbool_t p0, svuint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmpge (pg, x, 10), pg);
+ }
+ 
+ /*
+ ** test7:
+ **	cmphs	p0\.h, p0/z, z0\.h, z1\.h
+ **	ret
+ */
+ svbool_t
+ test7 (svbool_t p0, svuint16_t x, svuint16_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpge (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test8:
+ **	cmphs	p0\.h, p0/z, z0\.h, #10
+ **	ret
+ */
+ svbool_t
+ test8 (svbool_t p0, svuint16_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmpge (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test9:
+ **	cmphs	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test9 (svbool_t p0, svuint32_t x, svuint32_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpge (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test10:
+ **	cmphs	p0\.s, p0/z, z0\.s, #10
+ **	ret
+ */
+ svbool_t
+ test10 (svbool_t p0, svuint32_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmpge (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test11:
+ **	cmphs	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test11 (svbool_t p0, svuint64_t x, svuint64_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpge (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test12:
+ **	cmphs	p0\.d, p0/z, z0\.d, #10
+ **	ret
+ */
+ svbool_t
+ test12 (svbool_t p0, svuint64_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmpge (pg, x, 10), p0);
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_5.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_5.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_5.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_5.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,74 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ void
+ test1 (svbool_t pg, svint8_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmpge_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test2 (svbool_t pg, svint8_t x, svint64_t y, int *any)
+ {
+   svbool_t res = svcmpge_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test3 (svint8_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b8 ();
+   svbool_t res = svcmpge_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test4 (svint8_t x, svint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b8 ();
+   svbool_t res = svcmpge_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test5 (svint16_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpge_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test6 (svint16_t x, svint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpge_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test7 (svint32_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpge_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test8 (svint32_t x, svint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpge_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ /* { dg-final { scan-assembler-times {\tcmpge\t} 8 } } */
+ /* { dg-final { scan-assembler-times {\tptrue\t} 6 } } */
+ /* { dg-final { scan-assembler-not {\tptest\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_6.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_6.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_6.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_6.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,74 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ void
+ test1 (svbool_t pg, svuint8_t x, svuint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmpge_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test2 (svbool_t pg, svuint8_t x, svuint64_t y, int *any)
+ {
+   svbool_t res = svcmpge_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test3 (svuint8_t x, svuint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b8 ();
+   svbool_t res = svcmpge_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test4 (svuint8_t x, svuint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b8 ();
+   svbool_t res = svcmpge_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test5 (svuint16_t x, svuint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpge_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test6 (svuint16_t x, svuint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpge_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test7 (svuint32_t x, svuint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpge_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test8 (svuint32_t x, svuint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpge_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ /* { dg-final { scan-assembler-times {\tcmphs\t} 8 } } */
+ /* { dg-final { scan-assembler-times {\tptrue\t} 6 } } */
+ /* { dg-final { scan-assembler-not {\tptest\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_7.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_7.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_7.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_7.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,52 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	cmpge	p0\.h, p0/z, z0\.h, z1\.d
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t pg, svint16_t x, svint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpge_wide (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	cmpge	p0\.s, p0/z, z0\.s, z1\.d
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t pg, svint32_t x, svint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpge_wide (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	cmpge	p0\.s, p0/z, z0\.s, z1\.d
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t pg, svint32_t x, svint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpge_wide (pg, x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_8.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_8.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_8.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_8.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,52 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	cmphs	p0\.h, p0/z, z0\.h, z1\.d
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t pg, svuint16_t x, svuint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpge_wide (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	cmphs	p0\.s, p0/z, z0\.s, z1\.d
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t pg, svuint32_t x, svuint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpge_wide (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	cmphs	p0\.s, p0/z, z0\.s, z1\.d
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t pg, svuint32_t x, svuint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpge_wide (pg, x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_9.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_9.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_9.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpge_9.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,104 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	fcmge	p0\.h, p0/z, z0\.h, z1\.h
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t pg, svfloat16_t x, svfloat16_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpge (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	fcmge	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t pg, svfloat32_t x, svfloat32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpge (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	fcmge	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t pg, svfloat32_t x, svfloat32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpge (pg, x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test4:
+ **	fcmge	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test4 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpge (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test5:
+ **	fcmge	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test5 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svcmpge (pg, x, y),
+ 		  svptrue_b8 ());
+ }
+ 
+ /*
+ ** test6:
+ **	fcmge	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test6 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpge (pg, x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ /*
+ ** test7:
+ **	fcmge	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test7 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svcmpge (pg, x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_1.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_1.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,140 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ void
+ test1 (svbool_t pg, svint8_t x, svint8_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmpgt (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test2 (svbool_t pg, svint8_t x, svint8_t y, int *any)
+ {
+   svbool_t res = svcmpgt (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test3 (svbool_t pg, svint8_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmpgt (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test4 (svbool_t pg, svint8_t x, int *any)
+ {
+   svbool_t res = svcmpgt (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test5 (svint16_t x, svint16_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpgt (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test6 (svint16_t x, svint16_t y)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpgt (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test7 (svint16_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpgt (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test8 (svint16_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpgt (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test9 (svint32_t x, svint32_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpgt (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test10 (svint32_t x, svint32_t y)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpgt (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test11 (svint32_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpgt (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test12 (svint32_t x)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpgt (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test13 (svint64_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmpgt (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test14 (svint64_t x, svint64_t y)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmpgt (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test15 (svint64_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmpgt (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test16 (svint64_t x)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmpgt (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ /* { dg-final { scan-assembler-times {\tcmpgt\t} 16 } } */
+ /* { dg-final { scan-assembler-times {\tcmpgt\t[^\n]*, #10} 8 } } */
+ /* { dg-final { scan-assembler-not {\tptest\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_2.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_2.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_2.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_2.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,140 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ void
+ test1 (svbool_t pg, svuint8_t x, svuint8_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmpgt (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test2 (svbool_t pg, svuint8_t x, svuint8_t y, int *any)
+ {
+   svbool_t res = svcmpgt (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test3 (svbool_t pg, svuint8_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmpgt (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test4 (svbool_t pg, svuint8_t x, int *any)
+ {
+   svbool_t res = svcmpgt (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test5 (svuint16_t x, svuint16_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpgt (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test6 (svuint16_t x, svuint16_t y)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpgt (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test7 (svuint16_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpgt (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test8 (svuint16_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpgt (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test9 (svuint32_t x, svuint32_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpgt (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test10 (svuint32_t x, svuint32_t y)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpgt (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test11 (svuint32_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpgt (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test12 (svuint32_t x)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpgt (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test13 (svuint64_t x, svuint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmpgt (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test14 (svuint64_t x, svuint64_t y)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmpgt (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test15 (svuint64_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmpgt (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test16 (svuint64_t x)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmpgt (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ /* { dg-final { scan-assembler-times {\tcmphi\t} 16 } } */
+ /* { dg-final { scan-assembler-times {\tcmphi\t[^\n]*, #10} 8 } } */
+ /* { dg-final { scan-assembler-not {\tptest\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_3.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_3.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_3.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_3.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,157 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	cmpgt	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t p0, svint8_t x, svint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpgt (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test2:
+ **	cmpgt	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t p0, svint8_t x, svint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmpgt (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test3:
+ **	cmpgt	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t p0, svint8_t x, svint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmpgt (pg, x, y), pg);
+ }
+ 
+ /*
+ ** test4:
+ **	cmpgt	p0\.b, p0/z, z0\.b, #10
+ **	ret
+ */
+ svbool_t
+ test4 (svbool_t p0, svint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpgt (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test5:
+ **	cmpgt	p0\.b, p0/z, z0\.b, #10
+ **	ret
+ */
+ svbool_t
+ test5 (svbool_t p0, svint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmpgt (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test6:
+ **	cmpgt	p0\.b, p0/z, z0\.b, #10
+ **	ret
+ */
+ svbool_t
+ test6 (svbool_t p0, svint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmpgt (pg, x, 10), pg);
+ }
+ 
+ /*
+ ** test7:
+ **	cmpgt	p0\.h, p0/z, z0\.h, z1\.h
+ **	ret
+ */
+ svbool_t
+ test7 (svbool_t p0, svint16_t x, svint16_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpgt (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test8:
+ **	cmpgt	p0\.h, p0/z, z0\.h, #10
+ **	ret
+ */
+ svbool_t
+ test8 (svbool_t p0, svint16_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmpgt (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test9:
+ **	cmpgt	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test9 (svbool_t p0, svint32_t x, svint32_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpgt (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test10:
+ **	cmpgt	p0\.s, p0/z, z0\.s, #10
+ **	ret
+ */
+ svbool_t
+ test10 (svbool_t p0, svint32_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmpgt (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test11:
+ **	cmpgt	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test11 (svbool_t p0, svint64_t x, svint64_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpgt (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test12:
+ **	cmpgt	p0\.d, p0/z, z0\.d, #10
+ **	ret
+ */
+ svbool_t
+ test12 (svbool_t p0, svint64_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmpgt (pg, x, 10), p0);
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_4.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_4.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_4.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_4.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,157 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	cmphi	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t p0, svuint8_t x, svuint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpgt (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test2:
+ **	cmphi	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t p0, svuint8_t x, svuint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmpgt (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test3:
+ **	cmphi	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t p0, svuint8_t x, svuint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmpgt (pg, x, y), pg);
+ }
+ 
+ /*
+ ** test4:
+ **	cmphi	p0\.b, p0/z, z0\.b, #10
+ **	ret
+ */
+ svbool_t
+ test4 (svbool_t p0, svuint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpgt (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test5:
+ **	cmphi	p0\.b, p0/z, z0\.b, #10
+ **	ret
+ */
+ svbool_t
+ test5 (svbool_t p0, svuint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmpgt (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test6:
+ **	cmphi	p0\.b, p0/z, z0\.b, #10
+ **	ret
+ */
+ svbool_t
+ test6 (svbool_t p0, svuint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmpgt (pg, x, 10), pg);
+ }
+ 
+ /*
+ ** test7:
+ **	cmphi	p0\.h, p0/z, z0\.h, z1\.h
+ **	ret
+ */
+ svbool_t
+ test7 (svbool_t p0, svuint16_t x, svuint16_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpgt (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test8:
+ **	cmphi	p0\.h, p0/z, z0\.h, #10
+ **	ret
+ */
+ svbool_t
+ test8 (svbool_t p0, svuint16_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmpgt (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test9:
+ **	cmphi	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test9 (svbool_t p0, svuint32_t x, svuint32_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpgt (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test10:
+ **	cmphi	p0\.s, p0/z, z0\.s, #10
+ **	ret
+ */
+ svbool_t
+ test10 (svbool_t p0, svuint32_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmpgt (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test11:
+ **	cmphi	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test11 (svbool_t p0, svuint64_t x, svuint64_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpgt (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test12:
+ **	cmphi	p0\.d, p0/z, z0\.d, #10
+ **	ret
+ */
+ svbool_t
+ test12 (svbool_t p0, svuint64_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmpgt (pg, x, 10), p0);
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_5.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_5.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_5.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_5.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,74 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ void
+ test1 (svbool_t pg, svint8_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmpgt_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test2 (svbool_t pg, svint8_t x, svint64_t y, int *any)
+ {
+   svbool_t res = svcmpgt_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test3 (svint8_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b8 ();
+   svbool_t res = svcmpgt_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test4 (svint8_t x, svint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b8 ();
+   svbool_t res = svcmpgt_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test5 (svint16_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpgt_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test6 (svint16_t x, svint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpgt_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test7 (svint32_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpgt_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test8 (svint32_t x, svint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpgt_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ /* { dg-final { scan-assembler-times {\tcmpgt\t} 8 } } */
+ /* { dg-final { scan-assembler-times {\tptrue\t} 6 } } */
+ /* { dg-final { scan-assembler-not {\tptest\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_6.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_6.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_6.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_6.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,74 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ void
+ test1 (svbool_t pg, svuint8_t x, svuint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmpgt_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test2 (svbool_t pg, svuint8_t x, svuint64_t y, int *any)
+ {
+   svbool_t res = svcmpgt_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test3 (svuint8_t x, svuint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b8 ();
+   svbool_t res = svcmpgt_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test4 (svuint8_t x, svuint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b8 ();
+   svbool_t res = svcmpgt_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test5 (svuint16_t x, svuint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpgt_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test6 (svuint16_t x, svuint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpgt_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test7 (svuint32_t x, svuint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpgt_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test8 (svuint32_t x, svuint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpgt_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ /* { dg-final { scan-assembler-times {\tcmphi\t} 8 } } */
+ /* { dg-final { scan-assembler-times {\tptrue\t} 6 } } */
+ /* { dg-final { scan-assembler-not {\tptest\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_7.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_7.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_7.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_7.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,52 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	cmpgt	p0\.h, p0/z, z0\.h, z1\.d
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t pg, svint16_t x, svint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpgt_wide (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	cmpgt	p0\.s, p0/z, z0\.s, z1\.d
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t pg, svint32_t x, svint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpgt_wide (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	cmpgt	p0\.s, p0/z, z0\.s, z1\.d
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t pg, svint32_t x, svint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpgt_wide (pg, x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_8.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_8.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_8.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_8.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,52 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	cmphi	p0\.h, p0/z, z0\.h, z1\.d
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t pg, svuint16_t x, svuint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpgt_wide (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	cmphi	p0\.s, p0/z, z0\.s, z1\.d
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t pg, svuint32_t x, svuint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpgt_wide (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	cmphi	p0\.s, p0/z, z0\.s, z1\.d
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t pg, svuint32_t x, svuint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpgt_wide (pg, x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_9.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_9.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_9.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpgt_9.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,104 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	fcmgt	p0\.h, p0/z, z0\.h, z1\.h
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t pg, svfloat16_t x, svfloat16_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpgt (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	fcmgt	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t pg, svfloat32_t x, svfloat32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpgt (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	fcmgt	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t pg, svfloat32_t x, svfloat32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpgt (pg, x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test4:
+ **	fcmgt	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test4 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpgt (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test5:
+ **	fcmgt	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test5 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svcmpgt (pg, x, y),
+ 		  svptrue_b8 ());
+ }
+ 
+ /*
+ ** test6:
+ **	fcmgt	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test6 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpgt (pg, x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ /*
+ ** test7:
+ **	fcmgt	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test7 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svcmpgt (pg, x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_1.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_1.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,140 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ void
+ test1 (svbool_t pg, svint8_t x, svint8_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmple (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test2 (svbool_t pg, svint8_t x, svint8_t y, int *any)
+ {
+   svbool_t res = svcmple (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test3 (svbool_t pg, svint8_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmple (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test4 (svbool_t pg, svint8_t x, int *any)
+ {
+   svbool_t res = svcmple (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test5 (svint16_t x, svint16_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmple (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test6 (svint16_t x, svint16_t y)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmple (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test7 (svint16_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmple (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test8 (svint16_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmple (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test9 (svint32_t x, svint32_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmple (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test10 (svint32_t x, svint32_t y)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmple (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test11 (svint32_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmple (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test12 (svint32_t x)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmple (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test13 (svint64_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmple (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test14 (svint64_t x, svint64_t y)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmple (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test15 (svint64_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmple (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test16 (svint64_t x)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmple (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ /* { dg-final { scan-assembler-times {\tcmple\t} 16 } } */
+ /* { dg-final { scan-assembler-times {\tcmple\t[^\n]*, #10} 8 } } */
+ /* { dg-final { scan-assembler-not {\tptest\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_2.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_2.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_2.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_2.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,140 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ void
+ test1 (svbool_t pg, svuint8_t x, svuint8_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmple (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test2 (svbool_t pg, svuint8_t x, svuint8_t y, int *any)
+ {
+   svbool_t res = svcmple (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test3 (svbool_t pg, svuint8_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmple (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test4 (svbool_t pg, svuint8_t x, int *any)
+ {
+   svbool_t res = svcmple (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test5 (svuint16_t x, svuint16_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmple (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test6 (svuint16_t x, svuint16_t y)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmple (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test7 (svuint16_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmple (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test8 (svuint16_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmple (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test9 (svuint32_t x, svuint32_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmple (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test10 (svuint32_t x, svuint32_t y)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmple (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test11 (svuint32_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmple (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test12 (svuint32_t x)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmple (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test13 (svuint64_t x, svuint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmple (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test14 (svuint64_t x, svuint64_t y)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmple (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test15 (svuint64_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmple (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test16 (svuint64_t x)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmple (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ /* { dg-final { scan-assembler-times {\tcmpls\t} 16 } } */
+ /* { dg-final { scan-assembler-times {\tcmpls\t[^\n]*, #10} 8 } } */
+ /* { dg-final { scan-assembler-not {\tptest\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_3.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_3.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_3.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_3.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,157 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	cmple	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t p0, svint8_t x, svint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmple (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test2:
+ **	cmple	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t p0, svint8_t x, svint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmple (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test3:
+ **	cmple	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t p0, svint8_t x, svint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmple (pg, x, y), pg);
+ }
+ 
+ /*
+ ** test4:
+ **	cmple	p0\.b, p0/z, z0\.b, #10
+ **	ret
+ */
+ svbool_t
+ test4 (svbool_t p0, svint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmple (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test5:
+ **	cmple	p0\.b, p0/z, z0\.b, #10
+ **	ret
+ */
+ svbool_t
+ test5 (svbool_t p0, svint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmple (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test6:
+ **	cmple	p0\.b, p0/z, z0\.b, #10
+ **	ret
+ */
+ svbool_t
+ test6 (svbool_t p0, svint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmple (pg, x, 10), pg);
+ }
+ 
+ /*
+ ** test7:
+ **	cmple	p0\.h, p0/z, z0\.h, z1\.h
+ **	ret
+ */
+ svbool_t
+ test7 (svbool_t p0, svint16_t x, svint16_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmple (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test8:
+ **	cmple	p0\.h, p0/z, z0\.h, #10
+ **	ret
+ */
+ svbool_t
+ test8 (svbool_t p0, svint16_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmple (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test9:
+ **	cmple	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test9 (svbool_t p0, svint32_t x, svint32_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmple (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test10:
+ **	cmple	p0\.s, p0/z, z0\.s, #10
+ **	ret
+ */
+ svbool_t
+ test10 (svbool_t p0, svint32_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmple (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test11:
+ **	cmple	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test11 (svbool_t p0, svint64_t x, svint64_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmple (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test12:
+ **	cmple	p0\.d, p0/z, z0\.d, #10
+ **	ret
+ */
+ svbool_t
+ test12 (svbool_t p0, svint64_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmple (pg, x, 10), p0);
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_4.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_4.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_4.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_4.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,157 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	cmpls	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t p0, svuint8_t x, svuint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmple (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test2:
+ **	cmpls	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t p0, svuint8_t x, svuint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmple (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test3:
+ **	cmpls	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t p0, svuint8_t x, svuint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmple (pg, x, y), pg);
+ }
+ 
+ /*
+ ** test4:
+ **	cmpls	p0\.b, p0/z, z0\.b, #10
+ **	ret
+ */
+ svbool_t
+ test4 (svbool_t p0, svuint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmple (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test5:
+ **	cmpls	p0\.b, p0/z, z0\.b, #10
+ **	ret
+ */
+ svbool_t
+ test5 (svbool_t p0, svuint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmple (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test6:
+ **	cmpls	p0\.b, p0/z, z0\.b, #10
+ **	ret
+ */
+ svbool_t
+ test6 (svbool_t p0, svuint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmple (pg, x, 10), pg);
+ }
+ 
+ /*
+ ** test7:
+ **	cmpls	p0\.h, p0/z, z0\.h, z1\.h
+ **	ret
+ */
+ svbool_t
+ test7 (svbool_t p0, svuint16_t x, svuint16_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmple (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test8:
+ **	cmpls	p0\.h, p0/z, z0\.h, #10
+ **	ret
+ */
+ svbool_t
+ test8 (svbool_t p0, svuint16_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmple (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test9:
+ **	cmpls	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test9 (svbool_t p0, svuint32_t x, svuint32_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmple (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test10:
+ **	cmpls	p0\.s, p0/z, z0\.s, #10
+ **	ret
+ */
+ svbool_t
+ test10 (svbool_t p0, svuint32_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmple (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test11:
+ **	cmpls	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test11 (svbool_t p0, svuint64_t x, svuint64_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmple (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test12:
+ **	cmpls	p0\.d, p0/z, z0\.d, #10
+ **	ret
+ */
+ svbool_t
+ test12 (svbool_t p0, svuint64_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmple (pg, x, 10), p0);
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_5.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_5.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_5.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_5.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,74 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ void
+ test1 (svbool_t pg, svint8_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmple_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test2 (svbool_t pg, svint8_t x, svint64_t y, int *any)
+ {
+   svbool_t res = svcmple_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test3 (svint8_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b8 ();
+   svbool_t res = svcmple_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test4 (svint8_t x, svint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b8 ();
+   svbool_t res = svcmple_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test5 (svint16_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmple_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test6 (svint16_t x, svint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmple_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test7 (svint32_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmple_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test8 (svint32_t x, svint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmple_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ /* { dg-final { scan-assembler-times {\tcmple\t} 8 } } */
+ /* { dg-final { scan-assembler-times {\tptrue\t} 6 } } */
+ /* { dg-final { scan-assembler-not {\tptest\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_6.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_6.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_6.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_6.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,74 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ void
+ test1 (svbool_t pg, svuint8_t x, svuint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmple_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test2 (svbool_t pg, svuint8_t x, svuint64_t y, int *any)
+ {
+   svbool_t res = svcmple_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test3 (svuint8_t x, svuint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b8 ();
+   svbool_t res = svcmple_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test4 (svuint8_t x, svuint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b8 ();
+   svbool_t res = svcmple_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test5 (svuint16_t x, svuint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmple_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test6 (svuint16_t x, svuint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmple_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test7 (svuint32_t x, svuint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmple_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test8 (svuint32_t x, svuint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmple_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ /* { dg-final { scan-assembler-times {\tcmpls\t} 8 } } */
+ /* { dg-final { scan-assembler-times {\tptrue\t} 6 } } */
+ /* { dg-final { scan-assembler-not {\tptest\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_7.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_7.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_7.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_7.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,52 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	cmple	p0\.h, p0/z, z0\.h, z1\.d
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t pg, svint16_t x, svint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmple_wide (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	cmple	p0\.s, p0/z, z0\.s, z1\.d
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t pg, svint32_t x, svint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmple_wide (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	cmple	p0\.s, p0/z, z0\.s, z1\.d
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t pg, svint32_t x, svint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmple_wide (pg, x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_8.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_8.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_8.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_8.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,52 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	cmpls	p0\.h, p0/z, z0\.h, z1\.d
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t pg, svuint16_t x, svuint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmple_wide (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	cmpls	p0\.s, p0/z, z0\.s, z1\.d
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t pg, svuint32_t x, svuint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmple_wide (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	cmpls	p0\.s, p0/z, z0\.s, z1\.d
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t pg, svuint32_t x, svuint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmple_wide (pg, x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_9.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_9.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_9.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmple_9.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,104 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	fcmle	p0\.h, p0/z, z0\.h, z1\.h
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t pg, svfloat16_t x, svfloat16_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmple (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	fcmle	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t pg, svfloat32_t x, svfloat32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmple (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	fcmle	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t pg, svfloat32_t x, svfloat32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmple (pg, x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test4:
+ **	fcmle	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test4 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmple (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test5:
+ **	fcmle	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test5 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svcmple (pg, x, y),
+ 		  svptrue_b8 ());
+ }
+ 
+ /*
+ ** test6:
+ **	fcmle	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test6 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmple (pg, x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ /*
+ ** test7:
+ **	fcmle	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test7 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svcmple (pg, x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_1.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_1.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,140 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ void
+ test1 (svbool_t pg, svint8_t x, svint8_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmplt (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test2 (svbool_t pg, svint8_t x, svint8_t y, int *any)
+ {
+   svbool_t res = svcmplt (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test3 (svbool_t pg, svint8_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmplt (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test4 (svbool_t pg, svint8_t x, int *any)
+ {
+   svbool_t res = svcmplt (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test5 (svint16_t x, svint16_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmplt (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test6 (svint16_t x, svint16_t y)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmplt (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test7 (svint16_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmplt (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test8 (svint16_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmplt (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test9 (svint32_t x, svint32_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmplt (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test10 (svint32_t x, svint32_t y)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmplt (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test11 (svint32_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmplt (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test12 (svint32_t x)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmplt (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test13 (svint64_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmplt (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test14 (svint64_t x, svint64_t y)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmplt (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test15 (svint64_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmplt (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test16 (svint64_t x)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmplt (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ /* { dg-final { scan-assembler-times {\tcmplt\t} 16 } } */
+ /* { dg-final { scan-assembler-times {\tcmplt\t[^\n]*, #10} 8 } } */
+ /* { dg-final { scan-assembler-not {\tptest\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_2.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_2.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_2.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_2.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,140 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ void
+ test1 (svbool_t pg, svuint8_t x, svuint8_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmplt (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test2 (svbool_t pg, svuint8_t x, svuint8_t y, int *any)
+ {
+   svbool_t res = svcmplt (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test3 (svbool_t pg, svuint8_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmplt (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test4 (svbool_t pg, svuint8_t x, int *any)
+ {
+   svbool_t res = svcmplt (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test5 (svuint16_t x, svuint16_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmplt (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test6 (svuint16_t x, svuint16_t y)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmplt (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test7 (svuint16_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmplt (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test8 (svuint16_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmplt (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test9 (svuint32_t x, svuint32_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmplt (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test10 (svuint32_t x, svuint32_t y)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmplt (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test11 (svuint32_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmplt (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test12 (svuint32_t x)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmplt (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test13 (svuint64_t x, svuint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmplt (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test14 (svuint64_t x, svuint64_t y)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmplt (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test15 (svuint64_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmplt (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test16 (svuint64_t x)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmplt (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ /* { dg-final { scan-assembler-times {\tcmplo\t} 16 } } */
+ /* { dg-final { scan-assembler-times {\tcmplo\t[^\n]*, #10} 8 } } */
+ /* { dg-final { scan-assembler-not {\tptest\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_3.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_3.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_3.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_3.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,169 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	cmplt	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t p0, svint8_t x, svint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmplt (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test2:
+ **	cmplt	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t p0, svint8_t x, svint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmplt (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test3:
+ **	cmplt	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t p0, svint8_t x, svint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmplt (pg, x, y), pg);
+ }
+ 
+ /*
+ ** test4:
+ ** (
+ **	cmplt	p0\.b, p0/z, z0\.b, #10
+ ** |
+ **	cmple	p0\.b, p0/z, z0\.b, #9
+ ** )
+ **	ret
+ */
+ svbool_t
+ test4 (svbool_t p0, svint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmplt (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test5:
+ ** (
+ **	cmplt	p0\.b, p0/z, z0\.b, #10
+ ** |
+ **	cmple	p0\.b, p0/z, z0\.b, #9
+ ** )
+ **	ret
+ */
+ svbool_t
+ test5 (svbool_t p0, svint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmplt (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test6:
+ ** (
+ **	cmplt	p0\.b, p0/z, z0\.b, #10
+ ** |
+ **	cmple	p0\.b, p0/z, z0\.b, #9
+ ** )
+ **	ret
+ */
+ svbool_t
+ test6 (svbool_t p0, svint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmplt (pg, x, 10), pg);
+ }
+ 
+ /*
+ ** test7:
+ **	cmplt	p0\.h, p0/z, z0\.h, z1\.h
+ **	ret
+ */
+ svbool_t
+ test7 (svbool_t p0, svint16_t x, svint16_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmplt (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test8:
+ **	cmplt	p0\.h, p0/z, z0\.h, #10
+ **	ret
+ */
+ svbool_t
+ test8 (svbool_t p0, svint16_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmplt (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test9:
+ **	cmplt	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test9 (svbool_t p0, svint32_t x, svint32_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmplt (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test10:
+ **	cmplt	p0\.s, p0/z, z0\.s, #10
+ **	ret
+ */
+ svbool_t
+ test10 (svbool_t p0, svint32_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmplt (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test11:
+ **	cmplt	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test11 (svbool_t p0, svint64_t x, svint64_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmplt (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test12:
+ **	cmplt	p0\.d, p0/z, z0\.d, #10
+ **	ret
+ */
+ svbool_t
+ test12 (svbool_t p0, svint64_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmplt (pg, x, 10), p0);
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_4.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_4.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_4.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_4.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,169 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	cmplo	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t p0, svuint8_t x, svuint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmplt (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test2:
+ **	cmplo	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t p0, svuint8_t x, svuint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmplt (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test3:
+ **	cmplo	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t p0, svuint8_t x, svuint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmplt (pg, x, y), pg);
+ }
+ 
+ /*
+ ** test4:
+ ** (
+ **	cmplo	p0\.b, p0/z, z0\.b, #10
+ ** |
+ **	cmpls	p0\.b, p0/z, z0\.b, #9
+ ** )
+ **	ret
+ */
+ svbool_t
+ test4 (svbool_t p0, svuint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmplt (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test5:
+ ** (
+ **	cmplo	p0\.b, p0/z, z0\.b, #10
+ ** |
+ **	cmpls	p0\.b, p0/z, z0\.b, #9
+ ** )
+ **	ret
+ */
+ svbool_t
+ test5 (svbool_t p0, svuint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmplt (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test6:
+ ** (
+ **	cmplo	p0\.b, p0/z, z0\.b, #10
+ ** |
+ **	cmpls	p0\.b, p0/z, z0\.b, #9
+ ** )
+ **	ret
+ */
+ svbool_t
+ test6 (svbool_t p0, svuint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmplt (pg, x, 10), pg);
+ }
+ 
+ /*
+ ** test7:
+ **	cmplo	p0\.h, p0/z, z0\.h, z1\.h
+ **	ret
+ */
+ svbool_t
+ test7 (svbool_t p0, svuint16_t x, svuint16_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmplt (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test8:
+ **	cmplo	p0\.h, p0/z, z0\.h, #10
+ **	ret
+ */
+ svbool_t
+ test8 (svbool_t p0, svuint16_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmplt (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test9:
+ **	cmplo	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test9 (svbool_t p0, svuint32_t x, svuint32_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmplt (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test10:
+ **	cmplo	p0\.s, p0/z, z0\.s, #10
+ **	ret
+ */
+ svbool_t
+ test10 (svbool_t p0, svuint32_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmplt (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test11:
+ **	cmplo	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test11 (svbool_t p0, svuint64_t x, svuint64_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmplt (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test12:
+ **	cmplo	p0\.d, p0/z, z0\.d, #10
+ **	ret
+ */
+ svbool_t
+ test12 (svbool_t p0, svuint64_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmplt (pg, x, 10), p0);
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_5.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_5.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_5.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_5.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,74 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ void
+ test1 (svbool_t pg, svint8_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmplt_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test2 (svbool_t pg, svint8_t x, svint64_t y, int *any)
+ {
+   svbool_t res = svcmplt_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test3 (svint8_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b8 ();
+   svbool_t res = svcmplt_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test4 (svint8_t x, svint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b8 ();
+   svbool_t res = svcmplt_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test5 (svint16_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmplt_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test6 (svint16_t x, svint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmplt_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test7 (svint32_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmplt_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test8 (svint32_t x, svint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmplt_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ /* { dg-final { scan-assembler-times {\tcmplt\t} 8 } } */
+ /* { dg-final { scan-assembler-times {\tptrue\t} 6 } } */
+ /* { dg-final { scan-assembler-not {\tptest\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_6.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_6.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_6.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_6.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,74 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ void
+ test1 (svbool_t pg, svuint8_t x, svuint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmplt_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test2 (svbool_t pg, svuint8_t x, svuint64_t y, int *any)
+ {
+   svbool_t res = svcmplt_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test3 (svuint8_t x, svuint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b8 ();
+   svbool_t res = svcmplt_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test4 (svuint8_t x, svuint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b8 ();
+   svbool_t res = svcmplt_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test5 (svuint16_t x, svuint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmplt_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test6 (svuint16_t x, svuint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmplt_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test7 (svuint32_t x, svuint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmplt_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test8 (svuint32_t x, svuint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmplt_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ /* { dg-final { scan-assembler-times {\tcmplo\t} 8 } } */
+ /* { dg-final { scan-assembler-times {\tptrue\t} 6 } } */
+ /* { dg-final { scan-assembler-not {\tptest\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_7.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_7.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_7.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_7.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,52 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	cmplt	p0\.h, p0/z, z0\.h, z1\.d
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t pg, svint16_t x, svint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmplt_wide (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	cmplt	p0\.s, p0/z, z0\.s, z1\.d
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t pg, svint32_t x, svint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmplt_wide (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	cmplt	p0\.s, p0/z, z0\.s, z1\.d
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t pg, svint32_t x, svint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmplt_wide (pg, x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_8.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_8.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_8.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_8.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,52 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	cmplo	p0\.h, p0/z, z0\.h, z1\.d
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t pg, svuint16_t x, svuint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmplt_wide (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	cmplo	p0\.s, p0/z, z0\.s, z1\.d
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t pg, svuint32_t x, svuint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmplt_wide (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	cmplo	p0\.s, p0/z, z0\.s, z1\.d
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t pg, svuint32_t x, svuint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmplt_wide (pg, x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_9.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_9.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_9.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmplt_9.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,104 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	fcmlt	p0\.h, p0/z, z0\.h, z1\.h
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t pg, svfloat16_t x, svfloat16_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmplt (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	fcmlt	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t pg, svfloat32_t x, svfloat32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmplt (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	fcmlt	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t pg, svfloat32_t x, svfloat32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmplt (pg, x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test4:
+ **	fcmlt	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test4 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmplt (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test5:
+ **	fcmlt	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test5 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svcmplt (pg, x, y),
+ 		  svptrue_b8 ());
+ }
+ 
+ /*
+ ** test6:
+ **	fcmlt	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test6 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmplt (pg, x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ /*
+ ** test7:
+ **	fcmlt	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test7 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svcmplt (pg, x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_1.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_1.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,140 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ void
+ test1 (svbool_t pg, svint8_t x, svint8_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmpne (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test2 (svbool_t pg, svint8_t x, svint8_t y, int *any)
+ {
+   svbool_t res = svcmpne (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test3 (svbool_t pg, svint8_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmpne (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test4 (svbool_t pg, svint8_t x, int *any)
+ {
+   svbool_t res = svcmpne (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test5 (svint16_t x, svint16_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpne (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test6 (svint16_t x, svint16_t y)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpne (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test7 (svint16_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpne (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test8 (svint16_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpne (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test9 (svint32_t x, svint32_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpne (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test10 (svint32_t x, svint32_t y)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpne (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test11 (svint32_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpne (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test12 (svint32_t x)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpne (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test13 (svint64_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmpne (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test14 (svint64_t x, svint64_t y)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmpne (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test15 (svint64_t x, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmpne (pg, x, 10);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test16 (svint64_t x)
+ {
+   svbool_t pg = svptrue_b64 ();
+   svbool_t res = svcmpne (pg, x, 10);
+   return svptest_any (pg, res);
+ }
+ 
+ /* { dg-final { scan-assembler-times {\tcmpne\t} 16 } } */
+ /* { dg-final { scan-assembler-times {\tcmpne\t[^\n]*, #10} 8 } } */
+ /* { dg-final { scan-assembler-not {\tptest\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_2.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_2.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_2.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_2.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,157 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	cmpne	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t p0, svint8_t x, svint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpne (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test2:
+ **	cmpne	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t p0, svint8_t x, svint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmpne (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test3:
+ **	cmpne	p0\.b, p0/z, z0\.b, z1\.b
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t p0, svint8_t x, svint8_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmpne (pg, x, y), pg);
+ }
+ 
+ /*
+ ** test4:
+ **	cmpne	p0\.b, p0/z, z0\.b, #10
+ **	ret
+ */
+ svbool_t
+ test4 (svbool_t p0, svint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpne (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test5:
+ **	cmpne	p0\.b, p0/z, z0\.b, #10
+ **	ret
+ */
+ svbool_t
+ test5 (svbool_t p0, svint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmpne (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test6:
+ **	cmpne	p0\.b, p0/z, z0\.b, #10
+ **	ret
+ */
+ svbool_t
+ test6 (svbool_t p0, svint8_t x)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (p0, svcmpne (pg, x, 10), pg);
+ }
+ 
+ /*
+ ** test7:
+ **	cmpne	p0\.h, p0/z, z0\.h, z1\.h
+ **	ret
+ */
+ svbool_t
+ test7 (svbool_t p0, svint16_t x, svint16_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpne (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test8:
+ **	cmpne	p0\.h, p0/z, z0\.h, #10
+ **	ret
+ */
+ svbool_t
+ test8 (svbool_t p0, svint16_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmpne (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test9:
+ **	cmpne	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test9 (svbool_t p0, svint32_t x, svint32_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpne (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test10:
+ **	cmpne	p0\.s, p0/z, z0\.s, #10
+ **	ret
+ */
+ svbool_t
+ test10 (svbool_t p0, svint32_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmpne (pg, x, 10), p0);
+ }
+ 
+ /*
+ ** test11:
+ **	cmpne	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test11 (svbool_t p0, svint64_t x, svint64_t y)
+ {
+   svbool_t pg = svptrue_b8 ();
+   return svand_z (pg, svcmpne (pg, x, y), p0);
+ }
+ 
+ /*
+ ** test12:
+ **	cmpne	p0\.d, p0/z, z0\.d, #10
+ **	ret
+ */
+ svbool_t
+ test12 (svbool_t p0, svint64_t x)
+ {
+   svbool_t pg = svptrue_b16 ();
+   return svand_z (pg, svcmpne (pg, x, 10), p0);
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_3.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_3.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_3.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_3.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,74 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ void
+ test1 (svbool_t pg, svint8_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t res = svcmpne_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test2 (svbool_t pg, svint8_t x, svint64_t y, int *any)
+ {
+   svbool_t res = svcmpne_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test3 (svint8_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b8 ();
+   svbool_t res = svcmpne_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test4 (svint8_t x, svint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b8 ();
+   svbool_t res = svcmpne_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test5 (svint16_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpne_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test6 (svint16_t x, svint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b16 ();
+   svbool_t res = svcmpne_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ void
+ test7 (svint32_t x, svint64_t y, int *any, svbool_t *ptr)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpne_wide (pg, x, y);
+   *any = svptest_any (pg, res);
+   *ptr = res;
+ }
+ 
+ int
+ test8 (svint32_t x, svint64_t y, int *any)
+ {
+   svbool_t pg = svptrue_b32 ();
+   svbool_t res = svcmpne_wide (pg, x, y);
+   return svptest_any (pg, res);
+ }
+ 
+ /* { dg-final { scan-assembler-times {\tcmpne\t} 8 } } */
+ /* { dg-final { scan-assembler-times {\tptrue\t} 6 } } */
+ /* { dg-final { scan-assembler-not {\tptest\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_4.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_4.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_4.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_4.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,52 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	cmpne	p0\.h, p0/z, z0\.h, z1\.d
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t pg, svint16_t x, svint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpne_wide (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	cmpne	p0\.s, p0/z, z0\.s, z1\.d
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t pg, svint32_t x, svint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpne_wide (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	cmpne	p0\.s, p0/z, z0\.s, z1\.d
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t pg, svint32_t x, svint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpne_wide (pg, x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_5.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_5.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_5.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpne_5.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,104 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	fcmne	p0\.h, p0/z, z0\.h, z1\.h
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t pg, svfloat16_t x, svfloat16_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpne (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	fcmne	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t pg, svfloat32_t x, svfloat32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpne (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	fcmne	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t pg, svfloat32_t x, svfloat32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpne (pg, x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test4:
+ **	fcmne	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test4 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpne (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test5:
+ **	fcmne	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test5 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svcmpne (pg, x, y),
+ 		  svptrue_b8 ());
+ }
+ 
+ /*
+ ** test6:
+ **	fcmne	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test6 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpne (pg, x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ /*
+ ** test7:
+ **	fcmne	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test7 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svcmpne (pg, x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpuo_1.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpuo_1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpuo_1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpuo_1.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,104 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	fcmuo	p0\.h, p0/z, z0\.h, z1\.h
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t pg, svfloat16_t x, svfloat16_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpuo (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	fcmuo	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t pg, svfloat32_t x, svfloat32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpuo (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	fcmuo	p0\.s, p0/z, z0\.s, z1\.s
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t pg, svfloat32_t x, svfloat32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpuo (pg, x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test4:
+ **	fcmuo	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test4 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpuo (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test5:
+ **	fcmuo	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test5 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svcmpuo (pg, x, y),
+ 		  svptrue_b8 ());
+ }
+ 
+ /*
+ ** test6:
+ **	fcmuo	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test6 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svcmpuo (pg, x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ /*
+ ** test7:
+ **	fcmuo	p0\.d, p0/z, z0\.d, z1\.d
+ **	ret
+ */
+ svbool_t
+ test7 (svbool_t pg, svfloat64_t x, svfloat64_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svcmpuo (pg, x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cops.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cops.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cops.c	Sun Aug  3 22:32:47 2025
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cops.c	Sun Aug 10 22:32:23 2025
***************
*** 212,233 ****
      type init4 = svld1_ ## su ## sz (cmp ## sz, mem); \
  	\
      type res_init1 = func_ ## type ## _init1 (); \
!     svbool_t cmp = svcmpne_ ## su ## sz (all_true, init1, res_init1); \
      if (svptest_any (all_true, cmp)) \
        __builtin_abort (); \
  	\
      type res_init2 = func_ ## type ## _init2 (); \
!     cmp = svcmpne_ ## su ## sz (all_true, init2, res_init2); \
      if (svptest_any (all_true, cmp)) \
        __builtin_abort (); \
  	\
      type res_init3 = func_ ## type ## _init3 (); \
!     cmp = svcmpne_ ## su ## sz (all_true, init3, res_init3); \
      if (svptest_any (all_true, cmp)) \
        __builtin_abort (); \
  	\
      type res_init4 = func_ ## type ## _init4 (); \
!     cmp = svcmpne_ ## su ## sz (all_true, init4, res_init4); \
      if (svptest_any (all_true, cmp)) \
        __builtin_abort (); \
    }
--- 212,233 ----
      type init4 = svld1_ ## su ## sz (cmp ## sz, mem); \
  	\
      type res_init1 = func_ ## type ## _init1 (); \
!     svbool_t cmp = svcmpne_ ## su ## sz (cmp ## sz, init1, res_init1); \
      if (svptest_any (all_true, cmp)) \
        __builtin_abort (); \
  	\
      type res_init2 = func_ ## type ## _init2 (); \
!     cmp = svcmpne_ ## su ## sz (cmp ## sz, init2, res_init2); \
      if (svptest_any (all_true, cmp)) \
        __builtin_abort (); \
  	\
      type res_init3 = func_ ## type ## _init3 (); \
!     cmp = svcmpne_ ## su ## sz (cmp ## sz, init3, res_init3); \
      if (svptest_any (all_true, cmp)) \
        __builtin_abort (); \
  	\
      type res_init4 = func_ ## type ## _init4 (); \
!     cmp = svcmpne_ ## su ## sz (cmp ## sz, init4, res_init4); \
      if (svptest_any (all_true, cmp)) \
        __builtin_abort (); \
    }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dup_1.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dup_1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dup_1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dup_1.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,47 ----
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ svbool_t
+ test1 (int x)
+ {
+   return svand_z (svptrue_b16 (), svdup_b16 (x), svptrue_b16 ());
+ }
+ 
+ svbool_t
+ test2 (int x)
+ {
+   return svand_z (svptrue_b8 (), svdup_b32 (x), svptrue_b16 ());
+ }
+ 
+ svbool_t
+ test3 (int x)
+ {
+   return svand_z (svptrue_b32 (), svdup_b32 (x), svptrue_b16 ());
+ }
+ 
+ svbool_t
+ test4 (int x)
+ {
+   return svand_z (svptrue_b32 (), svdup_b32 (x), svptrue_b32 ());
+ }
+ 
+ svbool_t
+ test5 (int x)
+ {
+   return svand_z (svptrue_b8 (), svdup_b64 (x), svptrue_b32 ());
+ }
+ 
+ svbool_t
+ test6 (int x)
+ {
+   return svand_z (svptrue_b16 (), svdup_b64 (x), svptrue_b8 ());
+ }
+ 
+ svbool_t
+ test7 (int x)
+ {
+   return svand_z (svptrue_b16 (), svdup_b64 (x), svptrue_b64 ());
+ }
+ 
+ /* { dg-final { scan-assembler-not {\tand\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_13.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_13.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_13.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_13.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,45 ----
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ svbool_t
+ test1 (int x0, int x1)
+ {
+   return svand_z (svptrue_b8 (), svdupq_b64 (x0, x1), svptrue_b16 ());
+ }
+ 
+ svbool_t
+ test2 (int x0, int x1, int x2, int x3)
+ {
+   return svand_z (svptrue_b8 (), svdupq_b32 (x0, x1, x2, x3), svptrue_b16 ());
+ }
+ 
+ svbool_t
+ test3 (int x0, int x1, int x2, int x3)
+ {
+   return svand_z (svptrue_b32 (), svdupq_b32 (x0, x1, x2, x3), svptrue_b16 ());
+ }
+ 
+ svbool_t
+ test4 (int x0, int x1, int x2, int x3)
+ {
+   return svand_z (svptrue_b32 (), svdupq_b32 (x0, x1, x2, x3), svptrue_b32 ());
+ }
+ 
+ svbool_t
+ test5 (int x0, int x1, int x2, int x3)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svdupq_b16 (x0, x1, x2, x3, x2, x0, x1, x3),
+ 		  svptrue_b32 ());
+ }
+ 
+ svbool_t
+ test6 (int x0, int x1, int x2, int x3)
+ {
+   return svand_z (svptrue_b64 (),
+ 		  svdupq_b16 (x0, x1, x2, x3, x2, x0, x1, x3),
+ 		  svptrue_b16 ());
+ }
+ 
+ /* { dg-final { scan-assembler-not {\tand\tp} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_lane_9.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_lane_9.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_lane_9.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/dupq_lane_9.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,8 ----
+ /* { dg-options "-O2 -mbig-endian" } */
+ 
+ #pragma GCC aarch64 "arm_sve.h"
+ 
+ svint32_t f(svint32_t x) { return svdupq_lane (x, 17); }
+ void g(svint32_t *a, svint32_t *b) { *a = svdupq_lane (*b, 17); }
+ 
+ /* { dg-final { scan-assembler-not {\trevw\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_2.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_2.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_2.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_2.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,96 ----
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	...
+ **	ptrue	(p[0-3])\.h, all
+ **	...
+ **	trn1	p0\.h, p[0-3]\.h, \1\.h
+ **	ret
+ */
+ svbool_t
+ test1 ()
+ {
+   return svtrn1_b16 (svptrue_b8 (), svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	...
+ **	ptrue	(p[0-3])\.h, all
+ **	...
+ **	trn1	p0\.h, \1\.h, p[0-3]\.h
+ **	ret
+ */
+ svbool_t
+ test2 ()
+ {
+   return svtrn1_b16 (svptrue_b16 (), svptrue_b8 ());
+ }
+ 
+ /*
+ ** test3:
+ **	...
+ **	ptrue	(p[0-3])\.s, all
+ **	...
+ **	trn1	p0\.s, p[0-3]\.s, \1\.s
+ **	ret
+ */
+ svbool_t
+ test3 ()
+ {
+   return svtrn1_b32 (svptrue_b8 (), svptrue_b32 ());
+ }
+ 
+ /*
+ ** test4:
+ **	...
+ **	ptrue	(p[0-3])\.s, all
+ **	...
+ **	trn1	p0\.s, \1\.s, p[0-3]\.s
+ **	ret
+ */
+ svbool_t
+ test4 ()
+ {
+   return svtrn1_b32 (svptrue_b32 (), svptrue_b8 ());
+ }
+ 
+ /*
+ ** test5:
+ **	...
+ **	ptrue	(p[0-3])\.d, all
+ **	...
+ **	trn1	p0\.d, p[0-3]\.d, \1\.d
+ **	ret
+ */
+ svbool_t
+ test5 ()
+ {
+   return svtrn1_b64 (svptrue_b8 (), svptrue_b64 ());
+ }
+ 
+ /*
+ ** test6:
+ **	...
+ **	ptrue	(p[0-3])\.d, all
+ **	...
+ **	trn1	p0\.d, \1\.d, p[0-3]\.d
+ **	ret
+ */
+ svbool_t
+ test6 ()
+ {
+   return svtrn1_b64 (svptrue_b64 (), svptrue_b8 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_3.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_3.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_3.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_3.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,96 ----
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	...
+ **	ptrue	(p[0-3])\.h, all
+ **	...
+ **	trn2	p0\.h, p[0-3]\.h, \1\.h
+ **	ret
+ */
+ svbool_t
+ test1 ()
+ {
+   return svtrn2_b16 (svptrue_b8 (), svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	...
+ **	ptrue	(p[0-3])\.h, all
+ **	...
+ **	trn2	p0\.h, \1\.h, p[0-3]\.h
+ **	ret
+ */
+ svbool_t
+ test2 ()
+ {
+   return svtrn2_b16 (svptrue_b16 (), svptrue_b8 ());
+ }
+ 
+ /*
+ ** test3:
+ **	...
+ **	ptrue	(p[0-3])\.s, all
+ **	...
+ **	trn2	p0\.s, p[0-3]\.s, \1\.s
+ **	ret
+ */
+ svbool_t
+ test3 ()
+ {
+   return svtrn2_b32 (svptrue_b8 (), svptrue_b32 ());
+ }
+ 
+ /*
+ ** test4:
+ **	...
+ **	ptrue	(p[0-3])\.s, all
+ **	...
+ **	trn2	p0\.s, \1\.s, p[0-3]\.s
+ **	ret
+ */
+ svbool_t
+ test4 ()
+ {
+   return svtrn2_b32 (svptrue_b32 (), svptrue_b8 ());
+ }
+ 
+ /*
+ ** test5:
+ **	...
+ **	ptrue	(p[0-3])\.d, all
+ **	...
+ **	trn2	p0\.d, p[0-3]\.d, \1\.d
+ **	ret
+ */
+ svbool_t
+ test5 ()
+ {
+   return svtrn2_b64 (svptrue_b8 (), svptrue_b64 ());
+ }
+ 
+ /*
+ ** test6:
+ **	...
+ **	ptrue	(p[0-3])\.d, all
+ **	...
+ **	trn2	p0\.d, \1\.d, p[0-3]\.d
+ **	ret
+ */
+ svbool_t
+ test6 ()
+ {
+   return svtrn2_b64 (svptrue_b64 (), svptrue_b8 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_4.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_4.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_4.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_4.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,96 ----
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	...
+ **	ptrue	(p[0-3])\.h, all
+ **	...
+ **	zip1	p0\.h, p[0-3]\.h, \1\.h
+ **	ret
+ */
+ svbool_t
+ test1 ()
+ {
+   return svzip1_b16 (svptrue_b8 (), svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	...
+ **	ptrue	(p[0-3])\.h, all
+ **	...
+ **	zip1	p0\.h, \1\.h, p[0-3]\.h
+ **	ret
+ */
+ svbool_t
+ test2 ()
+ {
+   return svzip1_b16 (svptrue_b16 (), svptrue_b8 ());
+ }
+ 
+ /*
+ ** test3:
+ **	...
+ **	ptrue	(p[0-3])\.s, all
+ **	...
+ **	zip1	p0\.s, p[0-3]\.s, \1\.s
+ **	ret
+ */
+ svbool_t
+ test3 ()
+ {
+   return svzip1_b32 (svptrue_b8 (), svptrue_b32 ());
+ }
+ 
+ /*
+ ** test4:
+ **	...
+ **	ptrue	(p[0-3])\.s, all
+ **	...
+ **	zip1	p0\.s, \1\.s, p[0-3]\.s
+ **	ret
+ */
+ svbool_t
+ test4 ()
+ {
+   return svzip1_b32 (svptrue_b32 (), svptrue_b8 ());
+ }
+ 
+ /*
+ ** test5:
+ **	...
+ **	ptrue	(p[0-3])\.d, all
+ **	...
+ **	zip1	p0\.d, p[0-3]\.d, \1\.d
+ **	ret
+ */
+ svbool_t
+ test5 ()
+ {
+   return svzip1_b64 (svptrue_b8 (), svptrue_b64 ());
+ }
+ 
+ /*
+ ** test6:
+ **	...
+ **	ptrue	(p[0-3])\.d, all
+ **	...
+ **	zip1	p0\.d, \1\.d, p[0-3]\.d
+ **	ret
+ */
+ svbool_t
+ test6 ()
+ {
+   return svzip1_b64 (svptrue_b64 (), svptrue_b8 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_5.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_5.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_5.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_5.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,96 ----
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	...
+ **	ptrue	(p[0-3])\.h, all
+ **	...
+ **	zip2	p0\.h, p[0-3]\.h, \1\.h
+ **	ret
+ */
+ svbool_t
+ test1 ()
+ {
+   return svzip2_b16 (svptrue_b8 (), svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	...
+ **	ptrue	(p[0-3])\.h, all
+ **	...
+ **	zip2	p0\.h, \1\.h, p[0-3]\.h
+ **	ret
+ */
+ svbool_t
+ test2 ()
+ {
+   return svzip2_b16 (svptrue_b16 (), svptrue_b8 ());
+ }
+ 
+ /*
+ ** test3:
+ **	...
+ **	ptrue	(p[0-3])\.s, all
+ **	...
+ **	zip2	p0\.s, p[0-3]\.s, \1\.s
+ **	ret
+ */
+ svbool_t
+ test3 ()
+ {
+   return svzip2_b32 (svptrue_b8 (), svptrue_b32 ());
+ }
+ 
+ /*
+ ** test4:
+ **	...
+ **	ptrue	(p[0-3])\.s, all
+ **	...
+ **	zip2	p0\.s, \1\.s, p[0-3]\.s
+ **	ret
+ */
+ svbool_t
+ test4 ()
+ {
+   return svzip2_b32 (svptrue_b32 (), svptrue_b8 ());
+ }
+ 
+ /*
+ ** test5:
+ **	...
+ **	ptrue	(p[0-3])\.d, all
+ **	...
+ **	zip2	p0\.d, p[0-3]\.d, \1\.d
+ **	ret
+ */
+ svbool_t
+ test5 ()
+ {
+   return svzip2_b64 (svptrue_b8 (), svptrue_b64 ());
+ }
+ 
+ /*
+ ** test6:
+ **	...
+ **	ptrue	(p[0-3])\.d, all
+ **	...
+ **	zip2	p0\.d, \1\.d, p[0-3]\.d
+ **	ret
+ */
+ svbool_t
+ test6 ()
+ {
+   return svzip2_b64 (svptrue_b64 (), svptrue_b8 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_6.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_6.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_6.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_6.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,96 ----
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	...
+ **	ptrue	(p[0-3])\.h, all
+ **	...
+ **	uzp1	p0\.h, p[0-3]\.h, \1\.h
+ **	ret
+ */
+ svbool_t
+ test1 ()
+ {
+   return svuzp1_b16 (svptrue_b8 (), svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	...
+ **	ptrue	(p[0-3])\.h, all
+ **	...
+ **	uzp1	p0\.h, \1\.h, p[0-3]\.h
+ **	ret
+ */
+ svbool_t
+ test2 ()
+ {
+   return svuzp1_b16 (svptrue_b16 (), svptrue_b8 ());
+ }
+ 
+ /*
+ ** test3:
+ **	...
+ **	ptrue	(p[0-3])\.s, all
+ **	...
+ **	uzp1	p0\.s, p[0-3]\.s, \1\.s
+ **	ret
+ */
+ svbool_t
+ test3 ()
+ {
+   return svuzp1_b32 (svptrue_b8 (), svptrue_b32 ());
+ }
+ 
+ /*
+ ** test4:
+ **	...
+ **	ptrue	(p[0-3])\.s, all
+ **	...
+ **	uzp1	p0\.s, \1\.s, p[0-3]\.s
+ **	ret
+ */
+ svbool_t
+ test4 ()
+ {
+   return svuzp1_b32 (svptrue_b32 (), svptrue_b8 ());
+ }
+ 
+ /*
+ ** test5:
+ **	...
+ **	ptrue	(p[0-3])\.d, all
+ **	...
+ **	uzp1	p0\.d, p[0-3]\.d, \1\.d
+ **	ret
+ */
+ svbool_t
+ test5 ()
+ {
+   return svuzp1_b64 (svptrue_b8 (), svptrue_b64 ());
+ }
+ 
+ /*
+ ** test6:
+ **	...
+ **	ptrue	(p[0-3])\.d, all
+ **	...
+ **	uzp1	p0\.d, \1\.d, p[0-3]\.d
+ **	ret
+ */
+ svbool_t
+ test6 ()
+ {
+   return svuzp1_b64 (svptrue_b64 (), svptrue_b8 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_7.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_7.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_7.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/perm_7.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,96 ----
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	...
+ **	ptrue	(p[0-3])\.h, all
+ **	...
+ **	uzp2	p0\.h, p[0-3]\.h, \1\.h
+ **	ret
+ */
+ svbool_t
+ test1 ()
+ {
+   return svuzp2_b16 (svptrue_b8 (), svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	...
+ **	ptrue	(p[0-3])\.h, all
+ **	...
+ **	uzp2	p0\.h, \1\.h, p[0-3]\.h
+ **	ret
+ */
+ svbool_t
+ test2 ()
+ {
+   return svuzp2_b16 (svptrue_b16 (), svptrue_b8 ());
+ }
+ 
+ /*
+ ** test3:
+ **	...
+ **	ptrue	(p[0-3])\.s, all
+ **	...
+ **	uzp2	p0\.s, p[0-3]\.s, \1\.s
+ **	ret
+ */
+ svbool_t
+ test3 ()
+ {
+   return svuzp2_b32 (svptrue_b8 (), svptrue_b32 ());
+ }
+ 
+ /*
+ ** test4:
+ **	...
+ **	ptrue	(p[0-3])\.s, all
+ **	...
+ **	uzp2	p0\.s, \1\.s, p[0-3]\.s
+ **	ret
+ */
+ svbool_t
+ test4 ()
+ {
+   return svuzp2_b32 (svptrue_b32 (), svptrue_b8 ());
+ }
+ 
+ /*
+ ** test5:
+ **	...
+ **	ptrue	(p[0-3])\.d, all
+ **	...
+ **	uzp2	p0\.d, p[0-3]\.d, \1\.d
+ **	ret
+ */
+ svbool_t
+ test5 ()
+ {
+   return svuzp2_b64 (svptrue_b8 (), svptrue_b64 ());
+ }
+ 
+ /*
+ ** test6:
+ **	...
+ **	ptrue	(p[0-3])\.d, all
+ **	...
+ **	uzp2	p0\.d, \1\.d, p[0-3]\.d
+ **	ret
+ */
+ svbool_t
+ test6 ()
+ {
+   return svuzp2_b64 (svptrue_b64 (), svptrue_b8 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pnext_3.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pnext_3.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pnext_3.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pnext_3.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,130 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	pnext	p0\.h, p1, p0\.h
+ **	ret
+ */
+ svbool_t
+ test1 (svbool_t pg, svbool_t prev)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svpnext_b16 (prev, pg),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	pnext	p0\.h, p1, p0\.h
+ **	ret
+ */
+ svbool_t
+ test2 (svbool_t pg, svbool_t prev)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svpnext_b16 (prev, pg),
+ 		  svptrue_b8 ());
+ }
+ 
+ /*
+ ** test3:
+ **	pnext	p0\.h, p1, p0\.h
+ **	ret
+ */
+ svbool_t
+ test3 (svbool_t pg, svbool_t prev)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svpnext_b16 (prev, pg),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test4:
+ **	pnext	p0\.s, p1, p0\.s
+ **	ret
+ */
+ svbool_t
+ test4 (svbool_t pg, svbool_t prev)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svpnext_b32 (prev, pg),
+ 		  svptrue_b8 ());
+ }
+ 
+ /*
+ ** test5:
+ **	pnext	p0\.s, p1, p0\.s
+ **	ret
+ */
+ svbool_t
+ test5 (svbool_t pg, svbool_t prev)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svpnext_b32 (prev, pg),
+ 		  svptrue_b8 ());
+ }
+ 
+ /*
+ ** test6:
+ **	pnext	p0\.s, p1, p0\.s
+ **	ret
+ */
+ svbool_t
+ test6 (svbool_t pg, svbool_t prev)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svpnext_b32 (prev, pg),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test7:
+ **	pnext	p0\.d, p1, p0\.d
+ **	ret
+ */
+ svbool_t
+ test7 (svbool_t pg, svbool_t prev)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svpnext_b64 (prev, pg),
+ 		  svptrue_b8 ());
+ }
+ 
+ /*
+ ** test8:
+ **	pnext	p0\.d, p1, p0\.d
+ **	ret
+ */
+ svbool_t
+ test8 (svbool_t pg, svbool_t prev)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svpnext_b64 (prev, pg),
+ 		  svptrue_b8 ());
+ }
+ 
+ /*
+ ** test9:
+ **	pnext	p0\.d, p1, p0\.d
+ **	ret
+ */
+ svbool_t
+ test9 (svbool_t pg, svbool_t prev)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svpnext_b64 (prev, pg),
+ 		  svptrue_b64 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr120718.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr120718.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr120718.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr120718.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,12 ----
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ typedef int __attribute__((vector_size(8))) v2si;
+ typedef struct { int x; int y; } A;
+ void bar(A a);
+ void foo()
+ {
+     A a;
+     *(v2si *)&a = (v2si){0, (int)svcntd_pat(SV_ALL)};
+     bar(a);
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr121118_1.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr121118_1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr121118_1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr121118_1.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,16 ----
+ /* { dg-options "-O2 -msve-vector-bits=512" } */
+ 
+ typedef __SVBool_t fixed_bool __attribute__((arm_sve_vector_bits(512)));
+ 
+ #define TEST_CONST(NAME, CONST)						\
+   fixed_bool								\
+   NAME ()								\
+   {									\
+     union { unsigned long long i; fixed_bool pg; } u = { CONST };	\
+     return u.pg;							\
+   }
+ 
+ TEST_CONST (test1, 0x02aaaaaaaa)
+ TEST_CONST (test2, 0x0155555557)
+ TEST_CONST (test3, 0x0013333333333333ULL)
+ TEST_CONST (test4, 0x0011111111111113ULL)
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/rev_2.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/rev_2.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/rev_2.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/rev_2.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,27 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ svbool_t test1()
+ {
+   return svrev_b16 (svptrue_b16 ());
+ }
+ 
+ svbool_t test2()
+ {
+   return svrev_b32 (svptrue_b32 ());
+ }
+ 
+ svbool_t test3()
+ {
+   return svrev_b64 (svptrue_b64 ());
+ }
+ 
+ /* { dg-final { scan-assembler {\tptrue\tp[0-7]\.h} } } */
+ /* { dg-final { scan-assembler {\tptrue\tp[0-7]\.s} } } */
+ /* { dg-final { scan-assembler {\tptrue\tp[0-7]\.d} } } */
+ /* { dg-final { scan-assembler-not {\tptrue\tp[0-7]\.b} } } */
+ /* { dg-final { scan-assembler {\trev\tp0\.h} } } */
+ /* { dg-final { scan-assembler {\trev\tp0\.s} } } */
+ /* { dg-final { scan-assembler {\trev\tp0\.d} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/unpkhi_1.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/unpkhi_1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/unpkhi_1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/unpkhi_1.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,24 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ svbool_t
+ test1 (svbool_t p)
+ {
+   return svand_z (svptrue_b8 (), svunpkhi (p), svptrue_b16 ());
+ }
+ 
+ svbool_t
+ test2 (svbool_t p)
+ {
+   return svand_z (svptrue_b16 (), svunpkhi (p), svptrue_b8 ());
+ }
+ 
+ svbool_t
+ test3 (svbool_t p)
+ {
+   return svand_z (svptrue_b16 (), svunpkhi (p), svptrue_b16 ());
+ }
+ 
+ /* { dg-final { scan-assembler-not {\tand\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/unpklo_1.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/unpklo_1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/unpklo_1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/unpklo_1.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,24 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ svbool_t
+ test1 (svbool_t p)
+ {
+   return svand_z (svptrue_b8 (), svunpklo (p), svptrue_b16 ());
+ }
+ 
+ svbool_t
+ test2 (svbool_t p)
+ {
+   return svand_z (svptrue_b16 (), svunpklo (p), svptrue_b8 ());
+ }
+ 
+ svbool_t
+ test3 (svbool_t p)
+ {
+   return svand_z (svptrue_b16 (), svunpklo (p), svptrue_b16 ());
+ }
+ 
+ /* { dg-final { scan-assembler-not {\tand\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/whilele_13.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/whilele_13.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/whilele_13.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/whilele_13.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,130 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	whilele	p0\.h, w0, w1
+ **	ret
+ */
+ svbool_t
+ test1 (int32_t x, int32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svwhilele_b16 (x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	whilele	p0\.h, x0, x1
+ **	ret
+ */
+ svbool_t
+ test2 (int64_t x, int64_t y)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svwhilele_b16 (x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	whilels	p0\.s, w0, w1
+ **	ret
+ */
+ svbool_t
+ test3 (uint32_t x, uint32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svwhilele_b32 (x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test4:
+ **	whilels	p0\.s, x0, x1
+ **	ret
+ */
+ svbool_t
+ test4 (uint64_t x, uint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svwhilele_b32 (x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test5:
+ **	whilele	p0\.s, w0, w1
+ **	ret
+ */
+ svbool_t
+ test5 (int32_t x, int32_t y)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svwhilele_b32 (x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test6:
+ **	whilels	p0\.s, w0, w1
+ **	ret
+ */
+ svbool_t
+ test6 (uint32_t x, uint32_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svwhilele_b32 (x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test7:
+ **	whilels	p0\.d, w0, w1
+ **	ret
+ */
+ svbool_t
+ test7 (uint32_t x, uint32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svwhilele_b64 (x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ /*
+ ** test8:
+ **	whilele	p0\.d, x0, x1
+ **	ret
+ */
+ svbool_t
+ test8 (int64_t x, int64_t y)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svwhilele_b64 (x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test9:
+ **	whilels	p0\.d, x0, x1
+ **	ret
+ */
+ svbool_t
+ test9 (uint64_t x, uint64_t y)
+ {
+   return svand_z (svptrue_b64 (),
+ 		  svwhilele_b64 (x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/whilelt_6.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/whilelt_6.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/acle/general/whilelt_6.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/acle/general/whilelt_6.c	Sun Aug 10 22:32:23 2025
***************
*** 0 ****
--- 1,130 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	whilelt	p0\.h, w0, w1
+ **	ret
+ */
+ svbool_t
+ test1 (int32_t x, int32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svwhilelt_b16 (x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	whilelt	p0\.h, x0, x1
+ **	ret
+ */
+ svbool_t
+ test2 (int64_t x, int64_t y)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svwhilelt_b16 (x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	whilelo	p0\.s, w0, w1
+ **	ret
+ */
+ svbool_t
+ test3 (uint32_t x, uint32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svwhilelt_b32 (x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test4:
+ **	whilelo	p0\.s, x0, x1
+ **	ret
+ */
+ svbool_t
+ test4 (uint64_t x, uint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svwhilelt_b32 (x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test5:
+ **	whilelt	p0\.s, w0, w1
+ **	ret
+ */
+ svbool_t
+ test5 (int32_t x, int32_t y)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svwhilelt_b32 (x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test6:
+ **	whilelo	p0\.s, w0, w1
+ **	ret
+ */
+ svbool_t
+ test6 (uint32_t x, uint32_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svwhilelt_b32 (x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test7:
+ **	whilelo	p0\.d, w0, w1
+ **	ret
+ */
+ svbool_t
+ test7 (uint32_t x, uint32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svwhilelt_b64 (x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ /*
+ ** test8:
+ **	whilelt	p0\.d, x0, x1
+ **	ret
+ */
+ svbool_t
+ test8 (int64_t x, int64_t y)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svwhilelt_b64 (x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test9:
+ **	whilelo	p0\.d, x0, x1
+ **	ret
+ */
+ svbool_t
+ test9 (uint64_t x, uint64_t y)
+ {
+   return svand_z (svptrue_b64 (),
+ 		  svwhilelt_b64 (x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/peel_ind_11.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/peel_ind_11.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/peel_ind_11.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/peel_ind_11.c	Sun Aug 10 22:32:24 2025
***************
*** 0 ****
--- 1,20 ----
+ /* Peeling for alignment with masking in VLA modes.  */
+ /* { dg-do compile } */
+ /* { dg-options "-Ofast -msve-vector-bits=scalable --param aarch64-autovec-preference=sve-only -fdump-tree-vect-details" } */
+ 
+ #define START 3
+ #define END 510
+ 
+ int __attribute__((noipa))
+ foo (int *a) {
+   for (signed int i = START; i < END; ++i) {
+     if (a[i] != 0)
+       return i;
+   }
+   return -1;
+ }
+ 
+ /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+ /* { dg-final { scan-tree-dump "pfa_iv_offset" "vect" } } */
+ /* { dg-final { scan-tree-dump "Alignment of access forced using peeling" "vect" } } */
+ /* { dg-final { scan-assembler {\tnot\tp[0-7]\.b, p[0-7]/z, p.*\n} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/peel_ind_11_run.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/peel_ind_11_run.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/peel_ind_11_run.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/peel_ind_11_run.c	Sun Aug 10 22:32:24 2025
***************
*** 0 ****
--- 1,27 ----
+ /* Peeling for alignment with masking in VLA modes.  */
+ /* { dg-do run { target aarch64_sve_hw } } */
+ /* { dg-options "-Ofast -msve-vector-bits=scalable --param aarch64-autovec-preference=sve-only" } */
+ 
+ #include "peel_ind_11.c"
+ #include <stdio.h>
+ #include <stdlib.h>
+ 
+ #define N 512
+ 
+ int __attribute__ ((optimize (1)))
+ main (void)
+ {
+   for (int k = 5; k < 30; k++) {
+     int *a = (int *) malloc (sizeof(int) * N);
+ 
+     /* Set only one non-zero element for test.  */
+     for (int i = 5; i < 30; i++)
+       a[i] = (i == k ? 1 : 0);
+ 
+     int res = foo (a);
+     asm volatile ("");
+     if (res != k) {
+       __builtin_abort ();
+     }
+   }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/peel_ind_12.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/peel_ind_12.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/peel_ind_12.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/peel_ind_12.c	Sun Aug 10 22:32:24 2025
***************
*** 0 ****
--- 1,21 ----
+ /* Peeling for alignment with masking together with versioning in VLA modes.  */
+ /* { dg-do compile } */
+ /* { dg-options "-Ofast -msve-vector-bits=scalable --param aarch64-autovec-preference=sve-only -fdump-tree-vect-details" } */
+ 
+ #define START 5
+ #define END 509
+ 
+ int __attribute__((noipa))
+ foo (int *restrict a, int * restrict b) {
+   for (signed int i = START; i < END; ++i) {
+     if (a[i] != b[i])
+       return i;
+   }
+   return -1;
+ }
+ 
+ /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+ /* { dg-final { scan-tree-dump "pfa_iv_offset" "vect" } } */
+ /* { dg-final { scan-tree-dump "Both peeling and versioning will be applied" "vect" } } */
+ /* { dg-final { scan-assembler {\tnot\tp[0-7]\.b, p[0-7]/z, p.*\n} } } */
+ /* { dg-final { scan-assembler {\teor\t.*\n} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/peel_ind_12_run.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/peel_ind_12_run.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/peel_ind_12_run.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/peel_ind_12_run.c	Sun Aug 10 22:32:24 2025
***************
*** 0 ****
--- 1,29 ----
+ /* Peeling for alignment with masking together with versioning in VLA modes.  */
+ /* { dg-do run { target aarch64_sve_hw } } */
+ /* { dg-options "-Ofast -msve-vector-bits=scalable --param aarch64-autovec-preference=sve-only" } */
+ 
+ #include "peel_ind_12.c"
+ #include <stdio.h>
+ #include <stdlib.h>
+ 
+ #define N 512
+ 
+ int __attribute__ ((optimize (1)))
+ main (void) {
+   for (int k = 5; k < 50; k++) {
+     int *a = (int *) malloc (sizeof(int) * N);
+     int *b = (int *) malloc (sizeof(int) * N);
+ 
+     /* Set only one place of different values for test.  */
+     for (int i = 5; i < 50; i++) {
+       a[i] = (i == k ? 1 : 0);
+       b[i] = 0;
+     }
+ 
+     int res = foo (a, b);
+     asm volatile ("");
+     if (res != k) {
+       __builtin_abort ();
+     }
+   }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/peel_ind_13.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/peel_ind_13.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/peel_ind_13.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/peel_ind_13.c	Sun Aug 10 22:32:24 2025
***************
*** 0 ****
--- 1,24 ----
+ /* Known inbounds DR in VLA modes.  */
+ /* { dg-do compile } */
+ /* { dg-options "-Ofast -msve-vector-bits=scalable --param aarch64-autovec-preference=sve-only -fdump-tree-vect-details" } */
+ 
+ #define N 512
+ #define START 5
+ #define END 509
+ 
+ int x[N] __attribute__((aligned(32)));
+ 
+ int __attribute__((noipa))
+ foo (void)
+ {
+   for (signed int i = START; i < END; ++i)
+     {
+       if (x[i] == 0)
+         return i;
+     }
+   return -1;
+ }
+ 
+ /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+ /* { dg-final { scan-tree-dump-not "pfa_iv_offset" "vect" } } */
+ /* { dg-final { scan-tree-dump-not "Alignment of access forced using peeling" "vect" } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/peel_ind_13_run.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/peel_ind_13_run.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/peel_ind_13_run.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/peel_ind_13_run.c	Sun Aug 10 22:32:24 2025
***************
*** 0 ****
--- 1,15 ----
+ /* Known inbounds DR in VLA modes.  */
+ /* { dg-do run { target aarch64_sve_hw } } */
+ /* { dg-options "-Ofast -msve-vector-bits=scalable --param aarch64-autovec-preference=sve-only" } */
+ 
+ #include "peel_ind_13.c"
+ 
+ int __attribute__ ((optimize (1)))
+ main (void)
+ {
+   int res = foo ();
+   asm volatile ("");
+   if (res != START)
+     __builtin_abort ();
+   return 0;
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/pred_clobber_1.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/pred_clobber_1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/pred_clobber_1.c	Sun Aug  3 22:32:48 2025
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/pred_clobber_1.c	Sun Aug 10 22:32:24 2025
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O2 -mcpu=neoverse-n2" } */
  /* { dg-final { check-function-bodies "**" "" } } */
  
  #pragma GCC target "+sve"
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O2 -mcpu=neoverse-n2 -fdisable-rtl-combine" } */
  /* { dg-final { check-function-bodies "**" "" } } */
  
  #pragma GCC target "+sve"
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/pred_clobber_2.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/pred_clobber_2.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/pred_clobber_2.c	Sun Aug  3 22:32:48 2025
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/pred_clobber_2.c	Sun Aug 10 22:32:24 2025
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O2 -mcpu=neoverse-v2" } */
  /* { dg-final { check-function-bodies "**" "" } } */
  
  #pragma GCC target "+sve"
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O2 -mcpu=neoverse-v2 -fdisable-rtl-combine" } */
  /* { dg-final { check-function-bodies "**" "" } } */
  
  #pragma GCC target "+sve"
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/pred_clobber_3.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/pred_clobber_3.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve/pred_clobber_3.c	Sun Aug  3 22:32:48 2025
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve/pred_clobber_3.c	Sun Aug 10 22:32:24 2025
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O2 -mcpu=neoverse-v1" } */
  /* { dg-final { check-function-bodies "**" "" } } */
  
  #pragma GCC target "+sve"
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O2 -mcpu=neoverse-v1 -fdisable-rtl-combine" } */
  /* { dg-final { check-function-bodies "**" "" } } */
  
  #pragma GCC target "+sve"
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/match_4.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/match_4.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/match_4.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/match_4.c	Sun Aug 10 22:32:25 2025
***************
*** 0 ****
--- 1,30 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ svbool_t
+ test1 (svbool_t pg, svint16_t x, svint16_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svmatch (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ svbool_t
+ test2 (svbool_t pg, svint16_t x, svint16_t y)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svmatch (pg, x, y),
+ 		  svptrue_b8 ());
+ }
+ 
+ svbool_t
+ test3 (svbool_t pg, svint16_t x, svint16_t y)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svmatch (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /* { dg-final { scan-assembler-not {\tand\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/nmatch_1.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/nmatch_1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/nmatch_1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/nmatch_1.c	Sun Aug 10 22:32:25 2025
***************
*** 0 ****
--- 1,30 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ 
+ #include <arm_sve.h>
+ 
+ svbool_t
+ test1 (svbool_t pg, svint16_t x, svint16_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svnmatch (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ svbool_t
+ test2 (svbool_t pg, svint16_t x, svint16_t y)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svnmatch (pg, x, y),
+ 		  svptrue_b8 ());
+ }
+ 
+ svbool_t
+ test3 (svbool_t pg, svint16_t x, svint16_t y)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svnmatch (pg, x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /* { dg-final { scan-assembler-not {\tand\t} } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilege_1.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilege_1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilege_1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilege_1.c	Sun Aug 10 22:32:25 2025
***************
*** 0 ****
--- 1,130 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	whilege	p0\.h, w0, w1
+ **	ret
+ */
+ svbool_t
+ test1 (int32_t x, int32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svwhilege_b16 (x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	whilege	p0\.h, x0, x1
+ **	ret
+ */
+ svbool_t
+ test2 (int64_t x, int64_t y)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svwhilege_b16 (x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	whilehs	p0\.s, w0, w1
+ **	ret
+ */
+ svbool_t
+ test3 (uint32_t x, uint32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svwhilege_b32 (x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test4:
+ **	whilehs	p0\.s, x0, x1
+ **	ret
+ */
+ svbool_t
+ test4 (uint64_t x, uint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svwhilege_b32 (x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test5:
+ **	whilege	p0\.s, w0, w1
+ **	ret
+ */
+ svbool_t
+ test5 (int32_t x, int32_t y)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svwhilege_b32 (x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test6:
+ **	whilehs	p0\.s, w0, w1
+ **	ret
+ */
+ svbool_t
+ test6 (uint32_t x, uint32_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svwhilege_b32 (x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test7:
+ **	whilehs	p0\.d, w0, w1
+ **	ret
+ */
+ svbool_t
+ test7 (uint32_t x, uint32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svwhilege_b64 (x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ /*
+ ** test8:
+ **	whilege	p0\.d, x0, x1
+ **	ret
+ */
+ svbool_t
+ test8 (int64_t x, int64_t y)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svwhilege_b64 (x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test9:
+ **	whilehs	p0\.d, x0, x1
+ **	ret
+ */
+ svbool_t
+ test9 (uint64_t x, uint64_t y)
+ {
+   return svand_z (svptrue_b64 (),
+ 		  svwhilege_b64 (x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilegt_1.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilegt_1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilegt_1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilegt_1.c	Sun Aug 10 22:32:25 2025
***************
*** 0 ****
--- 1,130 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	whilegt	p0\.h, w0, w1
+ **	ret
+ */
+ svbool_t
+ test1 (int32_t x, int32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svwhilegt_b16 (x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	whilegt	p0\.h, x0, x1
+ **	ret
+ */
+ svbool_t
+ test2 (int64_t x, int64_t y)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svwhilegt_b16 (x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	whilehi	p0\.s, w0, w1
+ **	ret
+ */
+ svbool_t
+ test3 (uint32_t x, uint32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svwhilegt_b32 (x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test4:
+ **	whilehi	p0\.s, x0, x1
+ **	ret
+ */
+ svbool_t
+ test4 (uint64_t x, uint64_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svwhilegt_b32 (x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test5:
+ **	whilegt	p0\.s, w0, w1
+ **	ret
+ */
+ svbool_t
+ test5 (int32_t x, int32_t y)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svwhilegt_b32 (x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test6:
+ **	whilehi	p0\.s, w0, w1
+ **	ret
+ */
+ svbool_t
+ test6 (uint32_t x, uint32_t y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svwhilegt_b32 (x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test7:
+ **	whilehi	p0\.d, w0, w1
+ **	ret
+ */
+ svbool_t
+ test7 (uint32_t x, uint32_t y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svwhilegt_b64 (x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ /*
+ ** test8:
+ **	whilegt	p0\.d, x0, x1
+ **	ret
+ */
+ svbool_t
+ test8 (int64_t x, int64_t y)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svwhilegt_b64 (x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test9:
+ **	whilehi	p0\.d, x0, x1
+ **	ret
+ */
+ svbool_t
+ test9 (uint64_t x, uint64_t y)
+ {
+   return svand_z (svptrue_b64 (),
+ 		  svwhilegt_b64 (x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilerw_5.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilerw_5.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilerw_5.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilerw_5.c	Sun Aug 10 22:32:25 2025
***************
*** 0 ****
--- 1,130 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	whilerw	p0\.h, x0, x1
+ **	ret
+ */
+ svbool_t
+ test1 (int16_t *x, int16_t *y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svwhilerw (x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	whilerw	p0\.h, x0, x1
+ **	ret
+ */
+ svbool_t
+ test2 (uint16_t *x, uint16_t *y)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svwhilerw (x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	whilerw	p0\.s, x0, x1
+ **	ret
+ */
+ svbool_t
+ test3 (int32_t *x, int32_t *y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svwhilerw (x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test4:
+ **	whilerw	p0\.s, x0, x1
+ **	ret
+ */
+ svbool_t
+ test4 (uint32_t *x, uint32_t *y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svwhilerw (x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test5:
+ **	whilerw	p0\.s, x0, x1
+ **	ret
+ */
+ svbool_t
+ test5 (float32_t *x, float32_t *y)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svwhilerw (x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test6:
+ **	whilerw	p0\.s, x0, x1
+ **	ret
+ */
+ svbool_t
+ test6 (int32_t *x, int32_t *y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svwhilerw (x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test7:
+ **	whilerw	p0\.d, x0, x1
+ **	ret
+ */
+ svbool_t
+ test7 (int64_t *x, int64_t *y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svwhilerw (x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ /*
+ ** test8:
+ **	whilerw	p0\.d, x0, x1
+ **	ret
+ */
+ svbool_t
+ test8 (uint64_t *x, uint64_t *y)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svwhilerw (x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test9:
+ **	whilerw	p0\.d, x0, x1
+ **	ret
+ */
+ svbool_t
+ test9 (float64_t *x, float64_t *y)
+ {
+   return svand_z (svptrue_b64 (),
+ 		  svwhilerw (x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilewr_5.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilewr_5.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilewr_5.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilewr_5.c	Sun Aug 10 22:32:25 2025
***************
*** 0 ****
--- 1,130 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+ 
+ #include <arm_sve.h>
+ 
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
+ /*
+ ** test1:
+ **	whilewr	p0\.h, x0, x1
+ **	ret
+ */
+ svbool_t
+ test1 (int16_t *x, int16_t *y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svwhilewr (x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test2:
+ **	whilewr	p0\.h, x0, x1
+ **	ret
+ */
+ svbool_t
+ test2 (uint16_t *x, uint16_t *y)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svwhilewr (x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test3:
+ **	whilewr	p0\.s, x0, x1
+ **	ret
+ */
+ svbool_t
+ test3 (int32_t *x, int32_t *y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svwhilewr (x, y),
+ 		  svptrue_b16 ());
+ }
+ 
+ /*
+ ** test4:
+ **	whilewr	p0\.s, x0, x1
+ **	ret
+ */
+ svbool_t
+ test4 (uint32_t *x, uint32_t *y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svwhilewr (x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test5:
+ **	whilewr	p0\.s, x0, x1
+ **	ret
+ */
+ svbool_t
+ test5 (float32_t *x, float32_t *y)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svwhilewr (x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test6:
+ **	whilewr	p0\.s, x0, x1
+ **	ret
+ */
+ svbool_t
+ test6 (int32_t *x, int32_t *y)
+ {
+   return svand_z (svptrue_b32 (),
+ 		  svwhilewr (x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test7:
+ **	whilewr	p0\.d, x0, x1
+ **	ret
+ */
+ svbool_t
+ test7 (int64_t *x, int64_t *y)
+ {
+   return svand_z (svptrue_b8 (),
+ 		  svwhilewr (x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ /*
+ ** test8:
+ **	whilewr	p0\.d, x0, x1
+ **	ret
+ */
+ svbool_t
+ test8 (uint64_t *x, uint64_t *y)
+ {
+   return svand_z (svptrue_b16 (),
+ 		  svwhilewr (x, y),
+ 		  svptrue_b32 ());
+ }
+ 
+ /*
+ ** test9:
+ **	whilewr	p0\.d, x0, x1
+ **	ret
+ */
+ svbool_t
+ test9 (float64_t *x, float64_t *y)
+ {
+   return svand_z (svptrue_b64 (),
+ 		  svwhilewr (x, y),
+ 		  svptrue_b64 ());
+ }
+ 
+ #ifdef __cplusplus
+ }
+ #endif
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/torture/pr120986-2.c gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/torture/pr120986-2.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/aarch64/torture/pr120986-2.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/aarch64/torture/pr120986-2.c	Sun Aug 10 22:32:25 2025
***************
*** 0 ****
--- 1,7 ----
+ /* { dg-do compile } */
+ /* { dg-options "-march=armv8.2-a+sve2+fp8dot2" } */
+ #include <arm_sve.h>
+ svfloat16_t foo(svfloat16_t a, svmfloat8_t b, svmfloat8_t c)
+ {
+   return svdot_lane_fpm (a, b, c, 0, 0);
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/arm/cmse/cmse-18.c gcc-16-20250810/gcc/testsuite/gcc.target/arm/cmse/cmse-18.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/arm/cmse/cmse-18.c	Sun Aug  3 22:32:51 2025
--- gcc-16-20250810/gcc/testsuite/gcc.target/arm/cmse/cmse-18.c	Sun Aug 10 22:32:25 2025
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-mcmse -fdump-rtl-final-slim" } */
  
  typedef void (*f)(int) __attribute__((cmse_nonsecure_call));
  
--- 1,6 ----
  /* { dg-do compile } */
! /* Make sure FPCXT is not enabled.  */
! /* { dg-options "-mcmse -fdump-rtl-final -march=armv8-m.main+fp" } */
  
  typedef void (*f)(int) __attribute__((cmse_nonsecure_call));
  
*************** void bar(f func, int a)
*** 8,12 ****
    func(a);
  }
  
! /* { dg-final { scan-rtl-dump "call unspec\\\[\\\[r4:SI\\\]\\\]" "final" { target { ! arm_v8_1m_mve_ok } } } } */
! /* { dg-final { scan-rtl-dump "call unspec\\\[\\\[r\[0-7\]:SI\\\]\\\]" "final" { target { arm_v8_1m_mve_ok } } } } */
--- 9,13 ----
    func(a);
  }
  
! /* { dg-final { scan-rtl-dump "call \\\(mem:SI \\\(reg:SI 4 r4" "final" } } */
! /* { dg-final { scan-rtl-dump "UNSPEC_NONSECURE_MEM" "final" } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/arm/cmse/cmse-19.c gcc-16-20250810/gcc/testsuite/gcc.target/arm/cmse/cmse-19.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/arm/cmse/cmse-19.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/arm/cmse/cmse-19.c	Sun Aug 10 22:32:25 2025
***************
*** 0 ****
--- 1,14 ----
+ /* { dg-do compile } */
+ /* This is a duplicate of cmse-18.c, targetting arm_v8_1m_mve, to make sure
+    FPCXT is enabled.  */
+ /* { dg-options "-mcmse -fdump-rtl-final -march=armv8.1-m.main+mve" } */
+ 
+ typedef void (*f)(int) __attribute__((cmse_nonsecure_call));
+ 
+ void bar(f func, int a)
+ {
+   func(a);
+ }
+ 
+ /* { dg-final { scan-rtl-dump "call \\\(mem:SI \\\(reg/f:SI \[0-7] r\[0-7\]" "final" } } */
+ /* { dg-final { scan-rtl-dump "UNSPEC_NONSECURE_MEM" "final" } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/avr/torture/pr118591-1.c gcc-16-20250810/gcc/testsuite/gcc.target/avr/torture/pr118591-1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/avr/torture/pr118591-1.c	Sun Aug  3 22:33:04 2025
--- gcc-16-20250810/gcc/testsuite/gcc.target/avr/torture/pr118591-1.c	Sun Aug 10 22:32:26 2025
***************
*** 1,5 ****
  /* { dg-do run { target { ! avr_tiny } } } */
! /* { dg-additional-options "-std=c99 -mlra" } */
  
  __attribute__((noipa))
  void func2 (long long a1, long long a2, long b)
--- 1,5 ----
  /* { dg-do run { target { ! avr_tiny } } } */
! /* { dg-additional-options "-std=c99" } */
  
  __attribute__((noipa))
  void func2 (long long a1, long long a2, long b)
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/avr/torture/pr118591-2.c gcc-16-20250810/gcc/testsuite/gcc.target/avr/torture/pr118591-2.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/avr/torture/pr118591-2.c	Sun Aug  3 22:33:04 2025
--- gcc-16-20250810/gcc/testsuite/gcc.target/avr/torture/pr118591-2.c	Sun Aug 10 22:32:26 2025
***************
*** 1,6 ****
  /* Test case failed on avrtiny.  */
  /* { dg-do run } */
! /* { dg-additional-options "-std=c99 -mlra" } */
  
  __attribute__((noipa))
  void func2 (long a, long b)
--- 1,6 ----
  /* Test case failed on avrtiny.  */
  /* { dg-do run } */
! /* { dg-additional-options "-std=c99" } */
  
  __attribute__((noipa))
  void func2 (long a, long b)
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/i386/asm-hard-reg-2.c gcc-16-20250810/gcc/testsuite/gcc.target/i386/asm-hard-reg-2.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/i386/asm-hard-reg-2.c	Sun Aug  3 22:33:05 2025
--- gcc-16-20250810/gcc/testsuite/gcc.target/i386/asm-hard-reg-2.c	Sun Aug 10 22:32:26 2025
*************** test (void)
*** 8,14 ****
  #ifdef __x86_64__
    int z __attribute__ ((mode (TI)));
  #else
!   long z;
  #endif
  
    __asm__ __volatile__ ("" : "=A" (z), "={rbx}" (y));
--- 8,14 ----
  #ifdef __x86_64__
    int z __attribute__ ((mode (TI)));
  #else
!   long long z;
  #endif
  
    __asm__ __volatile__ ("" : "=A" (z), "={rbx}" (y));
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/i386/pr120941-1.c gcc-16-20250810/gcc/testsuite/gcc.target/i386/pr120941-1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/i386/pr120941-1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/i386/pr120941-1.c	Sun Aug 10 22:32:29 2025
***************
*** 0 ****
--- 1,49 ----
+ /* { dg-do compile } */
+ /* { dg-options "-Ofast -march=x86-64-v3" } */
+ /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
+ /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
+ 
+ /*
+ **bar:
+ **.LFB[0-9]+:
+ **...
+ **	vbroadcastsd	.LC4\(%rip\), %ymm2
+ **	leal	2\(%rbx\), %eax
+ **	vbroadcastsd	.LC2\(%rip\), %ymm4
+ **	negl	%eax
+ **...
+ */
+ 
+ extern void foo (int);
+ 
+ enum { N_CELL_ENTRIES1 = 2 }
+ typedef LBM_Grid1[64];
+ enum { N_CELL_ENTRIES2 = 2 }
+ typedef LBM_Grid2[64];
+ LBM_Grid1 grid1;
+ LBM_Grid2 grid2;
+ extern int n;
+ 
+ void
+ LBM_handleInOutFlow()
+ {
+   int i, j;
+   for (; i; i += 2)
+     {
+       for (j = 0; j < n; j++)
+ 	{
+ 	  grid1[i] = 1.0 / 36.0 * i;
+ 	  grid2[i] = 1.0 / 36.0 * i;
+ 	}
+     }
+ }
+ 
+ int main_t;
+ void
+ bar (void)
+ {
+   for (; main_t; main_t++) {
+     LBM_handleInOutFlow();
+     foo (main_t);
+   }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/i386/pr121303.c gcc-16-20250810/gcc/testsuite/gcc.target/i386/pr121303.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/i386/pr121303.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/i386/pr121303.c	Sun Aug 10 22:32:29 2025
***************
*** 0 ****
--- 1,26 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O1 -favoid-store-forwarding" } */
+ 
+ typedef struct {
+   bool is_ssa;
+ } nir_src;
+ 
+ nir_src nir_src_init;
+ 
+ typedef struct {
+   nir_src src;
+   char swizzle[6];
+ } nir_alu_src;
+ 
+ void nir_src_bit_size(nir_src);
+ 
+ void nir_lower_fb_read_instr() {
+   {
+     nir_alu_src alu_src = {nir_src_init}, src = alu_src;
+     nir_src_bit_size(src.src);
+   }
+   {
+     nir_alu_src alu_src = {nir_src_init}, src = alu_src;
+     nir_src_bit_size(src.src);
+   }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/i386/pr121410.c gcc-16-20250810/gcc/testsuite/gcc.target/i386/pr121410.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/i386/pr121410.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/i386/pr121410.c	Sun Aug 10 22:32:29 2025
***************
*** 0 ****
--- 1,11 ----
+ /* { dg-do compile } */
+ /* { dg-options "-O2 -march=x86-64 -mavx512f -mstore-max=128" } */
+ 
+ extern unsigned _BitInt(3719) a;
+ extern _BitInt(465) g;
+ void
+ foo(void)
+ {
+   _BitInt(465) b = a >> 1860;
+   g = b + b;
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/i386/pr90579.c gcc-16-20250810/gcc/testsuite/gcc.target/i386/pr90579.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/i386/pr90579.c	Sun Aug  3 22:33:06 2025
--- gcc-16-20250810/gcc/testsuite/gcc.target/i386/pr90579.c	Sun Aug 10 22:32:29 2025
***************
*** 1,5 ****
  /* { dg-do compile } */
! /* { dg-options "-O3 -mavx2 -mfpmath=sse" } */
  
  extern double r[6];
  extern double a[];
--- 1,5 ----
  /* { dg-do compile } */
! /* { dg-options "-O3 -mavx2 -mfpmath=sse -fno-pie" } */
  
  extern double r[6];
  extern double a[];
*************** loop (int k, double x)
*** 16,23 ****
    return t;
  }
  
! /* Verify we end up with scalar loads from r for the final sum.  */
! /* { dg-final { scan-assembler "vaddsd\tr\\\+40" } } */
! /* { dg-final { scan-assembler "vaddsd\tr\\\+32" } } */
! /* { dg-final { scan-assembler "vaddsd\tr\\\+24" } } */
! /* { dg-final { scan-assembler "vaddsd\tr\\\+16" } } */
--- 16,20 ----
    return t;
  }
  
! /* Verify we end up with no loads from r.  */
! /* { dg-final { scan-assembler-not "v\[ma\]\[^\t \]+\tr" } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/riscv/arch-unset-1.c gcc-16-20250810/gcc/testsuite/gcc.target/riscv/arch-unset-1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/riscv/arch-unset-1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/riscv/arch-unset-1.c	Sun Aug 10 22:32:31 2025
***************
*** 0 ****
--- 1,7 ----
+ /* { dg-do compile } */
+ /* { dg-options "-march=rv64i -march=unset -mcpu=sifive-x280 -mabi=lp64 -misa-spec=20191213" } */
+ int foo()
+ {
+ }
+ 
+ /* { dg-final { scan-assembler "\.attribute arch, \"rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_v1p0_zicsr2p0_zmmul1p0_zaamo1p0_zalrsc1p0_zfh1p0_zfhmin1p0_zca1p0_zcd1p0_zba1p0_zbb1p0_zve32f1p0_zve32x1p0_zve64d1p0_zve64f1p0_zve64x1p0_zvfh1p0_zvl128b1p0_zvl256b1p0_zvl32b1p0_zvl512b1p0_zvl64b1p0\"" } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/riscv/arch-unset-2.c gcc-16-20250810/gcc/testsuite/gcc.target/riscv/arch-unset-2.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/riscv/arch-unset-2.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/riscv/arch-unset-2.c	Sun Aug 10 22:32:31 2025
***************
*** 0 ****
--- 1,7 ----
+ /* { dg-do compile } */
+ /* { dg-options "-march=rv64i -march=unset -mcpu=sifive-x280 -march=rv64i -mabi=lp64 -misa-spec=20191213" } */
+ int foo()
+ {
+ }
+ 
+ /* { dg-final { scan-assembler "\.attribute arch, \"rv64i2p1\"" } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/riscv/arch-unset-3.c gcc-16-20250810/gcc/testsuite/gcc.target/riscv/arch-unset-3.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/riscv/arch-unset-3.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/riscv/arch-unset-3.c	Sun Aug 10 22:32:31 2025
***************
*** 0 ****
--- 1,7 ----
+ /* { dg-do compile } */
+ /* { dg-options "-march=rv64i -march=unset -mcpu=sifive-x280 -march=rv64i -march=unset -mabi=lp64 -misa-spec=20191213" } */
+ int foo()
+ {
+ }
+ 
+ /* { dg-final { scan-assembler "\.attribute arch, \"rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_v1p0_zicsr2p0_zmmul1p0_zaamo1p0_zalrsc1p0_zfh1p0_zfhmin1p0_zca1p0_zcd1p0_zba1p0_zbb1p0_zve32f1p0_zve32x1p0_zve64d1p0_zve64f1p0_zve64x1p0_zvfh1p0_zvl128b1p0_zvl256b1p0_zvl32b1p0_zvl512b1p0_zvl64b1p0\"" } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/riscv/arch-unset-4.c gcc-16-20250810/gcc/testsuite/gcc.target/riscv/arch-unset-4.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/riscv/arch-unset-4.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/riscv/arch-unset-4.c	Sun Aug 10 22:32:31 2025
***************
*** 0 ****
--- 1,7 ----
+ /* { dg-do compile } */
+ /* { dg-options "-march=rv64i -march=unset -mcpu=sifive-x280 -march=unset -march=rv64i -march=unset -march=rv64i -mabi=lp64 -misa-spec=20191213" } */
+ int foo()
+ {
+ }
+ 
+ /* { dg-final { scan-assembler "\.attribute arch, \"rv64i2p1\"" } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/riscv/arch-unset-5.c gcc-16-20250810/gcc/testsuite/gcc.target/riscv/arch-unset-5.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/riscv/arch-unset-5.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/riscv/arch-unset-5.c	Sun Aug 10 22:32:31 2025
***************
*** 0 ****
--- 1,7 ----
+ /* { dg-do compile } */
+ /* { dg-options "-march=rv64i -march=unset -mabi=lp64 -misa-spec=20191213" } */
+ int foo()
+ {
+ }
+ 
+ /* { dg-error "At least one valid -mcpu option must be given after -march=unset" "" { target { "riscv*-*-*" } } 0 } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-1-u32-from-u64.c gcc-16-20250810/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-1-u32-from-u64.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-1-u32-from-u64.c	Sun Aug  3 22:33:10 2025
--- gcc-16-20250810/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-1-u32-from-u64.c	Sun Aug 10 22:32:33 2025
***************
*** 9,11 ****
--- 9,13 ----
  DEF_SAT_U_MUL_FMT_1_WRAP(NT, WT)
  
  /* { dg-final { scan-tree-dump-times ".SAT_MUL" 1 "optimized" } } */
+ /* { dg-final { scan-assembler-not "\.L\[0-9\]+" } } */
+ /* { dg-final { scan-assembler-times "mulhu" 1 } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-1-u64-from-u128.c gcc-16-20250810/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-1-u64-from-u128.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-1-u64-from-u128.c	Sun Aug  3 22:33:10 2025
--- gcc-16-20250810/gcc/testsuite/gcc.target/riscv/sat/sat_u_mul-1-u64-from-u128.c	Sun Aug 10 22:32:33 2025
*************** DEF_SAT_U_MUL_FMT_1_WRAP(NT, WT)
*** 10,12 ****
--- 10,13 ----
  
  /* { dg-final { scan-tree-dump-times ".SAT_MUL" 1 "optimized" } } */
  /* { dg-final { scan-assembler-not "\.L\[0-9\]+" } } */
+ /* { dg-final { scan-assembler-times "mulhu" 1 } } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/s390/bitint-1.c gcc-16-20250810/gcc/testsuite/gcc.target/s390/bitint-1.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/s390/bitint-1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/s390/bitint-1.c	Sun Aug 10 22:32:33 2025
***************
*** 0 ****
--- 1,83 ----
+ /* { dg-do compile { target bitint } } */
+ /* { dg-options "-O2 -march=z9-109" } */
+ /* { dg-final { check-function-bodies "**" "" "" } } */
+ 
+ /* Verify calling convention. */
+ 
+ static_assert (sizeof (_BitInt(5)) == 1);
+ static_assert (sizeof (_BitInt(9)) == 2);
+ static_assert (sizeof (_BitInt(17)) == 4);
+ static_assert (sizeof (_BitInt(33)) == 8);
+ 
+ /*
+ ** bitint5_zero_extend_call:
+ **         lghi	%r2,22
+ **         jg	bitint5_zero_extend@PLT
+ */
+ 
+ void bitint5_zero_extend (unsigned _BitInt(5) x);
+ void bitint5_zero_extend_call (void) { bitint5_zero_extend (22wbu); }
+ 
+ /*
+ ** bitint5_sign_extend_call:
+ **         lghi	%r2,-10
+ **         jg	bitint5_sign_extend@PLT
+ */
+ 
+ void bitint5_sign_extend (_BitInt(5) x);
+ void bitint5_sign_extend_call (void) { bitint5_sign_extend (-10wb); }
+ 
+ /*
+ ** bitint9_zero_extend_call:
+ **         lghi	%r2,422
+ **         jg	bitint9_zero_extend@PLT
+ */
+ 
+ void bitint9_zero_extend (unsigned _BitInt(9) x);
+ void bitint9_zero_extend_call (void) { bitint9_zero_extend (422wbu); }
+ 
+ /*
+ ** bitint9_sign_extend_call:
+ **         lghi	%r2,-90
+ **         jg	bitint9_sign_extend@PLT
+ */
+ 
+ void bitint9_sign_extend (_BitInt(9) x);
+ void bitint9_sign_extend_call (void) { bitint9_sign_extend (-90wb); }
+ 
+ /*
+ ** bitint17_zero_extend_call:
+ **         lgfi	%r2,108198
+ **         jg	bitint17_zero_extend@PLT
+ */
+ 
+ void bitint17_zero_extend (unsigned _BitInt(17) x);
+ void bitint17_zero_extend_call (void) { bitint17_zero_extend (108198wbu); }
+ 
+ /*
+ ** bitint17_sign_extend_call:
+ **         lghi	%r2,-22874
+ **         jg	bitint17_sign_extend@PLT
+ */
+ 
+ void bitint17_sign_extend (_BitInt(17) x);
+ void bitint17_sign_extend_call (void) { bitint17_sign_extend (-22874wb); }
+ 
+ /*
+ ** bitint33_zero_extend_call:
+ **         llihl	%r2,1
+ **         oilf	%r2,2795939494
+ **         jg	bitint33_zero_extend@PLT
+ */
+ 
+ void bitint33_zero_extend (unsigned _BitInt(33) x);
+ void bitint33_zero_extend_call (void) { bitint33_zero_extend (7090906790wbu); }
+ 
+ /*
+ ** bitint33_sign_extend_call:
+ **         lgfi	%r2,-1499027802
+ **         jg	bitint33_sign_extend@PLT
+ */
+ 
+ void bitint33_sign_extend (_BitInt(33) x);
+ void bitint33_sign_extend_call (void) { bitint33_sign_extend (-1499027802wb); }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/s390/bitint-2.c gcc-16-20250810/gcc/testsuite/gcc.target/s390/bitint-2.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/s390/bitint-2.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/s390/bitint-2.c	Sun Aug 10 22:32:33 2025
***************
*** 0 ****
--- 1,32 ----
+ /* { dg-do run { target bitint } } */
+ /* { dg-options "-std=c23" } */
+ 
+ /* Verify calling convention. */
+ 
+ static_assert (sizeof (_BitInt(65)) == 16);
+ 
+ [[gnu::noipa]] void
+ bitint65_zero_extend (unsigned _BitInt(65) x)
+ {
+   static const char y[16] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+                              0xBA, 0xDC, 0x0F, 0xFE, 0xE0, 0xDD, 0xF0, 0x0D};
+   if (__builtin_memcmp (&x, y, 16) != 0)
+     __builtin_abort ();
+ }
+ 
+ [[gnu::noipa]] void
+ bitint65_sign_extend (signed _BitInt(65) x)
+ {
+   static const char y[16] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+                              0xBA, 0xDC, 0x0F, 0xFE, 0xE0, 0xDD, 0xF0, 0x0D};
+   if (__builtin_memcmp (&x, y, 16) != 0)
+     __builtin_abort ();
+ }
+ 
+ int
+ main (void)
+ {
+   bitint65_zero_extend (0x1BADC0FFEE0DDF00Dwbu);
+   bitint65_sign_extend (0x1BADC0FFEE0DDF00Dwb);
+   return 0;
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/s390/bitint-3.c gcc-16-20250810/gcc/testsuite/gcc.target/s390/bitint-3.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/s390/bitint-3.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/s390/bitint-3.c	Sun Aug 10 22:32:33 2025
***************
*** 0 ****
--- 1,28 ----
+ /* { dg-do compile { target bitint } } */
+ /* { dg-options "-march=z9-109 -fdump-rtl-expand" } */
+ 
+ /* Verify calling convention. */
+ 
+ /* { dg-final { scan-rtl-dump-times "zero_extend:DI.*reg:QI" 1 "expand" } } */
+ void bitint5_zero_extend (unsigned _BitInt(5) x);
+ void bitint5_zero_extend_call (unsigned _BitInt(5) x) { bitint5_zero_extend (x + 1); }
+ 
+ /* { dg-final { scan-rtl-dump-times "sign_extend:DI.*reg:QI" 1 "expand" } } */
+ void bitint5_sign_extend (_BitInt(5) x);
+ void bitint5_sign_extend_call (_BitInt(5) x) { bitint5_sign_extend (x + 1); }
+ 
+ /* { dg-final { scan-rtl-dump-times "zero_extend:DI.*reg:HI" 1 "expand" } } */
+ void bitint9_zero_extend (unsigned _BitInt(9) x);
+ void bitint9_zero_extend_call (unsigned _BitInt(9) x) { bitint9_zero_extend (x + 1); }
+ 
+ /* { dg-final { scan-rtl-dump-times "sign_extend:DI.*reg:HI" 1 "expand" } } */
+ void bitint9_sign_extend (_BitInt(9) x);
+ void bitint9_sign_extend_call (_BitInt(9) x) { bitint9_sign_extend (x + 1); }
+ 
+ /* { dg-final { scan-rtl-dump-times "zero_extend:DI.*reg:SI" 1 "expand" } } */
+ void bitint17_zero_extend (unsigned _BitInt(17) x);
+ void bitint17_zero_extend_call (unsigned _BitInt(17) x) { bitint17_zero_extend (x + 1); }
+ 
+ /* { dg-final { scan-rtl-dump-times "sign_extend:DI.*reg:SI" 1 "expand" } } */
+ void bitint17_sign_extend (_BitInt(17) x);
+ void bitint17_sign_extend_call (_BitInt(17) x) { bitint17_sign_extend (x + 1); }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gcc.target/s390/bitint-4.c gcc-16-20250810/gcc/testsuite/gcc.target/s390/bitint-4.c
*** gcc-16-20250803/gcc/testsuite/gcc.target/s390/bitint-4.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gcc.target/s390/bitint-4.c	Sun Aug 10 22:32:33 2025
***************
*** 0 ****
--- 1,71 ----
+ /* { dg-do compile { target bitint } } */
+ /* { dg-options "-march=z9-109 -O2" } */
+ /* { dg-final { check-function-bodies "**" "" "" } } */
+ 
+ /* Verify calling convention. */
+ 
+ struct s_bitint5 {
+   short a;
+   unsigned _BitInt(5) b;
+   char c;
+ };
+ 
+ static_assert (sizeof (struct s_bitint5) == 4);
+ 
+ /*
+ ** s_bitint5_call:
+ **         iilf	%r2,2758168
+ **         jg	s_bitint5@PLT
+ */
+ 
+ void s_bitint5 (struct s_bitint5 x);
+ void s_bitint5_call (void) { s_bitint5 ((struct s_bitint5){42, 22wbu, 24}); }
+ 
+ struct s_bitint9 {
+   short a;
+   unsigned _BitInt(9) b;
+ };
+ 
+ static_assert (sizeof (struct s_bitint9) == 4);
+ 
+ /*
+ ** s_bitint9_call:
+ **         iilf	%r2,2752934
+ **         jg	s_bitint9@PLT
+ */
+ 
+ void s_bitint9 (struct s_bitint9 x);
+ void s_bitint9_call (void) { s_bitint9 ((struct s_bitint9){42, 422wbu}); }
+ 
+ struct s_bitint17 {
+   int a;
+   unsigned _BitInt(17) b;
+ };
+ 
+ static_assert (sizeof (struct s_bitint17) == 8);
+ 
+ /*
+ ** s_bitint17_call:
+ **         llihl	%r2,42
+ **         oilf	%r2,108198
+ **         jg	s_bitint17@PLT
+ */
+ 
+ void s_bitint17 (struct s_bitint17 x);
+ void s_bitint17_call (void) { s_bitint17 ((struct s_bitint17){42, 108198wbu}); }
+ 
+ struct s_bitint33 {
+   unsigned _BitInt(33) b;
+ };
+ 
+ static_assert (sizeof (struct s_bitint33) == 8);
+ 
+ /*
+ ** s_bitint33_call:
+ **         llihl	%r2,1
+ **         oilf	%r2,2795939494
+ **         jg	s_bitint33@PLT
+ */
+ 
+ void s_bitint33 (struct s_bitint33 x);
+ void s_bitint33_call (void) { s_bitint33 ((struct s_bitint33){7090906790wbu}); }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_2.f03 gcc-16-20250810/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_2.f03
*** gcc-16-20250803/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_2.f03	Sun Aug  3 22:33:16 2025
--- gcc-16-20250810/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_2.f03	Sun Aug 10 22:32:45 2025
***************
*** 1,5 ****
  ! { dg-do run }
! ! { dg-additional-sources c_f_pointer_shape_tests_2_driver.c }
  ! Verify that the optional SHAPE parameter to c_f_pointer can be of any
  ! valid integer kind.  We don't test all kinds here since it would be 
  ! difficult to know what kinds are valid for the architecture we're running on.
--- 1,5 ----
  ! { dg-do run }
! ! { dg-additional-sources c_f_pointer_shape_tests_driver.c }
  ! Verify that the optional SHAPE parameter to c_f_pointer can be of any
  ! valid integer kind.  We don't test all kinds here since it would be 
  ! difficult to know what kinds are valid for the architecture we're running on.
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_2_driver.c gcc-16-20250810/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_2_driver.c
*** gcc-16-20250803/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_2_driver.c	Sun Aug  3 22:33:16 2025
--- gcc-16-20250810/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_2_driver.c	Thu Jan  1 00:00:00 1970
***************
*** 1,46 ****
- #define NUM_ELEMS 10
- #define NUM_ROWS 2
- #define NUM_COLS 3
- 
- void test_long_long_1d(int *array, int num_elems);
- void test_long_long_2d(int *array, int num_rows, int num_cols);
- void test_long_1d(int *array, int num_elems);
- void test_int_1d(int *array, int num_elems);
- void test_short_1d(int *array, int num_elems);
- void test_mixed(int *array, int num_elems);
- 
- int main(int argc, char **argv)
- {
-   int my_array[NUM_ELEMS];
-   int my_2d_array[NUM_ROWS][NUM_COLS];
-   int i, j;
- 
-   for(i = 0; i < NUM_ELEMS; i++)
-     my_array[i] = i;
- 
-   for(i = 0; i < NUM_ROWS; i++)
-     for(j = 0; j < NUM_COLS; j++)
-       my_2d_array[i][j] = (i*NUM_COLS) + j;
- 
-   /* Test c_f_pointer where SHAPE is of type integer, kind=c_long_long.  */
-   test_long_long_1d(my_array, NUM_ELEMS);
- 
-   /* Test c_f_pointer where SHAPE is of type integer, kind=c_long_long.  
-      The indices are transposed for Fortran.  */
-   test_long_long_2d(my_2d_array[0], NUM_COLS, NUM_ROWS);
- 
-   /* Test c_f_pointer where SHAPE is of type integer, kind=c_long.  */
-   test_long_1d(my_array, NUM_ELEMS);
- 
-   /* Test c_f_pointer where SHAPE is of type integer, kind=c_int.  */
-   test_int_1d(my_array, NUM_ELEMS);
- 
-   /* Test c_f_pointer where SHAPE is of type integer, kind=c_short.  */
-   test_short_1d(my_array, NUM_ELEMS);
- 
-   /* Test c_f_pointer where SHAPE is of type integer, kind=c_int and
- 	  kind=c_long_long.  */
-   test_mixed(my_array, NUM_ELEMS);
- 
-   return 0;
- }
--- 0 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_4.f03 gcc-16-20250810/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_4.f03
*** gcc-16-20250803/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_4.f03	Sun Aug  3 22:33:16 2025
--- gcc-16-20250810/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_4.f03	Sun Aug 10 22:32:45 2025
***************
*** 1,5 ****
  ! { dg-do run }
! ! { dg-additional-sources c_f_pointer_shape_tests_2_driver.c }
  ! Verify that the optional SHAPE parameter to c_f_pointer can be of any
  ! valid integer kind.  We don't test all kinds here since it would be 
  ! difficult to know what kinds are valid for the architecture we're running on.
--- 1,5 ----
  ! { dg-do run }
! ! { dg-additional-sources c_f_pointer_shape_tests_driver.c }
  ! Verify that the optional SHAPE parameter to c_f_pointer can be of any
  ! valid integer kind.  We don't test all kinds here since it would be 
  ! difficult to know what kinds are valid for the architecture we're running on.
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_4_driver.c gcc-16-20250810/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_4_driver.c
*** gcc-16-20250803/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_4_driver.c	Sun Aug  3 22:33:16 2025
--- gcc-16-20250810/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_4_driver.c	Thu Jan  1 00:00:00 1970
***************
*** 1,46 ****
- #define NUM_ELEMS 10
- #define NUM_ROWS 2
- #define NUM_COLS 3
- 
- void test_long_long_1d(int *array, int num_elems);
- void test_long_long_2d(int *array, int num_rows, int num_cols);
- void test_long_1d(int *array, int num_elems);
- void test_int_1d(int *array, int num_elems);
- void test_short_1d(int *array, int num_elems);
- void test_mixed(int *array, int num_elems);
- 
- int main(int argc, char **argv)
- {
-   int my_array[NUM_ELEMS];
-   int my_2d_array[NUM_ROWS][NUM_COLS];
-   int i, j;
- 
-   for(i = 0; i < NUM_ELEMS; i++)
-     my_array[i] = i;
- 
-   for(i = 0; i < NUM_ROWS; i++)
-     for(j = 0; j < NUM_COLS; j++)
-       my_2d_array[i][j] = (i*NUM_COLS) + j;
- 
-   /* Test c_f_pointer where SHAPE is of type integer, kind=c_long_long.  */
-   test_long_long_1d(my_array, NUM_ELEMS);
- 
-   /* Test c_f_pointer where SHAPE is of type integer, kind=c_long_long.  
-      The indices are transposed for Fortran.  */
-   test_long_long_2d(my_2d_array[0], NUM_COLS, NUM_ROWS);
- 
-   /* Test c_f_pointer where SHAPE is of type integer, kind=c_long.  */
-   test_long_1d(my_array, NUM_ELEMS);
- 
-   /* Test c_f_pointer where SHAPE is of type integer, kind=c_int.  */
-   test_int_1d(my_array, NUM_ELEMS);
- 
-   /* Test c_f_pointer where SHAPE is of type integer, kind=c_short.  */
-   test_short_1d(my_array, NUM_ELEMS);
- 
-   /* Test c_f_pointer where SHAPE is of type integer, kind=c_int and
- 	  kind=c_long_long.  */
-   test_mixed(my_array, NUM_ELEMS);
- 
-   return 0;
- }
--- 0 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_driver.c gcc-16-20250810/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_driver.c
*** gcc-16-20250803/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_driver.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_driver.c	Sun Aug 10 22:32:45 2025
***************
*** 0 ****
--- 1,47 ----
+ #define NUM_ELEMS 10
+ #define NUM_ROWS 2
+ #define NUM_COLS 3
+ 
+ void test_long_long_1d (int *array, int num_elems);
+ void test_long_long_2d (int *array, int num_rows, int num_cols);
+ void test_long_1d (int *array, int num_elems);
+ void test_int_1d (int *array, int num_elems);
+ void test_short_1d (int *array, int num_elems);
+ void test_mixed (int *array, int num_elems);
+ 
+ int
+ main (int argc, char **argv)
+ {
+   int my_array[NUM_ELEMS];
+   int my_2d_array[NUM_ROWS][NUM_COLS];
+   int i, j;
+ 
+   for (i = 0; i < NUM_ELEMS; i++)
+     my_array[i] = i;
+ 
+   for (i = 0; i < NUM_ROWS; i++)
+     for (j = 0; j < NUM_COLS; j++)
+       my_2d_array[i][j] = (i * NUM_COLS) + j;
+ 
+   /* Test c_f_pointer where SHAPE is of type integer, kind=c_long_long.  */
+   test_long_long_1d (my_array, NUM_ELEMS);
+ 
+   /* Test c_f_pointer where SHAPE is of type integer, kind=c_long_long.
+      The indices are transposed for Fortran.  */
+   test_long_long_2d (my_2d_array[0], NUM_COLS, NUM_ROWS);
+ 
+   /* Test c_f_pointer where SHAPE is of type integer, kind=c_long.  */
+   test_long_1d (my_array, NUM_ELEMS);
+ 
+   /* Test c_f_pointer where SHAPE is of type integer, kind=c_int.  */
+   test_int_1d (my_array, NUM_ELEMS);
+ 
+   /* Test c_f_pointer where SHAPE is of type integer, kind=c_short.  */
+   test_short_1d (my_array, NUM_ELEMS);
+ 
+   /* Test c_f_pointer where SHAPE is of type integer, kind=c_int and
+ 	  kind=c_long_long.  */
+   test_mixed (my_array, NUM_ELEMS);
+ 
+   return 0;
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gfortran.dg/generic_stmt_1.f90 gcc-16-20250810/gcc/testsuite/gfortran.dg/generic_stmt_1.f90
*** gcc-16-20250803/gcc/testsuite/gfortran.dg/generic_stmt_1.f90	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gfortran.dg/generic_stmt_1.f90	Sun Aug 10 22:32:46 2025
***************
*** 0 ****
--- 1,194 ----
+ ! { dg-do run }
+ !
+ ! Test the F2018 generic statement
+ !
+ function cg (arg1, arg2)
+   complex :: cg
+   complex, intent(in) :: arg1, arg2
+   cg = arg1 + arg2
+ end
+ 
+ module m
+   implicit none
+ 
+   type :: t
+     integer :: i
+   end type
+   integer :: tsum = 0
+ 
+   public g
+   interface g  ! Check generic statement + generic interface works
+     module procedure tg
+   end interface g
+ 
+   generic :: g => ig, rg
+   generic :: operator(.plus.) => ig, rg
+   generic, private :: h => ig, rg
+   generic :: WRITE(FORMATTED) => wtarray
+ 
+   interface g  ! Check generic statement + generic interface works
+     function cg (arg1, arg2)
+       complex :: cg
+       complex, intent(in) :: arg1, arg2
+     end
+   end interface g
+ 
+ ! Subroutines
+   generic, public :: sg => sig, srg
+ 
+ ! Check that we can mix with submodule procedures
+   interface
+     real module function realg (arg1, arg2)
+       real, intent(in) :: arg1, arg2
+     end function
+   end interface
+   generic, public :: subg => ig, realg
+ 
+ contains
+ 
+   function rg (arg1, arg2)
+     real :: rg
+     real, intent(in) :: arg1, arg2
+     rg = arg1 + arg2
+   end
+   function ig (arg1, arg2)
+     integer :: ig
+     integer, intent(in) :: arg1, arg2
+     ig = arg1 + arg2
+   end
+   function tg (arg1, arg2) result(res)
+     type(t) :: res
+     type(t), intent(in) :: arg1, arg2
+     res%i = arg1%i + arg2%i
+   end
+   subroutine srg (arg1, arg2, arg3)
+     real :: arg3
+     real, intent(in) :: arg1, arg2
+     arg3 = arg1 + arg2
+   end
+   subroutine sig (arg1, arg2, arg3)
+     integer :: arg3
+     integer, intent(in) :: arg1, arg2
+     arg3 = arg1 + arg2
+   end
+ 
+   SUBROUTINE wtarray (dtv, unit, iotype, v_list, iostat, iomsg)
+   CLASS(t), INTENT(IN)        :: dtv 
+   INTEGER, INTENT(IN)         :: unit
+   CHARACTER(*), INTENT(IN)    :: iotype
+   INTEGER, INTENT(IN)         :: v_list (:)
+   INTEGER, INTENT(OUT)        :: iostat
+   CHARACTER(*), INTENT(INOUT) :: iomsg
+     WRITE (unit, FMT=*, iostat=iostat, iomsg=iomsg) dtv%i
+   END SUBROUTINE wtarray
+ 
+   subroutine foo
+     real :: a = 1.0, b = 2.0, r
+     integer :: c = 3, d = 4
+     type(t) :: tres
+     generic :: operator(+) => tg
+ !   private in foo
+     r = h(a,b)
+     if (r /= rg(a,b)) stop 1
+     if (h(c,d) /= ig(c,d)) stop 2
+ !   operator in foo
+     r = a.plus.b
+     if (r /= rg(a,b)) stop 3
+     if ((c.plus.(2*d)) /= ig(c,2*d)) stop 4
+ !   check intrinsic operator
+     tres = t(21) + t(21)
+     if (tres%i /= 42) stop 5
+   end
+ end module m
+ 
+ submodule (m) subm
+ contains
+   real module function realg (arg1, arg2)
+     real, intent(in) :: arg1, arg2
+     realg = arg1 + arg2
+   end
+ end
+ 
+ program p
+   use m
+   implicit none
+   integer :: i, rv
+ 
+   generic :: operator(.minus.) => pig, prg
+   generic :: operator(*) => times
+   generic :: j => ig, rg
+   generic :: j => mg
+ 
+   real :: a = 1.0, b = 2.0, s3
+   integer :: c = 3, d = 4, si
+   type(t) :: t1 = t(2), t2 = t(3), tres
+   type(t) :: tarray(5) = [t(5), t(4), t(3), t(2), t(1)]
+ 
+ ! module generic in p
+   if (g(2.0*a,2.0*b) /= rg(2.0*a,2.0*b)) stop 6
+   if (g(c,d) /= ig(c,d)) stop 7
+ ! local generic in p
+   if (j(a,b) /= rg(a,b)) stop 8
+   if (j(c,d) /= ig (c,d)) stop 9
+ ! local generic in p with different number of arguments
+   if (j(c,d,-1) /= mg(c,d,-1)) stop 10
+ ! module operator in p
+   if (7*int(a.plus.b) /=  3*(c.plus.d)) stop 11
+ ! local operator in p
+   if ((a.minus.b) /= prg(a,b)) stop 12
+   if ((c.minus.d) /= pig(c,d)) stop 13
+ ! local operator in block
+   block
+     generic :: operator(.bminus.) => pig, prg
+     if ((a.bminus.b) /= prg(a,b)) stop 14
+     if ((c.bminus.d) /= pig(c,d)) stop 15
+   end block
+ ! intrinsic operator in p
+   tres = t1 * t2
+   if (tres%i /= 6) stop 16
+ ! test private interface in module
+   call foo
+ ! test mixture of GENERIC statement and generic INTERFACE
+   if (g((1.0,1.0),(2.0,2.0)) /= cg((1.0,1.0),(2.0,2.0))) stop 17
+   tres = g(t1,t2)
+   if (tres%i /= 5) stop 18
+ ! subroutines
+   call sg(10.0*a, b, s3)
+   if (int(s3) /= 12) stop 19
+   call sg(5*c, d, si)
+   if (si /= 19) stop 20
+ ! submodule procedures
+   if (subg(20.0*a,2.0*b) /= realg(20.0*a,2.0*b)) stop 21
+ ! check DTIO
+   open (10,status='scratch')
+   WRITE(10, '(DT)') tarray
+   rewind(10)
+   do i = 1,5
+     read(10, *) rv
+     tsum = tsum + rv
+   end do
+   close(10)
+   if (tsum /= 15) stop 22
+ contains
+ 
+   function pig (arg1, arg2)
+     integer :: pig
+     integer, intent(in) :: arg1, arg2
+     pig = arg1 - arg2
+   end
+   function prg (arg1, arg2)
+     real :: prg
+     real, intent(in) :: arg1, arg2
+     prg = arg1 - arg2
+   end
+   function times (arg1, arg2) result(res)
+     type(t) :: res
+     type(t), intent(in) :: arg1, arg2
+     res%i = arg1%i * arg2%i
+   end
+   function mg (arg1, arg2, arg3)
+     integer :: mg
+     integer, intent(in) :: arg1, arg2, arg3
+     mg = arg1 - arg2 * arg3
+   end
+ end
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gfortran.dg/generic_stmt_2.f90 gcc-16-20250810/gcc/testsuite/gfortran.dg/generic_stmt_2.f90
*** gcc-16-20250803/gcc/testsuite/gfortran.dg/generic_stmt_2.f90	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gfortran.dg/generic_stmt_2.f90	Sun Aug 10 22:32:46 2025
***************
*** 0 ****
--- 1,87 ----
+ ! { dg-do compile }
+ !
+ ! Test the F2018 generic statement error reporting using the module from
+ ! generic_stmt_1.f90
+ !
+ function cg (arg1, arg2)
+   complex :: cg
+   complex, intent(in) :: arg1, arg2
+   cg = arg1 + arg2
+ end
+ 
+ module m1
+   implicit none
+ 
+   type :: t
+     integer :: i
+   end type
+ 
+   public g
+   interface g  ! Check generic statement + generic interface works
+     module procedure tg
+   end interface g
+ 
+   generic, public :: g => ig             ! { dg-error "repeats that already given" }
+   generic, private :: g => rg            ! { dg-error "conflicts with that already" }
+   generic :: operator(.plus.) => ig, rg, gg ! { dg-error "did you mean|must be a FUNCTION" }
+   generic, private :: h => ig, rg
+   generic :: => ig, rg                      ! { dg-error "Malformed GENERIC statement" }
+   generic :: wron ng => ig, rg              ! { dg-error "Expected .=>." }
+   generic :: #!& => ig, rg                  ! { dg-error "Malformed GENERIC statement" }
+   generic, private :: operator(.plusplus.) => ig
+   generic, private :: operator(.plusplus.) => rg ! { dg-error "repeats the access specification" }
+   generic, PUBLIC :: operator(.plusplus.) => tg ! { dg-error "must have the same access" }
+ 
+   interface g  ! Check generic statement + generic interface works
+     function cg (arg1, arg2)
+       complex :: cg
+       complex, intent(in) :: arg1, arg2
+     end
+   end interface g
+ 
+   generic, public :: sg => sig, srg
+   generic, public :: sg2 => sig, srg, rg     ! Error appears at 'srg' declaration
+ 
+ 
+ contains
+ 
+   function rg (arg1, arg2)
+     real :: rg
+     real, intent(in) :: arg1, arg2
+     rg = arg1 + arg2
+   end
+   function ig (arg1, arg2)
+     integer :: ig
+     integer, intent(in) :: arg1, arg2
+     ig = arg1 + arg2
+   end
+   function tg (arg1, arg2) result(res)
+     type(t) :: res
+     type(t), intent(in) :: arg1, arg2
+     res%i = arg1%i + arg2%i
+   end
+   subroutine srg (arg1, arg2, arg3)         ! { dg-error "procedures must be either all SUBROUTINEs" }
+     real :: arg3
+     real, intent(in) :: arg1, arg2
+     arg3 = arg1 + arg2
+   end
+   subroutine sig (arg1, arg2, arg3)
+     integer :: arg3
+     integer, intent(in) :: arg1, arg2
+     arg3 = arg1 + arg2
+   end
+   subroutine foo
+     real :: a = 1.0, b = 2.0, r
+     integer :: c = 3, d = 4
+     generic, public :: sg => sig, srg       ! { dg-error "not in a module" }
+     generic :: operator(+) => rg            ! { dg-error "conflicts with intrinsic interface" }
+     r = h(a,d)                              ! { dg-error "There is no specific function" }
+     if (r /= rg(a,b)) stop 1
+     if (h(c,d) /= ig(c,d)) stop 2
+     generic :: wrong => ig, rg              ! { dg-error "Unexpected GENERIC statement" }
+ !   operator in foo
+     r = c.plus.b                            ! { dg-error "Unknown operator" }
+     if (r /= rg(a,b)) stop 3
+     if ((c.plus.(2*d)) /= ig(c,2*d)) stop 4
+   end
+ end module m1
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gfortran.dg/generic_stmt_3.f90 gcc-16-20250810/gcc/testsuite/gfortran.dg/generic_stmt_3.f90
*** gcc-16-20250803/gcc/testsuite/gfortran.dg/generic_stmt_3.f90	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gfortran.dg/generic_stmt_3.f90	Sun Aug 10 22:32:46 2025
***************
*** 0 ****
--- 1,96 ----
+ ! { dg-do compile }
+ !
+ ! Test the F2018 generic statement error reporting of access and name conflicts.
+ !
+ ! Contributed by Steven Kargl  <kargls@comcast.net>
+ !
+     module foo1
+ 
+        implicit none
+        private
+ 
+        public bah
+        generic :: bah => bah, bak         ! { dg-error "conflicts with that" }
+ 
+        public bar
+        generic :: bar => bah, bak         ! OK - checked that 'bar' is not a procedure
+ 
+        contains
+           integer function bah(i)
+              integer, intent(in) :: i
+              bah = i
+           end function bah
+           real function bak(x)
+              real, intent(in) :: x
+              bak = 42.5
+           end function bak
+     end module foo1
+ 
+     module foo2
+ 
+        implicit none
+        private
+ 
+        generic :: bah => bah, bak   ! { dg-error "conflicts with that" }
+        public bah
+ 
+        generic :: bar => bah, bak   ! OK - checked that 'bar' is not a procedure
+        public bar
+ 
+        contains
+           integer function bah(i)
+              integer, intent(in) :: i
+              bah = i
+           end function bah
+           real function bak(x)
+              real, intent(in) :: x
+              bak = 42.5
+           end function bak
+     end module foo2
+ 
+     module foo3                     ! { dg-error "clashes with the name of an entity" }
+ 
+        implicit none
+        private
+ 
+        integer :: bar = 10          ! { dg-error "has a type" }
+        generic :: bar => bah, bak   ! { dg-error "has a type" }
+ 
+        generic :: foo3 => bah, bak  ! { dg-error "clashes with the name of an entity" }
+ 
+        contains
+           integer function bah(i)
+              integer, intent(in) :: i
+              bah = i
+           end function bah
+           real function bak(x)
+              real, intent(in) :: x
+              bak = 42.5
+           end function bak
+     end module foo3
+ 
+     module foo4
+         implicit none
+         private
+         public bak
+ 
+         generic :: bak => bar, bah
+ 
+     contains
+         function bar(i)
+             real bar
+             integer, intent(in) :: i
+             bar = i
+         end function bar
+         function bah(x)
+             real bah
+             real, intent(in) :: x
+             bah = x
+         end function bah
+     end module foo4
+ 
+     program snooze
+         use foo4
+         print *, bak(42)   ! Public statement for 'bak' exposes the
+         print *, bak(43.5) ! specific procedures 'bar' and 'bah' here.
+     end program snooze
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gfortran.dg/generic_stmt_4.f90 gcc-16-20250810/gcc/testsuite/gfortran.dg/generic_stmt_4.f90
*** gcc-16-20250803/gcc/testsuite/gfortran.dg/generic_stmt_4.f90	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gfortran.dg/generic_stmt_4.f90	Sun Aug 10 22:32:46 2025
***************
*** 0 ****
--- 1,43 ----
+ ! { dg-do run }
+ !
+ ! Test the correct processing of public generic statements and verify that they
+ ! behave in the same way as public interfaces.
+ !
+ ! Contributed by Steven Kargl  <kargls@comcast.net>
+ !
+ module foo
+ 
+    implicit none
+ 
+    private
+    public bak1, bak2
+ 
+ 
+    generic :: bak1 => bar, bah
+ 
+    ! Should be equivalent to above.
+ 
+    interface bak2
+       module procedure bar
+       module procedure bah
+    end interface bak2
+ 
+ 
+    contains
+       function bar(i)
+          real bar
+          integer, intent(in) :: i
+          bar = i
+       end function bar
+       function bah(x)
+          real bah
+          real, intent(in) :: x
+          bah = x
+       end function bah
+ end module foo
+ 
+ program snooze
+    use foo
+    if (bak1(42) /= bak2(42)) stop 1
+    if (bak1(43.5) /= bak2(43.5)) stop 2 
+ end program snooze
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gfortran.dg/pointer_assign_16.f90 gcc-16-20250810/gcc/testsuite/gfortran.dg/pointer_assign_16.f90
*** gcc-16-20250803/gcc/testsuite/gfortran.dg/pointer_assign_16.f90	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gfortran.dg/pointer_assign_16.f90	Sun Aug 10 22:32:49 2025
***************
*** 0 ****
--- 1,25 ----
+ ! { dg-do run }
+ !
+ ! Check the span of the descriptor of an array pointer after it has been
+ ! assigned to from a polymorphic function result.
+ 
+ program test
+   implicit none
+   type t
+     integer :: c
+   end type t
+   type, extends(t) :: u
+     integer :: d
+   end type u
+   type(t), pointer :: p(:)
+   class(t), allocatable, target :: a(:)
+   p => f()
+   ! print *, p%c
+   if (any(p%c /= [2,5,11,17,23])) error stop 1
+ contains
+   function f()
+     class(t), pointer :: f(:)
+     a = [ u(2,3), u(5,7), u(11,13), u(17,19), u(23,29) ] 
+     f => a
+   end function
+ end program
diff -Nrcpad gcc-16-20250803/gcc/testsuite/gfortran.dg/pr121234.f90 gcc-16-20250810/gcc/testsuite/gfortran.dg/pr121234.f90
*** gcc-16-20250803/gcc/testsuite/gfortran.dg/pr121234.f90	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/gfortran.dg/pr121234.f90	Sun Aug 10 22:32:50 2025
***************
*** 0 ****
--- 1,28 ----
+ ! { dg-do run }
+ ! PR121234 Bogus diagnostic on READ of string with semicolon.
+   character(12) buffer,a
+   a = 'xxxxxxxxxx'
+   buffer="33;44"
+   read(buffer,*) a
+   if (a .ne. "33;44") stop 1
+   a = 'xxxxxxxxxx'
+   buffer="  ;;33 ,44 "
+   read(buffer,*,decimal="comma") a
+   if (a .ne. 'xxxxxxxxxx') stop 2 ! A null read
+   a = 'xxxxxxxxxx'
+   buffer="  ;;33 ,44 "
+   read(buffer,*,decimal="point") a
+   if (a .ne. ';;33') stop 3 ! Spaces are delimiting
+   a = 'xxxxxxxxxx'
+   buffer=";;33;,44 "
+   read(buffer,*) a
+   if (a .ne. ';;33;') stop 4 ! Comma is delimiting
+   a = 'xxxxxxxxxx'
+   buffer=";;33;44;; "
+   read(buffer,*) a
+   if (a .ne. ';;33;44;;') stop 5 ! Space is delimiting
+   a = 'xxxxxxxxxx'
+   buffer=";;33;44;;;.7"
+   read(buffer,*) a
+   if (a .ne. ';;33;44;;;.7') stop 6 ! Space is delimiting
+ end
diff -Nrcpad gcc-16-20250803/gcc/testsuite/lib/multiline.exp gcc-16-20250810/gcc/testsuite/lib/multiline.exp
*** gcc-16-20250803/gcc/testsuite/lib/multiline.exp	Sun Aug  3 22:33:22 2025
--- gcc-16-20250810/gcc/testsuite/lib/multiline.exp	Sun Aug 10 22:32:55 2025
*************** proc handle-multiline-outputs { text } {
*** 153,158 ****
--- 153,161 ----
      # If dg-enable-nn-line-numbers was provided, then obscure source-margin
      # line numbers by converting them to "NN" form.
      set text [maybe-handle-nn-line-numbers $text]
+ 
+     # Remove Windows .exe suffix
+     regsub -all "(as|cc1|cc1plus|collect2|f951|ld|lto-wrapper)\.exe?:" $text {\1:} text
      
      set index 0
      foreach entry $multiline_expected_outputs {
diff -Nrcpad gcc-16-20250803/gcc/testsuite/lib/rust.exp gcc-16-20250810/gcc/testsuite/lib/rust.exp
*** gcc-16-20250803/gcc/testsuite/lib/rust.exp	Sun Aug  3 22:33:22 2025
--- gcc-16-20250810/gcc/testsuite/lib/rust.exp	Sun Aug 10 22:32:55 2025
*************** proc rust_target_compile { source dest t
*** 168,177 ****
      global gluefile wrap_flags
      global ALWAYS_RUSTFLAGS
      global RUST_UNDER_TEST
!     global individual_timeout
! 
!     # HACK: guard against infinite loops in the compiler
!     set individual_timeout 10
  
      if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } {
  	lappend options "libs=${gluefile}"
--- 168,174 ----
      global gluefile wrap_flags
      global ALWAYS_RUSTFLAGS
      global RUST_UNDER_TEST
!     
  
      if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } {
  	lappend options "libs=${gluefile}"
diff -Nrcpad gcc-16-20250803/gcc/testsuite/libgdiagnostics.dg/test-multiple-lines.c gcc-16-20250810/gcc/testsuite/libgdiagnostics.dg/test-multiple-lines.c
*** gcc-16-20250803/gcc/testsuite/libgdiagnostics.dg/test-multiple-lines.c	Sun Aug  3 22:33:22 2025
--- gcc-16-20250810/gcc/testsuite/libgdiagnostics.dg/test-multiple-lines.c	Sun Aug 10 22:32:55 2025
*************** main ()
*** 66,71 ****
--- 66,72 ----
        |                        ~~~~~ 
     23 |                        "bar"
        |                        ~~~~~^
+       |                             ,
     24 |                        "baz"};
        |                        ~~~~~ 
     { dg-end-multiline-output "" } */
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/additional-trait-bounds2nr2.rs gcc-16-20250810/gcc/testsuite/rust/compile/additional-trait-bounds2nr2.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/additional-trait-bounds2nr2.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/additional-trait-bounds2nr2.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,5 ****
- // { dg-additional-options "-frust-name-resolution-2.0" }
- 
  #![feature(optin_builtin_traits)]
  
  pub unsafe auto trait Send {}
--- 1,3 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/all-cast.rs gcc-16-20250810/gcc/testsuite/rust/compile/all-cast.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/all-cast.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/all-cast.rs	Sun Aug 10 22:32:55 2025
*************** fn main() {
*** 4,10 ****
  
      0u32 as char; // { dg-error "cannot cast .u32. as .char., only .u8. can be cast as .char." }
  
!     let x = &[1_usize, 2] as [usize]; // { dg-error "cast to unsized type: .& .usize:CAPACITY.. as ..usize.." }
  
      let a = &0u8; // Here, `x` is a `&u8`.
      let y: u32 = a as u32; // { dg-error "casting .& u8. as .u32. is invalid" }
--- 4,10 ----
  
      0u32 as char; // { dg-error "cannot cast .u32. as .char., only .u8. can be cast as .char." }
  
!     let x = &[1_usize, 2] as [usize]; // { dg-error "cast to unsized type: .& .usize; 2.. as ..usize.." }
  
      let a = &0u8; // Here, `x` is a `&u8`.
      let y: u32 = a as u32; // { dg-error "casting .& u8. as .u32. is invalid" }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/arrays2.rs gcc-16-20250810/gcc/testsuite/rust/compile/arrays2.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/arrays2.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/arrays2.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,5 ****
- // { dg-additional-options "-w" }
  fn main() {
      let array: [i32; 5] = [1, 2, 3];
!     // { dg-error "mismatched types, expected an array with a fixed size of 5 elements, found one with 3 elements" "" { target *-*-* } .-1 }
  }
--- 1,4 ----
  fn main() {
      let array: [i32; 5] = [1, 2, 3];
!     // { dg-error "mismatched types, expected ..i32; 5.. but got ...integer.; 3.. .E0308." "" { target *-*-* } .-1 }
  }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/auto_traits2.rs gcc-16-20250810/gcc/testsuite/rust/compile/auto_traits2.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/auto_traits2.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/auto_traits2.rs	Sun Aug 10 22:32:55 2025
*************** fn foo(a: &(dyn A + Send + Sync)) {
*** 15,21 ****
  struct S;
  
  impl A for S {
!     fn a_method(&self) {} // { dg-warning "unused name" }
  }
  
  fn main() {
--- 15,21 ----
  struct S;
  
  impl A for S {
!     fn a_method(&self) {}
  }
  
  fn main() {
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/bad-rpit1.rs gcc-16-20250810/gcc/testsuite/rust/compile/bad-rpit1.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/bad-rpit1.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/bad-rpit1.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,26 ----
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ trait Foo {
+     fn id(&self) -> i32;
+ }
+ 
+ struct A;
+ struct B;
+ 
+ impl Foo for A {
+     fn id(&self) -> i32 {
+         1
+     }
+ }
+ 
+ impl Foo for B {
+     fn id(&self) -> i32 {
+         2
+     }
+ }
+ 
+ fn make_foo(cond: bool) -> impl Foo {
+     if cond { A } else { B }
+     // { dg-error "mismatched types, expected .A. but got .B. .E0308." "" { target *-*-* } .-1 }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/bug-with-default-generic.rs gcc-16-20250810/gcc/testsuite/rust/compile/bug-with-default-generic.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/bug-with-default-generic.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/bug-with-default-generic.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,15 ----
+ #[lang = "sized"]
+ pub trait Sized {}
+ 
+ pub trait MyBinaryTrait<Rhs = Self> {
+     fn do_something(&self, rhs: &Rhs);
+ }
+ 
+ struct Foo<T> {
+     // { dg-warning "struct is never constructed" "" { target *-*-* } .-1 }
+     value: T,
+ }
+ 
+ impl<T> MyBinaryTrait for Foo<T> {
+     fn do_something(&self, _rhs: &Self) {}
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/const3.rs gcc-16-20250810/gcc/testsuite/rust/compile/const3.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/const3.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/const3.rs	Sun Aug 10 22:32:55 2025
*************** fn size() -> usize {
*** 3,7 ****
  }
  
  fn main() {
!     let a = [15; size()]; // { dg-error "only functions marked as .const. are allowed to be called from constant contexts" }
  }
--- 3,7 ----
  }
  
  fn main() {
!     let a = [15; size()]; // { dg-error "calls in constants are limited to constant functions, tuple structs and tuple variants" }
  }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/const_generics_10.rs gcc-16-20250810/gcc/testsuite/rust/compile/const_generics_10.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/const_generics_10.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/const_generics_10.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,32 ----
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ const M: usize = 4;
+ 
+ struct Foo<T, const N: usize = 1> {
+     value: [T; N],
+ }
+ 
+ fn main() {
+     let foo = Foo::<i32> { value: [15] };
+     let foo = Foo::<i32, 2> { value: [15, 13] };
+     let foo: Foo<i32, 2> = Foo { value: [15, 13] };
+     let foo: Foo<i32, 2> = Foo::<i32, 2> { value: [15, 13] };
+     let foo: Foo<i32, { 1 + 1 }> = Foo { value: [15, 13] };
+     let foo = Foo::<i32, { 1 + 1 }> { value: [15, 13] };
+     let foo: Foo<i32, { 1 + 1 }> = Foo::<i32, { 1 + 1 }> { value: [15, 13] };
+     let foo: Foo<i32, M> = Foo::<i32, 4> {
+         value: [15, 13, 11, 9],
+     };
+ 
+     let invalid_foo: Foo<i32, { 1 + 1 }> = Foo::<i32, 3> { value: [15, 13] };
+     // { dg-error {mismatched types, expected ..T=i32; 3.. but got ...integer.; 2.. .E0308.} "" { target *-*-* } .-1 }
+     // { dg-error {mismatched types, expected ..T=i32; 2.. but got ..T=i32; 3.. .E0308.} "" { target *-*-* } .-2 }
+ 
+     let invalid_foo: Foo<i32, { 1 + 1 }> = Foo::<i32, M> { value: [15, 13] };
+     // { dg-error {mismatched types, expected ..T=i32; 4.. but got ...integer.; 2.. .E0308.} "" { target *-*-* } .-1 }
+     // { dg-error {mismatched types, expected ..T=i32; 2.. but got ..T=i32; 4.. .E0308.} "" { target *-*-* } .-2 }
+ 
+     let invalid_foo: Foo<i32> = Foo::<i32, 2> { value: [15, 13] };
+     // { dg-error {mismatched types, expected ..T=i32; 1.. but got ..T=i32; 2.. .E0308.} "" { target *-*-* } .-1 }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/const_generics_11.rs gcc-16-20250810/gcc/testsuite/rust/compile/const_generics_11.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/const_generics_11.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/const_generics_11.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,14 ----
+ // { dg-options "-w" }
+ 
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ struct Matrix<T, const ROWS: usize, const COLS: usize> {
+     data: [[T; COLS]; ROWS],
+ }
+ 
+ fn main() {
+     let _: Matrix<u8, 2, 3> = Matrix {
+         data: [[1, 2, 3], [4, 5, 6]],
+     };
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/const_generics_12.rs gcc-16-20250810/gcc/testsuite/rust/compile/const_generics_12.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/const_generics_12.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/const_generics_12.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,14 ----
+ // { dg-options "-w" }
+ 
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ const BASE: usize = 2;
+ 
+ struct Foo<T, const N: usize> {
+     data: [T; N],
+ }
+ 
+ fn main() {
+     let _ = Foo::<u8, { BASE + 1 * 2 }> { data: [0; 4] };
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/const_generics_13.rs gcc-16-20250810/gcc/testsuite/rust/compile/const_generics_13.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/const_generics_13.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/const_generics_13.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,11 ----
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ struct Foo<T, const N: usize> {
+     value: [T; N],
+ }
+ 
+ fn main() {
+     let foo: Foo<_, _>;
+     // { dg-error {type provided when a constant was expected .E0747.} "" { target *-*-* } .-1 }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/const_generics_14.rs gcc-16-20250810/gcc/testsuite/rust/compile/const_generics_14.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/const_generics_14.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/const_generics_14.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,13 ----
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ type MyLen = usize;
+ struct Foo<T, const N: usize> {
+     data: [T; N],
+ }
+ 
+ fn main() {
+     let _ = Foo::<u8, MyLen> { data: [1, 2, 3] };
+     // { dg-error {type provided when a constant was expected .E0747.} "" { target *-*-* } .-1 }
+     // { dg-error {expected an ADT type for constructor} "" { target *-*-* } .-2 }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/const_generics_15.rs gcc-16-20250810/gcc/testsuite/rust/compile/const_generics_15.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/const_generics_15.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/const_generics_15.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,16 ----
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ enum Foo<const N: usize> {
+     A([u8; N]),
+ }
+ 
+ union Bar<const N: usize> {
+     a: [i32; N],
+     b: [u8; N],
+ }
+ 
+ fn main() {
+     let _ = Foo::<4>::A([1, 2, 3, 4]);
+     let _ = Bar::<4> { a: [0; 4] };
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/const_generics_16.rs gcc-16-20250810/gcc/testsuite/rust/compile/const_generics_16.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/const_generics_16.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/const_generics_16.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,10 ----
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ struct Foo<T = u8, const N: usize = 4> {
+     data: [T; N], // { dg-warning "field is never read: .data." }
+ }
+ 
+ fn main() {
+     let _x = Foo { data: [1, 2, 3, 4] };
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/const_generics_3.rs gcc-16-20250810/gcc/testsuite/rust/compile/const_generics_3.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/const_generics_3.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/const_generics_3.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,28 ****
- // { dg-additional-options "-w -frust-name-resolution-2.0" }
- 
  #[lang = "sized"]
  trait Sized {}
  
  const M: usize = 4;
  
  struct Foo<T, const N: usize = 1> {
!     value: [T; N],
  }
  
  fn main() {
!     let foo = Foo::<i32> { value: [15] };
!     let foo = Foo::<i32, 2> { value: [15, 13] };
!     let foo: Foo<i32, 2> = Foo { value: [15, 13] };
!     let foo: Foo<i32, 2> = Foo::<i32, 2> { value: [15, 13] };
!     let foo: Foo<i32, { 1 + 1 }> = Foo { value: [15, 13] };
!     let foo = Foo::<i32, { 1 + 1 }> { value: [15, 13] };
!     let foo: Foo<i32, { 1 + 1 }> = Foo::<i32, { 1 + 1 }> { value: [15, 13] };
!     let foo: Foo<i32, M> = Foo::<i32, 4> {
          value: [15, 13, 11, 9],
      };
- 
-     // FIXME: Add proper const typecheck errors here
-     let invalid_foo: Foo<i32, { 1 + 1 }> = Foo::<i32, 3> { value: [15, 13] };
-     let invalid_foo: Foo<i32, { 1 + 1 }> = Foo::<i32, M> { value: [15, 13] };
-     let invalid_foo: Foo<i32> = Foo::<i32, 2> { value: [15, 13] };
  }
--- 1,21 ----
  #[lang = "sized"]
  trait Sized {}
  
  const M: usize = 4;
  
  struct Foo<T, const N: usize = 1> {
!     value: [T; N], // { dg-warning "field is never read: .value." }
  }
  
  fn main() {
!     let _foo = Foo::<i32> { value: [15] };
!     let _foo = Foo::<i32, 2> { value: [15, 13] };
!     let _foo: Foo<i32, 2> = Foo { value: [15, 13] };
!     let _foo: Foo<i32, 2> = Foo::<i32, 2> { value: [15, 13] };
!     let _foo: Foo<i32, { 1 + 1 }> = Foo { value: [15, 13] };
!     let _foo = Foo::<i32, { 1 + 1 }> { value: [15, 13] };
!     let _foo: Foo<i32, { 1 + 1 }> = Foo::<i32, { 1 + 1 }> { value: [15, 13] };
!     let _foo: Foo<i32, M> = Foo::<i32, 4> {
          value: [15, 13, 11, 9],
      };
  }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/const_generics_5.rs gcc-16-20250810/gcc/testsuite/rust/compile/const_generics_5.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/const_generics_5.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/const_generics_5.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,4 ****
- // { dg-options "-w" }
  struct Foo<const N: usize = { 14 }>;
  
  const M: usize = 15;
--- 1,3 ----
*************** fn main() {
*** 8,12 ****
      let _: Foo<15> = Foo;
      let _: Foo<{ M }> = Foo;
      let _: Foo<M> = Foo;
!     // let _: Foo<N> = Foo; this causes an ICE we need to do const generics
  }
--- 7,12 ----
      let _: Foo<15> = Foo;
      let _: Foo<{ M }> = Foo;
      let _: Foo<M> = Foo;
!     let _: Foo<N> = Foo;
!     // { dg-error {type provided when a constant was expected .E0747.} "" { target *-*-* } .-1 }
  }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/const_generics_8.rs gcc-16-20250810/gcc/testsuite/rust/compile/const_generics_8.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/const_generics_8.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/const_generics_8.rs	Sun Aug 10 22:32:55 2025
*************** type Bipboupe<const N: i32 = 15> = Bidul
*** 9,20 ****
  trait Fooable<const N: i32 = 15> {}
  
  union Bidoulepe<const N: i32 = 15> {
-     // { dg-error "default values for const generic parameters are not allowed in .union. items"  "" {target *-*-* } .-1 }
      int: i32,
      float: f32,
  }
  
! fn const_default<const N: i32 = 15>() {} // { dg-error "default values for const generic parameters are not allowed in .function. items" }
  
  // Note - missing generic parameter - needs name resolution on const generics
! impl<const N: i32 = 15> Bidule {} // { dg-error "default values for const generic parameters are not allowed in .impl. items" }
--- 9,21 ----
  trait Fooable<const N: i32 = 15> {}
  
  union Bidoulepe<const N: i32 = 15> {
      int: i32,
      float: f32,
  }
  
! fn const_default<const N: i32 = 15>() {} // { dg-error "default values for const generic parameters are not allowed here" }
  
  // Note - missing generic parameter - needs name resolution on const generics
! impl<const N: i32 = 15> Bidule {}
! // { dg-error "default values for const generic parameters are not allowed here"   "" {target *-*-* } .-1 }
! // { dg-error "unconstrained type parameter"  "" {target *-*-* } .-2 }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/const_generics_9.rs gcc-16-20250810/gcc/testsuite/rust/compile/const_generics_9.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/const_generics_9.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/const_generics_9.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,13 ----
+ // { dg-options "-w" }
+ 
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ struct ArrayWrapper<T, const N: usize> {
+     data: [T; N],
+ }
+ 
+ pub fn test() -> [u8; 4] {
+     let a = ArrayWrapper { data: [1u8; 4] };
+     a.data
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/deferred_const_inference.rs gcc-16-20250810/gcc/testsuite/rust/compile/deferred_const_inference.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/deferred_const_inference.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/deferred_const_inference.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,7 ----
+ // { dg-additional-options "-frust-compile-until=typecheck" }
+ 
+ // #![feature(generic_arg_infer)]
+ 
+ fn main() {
+     let a: [u32; _] = [15u32];
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/derive-debug1.rs gcc-16-20250810/gcc/testsuite/rust/compile/derive-debug1.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/derive-debug1.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/derive-debug1.rs	Sun Aug 10 22:32:55 2025
*************** mod core {
*** 23,37 ****
      }
  }
  
! #[derive(Debug)] // { dg-warning "unused name" }
  // { dg-warning "stub implementation" "" { target *-*-* } .-1 }
  struct Foo { a: i32, b: i64 } // { dg-warning "is never constructed" }
  
! #[derive(Debug)] // { dg-warning "unused name" }
  // { dg-warning "stub implementation" "" { target *-*-* } .-1 }
  struct Bar(i32, i32); // { dg-warning "is never constructed" }
  
! #[derive(Debug)] // { dg-warning "unused name" }
  // { dg-warning "stub implementation" "" { target *-*-* } .-1 }
  enum Baz {
      A,
--- 23,37 ----
      }
  }
  
! #[derive(Debug)]
  // { dg-warning "stub implementation" "" { target *-*-* } .-1 }
  struct Foo { a: i32, b: i64 } // { dg-warning "is never constructed" }
  
! #[derive(Debug)]
  // { dg-warning "stub implementation" "" { target *-*-* } .-1 }
  struct Bar(i32, i32); // { dg-warning "is never constructed" }
  
! #[derive(Debug)]
  // { dg-warning "stub implementation" "" { target *-*-* } .-1 }
  enum Baz {
      A,
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/derive_macro1.rs gcc-16-20250810/gcc/testsuite/rust/compile/derive_macro1.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/derive_macro1.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/derive_macro1.rs	Sun Aug 10 22:32:55 2025
*************** pub trait Clone {
*** 7,13 ****
  }
  
  // This warning can be removed once we properly handle implems with #[automatically_derived]
! #[derive(Clone)] // { dg-warning "unused name .self." }
  pub struct S;
  
  fn main() {
--- 7,13 ----
  }
  
  // This warning can be removed once we properly handle implems with #[automatically_derived]
! #[derive(Clone)]
  pub struct S;
  
  fn main() {
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/derive_partial_ord1.rs gcc-16-20250810/gcc/testsuite/rust/compile/derive_partial_ord1.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/derive_partial_ord1.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/derive_partial_ord1.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,464 ----
+ // { dg-additional-options "-w" }
+ 
+ #![feature(intrinsics)]
+ 
+ mod core {
+     mod option {
+         // #[rustc_diagnostic_item = "option_type"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub enum Option<T> {
+             /// No value
+             #[lang = "None"]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             None,
+             /// Some value `T`
+             #[lang = "Some"]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+         }
+     }
+ 
+     mod marker {
+         #[lang = "phantom_data"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub struct PhantomData<T: ?Sized>;
+ 
+         #[unstable(feature = "structural_match", issue = "31434")]
+         // #[rustc_on_unimplemented(message = "the type `{Self}` does not `#[derive(PartialEq)]`")]
+         #[lang = "structural_peq"]
+         pub trait StructuralPartialEq {
+             // Empty.
+         }
+ 
+         #[unstable(feature = "structural_match", issue = "31434")]
+         // #[rustc_on_unimplemented(message = "the type `{Self}` does not `#[derive(Eq)]`")]
+         #[lang = "structural_teq"]
+         pub trait StructuralEq {
+             // Empty.
+         }
+ 
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[lang = "sized"]
+         // #[rustc_on_unimplemented(
+         //     message = "the size for values of type `{Self}` cannot be known at compilation time",
+         //     label = "doesn't have a size known at compile-time"
+         // )]
+         // #[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
+         // #[rustc_specialization_trait]
+         pub trait Sized {
+             // Empty.
+         }
+     }
+ 
+     mod cmp {
+         use super::marker::Sized;
+         use super::option::Option;
+ 
+         // #[derive(Clone, Copy, PartialEq, Debug, Hash)]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub enum Ordering {
+             /// An ordering where a compared value is less than another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Less = -1,
+             /// An ordering where a compared value is equal to another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Equal = 0,
+             /// An ordering where a compared value is greater than another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Greater = 1,
+         }
+ 
+         #[lang = "eq"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[doc(alias = "==")]
+         #[doc(alias = "!=")]
+         // #[rustc_on_unimplemented(
+         //     message = "can't compare `{Self}` with `{Rhs}`",
+         //     label = "no implementation for `{Self} == {Rhs}`"
+         // )]
+         pub trait PartialEq<Rhs: ?Sized = Self> {
+             /// This method tests for `self` and `other` values to be equal, and is used
+             /// by `==`.
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn eq(&self, other: &Rhs) -> bool;
+ 
+             fn ne(&self, other: &Rhs) -> bool {
+                 !self.eq(other)
+             }
+         }
+ 
+         #[doc(alias = "==")]
+         #[doc(alias = "!=")]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub trait Eq: PartialEq<Self> {
+             // this method is used solely by #[deriving] to assert
+             // that every component of a type implements #[deriving]
+             // itself, the current deriving infrastructure means doing this
+             // assertion without using a method on this trait is nearly
+             // impossible.
+             //
+             // This should never be implemented by hand.
+             #[doc(hidden)]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn assert_receiver_is_total_eq(&self) {}
+         }
+ 
+         #[lang = "partial_ord"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[doc(alias = ">")]
+         #[doc(alias = "<")]
+         #[doc(alias = "<=")]
+         #[doc(alias = ">=")]
+         // #[rustc_on_unimplemented(
+         //     message = "can't compare `{Self}` with `{Rhs}`",
+         //     label = "no implementation for `{Self} < {Rhs}` and `{Self} > {Rhs}`"
+         // )]
+         pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
+             /// This method returns an ordering between `self` and `other` values if one exists.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// use std::cmp::Ordering;
+             ///
+             /// let result = 1.0.partial_cmp(&2.0);
+             /// assert_eq!(result, Some(Ordering::Less));
+             ///
+             /// let result = 1.0.partial_cmp(&1.0);
+             /// assert_eq!(result, Some(Ordering::Equal));
+             ///
+             /// let result = 2.0.partial_cmp(&1.0);
+             /// assert_eq!(result, Some(Ordering::Greater));
+             /// ```
+             ///
+             /// When comparison is impossible:
+             ///
+             /// ```
+             /// let result = f64::NAN.partial_cmp(&1.0);
+             /// assert_eq!(result, None);
+             /// ```
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn partial_cmp(&self, other: &Rhs) -> Option<Ordering>;
+ 
+             /// This method tests less than (for `self` and `other`) and is used by the `<` operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 < 2.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 < 1.0;
+             /// assert_eq!(result, false);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn lt(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Less) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests less than or equal to (for `self` and `other`) and is used by the `<=`
+             /// operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 <= 2.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 <= 2.0;
+             /// assert_eq!(result, true);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn le(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Less | Ordering::Equal) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests greater than (for `self` and `other`) and is used by the `>` operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 > 2.0;
+             /// assert_eq!(result, false);
+             ///
+             /// let result = 2.0 > 2.0;
+             /// assert_eq!(result, false);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn gt(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Greater) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests greater than or equal to (for `self` and `other`) and is used by the `>=`
+             /// operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 2.0 >= 1.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 >= 2.0;
+             /// assert_eq!(result, true);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn ge(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Greater | Ordering::Equal) => true,
+                     _ => false,
+                 }
+             }
+         }
+ 
+         #[doc(alias = "<")]
+         #[doc(alias = ">")]
+         #[doc(alias = "<=")]
+         #[doc(alias = ">=")]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub trait Ord: Eq + PartialOrd<Self> {
+             /// This method returns an [`Ordering`] between `self` and `other`.
+             ///
+             /// By convention, `self.cmp(&other)` returns the ordering matching the expression
+             /// `self <operator> other` if true.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// use std::cmp::Ordering;
+             ///
+             /// assert_eq!(5.cmp(&10), Ordering::Less);
+             /// assert_eq!(10.cmp(&5), Ordering::Greater);
+             /// assert_eq!(5.cmp(&5), Ordering::Equal);
+             /// ```
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn cmp(&self, other: &Self) -> Ordering;
+ 
+             /// Compares and returns the maximum of two values.
+             ///
+             /// Returns the second argument if the comparison determines them to be equal.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// assert_eq!(2, 1.max(2));
+             /// assert_eq!(2, 2.max(2));
+             /// ```
+             #[stable(feature = "ord_max_min", since = "1.21.0")]
+             #[must_use]
+             fn max(self, other: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 self
+             }
+ 
+             /// Compares and returns the minimum of two values.
+             ///
+             /// Returns the first argument if the comparison determines them to be equal.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// assert_eq!(1, 1.min(2));
+             /// assert_eq!(2, 2.min(2));
+             /// ```
+             #[stable(feature = "ord_max_min", since = "1.21.0")]
+             #[must_use]
+             fn min(self, other: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 self
+             }
+ 
+             /// Restrict a value to a certain interval.
+             ///
+             /// Returns `max` if `self` is greater than `max`, and `min` if `self` is
+             /// less than `min`. Otherwise this returns `self`.
+             ///
+             /// # Panics
+             ///
+             /// Panics if `min > max`.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// #![feature(clamp)]
+             ///
+             /// assert!((-3).clamp(-2, 1) == -2);
+             /// assert!(0.clamp(-2, 1) == 0);
+             /// assert!(2.clamp(-2, 1) == 1);
+             /// ```
+             #[must_use]
+             #[unstable(feature = "clamp", issue = "44095")]
+             fn clamp(self, min: Self, max: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 if self < min {
+                     min
+                 } else if self > max {
+                     max
+                 } else {
+                     self
+                 }
+             }
+         }
+     }
+ 
+     pub mod intrinsics {
+         #[lang = "discriminant_kind"]
+         pub trait DiscriminantKind {
+             #[lang = "discriminant_type"]
+             type Discriminant;
+         }
+ 
+         extern "rust-intrinsic" {
+             pub fn discriminant_value<T>(v: &T) -> <T as DiscriminantKind>::Discriminant;
+         }
+     }
+ }
+ 
+ use core::cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd};
+ use core::marker::Sized;
+ use core::option::Option;
+ 
+ // for comparing discriminant_value
+ impl PartialEq for isize {
+     fn eq(&self, other: &Self) -> bool {
+         *self == *other
+     }
+ }
+ 
+ // for comparing discriminant_value
+ impl PartialOrd for isize {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         if *self > *other {
+             Option::Some(Ordering::Greater)
+         } else if *self < *other {
+             Option::Some(Ordering::Less)
+         } else {
+             Option::Some(Ordering::Equal)
+         }
+     }
+ 
+     fn lt(&self, other: &Self) -> bool {
+         *self < *other
+     }
+     fn le(&self, other: &Self) -> bool {
+         *self <= *other
+     }
+     fn ge(&self, other: &Self) -> bool {
+         *self >= *other
+     }
+     fn gt(&self, other: &Self) -> bool {
+         *self > *other
+     }
+ }
+ 
+ impl PartialEq for i32 {
+     fn eq(&self, other: &Self) -> bool {
+         *self == *other
+     }
+ }
+ 
+ impl PartialOrd for i32 {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         if *self > *other {
+             Option::Some(Ordering::Greater)
+         } else if *self < *other {
+             Option::Some(Ordering::Less)
+         } else {
+             Option::Some(Ordering::Equal)
+         }
+     }
+ 
+     fn lt(&self, other: &Self) -> bool {
+         *self < *other
+     }
+     fn le(&self, other: &Self) -> bool {
+         *self <= *other
+     }
+     fn ge(&self, other: &Self) -> bool {
+         *self >= *other
+     }
+     fn gt(&self, other: &Self) -> bool {
+         *self > *other
+     }
+ }
+ 
+ impl Ord for i32 {
+     fn cmp(&self, other: &Self) -> Ordering {
+         if *self > *other {
+             Ordering::Greater
+         } else if *self < *other {
+             Ordering::Less
+         } else {
+             Ordering::Equal
+         }
+     }
+ }
+ 
+ impl Eq for i32 {}
+ 
+ #[derive(PartialEq, PartialOrd)]
+ enum Foo {
+     A,
+     B(i32, i32, i32),
+     C { inner: i32, outer: i32 },
+ }
+ 
+ #[derive(Ord, PartialOrd, PartialEq, Eq)]
+ struct Bar {
+     a: i32,
+ }
+ 
+ #[derive(Ord, PartialOrd, PartialEq, Eq)]
+ struct BarFull {
+     a: i32,
+     b: i32,
+     c: i32,
+     d: i32,
+ }
+ 
+ extern "C" {
+     fn puts(s: *const i8);
+ }
+ 
+ fn print(s: &str) {
+     unsafe {
+         puts(s as *const str as *const i8);
+     }
+ }
+ 
+ fn main() {
+     let a = Foo::A;
+     let b = Foo::B(15, 14, 13);
+ 
+     match a.partial_cmp(&b) {
+         Option::Some(Ordering::Less) => print("less"),
+         Option::Some(Ordering::Greater) => print("greater"),
+         Option::Some(Ordering::Equal) => print("equal"),
+         _ => print("uuuuh woops lol"),
+     }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/enum_variant_name.rs gcc-16-20250810/gcc/testsuite/rust/compile/enum_variant_name.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/enum_variant_name.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/enum_variant_name.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,4 ****
! // { dg-additional-options "-w -frust-name-resolution-2.0" }
  struct E1;
  
  enum Test {
--- 1,4 ----
! // { dg-additional-options "-w" }
  struct E1;
  
  enum Test {
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/format_args_basic_expansion.rs gcc-16-20250810/gcc/testsuite/rust/compile/format_args_basic_expansion.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/format_args_basic_expansion.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/format_args_basic_expansion.rs	Sun Aug 10 22:32:55 2025
*************** pub mod core {
*** 35,41 ****
  
          impl Display for i32 {
              fn fmt(&self, _: &mut Formatter) -> Result {
-                 // { dg-warning "unused name .self." "" { target *-*-* } .-1 }
                  Result
              }
          }
--- 35,40 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/format_args_extra_comma.rs gcc-16-20250810/gcc/testsuite/rust/compile/format_args_extra_comma.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/format_args_extra_comma.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/format_args_extra_comma.rs	Sun Aug 10 22:32:55 2025
*************** pub mod core {
*** 35,41 ****
  
          impl Display for i32 {
              fn fmt(&self, _: &mut Formatter) -> Result {
-                 // { dg-warning "unused name .self." "" { target *-*-* } .-1 }
                  Result
              }
          }
--- 35,40 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/generics8.rs gcc-16-20250810/gcc/testsuite/rust/compile/generics8.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/generics8.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/generics8.rs	Sun Aug 10 22:32:55 2025
*************** pub trait Sized {}
*** 4,10 ****
  struct Foo<A, B>(A, B);
  
  impl<T> Foo<i32, T> {
!     fn test(a: T) -> T {
          a
      }
  }
--- 4,10 ----
  struct Foo<A, B>(A, B);
  
  impl<T> Foo<i32, T> {
!     fn test(a: T) -> T { // { dg-error "duplicate definitions with name .test." }
          a
      }
  }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/generics9.rs gcc-16-20250810/gcc/testsuite/rust/compile/generics9.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/generics9.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/generics9.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,4 ****
- // { dg-additional-options "-frust-name-resolution-2.0" }
  struct Foo<A, B = (A, B)>(A, B);
  // { dg-error "type parameters with a default cannot use forward declared identifiers" "" { target *-*-* } .-1 }
  
--- 1,3 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/glob_import_enum.rs gcc-16-20250810/gcc/testsuite/rust/compile/glob_import_enum.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/glob_import_enum.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/glob_import_enum.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,16 ----
+ use self::Ordering::*;
+ use Ordering::*;
+ 
+ enum Ordering {
+     A,
+     B,
+ }
+ 
+ fn foo(_: Ordering) {}
+ 
+ fn main() {
+     let a = A;
+ 
+     foo(a);
+     foo(B);
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/impl_trait_diag.rs gcc-16-20250810/gcc/testsuite/rust/compile/impl_trait_diag.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/impl_trait_diag.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/impl_trait_diag.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,17 ----
+ #[lang = "sized"]
+ pub trait Sized {}
+ 
+ trait Foo {
+     fn method(&self);
+ }
+ 
+ struct Bar;
+ impl Foo for Bar {}
+ 
+ fn main() {
+     let x: impl Foo = Bar; // { dg-error ".impl Trait. not allowed outside of function and inherent method return types .E0562." }
+ 
+     struct Wrapper {
+         field: impl Foo, // { dg-error ".impl Trait. not allowed outside of function and inherent method return types .E0562." }
+     }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/impl_trait_generic_arg.rs gcc-16-20250810/gcc/testsuite/rust/compile/impl_trait_generic_arg.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/impl_trait_generic_arg.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/impl_trait_generic_arg.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,24 ----
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ trait Foo {
+     fn id(&self) -> u8;
+ }
+ 
+ struct Bar;
+ 
+ impl Foo for Bar {
+     fn id(&self) -> u8 {
+         1
+     }
+ }
+ 
+ fn takes(val: impl Foo) -> u8 {
+     val.id()
+ }
+ 
+ fn main() {
+     let b = Bar;
+     let x = takes::<Bar>(b);
+     // { dg-error "cannot provide explicit generic arguments when .impl Trait. is used in argument position .E0632." "" { target *-*-* } .-1 }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/invalid_label_name.rs gcc-16-20250810/gcc/testsuite/rust/compile/invalid_label_name.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/invalid_label_name.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/invalid_label_name.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,4 ****
- // { dg-additional-options "-frust-name-resolution-2.0" }
  pub fn function() {
      'continue: loop {
          // { dg-error "invalid label name .'continue." "" { target *-*-* } .-1 }
--- 1,3 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-1048.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-1048.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-1048.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-1048.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,8 ----
+ macro_rules! maybe_return { ($e:expr) => ($e); }
+ 
+ fn frob(x: i32) -> i32{
+     maybe_return! {x}
+     // { dg-error "mismatched types. expected .... but got .i32. .E0308." "" { target *-*-* } .-1 }
+     // should return -1 
+     -1
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-1485.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-1485.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-1485.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-1485.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,16 ----
+ #[lang = "sized"]
+ pub trait Sized {}
+ 
+ #[lang = "fn_once"]
+ pub trait FnOnce<Args> {
+     #[lang = "fn_once_output"]
+     type Output;
+ 
+     extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
+ }
+ 
+ struct BinOpInvalid {
+     lhs: i32,
+     rhs: i32,
+     f: impl FnOnce(i32) -> i32, // { dg-error ".impl Trait. not allowed outside of function and inherent method return types .E0562." }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-1487.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-1487.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-1487.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-1487.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,15 ----
+ // { dg-options "-w" }
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ trait Printable {
+     fn print(&self);
+ }
+ 
+ struct Foo;
+ 
+ impl Printable for Foo {
+     fn print(&self) {}
+ }
+ 
+ fn take_printable(_: impl Printable) {}
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-2015.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-2015.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-2015.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-2015.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,4 ****
! // { dg-additional-options "-frust-compile-until=lowering" }
  
  macro_rules! impl_foo {
  	() => { impl Foo }
--- 1,5 ----
! #[lang = "sized"]
! trait Sized {}
  
  macro_rules! impl_foo {
  	() => { impl Foo }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-2043.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-2043.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-2043.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-2043.rs	Sun Aug 10 22:32:55 2025
*************** struct Foo<'a> {
*** 6,12 ****
  impl<'a> Foo<'a> {
      fn bar(self: &mut Foo<'a>) {}
      // { dg-warning "associated function is never used: .bar." "" { target *-*-* } .-1 }
-     // { dg-warning "unused name .self." "" { target *-*-* } .-2 }
  }
  
  fn main() {}
--- 6,11 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-2166.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-2166.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-2166.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-2166.rs	Sun Aug 10 22:32:55 2025
*************** impl Add for u32 {
*** 11,17 ****
      type Output = u32;
  
      fn add(self) -> u32 {
-         // { dg-warning "unused name" "" { target *-*-* } .-1 }
          0
      }
  }
--- 11,16 ----
*************** impl<'a> Add for &'a u32 {
*** 20,26 ****
      type Output = u32;
  
      fn add(self) -> <u32 as Add>::Output {
-         // { dg-warning "unused name" "" { target *-*-* } .-1 }
          0
      }
  }
--- 19,24 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-2238.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-2238.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-2238.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-2238.rs	Sun Aug 10 22:32:55 2025
*************** fn main() {
*** 10,16 ****
  
      impl Bar for Foo {
          fn foo(&self) {}
-         // { dg-warning "unused name" "" { target *-*-* } .-1 }
      }
  
      let s = Foo;
--- 10,15 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-2680.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-2680.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-2680.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-2680.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,6 ----
+ // { dg-additional-options "-fdump-tree-gimple" }
+ pub fn test_cast() {
+     let i = 1;
+     // { dg-final { scan-tree-dump-times {const i32 i;} 1 gimple } }
+     let _j = i as i64;
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-2907.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-2907.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-2907.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-2907.rs	Sun Aug 10 22:32:55 2025
*************** impl<B: Bar> Foo for B {
*** 15,21 ****
      type Ty = u32;
  
      fn foo(self) -> Self::Ty {
-         // { dg-warning "unused name" "" { target *-*-* } .-1 }
          14
      }
  }
--- 15,20 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-3144.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-3144.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-3144.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-3144.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,29 ----
+ #[lang = "sized"]
+ pub trait Sized {}
+ 
+ #[lang = "copy"]
+ trait Copy {}
+ 
+ #[lang = "clone"]
+ pub trait Clone {
+     fn clone(&self) -> Self;
+ }
+ 
+ impl Clone for i32 {
+     fn clone(&self) -> i32 {
+         *self
+     }
+ }
+ 
+ struct S {}
+ 
+ #[derive(Clone, Copy)]
+ // { dg-error {bounds not satisfied for S .Clone. is not satisfied .E0277.} "" { target *-*-* } .-1 }
+ struct S2 {
+     a: i32,
+     s: S,
+ }
+ 
+ fn main() -> i32 {
+     0
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-3304.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-3304.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-3304.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-3304.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,4 ****
- // { dg-additional-options "-frust-name-resolution-2.0" }
  #[lang = "sized"]
  trait Sized {}
  
--- 1,3 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-3454.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-3454.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-3454.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-3454.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,20 ----
+ #[lang = "sized"]
+ pub trait Sized {}
+ 
+ macro_rules! impl_foo {
+ 	() => { impl Foo }
+ }
+ 
+ pub trait Foo {}
+ 
+ pub trait Bar {
+     type Baz;
+ }
+ 
+ pub fn foo(_value: impl Bar<Baz = impl_foo!()>) -> i32 {
+     15
+ }
+ 
+ pub fn bar(_value: impl Bar<Baz = impl Foo>) -> i32 {
+     16
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-3524.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-3524.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-3524.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-3524.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,9 ----
+ struct A {}
+ // { dg-warning "struct is never constructed" "" { target *-*-* } .-1 }
+ 
+ impl A {
+     fn main() {}
+     // { dg-warning "associated function is never used: .main." "" { target *-*-* } .-1 }
+ }
+ 
+ fn main() {}
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-3525.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-3525.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-3525.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-3525.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,6 ----
+ // { dg-options "-w" }
+ 
+ struct Foo(usize);
+ 
+ const B: usize = A.0;
+ const A: Foo = Foo(123);
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-3546.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-3546.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-3546.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-3546.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,16 ----
+ const L: usize = 3;
+ 
+ fn main() {
+     let p = Printer {};
+     p.print();
+ }
+ 
+ trait Print<const N: usize> {
+     fn print(&self) -> usize {
+         3
+     }
+ }
+ 
+ struct Printer {}
+ impl Print<L> for Printer {}
+ // { dg-error "generic item takes at most 1 type arguments but 1 were supplied" "" { target *-*-* } .-1 }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-3551.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-3551.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-3551.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-3551.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,15 ----
+ #[lang = "sized"]
+ pub trait Sized {}
+ 
+ #[lang = "fn_once"]
+ pub trait FnOnce<Args> {
+     #[lang = "fn_once_output"]
+     type Output;
+ 
+     extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
+ }
+ 
+ struct Bug {
+     a: [(); (|| 0)()],
+     // { dg-error "calls in constants are limited to constant functions, tuple structs and tuple variants" "" { target *-*-* } .-1 }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-3599.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-3599.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-3599.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-3599.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,8 ----
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ trait Bar {}
+ 
+ struct S; // { dg-warning "struct is never constructed" }
+ 
+ pub fn test(foo: impl Bar) {}
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-3618.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-3618.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-3618.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-3618.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,2 ----
+ static _X : ()
+ 	    = loop{}; // { dg-error "'loop' is not allowed in const context" }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-3642.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-3642.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-3642.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-3642.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,9 ----
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ pub trait T<X> {
+     const D: i32 = {
+         // { dg-error "mismatched types, expected .i32. but got .()." "" { target *-*-* } .-1 }
+         const C: X;
+     };
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-3660.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-3660.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-3660.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-3660.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,3 ----
+ pub static A: [u32; 2] = [1, 2];
+ 
+ pub static B: [u8; 2] = [3, 4];
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-3661.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-3661.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-3661.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-3661.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,10 ----
+ pub macro m($inner_str:expr) {
+     #[m = $inner_str] 
+     // { dg-error "macro not found" "" { target *-*-* } .-1 }
+ 
+     struct S;
+ }
+ 
+ fn main() {
+     m!(stringify!(foo));
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-3671.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-3671.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-3671.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-3671.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,2 ****
! impl Self<0> {}
  // { dg-error "could not resolve type path" "" { target *-*-* } .-1 }
--- 1,2 ----
! impl Foo<0> {}
  // { dg-error "could not resolve type path" "" { target *-*-* } .-1 }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-3836.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-3836.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-3836.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-3836.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,67 ----
+ // { dg-options "-w" }
+ mod core {
+     mod option {
+         pub enum Option<T> {
+             #[lang = "None"]
+             None,
+             #[lang = "Some"]
+             Some(T),
+         }
+     }
+ 
+     mod marker {
+         #[lang = "sized"]
+         pub trait Sized {}
+     }
+ 
+     mod cmp {
+         use super::marker::Sized;
+         use super::option::Option;
+ 
+         pub enum Ordering {
+             Less = -1,
+             Equal = 0,
+             Greater = 1,
+         }
+ 
+         #[lang = "eq"]
+         pub trait PartialEq<Rhs: ?Sized = Self> {
+             fn eq(&self, other: &Rhs) -> bool;
+ 
+             fn ne(&self, other: &Rhs) -> bool {
+                 !self.eq(other)
+             }
+         }
+ 
+         #[lang = "partial_ord"]
+         pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
+             fn partial_cmp(&self, other: &Rhs) -> Option<Ordering>;
+         }
+     }
+ }
+ 
+ use core::cmp::{Ordering, PartialEq, PartialOrd};
+ use core::marker::Sized;
+ use core::option::Option;
+ 
+ impl PartialEq for i32 {
+     fn eq(&self, other: &Self) -> bool {
+         false
+     }
+ }
+ 
+ impl PartialOrd for i32 {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         Option::Some(Ordering::Equal)
+     }
+ }
+ 
+ struct Foo {
+     a: i32,
+ }
+ 
+ impl PartialEq for Foo {
+     fn eq(&self, other: &'_ Self) -> bool {
+         ::core::cmp::PartialEq::eq(&self.a, &other.a)
+     }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-3874.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-3874.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-3874.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-3874.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,4 ----
+ fn wow(){
+     &#[serde]
+     // { dg-error "found unexpected token .#. in null denotation" "" { target *-*-* } .-1 }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-3876.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-3876.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-3876.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-3876.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,8 ----
+ enum test {
+     A(i32),
+ }
+ 
+ fn fun(x: i32) {
+     test::A { x }
+     // { dg-error "unknown field" "" { target *-*-* } .-1 }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-3885.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-3885.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-3885.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-3885.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,7 ----
+ pub fn test() {
+     let _u: [_; _] = [15u32];
+     let _v: [u8; _] = [1, 2, 3];
+     let _w: [_; 2] = [1.0, 2.0];
+     let _x = [42; 5];
+     let _y: [_; _] = _x;
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-3915.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-3915.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-3915.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-3915.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,28 ----
+ // { dg-options "-w" }
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ trait Trait {
+     fn do_thing();
+ }
+ 
+ struct MyType;
+ 
+ impl Trait for MyType {
+     fn do_thing() {}
+ }
+ 
+ struct Wrapper<T: Trait> {
+     value: T,
+ }
+ 
+ impl<T: Trait> Wrapper<T> {
+     fn call_it() {
+         T::do_thing();
+     }
+ }
+ 
+ fn main() {
+     let _ = Wrapper::<MyType> { value: MyType };
+     Wrapper::<MyType>::call_it();
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-3916.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-3916.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-3916.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-3916.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,36 ----
+ #![feature(rustc_attrs)]
+ 
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ #[lang = "add"]
+ trait Add<Rhs = Self> {
+     type Output;
+ 
+     fn add(self, rhs: Rhs) -> Self::Output;
+ }
+ 
+ macro_rules! add_impl {
+     ($($t:ty)*) => ($(
+         impl Add for $t {
+             type Output = $t;
+ 
+             #[inline]
+             #[rustc_inherit_overflow_checks]
+             fn add(self, other: $t) -> $t { self + other }
+         }
+     )*)
+ }
+ 
+ add_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
+ 
+ pub fn test(len: usize) -> u64 {
+     let mut i = 0;
+     let mut out = 0;
+     if i + 3 < len {
+         out = 123;
+     } else {
+         out = 456;
+     }
+     out
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-3960.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-3960.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-3960.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-3960.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,7 ----
+ fn main() {
+     struct G {
+         g: (),
+     }
+     let g = [0; G { g: () }];
+     // { dg-error "mismatched types, expected .usize. but got .G. .E0308." "" { target *-*-* } .-1 }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-3978.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-3978.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-3978.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-3978.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,8 ----
+ type Dimension = usize;
+ 
+ pub fn main() {}
+ 
+ mod m2 {
+     fn main() {}
+     // { dg-warning "function is never used" "" { target *-*-* } .-1 }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/issue-4006.rs gcc-16-20250810/gcc/testsuite/rust/compile/issue-4006.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/issue-4006.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/issue-4006.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,13 ----
+ #![feature(rustc_attrs)]
+ 
+ #[rustc_builtin_macro]
+ macro_rules! asm {
+     () => {};
+ }
+ 
+ pub fn main() {
+     asm!(
+         "xor eax, eax"
+         "xor eax, eax");
+     // { dg-error "expected token .;." "" { target *-*-* } .-1 }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/loop_constant_context.rs gcc-16-20250810/gcc/testsuite/rust/compile/loop_constant_context.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/loop_constant_context.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/loop_constant_context.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,5 ----
+ // { dg-error "'loop' is not allowed in const context" "" { target *-*-* } .+1 }
+ const CONST_LOOP : () = loop{};
+ 
+ // { dg-error "'loop' is not allowed in const context" "" { target *-*-* } .+1 }
+ static STATIC_LOOP : () = loop{};
\ No newline at end of file
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/macros/builtin/recurse2.rs gcc-16-20250810/gcc/testsuite/rust/compile/macros/builtin/recurse2.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/macros/builtin/recurse2.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/macros/builtin/recurse2.rs	Sun Aug 10 22:32:55 2025
*************** fn print_str(s: &str) {
*** 34,40 ****
      }
  }
  
! // { dg-final { scan-assembler {"abheyho"} } }
  static S: &str = concat!("a", 'b', a!(), a!(b c d e f a!()), '\0');
  
  fn main() {
--- 34,40 ----
      }
  }
  
! // { dg-final { scan-assembler {"abheyho(\\0)?"} } }
  static S: &str = concat!("a", 'b', a!(), a!(b c d e f a!()), '\0');
  
  fn main() {
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/macros/mbe/macro-issue3708.rs gcc-16-20250810/gcc/testsuite/rust/compile/macros/mbe/macro-issue3708.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/macros/mbe/macro-issue3708.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/macros/mbe/macro-issue3708.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,4 ****
! // { dg-additional-options "-frust-name-resolution-2.0 -frust-compile-until=lowering" }
  
  macro_rules! impl_fn_for_zst {
      ($(
--- 1,4 ----
! // { dg-additional-options "-frust-compile-until=lowering" }
  
  macro_rules! impl_fn_for_zst {
      ($(
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/macros/mbe/macro-issue3709-2.rs gcc-16-20250810/gcc/testsuite/rust/compile/macros/mbe/macro-issue3709-2.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/macros/mbe/macro-issue3709-2.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/macros/mbe/macro-issue3709-2.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,4 ****
! // { dg-additional-options "-frust-name-resolution-2.0 -frust-compile-until=lowering" }
  
  macro_rules! impl_fn_for_zst {
      ($(
--- 1,4 ----
! // { dg-additional-options "-frust-compile-until=lowering" }
  
  macro_rules! impl_fn_for_zst {
      ($(
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/macros/mbe/meta-param.rs gcc-16-20250810/gcc/testsuite/rust/compile/macros/mbe/meta-param.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/macros/mbe/meta-param.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/macros/mbe/meta-param.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,7 ----
+ macro_rules! foo {
+     ($x:meta) => {0}
+ }
+ 
+ pub fn main() -> i32 {
+     foo!(Clone)
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/match-identifierpattern-enum.rs gcc-16-20250810/gcc/testsuite/rust/compile/match-identifierpattern-enum.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/match-identifierpattern-enum.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/match-identifierpattern-enum.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,12 ----
+ enum Foo {
+     I(i32),
+ }
+ 
+ fn main() {
+     let x = Foo::I(1);
+ 
+     match x {
+         a @ Foo::I(b) => {},
+         _ => {},
+     };
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/match-identifierpattern.rs gcc-16-20250810/gcc/testsuite/rust/compile/match-identifierpattern.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/match-identifierpattern.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/match-identifierpattern.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,9 ----
+ fn main() {
+     let x = 1;
+ 
+     match x {
+         2 => {},
+         a @ 3 => {},
+         _ => {},
+     }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/match-restpattern-tuple-1.rs gcc-16-20250810/gcc/testsuite/rust/compile/match-restpattern-tuple-1.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/match-restpattern-tuple-1.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/match-restpattern-tuple-1.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,8 ----
+ fn main() {
+     let x = (1, 2, 3, 4);
+ 
+     match x {
+         (1, .., 4) => {},
+         _ => {}
+     }
+ }
\ No newline at end of file
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/match-restpattern-tuple-2.rs gcc-16-20250810/gcc/testsuite/rust/compile/match-restpattern-tuple-2.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/match-restpattern-tuple-2.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/match-restpattern-tuple-2.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,8 ----
+ fn main() {
+     let x = (1, 2, 3, 4);
+ 
+     match x {
+         (1, .., 2, 3, 4, 5) => {}, // { dg-error "expected a tuple with 4 elements, found one with 5 elements" }
+         _ => {}
+     }
+ }
\ No newline at end of file
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/match-slicepattern-array.rs gcc-16-20250810/gcc/testsuite/rust/compile/match-slicepattern-array.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/match-slicepattern-array.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/match-slicepattern-array.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,8 ----
+ fn main() {
+     let a = [0, 1];
+ 
+     match a {
+         [0, 1] => {},
+         _ => {}
+     }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/match-slicepattern-slice.rs gcc-16-20250810/gcc/testsuite/rust/compile/match-slicepattern-slice.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/match-slicepattern-slice.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/match-slicepattern-slice.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,10 ----
+ fn main() {
+     let arr = [1, 2];
+     let slice: &[i32] = &arr;
+ 
+     match slice {
+         [1] => {},
+         [_, 2] => {},
+         _ => {}
+     }
+ }
\ No newline at end of file
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/match-tuplestructpattern.rs gcc-16-20250810/gcc/testsuite/rust/compile/match-tuplestructpattern.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/match-tuplestructpattern.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/match-tuplestructpattern.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,9 ----
+ fn main() {
+     struct A (i32, i32);
+     let a = A (0, 1);
+ 
+     match a {
+         A (0, 1) => {},
+         _ => {}
+     }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/min_specialization1.rs gcc-16-20250810/gcc/testsuite/rust/compile/min_specialization1.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/min_specialization1.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/min_specialization1.rs	Sun Aug 10 22:32:55 2025
*************** pub trait Foo {
*** 9,15 ****
  pub struct Bar;
  
  impl Foo for Bar {
!     default fn foo(&self) -> bool { // { dg-warning "unused" }
          true
      }
  }
--- 9,15 ----
  pub struct Bar;
  
  impl Foo for Bar {
!     default fn foo(&self) -> bool {
          true
      }
  }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution10.rs gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution10.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution10.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution10.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,4 ****
! // { dg-options "-frust-name-resolution-2.0 -frust-compile-until=lowering" }
  
  #![feature(decl_macro)]
  
--- 1,4 ----
! // { dg-options "-frust-compile-until=lowering" }
  
  #![feature(decl_macro)]
  
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution11.rs gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution11.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution11.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution11.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,4 ****
! // { dg-additional-options "-frust-name-resolution-2.0 -frust-compile-until=lowering" }
  fn foo() {
      let b = 10;
      fn bar() {
--- 1,4 ----
! // { dg-additional-options "-frust-compile-until=lowering" }
  fn foo() {
      let b = 10;
      fn bar() {
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution12.rs gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution12.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution12.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution12.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,4 ****
! // { dg-additional-options "-frust-name-resolution-2.0 -frust-compile-until=lowering" }
  
  const TOTO: i32 = 10;
  
--- 1,4 ----
! // { dg-additional-options "-frust-compile-until=lowering" }
  
  const TOTO: i32 = 10;
  
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution13.rs gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution13.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution13.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution13.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,5 ****
- // { dg-options "-frust-name-resolution-2.0" }
- 
  pub mod foo {
      pub macro bar() {}
  }
--- 1,3 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution14.rs gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution14.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution14.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution14.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,5 ****
- // { dg-options "-frust-name-resolution-2.0" }
- 
  pub mod foo {
      pub macro bar() {}
  }
--- 1,3 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution15.rs gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution15.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution15.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution15.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,4 ****
- // { dg-additional-options "-frust-name-resolution-2.0" }
  #![feature(decl_macro)]
  
  pub mod foo {
--- 1,3 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution16.rs gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution16.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution16.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution16.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,4 ****
- // { dg-additional-options "-frust-name-resolution-2.0" }
  #![feature(decl_macro)]
  
  pub mod foo {
--- 1,3 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution17.rs gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution17.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution17.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution17.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,5 ****
- // { dg-options "-frust-name-resolution-2.0" }
- 
  struct Foo;
  fn Foo() {} // { dg-error ".Foo. defined multiple times" }
  
--- 1,3 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution18.rs gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution18.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution18.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution18.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,5 ****
- // { dg-options "-frust-name-resolution-2.0" }
- 
  struct Marker;
  
  struct Foo {
--- 1,3 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution2.rs gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution2.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution2.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution2.rs	Sun Aug 10 22:32:55 2025
*************** pub trait Sized {}
*** 4,10 ****
  struct Bar;
  
  trait Foo {
!     fn bar(&self) {} // { dg-warning "unused name" }
  }
  
  pub fn outer() {
--- 4,10 ----
  struct Bar;
  
  trait Foo {
!     fn bar(&self) {}
  }
  
  pub fn outer() {
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution20.rs gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution20.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution20.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution20.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,5 ****
- // { dg-options "-frust-name-resolution-2.0" }
- 
  pub mod foo {
      pub macro bar() {}
  }
--- 1,3 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution22.rs gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution22.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution22.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution22.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,4 ****
- // { dg-options "-frust-name-resolution-2.0" }
  struct Marker;
  struct Foo(Marker);
  
--- 1,3 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution23.rs gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution23.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution23.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution23.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,5 ****
- // { dg-options "-frust-name-resolution-2.0" }
- 
  mod a {
      pub mod b {
          pub fn foo() {}
--- 1,3 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution24.rs gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution24.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution24.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution24.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,5 ****
- // { dg-options "-frust-name-resolution-2.0" }
- 
  mod a {
      pub mod b {
          pub fn baz() {}
--- 1,3 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution25.rs gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution25.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution25.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution25.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,5 ****
- // { dg-options "-frust-name-resolution-2.0" }
- 
  struct Test; // { dg-warning "struct is never constructed: .Test." }
  
  impl Test {}
--- 1,3 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution4.rs gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution4.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution4.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution4.rs	Sun Aug 10 22:32:55 2025
***************
*** 2,8 ****
  pub trait Sized {}
  
  trait Foo {
!     fn foo(&self) {} // { dg-warning "unused name" }
  }
  
  struct Bar;
--- 2,8 ----
  pub trait Sized {}
  
  trait Foo {
!     fn foo(&self) {}
  }
  
  struct Bar;
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution6.rs gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution6.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution6.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution6.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,4 ****
! // { dg-options "-frust-name-resolution-2.0 -frust-compile-until=lowering" }
  
  pub mod foo {
      pub mod bar {
--- 1,4 ----
! // { dg-options "-frust-compile-until=lowering" }
  
  pub mod foo {
      pub mod bar {
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution7.rs gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution7.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution7.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution7.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,5 ****
- // { dg-options "-frust-name-resolution-2.0" }
- 
  // check that macros by example do not get inserted in ribs like regular items
  pub mod foo {
      pub mod bar {
--- 1,3 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution8.rs gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution8.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution8.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution8.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,5 ****
- // { dg-options "-frust-name-resolution-2.0" }
- 
  // check that macros by example get exported to the crate's root with #[macro_export]
  pub mod foo {
      pub mod bar {
--- 1,3 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution9.rs gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution9.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/name_resolution9.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/name_resolution9.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,5 ****
- // { dg-options "-frust-name-resolution-2.0" }
- 
  pub mod foo {
      pub mod bar {
          fn f() {
--- 1,3 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/nested_macro_definition.rs gcc-16-20250810/gcc/testsuite/rust/compile/nested_macro_definition.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/nested_macro_definition.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/nested_macro_definition.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,5 ****
- // { dg-options "-frust-name-resolution-2.0" }
- 
  macro_rules! toto {
      () => {
          macro_rules! tata {
--- 1,3 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/nr2/compile.exp gcc-16-20250810/gcc/testsuite/rust/compile/nr2/compile.exp
*** gcc-16-20250803/gcc/testsuite/rust/compile/nr2/compile.exp	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/nr2/compile.exp	Thu Jan  1 00:00:00 1970
***************
*** 1,149 ****
- # Copyright (C) 2021-2024 Free Software Foundation, Inc.
- 
- # This program is free software; you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation; either version 3 of the License, or
- # (at your option) any later version.
- # 
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- # GNU General Public License for more details.
- # 
- # You should have received a copy of the GNU General Public License
- # along with GCC; see the file COPYING3.  If not see
- # <http://www.gnu.org/licenses/>.
- 
- # Run compile tests with name resolution 2.0 enabled
- 
- # Load support procs.
- load_lib rust-dg.exp
- 
- # These tests don't run runtest_file_p consistently if it
- # doesn't return the same values, so disable parallelization
- # of this *.exp file.  The first parallel runtest to reach
- # this will run all the tests serially.
- if ![gcc_parallel_test_run_p compile] {
-     return
- }
- gcc_parallel_test_enable 0
- 
- # Initialize `dg'.
- dg-init
- 
- namespace eval rust-nr2-ns {
-     # Exclude tests which aren't passing yet
-     # These should be removed from the exclude file over time
- 
-     set exclude_fh [open $srcdir/$subdir/exclude r]
-     set exclude_raw [lsort [split [read $exclude_fh] "\n"]]
-     close $exclude_fh
-     unset exclude_fh
- 
-     set exclude ""
-     foreach ent $exclude_raw {
-         if [regexp {^[^#].*} $ent] {
-             lappend exclude $ent
- 	}
-     }
-     unset exclude_raw
- 
-     # Run tests in directories
-     # Manually specifying these, in case some other test file
-     # does something weird
-     set test_dirs {{} {macros builtin} {macros mbe} {macros proc} {torture}}
- 
-     set tests_expect_ok ""
-     set tests_expect_err ""
- 
-     set compile_dir [list {*}[file split $srcdir] {*}[file split $subdir]]
-     set compile_dir [lreplace $compile_dir end end]
- 
-     foreach test_dir $test_dirs {
-         foreach test [lsort [glob -nocomplain -tails -directory [file join {*}$compile_dir {*}$test_dir] *.rs]] {
- 	    # use '/' as the path seperator for entries in the exclude file
- 	    set test_lbl [join [list {*}$test_dir $test] "/"]
- 	    set idx [lsearch -exact -sorted $exclude $test_lbl]
- 	    if {$idx == -1} {
- 	        if {[runtest_file_p $runtests [file join {*}$compile_dir {*}$test_dir $test]]} {
- 		    lappend tests_expect_ok [list {*}$test_dir $test]
- 		}
- 	    } else {
- 	        if {[runtest_file_p $runtests [file join {*}$compile_dir {*}$test_dir $test]]} {
- 		    lappend tests_expect_err [list {*}$test_dir $test]
- 		}
- 		set exclude [lreplace $exclude $idx $idx]
- 	    }
- 	}
-     }
- 
-     # Generate failures for unmatched tests in the exclude list
-     foreach ent $exclude {
-         fail "$ent: could not exclude test"
-     }
-     unset exclude
- 
-     # run a test while catching record_test calls
-     set record_test_out ""
-     proc try_test { test } {
-         variable record_test_out
- 	rename ::record_test record_test_old
- 
- 	proc ::record_test { type msg args } {
- 	    namespace eval ::rust-nr2-ns {
- 		set type [uplevel 1 {set type}]
- 		set msg [uplevel 1 {set msg}]
- 		variable record_test_out
- 		switch $type {
- 		    FAIL {
- 			lappend record_test_out [list $type $msg]
- 		    }
- 		    XPASS {
- 			lappend record_test_out [list $type $msg]
- 		    }
- 		}
-             }
- 	}
- 
-         namespace eval :: {
- 	    set saved-dg-do-what-default ${dg-do-what-default}
- 	    set dg-do-what-default "compile"
-             dg-runtest [list [uplevel 1 {set test}]] "-frust-name-resolution-2.0" ""
- 	    set dg-do-what-default ${saved-dg-do-what-default}
- 	}
- 
-         rename ::record_test ""
- 	rename record_test_old ::record_test
- 
- 	set record_test_cache $record_test_out
-         set record_test_out ""
- 	return $record_test_cache
-     }
- 
-     # check for unexpected failures
-     foreach test $tests_expect_ok {
-         set fails [try_test [file join {*}$compile_dir {*}$test]]
- 	if {[llength $fails] != 0} {
- 	    foreach ent $fails {
- 		record_test [lindex $ent 0] "on nr2: [lindex $ent 1]"
- 	    }
- 	} else {
- 	    record_test PASS "[file join {*}$test] on nr2"
- 	}
-     }
- 
-     #check for unexpected successes
-     foreach test $tests_expect_err {
-         set fails [try_test [file join {*}$compile_dir {*}$test]]
- 	if {[llength $fails] == 0} {
- 	    record_test XPASS "[file join {*}$test] on nr2"
- 	} else {
- 	    record_test XFAIL "[file join {*}$test] on nr2 was rightfully excluded"
- 	}
-     }
- }
- 
- # All done.
- dg-finish
- 
- gcc_parallel_test_enable 1
--- 0 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/nr2/exclude gcc-16-20250810/gcc/testsuite/rust/compile/nr2/exclude
*** gcc-16-20250803/gcc/testsuite/rust/compile/nr2/exclude	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/nr2/exclude	Thu Jan  1 00:00:00 1970
***************
*** 1,17 ****
- canonical_paths1.rs
- issue-3315-2.rs
- privacy5.rs
- privacy8.rs
- pub_restricted_1.rs
- pub_restricted_2.rs
- pub_restricted_3.rs
- issue-2905-2.rs
- derive-default1.rs
- derive-eq-invalid.rs
- torture/alt_patterns1.rs
- torture/name_resolve1.rs
- issue-3663.rs
- issue-3671.rs
- issue-3652.rs
- issue-3649.rs
- # please don't delete the trailing newline
--- 0 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/offset_of1.rs gcc-16-20250810/gcc/testsuite/rust/compile/offset_of1.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/offset_of1.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/offset_of1.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,11 ----
+ // { dg-additional-options "-frust-compile-until=lowering -frust-assume-builtin-offset-of" }
+ 
+ pub struct Foo {
+     a: i32,
+ }
+ 
+ fn main() {
+     let _ = offset_of!(Foo, a); // valid
+     let _ = offset_of!("bloop", a); // { dg-error "could not parse type" }
+     let _ = offset_of!(Foo, 15); // { dg-error "could not parse field" }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/offset_of2.rs gcc-16-20250810/gcc/testsuite/rust/compile/offset_of2.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/offset_of2.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/offset_of2.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,9 ----
+ // { dg-additional-options "-frust-compile-until=compilation -frust-assume-builtin-offset-of" }
+ 
+ pub struct Foo {
+     a: i32,
+ }
+ 
+ fn main() {
+     let _ = offset_of!(Foo, a); // valid
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/parse_simple_path_fail_1.rs gcc-16-20250810/gcc/testsuite/rust/compile/parse_simple_path_fail_1.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/parse_simple_path_fail_1.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/parse_simple_path_fail_1.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,3 ----
+ pub(in crate::) struct S;
+ // { dg-error "expecting ... but .::. found" "" { target *-*-* } .-1 }
+ // { dg-error "failed to parse item in crate" "" { target *-*-* } .-2 }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/parse_simple_path_fail_2.rs gcc-16-20250810/gcc/testsuite/rust/compile/parse_simple_path_fail_2.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/parse_simple_path_fail_2.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/parse_simple_path_fail_2.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,9 ----
+ mod A {
+     struct B;
+ }
+ 
+ use A{B};
+ // { dg-error "unexpected token" "" { target *-*-* } .-1 }
+ // { dg-error "could not parse use tree" "" { target *-*-* } .-2 }
+ // { dg-error "failed to parse item in crate" "" { target *-*-* } 10 }
+ // ^^^ TODO: should the above error happen at line 10?
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/pub_restricted_1.rs gcc-16-20250810/gcc/testsuite/rust/compile/pub_restricted_1.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/pub_restricted_1.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/pub_restricted_1.rs	Sun Aug 10 22:32:55 2025
*************** pub mod foo {
*** 6,13 ****
      }
  }
  
! pub(in foo::fah::baz) struct A1; // { dg-error "cannot find simple path segment .fah." }
! pub(in fro::bulator::saindoux) struct A2; // { dg-error "cannot find simple path segment .fro." }
! pub(in foo::bar::saindoux) struct A3; // { dg-error "cannot find simple path segment .saindoux." }
  
  fn main() {}
--- 6,13 ----
      }
  }
  
! pub(in foo::fah::baz) struct A1; // { dg-error "could not resolve path .foo::fah::baz." }
! pub(in fro::bulator::saindoux) struct A2; // { dg-error "could not resolve path .fro::bulator::saindoux." }
! pub(in foo::bar::saindoux) struct A3; // { dg-error "could not resolve path .foo::bar::saindoux." }
  
  fn main() {}
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/pub_restricted_2.rs gcc-16-20250810/gcc/testsuite/rust/compile/pub_restricted_2.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/pub_restricted_2.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/pub_restricted_2.rs	Sun Aug 10 22:32:55 2025
***************
*** 3,18 ****
  mod foo {
      mod bar {
          mod baz {
!             pub(in baz) struct A0;
!             pub(in bar::baz) struct A1;
              pub(in foo::bar::baz) struct A2;
  
              mod sain {
                  mod doux {}
              }
  
!             pub(in sain) struct A3; // { dg-error "restricted path is not an ancestor of the current module" }
!             pub(in sain::doux) struct A4; // { dg-error "restricted path is not an ancestor of the current module" }
          }
      }
  }
--- 3,18 ----
  mod foo {
      mod bar {
          mod baz {
!             pub(in super::baz) struct A0;
!             pub(in super::super::bar::baz) struct A1;
              pub(in foo::bar::baz) struct A2;
  
              mod sain {
                  mod doux {}
              }
  
!             pub(in self::sain) struct A3; // { dg-error "restricted path is not an ancestor of the current module" }
!             pub(in self::sain::doux) struct A4; // { dg-error "restricted path is not an ancestor of the current module" }
          }
      }
  }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/same_field_name.rs gcc-16-20250810/gcc/testsuite/rust/compile/same_field_name.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/same_field_name.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/same_field_name.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,8 ----
+ // https://doc.rust-lang.org/error_codes/E0124.html
+ fn main() {
+     struct Foo {
+         field1: i32,
+         field1: i32, // { dg-error "field .field1. is already declared" }
+         field1: i32, // { dg-error "field .field1. is already declared" }
+     }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/self-in-impl.rs gcc-16-20250810/gcc/testsuite/rust/compile/self-in-impl.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/self-in-impl.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/self-in-impl.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,15 ----
+ // the error message here is what rustc >=1.66 emits
+ // rustc <1.66 emits a "cycle detected" error when
+ //   trying to calculate the impl type
+ //
+ // since we aren't trying to match error messages too closely
+ // and the >=1.66 error message is nicer
+ // we may as well mimic that
+ 
+ impl ((Self, i32)) {}
+ // { dg-error ".Self. is not valid in the self" "" { target *-*-* } .-1 }
+ 
+ trait Foo {}
+ 
+ impl Foo for ((Self, i32)) {}
+ // { dg-error ".Self. is not valid in the self" "" { target *-*-* } .-1 }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/self_import_namespace.rs gcc-16-20250810/gcc/testsuite/rust/compile/self_import_namespace.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/self_import_namespace.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/self_import_namespace.rs	Sun Aug 10 22:32:55 2025
***************
*** 1,5 ****
- // { dg-additional-options "-frust-name-resolution-2.0" }
- 
  mod bar {
      pub mod foo {}
      pub fn foo() {}
--- 1,3 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/silly-order-bug.rs gcc-16-20250810/gcc/testsuite/rust/compile/silly-order-bug.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/silly-order-bug.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/silly-order-bug.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,8 ----
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ #[lang = "fn_once"]
+ pub trait FnOnce<Args> {
+     extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
+     type Output;
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/slicepattern-size-mismatch.rs gcc-16-20250810/gcc/testsuite/rust/compile/slicepattern-size-mismatch.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/slicepattern-size-mismatch.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/slicepattern-size-mismatch.rs	Sun Aug 10 22:32:55 2025
***************
*** 0 ****
--- 1,8 ----
+ fn main() {
+     let arr = [0, 1];
+ 
+     match arr {
+         [0, 1, 2] => {} // { dg-error "pattern requires 3 elements but array has 2 .E0527." }
+         _ => {}
+     }
+ }
\ No newline at end of file
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/torture/extern_mod2.rs gcc-16-20250810/gcc/testsuite/rust/compile/torture/extern_mod2.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/torture/extern_mod2.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/torture/extern_mod2.rs	Sun Aug 10 22:32:55 2025
*************** mod no_leading_equal;
*** 12,17 ****
--- 12,23 ----
  #[path       =     "modules/valid_path.rs"]
  mod extra_spaces;
  
+ #[path = ""]  // { dg-error "path attributes must contain a filename" }
+ mod empty_path; // { dg-error "no candidate found" }
+ 
+ #[path = "          "]  // { dg-error "path attributes must contain a filename" }
+ mod path_with_spaces; // { dg-error "no candidate found" }
+ 
  #[path] // { dg-error "path attributes must contain a filename" }
  mod error; // { dg-error "no candidate found" }
  
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/torture/generics29.rs gcc-16-20250810/gcc/testsuite/rust/compile/torture/generics29.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/torture/generics29.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/torture/generics29.rs	Sun Aug 10 22:32:56 2025
*************** struct Foo<A, B>(A, B);
*** 5,11 ****
  
  impl Foo<i32, f32> {
      fn test<X>(self, a: X) -> X {
-         // { dg-warning "unused name" "" { target *-*-* } .-1 }
          a
      }
  }
--- 5,10 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/torture/generics30.rs gcc-16-20250810/gcc/testsuite/rust/compile/torture/generics30.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/torture/generics30.rs	Sun Aug  3 22:33:23 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/torture/generics30.rs	Sun Aug 10 22:32:56 2025
*************** struct Foo<A, B>(A, B);
*** 5,11 ****
  
  impl<T> Foo<T, f32> {
      fn test<X>(self, a: X) -> X {
-         // { dg-warning "unused name" "" { target *-*-* } .-1 }
          a
      }
  }
--- 5,10 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/torture/traits3.rs gcc-16-20250810/gcc/testsuite/rust/compile/torture/traits3.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/torture/traits3.rs	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/torture/traits3.rs	Sun Aug 10 22:32:56 2025
*************** struct Baz;
*** 10,16 ****
  
  impl Foo for Baz {
      fn Bar(self) -> i32 {
-         // { dg-warning "unused name .self." "" { target *-*-* } .-1 }
          123
      }
  }
--- 10,15 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/torture/traits7.rs gcc-16-20250810/gcc/testsuite/rust/compile/torture/traits7.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/torture/traits7.rs	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/torture/traits7.rs	Sun Aug 10 22:32:56 2025
*************** impl Foo for Bar {
*** 13,19 ****
      // { dg-warning "unused name" "" { target *-*-* } .-1 }
  
      fn test(self) {}
-     // { dg-warning "unused name" "" { target *-*-* } .-1 }
  }
  
  fn main() {
--- 13,18 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/torture/unended-raw-byte-string.rs gcc-16-20250810/gcc/testsuite/rust/compile/torture/unended-raw-byte-string.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/torture/unended-raw-byte-string.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/torture/unended-raw-byte-string.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,6 ----
+ // { dg-excess-errors "...." }
+ fn main() {
+     // { dg-error "unended raw byte string literal" "" { target *-*-* } .+1 }
+     let s = br##"123"#
+ }
+ 
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/traits9.rs gcc-16-20250810/gcc/testsuite/rust/compile/traits9.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/traits9.rs	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/traits9.rs	Sun Aug 10 22:32:56 2025
*************** fn main() {
*** 11,16 ****
      a = Foo(123);
  
      let b: &dyn Bar = &a;
!     // { dg-error "bounds not satisfied for Foo .Bar. is not satisfied" "" { target *-*-* } .-1 }
!     // { dg-error "expected" "" { target *-*-* } .-2 }
  }
--- 11,15 ----
      a = Foo(123);
  
      let b: &dyn Bar = &a;
!     // { dg-error "bounds not satisfied for Foo .Bar. is not satisfied .E0277." "" { target *-*-* } .-1 }
  }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/try_block1.rs gcc-16-20250810/gcc/testsuite/rust/compile/try_block1.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/try_block1.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/try_block1.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,89 ----
+ // { dg-additional-options "-frust-edition=2018" }
+ 
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ enum Result<T, E> {
+     Ok(T),
+     Err(E)
+ }
+ 
+ pub trait Try {
+     /// The type of this value when viewed as successful.
+     #[unstable(feature = "try_trait", issue = "42327")]
+     type Ok;
+     /// The type of this value when viewed as failed.
+     #[unstable(feature = "try_trait", issue = "42327")]
+     type Error;
+ 
+     /// Applies the "?" operator. A return of `Ok(t)` means that the
+     /// execution should continue normally, and the result of `?` is the
+     /// value `t`. A return of `Err(e)` means that execution should branch
+     /// to the innermost enclosing `catch`, or return from the function.
+     ///
+     /// If an `Err(e)` result is returned, the value `e` will be "wrapped"
+     /// in the return type of the enclosing scope (which must itself implement
+     /// `Try`). Specifically, the value `X::from_error(From::from(e))`
+     /// is returned, where `X` is the return type of the enclosing function.
+     #[lang = "into_result"]
+     #[unstable(feature = "try_trait", issue = "42327")]
+     fn into_result(self) -> Result<Self::Ok, Self::Error>;
+ 
+     /// Wrap an error value to construct the composite result. For example,
+     /// `Result::Err(x)` and `Result::from_error(x)` are equivalent.
+     #[lang = "from_error"]
+     #[unstable(feature = "try_trait", issue = "42327")]
+     fn from_error(v: Self::Error) -> Self;
+ 
+     /// Wrap an OK value to construct the composite result. For example,
+     /// `Result::Ok(x)` and `Result::from_ok(x)` are equivalent.
+     #[lang = "from_ok"]
+     #[unstable(feature = "try_trait", issue = "42327")]
+     fn from_ok(v: Self::Ok) -> Self;
+ }
+ 
+ pub struct NoneError;
+ 
+ 
+ pub enum Option<T> {
+     /// No value
+     None,
+     /// Some value `T`
+     Some(T),
+ }
+ 
+ impl<T> Option<T> {
+     pub fn ok_or<E>(self, err: E) -> Result<T, E> {
+         match self {
+             Some(ok) => Result::Ok(ok),
+             None => Result::Err(err)
+         }
+     }
+ }
+ 
+ use Option::*;
+ 
+ #[unstable(feature = "try_trait", issue = "42327")]
+ impl<T> Try for Option<T> {
+     type Ok = T;
+     type Error = NoneError;
+ 
+     #[inline]
+     fn into_result(self) -> Result<T, NoneError> {
+         self.ok_or(NoneError)
+     }
+ 
+     #[inline]
+     fn from_ok(v: T) -> Self {
+         Some(v)
+     }
+ 
+     #[inline]
+     fn from_error(_: NoneError) -> Self {
+         None
+     }
+ }
+ 
+ fn main() {
+     let _: Option<i32> = try { 15i32 };
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/tuple_mismatch.rs gcc-16-20250810/gcc/testsuite/rust/compile/tuple_mismatch.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/tuple_mismatch.rs	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/tuple_mismatch.rs	Sun Aug 10 22:32:56 2025
*************** fn main() {
*** 3,8 ****
--- 3,9 ----
      let (_,) = (1, 2); // { dg-error "expected a tuple with 2 elements, found one with 1 element" }
      let (_, _) = (1, 2, 3); // { dg-error "expected a tuple with 3 elements, found one with 2 elements" }
      let (_, _) = (1,); // { dg-error "expected a tuple with 1 element, found one with 2 elements" }
+     let (_, .., _) = (1,); // { dg-error "expected a tuple with 1 element, found one with 2 elements" }
  }
  
  // The lhs and rhs sizes don't match, but we still resolve 'a' to be bool, we don't
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/unify-errors1.rs gcc-16-20250810/gcc/testsuite/rust/compile/unify-errors1.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/unify-errors1.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/unify-errors1.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,49 ----
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ #[lang = "copy"]
+ trait Copy {}
+ 
+ trait MyTrait {}
+ 
+ struct Wrapper<T: MyTrait> {
+     value: T,
+ }
+ 
+ struct NotImpl;
+ 
+ trait A {}
+ trait B {}
+ 
+ struct Wrapper2<T: A + B> {
+     value: T,
+ }
+ 
+ struct NotImpl2;
+ 
+ impl A for NotImpl2 {}
+ 
+ fn takes_tuple(x: (i32, bool)) {}
+ 
+ fn requires_copy<T: Copy>(value: T) {}
+ 
+ pub fn test() {
+     takes_tuple((1, 2));
+     // { dg-error "mismatched types, expected .bool. but got .<integer>. .E0308." "" { target *-*-* } .-1 }
+ 
+     takes_tuple((1, 2, 3));
+     // { dg-error "mismatched types, expected ..i32, bool.. but got ..<integer>, <integer>, <integer>.. .E0308." "" { target *-*-* } .-1 }
+ 
+     takes_tuple("hello");
+     // { dg-error "mismatched types, expected ..i32, bool.. but got .& str. .E0308." "" { target *-*-* } .-1 }
+ 
+     let x = &mut 5;
+     requires_copy(x);
+     // { dg-error "bounds not satisfied for &mut <integer> .Copy. is not satisfied .E0277." "" { target *-*-* } .-1 }
+ 
+     let _x = Wrapper { value: NotImpl };
+     // { dg-error "bounds not satisfied for NotImpl .MyTrait. is not satisfied .E0277." "" { target *-*-* } .-1 }
+ 
+     let _x = Wrapper2 { value: NotImpl2 };
+     // { dg-error "bounds not satisfied for NotImpl2 .B. is not satisfied .E0277." "" { target *-*-* } .-1 }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/use_1.rs gcc-16-20250810/gcc/testsuite/rust/compile/use_1.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/use_1.rs	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/use_1.rs	Sun Aug 10 22:32:56 2025
***************
*** 1,4 ****
- // { dg-additional-options "-frust-name-resolution-2.0" }
  mod frob {}
  
  use foo::bar::baz; // { dg-error "unresolved import .foo::bar::baz." }
--- 1,3 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/usize1.rs gcc-16-20250810/gcc/testsuite/rust/compile/usize1.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/usize1.rs	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/usize1.rs	Sun Aug 10 22:32:56 2025
***************
*** 1,5 ****
  fn main() {
      let a = [1, 2, 3];
      let b: u32 = 1;
!     let c = a[b]; // { dg-error "the type ...integer..CAPACITY.. cannot be indexed by .u32." }
  }
--- 1,5 ----
  fn main() {
      let a = [1, 2, 3];
      let b: u32 = 1;
!     let c = a[b]; // { dg-error "the type ...integer.; 3.. cannot be indexed by .u32." }
  }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/while_let1.rs gcc-16-20250810/gcc/testsuite/rust/compile/while_let1.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/while_let1.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/while_let1.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,109 ----
+ // use self::Ordering::*;
+ // use Ordering::*;
+ 
+ // enum Ordering {
+ //     A,
+ //     B,
+ // }
+ 
+ // fn foo(_: Ordering) {}
+ 
+ // fn main() {
+ //     let a = A;
+ 
+ //     foo(a);
+ //     foo(B);
+ // }
+ 
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ enum Result<T, E> {
+     Ok(T),
+     Err(E),
+ }
+ 
+ pub trait Try {
+     /// The type of this value when viewed as successful.
+     #[unstable(feature = "try_trait", issue = "42327")]
+     type Ok;
+     /// The type of this value when viewed as failed.
+     #[unstable(feature = "try_trait", issue = "42327")]
+     type Error;
+ 
+     /// Applies the "?" operator. A return of `Ok(t)` means that the
+     /// execution should continue normally, and the result of `?` is the
+     /// value `t`. A return of `Err(e)` means that execution should branch
+     /// to the innermost enclosing `catch`, or return from the function.
+     ///
+     /// If an `Err(e)` result is returned, the value `e` will be "wrapped"
+     /// in the return type of the enclosing scope (which must itself implement
+     /// `Try`). Specifically, the value `X::from_error(From::from(e))`
+     /// is returned, where `X` is the return type of the enclosing function.
+     #[lang = "into_result"]
+     #[unstable(feature = "try_trait", issue = "42327")]
+     fn into_result(self) -> Result<Self::Ok, Self::Error>;
+ 
+     /// Wrap an error value to construct the composite result. For example,
+     /// `Result::Err(x)` and `Result::from_error(x)` are equivalent.
+     #[lang = "from_error"]
+     #[unstable(feature = "try_trait", issue = "42327")]
+     fn from_error(v: Self::Error) -> Self;
+ 
+     /// Wrap an OK value to construct the composite result. For example,
+     /// `Result::Ok(x)` and `Result::from_ok(x)` are equivalent.
+     #[lang = "from_ok"]
+     #[unstable(feature = "try_trait", issue = "42327")]
+     fn from_ok(v: Self::Ok) -> Self;
+ }
+ 
+ pub struct NoneError;
+ 
+ pub enum Option<T> {
+     /// No value
+     None,
+     /// Some value `T`
+     Some(T),
+ }
+ 
+ impl<T> Option<T> {
+     pub fn ok_or<E>(self, err: E) -> Result<T, E> {
+         match self {
+             Some(ok) => Result::Ok(ok),
+             None => Result::Err(err),
+         }
+     }
+ }
+ 
+ use Option::*;
+ 
+ #[unstable(feature = "try_trait", issue = "42327")]
+ impl<T> Try for Option<T> {
+     type Ok = T;
+     type Error = NoneError;
+ 
+     #[inline]
+     fn into_result(self) -> Result<T, NoneError> {
+         self.ok_or(NoneError)
+     }
+ 
+     #[inline]
+     fn from_ok(v: T) -> Self {
+         Some(v)
+     }
+ 
+     #[inline]
+     fn from_error(_: NoneError) -> Self {
+         None
+     }
+ }
+ 
+ fn foo() -> Option<i32> {
+     Option::Some(15)
+ }
+ 
+ fn main() {
+     // let _: Option<i32> = try { 15i32 };
+ 
+     while let Option::Some(15) = foo() {}
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/while_let_without_label.rs gcc-16-20250810/gcc/testsuite/rust/compile/while_let_without_label.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/while_let_without_label.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/compile/while_let_without_label.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,11 ----
+ // { dg-additional-options "-frust-compile-until=lowering" }
+ 
+ enum Foo {
+     A(i32),
+ }
+ 
+ fn main() {
+     let b = Foo::A(15);
+ 
+     while let Foo::A(x) = b {}
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/compile/xfail/name_resolution21.rs gcc-16-20250810/gcc/testsuite/rust/compile/xfail/name_resolution21.rs
*** gcc-16-20250803/gcc/testsuite/rust/compile/xfail/name_resolution21.rs	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/testsuite/rust/compile/xfail/name_resolution21.rs	Sun Aug 10 22:32:56 2025
***************
*** 1,5 ****
- // { dg-additional-options "-frust-name-resolution-2.0" }
- 
  pub mod foo {
      pub macro bar() {}
  }
--- 1,3 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/black_box.rs gcc-16-20250810/gcc/testsuite/rust/execute/black_box.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/black_box.rs	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/testsuite/rust/execute/black_box.rs	Sun Aug 10 22:32:56 2025
*************** pub fn black_box<T>(mut dummy: T) -> T {
*** 21,30 ****
      dummy
  }
  
! fn main() {
      let dummy: i32 = 42;
      let result = black_box(dummy);
      unsafe {
          printf("Value is: %i\n\0" as *const str as *const i8, result);
      }
  }
--- 21,31 ----
      dummy
  }
  
! fn main() -> i32 {
      let dummy: i32 = 42;
      let result = black_box(dummy);
      unsafe {
          printf("Value is: %i\n\0" as *const str as *const i8, result);
      }
+     0
  }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/execute.exp gcc-16-20250810/gcc/testsuite/rust/execute/execute.exp
*** gcc-16-20250803/gcc/testsuite/rust/execute/execute.exp	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/execute.exp	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,33 ----
+ # Copyright (C) 2021-2025 Free Software Foundation, Inc.
+ 
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; either version 3 of the License, or
+ # (at your option) any later version.
+ # 
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ # 
+ # You should have received a copy of the GNU General Public License
+ # along with GCC; see the file COPYING3.  If not see
+ # <http://www.gnu.org/licenses/>.
+ 
+ # Execute tests.
+ 
+ # Load support procs.
+ load_lib rust-dg.exp
+ 
+ # Initialize `dg'.
+ dg-init
+ 
+ # Main loop.
+ set saved-dg-do-what-default ${dg-do-what-default}
+ 
+ set dg-do-what-default "run"
+ dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.rs]] "" ""
+ set dg-do-what-default ${saved-dg-do-what-default}
+ 
+ # All done.
+ dg-finish
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/inline_asm_inout_ident.rs gcc-16-20250810/gcc/testsuite/rust/execute/inline_asm_inout_ident.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/inline_asm_inout_ident.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/inline_asm_inout_ident.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,23 ----
+ /* { dg-output "Value is: 5\r*\n" } */
+ #![feature(rustc_attrs)]
+ 
+ extern "C" {
+     fn printf(s: *const i8, ...);
+ }
+ 
+ #[rustc_builtin_macro]
+ macro_rules! asm {
+     () => {};
+ }
+ 
+ fn main() -> i32 {
+     let x: i32;
+     // `inout` can also move values to different places
+     unsafe {
+         asm!("inc {}", inout(reg) 4u64=>x);
+     }
+     unsafe {
+         printf("Value is: %i\n\0" as *const str as *const i8, x);
+     }
+     0
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/inline_asm_inout_var.rs gcc-16-20250810/gcc/testsuite/rust/execute/inline_asm_inout_var.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/inline_asm_inout_var.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/inline_asm_inout_var.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,24 ----
+ /* { dg-output "Value is: 5\r*\n" } */
+ #![feature(rustc_attrs)]
+ 
+ extern "C" {
+     fn printf(s: *const i8, ...);
+ }
+ 
+ #[rustc_builtin_macro]
+ macro_rules! asm {
+     () => {};
+ }
+ 
+ fn main() -> i32 {
+     let y: i32 = 4;
+     let x: i32;
+     // `inout` can also move values to different places
+     unsafe {
+         asm!("inc {}", inout(reg) y=>x);
+     }
+     unsafe {
+         printf("Value is: %i\n\0" as *const str as *const i8, x);
+     }
+     0
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/same_field_name.rs gcc-16-20250810/gcc/testsuite/rust/execute/same_field_name.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/same_field_name.rs	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/testsuite/rust/execute/same_field_name.rs	Thu Jan  1 00:00:00 1970
***************
*** 1,8 ****
- // https://doc.rust-lang.org/error_codes/E0124.html
- fn main() {
-     struct Foo {
-         field1: i32, // { dg-error "field .field1. is already declared" }
-         field1: i32, // { dg-error "field .field1. is already declared" }
-         field1: i32, // { dg-error "field .field1. is already declared" }
-     }
- }
--- 0 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/basic_partial_ord1.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/basic_partial_ord1.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/basic_partial_ord1.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/basic_partial_ord1.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,189 ----
+ /* { dg-output "less\r*" }*/
+ mod core {
+     mod option {
+         pub enum Option<T> {
+             None,
+             Some(T),
+         }
+     }
+ 
+     mod marker {
+         #[lang = "phantom_data"]
+         pub struct PhantomData<T: ?Sized>;
+ 
+         #[lang = "structural_peq"]
+         pub trait StructuralPartialEq {}
+ 
+         #[lang = "structural_teq"]
+         pub trait StructuralEq {}
+ 
+         #[lang = "sized"]
+         pub trait Sized {}
+     }
+ 
+     mod cmp {
+         use super::marker::Sized;
+         use super::option::Option;
+ 
+         pub enum Ordering {
+             Less = -1,
+             Equal = 0,
+             Greater = 1,
+         }
+ 
+         #[lang = "eq"]
+         pub trait PartialEq<Rhs: ?Sized = Self> {
+             fn eq(&self, other: &Rhs) -> bool;
+ 
+             fn ne(&self, other: &Rhs) -> bool {
+                 !self.eq(other)
+             }
+         }
+ 
+         pub trait Eq: PartialEq<Self> {
+             fn assert_receiver_is_total_eq(&self) {}
+         }
+ 
+         #[lang = "partial_ord"]
+         pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
+             fn partial_cmp(&self, other: &Rhs) -> Option<Ordering>;
+ 
+             fn lt(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Less) => true,
+                     _ => false,
+                 }
+             }
+ 
+             fn le(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Less) | Option::Some(Ordering::Equal) => true,
+                     _ => false,
+                 }
+             }
+ 
+             fn gt(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Greater) => true,
+                     _ => false,
+                 }
+             }
+ 
+             fn ge(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Greater) | Option::Some(Ordering::Equal) => true,
+                     _ => false,
+                 }
+             }
+         }
+ 
+         pub trait Ord: Eq + PartialOrd<Self> {
+             fn cmp(&self, other: &Self) -> Ordering;
+         }
+     }
+ }
+ 
+ use core::cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd};
+ use core::option::Option;
+ 
+ // Needed impls for primitives
+ impl PartialEq for i32 {
+     fn eq(&self, other: &Self) -> bool {
+         *self == *other
+     }
+ }
+ 
+ impl PartialOrd for i32 {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         if *self < *other {
+             Option::Some(Ordering::Less)
+         } else if *self > *other {
+             Option::Some(Ordering::Greater)
+         } else {
+             Option::Some(Ordering::Equal)
+         }
+     }
+ 
+     fn lt(&self, other: &Self) -> bool {
+         *self < *other
+     }
+     fn le(&self, other: &Self) -> bool {
+         *self <= *other
+     }
+     fn ge(&self, other: &Self) -> bool {
+         *self >= *other
+     }
+     fn gt(&self, other: &Self) -> bool {
+         *self > *other
+     }
+ }
+ 
+ impl Eq for i32 {}
+ impl Ord for i32 {
+     fn cmp(&self, other: &Self) -> Ordering {
+         if *self < *other {
+             Ordering::Less
+         } else if *self > *other {
+             Ordering::Greater
+         } else {
+             Ordering::Equal
+         }
+     }
+ }
+ 
+ // Manual impl for struct Bar
+ struct Bar {
+     a: i32,
+     b: i32,
+ }
+ 
+ impl PartialEq for Bar {
+     fn eq(&self, other: &Self) -> bool {
+         self.a.eq(&other.a) && self.b.eq(&other.b)
+     }
+ }
+ 
+ impl Eq for Bar {}
+ 
+ impl PartialOrd for Bar {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         match self.a.partial_cmp(&other.a) {
+             Option::Some(Ordering::Equal) => self.b.partial_cmp(&other.b),
+             ord => ord,
+         }
+     }
+ }
+ 
+ impl Ord for Bar {
+     fn cmp(&self, other: &Self) -> Ordering {
+         match self.a.cmp(&other.a) {
+             Ordering::Equal => self.b.cmp(&other.b),
+             ord => ord,
+         }
+     }
+ }
+ 
+ // External print shim
+ extern "C" {
+     fn puts(s: *const i8);
+ }
+ 
+ fn print(s: &str) {
+     unsafe {
+         puts(s as *const str as *const i8);
+     }
+ }
+ 
+ fn main() -> i32 {
+     let x = Bar { a: 1, b: 2 };
+     let y = Bar { a: 1, b: 3 };
+ 
+     match x.partial_cmp(&y) {
+         Option::Some(Ordering::Less) => print("less"),
+         Option::Some(Ordering::Greater) => print("greater"),
+         Option::Some(Ordering::Equal) => print("equal"),
+         _ => print("none"),
+     }
+ 
+     0
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/basic_partial_ord2.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/basic_partial_ord2.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/basic_partial_ord2.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/basic_partial_ord2.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,197 ----
+ /* { dg-output "<><=>=\r*" } */
+ /* { dg-options "-w" } */
+ mod core {
+     mod option {
+         pub enum Option<T> {
+             None,
+             Some(T),
+         }
+     }
+ 
+     mod marker {
+         #[lang = "phantom_data"]
+         pub struct PhantomData<T: ?Sized>;
+ 
+         #[lang = "structural_peq"]
+         pub trait StructuralPartialEq {}
+ 
+         #[lang = "structural_teq"]
+         pub trait StructuralEq {}
+ 
+         #[lang = "sized"]
+         pub trait Sized {}
+     }
+ 
+     mod cmp {
+         use super::marker::Sized;
+         use super::option::Option;
+ 
+         pub enum Ordering {
+             Less = -1,
+             Equal = 0,
+             Greater = 1,
+         }
+ 
+         #[lang = "eq"]
+         pub trait PartialEq<Rhs: ?Sized = Self> {
+             fn eq(&self, other: &Rhs) -> bool;
+ 
+             fn ne(&self, other: &Rhs) -> bool {
+                 !self.eq(other)
+             }
+         }
+ 
+         pub trait Eq: PartialEq<Self> {
+             fn assert_receiver_is_total_eq(&self) {}
+         }
+ 
+         #[lang = "partial_ord"]
+         pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
+             fn partial_cmp(&self, other: &Rhs) -> Option<Ordering>;
+ 
+             fn lt(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Less) => true,
+                     _ => false,
+                 }
+             }
+ 
+             fn le(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Less) | Option::Some(Ordering::Equal) => true,
+                     _ => false,
+                 }
+             }
+ 
+             fn gt(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Greater) => true,
+                     _ => false,
+                 }
+             }
+ 
+             fn ge(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Greater) | Option::Some(Ordering::Equal) => true,
+                     _ => false,
+                 }
+             }
+         }
+ 
+         pub trait Ord: Eq + PartialOrd<Self> {
+             fn cmp(&self, other: &Self) -> Ordering;
+         }
+     }
+ }
+ 
+ use core::cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd};
+ use core::option::Option;
+ 
+ // Needed impls for primitives
+ impl PartialEq for i32 {
+     fn eq(&self, other: &Self) -> bool {
+         *self == *other
+     }
+ }
+ 
+ impl PartialOrd for i32 {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         if *self < *other {
+             Option::Some(Ordering::Less)
+         } else if *self > *other {
+             Option::Some(Ordering::Greater)
+         } else {
+             Option::Some(Ordering::Equal)
+         }
+     }
+ 
+     fn lt(&self, other: &Self) -> bool {
+         *self < *other
+     }
+     fn le(&self, other: &Self) -> bool {
+         *self <= *other
+     }
+     fn ge(&self, other: &Self) -> bool {
+         *self >= *other
+     }
+     fn gt(&self, other: &Self) -> bool {
+         *self > *other
+     }
+ }
+ 
+ impl Eq for i32 {}
+ impl Ord for i32 {
+     fn cmp(&self, other: &Self) -> Ordering {
+         if *self < *other {
+             Ordering::Less
+         } else if *self > *other {
+             Ordering::Greater
+         } else {
+             Ordering::Equal
+         }
+     }
+ }
+ 
+ // Manual impl for struct Bar
+ struct Bar {
+     a: i32,
+     b: i32,
+ }
+ 
+ impl PartialEq for Bar {
+     fn eq(&self, other: &Self) -> bool {
+         self.a.eq(&other.a) && self.b.eq(&other.b)
+     }
+ }
+ 
+ impl Eq for Bar {}
+ 
+ impl PartialOrd for Bar {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         match self.a.partial_cmp(&other.a) {
+             Option::Some(Ordering::Equal) => self.b.partial_cmp(&other.b),
+             ord => ord,
+         }
+     }
+ }
+ 
+ impl Ord for Bar {
+     fn cmp(&self, other: &Self) -> Ordering {
+         match self.a.cmp(&other.a) {
+             Ordering::Equal => self.b.cmp(&other.b),
+             ord => ord,
+         }
+     }
+ }
+ 
+ // External print shim
+ extern "C" {
+     fn printf(s: *const i8);
+ }
+ 
+ fn print(s: &str) {
+     unsafe {
+         printf(s as *const str as *const i8);
+     }
+ }
+ 
+ fn main() -> i32 {
+     let a = Bar { a: 1, b: 2 };
+     let b = Bar { a: 1, b: 3 };
+     let c = Bar { a: 1, b: 2 };
+ 
+     if a < b {
+         print("<");
+     }
+     if b > a {
+         print(">");
+     }
+     if a <= c {
+         print("<=");
+     }
+     if b >= c {
+         print(">=");
+     }
+ 
+     0
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/builtin_abort.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/builtin_abort.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/builtin_abort.rs	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/builtin_abort.rs	Sun Aug 10 22:32:56 2025
*************** mod intrinsics {
*** 9,14 ****
  }
  
  pub fn main () -> i32 {
!     abort();
      0
  }
--- 9,14 ----
  }
  
  pub fn main () -> i32 {
!     intrinsics::abort();
      0
  }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/const-generics-1.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/const-generics-1.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/const-generics-1.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/const-generics-1.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,24 ----
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ struct Foo<const N: usize>;
+ 
+ impl Foo<1> {
+     fn call(&self) -> i32 {
+         10
+     }
+ }
+ 
+ impl Foo<2> {
+     fn call(&self) -> i32 {
+         20
+     }
+ }
+ 
+ fn main() -> i32 {
+     let a = Foo::<1> {};
+     let b = Foo::<2> {};
+     let aa = a.call();
+     let bb = b.call();
+     bb - aa - 10
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/const_block1.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/const_block1.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/const_block1.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/const_block1.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,9 ----
+ const X: i32 = const {
+     let a = 15;
+     let b = 14;
+     a + b
+ };
+ 
+ fn main() -> i32 {
+     X - 29
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/derive-partialeq2.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/derive-partialeq2.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/derive-partialeq2.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/derive-partialeq2.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,80 ----
+ // { dg-output "true\r*\nfalse\r*\nfalse\r*\nfalse\r*\nfalse\r*\n" }
+ 
+ #![feature(intrinsics)]
+ 
+ pub mod core {
+     pub mod intrinsics {
+         #[lang = "discriminant_kind"]
+         pub trait DiscriminantKind {
+             #[lang = "discriminant_type"]
+             type Discriminant;
+         }
+ 
+         extern "rust-intrinsic" {
+             pub fn discriminant_value<T>(v: &T) -> <T as DiscriminantKind>::Discriminant;
+         }
+     }
+ }
+ 
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ #[lang = "copy"]
+ trait Copy {}
+ 
+ #[lang = "structural_peq"]
+ trait StructuralPartialEq {}
+ 
+ #[lang = "eq"]
+ pub trait PartialEq<Rhs: ?Sized = Self> {
+     /// This method tests for `self` and `other` values to be equal, and is used
+     /// by `==`.
+     #[must_use]
+     #[stable(feature = "rust1", since = "1.0.0")]
+     fn eq(&self, other: &Rhs) -> bool;
+ 
+     /// This method tests for `!=`.
+     #[inline]
+     #[must_use]
+     #[stable(feature = "rust1", since = "1.0.0")]
+     fn ne(&self, other: &Rhs) -> bool {
+         !self.eq(other)
+     }
+ }
+ 
+ #[derive(PartialEq)]
+ enum Foo {
+     A { a: i32, b: i32 },
+     B(i32, i32),
+     C,
+ }
+ 
+ extern "C" {
+     fn puts(s: *const i8);
+ }
+ 
+ fn print(b: bool) {
+     if b {
+         unsafe { puts("true\0" as *const str as *const i8) }
+     } else {
+         unsafe { puts("false\0" as *const str as *const i8) }
+     }
+ }
+ 
+ fn main() -> i32 {
+     let x = Foo::A { a: 15, b: 14 };
+ 
+     let b1 = x == Foo::A { a: 15, b: 14 };
+     let b12 = x == Foo::A { a: 15, b: 19 };
+     let b13 = x == Foo::A { a: 19, b: 14 };
+     let b2 = x == Foo::B(15, 14);
+     let b3 = x == Foo::C;
+ 
+     print(b1);
+     print(b12);
+     print(b13);
+     print(b2);
+     print(b3);
+ 
+     0
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/for-loop1.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/for-loop1.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/for-loop1.rs	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/for-loop1.rs	Sun Aug 10 22:32:56 2025
*************** mod ptr {
*** 102,131 ****
      #[lang = "const_ptr"]
      impl<T> *const T {
          pub unsafe fn offset(self, count: isize) -> *const T {
!             intrinsics::offset(self, count)
          }
      }
  
      #[lang = "mut_ptr"]
      impl<T> *mut T {
          pub unsafe fn offset(self, count: isize) -> *mut T {
!             intrinsics::offset(self, count) as *mut T
          }
      }
  
      pub unsafe fn swap_nonoverlapping<T>(x: *mut T, y: *mut T, count: usize) {
          let x = x as *mut u8;
          let y = y as *mut u8;
!         let len = mem::size_of::<T>() * count;
          swap_nonoverlapping_bytes(x, y, len)
      }
  
      pub unsafe fn swap_nonoverlapping_one<T>(x: *mut T, y: *mut T) {
          // For types smaller than the block optimization below,
          // just swap directly to avoid pessimizing codegen.
!         if mem::size_of::<T>() < 32 {
              let z = read(x);
!             intrinsics::copy_nonoverlapping(y, x, 1);
              write(y, z);
          } else {
              swap_nonoverlapping(x, y, 1);
--- 102,131 ----
      #[lang = "const_ptr"]
      impl<T> *const T {
          pub unsafe fn offset(self, count: isize) -> *const T {
!             crate::intrinsics::offset(self, count)
          }
      }
  
      #[lang = "mut_ptr"]
      impl<T> *mut T {
          pub unsafe fn offset(self, count: isize) -> *mut T {
!             crate::intrinsics::offset(self, count) as *mut T
          }
      }
  
      pub unsafe fn swap_nonoverlapping<T>(x: *mut T, y: *mut T, count: usize) {
          let x = x as *mut u8;
          let y = y as *mut u8;
!         let len = crate::mem::size_of::<T>() * count;
          swap_nonoverlapping_bytes(x, y, len)
      }
  
      pub unsafe fn swap_nonoverlapping_one<T>(x: *mut T, y: *mut T) {
          // For types smaller than the block optimization below,
          // just swap directly to avoid pessimizing codegen.
!         if crate::mem::size_of::<T>() < 32 {
              let z = read(x);
!             crate::intrinsics::copy_nonoverlapping(y, x, 1);
              write(y, z);
          } else {
              swap_nonoverlapping(x, y, 1);
*************** mod ptr {
*** 133,144 ****
      }
  
      pub unsafe fn write<T>(dst: *mut T, src: T) {
!         intrinsics::move_val_init(&mut *dst, src)
      }
  
      pub unsafe fn read<T>(src: *const T) -> T {
!         let mut tmp: T = mem::uninitialized();
!         intrinsics::copy_nonoverlapping(src, &mut tmp, 1);
          tmp
      }
  
--- 133,144 ----
      }
  
      pub unsafe fn write<T>(dst: *mut T, src: T) {
!         crate::intrinsics::move_val_init(&mut *dst, src)
      }
  
      pub unsafe fn read<T>(src: *const T) -> T {
!         let mut tmp: T = crate::mem::uninitialized();
!         crate::intrinsics::copy_nonoverlapping(src, &mut tmp, 1);
          tmp
      }
  
*************** mod ptr {
*** 146,152 ****
          struct Block(u64, u64, u64, u64);
          struct UnalignedBlock(u64, u64, u64, u64);
  
!         let block_size = mem::size_of::<Block>();
  
          // Loop through x & y, copying them `Block` at a time
          // The optimizer should unroll the loop fully for most types
--- 146,152 ----
          struct Block(u64, u64, u64, u64);
          struct UnalignedBlock(u64, u64, u64, u64);
  
!         let block_size = crate::mem::size_of::<Block>();
  
          // Loop through x & y, copying them `Block` at a time
          // The optimizer should unroll the loop fully for most types
*************** mod ptr {
*** 155,185 ****
          while i + block_size <= len {
              // Create some uninitialized memory as scratch space
              // Declaring `t` here avoids aligning the stack when this loop is unused
!             let mut t: Block = mem::uninitialized();
              let t = &mut t as *mut _ as *mut u8;
              let x = x.offset(i as isize);
              let y = y.offset(i as isize);
  
              // Swap a block of bytes of x & y, using t as a temporary buffer
              // This should be optimized into efficient SIMD operations where available
!             intrinsics::copy_nonoverlapping(x, t, block_size);
!             intrinsics::copy_nonoverlapping(y, x, block_size);
!             intrinsics::copy_nonoverlapping(t, y, block_size);
              i += block_size;
          }
  
          if i < len {
              // Swap any remaining bytes
!             let mut t: UnalignedBlock = mem::uninitialized();
              let rem = len - i;
  
              let t = &mut t as *mut _ as *mut u8;
              let x = x.offset(i as isize);
              let y = y.offset(i as isize);
  
!             intrinsics::copy_nonoverlapping(x, t, rem);
!             intrinsics::copy_nonoverlapping(y, x, rem);
!             intrinsics::copy_nonoverlapping(t, y, rem);
          }
      }
  }
--- 155,185 ----
          while i + block_size <= len {
              // Create some uninitialized memory as scratch space
              // Declaring `t` here avoids aligning the stack when this loop is unused
!             let mut t: Block = crate::mem::uninitialized();
              let t = &mut t as *mut _ as *mut u8;
              let x = x.offset(i as isize);
              let y = y.offset(i as isize);
  
              // Swap a block of bytes of x & y, using t as a temporary buffer
              // This should be optimized into efficient SIMD operations where available
!             crate::intrinsics::copy_nonoverlapping(x, t, block_size);
!             crate::intrinsics::copy_nonoverlapping(y, x, block_size);
!             crate::intrinsics::copy_nonoverlapping(t, y, block_size);
              i += block_size;
          }
  
          if i < len {
              // Swap any remaining bytes
!             let mut t: UnalignedBlock = crate::mem::uninitialized();
              let rem = len - i;
  
              let t = &mut t as *mut _ as *mut u8;
              let x = x.offset(i as isize);
              let y = y.offset(i as isize);
  
!             crate::intrinsics::copy_nonoverlapping(x, t, rem);
!             crate::intrinsics::copy_nonoverlapping(y, x, rem);
!             crate::intrinsics::copy_nonoverlapping(t, y, rem);
          }
      }
  }
*************** mod mem {
*** 194,200 ****
  
      pub fn swap<T>(x: &mut T, y: &mut T) {
          unsafe {
!             ptr::swap_nonoverlapping_one(x, y);
          }
      }
  
--- 194,200 ----
  
      pub fn swap<T>(x: &mut T, y: &mut T) {
          unsafe {
!             crate::ptr::swap_nonoverlapping_one(x, y);
          }
      }
  
*************** mod mem {
*** 204,210 ****
      }
  
      pub unsafe fn uninitialized<T>() -> T {
!         intrinsics::uninit()
      }
  }
  
--- 204,210 ----
      }
  
      pub unsafe fn uninitialized<T>() -> T {
!         crate::intrinsics::uninit()
      }
  }
  
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/for-loop2.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/for-loop2.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/for-loop2.rs	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/for-loop2.rs	Sun Aug 10 22:32:56 2025
*************** mod ptr {
*** 101,130 ****
      #[lang = "const_ptr"]
      impl<T> *const T {
          pub unsafe fn offset(self, count: isize) -> *const T {
!             intrinsics::offset(self, count)
          }
      }
  
      #[lang = "mut_ptr"]
      impl<T> *mut T {
          pub unsafe fn offset(self, count: isize) -> *mut T {
!             intrinsics::offset(self, count) as *mut T
          }
      }
  
      pub unsafe fn swap_nonoverlapping<T>(x: *mut T, y: *mut T, count: usize) {
          let x = x as *mut u8;
          let y = y as *mut u8;
!         let len = mem::size_of::<T>() * count;
          swap_nonoverlapping_bytes(x, y, len)
      }
  
      pub unsafe fn swap_nonoverlapping_one<T>(x: *mut T, y: *mut T) {
          // For types smaller than the block optimization below,
          // just swap directly to avoid pessimizing codegen.
!         if mem::size_of::<T>() < 32 {
              let z = read(x);
!             intrinsics::copy_nonoverlapping(y, x, 1);
              write(y, z);
          } else {
              swap_nonoverlapping(x, y, 1);
--- 101,130 ----
      #[lang = "const_ptr"]
      impl<T> *const T {
          pub unsafe fn offset(self, count: isize) -> *const T {
!             crate::intrinsics::offset(self, count)
          }
      }
  
      #[lang = "mut_ptr"]
      impl<T> *mut T {
          pub unsafe fn offset(self, count: isize) -> *mut T {
!             crate::intrinsics::offset(self, count) as *mut T
          }
      }
  
      pub unsafe fn swap_nonoverlapping<T>(x: *mut T, y: *mut T, count: usize) {
          let x = x as *mut u8;
          let y = y as *mut u8;
!         let len = crate::mem::size_of::<T>() * count;
          swap_nonoverlapping_bytes(x, y, len)
      }
  
      pub unsafe fn swap_nonoverlapping_one<T>(x: *mut T, y: *mut T) {
          // For types smaller than the block optimization below,
          // just swap directly to avoid pessimizing codegen.
!         if crate::mem::size_of::<T>() < 32 {
              let z = read(x);
!             crate::intrinsics::copy_nonoverlapping(y, x, 1);
              write(y, z);
          } else {
              swap_nonoverlapping(x, y, 1);
*************** mod ptr {
*** 132,143 ****
      }
  
      pub unsafe fn write<T>(dst: *mut T, src: T) {
!         intrinsics::move_val_init(&mut *dst, src)
      }
  
      pub unsafe fn read<T>(src: *const T) -> T {
!         let mut tmp: T = mem::uninitialized();
!         intrinsics::copy_nonoverlapping(src, &mut tmp, 1);
          tmp
      }
  
--- 132,143 ----
      }
  
      pub unsafe fn write<T>(dst: *mut T, src: T) {
!         crate::intrinsics::move_val_init(&mut *dst, src)
      }
  
      pub unsafe fn read<T>(src: *const T) -> T {
!         let mut tmp: T = crate::mem::uninitialized();
!         crate::intrinsics::copy_nonoverlapping(src, &mut tmp, 1);
          tmp
      }
  
*************** mod ptr {
*** 145,151 ****
          struct Block(u64, u64, u64, u64);
          struct UnalignedBlock(u64, u64, u64, u64);
  
!         let block_size = mem::size_of::<Block>();
  
          // Loop through x & y, copying them `Block` at a time
          // The optimizer should unroll the loop fully for most types
--- 145,151 ----
          struct Block(u64, u64, u64, u64);
          struct UnalignedBlock(u64, u64, u64, u64);
  
!         let block_size = crate::mem::size_of::<Block>();
  
          // Loop through x & y, copying them `Block` at a time
          // The optimizer should unroll the loop fully for most types
*************** mod ptr {
*** 154,184 ****
          while i + block_size <= len {
              // Create some uninitialized memory as scratch space
              // Declaring `t` here avoids aligning the stack when this loop is unused
!             let mut t: Block = mem::uninitialized();
              let t = &mut t as *mut _ as *mut u8;
              let x = x.offset(i as isize);
              let y = y.offset(i as isize);
  
              // Swap a block of bytes of x & y, using t as a temporary buffer
              // This should be optimized into efficient SIMD operations where available
!             intrinsics::copy_nonoverlapping(x, t, block_size);
!             intrinsics::copy_nonoverlapping(y, x, block_size);
!             intrinsics::copy_nonoverlapping(t, y, block_size);
              i += block_size;
          }
  
          if i < len {
              // Swap any remaining bytes
!             let mut t: UnalignedBlock = mem::uninitialized();
              let rem = len - i;
  
              let t = &mut t as *mut _ as *mut u8;
              let x = x.offset(i as isize);
              let y = y.offset(i as isize);
  
!             intrinsics::copy_nonoverlapping(x, t, rem);
!             intrinsics::copy_nonoverlapping(y, x, rem);
!             intrinsics::copy_nonoverlapping(t, y, rem);
          }
      }
  }
--- 154,184 ----
          while i + block_size <= len {
              // Create some uninitialized memory as scratch space
              // Declaring `t` here avoids aligning the stack when this loop is unused
!             let mut t: Block = crate::mem::uninitialized();
              let t = &mut t as *mut _ as *mut u8;
              let x = x.offset(i as isize);
              let y = y.offset(i as isize);
  
              // Swap a block of bytes of x & y, using t as a temporary buffer
              // This should be optimized into efficient SIMD operations where available
!             crate::intrinsics::copy_nonoverlapping(x, t, block_size);
!             crate::intrinsics::copy_nonoverlapping(y, x, block_size);
!             crate::intrinsics::copy_nonoverlapping(t, y, block_size);
              i += block_size;
          }
  
          if i < len {
              // Swap any remaining bytes
!             let mut t: UnalignedBlock = crate::mem::uninitialized();
              let rem = len - i;
  
              let t = &mut t as *mut _ as *mut u8;
              let x = x.offset(i as isize);
              let y = y.offset(i as isize);
  
!             crate::intrinsics::copy_nonoverlapping(x, t, rem);
!             crate::intrinsics::copy_nonoverlapping(y, x, rem);
!             crate::intrinsics::copy_nonoverlapping(t, y, rem);
          }
      }
  }
*************** mod mem {
*** 193,199 ****
  
      pub fn swap<T>(x: &mut T, y: &mut T) {
          unsafe {
!             ptr::swap_nonoverlapping_one(x, y);
          }
      }
  
--- 193,199 ----
  
      pub fn swap<T>(x: &mut T, y: &mut T) {
          unsafe {
!             crate::ptr::swap_nonoverlapping_one(x, y);
          }
      }
  
*************** mod mem {
*** 203,209 ****
      }
  
      pub unsafe fn uninitialized<T>() -> T {
!         intrinsics::uninit()
      }
  }
  
--- 203,209 ----
      }
  
      pub unsafe fn uninitialized<T>() -> T {
!         crate::intrinsics::uninit()
      }
  }
  
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/impl_desugar-2.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/impl_desugar-2.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/impl_desugar-2.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/impl_desugar-2.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,32 ----
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ macro_rules! impl_foo {
+ 	() => { impl Foo }
+ }
+ 
+ pub trait Foo {}
+ 
+ pub trait Bar {
+     type Baz;
+ }
+ 
+ struct MyBaz; // { dg-warning "struct is never constructed" }
+ impl Foo for MyBaz {}
+ 
+ struct MyBar;
+ 
+ impl Bar for MyBar {
+     type Baz = MyBaz;
+ }
+ 
+ pub fn foo(_value: impl Bar<Baz = impl_foo!()>) -> i32 {
+     15
+ }
+ 
+ fn main() -> i32 {
+     let bar = MyBar;
+     let result: i32 = foo(bar);
+ 
+     result - 15
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/impl_desugar.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/impl_desugar.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/impl_desugar.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/impl_desugar.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,32 ----
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ pub trait Foo {}
+ 
+ pub trait Bar {
+     type Baz;
+ }
+ 
+ struct MyBaz; // { dg-warning "struct is never constructed" }
+ impl Foo for MyBaz {}
+ 
+ struct MyBar;
+ 
+ impl Bar for MyBar {
+     type Baz = MyBaz;
+ }
+ 
+ pub fn foo<T, U>(_value: T) -> i32
+ where
+     T: Bar<Baz = U>,
+     U: Foo,
+ {
+     15
+ }
+ 
+ fn main() -> i32 {
+     let bar = MyBar;
+     let result: i32 = foo::<MyBar, MyBaz>(bar);
+ 
+     result - 15
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/impl_rpit1.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/impl_rpit1.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/impl_rpit1.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/impl_rpit1.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,28 ----
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ trait Foo {
+     fn id(&self) -> i32;
+ }
+ 
+ struct Thing(i32);
+ 
+ impl Foo for Thing {
+     fn id(&self) -> i32 {
+         self.0
+     }
+ }
+ 
+ fn make_thing(a: i32) -> impl Foo {
+     Thing(a)
+ }
+ 
+ fn use_foo(f: impl Foo) -> i32 {
+     f.id()
+ }
+ 
+ fn main() -> i32 {
+     let value = make_thing(42);
+     let val = use_foo(value);
+     val - 42
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/impl_rpit2.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/impl_rpit2.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/impl_rpit2.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/impl_rpit2.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,36 ----
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ trait Foo {
+     fn id(&self) -> i32;
+ }
+ 
+ struct Thing(i32);
+ 
+ impl Thing {
+     fn double(&self) -> i32 {
+         // { dg-warning "associated function is never used: .double." "" { target *-*-* } .-1 }
+         self.0 * 2
+     }
+ }
+ 
+ impl Foo for Thing {
+     fn id(&self) -> i32 {
+         self.0
+     }
+ }
+ 
+ fn make_thing(a: i32) -> impl Foo {
+     Thing(a)
+ }
+ 
+ fn use_foo(f: impl Foo) -> i32 {
+     f.id()
+ }
+ 
+ fn main() -> i32 {
+     let value = make_thing(21);
+     let id = use_foo(value);
+ 
+     id - 21
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/impl_rpit3.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/impl_rpit3.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/impl_rpit3.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/impl_rpit3.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,25 ----
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ trait Foo {
+     fn id(&self) -> i32;
+ }
+ 
+ struct Thing(i32);
+ 
+ impl Foo for Thing {
+     fn id(&self) -> i32 {
+         self.0
+     }
+ }
+ 
+ fn make_thing() -> impl Foo {
+     Thing(99)
+ }
+ 
+ fn main() -> i32 {
+     let v = make_thing();
+     let r = &v;
+     let val = r.id();
+     val - 99
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/impl_trait1.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/impl_trait1.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/impl_trait1.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/impl_trait1.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,31 ----
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ pub trait Value {
+     fn get(&self) -> i32;
+ }
+ 
+ struct Foo(i32);
+ struct Bar(i32);
+ 
+ impl Value for Foo {
+     fn get(&self) -> i32 {
+         self.0
+     }
+ }
+ impl Value for Bar {
+     fn get(&self) -> i32 {
+         self.0
+     }
+ }
+ 
+ pub fn foo(a: impl Value, b: impl Value) -> i32 {
+     a.get() + b.get()
+ }
+ 
+ fn main() -> i32 {
+     let a = Foo(1);
+     let b = Bar(2);
+ 
+     foo(a, b) - 3
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/impl_trait2.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/impl_trait2.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/impl_trait2.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/impl_trait2.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,31 ----
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ pub trait Value {
+     fn get(&self) -> i32;
+ }
+ 
+ struct Foo(i32);
+ struct Bar(i32);
+ 
+ impl Value for Foo {
+     fn get(&self) -> i32 {
+         self.0
+     }
+ }
+ impl Value for Bar {
+     fn get(&self) -> i32 {
+         self.0
+     }
+ }
+ 
+ pub fn foo(a: &impl Value, b: &impl Value) -> i32 {
+     a.get() + b.get()
+ }
+ 
+ fn main() -> i32 {
+     let a = Foo(1);
+     let b = Bar(2);
+ 
+     foo(&a, &b) - 3
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/impl_trait3.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/impl_trait3.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/impl_trait3.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/impl_trait3.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,45 ----
+ /* { dg-output "Hello from Message\r*\n" } */
+ #[lang = "sized"]
+ pub trait Sized {}
+ 
+ extern "C" {
+     fn printf(s: *const i8, ...);
+ }
+ 
+ trait Speak {
+     fn speak(&self) -> &'static str;
+ }
+ 
+ trait Printer {
+     fn print(&self, input: impl Speak);
+ }
+ 
+ struct Console;
+ 
+ impl Printer for Console {
+     fn print(&self, input: impl Speak) {
+         unsafe {
+             let a = input.speak();
+             let b = a as *const str;
+             let c = b as *const i8;
+ 
+             printf(c);
+         }
+     }
+ }
+ 
+ struct Message(&'static str);
+ 
+ impl Speak for Message {
+     fn speak(&self) -> &'static str {
+         self.0
+     }
+ }
+ 
+ fn main() -> i32 {
+     let c = Console;
+     let msg = Message("Hello from Message\n");
+     c.print(msg);
+ 
+     0
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/impl_trait4.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/impl_trait4.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/impl_trait4.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/impl_trait4.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,31 ----
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ trait Foo {
+     fn id(&self) -> i32;
+ }
+ 
+ struct A(i32);
+ struct B(i32);
+ 
+ impl Foo for A {
+     fn id(&self) -> i32 {
+         self.0
+     }
+ }
+ 
+ impl Foo for B {
+     fn id(&self) -> i32 {
+         self.0
+     }
+ }
+ 
+ fn takes_tuple(pair: (impl Foo, impl Foo)) -> i32 {
+     pair.0.id() + pair.1.id()
+ }
+ 
+ fn main() -> i32 {
+     let a = A(1);
+     let b = B(2);
+     takes_tuple((a, b)) - 3
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/issue-1481.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/issue-1481.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/issue-1481.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/issue-1481.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,35 ----
+ /* { dg-output "called Foo::print\\(\\)\r*" } */
+ /* { dg-options "-w" } */
+ 
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ trait Printable {
+     fn print(&self);
+ }
+ 
+ struct Foo;
+ 
+ impl Printable for Foo {
+     fn print(&self) {
+         // Simulate output
+         unsafe {
+             puts("called Foo::print()\0" as *const _ as *const i8);
+         }
+     }
+ }
+ 
+ fn get_printable() -> impl Printable {
+     Foo
+ }
+ 
+ extern "C" {
+     fn puts(s: *const i8);
+ }
+ 
+ fn main() -> i32 {
+     let p = get_printable();
+     p.print();
+ 
+     0
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/issue-1482.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/issue-1482.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/issue-1482.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/issue-1482.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,23 ----
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ #[lang = "fn_once"]
+ pub trait FnOnce<Args> {
+     #[lang = "fn_once_output"]
+     type Output;
+ 
+     extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
+ }
+ 
+ fn takes_fn(a: i32, f: impl FnOnce(i32) -> i32) -> i32 {
+     f(a)
+ }
+ 
+ pub fn main() -> i32 {
+     let capture = 2;
+     let a = |i: i32| {
+         let b = i + capture;
+         b
+     };
+     takes_fn(1, a) - 3
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/issue-2005.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/issue-2005.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/issue-2005.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/issue-2005.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,465 ----
+ // { dg-additional-options "-w" }
+ /* { dg-output "WORKS\r?\n" } */
+ #![feature(intrinsics)]
+ 
+ mod core {
+     mod option {
+         // #[rustc_diagnostic_item = "option_type"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub enum Option<T> {
+             /// No value
+             #[lang = "None"]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             None,
+             /// Some value `T`
+             #[lang = "Some"]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+         }
+     }
+ 
+     mod marker {
+         #[lang = "phantom_data"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub struct PhantomData<T: ?Sized>;
+ 
+         #[unstable(feature = "structural_match", issue = "31434")]
+         // #[rustc_on_unimplemented(message = "the type `{Self}` does not `#[derive(PartialEq)]`")]
+         #[lang = "structural_peq"]
+         pub trait StructuralPartialEq {
+             // Empty.
+         }
+ 
+         #[unstable(feature = "structural_match", issue = "31434")]
+         // #[rustc_on_unimplemented(message = "the type `{Self}` does not `#[derive(Eq)]`")]
+         #[lang = "structural_teq"]
+         pub trait StructuralEq {
+             // Empty.
+         }
+ 
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[lang = "sized"]
+         // #[rustc_on_unimplemented(
+         //     message = "the size for values of type `{Self}` cannot be known at compilation time",
+         //     label = "doesn't have a size known at compile-time"
+         // )]
+         // #[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
+         // #[rustc_specialization_trait]
+         pub trait Sized {
+             // Empty.
+         }
+     }
+ 
+     mod cmp {
+         use super::marker::Sized;
+         use super::option::Option;
+ 
+         // #[derive(Clone, Copy, PartialEq, Debug, Hash)]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub enum Ordering {
+             /// An ordering where a compared value is less than another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Less = -1,
+             /// An ordering where a compared value is equal to another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Equal = 0,
+             /// An ordering where a compared value is greater than another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Greater = 1,
+         }
+ 
+         #[lang = "eq"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[doc(alias = "==")]
+         #[doc(alias = "!=")]
+         // #[rustc_on_unimplemented(
+         //     message = "can't compare `{Self}` with `{Rhs}`",
+         //     label = "no implementation for `{Self} == {Rhs}`"
+         // )]
+         pub trait PartialEq<Rhs: ?Sized = Self> {
+             /// This method tests for `self` and `other` values to be equal, and is used
+             /// by `==`.
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn eq(&self, other: &Rhs) -> bool;
+ 
+             fn ne(&self, other: &Rhs) -> bool {
+                 !self.eq(other)
+             }
+         }
+ 
+         #[doc(alias = "==")]
+         #[doc(alias = "!=")]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub trait Eq: PartialEq<Self> {
+             // this method is used solely by #[deriving] to assert
+             // that every component of a type implements #[deriving]
+             // itself, the current deriving infrastructure means doing this
+             // assertion without using a method on this trait is nearly
+             // impossible.
+             //
+             // This should never be implemented by hand.
+             #[doc(hidden)]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn assert_receiver_is_total_eq(&self) {}
+         }
+ 
+         #[lang = "partial_ord"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[doc(alias = ">")]
+         #[doc(alias = "<")]
+         #[doc(alias = "<=")]
+         #[doc(alias = ">=")]
+         // #[rustc_on_unimplemented(
+         //     message = "can't compare `{Self}` with `{Rhs}`",
+         //     label = "no implementation for `{Self} < {Rhs}` and `{Self} > {Rhs}`"
+         // )]
+         pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
+             /// This method returns an ordering between `self` and `other` values if one exists.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// use std::cmp::Ordering;
+             ///
+             /// let result = 1.0.partial_cmp(&2.0);
+             /// assert_eq!(result, Some(Ordering::Less));
+             ///
+             /// let result = 1.0.partial_cmp(&1.0);
+             /// assert_eq!(result, Some(Ordering::Equal));
+             ///
+             /// let result = 2.0.partial_cmp(&1.0);
+             /// assert_eq!(result, Some(Ordering::Greater));
+             /// ```
+             ///
+             /// When comparison is impossible:
+             ///
+             /// ```
+             /// let result = f64::NAN.partial_cmp(&1.0);
+             /// assert_eq!(result, None);
+             /// ```
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn partial_cmp(&self, other: &Rhs) -> Option<Ordering>;
+ 
+             /// This method tests less than (for `self` and `other`) and is used by the `<` operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 < 2.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 < 1.0;
+             /// assert_eq!(result, false);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn lt(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Less) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests less than or equal to (for `self` and `other`) and is used by the `<=`
+             /// operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 <= 2.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 <= 2.0;
+             /// assert_eq!(result, true);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn le(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Less | Ordering::Equal) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests greater than (for `self` and `other`) and is used by the `>` operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 > 2.0;
+             /// assert_eq!(result, false);
+             ///
+             /// let result = 2.0 > 2.0;
+             /// assert_eq!(result, false);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn gt(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Greater) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests greater than or equal to (for `self` and `other`) and is used by the `>=`
+             /// operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 2.0 >= 1.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 >= 2.0;
+             /// assert_eq!(result, true);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn ge(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Greater | Ordering::Equal) => true,
+                     _ => false,
+                 }
+             }
+         }
+ 
+         #[doc(alias = "<")]
+         #[doc(alias = ">")]
+         #[doc(alias = "<=")]
+         #[doc(alias = ">=")]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub trait Ord: Eq + PartialOrd<Self> {
+             /// This method returns an [`Ordering`] between `self` and `other`.
+             ///
+             /// By convention, `self.cmp(&other)` returns the ordering matching the expression
+             /// `self <operator> other` if true.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// use std::cmp::Ordering;
+             ///
+             /// assert_eq!(5.cmp(&10), Ordering::Less);
+             /// assert_eq!(10.cmp(&5), Ordering::Greater);
+             /// assert_eq!(5.cmp(&5), Ordering::Equal);
+             /// ```
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn cmp(&self, other: &Self) -> Ordering;
+ 
+             /// Compares and returns the maximum of two values.
+             ///
+             /// Returns the second argument if the comparison determines them to be equal.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// assert_eq!(2, 1.max(2));
+             /// assert_eq!(2, 2.max(2));
+             /// ```
+             #[stable(feature = "ord_max_min", since = "1.21.0")]
+             #[must_use]
+             fn max(self, other: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 self
+             }
+ 
+             /// Compares and returns the minimum of two values.
+             ///
+             /// Returns the first argument if the comparison determines them to be equal.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// assert_eq!(1, 1.min(2));
+             /// assert_eq!(2, 2.min(2));
+             /// ```
+             #[stable(feature = "ord_max_min", since = "1.21.0")]
+             #[must_use]
+             fn min(self, other: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 self
+             }
+ 
+             /// Restrict a value to a certain interval.
+             ///
+             /// Returns `max` if `self` is greater than `max`, and `min` if `self` is
+             /// less than `min`. Otherwise this returns `self`.
+             ///
+             /// # Panics
+             ///
+             /// Panics if `min > max`.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// #![feature(clamp)]
+             ///
+             /// assert!((-3).clamp(-2, 1) == -2);
+             /// assert!(0.clamp(-2, 1) == 0);
+             /// assert!(2.clamp(-2, 1) == 1);
+             /// ```
+             #[must_use]
+             #[unstable(feature = "clamp", issue = "44095")]
+             fn clamp(self, min: Self, max: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 if self < min {
+                     min
+                 } else if self > max {
+                     max
+                 } else {
+                     self
+                 }
+             }
+         }
+     }
+ 
+     pub mod intrinsics {
+         #[lang = "discriminant_kind"]
+         pub trait DiscriminantKind {
+             #[lang = "discriminant_type"]
+             type Discriminant;
+         }
+ 
+         extern "rust-intrinsic" {
+             pub fn discriminant_value<T>(v: &T) -> <T as DiscriminantKind>::Discriminant;
+         }
+     }
+ }
+ 
+ use core::cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd};
+ use core::marker::Sized;
+ use core::option::Option;
+ 
+ // --------------
+ 
+ impl PartialEq for isize {
+     fn eq(&self, other: &Self) -> bool {
+         *self == *other
+     }
+ }
+ 
+ impl PartialOrd for isize {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         if *self > *other {
+             Option::Some(Ordering::Greater)
+         } else if *self < *other {
+             Option::Some(Ordering::Less)
+         } else {
+             Option::Some(Ordering::Equal)
+         }
+     }
+ 
+     fn lt(&self, other: &Self) -> bool {
+         *self < *other
+     }
+     fn le(&self, other: &Self) -> bool {
+         *self <= *other
+     }
+     fn ge(&self, other: &Self) -> bool {
+         *self >= *other
+     }
+     fn gt(&self, other: &Self) -> bool {
+         *self > *other
+     }
+ }
+ 
+ impl Eq for isize {}
+ 
+ impl Ord for isize {
+     fn cmp(&self, other: &Self) -> Ordering {
+         if *self > *other {
+             Ordering::Greater
+         } else if *self < *other {
+             Ordering::Less
+         } else {
+             Ordering::Equal
+         }
+     }
+ }
+ 
+ // ----------------------------------
+ 
+ impl PartialEq for i32 {
+     fn eq(&self, other: &Self) -> bool {
+         *self == *other
+     }
+ }
+ 
+ impl PartialOrd for i32 {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         if *self > *other {
+             Option::Some(Ordering::Greater)
+         } else if *self < *other {
+             Option::Some(Ordering::Less)
+         } else {
+             Option::Some(Ordering::Equal)
+         }
+     }
+ 
+     fn lt(&self, other: &Self) -> bool {
+         *self < *other
+     }
+     fn le(&self, other: &Self) -> bool {
+         *self <= *other
+     }
+     fn ge(&self, other: &Self) -> bool {
+         *self >= *other
+     }
+     fn gt(&self, other: &Self) -> bool {
+         *self > *other
+     }
+ }
+ 
+ impl Ord for i32 {
+     fn cmp(&self, other: &Self) -> Ordering {
+         if *self > *other {
+             Ordering::Greater
+         } else if *self < *other {
+             Ordering::Less
+         } else {
+             Ordering::Equal
+         }
+     }
+ }
+ 
+ impl Eq for i32 {}
+ 
+ #[derive(Ord, PartialOrd, PartialEq, Eq)]
+ enum Foo {
+     A,
+     B(i32),
+ }
+ 
+ extern "C" {
+     fn puts(s: *const i8);
+ }
+ 
+ fn print(s: &str) {
+     unsafe {
+         puts(s as *const str as *const i8);
+     }
+ }
+ 
+ fn main() -> i32 {
+     let a = Foo::A;
+     let b = Foo::B(15);
+ 
+     if (a != b) {
+         print("WORKS");
+     }
+ 
+     0
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/issue-3836.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/issue-3836.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/issue-3836.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/issue-3836.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,454 ----
+ // { dg-options "-w" }
+ // { dg-output "less\r*\n" }
+ 
+ #![feature(intrinsics)]
+ 
+ mod core {
+     mod option {
+         // #[rustc_diagnostic_item = "option_type"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub enum Option<T> {
+             /// No value
+             #[lang = "None"]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             None,
+             /// Some value `T`
+             #[lang = "Some"]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+         }
+     }
+ 
+     mod marker {
+         #[lang = "phantom_data"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub struct PhantomData<T: ?Sized>;
+ 
+         #[unstable(feature = "structural_match", issue = "31434")]
+         // #[rustc_on_unimplemented(message = "the type `{Self}` does not `#[derive(PartialEq)]`")]
+         #[lang = "structural_peq"]
+         pub trait StructuralPartialEq {
+             // Empty.
+         }
+ 
+         #[unstable(feature = "structural_match", issue = "31434")]
+         // #[rustc_on_unimplemented(message = "the type `{Self}` does not `#[derive(Eq)]`")]
+         #[lang = "structural_teq"]
+         pub trait StructuralEq {
+             // Empty.
+         }
+ 
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[lang = "sized"]
+         // #[rustc_on_unimplemented(
+         //     message = "the size for values of type `{Self}` cannot be known at compilation time",
+         //     label = "doesn't have a size known at compile-time"
+         // )]
+         // #[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
+         // #[rustc_specialization_trait]
+         pub trait Sized {
+             // Empty.
+         }
+     }
+ 
+     mod cmp {
+         use super::marker::Sized;
+         use super::option::Option;
+ 
+         // #[derive(Clone, Copy, PartialEq, Debug, Hash)]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub enum Ordering {
+             /// An ordering where a compared value is less than another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Less = -1,
+             /// An ordering where a compared value is equal to another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Equal = 0,
+             /// An ordering where a compared value is greater than another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Greater = 1,
+         }
+ 
+         #[lang = "eq"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[doc(alias = "==")]
+         #[doc(alias = "!=")]
+         // #[rustc_on_unimplemented(
+         //     message = "can't compare `{Self}` with `{Rhs}`",
+         //     label = "no implementation for `{Self} == {Rhs}`"
+         // )]
+         pub trait PartialEq<Rhs: ?Sized = Self> {
+             /// This method tests for `self` and `other` values to be equal, and is used
+             /// by `==`.
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn eq(&self, other: &Rhs) -> bool;
+ 
+             fn ne(&self, other: &Rhs) -> bool {
+                 !self.eq(other)
+             }
+         }
+ 
+         #[doc(alias = "==")]
+         #[doc(alias = "!=")]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub trait Eq: PartialEq<Self> {
+             // this method is used solely by #[deriving] to assert
+             // that every component of a type implements #[deriving]
+             // itself, the current deriving infrastructure means doing this
+             // assertion without using a method on this trait is nearly
+             // impossible.
+             //
+             // This should never be implemented by hand.
+             #[doc(hidden)]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn assert_receiver_is_total_eq(&self) {}
+         }
+ 
+         #[lang = "partial_ord"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[doc(alias = ">")]
+         #[doc(alias = "<")]
+         #[doc(alias = "<=")]
+         #[doc(alias = ">=")]
+         // #[rustc_on_unimplemented(
+         //     message = "can't compare `{Self}` with `{Rhs}`",
+         //     label = "no implementation for `{Self} < {Rhs}` and `{Self} > {Rhs}`"
+         // )]
+         pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
+             /// This method returns an ordering between `self` and `other` values if one exists.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// use std::cmp::Ordering;
+             ///
+             /// let result = 1.0.partial_cmp(&2.0);
+             /// assert_eq!(result, Some(Ordering::Less));
+             ///
+             /// let result = 1.0.partial_cmp(&1.0);
+             /// assert_eq!(result, Some(Ordering::Equal));
+             ///
+             /// let result = 2.0.partial_cmp(&1.0);
+             /// assert_eq!(result, Some(Ordering::Greater));
+             /// ```
+             ///
+             /// When comparison is impossible:
+             ///
+             /// ```
+             /// let result = f64::NAN.partial_cmp(&1.0);
+             /// assert_eq!(result, None);
+             /// ```
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn partial_cmp(&self, other: &Rhs) -> Option<Ordering>;
+ 
+             /// This method tests less than (for `self` and `other`) and is used by the `<` operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 < 2.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 < 1.0;
+             /// assert_eq!(result, false);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn lt(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Less) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests less than or equal to (for `self` and `other`) and is used by the `<=`
+             /// operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 <= 2.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 <= 2.0;
+             /// assert_eq!(result, true);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn le(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Less | Ordering::Equal) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests greater than (for `self` and `other`) and is used by the `>` operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 > 2.0;
+             /// assert_eq!(result, false);
+             ///
+             /// let result = 2.0 > 2.0;
+             /// assert_eq!(result, false);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn gt(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Greater) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests greater than or equal to (for `self` and `other`) and is used by the `>=`
+             /// operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 2.0 >= 1.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 >= 2.0;
+             /// assert_eq!(result, true);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn ge(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Greater | Ordering::Equal) => true,
+                     _ => false,
+                 }
+             }
+         }
+ 
+         #[doc(alias = "<")]
+         #[doc(alias = ">")]
+         #[doc(alias = "<=")]
+         #[doc(alias = ">=")]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub trait Ord: Eq + PartialOrd<Self> {
+             /// This method returns an [`Ordering`] between `self` and `other`.
+             ///
+             /// By convention, `self.cmp(&other)` returns the ordering matching the expression
+             /// `self <operator> other` if true.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// use std::cmp::Ordering;
+             ///
+             /// assert_eq!(5.cmp(&10), Ordering::Less);
+             /// assert_eq!(10.cmp(&5), Ordering::Greater);
+             /// assert_eq!(5.cmp(&5), Ordering::Equal);
+             /// ```
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn cmp(&self, other: &Self) -> Ordering;
+ 
+             /// Compares and returns the maximum of two values.
+             ///
+             /// Returns the second argument if the comparison determines them to be equal.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// assert_eq!(2, 1.max(2));
+             /// assert_eq!(2, 2.max(2));
+             /// ```
+             #[stable(feature = "ord_max_min", since = "1.21.0")]
+             #[must_use]
+             fn max(self, other: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 self
+             }
+ 
+             /// Compares and returns the minimum of two values.
+             ///
+             /// Returns the first argument if the comparison determines them to be equal.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// assert_eq!(1, 1.min(2));
+             /// assert_eq!(2, 2.min(2));
+             /// ```
+             #[stable(feature = "ord_max_min", since = "1.21.0")]
+             #[must_use]
+             fn min(self, other: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 self
+             }
+ 
+             /// Restrict a value to a certain interval.
+             ///
+             /// Returns `max` if `self` is greater than `max`, and `min` if `self` is
+             /// less than `min`. Otherwise this returns `self`.
+             ///
+             /// # Panics
+             ///
+             /// Panics if `min > max`.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// #![feature(clamp)]
+             ///
+             /// assert!((-3).clamp(-2, 1) == -2);
+             /// assert!(0.clamp(-2, 1) == 0);
+             /// assert!(2.clamp(-2, 1) == 1);
+             /// ```
+             #[must_use]
+             #[unstable(feature = "clamp", issue = "44095")]
+             fn clamp(self, min: Self, max: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 if self < min {
+                     min
+                 } else if self > max {
+                     max
+                 } else {
+                     self
+                 }
+             }
+         }
+     }
+ 
+     pub mod intrinsics {
+         #[lang = "discriminant_kind"]
+         pub trait DiscriminantKind {
+             #[lang = "discriminant_type"]
+             type Discriminant;
+         }
+ 
+         extern "rust-intrinsic" {
+             pub fn discriminant_value<T>(v: &T) -> <T as DiscriminantKind>::Discriminant;
+         }
+     }
+ }
+ 
+ use core::cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd};
+ use core::marker::Sized;
+ use core::option::Option;
+ 
+ // for comparing discriminant_value
+ impl PartialEq for isize {
+     fn eq(&self, other: &Self) -> bool {
+         *self == *other
+     }
+ }
+ 
+ // for comparing discriminant_value
+ impl PartialOrd for isize {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         if *self > *other {
+             Option::Some(Ordering::Greater)
+         } else if *self < *other {
+             Option::Some(Ordering::Less)
+         } else {
+             Option::Some(Ordering::Equal)
+         }
+     }
+ 
+     fn lt(&self, other: &Self) -> bool {
+         *self < *other
+     }
+     fn le(&self, other: &Self) -> bool {
+         *self <= *other
+     }
+     fn ge(&self, other: &Self) -> bool {
+         *self >= *other
+     }
+     fn gt(&self, other: &Self) -> bool {
+         *self > *other
+     }
+ }
+ 
+ impl PartialEq for i32 {
+     fn eq(&self, other: &Self) -> bool {
+         *self == *other
+     }
+ }
+ impl Eq for i32 {}
+ 
+ impl PartialOrd for i32 {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         if *self > *other {
+             Option::Some(Ordering::Greater)
+         } else if *self < *other {
+             Option::Some(Ordering::Less)
+         } else {
+             Option::Some(Ordering::Equal)
+         }
+     }
+ 
+     fn lt(&self, other: &Self) -> bool {
+         *self < *other
+     }
+     fn le(&self, other: &Self) -> bool {
+         *self <= *other
+     }
+     fn ge(&self, other: &Self) -> bool {
+         *self >= *other
+     }
+     fn gt(&self, other: &Self) -> bool {
+         *self > *other
+     }
+ }
+ 
+ impl Ord for i32 {
+     fn cmp(&self, other: &Self) -> Ordering {
+         if *self > *other {
+             Ordering::Greater
+         } else if *self < *other {
+             Ordering::Less
+         } else {
+             Ordering::Equal
+         }
+     }
+ }
+ 
+ // ------------
+ 
+ #[derive(Ord, PartialOrd, PartialEq, Eq)]
+ struct Bar {
+     a: i32,
+     b: i32,
+ }
+ 
+ extern "C" {
+     fn puts(s: *const i8);
+ }
+ 
+ fn print(s: &str) {
+     unsafe {
+         puts(s as *const str as *const i8);
+     }
+ }
+ 
+ fn main() -> i32 {
+     let x = Bar { a: 1, b: 2 };
+     let y = Bar { a: 1, b: 3 };
+ 
+     match x.partial_cmp(&y) {
+         Option::Some(Ordering::Less) => print("less"),
+         Option::Some(Ordering::Greater) => print("greater"),
+         Option::Some(Ordering::Equal) => print("equal"),
+         _ => print("none"),
+     }
+ 
+     0
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/iter1.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/iter1.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/iter1.rs	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/iter1.rs	Sun Aug 10 22:32:56 2025
*************** mod ptr {
*** 99,128 ****
      #[lang = "const_ptr"]
      impl<T> *const T {
          pub unsafe fn offset(self, count: isize) -> *const T {
!             intrinsics::offset(self, count)
          }
      }
  
      #[lang = "mut_ptr"]
      impl<T> *mut T {
          pub unsafe fn offset(self, count: isize) -> *mut T {
!             intrinsics::offset(self, count) as *mut T
          }
      }
  
      pub unsafe fn swap_nonoverlapping<T>(x: *mut T, y: *mut T, count: usize) {
          let x = x as *mut u8;
          let y = y as *mut u8;
!         let len = mem::size_of::<T>() * count;
          swap_nonoverlapping_bytes(x, y, len)
      }
  
      pub unsafe fn swap_nonoverlapping_one<T>(x: *mut T, y: *mut T) {
          // For types smaller than the block optimization below,
          // just swap directly to avoid pessimizing codegen.
!         if mem::size_of::<T>() < 32 {
              let z = read(x);
!             intrinsics::copy_nonoverlapping(y, x, 1);
              write(y, z);
          } else {
              swap_nonoverlapping(x, y, 1);
--- 99,128 ----
      #[lang = "const_ptr"]
      impl<T> *const T {
          pub unsafe fn offset(self, count: isize) -> *const T {
!             crate::intrinsics::offset(self, count)
          }
      }
  
      #[lang = "mut_ptr"]
      impl<T> *mut T {
          pub unsafe fn offset(self, count: isize) -> *mut T {
!             crate::intrinsics::offset(self, count) as *mut T
          }
      }
  
      pub unsafe fn swap_nonoverlapping<T>(x: *mut T, y: *mut T, count: usize) {
          let x = x as *mut u8;
          let y = y as *mut u8;
!         let len = crate::mem::size_of::<T>() * count;
          swap_nonoverlapping_bytes(x, y, len)
      }
  
      pub unsafe fn swap_nonoverlapping_one<T>(x: *mut T, y: *mut T) {
          // For types smaller than the block optimization below,
          // just swap directly to avoid pessimizing codegen.
!         if crate::mem::size_of::<T>() < 32 {
              let z = read(x);
!             crate::intrinsics::copy_nonoverlapping(y, x, 1);
              write(y, z);
          } else {
              swap_nonoverlapping(x, y, 1);
*************** mod ptr {
*** 130,141 ****
      }
  
      pub unsafe fn write<T>(dst: *mut T, src: T) {
!         intrinsics::move_val_init(&mut *dst, src)
      }
  
      pub unsafe fn read<T>(src: *const T) -> T {
!         let mut tmp: T = mem::uninitialized();
!         intrinsics::copy_nonoverlapping(src, &mut tmp, 1);
          tmp
      }
  
--- 130,141 ----
      }
  
      pub unsafe fn write<T>(dst: *mut T, src: T) {
!         crate::intrinsics::move_val_init(&mut *dst, src)
      }
  
      pub unsafe fn read<T>(src: *const T) -> T {
!         let mut tmp: T = crate::mem::uninitialized();
!         crate::intrinsics::copy_nonoverlapping(src, &mut tmp, 1);
          tmp
      }
  
*************** mod ptr {
*** 143,149 ****
          struct Block(u64, u64, u64, u64);
          struct UnalignedBlock(u64, u64, u64, u64);
  
!         let block_size = mem::size_of::<Block>();
  
          // Loop through x & y, copying them `Block` at a time
          // The optimizer should unroll the loop fully for most types
--- 143,149 ----
          struct Block(u64, u64, u64, u64);
          struct UnalignedBlock(u64, u64, u64, u64);
  
!         let block_size = crate::mem::size_of::<Block>();
  
          // Loop through x & y, copying them `Block` at a time
          // The optimizer should unroll the loop fully for most types
*************** mod ptr {
*** 152,182 ****
          while i + block_size <= len {
              // Create some uninitialized memory as scratch space
              // Declaring `t` here avoids aligning the stack when this loop is unused
!             let mut t: Block = mem::uninitialized();
              let t = &mut t as *mut _ as *mut u8;
              let x = x.offset(i as isize);
              let y = y.offset(i as isize);
  
              // Swap a block of bytes of x & y, using t as a temporary buffer
              // This should be optimized into efficient SIMD operations where available
!             intrinsics::copy_nonoverlapping(x, t, block_size);
!             intrinsics::copy_nonoverlapping(y, x, block_size);
!             intrinsics::copy_nonoverlapping(t, y, block_size);
              i += block_size;
          }
  
          if i < len {
              // Swap any remaining bytes
!             let mut t: UnalignedBlock = mem::uninitialized();
              let rem = len - i;
  
              let t = &mut t as *mut _ as *mut u8;
              let x = x.offset(i as isize);
              let y = y.offset(i as isize);
  
!             intrinsics::copy_nonoverlapping(x, t, rem);
!             intrinsics::copy_nonoverlapping(y, x, rem);
!             intrinsics::copy_nonoverlapping(t, y, rem);
          }
      }
  }
--- 152,182 ----
          while i + block_size <= len {
              // Create some uninitialized memory as scratch space
              // Declaring `t` here avoids aligning the stack when this loop is unused
!             let mut t: Block = crate::mem::uninitialized();
              let t = &mut t as *mut _ as *mut u8;
              let x = x.offset(i as isize);
              let y = y.offset(i as isize);
  
              // Swap a block of bytes of x & y, using t as a temporary buffer
              // This should be optimized into efficient SIMD operations where available
!             crate::intrinsics::copy_nonoverlapping(x, t, block_size);
!             crate::intrinsics::copy_nonoverlapping(y, x, block_size);
!             crate::intrinsics::copy_nonoverlapping(t, y, block_size);
              i += block_size;
          }
  
          if i < len {
              // Swap any remaining bytes
!             let mut t: UnalignedBlock = crate::mem::uninitialized();
              let rem = len - i;
  
              let t = &mut t as *mut _ as *mut u8;
              let x = x.offset(i as isize);
              let y = y.offset(i as isize);
  
!             crate::intrinsics::copy_nonoverlapping(x, t, rem);
!             crate::intrinsics::copy_nonoverlapping(y, x, rem);
!             crate::intrinsics::copy_nonoverlapping(t, y, rem);
          }
      }
  }
*************** mod mem {
*** 191,197 ****
  
      pub fn swap<T>(x: &mut T, y: &mut T) {
          unsafe {
!             ptr::swap_nonoverlapping_one(x, y);
          }
      }
  
--- 191,197 ----
  
      pub fn swap<T>(x: &mut T, y: &mut T) {
          unsafe {
!             crate::ptr::swap_nonoverlapping_one(x, y);
          }
      }
  
*************** mod mem {
*** 201,207 ****
      }
  
      pub unsafe fn uninitialized<T>() -> T {
!         intrinsics::uninit()
      }
  }
  
--- 201,207 ----
      }
  
      pub unsafe fn uninitialized<T>() -> T {
!         crate::intrinsics::uninit()
      }
  }
  
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/match-identifierpattern.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/match-identifierpattern.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/match-identifierpattern.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/match-identifierpattern.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,10 ----
+ fn main() -> i32 {
+     let mut x = 2;
+ 
+     match x {
+         a @ 2 => { x = a + 1 },
+         _ => {}
+     }
+ 
+     x - 3
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/match-restpattern-tuple.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/match-restpattern-tuple.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/match-restpattern-tuple.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/match-restpattern-tuple.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,27 ----
+ // { dg-output "correct\r*" }
+ extern "C" {
+     fn puts(s: *const i8);
+ }
+ 
+ fn main() -> i32 {
+     let x = (1, 2, 3, 4);
+     let mut ret = 1;
+ 
+     match x {
+         (1, .., 2, 4) => {
+             /* should not take this path */
+             unsafe { puts("wrong\0" as *const str as *const i8) }
+         },
+         (2, ..) => {
+             /* should not take this path */
+             unsafe { puts("wrong\0" as *const str as *const i8) }
+         },
+         (b, .., 4) => { 
+             ret -= b;
+             unsafe { puts("correct\0" as *const str as *const i8) }
+         },
+         _ => {}
+     }
+ 
+     ret
+ }
\ No newline at end of file
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/match-slicepattern-array-1.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/match-slicepattern-array-1.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/match-slicepattern-array-1.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/match-slicepattern-array-1.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,23 ----
+ // { dg-output "correct\r*" }
+ extern "C" {
+     fn puts(s: *const i8);
+ }
+ 
+ fn main() -> i32 {
+     let a = [0, 1];
+     let mut ret = 1;
+ 
+     match a {
+         [0, 0] => {
+             /* should not take this path */
+             unsafe { puts("wrong\0" as *const str as *const i8) }
+         },
+         [0, b] => {
+             ret -= b;
+             unsafe { puts("correct\0" as *const str as *const i8) }
+         },
+         _ => {}
+     }
+ 
+     ret
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/match-slicepattern-slice-1.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/match-slicepattern-slice-1.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/match-slicepattern-slice-1.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/match-slicepattern-slice-1.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,24 ----
+ // { dg-output "correct\r*" }
+ extern "C" {
+     fn puts(s: *const i8);
+ }
+ 
+ fn main() -> i32 {
+     let arr = [0, 1];
+     let a: &[i32] = &arr;
+     let mut ret = 1;
+ 
+     match a {
+         [0, 0] => {
+             /* should not take this path */
+             unsafe { puts("wrong\0" as *const str as *const i8) }
+         },
+         [0, b] => {
+             ret -= b;
+             unsafe { puts("correct\0" as *const str as *const i8) }
+         },
+         _ => {}
+     }
+ 
+     ret
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/match-tuplestructpattern.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/match-tuplestructpattern.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/match-tuplestructpattern.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/match-tuplestructpattern.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,12 ----
+ fn main() -> i32 {
+     struct A (i32, i32);
+     let a = A (0, 1);
+     let mut ret = 1;
+ 
+     match a {
+         A (0, b) => { ret -= b },
+         _ => {}
+     }
+ 
+     ret
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/min_specialization2.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/min_specialization2.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/min_specialization2.rs	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/min_specialization2.rs	Sun Aug 10 22:32:56 2025
*************** trait Foo {
*** 8,14 ****
  }
  
  impl<T> Foo for T {
!     default fn foo(&self) -> i32 { // { dg-warning "unused" }
          15
      }
  }
--- 8,14 ----
  }
  
  impl<T> Foo for T {
!     default fn foo(&self) -> i32 {
          15
      }
  }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/name_resolution.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/name_resolution.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/name_resolution.rs	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/name_resolution.rs	Sun Aug 10 22:32:56 2025
***************
*** 1,4 ****
- // { dg-additional-options "-frust-name-resolution-2.0" }
  // { dg-output "Value is 10\r*\n" }
  
  const BAZ: i32 = 10;
--- 1,3 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/offset_of1.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/offset_of1.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/offset_of1.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/offset_of1.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,16 ----
+ // { dg-do run { target x86_64*-*-* } }
+ // { dg-additional-options "-frust-assume-builtin-offset-of" }
+ 
+ pub struct Foo {
+     pub a: i32,
+     pub b: i32,
+ }
+ 
+ fn main() -> i32 {
+     let a = offset_of!(Foo, a); // valid
+     let b = offset_of!(Foo, b); // valid
+ 
+     let res = a + b - 4;
+ 
+     res as i32
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/partial-eq-1.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/partial-eq-1.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/partial-eq-1.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/partial-eq-1.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,103 ----
+ /* { dg-output "a == b\r*\na != c\r*\n" }*/
+ /* { dg-options "-w" } */
+ 
+ mod core {
+     mod marker {
+         #[lang = "phantom_data"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub struct PhantomData<T: ?Sized>;
+ 
+         #[unstable(feature = "structural_match", issue = "31434")]
+         #[lang = "structural_peq"]
+         pub trait StructuralPartialEq {
+             // Empty.
+         }
+ 
+         #[unstable(feature = "structural_match", issue = "31434")]
+         #[lang = "structural_teq"]
+         pub trait StructuralEq {
+             // Empty.
+         }
+ 
+         #[lang = "sized"]
+         pub trait Sized {}
+     }
+ 
+     pub mod cmp {
+         use super::marker::Sized;
+ 
+         #[lang = "eq"]
+         pub trait PartialEq<Rhs: ?Sized = Self> {
+             fn eq(&self, other: &Rhs) -> bool;
+ 
+             fn ne(&self, other: &Rhs) -> bool {
+                 !self.eq(other)
+             }
+         }
+ 
+         pub trait Eq: PartialEq<Self> {
+             fn assert_receiver_is_total_eq(&self) {}
+         }
+     }
+ }
+ 
+ use core::cmp::{Eq, PartialEq};
+ 
+ // PartialEq for i32 and u32 so we can compare across types
+ impl PartialEq<u32> for i32 {
+     fn eq(&self, other: &u32) -> bool {
+         *self >= 0 && (*self as u32) == *other
+     }
+ }
+ impl PartialEq<i32> for u32 {
+     fn eq(&self, other: &i32) -> bool {
+         *other >= 0 && *self == *other as u32
+     }
+ }
+ 
+ // Our generic struct
+ struct Foo<T> {
+     value: T,
+ }
+ 
+ // Manual impl of PartialEq for different generic params
+ impl<T, U> PartialEq<Foo<U>> for Foo<T>
+ where
+     T: PartialEq<U>,
+ {
+     fn eq(&self, other: &Foo<U>) -> bool {
+         self.value.eq(&other.value)
+     }
+ }
+ 
+ impl<T: PartialEq> Eq for Foo<T> {}
+ 
+ extern "C" {
+     fn puts(s: *const i8);
+ }
+ 
+ fn print(s: &str) {
+     unsafe {
+         puts(s as *const str as *const i8);
+     }
+ }
+ 
+ fn main() -> i32 {
+     let a = Foo { value: 42i32 };
+     let b = Foo { value: 42u32 };
+     let c = Foo { value: 7u32 };
+ 
+     if a == b {
+         print("a == b");
+     } else {
+         print("a != b");
+     }
+ 
+     if a == c {
+         print("a == c");
+     } else {
+         print("a != c");
+     }
+ 
+     0
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/partial-eq-2.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/partial-eq-2.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/partial-eq-2.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/partial-eq-2.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,60 ----
+ /* { dg-output "a == b\r*\na != c\r*\n" }*/
+ /* { dg-options "-w" } */
+ 
+ #[lang = "sized"]
+ pub trait Sized {}
+ 
+ #[lang = "eq"]
+ pub trait PartialEq<Rhs: ?Sized = Self> {
+     fn eq(&self, other: &Rhs) -> bool;
+ 
+     fn ne(&self, other: &Rhs) -> bool {
+         !self.eq(other)
+     }
+ }
+ 
+ impl PartialEq for i32 {
+     fn eq(&self, other: &Self) -> bool {
+         *self == *other
+     }
+ }
+ 
+ struct Foo<T> {
+     value: T,
+ }
+ 
+ impl<T: PartialEq> PartialEq for Foo<T> {
+     fn eq(&self, other: &Self) -> bool {
+         self.value.eq(&other.value)
+     }
+ }
+ 
+ extern "C" {
+     fn puts(s: *const i8);
+ }
+ 
+ fn print(s: &str) {
+     unsafe {
+         puts(s as *const str as *const i8);
+     }
+ }
+ 
+ fn main() -> i32 {
+     let a = Foo { value: 42i32 };
+     let b = Foo { value: 42i32 };
+     let c = Foo { value: 99i32 };
+ 
+     if a == b {
+         print("a == b");
+     } else {
+         print("a != b");
+     }
+ 
+     if a == c {
+         print("a == c");
+     } else {
+         print("a != c");
+     }
+ 
+     0
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/partial-eq-3.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/partial-eq-3.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/partial-eq-3.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/partial-eq-3.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,457 ----
+ /* { dg-output "a == b\r*\na != c\r*\n" }*/
+ /* { dg-options "-w" } */
+ 
+ #![feature(intrinsics)]
+ 
+ mod core {
+     mod option {
+         // #[rustc_diagnostic_item = "option_type"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub enum Option<T> {
+             /// No value
+             #[lang = "None"]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             None,
+             /// Some value `T`
+             #[lang = "Some"]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+         }
+     }
+ 
+     mod marker {
+         #[lang = "phantom_data"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub struct PhantomData<T: ?Sized>;
+ 
+         #[unstable(feature = "structural_match", issue = "31434")]
+         // #[rustc_on_unimplemented(message = "the type `{Self}` does not `#[derive(PartialEq)]`")]
+         #[lang = "structural_peq"]
+         pub trait StructuralPartialEq {
+             // Empty.
+         }
+ 
+         #[unstable(feature = "structural_match", issue = "31434")]
+         // #[rustc_on_unimplemented(message = "the type `{Self}` does not `#[derive(Eq)]`")]
+         #[lang = "structural_teq"]
+         pub trait StructuralEq {
+             // Empty.
+         }
+ 
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[lang = "sized"]
+         // #[rustc_on_unimplemented(
+         //     message = "the size for values of type `{Self}` cannot be known at compilation time",
+         //     label = "doesn't have a size known at compile-time"
+         // )]
+         // #[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
+         // #[rustc_specialization_trait]
+         pub trait Sized {
+             // Empty.
+         }
+     }
+ 
+     mod cmp {
+         use super::marker::Sized;
+         use super::option::Option;
+ 
+         // #[derive(Clone, Copy, PartialEq, Debug, Hash)]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub enum Ordering {
+             /// An ordering where a compared value is less than another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Less = -1,
+             /// An ordering where a compared value is equal to another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Equal = 0,
+             /// An ordering where a compared value is greater than another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Greater = 1,
+         }
+ 
+         #[lang = "eq"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[doc(alias = "==")]
+         #[doc(alias = "!=")]
+         // #[rustc_on_unimplemented(
+         //     message = "can't compare `{Self}` with `{Rhs}`",
+         //     label = "no implementation for `{Self} == {Rhs}`"
+         // )]
+         pub trait PartialEq<Rhs: ?Sized = Self> {
+             /// This method tests for `self` and `other` values to be equal, and is used
+             /// by `==`.
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn eq(&self, other: &Rhs) -> bool;
+ 
+             fn ne(&self, other: &Rhs) -> bool {
+                 !self.eq(other)
+             }
+         }
+ 
+         #[doc(alias = "==")]
+         #[doc(alias = "!=")]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub trait Eq: PartialEq<Self> {
+             // this method is used solely by #[deriving] to assert
+             // that every component of a type implements #[deriving]
+             // itself, the current deriving infrastructure means doing this
+             // assertion without using a method on this trait is nearly
+             // impossible.
+             //
+             // This should never be implemented by hand.
+             #[doc(hidden)]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn assert_receiver_is_total_eq(&self) {}
+         }
+ 
+         #[lang = "partial_ord"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[doc(alias = ">")]
+         #[doc(alias = "<")]
+         #[doc(alias = "<=")]
+         #[doc(alias = ">=")]
+         // #[rustc_on_unimplemented(
+         //     message = "can't compare `{Self}` with `{Rhs}`",
+         //     label = "no implementation for `{Self} < {Rhs}` and `{Self} > {Rhs}`"
+         // )]
+         pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
+             /// This method returns an ordering between `self` and `other` values if one exists.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// use std::cmp::Ordering;
+             ///
+             /// let result = 1.0.partial_cmp(&2.0);
+             /// assert_eq!(result, Some(Ordering::Less));
+             ///
+             /// let result = 1.0.partial_cmp(&1.0);
+             /// assert_eq!(result, Some(Ordering::Equal));
+             ///
+             /// let result = 2.0.partial_cmp(&1.0);
+             /// assert_eq!(result, Some(Ordering::Greater));
+             /// ```
+             ///
+             /// When comparison is impossible:
+             ///
+             /// ```
+             /// let result = f64::NAN.partial_cmp(&1.0);
+             /// assert_eq!(result, None);
+             /// ```
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn partial_cmp(&self, other: &Rhs) -> Option<Ordering>;
+ 
+             /// This method tests less than (for `self` and `other`) and is used by the `<` operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 < 2.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 < 1.0;
+             /// assert_eq!(result, false);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn lt(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Less) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests less than or equal to (for `self` and `other`) and is used by the `<=`
+             /// operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 <= 2.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 <= 2.0;
+             /// assert_eq!(result, true);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn le(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Less | Ordering::Equal) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests greater than (for `self` and `other`) and is used by the `>` operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 > 2.0;
+             /// assert_eq!(result, false);
+             ///
+             /// let result = 2.0 > 2.0;
+             /// assert_eq!(result, false);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn gt(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Greater) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests greater than or equal to (for `self` and `other`) and is used by the `>=`
+             /// operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 2.0 >= 1.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 >= 2.0;
+             /// assert_eq!(result, true);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn ge(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Greater | Ordering::Equal) => true,
+                     _ => false,
+                 }
+             }
+         }
+ 
+         #[doc(alias = "<")]
+         #[doc(alias = ">")]
+         #[doc(alias = "<=")]
+         #[doc(alias = ">=")]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub trait Ord: Eq + PartialOrd<Self> {
+             /// This method returns an [`Ordering`] between `self` and `other`.
+             ///
+             /// By convention, `self.cmp(&other)` returns the ordering matching the expression
+             /// `self <operator> other` if true.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// use std::cmp::Ordering;
+             ///
+             /// assert_eq!(5.cmp(&10), Ordering::Less);
+             /// assert_eq!(10.cmp(&5), Ordering::Greater);
+             /// assert_eq!(5.cmp(&5), Ordering::Equal);
+             /// ```
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn cmp(&self, other: &Self) -> Ordering;
+ 
+             /// Compares and returns the maximum of two values.
+             ///
+             /// Returns the second argument if the comparison determines them to be equal.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// assert_eq!(2, 1.max(2));
+             /// assert_eq!(2, 2.max(2));
+             /// ```
+             #[stable(feature = "ord_max_min", since = "1.21.0")]
+             #[must_use]
+             fn max(self, other: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 self
+             }
+ 
+             /// Compares and returns the minimum of two values.
+             ///
+             /// Returns the first argument if the comparison determines them to be equal.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// assert_eq!(1, 1.min(2));
+             /// assert_eq!(2, 2.min(2));
+             /// ```
+             #[stable(feature = "ord_max_min", since = "1.21.0")]
+             #[must_use]
+             fn min(self, other: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 self
+             }
+ 
+             /// Restrict a value to a certain interval.
+             ///
+             /// Returns `max` if `self` is greater than `max`, and `min` if `self` is
+             /// less than `min`. Otherwise this returns `self`.
+             ///
+             /// # Panics
+             ///
+             /// Panics if `min > max`.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// #![feature(clamp)]
+             ///
+             /// assert!((-3).clamp(-2, 1) == -2);
+             /// assert!(0.clamp(-2, 1) == 0);
+             /// assert!(2.clamp(-2, 1) == 1);
+             /// ```
+             #[must_use]
+             #[unstable(feature = "clamp", issue = "44095")]
+             fn clamp(self, min: Self, max: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 if self < min {
+                     min
+                 } else if self > max {
+                     max
+                 } else {
+                     self
+                 }
+             }
+         }
+     }
+ 
+     pub mod intrinsics {
+         #[lang = "discriminant_kind"]
+         pub trait DiscriminantKind {
+             #[lang = "discriminant_type"]
+             type Discriminant;
+         }
+ 
+         extern "rust-intrinsic" {
+             pub fn discriminant_value<T>(v: &T) -> <T as DiscriminantKind>::Discriminant;
+         }
+     }
+ }
+ 
+ use core::cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd};
+ use core::marker::Sized;
+ use core::option::Option;
+ 
+ // for comparing discriminant_value
+ impl PartialEq for isize {
+     fn eq(&self, other: &Self) -> bool {
+         *self == *other
+     }
+ }
+ 
+ // for comparing discriminant_value
+ impl PartialOrd for isize {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         if *self > *other {
+             Option::Some(Ordering::Greater)
+         } else if *self < *other {
+             Option::Some(Ordering::Less)
+         } else {
+             Option::Some(Ordering::Equal)
+         }
+     }
+ 
+     fn lt(&self, other: &Self) -> bool {
+         *self < *other
+     }
+     fn le(&self, other: &Self) -> bool {
+         *self <= *other
+     }
+     fn ge(&self, other: &Self) -> bool {
+         *self >= *other
+     }
+     fn gt(&self, other: &Self) -> bool {
+         *self > *other
+     }
+ }
+ 
+ impl PartialEq for i32 {
+     fn eq(&self, other: &Self) -> bool {
+         *self == *other
+     }
+ }
+ impl Eq for i32 {}
+ 
+ impl PartialOrd for i32 {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         if *self > *other {
+             Option::Some(Ordering::Greater)
+         } else if *self < *other {
+             Option::Some(Ordering::Less)
+         } else {
+             Option::Some(Ordering::Equal)
+         }
+     }
+ 
+     fn lt(&self, other: &Self) -> bool {
+         *self < *other
+     }
+     fn le(&self, other: &Self) -> bool {
+         *self <= *other
+     }
+     fn ge(&self, other: &Self) -> bool {
+         *self >= *other
+     }
+     fn gt(&self, other: &Self) -> bool {
+         *self > *other
+     }
+ }
+ 
+ impl Ord for i32 {
+     fn cmp(&self, other: &Self) -> Ordering {
+         if *self > *other {
+             Ordering::Greater
+         } else if *self < *other {
+             Ordering::Less
+         } else {
+             Ordering::Equal
+         }
+     }
+ }
+ 
+ #[derive(PartialEq)]
+ struct Foo {
+     a: i32,
+ }
+ 
+ extern "C" {
+     fn puts(s: *const i8);
+ }
+ 
+ fn print(s: &str) {
+     unsafe {
+         puts(s as *const str as *const i8);
+     }
+ }
+ 
+ fn main() -> i32 {
+     let a = Foo { a: 42i32 };
+     let b = Foo { a: 42i32 };
+     let c = Foo { a: 7i32 };
+ 
+     if a == b {
+         print("a == b");
+     } else {
+         print("a != b");
+     }
+ 
+     if a == c {
+         print("a == c");
+     } else {
+         print("a != c");
+     }
+ 
+     0
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/partial-eq-4.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/partial-eq-4.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/partial-eq-4.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/partial-eq-4.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,457 ----
+ /* { dg-output "a == b\r*\na != c\r*\n" }*/
+ /* { dg-options "-w" } */
+ 
+ #![feature(intrinsics)]
+ 
+ mod core {
+     mod option {
+         // #[rustc_diagnostic_item = "option_type"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub enum Option<T> {
+             /// No value
+             #[lang = "None"]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             None,
+             /// Some value `T`
+             #[lang = "Some"]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+         }
+     }
+ 
+     mod marker {
+         #[lang = "phantom_data"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub struct PhantomData<T: ?Sized>;
+ 
+         #[unstable(feature = "structural_match", issue = "31434")]
+         // #[rustc_on_unimplemented(message = "the type `{Self}` does not `#[derive(PartialEq)]`")]
+         #[lang = "structural_peq"]
+         pub trait StructuralPartialEq {
+             // Empty.
+         }
+ 
+         #[unstable(feature = "structural_match", issue = "31434")]
+         // #[rustc_on_unimplemented(message = "the type `{Self}` does not `#[derive(Eq)]`")]
+         #[lang = "structural_teq"]
+         pub trait StructuralEq {
+             // Empty.
+         }
+ 
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[lang = "sized"]
+         // #[rustc_on_unimplemented(
+         //     message = "the size for values of type `{Self}` cannot be known at compilation time",
+         //     label = "doesn't have a size known at compile-time"
+         // )]
+         // #[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
+         // #[rustc_specialization_trait]
+         pub trait Sized {
+             // Empty.
+         }
+     }
+ 
+     mod cmp {
+         use super::marker::Sized;
+         use super::option::Option;
+ 
+         // #[derive(Clone, Copy, PartialEq, Debug, Hash)]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub enum Ordering {
+             /// An ordering where a compared value is less than another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Less = -1,
+             /// An ordering where a compared value is equal to another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Equal = 0,
+             /// An ordering where a compared value is greater than another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Greater = 1,
+         }
+ 
+         #[lang = "eq"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[doc(alias = "==")]
+         #[doc(alias = "!=")]
+         // #[rustc_on_unimplemented(
+         //     message = "can't compare `{Self}` with `{Rhs}`",
+         //     label = "no implementation for `{Self} == {Rhs}`"
+         // )]
+         pub trait PartialEq<Rhs: ?Sized = Self> {
+             /// This method tests for `self` and `other` values to be equal, and is used
+             /// by `==`.
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn eq(&self, other: &Rhs) -> bool;
+ 
+             fn ne(&self, other: &Rhs) -> bool {
+                 !self.eq(other)
+             }
+         }
+ 
+         #[doc(alias = "==")]
+         #[doc(alias = "!=")]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub trait Eq: PartialEq<Self> {
+             // this method is used solely by #[deriving] to assert
+             // that every component of a type implements #[deriving]
+             // itself, the current deriving infrastructure means doing this
+             // assertion without using a method on this trait is nearly
+             // impossible.
+             //
+             // This should never be implemented by hand.
+             #[doc(hidden)]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn assert_receiver_is_total_eq(&self) {}
+         }
+ 
+         #[lang = "partial_ord"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[doc(alias = ">")]
+         #[doc(alias = "<")]
+         #[doc(alias = "<=")]
+         #[doc(alias = ">=")]
+         // #[rustc_on_unimplemented(
+         //     message = "can't compare `{Self}` with `{Rhs}`",
+         //     label = "no implementation for `{Self} < {Rhs}` and `{Self} > {Rhs}`"
+         // )]
+         pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
+             /// This method returns an ordering between `self` and `other` values if one exists.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// use std::cmp::Ordering;
+             ///
+             /// let result = 1.0.partial_cmp(&2.0);
+             /// assert_eq!(result, Some(Ordering::Less));
+             ///
+             /// let result = 1.0.partial_cmp(&1.0);
+             /// assert_eq!(result, Some(Ordering::Equal));
+             ///
+             /// let result = 2.0.partial_cmp(&1.0);
+             /// assert_eq!(result, Some(Ordering::Greater));
+             /// ```
+             ///
+             /// When comparison is impossible:
+             ///
+             /// ```
+             /// let result = f64::NAN.partial_cmp(&1.0);
+             /// assert_eq!(result, None);
+             /// ```
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn partial_cmp(&self, other: &Rhs) -> Option<Ordering>;
+ 
+             /// This method tests less than (for `self` and `other`) and is used by the `<` operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 < 2.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 < 1.0;
+             /// assert_eq!(result, false);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn lt(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Less) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests less than or equal to (for `self` and `other`) and is used by the `<=`
+             /// operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 <= 2.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 <= 2.0;
+             /// assert_eq!(result, true);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn le(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Less | Ordering::Equal) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests greater than (for `self` and `other`) and is used by the `>` operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 > 2.0;
+             /// assert_eq!(result, false);
+             ///
+             /// let result = 2.0 > 2.0;
+             /// assert_eq!(result, false);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn gt(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Greater) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests greater than or equal to (for `self` and `other`) and is used by the `>=`
+             /// operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 2.0 >= 1.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 >= 2.0;
+             /// assert_eq!(result, true);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn ge(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Greater | Ordering::Equal) => true,
+                     _ => false,
+                 }
+             }
+         }
+ 
+         #[doc(alias = "<")]
+         #[doc(alias = ">")]
+         #[doc(alias = "<=")]
+         #[doc(alias = ">=")]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub trait Ord: Eq + PartialOrd<Self> {
+             /// This method returns an [`Ordering`] between `self` and `other`.
+             ///
+             /// By convention, `self.cmp(&other)` returns the ordering matching the expression
+             /// `self <operator> other` if true.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// use std::cmp::Ordering;
+             ///
+             /// assert_eq!(5.cmp(&10), Ordering::Less);
+             /// assert_eq!(10.cmp(&5), Ordering::Greater);
+             /// assert_eq!(5.cmp(&5), Ordering::Equal);
+             /// ```
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn cmp(&self, other: &Self) -> Ordering;
+ 
+             /// Compares and returns the maximum of two values.
+             ///
+             /// Returns the second argument if the comparison determines them to be equal.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// assert_eq!(2, 1.max(2));
+             /// assert_eq!(2, 2.max(2));
+             /// ```
+             #[stable(feature = "ord_max_min", since = "1.21.0")]
+             #[must_use]
+             fn max(self, other: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 self
+             }
+ 
+             /// Compares and returns the minimum of two values.
+             ///
+             /// Returns the first argument if the comparison determines them to be equal.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// assert_eq!(1, 1.min(2));
+             /// assert_eq!(2, 2.min(2));
+             /// ```
+             #[stable(feature = "ord_max_min", since = "1.21.0")]
+             #[must_use]
+             fn min(self, other: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 self
+             }
+ 
+             /// Restrict a value to a certain interval.
+             ///
+             /// Returns `max` if `self` is greater than `max`, and `min` if `self` is
+             /// less than `min`. Otherwise this returns `self`.
+             ///
+             /// # Panics
+             ///
+             /// Panics if `min > max`.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// #![feature(clamp)]
+             ///
+             /// assert!((-3).clamp(-2, 1) == -2);
+             /// assert!(0.clamp(-2, 1) == 0);
+             /// assert!(2.clamp(-2, 1) == 1);
+             /// ```
+             #[must_use]
+             #[unstable(feature = "clamp", issue = "44095")]
+             fn clamp(self, min: Self, max: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 if self < min {
+                     min
+                 } else if self > max {
+                     max
+                 } else {
+                     self
+                 }
+             }
+         }
+     }
+ 
+     pub mod intrinsics {
+         #[lang = "discriminant_kind"]
+         pub trait DiscriminantKind {
+             #[lang = "discriminant_type"]
+             type Discriminant;
+         }
+ 
+         extern "rust-intrinsic" {
+             pub fn discriminant_value<T>(v: &T) -> <T as DiscriminantKind>::Discriminant;
+         }
+     }
+ }
+ 
+ use core::cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd};
+ use core::marker::Sized;
+ use core::option::Option;
+ 
+ // for comparing discriminant_value
+ impl PartialEq for isize {
+     fn eq(&self, other: &Self) -> bool {
+         *self == *other
+     }
+ }
+ 
+ // for comparing discriminant_value
+ impl PartialOrd for isize {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         if *self > *other {
+             Option::Some(Ordering::Greater)
+         } else if *self < *other {
+             Option::Some(Ordering::Less)
+         } else {
+             Option::Some(Ordering::Equal)
+         }
+     }
+ 
+     fn lt(&self, other: &Self) -> bool {
+         *self < *other
+     }
+     fn le(&self, other: &Self) -> bool {
+         *self <= *other
+     }
+     fn ge(&self, other: &Self) -> bool {
+         *self >= *other
+     }
+     fn gt(&self, other: &Self) -> bool {
+         *self > *other
+     }
+ }
+ 
+ impl PartialEq for i32 {
+     fn eq(&self, other: &Self) -> bool {
+         *self == *other
+     }
+ }
+ impl Eq for i32 {}
+ 
+ impl PartialOrd for i32 {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         if *self > *other {
+             Option::Some(Ordering::Greater)
+         } else if *self < *other {
+             Option::Some(Ordering::Less)
+         } else {
+             Option::Some(Ordering::Equal)
+         }
+     }
+ 
+     fn lt(&self, other: &Self) -> bool {
+         *self < *other
+     }
+     fn le(&self, other: &Self) -> bool {
+         *self <= *other
+     }
+     fn ge(&self, other: &Self) -> bool {
+         *self >= *other
+     }
+     fn gt(&self, other: &Self) -> bool {
+         *self > *other
+     }
+ }
+ 
+ impl Ord for i32 {
+     fn cmp(&self, other: &Self) -> Ordering {
+         if *self > *other {
+             Ordering::Greater
+         } else if *self < *other {
+             Ordering::Less
+         } else {
+             Ordering::Equal
+         }
+     }
+ }
+ 
+ #[derive(PartialEq, Eq)]
+ struct Foo {
+     a: i32,
+ }
+ 
+ extern "C" {
+     fn puts(s: *const i8);
+ }
+ 
+ fn print(s: &str) {
+     unsafe {
+         puts(s as *const str as *const i8);
+     }
+ }
+ 
+ fn main() -> i32 {
+     let a = Foo { a: 42i32 };
+     let b = Foo { a: 42i32 };
+     let c = Foo { a: 7i32 };
+ 
+     if a == b {
+         print("a == b");
+     } else {
+         print("a != b");
+     }
+ 
+     if a == c {
+         print("a == c");
+     } else {
+         print("a != c");
+     }
+ 
+     0
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/partial-ord-1.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/partial-ord-1.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/partial-ord-1.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/partial-ord-1.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,101 ----
+ /* { dg-output "x == y\r*\nx > z\r*\n" }*/
+ #[lang = "sized"]
+ pub trait Sized {}
+ 
+ pub enum Option<T> {
+     #[lang = "None"]
+     None,
+     #[lang = "Some"]
+     Some(T),
+ }
+ 
+ use Option::{None, Some};
+ 
+ #[lang = "eq"]
+ pub trait PartialEq<Rhs: ?Sized = Self> {
+     fn eq(&self, other: &Rhs) -> bool;
+ 
+     fn ne(&self, other: &Rhs) -> bool {
+         !self.eq(other)
+     }
+ }
+ 
+ pub enum Ordering {
+     Less = -1,
+     Equal = 0,
+     Greater = 1,
+ }
+ 
+ #[lang = "partial_ord"]
+ pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
+     fn partial_cmp(&self, other: &Rhs) -> Option<Ordering>;
+ }
+ 
+ // Implement for i32
+ impl PartialEq for i32 {
+     fn eq(&self, other: &Self) -> bool {
+         *self == *other
+     }
+ }
+ 
+ // Implement PartialOrd for i32
+ impl PartialOrd for i32 {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         if *self < *other {
+             Some(Ordering::Less)
+         } else if *self > *other {
+             Some(Ordering::Greater)
+         } else {
+             Some(Ordering::Equal)
+         }
+     }
+ }
+ 
+ // Struct with manual PartialEq
+ struct Foo {
+     a: i32,
+ }
+ 
+ impl PartialEq for Foo {
+     fn eq(&self, other: &Self) -> bool {
+         self.a.eq(&other.a)
+     }
+ }
+ 
+ impl PartialOrd for Foo {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         self.a.partial_cmp(&other.a)
+     }
+ }
+ 
+ extern "C" {
+     fn puts(s: *const i8);
+ }
+ 
+ fn print(s: &str) {
+     unsafe {
+         puts(s as *const str as *const i8);
+     }
+ }
+ 
+ fn main() -> i32 {
+     let x = Foo { a: 42 };
+     let y = Foo { a: 42 };
+     let z = Foo { a: 7 };
+ 
+     match x.partial_cmp(&y) {
+         Some(Ordering::Equal) => print("x == y"),
+         Some(Ordering::Less) => print("x < y"),
+         Some(Ordering::Greater) => print("x > y"),
+         None => print("x ? y"),
+     }
+ 
+     match x.partial_cmp(&z) {
+         Some(Ordering::Equal) => print("x == z"),
+         Some(Ordering::Less) => print("x < z"),
+         Some(Ordering::Greater) => print("x > z"),
+         None => print("x ? z"),
+     }
+ 
+     0
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/partial-ord-2.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/partial-ord-2.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/partial-ord-2.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/partial-ord-2.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,469 ----
+ /* { dg-output "x == y\r*\nx > z\r*\n" }*/
+ 
+ #![feature(intrinsics)]
+ 
+ mod core {
+     mod option {
+         // #[rustc_diagnostic_item = "option_type"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub enum Option<T> {
+             /// No value
+             #[lang = "None"]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             None,
+             /// Some value `T`
+             #[lang = "Some"]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+         }
+     }
+ 
+     mod marker {
+         #[lang = "phantom_data"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub struct PhantomData<T: ?Sized>;
+ 
+         #[unstable(feature = "structural_match", issue = "31434")]
+         // #[rustc_on_unimplemented(message = "the type `{Self}` does not `#[derive(PartialEq)]`")]
+         #[lang = "structural_peq"]
+         pub trait StructuralPartialEq {
+             // Empty.
+         }
+ 
+         #[unstable(feature = "structural_match", issue = "31434")]
+         // #[rustc_on_unimplemented(message = "the type `{Self}` does not `#[derive(Eq)]`")]
+         #[lang = "structural_teq"]
+         pub trait StructuralEq {
+             // Empty.
+         }
+ 
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[lang = "sized"]
+         // #[rustc_on_unimplemented(
+         //     message = "the size for values of type `{Self}` cannot be known at compilation time",
+         //     label = "doesn't have a size known at compile-time"
+         // )]
+         // #[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
+         // #[rustc_specialization_trait]
+         pub trait Sized {
+             // Empty.
+         }
+     }
+ 
+     mod cmp {
+         use super::marker::Sized;
+         use super::option::Option;
+ 
+         // #[derive(Clone, Copy, PartialEq, Debug, Hash)]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub enum Ordering {
+             /// An ordering where a compared value is less than another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Less = -1,
+             /// An ordering where a compared value is equal to another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Equal = 0,
+             /// An ordering where a compared value is greater than another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Greater = 1,
+         }
+ 
+         #[lang = "eq"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[doc(alias = "==")]
+         #[doc(alias = "!=")]
+         // #[rustc_on_unimplemented(
+         //     message = "can't compare `{Self}` with `{Rhs}`",
+         //     label = "no implementation for `{Self} == {Rhs}`"
+         // )]
+         pub trait PartialEq<Rhs: ?Sized = Self> {
+             /// This method tests for `self` and `other` values to be equal, and is used
+             /// by `==`.
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn eq(&self, other: &Rhs) -> bool;
+ 
+             fn ne(&self, other: &Rhs) -> bool {
+                 !self.eq(other)
+             }
+         }
+ 
+         #[doc(alias = "==")]
+         #[doc(alias = "!=")]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub trait Eq: PartialEq<Self> {
+             // this method is used solely by #[deriving] to assert
+             // that every component of a type implements #[deriving]
+             // itself, the current deriving infrastructure means doing this
+             // assertion without using a method on this trait is nearly
+             // impossible.
+             //
+             // This should never be implemented by hand.
+             #[doc(hidden)]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn assert_receiver_is_total_eq(&self) {}
+         }
+ 
+         #[lang = "partial_ord"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[doc(alias = ">")]
+         #[doc(alias = "<")]
+         #[doc(alias = "<=")]
+         #[doc(alias = ">=")]
+         // #[rustc_on_unimplemented(
+         //     message = "can't compare `{Self}` with `{Rhs}`",
+         //     label = "no implementation for `{Self} < {Rhs}` and `{Self} > {Rhs}`"
+         // )]
+         pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
+             /// This method returns an ordering between `self` and `other` values if one exists.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// use std::cmp::Ordering;
+             ///
+             /// let result = 1.0.partial_cmp(&2.0);
+             /// assert_eq!(result, Some(Ordering::Less));
+             ///
+             /// let result = 1.0.partial_cmp(&1.0);
+             /// assert_eq!(result, Some(Ordering::Equal));
+             ///
+             /// let result = 2.0.partial_cmp(&1.0);
+             /// assert_eq!(result, Some(Ordering::Greater));
+             /// ```
+             ///
+             /// When comparison is impossible:
+             ///
+             /// ```
+             /// let result = f64::NAN.partial_cmp(&1.0);
+             /// assert_eq!(result, None);
+             /// ```
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn partial_cmp(&self, other: &Rhs) -> Option<Ordering>;
+ 
+             /// This method tests less than (for `self` and `other`) and is used by the `<` operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 < 2.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 < 1.0;
+             /// assert_eq!(result, false);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn lt(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Less) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests less than or equal to (for `self` and `other`) and is used by the `<=`
+             /// operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 <= 2.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 <= 2.0;
+             /// assert_eq!(result, true);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn le(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Less | Ordering::Equal) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests greater than (for `self` and `other`) and is used by the `>` operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 > 2.0;
+             /// assert_eq!(result, false);
+             ///
+             /// let result = 2.0 > 2.0;
+             /// assert_eq!(result, false);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn gt(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Greater) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests greater than or equal to (for `self` and `other`) and is used by the `>=`
+             /// operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 2.0 >= 1.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 >= 2.0;
+             /// assert_eq!(result, true);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn ge(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Greater | Ordering::Equal) => true,
+                     _ => false,
+                 }
+             }
+         }
+ 
+         #[doc(alias = "<")]
+         #[doc(alias = ">")]
+         #[doc(alias = "<=")]
+         #[doc(alias = ">=")]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub trait Ord: Eq + PartialOrd<Self> {
+             /// This method returns an [`Ordering`] between `self` and `other`.
+             ///
+             /// By convention, `self.cmp(&other)` returns the ordering matching the expression
+             /// `self <operator> other` if true.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// use std::cmp::Ordering;
+             ///
+             /// assert_eq!(5.cmp(&10), Ordering::Less);
+             /// assert_eq!(10.cmp(&5), Ordering::Greater);
+             /// assert_eq!(5.cmp(&5), Ordering::Equal);
+             /// ```
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn cmp(&self, other: &Self) -> Ordering;
+ 
+             /// Compares and returns the maximum of two values.
+             ///
+             /// Returns the second argument if the comparison determines them to be equal.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// assert_eq!(2, 1.max(2));
+             /// assert_eq!(2, 2.max(2));
+             /// ```
+             #[stable(feature = "ord_max_min", since = "1.21.0")]
+             #[must_use]
+             fn max(self, other: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 self
+             }
+ 
+             /// Compares and returns the minimum of two values.
+             ///
+             /// Returns the first argument if the comparison determines them to be equal.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// assert_eq!(1, 1.min(2));
+             /// assert_eq!(2, 2.min(2));
+             /// ```
+             #[stable(feature = "ord_max_min", since = "1.21.0")]
+             #[must_use]
+             fn min(self, other: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 self
+             }
+ 
+             /// Restrict a value to a certain interval.
+             ///
+             /// Returns `max` if `self` is greater than `max`, and `min` if `self` is
+             /// less than `min`. Otherwise this returns `self`.
+             ///
+             /// # Panics
+             ///
+             /// Panics if `min > max`.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// #![feature(clamp)]
+             ///
+             /// assert!((-3).clamp(-2, 1) == -2);
+             /// assert!(0.clamp(-2, 1) == 0);
+             /// assert!(2.clamp(-2, 1) == 1);
+             /// ```
+             #[must_use]
+             #[unstable(feature = "clamp", issue = "44095")]
+             fn clamp(self, min: Self, max: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 if self < min {
+                     min
+                 } else if self > max {
+                     max
+                 } else {
+                     self
+                 }
+             }
+         }
+     }
+ 
+     pub mod intrinsics {
+         #[lang = "discriminant_kind"]
+         pub trait DiscriminantKind {
+             #[lang = "discriminant_type"]
+             type Discriminant;
+         }
+ 
+         extern "rust-intrinsic" {
+             pub fn discriminant_value<T>(v: &T) -> <T as DiscriminantKind>::Discriminant;
+         }
+     }
+ }
+ 
+ use core::cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd};
+ use core::marker::Sized;
+ use core::option::Option;
+ 
+ // for comparing discriminant_value
+ impl PartialEq for isize {
+     fn eq(&self, other: &Self) -> bool {
+         *self == *other
+     }
+ }
+ 
+ // for comparing discriminant_value
+ impl PartialOrd for isize {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         if *self > *other {
+             Option::Some(Ordering::Greater)
+         } else if *self < *other {
+             Option::Some(Ordering::Less)
+         } else {
+             Option::Some(Ordering::Equal)
+         }
+     }
+ 
+     fn lt(&self, other: &Self) -> bool {
+         *self < *other
+     }
+     fn le(&self, other: &Self) -> bool {
+         *self <= *other
+     }
+     fn ge(&self, other: &Self) -> bool {
+         *self >= *other
+     }
+     fn gt(&self, other: &Self) -> bool {
+         *self > *other
+     }
+ }
+ 
+ impl PartialEq for i32 {
+     fn eq(&self, other: &Self) -> bool {
+         *self == *other
+     }
+ }
+ impl Eq for i32 {}
+ 
+ impl PartialOrd for i32 {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         if *self > *other {
+             Option::Some(Ordering::Greater)
+         } else if *self < *other {
+             Option::Some(Ordering::Less)
+         } else {
+             Option::Some(Ordering::Equal)
+         }
+     }
+ 
+     fn lt(&self, other: &Self) -> bool {
+         *self < *other
+     }
+     fn le(&self, other: &Self) -> bool {
+         *self <= *other
+     }
+     fn ge(&self, other: &Self) -> bool {
+         *self >= *other
+     }
+     fn gt(&self, other: &Self) -> bool {
+         *self > *other
+     }
+ }
+ 
+ impl Ord for i32 {
+     fn cmp(&self, other: &Self) -> Ordering {
+         if *self > *other {
+             Ordering::Greater
+         } else if *self < *other {
+             Ordering::Less
+         } else {
+             Ordering::Equal
+         }
+     }
+ }
+ 
+ struct Foo {
+     a: i32,
+ }
+ 
+ impl PartialEq for Foo {
+     fn eq(&self, other: &'_ Self) -> bool {
+         self.a == other.a
+     }
+ }
+ 
+ impl PartialOrd for Foo {
+     fn partial_cmp(&self, other: &'_ Foo) -> Option<::core::cmp::Ordering> {
+         self.a.partial_cmp(&other.a)
+     }
+ }
+ 
+ extern "C" {
+     fn puts(s: *const i8);
+ }
+ 
+ fn print(s: &str) {
+     unsafe {
+         puts(s as *const str as *const i8);
+     }
+ }
+ 
+ fn main() -> i32 {
+     let x = Foo { a: 42 };
+     let y = Foo { a: 42 };
+     let z = Foo { a: 7 };
+ 
+     match x.partial_cmp(&y) {
+         Option::Some(Ordering::Equal) => print("x == y"),
+         Option::Some(Ordering::Less) => print("x < y"),
+         Option::Some(Ordering::Greater) => print("x > y"),
+         Option::None => print("x ? y"),
+     }
+ 
+     match x.partial_cmp(&z) {
+         Option::Some(Ordering::Equal) => print("x == z"),
+         Option::Some(Ordering::Less) => print("x < z"),
+         Option::Some(Ordering::Greater) => print("x > z"),
+         Option::None => print("x ? z"),
+     }
+ 
+     0
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/partial-ord-3.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/partial-ord-3.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/partial-ord-3.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/partial-ord-3.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,489 ----
+ /* { dg-output "x == y\r*\nx > z\r*\nx < z\r*\nx >= y\r*\nx <= y\r*\n" } */
+ /* { dg-options "-w" } */
+ 
+ #![feature(intrinsics)]
+ 
+ mod core {
+     mod option {
+         // #[rustc_diagnostic_item = "option_type"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub enum Option<T> {
+             /// No value
+             #[lang = "None"]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             None,
+             /// Some value `T`
+             #[lang = "Some"]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+         }
+     }
+ 
+     mod marker {
+         #[lang = "phantom_data"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub struct PhantomData<T: ?Sized>;
+ 
+         #[unstable(feature = "structural_match", issue = "31434")]
+         // #[rustc_on_unimplemented(message = "the type `{Self}` does not `#[derive(PartialEq)]`")]
+         #[lang = "structural_peq"]
+         pub trait StructuralPartialEq {
+             // Empty.
+         }
+ 
+         #[unstable(feature = "structural_match", issue = "31434")]
+         // #[rustc_on_unimplemented(message = "the type `{Self}` does not `#[derive(Eq)]`")]
+         #[lang = "structural_teq"]
+         pub trait StructuralEq {
+             // Empty.
+         }
+ 
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[lang = "sized"]
+         // #[rustc_on_unimplemented(
+         //     message = "the size for values of type `{Self}` cannot be known at compilation time",
+         //     label = "doesn't have a size known at compile-time"
+         // )]
+         // #[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
+         // #[rustc_specialization_trait]
+         pub trait Sized {
+             // Empty.
+         }
+     }
+ 
+     mod cmp {
+         use super::marker::Sized;
+         use super::option::Option;
+ 
+         // #[derive(Clone, Copy, PartialEq, Debug, Hash)]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub enum Ordering {
+             /// An ordering where a compared value is less than another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Less = -1,
+             /// An ordering where a compared value is equal to another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Equal = 0,
+             /// An ordering where a compared value is greater than another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Greater = 1,
+         }
+ 
+         #[lang = "eq"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[doc(alias = "==")]
+         #[doc(alias = "!=")]
+         // #[rustc_on_unimplemented(
+         //     message = "can't compare `{Self}` with `{Rhs}`",
+         //     label = "no implementation for `{Self} == {Rhs}`"
+         // )]
+         pub trait PartialEq<Rhs: ?Sized = Self> {
+             /// This method tests for `self` and `other` values to be equal, and is used
+             /// by `==`.
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn eq(&self, other: &Rhs) -> bool;
+ 
+             fn ne(&self, other: &Rhs) -> bool {
+                 !self.eq(other)
+             }
+         }
+ 
+         #[doc(alias = "==")]
+         #[doc(alias = "!=")]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub trait Eq: PartialEq<Self> {
+             // this method is used solely by #[deriving] to assert
+             // that every component of a type implements #[deriving]
+             // itself, the current deriving infrastructure means doing this
+             // assertion without using a method on this trait is nearly
+             // impossible.
+             //
+             // This should never be implemented by hand.
+             #[doc(hidden)]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn assert_receiver_is_total_eq(&self) {}
+         }
+ 
+         #[lang = "partial_ord"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[doc(alias = ">")]
+         #[doc(alias = "<")]
+         #[doc(alias = "<=")]
+         #[doc(alias = ">=")]
+         // #[rustc_on_unimplemented(
+         //     message = "can't compare `{Self}` with `{Rhs}`",
+         //     label = "no implementation for `{Self} < {Rhs}` and `{Self} > {Rhs}`"
+         // )]
+         pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
+             /// This method returns an ordering between `self` and `other` values if one exists.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// use std::cmp::Ordering;
+             ///
+             /// let result = 1.0.partial_cmp(&2.0);
+             /// assert_eq!(result, Some(Ordering::Less));
+             ///
+             /// let result = 1.0.partial_cmp(&1.0);
+             /// assert_eq!(result, Some(Ordering::Equal));
+             ///
+             /// let result = 2.0.partial_cmp(&1.0);
+             /// assert_eq!(result, Some(Ordering::Greater));
+             /// ```
+             ///
+             /// When comparison is impossible:
+             ///
+             /// ```
+             /// let result = f64::NAN.partial_cmp(&1.0);
+             /// assert_eq!(result, None);
+             /// ```
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn partial_cmp(&self, other: &Rhs) -> Option<Ordering>;
+ 
+             /// This method tests less than (for `self` and `other`) and is used by the `<` operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 < 2.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 < 1.0;
+             /// assert_eq!(result, false);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn lt(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Less) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests less than or equal to (for `self` and `other`) and is used by the `<=`
+             /// operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 <= 2.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 <= 2.0;
+             /// assert_eq!(result, true);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn le(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Less | Ordering::Equal) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests greater than (for `self` and `other`) and is used by the `>` operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 > 2.0;
+             /// assert_eq!(result, false);
+             ///
+             /// let result = 2.0 > 2.0;
+             /// assert_eq!(result, false);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn gt(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Greater) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests greater than or equal to (for `self` and `other`) and is used by the `>=`
+             /// operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 2.0 >= 1.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 >= 2.0;
+             /// assert_eq!(result, true);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn ge(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Greater | Ordering::Equal) => true,
+                     _ => false,
+                 }
+             }
+         }
+ 
+         #[doc(alias = "<")]
+         #[doc(alias = ">")]
+         #[doc(alias = "<=")]
+         #[doc(alias = ">=")]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub trait Ord: Eq + PartialOrd<Self> {
+             /// This method returns an [`Ordering`] between `self` and `other`.
+             ///
+             /// By convention, `self.cmp(&other)` returns the ordering matching the expression
+             /// `self <operator> other` if true.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// use std::cmp::Ordering;
+             ///
+             /// assert_eq!(5.cmp(&10), Ordering::Less);
+             /// assert_eq!(10.cmp(&5), Ordering::Greater);
+             /// assert_eq!(5.cmp(&5), Ordering::Equal);
+             /// ```
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn cmp(&self, other: &Self) -> Ordering;
+ 
+             /// Compares and returns the maximum of two values.
+             ///
+             /// Returns the second argument if the comparison determines them to be equal.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// assert_eq!(2, 1.max(2));
+             /// assert_eq!(2, 2.max(2));
+             /// ```
+             #[stable(feature = "ord_max_min", since = "1.21.0")]
+             #[must_use]
+             fn max(self, other: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 self
+             }
+ 
+             /// Compares and returns the minimum of two values.
+             ///
+             /// Returns the first argument if the comparison determines them to be equal.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// assert_eq!(1, 1.min(2));
+             /// assert_eq!(2, 2.min(2));
+             /// ```
+             #[stable(feature = "ord_max_min", since = "1.21.0")]
+             #[must_use]
+             fn min(self, other: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 self
+             }
+ 
+             /// Restrict a value to a certain interval.
+             ///
+             /// Returns `max` if `self` is greater than `max`, and `min` if `self` is
+             /// less than `min`. Otherwise this returns `self`.
+             ///
+             /// # Panics
+             ///
+             /// Panics if `min > max`.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// #![feature(clamp)]
+             ///
+             /// assert!((-3).clamp(-2, 1) == -2);
+             /// assert!(0.clamp(-2, 1) == 0);
+             /// assert!(2.clamp(-2, 1) == 1);
+             /// ```
+             #[must_use]
+             #[unstable(feature = "clamp", issue = "44095")]
+             fn clamp(self, min: Self, max: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 if self < min {
+                     min
+                 } else if self > max {
+                     max
+                 } else {
+                     self
+                 }
+             }
+         }
+     }
+ 
+     pub mod intrinsics {
+         #[lang = "discriminant_kind"]
+         pub trait DiscriminantKind {
+             #[lang = "discriminant_type"]
+             type Discriminant;
+         }
+ 
+         extern "rust-intrinsic" {
+             pub fn discriminant_value<T>(v: &T) -> <T as DiscriminantKind>::Discriminant;
+         }
+     }
+ }
+ 
+ use core::cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd};
+ use core::marker::Sized;
+ use core::option::Option;
+ 
+ // for comparing discriminant_value
+ impl PartialEq for isize {
+     fn eq(&self, other: &Self) -> bool {
+         *self == *other
+     }
+ }
+ 
+ // for comparing discriminant_value
+ impl PartialOrd for isize {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         if *self > *other {
+             Option::Some(Ordering::Greater)
+         } else if *self < *other {
+             Option::Some(Ordering::Less)
+         } else {
+             Option::Some(Ordering::Equal)
+         }
+     }
+ 
+     fn lt(&self, other: &Self) -> bool {
+         *self < *other
+     }
+     fn le(&self, other: &Self) -> bool {
+         *self <= *other
+     }
+     fn ge(&self, other: &Self) -> bool {
+         *self >= *other
+     }
+     fn gt(&self, other: &Self) -> bool {
+         *self > *other
+     }
+ }
+ 
+ impl PartialEq for i32 {
+     fn eq(&self, other: &Self) -> bool {
+         *self == *other
+     }
+ }
+ impl Eq for i32 {}
+ 
+ impl PartialOrd for i32 {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         if *self > *other {
+             Option::Some(Ordering::Greater)
+         } else if *self < *other {
+             Option::Some(Ordering::Less)
+         } else {
+             Option::Some(Ordering::Equal)
+         }
+     }
+ 
+     fn lt(&self, other: &Self) -> bool {
+         *self < *other
+     }
+     fn le(&self, other: &Self) -> bool {
+         *self <= *other
+     }
+     fn ge(&self, other: &Self) -> bool {
+         *self >= *other
+     }
+     fn gt(&self, other: &Self) -> bool {
+         *self > *other
+     }
+ }
+ 
+ impl Ord for i32 {
+     fn cmp(&self, other: &Self) -> Ordering {
+         if *self > *other {
+             Ordering::Greater
+         } else if *self < *other {
+             Ordering::Less
+         } else {
+             Ordering::Equal
+         }
+     }
+ }
+ 
+ struct Foo {
+     a: i32,
+ }
+ 
+ impl PartialEq for Foo {
+     fn eq(&self, other: &Self) -> bool {
+         self.a == other.a
+     }
+ }
+ impl Eq for Foo {}
+ 
+ impl PartialOrd for Foo {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         self.a.partial_cmp(&other.a)
+     }
+ }
+ 
+ impl Ord for Foo {
+     fn cmp(&self, other: &Self) -> Ordering {
+         self.a.cmp(&other.a)
+     }
+ }
+ 
+ extern "C" {
+     fn puts(s: *const i8);
+ }
+ 
+ fn print(s: &str) {
+     unsafe {
+         puts(s as *const str as *const i8);
+     }
+ }
+ 
+ fn main() -> i32 {
+     let x = Foo { a: 42 };
+     let y = Foo { a: 42 };
+     let z = Foo { a: 7 };
+ 
+     // test direct equality
+     if x == y {
+         print("x == y");
+     }
+ 
+     // test PartialOrd via match
+     match x.partial_cmp(&z) {
+         Option::Some(Ordering::Greater) => print("x > z"),
+         _ => print("x ? z"),
+     }
+ 
+     // test `<` directly
+     if z < x {
+         print("x < z");
+     }
+ 
+     // test `>=`
+     if x >= y {
+         print("x >= y");
+     }
+ 
+     // test `<=`
+     if x <= y {
+         print("x <= y");
+     }
+ 
+     0
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/partial-ord-4.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/partial-ord-4.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/partial-ord-4.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/partial-ord-4.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,115 ----
+ /* { dg-output "a == b\r*\na != c\r*\n" }*/
+ /* { dg-options "-w" } */
+ 
+ #![feature(intrinsics)]
+ 
+ mod core {
+     mod option {
+         pub enum Option<T> {
+             #[lang = "None"]
+             None,
+             #[lang = "Some"]
+             Some(T),
+         }
+     }
+ 
+     mod marker {
+         #[lang = "sized"]
+         pub trait Sized {}
+     }
+ 
+     mod cmp {
+         use super::marker::Sized;
+         use super::option::Option;
+ 
+         pub enum Ordering {
+             Less = -1,
+             Equal = 0,
+             Greater = 1,
+         }
+ 
+         #[lang = "eq"]
+         pub trait PartialEq<Rhs: ?Sized = Self> {
+             fn eq(&self, other: &Rhs) -> bool;
+ 
+             fn ne(&self, other: &Rhs) -> bool {
+                 !self.eq(other)
+             }
+         }
+ 
+         #[lang = "partial_ord"]
+         pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn partial_cmp(&self, other: &Rhs) -> Option<Ordering>;
+         }
+     }
+ }
+ 
+ use core::cmp::{Ordering, PartialEq, PartialOrd};
+ use core::marker::Sized;
+ use core::option::Option;
+ 
+ impl PartialEq for i32 {
+     fn eq(&self, other: &Self) -> bool {
+         *self == *other
+     }
+ }
+ 
+ impl PartialOrd for i32 {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         if *self > *other {
+             Option::Some(Ordering::Greater)
+         } else if *self < *other {
+             Option::Some(Ordering::Less)
+         } else {
+             Option::Some(Ordering::Equal)
+         }
+     }
+ }
+ 
+ struct Foo {
+     a: i32,
+ }
+ 
+ impl PartialEq for Foo {
+     fn eq(&self, other: &'_ Self) -> bool {
+         self.a == other.a
+     }
+ }
+ 
+ impl PartialOrd for Foo {
+     fn partial_cmp(&self, other: &'_ Foo) -> Option<::core::cmp::Ordering> {
+         ::core::cmp::PartialOrd::partial_cmp(&self.a, &other.a)
+     }
+ }
+ 
+ extern "C" {
+     fn puts(s: *const i8);
+ }
+ 
+ fn print(s: &str) {
+     unsafe {
+         puts(s as *const str as *const i8);
+     }
+ }
+ 
+ fn main() -> i32 {
+     let a = Foo { a: 42i32 };
+     let b = Foo { a: 42i32 };
+     let c = Foo { a: 7i32 };
+ 
+     if a == b {
+         print("a == b");
+     } else {
+         print("a != b");
+     }
+ 
+     if a == c {
+         print("a == c");
+     } else {
+         print("a != c");
+     }
+ 
+     0
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/partial-ord-5.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/partial-ord-5.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/partial-ord-5.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/partial-ord-5.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,487 ----
+ /* { dg-output "a == b\r*\na != c\r*\na >= c\r*\na <= b\r*\na > c\r*\nc < b\r*\n" } */
+ /* { dg-options "-w" } */
+ 
+ #![feature(intrinsics)]
+ 
+ mod core {
+     mod option {
+         // #[rustc_diagnostic_item = "option_type"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub enum Option<T> {
+             /// No value
+             #[lang = "None"]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             None,
+             /// Some value `T`
+             #[lang = "Some"]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+         }
+     }
+ 
+     mod marker {
+         #[lang = "phantom_data"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub struct PhantomData<T: ?Sized>;
+ 
+         #[unstable(feature = "structural_match", issue = "31434")]
+         // #[rustc_on_unimplemented(message = "the type `{Self}` does not `#[derive(PartialEq)]`")]
+         #[lang = "structural_peq"]
+         pub trait StructuralPartialEq {
+             // Empty.
+         }
+ 
+         #[unstable(feature = "structural_match", issue = "31434")]
+         // #[rustc_on_unimplemented(message = "the type `{Self}` does not `#[derive(Eq)]`")]
+         #[lang = "structural_teq"]
+         pub trait StructuralEq {
+             // Empty.
+         }
+ 
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[lang = "sized"]
+         // #[rustc_on_unimplemented(
+         //     message = "the size for values of type `{Self}` cannot be known at compilation time",
+         //     label = "doesn't have a size known at compile-time"
+         // )]
+         // #[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
+         // #[rustc_specialization_trait]
+         pub trait Sized {
+             // Empty.
+         }
+     }
+ 
+     mod cmp {
+         use super::marker::Sized;
+         use super::option::Option;
+ 
+         // #[derive(Clone, Copy, PartialEq, Debug, Hash)]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub enum Ordering {
+             /// An ordering where a compared value is less than another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Less = -1,
+             /// An ordering where a compared value is equal to another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Equal = 0,
+             /// An ordering where a compared value is greater than another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Greater = 1,
+         }
+ 
+         #[lang = "eq"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[doc(alias = "==")]
+         #[doc(alias = "!=")]
+         // #[rustc_on_unimplemented(
+         //     message = "can't compare `{Self}` with `{Rhs}`",
+         //     label = "no implementation for `{Self} == {Rhs}`"
+         // )]
+         pub trait PartialEq<Rhs: ?Sized = Self> {
+             /// This method tests for `self` and `other` values to be equal, and is used
+             /// by `==`.
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn eq(&self, other: &Rhs) -> bool;
+ 
+             fn ne(&self, other: &Rhs) -> bool {
+                 !self.eq(other)
+             }
+         }
+ 
+         #[doc(alias = "==")]
+         #[doc(alias = "!=")]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub trait Eq: PartialEq<Self> {
+             // this method is used solely by #[deriving] to assert
+             // that every component of a type implements #[deriving]
+             // itself, the current deriving infrastructure means doing this
+             // assertion without using a method on this trait is nearly
+             // impossible.
+             //
+             // This should never be implemented by hand.
+             #[doc(hidden)]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn assert_receiver_is_total_eq(&self) {}
+         }
+ 
+         #[lang = "partial_ord"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[doc(alias = ">")]
+         #[doc(alias = "<")]
+         #[doc(alias = "<=")]
+         #[doc(alias = ">=")]
+         // #[rustc_on_unimplemented(
+         //     message = "can't compare `{Self}` with `{Rhs}`",
+         //     label = "no implementation for `{Self} < {Rhs}` and `{Self} > {Rhs}`"
+         // )]
+         pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
+             /// This method returns an ordering between `self` and `other` values if one exists.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// use std::cmp::Ordering;
+             ///
+             /// let result = 1.0.partial_cmp(&2.0);
+             /// assert_eq!(result, Some(Ordering::Less));
+             ///
+             /// let result = 1.0.partial_cmp(&1.0);
+             /// assert_eq!(result, Some(Ordering::Equal));
+             ///
+             /// let result = 2.0.partial_cmp(&1.0);
+             /// assert_eq!(result, Some(Ordering::Greater));
+             /// ```
+             ///
+             /// When comparison is impossible:
+             ///
+             /// ```
+             /// let result = f64::NAN.partial_cmp(&1.0);
+             /// assert_eq!(result, None);
+             /// ```
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn partial_cmp(&self, other: &Rhs) -> Option<Ordering>;
+ 
+             /// This method tests less than (for `self` and `other`) and is used by the `<` operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 < 2.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 < 1.0;
+             /// assert_eq!(result, false);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn lt(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Less) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests less than or equal to (for `self` and `other`) and is used by the `<=`
+             /// operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 <= 2.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 <= 2.0;
+             /// assert_eq!(result, true);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn le(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Less | Ordering::Equal) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests greater than (for `self` and `other`) and is used by the `>` operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 > 2.0;
+             /// assert_eq!(result, false);
+             ///
+             /// let result = 2.0 > 2.0;
+             /// assert_eq!(result, false);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn gt(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Greater) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests greater than or equal to (for `self` and `other`) and is used by the `>=`
+             /// operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 2.0 >= 1.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 >= 2.0;
+             /// assert_eq!(result, true);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn ge(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Greater | Ordering::Equal) => true,
+                     _ => false,
+                 }
+             }
+         }
+ 
+         #[doc(alias = "<")]
+         #[doc(alias = ">")]
+         #[doc(alias = "<=")]
+         #[doc(alias = ">=")]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub trait Ord: Eq + PartialOrd<Self> {
+             /// This method returns an [`Ordering`] between `self` and `other`.
+             ///
+             /// By convention, `self.cmp(&other)` returns the ordering matching the expression
+             /// `self <operator> other` if true.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// use std::cmp::Ordering;
+             ///
+             /// assert_eq!(5.cmp(&10), Ordering::Less);
+             /// assert_eq!(10.cmp(&5), Ordering::Greater);
+             /// assert_eq!(5.cmp(&5), Ordering::Equal);
+             /// ```
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn cmp(&self, other: &Self) -> Ordering;
+ 
+             /// Compares and returns the maximum of two values.
+             ///
+             /// Returns the second argument if the comparison determines them to be equal.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// assert_eq!(2, 1.max(2));
+             /// assert_eq!(2, 2.max(2));
+             /// ```
+             #[stable(feature = "ord_max_min", since = "1.21.0")]
+             #[must_use]
+             fn max(self, other: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 self
+             }
+ 
+             /// Compares and returns the minimum of two values.
+             ///
+             /// Returns the first argument if the comparison determines them to be equal.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// assert_eq!(1, 1.min(2));
+             /// assert_eq!(2, 2.min(2));
+             /// ```
+             #[stable(feature = "ord_max_min", since = "1.21.0")]
+             #[must_use]
+             fn min(self, other: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 self
+             }
+ 
+             /// Restrict a value to a certain interval.
+             ///
+             /// Returns `max` if `self` is greater than `max`, and `min` if `self` is
+             /// less than `min`. Otherwise this returns `self`.
+             ///
+             /// # Panics
+             ///
+             /// Panics if `min > max`.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// #![feature(clamp)]
+             ///
+             /// assert!((-3).clamp(-2, 1) == -2);
+             /// assert!(0.clamp(-2, 1) == 0);
+             /// assert!(2.clamp(-2, 1) == 1);
+             /// ```
+             #[must_use]
+             #[unstable(feature = "clamp", issue = "44095")]
+             fn clamp(self, min: Self, max: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 if self < min {
+                     min
+                 } else if self > max {
+                     max
+                 } else {
+                     self
+                 }
+             }
+         }
+     }
+ 
+     pub mod intrinsics {
+         #[lang = "discriminant_kind"]
+         pub trait DiscriminantKind {
+             #[lang = "discriminant_type"]
+             type Discriminant;
+         }
+ 
+         extern "rust-intrinsic" {
+             pub fn discriminant_value<T>(v: &T) -> <T as DiscriminantKind>::Discriminant;
+         }
+     }
+ }
+ 
+ use core::cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd};
+ use core::marker::Sized;
+ use core::option::Option;
+ 
+ // for comparing discriminant_value
+ impl PartialEq for isize {
+     fn eq(&self, other: &Self) -> bool {
+         *self == *other
+     }
+ }
+ 
+ // for comparing discriminant_value
+ impl PartialOrd for isize {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         if *self > *other {
+             Option::Some(Ordering::Greater)
+         } else if *self < *other {
+             Option::Some(Ordering::Less)
+         } else {
+             Option::Some(Ordering::Equal)
+         }
+     }
+ 
+     fn lt(&self, other: &Self) -> bool {
+         *self < *other
+     }
+     fn le(&self, other: &Self) -> bool {
+         *self <= *other
+     }
+     fn ge(&self, other: &Self) -> bool {
+         *self >= *other
+     }
+     fn gt(&self, other: &Self) -> bool {
+         *self > *other
+     }
+ }
+ 
+ impl PartialEq for i32 {
+     fn eq(&self, other: &Self) -> bool {
+         *self == *other
+     }
+ }
+ impl Eq for i32 {}
+ 
+ impl PartialOrd for i32 {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         if *self > *other {
+             Option::Some(Ordering::Greater)
+         } else if *self < *other {
+             Option::Some(Ordering::Less)
+         } else {
+             Option::Some(Ordering::Equal)
+         }
+     }
+ 
+     fn lt(&self, other: &Self) -> bool {
+         *self < *other
+     }
+     fn le(&self, other: &Self) -> bool {
+         *self <= *other
+     }
+     fn ge(&self, other: &Self) -> bool {
+         *self >= *other
+     }
+     fn gt(&self, other: &Self) -> bool {
+         *self > *other
+     }
+ }
+ 
+ impl Ord for i32 {
+     fn cmp(&self, other: &Self) -> Ordering {
+         if *self > *other {
+             Ordering::Greater
+         } else if *self < *other {
+             Ordering::Less
+         } else {
+             Ordering::Equal
+         }
+     }
+ }
+ 
+ #[derive(PartialEq, Eq, Ord)]
+ struct Foo {
+     a: i32,
+ }
+ 
+ impl PartialOrd for Foo {
+     fn partial_cmp(&self, other: &'_ Foo) -> Option<::core::cmp::Ordering> {
+         self.a.partial_cmp(&other.a)
+     }
+ }
+ 
+ extern "C" {
+     fn puts(s: *const i8);
+ }
+ 
+ fn print(s: &str) {
+     unsafe {
+         puts(s as *const str as *const i8);
+     }
+ }
+ 
+ fn main() -> i32 {
+     let a = Foo { a: 42 };
+     let b = Foo { a: 42 };
+     let c = Foo { a: 7 };
+ 
+     if a == b {
+         print("a == b");
+     } else {
+         print("a != b");
+     }
+ 
+     if a != c {
+         print("a != c");
+     } else {
+         print("a == c");
+     }
+ 
+     if a < c {
+         print("a < c");
+     } else {
+         print("a >= c");
+     }
+ 
+     if a <= b {
+         print("a <= b");
+     } else {
+         print("a > b");
+     }
+ 
+     if a > c {
+         print("a > c");
+     } else {
+         print("a <= c");
+     }
+ 
+     if c >= b {
+         print("c >= b");
+     } else {
+         print("c < b");
+     }
+ 
+     0
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/partial-ord-6.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/partial-ord-6.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/partial-ord-6.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/partial-ord-6.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,518 ----
+ // { dg-additional-options "-w" }
+ /* { dg-output "Foo A < B\r?\nFoo B < C\r?\nFoo C == C\r?\nBar x < y\r?\nBarFull s1 < s2\r?\n" } */
+ 
+ #![feature(intrinsics)]
+ 
+ mod core {
+     mod option {
+         // #[rustc_diagnostic_item = "option_type"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub enum Option<T> {
+             /// No value
+             #[lang = "None"]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             None,
+             /// Some value `T`
+             #[lang = "Some"]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Some(#[stable(feature = "rust1", since = "1.0.0")] T),
+         }
+     }
+ 
+     mod marker {
+         #[lang = "phantom_data"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub struct PhantomData<T: ?Sized>;
+ 
+         #[unstable(feature = "structural_match", issue = "31434")]
+         // #[rustc_on_unimplemented(message = "the type `{Self}` does not `#[derive(PartialEq)]`")]
+         #[lang = "structural_peq"]
+         pub trait StructuralPartialEq {
+             // Empty.
+         }
+ 
+         #[unstable(feature = "structural_match", issue = "31434")]
+         // #[rustc_on_unimplemented(message = "the type `{Self}` does not `#[derive(Eq)]`")]
+         #[lang = "structural_teq"]
+         pub trait StructuralEq {
+             // Empty.
+         }
+ 
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[lang = "sized"]
+         // #[rustc_on_unimplemented(
+         //     message = "the size for values of type `{Self}` cannot be known at compilation time",
+         //     label = "doesn't have a size known at compile-time"
+         // )]
+         // #[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
+         // #[rustc_specialization_trait]
+         pub trait Sized {
+             // Empty.
+         }
+     }
+ 
+     mod cmp {
+         use super::marker::Sized;
+         use super::option::Option;
+ 
+         // #[derive(Clone, Copy, PartialEq, Debug, Hash)]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub enum Ordering {
+             /// An ordering where a compared value is less than another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Less = -1,
+             /// An ordering where a compared value is equal to another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Equal = 0,
+             /// An ordering where a compared value is greater than another.
+             #[stable(feature = "rust1", since = "1.0.0")]
+             Greater = 1,
+         }
+ 
+         #[lang = "eq"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[doc(alias = "==")]
+         #[doc(alias = "!=")]
+         // #[rustc_on_unimplemented(
+         //     message = "can't compare `{Self}` with `{Rhs}`",
+         //     label = "no implementation for `{Self} == {Rhs}`"
+         // )]
+         pub trait PartialEq<Rhs: ?Sized = Self> {
+             /// This method tests for `self` and `other` values to be equal, and is used
+             /// by `==`.
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn eq(&self, other: &Rhs) -> bool;
+ 
+             fn ne(&self, other: &Rhs) -> bool {
+                 !self.eq(other)
+             }
+         }
+ 
+         #[doc(alias = "==")]
+         #[doc(alias = "!=")]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub trait Eq: PartialEq<Self> {
+             // this method is used solely by #[deriving] to assert
+             // that every component of a type implements #[deriving]
+             // itself, the current deriving infrastructure means doing this
+             // assertion without using a method on this trait is nearly
+             // impossible.
+             //
+             // This should never be implemented by hand.
+             #[doc(hidden)]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn assert_receiver_is_total_eq(&self) {}
+         }
+ 
+         #[lang = "partial_ord"]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         #[doc(alias = ">")]
+         #[doc(alias = "<")]
+         #[doc(alias = "<=")]
+         #[doc(alias = ">=")]
+         // #[rustc_on_unimplemented(
+         //     message = "can't compare `{Self}` with `{Rhs}`",
+         //     label = "no implementation for `{Self} < {Rhs}` and `{Self} > {Rhs}`"
+         // )]
+         pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
+             /// This method returns an ordering between `self` and `other` values if one exists.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// use std::cmp::Ordering;
+             ///
+             /// let result = 1.0.partial_cmp(&2.0);
+             /// assert_eq!(result, Some(Ordering::Less));
+             ///
+             /// let result = 1.0.partial_cmp(&1.0);
+             /// assert_eq!(result, Some(Ordering::Equal));
+             ///
+             /// let result = 2.0.partial_cmp(&1.0);
+             /// assert_eq!(result, Some(Ordering::Greater));
+             /// ```
+             ///
+             /// When comparison is impossible:
+             ///
+             /// ```
+             /// let result = f64::NAN.partial_cmp(&1.0);
+             /// assert_eq!(result, None);
+             /// ```
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn partial_cmp(&self, other: &Rhs) -> Option<Ordering>;
+ 
+             /// This method tests less than (for `self` and `other`) and is used by the `<` operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 < 2.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 < 1.0;
+             /// assert_eq!(result, false);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn lt(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Less) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests less than or equal to (for `self` and `other`) and is used by the `<=`
+             /// operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 <= 2.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 <= 2.0;
+             /// assert_eq!(result, true);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn le(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Less | Ordering::Equal) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests greater than (for `self` and `other`) and is used by the `>` operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 1.0 > 2.0;
+             /// assert_eq!(result, false);
+             ///
+             /// let result = 2.0 > 2.0;
+             /// assert_eq!(result, false);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn gt(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Greater) => true,
+                     _ => false,
+                 }
+             }
+ 
+             /// This method tests greater than or equal to (for `self` and `other`) and is used by the `>=`
+             /// operator.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// let result = 2.0 >= 1.0;
+             /// assert_eq!(result, true);
+             ///
+             /// let result = 2.0 >= 2.0;
+             /// assert_eq!(result, true);
+             /// ```
+             #[inline]
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn ge(&self, other: &Rhs) -> bool {
+                 match self.partial_cmp(other) {
+                     Option::Some(Ordering::Greater | Ordering::Equal) => true,
+                     _ => false,
+                 }
+             }
+         }
+ 
+         #[doc(alias = "<")]
+         #[doc(alias = ">")]
+         #[doc(alias = "<=")]
+         #[doc(alias = ">=")]
+         #[stable(feature = "rust1", since = "1.0.0")]
+         pub trait Ord: Eq + PartialOrd<Self> {
+             /// This method returns an [`Ordering`] between `self` and `other`.
+             ///
+             /// By convention, `self.cmp(&other)` returns the ordering matching the expression
+             /// `self <operator> other` if true.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// use std::cmp::Ordering;
+             ///
+             /// assert_eq!(5.cmp(&10), Ordering::Less);
+             /// assert_eq!(10.cmp(&5), Ordering::Greater);
+             /// assert_eq!(5.cmp(&5), Ordering::Equal);
+             /// ```
+             #[must_use]
+             #[stable(feature = "rust1", since = "1.0.0")]
+             fn cmp(&self, other: &Self) -> Ordering;
+ 
+             /// Compares and returns the maximum of two values.
+             ///
+             /// Returns the second argument if the comparison determines them to be equal.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// assert_eq!(2, 1.max(2));
+             /// assert_eq!(2, 2.max(2));
+             /// ```
+             #[stable(feature = "ord_max_min", since = "1.21.0")]
+             #[must_use]
+             fn max(self, other: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 self
+             }
+ 
+             /// Compares and returns the minimum of two values.
+             ///
+             /// Returns the first argument if the comparison determines them to be equal.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// assert_eq!(1, 1.min(2));
+             /// assert_eq!(2, 2.min(2));
+             /// ```
+             #[stable(feature = "ord_max_min", since = "1.21.0")]
+             #[must_use]
+             fn min(self, other: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 self
+             }
+ 
+             /// Restrict a value to a certain interval.
+             ///
+             /// Returns `max` if `self` is greater than `max`, and `min` if `self` is
+             /// less than `min`. Otherwise this returns `self`.
+             ///
+             /// # Panics
+             ///
+             /// Panics if `min > max`.
+             ///
+             /// # Examples
+             ///
+             /// ```
+             /// #![feature(clamp)]
+             ///
+             /// assert!((-3).clamp(-2, 1) == -2);
+             /// assert!(0.clamp(-2, 1) == 0);
+             /// assert!(2.clamp(-2, 1) == 1);
+             /// ```
+             #[must_use]
+             #[unstable(feature = "clamp", issue = "44095")]
+             fn clamp(self, min: Self, max: Self) -> Self
+             where
+                 Self: Sized,
+             {
+                 if self < min {
+                     min
+                 } else if self > max {
+                     max
+                 } else {
+                     self
+                 }
+             }
+         }
+     }
+ 
+     pub mod intrinsics {
+         #[lang = "discriminant_kind"]
+         pub trait DiscriminantKind {
+             #[lang = "discriminant_type"]
+             type Discriminant;
+         }
+ 
+         extern "rust-intrinsic" {
+             pub fn discriminant_value<T>(v: &T) -> <T as DiscriminantKind>::Discriminant;
+         }
+     }
+ }
+ 
+ use core::cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd};
+ use core::marker::Sized;
+ use core::option::Option;
+ 
+ // for comparing discriminant_value
+ impl PartialEq for isize {
+     fn eq(&self, other: &Self) -> bool {
+         *self == *other
+     }
+ }
+ 
+ // for comparing discriminant_value
+ impl PartialOrd for isize {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         if *self > *other {
+             Option::Some(Ordering::Greater)
+         } else if *self < *other {
+             Option::Some(Ordering::Less)
+         } else {
+             Option::Some(Ordering::Equal)
+         }
+     }
+ 
+     fn lt(&self, other: &Self) -> bool {
+         *self < *other
+     }
+     fn le(&self, other: &Self) -> bool {
+         *self <= *other
+     }
+     fn ge(&self, other: &Self) -> bool {
+         *self >= *other
+     }
+     fn gt(&self, other: &Self) -> bool {
+         *self > *other
+     }
+ }
+ 
+ impl PartialEq for i32 {
+     fn eq(&self, other: &Self) -> bool {
+         *self == *other
+     }
+ }
+ 
+ impl PartialOrd for i32 {
+     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
+         if *self > *other {
+             Option::Some(Ordering::Greater)
+         } else if *self < *other {
+             Option::Some(Ordering::Less)
+         } else {
+             Option::Some(Ordering::Equal)
+         }
+     }
+ 
+     fn lt(&self, other: &Self) -> bool {
+         *self < *other
+     }
+     fn le(&self, other: &Self) -> bool {
+         *self <= *other
+     }
+     fn ge(&self, other: &Self) -> bool {
+         *self >= *other
+     }
+     fn gt(&self, other: &Self) -> bool {
+         *self > *other
+     }
+ }
+ 
+ impl Ord for i32 {
+     fn cmp(&self, other: &Self) -> Ordering {
+         if *self > *other {
+             Ordering::Greater
+         } else if *self < *other {
+             Ordering::Less
+         } else {
+             Ordering::Equal
+         }
+     }
+ }
+ 
+ impl Eq for i32 {}
+ 
+ #[derive(PartialEq, PartialOrd)]
+ enum Foo {
+     A,
+     B(i32, i32, i32),
+     C { inner: i32, outer: i32 },
+ }
+ 
+ #[derive(Ord, PartialOrd, PartialEq, Eq)]
+ struct Bar {
+     a: i32,
+ }
+ 
+ #[derive(Ord, PartialOrd, PartialEq, Eq)]
+ struct BarFull {
+     a: i32,
+     b: i32,
+     c: i32,
+     d: i32,
+ }
+ 
+ extern "C" {
+     fn puts(s: *const i8);
+ }
+ 
+ fn print(s: &str) {
+     unsafe {
+         puts(s as *const str as *const i8);
+     }
+ }
+ 
+ fn main() -> i32 {
+     // Enum comparison
+     let a = Foo::A;
+     let b = Foo::B(15, 14, 13);
+     let c = Foo::C {
+         inner: 10,
+         outer: 20,
+     };
+ 
+     match a.partial_cmp(&b) {
+         Option::Some(Ordering::Less) => print("Foo A < B"),
+         Option::Some(Ordering::Greater) => print("Foo A > B"),
+         Option::Some(Ordering::Equal) => print("Foo A == B"),
+         _ => print("Foo A ? B"),
+     }
+ 
+     match b.partial_cmp(&c) {
+         Option::Some(Ordering::Less) => print("Foo B < C"),
+         Option::Some(Ordering::Greater) => print("Foo B > C"),
+         Option::Some(Ordering::Equal) => print("Foo B == C"),
+         _ => print("Foo B ? C"),
+     }
+ 
+     match c.partial_cmp(&c) {
+         Option::Some(Ordering::Less) => print("Foo C < C ???"),
+         Option::Some(Ordering::Greater) => print("Foo C > C ???"),
+         Option::Some(Ordering::Equal) => print("Foo C == C"),
+         _ => print("Foo C ? C"),
+     }
+ 
+     // Struct comparison: Bar
+     let x = Bar { a: 10 };
+     let y = Bar { a: 20 };
+ 
+     if x < y {
+         print("Bar x < y");
+     } else if x > y {
+         print("Bar x > y");
+     } else {
+         print("Bar x == y");
+     }
+ 
+     // Struct comparison: BarFull
+     let s1 = BarFull {
+         a: 1,
+         b: 2,
+         c: 3,
+         d: 4,
+     };
+     let s2 = BarFull {
+         a: 1,
+         b: 2,
+         c: 3,
+         d: 5,
+     };
+ 
+     match s1.cmp(&s2) {
+         Ordering::Less => print("BarFull s1 < s2"),
+         Ordering::Greater => print("BarFull s1 > s2"),
+         Ordering::Equal => print("BarFull s1 == s2"),
+     }
+ 
+     0
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/sip-hasher.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/sip-hasher.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/sip-hasher.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/sip-hasher.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,438 ----
+ // { dg-skip-if "" { *-*-* } { "-m32" } { "" } }
+ // { dg-options "-w" }
+ // { dg-output "Hash: 0x63d53fd2170bbb8c\r*\n" }
+ #![feature(intrinsics)]
+ #![feature(rustc_attrs)]
+ 
+ #[lang = "sized"]
+ trait Sized {}
+ 
+ mod intrinsics {
+     extern "rust-intrinsic" {
+         pub fn wrapping_add<T>(a: T, b: T) -> T;
+         pub fn rotate_left<T>(a: T, b: T) -> T;
+         pub fn offset<T>(ptr: *const T, count: isize) -> *const T;
+     }
+ }
+ 
+ #[lang = "add"]
+ trait Add<Rhs = Self> {
+     type Output;
+ 
+     fn add(self, rhs: Rhs) -> Self::Output;
+ }
+ 
+ macro_rules! add_impl {
+     ($($t:ty)*) => ($(
+         impl Add for $t {
+             type Output = $t;
+ 
+             #[inline]
+             #[rustc_inherit_overflow_checks]
+             fn add(self, other: $t) -> $t { self + other }
+         }
+ 
+ 
+     )*)
+ }
+ 
+ add_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
+ 
+ impl<T> *const T {
+     pub unsafe fn add(self, count: usize) -> Self {
+         // SAFETY: the caller must uphold the safety contract for `offset`.
+         unsafe { self.offset(count as isize) }
+     }
+ 
+     pub unsafe fn offset(self, count: isize) -> *const T {
+         // SAFETY: the caller must uphold the safety contract for `offset`.
+         unsafe { intrinsics::offset(self, count) }
+     }
+ }
+ 
+ macro_rules! impl_uint {
+     ($($ty:ident = $lang:literal),*) => {
+         $(
+             #[lang = $lang]
+             impl $ty {
+                 pub fn wrapping_add(self, rhs: Self) -> Self {
+                     intrinsics::wrapping_add(self, rhs)
+                 }
+ 
+                 pub fn rotate_left(self, n: u32) -> Self {
+                     intrinsics::rotate_left(self, n as Self)
+                 }
+ 
+                 pub fn to_le(self) -> Self {
+                     #[cfg(target_endian = "little")]
+                     {
+                         self
+                     }
+                     #[cfg(not(target_endian = "little"))]
+                     {
+                        self.swap_bytes()
+                     }
+                 }
+             }
+         )*
+     }
+ }
+ 
+ impl_uint!(
+     u8 = "u8",
+     u16 = "u16",
+     u32 = "u32",
+     u64 = "u64",
+     u128 = "u128",
+     usize = "usize"
+ );
+ 
+ #[repr(C)]
+ pub(crate) struct SliceComponents {
+     pub(crate) data_address: *const (),
+     pub(crate) metadata: usize,
+ }
+ 
+ #[repr(C)]
+ pub(crate) union SliceRepr<T> {
+     pub(crate) const_ptr: *const [T],
+     pub(crate) mut_ptr: *mut [T],
+     pub(crate) components: SliceComponents,
+ }
+ 
+ impl<T> [T] {
+     pub const fn as_ptr(&self) -> *const T {
+         self as *const [T] as *const T
+     }
+ 
+     pub unsafe fn get_unchecked(&self, index: usize) -> &T {
+         unsafe { &*self.as_ptr().add(index) }
+     }
+ 
+     pub fn len(&self) -> usize {
+         unsafe {
+             SliceRepr {
+                 const_ptr: self as *const _,
+             }
+             .components
+             .metadata
+         }
+     }
+ }
+ 
+ trait HasherTrait {
+     fn write(&mut self, msg: &[u8]);
+     fn finish(&self) -> u64;
+ }
+ 
+ mod cmp {
+     pub fn min(a: usize, b: usize) -> usize {
+         if a < b {
+             a
+         } else {
+             b
+         }
+     }
+ }
+ 
+ struct PhantomData<T>;
+ 
+ mod mem {
+     extern "rust-intrinsic" {
+         fn transmute<T, U>(_: T) -> U;
+         fn size_of<T>() -> usize;
+     }
+ }
+ 
+ mod ptr {
+     extern "rust-intrinsic" {
+         fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize);
+     }
+ }
+ 
+ #[repr(C)]
+ struct State {
+     v0: u64,
+     v2: u64,
+     v1: u64,
+     v3: u64,
+ }
+ 
+ struct Hasher<S: Sip> {
+     k0: u64,
+     k1: u64,
+     length: usize, // how many bytes we've processed
+     state: State,  // hash State
+     tail: u64,     // unprocessed bytes le
+     ntail: usize,  // how many bytes in tail are valid
+     _marker: PhantomData<S>,
+ }
+ 
+ macro_rules! compress {
+     ($state:expr) => {{
+         compress!($state.v0, $state.v1, $state.v2, $state.v3)
+     }};
+     ($v0:expr, $v1:expr, $v2:expr, $v3:expr) => {{
+         $v0 = $v0.wrapping_add($v1);
+         $v1 = $v1.rotate_left(13);
+         $v1 ^= $v0;
+         $v0 = $v0.rotate_left(32);
+         $v2 = $v2.wrapping_add($v3);
+         $v3 = $v3.rotate_left(16);
+         $v3 ^= $v2;
+         $v0 = $v0.wrapping_add($v3);
+         $v3 = $v3.rotate_left(21);
+         $v3 ^= $v0;
+         $v2 = $v2.wrapping_add($v1);
+         $v1 = $v1.rotate_left(17);
+         $v1 ^= $v2;
+         $v2 = $v2.rotate_left(32);
+     }};
+ }
+ 
+ #[doc(hidden)]
+ trait Sip {
+     fn c_rounds(_: &mut State);
+     fn d_rounds(_: &mut State);
+ }
+ 
+ struct Sip13Rounds;
+ 
+ impl Sip for Sip13Rounds {
+     #[inline]
+     fn c_rounds(state: &mut State) {
+         compress!(state);
+     }
+ 
+     #[inline]
+     fn d_rounds(state: &mut State) {
+         compress!(state);
+         compress!(state);
+         compress!(state);
+     }
+ }
+ 
+ struct Sip24Rounds;
+ 
+ impl Sip for Sip24Rounds {
+     #[inline]
+     fn c_rounds(state: &mut State) {
+         compress!(state);
+         compress!(state);
+     }
+ 
+     #[inline]
+     fn d_rounds(state: &mut State) {
+         compress!(state);
+         compress!(state);
+         compress!(state);
+         compress!(state);
+     }
+ }
+ 
+ pub struct SipHasher13 {
+     hasher: Hasher<Sip13Rounds>,
+ }
+ 
+ struct SipHasher24 {
+     hasher: Hasher<Sip24Rounds>,
+ }
+ 
+ pub struct SipHasher(SipHasher24);
+ 
+ macro_rules! load_int_le {
+     ($buf:expr, $i:expr, $int_ty:ident) => {{
+         let mut data = 0 as $int_ty;
+         ptr::copy_nonoverlapping(
+             $buf.as_ptr().add($i),
+             &mut data as *mut _ as *mut u8,
+             mem::size_of::<$int_ty>(),
+         );
+         data.to_le()
+     }};
+ }
+ 
+ #[inline]
+ unsafe fn u8to64_le(buf: &[u8], start: usize, len: usize) -> u64 {
+     let mut i = 0; // current byte index (from LSB) in the output u64
+     let mut out = 0;
+     if i + 3 < len {
+         // SAFETY: `i` cannot be greater than `len`, and the caller must guarantee
+         // that the index start..start+len is in bounds.
+         out = unsafe { load_int_le!(buf, start + i, u32) } as u64;
+         i += 4;
+     }
+     if i + 1 < len {
+         // SAFETY: same as above.
+         out |= (unsafe { load_int_le!(buf, start + i, u16) } as u64) << ((i * 8) as u64);
+         i += 2
+     }
+     if i < len {
+         // SAFETY: same as above.
+         out |= (unsafe { *buf.get_unchecked(start + i) } as u64) << ((i * 8) as u64);
+         i += 1;
+     }
+     out
+ }
+ 
+ impl SipHasher {
+     #[inline]
+     #[must_use]
+     pub fn new() -> SipHasher {
+         SipHasher::new_with_keys(0, 0)
+     }
+ 
+     #[inline]
+     #[must_use]
+     pub fn new_with_keys(key0: u64, key1: u64) -> SipHasher {
+         SipHasher(SipHasher24 {
+             hasher: Hasher::new_with_keys(key0, key1),
+         })
+     }
+ }
+ 
+ impl SipHasher13 {
+     #[inline]
+     pub fn new() -> SipHasher13 {
+         SipHasher13::new_with_keys(0, 0)
+     }
+ 
+     #[inline]
+     pub fn new_with_keys(key0: u64, key1: u64) -> SipHasher13 {
+         SipHasher13 {
+             hasher: Hasher::new_with_keys(key0, key1),
+         }
+     }
+ }
+ 
+ impl<S: Sip> Hasher<S> {
+     #[inline]
+     fn new_with_keys(key0: u64, key1: u64) -> Hasher<S> {
+         let mut state = Hasher {
+             k0: key0,
+             k1: key1,
+             length: 0,
+             state: State {
+                 v0: 0,
+                 v1: 0,
+                 v2: 0,
+                 v3: 0,
+             },
+             tail: 0,
+             ntail: 0,
+             _marker: PhantomData,
+         };
+         state.reset();
+         state
+     }
+ 
+     #[inline]
+     fn reset(&mut self) {
+         self.length = 0;
+         self.state.v0 = self.k0 ^ 0x736f6d6570736575;
+         self.state.v1 = self.k1 ^ 0x646f72616e646f6d;
+         self.state.v2 = self.k0 ^ 0x6c7967656e657261;
+         self.state.v3 = self.k1 ^ 0x7465646279746573;
+         self.ntail = 0;
+     }
+ }
+ 
+ impl HasherTrait for SipHasher {
+     #[inline]
+     fn write(&mut self, msg: &[u8]) {
+         self.0.hasher.write(msg)
+     }
+ 
+     #[inline]
+     fn finish(&self) -> u64 {
+         self.0.hasher.finish()
+     }
+ }
+ 
+ impl HasherTrait for SipHasher13 {
+     #[inline]
+     fn write(&mut self, msg: &[u8]) {
+         self.hasher.write(msg)
+     }
+ 
+     #[inline]
+     fn finish(&self) -> u64 {
+         self.hasher.finish()
+     }
+ }
+ 
+ impl<S: Sip> HasherTrait for Hasher<S> {
+     #[inline]
+     fn write(&mut self, msg: &[u8]) {
+         let length = msg.len();
+         self.length += length;
+ 
+         let mut needed = 0;
+ 
+         if self.ntail != 0 {
+             needed = 8 - self.ntail;
+             // SAFETY: `cmp::min(length, needed)` is guaranteed to not be over `length`
+             self.tail |=
+                 unsafe { u8to64_le(msg, 0, cmp::min(length, needed)) } << ((8 * self.ntail) as u64);
+             if length < needed {
+                 self.ntail += length;
+                 return;
+             } else {
+                 self.state.v3 ^= self.tail;
+                 S::c_rounds(&mut self.state);
+                 self.state.v0 ^= self.tail;
+                 self.ntail = 0;
+             }
+         }
+ 
+         // Buffered tail is now flushed, process new input.
+         let len = length - needed;
+         let left = len & 0x7; // len % 8
+ 
+         let mut i = needed;
+         while i < len - left {
+             let mi = unsafe { load_int_le!(msg, i, u64) };
+ 
+             self.state.v3 ^= mi;
+             S::c_rounds(&mut self.state);
+             self.state.v0 ^= mi;
+ 
+             i += 8;
+         }
+ 
+         self.tail = unsafe { u8to64_le(msg, i, left) };
+         self.ntail = left;
+     }
+ 
+     #[inline]
+     fn finish(&self) -> u64 {
+         let mut state = self.state;
+ 
+         let b: u64 = ((self.length as u64 & 0xff) << 56) | self.tail;
+ 
+         state.v3 ^= b;
+         S::c_rounds(&mut state);
+         state.v0 ^= b;
+ 
+         state.v2 ^= 0xff;
+         S::d_rounds(&mut state);
+ 
+         state.v0 ^ state.v1 ^ state.v2 ^ state.v3
+     }
+ }
+ 
+ extern "C" {
+     fn printf(fmt: *const u8, ...) -> i32;
+ }
+ 
+ fn main() -> i32 {
+     let mut hasher = SipHasher::new_with_keys(0x0706050403020100, 0x0f0e0d0c0b0a0908);
+     hasher.write(b"Hello");
+     let result = hasher.finish();
+ 
+     unsafe {
+         printf("Hash: 0x%016llx\n\0" as *const str as *const u8, result);
+     }
+ 
+     0
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/struct-pattern-match.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/struct-pattern-match.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/struct-pattern-match.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/struct-pattern-match.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,13 ----
+ enum Foo {
+     A { x: i32 },
+     B { y: i32 }
+ }
+ 
+ fn main() -> i32 {
+     let x = Foo::A { x: 12 };
+     match x {
+         Foo::A { x: 10 } => 1,
+         Foo::B { y: 11 } => 2,
+         Foo::A { x: abc } => { abc - 12 }
+     }
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/struct_pattern1.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/struct_pattern1.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/struct_pattern1.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/struct_pattern1.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,19 ----
+ struct A {
+     // the two warnings are invalid but this should be fixed by our lint rework
+     // with this year's GSoC so ok for now
+     a: i32, // { dg-warning "never read" }
+     b: i32, // { dg-warning "never read" }
+ }
+ 
+ fn main() -> i32 {
+     let a = A { a: 15, b: 14 };
+ 
+     let result = match a {
+         A {
+             a: self_a,
+             b: self_b,
+         } => self_a + self_b,
+     };
+ 
+     result - 29
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/trait10.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/trait10.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/trait10.rs	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/trait10.rs	Sun Aug 10 22:32:56 2025
*************** impl Bar for Foo {
*** 26,32 ****
  struct S;
  impl S {
      fn dynamic_dispatch(self, t: &dyn Bar) {
-         // { dg-warning "unused name" "" { target *-*-* } .-1 }
          t.baz();
      }
  }
--- 26,31 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/trait11.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/trait11.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/trait11.rs	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/trait11.rs	Sun Aug 10 22:32:56 2025
*************** trait FnLike<A, R> {
*** 13,19 ****
  struct S;
  impl<'a, T> FnLike<&'a T, &'a T> for S {
      fn call(&self, arg: &'a T) -> &'a T {
-         // { dg-warning "unused name .self." "" { target *-*-* } .-1 }
          arg
      }
  }
--- 13,18 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/trait12.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/trait12.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/trait12.rs	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/trait12.rs	Sun Aug 10 22:32:56 2025
*************** struct Identity;
*** 16,22 ****
  
  impl<'a, T> FnLike<&'a T, &'a T> for Identity {
      fn call(&self, arg: &'a T) -> &'a T {
-         // { dg-warning "unused name .self." "" { target *-*-* } .-1 }
          arg
      }
  }
--- 16,21 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/trait13.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/trait13.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/trait13.rs	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/trait13.rs	Sun Aug 10 22:32:56 2025
*************** trait Bar {
*** 11,17 ****
      fn baz(&self);
  
      fn qux(&self) {
-         // { dg-warning "unused name" "" { target *-*-* } .-1 }
          unsafe {
              let a = "%i\n\0";
              let b = a as *const str;
--- 11,16 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/torture/trait9.rs gcc-16-20250810/gcc/testsuite/rust/execute/torture/trait9.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/torture/trait9.rs	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/testsuite/rust/execute/torture/trait9.rs	Sun Aug 10 22:32:56 2025
*************** trait FnLike<A, R> {
*** 13,19 ****
  struct S;
  impl<T> FnLike<&T, &T> for S {
      fn call(&self, arg: &T) -> &T {
-         // { dg-warning "unused name .self." "" { target *-*-* } .-1 }
          arg
      }
  }
--- 13,18 ----
diff -Nrcpad gcc-16-20250803/gcc/testsuite/rust/execute/xfail/match-identifierpattern-enum.rs gcc-16-20250810/gcc/testsuite/rust/execute/xfail/match-identifierpattern-enum.rs
*** gcc-16-20250803/gcc/testsuite/rust/execute/xfail/match-identifierpattern-enum.rs	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/rust/execute/xfail/match-identifierpattern-enum.rs	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,15 ----
+ enum Foo {
+     I(i32),
+ }
+ 
+ fn main() -> i32 {
+     let x = Foo::I(0);
+     let ret = 1;
+ 
+     match x {
+         _ @ Foo::I(b) => { ret = b },
+         _ => {},
+     };
+ 
+     ret
+ }
diff -Nrcpad gcc-16-20250803/gcc/testsuite/sarif-replay.dg/2.1.0-valid/embedded-links-check-html.py gcc-16-20250810/gcc/testsuite/sarif-replay.dg/2.1.0-valid/embedded-links-check-html.py
*** gcc-16-20250803/gcc/testsuite/sarif-replay.dg/2.1.0-valid/embedded-links-check-html.py	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/testsuite/sarif-replay.dg/2.1.0-valid/embedded-links-check-html.py	Sun Aug 10 22:32:56 2025
*************** def test_generated_html(html_tree):
*** 25,28 ****
      assert_tag(msg[1], 'a')
      assert msg[1].text == 'link'
      assert msg[1].get('href') == 'http://www.example.com'
!     assert msg[1].tail == '. '
--- 25,28 ----
      assert_tag(msg[1], 'a')
      assert msg[1].text == 'link'
      assert msg[1].get('href') == 'http://www.example.com'
!     assert msg[1].tail == '.'
diff -Nrcpad gcc-16-20250803/gcc/testsuite/sarif-replay.dg/2.1.0-valid/graphs-check-html.py gcc-16-20250810/gcc/testsuite/sarif-replay.dg/2.1.0-valid/graphs-check-html.py
*** gcc-16-20250803/gcc/testsuite/sarif-replay.dg/2.1.0-valid/graphs-check-html.py	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/testsuite/sarif-replay.dg/2.1.0-valid/graphs-check-html.py	Sun Aug 10 22:32:56 2025
*************** def test_result_graph(html_tree):
*** 24,30 ****
      assert message.attrib['id'] == 'gcc-diag-0-message'
  
      assert message[0].tag == make_tag('strong')
!     assert message[0].tail == ' this is a placeholder error, with graphs '
  
      graph = diag.find("./xhtml:div[@class='gcc-directed-graph']", ns)
      assert graph is not None
--- 24,30 ----
      assert message.attrib['id'] == 'gcc-diag-0-message'
  
      assert message[0].tag == make_tag('strong')
!     assert message[0].tail == ' this is a placeholder error, with graphs'
  
      graph = diag.find("./xhtml:div[@class='gcc-directed-graph']", ns)
      assert graph is not None
diff -Nrcpad gcc-16-20250803/gcc/testsuite/sarif-replay.dg/2.1.0-valid/nested-diagnostics-1.sarif gcc-16-20250810/gcc/testsuite/sarif-replay.dg/2.1.0-valid/nested-diagnostics-1.sarif
*** gcc-16-20250803/gcc/testsuite/sarif-replay.dg/2.1.0-valid/nested-diagnostics-1.sarif	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/gcc/testsuite/sarif-replay.dg/2.1.0-valid/nested-diagnostics-1.sarif	Sun Aug 10 22:32:56 2025
***************
*** 0 ****
--- 1,164 ----
+ /* Test a replay of a .sarif file generated from GCC testsuite.
+ 
+    The dg directives were stripped out from the generated .sarif
+    to avoid confusing DejaGnu for this test.   */
+ /* { dg-additional-options "-fdiagnostics-add-output=sarif:file=nested-diagnostics-1.roundtrip.sarif" } */
+ /* { dg-additional-options "-fdiagnostics-add-output=experimental-html:file=nested-diagnostics-1.sarif.html,javascript=no" } */
+ 
+ {"$schema": "https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/schemas/sarif-schema-2.1.0.json",
+  "version": "2.1.0",
+  "runs": [{"tool": {"driver": {"name": "GNU C23",
+                                "fullName": "GNU C23 (GCC) version 16.0.0 20250723 (experimental) (x86_64-pc-linux-gnu)",
+                                "version": "16.0.0 20250723 (experimental)",
+                                "informationUri": "https://gcc.gnu.org/gcc-16/",
+                                "rules": []},
+                     "extensions": [{"name": "diagnostic_plugin_test_nesting",
+                                     "fullName": "./diagnostic_plugin_test_nesting.so"}]},
+            "invocations": [{"executionSuccessful": false,
+                             "toolExecutionNotifications": []}],
+            "artifacts": [{"location": {"uri": "diagnostic-test-nesting-sarif.c"},
+                           "sourceLanguage": "c",
+                           "contents": {"text": "\n\nextern void foo (void);\n\nvoid test_nesting (void)\n{\n  foo ();\n}\n"},
+                           "roles": ["analysisTarget"]}],
+            "results": [{"ruleId": "error",
+                         "level": "error",
+                         "message": {"text": "top-level error"},
+                         "locations": [{"physicalLocation": {"artifactLocation": {"uri": "diagnostic-test-nesting-sarif.c"},
+                                                             "region": {"startLine": 8,
+                                                                        "startColumn": 3,
+                                                                        "endColumn": 9},
+                                                             "contextRegion": {"startLine": 8,
+                                                                               "snippet": {"text": "  foo ();\n"}}},
+                                        "logicalLocations": [{"index": 0,
+                                                              "fullyQualifiedName": "test_nesting"}]}],
+                         "relatedLocations": [{"physicalLocation": {"artifactLocation": {"uri": "diagnostic-test-nesting-sarif.c"},
+                                                                    "region": {"startLine": 8,
+                                                                               "startColumn": 3,
+                                                                               "endColumn": 9},
+                                                                    "contextRegion": {"startLine": 8,
+                                                                                      "snippet": {"text": "  foo ();\n"}}},
+                                               "message": {"text": "child 0"},
+                                               "properties": {"nestingLevel": 1}},
+                                              {"physicalLocation": {"artifactLocation": {"uri": "diagnostic-test-nesting-sarif.c"},
+                                                                    "region": {"startLine": 8,
+                                                                               "startColumn": 3,
+                                                                               "endColumn": 9},
+                                                                    "contextRegion": {"startLine": 8,
+                                                                                      "snippet": {"text": "  foo ();\n"}}},
+                                               "message": {"text": "grandchild 0 0"},
+                                               "properties": {"nestingLevel": 2}},
+                                              {"physicalLocation": {"artifactLocation": {"uri": "diagnostic-test-nesting-sarif.c"},
+                                                                    "region": {"startLine": 8,
+                                                                               "startColumn": 3,
+                                                                               "endColumn": 9},
+                                                                    "contextRegion": {"startLine": 8,
+                                                                                      "snippet": {"text": "  foo ();\n"}}},
+                                               "message": {"text": "grandchild 0 1"},
+                                               "properties": {"nestingLevel": 2}},
+                                              {"physicalLocation": {"artifactLocation": {"uri": "diagnostic-test-nesting-sarif.c"},
+                                                                    "region": {"startLine": 8,
+                                                                               "startColumn": 3,
+                                                                               "endColumn": 9},
+                                                                    "contextRegion": {"startLine": 8,
+                                                                                      "snippet": {"text": "  foo ();\n"}}},
+                                               "message": {"text": "grandchild 0 2"},
+                                               "properties": {"nestingLevel": 2}},
+                                              {"physicalLocation": {"artifactLocation": {"uri": "diagnostic-test-nesting-sarif.c"},
+                                                                    "region": {"startLine": 8,
+                                                                               "startColumn": 3,
+                                                                               "endColumn": 9},
+                                                                    "contextRegion": {"startLine": 8,
+                                                                                      "snippet": {"text": "  foo ();\n"}}},
+                                               "message": {"text": "child 1"},
+                                               "properties": {"nestingLevel": 1}},
+                                              {"physicalLocation": {"artifactLocation": {"uri": "diagnostic-test-nesting-sarif.c"},
+                                                                    "region": {"startLine": 8,
+                                                                               "startColumn": 3,
+                                                                               "endColumn": 9},
+                                                                    "contextRegion": {"startLine": 8,
+                                                                                      "snippet": {"text": "  foo ();\n"}}},
+                                               "message": {"text": "grandchild 1 0"},
+                                               "properties": {"nestingLevel": 2}},
+                                              {"physicalLocation": {"artifactLocation": {"uri": "diagnostic-test-nesting-sarif.c"},
+                                                                    "region": {"startLine": 8,
+                                                                               "startColumn": 3,
+                                                                               "endColumn": 9},
+                                                                    "contextRegion": {"startLine": 8,
+                                                                                      "snippet": {"text": "  foo ();\n"}}},
+                                               "message": {"text": "grandchild 1 1"},
+                                               "properties": {"nestingLevel": 2}},
+                                              {"physicalLocation": {"artifactLocation": {"uri": "diagnostic-test-nesting-sarif.c"},
+                                                                    "region": {"startLine": 8,
+                                                                               "startColumn": 3,
+                                                                               "endColumn": 9},
+                                                                    "contextRegion": {"startLine": 8,
+                                                                                      "snippet": {"text": "  foo ();\n"}}},
+                                               "message": {"text": "grandchild 1 2"},
+                                               "properties": {"nestingLevel": 2}},
+                                              {"physicalLocation": {"artifactLocation": {"uri": "diagnostic-test-nesting-sarif.c"},
+                                                                    "region": {"startLine": 8,
+                                                                               "startColumn": 3,
+                                                                               "endColumn": 9},
+                                                                    "contextRegion": {"startLine": 8,
+                                                                                      "snippet": {"text": "  foo ();\n"}}},
+                                               "message": {"text": "child 2"},
+                                               "properties": {"nestingLevel": 1}},
+                                              {"physicalLocation": {"artifactLocation": {"uri": "diagnostic-test-nesting-sarif.c"},
+                                                                    "region": {"startLine": 8,
+                                                                               "startColumn": 3,
+                                                                               "endColumn": 9},
+                                                                    "contextRegion": {"startLine": 8,
+                                                                                      "snippet": {"text": "  foo ();\n"}}},
+                                               "message": {"text": "grandchild 2 0"},
+                                               "properties": {"nestingLevel": 2}},
+                                              {"physicalLocation": {"artifactLocation": {"uri": "diagnostic-test-nesting-sarif.c"},
+                                                                    "region": {"startLine": 8,
+                                                                               "startColumn": 3,
+                                                                               "endColumn": 9},
+                                                                    "contextRegion": {"startLine": 8,
+                                                                                      "snippet": {"text": "  foo ();\n"}}},
+                                               "message": {"text": "grandchild 2 1"},
+                                               "properties": {"nestingLevel": 2}},
+                                              {"physicalLocation": {"artifactLocation": {"uri": "diagnostic-test-nesting-sarif.c"},
+                                                                    "region": {"startLine": 8,
+                                                                               "startColumn": 3,
+                                                                               "endColumn": 9},
+                                                                    "contextRegion": {"startLine": 8,
+                                                                                      "snippet": {"text": "  foo ();\n"}}},
+                                               "message": {"text": "grandchild 2 2"},
+                                               "properties": {"nestingLevel": 2}}]}],
+            "logicalLocations": [{"name": "test_nesting",
+                                  "fullyQualifiedName": "test_nesting",
+                                  "decoratedName": "test_nesting",
+                                  "kind": "function",
+                                  "index": 0}]}]}
+ 
+ /* For now, we don't have a way of enabling showing the nesting
+    on the default text output.  However we do test the nesting
+    in the SARIF and HTML outputs below.  */
+ /* { dg-begin-multiline-output "" }
+ In function 'test_nesting':
+ diagnostic-test-nesting-sarif.c:8:3: error: top-level error
+     8 | }
+       |   ^     
+ diagnostic-test-nesting-sarif.c:8:3: note: child 0
+ diagnostic-test-nesting-sarif.c:8:3: note: grandchild 0 0
+ diagnostic-test-nesting-sarif.c:8:3: note: grandchild 0 1
+ diagnostic-test-nesting-sarif.c:8:3: note: grandchild 0 2
+ diagnostic-test-nesting-sarif.c:8:3: note: child 1
+ diagnostic-test-nesting-sarif.c:8:3: note: grandchild 1 0
+ diagnostic-test-nesting-sarif.c:8:3: note: grandchild 1 1
+ diagnostic-test-nesting-sarif.c:8:3: note: grandchild 1 2
+ diagnostic-test-nesting-sarif.c:8:3: note: child 2
+ diagnostic-test-nesting-sarif.c:8:3: note: grandchild 2 0
+ diagnostic-test-nesting-sarif.c:8:3: note: grandchild 2 1
+ diagnostic-test-nesting-sarif.c:8:3: note: grandchild 2 2
+    { dg-end-multiline-output "" } */
+ 
+ /* Use a Python script to verify various properties about the *generated*
+    .sarif file:
+    { dg-final { run-sarif-pytest nested-diagnostics-1.roundtrip "../gcc.dg/plugin/diagnostic-test-nesting-sarif.py" } } */
+ 
+ /* Use a Python script to verify various properties about the generated
+    .html file:
+    { dg-final { run-html-pytest nested-diagnostics-1.sarif "../gcc.dg/plugin/diagnostic-test-nesting-html.py" } } */
diff -Nrcpad gcc-16-20250803/gcc/toplev.cc gcc-16-20250810/gcc/toplev.cc
*** gcc-16-20250803/gcc/toplev.cc	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/toplev.cc	Sun Aug 10 22:32:56 2025
*************** general_init (const char *argv0, bool in
*** 1094,1105 ****
      = global_options_init.x_flag_show_column;
    global_dc->set_show_highlight_colors
      (global_options_init.x_flag_diagnostics_show_highlight_colors);
    global_dc->set_internal_error_callback (internal_error_function);
    const unsigned lang_mask = lang_hooks.option_lang_mask ();
!   global_dc->set_option_manager
!     (std::make_unique<compiler_diagnostic_option_manager> (*global_dc,
! 							   lang_mask,
! 							   &global_options),
       lang_mask);
    global_dc->push_owned_urlifier (make_gcc_urlifier (lang_mask));
  
--- 1094,1111 ----
      = global_options_init.x_flag_show_column;
    global_dc->set_show_highlight_colors
      (global_options_init.x_flag_diagnostics_show_highlight_colors);
+   global_dc->set_show_nesting
+     (global_options_init.x_flag_diagnostics_show_nesting);
+   global_dc->set_show_nesting_locations
+     (global_options_init.x_flag_diagnostics_show_nesting_locations);
+   global_dc->set_show_nesting_levels
+     (global_options_init.x_flag_diagnostics_show_nesting_levels);
    global_dc->set_internal_error_callback (internal_error_function);
    const unsigned lang_mask = lang_hooks.option_lang_mask ();
!   global_dc->set_option_id_manager
!     (std::make_unique<compiler_diagnostic_option_id_manager> (*global_dc,
! 							      lang_mask,
! 							      &global_options),
       lang_mask);
    global_dc->push_owned_urlifier (make_gcc_urlifier (lang_mask));
  
diff -Nrcpad gcc-16-20250803/gcc/tree-diagnostic.cc gcc-16-20250810/gcc/tree-diagnostic.cc
*** gcc-16-20250803/gcc/tree-diagnostic.cc	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/tree-diagnostic.cc	Sun Aug 10 22:32:56 2025
*************** default_tree_printer (pretty_printer *pp
*** 110,116 ****
     to the DIAGNOSTIC location.  */
  
  static void
! set_inlining_locations (diagnostics::context *,
  			diagnostics::diagnostic_info *diagnostic)
  {
    location_t loc = diagnostic_location (diagnostic);
--- 110,116 ----
     to the DIAGNOSTIC location.  */
  
  static void
! set_inlining_locations (const diagnostics::context &,
  			diagnostics::diagnostic_info *diagnostic)
  {
    location_t loc = diagnostic_location (diagnostic);
diff -Nrcpad gcc-16-20250803/gcc/tree-nested.cc gcc-16-20250810/gcc/tree-nested.cc
*** gcc-16-20250803/gcc/tree-nested.cc	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/tree-nested.cc	Sun Aug 10 22:32:56 2025
*************** convert_nonlocal_reference_stmt (gimple_
*** 1796,1801 ****
--- 1796,1803 ----
        break;
  
      case GIMPLE_OMP_TARGET:
+       walk_body (convert_nonlocal_reference_stmt, convert_nonlocal_reference_op,
+ 		 info, gimple_omp_target_iterator_loops_ptr (stmt));
        if (!is_gimple_omp_offloaded (stmt))
  	{
  	  save_suppress = info->suppress_expansion;
*************** convert_local_reference_stmt (gimple_stm
*** 2517,2522 ****
--- 2519,2527 ----
        break;
  
      case GIMPLE_OMP_TARGET:
+       walk_body (convert_local_reference_stmt, convert_local_reference_op, info,
+ 		 gimple_omp_target_iterator_loops_ptr (stmt));
+ 
        if (!is_gimple_omp_offloaded (stmt))
  	{
  	  save_suppress = info->suppress_expansion;
*************** convert_tramp_reference_stmt (gimple_stm
*** 2898,2903 ****
--- 2903,2910 ----
  	  *handled_ops_p = false;
  	  return NULL_TREE;
  	}
+       walk_body (convert_tramp_reference_stmt, convert_tramp_reference_op,
+ 		 info, gimple_omp_target_iterator_loops_ptr (stmt));
        /* FALLTHRU */
      case GIMPLE_OMP_PARALLEL:
      case GIMPLE_OMP_TASK:
diff -Nrcpad gcc-16-20250803/gcc/tree-pretty-print.cc gcc-16-20250810/gcc/tree-pretty-print.cc
*** gcc-16-20250803/gcc/tree-pretty-print.cc	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/tree-pretty-print.cc	Sun Aug 10 22:32:56 2025
*************** dump_omp_iterators (pretty_printer *pp,
*** 448,453 ****
--- 448,462 ----
        pp_colon (pp);
        dump_generic_node (pp, TREE_VEC_ELT (it, 3), spc, flags, false);
      }
+   if (TREE_VEC_LENGTH (iter) > 6)
+     {
+       pp_string (pp, ", loop_label=");
+       dump_generic_node (pp, TREE_VEC_ELT (iter, 6), spc, flags, false);
+       pp_string (pp, ", elems=");
+       dump_generic_node (pp, TREE_VEC_ELT (iter, 7), spc, flags, false);
+       pp_string (pp, ", index=");
+       dump_generic_node (pp, TREE_VEC_ELT (iter, 8), spc, flags, false);
+     }
    pp_right_paren (pp);
  }
  
*************** dump_omp_clause (pretty_printer *pp, tre
*** 1008,1013 ****
--- 1017,1027 ----
        pp_string (pp, "map(");
        if (OMP_CLAUSE_MAP_READONLY (clause))
  	pp_string (pp, "readonly,");
+       if (OMP_CLAUSE_ITERATORS (clause))
+ 	{
+ 	  dump_omp_iterators (pp, OMP_CLAUSE_ITERATORS (clause), spc, flags);
+ 	  pp_colon (pp);
+ 	}
        switch (OMP_CLAUSE_MAP_KIND (clause))
  	{
  	case GOMP_MAP_ALLOC:
*************** dump_omp_clause (pretty_printer *pp, tre
*** 1185,1190 ****
--- 1199,1209 ----
        pp_string (pp, "from(");
        if (OMP_CLAUSE_MOTION_PRESENT (clause))
  	pp_string (pp, "present:");
+       if (OMP_CLAUSE_ITERATORS (clause))
+ 	{
+ 	  dump_omp_iterators (pp, OMP_CLAUSE_ITERATORS (clause), spc, flags);
+ 	  pp_colon (pp);
+ 	}
        dump_generic_node (pp, OMP_CLAUSE_DECL (clause),
  			 spc, flags, false);
        goto print_clause_size;
*************** dump_omp_clause (pretty_printer *pp, tre
*** 1193,1198 ****
--- 1212,1222 ----
        pp_string (pp, "to(");
        if (OMP_CLAUSE_MOTION_PRESENT (clause))
  	pp_string (pp, "present:");
+       if (OMP_CLAUSE_ITERATORS (clause))
+ 	{
+ 	  dump_omp_iterators (pp, OMP_CLAUSE_ITERATORS (clause), spc, flags);
+ 	  pp_colon (pp);
+ 	}
        dump_generic_node (pp, OMP_CLAUSE_DECL (clause),
  			 spc, flags, false);
        goto print_clause_size;
diff -Nrcpad gcc-16-20250803/gcc/tree-scalar-evolution.cc gcc-16-20250810/gcc/tree-scalar-evolution.cc
*** gcc-16-20250803/gcc/tree-scalar-evolution.cc	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/tree-scalar-evolution.cc	Sun Aug 10 22:32:56 2025
*************** scev_dfs::add_to_evolution_1 (tree chrec
*** 670,675 ****
--- 670,686 ----
  	  to_add = chrec_convert (type, to_add, at_stmt);
  	  right = chrec_convert_rhs (type, right, at_stmt);
  	  right = chrec_fold_plus (chrec_type (right), right, to_add);
+ 	  /* When we have an evolution in a non-wrapping type and
+ 	     in the process of accumulating CHREC_RIGHT there was
+ 	     overflow this indicates in the association that happened
+ 	     in building the CHREC clearly involved UB.  Avoid this.
+ 	     In building a CHREC we basically turn (a + INCR1) + INCR2
+ 	     into a + (INCR1 + INCR2) which is not always valid.
+ 	     Note this check only catches few invalid cases.  */
+ 	  if ((INTEGRAL_TYPE_P (type) && ! TYPE_OVERFLOW_WRAPS (type))
+ 	      && TREE_CODE (right) == INTEGER_CST
+ 	      && TREE_OVERFLOW (right))
+ 	    return chrec_dont_know;
  	  return build_polynomial_chrec (var, left, right);
  	}
        else
diff -Nrcpad gcc-16-20250803/gcc/tree-ssa-forwprop.cc gcc-16-20250810/gcc/tree-ssa-forwprop.cc
*** gcc-16-20250803/gcc/tree-ssa-forwprop.cc	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/tree-ssa-forwprop.cc	Sun Aug 10 22:32:56 2025
*************** constant_pointer_difference (tree p1, tr
*** 1190,1306 ****
    return NULL_TREE;
  }
  
! 
! /* Optimize
!    a = {};
!    b = a;
!    into
!    a = {};
!    b = {};
!    Similarly for memset (&a, ..., sizeof (a)); instead of a = {};
!    and/or memcpy (&b, &a, sizeof (a)); instead of b = a;  */
! 
  static bool
! optimize_memcpy_to_memset (gimple_stmt_iterator *gsip, tree dest, tree src, tree len)
  {
!   ao_ref read;
!   gimple *stmt = gsi_stmt (*gsip);
!   if (gimple_has_volatile_ops (stmt))
!     return false;
! 
!   tree src2 = NULL_TREE, len2 = NULL_TREE;
!   poly_int64 offset, offset2;
!   tree val = integer_zero_node;
!   bool len_was_null = len == NULL_TREE;
!   if (len == NULL_TREE)
!     len = (TREE_CODE (src) == COMPONENT_REF
! 	   ? DECL_SIZE_UNIT (TREE_OPERAND (src, 1))
! 	   : TYPE_SIZE_UNIT (TREE_TYPE (src)));
!   if (len == NULL_TREE
!       || !poly_int_tree_p (len))
!     return false;
! 
!   ao_ref_init (&read, src);
!   tree vuse = gimple_vuse (stmt);
!   gimple *defstmt;
!   unsigned limit = param_sccvn_max_alias_queries_per_access;
!   do {
!     /* If the vuse is the default definition, then there is no stores beforhand. */
!     if (SSA_NAME_IS_DEFAULT_DEF (vuse))
!       return false;
!     defstmt = SSA_NAME_DEF_STMT (vuse);
!     if (is_a <gphi*>(defstmt))
!       return false;
!     if (limit-- == 0)
!       return false;
!     /* If the len was null, then we can use TBBA. */
!     if (stmt_may_clobber_ref_p_1 (defstmt, &read,
! 				  /* tbaa_p = */ len_was_null))
!       break;
!     vuse = gimple_vuse (defstmt);
!   } while (true);
  
!   if (gimple_store_p (defstmt)
!       && gimple_assign_single_p (defstmt)
!       && TREE_CODE (gimple_assign_rhs1 (defstmt)) == STRING_CST
!       && !gimple_clobber_p (defstmt))
!     {
!       tree str = gimple_assign_rhs1 (defstmt);
!       src2 = gimple_assign_lhs (defstmt);
!       /* The string must contain all null char's for now.  */
!       for (int i = 0; i < TREE_STRING_LENGTH (str); i++)
! 	{
! 	  if (TREE_STRING_POINTER (str)[i] != 0)
! 	    {
! 	      src2 = NULL_TREE;
! 	      break;
! 	    }
! 	}
!     }
!   else if (gimple_store_p (defstmt)
!       && gimple_assign_single_p (defstmt)
!       && TREE_CODE (gimple_assign_rhs1 (defstmt)) == CONSTRUCTOR
!       && !gimple_clobber_p (defstmt))
!     src2 = gimple_assign_lhs (defstmt);
!   else if (gimple_call_builtin_p (defstmt, BUILT_IN_MEMSET)
! 	   && TREE_CODE (gimple_call_arg (defstmt, 0)) == ADDR_EXPR
! 	   && TREE_CODE (gimple_call_arg (defstmt, 1)) == INTEGER_CST)
      {
!       src2 = TREE_OPERAND (gimple_call_arg (defstmt, 0), 0);
!       len2 = gimple_call_arg (defstmt, 2);
!       val = gimple_call_arg (defstmt, 1);
!       /* For non-0 val, we'd have to transform stmt from assignment
! 	 into memset (only if dest is addressable).  */
!       if (!integer_zerop (val) && is_gimple_assign (stmt))
! 	src2 = NULL_TREE;
      }
  
-   if (src2 == NULL_TREE)
-     return false;
- 
-   if (len2 == NULL_TREE)
-     len2 = (TREE_CODE (src2) == COMPONENT_REF
- 	    ? DECL_SIZE_UNIT (TREE_OPERAND (src2, 1))
- 	    : TYPE_SIZE_UNIT (TREE_TYPE (src2)));
    if (len2 == NULL_TREE
        || !poly_int_tree_p (len2))
      return false;
  
-   src = get_addr_base_and_unit_offset (src, &offset);
    src2 = get_addr_base_and_unit_offset (src2, &offset2);
!   if (src == NULL_TREE
!       || src2 == NULL_TREE
!       || maybe_lt (offset, offset2))
      return false;
  
!   if (!operand_equal_p (src, src2, 0))
      return false;
  
!   /* [ src + offset2, src + offset2 + len2 - 1 ] is set to val.
       Make sure that
!      [ src + offset, src + offset + len - 1 ] is a subset of that.  */
!   if (maybe_gt (wi::to_poly_offset (len) + (offset - offset2),
! 		wi::to_poly_offset (len2)))
      return false;
  
    if (dump_file && (dump_flags & TDF_DETAILS))
--- 1190,1244 ----
    return NULL_TREE;
  }
  
! /* Helper function for optimize_aggr_zeroprop.
!    Props the zeroing (memset, VAL) that was done in DEST+OFFSET:LEN
!    (DEFSTMT) into the STMT.  Returns true if the STMT was updated.  */
  static bool
! optimize_aggr_zeroprop_1 (gimple *defstmt, gimple *stmt,
! 			  tree dest, poly_int64 offset, tree val,
! 			  poly_offset_int len)
  {
!   tree src2;
!   tree len2 = NULL_TREE;
!   poly_int64 offset2;
  
!   if (gimple_call_builtin_p (stmt, BUILT_IN_MEMCPY)
!       && TREE_CODE (gimple_call_arg (stmt, 1)) == ADDR_EXPR
!       && poly_int_tree_p (gimple_call_arg (stmt, 2)))
      {
!       src2 = TREE_OPERAND (gimple_call_arg (stmt, 1), 0);
!       len2 = gimple_call_arg (stmt, 2);
      }
+    else if (gimple_assign_load_p (stmt) && gimple_store_p (stmt))
+      {
+ 	src2 = gimple_assign_rhs1 (stmt);
+ 	len2 = (TREE_CODE (src2) == COMPONENT_REF
+ 		? DECL_SIZE_UNIT (TREE_OPERAND (src2, 1))
+ 		: TYPE_SIZE_UNIT (TREE_TYPE (src2)));
+ 	/* Can only handle zero memsets. */
+ 	if (!integer_zerop (val))
+ 	  return false;
+      }
+    else
+      return false;
  
    if (len2 == NULL_TREE
        || !poly_int_tree_p (len2))
      return false;
  
    src2 = get_addr_base_and_unit_offset (src2, &offset2);
!   if (src2 == NULL_TREE
!       || maybe_lt (offset2, offset))
      return false;
  
!   if (!operand_equal_p (dest, src2, 0))
      return false;
  
!   /* [ dest + offset, dest + offset + len - 1 ] is set to val.
       Make sure that
!      [ dest + offset2, dest + offset2 + len2 - 1 ] is a subset of that.  */
!   if (maybe_gt (wi::to_poly_offset (len2) + (offset2 - offset),
! 		len))
      return false;
  
    if (dump_file && (dump_flags & TDF_DETAILS))
*************** optimize_memcpy_to_memset (gimple_stmt_i
*** 1310,1316 ****
        fprintf (dump_file, "after previous\n  ");
        print_gimple_stmt (dump_file, defstmt, 0, dump_flags);
      }
! 
    /* For simplicity, don't change the kind of the stmt,
       turn dest = src; into dest = {}; and memcpy (&dest, &src, len);
       into memset (&dest, val, len);
--- 1248,1254 ----
        fprintf (dump_file, "after previous\n  ");
        print_gimple_stmt (dump_file, defstmt, 0, dump_flags);
      }
!   gimple *orig_stmt = stmt;
    /* For simplicity, don't change the kind of the stmt,
       turn dest = src; into dest = {}; and memcpy (&dest, &src, len);
       into memset (&dest, val, len);
*************** optimize_memcpy_to_memset (gimple_stmt_i
*** 1320,1327 ****
       of dest, dest isn't volatile.  */
    if (is_gimple_assign (stmt))
      {
!       tree ctor = build_constructor (TREE_TYPE (dest), NULL);
!       gimple_assign_set_rhs_from_tree (gsip, ctor);
        update_stmt (stmt);
        statistics_counter_event (cfun, "copy zeroing propagation of aggregate", 1);
      }
--- 1258,1267 ----
       of dest, dest isn't volatile.  */
    if (is_gimple_assign (stmt))
      {
!       tree ctor_type = TREE_TYPE (gimple_assign_lhs (stmt));
!       tree ctor = build_constructor (ctor_type, NULL);
!       gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
!       gimple_assign_set_rhs_from_tree (&gsi, ctor);
        update_stmt (stmt);
        statistics_counter_event (cfun, "copy zeroing propagation of aggregate", 1);
      }
*************** optimize_memcpy_to_memset (gimple_stmt_i
*** 1341,1429 ****
        fprintf (dump_file, "into\n  ");
        print_gimple_stmt (dump_file, stmt, 0, dump_flags);
      }
    return true;
  }
! /* Optimizes
!    a = c;
     b = a;
     into
!    a = c;
!    b = c;
!    GSIP is the second statement and SRC is the common
!    between the statements.
! */
  static bool
! optimize_agr_copyprop (gimple_stmt_iterator *gsip)
  {
    gimple *stmt = gsi_stmt (*gsip);
    if (gimple_has_volatile_ops (stmt))
      return false;
  
!   tree dest = gimple_assign_lhs (stmt);
!   tree src = gimple_assign_rhs1 (stmt);
!   /* If the statement is `src = src;` then ignore it. */
!   if (operand_equal_p (dest, src, 0))
!     return false;
  
!   tree vuse = gimple_vuse (stmt);
!   /* If the vuse is the default definition, then there is no store beforehand.  */
!   if (SSA_NAME_IS_DEFAULT_DEF (vuse))
      return false;
!   gimple *defstmt = SSA_NAME_DEF_STMT (vuse);
!   if (!gimple_assign_load_p (defstmt)
!       || !gimple_store_p (defstmt))
      return false;
!   if (gimple_has_volatile_ops (defstmt))
      return false;
  
!   tree dest2 = gimple_assign_lhs (defstmt);
!   tree src2 = gimple_assign_rhs1 (defstmt);
  
!   /* If the original store is `src2 = src2;` skip over it. */
!   if (operand_equal_p (src2, dest2, 0))
!     return false;
!   if (!operand_equal_p (src, dest2, 0))
      return false;
  
  
!   /* For 2 memory refences and using a temporary to do the copy,
!      don't remove the temporary as the 2 memory references might overlap.
!      Note t does not need to be decl as it could be field.
!      See PR 22237 for full details.
!      E.g.
!      t = *a;
!      *b = t;
!      Cannot be convert into
!      t = *a;
!      *b = *a;
!      Though the following is allowed to be done:
!      t = *a;
!      *a = t;
!      And convert it into:
!      t = *a;
!      *a = *a;
!   */
!   if (!operand_equal_p (src2, dest, 0)
!       && !DECL_P (dest) && !DECL_P (src2))
      return false;
  
!   if (dump_file && (dump_flags & TDF_DETAILS))
      {
!       fprintf (dump_file, "Simplified\n  ");
!       print_gimple_stmt (dump_file, stmt, 0, dump_flags);
!       fprintf (dump_file, "after previous\n  ");
!       print_gimple_stmt (dump_file, defstmt, 0, dump_flags);
!     }
!   gimple_assign_set_rhs_from_tree (gsip, unshare_expr (src2));
!   update_stmt (stmt);
  
!   if (dump_file && (dump_flags & TDF_DETAILS))
!     {
!       fprintf (dump_file, "into\n  ");
!       print_gimple_stmt (dump_file, stmt, 0, dump_flags);
      }
!   statistics_counter_event (cfun, "copy prop for aggregate", 1);
!   return true;
  }
  
  /* *GSI_P is a GIMPLE_CALL to a builtin function.
--- 1281,1490 ----
        fprintf (dump_file, "into\n  ");
        print_gimple_stmt (dump_file, stmt, 0, dump_flags);
      }
+ 
+   /* Mark the bb for eh cleanup if needed.  */
+   if (maybe_clean_or_replace_eh_stmt (orig_stmt, stmt))
+     bitmap_set_bit (to_purge, gimple_bb (stmt)->index);
+ 
    return true;
  }
! 
! /* Optimize
!    a = {}; // DEST = value ;; LEN(nullptr)
     b = a;
     into
!    a = {};
!    b = {};
!    Similarly for memset (&a, ..., sizeof (a)); instead of a = {};
!    and/or memcpy (&b, &a, sizeof (a)); instead of b = a;  */
! 
  static bool
! optimize_aggr_zeroprop (gimple_stmt_iterator *gsip)
  {
+   ao_ref read;
    gimple *stmt = gsi_stmt (*gsip);
    if (gimple_has_volatile_ops (stmt))
      return false;
  
!   tree dest = NULL_TREE;
!   tree val = integer_zero_node;
!   tree len = NULL_TREE;
!   bool can_use_tbba = true;
!   bool changed = false;
  
!   if (gimple_call_builtin_p (stmt, BUILT_IN_MEMSET)
!       && TREE_CODE (gimple_call_arg (stmt, 0)) == ADDR_EXPR
!       && TREE_CODE (gimple_call_arg (stmt, 1)) == INTEGER_CST
!       && poly_int_tree_p (gimple_call_arg (stmt, 2)))
!     {
!       dest = TREE_OPERAND (gimple_call_arg (stmt, 0), 0);
!       len = gimple_call_arg (stmt, 2);
!       val = gimple_call_arg (stmt, 1);
!       ao_ref_init_from_ptr_and_size (&read, gimple_call_arg (stmt, 0), len);
!       can_use_tbba = false;
!     }
!   else if (gimple_store_p (stmt)
! 	   && gimple_assign_single_p (stmt)
! 	   && TREE_CODE (gimple_assign_rhs1 (stmt)) == STRING_CST)
!     {
!       tree str = gimple_assign_rhs1 (stmt);
!       dest = gimple_assign_lhs (stmt);
!       ao_ref_init (&read, dest);
!       /* The string must contain all null char's for now.  */
!       for (int i = 0; i < TREE_STRING_LENGTH (str); i++)
! 	{
! 	  if (TREE_STRING_POINTER (str)[i] != 0)
! 	    {
! 	      dest = NULL_TREE;
! 	      break;
! 	    }
! 	}
!     }
!   else if (gimple_store_p (stmt)
! 	   && gimple_assign_single_p (stmt)
! 	   && TREE_CODE (gimple_assign_rhs1 (stmt)) == CONSTRUCTOR
! 	   && !gimple_clobber_p (stmt))
!     {
!       dest = gimple_assign_lhs (stmt);
!       ao_ref_init (&read, dest);
!     }
! 
!   if (dest == NULL_TREE)
      return false;
! 
!   if (len == NULL_TREE)
!     len = (TREE_CODE (dest) == COMPONENT_REF
! 	   ? DECL_SIZE_UNIT (TREE_OPERAND (dest, 1))
! 	   : TYPE_SIZE_UNIT (TREE_TYPE (dest)));
!   if (len == NULL_TREE
!       || !poly_int_tree_p (len))
      return false;
! 
!   /* This store needs to be on the byte boundary and pointing to an object.  */
!   poly_int64 offset;
!   tree dest_base = get_addr_base_and_unit_offset (dest, &offset);
!   if (dest_base == NULL_TREE)
      return false;
  
!   /* Setup the worklist.  */
!   auto_vec<std::pair<tree, unsigned>> worklist;
!   unsigned limit = param_sccvn_max_alias_queries_per_access;
!   worklist.safe_push (std::make_pair (gimple_vdef (stmt), limit));
  
!   while (!worklist.is_empty ())
!     {
!       std::pair<tree, unsigned> top = worklist.pop ();
!       tree vdef = top.first;
!       limit = top.second;
!       gimple *use_stmt;
!       imm_use_iterator iter;
!       FOR_EACH_IMM_USE_STMT (use_stmt, iter, vdef)
! 	{
! 	  /* Handling PHI nodes might not be worth it so don't.  */
! 	  if (is_a <gphi*> (use_stmt))
! 	    continue;
! 
! 	  /* If this statement does not clobber add the vdef stmt to the
! 	     worklist.  */
! 	  if (gimple_vdef (use_stmt)
! 	      && !stmt_may_clobber_ref_p_1 (use_stmt, &read,
! 					   /* tbaa_p = */ can_use_tbba)
! 	      && limit != 0)
! 	    worklist.safe_push (std::make_pair (gimple_vdef (use_stmt),
! 						limit - 1));
! 
! 	  if (optimize_aggr_zeroprop_1 (stmt, use_stmt, dest_base, offset,
! 					 val, wi::to_poly_offset (len)))
! 	   changed = true;
! 	}
!     }
! 
!   return changed;
! }
! /* Optimizes
!    DEST = SRC;
!    DEST2 = DEST; # DEST2 = SRC2;
!    into
!    DEST = SRC;
!    DEST2 = SRC;
!    GSIP is the first statement and SRC is the common
!    between the statements.
! */
! static bool
! optimize_agr_copyprop (gimple_stmt_iterator *gsip)
! {
!   gimple *stmt = gsi_stmt (*gsip);
!   if (gimple_has_volatile_ops (stmt))
      return false;
  
+   /* Can't prop if the statement could throw.  */
+   if (stmt_could_throw_p (cfun, stmt))
+     return false;
  
!   tree dest = gimple_assign_lhs (stmt);
!   tree src = gimple_assign_rhs1 (stmt);
!   /* If the statement is `src = src;` then ignore it. */
!   if (operand_equal_p (dest, src, 0))
      return false;
  
!   tree vdef = gimple_vdef (stmt);
!   imm_use_iterator iter;
!   gimple *use_stmt;
!   bool changed = false;
!   FOR_EACH_IMM_USE_STMT (use_stmt, iter, vdef)
      {
!       if (!gimple_assign_load_p (use_stmt)
! 	  || !gimple_store_p (use_stmt))
! 	continue;
!       if (gimple_has_volatile_ops (use_stmt))
! 	continue;
!       tree dest2 = gimple_assign_lhs (use_stmt);
!       tree src2 = gimple_assign_rhs1 (use_stmt);
!       /* If the new store is `src2 = src2;` skip over it. */
!       if (operand_equal_p (src2, dest2, 0))
! 	continue;
!       if (!operand_equal_p (dest, src2, 0))
! 	continue;
!       /* For 2 memory refences and using a temporary to do the copy,
! 	 don't remove the temporary as the 2 memory references might overlap.
! 	 Note t does not need to be decl as it could be field.
! 	 See PR 22237 for full details.
! 	 E.g.
! 	 t = *a; #DEST = SRC;
! 	 *b = t; #DEST2 = SRC2;
! 	 Cannot be convert into
! 	 t = *a;
! 	 *b = *a;
! 	 Though the following is allowed to be done:
! 	 t = *a;
! 	 *a = t;
! 	 And convert it into:
! 	 t = *a;
! 	 *a = *a;
!        */
!       if (!operand_equal_p (dest2, src, 0)
! 	  && !DECL_P (dest2) && !DECL_P (src))
! 	continue;
!       if (dump_file && (dump_flags & TDF_DETAILS))
! 	{
! 	  fprintf (dump_file, "Simplified\n  ");
! 	  print_gimple_stmt (dump_file, use_stmt, 0, dump_flags);
! 	  fprintf (dump_file, "after previous\n  ");
! 	  print_gimple_stmt (dump_file, stmt, 0, dump_flags);
! 	}
!       gimple_stmt_iterator gsi = gsi_for_stmt (use_stmt);
!       gimple_assign_set_rhs_from_tree (&gsi, unshare_expr (src));
!       update_stmt (use_stmt);
  
!       if (dump_file && (dump_flags & TDF_DETAILS))
! 	{
! 	  fprintf (dump_file, "into\n  ");
! 	  print_gimple_stmt (dump_file, use_stmt, 0, dump_flags);
! 	}
!       statistics_counter_event (cfun, "copy prop for aggregate", 1);
!       changed = true;
      }
!   return changed;
  }
  
  /* *GSI_P is a GIMPLE_CALL to a builtin function.
*************** simplify_builtin_call (gimple_stmt_itera
*** 1463,1484 ****
  
    switch (DECL_FUNCTION_CODE (callee2))
      {
-     case BUILT_IN_MEMCPY:
-       if (gimple_call_num_args (stmt2) == 3)
- 	{
- 	  tree dest = gimple_call_arg (stmt2, 0);
- 	  tree src = gimple_call_arg (stmt2, 1);
- 	  tree len = gimple_call_arg (stmt2, 2);
- 	  /* Try to optimize the memcpy to memset if src
- 	     and dest are addresses. */
- 	  if (TREE_CODE (dest) == ADDR_EXPR
- 	      && TREE_CODE (src) == ADDR_EXPR
- 	      && TREE_CODE (len) == INTEGER_CST
- 	      && optimize_memcpy_to_memset (gsi_p, TREE_OPERAND (dest, 0),
- 					    TREE_OPERAND (src, 0), len))
- 	    return true;
- 	}
-     break;
      case BUILT_IN_MEMCHR:
        if (gimple_call_num_args (stmt2) == 3
  	  && (res = gimple_call_lhs (stmt2)) != nullptr
--- 1524,1529 ----
*************** simplify_builtin_call (gimple_stmt_itera
*** 1540,1545 ****
--- 1585,1597 ----
        break;
  
      case BUILT_IN_MEMSET:
+       if (gimple_call_num_args (stmt2) == 3)
+ 	{
+ 	  /* Try to prop the zeroing/value of the memset to memcpy
+ 	     if the dest is an address and the value is a constant. */
+ 	  if (optimize_aggr_zeroprop (gsi_p))
+ 	    return true;
+ 	}
        if (gimple_call_num_args (stmt2) != 3
  	  || gimple_call_lhs (stmt2)
  	  || CHAR_BIT != 8
*************** pass_forwprop::execute (function *fun)
*** 4858,4878 ****
  		  {
  		    tree rhs1 = gimple_assign_rhs1 (stmt);
  		    enum tree_code code = gimple_assign_rhs_code (stmt);
! 		    if (gimple_assign_load_p (stmt) && gimple_store_p (stmt))
  		      {
! 			if (optimize_memcpy_to_memset (&gsi,
! 						       gimple_assign_lhs (stmt),
! 						       gimple_assign_rhs1 (stmt),
! 						       /* len = */NULL_TREE))
! 			  {
! 			    changed = true;
! 			    break;
! 			  }
! 			if (optimize_agr_copyprop (&gsi))
! 			  {
! 			    changed = true;
! 			    break;
! 			  }
  		      }
  
  		    if (TREE_CODE_CLASS (code) == tcc_comparison)
--- 4910,4925 ----
  		  {
  		    tree rhs1 = gimple_assign_rhs1 (stmt);
  		    enum tree_code code = gimple_assign_rhs_code (stmt);
! 		    if (gimple_store_p (stmt) && optimize_aggr_zeroprop (&gsi))
  		      {
! 			changed = true;
! 			break;
! 		      }
! 		    if (gimple_assign_load_p (stmt) && gimple_store_p (stmt)
! 			&& optimize_agr_copyprop (&gsi))
! 		      {
! 			changed = true;
! 			break;
  		      }
  
  		    if (TREE_CODE_CLASS (code) == tcc_comparison)
diff -Nrcpad gcc-16-20250803/gcc/tree-ssa-loop-ivopts.cc gcc-16-20250810/gcc/tree-ssa-loop-ivopts.cc
*** gcc-16-20250803/gcc/tree-ssa-loop-ivopts.cc	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/tree-ssa-loop-ivopts.cc	Sun Aug 10 22:32:56 2025
*************** along with GCC; see the file COPYING3.
*** 132,137 ****
--- 132,138 ----
  #include "tree-vectorizer.h"
  #include "dbgcnt.h"
  #include "cfganal.h"
+ #include "gimple-fold.h"
  
  /* For lang_hooks.types.type_for_mode.  */
  #include "langhooks.h"
*************** create_new_iv (struct ivopts_data *data,
*** 7252,7258 ****
  
    base = unshare_expr (cand->iv->base);
  
!   create_iv (base, PLUS_EXPR, unshare_expr (cand->iv->step),
  	     cand->var_before, data->current_loop,
  	     &incr_pos, after, &cand->var_before, &cand->var_after);
  }
--- 7253,7276 ----
  
    base = unshare_expr (cand->iv->base);
  
!   /* The step computation could invoke UB when the loop does not iterate.
!      Avoid inserting it on the preheader in its native form but rewrite
!      it to a well-defined form.  This also helps masking SCEV issues
!      which freely re-associates the IV computations when building up
!      CHRECs without much regard for signed overflow invoking UB.  */
!   gimple_seq stmts = NULL;
!   tree step = force_gimple_operand (unshare_expr (cand->iv->step), &stmts,
! 				    true, NULL_TREE);
!   if (stmts)
!     {
!       for (auto gsi = gsi_start (stmts); !gsi_end_p (gsi); gsi_next (&gsi))
! 	if (gimple_needing_rewrite_undefined (gsi_stmt (gsi)))
! 	  rewrite_to_defined_unconditional (&gsi);
!       gsi_insert_seq_on_edge_immediate
! 	(loop_preheader_edge (data->current_loop), stmts);
!     }
! 
!   create_iv (base, PLUS_EXPR, step,
  	     cand->var_before, data->current_loop,
  	     &incr_pos, after, &cand->var_before, &cand->var_after);
  }
diff -Nrcpad gcc-16-20250803/gcc/tree-ssa-sccvn.cc gcc-16-20250810/gcc/tree-ssa-sccvn.cc
*** gcc-16-20250803/gcc/tree-ssa-sccvn.cc	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/tree-ssa-sccvn.cc	Sun Aug 10 22:32:56 2025
*************** vn_reference_lookup_3 (ao_ref *ref, tree
*** 3549,3583 ****
  
        /* Find the common base of ref and the lhs.  lhs_ops already
           contains valueized operands for the lhs.  */
        i = vr->operands.length () - 1;
        j = lhs_ops.length () - 1;
-       while (j >= 0 && i >= 0
- 	     && vn_reference_op_eq (&vr->operands[i], &lhs_ops[j]))
- 	{
- 	  i--;
- 	  j--;
- 	}
  
!       /* ???  The innermost op should always be a MEM_REF and we already
!          checked that the assignment to the lhs kills vr.  Thus for
! 	 aggregate copies using char[] types the vn_reference_op_eq
! 	 may fail when comparing types for compatibility.  But we really
! 	 don't care here - further lookups with the rewritten operands
! 	 will simply fail if we messed up types too badly.  */
!       poly_int64 extra_off = 0;
!       if (j == 0 && i >= 0
! 	  && lhs_ops[0].opcode == MEM_REF
! 	  && maybe_ne (lhs_ops[0].off, -1))
  	{
! 	  if (known_eq (lhs_ops[0].off, vr->operands[i].off))
! 	    i--, j--;
! 	  else if (vr->operands[i].opcode == MEM_REF
! 		   && maybe_ne (vr->operands[i].off, -1))
  	    {
! 	      extra_off = vr->operands[i].off - lhs_ops[0].off;
  	      i--, j--;
  	    }
  	}
  
        /* i now points to the first additional op.
  	 ???  LHS may not be completely contained in VR, one or more
--- 3549,3649 ----
  
        /* Find the common base of ref and the lhs.  lhs_ops already
           contains valueized operands for the lhs.  */
+       poly_int64 extra_off = 0;
        i = vr->operands.length () - 1;
        j = lhs_ops.length () - 1;
  
!       /* The base should be always equal due to the above check.  */
!       if (! vn_reference_op_eq (&vr->operands[i], &lhs_ops[j]))
! 	return (void *)-1;
!       i--, j--;
! 
!       /* The 2nd component should always exist and be a MEM_REF.  */
!       if (!(i >= 0 && j >= 0))
! 	;
!       else if (vn_reference_op_eq (&vr->operands[i], &lhs_ops[j]))
! 	i--, j--;
!       else if (vr->operands[i].opcode == MEM_REF
! 	       && lhs_ops[j].opcode == MEM_REF
! 	       && known_ne (lhs_ops[j].off, -1)
! 	       && known_ne (vr->operands[i].off, -1))
  	{
! 	  bool found = false;
! 	  /* When we ge a mismatch at a MEM_REF that is not the sole component
! 	     try finding a match in one of the outer components and continue
! 	     stripping there.  This happens when addresses of components get
! 	     forwarded into dereferences.  */
! 	  if (j > 0)
  	    {
! 	      int temi = i - 1;
! 	      extra_off = vr->operands[i].off;
! 	      while (temi >= 0
! 		     && known_ne (vr->operands[temi].off, -1))
! 		{
! 		  if (vr->operands[temi].type
! 		      && lhs_ops[j].type
! 		      && (TYPE_MAIN_VARIANT (vr->operands[temi].type)
! 			  == TYPE_MAIN_VARIANT (lhs_ops[j].type)))
! 		    {
! 		      i = temi;
! 		      /* Strip the component that was type matched to
! 			 the MEM_REF.  */
! 		      extra_off += vr->operands[i].off - lhs_ops[j].off;
! 		      i--, j--;
! 		      /* Strip further equal components.  */
! 		      found = true;
! 		      break;
! 		    }
! 		  extra_off += vr->operands[temi].off;
! 		  temi--;
! 		}
! 	    }
! 	  if (!found && i > 0)
! 	    {
! 	      int temj = j - 1;
! 	      extra_off = -lhs_ops[j].off;
! 	      while (temj >= 0
! 		     && known_ne (lhs_ops[temj].off, -1))
! 		{
! 		  if (vr->operands[i].type
! 		      && lhs_ops[temj].type
! 		      && (TYPE_MAIN_VARIANT (vr->operands[i].type)
! 			  == TYPE_MAIN_VARIANT (lhs_ops[temj].type)))
! 		    {
! 		      j = temj;
! 		      /* Strip the component that was type matched to
! 			 the MEM_REF.  */
! 		      extra_off += vr->operands[i].off - lhs_ops[j].off;
! 		      i--, j--;
! 		      /* Strip further equal components.  */
! 		      found = true;
! 		      break;
! 		    }
! 		  extra_off += -lhs_ops[temj].off;
! 		  temj--;
! 		}
! 	    }
! 	  /* When the LHS is already at the outermost level simply
! 	     adjust for any offset difference.  Further lookups
! 	     will fail when there's too gross of a type compatibility
! 	     issue.  */
! 	  if (!found && j == 0)
! 	    {
! 	      extra_off = vr->operands[i].off - lhs_ops[j].off;
  	      i--, j--;
  	    }
  	}
+       else
+ 	return (void *)-1;
+ 
+       /* Strip further common components, attempting to consume lhs_ops
+ 	 in full.  */
+       while (j >= 0 && i >= 0
+ 	     && vn_reference_op_eq (&vr->operands[i], &lhs_ops[j]))
+ 	{
+ 	  i--;
+ 	  j--;
+ 	}
  
        /* i now points to the first additional op.
  	 ???  LHS may not be completely contained in VR, one or more
*************** visit_nary_op (tree lhs, gassign *stmt)
*** 5567,5572 ****
--- 5633,5669 ----
  	    }
  	}
        break;
+     case BIT_FIELD_REF:
+       if (TREE_CODE (TREE_OPERAND (rhs1, 0)) == SSA_NAME)
+ 	{
+ 	  tree op0 = TREE_OPERAND (rhs1, 0);
+ 	  gassign *ass = dyn_cast <gassign *> (SSA_NAME_DEF_STMT (op0));
+ 	  if (ass
+ 	      && !gimple_has_volatile_ops (ass)
+ 	      && vn_get_stmt_kind (ass) == VN_REFERENCE)
+ 	    {
+ 	      tree last_vuse = gimple_vuse (ass);
+ 	      tree op = gimple_assign_rhs1 (ass);
+ 	      /* Avoid building invalid and unexpected refs.  */
+ 	      if (TREE_CODE (op) != TARGET_MEM_REF
+ 		  && TREE_CODE (op) != BIT_FIELD_REF
+ 		  && TREE_CODE (op) != REALPART_EXPR
+ 		  && TREE_CODE (op) != IMAGPART_EXPR)
+ 		{
+ 		  tree op = build3 (BIT_FIELD_REF, TREE_TYPE (rhs1),
+ 				    gimple_assign_rhs1 (ass),
+ 				    TREE_OPERAND (rhs1, 1),
+ 				    TREE_OPERAND (rhs1, 2));
+ 		  tree result = vn_reference_lookup (op, gimple_vuse (ass),
+ 						     default_vn_walk_kind,
+ 						     NULL, true, &last_vuse);
+ 		  if (result
+ 		      && useless_type_conversion_p (type, TREE_TYPE (result)))
+ 		    return set_ssa_val_to (lhs, result);
+ 		}
+ 	    }
+ 	}
+       break;
      case TRUNC_DIV_EXPR:
        if (TYPE_UNSIGNED (type))
  	break;
diff -Nrcpad gcc-16-20250803/gcc/tree-switch-conversion.cc gcc-16-20250810/gcc/tree-switch-conversion.cc
*** gcc-16-20250803/gcc/tree-switch-conversion.cc	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/tree-switch-conversion.cc	Sun Aug 10 22:32:56 2025
*************** Software Foundation, 51 Franklin Street,
*** 55,61 ****
  #include "hwint.h"
  #include "internal-fn.h"
  #include "diagnostic-core.h"
- #include "output.h"
  
  /* ??? For lang_hooks.types.type_for_mode, but is there a word_mode
     type in the GIMPLE type system that is language-independent?  */
--- 55,60 ----
*************** switch_conversion::build_one_array (int
*** 1031,1049 ****
        TREE_CONSTANT (decl) = 1;
        TREE_READONLY (decl) = 1;
        DECL_IGNORED_P (decl) = 1;
!       /* The decl is mergable since we don't take the address ever and
  	 just reading from it. */
        DECL_MERGEABLE (decl) = 1;
  
-       /* Increase the alignments as needed. */
-       if (tree_to_uhwi (DECL_SIZE (decl)) > DECL_ALIGN (decl))
- 	{
- 	  unsigned HOST_WIDE_INT s = tree_to_uhwi (DECL_SIZE (decl));
- 	  /* Only support up to the max supported for merging. */
- 	  if (s <= MAX_ALIGN_MERGABLE)
- 	    SET_DECL_ALIGN (decl, HOST_WIDE_INT_1U << ceil_log2 (s));
- 	}
- 
        if (offloading_function_p (cfun->decl))
  	DECL_ATTRIBUTES (decl)
  	  = tree_cons (get_identifier ("omp declare target"), NULL_TREE,
--- 1030,1039 ----
        TREE_CONSTANT (decl) = 1;
        TREE_READONLY (decl) = 1;
        DECL_IGNORED_P (decl) = 1;
!       /* The decl is mergeable since we don't take the address ever and
  	 just reading from it. */
        DECL_MERGEABLE (decl) = 1;
  
        if (offloading_function_p (cfun->decl))
  	DECL_ATTRIBUTES (decl)
  	  = tree_cons (get_identifier ("omp declare target"), NULL_TREE,
diff -Nrcpad gcc-16-20250803/gcc/tree-tailcall.cc gcc-16-20250810/gcc/tree-tailcall.cc
*** gcc-16-20250803/gcc/tree-tailcall.cc	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/tree-tailcall.cc	Sun Aug 10 22:32:56 2025
*************** find_tail_calls (basic_block bb, edge es
*** 605,610 ****
--- 605,616 ----
  	  && (stmt = last_nondebug_stmt (bb))
  	  && gimple_code (stmt) == GIMPLE_COND)
  	;
+       else if (esucc
+ 	       && cfun->has_musttail
+ 	       && diag_musttail
+ 	       && (stmt = last_nondebug_stmt (bb))
+ 	       && gimple_code (stmt) == GIMPLE_SWITCH)
+ 	;
        /* If there is an abnormal edge assume it's the only extra one.
  	 Tolerate that case so that we can give better error messages
  	 for musttail later.  */
*************** find_tail_calls (basic_block bb, edge es
*** 668,674 ****
  	   else
  	     goto <bb 6>; [INV]
  	 When walking backwards, ESUCC is the edge we are coming from,
! 	 depending on its EDGE_TRUE_FLAG, == vs. != for the comparison
  	 and value compared against try to find out through which edge
  	 we need to go and which edge should be ignored.  The code handles
  	 both INTEGER_CST PHI arguments and SSA_NAMEs set to constants
--- 674,680 ----
  	   else
  	     goto <bb 6>; [INV]
  	 When walking backwards, ESUCC is the edge we are coming from,
! 	 depending on its EDGE_TRUE_FLAG, comparison code
  	 and value compared against try to find out through which edge
  	 we need to go and which edge should be ignored.  The code handles
  	 both INTEGER_CST PHI arguments and SSA_NAMEs set to constants
*************** find_tail_calls (basic_block bb, edge es
*** 677,695 ****
  	  && diag_musttail
  	  && esucc
  	  && gimple_code (stmt) == GIMPLE_COND
- 	  && (gimple_cond_code (stmt) == EQ_EXPR
- 	      || gimple_cond_code (stmt) == NE_EXPR)
  	  && TREE_CODE (gimple_cond_lhs (stmt)) == SSA_NAME
  	  && TREE_CODE (gimple_cond_rhs (stmt)) == INTEGER_CST
  	  && INTEGRAL_TYPE_P (TREE_TYPE (gimple_cond_lhs (stmt)))
! 	  && (integer_zerop (gimple_cond_rhs (stmt))
! 	      || integer_onep (gimple_cond_rhs (stmt))))
  	{
  	  tree lhs = gimple_cond_lhs (stmt);
! 	  bool rhsv = integer_onep (gimple_cond_rhs (stmt));
! 	  if (((esucc->flags & EDGE_TRUE_VALUE) != 0)
! 	      ^ (gimple_cond_code (stmt) == EQ_EXPR))
! 	    rhsv = !rhsv;
  	  if (!ignored_edges)
  	    {
  	      ignored_edges = new hash_set<edge>;
--- 683,698 ----
  	  && diag_musttail
  	  && esucc
  	  && gimple_code (stmt) == GIMPLE_COND
  	  && TREE_CODE (gimple_cond_lhs (stmt)) == SSA_NAME
  	  && TREE_CODE (gimple_cond_rhs (stmt)) == INTEGER_CST
  	  && INTEGRAL_TYPE_P (TREE_TYPE (gimple_cond_lhs (stmt)))
! 	  && tree_int_cst_sgn (gimple_cond_rhs (stmt)) >= 0)
  	{
  	  tree lhs = gimple_cond_lhs (stmt);
! 	  tree_code ccode = gimple_cond_code (stmt);
! 	  tree rhsv = gimple_cond_rhs (stmt);
! 	  if ((esucc->flags & EDGE_FALSE_VALUE) != 0)
! 	    ccode = invert_tree_comparison (ccode, false);
  	  if (!ignored_edges)
  	    {
  	      ignored_edges = new hash_set<edge>;
*************** find_tail_calls (basic_block bb, edge es
*** 700,707 ****
  	      && (gimple_assign_rhs_code (SSA_NAME_DEF_STMT (lhs))
  		  == INTEGER_CST))
  	    {
! 	      tree rhs = gimple_assign_rhs1 (SSA_NAME_DEF_STMT (lhs));
! 	      if (rhsv ? integer_onep (rhs) : integer_zerop (rhs))
  		continue;
  	    }
  	  else if (gimple_code (SSA_NAME_DEF_STMT (lhs)) == GIMPLE_PHI)
--- 703,712 ----
  	      && (gimple_assign_rhs_code (SSA_NAME_DEF_STMT (lhs))
  		  == INTEGER_CST))
  	    {
! 	      tree lhsv = gimple_assign_rhs1 (SSA_NAME_DEF_STMT (lhs));
! 
! 	      if (const_binop (ccode, boolean_type_node, lhsv, rhsv)
! 		  == boolean_true_node)
  		continue;
  	    }
  	  else if (gimple_code (SSA_NAME_DEF_STMT (lhs)) == GIMPLE_PHI)
*************** find_tail_calls (basic_block bb, edge es
*** 712,726 ****
  	      edge_iterator ei;
  	      FOR_EACH_EDGE (e, ei, pbb->preds)
  		{
! 		  tree rhs = gimple_phi_arg_def_from_edge (phi, e);
! 		  if (TREE_CODE (rhs) == SSA_NAME
! 		      && is_gimple_assign (SSA_NAME_DEF_STMT (rhs))
! 		      && (gimple_assign_rhs_code (SSA_NAME_DEF_STMT (rhs))
  			  == INTEGER_CST))
! 		    rhs = gimple_assign_rhs1 (SSA_NAME_DEF_STMT (rhs));
! 		  if (!(rhsv ? integer_onep (rhs) : integer_zerop (rhs)))
  		    ignored_edges->add (e);
  		}
  	    }
  	}
  
--- 717,778 ----
  	      edge_iterator ei;
  	      FOR_EACH_EDGE (e, ei, pbb->preds)
  		{
! 		  tree lhsv = gimple_phi_arg_def_from_edge (phi, e);
! 		  if (TREE_CODE (lhsv) == SSA_NAME
! 		      && is_gimple_assign (SSA_NAME_DEF_STMT (lhsv))
! 		      && (gimple_assign_rhs_code (SSA_NAME_DEF_STMT (lhsv))
  			  == INTEGER_CST))
! 		    lhsv = gimple_assign_rhs1 (SSA_NAME_DEF_STMT (lhsv));
! 		  if (TREE_CODE (lhsv) != INTEGER_CST
! 		      || const_binop (ccode, boolean_type_node,
! 				      lhsv, rhsv) != boolean_true_node)
! 		    ignored_edges->add (e);
! 		}
! 	      continue;
! 	    }
! 	}
!       if (cfun->has_musttail
! 	  && diag_musttail
! 	  && esucc
! 	  && gimple_code (stmt) == GIMPLE_SWITCH
! 	  && (TREE_CODE (gimple_switch_index (as_a <gswitch *> (stmt)))
! 	      == SSA_NAME))
! 	{
! 	  gswitch *swtch = as_a <gswitch *> (stmt);
! 	  tree idx = gimple_switch_index (swtch);
! 	  if (!ignored_edges)
! 	    {
! 	      ignored_edges = new hash_set<edge>;
! 	      must_see_bbs = new hash_set<basic_block>;
! 	      delete_ignored_edges = true;
! 	    }
! 	  if (is_gimple_assign (SSA_NAME_DEF_STMT (idx))
! 	      && (gimple_assign_rhs_code (SSA_NAME_DEF_STMT (idx))
! 		  == INTEGER_CST))
! 	    {
! 	      tree val = gimple_assign_rhs1 (SSA_NAME_DEF_STMT (idx));
! 	      if (find_taken_edge_switch_expr (swtch, val) == esucc)
! 		continue;
! 	    }
! 	  else if (gimple_code (SSA_NAME_DEF_STMT (idx)) == GIMPLE_PHI)
! 	    {
! 	      gimple *phi = SSA_NAME_DEF_STMT (idx);
! 	      basic_block pbb = gimple_bb (phi);
! 	      must_see_bbs->add (pbb);
! 	      edge_iterator ei;
! 	      FOR_EACH_EDGE (e, ei, pbb->preds)
! 		{
! 		  tree val = gimple_phi_arg_def_from_edge (phi, e);
! 		  if (TREE_CODE (val) == SSA_NAME
! 		      && is_gimple_assign (SSA_NAME_DEF_STMT (val))
! 		      && (gimple_assign_rhs_code (SSA_NAME_DEF_STMT (val))
! 			  == INTEGER_CST))
! 		    val = gimple_assign_rhs1 (SSA_NAME_DEF_STMT (val));
! 		  if (TREE_CODE (val) != INTEGER_CST
! 		      || find_taken_edge_switch_expr (swtch, val) != esucc)
  		    ignored_edges->add (e);
  		}
+ 	      continue;
  	    }
  	}
  
*************** find_tail_calls (basic_block bb, edge es
*** 1138,1184 ****
        if (ignored_edges)
  	{
  	  if (is_gimple_assign (stmt)
! 	      && gimple_assign_rhs_code (stmt) == INTEGER_CST)
  	    {
  	      use_operand_p use_p;
! 	      gimple *use_stmt;
! 	      if ((integer_zerop (gimple_assign_rhs1 (stmt))
! 		   || integer_onep (gimple_assign_rhs1 (stmt)))
! 		  && single_imm_use (gimple_assign_lhs (stmt), &use_p,
! 				     &use_stmt))
  		{
! 		  if (gimple_code (use_stmt) == GIMPLE_COND)
! 		    continue;
! 		  if (gimple_code (use_stmt) == GIMPLE_PHI
! 		      && single_imm_use (gimple_phi_result (use_stmt),
! 					 &use_p, &use_stmt)
! 		      && gimple_code (use_stmt) == GIMPLE_COND)
  		    continue;
  		}
  	    }
  	  if (gimple_code (stmt) == GIMPLE_COND
- 	      && (gimple_cond_code (stmt) == EQ_EXPR
- 		  || gimple_cond_code (stmt) == NE_EXPR)
  	      && TREE_CODE (gimple_cond_lhs (stmt)) == SSA_NAME
  	      && TREE_CODE (gimple_cond_rhs (stmt)) == INTEGER_CST
  	      && INTEGRAL_TYPE_P (TREE_TYPE (gimple_cond_lhs (stmt)))
! 	      && (integer_zerop (gimple_cond_rhs (stmt))
! 		  || integer_onep (gimple_cond_rhs (stmt))))
  	    {
  	      edge e = NULL, et, ef;
  	      tree lhs = gimple_cond_lhs (stmt);
! 	      bool rhsv = integer_onep (gimple_cond_rhs (stmt));
! 	      if (gimple_cond_code (stmt) == NE_EXPR)
! 		rhsv = !rhsv;
  	      extract_true_false_edges_from_block (gimple_bb (stmt), &et, &ef);
  	      if (is_gimple_assign (SSA_NAME_DEF_STMT (lhs))
  		  && (gimple_assign_rhs_code (SSA_NAME_DEF_STMT (lhs))
  		      == INTEGER_CST))
  		{
! 		  tree rhs = gimple_assign_rhs1 (SSA_NAME_DEF_STMT (lhs));
! 		  if (rhsv ? integer_onep (rhs) : integer_zerop (rhs))
  		    e = et;
! 		  else if (rhsv ? integer_zerop (rhs) : integer_onep (rhs))
  		    e = ef;
  		}
  	      else if (gimple_code (SSA_NAME_DEF_STMT (lhs)) == GIMPLE_PHI)
--- 1190,1256 ----
        if (ignored_edges)
  	{
  	  if (is_gimple_assign (stmt)
! 	      && gimple_assign_rhs_code (stmt) == INTEGER_CST
! 	      && tree_int_cst_sgn (gimple_assign_rhs1 (stmt)) >= 0)
  	    {
  	      use_operand_p use_p;
! 	      imm_use_iterator imm_iter;
! 	      bool bad_p = false;
! 	      FOR_EACH_IMM_USE_FAST (use_p, imm_iter,
! 				     gimple_assign_lhs (stmt))
  		{
! 		  gimple *use_stmt = USE_STMT (use_p);
! 		  if (is_gimple_debug (use_stmt)
! 		      || gimple_code (use_stmt) == GIMPLE_COND
! 		      || gimple_code (use_stmt) == GIMPLE_SWITCH)
  		    continue;
+ 		  if (gimple_code (use_stmt) == GIMPLE_PHI)
+ 		    {
+ 		      use_operand_p use_p2;
+ 		      imm_use_iterator imm_iter2;
+ 		      FOR_EACH_IMM_USE_FAST (use_p2, imm_iter2,
+ 					     gimple_phi_result (use_stmt))
+ 			{
+ 			  gimple *use_stmt2 = USE_STMT (use_p2);
+ 			  if (is_gimple_debug (use_stmt2)
+ 			      || gimple_code (use_stmt2) == GIMPLE_COND
+ 			      || gimple_code (use_stmt2) == GIMPLE_SWITCH)
+ 			    continue;
+ 			  bad_p = true;
+ 			  break;
+ 			}
+ 		      if (bad_p)
+ 			break;
+ 		    }
+ 		  else
+ 		    {
+ 		      bad_p = true;
+ 		      break;
+ 		    }
  		}
+ 	      if (!bad_p)
+ 		continue;
  	    }
  	  if (gimple_code (stmt) == GIMPLE_COND
  	      && TREE_CODE (gimple_cond_lhs (stmt)) == SSA_NAME
  	      && TREE_CODE (gimple_cond_rhs (stmt)) == INTEGER_CST
  	      && INTEGRAL_TYPE_P (TREE_TYPE (gimple_cond_lhs (stmt)))
! 	      && tree_int_cst_sgn (gimple_cond_rhs (stmt)) >= 0)
  	    {
  	      edge e = NULL, et, ef;
+ 	      enum tree_code ccode = gimple_cond_code (stmt);
  	      tree lhs = gimple_cond_lhs (stmt);
! 	      tree rhsv = gimple_cond_rhs (stmt);
  	      extract_true_false_edges_from_block (gimple_bb (stmt), &et, &ef);
  	      if (is_gimple_assign (SSA_NAME_DEF_STMT (lhs))
  		  && (gimple_assign_rhs_code (SSA_NAME_DEF_STMT (lhs))
  		      == INTEGER_CST))
  		{
! 		  tree lhsv = gimple_assign_rhs1 (SSA_NAME_DEF_STMT (lhs));
! 		  tree r = const_binop (ccode, boolean_type_node, lhsv, rhsv);
! 		  if (r == boolean_true_node)
  		    e = et;
! 		  else if (r == boolean_false_node)
  		    e = ef;
  		}
  	      else if (gimple_code (SSA_NAME_DEF_STMT (lhs)) == GIMPLE_PHI)
*************** find_tail_calls (basic_block bb, edge es
*** 1188,1207 ****
  		  for (edge e2 : edges)
  		    if (e2->dest == pbb)
  		      {
! 			tree rhs = gimple_phi_arg_def_from_edge (phi, e2);
! 			if (TREE_CODE (rhs) == SSA_NAME)
! 			  if (gimple *g = SSA_NAME_DEF_STMT (rhs))
  			    if (is_gimple_assign (g)
  				&& gimple_assign_rhs_code (g) == INTEGER_CST)
! 			      rhs = gimple_assign_rhs1 (g);
! 			if (rhsv ? integer_onep (rhs) : integer_zerop (rhs))
  			  e = et;
! 			else if (rhsv ? integer_zerop (rhs)
! 				 : integer_onep (rhs))
  			  e = ef;
  			break;
  		      }
  		}
  	      if (e)
  		{
  		  ass_var = propagate_through_phis (ass_var, e);
--- 1260,1322 ----
  		  for (edge e2 : edges)
  		    if (e2->dest == pbb)
  		      {
! 			tree lhsv = gimple_phi_arg_def_from_edge (phi, e2);
! 			if (TREE_CODE (lhsv) == SSA_NAME)
! 			  if (gimple *g = SSA_NAME_DEF_STMT (lhsv))
  			    if (is_gimple_assign (g)
  				&& gimple_assign_rhs_code (g) == INTEGER_CST)
! 			      lhsv = gimple_assign_rhs1 (g);
! 			tree r = const_binop (ccode, boolean_type_node,
! 					      lhsv, rhsv);
! 			if (r == boolean_true_node)
  			  e = et;
! 			else if (r == boolean_false_node)
  			  e = ef;
  			break;
  		      }
  		}
+ 	      if (e)
+ 		{
+ 		  ass_var = propagate_through_phis (ass_var, e);
+ 		  if (!ass_var || ignored_edges)
+ 		    edges.safe_push (e);
+ 		  abb = e->dest;
+ 		  agsi = gsi_start_bb (abb);
+ 		  goto new_bb;
+ 		}
+ 	    }
+ 	  if (gimple_code (stmt) == GIMPLE_SWITCH
+ 	      && (TREE_CODE (gimple_switch_index (as_a <gswitch *> (stmt)))
+ 		  == SSA_NAME))
+ 	    {
+ 	      edge e = NULL;
+ 	      gswitch *swtch = as_a <gswitch *> (stmt);
+ 	      tree idx = gimple_switch_index (swtch);
+ 	      if (is_gimple_assign (SSA_NAME_DEF_STMT (idx))
+ 		  && (gimple_assign_rhs_code (SSA_NAME_DEF_STMT (idx))
+ 		      == INTEGER_CST))
+ 		{
+ 		  tree val = gimple_assign_rhs1 (SSA_NAME_DEF_STMT (idx));
+ 		  e = find_taken_edge_switch_expr (swtch, val);
+ 		}
+ 	      else if (gimple_code (SSA_NAME_DEF_STMT (idx)) == GIMPLE_PHI)
+ 		{
+ 		  gimple *phi = SSA_NAME_DEF_STMT (idx);
+ 		  basic_block pbb = gimple_bb (phi);
+ 		  for (edge e2 : edges)
+ 		    if (e2->dest == pbb)
+ 		      {
+ 			tree val = gimple_phi_arg_def_from_edge (phi, e2);
+ 			if (TREE_CODE (val) == SSA_NAME)
+ 			  if (gimple *g = SSA_NAME_DEF_STMT (val))
+ 			    if (is_gimple_assign (g)
+ 				&& gimple_assign_rhs_code (g) == INTEGER_CST)
+ 			      val = gimple_assign_rhs1 (g);
+ 			if (TREE_CODE (val) == INTEGER_CST)
+ 			  e = find_taken_edge_switch_expr (swtch, val);
+ 			break;
+ 		      }
+ 		}
  	      if (e)
  		{
  		  ass_var = propagate_through_phis (ass_var, e);
diff -Nrcpad gcc-16-20250803/gcc/tree-vect-data-refs.cc gcc-16-20250810/gcc/tree-vect-data-refs.cc
*** gcc-16-20250803/gcc/tree-vect-data-refs.cc	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/tree-vect-data-refs.cc	Sun Aug 10 22:32:56 2025
*************** vect_compute_data_ref_alignment (vec_inf
*** 1448,1464 ****
    if (loop_vinfo
        && dr_safe_speculative_read_required (stmt_info))
      {
!       poly_uint64 vf = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
!       auto vectype_size
  	= TREE_INT_CST_LOW (TYPE_SIZE_UNIT (TREE_TYPE (vectype)));
-       poly_uint64 new_alignment = vf * vectype_size;
-       /* If we have a grouped access we require that the alignment be N * elem.  */
        if (STMT_VINFO_GROUPED_ACCESS (stmt_info))
! 	new_alignment *= DR_GROUP_SIZE (DR_GROUP_FIRST_ELEMENT (stmt_info));
  
!       unsigned HOST_WIDE_INT target_alignment;
!       if (new_alignment.is_constant (&target_alignment)
! 	  && pow2p_hwi (target_alignment))
  	{
  	  if (dump_enabled_p ())
  	    {
--- 1448,1467 ----
    if (loop_vinfo
        && dr_safe_speculative_read_required (stmt_info))
      {
!       /* The required target alignment must be a power-of-2 value and is
! 	 computed as the product of vector element size, VF and group size.
! 	 We compute the constant part first as VF may be a variable.  For
! 	 variable VF, the power-of-2 check of VF is deferred to runtime.  */
!       auto align_factor_c
  	= TREE_INT_CST_LOW (TYPE_SIZE_UNIT (TREE_TYPE (vectype)));
        if (STMT_VINFO_GROUPED_ACCESS (stmt_info))
! 	align_factor_c *= DR_GROUP_SIZE (DR_GROUP_FIRST_ELEMENT (stmt_info));
  
!       poly_uint64 vf = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
!       poly_uint64 new_alignment = vf * align_factor_c;
! 
!       if ((vf.is_constant () && pow2p_hwi (new_alignment.to_constant ()))
! 	  || (!vf.is_constant () && pow2p_hwi (align_factor_c)))
  	{
  	  if (dump_enabled_p ())
  	    {
*************** vect_compute_data_ref_alignment (vec_inf
*** 1467,1473 ****
  	      dump_dec (MSG_NOTE, new_alignment);
  	      dump_printf (MSG_NOTE, " bytes.\n");
  	    }
! 	  vector_alignment = target_alignment;
  	}
      }
  
--- 1470,1476 ----
  	      dump_dec (MSG_NOTE, new_alignment);
  	      dump_printf (MSG_NOTE, " bytes.\n");
  	    }
! 	  vector_alignment = new_alignment;
  	}
      }
  
*************** vect_get_data_access_cost (vec_info *vin
*** 1856,1876 ****
  			   stmt_vector_for_cost *prologue_cost_vec)
  {
    stmt_vec_info stmt_info = dr_info->stmt;
-   loop_vec_info loop_vinfo = dyn_cast <loop_vec_info> (vinfo);
-   int ncopies;
- 
-   if (PURE_SLP_STMT (stmt_info))
-     ncopies = 1;
-   else
-     ncopies = vect_get_num_copies (loop_vinfo, STMT_VINFO_VECTYPE (stmt_info));
  
    if (DR_IS_READ (dr_info->dr))
!     vect_get_load_cost (vinfo, stmt_info, NULL, ncopies,
  			alignment_support_scheme, misalignment, true,
  			inside_cost, outside_cost, prologue_cost_vec,
  			body_cost_vec, false);
    else
!     vect_get_store_cost (vinfo,stmt_info, NULL, ncopies,
  			 alignment_support_scheme, misalignment, inside_cost,
  			 body_cost_vec);
  
--- 1859,1872 ----
  			   stmt_vector_for_cost *prologue_cost_vec)
  {
    stmt_vec_info stmt_info = dr_info->stmt;
  
    if (DR_IS_READ (dr_info->dr))
!     vect_get_load_cost (vinfo, stmt_info, NULL, 1,
  			alignment_support_scheme, misalignment, true,
  			inside_cost, outside_cost, prologue_cost_vec,
  			body_cost_vec, false);
    else
!     vect_get_store_cost (vinfo,stmt_info, NULL, 1,
  			 alignment_support_scheme, misalignment, inside_cost,
  			 body_cost_vec);
  
*************** vect_enhance_data_refs_alignment (loop_v
*** 2445,2450 ****
--- 2441,2447 ----
       - The cost of peeling (the extra runtime checks, the increase
         in code size).  */
  
+   poly_uint64 vf = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
    FOR_EACH_VEC_ELT (datarefs, i, dr)
      {
        dr_vec_info *dr_info = loop_vinfo->lookup_dr (dr);
*************** vect_enhance_data_refs_alignment (loop_v
*** 2453,2461 ****
  
        stmt_vec_info stmt_info = dr_info->stmt;
        tree vectype = STMT_VINFO_VECTYPE (stmt_info);
!       do_peeling
! 	= vector_alignment_reachable_p (dr_info,
! 					LOOP_VINFO_VECT_FACTOR (loop_vinfo));
        if (do_peeling)
          {
  	  if (known_alignment_for_access_p (dr_info, vectype))
--- 2450,2467 ----
  
        stmt_vec_info stmt_info = dr_info->stmt;
        tree vectype = STMT_VINFO_VECTYPE (stmt_info);
! 
!       /* With variable VF, unsafe speculative read can be avoided for known
! 	 inbounds DRs as long as partial vectors are used.  */
!       if (!vf.is_constant ()
! 	  && dr_safe_speculative_read_required (stmt_info)
! 	  && DR_SCALAR_KNOWN_BOUNDS (dr_info))
! 	{
! 	  dr_set_safe_speculative_read_required (stmt_info, false);
! 	  LOOP_VINFO_MUST_USE_PARTIAL_VECTORS_P (loop_vinfo) = true;
! 	}
! 
!       do_peeling = vector_alignment_reachable_p (dr_info, vf);
        if (do_peeling)
          {
  	  if (known_alignment_for_access_p (dr_info, vectype))
*************** vect_enhance_data_refs_alignment (loop_v
*** 2495,2501 ****
  	      poly_uint64 nscalars = npeel_tmp;
                if (unlimited_cost_model (LOOP_VINFO_LOOP (loop_vinfo)))
  		{
- 		  poly_uint64 vf = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
  		  unsigned group_size = 1;
  		  if (STMT_SLP_TYPE (stmt_info)
  		      && STMT_VINFO_GROUPED_ACCESS (stmt_info))
--- 2501,2506 ----
*************** vect_enhance_data_refs_alignment (loop_v
*** 2918,2931 ****
       2) there is at least one unsupported misaligned data ref with an unknown
          misalignment, and
       3) all misaligned data refs with a known misalignment are supported, and
!      4) the number of runtime alignment checks is within reason.
!      5) the vectorization factor is a constant.  */
  
    do_versioning
      = (optimize_loop_nest_for_speed_p (loop)
         && !loop->inner /* FORNOW */
!        && loop_cost_model (loop) > VECT_COST_MODEL_CHEAP)
!        && LOOP_VINFO_VECT_FACTOR (loop_vinfo).is_constant ();
  
    if (do_versioning)
      {
--- 2923,2934 ----
       2) there is at least one unsupported misaligned data ref with an unknown
          misalignment, and
       3) all misaligned data refs with a known misalignment are supported, and
!      4) the number of runtime alignment checks is within reason.  */
  
    do_versioning
      = (optimize_loop_nest_for_speed_p (loop)
         && !loop->inner /* FORNOW */
!        && loop_cost_model (loop) > VECT_COST_MODEL_CHEAP);
  
    if (do_versioning)
      {
*************** vect_enhance_data_refs_alignment (loop_v
*** 2972,2996 ****
  		 ?? We could actually unroll the loop to achieve the required
  		 overall step alignment, and forcing the alignment could be
  		 done by doing some iterations of the non-vectorized loop.  */
! 	      if (!multiple_p (LOOP_VINFO_VECT_FACTOR (loop_vinfo)
! 			       * DR_STEP_ALIGNMENT (dr),
  			       DR_TARGET_ALIGNMENT (dr_info)))
  		{
  		  do_versioning = false;
  		  break;
  		}
  
!               /* The rightmost bits of an aligned address must be zeros.
!                  Construct the mask needed for this test.  For example,
!                  GET_MODE_SIZE for the vector mode V4SI is 16 bytes so the
!                  mask must be 15 = 0xf. */
! 	      gcc_assert (DR_TARGET_ALIGNMENT (dr_info).is_constant ());
! 	      int mask = DR_TARGET_ALIGNMENT (dr_info).to_constant () - 1;
  
  	      /* FORNOW: use the same mask to test all potentially unaligned
  		 references in the loop.  */
! 	      if (LOOP_VINFO_PTR_MASK (loop_vinfo)
! 		  && LOOP_VINFO_PTR_MASK (loop_vinfo) != mask)
  		{
  		  do_versioning = false;
  		  break;
--- 2975,2996 ----
  		 ?? We could actually unroll the loop to achieve the required
  		 overall step alignment, and forcing the alignment could be
  		 done by doing some iterations of the non-vectorized loop.  */
! 	      if (!multiple_p (vf * DR_STEP_ALIGNMENT (dr),
  			       DR_TARGET_ALIGNMENT (dr_info)))
  		{
  		  do_versioning = false;
  		  break;
  		}
  
! 	      /* Use "mask = DR_TARGET_ALIGNMENT - 1" to test rightmost address
! 		 bits for runtime alignment check.  For example, for 16 bytes
! 		 target alignment the mask is 15 = 0xf.  */
! 	      poly_uint64 mask = DR_TARGET_ALIGNMENT (dr_info) - 1;
  
  	      /* FORNOW: use the same mask to test all potentially unaligned
  		 references in the loop.  */
! 	      if (maybe_ne (LOOP_VINFO_PTR_MASK (loop_vinfo), 0U)
! 		  && maybe_ne (LOOP_VINFO_PTR_MASK (loop_vinfo), mask))
  		{
  		  do_versioning = false;
  		  break;
*************** vect_prune_runtime_alias_test_list (loop
*** 4430,4437 ****
     MASKED_P is true if the load or store is conditional.  MEMORY_TYPE is
     the type of the memory elements being loaded or stored.  OFFSET_TYPE
     is the type of the offset that is being applied to the invariant
!    base address.  SCALE is the amount by which the offset should
!    be multiplied *after* it has been converted to address width.
  
     Return true if the function is supported, storing the function id in
     *IFN_OUT and the vector type for the offset in *OFFSET_VECTYPE_OUT.
--- 4430,4438 ----
     MASKED_P is true if the load or store is conditional.  MEMORY_TYPE is
     the type of the memory elements being loaded or stored.  OFFSET_TYPE
     is the type of the offset that is being applied to the invariant
!    base address.  If OFFSET_TYPE is scalar the function chooses an
!    appropriate vector type for it.  SCALE is the amount by which the
!    offset should be multiplied *after* it has been converted to address width.
  
     Return true if the function is supported, storing the function id in
     *IFN_OUT and the vector type for the offset in *OFFSET_VECTYPE_OUT.
*************** vect_gather_scatter_fn_p (vec_info *vinf
*** 4474,4482 ****
  
    for (;;)
      {
!       tree offset_vectype = get_vectype_for_scalar_type (vinfo, offset_type);
!       if (!offset_vectype)
! 	return false;
  
        /* Test whether the target supports this combination.  */
        if (internal_gather_scatter_fn_supported_p (ifn, vectype, memory_type,
--- 4475,4489 ----
  
    for (;;)
      {
!       tree offset_vectype;
!       if (VECTOR_TYPE_P (offset_type))
! 	offset_vectype = offset_type;
!       else
! 	{
! 	  offset_vectype = get_vectype_for_scalar_type (vinfo, offset_type);
! 	  if (!offset_vectype)
! 	    return false;
! 	}
  
        /* Test whether the target supports this combination.  */
        if (internal_gather_scatter_fn_supported_p (ifn, vectype, memory_type,
*************** vect_gather_scatter_fn_p (vec_info *vinf
*** 4507,4516 ****
--- 4514,4528 ----
  	  return true;
  	}
  
+       /* For fixed offset vector type we're done.  */
+       if (VECTOR_TYPE_P (offset_type))
+ 	return false;
+ 
        if (TYPE_PRECISION (offset_type) >= POINTER_SIZE
  	  && TYPE_PRECISION (offset_type) >= element_bits)
  	return false;
  
+       /* Try a larger offset vector type.  */
        offset_type = build_nonstandard_integer_type
  	(TYPE_PRECISION (offset_type) * 2, TYPE_UNSIGNED (offset_type));
      }
*************** vect_gather_scatter_fn_p (vec_info *vinf
*** 4519,4525 ****
  /* STMT_INFO is a call to an internal gather load or scatter store function.
     Describe the operation in INFO.  */
  
! static void
  vect_describe_gather_scatter_call (stmt_vec_info stmt_info,
  				   gather_scatter_info *info)
  {
--- 4531,4537 ----
  /* STMT_INFO is a call to an internal gather load or scatter store function.
     Describe the operation in INFO.  */
  
! void
  vect_describe_gather_scatter_call (stmt_vec_info stmt_info,
  				   gather_scatter_info *info)
  {
*************** vect_supportable_dr_alignment (vec_info
*** 6531,6537 ****
  			       tree vectype, int misalignment,
  			       gather_scatter_info *gs_info)
  {
!   data_reference *dr = dr_info ? dr_info->dr : nullptr;
    stmt_vec_info stmt_info = dr_info->stmt;
    machine_mode mode = TYPE_MODE (vectype);
    loop_vec_info loop_vinfo = dyn_cast <loop_vec_info> (vinfo);
--- 6543,6549 ----
  			       tree vectype, int misalignment,
  			       gather_scatter_info *gs_info)
  {
!   data_reference *dr = dr_info->dr;
    stmt_vec_info stmt_info = dr_info->stmt;
    machine_mode mode = TYPE_MODE (vectype);
    loop_vec_info loop_vinfo = dyn_cast <loop_vec_info> (vinfo);
*************** vect_supportable_dr_alignment (vec_info
*** 6612,6618 ****
          }
      } */
  
!   if (dr && DR_IS_READ (dr))
      {
        if (can_implement_p (vec_realign_load_optab, mode)
  	  && (!targetm.vectorize.builtin_mask_for_load
--- 6624,6630 ----
          }
      } */
  
!   if (DR_IS_READ (dr))
      {
        if (can_implement_p (vec_realign_load_optab, mode)
  	  && (!targetm.vectorize.builtin_mask_for_load
*************** vect_supportable_dr_alignment (vec_info
*** 6642,6679 ****
    tree type = TREE_TYPE (DR_REF (dr));
    bool is_gather_scatter = gs_info != nullptr;
    if (misalignment == DR_MISALIGNMENT_UNKNOWN)
!     {
!       if (!is_gather_scatter || dr != nullptr)
! 	is_packed = not_size_aligned (DR_REF (dr));
!       else
! 	{
! 	  /* Gather-scatter accesses normally perform only component accesses
! 	     so alignment is irrelevant for them.  Targets like riscv do care
! 	     about scalar alignment in vector accesses, though, so check scalar
! 	     alignment here.  We determined the alias pointer as well as the
! 	     base alignment during pattern recognition and can re-use it here.
! 
! 	     As we do not have an analyzed dataref we only know the alignment
! 	     of the reference itself and nothing about init, steps, etc.
! 	     For now don't try harder to determine misalignment and
! 	     just assume it is unknown.  We consider the type packed if its
! 	     scalar alignment is lower than the natural alignment of a vector
! 	     element's type.  */
! 
! 	  gcc_assert (!GATHER_SCATTER_LEGACY_P (*gs_info));
! 	  gcc_assert (dr == nullptr);
! 
! 	  tree inner_vectype = TREE_TYPE (vectype);
! 
! 	  unsigned HOST_WIDE_INT scalar_align
! 	    = tree_to_uhwi (gs_info->alias_ptr);
! 	  unsigned HOST_WIDE_INT inner_vectype_sz
! 	    = tree_to_uhwi (TYPE_SIZE (inner_vectype));
! 
! 	  bool is_misaligned = scalar_align < inner_vectype_sz;
! 	  is_packed = scalar_align > 1 && is_misaligned;
! 	}
!     }
    if (targetm.vectorize.support_vector_misalignment (mode, type, misalignment,
  						     is_packed,
  						     is_gather_scatter))
--- 6654,6660 ----
    tree type = TREE_TYPE (DR_REF (dr));
    bool is_gather_scatter = gs_info != nullptr;
    if (misalignment == DR_MISALIGNMENT_UNKNOWN)
!     is_packed = not_size_aligned (DR_REF (dr));
    if (targetm.vectorize.support_vector_misalignment (mode, type, misalignment,
  						     is_packed,
  						     is_gather_scatter))
diff -Nrcpad gcc-16-20250803/gcc/tree-vect-loop-manip.cc gcc-16-20250810/gcc/tree-vect-loop-manip.cc
*** gcc-16-20250803/gcc/tree-vect-loop-manip.cc	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/tree-vect-loop-manip.cc	Sun Aug 10 22:32:56 2025
*************** get_misalign_in_elems (gimple **seq, loo
*** 2454,2463 ****
    else
      {
        tree vla = build_int_cst (type, target_align);
!       tree vla_align = fold_build2 (BIT_AND_EXPR, type, vla,
! 				    fold_build2 (MINUS_EXPR, type,
! 						 build_int_cst (type, 0), vla));
!       target_align_minus_1 = fold_build2 (MINUS_EXPR, type, vla_align,
  					  build_int_cst (type, 1));
      }
  
--- 2454,2460 ----
    else
      {
        tree vla = build_int_cst (type, target_align);
!       target_align_minus_1 = fold_build2 (MINUS_EXPR, type, vla,
  					  build_int_cst (type, 1));
      }
  
*************** vect_create_cond_for_align_checks (loop_
*** 3840,3846 ****
    const vec<stmt_vec_info> &may_misalign_stmts
      = LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo);
    stmt_vec_info stmt_info;
!   int mask = LOOP_VINFO_PTR_MASK (loop_vinfo);
    tree mask_cst;
    unsigned int i;
    tree int_ptrsize_type;
--- 3837,3843 ----
    const vec<stmt_vec_info> &may_misalign_stmts
      = LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo);
    stmt_vec_info stmt_info;
!   poly_uint64 mask = LOOP_VINFO_PTR_MASK (loop_vinfo);
    tree mask_cst;
    unsigned int i;
    tree int_ptrsize_type;
*************** vect_create_cond_for_align_checks (loop_
*** 3852,3860 ****
    tree ptrsize_zero;
    tree part_cond_expr;
  
!   /* Check that mask is one less than a power of 2, i.e., mask is
!      all zeros followed by all ones.  */
!   gcc_assert ((mask != 0) && ((mask & (mask+1)) == 0));
  
    int_ptrsize_type = signed_type_for (ptr_type_node);
  
--- 3849,3855 ----
    tree ptrsize_zero;
    tree part_cond_expr;
  
!   gcc_assert (known_ne (mask, 0U));
  
    int_ptrsize_type = signed_type_for (ptr_type_node);
  
*************** vect_create_cond_for_align_checks (loop_
*** 3962,3967 ****
--- 3957,4018 ----
    chain_cond_expr (cond_expr, part_cond_expr);
  }
  
+ /* Function vect_create_cond_for_vla_spec_read.
+ 
+    Create a conditional expression that represents the run-time checks with
+    max speculative read amount in VLA modes.  We check two things:
+      1) if the max speculative read amount exceeds the min page size
+      2) if the VF is power-of-2 - done by checking the max read amount instead
+ 
+    Input:
+    COND_EXPR  - input conditional expression.  New conditions will be chained
+ 		with logical AND operation.
+    LOOP_VINFO - field LOOP_VINFO_MAX_SPEC_READ_AMOUNT contains the max
+ 		possible speculative read amount in VLA modes.
+ 
+    Output:
+    COND_EXPR - conditional expression.
+ 
+    The returned COND_EXPR is the conditional expression to be used in the
+    if statement that controls which version of the loop gets executed at
+    runtime.  */
+ 
+ static void
+ vect_create_cond_for_vla_spec_read (loop_vec_info loop_vinfo, tree *cond_expr)
+ {
+   poly_uint64 read_amount_poly = LOOP_VINFO_MAX_SPEC_READ_AMOUNT (loop_vinfo);
+   tree amount = build_int_cst (long_unsigned_type_node, read_amount_poly);
+ 
+   /* Both the read amount and the VF must be variants, and the read amount must
+      be a constant power-of-2 multiple of the VF.  */
+   unsigned HOST_WIDE_INT multiple;
+   gcc_assert (!read_amount_poly.is_constant ()
+ 	      && !LOOP_VINFO_VECT_FACTOR (loop_vinfo).is_constant ()
+ 	      && constant_multiple_p (read_amount_poly,
+ 				      LOOP_VINFO_VECT_FACTOR (loop_vinfo),
+ 				      &multiple)
+ 	      && pow2p_hwi (multiple));
+ 
+   tree cst_ul_zero = build_int_cstu (long_unsigned_type_node, 0U);
+   tree cst_ul_one = build_int_cstu (long_unsigned_type_node, 1U);
+   tree cst_ul_pagesize = build_int_cstu (long_unsigned_type_node,
+ 					 (unsigned long) param_min_pagesize);
+ 
+   /* Create an expression of "amount & (amount - 1) == 0".  */
+   tree amount_m1 = fold_build2 (MINUS_EXPR, long_unsigned_type_node,
+ 				amount, cst_ul_one);
+   tree amount_and_expr = fold_build2 (BIT_AND_EXPR, long_unsigned_type_node,
+ 				      amount, amount_m1);
+   tree powof2_cond_expr = fold_build2 (EQ_EXPR, boolean_type_node,
+ 				       amount_and_expr, cst_ul_zero);
+   chain_cond_expr (cond_expr, powof2_cond_expr);
+ 
+   /* Create an expression of "amount <= cst_ul_pagesize".  */
+   tree pagesize_cond_expr = fold_build2 (LE_EXPR, boolean_type_node,
+ 					 amount, cst_ul_pagesize);
+   chain_cond_expr (cond_expr, pagesize_cond_expr);
+ }
+ 
  /* If LOOP_VINFO_CHECK_UNEQUAL_ADDRS contains <A1, B1>, ..., <An, Bn>,
     create a tree representation of: (&A1 != &B1) && ... && (&An != &Bn).
     Set *COND_EXPR to a tree that is true when both the original *COND_EXPR
*************** vect_loop_versioning (loop_vec_info loop
*** 4087,4092 ****
--- 4138,4144 ----
    gimple_seq gimplify_stmt_list = NULL;
    tree scalar_loop_iters = LOOP_VINFO_NITERSM1 (loop_vinfo);
    bool version_align = LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT (loop_vinfo);
+   bool version_spec_read = LOOP_REQUIRES_VERSIONING_FOR_SPEC_READ (loop_vinfo);
    bool version_alias = LOOP_REQUIRES_VERSIONING_FOR_ALIAS (loop_vinfo);
    bool version_niter = LOOP_REQUIRES_VERSIONING_FOR_NITERS (loop_vinfo);
    poly_uint64 versioning_threshold
*************** vect_loop_versioning (loop_vec_info loop
*** 4145,4150 ****
--- 4197,4205 ----
      vect_create_cond_for_align_checks (loop_vinfo, &cond_expr,
  				       &cond_expr_stmt_list);
  
+   if (version_spec_read)
+     vect_create_cond_for_vla_spec_read (loop_vinfo, &cond_expr);
+ 
    if (version_alias)
      {
        vect_create_cond_for_unequal_addrs (loop_vinfo, &cond_expr);
diff -Nrcpad gcc-16-20250803/gcc/tree-vect-loop.cc gcc-16-20250810/gcc/tree-vect-loop.cc
*** gcc-16-20250803/gcc/tree-vect-loop.cc	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/tree-vect-loop.cc	Sun Aug 10 22:32:56 2025
*************** static void vect_estimate_min_profitable
*** 163,331 ****
  static stmt_vec_info vect_is_simple_reduction (loop_vec_info, stmt_vec_info,
  					       bool *, bool *, bool);
  
- /* Subroutine of vect_determine_vf_for_stmt that handles only one
-    statement.  VECTYPE_MAYBE_SET_P is true if STMT_VINFO_VECTYPE
-    may already be set for general statements (not just data refs).  */
- 
- static opt_result
- vect_determine_vectype_for_stmt_1 (vec_info *vinfo, stmt_vec_info stmt_info,
- 				   bool vectype_maybe_set_p)
- {
-   gimple *stmt = stmt_info->stmt;
- 
-   if ((!STMT_VINFO_RELEVANT_P (stmt_info)
-        && !STMT_VINFO_LIVE_P (stmt_info))
-       || gimple_clobber_p (stmt))
-     {
-       if (dump_enabled_p ())
- 	dump_printf_loc (MSG_NOTE, vect_location, "skip.\n");
-       return opt_result::success ();
-     }
- 
-   tree stmt_vectype, nunits_vectype;
-   opt_result res = vect_get_vector_types_for_stmt (vinfo, stmt_info,
- 						   &stmt_vectype,
- 						   &nunits_vectype);
-   if (!res)
-     return res;
- 
-   if (stmt_vectype)
-     {
-       if (STMT_VINFO_VECTYPE (stmt_info))
- 	/* The only case when a vectype had been already set is for stmts
- 	   that contain a data ref, or for "pattern-stmts" (stmts generated
- 	   by the vectorizer to represent/replace a certain idiom).  */
- 	gcc_assert ((STMT_VINFO_DATA_REF (stmt_info)
- 		     || vectype_maybe_set_p)
- 		    && STMT_VINFO_VECTYPE (stmt_info) == stmt_vectype);
-       else
- 	STMT_VINFO_VECTYPE (stmt_info) = stmt_vectype;
-     }
- 
-   return opt_result::success ();
- }
- 
- /* Subroutine of vect_determine_vectorization_factor.  Set the vector
-    types of STMT_INFO and all attached pattern statements and update
-    the vectorization factor VF accordingly.  Return true on success
-    or false if something prevented vectorization.  */
- 
- static opt_result
- vect_determine_vectype_for_stmt (vec_info *vinfo, stmt_vec_info stmt_info)
- {
-   if (dump_enabled_p ())
-     dump_printf_loc (MSG_NOTE, vect_location, "==> examining statement: %G",
- 		     stmt_info->stmt);
-   opt_result res = vect_determine_vectype_for_stmt_1 (vinfo, stmt_info, false);
-   if (!res)
-     return res;
- 
-   if (STMT_VINFO_IN_PATTERN_P (stmt_info)
-       && STMT_VINFO_RELATED_STMT (stmt_info))
-     {
-       gimple *pattern_def_seq = STMT_VINFO_PATTERN_DEF_SEQ (stmt_info);
-       stmt_info = STMT_VINFO_RELATED_STMT (stmt_info);
- 
-       /* If a pattern statement has def stmts, analyze them too.  */
-       for (gimple_stmt_iterator si = gsi_start (pattern_def_seq);
- 	   !gsi_end_p (si); gsi_next (&si))
- 	{
- 	  stmt_vec_info def_stmt_info = vinfo->lookup_stmt (gsi_stmt (si));
- 	  if (dump_enabled_p ())
- 	    dump_printf_loc (MSG_NOTE, vect_location,
- 			     "==> examining pattern def stmt: %G",
- 			     def_stmt_info->stmt);
- 	  res = vect_determine_vectype_for_stmt_1 (vinfo, def_stmt_info, true);
- 	  if (!res)
- 	    return res;
- 	}
- 
-       if (dump_enabled_p ())
- 	dump_printf_loc (MSG_NOTE, vect_location,
- 			 "==> examining pattern statement: %G",
- 			 stmt_info->stmt);
-       res = vect_determine_vectype_for_stmt_1 (vinfo, stmt_info, true);
-       if (!res)
- 	return res;
-     }
- 
-   return opt_result::success ();
- }
- 
- /* Function vect_set_stmts_vectype
- 
-    Set STMT_VINFO_VECTYPE of all stmts.  */
- 
- static opt_result
- vect_set_stmts_vectype (loop_vec_info loop_vinfo)
- {
-   class loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
-   basic_block *bbs = LOOP_VINFO_BBS (loop_vinfo);
-   unsigned nbbs = loop->num_nodes;
-   tree scalar_type = NULL_TREE;
-   gphi *phi;
-   tree vectype;
-   stmt_vec_info stmt_info;
-   unsigned i;
- 
-   DUMP_VECT_SCOPE ("vect_set_stmts_vectype");
- 
-   for (i = 0; i < nbbs; i++)
-     {
-       basic_block bb = bbs[i];
- 
-       for (gphi_iterator si = gsi_start_phis (bb); !gsi_end_p (si);
- 	   gsi_next (&si))
- 	{
- 	  phi = si.phi ();
- 	  stmt_info = loop_vinfo->lookup_stmt (phi);
- 	  if (dump_enabled_p ())
- 	    dump_printf_loc (MSG_NOTE, vect_location, "==> examining phi: %G",
- 			     (gimple *) phi);
- 
- 	  gcc_assert (stmt_info);
- 
- 	  if (STMT_VINFO_RELEVANT_P (stmt_info)
- 	      || STMT_VINFO_LIVE_P (stmt_info))
-             {
- 	      gcc_assert (!STMT_VINFO_VECTYPE (stmt_info));
-               scalar_type = TREE_TYPE (PHI_RESULT (phi));
- 
- 	      if (dump_enabled_p ())
- 		dump_printf_loc (MSG_NOTE, vect_location,
- 				 "get vectype for scalar type:  %T\n",
- 				 scalar_type);
- 
- 	      vectype = get_vectype_for_scalar_type (loop_vinfo, scalar_type);
- 	      if (!vectype)
- 		return opt_result::failure_at (phi,
- 					       "not vectorized: unsupported "
- 					       "data-type %T\n",
- 					       scalar_type);
- 	      STMT_VINFO_VECTYPE (stmt_info) = vectype;
- 
- 	      if (dump_enabled_p ())
- 		dump_printf_loc (MSG_NOTE, vect_location, "vectype: %T\n",
- 				 vectype);
- 	    }
- 	}
- 
-       for (gimple_stmt_iterator si = gsi_start_bb (bb); !gsi_end_p (si);
- 	   gsi_next (&si))
- 	{
- 	  if (is_gimple_debug (gsi_stmt (si)))
- 	    continue;
- 	  stmt_info = loop_vinfo->lookup_stmt (gsi_stmt (si));
- 	  opt_result res
- 	    = vect_determine_vectype_for_stmt (loop_vinfo, stmt_info);
- 	  if (!res)
- 	    return res;
-         }
-     }
- 
-   return opt_result::success ();
- }
- 
  
  /* Function vect_is_simple_iv_evolution.
  
--- 163,168 ----
*************** _loop_vec_info::_loop_vec_info (class lo
*** 1009,1014 ****
--- 846,852 ----
      unaligned_dr (NULL),
      peeling_for_alignment (0),
      ptr_mask (0),
+     max_spec_read_amount (0),
      nonlinear_iv (false),
      ivexpr_map (NULL),
      scan_map (NULL),
*************** vect_analyze_loop_2 (loop_vec_info loop_
*** 2482,2496 ****
      }
    LOOP_VINFO_MAX_VECT_FACTOR (loop_vinfo) = max_vf;
  
-   ok = vect_set_stmts_vectype (loop_vinfo);
-   if (!ok)
-     {
-       if (dump_enabled_p ())
- 	dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
- 			 "cannot determine vector types.\n");
-       return ok;
-     }
- 
    /* Compute the scalar iteration cost.  */
    vect_compute_single_scalar_iteration_cost (loop_vinfo);
  
--- 2320,2325 ----
*************** start_over:
*** 2512,2520 ****
    if (!vect_make_slp_decision (loop_vinfo))
      return opt_result::failure_at (vect_location, "no stmts to vectorize.\n");
  
!   /* Find stmts that need to be both vectorized and SLPed.  */
!   if (!vect_detect_hybrid_slp (loop_vinfo))
!     return opt_result::failure_at (vect_location, "needs non-SLP handling\n");
  
    /* Determine the vectorization factor from the SLP decision.  */
    LOOP_VINFO_VECT_FACTOR (loop_vinfo)
--- 2341,2348 ----
    if (!vect_make_slp_decision (loop_vinfo))
      return opt_result::failure_at (vect_location, "no stmts to vectorize.\n");
  
!   if (dump_enabled_p ())
!     dump_printf_loc (MSG_NOTE, vect_location, "Loop contains only SLP stmts\n");
  
    /* Determine the vectorization factor from the SLP decision.  */
    LOOP_VINFO_VECT_FACTOR (loop_vinfo)
*************** again:
*** 2923,2929 ****
  	   !gsi_end_p (si); gsi_next (&si))
  	{
  	  stmt_vec_info stmt_info = loop_vinfo->lookup_stmt (gsi_stmt (si));
! 	  STMT_SLP_TYPE (stmt_info) = loop_vect;
  	  if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_reduction_def
  	      || STMT_VINFO_DEF_TYPE (stmt_info) == vect_double_reduction_def)
  	    {
--- 2751,2757 ----
  	   !gsi_end_p (si); gsi_next (&si))
  	{
  	  stmt_vec_info stmt_info = loop_vinfo->lookup_stmt (gsi_stmt (si));
! 	  STMT_SLP_TYPE (stmt_info) = not_vect;
  	  if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_reduction_def
  	      || STMT_VINFO_DEF_TYPE (stmt_info) == vect_double_reduction_def)
  	    {
*************** again:
*** 2942,2948 ****
  	  if (is_gimple_debug (gsi_stmt (si)))
  	    continue;
  	  stmt_vec_info stmt_info = loop_vinfo->lookup_stmt (gsi_stmt (si));
! 	  STMT_SLP_TYPE (stmt_info) = loop_vect;
  	  if (STMT_VINFO_IN_PATTERN_P (stmt_info))
  	    {
  	      stmt_vec_info pattern_stmt_info
--- 2770,2776 ----
  	  if (is_gimple_debug (gsi_stmt (si)))
  	    continue;
  	  stmt_vec_info stmt_info = loop_vinfo->lookup_stmt (gsi_stmt (si));
! 	  STMT_SLP_TYPE (stmt_info) = not_vect;
  	  if (STMT_VINFO_IN_PATTERN_P (stmt_info))
  	    {
  	      stmt_vec_info pattern_stmt_info
*************** again:
*** 2951,2961 ****
  		STMT_VINFO_IN_PATTERN_P (stmt_info) = false;
  
  	      gimple *pattern_def_seq = STMT_VINFO_PATTERN_DEF_SEQ (stmt_info);
! 	      STMT_SLP_TYPE (pattern_stmt_info) = loop_vect;
  	      for (gimple_stmt_iterator pi = gsi_start (pattern_def_seq);
  		   !gsi_end_p (pi); gsi_next (&pi))
  		STMT_SLP_TYPE (loop_vinfo->lookup_stmt (gsi_stmt (pi)))
! 		  = loop_vect;
  	    }
  	}
      }
--- 2779,2789 ----
  		STMT_VINFO_IN_PATTERN_P (stmt_info) = false;
  
  	      gimple *pattern_def_seq = STMT_VINFO_PATTERN_DEF_SEQ (stmt_info);
! 	      STMT_SLP_TYPE (pattern_stmt_info) = not_vect;
  	      for (gimple_stmt_iterator pi = gsi_start (pattern_def_seq);
  		   !gsi_end_p (pi); gsi_next (&pi))
  		STMT_SLP_TYPE (loop_vinfo->lookup_stmt (gsi_stmt (pi)))
! 		  = not_vect;
  	    }
  	}
      }
*************** have_whole_vector_shift (machine_mode mo
*** 4957,4964 ****
     See vect_emulate_mixed_dot_prod for the actual sequence used.  */
  
  static bool
! vect_is_emulated_mixed_dot_prod (stmt_vec_info stmt_info)
  {
    gassign *assign = dyn_cast<gassign *> (stmt_info->stmt);
    if (!assign || gimple_assign_rhs_code (assign) != DOT_PROD_EXPR)
      return false;
--- 4785,4793 ----
     See vect_emulate_mixed_dot_prod for the actual sequence used.  */
  
  static bool
! vect_is_emulated_mixed_dot_prod (slp_tree slp_node)
  {
+   stmt_vec_info stmt_info = SLP_TREE_REPRESENTATIVE (slp_node);
    gassign *assign = dyn_cast<gassign *> (stmt_info->stmt);
    if (!assign || gimple_assign_rhs_code (assign) != DOT_PROD_EXPR)
      return false;
*************** vect_is_emulated_mixed_dot_prod (stmt_ve
*** 4970,4976 ****
  
    gcc_assert (STMT_VINFO_REDUC_VECTYPE_IN (stmt_info));
    return !directly_supported_p (DOT_PROD_EXPR,
! 				STMT_VINFO_VECTYPE (stmt_info),
  				STMT_VINFO_REDUC_VECTYPE_IN (stmt_info),
  				optab_vector_mixed_sign);
  }
--- 4799,4805 ----
  
    gcc_assert (STMT_VINFO_REDUC_VECTYPE_IN (stmt_info));
    return !directly_supported_p (DOT_PROD_EXPR,
! 				SLP_TREE_VECTYPE (slp_node),
  				STMT_VINFO_REDUC_VECTYPE_IN (stmt_info),
  				optab_vector_mixed_sign);
  }
*************** vectorizable_lane_reducing (loop_vec_inf
*** 7119,7131 ****
  						       vectype_in);
    gcc_assert (ncopies_for_cost >= 1);
  
!   if (vect_is_emulated_mixed_dot_prod (stmt_info))
      {
        /* We need extra two invariants: one that contains the minimum signed
  	 value and one that contains half of its negative.  */
        int prologue_stmts = 2;
        unsigned cost = record_stmt_cost (cost_vec, prologue_stmts,
! 					scalar_to_vec, stmt_info, 0,
  					vect_prologue);
        if (dump_enabled_p ())
  	dump_printf (MSG_NOTE, "vectorizable_lane_reducing: "
--- 6948,6960 ----
  						       vectype_in);
    gcc_assert (ncopies_for_cost >= 1);
  
!   if (vect_is_emulated_mixed_dot_prod (slp_node))
      {
        /* We need extra two invariants: one that contains the minimum signed
  	 value and one that contains half of its negative.  */
        int prologue_stmts = 2;
        unsigned cost = record_stmt_cost (cost_vec, prologue_stmts,
! 					scalar_to_vec, slp_node, 0,
  					vect_prologue);
        if (dump_enabled_p ())
  	dump_printf (MSG_NOTE, "vectorizable_lane_reducing: "
*************** vectorizable_lane_reducing (loop_vec_inf
*** 7135,7141 ****
        ncopies_for_cost *= 4;
      }
  
!   record_stmt_cost (cost_vec, (int) ncopies_for_cost, vector_stmt, stmt_info,
  		    0, vect_body);
  
    if (LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo))
--- 6964,6970 ----
        ncopies_for_cost *= 4;
      }
  
!   record_stmt_cost (cost_vec, (int) ncopies_for_cost, vector_stmt, slp_node,
  		    0, vect_body);
  
    if (LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo))
*************** vect_transform_reduction (loop_vec_info
*** 8421,8427 ****
  	}
      }
  
!   bool emulated_mixed_dot_prod = vect_is_emulated_mixed_dot_prod (stmt_info);
    unsigned num = vec_oprnds[reduc_index == 0 ? 1 : 0].length ();
    unsigned mask_index = 0;
  
--- 8250,8256 ----
  	}
      }
  
!   bool emulated_mixed_dot_prod = vect_is_emulated_mixed_dot_prod (slp_node);
    unsigned num = vec_oprnds[reduc_index == 0 ? 1 : 0].length ();
    unsigned mask_index = 0;
  
*************** vectorizable_induction (loop_vec_info lo
*** 10142,10148 ****
        if (peel_mul)
  	{
  	  if (!step_mul)
! 	    step_mul = peel_mul;
  	  else
  	    step_mul = gimple_build (&init_stmts,
  				     MINUS_EXPR, step_vectype,
--- 9971,9982 ----
        if (peel_mul)
  	{
  	  if (!step_mul)
! 	    {
! 	      gcc_assert (!nunits.is_constant ());
! 	      step_mul = gimple_build (&init_stmts,
! 				       MINUS_EXPR, step_vectype,
! 				       build_zero_cst (step_vectype), peel_mul);
! 	    }
  	  else
  	    step_mul = gimple_build (&init_stmts,
  				     MINUS_EXPR, step_vectype,
diff -Nrcpad gcc-16-20250803/gcc/tree-vect-slp.cc gcc-16-20250810/gcc/tree-vect-slp.cc
*** gcc-16-20250803/gcc/tree-vect-slp.cc	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/tree-vect-slp.cc	Sun Aug 10 22:32:56 2025
*************** _slp_tree::_slp_tree ()
*** 120,125 ****
--- 120,127 ----
    SLP_TREE_LANE_PERMUTATION (this) = vNULL;
    SLP_TREE_DEF_TYPE (this) = vect_uninitialized_def;
    SLP_TREE_CODE (this) = ERROR_MARK;
+   SLP_TREE_GS_SCALE (this) = 0;
+   SLP_TREE_GS_BASE (this) = NULL_TREE;
    this->ldst_lanes = false;
    this->avoid_stlf_fail = false;
    SLP_TREE_VECTYPE (this) = NULL_TREE;
*************** vect_get_and_check_slp_defs (vec_info *v
*** 680,685 ****
--- 682,696 ----
  	{
  	  internal_fn ifn = gimple_call_internal_fn (stmt);
  	  commutative_op = first_commutative_argument (ifn);
+ 	  if (internal_gather_scatter_fn_p (ifn))
+ 	    {
+ 	      vect_describe_gather_scatter_call
+ 		(stmt_info,
+ 		 first ? &(*oprnds_info)[0]->first_gs_info : &gs_info);
+ 	      if (first)
+ 		(*oprnds_info)[0]->first_gs_p = true;
+ 	      gs_op = 0;
+ 	    }
  	}
      }
    else if (gassign *stmt = dyn_cast <gassign *> (stmt_info->stmt))
*************** vect_build_slp_tree_1 (vec_info *vinfo,
*** 1140,1146 ****
        soft_fail_nunits_vectype = nunits_vectype;
      }
  
!   gcc_assert (vectype);
    *node_vectype = vectype;
  
    /* For every stmt in NODE find its def stmt/s.  */
--- 1151,1157 ----
        soft_fail_nunits_vectype = nunits_vectype;
      }
  
!   gcc_assert (vectype || !gimple_get_lhs (first_stmt_info->stmt));
    *node_vectype = vectype;
  
    /* For every stmt in NODE find its def stmt/s.  */
*************** vect_build_slp_tree_1 (vec_info *vinfo,
*** 1187,1196 ****
  
        gcall *call_stmt = dyn_cast <gcall *> (stmt);
        tree lhs = gimple_get_lhs (stmt);
!       if (lhs == NULL_TREE
! 	  && (!call_stmt
! 	      || !gimple_call_internal_p (stmt)
! 	      || !internal_store_fn_p (gimple_call_internal_fn (stmt))))
  	{
  	  if (dump_enabled_p ())
  	    dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
--- 1198,1204 ----
  
        gcall *call_stmt = dyn_cast <gcall *> (stmt);
        tree lhs = gimple_get_lhs (stmt);
!       if (lhs == NULL_TREE && !call_stmt)
  	{
  	  if (dump_enabled_p ())
  	    dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
*************** out:
*** 2723,2728 ****
--- 2731,2739 ----
  
    stmt_info = stmts[0];
  
+   int gs_scale = 0;
+   tree gs_base = NULL_TREE;
+ 
    /* Create SLP_TREE nodes for the definition node/s.  */
    FOR_EACH_VEC_ELT (oprnds_info, i, oprnd_info)
      {
*************** out:
*** 2745,2750 ****
--- 2756,2767 ----
  	  continue;
  	}
  
+       if (oprnd_info->first_gs_p)
+ 	{
+ 	  gs_scale = oprnd_info->first_gs_info.scale;
+ 	  gs_base = oprnd_info->first_gs_info.base;
+ 	}
+ 
        if (is_a <bb_vec_info> (vinfo)
  	  && oprnd_info->first_dt == vect_internal_def
  	  && !oprnd_info->any_pattern)
*************** fail:
*** 3134,3139 ****
--- 3151,3158 ----
    node = vect_create_new_slp_node (node, stmts, nops);
    SLP_TREE_VECTYPE (node) = vectype;
    SLP_TREE_CHILDREN (node).splice (children);
+   SLP_TREE_GS_SCALE (node) = gs_scale;
+   SLP_TREE_GS_BASE (node) = gs_base;
    return node;
  }
  
*************** vect_analyze_slp (vec_info *vinfo, unsig
*** 4888,4896 ****
  
    /* Find SLP sequences starting from groups of grouped stores.  */
    FOR_EACH_VEC_ELT (vinfo->grouped_stores, i, first_element)
!     vect_analyze_slp_instance (vinfo, bst_map, first_element,
! 			       slp_inst_kind_store, max_tree_size, &limit,
! 			       force_single_lane);
  
    /* For loops also start SLP discovery from non-grouped stores.  */
    if (loop_vinfo)
--- 4907,4917 ----
  
    /* Find SLP sequences starting from groups of grouped stores.  */
    FOR_EACH_VEC_ELT (vinfo->grouped_stores, i, first_element)
!     if (! vect_analyze_slp_instance (vinfo, bst_map, first_element,
! 				     slp_inst_kind_store, max_tree_size, &limit,
! 				     force_single_lane)
! 	&& loop_vinfo)
!       return opt_result::failure_at (vect_location, "SLP build failed.\n");
  
    /* For loops also start SLP discovery from non-grouped stores.  */
    if (loop_vinfo)
*************** vect_analyze_slp (vec_info *vinfo, unsig
*** 4908,4917 ****
  	    vec<tree> remain = vNULL;
  	    stmts.create (1);
  	    stmts.quick_push (stmt_info);
! 	    vect_build_slp_instance (vinfo, slp_inst_kind_store,
! 				     stmts, roots, remain, max_tree_size,
! 				     &limit, bst_map, NULL, force_single_lane);
  	  }
      }
  
    if (bb_vec_info bb_vinfo = dyn_cast <bb_vec_info> (vinfo))
--- 4929,4957 ----
  	    vec<tree> remain = vNULL;
  	    stmts.create (1);
  	    stmts.quick_push (stmt_info);
! 	    if (! vect_build_slp_instance (vinfo, slp_inst_kind_store,
! 					   stmts, roots, remain, max_tree_size,
! 					   &limit, bst_map, NULL,
! 					   force_single_lane))
! 	      return opt_result::failure_at (vect_location,
! 					     "SLP build failed.\n");
  	  }
+ 
+       stmt_vec_info stmt_info;
+       FOR_EACH_VEC_ELT (LOOP_VINFO_ALTERNATE_DEFS (loop_vinfo), i, stmt_info)
+ 	{
+ 	  vec<stmt_vec_info> stmts;
+ 	  vec<stmt_vec_info> roots = vNULL;
+ 	  vec<tree> remain = vNULL;
+ 	  stmts.create (1);
+ 	  stmts.quick_push (stmt_info);
+ 	  if (! vect_build_slp_instance (vinfo, slp_inst_kind_store,
+ 					 stmts, roots, remain, max_tree_size,
+ 					 &limit, bst_map, NULL,
+ 					 force_single_lane))
+ 	    return opt_result::failure_at (vect_location,
+ 					   "SLP build failed.\n");
+ 	}
      }
  
    if (bb_vec_info bb_vinfo = dyn_cast <bb_vec_info> (vinfo))
*************** vect_analyze_slp (vec_info *vinfo, unsig
*** 5002,5013 ****
  		      vec<tree> remain = vNULL;
  		      stmts.create (1);
  		      stmts.quick_push (next_info);
! 		      vect_build_slp_instance (vinfo,
! 					       slp_inst_kind_reduc_group,
! 					       stmts, roots, remain,
! 					       max_tree_size, &limit,
! 					       bst_map, NULL,
! 					       force_single_lane);
  		    }
  		}
  	    }
--- 5042,5055 ----
  		      vec<tree> remain = vNULL;
  		      stmts.create (1);
  		      stmts.quick_push (next_info);
! 		      if (! vect_build_slp_instance (vinfo,
! 						     slp_inst_kind_reduc_group,
! 						     stmts, roots, remain,
! 						     max_tree_size, &limit,
! 						     bst_map, NULL,
! 						     force_single_lane))
! 			return opt_result::failure_at (vect_location,
! 						       "SLP build failed.\n");
  		    }
  		}
  	    }
*************** vect_analyze_slp (vec_info *vinfo, unsig
*** 5032,5042 ****
  		  vec<tree> remain = vNULL;
  		  stmts.create (1);
  		  stmts.quick_push (vect_stmt_to_vectorize (stmt_info));
! 		  vect_build_slp_instance (vinfo,
! 					   slp_inst_kind_reduc_group,
! 					   stmts, roots, remain,
! 					   max_tree_size, &limit,
! 					   bst_map, NULL, force_single_lane);
  		}
  	    }
  	  saved_stmts.release ();
--- 5074,5087 ----
  		  vec<tree> remain = vNULL;
  		  stmts.create (1);
  		  stmts.quick_push (vect_stmt_to_vectorize (stmt_info));
! 		  if (! vect_build_slp_instance (vinfo,
! 						 slp_inst_kind_reduc_group,
! 						 stmts, roots, remain,
! 						 max_tree_size, &limit,
! 						 bst_map, NULL,
! 						 force_single_lane))
! 		    return opt_result::failure_at (vect_location,
! 						   "SLP build failed.\n");
  		}
  	    }
  	  saved_stmts.release ();
*************** vect_analyze_slp (vec_info *vinfo, unsig
*** 5065,5075 ****
  		vec<tree> remain = vNULL;
  		stmts.create (1);
  		stmts.quick_push (vect_stmt_to_vectorize (stmt_info));
! 		vect_build_slp_instance (vinfo,
! 					 slp_inst_kind_reduc_group,
! 					 stmts, roots, remain,
! 					 max_tree_size, &limit,
! 					 bst_map, NULL, force_single_lane);
  	      }
  	  }
  
--- 5110,5123 ----
  		vec<tree> remain = vNULL;
  		stmts.create (1);
  		stmts.quick_push (vect_stmt_to_vectorize (stmt_info));
! 		if (! vect_build_slp_instance (vinfo,
! 					       slp_inst_kind_reduc_group,
! 					       stmts, roots, remain,
! 					       max_tree_size, &limit,
! 					       bst_map, NULL,
! 					       force_single_lane))
! 		  return opt_result::failure_at (vect_location,
! 						 "SLP build failed.\n");
  	      }
  	  }
  
*************** vect_analyze_slp (vec_info *vinfo, unsig
*** 5092,5098 ****
  	      || !integer_zerop (args1))
  	    {
  	      roots.release ();
! 	      continue;
  	    }
  
  	  /* An argument without a loop def will be codegened from vectorizing the
--- 5140,5147 ----
  	      || !integer_zerop (args1))
  	    {
  	      roots.release ();
! 	      return opt_result::failure_at (vect_location,
! 					     "SLP build failed.\n");
  	    }
  
  	  /* An argument without a loop def will be codegened from vectorizing the
*************** vect_analyze_slp (vec_info *vinfo, unsig
*** 5110,5116 ****
  					 stmts, roots, remain,
  					 max_tree_size, &limit,
  					 bst_map, NULL, force_single_lane))
! 	    roots.release ();
  	}
  
  	/* Find and create slp instances for inductions that have been forced
--- 5159,5169 ----
  					 stmts, roots, remain,
  					 max_tree_size, &limit,
  					 bst_map, NULL, force_single_lane))
! 	    {
! 	      roots.release ();
! 	      return opt_result::failure_at (vect_location,
! 					     "SLP build failed.\n");
! 	    }
  	}
  
  	/* Find and create slp instances for inductions that have been forced
*************** vect_analyze_slp (vec_info *vinfo, unsig
*** 5128,5137 ****
  	      {
  		stmts.create (1);
  		stmts.quick_push (vect_stmt_to_vectorize (lc_info));
! 		vect_build_slp_instance (vinfo, slp_inst_kind_reduc_group,
! 					 stmts, roots, remain,
! 					 max_tree_size, &limit,
! 					 bst_map, NULL, force_single_lane);
  	      }
  	    /* When the latch def is from a different cycle this can only
  	       be a induction.  Build a simple instance for this.
--- 5181,5193 ----
  	      {
  		stmts.create (1);
  		stmts.quick_push (vect_stmt_to_vectorize (lc_info));
! 		if (! vect_build_slp_instance (vinfo, slp_inst_kind_reduc_group,
! 					       stmts, roots, remain,
! 					       max_tree_size, &limit,
! 					       bst_map, NULL,
! 					       force_single_lane))
! 		  return opt_result::failure_at (vect_location,
! 						 "SLP build failed.\n");
  	      }
  	    /* When the latch def is from a different cycle this can only
  	       be a induction.  Build a simple instance for this.
*************** vect_analyze_slp (vec_info *vinfo, unsig
*** 5144,5153 ****
  	      {
  		stmts.create (1);
  		stmts.quick_push (stmt_info);
! 		vect_build_slp_instance (vinfo, slp_inst_kind_reduc_group,
! 					 stmts, roots, remain,
! 					 max_tree_size, &limit,
! 					 bst_map, NULL, force_single_lane);
  	      }
  	  }
      }
--- 5200,5212 ----
  	      {
  		stmts.create (1);
  		stmts.quick_push (stmt_info);
! 		if (! vect_build_slp_instance (vinfo, slp_inst_kind_reduc_group,
! 					       stmts, roots, remain,
! 					       max_tree_size, &limit,
! 					       bst_map, NULL,
! 					       force_single_lane))
! 		  return opt_result::failure_at (vect_location,
! 						 "SLP build failed.\n");
  	      }
  	  }
      }
*************** vect_make_slp_decision (loop_vec_info lo
*** 7610,7616 ****
        /* If all instances ended up with vector(1) T roots make sure to
  	 not vectorize.  RVV for example relies on loop vectorization
  	 when some instances are essentially kept scalar.  See PR121048.  */
!       if (known_gt (TYPE_VECTOR_SUBPARTS (SLP_TREE_VECTYPE (root)), 1U))
  	decided_to_slp++;
      }
  
--- 7669,7676 ----
        /* If all instances ended up with vector(1) T roots make sure to
  	 not vectorize.  RVV for example relies on loop vectorization
  	 when some instances are essentially kept scalar.  See PR121048.  */
!       if (SLP_TREE_VECTYPE (root)
! 	  && known_gt (TYPE_VECTOR_SUBPARTS (SLP_TREE_VECTYPE (root)), 1U))
  	decided_to_slp++;
      }
  
*************** vect_make_slp_decision (loop_vec_info lo
*** 7628,7859 ****
    return (decided_to_slp > 0);
  }
  
- /* Private data for vect_detect_hybrid_slp.  */
- struct vdhs_data
- {
-   loop_vec_info loop_vinfo;
-   vec<stmt_vec_info> *worklist;
- };
- 
- /* Walker for walk_gimple_op.  */
- 
- static tree
- vect_detect_hybrid_slp (tree *tp, int *, void *data)
- {
-   walk_stmt_info *wi = (walk_stmt_info *)data;
-   vdhs_data *dat = (vdhs_data *)wi->info;
- 
-   if (wi->is_lhs)
-     return NULL_TREE;
- 
-   stmt_vec_info def_stmt_info = dat->loop_vinfo->lookup_def (*tp);
-   if (!def_stmt_info)
-     return NULL_TREE;
-   def_stmt_info = vect_stmt_to_vectorize (def_stmt_info);
-   if (PURE_SLP_STMT (def_stmt_info))
-     {
-       if (dump_enabled_p ())
- 	dump_printf_loc (MSG_NOTE, vect_location, "marking hybrid: %G",
- 			 def_stmt_info->stmt);
-       STMT_SLP_TYPE (def_stmt_info) = hybrid;
-       dat->worklist->safe_push (def_stmt_info);
-     }
- 
-   return NULL_TREE;
- }
- 
- /* Look if STMT_INFO is consumed by SLP indirectly and mark it pure_slp
-    if so, otherwise pushing it to WORKLIST.  */
- 
- static void
- maybe_push_to_hybrid_worklist (vec_info *vinfo,
- 			       vec<stmt_vec_info> &worklist,
- 			       stmt_vec_info stmt_info)
- {
-   if (dump_enabled_p ())
-     dump_printf_loc (MSG_NOTE, vect_location,
- 		     "Processing hybrid candidate : %G", stmt_info->stmt);
-   stmt_vec_info orig_info = vect_orig_stmt (stmt_info);
-   imm_use_iterator iter2;
-   ssa_op_iter iter1;
-   use_operand_p use_p;
-   def_operand_p def_p;
-   bool any_def = false;
-   FOR_EACH_PHI_OR_STMT_DEF (def_p, orig_info->stmt, iter1, SSA_OP_DEF)
-     {
-       any_def = true;
-       FOR_EACH_IMM_USE_FAST (use_p, iter2, DEF_FROM_PTR (def_p))
- 	{
- 	  if (is_gimple_debug (USE_STMT (use_p)))
- 	    continue;
- 	  stmt_vec_info use_info = vinfo->lookup_stmt (USE_STMT (use_p));
- 	  /* An out-of loop use means this is a loop_vect sink.  */
- 	  if (!use_info)
- 	    {
- 	      if (dump_enabled_p ())
- 		dump_printf_loc (MSG_NOTE, vect_location,
- 				 "Found loop_vect sink: %G", stmt_info->stmt);
- 	      worklist.safe_push (stmt_info);
- 	      return;
- 	    }
- 	  else if (!STMT_SLP_TYPE (vect_stmt_to_vectorize (use_info)))
- 	    {
- 	      if (dump_enabled_p ())
- 		dump_printf_loc (MSG_NOTE, vect_location,
- 				 "Found loop_vect use: %G", use_info->stmt);
- 	      worklist.safe_push (stmt_info);
- 	      return;
- 	    }
- 	}
-     }
-   /* No def means this is a loop_vect sink.  Gimple conditionals also don't have a
-      def but shouldn't be considered sinks.  */
-   if (!any_def && STMT_VINFO_DEF_TYPE (stmt_info) != vect_condition_def)
-     {
-       if (dump_enabled_p ())
- 	dump_printf_loc (MSG_NOTE, vect_location,
- 			 "Found loop_vect sink: %G", stmt_info->stmt);
-       worklist.safe_push (stmt_info);
-       return;
-     }
-   if (dump_enabled_p ())
-     dump_printf_loc (MSG_NOTE, vect_location,
- 		     "Marked SLP consumed stmt pure: %G", stmt_info->stmt);
-   STMT_SLP_TYPE (stmt_info) = pure_slp;
- }
- 
- /* Find stmts that must be both vectorized and SLPed.  */
- 
- bool
- vect_detect_hybrid_slp (loop_vec_info loop_vinfo)
- {
-   DUMP_VECT_SCOPE ("vect_detect_hybrid_slp");
- 
-   /* All stmts participating in SLP are marked pure_slp, all other
-      stmts are loop_vect.
-      First collect all loop_vect stmts into a worklist.
-      SLP patterns cause not all original scalar stmts to appear in
-      SLP_TREE_SCALAR_STMTS and thus not all of them are marked pure_slp.
-      Rectify this here and do a backward walk over the IL only considering
-      stmts as loop_vect when they are used by a loop_vect stmt and otherwise
-      mark them as pure_slp.  */
-   auto_vec<stmt_vec_info> worklist;
-   for (int i = LOOP_VINFO_LOOP (loop_vinfo)->num_nodes - 1; i >= 0; --i)
-     {
-       basic_block bb = LOOP_VINFO_BBS (loop_vinfo)[i];
-       for (gphi_iterator gsi = gsi_start_phis (bb); !gsi_end_p (gsi);
- 	   gsi_next (&gsi))
- 	{
- 	  gphi *phi = gsi.phi ();
- 	  stmt_vec_info stmt_info = loop_vinfo->lookup_stmt (phi);
- 	  if (!STMT_SLP_TYPE (stmt_info) && STMT_VINFO_RELEVANT (stmt_info))
- 	    maybe_push_to_hybrid_worklist (loop_vinfo,
- 					   worklist, stmt_info);
- 	}
-       for (gimple_stmt_iterator gsi = gsi_last_bb (bb); !gsi_end_p (gsi);
- 	   gsi_prev (&gsi))
- 	{
- 	  gimple *stmt = gsi_stmt (gsi);
- 	  if (is_gimple_debug (stmt))
- 	    continue;
- 	  stmt_vec_info stmt_info = loop_vinfo->lookup_stmt (stmt);
- 	  if (STMT_VINFO_IN_PATTERN_P (stmt_info))
- 	    {
- 	      for (gimple_stmt_iterator gsi2
- 		     = gsi_start (STMT_VINFO_PATTERN_DEF_SEQ (stmt_info));
- 		   !gsi_end_p (gsi2); gsi_next (&gsi2))
- 		{
- 		  stmt_vec_info patt_info
- 		    = loop_vinfo->lookup_stmt (gsi_stmt (gsi2));
- 		  if (!STMT_SLP_TYPE (patt_info)
- 		      && STMT_VINFO_RELEVANT (patt_info))
- 		    maybe_push_to_hybrid_worklist (loop_vinfo,
- 						   worklist, patt_info);
- 		}
- 	      stmt_info = STMT_VINFO_RELATED_STMT (stmt_info);
- 	    }
- 	  if (!STMT_SLP_TYPE (stmt_info) && STMT_VINFO_RELEVANT (stmt_info))
- 	    maybe_push_to_hybrid_worklist (loop_vinfo,
- 					   worklist, stmt_info);
- 	}
-     }
- 
-   /* Now we have a worklist of non-SLP stmts, follow use->def chains and
-      mark any SLP vectorized stmt as hybrid.
-      ???  We're visiting def stmts N times (once for each non-SLP and
-      once for each hybrid-SLP use).  */
-   walk_stmt_info wi;
-   vdhs_data dat;
-   dat.worklist = &worklist;
-   dat.loop_vinfo = loop_vinfo;
-   memset (&wi, 0, sizeof (wi));
-   wi.info = (void *)&dat;
-   while (!worklist.is_empty ())
-     {
-       stmt_vec_info stmt_info = worklist.pop ();
-       /* Since SSA operands are not set up for pattern stmts we need
- 	 to use walk_gimple_op.  */
-       wi.is_lhs = 0;
-       walk_gimple_op (stmt_info->stmt, vect_detect_hybrid_slp, &wi);
-       /* For gather/scatter make sure to walk the offset operand, that
- 	 can be a scaling and conversion away.  */
-       gather_scatter_info gs_info;
-       if (STMT_VINFO_GATHER_SCATTER_P (stmt_info)
- 	  && vect_check_gather_scatter (stmt_info, loop_vinfo, &gs_info))
- 	{
- 	  int dummy;
- 	  vect_detect_hybrid_slp (&gs_info.offset, &dummy, &wi);
- 	}
-     }
- 
-   /* Determine if all the stmts in the loop can be SLPed.  */
-   for (unsigned i = 0; i < LOOP_VINFO_LOOP (loop_vinfo)->num_nodes; i++)
-     {
-       basic_block bb = LOOP_VINFO_BBS (loop_vinfo)[i];
-       for (gphi_iterator si = gsi_start_phis (bb); !gsi_end_p (si);
- 	   gsi_next (&si))
- 	{
- 	  stmt_vec_info stmt_info = loop_vinfo->lookup_stmt (si.phi ());
- 	  if (!stmt_info)
- 	    continue;
- 	  if ((STMT_VINFO_RELEVANT_P (stmt_info)
- 	       || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_info)))
- 	      && !PURE_SLP_STMT (stmt_info))
- 	    {
- 	      /* STMT needs both SLP and loop-based vectorization.  */
- 	      if (dump_enabled_p ())
- 		dump_printf_loc (MSG_NOTE, vect_location,
- 				 "Loop contains SLP and non-SLP stmts\n");
- 	      return false;
- 	    }
- 	}
-       for (gimple_stmt_iterator si = gsi_start_bb (bb); !gsi_end_p (si);
- 	   gsi_next (&si))
- 	{
- 	  if (is_gimple_debug (gsi_stmt (si)))
- 	    continue;
- 	  stmt_vec_info stmt_info = loop_vinfo->lookup_stmt (gsi_stmt (si));
- 	  stmt_info = vect_stmt_to_vectorize (stmt_info);
- 	  if ((STMT_VINFO_RELEVANT_P (stmt_info)
- 	       || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_info)))
- 	      && !PURE_SLP_STMT (stmt_info))
- 	    {
- 	      /* STMT needs both SLP and loop-based vectorization.  */
- 	      if (dump_enabled_p ())
- 		dump_printf_loc (MSG_NOTE, vect_location,
- 				 "Loop contains SLP and non-SLP stmts\n");
- 	      return false;
- 	    }
- 	}
-     }
- 
-   if (dump_enabled_p ())
-     dump_printf_loc (MSG_NOTE, vect_location,
- 		     "Loop contains only SLP stmts\n");
-   return true;
- }
- 
- 
  /* Initialize a bb_vec_info struct for the statements in BBS basic blocks.  */
  
  _bb_vec_info::_bb_vec_info (vec<basic_block> _bbs, vec_info_shared *shared)
--- 7688,7693 ----
*************** vect_slp_analyze_node_operations_1 (vec_
*** 7937,7943 ****
       elements in a vector.  For single-defuse-cycle, lane-reducing op, and
       PHI statement that starts reduction comprised of only lane-reducing ops,
       the number is more than effective vector statements actually required.  */
!   SLP_TREE_NUMBER_OF_VEC_STMTS (node) = vect_get_num_copies (vinfo, node);
  
    /* Handle purely internal nodes.  */
    if (SLP_TREE_CODE (node) == VEC_PERM_EXPR)
--- 7771,7780 ----
       elements in a vector.  For single-defuse-cycle, lane-reducing op, and
       PHI statement that starts reduction comprised of only lane-reducing ops,
       the number is more than effective vector statements actually required.  */
!   if (SLP_TREE_VECTYPE (node))
!     SLP_TREE_NUMBER_OF_VEC_STMTS (node) = vect_get_num_copies (vinfo, node);
!   else
!     SLP_TREE_NUMBER_OF_VEC_STMTS (node) = 0;
  
    /* Handle purely internal nodes.  */
    if (SLP_TREE_CODE (node) == VEC_PERM_EXPR)
*************** vect_schedule_slp_node (vec_info *vinfo,
*** 11294,11301 ****
  
    stmt_vec_info stmt_info = SLP_TREE_REPRESENTATIVE (node);
  
!   gcc_assert (SLP_TREE_NUMBER_OF_VEC_STMTS (node) != 0);
!   SLP_TREE_VEC_DEFS (node).create (SLP_TREE_NUMBER_OF_VEC_STMTS (node));
  
    if (SLP_TREE_CODE (node) != VEC_PERM_EXPR
        && STMT_VINFO_DATA_REF (stmt_info))
--- 11131,11140 ----
  
    stmt_vec_info stmt_info = SLP_TREE_REPRESENTATIVE (node);
  
!   gcc_assert (!SLP_TREE_VECTYPE (node)
! 	      || SLP_TREE_NUMBER_OF_VEC_STMTS (node) != 0);
!   if (SLP_TREE_NUMBER_OF_VEC_STMTS (node) != 0)
!     SLP_TREE_VEC_DEFS (node).create (SLP_TREE_NUMBER_OF_VEC_STMTS (node));
  
    if (SLP_TREE_CODE (node) != VEC_PERM_EXPR
        && STMT_VINFO_DATA_REF (stmt_info))
*************** vect_remove_slp_scalar_calls (vec_info *
*** 11540,11547 ****
      {
        if (!stmt_info)
  	continue;
-       if (!PURE_SLP_STMT (stmt_info))
- 	continue;
        stmt_info = vect_orig_stmt (stmt_info);
        gcall *stmt = dyn_cast <gcall *> (stmt_info->stmt);
        if (!stmt || gimple_bb (stmt) == NULL)
--- 11379,11384 ----
diff -Nrcpad gcc-16-20250803/gcc/tree-vect-stmts.cc gcc-16-20250810/gcc/tree-vect-stmts.cc
*** gcc-16-20250803/gcc/tree-vect-stmts.cc	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/tree-vect-stmts.cc	Sun Aug 10 22:32:56 2025
*************** vect_stmt_relevant_p (stmt_vec_info stmt
*** 386,391 ****
--- 386,394 ----
  	  dump_printf_loc (MSG_NOTE, vect_location,
                             "vec_stmt_relevant_p: stmt has vdefs.\n");
  	*relevant = vect_used_in_scope;
+ 	if (! STMT_VINFO_DATA_REF (stmt_info)
+ 	    && zero_ssa_operands (stmt_info->stmt, SSA_OP_DEF))
+ 	  LOOP_VINFO_ALTERNATE_DEFS (loop_vinfo).safe_push (stmt_info);
        }
  
    /* uses outside the loop.  */
*************** vect_mark_stmts_to_be_vectorized (loop_v
*** 721,734 ****
  	  if (vect_stmt_relevant_p (phi_info, loop_vinfo, &relevant, &live_p))
  	    vect_mark_relevant (&worklist, phi_info, relevant, live_p);
  	}
!       for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si))
  	{
! 	  if (is_gimple_debug (gsi_stmt (si)))
  	    continue;
! 	  stmt_vec_info stmt_info = loop_vinfo->lookup_stmt (gsi_stmt (si));
  	  if (dump_enabled_p ())
  	      dump_printf_loc (MSG_NOTE, vect_location,
! 			       "init: stmt relevant? %G", stmt_info->stmt);
  
  	  if (vect_stmt_relevant_p (stmt_info, loop_vinfo, &relevant, &live_p))
  	    vect_mark_relevant (&worklist, stmt_info, relevant, live_p);
--- 724,744 ----
  	  if (vect_stmt_relevant_p (phi_info, loop_vinfo, &relevant, &live_p))
  	    vect_mark_relevant (&worklist, phi_info, relevant, live_p);
  	}
!       for (si = gsi_after_labels (bb); !gsi_end_p (si); gsi_next (&si))
  	{
! 	  gimple *stmt = gsi_stmt (si);
! 	  if (is_gimple_debug (stmt))
  	    continue;
! 	  stmt_vec_info stmt_info = loop_vinfo->lookup_stmt (stmt);
  	  if (dump_enabled_p ())
  	      dump_printf_loc (MSG_NOTE, vect_location,
! 			       "init: stmt relevant? %G", stmt);
! 
! 	  if (gimple_get_lhs (stmt) == NULL_TREE
! 	      && !is_a <gcond *> (stmt)
! 	      && !is_a <gcall *> (stmt))
! 	    return opt_result::failure_at
! 		(stmt, "not vectorized: irregular stmt: %G", stmt);
  
  	  if (vect_stmt_relevant_p (stmt_info, loop_vinfo, &relevant, &live_p))
  	    vect_mark_relevant (&worklist, stmt_info, relevant, live_p);
*************** vect_model_simple_cost (vec_info *, int
*** 926,933 ****
     is true the stmt is doing widening arithmetic.  */
  
  static void
! vect_model_promotion_demotion_cost (stmt_vec_info stmt_info,
! 				    enum vect_def_type *dt,
  				    unsigned int ncopies, int pwr,
  				    stmt_vector_for_cost *cost_vec,
  				    bool widen_arith)
--- 936,942 ----
     is true the stmt is doing widening arithmetic.  */
  
  static void
! vect_model_promotion_demotion_cost (slp_tree slp_node,
  				    unsigned int ncopies, int pwr,
  				    stmt_vector_for_cost *cost_vec,
  				    bool widen_arith)
*************** vect_model_promotion_demotion_cost (stmt
*** 940,955 ****
        inside_cost += record_stmt_cost (cost_vec, ncopies,
  				       widen_arith
  				       ? vector_stmt : vec_promote_demote,
! 				       stmt_info, 0, vect_body);
        ncopies *= 2;
      }
  
-   /* FORNOW: Assuming maximum 2 args per stmts.  */
-   for (i = 0; i < 2; i++)
-     if (dt[i] == vect_constant_def || dt[i] == vect_external_def)
-       prologue_cost += record_stmt_cost (cost_vec, 1, vector_stmt,
- 					 stmt_info, 0, vect_prologue);
- 
    if (dump_enabled_p ())
      dump_printf_loc (MSG_NOTE, vect_location,
                       "vect_model_promotion_demotion_cost: inside_cost = %d, "
--- 949,958 ----
        inside_cost += record_stmt_cost (cost_vec, ncopies,
  				       widen_arith
  				       ? vector_stmt : vec_promote_demote,
! 				       slp_node, 0, vect_body);
        ncopies *= 2;
      }
  
    if (dump_enabled_p ())
      dump_printf_loc (MSG_NOTE, vect_location,
                       "vect_model_promotion_demotion_cost: inside_cost = %d, "
*************** check_load_store_for_partial_vectors (lo
*** 1494,1500 ****
  						       gs_info->memory_type,
  						       gs_info->offset_vectype,
  						       gs_info->scale,
! 						       elsvals))
  	vect_record_loop_mask (loop_vinfo, masks, nvectors, vectype,
  			       scalar_mask);
        else
--- 1497,1504 ----
  						       gs_info->memory_type,
  						       gs_info->offset_vectype,
  						       gs_info->scale,
! 						       elsvals)
! 	       || gs_info->decl != NULL_TREE)
  	vect_record_loop_mask (loop_vinfo, masks, nvectors, vectype,
  			       scalar_mask);
        else
*************** get_load_store_type (vec_info  *vinfo, s
*** 2015,2045 ****
    else if (STMT_VINFO_GATHER_SCATTER_P (stmt_info))
      {
        *memory_access_type = VMAT_GATHER_SCATTER;
-       if (!vect_check_gather_scatter (stmt_info, loop_vinfo, gs_info,
- 				      elsvals))
- 	gcc_unreachable ();
        slp_tree offset_node = SLP_TREE_CHILDREN (slp_node)[0];
        tree offset_vectype = SLP_TREE_VECTYPE (offset_node);
        gs_info->offset_vectype = offset_vectype;
!       /* When using internal functions, we rely on pattern recognition
! 	 to convert the type of the offset to the type that the target
! 	 requires, with the result being a call to an internal function.
! 	 If that failed for some reason (e.g. because another pattern
! 	 took priority), just handle cases in which the offset already
! 	 has the right type.  */
!       if (GATHER_SCATTER_IFN_P (*gs_info)
! 	  && !is_gimple_call (stmt_info->stmt)
! 	  && !tree_nop_conversion_p (TREE_TYPE (gs_info->offset),
! 				     TREE_TYPE (offset_vectype)))
! 	{
! 	  if (dump_enabled_p ())
! 	    dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
! 			     "%s offset requires a conversion\n",
! 			     vls_type == VLS_LOAD ? "gather" : "scatter");
! 	  return false;
! 	}
!       else if (GATHER_SCATTER_EMULATED_P (*gs_info))
  	{
  	  if (!TYPE_VECTOR_SUBPARTS (vectype).is_constant ()
  	      || !TYPE_VECTOR_SUBPARTS (offset_vectype).is_constant ()
  	      || VECTOR_BOOLEAN_TYPE_P (offset_vectype)
--- 2019,2058 ----
    else if (STMT_VINFO_GATHER_SCATTER_P (stmt_info))
      {
        *memory_access_type = VMAT_GATHER_SCATTER;
        slp_tree offset_node = SLP_TREE_CHILDREN (slp_node)[0];
        tree offset_vectype = SLP_TREE_VECTYPE (offset_node);
+       memset (gs_info, 0, sizeof (gather_scatter_info));
        gs_info->offset_vectype = offset_vectype;
!       gs_info->scale = SLP_TREE_GS_SCALE (slp_node);
!       gs_info->base = SLP_TREE_GS_BASE (slp_node);
!       gs_info->memory_type = TREE_TYPE (DR_REF (first_dr_info->dr));
!       gs_info->decl = NULL_TREE;
!       gs_info->ifn = IFN_LAST;
!       tree tem;
!       if (vect_gather_scatter_fn_p (loop_vinfo, vls_type == VLS_LOAD,
! 				    masked_p, vectype,
! 				    gs_info->memory_type,
! 				    offset_vectype, gs_info->scale,
! 				    &gs_info->ifn, &tem,
! 				    elsvals))
! 	/* GATHER_SCATTER_IFN_P.  */;
!       else if (vls_type == VLS_LOAD
! 	       ? (targetm.vectorize.builtin_gather
! 		  && (gs_info->decl
! 			= targetm.vectorize.builtin_gather (vectype,
! 							    TREE_TYPE
! 							      (offset_vectype),
! 							    gs_info->scale)))
! 	       : (targetm.vectorize.builtin_scatter
! 		  && (gs_info->decl
! 			= targetm.vectorize.builtin_scatter (vectype,
! 							     TREE_TYPE
! 							       (offset_vectype),
! 							     gs_info->scale))))
! 	/* GATHER_SCATTER_LEGACY_P.  */;
!       else
  	{
+ 	  /* GATHER_SCATTER_EMULATED_P.  */
  	  if (!TYPE_VECTOR_SUBPARTS (vectype).is_constant ()
  	      || !TYPE_VECTOR_SUBPARTS (offset_vectype).is_constant ()
  	      || VECTOR_BOOLEAN_TYPE_P (offset_vectype)
*************** get_load_store_type (vec_info  *vinfo, s
*** 2387,2456 ****
        /* We can only peel for loops, of course.  */
        gcc_checking_assert (loop_vinfo);
  
        auto target_alignment
  	= DR_TARGET_ALIGNMENT (STMT_VINFO_DR_INFO (stmt_info));
!       unsigned HOST_WIDE_INT target_align;
! 
!       bool group_aligned = false;
!       if (target_alignment.is_constant (&target_align)
! 	  && nunits.is_constant ())
  	{
! 	  poly_uint64 vf = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
! 	  auto vectype_size
! 	    = TREE_INT_CST_LOW (TYPE_SIZE_UNIT (TREE_TYPE (vectype)));
! 	  poly_uint64 required_alignment = vf * vectype_size;
! 	  /* If we have a grouped access we require that the alignment be N * elem.  */
! 	  if (STMT_VINFO_GROUPED_ACCESS (stmt_info))
! 	    required_alignment *=
! 		DR_GROUP_SIZE (DR_GROUP_FIRST_ELEMENT (stmt_info));
! 	  if (!multiple_p (target_alignment, required_alignment))
! 	    {
! 	      if (dump_enabled_p ())
! 		dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
! 			     "desired alignment %wu not met. Instead got %wu "
! 			     "for DR alignment at %G",
! 			     required_alignment.to_constant (),
! 			     target_align, STMT_VINFO_STMT (stmt_info));
! 	      return false;
! 	    }
! 
! 	  if (!pow2p_hwi (target_align))
! 	    {
! 	      if (dump_enabled_p ())
! 		dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
! 			     "non-power-of-two vector alignment %wd "
! 			     "for DR alignment at %G",
! 			     target_align, STMT_VINFO_STMT (stmt_info));
! 	      return false;
! 	    }
! 
! 	  /* For VLA we have to insert a runtime check that the vector loads
! 	     per iterations don't exceed a page size.  For now we can use
! 	     POLY_VALUE_MAX as a proxy as we can't peel for VLA.  */
! 	  if (known_gt (required_alignment, (unsigned)param_min_pagesize))
  	    {
! 	      if (dump_enabled_p ())
! 		{
! 		  dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
! 			       "alignment required for correctness (");
! 		  dump_dec (MSG_MISSED_OPTIMIZATION, required_alignment);
! 		  dump_printf (MSG_NOTE, ") may exceed page size\n");
! 		}
! 	      return false;
  	    }
! 
! 	  group_aligned = true;
! 	}
! 
!       /* There are multiple loads that have a misalignment that we couldn't
! 	 align.  We would need LOOP_VINFO_MUST_USE_PARTIAL_VECTORS_P to
! 	 vectorize. */
!       if (!group_aligned)
! 	{
! 	  if (inbounds)
! 	    LOOP_VINFO_MUST_USE_PARTIAL_VECTORS_P (loop_vinfo) = true;
! 	  else
! 	    return false;
  	}
  
        /* When using a group access the first element may be aligned but the
--- 2400,2425 ----
        /* We can only peel for loops, of course.  */
        gcc_checking_assert (loop_vinfo);
  
+       poly_uint64 vf = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
+       poly_uint64 read_amount
+ 	= vf * TREE_INT_CST_LOW (TYPE_SIZE_UNIT (TREE_TYPE (vectype)));
+       if (STMT_VINFO_GROUPED_ACCESS (stmt_info))
+ 	read_amount *= DR_GROUP_SIZE (DR_GROUP_FIRST_ELEMENT (stmt_info));
+ 
        auto target_alignment
  	= DR_TARGET_ALIGNMENT (STMT_VINFO_DR_INFO (stmt_info));
!       if (!multiple_p (target_alignment, read_amount))
  	{
! 	  if (dump_enabled_p ())
  	    {
! 	      dump_printf_loc (MSG_NOTE, vect_location,
! 			       "desired alignment not met, target was ");
! 	      dump_dec (MSG_NOTE, target_alignment);
! 	      dump_printf (MSG_NOTE, " previously, but read amount is ");
! 	      dump_dec (MSG_NOTE, read_amount);
! 	      dump_printf (MSG_NOTE, " at %G.\n", STMT_VINFO_STMT (stmt_info));
  	    }
! 	  return false;
  	}
  
        /* When using a group access the first element may be aligned but the
*************** get_load_store_type (vec_info  *vinfo, s
*** 2472,2477 ****
--- 2441,2473 ----
  			     STMT_VINFO_STMT (stmt_info));
  	  return false;
  	}
+ 
+       /* Reject vectorization if we know the read mount per vector iteration
+ 	 exceeds the min page size.  */
+       if (known_gt (read_amount, (unsigned) param_min_pagesize))
+ 	{
+ 	  if (dump_enabled_p ())
+ 	    {
+ 	      dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+ 			       "alignment required for correctness (");
+ 	      dump_dec (MSG_MISSED_OPTIMIZATION, read_amount);
+ 	      dump_printf (MSG_NOTE, ") may exceed page size.\n");
+ 	    }
+ 	  return false;
+ 	}
+ 
+       if (!vf.is_constant ())
+ 	{
+ 	  /* For VLA modes, we need a runtime check to ensure any speculative
+ 	     read amount does not exceed the page size.  Here we record the max
+ 	     possible read amount for the check.  */
+ 	  if (maybe_gt (read_amount,
+ 			LOOP_VINFO_MAX_SPEC_READ_AMOUNT (loop_vinfo)))
+ 	    LOOP_VINFO_MAX_SPEC_READ_AMOUNT (loop_vinfo) = read_amount;
+ 
+ 	  /* For VLA modes, we must use partial vectors.  */
+ 	  LOOP_VINFO_MUST_USE_PARTIAL_VECTORS_P (loop_vinfo) = true;
+ 	}
      }
  
    if (*alignment_support_scheme == dr_unaligned_unsupported)
*************** vectorizable_simd_clone_call (vec_info *
*** 4752,4758 ****
  	    }
  	}
  
!       SLP_TREE_VEC_DEFS (slp_node).quick_push (gimple_get_lhs (new_stmt));
      }
  
    for (i = 0; i < nargs; ++i)
--- 4748,4755 ----
  	    }
  	}
  
!       if (gimple_get_lhs (new_stmt))
! 	SLP_TREE_VEC_DEFS (slp_node).quick_push (gimple_get_lhs (new_stmt));
      }
  
    for (i = 0; i < nargs; ++i)
*************** vectorizable_conversion (vec_info *vinfo
*** 5389,5395 ****
  	  SLP_TREE_TYPE (slp_node) = type_demotion_vec_info_type;
  	  /* The final packing step produces one vector result per copy.  */
  	  unsigned int nvectors = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node);
! 	  vect_model_promotion_demotion_cost (stmt_info, dt, nvectors,
  					      multi_step_cvt, cost_vec,
  					      widen_arith);
  	}
--- 5386,5392 ----
  	  SLP_TREE_TYPE (slp_node) = type_demotion_vec_info_type;
  	  /* The final packing step produces one vector result per copy.  */
  	  unsigned int nvectors = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node);
! 	  vect_model_promotion_demotion_cost (slp_node, nvectors,
  					      multi_step_cvt, cost_vec,
  					      widen_arith);
  	}
*************** vectorizable_conversion (vec_info *vinfo
*** 5401,5407 ****
  	     so >> MULTI_STEP_CVT divides by 2^(number of steps - 1).  */
  	  unsigned int nvectors
  	    = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node) >> multi_step_cvt;
! 	  vect_model_promotion_demotion_cost (stmt_info, dt, nvectors,
  					      multi_step_cvt, cost_vec,
  					      widen_arith);
  	}
--- 5398,5404 ----
  	     so >> MULTI_STEP_CVT divides by 2^(number of steps - 1).  */
  	  unsigned int nvectors
  	    = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node) >> multi_step_cvt;
! 	  vect_model_promotion_demotion_cost (slp_node, nvectors,
  					      multi_step_cvt, cost_vec,
  					      widen_arith);
  	}
*************** vectorizable_store (vec_info *vinfo,
*** 7780,7790 ****
  	return false;
      }
  
!   /* Cannot have hybrid store SLP -- that would mean storing to the
!      same location twice.  */
!   gcc_assert (PURE_SLP_STMT (stmt_info));
! 
!   tree vectype = SLP_TREE_VECTYPE (stmt_info), rhs_vectype = NULL_TREE;
    poly_uint64 nunits = TYPE_VECTOR_SUBPARTS (vectype);
  
    if (loop_vinfo)
--- 7777,7783 ----
  	return false;
      }
  
!   tree vectype = SLP_TREE_VECTYPE (slp_node), rhs_vectype = NULL_TREE;
    poly_uint64 nunits = TYPE_VECTOR_SUBPARTS (vectype);
  
    if (loop_vinfo)
*************** vectorizable_store (vec_info *vinfo,
*** 8529,8535 ****
  	      gcc_assert (useless_type_conversion_p (vectype,
  						     TREE_TYPE (vec_oprnd)));
  	    }
- 	  unsigned HOST_WIDE_INT align;
  	  tree final_mask = NULL_TREE;
  	  tree final_len = NULL_TREE;
  	  tree bias = NULL_TREE;
--- 8522,8527 ----
*************** vectorizable_store (vec_info *vinfo,
*** 8544,8549 ****
--- 8536,8543 ----
  					       final_mask, vec_mask, gsi);
  	    }
  
+ 	  unsigned align = get_object_alignment (DR_REF (first_dr_info->dr));
+ 	  tree alias_align_ptr = build_int_cst (ref_type, align);
  	  if (GATHER_SCATTER_IFN_P (gs_info))
  	    {
  	      if (costing_p)
*************** vectorizable_store (vec_info *vinfo,
*** 8585,8591 ****
  		  if (VECTOR_TYPE_P (TREE_TYPE (vec_offset)))
  		    call = gimple_build_call_internal (
  			    IFN_MASK_LEN_SCATTER_STORE, 8, dataref_ptr,
! 			    gs_info.alias_ptr,
  			    vec_offset, scale, vec_oprnd, final_mask, final_len,
  			    bias);
  		  else
--- 8579,8585 ----
  		  if (VECTOR_TYPE_P (TREE_TYPE (vec_offset)))
  		    call = gimple_build_call_internal (
  			    IFN_MASK_LEN_SCATTER_STORE, 8, dataref_ptr,
! 			    alias_align_ptr,
  			    vec_offset, scale, vec_oprnd, final_mask, final_len,
  			    bias);
  		  else
*************** vectorizable_store (vec_info *vinfo,
*** 8602,8613 ****
  	      else if (final_mask)
  		call = gimple_build_call_internal
  			     (IFN_MASK_SCATTER_STORE, 6, dataref_ptr,
! 			      gs_info.alias_ptr,
  			      vec_offset, scale, vec_oprnd, final_mask);
  	      else
  		call = gimple_build_call_internal (IFN_SCATTER_STORE, 5,
  						   dataref_ptr,
! 						   gs_info.alias_ptr,
  						   vec_offset,
  						   scale, vec_oprnd);
  	      gimple_call_set_nothrow (call, true);
--- 8596,8607 ----
  	      else if (final_mask)
  		call = gimple_build_call_internal
  			     (IFN_MASK_SCATTER_STORE, 6, dataref_ptr,
! 			      alias_align_ptr,
  			      vec_offset, scale, vec_oprnd, final_mask);
  	      else
  		call = gimple_build_call_internal (IFN_SCATTER_STORE, 5,
  						   dataref_ptr,
! 						   alias_align_ptr,
  						   vec_offset,
  						   scale, vec_oprnd);
  	      gimple_call_set_nothrow (call, true);
*************** vectorizable_store (vec_info *vinfo,
*** 8763,8769 ****
  		= (j % factor) * const_nunits;
  	      tree idx_type = TREE_TYPE (TREE_TYPE (vec_offset));
  	      tree scale = size_int (gs_info.scale);
- 	      align = get_object_alignment (DR_REF (first_dr_info->dr));
  	      tree ltype = build_aligned_type (TREE_TYPE (vectype), align);
  	      for (unsigned k = 0; k < const_nunits; ++k)
  		{
--- 8757,8762 ----
*************** vectorizable_load (vec_info *vinfo,
*** 10392,10398 ****
  	    }
  
  	  /* 2. Create the vector-load in the loop.  */
! 	  unsigned HOST_WIDE_INT align;
  	  if (GATHER_SCATTER_IFN_P (gs_info))
  	    {
  	      if (costing_p)
--- 10385,10392 ----
  	    }
  
  	  /* 2. Create the vector-load in the loop.  */
! 	  unsigned align = get_object_alignment (DR_REF (first_dr_info->dr));
! 	  tree alias_align_ptr = build_int_cst (ref_type, align);
  	  if (GATHER_SCATTER_IFN_P (gs_info))
  	    {
  	      if (costing_p)
*************** vectorizable_load (vec_info *vinfo,
*** 10440,10446 ****
  		  if (VECTOR_TYPE_P (TREE_TYPE (vec_offset)))
  		    call = gimple_build_call_internal (IFN_MASK_LEN_GATHER_LOAD,
  						       9, dataref_ptr,
! 						       gs_info.alias_ptr,
  						       vec_offset, scale, zero,
  						       final_mask, vec_els,
  						       final_len, bias);
--- 10434,10440 ----
  		  if (VECTOR_TYPE_P (TREE_TYPE (vec_offset)))
  		    call = gimple_build_call_internal (IFN_MASK_LEN_GATHER_LOAD,
  						       9, dataref_ptr,
! 						       alias_align_ptr,
  						       vec_offset, scale, zero,
  						       final_mask, vec_els,
  						       final_len, bias);
*************** vectorizable_load (vec_info *vinfo,
*** 10456,10468 ****
  	      else if (final_mask)
  		call = gimple_build_call_internal (IFN_MASK_GATHER_LOAD,
  						   7, dataref_ptr,
! 						   gs_info.alias_ptr,
  						   vec_offset, scale,
  						   zero, final_mask, vec_els);
  	      else
  		call = gimple_build_call_internal (IFN_GATHER_LOAD, 5,
  						   dataref_ptr,
! 						   gs_info.alias_ptr,
  						   vec_offset, scale, zero);
  	      gimple_call_set_nothrow (call, true);
  	      new_stmt = call;
--- 10450,10462 ----
  	      else if (final_mask)
  		call = gimple_build_call_internal (IFN_MASK_GATHER_LOAD,
  						   7, dataref_ptr,
! 						   alias_align_ptr,
  						   vec_offset, scale,
  						   zero, final_mask, vec_els);
  	      else
  		call = gimple_build_call_internal (IFN_GATHER_LOAD, 5,
  						   dataref_ptr,
! 						   alias_align_ptr,
  						   vec_offset, scale, zero);
  	      gimple_call_set_nothrow (call, true);
  	      new_stmt = call;
*************** vectorizable_load (vec_info *vinfo,
*** 10620,10626 ****
  	      unsigned elt_offset = (i % factor) * const_nunits;
  	      tree idx_type = TREE_TYPE (TREE_TYPE (vec_offset));
  	      tree scale = size_int (gs_info.scale);
- 	      align = get_object_alignment (DR_REF (first_dr_info->dr));
  	      tree ltype = build_aligned_type (TREE_TYPE (vectype), align);
  	      for (unsigned k = 0; k < const_nunits; ++k)
  		{
--- 10614,10619 ----
diff -Nrcpad gcc-16-20250803/gcc/tree-vectorizer.cc gcc-16-20250810/gcc/tree-vectorizer.cc
*** gcc-16-20250803/gcc/tree-vectorizer.cc	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/tree-vectorizer.cc	Sun Aug 10 22:32:56 2025
*************** vec_info::new_stmt_vec_info (gimple *stm
*** 733,739 ****
    else
      STMT_VINFO_DEF_TYPE (res) = vect_internal_def;
  
!   STMT_SLP_TYPE (res) = loop_vect;
  
    /* This is really "uninitialized" until vect_compute_data_ref_alignment.  */
    res->dr_aux.misalignment = DR_MISALIGNMENT_UNINITIALIZED;
--- 733,739 ----
    else
      STMT_VINFO_DEF_TYPE (res) = vect_internal_def;
  
!   STMT_SLP_TYPE (res) = not_vect;
  
    /* This is really "uninitialized" until vect_compute_data_ref_alignment.  */
    res->dr_aux.misalignment = DR_MISALIGNMENT_UNINITIALIZED;
diff -Nrcpad gcc-16-20250803/gcc/tree-vectorizer.h gcc-16-20250810/gcc/tree-vectorizer.h
*** gcc-16-20250803/gcc/tree-vectorizer.h	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/tree-vectorizer.h	Sun Aug 10 22:32:56 2025
*************** struct _slp_tree {
*** 306,311 ****
--- 306,316 ----
    unsigned int lanes;
    /* The operation of this node.  */
    enum tree_code code;
+   /* For gather/scatter memory operations the scale each offset element
+      should be multiplied by before being added to the base.  */
+   int gs_scale;
+   /* For gather/scatter memory operations the loop-invariant base value.  */
+   tree gs_base;
    /* Whether uses of this load or feeders of this store are suitable
       for load/store-lanes.  */
    bool ldst_lanes;
*************** public:
*** 412,417 ****
--- 417,424 ----
  #define SLP_TREE_CODE(S)			 (S)->code
  #define SLP_TREE_MEMORY_ACCESS_TYPE(S)		 (S)->memory_access_type
  #define SLP_TREE_TYPE(S)			 (S)->type
+ #define SLP_TREE_GS_SCALE(S)			 (S)->gs_scale
+ #define SLP_TREE_GS_BASE(S)			 (S)->gs_base
  
  enum vect_partial_vector_style {
      vect_partial_vectors_none,
*************** public:
*** 912,918 ****
    int peeling_for_alignment;
  
    /* The mask used to check the alignment of pointers or arrays.  */
!   int ptr_mask;
  
    /* Indicates whether the loop has any non-linear IV.  */
    bool nonlinear_iv;
--- 919,928 ----
    int peeling_for_alignment;
  
    /* The mask used to check the alignment of pointers or arrays.  */
!   poly_uint64 ptr_mask;
! 
!   /* The maximum speculative read amount in VLA modes for runtime check.  */
!   poly_uint64 max_spec_read_amount;
  
    /* Indicates whether the loop has any non-linear IV.  */
    bool nonlinear_iv;
*************** public:
*** 947,952 ****
--- 957,966 ----
       stmt in the chain.  */
    auto_vec<stmt_vec_info> reduction_chains;
  
+   /* Defs that could not be analyzed such as OMP SIMD calls without
+      a LHS.  */
+   auto_vec<stmt_vec_info> alternate_defs;
+ 
    /* Cost vector for a single scalar iteration.  */
    auto_vec<stmt_info_for_cost> scalar_cost_vec;
  
*************** public:
*** 1144,1149 ****
--- 1158,1164 ----
  #define LOOP_VINFO_RGROUP_IV_TYPE(L)       (L)->rgroup_iv_type
  #define LOOP_VINFO_PARTIAL_VECTORS_STYLE(L) (L)->partial_vector_style
  #define LOOP_VINFO_PTR_MASK(L)             (L)->ptr_mask
+ #define LOOP_VINFO_MAX_SPEC_READ_AMOUNT(L) (L)->max_spec_read_amount
  #define LOOP_VINFO_LOOP_NEST(L)            (L)->shared->loop_nest
  #define LOOP_VINFO_DATAREFS(L)             (L)->shared->datarefs
  #define LOOP_VINFO_DDRS(L)                 (L)->shared->ddrs
*************** public:
*** 1186,1191 ****
--- 1201,1207 ----
  #define LOOP_VINFO_INNER_LOOP_COST_FACTOR(L) (L)->inner_loop_cost_factor
  #define LOOP_VINFO_INV_PATTERN_DEF_SEQ(L)  (L)->inv_pattern_def_seq
  #define LOOP_VINFO_DRS_ADVANCED_BY(L)      (L)->drs_advanced_by
+ #define LOOP_VINFO_ALTERNATE_DEFS(L)       (L)->alternate_defs
  
  #define LOOP_VINFO_FULLY_MASKED_P(L)		\
    (LOOP_VINFO_USING_PARTIAL_VECTORS_P (L)	\
*************** public:
*** 1197,1202 ****
--- 1213,1220 ----
  
  #define LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT(L)	\
    ((L)->may_misalign_stmts.length () > 0)
+ #define LOOP_REQUIRES_VERSIONING_FOR_SPEC_READ(L)	\
+   (maybe_gt ((L)->max_spec_read_amount, 0U))
  #define LOOP_REQUIRES_VERSIONING_FOR_ALIAS(L)		\
    ((L)->comp_alias_ddrs.length () > 0 \
     || (L)->check_unequal_addrs.length () > 0 \
*************** public:
*** 1207,1212 ****
--- 1225,1231 ----
    (LOOP_VINFO_SIMD_IF_COND (L))
  #define LOOP_REQUIRES_VERSIONING(L)			\
    (LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT (L)		\
+    || LOOP_REQUIRES_VERSIONING_FOR_SPEC_READ (L)	\
     || LOOP_REQUIRES_VERSIONING_FOR_ALIAS (L)		\
     || LOOP_REQUIRES_VERSIONING_FOR_NITERS (L)		\
     || LOOP_REQUIRES_VERSIONING_FOR_SIMD_IF_COND (L))
*************** enum vect_relevant {
*** 1288,1313 ****
    vect_used_in_scope
  };
  
! /* The type of vectorization that can be applied to the stmt: regular loop-based
!    vectorization; pure SLP - the stmt is a part of SLP instances and does not
!    have uses outside SLP instances; or hybrid SLP and loop-based - the stmt is
!    a part of SLP instance and also must be loop-based vectorized, since it has
!    uses outside SLP sequences.
! 
!    In the loop context the meanings of pure and hybrid SLP are slightly
!    different. By saying that pure SLP is applied to the loop, we mean that we
!    exploit only intra-iteration parallelism in the loop; i.e., the loop can be
!    vectorized without doing any conceptual unrolling, cause we don't pack
!    together stmts from different iterations, only within a single iteration.
!    Loop hybrid SLP means that we exploit both intra-iteration and
!    inter-iteration parallelism (e.g., number of elements in the vector is 4
!    and the slp-group-size is 2, in which case we don't have enough parallelism
!    within an iteration, so we obtain the rest of the parallelism from subsequent
!    iterations by unrolling the loop by 2).  */
  enum slp_vect_type {
!   loop_vect = 0,
    pure_slp,
-   hybrid
  };
  
  /* Says whether a statement is a load, a store of a vectorized statement
--- 1307,1318 ----
    vect_used_in_scope
  };
  
! /* The type of vectorization.  pure_slp means the stmt is covered by the
!    SLP graph, not_vect means it is not.  This is mostly used by BB
!    vectorization.  */
  enum slp_vect_type {
!   not_vect = 0,
    pure_slp,
  };
  
  /* Says whether a statement is a load, a store of a vectorized statement
*************** struct gather_scatter_info {
*** 1655,1661 ****
  
  #define STMT_VINFO_RELEVANT_P(S)          ((S)->relevant != vect_unused_in_scope)
  
- #define HYBRID_SLP_STMT(S)                ((S)->slp_type == hybrid)
  #define PURE_SLP_STMT(S)                  ((S)->slp_type == pure_slp)
  #define STMT_SLP_TYPE(S)                   (S)->slp_type
  
--- 1660,1665 ----
*************** extern bool vect_gather_scatter_fn_p (ve
*** 2560,2565 ****
--- 2564,2571 ----
  extern bool vect_check_gather_scatter (stmt_vec_info, loop_vec_info,
  				       gather_scatter_info *,
  				       vec<int> * = nullptr);
+ extern void vect_describe_gather_scatter_call (stmt_vec_info,
+ 					       gather_scatter_info *);
  extern opt_result vect_find_stmt_data_reference (loop_p, gimple *,
  						 vec<data_reference_p> *,
  						 vec<int> *, int);
diff -Nrcpad gcc-16-20250803/gcc/tree.cc gcc-16-20250810/gcc/tree.cc
*** gcc-16-20250803/gcc/tree.cc	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/tree.cc	Sun Aug 10 22:32:56 2025
*************** unsigned const char omp_clause_num_ops[]
*** 323,331 ****
    1, /* OMP_CLAUSE_IS_DEVICE_PTR  */
    1, /* OMP_CLAUSE_INCLUSIVE  */
    1, /* OMP_CLAUSE_EXCLUSIVE  */
!   2, /* OMP_CLAUSE_FROM  */
!   2, /* OMP_CLAUSE_TO  */
!   2, /* OMP_CLAUSE_MAP  */
    1, /* OMP_CLAUSE_HAS_DEVICE_ADDR  */
    1, /* OMP_CLAUSE_DOACROSS  */
    3, /* OMP_CLAUSE__MAPPER_BINDING_  */
--- 323,331 ----
    1, /* OMP_CLAUSE_IS_DEVICE_PTR  */
    1, /* OMP_CLAUSE_INCLUSIVE  */
    1, /* OMP_CLAUSE_EXCLUSIVE  */
!   3, /* OMP_CLAUSE_FROM  */
!   3, /* OMP_CLAUSE_TO  */
!   3, /* OMP_CLAUSE_MAP (update walk_tree_1 if this is changed)  */
    1, /* OMP_CLAUSE_HAS_DEVICE_ADDR  */
    1, /* OMP_CLAUSE_DOACROSS  */
    3, /* OMP_CLAUSE__MAPPER_BINDING_  */
*************** walk_tree_1 (tree *tp, walk_tree_fn func
*** 11769,11774 ****
--- 11769,11777 ----
      case OMP_CLAUSE:
        {
  	int len = omp_clause_num_ops[OMP_CLAUSE_CODE (t)];
+ 	/* Do not walk the iterator operand of OpenMP MAP clauses.  */
+ 	if (OMP_CLAUSE_HAS_ITERATORS (t))
+ 	  len--;
  	for (int i = 0; i < len; i++)
  	  WALK_SUBTREE (OMP_CLAUSE_OPERAND (t, i));
  	WALK_SUBTREE_TAIL (OMP_CLAUSE_CHAIN (t));
diff -Nrcpad gcc-16-20250803/gcc/tree.h gcc-16-20250810/gcc/tree.h
*** gcc-16-20250803/gcc/tree.h	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/tree.h	Sun Aug 10 22:32:56 2025
*************** class auto_suppress_location_wrappers
*** 1659,1664 ****
--- 1659,1674 ----
    != UNKNOWN_LOCATION)
  #define OMP_CLAUSE_LOCATION(NODE)  (OMP_CLAUSE_CHECK (NODE))->omp_clause.locus
  
+ #define OMP_CLAUSE_HAS_ITERATORS(NODE) \
+   ((OMP_CLAUSE_CODE (NODE) == OMP_CLAUSE_FROM				\
+     || OMP_CLAUSE_CODE (NODE) == OMP_CLAUSE_TO				\
+     || OMP_CLAUSE_CODE (NODE) == OMP_CLAUSE_MAP)			\
+    && OMP_CLAUSE_ITERATORS (NODE))
+ #define OMP_CLAUSE_ITERATORS(NODE) \
+   OMP_CLAUSE_OPERAND (OMP_CLAUSE_RANGE_CHECK (OMP_CLAUSE_CHECK (NODE),	\
+ 					      OMP_CLAUSE_FROM,		\
+ 					      OMP_CLAUSE_MAP), 2)
+ 
  /* True on OMP_FOR and other OpenMP/OpenACC looping constructs if the loop nest
     is non-rectangular.  */
  #define OMP_FOR_NON_RECTANGULAR(NODE) \
diff -Nrcpad gcc-16-20250803/gcc/varasm.cc gcc-16-20250810/gcc/varasm.cc
*** gcc-16-20250803/gcc/varasm.cc	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/gcc/varasm.cc	Sun Aug 10 22:32:56 2025
*************** mergeable_string_section (tree decl ATTR
*** 871,877 ****
    if (HAVE_GAS_SHF_MERGE && flag_merge_constants
        && TREE_CODE (decl) == STRING_CST
        && TREE_CODE (TREE_TYPE (decl)) == ARRAY_TYPE
!       && align <= MAX_ALIGN_MERGABLE
        && (len = int_size_in_bytes (TREE_TYPE (decl))) > 0
        && TREE_STRING_LENGTH (decl) == len)
      {
--- 871,877 ----
    if (HAVE_GAS_SHF_MERGE && flag_merge_constants
        && TREE_CODE (decl) == STRING_CST
        && TREE_CODE (TREE_TYPE (decl)) == ARRAY_TYPE
!       && align <= MAX_MERGEABLE_BITSIZE
        && (len = int_size_in_bytes (TREE_TYPE (decl))) > 0
        && TREE_STRING_LENGTH (decl) == len)
      {
*************** mergeable_string_section (tree decl ATTR
*** 885,891 ****
  
        mode = SCALAR_INT_TYPE_MODE (TREE_TYPE (TREE_TYPE (decl)));
        modesize = GET_MODE_BITSIZE (mode);
!       if (modesize >= 8 && modesize <= MAX_ALIGN_MERGABLE
  	  && (modesize & (modesize - 1)) == 0)
  	{
  	  if (align < modesize)
--- 885,891 ----
  
        mode = SCALAR_INT_TYPE_MODE (TREE_TYPE (TREE_TYPE (decl)));
        modesize = GET_MODE_BITSIZE (mode);
!       if (modesize >= 8 && modesize <= MAX_MERGEABLE_BITSIZE
  	  && (modesize & (modesize - 1)) == 0)
  	{
  	  if (align < modesize)
*************** mergeable_string_section (tree decl ATTR
*** 906,913 ****
  	  if (i == len - unit || (unit == 1 && i == len))
  	    {
  	      sprintf (name, "%s.str%d.%d", prefix,
! 		       modesize / 8, (int) (align / 8));
! 	      flags |= (modesize / 8) | SECTION_MERGE | SECTION_STRINGS;
  	      return get_section (name, flags, NULL);
  	    }
  	}
--- 906,913 ----
  	  if (i == len - unit || (unit == 1 && i == len))
  	    {
  	      sprintf (name, "%s.str%d.%d", prefix,
! 		       modesize / BITS_PER_UNIT, (int) (align / BITS_PER_UNIT));
! 	      flags |= (modesize / BITS_PER_UNIT) | SECTION_MERGE | SECTION_STRINGS;
  	      return get_section (name, flags, NULL);
  	    }
  	}
*************** mergeable_constant_section (unsigned HOS
*** 923,939 ****
  			    unsigned HOST_WIDE_INT align,
  			    unsigned int flags)
  {
    if (HAVE_GAS_SHF_MERGE && flag_merge_constants
!       && size_bits <= align
        && align >= 8
!       && align <= MAX_ALIGN_MERGABLE
        && (align & (align - 1)) == 0)
      {
        const char *prefix = function_mergeable_rodata_prefix ();
        char *name = (char *) alloca (strlen (prefix) + 30);
  
!       sprintf (name, "%s.cst%d", prefix, (int) (align / 8));
!       flags |= (align / 8) | SECTION_MERGE;
        return get_section (name, flags, NULL);
      }
    return readonly_data_section;
--- 923,941 ----
  			    unsigned HOST_WIDE_INT align,
  			    unsigned int flags)
  {
+   unsigned HOST_WIDE_INT newsize;
+   newsize = HOST_WIDE_INT_1U << ceil_log2 (size_bits);
    if (HAVE_GAS_SHF_MERGE && flag_merge_constants
!       && newsize <= MAX_MERGEABLE_BITSIZE
        && align >= 8
!       && align <= newsize
        && (align & (align - 1)) == 0)
      {
        const char *prefix = function_mergeable_rodata_prefix ();
        char *name = (char *) alloca (strlen (prefix) + 30);
  
!       sprintf (name, "%s.cst%d", prefix, (int) (newsize / BITS_PER_UNIT));
!       flags |= (newsize / BITS_PER_UNIT) | SECTION_MERGE;
        return get_section (name, flags, NULL);
      }
    return readonly_data_section;
*************** assemble_variable_contents (tree decl, c
*** 2475,2480 ****
--- 2477,2495 ----
        else
  	/* Leave space for it.  */
  	assemble_zeros (tree_to_uhwi (DECL_SIZE_UNIT (decl)));
+       /* For mergeable section, make sure the section is zero filled up to
+ 	 the entity size of the section.  */
+       if (in_section
+ 	  && (in_section->common.flags & SECTION_MERGE)
+ 	  && tree_fits_uhwi_p (DECL_SIZE_UNIT (decl))
+ 	  && ((in_section->common.flags & SECTION_ENTSIZE)
+ 	      > tree_to_uhwi (DECL_SIZE_UNIT (decl))))
+ 	{
+ 	  unsigned HOST_WIDE_INT entsize, declsize;
+ 	  entsize = (in_section->common.flags & SECTION_ENTSIZE);
+ 	  declsize = tree_to_uhwi (DECL_SIZE_UNIT (decl));
+ 	  assemble_zeros (entsize - declsize);
+ 	}
        targetm.asm_out.decl_end ();
      }
  }
*************** output_constant_pool_1 (class constant_d
*** 4435,4444 ****
  
    /* Make sure all constants in SECTION_MERGE and not SECTION_STRINGS
       sections have proper size.  */
!   if (align > GET_MODE_BITSIZE (desc->mode)
!       && in_section
!       && (in_section->common.flags & SECTION_MERGE))
!     assemble_align (align);
  
  #ifdef ASM_OUTPUT_SPECIAL_POOL_ENTRY
   done:
--- 4450,4465 ----
  
    /* Make sure all constants in SECTION_MERGE and not SECTION_STRINGS
       sections have proper size.  */
!   if (in_section
!       && (in_section->common.flags & SECTION_MERGE)
!       && ((in_section->common.flags & SECTION_ENTSIZE)
! 	   > GET_MODE_SIZE (desc->mode)))
!     {
!       unsigned HOST_WIDE_INT entsize, constsize;
!       entsize = (in_section->common.flags & SECTION_ENTSIZE);
!       constsize = GET_MODE_SIZE (desc->mode);
!       assemble_zeros (entsize - constsize);
!     }
  
  #ifdef ASM_OUTPUT_SPECIAL_POOL_ENTRY
   done:
diff -Nrcpad gcc-16-20250803/libcpp/ChangeLog gcc-16-20250810/libcpp/ChangeLog
*** gcc-16-20250803/libcpp/ChangeLog	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/libcpp/ChangeLog	Sun Aug 10 22:32:56 2025
***************
*** 1,3 ****
--- 1,34 ----
+ 2025-08-07  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR preprocessor/120778
+ 	* include/cpplib.h (struct cpp_options): Add cpp_warn_keyword_macro.
+ 	(enum cpp_warning_reason): Add CPP_W_KEYWORD_MACRO enumerator.
+ 	(cpp_keyword_p): New inline function.
+ 	* directives.cc (do_undef): Support -Wkeyword-macro diagnostics.
+ 	* macro.cc (warn_of_redefinition): Ignore NODE_WARN flag on nodes
+ 	registered for -Wkeyword-macro.
+ 	(_cpp_create_definition): Support -Wkeyword-macro diagnostics.
+ 	Formatting fixes.
+ 
+ 2025-08-05  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR preprocessor/120778
+ 	* macro.cc (paste_tokens): Use %< and %> instead of \" in
+ 	diagnostics around %.*s.
+ 
+ 2025-08-04  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR preprocessor/120778
+ 	* macro.cc (stringify_arg): For C++26 emit a pedarn instead of warning
+ 	for \ at the end of stringification.
+ 
+ 2025-08-03  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR c++/120845
+ 	* lex.cc (cpp_maybe_module_directive): Move eol variable declaration
+ 	to the start of the function, initialize to false and only set it to
+ 	peek->type == CPP_PRAGMA_EOL in the not_module case.  Formatting fix.
+ 
  2025-07-30  Jakub Jelinek  <jakub@redhat.com>
  
  	PR c++/120778
diff -Nrcpad gcc-16-20250803/libcpp/configure gcc-16-20250810/libcpp/configure
*** gcc-16-20250803/libcpp/configure	Sun Aug  3 22:34:12 2025
--- gcc-16-20250810/libcpp/configure	Sun Aug 10 22:33:26 2025
*************** fi
*** 7075,7080 ****
--- 7075,7081 ----
  
  
  
+ 
      use_additional=yes
  
    acl_save_prefix="$prefix"
*************** $as_echo "$LIBICONV" >&6; }
*** 7924,7929 ****
--- 7925,7931 ----
  
  
  
+ 
  
  
  
diff -Nrcpad gcc-16-20250803/libcpp/directives.cc gcc-16-20250810/libcpp/directives.cc
*** gcc-16-20250803/libcpp/directives.cc	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/libcpp/directives.cc	Sun Aug 10 22:32:56 2025
*************** do_undef (cpp_reader *pfile)
*** 734,746 ****
        if (pfile->cb.undef)
  	pfile->cb.undef (pfile, pfile->directive_line, node);
  
        /* 6.10.3.5 paragraph 2: [#undef] is ignored if the specified
  	 identifier is not currently defined as a macro name.  */
        if (cpp_macro_p (node))
  	{
  	  if (node->flags & NODE_WARN)
! 	    cpp_error (pfile, CPP_DL_WARNING,
! 		       "undefining %qs", NODE_NAME (node));
  	  else if (cpp_builtin_macro_p (node)
  		   && CPP_OPTION (pfile, warn_builtin_macro_redefined))
  	    cpp_warning (pfile, CPP_W_BUILTIN_MACRO_REDEFINED,
--- 734,763 ----
        if (pfile->cb.undef)
  	pfile->cb.undef (pfile, pfile->directive_line, node);
  
+       /* Handle -Wkeyword-macro registered identifiers.  */
+       bool diagnosed = false;
+       if (CPP_OPTION (pfile, cpp_warn_keyword_macro) && cpp_keyword_p (node))
+ 	{
+ 	  if (CPP_OPTION (pfile, cpp_pedantic)
+ 	      && CPP_OPTION (pfile, cplusplus)
+ 	      && CPP_OPTION (pfile, lang) >= CLK_GNUCXX26)
+ 	    cpp_pedwarning (pfile, CPP_W_KEYWORD_MACRO,
+ 			    "undefining keyword %qs", NODE_NAME (node));
+ 	  else
+ 	    cpp_warning (pfile, CPP_W_KEYWORD_MACRO,
+ 			 "undefining keyword %qs", NODE_NAME (node));
+ 	  diagnosed = true;
+ 	}
        /* 6.10.3.5 paragraph 2: [#undef] is ignored if the specified
  	 identifier is not currently defined as a macro name.  */
        if (cpp_macro_p (node))
  	{
  	  if (node->flags & NODE_WARN)
! 	    {
! 	      if (!diagnosed)
! 		cpp_error (pfile, CPP_DL_WARNING,
! 			   "undefining %qs", NODE_NAME (node));
! 	    }
  	  else if (cpp_builtin_macro_p (node)
  		   && CPP_OPTION (pfile, warn_builtin_macro_redefined))
  	    cpp_warning (pfile, CPP_W_BUILTIN_MACRO_REDEFINED,
diff -Nrcpad gcc-16-20250803/libcpp/include/cpplib.h gcc-16-20250810/libcpp/include/cpplib.h
*** gcc-16-20250803/libcpp/include/cpplib.h	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/libcpp/include/cpplib.h	Sun Aug 10 22:32:56 2025
*************** struct cpp_options
*** 620,625 ****
--- 620,628 ----
    /* True if -finput-charset= option has been used explicitly.  */
    bool cpp_input_charset_explicit;
  
+   /* True if -Wkeyword-macro.  */
+   bool cpp_warn_keyword_macro;
+ 
    /* -Wleading-whitespace= value.  */
    unsigned char cpp_warn_leading_whitespace;
  
*************** enum cpp_warning_reason {
*** 757,763 ****
    CPP_W_HEADER_GUARD,
    CPP_W_PRAGMA_ONCE_OUTSIDE_HEADER,
    CPP_W_LEADING_WHITESPACE,
!   CPP_W_TRAILING_WHITESPACE
  };
  
  /* Callback for header lookup for HEADER, which is the name of a
--- 760,767 ----
    CPP_W_HEADER_GUARD,
    CPP_W_PRAGMA_ONCE_OUTSIDE_HEADER,
    CPP_W_LEADING_WHITESPACE,
!   CPP_W_TRAILING_WHITESPACE,
!   CPP_W_KEYWORD_MACRO
  };
  
  /* Callback for header lookup for HEADER, which is the name of a
*************** inline bool cpp_fun_like_macro_p (cpp_ha
*** 1250,1255 ****
--- 1254,1270 ----
    return cpp_user_macro_p (node) && node->value.macro->fun_like;
  }
  
+ /* Return true for nodes marked for -Wkeyword-macro diagnostics.  */
+ inline bool cpp_keyword_p (cpp_hashnode *node)
+ {
+   /* As keywords are marked identifiers which don't start with underscore
+      or start with underscore followed by capital letter (except for
+      _Pragma).  */
+   return ((node->flags & NODE_WARN)
+ 	  && (NODE_NAME (node)[0] != '_'
+ 	      || (NODE_NAME (node)[1] != '_' && NODE_NAME (node)[1] != 'P')));
+ }
+ 
  extern const unsigned char *cpp_macro_definition (cpp_reader *, cpp_hashnode *);
  extern const unsigned char *cpp_macro_definition (cpp_reader *, cpp_hashnode *,
  						  const cpp_macro *);
diff -Nrcpad gcc-16-20250803/libcpp/macro.cc gcc-16-20250810/libcpp/macro.cc
*** gcc-16-20250803/libcpp/macro.cc	Sun Aug  3 22:33:24 2025
--- gcc-16-20250810/libcpp/macro.cc	Sun Aug 10 22:32:56 2025
*************** stringify_arg (cpp_reader *pfile, const
*** 1003,1009 ****
    /* Ignore the final \ of invalid string literals.  */
    if (backslash_count & 1)
      {
!       cpp_error (pfile, CPP_DL_WARNING,
  		 "invalid string literal, ignoring final %<\\%>");
        dest--;
      }
--- 1003,1012 ----
    /* Ignore the final \ of invalid string literals.  */
    if (backslash_count & 1)
      {
!       cpp_error (pfile,
! 		 CPP_OPTION (pfile, cplusplus)
! 		 && CPP_OPTION (pfile, lang) >= CLK_GNUCXX26
! 		 ? CPP_DL_PEDWARN : CPP_DL_WARNING,
  		 "invalid string literal, ignoring final %<\\%>");
        dest--;
      }
*************** paste_tokens (cpp_reader *pfile, locatio
*** 1068,1074 ****
        /* Mandatory error for all apart from assembler.  */
        if (CPP_OPTION (pfile, lang) != CLK_ASM)
  	cpp_error_with_line (pfile, CPP_DL_ERROR, location, 0,
! 			     "pasting \"%.*s\" and \"%.*s\" does not give "
  			     "a valid preprocessing token",
  			     (int) (lhsend - buf), buf,
  			     (int) (end - rhsstart), rhsstart);
--- 1071,1077 ----
        /* Mandatory error for all apart from assembler.  */
        if (CPP_OPTION (pfile, lang) != CLK_ASM)
  	cpp_error_with_line (pfile, CPP_DL_ERROR, location, 0,
! 			     "pasting %<%.*s%> and %<%.*s%> does not give "
  			     "a valid preprocessing token",
  			     (int) (lhsend - buf), buf,
  			     (int) (end - rhsstart), rhsstart);
*************** warn_of_redefinition (cpp_reader *pfile,
*** 3408,3414 ****
  {
    /* Some redefinitions need to be warned about regardless.  */
    if (node->flags & NODE_WARN)
!     return true;
  
    /* Suppress warnings for builtins that lack the NODE_WARN flag,
       unless Wbuiltin-macro-redefined.  */
--- 3411,3421 ----
  {
    /* Some redefinitions need to be warned about regardless.  */
    if (node->flags & NODE_WARN)
!     {
!       /* Ignore NODE_WARN on -Wkeyword-macro registered identifiers though.  */
!       if (!CPP_OPTION (pfile, cpp_warn_keyword_macro) || !cpp_keyword_p (node))
! 	return true;
!     }
  
    /* Suppress warnings for builtins that lack the NODE_WARN flag,
       unless Wbuiltin-macro-redefined.  */
*************** _cpp_create_definition (cpp_reader *pfil
*** 3946,3951 ****
--- 3953,3977 ----
    if (name_loc)
      macro->line = name_loc;
  
+   /* Handle -Wkeyword-macro registered identifiers.  */
+   if (CPP_OPTION (pfile, cpp_warn_keyword_macro) && cpp_keyword_p (node))
+     {
+       if (macro->fun_like
+ 	  && CPP_OPTION (pfile, cplusplus)
+ 	  && (strcmp ((const char *) NODE_NAME (node), "likely") == 0
+ 	      || strcmp ((const char *) NODE_NAME (node), "unlikely") == 0))
+ 	/* likely and unlikely can be defined as function-like macros.  */;
+       else if (CPP_OPTION (pfile, cpp_pedantic)
+ 	       && CPP_OPTION (pfile, cplusplus)
+ 	       && CPP_OPTION (pfile, lang) >= CLK_GNUCXX26)
+ 	cpp_pedwarning_with_line (pfile, CPP_W_KEYWORD_MACRO, macro->line, 0,
+ 				  "keyword %qs defined as macro",
+ 				  NODE_NAME (node));
+       else
+ 	cpp_warning_with_line (pfile, CPP_W_KEYWORD_MACRO, macro->line, 0,
+ 			       "keyword %qs defined as macro",
+ 			       NODE_NAME (node));
+     }
    if (cpp_macro_p (node))
      {
        if (CPP_OPTION (pfile, warn_unused_macros))
*************** _cpp_create_definition (cpp_reader *pfil
*** 3954,3965 ****
        if (warn_of_redefinition (pfile, node, macro))
  	{
            const enum cpp_warning_reason reason
! 	    = (cpp_builtin_macro_p (node) && !(node->flags & NODE_WARN))
! 	    ? CPP_W_BUILTIN_MACRO_REDEFINED : CPP_W_NONE;
  
  	  bool warned
! 	    =  cpp_pedwarning_with_line (pfile, reason, macro->line, 0,
! 					 "%qs redefined", NODE_NAME (node));
  
  	  if (warned && cpp_user_macro_p (node))
  	    cpp_error_with_line (pfile, CPP_DL_NOTE, node->value.macro->line,
--- 3980,3991 ----
        if (warn_of_redefinition (pfile, node, macro))
  	{
            const enum cpp_warning_reason reason
! 	    = (cpp_builtin_macro_p (node) && !(node->flags & NODE_WARN)
! 	       ? CPP_W_BUILTIN_MACRO_REDEFINED : CPP_W_NONE);
  
  	  bool warned
! 	    = cpp_pedwarning_with_line (pfile, reason, macro->line, 0,
! 					"%qs redefined", NODE_NAME (node));
  
  	  if (warned && cpp_user_macro_p (node))
  	    cpp_error_with_line (pfile, CPP_DL_NOTE, node->value.macro->line,
diff -Nrcpad gcc-16-20250803/libgcc/ChangeLog gcc-16-20250810/libgcc/ChangeLog
*** gcc-16-20250803/libgcc/ChangeLog	Sun Aug  3 22:33:25 2025
--- gcc-16-20250810/libgcc/ChangeLog	Sun Aug 10 22:32:57 2025
***************
*** 1,3 ****
--- 1,31 ----
+ 2025-08-08  Christophe Lyon  <christophe.lyon@linaro.org>
+ 
+ 	PR libgcc/117600
+ 	* Makefile.in (WERROR): New.
+ 	* config/aarch64/t-aarch64: Handle WERROR.
+ 	* configure: Regenerate.
+ 	* configure.ac: Add support for --enable-werror.
+ 
+ 2025-08-07  Stefan Schulze Frielinghaus  <stefansf@gcc.gnu.org>
+ 
+ 	* config/s390/libgcc-glibc.ver: Export _BitInt support
+ 	functions.
+ 	* config/s390/t-softfp (softfp_extras): Add fixtfbitint
+ 	floatbitinttf.
+ 
+ 2025-08-07  Stefan Schulze Frielinghaus  <stefansf@gcc.gnu.org>
+ 
+ 	* config.host: Include makefiles t-softfp for -m64.
+ 	* config/s390/sfp-exceptions.c: New file.
+ 	* config/s390/sfp-machine.h: New file.
+ 	* config/s390/t-softfp: New file.
+ 
+ 2025-08-06  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR libgcc/121397
+ 	* enable-execute-stack-mprotect.c (check_enabling): Remove useless
+ 	forward declaration.
+ 
  2025-07-31  Wilco Dijkstra  <wilco.dijkstra@arm.com>
  
  	* config/aarch64/cpuinfo.c (__init_cpu_features_constructor):
diff -Nrcpad gcc-16-20250803/libgcc/Makefile.in gcc-16-20250810/libgcc/Makefile.in
*** gcc-16-20250803/libgcc/Makefile.in	Sun Aug  3 22:33:25 2025
--- gcc-16-20250810/libgcc/Makefile.in	Sun Aug 10 22:32:57 2025
*************** CC = @CC@
*** 87,92 ****
--- 87,93 ----
  CFLAGS = @CFLAGS@
  RANLIB = @RANLIB@
  LN_S = @LN_S@
+ WERROR = @WERROR@
  
  PWD_COMMAND = $${PWDCMD-pwd}
  
diff -Nrcpad gcc-16-20250803/libgcc/config/aarch64/t-aarch64 gcc-16-20250810/libgcc/config/aarch64/t-aarch64
*** gcc-16-20250803/libgcc/config/aarch64/t-aarch64	Sun Aug  3 22:33:25 2025
--- gcc-16-20250810/libgcc/config/aarch64/t-aarch64	Sun Aug 10 22:32:57 2025
*************** LIB2ADDEH += \
*** 30,33 ****
  	$(srcdir)/config/aarch64/__arm_za_disable.S
  
  SHLIB_MAPFILES += $(srcdir)/config/aarch64/libgcc-sme.ver
! LIBGCC2_CFLAGS += -Werror -Wno-prio-ctor-dtor
--- 30,33 ----
  	$(srcdir)/config/aarch64/__arm_za_disable.S
  
  SHLIB_MAPFILES += $(srcdir)/config/aarch64/libgcc-sme.ver
! LIBGCC2_CFLAGS += $(WERROR) -Wno-prio-ctor-dtor
diff -Nrcpad gcc-16-20250803/libgcc/config/s390/libgcc-glibc.ver gcc-16-20250810/libgcc/config/s390/libgcc-glibc.ver
*** gcc-16-20250803/libgcc/config/s390/libgcc-glibc.ver	Sun Aug  3 22:33:26 2025
--- gcc-16-20250810/libgcc/config/s390/libgcc-glibc.ver	Sun Aug 10 22:32:58 2025
*************** GCC_4.1.0 {
*** 114,116 ****
--- 114,130 ----
    __floatditf
  %endif
  }
+ 
+ %ifdef __s390x__
+ %inherit GCC_16.0.0 GCC_4.1.0
+ GCC_16.0.0 {
+   __mulbitint3
+   __divmodbitint4
+   __fixsfbitint
+   __fixdfbitint
+   __fixtfbitint
+   __floatbitintsf
+   __floatbitintdf
+   __floatbitinttf
+ }
+ %endif
diff -Nrcpad gcc-16-20250803/libgcc/config/s390/sfp-exceptions.c gcc-16-20250810/libgcc/config/s390/sfp-exceptions.c
*** gcc-16-20250803/libgcc/config/s390/sfp-exceptions.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/libgcc/config/s390/sfp-exceptions.c	Sun Aug 10 22:32:58 2025
***************
*** 0 ****
--- 1,61 ----
+ /* Copyright (C) 2001-2025 Free Software Foundation, Inc.
+ 
+    This file is part of GCC.
+ 
+    GCC is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 3, or (at your option)
+    any later version.
+ 
+    GCC is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+ 
+    Under Section 7 of GPL version 3, you are granted additional
+    permissions described in the GCC Runtime Library Exception, version
+    3.1, as published by the Free Software Foundation.
+ 
+    You should have received a copy of the GNU General Public License and
+    a copy of the GCC Runtime Library Exception along with this program;
+    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+    <http://www.gnu.org/licenses/>.  */
+ 
+ #include "sfp-machine.h"
+ 
+ #define __math_force_eval_div(x, y) \
+   do { asm ("" : "+f" (x)); asm volatile ("" : : "f" (x / y)); } while (0)
+ 
+ void
+ __sfp_handle_exceptions (int _fex)
+ {
+   if (_fex & FP_EX_INVALID)
+     {
+       float x = 0.0f;
+       __math_force_eval_div (x, x);
+     }
+   if (_fex & FP_EX_DIVZERO)
+     {
+       float x = 1.0f;
+       float y = 0.0f;
+       __math_force_eval_div (x, y);
+     }
+   if (_fex & FP_EX_OVERFLOW)
+     {
+       float x = __FLT_MAX__;
+       asm ("" : "+f" (x));
+       asm volatile ("" : : "f" (x + x));
+     }
+   if (_fex & FP_EX_UNDERFLOW)
+     {
+       float x = __FLT_MIN__;
+       asm ("" : "+f" (x));
+       asm volatile ("" : : "f" (x * x));
+     }
+   if (_fex & FP_EX_INEXACT)
+     {
+       float x = 1.0f;
+       float y = 3.0f;
+       __math_force_eval_div (x, y);
+     }
+ }
diff -Nrcpad gcc-16-20250803/libgcc/config/s390/sfp-machine.h gcc-16-20250810/libgcc/config/s390/sfp-machine.h
*** gcc-16-20250803/libgcc/config/s390/sfp-machine.h	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/libgcc/config/s390/sfp-machine.h	Sun Aug 10 22:32:58 2025
***************
*** 0 ****
--- 1,89 ----
+ /* Copyright (C) 2001-2025 Free Software Foundation, Inc.
+ 
+    This file is part of GCC.
+ 
+    GCC is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 3, or (at your option)
+    any later version.
+ 
+    GCC is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+ 
+    Under Section 7 of GPL version 3, you are granted additional
+    permissions described in the GCC Runtime Library Exception, version
+    3.1, as published by the Free Software Foundation.
+ 
+    You should have received a copy of the GNU General Public License and
+    a copy of the GCC Runtime Library Exception along with this program;
+    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+    <http://www.gnu.org/licenses/>.  */
+ 
+ #if ! __s390x__
+ # error "soft-fp implemented for s390x only"
+ #endif
+ 
+ #define _FP_W_TYPE_SIZE         64
+ #define _FP_W_TYPE              unsigned long long
+ #define _FP_WS_TYPE             signed long long
+ #define _FP_I_TYPE              long long
+ 
+ typedef int TItype __attribute__ ((mode (TI)));
+ typedef unsigned int UTItype __attribute__ ((mode (TI)));
+ #define TI_BITS (__CHAR_BIT__ * (int) sizeof (TItype))
+ 
+ #define _FP_NANFRAC_H           ((_FP_QNANBIT_H << 1) - 1)
+ #define _FP_NANFRAC_S           ((_FP_QNANBIT_S << 1) - 1)
+ #define _FP_NANFRAC_D		((_FP_QNANBIT_D << 1) - 1)
+ #define _FP_NANFRAC_Q		((_FP_QNANBIT_Q << 1) - 1), -1
+ 
+ #define _FP_NANSIGN_H 		0
+ #define _FP_NANSIGN_S		0
+ #define _FP_NANSIGN_D		0
+ #define _FP_NANSIGN_Q		0
+ 
+ #define _FP_KEEPNANFRACP	1
+ #define _FP_QNANNEGATEDP	0
+ 
+ #define FP_EX_INVALID		0x01
+ #define FP_EX_DIVZERO		0x02
+ #define FP_EX_OVERFLOW		0x04
+ #define FP_EX_UNDERFLOW		0x08
+ #define FP_EX_INEXACT		0x10
+ #define FP_EX_ALL \
+ 	(FP_EX_INVALID | FP_EX_DIVZERO | FP_EX_OVERFLOW \
+ 	 | FP_EX_UNDERFLOW | FP_EX_INEXACT)
+ 
+ void __sfp_handle_exceptions (int);
+ 
+ #define FP_HANDLE_EXCEPTIONS			\
+   do {						\
+     if (__builtin_expect (_fex, 0))		\
+       __sfp_handle_exceptions (_fex);		\
+   } while (0)
+ 
+ #define _FP_TININESS_AFTER_ROUNDING 0
+ 
+ #define FP_RND_NEAREST		0x0
+ #define FP_RND_ZERO		0x1
+ #define FP_RND_PINF		0x2
+ #define FP_RND_MINF		0x3
+ #define FP_RND_MASK		0x3
+ 
+ #define _FP_DECL_EX \
+   unsigned int _fpcr __attribute__ ((unused)) = FP_RND_NEAREST
+ 
+ #define FP_INIT_ROUNDMODE			\
+   do {						\
+     __asm__ __volatile__ ("stfpc %0"		\
+ 			  : "=m" (_fpcr));	\
+   } while (0)
+ 
+ #define FP_ROUNDMODE		(_fpcr & FP_RND_MASK)
+ 
+ #define __LITTLE_ENDIAN		1234
+ #define __BIG_ENDIAN		4321
+ 
+ #define __BYTE_ORDER __BIG_ENDIAN
diff -Nrcpad gcc-16-20250803/libgcc/config/s390/t-softfp gcc-16-20250810/libgcc/config/s390/t-softfp
*** gcc-16-20250803/libgcc/config/s390/t-softfp	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/libgcc/config/s390/t-softfp	Sun Aug 10 22:32:58 2025
***************
*** 0 ****
--- 1,2 ----
+ LIB2ADD += $(srcdir)/config/s390/sfp-exceptions.c
+ softfp_extras := fixtfbitint floatbitinttf
diff -Nrcpad gcc-16-20250803/libgcc/config.host gcc-16-20250810/libgcc/config.host
*** gcc-16-20250803/libgcc/config.host	Sun Aug  3 22:33:25 2025
--- gcc-16-20250810/libgcc/config.host	Sun Aug 10 22:32:57 2025
*************** s390x-*-linux*)
*** 1397,1402 ****
--- 1397,1404 ----
  	tmake_file="${tmake_file} s390/t-crtstuff s390/t-linux t-stack s390/t-stack-s390"
  	if test "${host_address}" = 32; then
  	   tmake_file="${tmake_file} s390/32/t-floattodi"
+ 	else
+ 	   tmake_file="${tmake_file} s390/t-softfp t-softfp"
  	fi
  	md_unwind_header=s390/linux-unwind.h
  	;;
diff -Nrcpad gcc-16-20250803/libgcc/configure gcc-16-20250810/libgcc/configure
*** gcc-16-20250803/libgcc/configure	Sun Aug  3 22:33:26 2025
--- gcc-16-20250810/libgcc/configure	Sun Aug 10 22:32:58 2025
*************** ac_unique_file="static-object.mk"
*** 586,591 ****
--- 586,592 ----
  ac_includes_default='/* none */'
  ac_subst_vars='LTLIBOBJS
  LIBOBJS
+ WERROR
  md_unwind_header
  md_unwind_def_header
  unwind_header
*************** enable_tm_clone_registry
*** 720,725 ****
--- 721,727 ----
  with_glibc_version
  enable_tls
  with_gcc_major_version_only
+ enable_werror
  '
        ac_precious_vars='build_alias
  host_alias
*************** Optional Features:
*** 1362,1367 ****
--- 1364,1370 ----
                            installations without PT_GNU_EH_FRAME support
    --disable-tm-clone-registry    disable TM clone registry
    --enable-tls            Use thread-local storage [default=yes]
+   --enable-werror         build with -Werror for selected targets
  
  Optional Packages:
    --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
*************** fi
*** 5789,5794 ****
--- 5792,5813 ----
  
  
  
+ # Check whether --enable-werror was given.
+ if test "${enable_werror+set}" = set; then :
+   enableval=$enable_werror;
+ case ${enable_werror} in
+   no) WERROR="" ;;
+   *) WERROR="-Werror" ;;
+ esac
+ 
+ else
+ 
+ WERROR="-Werror"
+ 
+ fi
+ 
+ 
+ 
  # We need multilib support.
  ac_config_files="$ac_config_files Makefile"
  
diff -Nrcpad gcc-16-20250803/libgcc/configure.ac gcc-16-20250810/libgcc/configure.ac
*** gcc-16-20250803/libgcc/configure.ac	Sun Aug  3 22:33:26 2025
--- gcc-16-20250810/libgcc/configure.ac	Sun Aug 10 22:32:58 2025
*************** AC_SUBST(md_unwind_header)
*** 733,738 ****
--- 733,752 ----
  AC_SUBST(sfp_machine_header)
  AC_SUBST(thread_header)
  
+ AC_ARG_ENABLE(werror,
+ [AS_HELP_STRING([--enable-werror],
+ 		[build with -Werror for selected targets])],
+ [
+ case ${enable_werror} in
+   no) WERROR="" ;;
+   *) WERROR="-Werror" ;;
+ esac
+ ],
+ [
+ WERROR="-Werror"
+ ])
+ AC_SUBST(WERROR)
+ 
  # We need multilib support.
  AC_CONFIG_FILES([Makefile])
  AC_CONFIG_COMMANDS([default],
diff -Nrcpad gcc-16-20250803/libgcc/enable-execute-stack-mprotect.c gcc-16-20250810/libgcc/enable-execute-stack-mprotect.c
*** gcc-16-20250803/libgcc/enable-execute-stack-mprotect.c	Sun Aug  3 22:33:26 2025
--- gcc-16-20250810/libgcc/enable-execute-stack-mprotect.c	Sun Aug 10 22:32:58 2025
***************
*** 30,36 ****
  
  static int need_enable_exec_stack;
  
- static void check_enabling (void) __attribute__ ((unused));
  extern void __enable_execute_stack (void *);
  
  #if defined __sun__ && defined __svr4__
--- 30,35 ----
diff -Nrcpad gcc-16-20250803/libgcobol/ChangeLog gcc-16-20250810/libgcobol/ChangeLog
*** gcc-16-20250803/libgcobol/ChangeLog	Sun Aug  3 22:33:26 2025
--- gcc-16-20250810/libgcobol/ChangeLog	Sun Aug 10 22:32:58 2025
***************
*** 1,3 ****
--- 1,22 ----
+ 2025-08-08  Robert Dubner  <rdubner@symas.com>
+ 
+ 	* libgcobol.cc (int128_to_field): Switch to the new routine.
+ 	* stringbin.cc (packed_from_combined): Implement the new routine.
+ 	(__gg__binary_to_packed): Likewise.
+ 	* stringbin.h (__gg__binary_to_packed): Likewise.
+ 
+ 2025-08-07  Robert Dubner  <rdubner@symas.com>
+ 
+ 	* Makefile.am: Include new stringbin.cc file.
+ 	* Makefile.in: Regenerated.
+ 	* libgcobol.cc (__gg__power_of_ten): Improve error message.
+ 	(__gg__binary_to_string): Deleted.
+ 	(__gg__binary_to_string_internal): Deleted.
+ 	(int128_to_field): Use new conversion routine.
+ 	(__gg__move): Use new conversion routine.
+ 	* stringbin.cc: New file. Implements new conversion routine.
+ 	* stringbin.h: New file. Likewise.
+ 
  2025-07-13  Robert Dubner  <rdubner@symas.com>
  
  	* common-defs.h (PTRCAST): Moved here from libgcobol.h.
diff -Nrcpad gcc-16-20250803/libgcobol/Makefile.am gcc-16-20250810/libgcobol/Makefile.am
*** gcc-16-20250803/libgcobol/Makefile.am	Sun Aug  3 22:33:26 2025
--- gcc-16-20250810/libgcobol/Makefile.am	Sun Aug 10 22:32:58 2025
*************** libgcobol_la_SOURCES =				\
*** 42,47 ****
--- 42,48 ----
  	intrinsic.cc				\
  	io.cc					\
  	libgcobol.cc				\
+ 	stringbin.cc				\
  	valconv.cc
  
  WARN_CFLAGS = -W -Wall -Wwrite-strings
diff -Nrcpad gcc-16-20250803/libgcobol/Makefile.in gcc-16-20250810/libgcobol/Makefile.in
*** gcc-16-20250803/libgcobol/Makefile.in	Sun Aug  3 22:33:26 2025
--- gcc-16-20250810/libgcobol/Makefile.in	Sun Aug 10 22:32:58 2025
*************** libgcobol_la_LIBADD =
*** 178,184 ****
  @BUILD_LIBGCOBOL_TRUE@am_libgcobol_la_OBJECTS = charmaps.lo \
  @BUILD_LIBGCOBOL_TRUE@	constants.lo gfileio.lo gmath.lo \
  @BUILD_LIBGCOBOL_TRUE@	intrinsic.lo io.lo libgcobol.lo \
! @BUILD_LIBGCOBOL_TRUE@	valconv.lo
  libgcobol_la_OBJECTS = $(am_libgcobol_la_OBJECTS)
  @BUILD_LIBGCOBOL_TRUE@am_libgcobol_la_rpath = -rpath $(toolexeclibdir)
  AM_V_P = $(am__v_P_@AM_V@)
--- 178,184 ----
  @BUILD_LIBGCOBOL_TRUE@am_libgcobol_la_OBJECTS = charmaps.lo \
  @BUILD_LIBGCOBOL_TRUE@	constants.lo gfileio.lo gmath.lo \
  @BUILD_LIBGCOBOL_TRUE@	intrinsic.lo io.lo libgcobol.lo \
! @BUILD_LIBGCOBOL_TRUE@	stringbin.lo valconv.lo
  libgcobol_la_OBJECTS = $(am_libgcobol_la_OBJECTS)
  @BUILD_LIBGCOBOL_TRUE@am_libgcobol_la_rpath = -rpath $(toolexeclibdir)
  AM_V_P = $(am__v_P_@AM_V@)
*************** gcc_version := $(shell @get_gcc_base_ver
*** 404,409 ****
--- 404,410 ----
  @BUILD_LIBGCOBOL_TRUE@	intrinsic.cc				\
  @BUILD_LIBGCOBOL_TRUE@	io.cc					\
  @BUILD_LIBGCOBOL_TRUE@	libgcobol.cc				\
+ @BUILD_LIBGCOBOL_TRUE@	stringbin.cc				\
  @BUILD_LIBGCOBOL_TRUE@	valconv.cc
  
  @BUILD_LIBGCOBOL_TRUE@WARN_CFLAGS = -W -Wall -Wwrite-strings
*************** distclean-compile:
*** 526,531 ****
--- 527,533 ----
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/intrinsic.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgcobol.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stringbin.Plo@am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/valconv.Plo@am__quote@
  
  .cc.o:
diff -Nrcpad gcc-16-20250803/libgcobol/configure gcc-16-20250810/libgcobol/configure
*** gcc-16-20250803/libgcobol/configure	Sun Aug  3 22:33:26 2025
--- gcc-16-20250810/libgcobol/configure	Sun Aug 10 22:32:58 2025
*************** fi
*** 16019,16024 ****
--- 16019,16025 ----
  
  
  
+ 
      use_additional=yes
  
    acl_save_prefix="$prefix"
diff -Nrcpad gcc-16-20250803/libgcobol/libgcobol.cc gcc-16-20250810/libgcobol/libgcobol.cc
*** gcc-16-20250803/libgcobol/libgcobol.cc	Sun Aug  3 22:33:26 2025
--- gcc-16-20250810/libgcobol/libgcobol.cc	Sun Aug 10 22:32:58 2025
***************
*** 72,77 ****
--- 72,79 ----
  #include <sys/time.h>
  #include <execinfo.h>
  #include "exceptl.h"
+ #include "stringbin.h"
+ 
  
  /* BSD extension.  */
  #if !defined(LOG_PERROR)
*************** __gg__power_of_ten(int n)
*** 798,804 ****
      fprintf(stderr,
              "Trying to raise 10 to %d as an int128, which we can't do.\n",
              n);
!     fprintf(stderr, "The problem is in %s.\n", __func__);
      abort();
      }
    if( n <= MAX_POWER )
--- 800,806 ----
      fprintf(stderr,
              "Trying to raise 10 to %d as an int128, which we can't do.\n",
              n);
!     fprintf(stderr, "The problem is in %s %s:%d.\n", __func__, __FILE__, __LINE__);
      abort();
      }
    if( n <= MAX_POWER )
*************** __gg__scale_by_power_of_ten_2(__int128 v
*** 875,930 ****
    return value;
    }
  
- extern "C"
- bool
- __gg__binary_to_string(char *result, int digits, __int128 value)
-   {
-   // The result is not terminated, because this routine is used
-   // to put information directly into cblc_field_t::data
-   // Our caller has to keep track of whether value was negative.
- 
-   // Note that this routine operates in the source code-set space; that is
-   // the result comes back with zero as an ASCII 0x30, not an EBCDIC 0xF0
- 
-   if( value < 0 )
-     {
-     value = -value;
-     }
-   result += digits-1 ;
-   while( digits-- )
-     {
-     *result-- = value%10 + ascii_zero;
-     value /= 10;
-     }
-   // Should value be non-zero, it means we potentially have a size error
-   return value != 0;
-   }
- 
- extern "C"
- bool
- __gg__binary_to_string_internal(char *result, int digits, __int128 value)
-   {
-   // The result is not terminated, because this routine is used
-   // to put information directly into cblc_field_t::data
-   // Our caller has to keep track of whether value was negative.
- 
-   // Note that this routine operates in the source code-set space; that is
-   // the result comes back with zero as an ASCII 0x30, not an EBCDIC 0xF0
- 
-   if( value < 0 )
-     {
-     value = -value;
-     }
-   result += digits-1 ;
-   while( digits-- )
-     {
-     *result-- = (value%10) + internal_zero;
-     value /= 10;
-     }
-   // Should value be non-zero, it means we potentially have a size error
-   return value != 0;
-   }
- 
  static bool
  value_is_too_big(const cblc_field_t *var,
                   __int128            value,
--- 877,882 ----
*************** int128_to_field(cblc_field_t   *var,
*** 1617,1625 ****
  
              // Note that sending a signed value to an alphanumeric strips off
              // any plus or minus signs.
              size_error = __gg__binary_to_string_internal(
!                           PTRCAST(char, location),
!                           length, value);
              break;
  
            case FldNumericDisplay:
--- 1569,1581 ----
  
              // Note that sending a signed value to an alphanumeric strips off
              // any plus or minus signs.
+             memset(location, 0, length);
              size_error = __gg__binary_to_string_internal(
!                                            PTRCAST(char, location),
!                                            length > MAX_FIXED_POINT_DIGITS 
!                                                     ? MAX_FIXED_POINT_DIGITS 
!                                                     : length,
!                                            value);
              break;
  
            case FldNumericDisplay:
*************** int128_to_field(cblc_field_t   *var,
*** 1708,1714 ****
  
                // At this point, value is scaled to the target's rdigits
  
!               size_error = __gg__binary_to_string(ach, var->digits, value);
                ach[var->digits] = NULLCH;
  
                // Convert that string according to the PICTURE clause
--- 1664,1670 ----
  
                // At this point, value is scaled to the target's rdigits
  
!               size_error = __gg__binary_to_string_ascii(ach, var->digits, value);
                ach[var->digits] = NULLCH;
  
                // Convert that string according to the PICTURE clause
*************** int128_to_field(cblc_field_t   *var,
*** 1749,1755 ****
            case FldAlphaEdited:
              {
              char ach[128];
!             size_error = __gg__binary_to_string(ach, length, value);
              ach[length] = NULLCH;
  
              // Convert that string according to the PICTURE clause
--- 1705,1711 ----
            case FldAlphaEdited:
              {
              char ach[128];
!             size_error = __gg__binary_to_string_ascii(ach, length, value);
              ach[length] = NULLCH;
  
              // Convert that string according to the PICTURE clause
*************** int128_to_field(cblc_field_t   *var,
*** 1763,1796 ****
  
            case FldPacked:
              {
-             static const unsigned char bin2pd[100] =
-               {
-               0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
-               0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
-               0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29,
-               0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
-               0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
-               0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
-               0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
-               0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,
-               0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,
-               0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99,
-               } ;
- 
              // Convert the binary value to packed decimal.
  
!             // Set the destination bytes to zero
!             memset(location, 0, length);
              unsigned char sign_nybble = 0;
!             if( !(var->attr & packed_no_sign_e) )
                {
                // This is COMP-3 packed decimal, so we need to make room to the
                // right of the final decimal digit for the sign nybble:
                value *= 10;
                // Figure out what the sign nybble is going to be, and make the
                // the value positive:
                if(var->attr & signable_e)
                  {
                  if(value < 0)
                    {
                    sign_nybble = 0x0D;
--- 1719,1745 ----
  
            case FldPacked:
              {
              // Convert the binary value to packed decimal.
+             int digits = var->digits;
  
!             // Assume for the moment that the res
              unsigned char sign_nybble = 0;
!             if( var->attr & packed_no_sign_e ) 
!               {
!               // This is COMP-6 packed decimal, with no sign nybble
!               sign_nybble = 0;
!               }
!             else 
                {
                // This is COMP-3 packed decimal, so we need to make room to the
                // right of the final decimal digit for the sign nybble:
                value *= 10;
+               digits += 1;
                // Figure out what the sign nybble is going to be, and make the
                // the value positive:
                if(var->attr & signable_e)
                  {
+                 // It is signable, so 0xD for negative, and 0xC for positive
                  if(value < 0)
                    {
                    sign_nybble = 0x0D;
*************** int128_to_field(cblc_field_t   *var,
*** 1803,1808 ****
--- 1752,1758 ----
                  }
                else
                  {
+                 // The value is not signable, so the sign nybble is 0xF
                  sign_nybble = 0x0F;
                  if(value < 0)
                    {
*************** int128_to_field(cblc_field_t   *var,
*** 1810,1852 ****
                    }
                  }
                }
-             // ploc points to the current rightmost byte of the location:
-             unsigned char *ploc = location + length -1 ;
  
!             // Build the target from right to left, so that the result is
!             // big-endian:
!             while( value && ploc >= location )
!               {
!               *ploc-- = bin2pd[value%100];
!               value /= 100;
!               }
  
              // We can put the sign nybble into place at this point.  Note that
              // for COMP-6 numbers the sign_nybble value is zero, so the next
              // operation is harmless.
              location[length -1] |= sign_nybble;
  
-             // If we still have value left, we have a size error
-             if( value )
-               {
-               size_error = true;
-               }
-             else
-               {
-               if(    (  sign_nybble && !(var->digits&1) )
-                   || ( !sign_nybble &&  (var->digits&1) ) )
-                 {
-                 // This is either
-                 // comp-3 with an even number of digits, or
-                 // comp-6 with an odd  number of digits.
-                 // Either way, the first byte of the target has to have a high
-                 // nybble of zero.  If it's non-zero, then we have a size error:
-                 if( location[0] & 0xF0 )
-                   {
-                   size_error = true;
-                   }
-                 }
-               }
              // And we're done.
              break;
              }
--- 1760,1784 ----
                    }
                  }
                }
  
!             /*  We need to check if the value is too big, in case our caller
!                 wants to check for the error condition.  In any event, we need
!                 to make sure the value actually fits, because otherwise the 
!                 result might have a bad high-place digit for a value with an
!                 odd number of places. */
  
+             __int128 mask = __gg__power_of_ten(digits);
+             size_error = !!(value / mask);
+             value %= mask;
+ 
+             // We are now set up to do the conversion:
+             __gg__binary_to_packed(location, digits, value);
+             
              // We can put the sign nybble into place at this point.  Note that
              // for COMP-6 numbers the sign_nybble value is zero, so the next
              // operation is harmless.
              location[length -1] |= sign_nybble;
  
              // And we're done.
              break;
              }
*************** __gg__move( cblc_field_t        *fdest,
*** 6126,6132 ****
  
              // Convert it to the full complement of digits available
              // from the source...but no more
!             __gg__binary_to_string(ach, source_digits, value);
  
              // Binary to string returns ASCII characters:
              for(int i=0; i<source_digits; i++)
--- 6058,6064 ----
  
              // Convert it to the full complement of digits available
              // from the source...but no more
!             __gg__binary_to_string_ascii(ach, source_digits, value);
  
              // Binary to string returns ASCII characters:
              for(int i=0; i<source_digits; i++)
diff -Nrcpad gcc-16-20250803/libgcobol/stringbin.cc gcc-16-20250810/libgcobol/stringbin.cc
*** gcc-16-20250803/libgcobol/stringbin.cc	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/libgcobol/stringbin.cc	Sun Aug 10 22:32:58 2025
***************
*** 0 ****
--- 1,477 ----
+ /*
+  * Copyright (c) 2021-2025 Symas Corporation
+  *
+  * Redistribution and use in source and binary forms, with or without
+  * modification, are permitted provided that the following conditions are
+  * met:
+  *
+  * * Redistributions of source code must retain the above copyright
+  *   notice, this list of conditions and the following disclaimer.
+  * * Redistributions in binary form must reproduce the above
+  *   copyright notice, this list of conditions and the following disclaimer
+  *   in the documentation and/or other materials provided with the
+  *   distribution.
+  * * Neither the name of the Symas Corporation nor the names of its
+  *   contributors may be used to endorse or promote products derived from
+  *   this software without specific prior written permission.
+  *
+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  */
+ 
+ #include <algorithm>
+ #include <cctype>
+ #include <cstdio>
+ #include <cstdlib>
+ #include <cstring>
+ #include <ctime>
+ #include <set>
+ #include <stack>
+ #include <string>
+ #include <unordered_map>
+ #include <vector>
+ 
+ #include <dirent.h>
+ #include <dlfcn.h>
+ #include <err.h>
+ #include <fcntl.h>
+ #include <fenv.h>
+ #include <math.h> // required for fpclassify(3), not in cmath
+ #include <setjmp.h>
+ #include <signal.h>
+ #include <syslog.h>
+ #include <unistd.h>
+ #include <stdarg.h>
+ #if __has_include(<errno.h>)
+ # include <errno.h> // for program_invocation_short_name
+ #endif
+ 
+ #include "config.h"
+ #include "libgcobol-fp.h"
+ 
+ #include "ec.h"
+ #include "common-defs.h"
+ #include "io.h"
+ #include "gcobolio.h"
+ #include "libgcobol.h"
+ #include "gfileio.h"
+ #include "charmaps.h"
+ #include "valconv.h"
+ #include <sys/mman.h>
+ #include <sys/resource.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <execinfo.h>
+ #include "exceptl.h"
+ #include "stringbin.h"
+ 
+ /*  This routine evolved from a primitive binary-to-string routine that simply
+     peeled digits off the bottom of an __int128 by using
+ 
+         value % 10 + '0';
+         value /= 10;
+ 
+     That turns out to be unnecessarily slow.
+ 
+     The routine implemented here uses a divide-and-conquer approach to 
+     minimimizing the number of operations, and when you get down to two
+     digits it does a divide-by-100 and uses the remainder in a table lookup
+     to get the digits. */
+ 
+ /*  These static tables are born of a pathologic desire to avoid calculations.
+     Whether that paranoia is justified (perhaps "digit%10 + '0';" ) would
+     actually be faster) is currently untested.  But I figured this would be
+     pretty darn fast.
+     
+     Use them when you know the index is between zero and one hundred.  */
+ 
+ static const char digit_low[100] = 
+   {
+   0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+   0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+   0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+   0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+   0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+   0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+   0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+   0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+   0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+   0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+   };
+ 
+ static const char digit_high[100] = 
+   {
+   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+   1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+   2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+   3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+   4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+   5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+   6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+   7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+   8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+   9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+   };
+ 
+ static char combined_string[128];
+ static char zero_char;
+ 
+ typedef struct 
+   {
+   int   start;
+   int   run;
+   union
+     {
+     unsigned __int128 val128;
+     uint64_t          val64;
+     uint32_t          val32;
+     uint16_t          val16;
+     uint8_t           val8;
+     };
+   } COMBINED;
+ 
+ static
+ void
+ string_from_combined(const COMBINED &combined)
+   {
+   COMBINED left;
+   COMBINED right;
+   
+   uint16_t v16;
+ 
+   switch(combined.run)
+     {
+     case 1:
+       // We know that val8 is a single digit
+       combined_string[combined.start] = combined.val8 + zero_char;;
+       break;
+ 
+     case 2:
+       // We know that val8 has two digits
+       combined_string[combined.start]   = digit_high[combined.val8] + zero_char;
+       combined_string[combined.start+1] = digit_low [combined.val8] + zero_char;
+       break;
+ 
+     case 3:
+       // We know that val16 has three digits.  
+       v16 = combined.val16;
+       combined_string[combined.start] = v16 / 100 + zero_char;
+       v16 %= 100;
+       combined_string[combined.start+1] = v16 / 10 + zero_char;
+       combined_string[combined.start+2] = v16 % 10 + zero_char;
+       break;
+ 
+     case 4:
+       // We know that val16 has four digits:
+       v16 = combined.val16;
+       combined_string[combined.start] = v16 / 1000 + zero_char;
+       v16 %= 1000;
+       combined_string[combined.start+1] = v16 / 100 + zero_char;
+       v16 %= 100;
+       combined_string[combined.start+2] = v16 / 10 + zero_char;
+       combined_string[combined.start+3] = v16 % 10 + zero_char;
+       break;
+ 
+     case 5:
+     case 6:
+     case 7:
+     case 8:
+       // We know that val32 can be treated as two 4-digit pieces
+       left.start  = combined.start;
+       left.run    = combined.run - 4;
+       left.val16  = combined.val32 / 10000;
+ 
+       right.start = combined.start+left.run;
+       right.run   =                4;
+       right.val16 = combined.val32 % 10000;
+ 
+       string_from_combined(left);
+       string_from_combined(right);
+       break;
+ 
+     case 9:
+       // We break val32 into a 1-digit piece, and an 8-digit piece:
+       left.start  = combined.start;
+       left.run    = combined.run - 8;
+       left.val32  = combined.val32 / 100000000;
+ 
+       right.start = combined.start+left.run;
+       right.run   =                8;
+       right.val32 = combined.val32 % 100000000;
+ 
+       string_from_combined(left);
+       string_from_combined(right);
+       break;
+ 
+     case 10:
+     case 11:
+     case 12:
+     case 13:
+     case 14:
+     case 15:
+     case 16:
+     case 17:
+     case 18:
+       // We know we can treat val64 as two 9-digit pieces:
+       left.start  = combined.start;
+       left.run    = combined.run - 9;
+       left.val32  = combined.val64 / 1000000000;
+ 
+       right.start = combined.start+left.run;
+       right.run   =                9;
+       right.val32 = combined.val64 % 1000000000;
+ 
+       string_from_combined(left);
+       string_from_combined(right);
+       break;
+ 
+     case 19:
+       // We split off the bottom nine digits
+       left.start  = combined.start;
+       left.run    = combined.run - 9;
+       left.val64 = combined.val64 / 1000000000;
+ 
+       right.start = combined.start+left.run;
+       right.run   =                9;
+       right.val32 = combined.val64 % 1000000000;
+ 
+       string_from_combined(left);
+       string_from_combined(right);
+       break;
+ 
+     default:
+       // For twenty or more digits we peel eighteen digits at a time off the
+       // right side:
+       left.start  = combined.start;
+       left.run    = combined.run - 18;
+       left.val128 = combined.val128 / 1000000000000000000ULL;
+ 
+       right.start = combined.start+left.run;
+       right.run   =                18;
+       right.val64 = combined.val128 % 1000000000000000000ULL;
+ 
+       string_from_combined(left);
+       string_from_combined(right);
+       break;
+     }
+   }
+ 
+ bool
+ __gg__binary_to_string_ascii(char *result, int digits, __int128 value)
+   {
+   zero_char = ascii_zero;
+ 
+   // Note that this routine does not terminate the generated string with a
+   // NUL.  This routine is sometimes used to generate a NumericDisplay string
+   // of digits in place, with no terminator.
+   __int128 mask = __gg__power_of_ten(digits);
+ 
+   COMBINED combined;
+   if( value < 0 )
+     {
+     value = -value;
+     }
+ 
+   // A non-zero retval means the number was too big to fit into the desired
+   // number of digits:
+   bool retval = !!(value / mask);
+ 
+   // mask off the bottom digits to avoid garbage when value is too large
+   value %= mask;
+ 
+   combined.start = 0;
+   combined.run = digits;
+   combined.val128 = value;
+   string_from_combined(combined);
+   memcpy(result, combined_string, digits);
+   return retval;
+   }
+ 
+ bool
+ __gg__binary_to_string_internal(char *result, int digits, __int128 value)
+   {
+   zero_char = internal_zero;
+ 
+   // Note that this routine does not terminate the generated string with a
+   // NUL.  This routine is sometimes used to generate a NumericDisplay string
+   // of digits in place, with no terminator.
+   __int128 mask = __gg__power_of_ten(digits);
+ 
+   COMBINED combined;
+   if( value < 0 )
+     {
+     value = -value;
+     }
+ 
+   // A non-zero retval means the number was too big to fit into the desired
+   // number of digits:
+   bool retval = !!(value / mask);
+ 
+   // mask off the bottom digits to avoid garbage when value is too large
+   value %= mask;
+ 
+   combined.start = 0;
+   combined.run = digits;
+   combined.val128 = value;
+   string_from_combined(combined);
+   memcpy(result, combined_string, digits);
+   return retval;
+   }
+ 
+ 
+ static
+ void
+ packed_from_combined(COMBINED &combined)
+   {
+   /*  The combined.value must be positive at this point.
+ 
+       The combined.run value has to be the number of places needed to hold
+       combined.value.  The proper calculation is (digits+1)/2.
+ 
+       For a signable value, the caller had to multiple the original value by
+       ten to create room on the right for the sign nybble. */
+ 
+   static const unsigned char bin2pd[100] =
+     {
+     0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
+     0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
+     0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29,
+     0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
+     0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
+     0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
+     0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
+     0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,
+     0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,
+     0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99,
+     } ;
+ 
+   COMBINED left;
+   COMBINED right;
+   
+   switch(combined.run)
+     {
+     case 1:
+       // We know that val8 has two digits.
+       combined_string[combined.start] = bin2pd[combined.val8];
+       break;
+ 
+     case 2:
+       // We know that val16 has four digits.
+       combined_string[combined.start  ] = bin2pd[combined.val16/100];
+       combined_string[combined.start+1] = bin2pd[combined.val16%100];
+       break;
+ 
+     case 3:
+     case 4:
+       // We know that val32 can hold up to eight digits. Break it in half.
+       left.start  = combined.start;
+       left.run    = combined.run - 2;
+       left.val16  = combined.val32 / 10000;
+ 
+       right.start = combined.start+left.run;
+       right.run   =                2;
+       right.val16 = combined.val32 % 10000;
+ 
+       packed_from_combined(left);
+       packed_from_combined(right);
+       break;
+ 
+     case 5:
+     case 6:
+     case 7:
+     case 8:
+       // We know that val64 is holding up to 18 digits.  Break it into two
+       // eight-digit places that can each go into a val23
+       left.start  = combined.start;
+       left.run    = combined.run - 4;
+       left.val32  = combined.val64 / 100000000;
+ 
+       right.start = combined.start+left.run;
+       right.run   =                4;
+       right.val32 = combined.val64 % 100000000;
+ 
+       packed_from_combined(left);
+       packed_from_combined(right);
+       break;
+ 
+     case 9:
+       // We know that val64 is holding 17 or 18 digits.  Break off the
+       // bottom eight.
+       left.start  = combined.start;
+       left.run    = combined.run - 4;
+       left.val64  = combined.val64 / 100000000;
+ 
+       right.start = combined.start+left.run;
+       right.run   =                4;
+       right.val32 = combined.val64 % 100000000;
+ 
+       packed_from_combined(left);
+       packed_from_combined(right);
+       break;
+ 
+     case 10:
+     case 11:
+     case 12:
+     case 13:
+     case 14:
+     case 15:
+     case 16:
+     case 17:
+     case 18:
+       // We know that val64 is holding between 18 and 36 digits.  Break it
+       // two val64:
+ 
+       left.start  = combined.start;
+       left.run    = combined.run - 9;
+       left.val64  = combined.val128 / 1000000000000000000ULL;
+ 
+       right.start = combined.start+left.run;
+       right.run   =                9;
+       right.val64 = combined.val128 % 1000000000000000000ULL;
+ 
+       packed_from_combined(left);
+       packed_from_combined(right);
+       break;
+ 
+     default:
+       // For twenty or more digits we peel eighteen digits at a time off the
+       // right side:
+       left.start  = combined.start;
+       left.run    = combined.run - 9;
+       left.val128 = combined.val128 / 1000000000000000000ULL;
+ 
+       right.start = combined.start+left.run;
+       right.run   =                9;
+       right.val64 = combined.val128 % 1000000000000000000ULL;
+ 
+       packed_from_combined(left);
+       packed_from_combined(right);
+       break;
+     }
+   }
+ 
+ extern "C"
+ void
+ __gg__binary_to_packed( unsigned char *result,
+                              int digits,
+                              __int128 value)
+   {
+   size_t length = (digits+1)/2;
+ 
+   COMBINED combined;
+   combined.start = 0;
+   combined.run = length;
+   combined.val128 = value;
+   packed_from_combined(combined);
+   memcpy(result, combined_string, length);
+   }
diff -Nrcpad gcc-16-20250803/libgcobol/stringbin.h gcc-16-20250810/libgcobol/stringbin.h
*** gcc-16-20250803/libgcobol/stringbin.h	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/libgcobol/stringbin.h	Sun Aug 10 22:32:58 2025
***************
*** 0 ****
--- 1,47 ----
+ /*
+  * Copyright (c) 2021-2025 Symas Corporation
+  *
+  * Redistribution and use in source and binary forms, with or without
+  * modification, are permitted provided that the following conditions are
+  * met:
+  *
+  * * Redistributions of source code must retain the above copyright
+  *   notice, this list of conditions and the following disclaimer.
+  * * Redistributions in binary form must reproduce the above
+  *   copyright notice, this list of conditions and the following disclaimer
+  *   in the documentation and/or other materials provided with the
+  *   distribution.
+  * * Neither the name of the Symas Corporation nor the names of its
+  *   contributors may be used to endorse or promote products derived from
+  *   this software without specific prior written permission.
+  *
+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  */
+ #ifndef STRINGBIN_H_
+ #define STRINGBIN_H_
+ 
+ extern "C"
+ bool __gg__binary_to_string_ascii(char *result,
+                                   int digits,
+                                   __int128 value);
+ extern "C"
+ bool __gg__binary_to_string_internal( char *result,
+                                       int digits,
+                                       __int128 value);
+ 
+ extern "C"
+ void __gg__binary_to_packed( unsigned char *result,
+                              int digits,
+                              __int128 value);
+ 
+ #endif
diff -Nrcpad gcc-16-20250803/libgfortran/ChangeLog gcc-16-20250810/libgfortran/ChangeLog
*** gcc-16-20250803/libgfortran/ChangeLog	Sun Aug  3 22:33:26 2025
--- gcc-16-20250810/libgfortran/ChangeLog	Sun Aug 10 22:32:58 2025
***************
*** 1,3 ****
--- 1,10 ----
+ 2025-08-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+ 
+ 	PR libfortran/121234
+ 	* io/list_read.c (read_character): Add checks to bypass eating
+ 	semicolons when reading strings with decimal mode 'point'
+ 	(list_formatted_read_scalar): Likewise.
+ 
  2025-07-30  Yuao Ma  <c8ef@outlook.com>
  
  	* gfortran.map: Add split symbol.
diff -Nrcpad gcc-16-20250803/libgfortran/io/list_read.c gcc-16-20250810/libgfortran/io/list_read.c
*** gcc-16-20250803/libgfortran/io/list_read.c	Sun Aug  3 22:33:27 2025
--- gcc-16-20250810/libgfortran/io/list_read.c	Sun Aug 10 22:32:58 2025
*************** read_character (st_parameter_dt *dtp, in
*** 1262,1267 ****
--- 1262,1272 ----
  
    if ((c = next_char (dtp)) == EOF)
      goto eof;
+   if (c == ';')
+     {
+       push_char (dtp, c);
+       goto get_string;
+     }
    switch (c)
      {
      CASE_DIGITS:
*************** read_character (st_parameter_dt *dtp, in
*** 1294,1299 ****
--- 1299,1311 ----
    for (;;)
      {
        c = next_char (dtp);
+ 
+       if (c == ';')
+ 	{
+ 	  push_char (dtp, c);
+ 	  goto get_string;
+ 	}
+ 
        switch (c)
  	{
  	CASE_DIGITS:
*************** read_character (st_parameter_dt *dtp, in
*** 1323,1328 ****
--- 1335,1347 ----
  
    if ((c = next_char (dtp)) == EOF)
      goto eof;
+ 
+   if (c == ';')
+     {
+       push_char (dtp, c);
+       goto get_string;
+     }
+ 
    switch (c)
      {
      CASE_SEPARATORS:
*************** read_character (st_parameter_dt *dtp, in
*** 1346,1351 ****
--- 1365,1377 ----
      {
        if ((c = next_char (dtp)) == EOF)
  	goto done_eof;
+ 
+       if (c == ';')
+ 	{
+ 	  push_char (dtp, c);
+ 	  continue;
+ 	}
+ 
        switch (c)
  	{
  	case '"':
*************** list_formatted_read_scalar (st_parameter
*** 2275,2280 ****
--- 2301,2308 ----
  	}
        if (c == ',' && dtp->u.p.current_unit->decimal_status == DECIMAL_COMMA)
  	c = '.';
+       if (c == ';' && dtp->u.p.current_unit->decimal_status == DECIMAL_POINT)
+ 	unget_char (dtp, c);
        else if (is_separator (c))
  	{
  	  /* Found a null value.  */
diff -Nrcpad gcc-16-20250803/libgomp/ChangeLog gcc-16-20250810/libgomp/ChangeLog
*** gcc-16-20250803/libgomp/ChangeLog	Sun Aug  3 22:33:51 2025
--- gcc-16-20250810/libgomp/ChangeLog	Sun Aug 10 22:33:01 2025
***************
*** 1,3 ****
--- 1,23 ----
+ 2025-08-06  Kwok Cheung Yeung  <kcyeung@baylibre.com>
+ 
+ 	* target.c (gomp_update): Call gomp_merge_iterator_maps.  Free
+ 	allocated variables.
+ 	* testsuite/libgomp.c-c++-common/target-update-iterators-1.c: New.
+ 	* testsuite/libgomp.c-c++-common/target-update-iterators-2.c: New.
+ 	* testsuite/libgomp.c-c++-common/target-update-iterators-3.c: New.
+ 
+ 2025-08-06  Kwok Cheung Yeung  <kcyeung@baylibre.com>
+ 	    Andrew Stubbs  <ams@baylibre.com>
+ 
+ 	* target.c (kind_to_name): New.
+ 	(gomp_merge_iterator_maps): New.
+ 	(gomp_map_vars_internal): Call gomp_merge_iterator_maps.  Copy
+ 	address of only the first iteration to target vars.  Free allocated
+ 	variables.
+ 	* testsuite/libgomp.c-c++-common/target-map-iterators-1.c: New.
+ 	* testsuite/libgomp.c-c++-common/target-map-iterators-2.c: New.
+ 	* testsuite/libgomp.c-c++-common/target-map-iterators-3.c: New.
+ 
  2025-07-21  Thomas Schwinge  <tschwinge@baylibre.com>
  
  	PR target/119853
diff -Nrcpad gcc-16-20250803/libgomp/target.c gcc-16-20250810/libgomp/target.c
*** gcc-16-20250803/libgomp/target.c	Sun Aug  3 22:33:52 2025
--- gcc-16-20250810/libgomp/target.c	Sun Aug 10 22:33:01 2025
*************** gomp_map_val (struct target_mem_desc *tg
*** 1003,1008 ****
--- 1003,1157 ----
      }
  }
  
+ static const char *
+ kind_to_name (unsigned short kind, bool short_mapkind)
+ {
+   if (short_mapkind && GOMP_MAP_IMPLICIT_P (kind))
+     kind &= ~GOMP_MAP_IMPLICIT;
+ 
+   switch (kind & (short_mapkind ? 0xff : 0x7))
+     {
+     case GOMP_MAP_ALLOC: return "GOMP_MAP_ALLOC";
+     case GOMP_MAP_TO: return "GOMP_MAP_TO";
+     case GOMP_MAP_FROM: return "GOMP_MAP_FROM";
+     case GOMP_MAP_TOFROM: return "GOMP_MAP_TOFROM";
+     case GOMP_MAP_POINTER: return "GOMP_MAP_POINTER";
+     case GOMP_MAP_TO_PSET: return "GOMP_MAP_TO_PSET";
+     case GOMP_MAP_FORCE_PRESENT: return "GOMP_MAP_FORCE_PRESENT";
+     case GOMP_MAP_DELETE: return "GOMP_MAP_DELETE";
+     case GOMP_MAP_FORCE_DEVICEPTR: return "GOMP_MAP_FORCE_DEVICEPTR";
+     case GOMP_MAP_DEVICE_RESIDENT: return "GOMP_MAP_DEVICE_RESIDENT";
+     case GOMP_MAP_LINK: return "GOMP_MAP_LINK";
+     case GOMP_MAP_IF_PRESENT: return "GOMP_MAP_IF_PRESENT";
+     case GOMP_MAP_FIRSTPRIVATE: return "GOMP_MAP_FIRSTPRIVATE";
+     case GOMP_MAP_FIRSTPRIVATE_INT: return "GOMP_MAP_FIRSTPRIVATE_INT";
+     case GOMP_MAP_USE_DEVICE_PTR: return "GOMP_MAP_USE_DEVICE_PTR";
+     case GOMP_MAP_ZERO_LEN_ARRAY_SECTION: return "GOMP_MAP_ZERO_LEN_ARRAY_SECTION";
+     case GOMP_MAP_FORCE_ALLOC: return "GOMP_MAP_FORCE_ALLOC";
+     case GOMP_MAP_FORCE_TO: return "GOMP_MAP_FORCE_TO";
+     case GOMP_MAP_FORCE_FROM: return "GOMP_MAP_FORCE_FROM";
+     case GOMP_MAP_FORCE_TOFROM: return "GOMP_MAP_FORCE_TOFROM";
+     case GOMP_MAP_USE_DEVICE_PTR_IF_PRESENT:
+       return "GOMP_MAP_USE_DEVICE_PTR_IF_PRESENT";
+     case GOMP_MAP_ALWAYS_TO: return "GOMP_MAP_ALWAYS_TO";
+     case GOMP_MAP_ALWAYS_FROM: return "GOMP_MAP_ALWAYS_FROM";
+     case GOMP_MAP_ALWAYS_TOFROM: return "GOMP_MAP_ALWAYS_TOFROM";
+     case GOMP_MAP_ALWAYS_PRESENT_TO: return "GOMP_MAP_ALWAYS_PRESENT_TO";
+     case GOMP_MAP_ALWAYS_PRESENT_FROM: return "GOMP_MAP_ALWAYS_PRESENT_FROM";
+     case GOMP_MAP_ALWAYS_PRESENT_TOFROM: return "GOMP_MAP_ALWAYS_PRESENT_TOFROM";
+     case GOMP_MAP_STRUCT: return "GOMP_MAP_STRUCT";
+     case GOMP_MAP_STRUCT_UNORD: return "GOMP_MAP_STRUCT_UNORD";
+     case GOMP_MAP_ALWAYS_POINTER: return "GOMP_MAP_ALWAYS_POINTER";
+     case GOMP_MAP_POINTER_TO_ZERO_LENGTH_ARRAY_SECTION:
+       return "GOMP_MAP_POINTER_TO_ZERO_LENGTH_ARRAY_SECTION";
+     case GOMP_MAP_DELETE_ZERO_LEN_ARRAY_SECTION:
+       return "GOMP_MAP_DELETE_ZERO_LENGTH_ARRAY_SECTION";
+     case GOMP_MAP_RELEASE: return "GOMP_MAP_RELEASE";
+     case GOMP_MAP_ATTACH: return "GOMP_MAP_ATTACH";
+     case GOMP_MAP_DETACH: return "GOMP_MAP_DETACH";
+     case GOMP_MAP_FORCE_DETACH: return "GOMP_MAP_FORCE_DETACH";
+     case GOMP_MAP_ATTACH_ZERO_LENGTH_ARRAY_SECTION:
+       return "GOMP_MAP_ATTACH_ZERO_LENGTH_ARRAY_SECTION";
+     default: return "unknown";
+     }
+ }
+ 
+ /*  When GCC encounters a clause with an iterator, e.g.:
+ 
+    #pragma omp target map (iterator(i=0:4), to: x[i])
+ 
+    it generates an array containing the number of iterations and the
+    address and size of each iteration. e.g.:
+ 
+    void *omp_iter_data[] = {
+      (void *) 4, // Number of iterations
+      &x[0], (void *) sizeof(x[0]),
+      &x[1], (void *) sizeof(x[1]),
+      &x[2], (void *) sizeof(x[2]),
+      &x[3], (void *) sizeof(x[3])
+    };
+ 
+    When the construct is lowered, &omp_iter_data is used as the host address
+    for the map (instead of &x[i]), and the size is set to SIZE_MAX to mark
+    the map as an iterator map.
+ 
+    Map entries containing expanded iterators will be flattened and merged into
+    HOSTADDRS, SIZES and KINDS, and MAPNUM updated.  Returns true if there are
+    any iterators found.  ITERATOR_COUNT holds the iteration count of the
+    iterator that generates each map (and 0 if not generated from an iterator).
+    HOSTADDRS, SIZES, KINDS and ITERATOR_COUNT must be freed afterwards if any
+    merging occurs.  */
+ 
+ static bool
+ gomp_merge_iterator_maps (size_t *mapnum, void ***hostaddrs, size_t **sizes,
+ 			  void **kinds, size_t **iterator_count)
+ {
+   bool iterator_p = false;
+   size_t map_count = 0;
+   unsigned short **skinds = (unsigned short **) kinds;
+ 
+   for (size_t i = 0; i < *mapnum; i++)
+     if ((*sizes)[i] == SIZE_MAX)
+       {
+ 	uintptr_t *iterator_array = (*hostaddrs)[i];
+ 	map_count += iterator_array[0];
+ 	iterator_p = true;
+       }
+     else
+       map_count++;
+ 
+   if (!iterator_p)
+     return false;
+ 
+   gomp_debug (1,
+ 	      "Expanding iterator maps - number of map entries: %u -> %u\n",
+ 	      (int) *mapnum, (int) map_count);
+   void **new_hostaddrs = (void **) gomp_malloc (map_count * sizeof (void *));
+   size_t *new_sizes = (size_t *) gomp_malloc (map_count * sizeof (size_t));
+   unsigned short *new_kinds
+     = (unsigned short *) gomp_malloc (map_count * sizeof (unsigned short));
+   size_t new_idx = 0;
+   *iterator_count = (size_t *) gomp_malloc (map_count * sizeof (size_t));
+ 
+   for (size_t i = 0; i < *mapnum; i++)
+     {
+       if ((*sizes)[i] == SIZE_MAX)
+ 	{
+ 	  uintptr_t *iterator_array = (*hostaddrs)[i];
+ 	  size_t count = *iterator_array++;
+ 	  for (size_t j = 0; j < count; j++)
+ 	    {
+ 	      new_hostaddrs[new_idx] = (void *) *iterator_array++;
+ 	      new_sizes[new_idx] = *iterator_array++;
+ 	      new_kinds[new_idx] = (*skinds)[i];
+ 	      (*iterator_count)[new_idx] = j + 1;
+ 	      gomp_debug (1,
+ 			  "Expanding map %u <%s>: "
+ 			  "hostaddrs[%u] = %p, sizes[%u] = %lu\n",
+ 			  (int) i, kind_to_name (new_kinds[new_idx], true),
+ 			  (int) new_idx, new_hostaddrs[new_idx],
+ 			  (int) new_idx, (unsigned long) new_sizes[new_idx]);
+ 	      new_idx++;
+ 	    }
+ 	}
+       else
+ 	{
+ 	  new_hostaddrs[new_idx] = (*hostaddrs)[i];
+ 	  new_sizes[new_idx] = (*sizes)[i];
+ 	  new_kinds[new_idx] = (*skinds)[i];
+ 	  (*iterator_count)[new_idx] = 0;
+ 	  new_idx++;
+ 	}
+     }
+ 
+   *mapnum = map_count;
+   *hostaddrs = new_hostaddrs;
+   *sizes = new_sizes;
+   *kinds = new_kinds;
+ 
+   return true;
+ }
+ 
  static inline __attribute__((always_inline)) struct target_mem_desc *
  gomp_map_vars_internal (struct gomp_device_descr *devicep,
  			struct goacc_asyncqueue *aq, size_t mapnum,
*************** gomp_map_vars_internal (struct gomp_devi
*** 1019,1024 ****
--- 1168,1178 ----
    const int typemask = short_mapkind ? 0xff : 0x7;
    struct splay_tree_s *mem_map = &devicep->mem_map;
    struct splay_tree_key_s cur_node;
+   bool iterators_p = false;
+   size_t *iterator_count = NULL;
+   if (short_mapkind)  /* OpenMP */
+     iterators_p = gomp_merge_iterator_maps (&mapnum, &hostaddrs, &sizes,
+ 					    &kinds, &iterator_count);
    struct target_mem_desc *tgt
      = gomp_malloc (sizeof (*tgt) + sizeof (tgt->list[0]) * mapnum);
    tgt->list_count = mapnum;
*************** gomp_map_vars_internal (struct gomp_devi
*** 1896,1909 ****
  
    if (pragma_kind & GOMP_MAP_VARS_TARGET)
      {
        for (i = 0; i < mapnum; i++)
! 	{
! 	  cur_node.tgt_offset = gomp_map_val (tgt, hostaddrs, i);
! 	  gomp_copy_host2dev (devicep, aq,
! 			      (void *) (tgt->tgt_start + i * sizeof (void *)),
! 			      (void *) &cur_node.tgt_offset, sizeof (void *),
! 			      true, cbufp);
! 	}
      }
  
    if (cbufp)
--- 2050,2071 ----
  
    if (pragma_kind & GOMP_MAP_VARS_TARGET)
      {
+       /* The target variables table is constructed with maps using iterators
+ 	 unexpanded. Now that the iterator maps are expanded, we will need to
+ 	 skip all expanded maps after the initial entry, otherwise subsequent
+ 	 maps will be out-of-sync with their corresponding entry in the
+ 	 target variables table.  */
+       size_t map_num = 0;
        for (i = 0; i < mapnum; i++)
! 	if (!iterator_count || iterator_count[i] <= 1)
! 	  {
! 	    cur_node.tgt_offset = gomp_map_val (tgt, hostaddrs, i);
! 	    gomp_copy_host2dev (devicep, aq,
! 				(void *) (tgt->tgt_start + map_num * sizeof (void *)),
! 				(void *) &cur_node.tgt_offset, sizeof (void *),
! 				true, cbufp);
! 	    map_num++;
! 	  }
      }
  
    if (cbufp)
*************** gomp_map_vars_internal (struct gomp_devi
*** 1935,1940 ****
--- 2097,2111 ----
      }
  
    gomp_mutex_unlock (&devicep->lock);
+ 
+   if (iterators_p)
+     {
+       free (hostaddrs);
+       free (sizes);
+       free (kinds);
+       free (iterator_count);
+     }
+ 
    return tgt;
  }
  
*************** gomp_update (struct gomp_device_descr *d
*** 2201,2206 ****
--- 2372,2379 ----
    size_t i;
    struct splay_tree_key_s cur_node;
    const int typemask = short_mapkind ? 0xff : 0x7;
+   bool iterators_p = false;
+   size_t *iterator_count = NULL;
  
    if (!devicep)
      return;
*************** gomp_update (struct gomp_device_descr *d
*** 2208,2213 ****
--- 2381,2390 ----
    if (mapnum == 0)
      return;
  
+   if (short_mapkind)  /* OpenMP */
+     iterators_p = gomp_merge_iterator_maps (&mapnum, &hostaddrs, &sizes,
+ 					    &kinds, &iterator_count);
+ 
    gomp_mutex_lock (&devicep->lock);
    if (devicep->state == GOMP_DEVICE_FINALIZED)
      {
*************** gomp_update (struct gomp_device_descr *d
*** 2301,2306 ****
--- 2478,2491 ----
  	  }
        }
    gomp_mutex_unlock (&devicep->lock);
+ 
+   if (iterators_p)
+     {
+       free (hostaddrs);
+       free (sizes);
+       free (kinds);
+       free (iterator_count);
+     }
  }
  
  static struct gomp_offload_icv_list *
diff -Nrcpad gcc-16-20250803/libgomp/testsuite/libgomp.c-c++-common/target-map-iterators-1.c gcc-16-20250810/libgomp/testsuite/libgomp.c-c++-common/target-map-iterators-1.c
*** gcc-16-20250803/libgomp/testsuite/libgomp.c-c++-common/target-map-iterators-1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/libgomp/testsuite/libgomp.c-c++-common/target-map-iterators-1.c	Sun Aug 10 22:33:01 2025
***************
*** 0 ****
--- 1,47 ----
+ /* { dg-do run } */
+ /* { dg-require-effective-target offload_device_nonshared_as } */
+ 
+ /* Test transfer of dynamically-allocated arrays to target using map
+    iterators.  */
+ 
+ #include <stdlib.h>
+ 
+ #define DIM1 8
+ #define DIM2 15
+ 
+ int mkarray (int *x[])
+ {
+   int expected = 0;
+ 
+   for (int i = 0; i < DIM1; i++)
+     {
+       x[i] = (int *) malloc (DIM2 * sizeof (int));
+       for (int j = 0; j < DIM2; j++)
+ 	{
+ 	  x[i][j] = rand ();
+ 	  expected += x[i][j];
+ 	}
+     }
+ 
+   return expected;
+ }
+ 
+ int main (void)
+ {
+   int *x[DIM1];
+   int y;
+ 
+   int expected = mkarray (x);
+ 
+   #pragma omp target enter data map(to: x)
+   #pragma omp target map(iterator(i=0:DIM1), to: x[i][:DIM2]) \
+ 		     map(from: y)
+     {
+       y = 0;
+       for (int i = 0; i < DIM1; i++)
+ 	for (int j = 0; j < DIM2; j++)
+ 	  y += x[i][j];
+     }
+ 
+   return y - expected;
+ }
diff -Nrcpad gcc-16-20250803/libgomp/testsuite/libgomp.c-c++-common/target-map-iterators-2.c gcc-16-20250810/libgomp/testsuite/libgomp.c-c++-common/target-map-iterators-2.c
*** gcc-16-20250803/libgomp/testsuite/libgomp.c-c++-common/target-map-iterators-2.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/libgomp/testsuite/libgomp.c-c++-common/target-map-iterators-2.c	Sun Aug 10 22:33:01 2025
***************
*** 0 ****
--- 1,44 ----
+ /* { dg-do run } */
+ /* { dg-require-effective-target offload_device_nonshared_as } */
+ 
+ /* Test transfer of dynamically-allocated arrays from target using map
+    iterators.  */
+ 
+ #include <stdlib.h>
+ 
+ #define DIM1 8
+ #define DIM2 15
+ 
+ void mkarray (int *x[])
+ {
+   for (int i = 0; i < DIM1; i++)
+     x[i] = (int *) malloc (DIM2 * sizeof (int));
+ }
+ 
+ int main (void)
+ {
+   int *x[DIM1];
+   int y, expected;
+ 
+   mkarray (x);
+ 
+   #pragma omp target enter data map(alloc: x)
+   #pragma omp target map(iterator(i=0:DIM1), from: x[i][:DIM2]) \
+ 		     map(from: expected)
+     {
+       expected = 0;
+       for (int i = 0; i < DIM1; i++)
+ 	for (int j = 0; j < DIM2; j++)
+ 	  {
+ 	    x[i][j] = (i+1) * (j+1);
+ 	    expected += x[i][j];
+ 	  }
+     }
+ 
+   y = 0;
+   for (int i = 0; i < DIM1; i++)
+     for (int j = 0; j < DIM2; j++)
+       y += x[i][j];
+ 
+   return y - expected;
+ }
diff -Nrcpad gcc-16-20250803/libgomp/testsuite/libgomp.c-c++-common/target-map-iterators-3.c gcc-16-20250810/libgomp/testsuite/libgomp.c-c++-common/target-map-iterators-3.c
*** gcc-16-20250803/libgomp/testsuite/libgomp.c-c++-common/target-map-iterators-3.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/libgomp/testsuite/libgomp.c-c++-common/target-map-iterators-3.c	Sun Aug 10 22:33:01 2025
***************
*** 0 ****
--- 1,56 ----
+ /* { dg-do run } */
+ /* { dg-require-effective-target offload_device_nonshared_as } */
+ 
+ /* Test transfer of dynamically-allocated arrays to target using map
+    iterators, with multiple iterators and function calls in the iterator
+    expression.  */
+ 
+ #include <stdlib.h>
+ 
+ #define DIM1 16
+ #define DIM2 15
+ 
+ int mkarrays (int *x[], int *y[])
+ {
+   int expected = 0;
+ 
+   for (int i = 0; i < DIM1; i++)
+     {
+       x[i] = (int *) malloc (DIM2 * sizeof (int));
+       y[i] = (int *) malloc (sizeof (int));
+       *y[i] = rand ();
+       for (int j = 0; j < DIM2; j++)
+ 	{
+ 	  x[i][j] = rand ();
+ 	  expected += x[i][j] * *y[i];
+ 	}
+     }
+ 
+   return expected;
+ }
+ 
+ int f (int i, int j)
+ {
+   return i * 4 + j;
+ }
+ 
+ int main (void)
+ {
+   int *x[DIM1], *y[DIM1];
+   int sum;
+ 
+   int expected = mkarrays (x, y);
+ 
+   #pragma omp target enter data map(to: x, y)
+   #pragma omp target map(iterator(i=0:DIM1/4, j=0:4), to: x[f(i, j)][:DIM2]) \
+ 		     map(iterator(i=0:DIM1), to: y[i][:1]) \
+ 		     map(from: sum)
+     {
+       sum = 0;
+       for (int i = 0; i < DIM1; i++)
+ 	for (int j = 0; j < DIM2; j++)
+ 	  sum += x[i][j] * y[i][0];
+     }
+ 
+   return sum - expected;
+ }
diff -Nrcpad gcc-16-20250803/libgomp/testsuite/libgomp.c-c++-common/target-update-iterators-1.c gcc-16-20250810/libgomp/testsuite/libgomp.c-c++-common/target-update-iterators-1.c
*** gcc-16-20250803/libgomp/testsuite/libgomp.c-c++-common/target-update-iterators-1.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/libgomp/testsuite/libgomp.c-c++-common/target-update-iterators-1.c	Sun Aug 10 22:33:01 2025
***************
*** 0 ****
--- 1,65 ----
+ /* { dg-do run } */
+ 
+ /* Test target enter data and target update to the target using map
+    iterators.  */
+ 
+ #include <stdlib.h>
+ 
+ #define DIM1 8
+ #define DIM2 15
+ 
+ int mkarray (int *x[])
+ {
+   int expected = 0;
+   for (int i = 0; i < DIM1; i++)
+     {
+       x[i] = (int *) malloc (DIM2 * sizeof (int));
+       for (int j = 0; j < DIM2; j++)
+ 	{
+ 	  x[i][j] = rand ();
+ 	  expected += x[i][j];
+ 	}
+     }
+ 
+   return expected;
+ }
+ 
+ int main (void)
+ {
+   int *x[DIM1];
+   int sum;
+   int expected = mkarray (x);
+ 
+   #pragma omp target enter data map(to: x[:DIM1])
+   #pragma omp target enter data map(iterator(i=0:DIM1), to: x[i][:DIM2])
+   #pragma omp target map(from: sum)
+     {
+       sum = 0;
+       for (int i = 0; i < DIM1; i++)
+ 	for (int j = 0; j < DIM2; j++)
+ 	  sum += x[i][j];
+     }
+ 
+   if (sum != expected)
+     return 1;
+ 
+   expected = 0;
+   for (int i = 0; i < DIM1; i++)
+     for (int j = 0; j < DIM2; j++)
+       {
+ 	x[i][j] *= rand ();
+ 	expected += x[i][j];
+       }
+ 
+   #pragma omp target update to(iterator(i=0:DIM1): x[i][:DIM2])
+ 
+   #pragma omp target map(from: sum)
+     {
+       sum = 0;
+       for (int i = 0; i < DIM1; i++)
+ 	for (int j = 0; j < DIM2; j++)
+ 	  sum += x[i][j];
+     }
+ 
+   return sum != expected;
+ }
diff -Nrcpad gcc-16-20250803/libgomp/testsuite/libgomp.c-c++-common/target-update-iterators-2.c gcc-16-20250810/libgomp/testsuite/libgomp.c-c++-common/target-update-iterators-2.c
*** gcc-16-20250803/libgomp/testsuite/libgomp.c-c++-common/target-update-iterators-2.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/libgomp/testsuite/libgomp.c-c++-common/target-update-iterators-2.c	Sun Aug 10 22:33:01 2025
***************
*** 0 ****
--- 1,58 ----
+ /* { dg-do run } */
+ /* { dg-require-effective-target offload_device_nonshared_as } */
+ 
+ /* Test target enter data and target update from the target using map
+    iterators.  */
+ 
+ #include <stdlib.h>
+ 
+ #define DIM1 8
+ #define DIM2 15
+ 
+ void mkarray (int *x[])
+ {
+   for (int i = 0; i < DIM1; i++)
+     {
+       x[i] = (int *) malloc (DIM2 * sizeof (int));
+       for (int j = 0; j < DIM2; j++)
+ 	x[i][j] = 0;
+     }
+ }
+ 
+ int main (void)
+ {
+   int *x[DIM1];
+   int sum, expected;
+ 
+   mkarray (x);
+ 
+   #pragma omp target enter data map(alloc: x[:DIM1])
+   #pragma omp target enter data map(iterator(i=0:DIM1), to: x[i][:DIM2])
+   #pragma omp target map(from: expected)
+     {
+       expected = 0;
+       for (int i = 0; i < DIM1; i++)
+ 	for (int j = 0; j < DIM2; j++)
+ 	  {
+ 	    x[i][j] = (i + 1) * (j + 2);
+ 	    expected += x[i][j];
+ 	  }
+     }
+ 
+   /* Host copy of x should remain unchanged.  */
+   sum = 0;
+   for (int i = 0; i < DIM1; i++)
+     for (int j = 0; j < DIM2; j++)
+       sum += x[i][j];
+   if (sum != 0)
+     return 1;
+ 
+   #pragma omp target update from(iterator(i=0:DIM1): x[i][:DIM2])
+ 
+   /* Host copy should now be updated.  */
+   sum = 0;
+   for (int i = 0; i < DIM1; i++)
+     for (int j = 0; j < DIM2; j++)
+       sum += x[i][j];
+   return sum - expected;
+ }
diff -Nrcpad gcc-16-20250803/libgomp/testsuite/libgomp.c-c++-common/target-update-iterators-3.c gcc-16-20250810/libgomp/testsuite/libgomp.c-c++-common/target-update-iterators-3.c
*** gcc-16-20250803/libgomp/testsuite/libgomp.c-c++-common/target-update-iterators-3.c	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/libgomp/testsuite/libgomp.c-c++-common/target-update-iterators-3.c	Sun Aug 10 22:33:01 2025
***************
*** 0 ****
--- 1,67 ----
+ /* { dg-do run } */
+ /* { dg-require-effective-target offload_device_nonshared_as } */
+ 
+ /* Test target enter data and target update to the target using map
+    iterators with a function.  */
+ 
+ #include <stdlib.h>
+ 
+ #define DIM1 8
+ #define DIM2 15
+ 
+ void mkarray (int *x[])
+ {
+   for (int i = 0; i < DIM1; i++)
+     {
+       x[i] = (int *) malloc (DIM2 * sizeof (int));
+       for (int j = 0; j < DIM2; j++)
+ 	x[i][j] = rand ();
+     }
+ }
+ 
+ int f (int i)
+ {
+   return i * 2;
+ }
+ 
+ int main (void)
+ {
+   int *x[DIM1], x_new[DIM1][DIM2];
+   int sum, expected;
+ 
+   mkarray (x);
+ 
+   #pragma omp target enter data map(alloc: x[:DIM1])
+   #pragma omp target enter data map(iterator(i=0:DIM1), to: x[i][:DIM2])
+ 
+   /* Update x on host.  */
+   for (int i = 0; i < DIM1; i++)
+     for (int j = 0; j < DIM2; j++)
+       {
+ 	x_new[i][j] = x[i][j];
+ 	x[i][j] = (i + 1) * (j + 2);
+       }
+ 
+   /* Update a subset of x on target.  */
+   #pragma omp target update to(iterator(i=0:DIM1/2): x[f (i)][:DIM2])
+ 
+   #pragma omp target map(from: sum)
+     {
+       sum = 0;
+       for (int i = 0; i < DIM1; i++)
+ 	for (int j = 0; j < DIM2; j++)
+ 	  sum += x[i][j];
+     }
+ 
+   /* Calculate expected value on host.  */
+   for (int i = 0; i < DIM1/2; i++)
+     for (int j = 0; j < DIM2; j++)
+       x_new[f (i)][j] = x[f (i)][j];
+ 
+   expected = 0;
+   for (int i = 0; i < DIM1; i++)
+     for (int j = 0; j < DIM2; j++)
+       expected += x_new[i][j];
+ 
+   return sum - expected;
+ }
diff -Nrcpad gcc-16-20250803/libgrust/ChangeLog gcc-16-20250810/libgrust/ChangeLog
*** gcc-16-20250803/libgrust/ChangeLog	Sun Aug  3 22:33:54 2025
--- gcc-16-20250810/libgrust/ChangeLog	Sun Aug 10 22:33:02 2025
***************
*** 1,3 ****
--- 1,20 ----
+ 2025-08-05  Marc Poulhiès  <dkm@kataplop.net>
+ 
+ 	* libproc_macro_internal/ffistring.h (FFIString__new): Likewise.
+ 	(FFIString__drop): Likewise.
+ 	* libproc_macro_internal/ident.h (Ident__new): Likewise.
+ 	(Ident__new_raw): Likewise.
+ 	(Ident__drop): Likewise.
+ 	(Ident__clone): Likewise.
+ 	* libproc_macro_internal/literal.h (Literal__from_string): Likewise.
+ 	* libproc_macro_internal/proc_macro.h (bridge_is_available): Likewise.
+ 	* libproc_macro_internal/tokenstream.h (TokenStream__new): Likewise.
+ 	(TokenStream__with_capacity): Likewise.
+ 	(TokenSream__push): Likewise.
+ 	(TokenStream__from_string): Likewise.
+ 	(TokenStream__clone): Likewise.
+ 	(TokenStream__drop): Likewise.
+ 
  2025-03-31  Arthur Cohen  <arthur.cohen@embecosm.com>
  
  	* libformat_parser/Makefile.am: Avoid using --config as it is unsupported by cargo 1.49.
diff -Nrcpad gcc-16-20250803/libgrust/libproc_macro_internal/ffistring.h gcc-16-20250810/libgrust/libproc_macro_internal/ffistring.h
*** gcc-16-20250803/libgrust/libproc_macro_internal/ffistring.h	Sun Aug  3 22:33:54 2025
--- gcc-16-20250810/libgrust/libproc_macro_internal/ffistring.h	Sun Aug 10 22:33:02 2025
*************** public:
*** 43,53 ****
  };
  
  extern "C" {
! FFIString
! FFIString__new (const unsigned char *data, std::uint64_t len);
  
! void
! FFIString__drop (FFIString *str);
  }
  
  } // namespace ProcMacro
--- 43,51 ----
  };
  
  extern "C" {
! FFIString FFIString__new (const unsigned char *data, std::uint64_t len);
  
! void FFIString__drop (FFIString *str);
  }
  
  } // namespace ProcMacro
diff -Nrcpad gcc-16-20250803/libgrust/libproc_macro_internal/ident.h gcc-16-20250810/libgrust/libproc_macro_internal/ident.h
*** gcc-16-20250803/libgrust/libproc_macro_internal/ident.h	Sun Aug  3 22:33:54 2025
--- gcc-16-20250810/libgrust/libproc_macro_internal/ident.h	Sun Aug 10 22:33:02 2025
*************** public:
*** 47,63 ****
  
  extern "C" {
  
! Ident
! Ident__new (FFIString str, Span span);
  
! Ident
! Ident__new_raw (FFIString str, Span span);
  
! void
! Ident__drop (Ident *ident);
  
! Ident
! Ident__clone (const Ident *ident);
  }
  
  } // namespace ProcMacro
--- 47,59 ----
  
  extern "C" {
  
! Ident Ident__new (FFIString str, Span span);
  
! Ident Ident__new_raw (FFIString str, Span span);
  
! void Ident__drop (Ident *ident);
  
! Ident Ident__clone (const Ident *ident);
  }
  
  } // namespace ProcMacro
diff -Nrcpad gcc-16-20250803/libgrust/libproc_macro_internal/literal.h gcc-16-20250810/libgrust/libproc_macro_internal/literal.h
*** gcc-16-20250803/libgrust/libproc_macro_internal/literal.h	Sun Aug  3 22:33:54 2025
--- gcc-16-20250810/libgrust/libproc_macro_internal/literal.h	Sun Aug 10 22:33:02 2025
*************** public:
*** 105,112 ****
  };
  
  extern "C" {
! bool
! Literal__from_string (FFIString str, Literal *lit);
  }
  } // namespace ProcMacro
  
--- 105,111 ----
  };
  
  extern "C" {
! bool Literal__from_string (FFIString str, Literal *lit);
  }
  } // namespace ProcMacro
  
diff -Nrcpad gcc-16-20250803/libgrust/libproc_macro_internal/proc_macro.h gcc-16-20250810/libgrust/libproc_macro_internal/proc_macro.h
*** gcc-16-20250803/libgrust/libproc_macro_internal/proc_macro.h	Sun Aug  3 22:33:54 2025
--- gcc-16-20250810/libgrust/libproc_macro_internal/proc_macro.h	Sun Aug 10 22:33:02 2025
*************** struct ProcmacroArray
*** 96,103 ****
    Procmacro *macros;
  };
  
! extern "C" bool
! bridge_is_available ();
  
  } // namespace ProcMacro
  
--- 96,102 ----
    Procmacro *macros;
  };
  
! extern "C" bool bridge_is_available ();
  
  } // namespace ProcMacro
  
diff -Nrcpad gcc-16-20250803/libgrust/libproc_macro_internal/tokenstream.h gcc-16-20250810/libgrust/libproc_macro_internal/tokenstream.h
*** gcc-16-20250803/libgrust/libproc_macro_internal/tokenstream.h	Sun Aug  3 22:33:54 2025
--- gcc-16-20250810/libgrust/libproc_macro_internal/tokenstream.h	Sun Aug 10 22:33:02 2025
*************** public:
*** 51,73 ****
    static void drop (TokenStream *stream);
  };
  
! extern "C" TokenStream
! TokenStream__new ();
  
! extern "C" TokenStream
! TokenStream__with_capacity (std::uint64_t capacity);
  
! extern "C" void
! TokenSream__push (TokenStream *stream, TokenTree tree);
  
! extern "C" bool
! TokenStream__from_string (FFIString str, TokenStream *ts);
  
! extern "C" TokenStream
! TokenStream__clone (const TokenStream *ts);
  
! extern "C" void
! TokenStream__drop (TokenStream *stream);
  
  } // namespace ProcMacro
  
--- 51,67 ----
    static void drop (TokenStream *stream);
  };
  
! extern "C" TokenStream TokenStream__new ();
  
! extern "C" TokenStream TokenStream__with_capacity (std::uint64_t capacity);
  
! extern "C" void TokenSream__push (TokenStream *stream, TokenTree tree);
  
! extern "C" bool TokenStream__from_string (FFIString str, TokenStream *ts);
  
! extern "C" TokenStream TokenStream__clone (const TokenStream *ts);
  
! extern "C" void TokenStream__drop (TokenStream *stream);
  
  } // namespace ProcMacro
  
diff -Nrcpad gcc-16-20250803/libiberty/ChangeLog gcc-16-20250810/libiberty/ChangeLog
*** gcc-16-20250803/libiberty/ChangeLog	Sun Aug  3 22:33:54 2025
--- gcc-16-20250810/libiberty/ChangeLog	Sun Aug 10 22:33:02 2025
***************
*** 1,3 ****
--- 1,8 ----
+ 2025-08-06  Matthieu Longo  <matthieu.longo@arm.com>
+ 
+ 	* testsuite/test-doubly-linked-list.c: disable debug logging on
+ 	stdout.
+ 
  2025-07-09  Matthieu Longo  <matthieu.longo@arm.com>
  
  	* Makefile.in: Add new header.
diff -Nrcpad gcc-16-20250803/libiberty/testsuite/test-doubly-linked-list.c gcc-16-20250810/libiberty/testsuite/test-doubly-linked-list.c
*** gcc-16-20250803/libiberty/testsuite/test-doubly-linked-list.c	Sun Aug  3 22:33:54 2025
--- gcc-16-20250810/libiberty/testsuite/test-doubly-linked-list.c	Sun Aug 10 22:33:02 2025
*************** bool check(const char *op,
*** 155,173 ****
    bool success = true;
    bool res;
  
!   l_print (wrapper->first);
    res = run_test (expect, wrapper, false);
    printf ("%s: test-linked-list::%s: check forward conformity\n",
  	  res ? "PASS": "FAIL", op);
    success &= res;
  
!   l_reverse_print (wrapper->last);
    res = run_test (expect, wrapper, true);
    printf ("%s: test-linked-list::%s: check backward conformity\n",
  	  res ? "PASS": "FAIL", op);
    success &= res;
  
!   printf("\n");
  
    return success;
  }
--- 155,180 ----
    bool success = true;
    bool res;
  
! #define DUMP_LIST 0
! 
!   if (DUMP_LIST)
!     l_print (wrapper->first);
! 
    res = run_test (expect, wrapper, false);
    printf ("%s: test-linked-list::%s: check forward conformity\n",
  	  res ? "PASS": "FAIL", op);
    success &= res;
  
!   if (DUMP_LIST)
!     l_reverse_print (wrapper->last);
! 
    res = run_test (expect, wrapper, true);
    printf ("%s: test-linked-list::%s: check backward conformity\n",
  	  res ? "PASS": "FAIL", op);
    success &= res;
  
!   if (DUMP_LIST)
!     printf("\n");
  
    return success;
  }
diff -Nrcpad gcc-16-20250803/libstdc++-v3/ChangeLog gcc-16-20250810/libstdc++-v3/ChangeLog
*** gcc-16-20250803/libstdc++-v3/ChangeLog	Sun Aug  3 22:33:55 2025
--- gcc-16-20250810/libstdc++-v3/ChangeLog	Sun Aug 10 22:33:05 2025
***************
*** 1,3 ****
--- 1,43 ----
+ 2025-08-07  Gerald Pfeifer  <gerald@pfeifer.com>
+ 
+ 	* doc/xml/manual/build_hacking.xml: Switch gcc.gnu.org installation
+ 	docs to https.
+ 	* doc/html/manual/appendix_porting.html: Regenerate.
+ 
+ 2025-08-05  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	PR libstdc++/121373
+ 	* src/c++23/std.cc.in (std::ranges::iter_move, std::ranges::iter_swap):
+ 	Remove exports.
+ 
+ 2025-08-04  Jakub Jelinek  <jakub@redhat.com>
+ 	    hexne  <printfne@gmail.com>
+ 
+ 	PR libstdc++/121373
+ 	* src/c++23/std.cc.in (std::ranges::shift_left,
+ 	std::ranges::shift_right): Only export for C++23 and later.
+ 	(std::ranges::fold_left_first_with_iter_result,
+ 	std::ranges::fold_left_with_iter_result): Export.
+ 	(std::byteswap): Export for C++23 and later.
+ 	(std::ranges::iter_move, std::ranges::iter_swap): Export.
+ 	(std::projected_value_t): Export for C++26 and later.
+ 	(std::out_ptr_t, std::inout_ptr_t): Export.
+ 	(std::ranges::iota_result): Export.
+ 	(std::regex_constants): Export a lot of constants.
+ 	(std::is_scoped_enum, std::is_scoped_enum_v): Export.
+ 
+ 2025-08-04  Tomasz Kamiński  <tkaminsk@redhat.com>
+ 
+ 	PR libstdc++/121128
+ 	* include/bits/indirect.h (indirect::operator*):
+ 	Cast __self to approparietly qualified indirect.
+ 	* testsuite/std/memory/indirect/access.cc: New test.
+ 	* testsuite/std/memory/polymorphic/access.cc: New test.
+ 
+ 2025-08-03  Jakub Jelinek  <jakub@redhat.com>
+ 
+ 	* src/c++23/std.cc.in (std::owner_equal, std::owner_hash): Export.
+ 
  2025-07-30  François Dumont  <frs.dumont@gmail.com>
  
  	* testsuite/std/time/format/data_not_present_neg.cc: Remove _GLIBCXX_USE_DUAL_ABI
diff -Nrcpad gcc-16-20250803/libstdc++-v3/configure gcc-16-20250810/libstdc++-v3/configure
*** gcc-16-20250803/libstdc++-v3/configure	Sun Aug  3 22:34:12 2025
--- gcc-16-20250810/libstdc++-v3/configure	Sun Aug 10 22:33:26 2025
*************** fi
*** 26323,26328 ****
--- 26323,26329 ----
  
  
  
+ 
      use_additional=yes
  
    acl_save_prefix="$prefix"
*************** $as_echo "$glibcxx_cv_libbacktrace_atomi
*** 53543,53549 ****
      CXXFLAGS='-O0 -S'
  
      cat > conftest.$ac_ext << EOF
! #line 53546 "configure"
  #include <stddef.h>
  int main()
  {
--- 53544,53550 ----
      CXXFLAGS='-O0 -S'
  
      cat > conftest.$ac_ext << EOF
! #line 53547 "configure"
  #include <stddef.h>
  int main()
  {
diff -Nrcpad gcc-16-20250803/libstdc++-v3/doc/html/manual/appendix_porting.html gcc-16-20250810/libstdc++-v3/doc/html/manual/appendix_porting.html
*** gcc-16-20250803/libstdc++-v3/doc/html/manual/appendix_porting.html	Sun Aug  3 22:33:55 2025
--- gcc-16-20250810/libstdc++-v3/doc/html/manual/appendix_porting.html	Sun Aug 10 22:33:05 2025
*************** Support for C++11 dialect.
*** 26,32 ****
  </a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third.iterator_type">
    <code class="code">Container::iterator_type</code> is not necessarily <code class="code">Container::value_type*</code>
  </a></span></dt></dl></dd></dl></dd></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="appendix.porting.build_hacking"></a>Configure and Build Hacking</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="build_hacking.prereq"></a>Prerequisites</h3></div></div></div><p>
!     As noted <a class="link" href="http://gcc.gnu.org/install/prerequisites.html" target="_top">previously</a>,
      certain other tools are necessary for hacking on files that
      control configure (<code class="code">configure.ac</code>,
      <code class="code">acinclude.m4</code>) and make
--- 26,32 ----
  </a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third.iterator_type">
    <code class="code">Container::iterator_type</code> is not necessarily <code class="code">Container::value_type*</code>
  </a></span></dt></dl></dd></dl></dd></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="appendix.porting.build_hacking"></a>Configure and Build Hacking</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="build_hacking.prereq"></a>Prerequisites</h3></div></div></div><p>
!     As noted <a class="link" href="https://gcc.gnu.org/install/prerequisites.html" target="_top">previously</a>,
      certain other tools are necessary for hacking on files that
      control configure (<code class="code">configure.ac</code>,
      <code class="code">acinclude.m4</code>) and make
diff -Nrcpad gcc-16-20250803/libstdc++-v3/doc/xml/manual/build_hacking.xml gcc-16-20250810/libstdc++-v3/doc/xml/manual/build_hacking.xml
*** gcc-16-20250803/libstdc++-v3/doc/xml/manual/build_hacking.xml	Sun Aug  3 22:33:56 2025
--- gcc-16-20250810/libstdc++-v3/doc/xml/manual/build_hacking.xml	Sun Aug 10 22:33:05 2025
***************
*** 17,23 ****
  <section xml:id="build_hacking.prereq"><info><title>Prerequisites</title></info>
  
    <para>
!     As noted <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/install/prerequisites.html">previously</link>,
      certain other tools are necessary for hacking on files that
      control configure (<code>configure.ac</code>,
      <code>acinclude.m4</code>) and make
--- 17,23 ----
  <section xml:id="build_hacking.prereq"><info><title>Prerequisites</title></info>
  
    <para>
!     As noted <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://gcc.gnu.org/install/prerequisites.html">previously</link>,
      certain other tools are necessary for hacking on files that
      control configure (<code>configure.ac</code>,
      <code>acinclude.m4</code>) and make
diff -Nrcpad gcc-16-20250803/libstdc++-v3/include/bits/indirect.h gcc-16-20250810/libstdc++-v3/include/bits/indirect.h
*** gcc-16-20250803/libstdc++-v3/include/bits/indirect.h	Sun Aug  3 22:33:56 2025
--- gcc-16-20250810/libstdc++-v3/include/bits/indirect.h	Sun Aug 10 22:33:05 2025
*************** _GLIBCXX_BEGIN_NAMESPACE_VERSION
*** 286,293 ****
        constexpr auto&&
        operator*(this _Self&& __self) noexcept
        {
! 	__glibcxx_assert(__self._M_objp != nullptr);
! 	return std::forward_like<_Self>(*((_Self)__self)._M_objp);
        }
  
        constexpr const_pointer
--- 286,296 ----
        constexpr auto&&
        operator*(this _Self&& __self) noexcept
        {
! 	// n.b. [allocator.requirements.general] p22 implies
! 	// dereferencing const pointer is same as pointer
! 	const indirect& __iself = (const indirect&)__self;
! 	__glibcxx_assert(__iself._M_objp != nullptr);
! 	return std::forward_like<_Self>(*__iself._M_objp);
        }
  
        constexpr const_pointer
diff -Nrcpad gcc-16-20250803/libstdc++-v3/src/c++23/std.cc.in gcc-16-20250810/libstdc++-v3/src/c++23/std.cc.in
*** gcc-16-20250803/libstdc++-v3/src/c++23/std.cc.in	Sun Aug  3 22:33:56 2025
--- gcc-16-20250810/libstdc++-v3/src/c++23/std.cc.in	Sun Aug 10 22:33:07 2025
*************** export namespace std
*** 277,291 ****
      using std::ranges::shuffle;
    }
    using std::shift_left;
-   namespace ranges
-   {
-     using std::ranges::shift_left;
-   }
    using std::shift_right;
    namespace ranges
    {
      using std::ranges::shift_right;
    }
    using std::sort;
    namespace ranges
    {
--- 277,290 ----
      using std::ranges::shuffle;
    }
    using std::shift_left;
    using std::shift_right;
+ #if __cpp_lib_shift >= 202202L // >= C++23
    namespace ranges
    {
+     using std::ranges::shift_left;
      using std::ranges::shift_right;
    }
+ #endif
    using std::sort;
    namespace ranges
    {
*************** export namespace std
*** 500,506 ****
--- 499,507 ----
      using ranges::fold_left;
      using ranges::fold_left_first;
      using ranges::fold_left_first_with_iter;
+     using ranges::fold_left_first_with_iter_result;
      using ranges::fold_left_with_iter;
+     using ranges::fold_left_with_iter_result;
      using ranges::fold_right;
      using ranges::fold_right_last;
      using ranges::in_value_result;
*************** export namespace std
*** 672,677 ****
--- 673,681 ----
    using std::popcount;
    using std::rotl;
    using std::rotr;
+ #if __cpp_lib_byteswap // >= C++23
+   using std::byteswap;
+ #endif
  }
  
  // 22.9 <bitset>
*************** export namespace std
*** 1747,1752 ****
--- 1751,1759 ----
    using std::make_const_iterator;
    using std::make_const_sentinel;
  #endif
+ #if __glibcxx_algorithm_default_value_type // >= C++26
+   using std::projected_value_t;
+ #endif
  }
  
  // <latch>
*************** export namespace std
*** 1973,1978 ****
--- 1980,1987 ----
  #if __cpp_lib_out_ptr
    using std::out_ptr;
    using std::inout_ptr;
+   using std::out_ptr_t;
+   using std::inout_ptr_t;
  #endif
  #if __cpp_lib_indirect
    using std::indirect;
*************** export namespace std
*** 2101,2107 ****
    using std::lcm;
    using std::midpoint;
  #if __cpp_lib_ranges_iota
!   namespace ranges { using ranges::iota; }
  #endif
  #if __cpp_lib_saturation_arithmetic
    using std::add_sat;
--- 2110,2120 ----
    using std::lcm;
    using std::midpoint;
  #if __cpp_lib_ranges_iota
!   namespace ranges
!   {
!     using ranges::iota;
!     using ranges::iota_result;
!   }
  #endif
  #if __cpp_lib_saturation_arithmetic
    using std::add_sat;
*************** export namespace std
*** 2512,2517 ****
--- 2525,2567 ----
      using std::regex_constants::operator|;
      using std::regex_constants::operator|=;
      using std::regex_constants::operator~;
+     using std::regex_constants::awk;
+     using std::regex_constants::basic;
+     using std::regex_constants::collate;
+     using std::regex_constants::ECMAScript;
+     using std::regex_constants::egrep;
+     using std::regex_constants::extended;
+     using std::regex_constants::grep;
+     using std::regex_constants::icase;
+     using std::regex_constants::multiline;
+     using std::regex_constants::nosubs;
+     using std::regex_constants::optimize;
+     using std::regex_constants::format_default;
+     using std::regex_constants::format_first_only;
+     using std::regex_constants::format_no_copy;
+     using std::regex_constants::format_sed;
+     using std::regex_constants::match_any;
+     using std::regex_constants::match_continuous;
+     using std::regex_constants::match_default;
+     using std::regex_constants::match_not_bol;
+     using std::regex_constants::match_not_bow;
+     using std::regex_constants::match_not_eol;
+     using std::regex_constants::match_not_eow;
+     using std::regex_constants::match_not_null;
+     using std::regex_constants::match_prev_avail;
+     using std::regex_constants::error_backref;
+     using std::regex_constants::error_badbrace;
+     using std::regex_constants::error_badrepeat;
+     using std::regex_constants::error_brace;
+     using std::regex_constants::error_brack;
+     using std::regex_constants::error_collate;
+     using std::regex_constants::error_complexity;
+     using std::regex_constants::error_ctype;
+     using std::regex_constants::error_escape;
+     using std::regex_constants::error_paren;
+     using std::regex_constants::error_range;
+     using std::regex_constants::error_space;
+     using std::regex_constants::error_stack;
    }
    using std::basic_regex;
    using std::csub_match;
*************** export namespace std
*** 3153,3158 ****
--- 3203,3212 ----
    using std::is_pointer_interconvertible_base_of_v;
    using std::is_pointer_interconvertible_with_class;
  #endif
+ #if __cpp_lib_is_scoped_enum
+   using std::is_scoped_enum;
+   using std::is_scoped_enum_v;
+ #endif
  }
  
  // <typeindex>
diff -Nrcpad gcc-16-20250803/libstdc++-v3/testsuite/std/memory/indirect/access.cc gcc-16-20250810/libstdc++-v3/testsuite/std/memory/indirect/access.cc
*** gcc-16-20250803/libstdc++-v3/testsuite/std/memory/indirect/access.cc	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/libstdc++-v3/testsuite/std/memory/indirect/access.cc	Sun Aug 10 22:33:16 2025
***************
*** 0 ****
--- 1,58 ----
+ // { dg-do run { target c++26 } }
+ 
+ #include <memory>
+ #include <vector>
+ 
+ #include <testsuite_hooks.h>
+ 
+ template<template<typename> class Indirect>
+ constexpr void
+ test_access()
+ {
+   const std::vector<int> src{1, 2, 3, 4, 5};
+   Indirect<std::vector<int>> i(src);
+   auto const& ci = i;
+   VERIFY( *i == src );
+   VERIFY( *ci == src );
+   VERIFY( *std::move(ci) == src );
+ 
+   std::vector<int>&& vr = *std::move(i);
+   VERIFY( vr == src );
+   VERIFY( *i == src );
+ 
+   std::vector<int> vc = *std::move(i);
+   VERIFY( vc == src );
+   VERIFY( vr.empty() );
+   VERIFY( i->empty() );
+   VERIFY( ci->empty() );
+ }
+ 
+ template<typename T>
+ struct PublicBase : std::indirect<T>
+ {
+   using std::indirect<T>::indirect;
+ };
+ 
+ template<typename T>
+ class PrivateBase : std::indirect<T>
+ {
+ public:	
+   using std::indirect<T>::indirect;
+   using std::indirect<T>::operator*;
+   using std::indirect<T>::operator->;
+ };
+ 
+ constexpr bool
+ test_all()
+ {
+   test_access<std::indirect>();
+   test_access<PublicBase>();
+   test_access<PrivateBase>();
+   return true;
+ }
+ 
+ int main()
+ {
+   test_all();
+   static_assert(test_all());
+ }
diff -Nrcpad gcc-16-20250803/libstdc++-v3/testsuite/std/memory/polymorphic/access.cc gcc-16-20250810/libstdc++-v3/testsuite/std/memory/polymorphic/access.cc
*** gcc-16-20250803/libstdc++-v3/testsuite/std/memory/polymorphic/access.cc	Thu Jan  1 00:00:00 1970
--- gcc-16-20250810/libstdc++-v3/testsuite/std/memory/polymorphic/access.cc	Sun Aug 10 22:33:16 2025
***************
*** 0 ****
--- 1,53 ----
+ // { dg-do run { target c++26 } }
+ 
+ #include <memory>
+ #include <vector>
+ 
+ #include <testsuite_hooks.h>
+ 
+ template<template<typename> class Polymorhpic>
+ constexpr void
+ test_access()
+ {
+   const std::vector<int> src{1, 2, 3, 4, 5};
+   Polymorhpic<std::vector<int>> i(src);
+   auto const& ci = i;
+   VERIFY( *i == src );
+   VERIFY( *ci == src );
+   VERIFY( *std::move(ci) == src );
+ 
+   auto&& vr = *std::move(i);
+   static_assert( std::is_same_v<decltype(vr), std::vector<int>&> );
+   VERIFY( vr == src );
+   VERIFY( *i == src );
+ }
+ 
+ template<typename T>
+ struct PublicBase : std::polymorphic<T>
+ {
+   using std::polymorphic<T>::polymorphic;
+ };
+ 
+ template<typename T>
+ class PrivateBase : std::polymorphic<T>
+ {
+ public:	
+   using std::polymorphic<T>::polymorphic;
+   using std::polymorphic<T>::operator*;
+   using std::polymorphic<T>::operator->;
+ };
+ 
+ constexpr bool
+ test_all()
+ {
+   test_access<std::polymorphic>();
+   test_access<PublicBase>();
+   test_access<PrivateBase>();
+   return true;
+ }
+ 
+ int main()
+ {
+   test_all();
+ //  static_assert(test_all());
+ }
