diff -Nrcpad gcc-14-20250829/LAST_UPDATED gcc-14-20250905/LAST_UPDATED
*** gcc-14-20250829/LAST_UPDATED	Fri Aug 29 22:33:06 2025
--- gcc-14-20250905/LAST_UPDATED	Fri Sep  5 22:35:17 2025
***************
*** 1 ****
! Obtained from git: releases/gcc-14 revision e645728e9de64d019661c8f92bb487e06d95644a
--- 1 ----
! Obtained from git: releases/gcc-14 revision f33c1508871870b352fd720c54dc9a48e04efb12
diff -Nrcpad gcc-14-20250829/MD5SUMS gcc-14-20250905/MD5SUMS
*** gcc-14-20250829/MD5SUMS	Fri Aug 29 22:33:13 2025
--- gcc-14-20250905/MD5SUMS	Fri Sep  5 22:35:29 2025
***************
*** 1,5 ****
  # This file contains the MD5 checksums of the files in the
! # gcc-14-20250829.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-14-20250905.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
*************** fc9280b02bc68e4fb1ef8d51ccc25061  Change
*** 23,29 ****
  fd4ecdf5d672efe2b0e409aca9cf9446  ChangeLog.jit
  09538b708302f1735f6fa05b622ecf5e  ChangeLog.tree-ssa
  24ab760126489e69436a43185dc3d202  INSTALL/README
! f57189c0bfda32af2ef13efd96d5043d  LAST_UPDATED
  1671040823f8eb8436a06fdd18065e02  MAINTAINERS
  304c3887135aefa27c21292ec585b0a3  Makefile.def
  8dd93fbf2e32bcbd2faba10e3b8ba2b0  Makefile.in
--- 23,29 ----
  fd4ecdf5d672efe2b0e409aca9cf9446  ChangeLog.jit
  09538b708302f1735f6fa05b622ecf5e  ChangeLog.tree-ssa
  24ab760126489e69436a43185dc3d202  INSTALL/README
! be0038431662814a19b13f0d0ba9ba2f  LAST_UPDATED
  1671040823f8eb8436a06fdd18065e02  MAINTAINERS
  304c3887135aefa27c21292ec585b0a3  Makefile.def
  8dd93fbf2e32bcbd2faba10e3b8ba2b0  Makefile.in
*************** bc7394806417778d77541ba1ec0e4a70  gcc/BA
*** 505,511 ****
  a916467b91076e631dd8edb7424769c7  gcc/COPYING.LIB
  d32239bcb673463ab874e80d47fae504  gcc/COPYING3
  6a6a8e020838b23406c81b19c1d46df6  gcc/COPYING3.LIB
! bdf8089a5773e349f16504b85212ab1d  gcc/ChangeLog
  a3b63c675afa7a655cc2bfa8a907af79  gcc/ChangeLog-1997
  d9a88529352a010253c2e8fb1ed6023b  gcc/ChangeLog-1998
  240f08f81cb4699e8b49347db38233db  gcc/ChangeLog-1999
--- 505,511 ----
  a916467b91076e631dd8edb7424769c7  gcc/COPYING.LIB
  d32239bcb673463ab874e80d47fae504  gcc/COPYING3
  6a6a8e020838b23406c81b19c1d46df6  gcc/COPYING3.LIB
! 0b317de7e7ccc0e089df4304cf505f35  gcc/ChangeLog
  a3b63c675afa7a655cc2bfa8a907af79  gcc/ChangeLog-1997
  d9a88529352a010253c2e8fb1ed6023b  gcc/ChangeLog-1998
  240f08f81cb4699e8b49347db38233db  gcc/ChangeLog-1999
*************** fb3fadb88e1d2b3b640cfaaa5ff11780  gcc/Ch
*** 541,547 ****
  3eb07e0b2e542409bf73d359f7f65609  gcc/ChangeLog.ptr
  e13638e26743ba41e6011b76cc00d9a9  gcc/ChangeLog.tree-ssa
  739ab47f6425bcea1d05e4fc0542de54  gcc/ChangeLog.tuples
! b31ed24229fa9d0b9db7d2b7b65fce34  gcc/DATESTAMP
  d41d8cd98f00b204e9800998ecf8427e  gcc/DEV-PHASE
  eb92e1ff5e982ca07e173e0eb286d243  gcc/FSFChangeLog
  30e1e33411566388b3164558482dc5e6  gcc/FSFChangeLog.10
--- 541,547 ----
  3eb07e0b2e542409bf73d359f7f65609  gcc/ChangeLog.ptr
  e13638e26743ba41e6011b76cc00d9a9  gcc/ChangeLog.tree-ssa
  739ab47f6425bcea1d05e4fc0542de54  gcc/ChangeLog.tuples
! 843484a7c15d76de663244a082305def  gcc/DATESTAMP
  d41d8cd98f00b204e9800998ecf8427e  gcc/DEV-PHASE
  eb92e1ff5e982ca07e173e0eb286d243  gcc/FSFChangeLog
  30e1e33411566388b3164558482dc5e6  gcc/FSFChangeLog.10
*************** b13ef89fa355900b2c561e2d521a5b36  gcc/gi
*** 6124,6130 ****
  6e42f92c5b3058251524074700ae9ef5  gcc/gimple-warn-recursion.cc
  c4e1e930218f4dce5ef2a3a3a6b23b3b  gcc/gimple.cc
  c4df74d81805c4bd5129d36bb2a68562  gcc/gimple.def
! 111dff63f363b5601fa6ea70225f869c  gcc/gimple.h
  38023efd45885e11111aa624febf5783  gcc/gimplify-me.cc
  85e953ee7730a9690d8c9449d974b5c9  gcc/gimplify-me.h
  b095d84eaceeaa85a2eb95e90a0bd6f2  gcc/gimplify.cc
--- 6124,6130 ----
  6e42f92c5b3058251524074700ae9ef5  gcc/gimple-warn-recursion.cc
  c4e1e930218f4dce5ef2a3a3a6b23b3b  gcc/gimple.cc
  c4df74d81805c4bd5129d36bb2a68562  gcc/gimple.def
! a258d10df4637ff8630240180753d325  gcc/gimple.h
  38023efd45885e11111aa624febf5783  gcc/gimplify-me.cc
  85e953ee7730a9690d8c9449d974b5c9  gcc/gimplify-me.h
  b095d84eaceeaa85a2eb95e90a0bd6f2  gcc/gimplify.cc
*************** e8a9eb01b9451a357155e7152df1c669  gcc/ta
*** 8060,8066 ****
  a05663c52c607143c607d3ecf1391979  gcc/targhooks.cc
  51d240e574a3f9ecec346d64a04ac634  gcc/targhooks.h
  f39fcaa8197187283ccfed40107b426d  gcc/testsuite/.gitattributes
! d2d5968f9f30208c1e776752bf45f54d  gcc/testsuite/ChangeLog
  862f04afbd87da2cc6bc432c3f28430f  gcc/testsuite/ChangeLog-1993-2007
  029a5d8dacd25eb5d4711452ac448e5b  gcc/testsuite/ChangeLog-2008
  13ac28c41d51b66b4ec40dba6bd50f39  gcc/testsuite/ChangeLog-2009
--- 8060,8066 ----
  a05663c52c607143c607d3ecf1391979  gcc/targhooks.cc
  51d240e574a3f9ecec346d64a04ac634  gcc/targhooks.h
  f39fcaa8197187283ccfed40107b426d  gcc/testsuite/.gitattributes
! 524daaedc148142bae2408423b49ebe8  gcc/testsuite/ChangeLog
  862f04afbd87da2cc6bc432c3f28430f  gcc/testsuite/ChangeLog-1993-2007
  029a5d8dacd25eb5d4711452ac448e5b  gcc/testsuite/ChangeLog-2008
  13ac28c41d51b66b4ec40dba6bd50f39  gcc/testsuite/ChangeLog-2009
*************** b912addc770944f54b5baa8db2467d9d  gcc/te
*** 75232,75238 ****
  c87152a8a84d546309327b3da89eb566  gcc/testsuite/gcc.target/i386/pr120427-3.c
  f5a1252b1fe24ea2b97ff3762c399ed9  gcc/testsuite/gcc.target/i386/pr120427-4.c
  16984aa55364473d08d90334f60bf59e  gcc/testsuite/gcc.target/i386/pr120427-5.c
- 42f04e2f72a90bf2d17b50fc75ebd985  gcc/testsuite/gcc.target/i386/pr120691.c
  e33b63cd8f6d60b286b2286424f25714  gcc/testsuite/gcc.target/i386/pr120908.c
  b03b1d817538a863277c823b5e4cdf75  gcc/testsuite/gcc.target/i386/pr12092-1.c
  06cf62e068f23c847b4e4ce15a37d992  gcc/testsuite/gcc.target/i386/pr121208-1a.c
--- 75232,75237 ----
*************** bbd02bc575b39b813abb3651cde980d7  libgcc
*** 111734,111740 ****
  867c89ef316cd7cb05511f42e5b62500  libgcc/config/ia64/vms-unwind.h
  ed33843cb7d615866bc3fb669b8efff7  libgcc/config/iq2000/lib2funcs.c
  102f7dad8ad6b54434a1b8313d1e42c4  libgcc/config/iq2000/t-iq2000
! 2ed18a3d3eea0b933b9f2417d9284f34  libgcc/config/libbid/ChangeLog
  5cd3e427016c3a5e21b5fc45a6d0c42c  libgcc/config/libbid/_addsub_dd.c
  e36dad1ba6d303d24d5fadbe7e922379  libgcc/config/libbid/_addsub_sd.c
  c44095a32e8f3d04293d78477872c817  libgcc/config/libbid/_addsub_td.c
--- 111733,111739 ----
  867c89ef316cd7cb05511f42e5b62500  libgcc/config/ia64/vms-unwind.h
  ed33843cb7d615866bc3fb669b8efff7  libgcc/config/iq2000/lib2funcs.c
  102f7dad8ad6b54434a1b8313d1e42c4  libgcc/config/iq2000/t-iq2000
! 5cd2094db90507e1720676c5a78dd01c  libgcc/config/libbid/ChangeLog
  5cd3e427016c3a5e21b5fc45a6d0c42c  libgcc/config/libbid/_addsub_dd.c
  e36dad1ba6d303d24d5fadbe7e922379  libgcc/config/libbid/_addsub_sd.c
  c44095a32e8f3d04293d78477872c817  libgcc/config/libbid/_addsub_td.c
*************** bfef0c39d2e18e1590bf85f6afaaf9c2  libgcc
*** 111834,111840 ****
  e836871902e82a5e376bdd0794f0beab  libgcc/config/libbid/bid128_2_str_tables.c
  4ae2e9585f7f68e0fbf01d51287ee599  libgcc/config/libbid/bid128_add.c
  afd6e2e596fa685d0a1669cde95a2097  libgcc/config/libbid/bid128_compare.c
! 11471081781702f652df5b1d0b066690  libgcc/config/libbid/bid128_div.c
  ebb538d19872d8a99961ff5bff534910  libgcc/config/libbid/bid128_fma.c
  b4411cdd1a08d141bc293d73b476350f  libgcc/config/libbid/bid128_logb.c
  618b888d97b3e477f9ec7a3aeaecced4  libgcc/config/libbid/bid128_minmax.c
--- 111833,111839 ----
  e836871902e82a5e376bdd0794f0beab  libgcc/config/libbid/bid128_2_str_tables.c
  4ae2e9585f7f68e0fbf01d51287ee599  libgcc/config/libbid/bid128_add.c
  afd6e2e596fa685d0a1669cde95a2097  libgcc/config/libbid/bid128_compare.c
! edd3de8d977c5e231a0ac0f5f1d5338f  libgcc/config/libbid/bid128_div.c
  ebb538d19872d8a99961ff5bff534910  libgcc/config/libbid/bid128_fma.c
  b4411cdd1a08d141bc293d73b476350f  libgcc/config/libbid/bid128_logb.c
  618b888d97b3e477f9ec7a3aeaecced4  libgcc/config/libbid/bid128_minmax.c
*************** b4411cdd1a08d141bc293d73b476350f  libgcc
*** 111842,111851 ****
  685109e3f821d2308e75eabd60b7cff4  libgcc/config/libbid/bid128_next.c
  59fb6c8023e798913180f27b241843ef  libgcc/config/libbid/bid128_noncomp.c
  21c548973d660b86b45f2a4d01332512  libgcc/config/libbid/bid128_quantize.c
! 8a8cada3474170d7be5d2a4949e5decc  libgcc/config/libbid/bid128_rem.c
  689924f7cf7e2db168f7e6a0e32592c6  libgcc/config/libbid/bid128_round_integral.c
  3e035478ac31ad563c4529f4e94b661e  libgcc/config/libbid/bid128_scalb.c
! dc5fcacfe386435130cf443bc410cc77  libgcc/config/libbid/bid128_sqrt.c
  fbb52269b4b1898aa3503298d3df8504  libgcc/config/libbid/bid128_string.c
  87935a519781386dadc978f45d99baa9  libgcc/config/libbid/bid128_to_int16.c
  1fa58480e7ba615dec06172276b43faf  libgcc/config/libbid/bid128_to_int32.c
--- 111841,111850 ----
  685109e3f821d2308e75eabd60b7cff4  libgcc/config/libbid/bid128_next.c
  59fb6c8023e798913180f27b241843ef  libgcc/config/libbid/bid128_noncomp.c
  21c548973d660b86b45f2a4d01332512  libgcc/config/libbid/bid128_quantize.c
! 00d8651e2b007712cca40554215bc45a  libgcc/config/libbid/bid128_rem.c
  689924f7cf7e2db168f7e6a0e32592c6  libgcc/config/libbid/bid128_round_integral.c
  3e035478ac31ad563c4529f4e94b661e  libgcc/config/libbid/bid128_scalb.c
! 633fa66d23625a4de253c7728f727b2a  libgcc/config/libbid/bid128_sqrt.c
  fbb52269b4b1898aa3503298d3df8504  libgcc/config/libbid/bid128_string.c
  87935a519781386dadc978f45d99baa9  libgcc/config/libbid/bid128_to_int16.c
  1fa58480e7ba615dec06172276b43faf  libgcc/config/libbid/bid128_to_int32.c
*************** e69ac31751a696953bcee1735bef9232  libgcc
*** 111859,111865 ****
  7b86f0cda7f0ee44ae4ea9111df00225  libgcc/config/libbid/bid32_to_bid64.c
  ad0c7c07db8339ffb3d1941979e21691  libgcc/config/libbid/bid64_add.c
  5410490c806940016bcd18ec6f4e3b68  libgcc/config/libbid/bid64_compare.c
! c58f910498e37d7a5793eb4a0804a26f  libgcc/config/libbid/bid64_div.c
  491fd7d68c1561e03c72183da257192a  libgcc/config/libbid/bid64_fma.c
  53c0af598ef8fef16cd6e60a76f46ba5  libgcc/config/libbid/bid64_logb.c
  c18adb58481dd52323c1699ca70eae22  libgcc/config/libbid/bid64_minmax.c
--- 111858,111864 ----
  7b86f0cda7f0ee44ae4ea9111df00225  libgcc/config/libbid/bid32_to_bid64.c
  ad0c7c07db8339ffb3d1941979e21691  libgcc/config/libbid/bid64_add.c
  5410490c806940016bcd18ec6f4e3b68  libgcc/config/libbid/bid64_compare.c
! 85706083cbcefdb982ae020a1b1d6c66  libgcc/config/libbid/bid64_div.c
  491fd7d68c1561e03c72183da257192a  libgcc/config/libbid/bid64_fma.c
  53c0af598ef8fef16cd6e60a76f46ba5  libgcc/config/libbid/bid64_logb.c
  c18adb58481dd52323c1699ca70eae22  libgcc/config/libbid/bid64_minmax.c
*************** c18adb58481dd52323c1699ca70eae22  libgcc
*** 111870,111876 ****
  1f540678e9e06f95f1f6e8a93d94be63  libgcc/config/libbid/bid64_rem.c
  6d0d318399debc04c93d5fc037e9e377  libgcc/config/libbid/bid64_round_integral.c
  c673253ed935f365ac12a9d23267789c  libgcc/config/libbid/bid64_scalb.c
! 521322e263c671f1414f58c5615ae24c  libgcc/config/libbid/bid64_sqrt.c
  605ff6e92d6c6d4ec1267e12bec6e5e5  libgcc/config/libbid/bid64_string.c
  5730f7689c31dfe1daef0f3918a022dc  libgcc/config/libbid/bid64_to_bid128.c
  18aef3e86c68de5a72b30ba1dae529ca  libgcc/config/libbid/bid64_to_int16.c
--- 111869,111875 ----
  1f540678e9e06f95f1f6e8a93d94be63  libgcc/config/libbid/bid64_rem.c
  6d0d318399debc04c93d5fc037e9e377  libgcc/config/libbid/bid64_round_integral.c
  c673253ed935f365ac12a9d23267789c  libgcc/config/libbid/bid64_scalb.c
! 084154ce854be3982cff3d9ca55f1eb6  libgcc/config/libbid/bid64_sqrt.c
  605ff6e92d6c6d4ec1267e12bec6e5e5  libgcc/config/libbid/bid64_string.c
  5730f7689c31dfe1daef0f3918a022dc  libgcc/config/libbid/bid64_to_bid128.c
  18aef3e86c68de5a72b30ba1dae529ca  libgcc/config/libbid/bid64_to_int16.c
*************** d828e38384c506bf5e7d5a3c02725a37  libssp
*** 123677,123683 ****
  7bb3c32ba0a48d1cf785305e1b783eb6  libssp/strncpy-chk.c
  a19c79c1d86436e86b0fee41e6cf6b15  libssp/vsnprintf-chk.c
  145156e880b03115b393070d0ed37be3  libssp/vsprintf-chk.c
! 0a9f34f3c8cdbd5ce650436ed6b115e9  libstdc++-v3/ChangeLog
  7aa6c40440a44fcf5ec94c066160c2f8  libstdc++-v3/ChangeLog-1998
  7aff86600b6a1ed3fa87305075a92db0  libstdc++-v3/ChangeLog-1999
  a6f28e8fc9bb07696a9e068b439a3a87  libstdc++-v3/ChangeLog-2000
