diff --git a/gcc-epel.spec b/gcc-epel.spec
index 0f47f74..d686801 100644
--- a/gcc-epel.spec
+++ b/gcc-epel.spec
@@ -1,10 +1,10 @@
-%global DATE 20220127
-%global gitrev 2fa6e5c54e782377faa4c9c1f0e0b16db27f266c
-%global gcc_version 11.2.1
+%global DATE 20220421
+%global gitrev 1d3172725999deb0dca93ac70393ed9a0ad0da3f
+%global gcc_version 11.3.1
%global gcc_major 11
# Note, gcc_release must be integer, if you want to add suffixes to
# %%{release}, append them after %%{gcc_release} on Release: line.
-%global gcc_release 12
+%global gcc_release 2
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -323,9 +323,9 @@ Patch18: gcc11-Wbidi-chars.patch
Patch19: gcc11-dg-ice-fixes.patch
Patch20: gcc11-relocatable-pch.patch
Patch21: gcc11-dejagnu-multiline.patch
-Patch22: gcc11-libsanitizer-pthread.patch
Patch23: gcc11-pie.patch
Patch24: gcc11-bind-now.patch
+Patch25: gcc11-pr105331.patch
Patch100: gcc11-fortran-fdec-duplicates.patch
Patch101: gcc11-fortran-flogical-as-integer.patch
@@ -896,11 +896,11 @@ so that there cannot be any synchronization problems.
%patch19 -p1 -b .ice~
%patch20 -p1 -b .pch~
%patch21 -p1 -b .dejagnu-multiline~
-%patch22 -p1 -b .libsanitizer-pthread~
%if 0
%patch23 -p1 -b .pie~
%patch24 -p1 -b .now~
%endif
+%patch25 -p0 -b .pr105331~
%if 0%{?rhel} >= 9
%patch100 -p1 -b .fortran-fdec-duplicates~
@@ -3467,6 +3467,16 @@ end
%endif
%changelog
+* Wed May 11 2022 Robert Scheck 11.3.1-2
+- backport from 11.3.1-2: update from releases/gcc-11-branch (#2077536)
+- backport from 11.3.1-2: fix bogus -Wuninitialized warning on va_arg with complex types on x86_64
+ (PR target/105331)
+- backport from 11.3.1-2: remove bogus assertion in std::from_chars (PR libstdc++/105324)
+- backport from 11.2.1-10: update from releases/gcc-11-branch (#2063255)
+- backport from 11.2.1-10: fix x86 vector initialization expansion fallback
+- backport from 11.2.1-10: drop patch 22 (gcc11-libsanitizer-pthread.patch;
+ upstreamed as r11-9607-ga8dd74bfb921ed)
+
* Fri Feb 18 2022 Robert Scheck 11.2.1-12
- disable bootstrap mode and rebuild using gcc-epel-11.2.1-11.el9
diff --git a/gcc11-bind-now.patch b/gcc11-bind-now.patch
index 8710490..e0b99a9 100644
--- a/gcc11-bind-now.patch
+++ b/gcc11-bind-now.patch
@@ -131,24 +131,6 @@ index 2ded5d4c50b..5671dc7dcf4 100755
--disable-libquadmath-support
disable libquadmath support for Fortran
--enable-default-pie enable Position Independent Executable as default
-@@ -19394,7 +19397,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 19409 "configure"
-+#line 19412 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -19500,7 +19503,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 19515 "configure"
-+#line 19518 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
@@ -32109,6 +32112,14 @@ fi
@@ -286,24 +268,6 @@ index baa84adbb6c..669ccaede52 100755
# Check whether --enable-cet was given.
if test "${enable_cet+set}" = set; then :
-@@ -11950,7 +11968,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 11963 "configure"
-+#line 11983 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -12056,7 +12074,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 12069 "configure"
-+#line 12089 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
diff --git a/lto-plugin/configure.ac b/lto-plugin/configure.ac
index 7e6f729e9dc..5d5fea8fe70 100644
--- a/lto-plugin/configure.ac
diff --git a/gcc11-libsanitizer-pthread.patch b/gcc11-libsanitizer-pthread.patch
deleted file mode 100644
index fc88d9e..0000000
--- a/gcc11-libsanitizer-pthread.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-Backported from LLVM upstream:
-
-commit ef14b78d9a144ba81ba02083fe21eb286a88732b
-Author: Florian Weimer
-Date: Tue Feb 8 12:46:41 2022 -0800
-
- [sanitizer] Use _thread_db_sizeof_pthread to obtain struct pthread size
-
- This symbol has been exported (as an internal GLIBC_PRIVATE symbol) from libc.so.6 starting with glibc 2.34. glibc uses it internally for its libthread_db implementation to enable thread debugging on GDB, so it is unlikely to go away for now.
-
- Fixes #52989.
-
- Reviewed By: #sanitizers, MaskRay, vitalybuka
-
- Differential Revision: https://reviews.llvm.org/D119007
-
---- a/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cpp
-+++ b/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cpp
-@@ -265,10 +265,8 @@ void InitTlsSize() { }
- // sizeof(struct pthread) from glibc.
- static atomic_uintptr_t thread_descriptor_size;
-
--uptr ThreadDescriptorSize() {
-- uptr val = atomic_load_relaxed(&thread_descriptor_size);
-- if (val)
-- return val;
-+static uptr ThreadDescriptorSizeFallback() {
-+ uptr val = 0;
- #if defined(__x86_64__) || defined(__i386__) || defined(__arm__)
- int major;
- int minor;
-@@ -323,8 +321,21 @@ uptr ThreadDescriptorSize() {
- #elif defined(__s390__)
- val = FIRST_32_SECOND_64(1152, 1776); // valid for glibc 2.22
- #endif
-+ return val;
-+}
-+
-+uptr ThreadDescriptorSize() {
-+ uptr val = atomic_load_relaxed(&thread_descriptor_size);
- if (val)
-- atomic_store_relaxed(&thread_descriptor_size, val);
-+ return val;
-+ // _thread_db_sizeof_pthread is a GLIBC_PRIVATE symbol that is exported in
-+ // glibc 2.34 and later.
-+ if (unsigned *psizeof = static_cast(
-+ dlsym(RTLD_DEFAULT, "_thread_db_sizeof_pthread")))
-+ val = *psizeof;
-+ if (!val)
-+ val = ThreadDescriptorSizeFallback();
-+ atomic_store_relaxed(&thread_descriptor_size, val);
- return val;
- }
-
diff --git a/gcc11-libstdc++-docs.patch b/gcc11-libstdc++-docs.patch
index 4b4f9f8..b044a4d 100644
--- a/gcc11-libstdc++-docs.patch
+++ b/gcc11-libstdc++-docs.patch
@@ -4,7 +4,7 @@
FSF
-+ Release 11.2.1
++ Release 11.3.1
+
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation
@@ -17,7 +17,7 @@
- The API documentation, rendered into HTML, can be viewed online
+ The API documentation, rendered into HTML, can be viewed locally
-+ for the 11.2.1 release,
++ for the 11.3.1 release,
+ online
for each GCC release
and
diff --git a/gcc11-pie.patch b/gcc11-pie.patch
index 36ae11b..728d048 100644
--- a/gcc11-pie.patch
+++ b/gcc11-pie.patch
@@ -291,24 +291,6 @@ index 258b17a226e..bd4fe1fd6ca 100755
--disable-libquadmath-support
disable libquadmath support for Fortran
--enable-default-pie enable Position Independent Executable as default
-@@ -19659,7 +19661,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 19395 "configure"
-+#line 19409 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -19765,7 +19767,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 19501 "configure"
-+#line 19515 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
@@ -32221,13 +32223,17 @@ fi
# Enable --enable-host-shared
# Check whether --enable-host-shared was given.
@@ -793,24 +775,6 @@ index f489f31bc70..0dfc1982844 100755
cet_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fcf-protection"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-@@ -10735,7 +10739,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 10748 "configure"
-+#line 10754 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -10841,7 +10845,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 10854 "configure"
-+#line 10860 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
@@ -11524,15 +11528,31 @@ else
multilib_arg=
fi
diff --git a/gcc11-pr105331.patch b/gcc11-pr105331.patch
new file mode 100644
index 0000000..fa1a9d3
--- /dev/null
+++ b/gcc11-pr105331.patch
@@ -0,0 +1,33 @@
+2022-04-21 Jakub Jelinek
+
+ PR target/105331
+ * config/i386/i386.c (ix86_gimplify_va_arg): Mark va_arg_tmp
+ temporary TREE_ADDRESSABLE before trying to gimplify ADDR_EXPR
+ of it.
+
+ * gcc.dg/pr105331.c: New test.
+
+--- gcc/config/i386/i386.c.jj 2022-04-12 09:20:07.566662842 +0200
++++ gcc/config/i386/i386.c 2022-04-21 12:03:32.201951522 +0200
+@@ -4891,6 +4891,7 @@ ix86_gimplify_va_arg (tree valist, tree
+ {
+ int i, prev_size = 0;
+ tree temp = create_tmp_var (type, "va_arg_tmp");
++ TREE_ADDRESSABLE (temp) = 1;
+
+ /* addr = &temp; */
+ t = build1 (ADDR_EXPR, build_pointer_type (type), temp);
+--- gcc/testsuite/gcc.dg/pr105331.c.jj 2022-04-21 12:09:34.398906718 +0200
++++ gcc/testsuite/gcc.dg/pr105331.c 2022-04-21 12:09:07.304283903 +0200
+@@ -0,0 +1,11 @@
++/* PR target/105331 */
++/* { dg-do compile } */
++/* { dg-options "-O -Wuninitialized" } */
++
++#include
++
++int
++foo (va_list *va)
++{
++ return va_arg (*va, double _Complex); /* { dg-bogus "may be used uninitialized" } */
++}
diff --git a/sources b/sources
index 368229a..835d6d6 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-SHA512 (gcc-11.2.1-20220127.tar.xz) = da9fa3122aa15ad647e07fac27e8c59de74fa04f1846074320751f6fbfa30ac239867b6c349c4d0c08ada01722e6074a89809dd89c3e189fefdfcf16fad70498
+SHA512 (gcc-11.3.1-20220421.tar.xz) = c631a8a990a6977b70a878c34a69c64dd49387edae0931ef64433cbf5f361ecec6a4118a9a5b1eab57b354eecea125297f721ddd25daebc2290749a7eae17af2
SHA512 (isl-0.18.tar.bz2) = 85d0b40f4dbf14cb99d17aa07048cdcab2dc3eb527d2fbb1e84c41b2de5f351025370e57448b63b2b8a8cf8a0843a089c3263f9baee1542d5c2e1cb37ed39d94
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7