diff --git a/.gitignore b/.gitignore
index a29b7ad..3bfbff8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -57,3 +57,4 @@
/gcc-11.2.1-20220125.tar.xz
/gcc-11.2.1-20220127.tar.xz
/gcc-11.2.1-20220401.tar.xz
+/gcc-11.3.1-20220421.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 6aac816..8876363 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20220401
-%global gitrev f0191923ac7d1fee22772d456c59737b935c3483
-%global gcc_version 11.2.1
+%global DATE 20220421
+%global gitrev 46deeb7fcf0b3c0749a5adf511d24f2facfe03aa
+%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 10
+%global gcc_release 1
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -271,7 +271,7 @@ Patch14: gcc11-libgcc-link.patch
Patch15: gcc11-pr101786.patch
Patch16: gcc11-stringify-__VA_OPT__.patch
Patch17: gcc11-stringify-__VA_OPT__-2.patch
-Patch18: gcc11-pr105123.patch
+Patch18: gcc11-pr105331.patch
Patch100: gcc11-fortran-fdec-duplicates.patch
Patch101: gcc11-fortran-flogical-as-integer.patch
@@ -801,7 +801,7 @@ to NVidia PTX capable devices if available.
%patch15 -p0 -b .pr101786~
%patch16 -p0 -b .stringify-__VA_OPT__~
%patch17 -p0 -b .stringify-__VA_OPT__-2~
-%patch18 -p0 -b .pr105123~
+%patch18 -p0 -b .pr105331~
%if 0%{?rhel} >= 9
%patch100 -p1 -b .fortran-fdec-duplicates~
@@ -3150,6 +3150,30 @@ end
%endif
%changelog
+* Thu Apr 21 2022 Jakub Jelinek 11.3.1-1
+- update from releases/gcc-11-branch
+ - GCC 11.3 release
+ - PRs c++/98249, c++/99893, c++/100608, c++/101051, c++/101532, c++/101677,
+ c++/101717, c++/101894, c++/102869, c++/103105, c++/103328,
+ c++/103341, c++/103455, c++/103706, c++/103885, c++/103943,
+ c++/104008, c++/104079, c++/104225, c++/104507, c++/104565,
+ c++/105003, c++/105064, c++/105143, c++/105186, c++/105256, c/101585,
+ debug/105203, fortran/102992, fortran/104210, fortran/104228,
+ fortran/104570, fortran/105138, gcov-profile/105282, ipa/103083,
+ ipa/103432, jit/100613, libstdc++/90943, libstdc++/100516,
+ libstdc++/103630, libstdc++/103638, libstdc++/103650,
+ libstdc++/103955, libstdc++/104098, libstdc++/104301,
+ libstdc++/104542, libstdc++/104859, libstdc++/105021,
+ libstdc++/105027, middle-end/104497, middle-end/105165,
+ rtl-optimization/104985, rtl-optimization/105028,
+ rtl-optimization/105211, target/80556, target/100106, target/104117,
+ target/104474, target/104853, target/104894, target/105214,
+ target/105257, tree-optimization/99121, tree-optimization/104880,
+ tree-optimization/105053, tree-optimization/105070,
+ tree-optimization/105189, tree-optimization/105198,
+ tree-optimization/105226, tree-optimization/105232,
+ tree-optimization/105235
+
* Fri Apr 1 2022 Jakub Jelinek 11.2.1-10
- update from releases/gcc-11-branch
- PRs ada/98724, ada/104258, ada/104767, ada/104861, c++/58646, c++/59950,
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-pr105123.patch b/gcc11-pr105123.patch
deleted file mode 100644
index 1b10d70..0000000
--- a/gcc11-pr105123.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-2022-04-01 Jakub Jelinek
-
- PR target/105123
- * config/i386/i386-expand.c (ix86_expand_vector_init_general): Avoid
- using word as target for expand_simple_binop when doing ASHIFT and
- IOR.
-
- * gcc.target/i386/pr105123.c: New test.
-
---- gcc/config/i386/i386-expand.c.jj 2022-03-19 13:52:53.000000000 +0100
-+++ gcc/config/i386/i386-expand.c 2022-04-01 16:51:27.253154191 +0200
-@@ -14479,9 +14479,9 @@ quarter:
- else
- {
- word = expand_simple_binop (word_mode, ASHIFT, word, shift,
-- word, 1, OPTAB_LIB_WIDEN);
-+ NULL_RTX, 1, OPTAB_LIB_WIDEN);
- word = expand_simple_binop (word_mode, IOR, word, elt,
-- word, 1, OPTAB_LIB_WIDEN);
-+ NULL_RTX, 1, OPTAB_LIB_WIDEN);
- }
- }
-
---- gcc/testsuite/gcc.target/i386/pr105123.c.jj 2022-04-01 16:56:44.549625810 +0200
-+++ gcc/testsuite/gcc.target/i386/pr105123.c 2022-04-01 16:56:33.569782511 +0200
-@@ -0,0 +1,22 @@
-+/* PR target/105123 */
-+/* { dg-do run { target sse2_runtime } } */
-+/* { dg-options "-msse2" } */
-+/* { dg-additional-options "-mtune=i686" { target ia32 } } */
-+
-+typedef unsigned short __attribute__((__vector_size__ (4 * sizeof (unsigned short)))) V;
-+
-+V
-+foo (unsigned short u, V v)
-+{
-+ return __builtin_shuffle (u * v, v);
-+}
-+
-+int
-+main ()
-+{
-+ V x = foo (1, (V) { 0, 1, 2, 3 });
-+ for (unsigned i = 0; i < 4; i++)
-+ if (x[i] != i)
-+ __builtin_abort ();
-+ return 0;
-+}
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 007eb2c..8a79683 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-SHA512 (gcc-11.2.1-20220401.tar.xz) = 10a0cda5ca957abe24e49f1eee6b2254c847282ab70f0064124a71ba6d133e67d8dec2f0071806108003999810cfbc164cff77b23755b9f15797e5b6ae32b2c0
+SHA512 (gcc-11.3.1-20220421.tar.xz) = de7eb63cf35f3334f2dd0e06a41d9a6f9e770679378b35a841afd86252f98a6fd8f36397981d94e6bb6ea4ce3e5fb74df580a4ba109ba96b518810286d25ca38
SHA512 (isl-0.18.tar.bz2) = 85d0b40f4dbf14cb99d17aa07048cdcab2dc3eb527d2fbb1e84c41b2de5f351025370e57448b63b2b8a8cf8a0843a089c3263f9baee1542d5c2e1cb37ed39d94
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
diff --git a/update-gcc.sh b/update-gcc.sh
index 644b209..bacec6a 100755
--- a/update-gcc.sh
+++ b/update-gcc.sh
@@ -3,5 +3,5 @@
git clone --depth 1 git://gcc.gnu.org/git/gcc.git gcc-dir.tmp
git --git-dir=gcc-dir.tmp/.git fetch --depth 1 origin $1
d=`date --iso | sed 's/-//g'`
-git --git-dir=gcc-dir.tmp/.git archive --prefix=gcc-11.2.1-$d/ $1 | xz -9e > gcc-11.2.1-$d.tar.xz
+git --git-dir=gcc-dir.tmp/.git archive --prefix=gcc-11.3.1-$d/ $1 | xz -9e > gcc-11.3.1-$d.tar.xz
rm -rf gcc-dir.tmp