--- 123676,123682 ----
  7bb3c32ba0a48d1cf785305e1b783eb6  libssp/strncpy-chk.c
  a19c79c1d86436e86b0fee41e6cf6b15  libssp/vsnprintf-chk.c
  145156e880b03115b393070d0ed37be3  libssp/vsprintf-chk.c
! e5c0d8825874b207f170d083dce99ae2  libstdc++-v3/ChangeLog
  7aa6c40440a44fcf5ec94c066160c2f8  libstdc++-v3/ChangeLog-1998
  7aff86600b6a1ed3fa87305075a92db0  libstdc++-v3/ChangeLog-1999
  a6f28e8fc9bb07696a9e068b439a3a87  libstdc++-v3/ChangeLog-2000
*************** a7e081671330fd3d6d40ef990c3a9db5  libstd
*** 124438,124444 ****
  033b17331af0c0e562ea71bc3e994022  libstdc++-v3/include/bits/regex.tcc
  c65f82851918475e6746a168a05feebc  libstdc++-v3/include/bits/regex_automaton.h
  9cee0eb35fa466590222459a3d2f6822  libstdc++-v3/include/bits/regex_automaton.tcc
! 14e00d3a19a80946ac410cc1e3f9992a  libstdc++-v3/include/bits/regex_compiler.h
  f64f26ffe7d3c4e14c3fc9498ff3ac07  libstdc++-v3/include/bits/regex_compiler.tcc
  9f5e9a67270f2372eb2a6c027d50d2c3  libstdc++-v3/include/bits/regex_constants.h
  ae4e407ef9be06b744708e5b1513d43f  libstdc++-v3/include/bits/regex_error.h
--- 124437,124443 ----
  033b17331af0c0e562ea71bc3e994022  libstdc++-v3/include/bits/regex.tcc
  c65f82851918475e6746a168a05feebc  libstdc++-v3/include/bits/regex_automaton.h
  9cee0eb35fa466590222459a3d2f6822  libstdc++-v3/include/bits/regex_automaton.tcc
! 9482c7d6ba7ea71c2b873bf8a81b7e9a  libstdc++-v3/include/bits/regex_compiler.h
  f64f26ffe7d3c4e14c3fc9498ff3ac07  libstdc++-v3/include/bits/regex_compiler.tcc
  9f5e9a67270f2372eb2a6c027d50d2c3  libstdc++-v3/include/bits/regex_constants.h
  ae4e407ef9be06b744708e5b1513d43f  libstdc++-v3/include/bits/regex_error.h
*************** c6032f2d838adebc4bc1d0950adc8b46  libstd
*** 124474,124480 ****
  36271e3f20bc16f50c53aec1236b4482  libstdc++-v3/include/bits/stl_multimap.h
  f5e8c41953cb4347962897fc765d5458  libstdc++-v3/include/bits/stl_multiset.h
  669eaba4823456e8a1e6a9e197c42f3b  libstdc++-v3/include/bits/stl_numeric.h
! c785de8b61fb2bf94f8d6382c08f962b  libstdc++-v3/include/bits/stl_pair.h
  8485f57bded7cb8f9b8b2e0fb2800e3a  libstdc++-v3/include/bits/stl_queue.h
  a3c6aa8aebb44198e86d15d59d6f59f8  libstdc++-v3/include/bits/stl_raw_storage_iter.h
  3d31700ac326c163f7b606ab559287ed  libstdc++-v3/include/bits/stl_relops.h
--- 124473,124479 ----
  36271e3f20bc16f50c53aec1236b4482  libstdc++-v3/include/bits/stl_multimap.h
  f5e8c41953cb4347962897fc765d5458  libstdc++-v3/include/bits/stl_multiset.h
  669eaba4823456e8a1e6a9e197c42f3b  libstdc++-v3/include/bits/stl_numeric.h
! 374756112e988839d875892a66893a3f  libstdc++-v3/include/bits/stl_pair.h
  8485f57bded7cb8f9b8b2e0fb2800e3a  libstdc++-v3/include/bits/stl_queue.h
  a3c6aa8aebb44198e86d15d59d6f59f8  libstdc++-v3/include/bits/stl_raw_storage_iter.h
  3d31700ac326c163f7b606ab559287ed  libstdc++-v3/include/bits/stl_relops.h
*************** c80d9a347ff1313df6f1fdcd6738adee  libstd
*** 124564,124570 ****
  cab8280692b763d2480d948d43977c57  libstdc++-v3/include/c_global/ciso646
  f010c5f8d1a591217c31fc2e8c98364a  libstdc++-v3/include/c_global/climits
  11ae858532969bfcfdbf40b0ea36cdbd  libstdc++-v3/include/c_global/clocale
! ea092e05f18094300888b3a746f04ea3  libstdc++-v3/include/c_global/cmath
  781951ffe444c3ebf3292bdd1385308d  libstdc++-v3/include/c_global/csetjmp
  d96a9a65818e7398cbd8731a87c642c8  libstdc++-v3/include/c_global/csignal
  48b7524df7011e4d38f9ee556a9cc265  libstdc++-v3/include/c_global/cstdalign
--- 124563,124569 ----
  cab8280692b763d2480d948d43977c57  libstdc++-v3/include/c_global/ciso646
  f010c5f8d1a591217c31fc2e8c98364a  libstdc++-v3/include/c_global/climits
  11ae858532969bfcfdbf40b0ea36cdbd  libstdc++-v3/include/c_global/clocale
! f417ee8e13e78e53a9dcb3b9887e3750  libstdc++-v3/include/c_global/cmath
  781951ffe444c3ebf3292bdd1385308d  libstdc++-v3/include/c_global/csetjmp
  d96a9a65818e7398cbd8731a87c642c8  libstdc++-v3/include/c_global/csignal
  48b7524df7011e4d38f9ee556a9cc265  libstdc++-v3/include/c_global/cstdalign
*************** e43c8d137c20c10ac051954a254c532c  libstd
*** 125066,125072 ****
  249c5b284bdb3604f610bc79d1337856  libstdc++-v3/include/std/coroutine
  fda97f7d0f416dde1ab9178ea99e5455  libstdc++-v3/include/std/deque
  ae64ad244c17b2990bf7800baac14798  libstdc++-v3/include/std/execution
! 9bfd85bc53277978862f2c4840fe93fa  libstdc++-v3/include/std/expected
  cff63c5eb4adb15a28919e1ffaaaa7be  libstdc++-v3/include/std/filesystem
  8a3b79b607b896a3c97a91f3071e063c  libstdc++-v3/include/std/format
  e529270e2d060c63cc3ae4dd24c06e2a  libstdc++-v3/include/std/forward_list
--- 125065,125071 ----
  249c5b284bdb3604f610bc79d1337856  libstdc++-v3/include/std/coroutine
  fda97f7d0f416dde1ab9178ea99e5455  libstdc++-v3/include/std/deque
  ae64ad244c17b2990bf7800baac14798  libstdc++-v3/include/std/execution
! d5e48180174990fff2552cd696c9e6e1  libstdc++-v3/include/std/expected
  cff63c5eb4adb15a28919e1ffaaaa7be  libstdc++-v3/include/std/filesystem
  8a3b79b607b896a3c97a91f3071e063c  libstdc++-v3/include/std/format
  e529270e2d060c63cc3ae4dd24c06e2a  libstdc++-v3/include/std/forward_list
*************** b0319ecb776f20bfc1b81173461f688d  libstd
*** 125081,125093 ****
  9b56c5b90a017cc2a126551287c6e7d0  libstdc++-v3/include/std/istream
  ab071c7c019b51dde910e875fd3981aa  libstdc++-v3/include/std/iterator
  de9d16c58c0525a3af601dd8a558357a  libstdc++-v3/include/std/latch
! 99a421f78b6fc19e7a8f953c32ab3ee9  libstdc++-v3/include/std/limits
  d2516f1592a95141d667a726c219a5b8  libstdc++-v3/include/std/list
  49f6e0e6000077ee2b3f2633f47e4925  libstdc++-v3/include/std/locale
  2d8375c801ecdd87116fe153d972e927  libstdc++-v3/include/std/map
  7d840f2456c0d2a16866065760922b47  libstdc++-v3/include/std/memory
  b95756c8b75f0ba0696fe0d53e25c2c8  libstdc++-v3/include/std/memory_resource
! b00cd66a2e29d16a92d1bba2dd0ac61a  libstdc++-v3/include/std/mutex
  b162db38fed9250df89cd38bf8a9f2a9  libstdc++-v3/include/std/numbers
  bdc0f4ffef7dc0e791075f89161516f2  libstdc++-v3/include/std/numeric
  d7b2e090e45e539512d63eec607efb27  libstdc++-v3/include/std/optional
--- 125080,125092 ----
  9b56c5b90a017cc2a126551287c6e7d0  libstdc++-v3/include/std/istream
  ab071c7c019b51dde910e875fd3981aa  libstdc++-v3/include/std/iterator
  de9d16c58c0525a3af601dd8a558357a  libstdc++-v3/include/std/latch
! 142818adeaa59c1cd072bb3ba5e9666b  libstdc++-v3/include/std/limits
  d2516f1592a95141d667a726c219a5b8  libstdc++-v3/include/std/list
  49f6e0e6000077ee2b3f2633f47e4925  libstdc++-v3/include/std/locale
  2d8375c801ecdd87116fe153d972e927  libstdc++-v3/include/std/map
  7d840f2456c0d2a16866065760922b47  libstdc++-v3/include/std/memory
  b95756c8b75f0ba0696fe0d53e25c2c8  libstdc++-v3/include/std/memory_resource
! 415a88ccbda1ed2a00dfb8d6bf021232  libstdc++-v3/include/std/mutex
  b162db38fed9250df89cd38bf8a9f2a9  libstdc++-v3/include/std/numbers
  bdc0f4ffef7dc0e791075f89161516f2  libstdc++-v3/include/std/numeric
  d7b2e090e45e539512d63eec607efb27  libstdc++-v3/include/std/optional
*************** e4f03d5dfa57d5a8255b0c8bdce62fb6  libstd
*** 125669,125675 ****
  fc0331b89589bcce1bc38b869d815949  libstdc++-v3/testsuite/18_support/new_delete_placement.cc
  8f60ad51c166f69fbdabbc0b8c7dd6ff  libstdc++-v3/testsuite/18_support/new_handler.cc
  03fdd09683bed8c302f360f37cd7a031  libstdc++-v3/testsuite/18_support/new_nothrow.cc
! 49e7685f2fc05cdd1dd5d2a404340058  libstdc++-v3/testsuite/18_support/numeric_limits/128bit.cc
  e9bcf06133e787fb3b5f8ccd563a2205  libstdc++-v3/testsuite/18_support/numeric_limits/29989.cc
  384ab89ec86da4c7dc85e5d057ed494e  libstdc++-v3/testsuite/18_support/numeric_limits/40856.cc
  1addfb90d0a3b060232a565d5cc95488  libstdc++-v3/testsuite/18_support/numeric_limits/char16_32_t.cc
--- 125668,125674 ----
  fc0331b89589bcce1bc38b869d815949  libstdc++-v3/testsuite/18_support/new_delete_placement.cc
  8f60ad51c166f69fbdabbc0b8c7dd6ff  libstdc++-v3/testsuite/18_support/new_handler.cc
  03fdd09683bed8c302f360f37cd7a031  libstdc++-v3/testsuite/18_support/new_nothrow.cc
! 457817958c82b8b3f75ec9e7b60e2627  libstdc++-v3/testsuite/18_support/numeric_limits/128bit.cc
  e9bcf06133e787fb3b5f8ccd563a2205  libstdc++-v3/testsuite/18_support/numeric_limits/29989.cc
  384ab89ec86da4c7dc85e5d057ed494e  libstdc++-v3/testsuite/18_support/numeric_limits/40856.cc
  1addfb90d0a3b060232a565d5cc95488  libstdc++-v3/testsuite/18_support/numeric_limits/char16_32_t.cc
*************** dc3a2cd47507d6f21e801bd45dbfd97b  libstd
*** 126049,126056 ****
--- 126048,126057 ----
  e860269ac09079a27b177fc3da2839e7  libstdc++-v3/testsuite/20_util/expected/cons.cc
  56411bbfdf1df328a5b305222e4527ed  libstdc++-v3/testsuite/20_util/expected/equality.cc
  f56847054b7eea85a598a3299216a456  libstdc++-v3/testsuite/20_util/expected/illformed_neg.cc
+ b6846002a3a56bb10b1621e1792c246a  libstdc++-v3/testsuite/20_util/expected/lwg3836.cc
  2fe263333a538ddd2a8cd7953725ff52  libstdc++-v3/testsuite/20_util/expected/lwg3877.cc
  8717f284befd8d0ee8fe1e50dcc6a7a7  libstdc++-v3/testsuite/20_util/expected/lwg3938.cc
+ 97aac511f36cb21427676e071c189c5a  libstdc++-v3/testsuite/20_util/expected/lwg4222.cc
  4824cecd15088232e3348b8bad95b2ce  libstdc++-v3/testsuite/20_util/expected/monadic.cc
  4bfafe03465669c57c9cf2717bc9b00e  libstdc++-v3/testsuite/20_util/expected/observers.cc
  8854ae6d49bfd2df3b2f3a9095f61fc4  libstdc++-v3/testsuite/20_util/expected/requirements.cc
*************** aeceb7ed4a37e0d5069368b492298fd2  libstd
*** 126668,126679 ****
  569d4f537539699020228db3183ae301  libstdc++-v3/testsuite/20_util/pair/astuple/constexpr_get_by_type.cc
  f2f2b91309730f195c55679493733944  libstdc++-v3/testsuite/20_util/pair/astuple/get-2.cc
  615717268a9494269a748b818516a857  libstdc++-v3/testsuite/20_util/pair/astuple/get.cc
! 5c2898a94510144572f642d26387084a  libstdc++-v3/testsuite/20_util/pair/astuple/get_by_type.cc
  3e35724c208766af1ed84086f2284e05  libstdc++-v3/testsuite/20_util/pair/astuple/get_by_type_neg.cc
  0441756220779ea66d01fd82ab2fcbb0  libstdc++-v3/testsuite/20_util/pair/astuple/get_neg.cc
  5f0d03c78883f0d5388117a60da7ebfa  libstdc++-v3/testsuite/20_util/pair/comparison_operators/constexpr.cc
  4e56b4719b84bc0f400050717f12c07d  libstdc++-v3/testsuite/20_util/pair/comparison_operators/constexpr_c++20.cc
  04fed045318edda260e590d9ad1630a6  libstdc++-v3/testsuite/20_util/pair/comparison_operators/lwg3865.cc
  0bfa2a6f102c47434fccf1cd29449891  libstdc++-v3/testsuite/20_util/pair/cons/92878_92947.cc
  c5964cf74c99c86ce570bfdb15835bb8  libstdc++-v3/testsuite/20_util/pair/cons/99957.cc
  a5671a9536df9d6651ad08288b3776b1  libstdc++-v3/testsuite/20_util/pair/cons/constexpr.cc
--- 126669,126681 ----
  569d4f537539699020228db3183ae301  libstdc++-v3/testsuite/20_util/pair/astuple/constexpr_get_by_type.cc
  f2f2b91309730f195c55679493733944  libstdc++-v3/testsuite/20_util/pair/astuple/get-2.cc
  615717268a9494269a748b818516a857  libstdc++-v3/testsuite/20_util/pair/astuple/get.cc
! c9c2091374ad00c54e83bf04b19d2115  libstdc++-v3/testsuite/20_util/pair/astuple/get_by_type.cc
  3e35724c208766af1ed84086f2284e05  libstdc++-v3/testsuite/20_util/pair/astuple/get_by_type_neg.cc
  0441756220779ea66d01fd82ab2fcbb0  libstdc++-v3/testsuite/20_util/pair/astuple/get_neg.cc
  5f0d03c78883f0d5388117a60da7ebfa  libstdc++-v3/testsuite/20_util/pair/comparison_operators/constexpr.cc
  4e56b4719b84bc0f400050717f12c07d  libstdc++-v3/testsuite/20_util/pair/comparison_operators/constexpr_c++20.cc
  04fed045318edda260e590d9ad1630a6  libstdc++-v3/testsuite/20_util/pair/comparison_operators/lwg3865.cc
+ de22916c6d33b4376c80895f09fe7345  libstdc++-v3/testsuite/20_util/pair/cons/110853.cc
  0bfa2a6f102c47434fccf1cd29449891  libstdc++-v3/testsuite/20_util/pair/cons/92878_92947.cc
  c5964cf74c99c86ce570bfdb15835bb8  libstdc++-v3/testsuite/20_util/pair/cons/99957.cc
  a5671a9536df9d6651ad08288b3776b1  libstdc++-v3/testsuite/20_util/pair/cons/constexpr.cc
*************** a05013dbea532a0e8adf37f8ae5e2e0d  libstd
*** 129606,129612 ****
  8a2444c44f89f5d64af1acb9a7f80aba  libstdc++-v3/testsuite/23_containers/unordered_set/operators/52309.cc
  53ad944f0b913c8294652175fb3cf323  libstdc++-v3/testsuite/23_containers/unordered_set/pmr_typedefs.cc
  781331541b6ee6fa95c2c158853d3883  libstdc++-v3/testsuite/23_containers/unordered_set/pmr_typedefs_debug.cc
! a93be04d5db06236670af5ee62d5c507  libstdc++-v3/testsuite/23_containers/unordered_set/pr115285.cc
  fade91ee94f454b455d87044a7b42dea  libstdc++-v3/testsuite/23_containers/unordered_set/range_access.cc
  c21131c685279060f173de7532d7984c  libstdc++-v3/testsuite/23_containers/unordered_set/requirements/52942.cc
  673c6fdd5e0635b7ca9e7706300d4270  libstdc++-v3/testsuite/23_containers/unordered_set/requirements/53067.cc
--- 129608,129614 ----
  8a2444c44f89f5d64af1acb9a7f80aba  libstdc++-v3/testsuite/23_containers/unordered_set/operators/52309.cc
  53ad944f0b913c8294652175fb3cf323  libstdc++-v3/testsuite/23_containers/unordered_set/pmr_typedefs.cc
  781331541b6ee6fa95c2c158853d3883  libstdc++-v3/testsuite/23_containers/unordered_set/pmr_typedefs_debug.cc
! 4a1a079c582e7959c6ee5f2cb8255a10  libstdc++-v3/testsuite/23_containers/unordered_set/pr115285.cc
  fade91ee94f454b455d87044a7b42dea  libstdc++-v3/testsuite/23_containers/unordered_set/range_access.cc
  c21131c685279060f173de7532d7984c  libstdc++-v3/testsuite/23_containers/unordered_set/requirements/52942.cc
  673c6fdd5e0635b7ca9e7706300d4270  libstdc++-v3/testsuite/23_containers/unordered_set/requirements/53067.cc
*************** a9371eca1def310151c76a30b432f8f4  libstd
*** 133114,133119 ****
--- 133116,133122 ----
  6edcba06b4872175448a92ca927140ee  libstdc++-v3/testsuite/30_threads/thread/native_handle/cancel.cc
  5da0087b1f4c4a37321692aea903ee72  libstdc++-v3/testsuite/30_threads/thread/native_handle/typesizes.cc
  85650ea69acc8067542b3ba070aafbab  libstdc++-v3/testsuite/30_threads/thread/swap/1.cc
+ ec30d5440c1422ca4216d48631bf8250  libstdc++-v3/testsuite/30_threads/timed_mutex/121496.cc
  b30217126b0de99c06b6b3f01a010427  libstdc++-v3/testsuite/30_threads/timed_mutex/cons/1.cc
  3ac0b06cbdce363a1e834490f371a3ee  libstdc++-v3/testsuite/30_threads/timed_mutex/cons/assign_neg.cc
  e5da47bb4a87780f44f63cce05d2c93c  libstdc++-v3/testsuite/30_threads/timed_mutex/cons/copy_neg.cc
diff -Nrcpad gcc-14-20250829/gcc/ChangeLog gcc-14-20250905/gcc/ChangeLog
*** gcc-14-20250829/gcc/ChangeLog	Fri Aug 29 22:32:13 2025
--- gcc-14-20250905/gcc/ChangeLog	Fri Sep  5 22:33:13 2025
***************
*** 1,3 ****
--- 1,10 ----
+ 2025-09-03  Benjamin Wu  <bwu25@cs.washington.edu>
+ 
+ 	Backported from master:
+ 	2025-07-13  Benjamin Wu  <bwu25@cs.washington.edu>
+ 
+ 	* gimple.h (GTMA_DOES_GO_IRREVOCABLE): Fix typo.
+ 
  2025-08-20  Martin Jambor  <mjambor@suse.cz>
  
  	Backported from master:
diff -Nrcpad gcc-14-20250829/gcc/DATESTAMP gcc-14-20250905/gcc/DATESTAMP
*** gcc-14-20250829/gcc/DATESTAMP	Fri Aug 29 22:32:13 2025
--- gcc-14-20250905/gcc/DATESTAMP	Fri Sep  5 22:33:13 2025
***************
*** 1 ****
! 20250829
--- 1 ----
! 20250905
diff -Nrcpad gcc-14-20250829/gcc/gimple.h gcc-14-20250905/gcc/gimple.h
*** gcc-14-20250829/gcc/gimple.h	Fri Aug 29 22:32:14 2025
--- gcc-14-20250905/gcc/gimple.h	Fri Sep  5 22:33:15 2025
*************** struct GTY((tag("GSS_ASSUME")))
*** 864,870 ****
     tell the runtime that it should begin the transaction in
     serial-irrevocable mode.  */
  #define GTMA_DOES_GO_IRREVOCABLE	(1u << 6)
! /* The transaction contains no instrumentation code whatsover, most
     likely because it is guaranteed to go irrevocable upon entry.  */
  #define GTMA_HAS_NO_INSTRUMENTATION	(1u << 7)
  
--- 864,870 ----
     tell the runtime that it should begin the transaction in
     serial-irrevocable mode.  */
  #define GTMA_DOES_GO_IRREVOCABLE	(1u << 6)
! /* The transaction contains no instrumentation code whatsoever, most
     likely because it is guaranteed to go irrevocable upon entry.  */
  #define GTMA_HAS_NO_INSTRUMENTATION	(1u << 7)
  
diff -Nrcpad gcc-14-20250829/gcc/testsuite/ChangeLog gcc-14-20250905/gcc/testsuite/ChangeLog
*** gcc-14-20250829/gcc/testsuite/ChangeLog	Fri Aug 29 22:32:16 2025
--- gcc-14-20250905/gcc/testsuite/ChangeLog	Fri Sep  5 22:33:19 2025
***************
*** 1,3 ****
--- 1,17 ----
+ 2025-08-30  liuhongt  <hongtao.liu@intel.com>
+ 
+ 	Revert:
+ 	2025-08-30  liuhongt  <hongtao.liu@intel.com>
+ 
+ 	* gcc.target/i386/pr120691.c: New test.
+ 
+ 2025-08-29  liuhongt  <hongtao.liu@intel.com>
+ 
+ 	Backported from master:
+ 	2025-08-29  liuhongt  <hongtao.liu@intel.com>
+ 
+ 	* gcc.target/i386/pr120691.c: New test.
+ 
  2025-08-22  Harald Anlauf  <anlauf@gmx.de>
  
  	Backported from master:
diff -Nrcpad gcc-14-20250829/gcc/testsuite/gcc.target/i386/pr120691.c gcc-14-20250905/gcc/testsuite/gcc.target/i386/pr120691.c
*** gcc-14-20250829/gcc/testsuite/gcc.target/i386/pr120691.c	Fri Aug 29 22:32:20 2025
--- gcc-14-20250905/gcc/testsuite/gcc.target/i386/pr120691.c	Thu Jan  1 00:00:00 1970
***************
*** 1,18 ****
- /* { dg-do run { target { ! ia32 } } } */
- /* { dg-options "-O0 -mfpmath=sse" } */
- /* { dg-require-effective-target fenv } */
- /* { dg-require-effective-target dfp } */
- 
- #include <fenv.h>
- 
- int   main()   {
-   fesetround( FE_UPWARD );
-   _Decimal128   x1 =  9825,  x2 =  10000 ;
- 
-   double c = (double) (x1 / x2);
- 
-   if (c != 0.9825)
-     __builtin_abort ();
- 
-   return   0 ;
- }
--- 0 ----
diff -Nrcpad gcc-14-20250829/libgcc/config/libbid/ChangeLog gcc-14-20250905/libgcc/config/libbid/ChangeLog
*** gcc-14-20250829/libgcc/config/libbid/ChangeLog	Fri Aug 29 22:32:24 2025
--- gcc-14-20250905/libgcc/config/libbid/ChangeLog	Fri Sep  5 22:34:28 2025
***************
*** 1,3 ****
--- 1,29 ----
+ 2025-08-30  liuhongt  <hongtao.liu@intel.com>
+ 
+ 	Revert:
+ 	2025-08-29  liuhongt  <hongtao.liu@intel.com>
+ 
+ 	PR target/120691
+ 	* bid128_div.c: Fix _Decimal128 arithmetic error under
+ 	FE_UPWARD.
+ 	* bid128_rem.c: Ditto.
+ 	* bid128_sqrt.c: Ditto.
+ 	* bid64_div.c (bid64_div): Ditto.
+ 	* bid64_sqrt.c (bid64_sqrt): Ditto.
+ 
+ 2025-08-29  liuhongt  <hongtao.liu@intel.com>
+ 
+ 	Backported from master:
+ 	2025-08-29  liuhongt  <hongtao.liu@intel.com>
+ 
+ 	PR target/120691
+ 	* bid128_div.c: Fix _Decimal128 arithmetic error under
+ 	FE_UPWARD.
+ 	* bid128_rem.c: Ditto.
+ 	* bid128_sqrt.c: Ditto.
+ 	* bid64_div.c (bid64_div): Ditto.
+ 	* bid64_sqrt.c (bid64_sqrt): Ditto.
+ 
  2025-05-23  Release Manager
  
  	* GCC 14.3.0 released.
diff -Nrcpad gcc-14-20250829/libgcc/config/libbid/bid128_div.c gcc-14-20250905/libgcc/config/libbid/bid128_div.c
*** gcc-14-20250829/libgcc/config/libbid/bid128_div.c	Fri Aug 29 22:32:24 2025
--- gcc-14-20250905/libgcc/config/libbid/bid128_div.c	Fri Sep  5 22:34:28 2025
*************** see the files COPYING3 and COPYING.RUNTI
*** 24,39 ****
  #define BID_128RES
  #include "bid_div_macros.h"
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
  #define FE_ALL_FLAGS FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW|FE_UNDERFLOW|FE_INEXACT
  #endif
- #include <stdio.h>
- #include <fenv.h>
  
  extern UINT32 convert_table[5][128][2];
  extern SINT8 factors[][2];
  extern UINT8 packed_10000_zeros[];
  
- 
  BID128_FUNCTION_ARG2 (bid128_div, x, y)
  
       UINT256 CA4, CA4r, P256;
--- 24,38 ----
  #define BID_128RES
  #include "bid_div_macros.h"
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
+ #include <fenv.h>
+ 
  #define FE_ALL_FLAGS FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW|FE_UNDERFLOW|FE_INEXACT
  #endif
  
  extern UINT32 convert_table[5][128][2];
  extern SINT8 factors[][2];
  extern UINT8 packed_10000_zeros[];
  
  BID128_FUNCTION_ARG2 (bid128_div, x, y)
  
       UINT256 CA4, CA4r, P256;
*************** BID128_FUNCTION_ARG2 (bid128_div, x, y)
*** 46,63 ****
         digits_q, amount;
       int nzeros, i, j, k, d5;
       unsigned rmode;
-      int old_rm, rm_changed=0;
- 
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
       fexcept_t binaryflags = 0;
  #endif
  
- // Set it to round-to-nearest (if different)
- if ((old_rm=fegetround()) != FE_TONEAREST) {
-   rm_changed=1;
-   fesetround(FE_TONEAREST);
- }
-   
  valid_y = unpack_BID128_value (&sign_y, &exponent_y, &CY, y);
  
    // unpack arguments, check for NaN or Infinity
--- 45,54 ----
*************** if ((x.w[1] & 0x7c00000000000000ull) ==
*** 71,78 ****
  #endif
    res.w[1] = (CX.w[1]) & QUIET_MASK64;
    res.w[0] = CX.w[0];
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
      // x is Infinity?
--- 62,67 ----
*************** if ((x.w[1] & 0x7800000000000000ull) ==
*** 86,93 ****
  #endif
      res.w[1] = 0x7c00000000000000ull;
      res.w[0] = 0;
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // y is NaN?
--- 75,80 ----
*************** if ((x.w[1] & 0x7800000000000000ull) ==
*** 98,105 ****
      res.w[1] = ((x.w[1] ^ y.w[1]) & 0x8000000000000000ull) |
        0x7800000000000000ull;
      res.w[0] = 0;
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
  }
--- 85,90 ----
*************** if ((y.w[1] & 0x7800000000000000ull) < 0
*** 112,119 ****
      // x=y=0, return NaN
      res.w[1] = 0x7c00000000000000ull;
      res.w[0] = 0;
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // return 0
--- 97,102 ----
*************** if ((y.w[1] & 0x7800000000000000ull) < 0
*** 125,132 ****
      exponent_x = 0;
    res.w[1] |= (((UINT64) exponent_x) << 49);
    res.w[0] = 0;
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  }
--- 108,113 ----
*************** if (!valid_y) {
*** 141,148 ****
  #endif
      res.w[1] = CY.w[1] & QUIET_MASK64;
      res.w[0] = CY.w[0];
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // y is Infinity?
--- 122,127 ----
*************** if (!valid_y) {
*** 150,157 ****
      // return +/-0
      res.w[1] = sign_x ^ sign_y;
      res.w[0] = 0;
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // y is 0, return +/-Inf
--- 129,134 ----
*************** if (!valid_y) {
*** 161,168 ****
    res.w[1] =
      ((x.w[1] ^ y.w[1]) & 0x8000000000000000ull) | 0x7800000000000000ull;
    res.w[0] = 0;
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
--- 138,143 ----
*************** if (__unsigned_compare_gt_128 (CY, CX))
*** 211,218 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
      (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // get number of decimal digits in CQ
--- 186,191 ----
*************** if (!CA4.w[0] && !CA4.w[1])
*** 406,413 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
    (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  #endif
--- 379,384 ----
*************** if (diff_expon >= 0) {
*** 498,505 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
    (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  
  }
--- 469,474 ----
*************** get_BID128 (&res, sign_x ^ sign_y, diff_
*** 508,515 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
  (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
- // restore the rounding mode back if it has been changed
- if (rm_changed) fesetround(old_rm);
  BID_RETURN (res);
  }
  
--- 477,482 ----
*************** TYPE0_FUNCTION_ARGTYPE1_ARGTYPE2 (UINT12
*** 529,545 ****
         digits_q, amount;
       int nzeros, i, j, k, d5;
       unsigned rmode;
-      int old_rm, rm_changed=0;
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
       fexcept_t binaryflags = 0;
  #endif
  
- // Set it to round-to-nearest (if different)
- if ((old_rm=fegetround()) != FE_TONEAREST) {
-   rm_changed=1;
-   fesetround(FE_TONEAREST);
- }
- 
  valid_y = unpack_BID64 (&sign_y, &exponent_y, &CY.w[0], y);
  
  	// unpack arguments, check for NaN or Infinity
--- 496,505 ----
*************** if ((x & NAN_MASK64) == NAN_MASK64) {
*** 559,566 ****
    res.w[0] = (CX.w[0] & 0x0003ffffffffffffull);
    __mul_64x64_to_128 (res, res.w[0], power10_table_128[18].w[0]);
    res.w[1] |= ((CX.w[0]) & 0xfc00000000000000ull);
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  	   // x is Infinity?
--- 519,524 ----
*************** if (((x) & 0x7800000000000000ull) == 0x7
*** 574,590 ****
  #endif
    res.w[1] = 0x7c00000000000000ull;
    res.w[0] = 0;
!   // restore the rounding mode back if it has been changed
!   if (rm_changed) fesetround(old_rm);
!   BID_RETURN (res);
    }
    if ((((y) & 0x7c00000000000000ull) != 0x7c00000000000000ull)) {
    // otherwise return +/-Inf
    res.w[1] =
      (((x) ^ (y)) & 0x8000000000000000ull) | 0x7800000000000000ull;
    res.w[0] = 0;
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
    }
  }
--- 532,544 ----
  #endif
    res.w[1] = 0x7c00000000000000ull;
    res.w[0] = 0;
!     BID_RETURN (res);
    }
    if ((((y) & 0x7c00000000000000ull) != 0x7c00000000000000ull)) {
    // otherwise return +/-Inf
    res.w[1] =
      (((x) ^ (y)) & 0x8000000000000000ull) | 0x7800000000000000ull;
    res.w[0] = 0;
    BID_RETURN (res);
    }
  }
*************** if ((((y) & 0x7800000000000000ull) != 0x
*** 597,604 ****
    // x=y=0, return NaN
    res.w[1] = 0x7c00000000000000ull;
    res.w[0] = 0;
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  	   // return 0
--- 551,556 ----
*************** else if (exponent_x < 0)
*** 614,621 ****
    exponent_x = 0;
  res.w[1] |= (((UINT64) exponent_x) << 49);
  res.w[0] = 0;
- // restore the rounding mode back if it has been changed
- if (rm_changed) fesetround(old_rm);
  BID_RETURN (res);
  }
  }
--- 566,571 ----
*************** if (!valid_y) {
*** 633,649 ****
    res.w[0] = (CY.w[0] & 0x0003ffffffffffffull);
    __mul_64x64_to_128 (res, res.w[0], power10_table_128[18].w[0]);
    res.w[1] |= ((CY.w[0]) & 0xfc00000000000000ull);
!   // restore the rounding mode back if it has been changed
!   if (rm_changed) fesetround(old_rm);
!   BID_RETURN (res);
    }
    // y is Infinity?
    if (((y) & 0x7800000000000000ull) == 0x7800000000000000ull) {
      // return +/-0
      res.w[1] = sign_x ^ sign_y;
      res.w[0] = 0;
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // y is 0, return +/-Inf
--- 583,595 ----
    res.w[0] = (CY.w[0] & 0x0003ffffffffffffull);
    __mul_64x64_to_128 (res, res.w[0], power10_table_128[18].w[0]);
    res.w[1] |= ((CY.w[0]) & 0xfc00000000000000ull);
!     BID_RETURN (res);
    }
    // y is Infinity?
    if (((y) & 0x7800000000000000ull) == 0x7800000000000000ull) {
      // return +/-0
      res.w[1] = sign_x ^ sign_y;
      res.w[0] = 0;
      BID_RETURN (res);
    }
    // y is 0, return +/-Inf
*************** if (!valid_y) {
*** 653,660 ****
  #ifdef SET_STATUS_FLAGS
    __set_status_flags (pfpsf, ZERO_DIVIDE_EXCEPTION);
  #endif
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
--- 599,604 ----
*************** if (__unsigned_compare_gt_128 (CY, CX))
*** 703,710 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
      (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // get number of decimal digits in CQ
--- 647,652 ----
*************** __div_256_by_128 (&CQ, &CA4, CY);
*** 901,908 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
      (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
  #endif
--- 843,848 ----
*************** if (diff_expon >= 0) {
*** 992,999 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
    (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  
  }
--- 932,937 ----
*************** get_BID128 (&res, sign_x ^ sign_y, diff_
*** 1002,1009 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
  (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
- // restore the rounding mode back if it has been changed
- if (rm_changed) fesetround(old_rm);
  BID_RETURN (res);
  }
  
--- 940,945 ----
*************** BID128_FUNCTION_ARGTYPE1_ARG128 (bid128d
*** 1019,1035 ****
         digits_q, amount;
       int nzeros, i, j, k, d5;
       unsigned rmode;
-      int old_rm, rm_changed=0;
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
       fexcept_t binaryflags = 0;
  #endif
  
- // Set it to round-to-nearest (if different)
- if ((old_rm=fegetround()) != FE_TONEAREST) {
-   rm_changed=1;
-   fesetround(FE_TONEAREST);
- }
- 
  valid_y = unpack_BID128_value (&sign_y, &exponent_y, &CY, y);
  
  	// unpack arguments, check for NaN or Infinity
--- 955,964 ----
*************** if ((x & NAN_MASK64) == NAN_MASK64) {
*** 1049,1056 ****
    res.w[0] = (CX.w[0] & 0x0003ffffffffffffull);
    __mul_64x64_to_128 (res, res.w[0], power10_table_128[18].w[0]);
    res.w[1] |= ((CX.w[0]) & 0xfc00000000000000ull);
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  	   // x is Infinity?
--- 978,983 ----
*************** if ((x & 0x7800000000000000ull) == 0x780
*** 1064,1071 ****
  #endif
      res.w[1] = 0x7c00000000000000ull;
      res.w[0] = 0;
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    if (((y.w[1] & 0x7c00000000000000ull) != 0x7c00000000000000ull)) {
--- 991,996 ----
*************** if ((x & 0x7800000000000000ull) == 0x780
*** 1073,1080 ****
    res.w[1] =
      ((x ^ y.w[1]) & 0x8000000000000000ull) | 0x7800000000000000ull;
    res.w[0] = 0;
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
    }
  }
--- 998,1003 ----
*************** if ((y.w[1] & INFINITY_MASK64) != INFINI
*** 1087,1094 ****
      // x=y=0, return NaN
      res.w[1] = 0x7c00000000000000ull;
      res.w[0] = 0;
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // return 0
--- 1010,1015 ----
*************** if ((y.w[1] & INFINITY_MASK64) != INFINI
*** 1100,1107 ****
      exponent_x = 0;
    res.w[1] |= (((UINT64) exponent_x) << 49);
    res.w[0] = 0;
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  }
--- 1021,1026 ----
*************** if (!valid_y) {
*** 1118,1125 ****
  #endif
      res.w[1] = CY.w[1] & QUIET_MASK64;
      res.w[0] = CY.w[0];
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // y is Infinity?
--- 1037,1042 ----
*************** if (!valid_y) {
*** 1127,1134 ****
      // return +/-0
      res.w[1] = sign_x ^ sign_y;
      res.w[0] = 0;
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // y is 0, return +/-Inf
--- 1044,1049 ----
*************** if (!valid_y) {
*** 1138,1145 ****
  #ifdef SET_STATUS_FLAGS
    __set_status_flags (pfpsf, ZERO_DIVIDE_EXCEPTION);
  #endif
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
--- 1053,1058 ----
*************** if (__unsigned_compare_gt_128 (CY, CX))
*** 1188,1195 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
      (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // get number of decimal digits in CQ
--- 1101,1106 ----
*************** __div_256_by_128 (&CQ, &CA4, CY);
*** 1389,1396 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
      (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
  #endif
--- 1300,1305 ----
*************** if (diff_expon >= 0) {
*** 1480,1487 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
    (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  
--- 1389,1394 ----
*************** get_BID128 (&res, sign_x ^ sign_y, diff_
*** 1489,1496 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
  (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
- // restore the rounding mode back if it has been changed
- if (rm_changed) fesetround(old_rm);
  BID_RETURN (res);
  
  }
--- 1396,1401 ----
*************** BID128_FUNCTION_ARG128_ARGTYPE2 (bid128q
*** 1506,1521 ****
       int exponent_x, exponent_y, bin_index, bin_expon, diff_expon, ed2,
         digits_q, amount;
       int nzeros, i, j, k, d5, rmode;
-      int old_rm, rm_changed=0;
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
       fexcept_t binaryflags = 0;
  #endif
  
- // Set it to round-to-nearest (if different)
- if ((old_rm=fegetround()) != FE_TONEAREST) {
-   rm_changed=1;
-   fesetround(FE_TONEAREST);
- }
  
  valid_y = unpack_BID64 (&sign_y, &exponent_y, &CY.w[0], y);
  	// unpack arguments, check for NaN or Infinity
--- 1411,1420 ----
*************** if ((x.w[1] & 0x7c00000000000000ull) ==
*** 1529,1536 ****
  #endif
    res.w[1] = (CX.w[1]) & QUIET_MASK64;
    res.w[0] = CX.w[0];
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
      // x is Infinity?
--- 1428,1433 ----
*************** if ((x.w[1] & 0x7800000000000000ull) ==
*** 1544,1551 ****
  #endif
      res.w[1] = 0x7c00000000000000ull;
      res.w[0] = 0;
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // y is NaN?
--- 1441,1446 ----
*************** if ((x.w[1] & 0x7800000000000000ull) ==
*** 1556,1563 ****
      res.w[1] = ((x.w[1] ^ y) & 0x8000000000000000ull) |
        0x7800000000000000ull;
      res.w[0] = 0;
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
  }
--- 1451,1456 ----
*************** if ((y & 0x7800000000000000ull) < 0x7800
*** 1570,1577 ****
      // x=y=0, return NaN
      res.w[1] = 0x7c00000000000000ull;
      res.w[0] = 0;
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // return 0
--- 1463,1468 ----
*************** if ((y & 0x7800000000000000ull) < 0x7800
*** 1583,1590 ****
      exponent_x = 0;
    res.w[1] |= (((UINT64) exponent_x) << 49);
    res.w[0] = 0;
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  }
--- 1474,1479 ----
*************** if (!valid_y) {
*** 1601,1617 ****
    res.w[0] = (CY.w[0] & 0x0003ffffffffffffull);
    __mul_64x64_to_128 (res, res.w[0], power10_table_128[18].w[0]);
    res.w[1] |= ((CY.w[0]) & 0xfc00000000000000ull);
!   // restore the rounding mode back if it has been changed
!   if (rm_changed) fesetround(old_rm);
!   BID_RETURN (res);
    }
    // y is Infinity?
    if ((y & INFINITY_MASK64) == INFINITY_MASK64) {
      // return +/-0
      res.w[1] = ((x.w[1] ^ y) & 0x8000000000000000ull);
      res.w[0] = 0;
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // y is 0
--- 1490,1502 ----
    res.w[0] = (CY.w[0] & 0x0003ffffffffffffull);
    __mul_64x64_to_128 (res, res.w[0], power10_table_128[18].w[0]);
    res.w[1] |= ((CY.w[0]) & 0xfc00000000000000ull);
!     BID_RETURN (res);
    }
    // y is Infinity?
    if ((y & INFINITY_MASK64) == INFINITY_MASK64) {
      // return +/-0
      res.w[1] = ((x.w[1] ^ y) & 0x8000000000000000ull);
      res.w[0] = 0;
      BID_RETURN (res);
    }
    // y is 0
*************** if (!valid_y) {
*** 1620,1627 ****
  #endif
    res.w[1] = (sign_x ^ sign_y) | INFINITY_MASK64;
    res.w[0] = 0;
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
--- 1505,1510 ----
*************** if (__unsigned_compare_gt_128 (CY, CX))
*** 1670,1677 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
      (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // get number of decimal digits in CQ
--- 1553,1558 ----
*************** __div_256_by_128 (&CQ, &CA4, CY);
*** 1868,1875 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
      (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
  #endif
--- 1749,1754 ----
*************** if (diff_expon >= 0) {
*** 1959,1966 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
    (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  
  }
--- 1838,1843 ----
*************** get_BID128 (&res, sign_x ^ sign_y, diff_
*** 1969,1976 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
  (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
- // restore the rounding mode back if it has been changed
- if (rm_changed) fesetround(old_rm);
  BID_RETURN (res);
  
  }
--- 1846,1851 ----
diff -Nrcpad gcc-14-20250829/libgcc/config/libbid/bid128_rem.c gcc-14-20250905/libgcc/config/libbid/bid128_rem.c
*** gcc-14-20250829/libgcc/config/libbid/bid128_rem.c	Fri Aug 29 22:32:24 2025
--- gcc-14-20250905/libgcc/config/libbid/bid128_rem.c	Fri Sep  5 22:34:28 2025
*************** see the files COPYING3 and COPYING.RUNTI
*** 23,29 ****
  
  #define BID_128RES
  #include "bid_div_macros.h"
- #include <fenv.h>
  
  
  BID128_FUNCTION_ARG2_NORND_CUSTOMRESTYPE (UINT128, bid128_rem, x, y)
--- 23,28 ----
*************** BID128_FUNCTION_ARG2_NORND_CUSTOMRESTYPE
*** 35,50 ****
       int_float f64, fx;
       int exponent_x, exponent_y, diff_expon, bin_expon_cx, scale,
         scale0;
-      int old_rm, rm_changed=0;
  
    // unpack arguments, check for NaN or Infinity
  
- // Set it to round-to-nearest (if different)
- if ((old_rm=fegetround()) != FE_TONEAREST) {
-   rm_changed=1;
-   fesetround(FE_TONEAREST);
- }
- 
  valid_y = unpack_BID128_value (&sign_y, &exponent_y, &CY, y);
  
  if (!unpack_BID128_value (&sign_x, &exponent_x, &CX, x)) {
--- 34,42 ----
*************** if ((x.w[1] & 0x7c00000000000000ull) ==
*** 60,67 ****
  #endif
    res.w[1] = CX.w[1] & QUIET_MASK64;
    res.w[0] = CX.w[0];
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
      // x is Infinity?
--- 52,57 ----
*************** if ((x.w[1] & 0x7800000000000000ull) ==
*** 76,83 ****
  #endif
      res.w[1] = 0x7c00000000000000ull;
      res.w[0] = 0;
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
  
--- 66,71 ----
*************** if ((!CY.w[1]) && (!CY.w[0])) {
*** 91,98 ****
    // x=y=0, return NaN
    res.w[1] = 0x7c00000000000000ull;
    res.w[0] = 0;
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  if (valid_y || ((y.w[1] & NAN_MASK64) == INFINITY_MASK64)) {
--- 79,84 ----
*************** if (valid_y || ((y.w[1] & NAN_MASK64) ==
*** 103,110 ****
  
    res.w[1] = sign_x | (((UINT64) exponent_x) << 49);
    res.w[0] = 0;
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  }
--- 89,94 ----
*************** if (!valid_y) {
*** 119,126 ****
  #endif
      res.w[1] = CY.w[1] & QUIET_MASK64;
      res.w[0] = CY.w[0];
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // y is Infinity?
--- 103,108 ----
*************** if (!valid_y) {
*** 128,135 ****
      // return x
      res.w[1] = x.w[1];
      res.w[0] = x.w[0];
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // y is 0
--- 110,115 ----
*************** if (!valid_y) {
*** 139,146 ****
  #endif
    res.w[1] = 0x7c00000000000000ull;
    res.w[0] = 0;
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  
--- 119,124 ----
*************** if (diff_expon <= 0) {
*** 152,159 ****
    if (diff_expon > 34) {
      // |x|<|y| in this case
      res = x;
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // set exponent of y to exponent_x, scale coefficient_y
--- 130,135 ----
*************** if (diff_expon <= 0) {
*** 163,170 ****
    if (P256.w[2] || P256.w[3]) {
      // |x|<|y| in this case
      res = x;
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
  
--- 139,144 ----
*************** if (diff_expon <= 0) {
*** 173,180 ****
    if (__unsigned_compare_ge_128 (P256, CX2)) {
      // |x|<|y| in this case
      res = x;
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
  
--- 147,152 ----
*************** if (diff_expon <= 0) {
*** 192,199 ****
    }
  
    get_BID128_very_fast (&res, sign_x, exponent_x, CR);
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
    // 2^64
--- 164,169 ----
*************** while (diff_expon > 0) {
*** 230,237 ****
    // check for remainder == 0
    if (!CX.w[1] && !CX.w[0]) {
      get_BID128_very_fast (&res, sign_x, exponent_y, CX);
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
  }
--- 200,205 ----
*************** if ((__unsigned_compare_gt_128 (CX2, CY)
*** 245,251 ****
  }
  
  get_BID128_very_fast (&res, sign_x, exponent_y, CX);
- // restore the rounding mode back if it has been changed
- if (rm_changed) fesetround(old_rm);
  BID_RETURN (res);
  }
--- 213,217 ----
diff -Nrcpad gcc-14-20250829/libgcc/config/libbid/bid128_sqrt.c gcc-14-20250905/libgcc/config/libbid/bid128_sqrt.c
*** gcc-14-20250829/libgcc/config/libbid/bid128_sqrt.c	Fri Aug 29 22:32:24 2025
--- gcc-14-20250905/libgcc/config/libbid/bid128_sqrt.c	Fri Sep  5 22:34:28 2025
*************** see the files COPYING3 and COPYING.RUNTI
*** 24,31 ****
  #define BID_128RES
  #include "bid_internal.h"
  #include "bid_sqrt_macros.h"
- #include <fenv.h>
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
  #define FE_ALL_FLAGS FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW|FE_UNDERFLOW|FE_INEXACT
  #endif
  
--- 24,32 ----
  #define BID_128RES
  #include "bid_internal.h"
  #include "bid_sqrt_macros.h"
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
+ #include <fenv.h>
+ 
  #define FE_ALL_FLAGS FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW|FE_UNDERFLOW|FE_INEXACT
  #endif
  
*************** BID128_FUNCTION_ARG1 (bid128_sqrt, x)
*** 38,54 ****
       int_float fx, f64;
       int exponent_x, bin_expon_cx;
       int digits, scale, exponent_q;
-      int old_rm, rm_changed=0;
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
       fexcept_t binaryflags = 0;
  #endif
  
- // Set it to round-to-nearest (if different)
- if ((old_rm=fegetround()) != FE_TONEAREST) {
-   rm_changed=1;
-   fesetround(FE_TONEAREST);
- }
- 
    // unpack arguments, check for NaN or Infinity
  if (!unpack_BID128_value (&sign_x, &exponent_x, &CX, x)) {
  res.w[1] = CX.w[1];
--- 39,48 ----
*************** if ((x.w[1] & 0x7c00000000000000ull) ==
*** 60,67 ****
      __set_status_flags (pfpsf, INVALID_EXCEPTION);
  #endif
    res.w[1] = CX.w[1] & QUIET_MASK64;
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
      // x is Infinity?
--- 54,59 ----
*************** if ((x.w[1] & 0x7800000000000000ull) ==
*** 74,81 ****
      __set_status_flags (pfpsf, INVALID_EXCEPTION);
  #endif
    }
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
      // x is 0 otherwise
--- 66,71 ----
*************** res.w[1] =
*** 84,91 ****
    sign_x |
    ((((UINT64) (exponent_x + DECIMAL_EXPONENT_BIAS_128)) >> 1) << 49);
  res.w[0] = 0;
- // restore the rounding mode back if it has been changed
- if (rm_changed) fesetround(old_rm);
  BID_RETURN (res);
  }
  if (sign_x) {
--- 74,79 ----
*************** if (sign_x) {
*** 94,101 ****
  #ifdef SET_STATUS_FLAGS
    __set_status_flags (pfpsf, INVALID_EXCEPTION);
  #endif
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
--- 82,87 ----
*************** if (CS.w[0] * CS.w[0] == A10.w[0]) {
*** 131,138 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
      (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
  }
--- 117,122 ----
*************** get_BID128_fast (&res, 0,
*** 304,311 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
  (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
- // restore the rounding mode back if it has been changed
- if (rm_changed) fesetround(old_rm);
  BID_RETURN (res);
  }
  
--- 288,293 ----
*************** BID128_FUNCTION_ARGTYPE1 (bid128d_sqrt,
*** 320,337 ****
       int_float fx, f64;
       int exponent_x, bin_expon_cx;
       int digits, scale, exponent_q;
-      int old_rm, rm_changed=0;
- 
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
       fexcept_t binaryflags = 0;
  #endif
  
- // Set it to round-to-nearest (if different)
- if ((old_rm=fegetround()) != FE_TONEAREST) {
-   rm_changed=1;
-   fesetround(FE_TONEAREST);
- }
- 
  	// unpack arguments, check for NaN or Infinity
     // unpack arguments, check for NaN or Infinity
  CX.w[1] = 0;
--- 302,311 ----
*************** if ((x & 0x7c00000000000000ull) == 0x7c0
*** 347,354 ****
    res.w[0] = (CX.w[0] & 0x0003ffffffffffffull);
    __mul_64x64_to_128 (res, res.w[0], power10_table_128[18].w[0]);
    res.w[1] |= ((CX.w[0]) & 0xfc00000000000000ull);
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  	   // x is Infinity?
--- 321,326 ----
*************** if ((x & 0x7800000000000000ull) == 0x780
*** 360,367 ****
      __set_status_flags (pfpsf, INVALID_EXCEPTION);
  #endif
    }
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  	   // x is 0 otherwise
--- 332,337 ----
*************** res.w[1] =
*** 372,379 ****
    sign_x | ((((UINT64) (exponent_x + DECIMAL_EXPONENT_BIAS_128)) >> 1)
  	    << 49);
  res.w[0] = 0;
- // restore the rounding mode back if it has been changed
- if (rm_changed) fesetround(old_rm);
  BID_RETURN (res);
  }
  if (sign_x) {
--- 342,347 ----
*************** if (sign_x) {
*** 382,389 ****
  #ifdef SET_STATUS_FLAGS
    __set_status_flags (pfpsf, INVALID_EXCEPTION);
  #endif
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
--- 350,355 ----
*************** if (CS.w[0] * CS.w[0] == A10.w[0]) {
*** 421,428 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
      (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
  }
--- 387,392 ----
*************** get_BID128_fast (&res, 0, (exponent_q +
*** 594,601 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
  (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
- // restore the rounding mode back if it has been changed
- if (rm_changed) fesetround(old_rm);
  BID_RETURN (res);
  
  }
--- 558,564 ----
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
  (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
  BID_RETURN (res);
  
+ 
  }
diff -Nrcpad gcc-14-20250829/libgcc/config/libbid/bid64_div.c gcc-14-20250905/libgcc/config/libbid/bid64_div.c
*** gcc-14-20250829/libgcc/config/libbid/bid64_div.c	Fri Aug 29 22:32:24 2025
--- gcc-14-20250905/libgcc/config/libbid/bid64_div.c	Fri Sep  5 22:34:28 2025
*************** see the files COPYING3 and COPYING.RUNTI
*** 55,62 ****
  
  #include "bid_internal.h"
  #include "bid_div_macros.h"
- #include <fenv.h>
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
  #define FE_ALL_FLAGS FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW|FE_UNDERFLOW|FE_INEXACT
  #endif
  
--- 55,63 ----
  
  #include "bid_internal.h"
  #include "bid_div_macros.h"
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
+ #include <fenv.h>
+ 
  #define FE_ALL_FLAGS FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW|FE_UNDERFLOW|FE_INEXACT
  #endif
  
*************** extern UINT32 convert_table[5][128][2];
*** 64,69 ****
--- 65,71 ----
  extern SINT8 factors[][2];
  extern UINT8 packed_10000_zeros[];
  
+ 
  #if DECIMAL_CALL_BY_REFERENCE
  
  void
*************** bid64_div (UINT64 x,
*** 92,98 ****
    int rmode, amount;
    int nzeros, i, j, k, d5;
    UINT32 QX32, tdigit[3], digit, digit_h, digit_low;
-   int old_rm, rm_changed=0;
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
    fexcept_t binaryflags = 0;
  #endif
--- 94,99 ----
*************** bid64_div (UINT64 x,
*** 105,116 ****
    y = *py;
  #endif
  
-   // Set it to round-to-nearest (if different)
-   if ((old_rm=fegetround()) != FE_TONEAREST) {
-     rm_changed=1;
-     fesetround(FE_TONEAREST);
-   }
- 
    valid_x = unpack_BID64 (&sign_x, &exponent_x, &coefficient_x, x);
    valid_y = unpack_BID64 (&sign_y, &exponent_y, &coefficient_y, y);
  
--- 106,111 ----
*************** bid64_div (UINT64 x,
*** 128,135 ****
        if ((x & SNAN_MASK64) == SNAN_MASK64)	// sNaN
  	__set_status_flags (pfpsf, INVALID_EXCEPTION);
  #endif
-       // restore the rounding mode back if it has been changed
-       if (rm_changed) fesetround(old_rm);
        BID_RETURN (coefficient_x & QUIET_MASK64);
      }
      // x is Infinity?
--- 123,128 ----
*************** bid64_div (UINT64 x,
*** 141,154 ****
  #ifdef SET_STATUS_FLAGS
  	  __set_status_flags (pfpsf, INVALID_EXCEPTION);
  #endif
-           // restore the rounding mode back if it has been changed
-           if (rm_changed) fesetround(old_rm);
  	  BID_RETURN (NAN_MASK64);
  	}
        } else {
  	// otherwise return +/-Inf
-         // restore the rounding mode back if it has been changed
-         if (rm_changed) fesetround(old_rm);
  	BID_RETURN (((x ^ y) & 0x8000000000000000ull) |
  		    INFINITY_MASK64);
        }
--- 134,143 ----
*************** bid64_div (UINT64 x,
*** 160,167 ****
  #ifdef SET_STATUS_FLAGS
        __set_status_flags (pfpsf, INVALID_EXCEPTION);
  #endif
-       // restore the rounding mode back if it has been changed
-       if (rm_changed) fesetround(old_rm);
        BID_RETURN (NAN_MASK64);
      }
      if (((y & INFINITY_MASK64) != INFINITY_MASK64)) {
--- 149,154 ----
*************** bid64_div (UINT64 x,
*** 176,183 ****
  	exponent_x = DECIMAL_MAX_EXPON_64;
        else if (exponent_x < 0)
  	exponent_x = 0;
-       // restore the rounding mode back if it has been changed
-       if (rm_changed) fesetround(old_rm);
        BID_RETURN ((sign_x ^ sign_y) | (((UINT64) exponent_x) << 53));
      }
  
--- 163,168 ----
*************** bid64_div (UINT64 x,
*** 191,213 ****
        if ((y & SNAN_MASK64) == SNAN_MASK64)	// sNaN
  	__set_status_flags (pfpsf, INVALID_EXCEPTION);
  #endif
-       // restore the rounding mode back if it has been changed
-       if (rm_changed) fesetround(old_rm);
        BID_RETURN (coefficient_y & QUIET_MASK64);
      }
      // y is Infinity?
      if ((y & INFINITY_MASK64) == INFINITY_MASK64) {
        // return +/-0
-       // restore the rounding mode back if it has been changed
-       if (rm_changed) fesetround(old_rm);
        BID_RETURN (((x ^ y) & 0x8000000000000000ull));
      }
      // y is 0
  #ifdef SET_STATUS_FLAGS
      __set_status_flags (pfpsf, ZERO_DIVIDE_EXCEPTION);
  #endif
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN ((sign_x ^ sign_y) | INFINITY_MASK64);
    }
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
--- 176,192 ----
*************** bid64_div (UINT64 x,
*** 276,283 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
        (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-       // restore the rounding mode back if it has been changed
-       if (rm_changed) fesetround(old_rm);
        BID_RETURN (res);
      }
      // get decimal digits of Q
--- 255,260 ----
*************** bid64_div (UINT64 x,
*** 447,454 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
        (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-       // restore the rounding mode back if it has been changed
-       if (rm_changed) fesetround(old_rm);
        BID_RETURN (res);
      }
    }
--- 424,429 ----
*************** bid64_div (UINT64 x,
*** 519,526 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
      (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    } else {
      // UF occurs
--- 494,499 ----
*************** bid64_div (UINT64 x,
*** 537,544 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
      (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
  
    }
--- 510,515 ----
*************** int exponent_x, exponent_y, bin_index, b
*** 557,573 ****
    digits_q, amount;
  int nzeros, i, j, k, d5, done = 0;
  unsigned rmode;
- int old_rm, rm_changed=0;
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
  fexcept_t binaryflags = 0;
  #endif
  
- // Set it to round-to-nearest (if different)
- if ((old_rm=fegetround()) != FE_TONEAREST) {
-   rm_changed=1;
-   fesetround(FE_TONEAREST);
- }
- 
  valid_y = unpack_BID128_value (&sign_y, &exponent_y, &CY, y);
  
  	// unpack arguments, check for NaN or Infinity
--- 528,537 ----
*************** if (!unpack_BID64 (&sign_x, &exponent_x,
*** 581,588 ****
    // test if x is NaN
    if (((x) & 0x7c00000000000000ull) == 0x7c00000000000000ull) {
      res = CX.w[0];
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res & QUIET_MASK64);
    }
    // x is Infinity?
--- 545,550 ----
*************** if (!unpack_BID64 (&sign_x, &exponent_x,
*** 595,612 ****
        __set_status_flags (pfpsf, INVALID_EXCEPTION);
  #endif
        res = 0x7c00000000000000ull;
-       // restore the rounding mode back if it has been changed
-       if (rm_changed) fesetround(old_rm);
-       BID_RETURN (res);
-     }
-     if (((y.w[1] & 0x7c00000000000000ull) != 0x7c00000000000000ull)) {
-       // otherwise return +/-Inf
-       res =
- 	(((x) ^ y.w[1]) & 0x8000000000000000ull) | 0x7800000000000000ull;
-       // restore the rounding mode back if it has been changed
-       if (rm_changed) fesetround(old_rm);
        BID_RETURN (res);
      }
    }
    // x is 0
    if ((y.w[1] & INFINITY_MASK64) != INFINITY_MASK64) {
--- 557,570 ----
        __set_status_flags (pfpsf, INVALID_EXCEPTION);
  #endif
        res = 0x7c00000000000000ull;
        BID_RETURN (res);
      }
+ 	if (((y.w[1] & 0x7c00000000000000ull) != 0x7c00000000000000ull)) {
+     // otherwise return +/-Inf
+     res =
+       (((x) ^ y.w[1]) & 0x8000000000000000ull) | 0x7800000000000000ull;
+     BID_RETURN (res);
+ 	}
    }
    // x is 0
    if ((y.w[1] & INFINITY_MASK64) != INFINITY_MASK64) {
*************** if (!unpack_BID64 (&sign_x, &exponent_x,
*** 616,623 ****
  #endif
        // x=y=0, return NaN
        res = 0x7c00000000000000ull;
-       // restore the rounding mode back if it has been changed
-       if (rm_changed) fesetround(old_rm);
        BID_RETURN (res);
      }
      // return 0
--- 574,579 ----
*************** if (!unpack_BID64 (&sign_x, &exponent_x,
*** 628,635 ****
      else if (exponent_x < 0)
        exponent_x = 0;
      res |= (((UINT64) exponent_x) << 53);
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
  }
--- 584,589 ----
*************** if (!valid_y) {
*** 650,665 ****
      amount = recip_scale[18];
      __shr_128 (Tmp, Qh, amount);
      res = (CY.w[1] & 0xfc00000000000000ull) | Tmp.w[0];
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // y is Infinity?
    if ((y.w[1] & 0x7800000000000000ull) == 0x7800000000000000ull) {
      // return +/-0
      res = sign_x ^ sign_y;
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // y is 0, return +/-Inf
--- 604,615 ----
*************** if (!valid_y) {
*** 668,675 ****
  #ifdef SET_STATUS_FLAGS
    __set_status_flags (pfpsf, ZERO_DIVIDE_EXCEPTION);
  #endif
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
--- 618,623 ----
*************** if (__unsigned_compare_gt_128 (CY, CX))
*** 732,739 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
        (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-       // restore the rounding mode back if it has been changed
-       if (rm_changed) fesetround(old_rm);
        BID_RETURN (res);
      }
  
--- 680,685 ----
*************** if (!done) {
*** 870,886 ****
  
        }
      }
!     if(diff_expon>=0){
!       res =
! 	fast_get_BID64_check_OF (sign_x ^ sign_y, diff_expon, CQ.w[0],
! 				 rnd_mode, pfpsf);
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
      (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
!       // restore the rounding mode back if it has been changed
!       if (rm_changed) fesetround(old_rm);
!       BID_RETURN (res);
!     }
    }
  #endif
  
--- 816,830 ----
  
        }
      }
! 	if(diff_expon>=0){
!     res =
!       fast_get_BID64_check_OF (sign_x ^ sign_y, diff_expon, CQ.w[0],
! 			       rnd_mode, pfpsf);
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
      (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
!     BID_RETURN (res);
! 	}
    }
  #endif
  
*************** if (!done) {
*** 961,968 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
      (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    } else {
      // UF occurs
--- 905,910 ----
*************** if (!done) {
*** 979,987 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
      (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
  
  }
--- 921,928 ----
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
      (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
      BID_RETURN (res);
+ 
    }
  
  }
*************** int exponent_x, exponent_y, bin_index, b
*** 1001,1018 ****
    digits_q, amount;
  int nzeros, i, j, k, d5, done = 0;
  unsigned rmode;
- int old_rm, rm_changed=0;
- 
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
  fexcept_t binaryflags = 0;
  #endif
  
- // Set it to round-to-nearest (if different)
- if ((old_rm=fegetround()) != FE_TONEAREST) {
-   rm_changed=1;
-   fesetround(FE_TONEAREST);
- }
- 
  valid_y = unpack_BID64 (&sign_y, &exponent_y, &CY.w[0], (y));
  
  	// unpack arguments, check for NaN or Infinity
--- 942,951 ----
*************** if (!unpack_BID128_value (&sign_x, &expo
*** 1031,1039 ****
        amount = recip_scale[18];
        __shr_128 (Tmp, Qh, amount);
        res = (CX.w[1] & 0xfc00000000000000ull) | Tmp.w[0];
!       // restore the rounding mode back if it has been changed
!       if (rm_changed) fesetround(old_rm);
!       BID_RETURN (res);
    }
    // x is Infinity?
    if ((x.w[1] & 0x7800000000000000ull) == 0x7800000000000000ull) {
--- 964,970 ----
        amount = recip_scale[18];
        __shr_128 (Tmp, Qh, amount);
        res = (CX.w[1] & 0xfc00000000000000ull) | Tmp.w[0];
!     BID_RETURN (res);
    }
    // x is Infinity?
    if ((x.w[1] & 0x7800000000000000ull) == 0x7800000000000000ull) {
*************** if (!unpack_BID128_value (&sign_x, &expo
*** 1045,1062 ****
        __set_status_flags (pfpsf, INVALID_EXCEPTION);
  #endif
        res = 0x7c00000000000000ull;
-       // restore the rounding mode back if it has been changed
-       if (rm_changed) fesetround(old_rm);
-       BID_RETURN (res);
-     }
-     if (((y & 0x7c00000000000000ull) != 0x7c00000000000000ull)) {
-       // otherwise return +/-Inf
-       res =
- 	((x.w[1] ^ (y)) & 0x8000000000000000ull) | 0x7800000000000000ull;
-       // restore the rounding mode back if it has been changed
-       if (rm_changed) fesetround(old_rm);
        BID_RETURN (res);
      }
    }
    // x is 0
    if (((y & INFINITY_MASK64) != INFINITY_MASK64) &&
--- 976,989 ----
        __set_status_flags (pfpsf, INVALID_EXCEPTION);
  #endif
        res = 0x7c00000000000000ull;
        BID_RETURN (res);
      }
+ 	if (((y & 0x7c00000000000000ull) != 0x7c00000000000000ull)) {
+     // otherwise return +/-Inf
+     res =
+       ((x.w[1] ^ (y)) & 0x8000000000000000ull) | 0x7800000000000000ull;
+     BID_RETURN (res);
+ 	}
    }
    // x is 0
    if (((y & INFINITY_MASK64) != INFINITY_MASK64) &&
*************** if (!unpack_BID128_value (&sign_x, &expo
*** 1066,1086 ****
  #endif
      // x=y=0, return NaN
      res = 0x7c00000000000000ull;
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // return 0
    if (((y & 0x7800000000000000ull) != 0x7800000000000000ull)) {
!     if (!CY.w[0]) {
  #ifdef SET_STATUS_FLAGS
        __set_status_flags (pfpsf, INVALID_EXCEPTION);
  #endif
        res = 0x7c00000000000000ull;
-       // restore the rounding mode back if it has been changed
-       if (rm_changed) fesetround(old_rm);
        BID_RETURN (res);
!     }
      exponent_x =
        exponent_x - exponent_y - DECIMAL_EXPONENT_BIAS_128 +
        (DECIMAL_EXPONENT_BIAS << 1);
--- 993,1009 ----
  #endif
      // x=y=0, return NaN
      res = 0x7c00000000000000ull;
      BID_RETURN (res);
    }
    // return 0
    if (((y & 0x7800000000000000ull) != 0x7800000000000000ull)) {
! 	  if (!CY.w[0]) {
  #ifdef SET_STATUS_FLAGS
        __set_status_flags (pfpsf, INVALID_EXCEPTION);
  #endif
        res = 0x7c00000000000000ull;
        BID_RETURN (res);
! 	  }
      exponent_x =
        exponent_x - exponent_y - DECIMAL_EXPONENT_BIAS_128 +
        (DECIMAL_EXPONENT_BIAS << 1);
*************** if (!unpack_BID128_value (&sign_x, &expo
*** 1089,1096 ****
      else if (exponent_x < 0)
        exponent_x = 0;
      res = (sign_x ^ sign_y) | (((UINT64) exponent_x) << 53);
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
  }
--- 1012,1017 ----
*************** if (!valid_y) {
*** 1104,1119 ****
      if ((y & SNAN_MASK64) == SNAN_MASK64)	// sNaN
        __set_status_flags (pfpsf, INVALID_EXCEPTION);
  #endif
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (CY.w[0] & QUIET_MASK64);
    }
    // y is Infinity?
    if (((y) & 0x7800000000000000ull) == 0x7800000000000000ull) {
      // return +/-0
      res = sign_x ^ sign_y;
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // y is 0, return +/-Inf
--- 1025,1036 ----
*************** if (!valid_y) {
*** 1122,1129 ****
  #ifdef SET_STATUS_FLAGS
    __set_status_flags (pfpsf, ZERO_DIVIDE_EXCEPTION);
  #endif
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
--- 1039,1044 ----
*************** if (__unsigned_compare_gt_128 (CY, CX))
*** 1188,1195 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
        (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-       // restore the rounding mode back if it has been changed
-       if (rm_changed) fesetround(old_rm);
        BID_RETURN (res);
      }
  
--- 1103,1108 ----
*************** if (!done) {
*** 1246,1349 ****
  #endif
  #ifndef LEAVE_TRAILING_ZEROS
      // check whether result is exact
!     {
!       if(!done) {
! 	// check whether CX, CY are short
! 	if (!CX.w[1] && !CY.w[1] && (CX.w[0] <= 1024) && (CY.w[0] <= 1024)) {
! 	  i = (int) CY.w[0] - 1;
! 	  j = (int) CX.w[0] - 1;
! 	  // difference in powers of 2 factors for Y and X
! 	  nzeros = ed2 - factors[i][0] + factors[j][0];
! 	  // difference in powers of 5 factors
! 	  d5 = ed2 - factors[i][1] + factors[j][1];
! 	  if (d5 < nzeros)
! 	    nzeros = d5;
! 	  // get P*(2^M[extra_digits])/10^extra_digits
! 	  __mul_128x128_high (Qh, CQ, reciprocals10_128[nzeros]);
! 	  //__mul_128x128_to_256(P256, CQ, reciprocals10_128[nzeros]);Qh.w[1]=P256.w[3];Qh.w[0]=P256.w[2];
  
! 	  // now get P/10^extra_digits: shift Q_high right by M[extra_digits]-128
! 	  amount = recip_scale[nzeros];
! 	  __shr_128_long (CQ, Qh, amount);
  
! 	  diff_expon += nzeros;
! 	} else {
! 	  // decompose Q as Qh*10^17 + Ql
! 	  //T128 = reciprocals10_128[17];
! 	  Q_low = CQ.w[0];
  
! 	  {
! 	    tdigit[0] = Q_low & 0x3ffffff;
! 	    tdigit[1] = 0;
! 	    QX = Q_low >> 26;
! 	    QX32 = QX;
! 	    nzeros = 0;
  
! 	    for (j = 0; QX32; j++, QX32 >>= 7) {
! 	      k = (QX32 & 127);
! 	      tdigit[0] += convert_table[j][k][0];
! 	      tdigit[1] += convert_table[j][k][1];
! 	      if (tdigit[0] >= 100000000) {
! 		tdigit[0] -= 100000000;
! 		tdigit[1]++;
! 	      }
! 	    }
  
! 	    if (tdigit[1] >= 100000000) {
! 	      tdigit[1] -= 100000000;
! 	      if (tdigit[1] >= 100000000)
! 		tdigit[1] -= 100000000;
! 	    }
  
! 	    digit = tdigit[0];
! 	    if (!digit && !tdigit[1])
! 	      nzeros += 16;
! 	    else {
! 	      if (!digit) {
! 		nzeros += 8;
! 		digit = tdigit[1];
! 	      }
! 	      // decompose digit
! 	      PD = (UINT64) digit *0x068DB8BBull;
! 	      digit_h = (UINT32) (PD >> 40);
! 	      digit_low = digit - digit_h * 10000;
  
! 	      if (!digit_low)
! 		nzeros += 4;
! 	      else
! 		digit_h = digit_low;
  
! 	      if (!(digit_h & 1))
! 		nzeros +=
! 		  3 & (UINT32) (packed_10000_zeros[digit_h >> 3] >>
! 				(digit_h & 7));
! 	    }
! 	
! 	    if (nzeros) {
! 	      // get P*(2^M[extra_digits])/10^extra_digits
! 	      __mul_128x128_high (Qh, CQ, reciprocals10_128[nzeros]);
  
! 	      // now get P/10^extra_digits: shift Q_high right by M[extra_digits]-128
! 	      amount = recip_scale[nzeros];
! 	      __shr_128 (CQ, Qh, amount);
! 	    }
! 	    diff_expon += nzeros;
  
! 	  }
  	}
        }
!       if(diff_expon>=0){
! 	res =
! 	  fast_get_BID64_check_OF (sign_x ^ sign_y, diff_expon, CQ.w[0],
! 				   rnd_mode, pfpsf);
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
! 	(void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
!         // restore the rounding mode back if it has been changed
! 	if (rm_changed) fesetround(old_rm);
! 	BID_RETURN (res);
!       }
!     }
  #endif
  
    if (diff_expon >= 0) {
--- 1159,1260 ----
  #endif
  #ifndef LEAVE_TRAILING_ZEROS
      // check whether result is exact
!   {
! 	  if(!done) {
!     // check whether CX, CY are short
!     if (!CX.w[1] && !CY.w[1] && (CX.w[0] <= 1024) && (CY.w[0] <= 1024)) {
!       i = (int) CY.w[0] - 1;
!       j = (int) CX.w[0] - 1;
!       // difference in powers of 2 factors for Y and X
!       nzeros = ed2 - factors[i][0] + factors[j][0];
!       // difference in powers of 5 factors
!       d5 = ed2 - factors[i][1] + factors[j][1];
!       if (d5 < nzeros)
! 		nzeros = d5;
!       // get P*(2^M[extra_digits])/10^extra_digits
!       __mul_128x128_high (Qh, CQ, reciprocals10_128[nzeros]);
!       //__mul_128x128_to_256(P256, CQ, reciprocals10_128[nzeros]);Qh.w[1]=P256.w[3];Qh.w[0]=P256.w[2];
  
!       // now get P/10^extra_digits: shift Q_high right by M[extra_digits]-128
!       amount = recip_scale[nzeros];
!       __shr_128_long (CQ, Qh, amount);
  
!       diff_expon += nzeros;
!     } else {
!       // decompose Q as Qh*10^17 + Ql
!       //T128 = reciprocals10_128[17];
!       Q_low = CQ.w[0];
  
!       {
! 	tdigit[0] = Q_low & 0x3ffffff;
! 	tdigit[1] = 0;
! 	QX = Q_low >> 26;
! 	QX32 = QX;
! 	nzeros = 0;
  
! 	for (j = 0; QX32; j++, QX32 >>= 7) {
! 	  k = (QX32 & 127);
! 	  tdigit[0] += convert_table[j][k][0];
! 	  tdigit[1] += convert_table[j][k][1];
! 	  if (tdigit[0] >= 100000000) {
! 	    tdigit[0] -= 100000000;
! 	    tdigit[1]++;
! 	  }
! 	}
  
! 	if (tdigit[1] >= 100000000) {
! 	  tdigit[1] -= 100000000;
! 	  if (tdigit[1] >= 100000000)
! 	    tdigit[1] -= 100000000;
! 	}
  
! 	digit = tdigit[0];
! 	if (!digit && !tdigit[1])
! 	  nzeros += 16;
! 	else {
! 	  if (!digit) {
! 	    nzeros += 8;
! 	    digit = tdigit[1];
! 	  }
! 	  // decompose digit
! 	  PD = (UINT64) digit *0x068DB8BBull;
! 	  digit_h = (UINT32) (PD >> 40);
! 	  digit_low = digit - digit_h * 10000;
  
! 	  if (!digit_low)
! 	    nzeros += 4;
! 	  else
! 	    digit_h = digit_low;
  
! 	  if (!(digit_h & 1))
! 	    nzeros +=
! 	      3 & (UINT32) (packed_10000_zeros[digit_h >> 3] >>
! 			    (digit_h & 7));
! 	}
  
! 	if (nzeros) {
! 	  // get P*(2^M[extra_digits])/10^extra_digits
! 	  __mul_128x128_high (Qh, CQ, reciprocals10_128[nzeros]);
  
! 	  // now get P/10^extra_digits: shift Q_high right by M[extra_digits]-128
! 	  amount = recip_scale[nzeros];
! 	  __shr_128 (CQ, Qh, amount);
  	}
+ 	diff_expon += nzeros;
+ 
        }
!     }
! 	  }
! 	if(diff_expon>=0){
!     res =
!       fast_get_BID64_check_OF (sign_x ^ sign_y, diff_expon, CQ.w[0],
! 			       rnd_mode, pfpsf);
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
!     (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
!     BID_RETURN (res);
! 	}
!   }
  #endif
  
    if (diff_expon >= 0) {
*************** if (!done) {
*** 1426,1433 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
      (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    } else {
      // UF occurs
--- 1337,1342 ----
*************** if (!done) {
*** 1444,1452 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
      (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
  
  }
--- 1353,1360 ----
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
      (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
      BID_RETURN (res);
+ 
    }
  
  }
*************** int exponent_x, exponent_y, bin_index, b
*** 1471,1487 ****
    digits_q, amount;
  int nzeros, i, j, k, d5, done = 0;
  unsigned rmode;
- int old_rm, rm_changed=0;
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
  fexcept_t binaryflags = 0;
  #endif
  
- // Set it to round-to-nearest (if different)
- if ((old_rm=fegetround()) != FE_TONEAREST) {
-   rm_changed=1;
-   fesetround(FE_TONEAREST);
- }
- 
  valid_y = unpack_BID128_value (&sign_y, &exponent_y, &CY, y);
  
  	// unpack arguments, check for NaN or Infinity
--- 1379,1388 ----
*************** if (!unpack_BID128_value (&sign_x, &expo
*** 1500,1508 ****
        amount = recip_scale[18];
        __shr_128 (Tmp, Qh, amount);
        res = (CX.w[1] & 0xfc00000000000000ull) | Tmp.w[0];
!       // restore the rounding mode back if it has been changed
!       if (rm_changed) fesetround(old_rm);
!       BID_RETURN (res);
    }
    // x is Infinity?
    if ((x.w[1] & 0x7800000000000000ull) == 0x7800000000000000ull) {
--- 1401,1407 ----
        amount = recip_scale[18];
        __shr_128 (Tmp, Qh, amount);
        res = (CX.w[1] & 0xfc00000000000000ull) | Tmp.w[0];
!     BID_RETURN (res);
    }
    // x is Infinity?
    if ((x.w[1] & 0x7800000000000000ull) == 0x7800000000000000ull) {
*************** if (!unpack_BID128_value (&sign_x, &expo
*** 1514,1532 ****
        __set_status_flags (pfpsf, INVALID_EXCEPTION);
  #endif
        res = 0x7c00000000000000ull;
-       // restore the rounding mode back if it has been changed
-       if (rm_changed) fesetround(old_rm);
-       BID_RETURN (res);
-     }
-     if (((y.w[1] & 0x7c00000000000000ull) != 0x7c00000000000000ull)) {
-       // otherwise return +/-Inf
-       res =
- 	((x.w[1] ^ y.
- 	  w[1]) & 0x8000000000000000ull) | 0x7800000000000000ull;
-       // restore the rounding mode back if it has been changed
-       if (rm_changed) fesetround(old_rm);
        BID_RETURN (res);
      }
    }
    // x is 0
    if (((y.w[1] & 0x7800000000000000ull) != 0x7800000000000000ull)) {
--- 1413,1427 ----
        __set_status_flags (pfpsf, INVALID_EXCEPTION);
  #endif
        res = 0x7c00000000000000ull;
        BID_RETURN (res);
      }
+ 	if (((y.w[1] & 0x7c00000000000000ull) != 0x7c00000000000000ull)) {
+     // otherwise return +/-Inf
+     res =
+       ((x.w[1] ^ y.
+ 	w[1]) & 0x8000000000000000ull) | 0x7800000000000000ull;
+     BID_RETURN (res);
+ 	}
    }
    // x is 0
    if (((y.w[1] & 0x7800000000000000ull) != 0x7800000000000000ull)) {
*************** if (!unpack_BID128_value (&sign_x, &expo
*** 1536,1543 ****
  #endif
      // x=y=0, return NaN
      res = 0x7c00000000000000ull;
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // return 0
--- 1431,1436 ----
*************** if (!unpack_BID128_value (&sign_x, &expo
*** 1548,1555 ****
    else if (exponent_x < 0)
      exponent_x = 0;
    res |= (((UINT64) exponent_x) << 53);
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
    }
  }
--- 1441,1446 ----
*************** if (!valid_y) {
*** 1569,1584 ****
        amount = recip_scale[18];
        __shr_128 (Tmp, Qh, amount);
        res = (CY.w[1] & 0xfc00000000000000ull) | Tmp.w[0];
!       // restore the rounding mode back if it has been changed
!       if (rm_changed) fesetround(old_rm);
!       BID_RETURN (res);
    }
    // y is Infinity?
    if ((y.w[1] & 0x7800000000000000ull) == 0x7800000000000000ull) {
      // return +/-0
      res = sign_x ^ sign_y;
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // y is 0, return +/-Inf
--- 1460,1471 ----
        amount = recip_scale[18];
        __shr_128 (Tmp, Qh, amount);
        res = (CY.w[1] & 0xfc00000000000000ull) | Tmp.w[0];
!     BID_RETURN (res);
    }
    // y is Infinity?
    if ((y.w[1] & 0x7800000000000000ull) == 0x7800000000000000ull) {
      // return +/-0
      res = sign_x ^ sign_y;
      BID_RETURN (res);
    }
    // y is 0, return +/-Inf
*************** if (!valid_y) {
*** 1587,1594 ****
  #ifdef SET_STATUS_FLAGS
    __set_status_flags (pfpsf, ZERO_DIVIDE_EXCEPTION);
  #endif
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
--- 1474,1479 ----
*************** if (__unsigned_compare_gt_128 (CY, CX))
*** 1651,1658 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
        (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-       // restore the rounding mode back if it has been changed
-       if (rm_changed) fesetround(old_rm);
        BID_RETURN (res);
      }
  
--- 1536,1541 ----
*************** if (!done) {
*** 1711,1812 ****
  #ifndef LEAVE_TRAILING_ZEROS
      // check whether result is exact
    {
!     if(!done) {
!       // check whether CX, CY are short
!       if (!CX.w[1] && !CY.w[1] && (CX.w[0] <= 1024) && (CY.w[0] <= 1024)) {
! 	i = (int) CY.w[0] - 1;
! 	j = (int) CX.w[0] - 1;
! 	// difference in powers of 2 factors for Y and X
! 	nzeros = ed2 - factors[i][0] + factors[j][0];
! 	// difference in powers of 5 factors
! 	d5 = ed2 - factors[i][1] + factors[j][1];
! 	if (d5 < nzeros)
! 	  nzeros = d5;
! 	// get P*(2^M[extra_digits])/10^extra_digits
! 	__mul_128x128_high (Qh, CQ, reciprocals10_128[nzeros]);
! 	//__mul_128x128_to_256(P256, CQ, reciprocals10_128[nzeros]);Qh.w[1]=P256.w[3];Qh.w[0]=P256.w[2];
! 	
! 	// now get P/10^extra_digits: shift Q_high right by M[extra_digits]-128
! 	amount = recip_scale[nzeros];
! 	__shr_128_long (CQ, Qh, amount);
! 	
! 	diff_expon += nzeros;
!       } else {
! 	// decompose Q as Qh*10^17 + Ql
! 	//T128 = reciprocals10_128[17];
! 	Q_low = CQ.w[0];
!       
! 	{
! 	  tdigit[0] = Q_low & 0x3ffffff;
! 	  tdigit[1] = 0;
! 	  QX = Q_low >> 26;
! 	  QX32 = QX;
! 	  nzeros = 0;
! 
! 	  for (j = 0; QX32; j++, QX32 >>= 7) {
! 	    k = (QX32 & 127);
! 	    tdigit[0] += convert_table[j][k][0];
! 	    tdigit[1] += convert_table[j][k][1];
! 	    if (tdigit[0] >= 100000000) {
! 	      tdigit[0] -= 100000000;
! 	      tdigit[1]++;
! 	    }
! 	  }
  
! 	  if (tdigit[1] >= 100000000) {
! 	    tdigit[1] -= 100000000;
! 	    if (tdigit[1] >= 100000000)
! 	      tdigit[1] -= 100000000;
! 	  }
  
! 	  digit = tdigit[0];
! 	  if (!digit && !tdigit[1])
! 	    nzeros += 16;
! 	  else {
! 	    if (!digit) {
! 	      nzeros += 8;
! 	      digit = tdigit[1];
! 	    }
! 	    // decompose digit
! 	    PD = (UINT64) digit *0x068DB8BBull;
! 	    digit_h = (UINT32) (PD >> 40);
! 	    digit_low = digit - digit_h * 10000;
  
! 	    if (!digit_low)
! 	      nzeros += 4;
! 	    else
! 	      digit_h = digit_low;
  
! 	    if (!(digit_h & 1))
! 	      nzeros +=
! 		3 & (UINT32) (packed_10000_zeros[digit_h >> 3] >>
! 			      (digit_h & 7));
  	  }
  
! 	  if (nzeros) {
! 	    // get P*(2^M[extra_digits])/10^extra_digits
! 	    __mul_128x128_high (Qh, CQ, reciprocals10_128[nzeros]);
  
! 	    // now get P/10^extra_digits: shift Q_high right by M[extra_digits]-128
! 	    amount = recip_scale[nzeros];
! 	    __shr_128 (CQ, Qh, amount);
  	  }
! 	  diff_expon += nzeros;
  
  	}
        }
      }
!     if(diff_expon>=0){
!       res =
! 	fast_get_BID64_check_OF (sign_x ^ sign_y, diff_expon, CQ.w[0],
! 				 rnd_mode, pfpsf);
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
!       (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
!       // restore the rounding mode back if it has been changed
!       if (rm_changed) fesetround(old_rm);
!       BID_RETURN (res);
!     }
    }
  #endif
  
--- 1594,1693 ----
  #ifndef LEAVE_TRAILING_ZEROS
      // check whether result is exact
    {
! 	  if(!done) {
!     // check whether CX, CY are short
!     if (!CX.w[1] && !CY.w[1] && (CX.w[0] <= 1024) && (CY.w[0] <= 1024)) {
!       i = (int) CY.w[0] - 1;
!       j = (int) CX.w[0] - 1;
!       // difference in powers of 2 factors for Y and X
!       nzeros = ed2 - factors[i][0] + factors[j][0];
!       // difference in powers of 5 factors
!       d5 = ed2 - factors[i][1] + factors[j][1];
!       if (d5 < nzeros)
! 	nzeros = d5;
!       // get P*(2^M[extra_digits])/10^extra_digits
!       __mul_128x128_high (Qh, CQ, reciprocals10_128[nzeros]);
!       //__mul_128x128_to_256(P256, CQ, reciprocals10_128[nzeros]);Qh.w[1]=P256.w[3];Qh.w[0]=P256.w[2];
  
!       // now get P/10^extra_digits: shift Q_high right by M[extra_digits]-128
!       amount = recip_scale[nzeros];
!       __shr_128_long (CQ, Qh, amount);
  
!       diff_expon += nzeros;
!     } else {
!       // decompose Q as Qh*10^17 + Ql
!       //T128 = reciprocals10_128[17];
!       Q_low = CQ.w[0];
  
!       {
! 	tdigit[0] = Q_low & 0x3ffffff;
! 	tdigit[1] = 0;
! 	QX = Q_low >> 26;
! 	QX32 = QX;
! 	nzeros = 0;
  
! 	for (j = 0; QX32; j++, QX32 >>= 7) {
! 	  k = (QX32 & 127);
! 	  tdigit[0] += convert_table[j][k][0];
! 	  tdigit[1] += convert_table[j][k][1];
! 	  if (tdigit[0] >= 100000000) {
! 	    tdigit[0] -= 100000000;
! 	    tdigit[1]++;
  	  }
+ 	}
  
! 	if (tdigit[1] >= 100000000) {
! 	  tdigit[1] -= 100000000;
! 	  if (tdigit[1] >= 100000000)
! 	    tdigit[1] -= 100000000;
! 	}
  
! 	digit = tdigit[0];
! 	if (!digit && !tdigit[1])
! 	  nzeros += 16;
! 	else {
! 	  if (!digit) {
! 	    nzeros += 8;
! 	    digit = tdigit[1];
  	  }
! 	  // decompose digit
! 	  PD = (UINT64) digit *0x068DB8BBull;
! 	  digit_h = (UINT32) (PD >> 40);
! 	  digit_low = digit - digit_h * 10000;
! 
! 	  if (!digit_low)
! 	    nzeros += 4;
! 	  else
! 	    digit_h = digit_low;
! 
! 	  if (!(digit_h & 1))
! 	    nzeros +=
! 	      3 & (UINT32) (packed_10000_zeros[digit_h >> 3] >>
! 			    (digit_h & 7));
! 	}
! 
! 	if (nzeros) {
! 	  // get P*(2^M[extra_digits])/10^extra_digits
! 	  __mul_128x128_high (Qh, CQ, reciprocals10_128[nzeros]);
  
+ 	  // now get P/10^extra_digits: shift Q_high right by M[extra_digits]-128
+ 	  amount = recip_scale[nzeros];
+ 	  __shr_128 (CQ, Qh, amount);
  	}
+ 	diff_expon += nzeros;
+ 
        }
      }
! 	  }
! 	if(diff_expon>=0){
!     res =
!       fast_get_BID64_check_OF (sign_x ^ sign_y, diff_expon, CQ.w[0],
! 			       rnd_mode, pfpsf);
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
!     (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
!     BID_RETURN (res);
! 	}
    }
  #endif
  
*************** if (!done) {
*** 1891,1898 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
      (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    } else {
      // UF occurs
--- 1772,1777 ----
*************** if (!done) {
*** 1909,1917 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
      (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
  
  }
--- 1788,1795 ----
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
      (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
      BID_RETURN (res);
+ 
    }
  
  }
diff -Nrcpad gcc-14-20250829/libgcc/config/libbid/bid64_sqrt.c gcc-14-20250905/libgcc/config/libbid/bid64_sqrt.c
*** gcc-14-20250829/libgcc/config/libbid/bid64_sqrt.c	Fri Aug 29 22:32:24 2025
--- gcc-14-20250905/libgcc/config/libbid/bid64_sqrt.c	Fri Sep  5 22:34:28 2025
*************** see the files COPYING3 and COPYING.RUNTI
*** 41,48 ****
  
  #include "bid_internal.h"
  #include "bid_sqrt_macros.h"
- #include <fenv.h>
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
  #define FE_ALL_FLAGS FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW|FE_UNDERFLOW|FE_INEXACT
  #endif
  
--- 41,49 ----
  
  #include "bid_internal.h"
  #include "bid_sqrt_macros.h"
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
+ #include <fenv.h>
+ 
  #define FE_ALL_FLAGS FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW|FE_UNDERFLOW|FE_INEXACT
  #endif
  
*************** bid64_sqrt (UINT64 x _RND_MODE_PARAM _EX
*** 72,79 ****
    int exponent_x, exponent_q, bin_expon_cx;
    int digits_x;
    int scale;
-   int old_rm, rm_changed=0;
- 
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
    fexcept_t binaryflags = 0;
  #endif
--- 73,78 ----
*************** bid64_sqrt (UINT64 x _RND_MODE_PARAM _EX
*** 85,96 ****
    x = *px;
  #endif
  
-   // Set it to round-to-nearest (if different)
-   if ((old_rm=fegetround()) != FE_TONEAREST) {
-     rm_changed=1;
-     fesetround(FE_TONEAREST);
-   }
-   
    // unpack arguments, check for NaN or Infinity
    if (!unpack_BID64 (&sign_x, &exponent_x, &coefficient_x, x)) {
      // x is Inf. or NaN or 0
--- 84,89 ----
*************** bid64_sqrt (UINT64 x _RND_MODE_PARAM _EX
*** 107,121 ****
        if ((x & SNAN_MASK64) == SNAN_MASK64)	// sNaN
  	__set_status_flags (pfpsf, INVALID_EXCEPTION);
  #endif
-       // restore the rounding mode back if it has been changed
-       if (rm_changed) fesetround(old_rm);
        BID_RETURN (res & QUIET_MASK64);
      }
      // x is 0
      exponent_x = (exponent_x + DECIMAL_EXPONENT_BIAS) >> 1;
      res = sign_x | (((UINT64) exponent_x) << 53);
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // x<0?
--- 100,110 ----
*************** bid64_sqrt (UINT64 x _RND_MODE_PARAM _EX
*** 124,131 ****
  #ifdef SET_STATUS_FLAGS
      __set_status_flags (pfpsf, INVALID_EXCEPTION);
  #endif
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
--- 113,118 ----
*************** bid64_sqrt (UINT64 x _RND_MODE_PARAM _EX
*** 154,161 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
      (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // if exponent is odd, scale coefficient by 10
--- 141,146 ----
*************** bid64_sqrt (UINT64 x _RND_MODE_PARAM _EX
*** 221,228 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
    (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  
--- 206,211 ----
*************** int digits, scale, exponent_q = 0, exact
*** 240,252 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
  fexcept_t binaryflags = 0;
  #endif
- int old_rm, rm_changed=0;
- 
- // Set it to round-to-nearest (if different)
- if ((old_rm=fegetround()) != FE_TONEAREST) {
-   rm_changed=1;
-   fesetround(FE_TONEAREST);
- }
  
  	// unpack arguments, check for NaN or Infinity
  if (!unpack_BID128_value (&sign_x, &exponent_x, &CX, x)) {
--- 223,228 ----
*************** if (!unpack_BID128_value (&sign_x, &expo
*** 264,271 ****
      amount = recip_scale[18];
      __shr_128 (Tmp, Qh, amount);
      res = (CX.w[1] & 0xfc00000000000000ull) | Tmp.w[0];
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // x is Infinity?
--- 240,245 ----
*************** if (!unpack_BID128_value (&sign_x, &expo
*** 277,284 ****
        __set_status_flags (pfpsf, INVALID_EXCEPTION);
  #endif
      }
-     // restore the rounding mode back if it has been changed
-     if (rm_changed) fesetround(old_rm);
      BID_RETURN (res);
    }
    // x is 0 otherwise
--- 251,256 ----
*************** if (!unpack_BID128_value (&sign_x, &expo
*** 292,299 ****
      exponent_x = DECIMAL_MAX_EXPON_64;
    //res= sign_x | (((UINT64)exponent_x)<<53);
    res = get_BID64 (sign_x, exponent_x, 0, rnd_mode, pfpsf);
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  if (sign_x) {
--- 264,269 ----
*************** if (sign_x) {
*** 301,308 ****
  #ifdef SET_STATUS_FLAGS
    __set_status_flags (pfpsf, INVALID_EXCEPTION);
  #endif
-   // restore the rounding mode back if it has been changed
-   if (rm_changed) fesetround(old_rm);
    BID_RETURN (res);
  }
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
--- 271,276 ----
*************** if (CS.w[0] < 10000000000000000ull) {
*** 344,351 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
        (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
-       // restore the rounding mode back if it has been changed
-       if (rm_changed) fesetround(old_rm);
        BID_RETURN (res);
      }
    }
--- 312,317 ----
*************** res = get_BID64 (0, exponent_q, CS.w[0],
*** 580,587 ****
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
  (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
- // restore the rounding mode back if it has been changed
- if (rm_changed) fesetround(old_rm);
  BID_RETURN (res);
  
  }
--- 546,552 ----
  #ifdef UNCHANGED_BINARY_STATUS_FLAGS
  (void) fesetexceptflag (&binaryflags, FE_ALL_FLAGS);
  #endif
  BID_RETURN (res);
  
+ 
  }
diff -Nrcpad gcc-14-20250829/libstdc++-v3/ChangeLog gcc-14-20250905/libstdc++-v3/ChangeLog
*** gcc-14-20250829/libstdc++-v3/ChangeLog	Fri Aug 29 22:32:42 2025
--- gcc-14-20250905/libstdc++-v3/ChangeLog	Fri Sep  5 22:34:35 2025
***************
*** 1,3 ****
--- 1,85 ----
+ 2025-09-04  Jonathan Wakely  <jwakely@redhat.com>
+ 
+ 	Backported from master:
+ 	2025-09-03  Jonathan Wakely  <jwakely@redhat.com>
+ 
+ 	PR libstdc++/110853
+ 	* include/bits/stl_pair.h [C++20] (pair(const T1&, const T2&)):
+ 	Use std::type_identity_t<T1> for first parameter.
+ 	* testsuite/20_util/pair/cons/110853.cc: New test.
+ 
+ 2025-09-04  Jonathan Wakely  <jwakely@redhat.com>
+ 
+ 	Backported from master:
+ 	2025-09-03  Jonathan Wakely  <jwakely@redhat.com>
+ 
+ 	PR libstdc++/121745
+ 	* include/bits/stl_pair.h (get): Use forward instead of move in
+ 	std::get<T> overloads for rvalue pairs.
+ 	* testsuite/20_util/pair/astuple/get_by_type.cc: Check all value
+ 	categories and cv-qualification.
+ 
+ 2025-09-04  Yihan Wang  <yronglin777@gmail.com>
+ 
+ 	Backported from master:
+ 	2025-09-03  Yihan Wang  <yronglin777@gmail.com>
+ 
+ 	* include/std/expected (expected(U&&)): Add missing constraint
+ 	as per LWG 4222.
+ 	* testsuite/20_util/expected/lwg4222.cc: New test.
+ 
+ 2025-09-04  Jonathan Wakely  <jwakely@redhat.com>
+ 
+ 	Backported from master:
+ 	2024-07-25  Jonathan Wakely  <jwakely@redhat.com>
+ 
+ 	* include/std/expected (expected): Constrain constructors to
+ 	prevent problematic bool conversions, as per LWG 3836.
+ 	* testsuite/20_util/expected/lwg3836.cc: New test.
+ 
+ 2025-09-03  Jonathan Wakely  <jwakely@redhat.com>
+ 
+ 	Backported from master:
+ 	2024-11-01  Jonathan Wakely  <jwakely@redhat.com>
+ 
+ 	* testsuite/23_containers/unordered_set/pr115285.cc: Include
+ 	missing header for std::vector.
+ 
+ 2025-09-03  Jonathan Wakely  <jwakely@redhat.com>
+ 
+ 	* include/bits/regex_compiler.h (_Compiler::_S_validate): Add
+ 	diagnostic pragma to disable -Wswitch warning.
+ 
+ 2025-09-03  Jonathan Wakely  <jwakely@redhat.com>
+ 
+ 	Backported from master:
+ 	2025-08-21  Jonathan Wakely  <jwakely@redhat.com>
+ 
+ 	PR libstdc++/121496
+ 	* include/std/mutex (__timed_mutex_impl::_M_try_wait_until):
+ 	Change preprocessor condition to use #if instead of #ifdef.
+ 	(recursive_timed_mutex::_M_clocklock): Likewise.
+ 	* testsuite/30_threads/timed_mutex/121496.cc: New test.
+ 
+ 2025-09-03  Jonathan Wakely  <jwakely@redhat.com>
+ 
+ 	Backported from master:
+ 	2025-08-21  Jonathan Wakely  <jwakely@redhat.com>
+ 
+ 	PR libstdc++/121374
+ 	* include/std/limits (numeric_limits<__float128>::max_digits10):
+ 	Fix value.
+ 	* testsuite/18_support/numeric_limits/128bit.cc: Check value.
+ 
+ 2025-09-03  Jonathan Wakely  <jwakely@redhat.com>
+ 
+ 	Backported from master:
+ 	2025-07-17  Jonathan Wakely  <jwakely@redhat.com>
+ 
+ 	PR libstdc++/121097
+ 	* include/c_global/cmath (hypot): Use __promote_3 instead of
+ 	__promoted.
+ 
  2025-06-11  Jonathan Wakely  <jwakely@redhat.com>
  
  	Backported from master:
diff -Nrcpad gcc-14-20250829/libstdc++-v3/include/bits/regex_compiler.h gcc-14-20250905/libstdc++-v3/include/bits/regex_compiler.h
*** gcc-14-20250829/libstdc++-v3/include/bits/regex_compiler.h	Fri Aug 29 22:32:43 2025
--- gcc-14-20250905/libstdc++-v3/include/bits/regex_compiler.h	Fri Sep  5 22:34:35 2025
*************** namespace __detail
*** 188,195 ****
--- 188,198 ----
  	  case grep:
  	  case egrep:
  	    return __f;
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wswitch" // do not warn about non-enumerator
  	  case _FlagT(0):
  	    return __f | ECMAScript;
+ #pragma GCC diagnostic pop
  	  default:
  	    std::__throw_regex_error(_S_grammar, "conflicting grammar options");
  	  }
diff -Nrcpad gcc-14-20250829/libstdc++-v3/include/bits/stl_pair.h gcc-14-20250905/libstdc++-v3/include/bits/stl_pair.h
*** gcc-14-20250829/libstdc++-v3/include/bits/stl_pair.h	Fri Aug 29 22:32:43 2025
--- gcc-14-20250905/libstdc++-v3/include/bits/stl_pair.h	Fri Sep  5 22:34:35 2025
*************** _GLIBCXX_BEGIN_NAMESPACE_VERSION
*** 425,431 ****
  
        /// Constructor accepting lvalues of `first_type` and `second_type`
        constexpr explicit(!_S_convertible<const _T1&, const _T2&>())
!       pair(const _T1& __x, const _T2& __y)
        noexcept(_S_nothrow_constructible<const _T1&, const _T2&>())
        requires (_S_constructible<const _T1&, const _T2&>())
        : first(__x), second(__y)
--- 425,431 ----
  
        /// Constructor accepting lvalues of `first_type` and `second_type`
        constexpr explicit(!_S_convertible<const _T1&, const _T2&>())
!       pair(const type_identity_t<_T1>& __x, const _T2& __y)
        noexcept(_S_nothrow_constructible<const _T1&, const _T2&>())
        requires (_S_constructible<const _T1&, const _T2&>())
        : first(__x), second(__y)
*************** _GLIBCXX_BEGIN_NAMESPACE_VERSION
*** 1286,1297 ****
    template <typename _Tp, typename _Up>
      constexpr _Tp&&
      get(pair<_Tp, _Up>&& __p) noexcept
!     { return std::move(__p.first); }
  
    template <typename _Tp, typename _Up>
      constexpr const _Tp&&
      get(const pair<_Tp, _Up>&& __p) noexcept
!     { return std::move(__p.first); }
  
    template <typename _Tp, typename _Up>
      constexpr _Tp&
--- 1286,1297 ----
    template <typename _Tp, typename _Up>
      constexpr _Tp&&
      get(pair<_Tp, _Up>&& __p) noexcept
!     { return std::forward<_Tp>(__p.first); }
  
    template <typename _Tp, typename _Up>
      constexpr const _Tp&&
      get(const pair<_Tp, _Up>&& __p) noexcept
!     { return std::forward<const _Tp>(__p.first); }
  
    template <typename _Tp, typename _Up>
      constexpr _Tp&
*************** _GLIBCXX_BEGIN_NAMESPACE_VERSION
*** 1306,1317 ****
    template <typename _Tp, typename _Up>
      constexpr _Tp&&
      get(pair<_Up, _Tp>&& __p) noexcept
!     { return std::move(__p.second); }
  
    template <typename _Tp, typename _Up>
      constexpr const _Tp&&
      get(const pair<_Up, _Tp>&& __p) noexcept
!     { return std::move(__p.second); }
  #endif // __glibcxx_tuples_by_type
  
  
--- 1306,1317 ----
    template <typename _Tp, typename _Up>
      constexpr _Tp&&
      get(pair<_Up, _Tp>&& __p) noexcept
!     { return std::forward<_Tp>(__p.second); }
  
    template <typename _Tp, typename _Up>
      constexpr const _Tp&&
      get(const pair<_Up, _Tp>&& __p) noexcept
!     { return std::forward<const _Tp>(__p.second); }
  #endif // __glibcxx_tuples_by_type
  
  
diff -Nrcpad gcc-14-20250829/libstdc++-v3/include/c_global/cmath gcc-14-20250905/libstdc++-v3/include/c_global/cmath
*** gcc-14-20250829/libstdc++-v3/include/c_global/cmath	Fri Aug 29 22:32:43 2025
--- gcc-14-20250905/libstdc++-v3/include/c_global/cmath	Fri Sep  5 22:34:35 2025
*************** _GLIBCXX_BEGIN_NAMESPACE_VERSION
*** 3785,3794 ****
    { return std::__hypot3<long double>(__x, __y, __z); }
  
    template<typename _Tp, typename _Up, typename _Vp>
!     __gnu_cxx::__promoted_t<_Tp, _Up, _Vp>
      hypot(_Tp __x, _Up __y, _Vp __z)
      {
!       using __type = __gnu_cxx::__promoted_t<_Tp, _Up, _Vp>;
        return std::__hypot3<__type>(__x, __y, __z);
      }
  
--- 3785,3794 ----
    { return std::__hypot3<long double>(__x, __y, __z); }
  
    template<typename _Tp, typename _Up, typename _Vp>
!     typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type
      hypot(_Tp __x, _Up __y, _Vp __z)
      {
!       using __type = typename __gnu_cxx::__promote_3<_Tp, _Up, _Vp>::__type;
        return std::__hypot3<__type>(__x, __y, __z);
      }
  
diff -Nrcpad gcc-14-20250829/libstdc++-v3/include/std/expected gcc-14-20250905/libstdc++-v3/include/std/expected
*** gcc-14-20250829/libstdc++-v3/include/std/expected	Fri Aug 29 22:32:43 2025
--- gcc-14-20250905/libstdc++-v3/include/std/expected	Fri Sep  5 22:34:36 2025
*************** namespace __expected
*** 314,319 ****
--- 314,330 ----
  	  __guard.release();
  	}
      }
+ 
+   // _GLIBCXX_RESOLVE_LIB_DEFECTS
+   // 3836. std::expected<bool, E1> conversion constructor
+   // expected(const expected<U, G>&) should take precedence over
+   // expected(U&&) with operator bool
+ 
+   // If T is cv bool, remove_cvref_t<U> is not a specialization of expected.
+   template<typename _Tp, typename _Up>
+     concept __not_constructing_bool_from_expected
+       = ! is_same_v<remove_cv_t<_Tp>, bool>
+ 	  || ! __is_expected<remove_cvref_t<_Up>>;
  }
  /// @endcond
  
*************** namespace __expected
*** 327,352 ****
        static_assert( ! __expected::__is_unexpected<remove_cv_t<_Tp>> );
        static_assert( __expected::__can_be_unexpected<_Er> );
  
!       template<typename _Up, typename _Err, typename _Unex = unexpected<_Er>>
  	static constexpr bool __cons_from_expected
! 	  = __or_v<is_constructible<_Tp, expected<_Up, _Err>&>,
! 		   is_constructible<_Tp, expected<_Up, _Err>>,
! 		   is_constructible<_Tp, const expected<_Up, _Err>&>,
! 		   is_constructible<_Tp, const expected<_Up, _Err>>,
! 		   is_convertible<expected<_Up, _Err>&, _Tp>,
! 		   is_convertible<expected<_Up, _Err>, _Tp>,
! 		   is_convertible<const expected<_Up, _Err>&, _Tp>,
! 		   is_convertible<const expected<_Up, _Err>, _Tp>,
! 		   is_constructible<_Unex, expected<_Up, _Err>&>,
! 		   is_constructible<_Unex, expected<_Up, _Err>>,
! 		   is_constructible<_Unex, const expected<_Up, _Err>&>,
! 		   is_constructible<_Unex, const expected<_Up, _Err>>
  		  >;
  
!       template<typename _Up, typename _Err>
  	constexpr static bool __explicit_conv
  	  = __or_v<__not_<is_convertible<_Up, _Tp>>,
! 		   __not_<is_convertible<_Err, _Er>>
  		  >;
  
        template<typename _Up>
--- 338,378 ----
        static_assert( ! __expected::__is_unexpected<remove_cv_t<_Tp>> );
        static_assert( __expected::__can_be_unexpected<_Er> );
  
!       // If T is not cv bool, converts-from-any-cvref<T, expected<U, G>> and
!       // is_constructible<unexpected<E>, cv expected<U, G> ref-qual> are false.
!       template<typename _Up, typename _Gr, typename _Unex = unexpected<_Er>,
! 	       typename = remove_cv_t<_Tp>>
  	static constexpr bool __cons_from_expected
! 	  = __or_v<is_constructible<_Tp, expected<_Up, _Gr>&>,
! 		   is_constructible<_Tp, expected<_Up, _Gr>>,
! 		   is_constructible<_Tp, const expected<_Up, _Gr>&>,
! 		   is_constructible<_Tp, const expected<_Up, _Gr>>,
! 		   is_convertible<expected<_Up, _Gr>&, _Tp>,
! 		   is_convertible<expected<_Up, _Gr>, _Tp>,
! 		   is_convertible<const expected<_Up, _Gr>&, _Tp>,
! 		   is_convertible<const expected<_Up, _Gr>, _Tp>,
! 		   is_constructible<_Unex, expected<_Up, _Gr>&>,
! 		   is_constructible<_Unex, expected<_Up, _Gr>>,
! 		   is_constructible<_Unex, const expected<_Up, _Gr>&>,
! 		   is_constructible<_Unex, const expected<_Up, _Gr>>
  		  >;
  
!       // _GLIBCXX_RESOLVE_LIB_DEFECTS
!       // If t is cv bool, we know it can be constructed from expected<U, G>,
!       // but we don't want to cause the expected(U&&) constructor to be used,
!       // so we only check the is_constructible<unexpected<E>, ...> cases.
!       template<typename _Up, typename _Gr, typename _Unex>
! 	static constexpr bool __cons_from_expected<_Up, _Gr, _Unex, bool>
! 	  = __or_v<is_constructible<_Unex, expected<_Up, _Gr>&>,
! 		   is_constructible<_Unex, expected<_Up, _Gr>>,
! 		   is_constructible<_Unex, const expected<_Up, _Gr>&>,
! 		   is_constructible<_Unex, const expected<_Up, _Gr>>
! 		  >;
! 
!       template<typename _Up, typename _Gr>
  	constexpr static bool __explicit_conv
  	  = __or_v<__not_<is_convertible<_Up, _Tp>>,
! 		   __not_<is_convertible<_Gr, _Er>>
  		  >;
  
        template<typename _Up>
*************** namespace __expected
*** 445,452 ****
        template<typename _Up = _Tp>
  	requires (!is_same_v<remove_cvref_t<_Up>, expected>)
  	  && (!is_same_v<remove_cvref_t<_Up>, in_place_t>)
! 	  && (!__expected::__is_unexpected<remove_cvref_t<_Up>>)
  	  && is_constructible_v<_Tp, _Up>
  	constexpr explicit(!is_convertible_v<_Up, _Tp>)
  	expected(_Up&& __v)
  	noexcept(is_nothrow_constructible_v<_Tp, _Up>)
--- 471,480 ----
        template<typename _Up = _Tp>
  	requires (!is_same_v<remove_cvref_t<_Up>, expected>)
  	  && (!is_same_v<remove_cvref_t<_Up>, in_place_t>)
! 	  && (!is_same_v<remove_cvref_t<_Up>, unexpect_t>)
  	  && is_constructible_v<_Tp, _Up>
+ 	  && (!__expected::__is_unexpected<remove_cvref_t<_Up>>)
+ 	  && __expected::__not_constructing_bool_from_expected<_Tp, _Up>
  	constexpr explicit(!is_convertible_v<_Up, _Tp>)
  	expected(_Up&& __v)
  	noexcept(is_nothrow_constructible_v<_Tp, _Up>)
diff -Nrcpad gcc-14-20250829/libstdc++-v3/include/std/limits gcc-14-20250905/libstdc++-v3/include/std/limits
*** gcc-14-20250829/libstdc++-v3/include/std/limits	Fri Aug 29 22:32:43 2025
--- gcc-14-20250905/libstdc++-v3/include/std/limits	Fri Sep  5 22:34:36 2025
*************** __glibcxx_float_n(128)
*** 2122,2128 ****
        static _GLIBCXX_USE_CONSTEXPR int digits = 113;
        static _GLIBCXX_USE_CONSTEXPR int digits10 = 33;
  #if __cplusplus >= 201103L
!       static constexpr int max_digits10 = 35;
  #endif
        static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
        static _GLIBCXX_USE_CONSTEXPR bool is_integer = false;
--- 2122,2128 ----
        static _GLIBCXX_USE_CONSTEXPR int digits = 113;
        static _GLIBCXX_USE_CONSTEXPR int digits10 = 33;
  #if __cplusplus >= 201103L
!       static constexpr int max_digits10 = 36;
  #endif
        static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
        static _GLIBCXX_USE_CONSTEXPR bool is_integer = false;
diff -Nrcpad gcc-14-20250829/libstdc++-v3/include/std/mutex gcc-14-20250905/libstdc++-v3/include/std/mutex
*** gcc-14-20250829/libstdc++-v3/include/std/mutex	Fri Aug 29 22:32:43 2025
--- gcc-14-20250905/libstdc++-v3/include/std/mutex	Fri Sep  5 22:34:36 2025
*************** _GLIBCXX_BEGIN_NAMESPACE_VERSION
*** 188,194 ****
  	  return static_cast<_Derived*>(this)->_M_timedlock(__ts);
  	}
  
! #ifdef _GLIBCXX_USE_PTHREAD_MUTEX_CLOCKLOCK
        template<typename _Duration>
  	bool
  	_M_try_lock_until(const chrono::time_point<chrono::steady_clock,
--- 188,194 ----
  	  return static_cast<_Derived*>(this)->_M_timedlock(__ts);
  	}
  
! #if _GLIBCXX_USE_PTHREAD_MUTEX_CLOCKLOCK
        template<typename _Duration>
  	bool
  	_M_try_lock_until(const chrono::time_point<chrono::steady_clock,
*************** _GLIBCXX_BEGIN_NAMESPACE_VERSION
*** 375,381 ****
        _M_timedlock(const __gthread_time_t& __ts)
        { return !__gthread_recursive_mutex_timedlock(&_M_mutex, &__ts); }
  
! #ifdef _GLIBCXX_USE_PTHREAD_MUTEX_CLOCKLOCK
        bool
        _M_clocklock(clockid_t __clockid, const __gthread_time_t& __ts)
        { return !pthread_mutex_clocklock(&_M_mutex, __clockid, &__ts); }
--- 375,381 ----
        _M_timedlock(const __gthread_time_t& __ts)
        { return !__gthread_recursive_mutex_timedlock(&_M_mutex, &__ts); }
  
! #if _GLIBCXX_USE_PTHREAD_MUTEX_CLOCKLOCK
        bool
        _M_clocklock(clockid_t __clockid, const __gthread_time_t& __ts)
        { return !pthread_mutex_clocklock(&_M_mutex, __clockid, &__ts); }
diff -Nrcpad gcc-14-20250829/libstdc++-v3/testsuite/18_support/numeric_limits/128bit.cc gcc-14-20250905/libstdc++-v3/testsuite/18_support/numeric_limits/128bit.cc
*** gcc-14-20250829/libstdc++-v3/testsuite/18_support/numeric_limits/128bit.cc	Fri Aug 29 22:32:43 2025
--- gcc-14-20250905/libstdc++-v3/testsuite/18_support/numeric_limits/128bit.cc	Fri Sep  5 22:34:36 2025
***************
*** 4,9 ****
--- 4,14 ----
  
  #if __SIZEOF_FLOAT128__
  __extension__ template class std::numeric_limits<__float128>;
+ 
+ # if __cplusplus >= 201103L
+ static_assert( std::numeric_limits<__float128>::max_digits10 == 36,
+ 	       "PR libstdc++/121374" );
+ # endif
  #endif
  
  #if __SIZEOF_INT128__
diff -Nrcpad gcc-14-20250829/libstdc++-v3/testsuite/20_util/expected/lwg3836.cc gcc-14-20250905/libstdc++-v3/testsuite/20_util/expected/lwg3836.cc
*** gcc-14-20250829/libstdc++-v3/testsuite/20_util/expected/lwg3836.cc	Thu Jan  1 00:00:00 1970
--- gcc-14-20250905/libstdc++-v3/testsuite/20_util/expected/lwg3836.cc	Fri Sep  5 22:34:36 2025
***************
*** 0 ****
--- 1,34 ----
+ // { dg-do run { target c++23 } }
+ 
+ #include <expected>
+ #include <testsuite_hooks.h>
+ 
+ constexpr void
+ test_convert_contained_value_to_bool()
+ {
+   struct BaseError { };
+   struct DerivedError : BaseError { };
+ 
+   std::expected<bool, DerivedError> e = false;
+ 
+   // Should use expected(const expected<U, G>&) ctor, not expected(U&&):
+   std::expected<bool, BaseError> e2 = e;
+ 
+   // Contained value should be e.value() not static_cast<bool>(e):
+   VERIFY( e2.value() == false );
+ 
+   std::expected<bool, DerivedError> e3(std::unexpect);
+   std::expected<const bool, BaseError> e4 = e3;
+   // Should have error, not static_cast<bool>(e3):
+   VERIFY( ! e4.has_value() );
+ }
+ 
+ int main()
+ {
+   test_convert_contained_value_to_bool();
+ 
+   static_assert([] {
+     test_convert_contained_value_to_bool();
+     return true;
+   }());
+ }
diff -Nrcpad gcc-14-20250829/libstdc++-v3/testsuite/20_util/expected/lwg4222.cc gcc-14-20250905/libstdc++-v3/testsuite/20_util/expected/lwg4222.cc
*** gcc-14-20250829/libstdc++-v3/testsuite/20_util/expected/lwg4222.cc	Thu Jan  1 00:00:00 1970
--- gcc-14-20250905/libstdc++-v3/testsuite/20_util/expected/lwg4222.cc	Fri Sep  5 22:34:36 2025
***************
*** 0 ****
--- 1,39 ----
+ // { dg-do run { target c++23 } }
+ 
+ // LWG 4222. 'expected' constructor from a single value missing a constraint
+ 
+ #include <expected>
+ #include <type_traits>
+ #include <testsuite_hooks.h>
+ 
+ struct T {
+   explicit T(auto) {}
+ };
+ struct E {
+   E(int) {}
+ };
+ 
+ struct V {
+  explicit constexpr V(std::unexpect_t) {}
+ };
+ 
+ static_assert(!std::is_constructible_v<std::expected<T, E>, std::unexpect_t>);
+ static_assert(!std::is_constructible_v<std::expected<T, E>, std::unexpect_t &>);
+ static_assert(!std::is_constructible_v<std::expected<T, E>, std::unexpect_t &&>);
+ static_assert(!std::is_constructible_v<std::expected<T, E>, const std::unexpect_t>);
+ static_assert(!std::is_constructible_v<std::expected<T, E>, const std::unexpect_t &>);
+ static_assert(!std::is_constructible_v<std::expected<T, E>, const std::unexpect_t &&>);
+ 
+ constexpr bool test() {
+   std::expected<V, int> e1(std::in_place, std::unexpect);
+   VERIFY( e1.has_value() );
+   std::expected<int, V> e2(std::unexpect, std::unexpect);
+   VERIFY( !e2.has_value() );
+   return true;
+ }
+ 
+ int main() {
+   test();
+   static_assert(test());
+   return 0;
+ }
diff -Nrcpad gcc-14-20250829/libstdc++-v3/testsuite/20_util/pair/astuple/get_by_type.cc gcc-14-20250905/libstdc++-v3/testsuite/20_util/pair/astuple/get_by_type.cc
*** gcc-14-20250829/libstdc++-v3/testsuite/20_util/pair/astuple/get_by_type.cc	Fri Aug 29 22:32:43 2025
--- gcc-14-20250905/libstdc++-v3/testsuite/20_util/pair/astuple/get_by_type.cc	Fri Sep  5 22:34:37 2025
*************** void test01()
*** 33,35 ****
--- 33,87 ----
    const int&&  cpsecond __attribute__((unused)) =
      std::get<int>(std::move(cp));
  }
+ 
+ // PR libstdc++/121745 return of get(pair<_Up, _Tp>&& __p) may be ill-formed
+ void
+ test_pr121745(std::pair<float&, int&> p)
+ {
+   float& pfirst = std::get<float&>(std::move(p));
+   int& psecond  = std::get<int&>(std::move(p));
+ 
+   const auto& p2 = p;
+   float& p2first = std::get<float&>(std::move(p2));
+   int& p2second  = std::get<int&>(std::move(p2));
+ }
+ 
+ template<typename T, typename Pair>
+ using get_t = decltype(std::get<T>(std::declval<Pair>()));
+ 
+ // Check that get<T>(Pair) returns Ret
+ template<typename T, typename Pair, typename Ret>
+ constexpr bool verify = std::is_same<get_t<T, Pair>, Ret>::value;
+ 
+ template<typename T1, typename T2>
+ void
+ check()
+ {
+   // Overloads for accessing first member
+   static_assert( verify<T1, std::pair<T1, T2>&, T1&>,
+ 		 "T1& get(pair<T1, T2>&)" );
+   static_assert( verify<T1, const std::pair<T1, T2>&, const T1&>,
+ 		 "const T1& get(const pair<T1, T2>&)" );
+   static_assert( verify<T1, std::pair<T1, T2>&&, T1&&>,
+ 		 "T1&& get(pair<T1, T2>&&)" );
+   static_assert( verify<T1, const std::pair<T1, T2>&&, const T1&&>,
+ 		 "const T1&& get(const pair<T1, T2>&&)" );
+ 
+   // Overloads for accessing second member
+   static_assert( verify<T2, std::pair<T1, T2>&, T2&>,
+ 		 "T2& get(pair<T1, T2>&)" );
+   static_assert( verify<T2, const std::pair<T1, T2>&, const T2&>,
+ 		 "const T2& get(const pair<T1, T2>&)" );
+   static_assert( verify<T2, std::pair<T1, T2>&&, T2&&>,
+ 		 "T2&& get(pair<T1, T2>&&)" );
+   static_assert( verify<T2, const std::pair<T1, T2>&&, const T2&&>,
+ 		 "const T2&& get(const pair<T1, T2>&&)" );
+ }
+ 
+ void
+ test_all()
+ {
+   check<float, int>();
+   check<float&, int&>();
+   check<float&&, int&&>();
+ }
diff -Nrcpad gcc-14-20250829/libstdc++-v3/testsuite/20_util/pair/cons/110853.cc gcc-14-20250905/libstdc++-v3/testsuite/20_util/pair/cons/110853.cc
*** gcc-14-20250829/libstdc++-v3/testsuite/20_util/pair/cons/110853.cc	Thu Jan  1 00:00:00 1970
--- gcc-14-20250905/libstdc++-v3/testsuite/20_util/pair/cons/110853.cc	Fri Sep  5 22:34:37 2025
***************
*** 0 ****
--- 1,10 ----
+ // { dg-do compile { target c++17 } }
+ // PR libstdc++/110853
+ // Bad interaction between deduction guide with decay and constraints
+ // (CTAD, std::pair and function lvalue)
+ 
+ #include <utility>
+ 
+ void func() {}
+ std::pair p(1, func);
+ std::pair<int, void (*)()>& r = p;
diff -Nrcpad gcc-14-20250829/libstdc++-v3/testsuite/23_containers/unordered_set/pr115285.cc gcc-14-20250905/libstdc++-v3/testsuite/23_containers/unordered_set/pr115285.cc
*** gcc-14-20250829/libstdc++-v3/testsuite/23_containers/unordered_set/pr115285.cc	Fri Aug 29 22:32:44 2025
--- gcc-14-20250905/libstdc++-v3/testsuite/23_containers/unordered_set/pr115285.cc	Fri Sep  5 22:34:38 2025
***************
*** 2,9 ****
  
  // libstdc++/115285
  
- #include <string>
  #include <unordered_set>
  
  #include <testsuite_hooks.h>
  
--- 2,10 ----
  
  // libstdc++/115285
  
  #include <unordered_set>
+ #include <string>
+ #include <vector>
  
  #include <testsuite_hooks.h>
  
diff -Nrcpad gcc-14-20250829/libstdc++-v3/testsuite/30_threads/timed_mutex/121496.cc gcc-14-20250905/libstdc++-v3/testsuite/30_threads/timed_mutex/121496.cc
*** gcc-14-20250829/libstdc++-v3/testsuite/30_threads/timed_mutex/121496.cc	Thu Jan  1 00:00:00 1970
--- gcc-14-20250905/libstdc++-v3/testsuite/30_threads/timed_mutex/121496.cc	Fri Sep  5 22:34:41 2025
***************
*** 0 ****
--- 1,14 ----
+ // { dg-do compile { target { { i?86-*-linux* x86_64-*-linux* } && lp64 } } }
+ // { dg-require-effective-target c++11 }
+ // { dg-options "-fsanitize=thread" }
+ 
+ // PR libstdc++/121496 no member named '_M_clocklock' with -fsanitize=thread
+ 
+ #include <mutex>
+ #include <chrono>
+ 
+ void
+ test_pr121496(std::timed_mutex& m)
+ {
+   (void) m.try_lock_until(std::chrono::steady_clock::time_point{});
+ }
