From a067db068a3f74404bf2e2a906d02bd5da123518 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Mon, 2 Nov 2020 13:32:00 +0100
Subject: [PATCH 001/293] 10.2.1-7
---
.gitignore | 1 +
gcc.spec | 15 ++++++++++++---
sources | 2 +-
3 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/.gitignore b/.gitignore
index 736c846..f3cbb4d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,3 +19,4 @@
/gcc-10.2.1-20200916.tar.xz
/gcc-10.2.1-20201005.tar.xz
/gcc-10.2.1-20201016.tar.xz
+/gcc-10.2.1-20201102.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 51a5a24..aa64aa1 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20201016
-%global gitrev b55a9d01144097312b48281486c03e83cf03fde5
+%global DATE 20201102
+%global gitrev 736fd853f0e75ad3f91bdc7156f6b4475a1b60c1
%global gcc_version 10.2.1
%global gcc_major 10
# 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 6
+%global gcc_release 7
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -3054,6 +3054,15 @@ end
%endif
%changelog
+* Mon Nov 2 2020 Jakub Jelinek 10.2.1-7
+- update from releases/gcc-10 branch
+ - PRs c++/95132, c++/96241, c++/97010, c++/97197, c++/97328, fortran/95979,
+ ipa/96394, ipa/97404, libstdc++/97132, lto/97508,
+ rtl-optimization/97386, rtl-optimization/97439, sanitizer/97294,
+ sanitizer/97414, target/96759, target/96914, target/97291,
+ target/97327, target/97506, testsuite/95886, tree-optimization/97081,
+ tree-optimization/97456
+
* Fri Oct 16 2020 Jakub Jelinek 10.2.1-6
- update from releases/gcc-10 branch
- PRs c++/88115, c++/96229, fortran/97272, libstdc++/95788, libstdc++/97273,
diff --git a/sources b/sources
index 160a0d6..bc362aa 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-10.2.1-20201016.tar.xz) = d324b7c872210a14aabdc117567ae6eff98d40ee8bf7a705a8caf1330d698e167016fb98f095ab56de43140e5f19932775ff3d5757434e3f78f2eec57d3dd1c4
+SHA512 (gcc-10.2.1-20201102.tar.xz) = 2b94ad339648bb5da08d47f6e3158c3e21a2b393049d105f491012a28f8b37949ceabba59d071d5faefe60035635157ddecc8b37e7296277592355bcf539ade8
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From de14d872a47fc9b78c73cdb940597943a65f8a9a Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Thu, 12 Nov 2020 11:29:08 +0100
Subject: [PATCH 002/293] 10.2.1-8
---
.gitignore | 1 +
gcc.spec | 24 ++++++++++++++++++++----
gcc10-pr97060.patch | 34 ++++++++++++++++++++++++++++++++++
sources | 2 +-
4 files changed, 56 insertions(+), 5 deletions(-)
create mode 100644 gcc10-pr97060.patch
diff --git a/.gitignore b/.gitignore
index f3cbb4d..1dc73e2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,3 +20,4 @@
/gcc-10.2.1-20201005.tar.xz
/gcc-10.2.1-20201016.tar.xz
/gcc-10.2.1-20201102.tar.xz
+/gcc-10.2.1-20201112.tar.xz
diff --git a/gcc.spec b/gcc.spec
index aa64aa1..4277563 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20201102
-%global gitrev 736fd853f0e75ad3f91bdc7156f6b4475a1b60c1
+%global DATE 20201112
+%global gitrev 86495efb7a403b1ee3419fb3b3b1aaf26345ada5
%global gcc_version 10.2.1
%global gcc_major 10
# 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 7
+%global gcc_release 8
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -171,7 +171,7 @@ BuildRequires: texinfo, texinfo-tex, /usr/bin/pod2man
BuildRequires: systemtap-sdt-devel >= 1.3
BuildRequires: gmp-devel >= 4.1.2-8, mpfr-devel >= 3.1.0, libmpc-devel >= 0.8.1
BuildRequires: python3-devel, /usr/bin/python
-BuildRequires: gcc, gcc-c++
+BuildRequires: gcc, gcc-c++, make
%if %{build_go}
BuildRequires: hostname, procps
%endif
@@ -248,6 +248,8 @@ Requires: glibc >= 2.16
%endif
Requires: libgcc >= %{version}-%{release}
Requires: libgomp = %{version}-%{release}
+# lto-wrapper invokes make
+Requires: make
%if !%{build_ada}
Obsoletes: gcc-gnat < %{version}-%{release}
%endif
@@ -272,6 +274,7 @@ Patch12: gcc10-pr96383.patch
Patch13: gcc10-pr96939.patch
Patch14: gcc10-pr96939-2.patch
Patch15: gcc10-pr96939-3.patch
+Patch16: gcc10-pr97060.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -788,6 +791,7 @@ to NVidia PTX capable devices if available.
%patch14 -p0 -b .pr96939-2~
%patch15 -p0 -b .pr96939-3~
find gcc/testsuite -name \*.pr96939~ | xargs rm -f
+%patch16 -p0 -b .pr97060~
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@@ -3054,6 +3058,18 @@ end
%endif
%changelog
+* Thu Nov 12 2020 Jakub Jelinek 10.2.1-8
+- update from releases/gcc-10 branch
+ - PRs c++/97412, fortran/92793, fortran/97652, libstdc++/92285,
+ libstdc++/96269, libstdc++/97362, libstdc++/97731, middle-end/97392,
+ target/85486, target/97360, target/97638, target/97685,
+ testsuite/80219, testsuite/85303, testsuite/97688, testsuite/97797,
+ tree-optimization/97633, tree-optimization/97764
+ - fix up Fortran ICE on operator with CHARACTER operand (#1895612,
+ PR fortran/97768)
+- emit DW_AT_declaration on declaration-only DIEs (#1889516, PR debug/97060)
+- add BuildRequires: make and Requires: make, the latter for -flto reasons
+
* Mon Nov 2 2020 Jakub Jelinek 10.2.1-7
- update from releases/gcc-10 branch
- PRs c++/95132, c++/96241, c++/97010, c++/97197, c++/97328, fortran/95979,
diff --git a/gcc10-pr97060.patch b/gcc10-pr97060.patch
new file mode 100644
index 0000000..bd0d7be
--- /dev/null
+++ b/gcc10-pr97060.patch
@@ -0,0 +1,34 @@
+2020-11-11 Jason Merrill
+
+ PR debug/97060
+ * dwarf2out.c (gen_subprogram_die): It's a declaration
+ if DECL_INITIAL isn't set.
+
+ * gcc.dg/debug/dwarf2/pr97060.c: New test.
+
+--- gcc/dwarf2out.c
++++ gcc/dwarf2out.c
+@@ -22859,6 +22859,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
+ available.
+ */
+ int declaration = (current_function_decl != decl
++ || (!DECL_INITIAL (decl) && !origin)
+ || class_or_namespace_scope_p (context_die));
+
+ /* A declaration that has been previously dumped needs no
+--- gcc/testsuite/gcc.dg/debug/dwarf2/pr97060.c
++++ gcc/testsuite/gcc.dg/debug/dwarf2/pr97060.c
+@@ -0,0 +1,13 @@
++/* PR debug/97060 */
++/* { dg-do compile } */
++/* { dg-options "-g -dA" } */
++/* { dg-final { scan-assembler-times "DW_AT_declaration" 2 } } */
++
++extern int foo (unsigned int, unsigned int);
++
++int
++bar (void)
++{
++ foo (1, 2);
++ return 0;
++}
diff --git a/sources b/sources
index bc362aa..5302408 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-10.2.1-20201102.tar.xz) = 2b94ad339648bb5da08d47f6e3158c3e21a2b393049d105f491012a28f8b37949ceabba59d071d5faefe60035635157ddecc8b37e7296277592355bcf539ade8
+SHA512 (gcc-10.2.1-20201112.tar.xz) = 6f624eee77c0a35939978d59e7411764343a29d969a25e1a78c5fa27fc74b539c4a65c591f5699268cfe118df0054b5996b49b6cd2c02ce105ff86b5b935b2a1
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From 94687bec15156308bd04ca2d0ef40df6091ac93b Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Wed, 25 Nov 2020 13:27:09 +0100
Subject: [PATCH 003/293] 10.2.1-9
---
.gitignore | 1 +
gcc.spec | 19 +++++++++++++++----
sources | 2 +-
3 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/.gitignore b/.gitignore
index 1dc73e2..e230e3b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,3 +21,4 @@
/gcc-10.2.1-20201016.tar.xz
/gcc-10.2.1-20201102.tar.xz
/gcc-10.2.1-20201112.tar.xz
+/gcc-10.2.1-20201125.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 4277563..be32486 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20201112
-%global gitrev 86495efb7a403b1ee3419fb3b3b1aaf26345ada5
+%global DATE 20201125
+%global gitrev 2cd1f70a7b47cb9bd8da4aa4663e7d75b0cfcac5
%global gcc_version 10.2.1
%global gcc_major 10
# 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 8
+%global gcc_release 9
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -791,7 +791,7 @@ to NVidia PTX capable devices if available.
%patch14 -p0 -b .pr96939-2~
%patch15 -p0 -b .pr96939-3~
find gcc/testsuite -name \*.pr96939~ | xargs rm -f
-%patch16 -p0 -b .pr97060~
+#%patch16 -p0 -b .pr97060~
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@@ -3058,6 +3058,17 @@ end
%endif
%changelog
+* Wed Nov 25 2020 Jakub Jelinek 10.2.1-9
+- update from releases/gcc-10 branch
+ - PRs c++/67453, c++/96805, c++/97663, c++/97790, c/97748, c/97958, d/97842,
+ d/97843, d/97889, fortran/95847, fortran/97782, libstdc++/93456,
+ libstdc++/95989, libstdc++/96042, libstdc++/97798, libstdc++/97828,
+ libstdc++/97869, libstdc++/97876, target/97528, target/97534,
+ target/97535, target/97682, target/97727, target/97730, target/97887
+ - fix LTO -g ICE on firefox 83 (#1899294, PR c++/97918)
+ - fix DW_TAG_unspecified_parameters for LTO or function clones
+ (#1893340, PR debug/97599)
+
* Thu Nov 12 2020 Jakub Jelinek 10.2.1-8
- update from releases/gcc-10 branch
- PRs c++/97412, fortran/92793, fortran/97652, libstdc++/92285,
diff --git a/sources b/sources
index 5302408..fb0364f 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-10.2.1-20201112.tar.xz) = 6f624eee77c0a35939978d59e7411764343a29d969a25e1a78c5fa27fc74b539c4a65c591f5699268cfe118df0054b5996b49b6cd2c02ce105ff86b5b935b2a1
+SHA512 (gcc-10.2.1-20201125.tar.xz) = 4a1d389032f699f47004a146d0cf96aad4febc46d0bc4750a6a435134822743f68739fcc1b9dcc4ae26d26a5d82ad71c83ecc67d2307d722157d1a7bee4a42c5
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From 230cd6b21706295659ee704eac4b9d409e35bb56 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Fri, 4 Dec 2020 19:28:55 +0100
Subject: [PATCH 004/293] 11.0.0-0.7
---
.gitignore | 1 +
gcc.spec | 654 +++++-------------
gcc10-pr96383.patch | 236 -------
gcc10-pr96939-2.patch | 51 --
gcc10-pr96939-3.patch | 111 ---
gcc10-pr96939.patch | 64 --
gcc10-pr97060.patch | 34 -
...y.patch => gcc11-Wno-format-security.patch | 0
...os.patch => gcc11-d-shared-libphobos.patch | 0
...ault.patch => gcc11-foffload-default.patch | 50 +-
gcc10-hack.patch => gcc11-hack.patch | 0
...-libgomp.patch => gcc11-i386-libgomp.patch | 0
gcc10-isl-dl.patch => gcc11-isl-dl.patch | 13 +-
...atch => gcc11-libgomp-omp_h-multilib.patch | 0
...+-docs.patch => gcc11-libstdc++-docs.patch | 4 +-
...path.patch => gcc11-libtool-no-rpath.patch | 0
...-needed.patch => gcc11-no-add-needed.patch | 0
...0-rh1574936.patch => gcc11-rh1574936.patch | 0
...atch => gcc11-sparc-config-detection.patch | 0
sources | 2 +-
update-gcc.sh | 2 +-
21 files changed, 206 insertions(+), 1016 deletions(-)
delete mode 100644 gcc10-pr96383.patch
delete mode 100644 gcc10-pr96939-2.patch
delete mode 100644 gcc10-pr96939-3.patch
delete mode 100644 gcc10-pr96939.patch
delete mode 100644 gcc10-pr97060.patch
rename gcc10-Wno-format-security.patch => gcc11-Wno-format-security.patch (100%)
rename gcc10-d-shared-libphobos.patch => gcc11-d-shared-libphobos.patch (100%)
rename gcc10-foffload-default.patch => gcc11-foffload-default.patch (82%)
rename gcc10-hack.patch => gcc11-hack.patch (100%)
rename gcc10-i386-libgomp.patch => gcc11-i386-libgomp.patch (100%)
rename gcc10-isl-dl.patch => gcc11-isl-dl.patch (99%)
rename gcc10-libgomp-omp_h-multilib.patch => gcc11-libgomp-omp_h-multilib.patch (100%)
rename gcc10-libstdc++-docs.patch => gcc11-libstdc++-docs.patch (96%)
rename gcc10-libtool-no-rpath.patch => gcc11-libtool-no-rpath.patch (100%)
rename gcc10-no-add-needed.patch => gcc11-no-add-needed.patch (100%)
rename gcc10-rh1574936.patch => gcc11-rh1574936.patch (100%)
rename gcc10-sparc-config-detection.patch => gcc11-sparc-config-detection.patch (100%)
diff --git a/.gitignore b/.gitignore
index e230e3b..0d11d30 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,4 @@
/gcc-10.2.1-20201102.tar.xz
/gcc-10.2.1-20201112.tar.xz
/gcc-10.2.1-20201125.tar.xz
+/gcc-11.0.0-20201204.tar.xz
diff --git a/gcc.spec b/gcc.spec
index be32486..23c7843 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20201125
-%global gitrev 2cd1f70a7b47cb9bd8da4aa4663e7d75b0cfcac5
-%global gcc_version 10.2.1
-%global gcc_major 10
+%global DATE 20201204
+%global gitrev d35391d824edee33b5fbce3df058f4fafd9b9fa6
+%global gcc_version 11.0.0
+%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 9
+%global gcc_release 0
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -119,12 +119,14 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
-Release: %{gcc_release}%{?dist}
+Release: %{gcc_release}.7%{?dist}
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
-# The source for this package was pulled from upstream's vcs. Use the
-# following commands to generate the tarball:
+# The source for this package was pulled from upstream's vcs.
+# %%{gitrev} is some commit from the
+# https://gcc.gnu.org/git/?p=gcc.git;h=refs/vendors/redhat/heads/gcc-%%{gcc_major}-branch
+# branch. Use the following commands to generate the tarball:
# 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 %%{gitrev}
# git --git-dir=gcc-dir.tmp/.git archive --prefix=%%{name}-%%{version}-%%{DATE}/ %%{gitrev} | xz -9e > %%{name}-%%{version}-%%{DATE}.tar.xz
@@ -258,23 +260,18 @@ AutoReq: true
Provides: bundled(libiberty)
Provides: gcc(major) = %{gcc_major}
-Patch0: gcc10-hack.patch
-Patch1: gcc10-i386-libgomp.patch
-Patch2: gcc10-sparc-config-detection.patch
-Patch3: gcc10-libgomp-omp_h-multilib.patch
-Patch4: gcc10-libtool-no-rpath.patch
-Patch5: gcc10-isl-dl.patch
-Patch6: gcc10-libstdc++-docs.patch
-Patch7: gcc10-no-add-needed.patch
-Patch8: gcc10-foffload-default.patch
-Patch9: gcc10-Wno-format-security.patch
-Patch10: gcc10-rh1574936.patch
-Patch11: gcc10-d-shared-libphobos.patch
-Patch12: gcc10-pr96383.patch
-Patch13: gcc10-pr96939.patch
-Patch14: gcc10-pr96939-2.patch
-Patch15: gcc10-pr96939-3.patch
-Patch16: gcc10-pr97060.patch
+Patch0: gcc11-hack.patch
+Patch1: gcc11-i386-libgomp.patch
+Patch2: gcc11-sparc-config-detection.patch
+Patch3: gcc11-libgomp-omp_h-multilib.patch
+Patch4: gcc11-libtool-no-rpath.patch
+Patch5: gcc11-isl-dl.patch
+Patch6: gcc11-libstdc++-docs.patch
+Patch7: gcc11-no-add-needed.patch
+Patch8: gcc11-foffload-default.patch
+Patch9: gcc11-Wno-format-security.patch
+Patch10: gcc11-rh1574936.patch
+Patch11: gcc11-d-shared-libphobos.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -296,7 +293,7 @@ Patch16: gcc10-pr97060.patch
%if %{build_go}
# Avoid stripping these libraries and binaries.
%global __os_install_post \
-chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.16.* \
+chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.17.* \
chmod 644 %{buildroot}%{_prefix}/bin/go.gcc \
chmod 644 %{buildroot}%{_prefix}/bin/gofmt.gcc \
chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cgo \
@@ -304,7 +301,7 @@ chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}
chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/test2json \
chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/vet \
%__os_install_post \
-chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgo.so.16.* \
+chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgo.so.17.* \
chmod 755 %{buildroot}%{_prefix}/bin/go.gcc \
chmod 755 %{buildroot}%{_prefix}/bin/gofmt.gcc \
chmod 755 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cgo \
@@ -315,11 +312,11 @@ chmod 755 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}
%endif
%description
-The gcc package contains the GNU Compiler Collection version 10.
+The gcc package contains the GNU Compiler Collection version 11.
You'll need this package in order to compile C code.
%package -n libgcc
-Summary: GCC version 10 shared support library
+Summary: GCC version 11 shared support library
Autoreq: false
%if !%{build_ada}
Obsoletes: libgnat < %{version}-%{release}
@@ -786,12 +783,6 @@ to NVidia PTX capable devices if available.
%patch10 -p0 -b .rh1574936~
%endif
%patch11 -p0 -b .d-shared-libphobos~
-%patch12 -p0 -b .pr96383~
-%patch13 -p0 -b .pr96939~
-%patch14 -p0 -b .pr96939-2~
-%patch15 -p0 -b .pr96939-3~
-find gcc/testsuite -name \*.pr96939~ | xargs rm -f
-#%patch16 -p0 -b .pr97060~
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@@ -986,6 +977,9 @@ CONFIGURE_OPTS="\
--with-arch=x86-64 \
%endif
%ifarch x86_64
+%if 0%{?rhel} > 8
+ --with-arch_64=x86-64-v2 \
+%endif
--with-arch_32=x86-64 \
%endif
%else
@@ -999,7 +993,11 @@ CONFIGURE_OPTS="\
%ifarch s390 s390x
%if 0%{?rhel} >= 7
%if 0%{?rhel} > 7
+%if 0%{?rhel} > 8
+ --with-arch=z13 --with-tune=arch13 \
+%else
--with-arch=z13 --with-tune=z14 \
+%endif
%else
--with-arch=z196 --with-tune=zEC12 \
%endif
@@ -1388,7 +1386,7 @@ ln -sf ../../../libstdc++.so.6.*[0-9] libstdc++.so
ln -sf ../../../libgfortran.so.5.* libgfortran.so
ln -sf ../../../libgomp.so.1.* libgomp.so
%if %{build_go}
-ln -sf ../../../libgo.so.16.* libgo.so
+ln -sf ../../../libgo.so.17.* libgo.so
%endif
%if %{build_libquadmath}
ln -sf ../../../libquadmath.so.0.* libquadmath.so
@@ -1418,7 +1416,7 @@ ln -sf ../../../../%{_lib}/libstdc++.so.6.*[0-9] libstdc++.so
ln -sf ../../../../%{_lib}/libgfortran.so.5.* libgfortran.so
ln -sf ../../../../%{_lib}/libgomp.so.1.* libgomp.so
%if %{build_go}
-ln -sf ../../../../%{_lib}/libgo.so.16.* libgo.so
+ln -sf ../../../../%{_lib}/libgo.so.17.* libgo.so
%endif
%if %{build_libquadmath}
ln -sf ../../../../%{_lib}/libquadmath.so.0.* libquadmath.so
@@ -1538,8 +1536,8 @@ ln -sf ../`echo ../../../../lib/libgfortran.so.5.* | sed s~/lib/~/lib64/~` 64/li
ln -sf ../`echo ../../../../lib/libgomp.so.1.* | sed s~/lib/~/lib64/~` 64/libgomp.so
%if %{build_go}
rm -f libgo.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgo.so.16.* | sed 's,^.*libg,libg,'`' )' > libgo.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgo.so.16.* | sed 's,^.*libg,libg,'`' )' > 64/libgo.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgo.so.17.* | sed 's,^.*libg,libg,'`' )' > libgo.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgo.so.17.* | sed 's,^.*libg,libg,'`' )' > 64/libgo.so
%endif
%if %{build_libquadmath}
rm -f libquadmath.so
@@ -1637,8 +1635,8 @@ ln -sf ../`echo ../../../../lib64/libgfortran.so.5.* | sed s~/../lib64/~/~` 32/l
ln -sf ../`echo ../../../../lib64/libgomp.so.1.* | sed s~/../lib64/~/~` 32/libgomp.so
%if %{build_go}
rm -f libgo.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgo.so.16.* | sed 's,^.*libg,libg,'`' )' > libgo.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgo.so.16.* | sed 's,^.*libg,libg,'`' )' > 32/libgo.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgo.so.17.* | sed 's,^.*libg,libg,'`' )' > libgo.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgo.so.17.* | sed 's,^.*libg,libg,'`' )' > 32/libgo.so
%endif
%if %{build_libquadmath}
rm -f libquadmath.so
@@ -1825,7 +1823,7 @@ chmod 755 %{buildroot}%{_prefix}/%{_lib}/liblsan.so.0.*
%endif
%if %{build_go}
# Avoid stripping these libraries and binaries.
-chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.16.*
+chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.17.*
chmod 644 %{buildroot}%{_prefix}/bin/go.gcc
chmod 644 %{buildroot}%{_prefix}/bin/gofmt.gcc
chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cgo
@@ -2190,6 +2188,16 @@ end
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/enqcmdintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512vp2intersectintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512vp2intersectvlintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/serializeintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/tsxldtrkintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/amxtileintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/amxint8intrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/amxbf16intrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/x86gprintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/uintrintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/hresetintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/keylockerintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avxvnniintrin.h
%endif
%ifarch ia64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/ia64intrin.h
@@ -2950,7 +2958,7 @@ end
%doc rpm.doc/go/*
%files -n libgo
-%attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.16*
+%attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.17*
%doc rpm.doc/libgo/*
%files -n libgo-devel
@@ -3058,448 +3066,130 @@ end
%endif
%changelog
-* Wed Nov 25 2020 Jakub Jelinek 10.2.1-9
-- update from releases/gcc-10 branch
- - PRs c++/67453, c++/96805, c++/97663, c++/97790, c/97748, c/97958, d/97842,
- d/97843, d/97889, fortran/95847, fortran/97782, libstdc++/93456,
- libstdc++/95989, libstdc++/96042, libstdc++/97798, libstdc++/97828,
- libstdc++/97869, libstdc++/97876, target/97528, target/97534,
- target/97535, target/97682, target/97727, target/97730, target/97887
- - fix LTO -g ICE on firefox 83 (#1899294, PR c++/97918)
- - fix DW_TAG_unspecified_parameters for LTO or function clones
- (#1893340, PR debug/97599)
+* Fri Dec 4 2020 Jakub Jelinek 11.0.0-0.7
+- update from trunk
+ - PRs bootstrap/97983, c++/80780, c++/90629, c++/93093, c++/97187,
+ c++/97947, c++/97975, c++/97993, c++/98019, c++/98054, c++/98072,
+ c++/98104, c++/98107, c++/98115, c++/98116, c/65455, c/92935, c/97880,
+ c/98087, d/87788, d/87818, d/98025, debug/97989, fortran/95342,
+ fortran/98010, fortran/98011, fortran/98013, ipa/88702, ipa/98057,
+ ipa/98075, jit/97867, libgcc/97543, libgcc/97643, libstdc++/65480,
+ libstdc++/68735, libstdc++/93121, libstdc++/98001, libstdc++/98003,
+ middle-end/89428, middle-end/92936, middle-end/92940,
+ middle-end/93195, middle-end/93197, middle-end/94527,
+ middle-end/97373, middle-end/97595, middle-end/98070,
+ middle-end/98082, middle-end/98099, other/98027, plugins/98059,
+ preprocessor/97602, rtl-optimization/97459, rtl-optimization/97777,
+ rtl-optimization/97954, rtl-optimization/98037, target/96607,
+ target/96906, target/97642, target/97770, target/97939, target/98063,
+ target/98079, target/98086, testsuite/98002, testsuite/98036,
+ testsuite/98085, tree-optimization/14799, tree-optimization/88702,
+ tree-optimization/96679, tree-optimization/96708,
+ tree-optimization/97630, tree-optimization/97953,
+ tree-optimization/97979, tree-optimization/97997,
+ tree-optimization/98024, tree-optimization/98048,
+ tree-optimization/98064, tree-optimization/98066,
+ tree-optimization/98084
-* Thu Nov 12 2020 Jakub Jelinek 10.2.1-8
-- update from releases/gcc-10 branch
- - PRs c++/97412, fortran/92793, fortran/97652, libstdc++/92285,
- libstdc++/96269, libstdc++/97362, libstdc++/97731, middle-end/97392,
- target/85486, target/97360, target/97638, target/97685,
- testsuite/80219, testsuite/85303, testsuite/97688, testsuite/97797,
- tree-optimization/97633, tree-optimization/97764
- - fix up Fortran ICE on operator with CHARACTER operand (#1895612,
- PR fortran/97768)
-- emit DW_AT_declaration on declaration-only DIEs (#1889516, PR debug/97060)
+* Thu Nov 26 2020 Jakub Jelinek 11.0.0-0.6
+- update from trunk
+ - PRs bootstrap/94982, bootstrap/97622, bootstrap/97933, c++/97899, c/97958,
+ fortran/85796, libstdc++/67791, libstdc++/97935, libstdc++/97936,
+ libstdc++/97944, middle-end/97943, middle-end/97956,
+ rtl-optimization/95862, target/91816, target/97534, target/97950,
+ tree-optimization/96929, tree-optimization/97849,
+ tree-optimization/97964
+
+* Tue Nov 24 2020 Jakub Jelinek 11.0.0-0.5
+- update from trunk
+ - PRs c++/94695, c++/97427, c++/97839, c++/97846, c++/97881, c++/97904,
+ c/95630, d/97889, libstdc++/97948, tree-optimization/95853
+
+* Sat Nov 21 2020 Jakub Jelinek 11.0.0-0.4
+- update from trunk
+ - PRs ada/97805, ada/97859, analyzer/97668, analyzer/97893, bootstrap/57076,
+ bootstrap/97666, bootstrap/97857, c++/25814, c++/52830, c++/63287,
+ c++/67453, c++/78209, c++/81660, c++/87765, c++/88115, c++/88982,
+ c++/89565, c++/90799, c++/91318, c++/93107, c++/93907, c++/95808,
+ c++/97388, c++/97412, c++/97453, c++/97479, c++/97518, c++/97523,
+ c++/97632, c++/97663, c++/97670, c++/97675, c++/97762, c++/97790,
+ c++/97871, c++/97877, c++/97895, c++/97905, c++/97918, c/90628,
+ c/97748, c/97860, d/97644, d/97842, d/97843, debug/97060, debug/97599,
+ debug/97718, driver/97574, fortran/90111, fortran/92793,
+ fortran/94358, fortran/95847, fortran/97652, fortran/97655,
+ fortran/97768, fortran/97782, ipa/97578, ipa/97660, ipa/97695,
+ ipa/97698, ipa/97816, jit/87291, libstdc++/55394, libstdc++/66146,
+ libstdc++/83938, libstdc++/84323, libstdc++/88101, libstdc++/92285,
+ libstdc++/92546, libstdc++/93421, libstdc++/93456, libstdc++/94971,
+ libstdc++/95989, libstdc++/96269, libstdc++/96958, libstdc++/97415,
+ libstdc++/97600, libstdc++/97613, libstdc++/97719, libstdc++/97729,
+ libstdc++/97731, libstdc++/97758, libstdc++/97798, libstdc++/97828,
+ libstdc++/97869, lto/97290, lto/97508, middle-end/85811,
+ middle-end/95673, middle-end/97267, middle-end/97556,
+ middle-end/97579, middle-end/97840, middle-end/97862,
+ middle-end/97879, objc/77404, objc/90707, objc/97854, other/97911,
+ pch/86674, pch/97593, preprocessor/97858, rtl-optimization/92180,
+ rtl-optimization/97705, sanitizer/95634, target/31799, target/85486,
+ target/91489, target/93449, target/96307, target/96770, target/96791,
+ target/96933, target/96967, target/96998, target/97140, target/97194,
+ target/97205, target/97326, target/97528, target/97532, target/97540,
+ target/97638, target/97682, target/97685, target/97715, target/97726,
+ target/97727, target/97730, target/97870, target/97873,
+ testsuite/80219, testsuite/85303, testsuite/97117, testsuite/97688,
+ testsuite/97788, testsuite/97797, testsuite/97803,
+ tree-optimization/80928, tree-optimization/83072,
+ tree-optimization/91029, tree-optimization/93781,
+ tree-optimization/94406, tree-optimization/96671,
+ tree-optimization/96789, tree-optimization/97223,
+ tree-optimization/97424, tree-optimization/97558,
+ tree-optimization/97609, tree-optimization/97623,
+ tree-optimization/97626, tree-optimization/97633,
+ tree-optimization/97650, tree-optimization/97678,
+ tree-optimization/97690, tree-optimization/97693,
+ tree-optimization/97706, tree-optimization/97709,
+ tree-optimization/97721, tree-optimization/97725,
+ tree-optimization/97732, tree-optimization/97733,
+ tree-optimization/97736, tree-optimization/97737,
+ tree-optimization/97741, tree-optimization/97746,
+ tree-optimization/97753, tree-optimization/97760,
+ tree-optimization/97761, tree-optimization/97764,
+ tree-optimization/97765, tree-optimization/97767,
+ tree-optimization/97769, tree-optimization/97780,
+ tree-optimization/97806, tree-optimization/97812,
+ tree-optimization/97830, tree-optimization/97835,
+ tree-optimization/97838, tree-optimization/97886,
+ tree-optimization/97888, tree-optimization/97897,
+ tree-optimization/97901
- add BuildRequires: make and Requires: make, the latter for -flto reasons
-* Mon Nov 2 2020 Jakub Jelinek 10.2.1-7
-- update from releases/gcc-10 branch
- - PRs c++/95132, c++/96241, c++/97010, c++/97197, c++/97328, fortran/95979,
- ipa/96394, ipa/97404, libstdc++/97132, lto/97508,
- rtl-optimization/97386, rtl-optimization/97439, sanitizer/97294,
- sanitizer/97414, target/96759, target/96914, target/97291,
- target/97327, target/97506, testsuite/95886, tree-optimization/97081,
- tree-optimization/97456
-
-* Fri Oct 16 2020 Jakub Jelinek 10.2.1-6
-- update from releases/gcc-10 branch
- - PRs c++/88115, c++/96229, fortran/97272, libstdc++/95788, libstdc++/97273,
- lto/97290, middle-end/95189, middle-end/95886, rtl-optimization/97313,
- target/96313, target/96456, target/97150, target/97251, target/97302,
- target/97349, tree-optimization/97236, tree-optimization/97255,
- tree-optimization/97357
- - fix ICE on building Firefox with LTO+PGO (#1886399, PR ipa/97295)
-
-* Mon Oct 5 2020 Jakub Jelinek 10.2.1-5
-- update from releases/gcc-10 branch
- - PRs bootstrap/97163, bootstrap/97183, c++/96994, c++/97145, c++/97195,
- fortran/93423, fortran/95614, fortran/96041, gcov-profile/64636,
- gcov-profile/96913, gcov-profile/97069, gcov-profile/97193,
- libstdc++/94160, libstdc++/94681, libstdc++/96803, libstdc++/97101,
- libstdc++/97167, middle-end/95464, middle-end/97054, middle-end/97073,
- preprocessor/96935, target/71233, target/96683, target/96795,
- target/96827, target/97166, target/97184, target/97231, target/97247,
- tree-optimization/96979, tree-optimization/97053
-
-* Wed Sep 16 2020 Jakub Jelinek 10.2.1-4
-- update from releases/gcc-10 branch
- - PRs bootstrap/96203, c++/95164, c++/96862, c++/96901, d/96157, d/96924,
- debug/93865, debug/94235, debug/96729, fortran/94690, fortran/95109,
- fortran/95398, fortran/95882, fortran/96859, libstdc++/71960,
- libstdc++/92978, libstdc++/96766, libstdc++/96851, lto/94311,
- middle-end/87256, middle-end/96369, target/85830, target/94538,
- target/96357, target/96551, target/96574, target/96744, target/96808,
- target/97028, tree-optimization/88240, tree-optimization/96349,
- tree-optimization/96370, tree-optimization/96514,
- tree-optimization/96522, tree-optimization/96579,
- tree-optimization/96597, tree-optimization/96820,
- tree-optimization/96854, tree-optimization/97043
-- fix up ARM target attribute/pragma handling (#1875814, PR target/96939)
-- don't ICE on sp clobbers with -mincoming-stack-boundary=2 on ia32
- (#1862029, PR target/97032)
-
-* Wed Aug 26 2020 Jakub Jelinek 10.2.1-3
-- update from releases/gcc-10 branch
- - PRs c++/95428, c++/96082, c++/96106, c++/96164, c++/96199, c++/96497,
- c/96545, c/96549, c/96571, d/96250, d/96254, d/96301, debug/96354,
- fortran/93553, fortran/96312, fortran/96486, ipa/95320, ipa/96291,
- ipa/96482, libstdc++/89760, libstdc++/95749, libstdc++/96303,
- libstdc++/96484, libstdc++/96718, lto/95362, lto/95548,
- middle-end/96426, middle-end/96459, target/93897, target/95450,
- target/96191, target/96243, target/96446, target/96493, target/96506,
- target/96525, target/96530, target/96536, target/96562, target/96682,
- tree-optimization/96483, tree-optimization/96535,
- tree-optimization/96722, tree-optimization/96730,
- tree-optimization/96758
-- mangle some further symbols needed for debug info during early dwarf
- (#1862029, PR debug/96690)
-- during %%check perform tests whether annobin is usable with the newly built
- compiler or whether it might need to be rebuilt
-- disable graphite for ELN
-
-* Tue Aug 4 2020 Jakub Jelinek 10.2.1-2
-- update from releases/gcc-10 branch
- - PRs c++/95591, c++/95599, c++/95823, c++/95824, c++/95895, c/96377,
- d/96140, fortran/89574, fortran/93567, fortran/93592, fortran/95585,
- fortran/95612, fortran/95980, fortran/96018, fortran/96086,
- fortran/96220, fortran/96319, lto/45375, middle-end/96335,
- target/95435, target/96190, target/96236, target/96260, target/96402,
- tree-optimization/96058
-- emit debug info for C/C++ external function declarations used in the TU
- (PR debug/96383)
-- discard SHN_UNDEF global symbols from LTO debuginfo (PR lto/96385)
-- strip also -flto=auto from optflags
-
-* Thu Jul 23 2020 Jakub Jelinek 10.2.1-1
-- update from releases/gcc-10 branch
- - GCC 10.2 release
- - PRs bootstrap/94998, c++/90916, c++/95477, c++/95505, c++/95518,
- c++/95519, c++/95711, c++/95719, c++/95736, c++/95789, c++/95813,
- c++/95976, c++/96052, c++/96063, c++/96077, c++/96104, c++/96105,
- c++/96179, c/95141, d/95173, d/95250, debug/95343, fortran/71706,
- fortran/88379, fortran/93337, fortran/95340, fortran/95366,
- fortran/95587, fortran/95687, fortran/95688, fortran/95689,
- fortran/95707, fortran/95708, fortran/95709, fortran/95743,
- fortran/95812, fortran/95826, fortran/95827, fortran/95828,
- fortran/95829, fortran/95880, fortran/95881, fortran/95978,
- ipa/12345, ipa/93223, ipa/96040, ipa/96130, libstdc++/91153,
- libstdc++/91807, libstdc++/94087, libstdc++/94627, libstdc++/94936,
- libstdc++/95282, libstdc++/95851, libstdc++/95915, lto/91576,
- lto/95604, middle-end/94600, middle-end/94964, middle-end/95114,
- middle-end/95118, middle-end/95270, middle-end/95493,
- middle-end/95690, middle-end/95810, middle-end/95903,
- middle-end/96194, target/12345, target/93224, target/93492,
- target/94791, target/94891, target/95018, target/95105, target/95347,
- target/95581, target/95683, target/95713, target/95726, target/95874,
- target/96001, target/96125, target/96174, testsuite/96180,
- tree-optimization/90838, tree-optimization/94969,
- tree-optimization/95049, tree-optimization/95110,
- tree-optimization/95133, tree-optimization/95308,
- tree-optimization/95487, tree-optimization/95638,
- tree-optimization/95717, tree-optimization/95804,
- tree-optimization/95857, tree-optimization/96075,
- tree-optimization/96133, tree-optimization/96146
- - disable s390x multilibs also for ELN
- - disable -flto in %%{optflags}, lto bootstrap will be enabled the GCC way
- later
-
-* Thu Jun 18 2020 Jakub Jelinek 10.1.1-2
-- update from releases/gcc-10 branch
- - PRs c++/90212, c++/90479, c++/90915, c++/91529, c++/92103, c++/92633,
- c++/92652, c++/92838, c++/93310, c++/93467, c++/93698, c++/93822,
- c++/94128, c++/94817, c++/94829, c++/94885, c++/94937, c++/94955,
- c++/95003, c++/95020, c++/95050, c++/95066, c++/95087, c++/95137,
- c++/95158, c++/95181, c++/95197, c++/95222, c++/95241, c++/95319,
- c++/95328, c++/95344, c++/95345, c++/95346, c++/95350, c++/95371,
- c++/95386, c++/95440, c++/95508, c++/95560, c++/95562, c/95040,
- c/95580, d/94970, d/95166, d/95167, d/95168, debug/95080,
- fortran/39695, fortran/50392, fortran/59107, fortran/92993,
- fortran/93366, fortran/93497, fortran/94109, fortran/94361,
- fortran/94397, fortran/94672, fortran/95088, fortran/95090,
- fortran/95091, fortran/95106, fortran/95373, fortran/95500,
- fortran/95503, fortran/95530, fortran/95537, fortran/95544,
- fortran/95611, gcov-profile/95332, ipa/94947, ipa/95113,
- libfortran/95104, libfortran/95119, libfortran/95191,
- libfortran/95390, libgomp/92854, libstdc++/77691, libstdc++/92894,
- libstdc++/93983, libstdc++/94906, libstdc++/94933, libstdc++/95289,
- libstdc++/95322, libstdc++/95578, lto/94848, lto/95190,
- middle-end/94940, middle-end/95108, middle-end/95551,
- middle-end/95622, sanitizer/94910, sanitizer/95634, target/91695,
- target/94591, target/94735, target/94959, target/95169, target/95212,
- target/95220, target/95255, target/95258, target/95355, target/95420,
- target/95525, target/95528, testsuite/95361, testsuite/95575,
- web/95380
-- correct instructions for creation of newlib tarball, filter out sun-rpc
- licensed code that is never used during the package build
-
-* Mon May 11 2020 Tom Stellard
-- add symlink to liblto_plugin.so in /usr/lib/bfd-plugins
-
-* Thu May 7 2020 Jakub Jelinek 10.1.1-1
-- update from releases/gcc-10 branch
- - GCC 10.1.0 release
- - PRs bootstrap/94918, c++/94907, c++/94938, c++/94946, c++/94951, c/94842,
- c/94968, libstdc++/94901, middle-end/94941, rtl-optimization/94873,
- target/94942, target/94950
-
-* Sat May 2 2020 Jakub Jelinek 10.0.1-0.14
-- use libgcc_s.so linker script also on aarch64 and riscv64 (#1830472)
-
-* Fri May 1 2020 Jakub Jelinek 10.0.1-0.13
-- update from trunk and releases/gcc-10 branch
- - GCC 10.1-rc1
- - PRs analyzer/94447, analyzer/94639, analyzer/94732, analyzer/94754,
- analyzer/94816, bootstrap/94739, c++/79585, c++/90320, c++/90448,
- c++/90750, c++/93807, c++/94288, c++/94383, c++/94505, c++/94510,
- c++/94546, c++/94549, c++/94583, c++/94592, c++/94597, c++/94628,
- c++/94645, c++/94661, c++/94682, c++/94701, c++/94719, c++/94733,
- c++/94742, c++/94752, c++/94759, c++/94760, c++/94772, c++/94775,
- c++/94808, c++/94819, c++/94827, c++/94830, c++/94879, c++/94883,
- c++/94886, c/94641, c/94686, c/94705, c/94755, d/89418, d/94777,
- d/94825, demangler/94797, driver/90983, fortran/90350, fortran/93956,
- fortran/94578, fortran/94709, fortran/94737, fortran/94769,
- fortran/94788, ipa/94856, libfortran/25830, libfortran/94586,
- libfortran/94694, libstdc++/89510, libstdc++/90415, libstdc++/91480,
- libstdc++/92156, libstdc++/94831, libstdc++/94854, lto/94659,
- lto/94822, middle-end/92830, middle-end/93488, middle-end/94647,
- middle-end/94724, rtl-optimization/94708, rtl-optimization/94740,
- target/57002, target/91518, target/92713, target/93654, target/94248,
- target/94279, target/94282, target/94383, target/94514, target/94515,
- target/94577, target/94613, target/94622, target/94668, target/94678,
- target/94697, target/94704, target/94706, target/94707, target/94710,
- target/94711, target/94748, target/94780, target/94812, target/94820,
- target/94826, target/94832, testsuite/94712, translation/94698,
- tree-optimization/89430, tree-optimization/94683,
- tree-optimization/94700, tree-optimization/94717,
- tree-optimization/94727, tree-optimization/94734,
- tree-optimization/94774, tree-optimization/94784,
- tree-optimization/94809
-
-* Mon Apr 20 2020 Jakub Jelinek 10.0.1-0.12
+* Thu Oct 29 2020 Jakub Jelinek 11.0.0-0.3
- update from trunk
- - PRs analyzer/94378, bootstrap/89494, bootstrap/92008, c++/67825,
- c++/79937, c++/85278, c++/86327, c++/88754, c++/90711, c++/90996,
- c++/91377, c++/91966, c++/92010, c++/92187, c++/92878, c++/93207,
- c++/93211, c++/93790, c++/94034, c++/94149, c++/94155, c++/94205,
- c++/94219, c++/94252, c++/94306, c++/94314, c++/94325, c++/94359,
- c++/94385, c++/94426, c++/94453, c++/94454, c++/94462, c++/94470,
- c++/94475, c++/94477, c++/94478, c++/94480, c++/94481, c++/94483,
- c++/94507, c++/94512, c++/94521, c++/94523, c++/94528, c++/94571,
- c++/94588, c++/94608, c++/94632, c/92326, c/94392, c/94593, d/90136,
- d/94304, d/94305, d/94315, d/94321, d/94424, d/94425, d/94609,
- debug/94439, debug/94441, debug/94450, debug/94459, debug/94495,
- driver/94381, fortran/57129, fortran/85982, fortran/87644,
- fortran/87923, fortran/91800, fortran/93364, fortran/93498,
- fortran/93500, fortran/93522, fortran/93686, fortran/93871,
- fortran/94030, fortran/94090, fortran/94091, fortran/94192,
- fortran/94246, fortran/94347, fortran/94348, fortran/94386,
- gcov-profile/93401, gcov-profile/94570, go/94607, ipa/92676,
- ipa/93621, ipa/93940, ipa/94363, ipa/94434, ipa/94445, ipa/94582,
- libgcc/94513, libgomp/92843, libstdc++/93960, libstdc++/94498,
- libstdc++/94520, libstdc++/94562, libstdc++/94565, lto/94612,
- middle-end/89433, middle-end/93465, middle-end/94412,
- middle-end/94423, middle-end/94436, middle-end/94465,
- middle-end/94479, middle-end/94526, middle-end/94539,
- middle-end/94614, middle-end/94635, objc/94637, other/94629,
- rtl-optimization/84169, rtl-optimization/87716,
- rtl-optimization/93946, rtl-optimization/93974,
- rtl-optimization/94123, rtl-optimization/94291,
- rtl-optimization/94344, rtl-optimization/94468,
- rtl-optimization/94516, rtl-optimization/94605,
- rtl-optimization/94618, target/93053, target/94317, target/94368,
- target/94396, target/94417, target/94420, target/94435, target/94438,
- target/94460, target/94467, target/94488, target/94494, target/94500,
- target/94509, target/94530, target/94542, target/94551, target/94556,
- target/94561, target/94567, target/94584, target/94603, target/94606,
- testsuite/93369, testsuite/94079, testsuite/94402, testsuite/94533,
- tree-optimization/89713, tree-optimization/91322,
- tree-optimization/93674, tree-optimization/94043,
- tree-optimization/94398, tree-optimization/94401,
- tree-optimization/94403, tree-optimization/94443,
- tree-optimization/94482, tree-optimization/94524,
- tree-optimization/94573, tree-optimization/94574,
- tree-optimization/94598, tree-optimization/94621
+ - PRs ada/97504, analyzer/96608, analyzer/97489, analyzer/97514,
+ analyzer/97568, analyzer/97608, bootstrap/97451, c++/82239, c++/86773,
+ c++/91741, c++/94799, c++/95132, c++/96241, c++/96575, c++/96675,
+ c++/96742, c++/97328, c++/97438, c++/97511, c++/97573, c/94722,
+ c/97463, fortran/45516, fortran/97454, gcov-profile/97461, ipa/97445,
+ ipa/97576, ipa/97586, libstdc++/94268, libstdc++/95592,
+ libstdc++/95609, libstdc++/95917, libstdc++/96713, libstdc++/97512,
+ libstdc++/97570, lto/96680, lto/97524, middle-end/92942,
+ middle-end/97521, middle-end/97552, rtl-optimization/97249,
+ rtl-optimization/97439, rtl-optimization/97497, sanitizer/97414,
+ target/87767, target/95151, target/95458, target/97360, target/97502,
+ target/97506, target/97535, testsuite/81690, testsuite/97590,
+ tree-optimization/66552, tree-optimization/97164,
+ tree-optimization/97360, tree-optimization/97456,
+ tree-optimization/97457, tree-optimization/97466,
+ tree-optimization/97467, tree-optimization/97486,
+ tree-optimization/97488, tree-optimization/97496,
+ tree-optimization/97500, tree-optimization/97501,
+ tree-optimization/97503, tree-optimization/97505,
+ tree-optimization/97515, tree-optimization/97520,
+ tree-optimization/97538, tree-optimization/97539,
+ tree-optimization/97546, tree-optimization/97555,
+ tree-optimization/97560, tree-optimization/97567,
+ tree-optimization/97615
+- for ELN default to -march=x86-64-v2 for x86 64-bit compilation and
+ for s390x to -march=z13 -mtune=arch13
-* Sat Mar 28 2020 Jakub Jelinek 10.0.1-0.11
-- update from trunk
- - PRs c++/81349, c++/84733, c++/93810, c++/93824, c++/94057, c++/94078,
- c++/94098, c++/94257, c++/94265, c++/94272, c++/94319, c++/94326,
- c++/94336, c++/94339, c++/94346, c/93573, debug/94273, debug/94281,
- debug/94296, debug/94323, fortran/93363, fortran/93957, ipa/94271,
- lto/94259, middle-end/94004, rtl-optimization/92264, target/94145,
- target/94220, target/94292, testsuite/94334, tree-optimization/90332,
- tree-optimization/94131, tree-optimization/94269,
- tree-optimization/94329, tree-optimization/94352
-- fix x86 vec_extract_{lo,hi}*_mask AVX512* patterns (PR target/93069)
-- fix x86 *one_cmpl*2* AVX512* patterns (PR target/94343)
-- add BuildRequires: libzstd-devel
-
-* Wed Mar 25 2020 Jakub Jelinek 10.0.1-0.10
-- update from trunk
- - PRs analyzer/94047, analyzer/94099, analyzer/94105, c++/67960, c++/69694,
- c++/90995, c++/91759, c++/91993, c++/92068, c++/92909, c++/93248,
- c++/93596, c++/93805, c++/93931, c++/94044, c++/94066, c++/94147,
- c++/94175, c++/94186, c++/94190, c++/94197, c++/94223, c/94040,
- c/94172, c/94179, c/94239, d/92216, d/92309, d/92792, d/93038,
- d/94240, debug/93751, debug/94167, debug/94277, debug/94280,
- debug/94283, debug/94285, fortran/93365, fortran/93484, fortran/93600,
- gcov-profile/94029, ipa/92372, ipa/92799, ipa/93347, ipa/94202,
- ipa/94217, ipa/94232, ipa/94245, ipa/94250, libgomp/81689,
- libgomp/94251, libstdc++/93245, libstdc++/94033, libstdc++/94199,
- libstdc++/94203, libstdc++/94242, lto/91027, lto/94157, lto/94249,
- middle-end/92071, middle-end/93566, middle-end/94072,
- middle-end/94120, middle-end/94188, middle-end/94189,
- middle-end/94206, middle-end/94216, middle-end/94233,
- middle-end/94303, rtl-optimization/90275, rtl-optimization/92303,
- rtl-optimization/94042, rtl-optimization/94052,
- rtl-optimization/94119, rtl-optimization/94148, target/92379,
- target/93694, target/94052, target/94144, target/94154, target/94176,
- target/94185, target/94201, target/94238, target/94286,
- testsuite/93935, tree-optimization/93435, tree-optimization/94103,
- tree-optimization/94125, tree-optimization/94163,
- tree-optimization/94166, tree-optimization/94187,
- tree-optimization/94211, tree-optimization/94224,
- tree-optimization/94261, tree-optimization/94266,
- tree-optimization/94300
-- fix ICE in final_scan_insn_1 on i686 with vzeroupper (#1816760,
- PR target/94308)
-- fix ppc64* hang with dfp (PR target/94254)
-
-* Wed Mar 11 2020 Jakub Jelinek 10.0.1-0.9
-- update from trunk
- - PRs ada/91100, analyzer/93032, analyzer/93388, analyzer/93692,
- analyzer/93774, analyzer/93775, analyzer/93777, analyzer/93778,
- analyzer/93779, analyzer/93899, analyzer/93947, analyzer/93950,
- analyzer/93959, analyzer/93993, analyzer/94028, bootstrap/93962,
- c++/52320, c++/66139, c++/90432, c++/90467, c++/90505, c++/90938,
- c++/91465, c++/92031, c++/92721, c++/93169, c++/93676, c++/93712,
- c++/93729, c++/93789, c++/93801, c++/93803, c++/93804, c++/93817,
- c++/93862, c++/93869, c++/93870, c++/93882, c++/93901, c++/93905,
- c++/93907, c++/93922, c++/93933, c++/93956, c++/93958, c++/93998,
- c++/94027, c++/94041, c++/94068, c++/94074, c++/94117, c++/94124,
- c/86134, c/93577, c/93812, c/93858, c/93886, c/93887, c/93949,
- debug/93888, driver/47785, driver/93796, fortran/92785, fortran/92959,
- fortran/92976, fortran/93486, fortran/93552, fortran/93580,
- fortran/93581, fortran/93599, fortran/93601, fortran/93603,
- fortran/93604, fortran/93714, fortran/93792, fortran/93825,
- fortran/93835, fortran/93889, fortran/93890, gcov-profile/93753,
- inline-asm/94095, ipa/92518, ipa/92548, ipa/92924, ipa/93583,
- ipa/93707, ipa/93760, ipa/93797, libstdc++/92546, libstdc++/93244,
- libstdc++/93818, libstdc++/93872, libstdc++/93884, libstdc++/93936,
- libstdc++/93972, libstdc++/93978, libstdc++/94013, libstdc++/94017,
- libstdc++/94051, libstdc++/94063, libstdc++/94069, lto/78353,
- middle-end/81401, middle-end/92152, middle-end/93399,
- middle-end/93829, middle-end/93843, middle-end/93874,
- middle-end/93926, middle-end/93961, middle-end/94111, other/55930,
- other/93756, other/93912, other/93965, rtl-optimization/93564,
- rtl-optimization/93996, rtl-optimization/94002,
- rtl-optimization/94045, rtl-optimization/PR92989, sanitizer/93731,
- target/26877, target/87560, target/87612, target/89229, target/89346,
- target/90311, target/90763, target/91276, target/91598, target/93047,
- target/93658, target/93709, target/93743, target/93800, target/93828,
- target/93860, target/93913, target/93932, target/93937, target/93995,
- target/93997, target/94046, target/94065, target/94088, target/94121,
- target/94134, testsuite/91797, testsuite/91799, testsuite/94019,
- testsuite/94023, translation/93755, translation/93759,
- translation/93830, translation/93831, translation/93838,
- translation/93841, translation/93864, tree-optimization/90883,
- tree-optimization/91890, tree-optimization/92128,
- tree-optimization/92982, tree-optimization/93508,
- tree-optimization/93586, tree-optimization/93667,
- tree-optimization/93767, tree-optimization/93776,
- tree-optimization/93780, tree-optimization/93820,
- tree-optimization/93845, tree-optimization/93868,
- tree-optimization/93927, tree-optimization/93945,
- tree-optimization/93946, tree-optimization/93953,
- tree-optimization/93964, tree-optimization/93986,
- tree-optimization/94001, tree-optimization/94114
- - fix ICE on rotate with -Wconversion (#1810941, PR c++/94067)
- - fix -fcf-protection -flto -g interaction (#1808484, PR lto/93966)
- - fix git miscompilation on s390x with -O2 -march=zEC12 -mtune=z13
- (#1799408, PR rtl-optimization/93908)
- - fix ICE in in propagate_vals_across_arith_jfunc (#1806466, PR ipa/93763)
- - ARM ABI alignment fix for classes derived from user aligned empty
- bases (PR c++/94050)
-- strlen pass fixes (PR tree-optimization/94015)
-- fix {memset,memcpy,memmove,strncpy} head trimming if the result is used
- (PR tree-optimization/94130)
-- drop python2-devel Requires
-
-* Sun Feb 16 2020 Jakub Jelinek 10.0.1-0.8
-- update from trunk
- - PRs analyzer/93212, analyzer/93288, analyzer/93350, analyzer/93356,
- analyzer/93373, analyzer/93374, analyzer/93379, analyzer/93405,
- analyzer/93438, analyzer/93457, analyzer/93543, analyzer/93544,
- analyzer/93546, analyzer/93547, analyzer/93647, analyzer/93649,
- analyzer/93657, analyzer/93659, analyzer/93669, c++/14179, c++/61414,
- c++/66477, c++/69448, c++/80471, c++/86216, c++/86917, c++/88256,
- c++/88819, c++/89404, c++/90691, c++/90951, c++/91953, c++/92003,
- c++/92517, c++/92556, c++/92583, c++/92593, c++/92654, c++/92717,
- c++/92947, c++/93140, c++/93458, c++/93530, c++/93549, c++/93551,
- c++/93557, c++/93559, c++/93597, c++/93618, c++/93633, c++/93643,
- c++/93650, c++/93675, c++/93684, c++/93710, c++/93713, c/87488,
- c/88660, c/93576, c/93640, fortran/83113, fortran/92305,
- fortran/93427, fortran/93462, fortran/93541, gcov-profile/91971,
- gcov-profile/93466, ipa/93203, libgcc/85334, libgomp/93481,
- libgomp/93515, libstdc++/79193, libstdc++/88999, libstdc++/92906,
- libstdc++/93562, lto/93489, middle-end/90648, middle-end/93519,
- middle-end/93555, middle-end/93646, middle-end/93663, other/93168,
- other/93641, preprocessor/92319, preprocessor/93545,
- rtl-optimization/91333, rtl-optimization/91838,
- rtl-optimization/93561, rtl-optimization/93565, target/58218,
- target/65782, target/85667, target/87763, target/91052, target/91816,
- target/91913, target/91927, target/92190, target/93122, target/93136,
- target/93300, target/93372, target/93532, target/93533, target/93548,
- target/93568, target/93569, target/93594, target/93611, target/93615,
- target/93637, target/93656, target/93670, target/93673, target/93696,
- target/93704, target/93724, testsuite/92177, testsuite/93697,
- testsuite/93717, tree-optimization/91123, tree-optimization/92819,
- tree-optimization/93516, tree-optimization/93538,
- tree-optimization/93582, tree-optimization/93661,
- tree-optimization/93662, tree-optimization/93683,
- tree-optimization/93744
-
-* Thu Jan 30 2020 Jakub Jelinek 10.0.1-0.7
-- update from trunk
- - PRs analyzer/93276, analyzer/93291, analyzer/93349, analyzer/93450,
- analyzer/93451, bootstrap/93409, c++/60503, c++/82521, c++/88092,
- c++/89357, c++/89640, c++/90333, c++/90338, c++/90546, c++/90731,
- c++/90966, c++/90992, c++/91118, c++/91754, c++/91826, c++/92440,
- c++/92601, c++/92948, c++/93442, c++/93443, c++/93477, driver/91220,
- fortran/85781, fortran/87103, fortran/92123, fortran/93025,
- fortran/93461, fortran/93463, fortran/93464, fortran/93473,
- gcov-profile/93403, libstdc++/92895, libstdc++/93325, libstdc++/93426,
- libstdc++/93470, libstdc++/93478, libstdc++/93479, middle-end/92323,
- middle-end/93437, middle-end/93505, rtl-optimization/87763,
- rtl-optimization/92989, rtl-optimization/93170,
- rtl-optimization/93272, sanitizer/93436, target/91399, target/91461,
- target/91824, target/92822, target/93221, target/93274, target/93418,
- target/93494, testsuite/71727, testsuite/91171, testsuite/93393,
- testsuite/93460, tree-optimization/89689, tree-optimization/92706,
- tree-optimization/92822, tree-optimization/93397,
- tree-optimization/93428, tree-optimization/93434,
- tree-optimization/93439, tree-optimization/93454
- - LTO fix for *.localalias aliases (#1795575, PR lto/93384)
- - __has_include{,_next} fix (#1795633, PR preprocessor/93452)
-
-* Sun Jan 26 2020 Jakub Jelinek 10.0.1-0.6
-- update from trunk
- - PRs analyzer/93367, c++/90997, c++/92852, c++/93279, c++/93299, c++/93377,
- c++/93400, c++/93414, inline-asm/93027, ipa/93166, target/13721,
- target/92269, target/93395, target/93412, target/93430,
- translation/90162, tree-optimization/92788
-- temporarily disable broken strcmp optimization (PR tree-optimization/92765)
-- riscv64 tweaks from David Abdurachmanov (#1794343)
-
-* Thu Jan 23 2020 Jakub Jelinek 10.0.1-0.5
-- update from trunk
- - PRs analyzer/93307, analyzer/93316, analyzer/93352, analyzer/93375,
- analyzer/93378, analyzer/93382, c++/40752, c++/60855, c++/90732,
- c++/91476, c++/92804, c++/92907, c++/93324, c++/93331, c++/93345,
- c/84919, c/93348, fortran/93329, ipa/93315, libstdc++/91947,
- rtl-optimization/93124, rtl-optimization/93402, target/91298,
- target/92424, target/9311, target/93119, target/93333, target/93335,
- target/93341, target/93346, target/93376, testsuite/93391,
- tree-optimization/92924, tree-optimization/93381
- - fix ICE in nothrow_spec_p (#1794094, c++/93345)
-
-* Tue Jan 21 2020 Jakub Jelinek 10.0.1-0.4
-- update from trunk
- - PRs c++/33799, c++/92536, debug/92763, fortran/44960, fortran/93309,
- lto/93318, middle-end/93194, middle-end/93242, preprocessor/80005,
- target/93073, target/93304, target/93319, testsuite/92829,
- tree-opt/93321, tree-optimization/92328, tree-optimization/93094,
- tree-optimization/93199
-- add arm_bf16.h and arm_sve.h to arm and arm/aarch64 (#1793471)
-
-* Sat Jan 18 2020 Jakub Jelinek 10.0.1-0.3
+* Mon Oct 19 2020 Jakub Jelinek 11.0.0-0.2
- new package
diff --git a/gcc10-pr96383.patch b/gcc10-pr96383.patch
deleted file mode 100644
index 950a2f4..0000000
--- a/gcc10-pr96383.patch
+++ /dev/null
@@ -1,236 +0,0 @@
-2020-07-30 Richard Biener
-
- PR debug/96383
- * langhooks-def.h (lhd_finalize_early_debug): Declare.
- (LANG_HOOKS_FINALIZE_EARLY_DEBUG): Define.
- (LANG_HOOKS_INITIALIZER): Amend.
- * langhooks.c: Include cgraph.h and debug.h.
- (lhd_finalize_early_debug): Default implementation from
- former code in finalize_compilation_unit.
- * langhooks.h (lang_hooks::finalize_early_debug): Add.
- * cgraphunit.c (symbol_table::finalize_compilation_unit):
- Call the finalize_early_debug langhook.
-
-gcc/c-family/
- * c-common.h (c_common_finalize_early_debug): Declare.
- * c-common.c: Include debug.h.
- (c_common_finalize_early_debug): finalize_early_debug langhook
- implementation generating debug for extern declarations.
-
-gcc/c/
- * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
- Define to c_common_finalize_early_debug.
-
-gcc/cp/
- * cp-objcp-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
- Define to c_common_finalize_early_debug.
-
-gcc/testsuite/
- * gcc.dg/debug/dwarf2/pr96383-1.c: New testcase.
- * gcc.dg/debug/dwarf2/pr96383-2.c: Likewise.
-
-libstdc++-v3/
- * testsuite/20_util/assume_aligned/3.cc: Use -g0.
-
---- gcc/c-family/c-common.c
-+++ gcc/c-family/c-common.c
-@@ -50,6 +50,7 @@ along with GCC; see the file COPYING3. If not see
- #include "spellcheck.h"
- #include "c-spellcheck.h"
- #include "selftest.h"
-+#include "debug.h"
-
- cpp_reader *parse_in; /* Declared in c-pragma.h. */
-
-@@ -9086,4 +9087,20 @@ braced_lists_to_strings (tree type, tree ctor)
- return braced_lists_to_strings (type, ctor, false);
- }
-
-+
-+/* Emit debug for functions before finalizing early debug. */
-+
-+void
-+c_common_finalize_early_debug (void)
-+{
-+ /* Emit early debug for reachable functions, and by consequence,
-+ locally scoped symbols. Also emit debug for extern declared
-+ functions that are still reachable at this point. */
-+ struct cgraph_node *cnode;
-+ FOR_EACH_FUNCTION (cnode)
-+ if (!cnode->alias && !cnode->thunk.thunk_p
-+ && (cnode->has_gimple_body_p () || !DECL_IS_BUILTIN (cnode->decl)))
-+ (*debug_hooks->early_global_decl) (cnode->decl);
-+}
-+
- #include "gt-c-family-c-common.h"
---- gcc/c-family/c-common.h
-+++ gcc/c-family/c-common.h
-@@ -885,6 +885,8 @@ extern bool bool_promoted_to_int_p (tree);
- extern tree fold_for_warn (tree);
- extern tree c_common_get_narrower (tree, int *);
- extern bool get_attribute_operand (tree, unsigned HOST_WIDE_INT *);
-+extern void c_common_finalize_early_debug (void);
-+
-
- #define c_sizeof(LOC, T) c_sizeof_or_alignof_type (LOC, T, true, false, 1)
- #define c_alignof(LOC, T) c_sizeof_or_alignof_type (LOC, T, false, false, 1)
---- gcc/c/c-objc-common.h
-+++ gcc/c/c-objc-common.h
-@@ -65,6 +65,8 @@ along with GCC; see the file COPYING3. If not see
- c_simulate_builtin_function_decl
- #undef LANG_HOOKS_EMITS_BEGIN_STMT
- #define LANG_HOOKS_EMITS_BEGIN_STMT true
-+#undef LANG_HOOKS_FINALIZE_EARLY_DEBUG
-+#define LANG_HOOKS_FINALIZE_EARLY_DEBUG c_common_finalize_early_debug
-
- /* Attribute hooks. */
- #undef LANG_HOOKS_COMMON_ATTRIBUTE_TABLE
---- gcc/cgraphunit.c
-+++ gcc/cgraphunit.c
-@@ -2998,11 +2998,9 @@ symbol_table::finalize_compilation_unit (void)
-
- if (!seen_error ())
- {
-- /* Emit early debug for reachable functions, and by consequence,
-- locally scoped symbols. */
-- struct cgraph_node *cnode;
-- FOR_EACH_FUNCTION_WITH_GIMPLE_BODY (cnode)
-- (*debug_hooks->early_global_decl) (cnode->decl);
-+ /* Give the frontends the chance to emit early debug based on
-+ what is still reachable in the TU. */
-+ (*lang_hooks.finalize_early_debug) ();
-
- /* Clean up anything that needs cleaning up after initial debug
- generation. */
---- gcc/cp/cp-objcp-common.h
-+++ gcc/cp/cp-objcp-common.h
-@@ -115,6 +115,8 @@ extern tree cxx_simulate_enum_decl (location_t, const char *,
- #define LANG_HOOKS_BLOCK_MAY_FALLTHRU cxx_block_may_fallthru
- #undef LANG_HOOKS_EMITS_BEGIN_STMT
- #define LANG_HOOKS_EMITS_BEGIN_STMT true
-+#undef LANG_HOOKS_FINALIZE_EARLY_DEBUG
-+#define LANG_HOOKS_FINALIZE_EARLY_DEBUG c_common_finalize_early_debug
-
- /* Attribute hooks. */
- #undef LANG_HOOKS_COMMON_ATTRIBUTE_TABLE
---- gcc/langhooks-def.h
-+++ gcc/langhooks-def.h
-@@ -92,6 +92,7 @@ extern const char *lhd_get_substring_location (const substring_loc &,
- location_t *out_loc);
- extern int lhd_decl_dwarf_attribute (const_tree, int);
- extern int lhd_type_dwarf_attribute (const_tree, int);
-+extern void lhd_finalize_early_debug (void);
-
- #define LANG_HOOKS_NAME "GNU unknown"
- #define LANG_HOOKS_IDENTIFIER_SIZE sizeof (struct lang_identifier)
-@@ -139,6 +140,7 @@ extern int lhd_type_dwarf_attribute (const_tree, int);
- #define LANG_HOOKS_EMITS_BEGIN_STMT false
- #define LANG_HOOKS_RUN_LANG_SELFTESTS lhd_do_nothing
- #define LANG_HOOKS_GET_SUBSTRING_LOCATION lhd_get_substring_location
-+#define LANG_HOOKS_FINALIZE_EARLY_DEBUG lhd_finalize_early_debug
-
- /* Attribute hooks. */
- #define LANG_HOOKS_ATTRIBUTE_TABLE NULL
-@@ -364,7 +366,8 @@ extern void lhd_end_section (void);
- LANG_HOOKS_CUSTOM_FUNCTION_DESCRIPTORS, \
- LANG_HOOKS_EMITS_BEGIN_STMT, \
- LANG_HOOKS_RUN_LANG_SELFTESTS, \
-- LANG_HOOKS_GET_SUBSTRING_LOCATION \
-+ LANG_HOOKS_GET_SUBSTRING_LOCATION, \
-+ LANG_HOOKS_FINALIZE_EARLY_DEBUG \
- }
-
- #endif /* GCC_LANG_HOOKS_DEF_H */
---- gcc/langhooks.c
-+++ gcc/langhooks.c
-@@ -36,6 +36,8 @@ along with GCC; see the file COPYING3. If not see
- #include "output.h"
- #include "timevar.h"
- #include "stor-layout.h"
-+#include "cgraph.h"
-+#include "debug.h"
-
- /* Do nothing; in many cases the default hook. */
-
-@@ -866,6 +868,18 @@ lhd_unit_size_without_reusable_padding (tree t)
- return TYPE_SIZE_UNIT (t);
- }
-
-+/* Default implementation for the finalize_early_debug hook. */
-+
-+void
-+lhd_finalize_early_debug (void)
-+{
-+ /* Emit early debug for reachable functions, and by consequence,
-+ locally scoped symbols. */
-+ struct cgraph_node *cnode;
-+ FOR_EACH_FUNCTION_WITH_GIMPLE_BODY (cnode)
-+ (*debug_hooks->early_global_decl) (cnode->decl);
-+}
-+
- /* Returns true if the current lang_hooks represents the GNU C frontend. */
-
- bool
---- gcc/langhooks.h
-+++ gcc/langhooks.h
-@@ -580,6 +580,9 @@ struct lang_hooks
- const char *(*get_substring_location) (const substring_loc &,
- location_t *out_loc);
-
-+ /* Invoked before the early_finish debug hook is invoked. */
-+ void (*finalize_early_debug) (void);
-+
- /* Whenever you add entries here, make sure you adjust langhooks-def.h
- and langhooks.c accordingly. */
- };
---- gcc/testsuite/gcc.dg/debug/dwarf2/pr96383-1.c
-+++ gcc/testsuite/gcc.dg/debug/dwarf2/pr96383-1.c
-@@ -0,0 +1,17 @@
-+/* { dg-do compile } */
-+/* { dg-options "-g -gdwarf -dA" } */
-+
-+extern void foo (int);
-+extern void unusedbar (int);
-+
-+int main()
-+{
-+ foo (1);
-+}
-+
-+/* We want subprogram DIEs for both foo and main and a DIE for
-+ the formal parameter of foo. We do not want a DIE for
-+ unusedbar. */
-+/* { dg-final { scan-assembler-times "DW_TAG_subprogram" 4 } } */
-+/* { dg-final { scan-assembler-times "DW_TAG_formal_parameter" 2 } } */
-+/* { dg-final { scan-assembler-not "unusedbar" } } */
---- gcc/testsuite/gcc.dg/debug/dwarf2/pr96383-2.c
-+++ gcc/testsuite/gcc.dg/debug/dwarf2/pr96383-2.c
-@@ -0,0 +1,17 @@
-+/* { dg-do compile } */
-+/* { dg-options "-g -O2 -gdwarf -dA" } */
-+
-+extern void foo (int);
-+extern void unusedbar (int);
-+
-+int main()
-+{
-+ foo (1);
-+}
-+
-+/* We want subprogram DIEs for both foo and main and a DIE for
-+ the formal parameter of foo. We do not want a DIE for
-+ unusedbar. */
-+/* { dg-final { scan-assembler-times "DW_TAG_subprogram" 4 } } */
-+/* { dg-final { scan-assembler-times "DW_TAG_formal_parameter" 2 } } */
-+/* { dg-final { scan-assembler-not "unusedbar" } } */
---- libstdc++-v3/testsuite/20_util/assume_aligned/3.cc
-+++ libstdc++-v3/testsuite/20_util/assume_aligned/3.cc
-@@ -15,7 +15,7 @@
- // with this library; see the file COPYING3. If not see
- // .
-
--// { dg-options "-std=gnu++2a -O2" }
-+// { dg-options "-std=gnu++2a -O2 -g0" }
- // { dg-do compile { target c++2a } }
- // { dg-final { scan-assembler-not "undefined" } }
-
diff --git a/gcc10-pr96939-2.patch b/gcc10-pr96939-2.patch
deleted file mode 100644
index e9e406f..0000000
--- a/gcc10-pr96939-2.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-2020-09-09 Jakub Jelinek
-
- * config/arm/arm.c (arm_override_options_after_change_1): Add opts_set
- argument, test opts_set->x_str_align_functions rather than
- opts->x_str_align_functions.
- (arm_override_options_after_change, arm_option_override_internal,
- arm_set_current_function): Adjust callers.
-
---- gcc/config/arm/arm.c.jj 2020-09-09 09:19:42.911419411 +0200
-+++ gcc/config/arm/arm.c 2020-09-09 09:28:02.392897384 +0200
-@@ -3024,10 +3024,11 @@ static GTY(()) bool thumb_flipper;
- static GTY(()) tree init_optimize;
-
- static void
--arm_override_options_after_change_1 (struct gcc_options *opts)
-+arm_override_options_after_change_1 (struct gcc_options *opts,
-+ struct gcc_options *opts_set)
- {
- /* -falign-functions without argument: supply one. */
-- if (opts->x_flag_align_functions && !opts->x_str_align_functions)
-+ if (opts->x_flag_align_functions && !opts_set->x_str_align_functions)
- opts->x_str_align_functions = TARGET_THUMB_P (opts->x_target_flags)
- && opts->x_optimize_size ? "2" : "4";
- }
-@@ -3037,7 +3038,7 @@ arm_override_options_after_change_1 (str
- static void
- arm_override_options_after_change (void)
- {
-- arm_override_options_after_change_1 (&global_options);
-+ arm_override_options_after_change_1 (&global_options, &global_options_set);
- }
-
- /* Implement TARGET_OPTION_SAVE. */
-@@ -3065,7 +3066,7 @@ static void
- arm_option_override_internal (struct gcc_options *opts,
- struct gcc_options *opts_set)
- {
-- arm_override_options_after_change_1 (opts);
-+ arm_override_options_after_change_1 (opts, opts_set);
-
- if (TARGET_INTERWORK && !bitmap_bit_p (arm_active_target.isa, isa_bit_thumb))
- {
-@@ -32335,7 +32336,7 @@ arm_set_current_function (tree fndecl)
-
- save_restore_target_globals (new_tree);
-
-- arm_override_options_after_change_1 (&global_options);
-+ arm_override_options_after_change_1 (&global_options, &global_options_set);
- }
-
- /* Implement TARGET_OPTION_PRINT. */
diff --git a/gcc10-pr96939-3.patch b/gcc10-pr96939-3.patch
deleted file mode 100644
index f133f8d..0000000
--- a/gcc10-pr96939-3.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-2020-09-13 Jakub Jelinek
-
- * config/arm/arm.opt (arm_arch_specified, arm_cpu_specified,
- arm_tune_specified): New TargetVariables.
- * config/arm/arm.c (arm_configure_build_target): Comment out
- opts_set argument name. Use opts->x_arm_*_specified instead
- of opts_set->x_arm_*_string.
- * common/config/arm/arm-common.c (arm_handle_option): New function.
- (TARGET_HANDLE_OPTION): Redefine.
-
---- gcc/config/arm/arm.opt.jj 2020-09-12 13:36:27.619716335 +0200
-+++ gcc/config/arm/arm.opt 2020-09-12 13:38:48.547661292 +0200
-@@ -30,6 +30,15 @@ const char *x_arm_cpu_string
- TargetSave
- const char *x_arm_tune_string
-
-+TargetVariable
-+unsigned char arm_arch_specified = 0
-+
-+TargetVariable
-+unsigned char arm_cpu_specified = 0
-+
-+TargetVariable
-+unsigned char arm_tune_specified = 0
-+
- Enum
- Name(tls_type) Type(enum arm_tls_type)
- TLS dialect to use:
---- gcc/config/arm/arm.c.jj 2020-09-12 13:36:27.619716335 +0200
-+++ gcc/config/arm/arm.c 2020-09-12 13:49:26.166363387 +0200
-@@ -3181,7 +3181,7 @@ static sbitmap isa_quirkbits;
- void
- arm_configure_build_target (struct arm_build_target *target,
- struct cl_target_option *opts,
-- struct gcc_options *opts_set,
-+ struct gcc_options */* opts_set */,
- bool warn_compatible)
- {
- const cpu_option *arm_selected_tune = NULL;
-@@ -3196,7 +3196,7 @@ arm_configure_build_target (struct arm_b
- target->core_name = NULL;
- target->arch_name = NULL;
-
-- if (opts_set->x_arm_arch_string)
-+ if (opts->x_arm_arch_specified)
- {
- arm_selected_arch = arm_parse_arch_option_name (all_architectures,
- "-march",
-@@ -3204,7 +3204,7 @@ arm_configure_build_target (struct arm_b
- arch_opts = strchr (opts->x_arm_arch_string, '+');
- }
-
-- if (opts_set->x_arm_cpu_string)
-+ if (opts->x_arm_cpu_specified)
- {
- arm_selected_cpu = arm_parse_cpu_option_name (all_cores, "-mcpu",
- opts->x_arm_cpu_string);
-@@ -3214,7 +3214,7 @@ arm_configure_build_target (struct arm_b
- options for tuning. */
- }
-
-- if (opts_set->x_arm_tune_string)
-+ if (opts->x_arm_tune_specified)
- {
- arm_selected_tune = arm_parse_cpu_option_name (all_cores, "-mtune",
- opts->x_arm_tune_string);
---- gcc/common/config/arm/arm-common.c.jj 2020-07-28 15:39:09.705760394 +0200
-+++ gcc/common/config/arm/arm-common.c 2020-09-12 13:50:09.021738456 +0200
-@@ -1021,6 +1021,34 @@ arm_asm_auto_mfpu (int argc, const char
-
- #undef ARM_CPU_NAME_LENGTH
-
-+bool
-+arm_handle_option (struct gcc_options *opts,
-+ struct gcc_options *opts_set ATTRIBUTE_UNUSED,
-+ const struct cl_decoded_option *decoded,
-+ location_t loc ATTRIBUTE_UNUSED)
-+{
-+ size_t code = decoded->opt_index;
-+ const char *arg = decoded->arg;
-+ int val = decoded->value;
-+
-+ switch (code)
-+ {
-+ case OPT_march_:
-+ opts->x_arm_arch_specified = true;
-+ return true;
-+
-+ case OPT_mcpu_:
-+ opts->x_arm_cpu_specified = true;
-+ return true;
-+
-+ case OPT_mtune_:
-+ opts->x_arm_tune_specified = true;
-+ return true;
-+
-+ default:
-+ return true;
-+ }
-+}
-
- #undef TARGET_DEFAULT_TARGET_FLAGS
- #define TARGET_DEFAULT_TARGET_FLAGS (TARGET_DEFAULT | MASK_SCHED_PROLOG)
-@@ -1031,4 +1059,7 @@ arm_asm_auto_mfpu (int argc, const char
- #undef TARGET_EXCEPT_UNWIND_INFO
- #define TARGET_EXCEPT_UNWIND_INFO arm_except_unwind_info
-
-+#undef TARGET_HANDLE_OPTION
-+#define TARGET_HANDLE_OPTION arm_handle_option
-+
- struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;
diff --git a/gcc10-pr96939.patch b/gcc10-pr96939.patch
deleted file mode 100644
index 4659c3f..0000000
--- a/gcc10-pr96939.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-2020-09-07 Jakub Jelinek
-
- PR target/96939
- * config/arm/arm.c (arm_override_options_after_change): Don't call
- arm_configure_build_target here.
- (arm_set_current_function): Call arm_override_options_after_change_1
- at the end.
-
- * gcc.target/arm/lto/pr96939_0.c: New test.
- * gcc.target/arm/lto/pr96939_1.c: New file.
-
---- gcc/config/arm/arm.c.jj 2020-07-30 15:04:38.136293101 +0200
-+++ gcc/config/arm/arm.c 2020-09-07 10:43:54.809561852 +0200
-@@ -3037,10 +3037,6 @@ arm_override_options_after_change_1 (str
- static void
- arm_override_options_after_change (void)
- {
-- arm_configure_build_target (&arm_active_target,
-- TREE_TARGET_OPTION (target_option_default_node),
-- &global_options_set, false);
--
- arm_override_options_after_change_1 (&global_options);
- }
-
-@@ -32338,6 +32334,8 @@ arm_set_current_function (tree fndecl)
- cl_target_option_restore (&global_options, TREE_TARGET_OPTION (new_tree));
-
- save_restore_target_globals (new_tree);
-+
-+ arm_override_options_after_change_1 (&global_options);
- }
-
- /* Implement TARGET_OPTION_PRINT. */
---- gcc/testsuite/gcc.target/arm/lto/pr96939_0.c.jj 2020-09-07 11:26:45.909937609 +0200
-+++ gcc/testsuite/gcc.target/arm/lto/pr96939_0.c 2020-09-07 11:29:18.722706535 +0200
-@@ -0,0 +1,15 @@
-+/* PR target/96939 */
-+/* { dg-lto-do link } */
-+/* { dg-require-effective-target arm_arch_v8a_ok } */
-+/* { dg-lto-options { { -flto -O2 } } } */
-+
-+extern unsigned crc (unsigned, const void *);
-+typedef unsigned (*fnptr) (unsigned, const void *);
-+volatile fnptr fn;
-+
-+int
-+main ()
-+{
-+ fn = crc;
-+ return 0;
-+}
---- gcc/testsuite/gcc.target/arm/lto/pr96939_1.c.jj 2020-09-07 11:26:49.365887153 +0200
-+++ gcc/testsuite/gcc.target/arm/lto/pr96939_1.c 2020-09-07 11:25:13.885281180 +0200
-@@ -0,0 +1,10 @@
-+/* PR target/96939 */
-+/* { dg-options "-march=armv8-a+crc" } */
-+
-+#include
-+
-+unsigned
-+crc (unsigned x, const void *y)
-+{
-+ return __crc32cw (x, *(unsigned *) y);
-+}
diff --git a/gcc10-pr97060.patch b/gcc10-pr97060.patch
deleted file mode 100644
index bd0d7be..0000000
--- a/gcc10-pr97060.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-2020-11-11 Jason Merrill
-
- PR debug/97060
- * dwarf2out.c (gen_subprogram_die): It's a declaration
- if DECL_INITIAL isn't set.
-
- * gcc.dg/debug/dwarf2/pr97060.c: New test.
-
---- gcc/dwarf2out.c
-+++ gcc/dwarf2out.c
-@@ -22859,6 +22859,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
- available.
- */
- int declaration = (current_function_decl != decl
-+ || (!DECL_INITIAL (decl) && !origin)
- || class_or_namespace_scope_p (context_die));
-
- /* A declaration that has been previously dumped needs no
---- gcc/testsuite/gcc.dg/debug/dwarf2/pr97060.c
-+++ gcc/testsuite/gcc.dg/debug/dwarf2/pr97060.c
-@@ -0,0 +1,13 @@
-+/* PR debug/97060 */
-+/* { dg-do compile } */
-+/* { dg-options "-g -dA" } */
-+/* { dg-final { scan-assembler-times "DW_AT_declaration" 2 } } */
-+
-+extern int foo (unsigned int, unsigned int);
-+
-+int
-+bar (void)
-+{
-+ foo (1, 2);
-+ return 0;
-+}
diff --git a/gcc10-Wno-format-security.patch b/gcc11-Wno-format-security.patch
similarity index 100%
rename from gcc10-Wno-format-security.patch
rename to gcc11-Wno-format-security.patch
diff --git a/gcc10-d-shared-libphobos.patch b/gcc11-d-shared-libphobos.patch
similarity index 100%
rename from gcc10-d-shared-libphobos.patch
rename to gcc11-d-shared-libphobos.patch
diff --git a/gcc10-foffload-default.patch b/gcc11-foffload-default.patch
similarity index 82%
rename from gcc10-foffload-default.patch
rename to gcc11-foffload-default.patch
index 4a87e9f..3329d2a 100644
--- a/gcc10-foffload-default.patch
+++ b/gcc11-foffload-default.patch
@@ -44,7 +44,7 @@ libgomp/
strlen (offload_targets) + 1);
xputenv (XOBFINISH (&collect_obstack, char *));
+ if (offload_targets_default)
-+ xputenv ("OFFLOAD_TARGET_DEFAULT=1");
++ xputenv ("OFFLOAD_TARGET_DEFAULT=1");
}
free (offload_targets);
@@ -56,9 +56,9 @@ libgomp/
#define OFFLOAD_TARGET_NAMES_ENV "OFFLOAD_TARGET_NAMES"
+#define OFFLOAD_TARGET_DEFAULT_ENV "OFFLOAD_TARGET_DEFAULT"
- enum lto_mode_d {
- LTO_MODE_NONE, /* Not doing LTO. */
-@@ -822,6 +823,12 @@ compile_offload_image (const char *targe
+ /* By default there is no special suffix for target executables. */
+ #ifdef TARGET_EXECUTABLE_SUFFIX
+@@ -906,6 +907,12 @@ compile_offload_image (const char *targe
break;
}
@@ -71,44 +71,38 @@ libgomp/
if (!compiler)
fatal_error (input_location,
"could not find %s in %s (consider using %<-B%>)",
-@@ -885,6 +892,7 @@ compile_images_for_offload_targets (unsi
+@@ -975,6 +982,7 @@ compile_images_for_offload_targets (unsi
+ if (!target_names)
+ return;
unsigned num_targets = parse_env_var (target_names, &names, NULL);
++ int next_name_entry = 0;
- int next_name_entry = 0;
-+ bool hsa_seen = false;
const char *compiler_path = getenv ("COMPILER_PATH");
if (!compiler_path)
- goto out;
-@@ -897,18 +905,26 @@ compile_images_for_offload_targets (unsi
- /* HSA does not use LTO-like streaming and a different compiler, skip
- it. */
- if (strcmp (names[i], "hsa") == 0)
-- continue;
-+ {
-+ hsa_seen = true;
-+ continue;
-+ }
-
- offload_names[next_name_entry]
+@@ -985,13 +993,19 @@ compile_images_for_offload_targets (unsi
+ offload_names = XCNEWVEC (char *, num_targets + 1);
+ for (unsigned i = 0; i < num_targets; i++)
+ {
+- offload_names[i]
++ offload_names[next_name_entry]
= compile_offload_image (names[i], compiler_path, in_argc, in_argv,
compiler_opts, compiler_opt_count,
linker_opts, linker_opt_count);
- if (!offload_names[next_name_entry])
+- if (!offload_names[i])
- fatal_error (input_location,
- "problem with building target image for %s", names[i]);
++ if (!offload_names[next_name_entry])
+ continue;
- next_name_entry++;
- }
-
-+ if (next_name_entry == 0 && !hsa_seen)
++ next_name_entry++;
++ }
++
++ if (next_name_entry == 0)
+ {
+ free (offload_names);
+ offload_names = NULL;
-+ }
-+
+ }
+
out:
- free_array_of_ptrs ((void **) names, num_targets);
- }
--- libgomp/target.c.jj 2017-01-01 12:45:52.000000000 +0100
+++ libgomp/target.c 2017-01-20 20:12:13.756710875 +0100
@@ -2356,7 +2356,7 @@ gomp_load_plugin_for_device (struct gomp
diff --git a/gcc10-hack.patch b/gcc11-hack.patch
similarity index 100%
rename from gcc10-hack.patch
rename to gcc11-hack.patch
diff --git a/gcc10-i386-libgomp.patch b/gcc11-i386-libgomp.patch
similarity index 100%
rename from gcc10-i386-libgomp.patch
rename to gcc11-i386-libgomp.patch
diff --git a/gcc10-isl-dl.patch b/gcc11-isl-dl.patch
similarity index 99%
rename from gcc10-isl-dl.patch
rename to gcc11-isl-dl.patch
index c681895..b3982f9 100644
--- a/gcc10-isl-dl.patch
+++ b/gcc11-isl-dl.patch
@@ -27,10 +27,10 @@
# and compile them.
--- gcc/graphite.h.jj 2016-01-27 12:44:06.000000000 +0100
+++ gcc/graphite.h 2016-01-27 13:26:38.309876856 +0100
-@@ -39,6 +39,590 @@ along with GCC; see the file COPYING3.
- #include
- #include
- #include
+@@ -24,6 +24,591 @@ along with GCC; see the file COPYING3.
+
+ #include "sese.h"
+
+#include
+#include
+
@@ -615,10 +615,11 @@
+#define isl_version (*isl_pointers__.p_isl_version)
+#define isl_options_get_on_error (*isl_pointers__.p_isl_options_get_on_error)
+#define isl_ctx_reset_error (*isl_pointers__.p_isl_ctx_reset_error)
-
++
typedef struct poly_dr *poly_dr_p;
-@@ -461,5 +1045,6 @@ extern void build_scops (vec *);
+ typedef struct poly_bb *poly_bb_p;
+@@ -448,5 +1033,6 @@ extern tree cached_scalar_evolution_in_r
extern void dot_all_sese (FILE *, vec &);
extern void dot_sese (sese_l &);
extern void dot_cfg ();
diff --git a/gcc10-libgomp-omp_h-multilib.patch b/gcc11-libgomp-omp_h-multilib.patch
similarity index 100%
rename from gcc10-libgomp-omp_h-multilib.patch
rename to gcc11-libgomp-omp_h-multilib.patch
diff --git a/gcc10-libstdc++-docs.patch b/gcc11-libstdc++-docs.patch
similarity index 96%
rename from gcc10-libstdc++-docs.patch
rename to gcc11-libstdc++-docs.patch
index d51b6d3..9ea9f88 100644
--- a/gcc10-libstdc++-docs.patch
+++ b/gcc11-libstdc++-docs.patch
@@ -4,7 +4,7 @@
FSF
-+ Release 10.2.1
++ Release 11.0.0
+
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 10.2.1 release,
++ for the 11.0.0 release,
+ online
for each GCC release
and
diff --git a/gcc10-libtool-no-rpath.patch b/gcc11-libtool-no-rpath.patch
similarity index 100%
rename from gcc10-libtool-no-rpath.patch
rename to gcc11-libtool-no-rpath.patch
diff --git a/gcc10-no-add-needed.patch b/gcc11-no-add-needed.patch
similarity index 100%
rename from gcc10-no-add-needed.patch
rename to gcc11-no-add-needed.patch
diff --git a/gcc10-rh1574936.patch b/gcc11-rh1574936.patch
similarity index 100%
rename from gcc10-rh1574936.patch
rename to gcc11-rh1574936.patch
diff --git a/gcc10-sparc-config-detection.patch b/gcc11-sparc-config-detection.patch
similarity index 100%
rename from gcc10-sparc-config-detection.patch
rename to gcc11-sparc-config-detection.patch
diff --git a/sources b/sources
index fb0364f..d4715ed 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-10.2.1-20201125.tar.xz) = 4a1d389032f699f47004a146d0cf96aad4febc46d0bc4750a6a435134822743f68739fcc1b9dcc4ae26d26a5d82ad71c83ecc67d2307d722157d1a7bee4a42c5
+SHA512 (gcc-11.0.0-20201204.tar.xz) = 809ca1644f7471187dec0f080d70fcf3a778be88d550d3088988331165fa3ebaafb011f07973523d0b5b83e3cd0f7fd5bc10bc80944f035803f1b21e79af7a31
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 c04b746..dc695f2 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-10.2.1-$d/ $1 | xz -9e > gcc-10.2.1-$d.tar.xz
+git --git-dir=gcc-dir.tmp/.git archive --prefix=gcc-11.0.0-$d/ $1 | xz -9e > gcc-11.0.0-$d.tar.xz
rm -rf gcc-dir.tmp
From 42f8421576faf950dddfe9578f9bfca7d2720863 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Fri, 4 Dec 2020 21:38:24 +0100
Subject: [PATCH 005/293] 11.0.0-0.7
---
gcc.spec | 68 ++++++++++++++++++++++++++++----------------------------
1 file changed, 34 insertions(+), 34 deletions(-)
diff --git a/gcc.spec b/gcc.spec
index 23c7843..acd4ef1 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -293,7 +293,7 @@ Patch11: gcc11-d-shared-libphobos.patch
%if %{build_go}
# Avoid stripping these libraries and binaries.
%global __os_install_post \
-chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.17.* \
+chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.18.* \
chmod 644 %{buildroot}%{_prefix}/bin/go.gcc \
chmod 644 %{buildroot}%{_prefix}/bin/gofmt.gcc \
chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cgo \
@@ -301,7 +301,7 @@ chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}
chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/test2json \
chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/vet \
%__os_install_post \
-chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgo.so.17.* \
+chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgo.so.18.* \
chmod 755 %{buildroot}%{_prefix}/bin/go.gcc \
chmod 755 %{buildroot}%{_prefix}/bin/gofmt.gcc \
chmod 755 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cgo \
@@ -1386,14 +1386,14 @@ ln -sf ../../../libstdc++.so.6.*[0-9] libstdc++.so
ln -sf ../../../libgfortran.so.5.* libgfortran.so
ln -sf ../../../libgomp.so.1.* libgomp.so
%if %{build_go}
-ln -sf ../../../libgo.so.17.* libgo.so
+ln -sf ../../../libgo.so.18.* libgo.so
%endif
%if %{build_libquadmath}
ln -sf ../../../libquadmath.so.0.* libquadmath.so
%endif
%if %{build_d}
-ln -sf ../../../libgdruntime.so.1.* libgdruntime.so
-ln -sf ../../../libgphobos.so.1.* libgphobos.so
+ln -sf ../../../libgdruntime.so.2.* libgdruntime.so
+ln -sf ../../../libgphobos.so.2.* libgphobos.so
%endif
%if %{build_libitm}
ln -sf ../../../libitm.so.1.* libitm.so
@@ -1416,14 +1416,14 @@ ln -sf ../../../../%{_lib}/libstdc++.so.6.*[0-9] libstdc++.so
ln -sf ../../../../%{_lib}/libgfortran.so.5.* libgfortran.so
ln -sf ../../../../%{_lib}/libgomp.so.1.* libgomp.so
%if %{build_go}
-ln -sf ../../../../%{_lib}/libgo.so.17.* libgo.so
+ln -sf ../../../../%{_lib}/libgo.so.18.* libgo.so
%endif
%if %{build_libquadmath}
ln -sf ../../../../%{_lib}/libquadmath.so.0.* libquadmath.so
%endif
%if %{build_d}
-ln -sf ../../../../%{_lib}/libgdruntime.so.1.* libgdruntime.so
-ln -sf ../../../../%{_lib}/libgphobos.so.1.* libgphobos.so
+ln -sf ../../../../%{_lib}/libgdruntime.so.2.* libgdruntime.so
+ln -sf ../../../../%{_lib}/libgphobos.so.2.* libgphobos.so
%endif
%if %{build_libitm}
ln -sf ../../../../%{_lib}/libitm.so.1.* libitm.so
@@ -1500,28 +1500,28 @@ mv -f $FULLPATH/ada{include,lib} $FULLLPATH/
pushd $FULLLPATH/adalib
if [ "%{_lib}" = "lib" ]; then
ln -sf ../../../../../libgnarl-*.so libgnarl.so
-ln -sf ../../../../../libgnarl-*.so libgnarl-9.so
+ln -sf ../../../../../libgnarl-*.so libgnarl-11.so
ln -sf ../../../../../libgnat-*.so libgnat.so
-ln -sf ../../../../../libgnat-*.so libgnat-9.so
+ln -sf ../../../../../libgnat-*.so libgnat-11.so
else
ln -sf ../../../../../../%{_lib}/libgnarl-*.so libgnarl.so
-ln -sf ../../../../../../%{_lib}/libgnarl-*.so libgnarl-9.so
+ln -sf ../../../../../../%{_lib}/libgnarl-*.so libgnarl-11.so
ln -sf ../../../../../../%{_lib}/libgnat-*.so libgnat.so
-ln -sf ../../../../../../%{_lib}/libgnat-*.so libgnat-9.so
+ln -sf ../../../../../../%{_lib}/libgnat-*.so libgnat-11.so
fi
popd
else
pushd $FULLPATH/adalib
if [ "%{_lib}" = "lib" ]; then
ln -sf ../../../../libgnarl-*.so libgnarl.so
-ln -sf ../../../../libgnarl-*.so libgnarl-9.so
+ln -sf ../../../../libgnarl-*.so libgnarl-11.so
ln -sf ../../../../libgnat-*.so libgnat.so
-ln -sf ../../../../libgnat-*.so libgnat-9.so
+ln -sf ../../../../libgnat-*.so libgnat-11.so
else
ln -sf ../../../../../%{_lib}/libgnarl-*.so libgnarl.so
-ln -sf ../../../../../%{_lib}/libgnarl-*.so libgnarl-9.so
+ln -sf ../../../../../%{_lib}/libgnarl-*.so libgnarl-11.so
ln -sf ../../../../../%{_lib}/libgnat-*.so libgnat.so
-ln -sf ../../../../../%{_lib}/libgnat-*.so libgnat-9.so
+ln -sf ../../../../../%{_lib}/libgnat-*.so libgnat-11.so
fi
popd
fi
@@ -1536,8 +1536,8 @@ ln -sf ../`echo ../../../../lib/libgfortran.so.5.* | sed s~/lib/~/lib64/~` 64/li
ln -sf ../`echo ../../../../lib/libgomp.so.1.* | sed s~/lib/~/lib64/~` 64/libgomp.so
%if %{build_go}
rm -f libgo.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgo.so.17.* | sed 's,^.*libg,libg,'`' )' > libgo.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgo.so.17.* | sed 's,^.*libg,libg,'`' )' > 64/libgo.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgo.so.18.* | sed 's,^.*libg,libg,'`' )' > libgo.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgo.so.18.* | sed 's,^.*libg,libg,'`' )' > 64/libgo.so
%endif
%if %{build_libquadmath}
rm -f libquadmath.so
@@ -1546,10 +1546,10 @@ echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libquadmath.so.0.* | sed '
%endif
%if %{build_d}
rm -f libgdruntime.so libgphobos.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgdruntime.so.1.* | sed 's,^.*libg,libg,'`' )' > libgdruntime.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgdruntime.so.1.* | sed 's,^.*libg,libg,'`' )' > 64/libgdruntime.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgphobos.so.1.* | sed 's,^.*libg,libg,'`' )' > libgphobos.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgphobos.so.1.* | sed 's,^.*libg,libg,'`' )' > 64/libgphobos.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgdruntime.so.2.* | sed 's,^.*libg,libg,'`' )' > libgdruntime.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgdruntime.so.2.* | sed 's,^.*libg,libg,'`' )' > 64/libgdruntime.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgphobos.so.2.* | sed 's,^.*libg,libg,'`' )' > libgphobos.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgphobos.so.2.* | sed 's,^.*libg,libg,'`' )' > 64/libgphobos.so
%endif
%if %{build_libitm}
rm -f libitm.so
@@ -1635,8 +1635,8 @@ ln -sf ../`echo ../../../../lib64/libgfortran.so.5.* | sed s~/../lib64/~/~` 32/l
ln -sf ../`echo ../../../../lib64/libgomp.so.1.* | sed s~/../lib64/~/~` 32/libgomp.so
%if %{build_go}
rm -f libgo.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgo.so.17.* | sed 's,^.*libg,libg,'`' )' > libgo.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgo.so.17.* | sed 's,^.*libg,libg,'`' )' > 32/libgo.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgo.so.18.* | sed 's,^.*libg,libg,'`' )' > libgo.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgo.so.18.* | sed 's,^.*libg,libg,'`' )' > 32/libgo.so
%endif
%if %{build_libquadmath}
rm -f libquadmath.so
@@ -1645,10 +1645,10 @@ echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libquadmath.so.0.* | sed '
%endif
%if %{build_d}
rm -f libgdruntime.so libgphobos.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgdruntime.so.1.* | sed 's,^.*libg,libg,'`' )' > libgdruntime.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgdruntime.so.1.* | sed 's,^.*libg,libg,'`' )' > 32/libgdruntime.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgphobos.so.1.* | sed 's,^.*libg,libg,'`' )' > libgphobos.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgphobos.so.1.* | sed 's,^.*libg,libg,'`' )' > 32/libgphobos.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgdruntime.so.2.* | sed 's,^.*libg,libg,'`' )' > libgdruntime.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgdruntime.so.2.* | sed 's,^.*libg,libg,'`' )' > 32/libgdruntime.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgphobos.so.2.* | sed 's,^.*libg,libg,'`' )' > libgphobos.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgphobos.so.2.* | sed 's,^.*libg,libg,'`' )' > 32/libgphobos.so
%endif
%if %{build_libitm}
rm -f libitm.so
@@ -1800,8 +1800,8 @@ chmod 755 %{buildroot}%{_prefix}/%{_lib}/libcc1.so.0.*
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libquadmath.so.0.*
%endif
%if %{build_d}
-chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgdruntime.so.1.*
-chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgphobos.so.1.*
+chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgdruntime.so.2.*
+chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgphobos.so.2.*
%endif
%if %{build_libitm}
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libitm.so.1.*
@@ -1823,7 +1823,7 @@ chmod 755 %{buildroot}%{_prefix}/%{_lib}/liblsan.so.0.*
%endif
%if %{build_go}
# Avoid stripping these libraries and binaries.
-chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.17.*
+chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.18.*
chmod 644 %{buildroot}%{_prefix}/bin/go.gcc
chmod 644 %{buildroot}%{_prefix}/bin/gofmt.gcc
chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cgo
@@ -2632,8 +2632,8 @@ end
%doc rpm.doc/gdc/*
%files -n libgphobos
-%{_prefix}/%{_lib}/libgdruntime.so.1*
-%{_prefix}/%{_lib}/libgphobos.so.1*
+%{_prefix}/%{_lib}/libgdruntime.so.2*
+%{_prefix}/%{_lib}/libgphobos.so.2*
%doc rpm.doc/libphobos/*
%files -n libgphobos-static
@@ -2958,7 +2958,7 @@ end
%doc rpm.doc/go/*
%files -n libgo
-%attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.17*
+%attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.18*
%doc rpm.doc/libgo/*
%files -n libgo-devel
From f28564576951f8dd1915acda3829dda0d0f0e864 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Wed, 16 Dec 2020 17:24:23 +0100
Subject: [PATCH 006/293] 11.0.0-0.8
---
gcc.spec | 43 ++++++++++++++--
gcc11-pr98282.patch | 118 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 158 insertions(+), 3 deletions(-)
create mode 100644 gcc11-pr98282.patch
diff --git a/gcc.spec b/gcc.spec
index acd4ef1..4778b93 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,5 +1,5 @@
-%global DATE 20201204
-%global gitrev d35391d824edee33b5fbce3df058f4fafd9b9fa6
+%global DATE 20201216
+%global gitrev ada196afb999077a634220ace175f349418e3078
%global gcc_version 11.0.0
%global gcc_major 11
# Note, gcc_release must be integer, if you want to add suffixes to
@@ -119,7 +119,7 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
-Release: %{gcc_release}.7%{?dist}
+Release: %{gcc_release}.8%{?dist}
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@@ -272,6 +272,7 @@ Patch8: gcc11-foffload-default.patch
Patch9: gcc11-Wno-format-security.patch
Patch10: gcc11-rh1574936.patch
Patch11: gcc11-d-shared-libphobos.patch
+Patch12: gcc11-pr98282.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -783,6 +784,7 @@ to NVidia PTX capable devices if available.
%patch10 -p0 -b .rh1574936~
%endif
%patch11 -p0 -b .d-shared-libphobos~
+%patch12 -p0 -b .pr98282~
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@@ -2403,6 +2405,7 @@ end
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cc1plus
+%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/g++-mapper-server
%ifarch sparcv9 ppc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libstdc++.so
@@ -3066,6 +3069,40 @@ end
%endif
%changelog
+* Wed Dec 17 2020 Jakub Jelinek 11.0.0-0.8
+- update from trunk
+ - PRs ada/98230, bootstrap/98188, c++/57111, c++/59238, c++/68451,
+ c++/78173, c++/91506, c++/93083, c++/96299, c++/97093, c++/97517,
+ c++/98043, c++/98103, c++/98122, c++/98126, c++/98130, c++/98187,
+ c++/98193, c/97981, c/98200, d/98277, fortran/90207, fortran/98016,
+ fortran/98022, gcov-profile/98273, libstdc++/98108, libstdc++/98226,
+ lto/98275, middle-end/94600, middle-end/98160, middle-end/98166,
+ middle-end/98183, middle-end/98190, middle-end/98205,
+ middle-end/98264, rtl-optimization/97092, rtl-optimization/97421,
+ rtl-optimization/98212, rtl-optimization/98229, sanitizer/98204,
+ target/58901, target/66791, target/92469, target/94440, target/95294,
+ target/96226, target/96470, target/97865, target/97872, target/98100,
+ target/98147, target/98152, target/98161, target/98162, target/98219,
+ target/98274, testsuite/95900, testsuite/98123, testsuite/98156,
+ testsuite/98239, testsuite/98240, testsuite/98242, testsuite/98244,
+ tree-optimization/95582, tree-optimization/96094,
+ tree-optimization/96232, tree-optimization/96272,
+ tree-optimization/96344, tree-optimization/96685,
+ tree-optimization/97559, tree-optimization/97929,
+ tree-optimization/98069, tree-optimization/98113,
+ tree-optimization/98117, tree-optimization/98137,
+ tree-optimization/98169, tree-optimization/98174,
+ tree-optimization/98180, tree-optimization/98182,
+ tree-optimization/98191, tree-optimization/98192,
+ tree-optimization/98199, tree-optimization/98211,
+ tree-optimization/98213, tree-optimization/98235,
+ tree-optimization/98256
+ - C++20 modules support
+ - fix up __patchable_function_entries handling when gcc is configured
+ against recent binutils (#1907945)
+- fix up handling of non-memory VIEW_CONVERT_EXPRs in PRE
+ (PR tree-optimization/98282)
+
* Fri Dec 4 2020 Jakub Jelinek 11.0.0-0.7
- update from trunk
- PRs bootstrap/97983, c++/80780, c++/90629, c++/93093, c++/97187,
diff --git a/gcc11-pr98282.patch b/gcc11-pr98282.patch
new file mode 100644
index 0000000..4187c5f
--- /dev/null
+++ b/gcc11-pr98282.patch
@@ -0,0 +1,118 @@
+2020-12-15 Jakub Jelinek
+
+ PR tree-optimization/98282
+ * tree-ssa-pre.c (compute_avail): Don't try to adjust alias set
+ if different when ref1->opcode is not MEM_REF or TARGET_MEM_REF.
+
+ * g++.dg/opt/pr98282.C: New test.
+
+--- gcc/tree-ssa-pre.c.jj 2020-11-30 10:48:31.000000000 +0100
++++ gcc/tree-ssa-pre.c 2020-12-15 10:51:51.061206572 +0100
+@@ -4176,13 +4176,17 @@ compute_avail (void)
+ && ref2->opcode != MEM_REF
+ && ref2 != &operands[0])
+ --ref2;
+- if ((ref1->opcode == TARGET_MEM_REF
+- || ref1->opcode == MEM_REF)
+- && (TYPE_ALIGN (ref1->type)
+- > TYPE_ALIGN (ref2->type)))
+- ref1->type
+- = build_aligned_type (ref1->type,
+- TYPE_ALIGN (ref2->type));
++ if (ref1->opcode == TARGET_MEM_REF
++ || ref1->opcode == MEM_REF)
++ {
++ if (TYPE_ALIGN (ref1->type)
++ > TYPE_ALIGN (ref2->type))
++ ref1->type
++ = build_aligned_type (ref1->type,
++ TYPE_ALIGN (ref2->type));
++ }
++ else
++ set = ref->set;
+ /* TBAA behavior is an obvious part so make sure
+ that the hashtable one covers this as well
+ by adjusting the ref alias set and its base. */
+--- gcc/testsuite/g++.dg/opt/pr98282.C.jj 2020-12-15 12:26:25.868415230 +0100
++++ gcc/testsuite/g++.dg/opt/pr98282.C 2020-12-15 12:28:00.346353067 +0100
+@@ -0,0 +1,80 @@
++// PR tree-optimization/98282
++// { dg-do compile { target c++11 } }
++// { dg-options "-O2" }
++
++template struct g;
++template struct g { typedef b c; };
++template typename g::c &&d(b &&e) {
++ return static_cast::c &&>(e);
++}
++void *operator new(__SIZE_TYPE__, void *f) { return f; }
++struct h;
++struct k {
++ using i = h *;
++};
++struct D {
++ k::i j;
++};
++struct p : D {
++ p(p &&) : D() {}
++};
++struct r {
++ using l = int;
++ r(r &&) : ad() {}
++ l *ad;
++};
++struct s {
++ static s m();
++};
++struct t {
++ template void operator=(ah);
++};
++struct I {
++ template void q(o ai) {
++ *ai = aj();
++ s::m();
++ }
++ h aj();
++};
++template class as;
++struct J {
++ int a;
++ char av;
++};
++template struct aw : J {
++ void ax(...) {}
++};
++template
++struct aw, an, n...> : aw, n...> {
++ using az = as;
++ using ba = aw;
++ char bb;
++ an &bc() { return *reinterpret_cast(this); }
++ void ax(az *bd) {
++ if (bb)
++ new (bd) an(d(bc()));
++ ba::ax(bd);
++ }
++};
++template struct as : aw, n...> {
++ as();
++ as(as &&be) { be.ax(this); }
++ void operator=(as be) { be.ax(this); }
++};
++struct h {
++ as bg;
++};
++using bh = t;
++struct u {
++ bh bj;
++};
++I bk();
++template void bl() {
++ h a;
++ bk().q(&a);
++}
++template void bn(int) {
++ u b;
++ b.bj = bl;
++}
++void bp() { bn(0); }
From 2dca06326ff8046f71745f6e0d6056b9a7bc606c Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Wed, 16 Dec 2020 17:28:00 +0100
Subject: [PATCH 007/293] 11.0.0-0.8
---
.gitignore | 1 +
sources | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 0d11d30..db65664 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,3 +23,4 @@
/gcc-10.2.1-20201112.tar.xz
/gcc-10.2.1-20201125.tar.xz
/gcc-11.0.0-20201204.tar.xz
+/gcc-11.0.0-20201216.tar.xz
diff --git a/sources b/sources
index d4715ed..4697e55 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-11.0.0-20201204.tar.xz) = 809ca1644f7471187dec0f080d70fcf3a778be88d550d3088988331165fa3ebaafb011f07973523d0b5b83e3cd0f7fd5bc10bc80944f035803f1b21e79af7a31
+SHA512 (gcc-11.0.0-20201216.tar.xz) = 5624f905eafa693434ca16df9df9b3d7dff6d01d335fb690bee124d5f62cec6f2273a4b13cbe85eac33b00d2e556bfeb246444558c4a33747629529a2bd560ad
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From 8372e104d779a449611eeb88ec976e40d4961ece Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Wed, 16 Dec 2020 17:29:03 +0100
Subject: [PATCH 008/293] 11.0.0-0.8
---
gcc.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc.spec b/gcc.spec
index 4778b93..42df717 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -3069,7 +3069,7 @@ end
%endif
%changelog
-* Wed Dec 17 2020 Jakub Jelinek 11.0.0-0.8
+* Wed Dec 16 2020 Jakub Jelinek 11.0.0-0.8
- update from trunk
- PRs ada/98230, bootstrap/98188, c++/57111, c++/59238, c++/68451,
c++/78173, c++/91506, c++/93083, c++/96299, c++/97093, c++/97517,
From d92ecedc14572592bf5e32923be919c28971852b Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Thu, 17 Dec 2020 16:25:08 +0100
Subject: [PATCH 009/293] 11.0.0-0.9
---
.gitignore | 1 +
gcc.spec | 16 +++++++++++++---
gcc11-pr98338-workaround.patch | 17 +++++++++++++++++
sources | 2 +-
4 files changed, 32 insertions(+), 4 deletions(-)
create mode 100644 gcc11-pr98338-workaround.patch
diff --git a/.gitignore b/.gitignore
index db65664..6f12cd3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,3 +24,4 @@
/gcc-10.2.1-20201125.tar.xz
/gcc-11.0.0-20201204.tar.xz
/gcc-11.0.0-20201216.tar.xz
+/gcc-11.0.0-20201217.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 42df717..93d9f94 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,5 +1,5 @@
-%global DATE 20201216
-%global gitrev ada196afb999077a634220ace175f349418e3078
+%global DATE 20201217
+%global gitrev cefb7ee9ef972ce42e8e54a65ef972386b8897d9
%global gcc_version 11.0.0
%global gcc_major 11
# Note, gcc_release must be integer, if you want to add suffixes to
@@ -119,7 +119,7 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
-Release: %{gcc_release}.8%{?dist}
+Release: %{gcc_release}.9%{?dist}
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@@ -273,6 +273,7 @@ Patch9: gcc11-Wno-format-security.patch
Patch10: gcc11-rh1574936.patch
Patch11: gcc11-d-shared-libphobos.patch
Patch12: gcc11-pr98282.patch
+Patch13: gcc11-pr98338-workaround.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -785,6 +786,7 @@ to NVidia PTX capable devices if available.
%endif
%patch11 -p0 -b .d-shared-libphobos~
%patch12 -p0 -b .pr98282~
+%patch13 -p0 -b .pr98338-workaround~
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@@ -3069,6 +3071,14 @@ end
%endif
%changelog
+* Thu Dec 17 2020 Jakub Jelinek 11.0.0-0.9
+- update from trunk
+ - PRs c/98047, c/98260, fortran/98284, libstdc++/46447, libstdc++/93151,
+ libstdc++/96083, libstdc++/98319, rtl-optimization/98271,
+ rtl-optimization/98276, sanitizer/97868, target/98146, target/98280,
+ tree-optimization/96239, tree-optimization/98272,
+ tree-optimization/98279
+
* Wed Dec 16 2020 Jakub Jelinek 11.0.0-0.8
- update from trunk
- PRs ada/98230, bootstrap/98188, c++/57111, c++/59238, c++/68451,
diff --git a/gcc11-pr98338-workaround.patch b/gcc11-pr98338-workaround.patch
new file mode 100644
index 0000000..0c8e248
--- /dev/null
+++ b/gcc11-pr98338-workaround.patch
@@ -0,0 +1,17 @@
+2020-12-17 Jakub Jelinek
+
+ PR bootstrap/98338
+ * range-op.cc (operator_plus::op2_range): Tail-call op1_range
+ to work-around ICF profile merging ICE during profiledbootstrap.
+
+--- gcc/range-op.cc.jj 2020-12-17 16:06:39.789526868 +0100
++++ gcc/range-op.cc 2020-12-17 16:19:18.127240700 +0100
+@@ -950,7 +950,7 @@ operator_plus::op2_range (irange &r, tre
+ const irange &lhs,
+ const irange &op1) const
+ {
+- return range_op_handler (MINUS_EXPR, type)->fold_range (r, type, lhs, op1);
++ return op1_range (r, type, lhs, op1);
+ }
+
+
diff --git a/sources b/sources
index 4697e55..12b6183 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-11.0.0-20201216.tar.xz) = 5624f905eafa693434ca16df9df9b3d7dff6d01d335fb690bee124d5f62cec6f2273a4b13cbe85eac33b00d2e556bfeb246444558c4a33747629529a2bd560ad
+SHA512 (gcc-11.0.0-20201217.tar.xz) = b13a21a3caf9867595be06b46e3ee8f9b1439d017378f508145b21e753b758ca099e2f07d105a7bfc0ee44061f7bed1ae5bc79bf7e156cd891e08c8fe3b47460
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From 8c7fac2bb23c90199bd2f35be1d9bdb1a69610e9 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Thu, 17 Dec 2020 19:17:07 +0100
Subject: [PATCH 010/293] 11.0.0-0.10
---
gcc.spec | 18 +++++-----
gcc11-c++tools.patch | 86 ++++++++++++++++++++++++++++++++++++++++++++
sources | 2 +-
3 files changed, 95 insertions(+), 11 deletions(-)
create mode 100644 gcc11-c++tools.patch
diff --git a/gcc.spec b/gcc.spec
index 93d9f94..e962506 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,5 +1,5 @@
-%global DATE 20201217
-%global gitrev cefb7ee9ef972ce42e8e54a65ef972386b8897d9
+%global DATE 20201216
+%global gitrev ada196afb999077a634220ace175f349418e3078
%global gcc_version 11.0.0
%global gcc_major 11
# Note, gcc_release must be integer, if you want to add suffixes to
@@ -119,7 +119,7 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
-Release: %{gcc_release}.9%{?dist}
+Release: %{gcc_release}.10%{?dist}
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@@ -274,6 +274,7 @@ Patch10: gcc11-rh1574936.patch
Patch11: gcc11-d-shared-libphobos.patch
Patch12: gcc11-pr98282.patch
Patch13: gcc11-pr98338-workaround.patch
+Patch14: gcc11-c++tools.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -787,6 +788,7 @@ to NVidia PTX capable devices if available.
%patch11 -p0 -b .d-shared-libphobos~
%patch12 -p0 -b .pr98282~
%patch13 -p0 -b .pr98338-workaround~
+%patch14 -p0 -b .c++tools~
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@@ -3071,13 +3073,9 @@ end
%endif
%changelog
-* Thu Dec 17 2020 Jakub Jelinek 11.0.0-0.9
-- update from trunk
- - PRs c/98047, c/98260, fortran/98284, libstdc++/46447, libstdc++/93151,
- libstdc++/96083, libstdc++/98319, rtl-optimization/98271,
- rtl-optimization/98276, sanitizer/97868, target/98146, target/98280,
- tree-optimization/96239, tree-optimization/98272,
- tree-optimization/98279
+* Thu Dec 17 2020 Jakub Jelinek 11.0.0-0.10
+- apply workaround for profiledbootstrap x86_64 failure
+- put g++-mapper-server into the right directory
* Wed Dec 16 2020 Jakub Jelinek 11.0.0-0.8
- update from trunk
diff --git a/gcc11-c++tools.patch b/gcc11-c++tools.patch
new file mode 100644
index 0000000..1c56f24
--- /dev/null
+++ b/gcc11-c++tools.patch
@@ -0,0 +1,86 @@
+2020-12-17 Jakub Jelinek
+
+ * configure.ac: Add GCC_BASE_VER.
+ * Makefile.in (version): Remove variable.
+ (gcc_version): New variable.
+ (libexecsubdir): Use $(gcc_version) instead of $(version).
+ * configure: Regenerated.
+
+--- c++tools/configure.ac.jj 2020-12-16 23:38:34.091923526 +0100
++++ c++tools/configure.ac 2020-12-17 00:02:48.221661922 +0100
+@@ -206,6 +206,9 @@ if test $ac_cv_inet_ntop = yes; then
+ [Define if inet_ntop provided.])
+ fi
+
++# Determine what GCC version number to use in filesystem paths.
++GCC_BASE_VER
++
+ AC_CONFIG_HEADERS([config.h])
+ AC_CONFIG_FILES([Makefile])
+
+--- c++tools/Makefile.in.jj 2020-12-16 23:38:34.091923526 +0100
++++ c++tools/Makefile.in 2020-12-17 00:01:54.419263424 +0100
+@@ -20,8 +20,8 @@ prefix := @prefix@
+ bindir := @bindir@
+ libexecdir := @libexecdir@
+ target_noncanonical := @target_noncanonical@
+-version := $(shell cat $(srcdir)/../gcc/BASE-VER)
+-libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(version)
++gcc_version := $(shell @get_gcc_base_ver@ $(srcdir)/../gcc/BASE-VER)
++libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
+ INSTALL_PROGRAM := @INSTALL_PROGRAM@
+ INSTALL_STRIP_PROGRAM := $(srcdir)/../install-sh -c -s
+ AUTOCONF := @AUTOCONF@
+--- c++tools/configure.jj 2020-12-16 23:38:34.091923526 +0100
++++ c++tools/configure 2020-12-17 00:02:53.849599006 +0100
+@@ -585,6 +585,7 @@ ac_unique_file="c++tools"
+ ac_unique_file="server.cc"
+ ac_subst_vars='LTLIBOBJS
+ LIBOBJS
++get_gcc_base_ver
+ ac_ct_CC
+ CFLAGS
+ CC
+@@ -658,6 +659,7 @@ ac_user_opts='
+ enable_option_checking
+ enable_c___tools
+ enable_maintainer_mode
++with_gcc_major_version_only
+ '
+ ac_precious_vars='build_alias
+ host_alias
+@@ -1287,6 +1289,12 @@ Optional Features:
+ enable maintainer mode. Add rules to rebuild
+ configurey bits
+
++Optional Packages:
++ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
++ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
++ --with-gcc-major-version-only
++ use only GCC major number in filesystem paths
++
+ Some influential environment variables:
+ CXX C++ compiler command
+ CXXFLAGS C++ compiler flags
+@@ -3557,6 +3565,21 @@ $as_echo "#define HAVE_INET_NTOP 1" >>co
+
+ fi
+
++# Determine what GCC version number to use in filesystem paths.
++
++ get_gcc_base_ver="cat"
++
++# Check whether --with-gcc-major-version-only was given.
++if test "${with_gcc_major_version_only+set}" = set; then :
++ withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
++ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
++ fi
++
++fi
++
++
++
++
+ ac_config_headers="$ac_config_headers config.h"
+
+ ac_config_files="$ac_config_files Makefile"
diff --git a/sources b/sources
index 12b6183..4697e55 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-11.0.0-20201217.tar.xz) = b13a21a3caf9867595be06b46e3ee8f9b1439d017378f508145b21e753b758ca099e2f07d105a7bfc0ee44061f7bed1ae5bc79bf7e156cd891e08c8fe3b47460
+SHA512 (gcc-11.0.0-20201216.tar.xz) = 5624f905eafa693434ca16df9df9b3d7dff6d01d335fb690bee124d5f62cec6f2273a4b13cbe85eac33b00d2e556bfeb246444558c4a33747629529a2bd560ad
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From 9f8a6fd89413ffd0fbe3bf158b0eb690617e9cbb Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Thu, 17 Dec 2020 19:33:32 +0100
Subject: [PATCH 011/293] 11.0.0-0.10
---
gcc11-c++tools.patch | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc11-c++tools.patch b/gcc11-c++tools.patch
index 1c56f24..563b404 100644
--- a/gcc11-c++tools.patch
+++ b/gcc11-c++tools.patch
@@ -28,9 +28,9 @@
-libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(version)
+gcc_version := $(shell @get_gcc_base_ver@ $(srcdir)/../gcc/BASE-VER)
+libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
- INSTALL_PROGRAM := @INSTALL_PROGRAM@
- INSTALL_STRIP_PROGRAM := $(srcdir)/../install-sh -c -s
+ INSTALL := @INSTALL@
AUTOCONF := @AUTOCONF@
+ AUTOHEADER := @AUTOHEADER@
--- c++tools/configure.jj 2020-12-16 23:38:34.091923526 +0100
+++ c++tools/configure 2020-12-17 00:02:53.849599006 +0100
@@ -585,6 +585,7 @@ ac_unique_file="c++tools"
From 23e00e261f40368882fd49e9e04fcce1a6029e6f Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Wed, 23 Dec 2020 14:46:14 +0100
Subject: [PATCH 012/293] 11.0.0-0.11
---
.gitignore | 1 +
gcc.spec | 24 ++++++++++---
gcc11-c++tools.patch | 86 --------------------------------------------
sources | 2 +-
4 files changed, 21 insertions(+), 92 deletions(-)
delete mode 100644 gcc11-c++tools.patch
diff --git a/.gitignore b/.gitignore
index 6f12cd3..add1368 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,3 +25,4 @@
/gcc-11.0.0-20201204.tar.xz
/gcc-11.0.0-20201216.tar.xz
/gcc-11.0.0-20201217.tar.xz
+/gcc-11.0.0-20201223.tar.xz
diff --git a/gcc.spec b/gcc.spec
index e962506..8b6400d 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,5 +1,5 @@
-%global DATE 20201216
-%global gitrev ada196afb999077a634220ace175f349418e3078
+%global DATE 20201223
+%global gitrev 9265a9d6eb38913206ddc37009fd548c2e4f5de0
%global gcc_version 11.0.0
%global gcc_major 11
# Note, gcc_release must be integer, if you want to add suffixes to
@@ -119,7 +119,7 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
-Release: %{gcc_release}.10%{?dist}
+Release: %{gcc_release}.11%{?dist}
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@@ -274,7 +274,6 @@ Patch10: gcc11-rh1574936.patch
Patch11: gcc11-d-shared-libphobos.patch
Patch12: gcc11-pr98282.patch
Patch13: gcc11-pr98338-workaround.patch
-Patch14: gcc11-c++tools.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -788,7 +787,6 @@ to NVidia PTX capable devices if available.
%patch11 -p0 -b .d-shared-libphobos~
%patch12 -p0 -b .pr98282~
%patch13 -p0 -b .pr98338-workaround~
-%patch14 -p0 -b .c++tools~
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@@ -3073,6 +3071,22 @@ end
%endif
%changelog
+* Wed Dec 23 2020 Jakub Jelinek 11.0.0-0.11
+- update from trunk
+ - PRs bootstrap/98300, bootstrap/98380, bootstrap/98412, c++/67343,
+ c++/93480, c++/96840, c++/98340, c++/98343, c++/98353, c++/98383,
+ c/98047, c/98260, d/98067, fortran/83118, fortran/92587,
+ fortran/96012, fortran/98284, fortran/98307, go/98402,
+ libstdc++/46447, libstdc++/93151, libstdc++/96083, libstdc++/98319,
+ libstdc++/98344, libstdc++/98370, libstdc++/98374, libstdc++/98377,
+ middle-end/98366, other/98400, other/98409, rtl-optimization/98271,
+ rtl-optimization/98276, rtl-optimization/98289,
+ rtl-optimization/98347, sanitizer/97868, target/96793, target/98146,
+ target/98177, target/98280, tree-optimization/96239,
+ tree-optimization/97750, tree-optimization/98272,
+ tree-optimization/98279, tree-optimization/98378,
+ tree-optimization/98407
+
* Thu Dec 17 2020 Jakub Jelinek 11.0.0-0.10
- apply workaround for profiledbootstrap x86_64 failure
- put g++-mapper-server into the right directory
diff --git a/gcc11-c++tools.patch b/gcc11-c++tools.patch
deleted file mode 100644
index 563b404..0000000
--- a/gcc11-c++tools.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-2020-12-17 Jakub Jelinek
-
- * configure.ac: Add GCC_BASE_VER.
- * Makefile.in (version): Remove variable.
- (gcc_version): New variable.
- (libexecsubdir): Use $(gcc_version) instead of $(version).
- * configure: Regenerated.
-
---- c++tools/configure.ac.jj 2020-12-16 23:38:34.091923526 +0100
-+++ c++tools/configure.ac 2020-12-17 00:02:48.221661922 +0100
-@@ -206,6 +206,9 @@ if test $ac_cv_inet_ntop = yes; then
- [Define if inet_ntop provided.])
- fi
-
-+# Determine what GCC version number to use in filesystem paths.
-+GCC_BASE_VER
-+
- AC_CONFIG_HEADERS([config.h])
- AC_CONFIG_FILES([Makefile])
-
---- c++tools/Makefile.in.jj 2020-12-16 23:38:34.091923526 +0100
-+++ c++tools/Makefile.in 2020-12-17 00:01:54.419263424 +0100
-@@ -20,8 +20,8 @@ prefix := @prefix@
- bindir := @bindir@
- libexecdir := @libexecdir@
- target_noncanonical := @target_noncanonical@
--version := $(shell cat $(srcdir)/../gcc/BASE-VER)
--libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(version)
-+gcc_version := $(shell @get_gcc_base_ver@ $(srcdir)/../gcc/BASE-VER)
-+libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
- INSTALL := @INSTALL@
- AUTOCONF := @AUTOCONF@
- AUTOHEADER := @AUTOHEADER@
---- c++tools/configure.jj 2020-12-16 23:38:34.091923526 +0100
-+++ c++tools/configure 2020-12-17 00:02:53.849599006 +0100
-@@ -585,6 +585,7 @@ ac_unique_file="c++tools"
- ac_unique_file="server.cc"
- ac_subst_vars='LTLIBOBJS
- LIBOBJS
-+get_gcc_base_ver
- ac_ct_CC
- CFLAGS
- CC
-@@ -658,6 +659,7 @@ ac_user_opts='
- enable_option_checking
- enable_c___tools
- enable_maintainer_mode
-+with_gcc_major_version_only
- '
- ac_precious_vars='build_alias
- host_alias
-@@ -1287,6 +1289,12 @@ Optional Features:
- enable maintainer mode. Add rules to rebuild
- configurey bits
-
-+Optional Packages:
-+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
-+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
-+ --with-gcc-major-version-only
-+ use only GCC major number in filesystem paths
-+
- Some influential environment variables:
- CXX C++ compiler command
- CXXFLAGS C++ compiler flags
-@@ -3557,6 +3565,21 @@ $as_echo "#define HAVE_INET_NTOP 1" >>co
-
- fi
-
-+# Determine what GCC version number to use in filesystem paths.
-+
-+ get_gcc_base_ver="cat"
-+
-+# Check whether --with-gcc-major-version-only was given.
-+if test "${with_gcc_major_version_only+set}" = set; then :
-+ withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
-+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'"
-+ fi
-+
-+fi
-+
-+
-+
-+
- ac_config_headers="$ac_config_headers config.h"
-
- ac_config_files="$ac_config_files Makefile"
diff --git a/sources b/sources
index 4697e55..7997ecd 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-11.0.0-20201216.tar.xz) = 5624f905eafa693434ca16df9df9b3d7dff6d01d335fb690bee124d5f62cec6f2273a4b13cbe85eac33b00d2e556bfeb246444558c4a33747629529a2bd560ad
+SHA512 (gcc-11.0.0-20201223.tar.xz) = 46bd2b601027ce420d5659e0e8638f9f3971eaf637960db9aced7a335ea234b761ae5b671ffc1fcee772c804cbdf9058346f461ad360019777feca89491afdd9
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From 47dcf480fc5e7de9373e8c31ca2b1c0a34039ad2 Mon Sep 17 00:00:00 2001
From: Martin Cermak
Date: Mon, 4 Jan 2021 18:22:49 +0100
Subject: [PATCH 013/293] CI gating: Switch to FMF format, include a beakerlib
based smoke test coming from RHEL.
---
.fmf/version | 1 +
gating.yaml | 14 ++++
plans/ci.fmf | 6 ++
tests/build_hello_world.sh | 9 ---
tests/data/hello.c | 5 --
tests/data/hello.cpp | 5 --
tests/smoke-test/Makefile | 65 +++++++++++++++++
tests/smoke-test/PURPOSE | 3 +
tests/smoke-test/clear_cache.c | 7 ++
tests/smoke-test/hello.c | 7 ++
tests/smoke-test/hello.cpp | 7 ++
tests/smoke-test/hello.f90 | 3 +
tests/smoke-test/main.fmf | 22 ++++++
tests/smoke-test/omphello.c | 24 +++++++
tests/smoke-test/quad.c | 38 ++++++++++
tests/smoke-test/runtest.sh | 125 +++++++++++++++++++++++++++++++++
tests/smoke-test/thr-init-2.c | 24 +++++++
tests/smoke-test/tm.c | 34 +++++++++
tests/tests.yml | 14 ----
19 files changed, 380 insertions(+), 33 deletions(-)
create mode 100644 .fmf/version
create mode 100644 gating.yaml
create mode 100644 plans/ci.fmf
delete mode 100755 tests/build_hello_world.sh
delete mode 100644 tests/data/hello.c
delete mode 100644 tests/data/hello.cpp
create mode 100644 tests/smoke-test/Makefile
create mode 100644 tests/smoke-test/PURPOSE
create mode 100644 tests/smoke-test/clear_cache.c
create mode 100644 tests/smoke-test/hello.c
create mode 100644 tests/smoke-test/hello.cpp
create mode 100644 tests/smoke-test/hello.f90
create mode 100644 tests/smoke-test/main.fmf
create mode 100644 tests/smoke-test/omphello.c
create mode 100644 tests/smoke-test/quad.c
create mode 100755 tests/smoke-test/runtest.sh
create mode 100644 tests/smoke-test/thr-init-2.c
create mode 100644 tests/smoke-test/tm.c
delete mode 100644 tests/tests.yml
diff --git a/.fmf/version b/.fmf/version
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/.fmf/version
@@ -0,0 +1 @@
+1
diff --git a/gating.yaml b/gating.yaml
new file mode 100644
index 0000000..c6030c9
--- /dev/null
+++ b/gating.yaml
@@ -0,0 +1,14 @@
+--- !Policy
+product_versions:
+ - fedora-*
+decision_context: bodhi_update_push_stable
+subject_type: koji_build
+rules:
+ - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
+--- !Policy
+product_versions:
+ - rhel-9
+decision_context: osci_compose_gate
+rules:
+ - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1-gating.functional}
+ - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1-gating-p9.functional}
diff --git a/plans/ci.fmf b/plans/ci.fmf
new file mode 100644
index 0000000..1ad2c12
--- /dev/null
+++ b/plans/ci.fmf
@@ -0,0 +1,6 @@
+summary: CI Gating Plan
+discover:
+ how: fmf
+ directory: tests
+execute:
+ how: beakerlib
diff --git a/tests/build_hello_world.sh b/tests/build_hello_world.sh
deleted file mode 100755
index f6aae70..0000000
--- a/tests/build_hello_world.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-set -ex
-
-gcc -x c $(rpm --eval %build_cflags) data/hello.c -o hello_c.out
-./hello_c.out | grep -q "Hello World"
-
-g++ -x c++ $(rpm --eval %build_cxxflags) data/hello.cpp -o hello_cpp.out
-./hello_cpp.out | grep -q "Hello World"
diff --git a/tests/data/hello.c b/tests/data/hello.c
deleted file mode 100644
index fe064a2..0000000
--- a/tests/data/hello.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include
-int main() {
- printf("Hello World!\n");
- return 0;
-}
diff --git a/tests/data/hello.cpp b/tests/data/hello.cpp
deleted file mode 100644
index 2131d8a..0000000
--- a/tests/data/hello.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-#include
-int main() {
- std::cout << "Hello World!\n";
- return 0;
-}
diff --git a/tests/smoke-test/Makefile b/tests/smoke-test/Makefile
new file mode 100644
index 0000000..fb46790
--- /dev/null
+++ b/tests/smoke-test/Makefile
@@ -0,0 +1,65 @@
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# Makefile of /tools/gcc/Sanity/smoke-test
+# Description: Basic smoke test.
+# Author: Marek Polacek
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# Copyright (c) 2012 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing
+# to use, modify, copy, or redistribute it subject to the terms
+# and conditions of the GNU General Public License version 2.
+#
+# This program is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+export TEST=/tools/gcc/Sanity/smoke-test
+export TESTVERSION=1.0
+
+BUILT_FILES=
+
+FILES=$(METADATA) runtest.sh Makefile PURPOSE hello.c hello.f90 hello.cpp tm.c quad.c omphello.c thr-init-2.c clear_cache.c
+
+.PHONY: all install download clean
+
+run: $(FILES) build
+ ./runtest.sh
+
+build: $(BUILT_FILES)
+ test -x runtest.sh || chmod a+x runtest.sh
+
+clean:
+ rm -f *~ $(BUILT_FILES)
+
+
+include /usr/share/rhts/lib/rhts-make.include
+
+$(METADATA): Makefile
+ @echo "Owner: Marek Polacek " > $(METADATA)
+ @echo "Name: $(TEST)" >> $(METADATA)
+ @echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
+ @echo "Path: $(TEST_DIR)" >> $(METADATA)
+ @echo "Description: Basic smoke test." >> $(METADATA)
+ @echo "Type: Sanity" >> $(METADATA)
+ @echo "TestTime: 10m" >> $(METADATA)
+ @echo "RunFor: gcc" >> $(METADATA)
+ @echo "RunFor: devtoolset-1.0-gcc" >> $(METADATA)
+ @echo "Requires: gcc gcc-c++ gcc-gfortran glibc-common glibc-devel" >> $(METADATA)
+ @echo "Requires: libquadmath libquadmath-devel libgomp libgcc libstdc++-devel" >> $(METADATA)
+ @echo "Priority: Normal" >> $(METADATA)
+ @echo "License: GPLv2" >> $(METADATA)
+ @echo "Confidential: no" >> $(METADATA)
+ @echo "Destructive: no" >> $(METADATA)
+
+ rhts-lint $(METADATA)
diff --git a/tests/smoke-test/PURPOSE b/tests/smoke-test/PURPOSE
new file mode 100644
index 0000000..912f7b4
--- /dev/null
+++ b/tests/smoke-test/PURPOSE
@@ -0,0 +1,3 @@
+PURPOSE of /tools/gcc/Sanity/smoke-test
+Description: Basic smoke test.
+Author: Marek Polacek
diff --git a/tests/smoke-test/clear_cache.c b/tests/smoke-test/clear_cache.c
new file mode 100644
index 0000000..b10479f
--- /dev/null
+++ b/tests/smoke-test/clear_cache.c
@@ -0,0 +1,7 @@
+int
+main (void)
+{
+ char *mem = __builtin_alloca (40);
+ __builtin___clear_cache (mem, mem + 40);
+ return 0;
+}
diff --git a/tests/smoke-test/hello.c b/tests/smoke-test/hello.c
new file mode 100644
index 0000000..4096e11
--- /dev/null
+++ b/tests/smoke-test/hello.c
@@ -0,0 +1,7 @@
+#include
+
+int
+main (void)
+{
+ puts ("Hello World!");
+}
diff --git a/tests/smoke-test/hello.cpp b/tests/smoke-test/hello.cpp
new file mode 100644
index 0000000..0f2234e
--- /dev/null
+++ b/tests/smoke-test/hello.cpp
@@ -0,0 +1,7 @@
+#include
+
+int
+main (void)
+{
+ std::cout << "Hello, world!\n";
+}
diff --git a/tests/smoke-test/hello.f90 b/tests/smoke-test/hello.f90
new file mode 100644
index 0000000..afabbb2
--- /dev/null
+++ b/tests/smoke-test/hello.f90
@@ -0,0 +1,3 @@
+ program hello
+ print *, "Hello World!"
+ end program hello
diff --git a/tests/smoke-test/main.fmf b/tests/smoke-test/main.fmf
new file mode 100644
index 0000000..3710ca3
--- /dev/null
+++ b/tests/smoke-test/main.fmf
@@ -0,0 +1,22 @@
+summary: Basic smoke test.
+description: ''
+contact:
+- Marek Polacek
+component:
+- gcc
+test: ./runtest.sh
+framework: beakerlib
+recommend:
+- gcc
+- gcc-c++
+- gcc-gfortran
+- glibc-common
+- glibc-devel
+- libquadmath
+- libquadmath-devel
+- libgomp
+- libgcc
+- libstdc++-devel
+duration: 10m
+extra-summary: /tools/gcc/Sanity/smoke-test
+extra-task: /tools/gcc/Sanity/smoke-test
diff --git a/tests/smoke-test/omphello.c b/tests/smoke-test/omphello.c
new file mode 100644
index 0000000..85b591f
--- /dev/null
+++ b/tests/smoke-test/omphello.c
@@ -0,0 +1,24 @@
+#include
+#include
+#include
+
+int
+main (void)
+{
+ int th_id;
+ int nthreads;
+
+ #pragma omp parallel private(th_id)
+ {
+ th_id = omp_get_thread_num ();
+ printf ("Hello World from thread %d\n", th_id);
+
+ #pragma omp barrier
+ if (th_id == 0)
+ {
+ nthreads = omp_get_num_threads ();
+ printf ("There are %d threads\n", nthreads);
+ }
+ }
+ return EXIT_SUCCESS;
+}
diff --git a/tests/smoke-test/quad.c b/tests/smoke-test/quad.c
new file mode 100644
index 0000000..e5a6cc7
--- /dev/null
+++ b/tests/smoke-test/quad.c
@@ -0,0 +1,38 @@
+#include
+#include
+#include
+
+int
+main (void)
+{
+ __float128 r = strtoflt128 ("1.23456789", NULL);
+
+ int prec = 20;
+ int width = 46;
+ char buf[128];
+
+ r = 2.0q;
+ r = sqrtq (r);
+ int n = quadmath_snprintf (buf, sizeof buf, "%+-#*.20Qe", width, r);
+ if ((size_t) n < sizeof buf)
+ /* Prints: +1.41421356237309504880e+00 */
+ printf ("%s\n", buf);
+ quadmath_snprintf (buf, sizeof buf, "%Qa", r);
+ if ((size_t) n < sizeof buf)
+ /* Prints: 0x1.6a09e667f3bcc908b2fb1366ea96p+0 */
+ printf ("%s\n", buf);
+ n = quadmath_snprintf (NULL, 0, "%+-#46.*Qe", prec, r);
+ if (n > -1)
+ {
+ char *str = malloc (n + 1);
+ if (str)
+ {
+ quadmath_snprintf (str, n + 1, "%+-#46.*Qe", prec, r);
+ /* Prints: +1.41421356237309504880e+00 */
+ printf ("%s\n", str);
+ }
+ free (str);
+ }
+
+ return 0;
+}
diff --git a/tests/smoke-test/runtest.sh b/tests/smoke-test/runtest.sh
new file mode 100755
index 0000000..78fda72
--- /dev/null
+++ b/tests/smoke-test/runtest.sh
@@ -0,0 +1,125 @@
+#!/bin/bash
+# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# runtest.sh of /tools/gcc/Sanity/smoke-test
+# Description: Basic smoke test.
+# Author: Marek Polacek
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# Copyright (c) 2012 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing
+# to use, modify, copy, or redistribute it subject to the terms
+# and conditions of the GNU General Public License version 2.
+#
+# This program is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# Include Beaker environment
+. /usr/share/beakerlib/beakerlib.sh || exit 1
+
+PACKAGES=(gcc gcc-c++ gcc-gfortran glibc-common libgomp libgcc glibc-devel libstdc++ libstdc++-devel)
+
+# Choose the compiler.
+GCC=${GCC:-gcc}
+GXX=${GXX:-g++}
+GFORTRAN=${GFORTRAN:-gfortran}
+
+PACKAGE=gcc
+
+rlJournalStart
+ rlPhaseStartSetup
+ export PRI_ARCH=`rlGetPrimaryArch`
+ export SEC_ARCH=`rlGetSecondaryArch`
+ # don't assert anything under devtoolset
+ if type gcc | grep -q -v devtoolset
+ then
+ for p in "${PACKAGES[@]}"; do
+ rpm -q "$p.$PRI_ARCH" || yum install -y "$p.$PRI_ARCH"
+ rlAssertRpm "$p.$PRI_ARCH"
+ done; unset p
+ fi
+ rlLog "GCC = $GCC"
+ rlLog "Installed within `rpmquery -f $(which $GCC)`"
+ rlLog "GXX = $GXX"
+ rlLog "Installed within `rpmquery -f $(which $GXX)`"
+ rlLog "GFORTRAN = $GFORTRAN"
+ rlLog "Installed within `rpmquery -f $(which $GFORTRAN)`"
+ rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
+ # We need some files.
+ rlRun "cp -v hello.{c,cpp,f90} tm.c quad.c thr-init-2.c clear_cache.c omphello.c $TmpDir"
+ rlRun "pushd $TmpDir"
+ rlRun "rpmquery -l libstdc++-devel.$PRI_ARCH"
+ test -n "$SEC_ARCH" && rpmquery "libstdc++-devel.$SEC_ARCH" && rlRun "rpmquery -l libstdc++-devel.$SEC_ARCH"
+ rlPhaseEnd
+
+ rlPhaseStartSetup "Showing compiler versions"
+ for compiler in $GCC $GXX $GFORTRAN
+ do
+ rlLog "Version of compiler: $compiler"
+ eval "$compiler --version 2>&1" | while read line
+ do
+ rlLog " $line"
+ done
+ done
+ rlPhaseEnd
+
+ rlPhaseStartTest "Compile"
+ rlRun "$GCC hello.c -o hello_c"
+ rlRun "$GXX hello.cpp -o hello_cpp"
+ rlRun "$GFORTRAN hello.f90 -o hello_fortran"
+
+ # TM support is GCC >=4.7 only.
+ $GCC -xc -O2 -std=gnu99 -fgnu-tm - <<< "int main(){}"
+ if test $? -eq 0; then
+ rlRun "$GCC -O2 -std=gnu99 -fgnu-tm tm.c -o tm"
+ rlRun "./tm"
+ fi
+
+ # Test OpenMP.
+ rlRun "$GCC omphello.c -O2 -std=gnu99 -fopenmp -o omp"
+ rlRun "./omp"
+
+ # Test __thread.
+ rlRun "$GCC thr-init-2.c -O2 -std=gnu99 -ftls-model=initial-exec -o thr"
+ rlRun "./thr"
+
+ # Now test some libquadmath stuff (__float128 support).
+ # libquadmath is mising on RHEL machines, usually.
+ test "`rpmquery --qf '%{version}-%{release}' libquadmath`" = "`rpmquery --qf '%{version}-%{release}' $GCC`"
+ if test $? -eq 0 -a "$GCC" = "gcc"; then
+ rlRun "$GCC quad.c -O2 -std=gnu99 -lquadmath -lm -o quad"
+ rlRun "./quad"
+ fi
+
+ # And now something from libgcc, e.g. __builtin___clear_cache.
+ # But not on RHEL5.
+ if ! rlIsRHEL 5; then
+ rlRun "$GCC clear_cache.c -O2 -std=gnu99 -o cache"
+ rlRun "./cache"
+ fi
+ rlPhaseEnd
+
+ rlPhaseStartTest "Check dependant libraries"
+ rlRun "ldd hello_{c,cpp,fortran} &> ldd.out"
+ # Nothing should be linked against anything in /opt.
+ rlAssertNotGrep "/opt" ldd.out
+ rlPhaseEnd
+
+ rlPhaseStartCleanup
+ rlRun "popd"
+ rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
+ rlPhaseEnd
+rlJournalPrintText
+rlJournalEnd
diff --git a/tests/smoke-test/thr-init-2.c b/tests/smoke-test/thr-init-2.c
new file mode 100644
index 0000000..051cff9
--- /dev/null
+++ b/tests/smoke-test/thr-init-2.c
@@ -0,0 +1,24 @@
+/* { dg-do run } */
+/* { dg-require-effective-target tls_runtime } */
+/* { dg-add-options tls } */
+
+extern void abort() ;
+
+static __thread int fstat ;
+static __thread int fstat = 1;
+
+int test_code(int b)
+{
+ fstat += b ;
+ return fstat;
+}
+
+int main (int ac, char *av[])
+{
+ int a = test_code(1);
+
+ if ((a != 2) || (fstat != 2))
+ abort () ;
+
+ return 0;
+}
diff --git a/tests/smoke-test/tm.c b/tests/smoke-test/tm.c
new file mode 100644
index 0000000..f9b4c9b
--- /dev/null
+++ b/tests/smoke-test/tm.c
@@ -0,0 +1,34 @@
+extern void *malloc (__SIZE_TYPE__) __attribute__((malloc,transaction_safe));
+
+static int __attribute__((transaction_safe))
+something (void)
+{
+ return 0;
+}
+
+struct large { int foo[500]; };
+
+int
+main (void)
+{
+ int *p;
+ struct large *lp;
+
+ __transaction_atomic {
+ p = malloc (sizeof (*p) * 100);
+ lp = malloc (sizeof (*lp) * 100);
+
+ /* No instrumentation necessary; P and LP are transaction local. */
+ p[5] = 123;
+ lp->foo[66] = 123;
+
+ if (something ())
+ __transaction_cancel;
+ }
+
+ __transaction_relaxed {
+ ++p[5];
+ }
+
+ return ( (p[5] == 124) ? 0 : 1 );
+}
diff --git a/tests/tests.yml b/tests/tests.yml
deleted file mode 100644
index dfe09e0..0000000
--- a/tests/tests.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-- hosts: localhost
- roles:
- - role: standard-test-basic
- tags:
- - classic
-
- required_packages:
- - redhat-rpm-config
- - annobin
-
- tests:
- - build_hello_world:
- dir: .
- run: "./build_hello_world.sh"
From 4a41cd799a633a6930ec3c5b01a24c62324fb434 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Sat, 9 Jan 2021 11:31:57 +0100
Subject: [PATCH 014/293] 11.0.0-0.12
---
.gitignore | 1 +
gcc.spec | 42 +++++++++++++---
gcc11-pr98282.patch | 118 --------------------------------------------
sources | 2 +-
4 files changed, 37 insertions(+), 126 deletions(-)
delete mode 100644 gcc11-pr98282.patch
diff --git a/.gitignore b/.gitignore
index add1368..2ec5a75 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,3 +26,4 @@
/gcc-11.0.0-20201216.tar.xz
/gcc-11.0.0-20201217.tar.xz
/gcc-11.0.0-20201223.tar.xz
+/gcc-11.0.0-20210109.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 8b6400d..04470c6 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,5 +1,5 @@
-%global DATE 20201223
-%global gitrev 9265a9d6eb38913206ddc37009fd548c2e4f5de0
+%global DATE 20210109
+%global gitrev 9971024e74d1681c78e9b1f0b7ea1e8a6cda7304
%global gcc_version 11.0.0
%global gcc_major 11
# Note, gcc_release must be integer, if you want to add suffixes to
@@ -119,7 +119,7 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
-Release: %{gcc_release}.11%{?dist}
+Release: %{gcc_release}.12%{?dist}
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@@ -272,8 +272,7 @@ Patch8: gcc11-foffload-default.patch
Patch9: gcc11-Wno-format-security.patch
Patch10: gcc11-rh1574936.patch
Patch11: gcc11-d-shared-libphobos.patch
-Patch12: gcc11-pr98282.patch
-Patch13: gcc11-pr98338-workaround.patch
+Patch12: gcc11-pr98338-workaround.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -785,8 +784,7 @@ to NVidia PTX capable devices if available.
%patch10 -p0 -b .rh1574936~
%endif
%patch11 -p0 -b .d-shared-libphobos~
-%patch12 -p0 -b .pr98282~
-%patch13 -p0 -b .pr98338-workaround~
+%patch12 -p0 -b .pr98338-workaround~
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@@ -3071,6 +3069,36 @@ end
%endif
%changelog
+* Sat Jan 9 2021 Jakub Jelinek 11.0.0-0.12
+- update from trunk
+ - PRs analyzer/97072, analyzer/97074, analyzer/98073, analyzer/98223,
+ analyzer/98293, analyzer/98564, analyzer/98580, bootstrap/98324,
+ bootstrap/98506, c++/82099, c++/95768, c++/96045, c++/96504,
+ c++/97597, c++/98206, c++/98305, c++/98316, c++/98329, c++/98332,
+ c++/98353, c++/98413, c++/98441, c++/98469, c++/98515, c++/98551,
+ c/98029, d/98427, fortran/83118, fortran/93701, fortran/93794,
+ fortran/93833, fortran/97612, fortran/97694, fortran/97723,
+ fortran/98022, fortran/98458, libstdc++/98384, middle-end/98160,
+ middle-end/98578, other/98437, rtl-optimization/97144,
+ rtl-optimization/97978, rtl-optimization/98214,
+ rtl-optimization/98334, rtl-optimization/98403, target/89057,
+ target/96793, target/97269, target/98461, target/98482, target/98495,
+ target/98521, target/98522, target/98567, target/98585,
+ testsuite/98489, testsuite/98566, tree-optimization/56719,
+ tree-optimization/94785, tree-optimization/94802,
+ tree-optimization/94994, tree-optimization/95401,
+ tree-optimization/95582, tree-optimization/95771,
+ tree-optimization/96239, tree-optimization/96782,
+ tree-optimization/96928, tree-optimization/96930,
+ tree-optimization/98282, tree-optimization/98291,
+ tree-optimization/98302, tree-optimization/98308,
+ tree-optimization/98371, tree-optimization/98381,
+ tree-optimization/98393, tree-optimization/98428,
+ tree-optimization/98464, tree-optimization/98474,
+ tree-optimization/98513, tree-optimization/98514,
+ tree-optimization/98516, tree-optimization/98544,
+ tree-optimization/98560, tree-optimization/98568
+
* Wed Dec 23 2020 Jakub Jelinek 11.0.0-0.11
- update from trunk
- PRs bootstrap/98300, bootstrap/98380, bootstrap/98412, c++/67343,
diff --git a/gcc11-pr98282.patch b/gcc11-pr98282.patch
deleted file mode 100644
index 4187c5f..0000000
--- a/gcc11-pr98282.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-2020-12-15 Jakub Jelinek
-
- PR tree-optimization/98282
- * tree-ssa-pre.c (compute_avail): Don't try to adjust alias set
- if different when ref1->opcode is not MEM_REF or TARGET_MEM_REF.
-
- * g++.dg/opt/pr98282.C: New test.
-
---- gcc/tree-ssa-pre.c.jj 2020-11-30 10:48:31.000000000 +0100
-+++ gcc/tree-ssa-pre.c 2020-12-15 10:51:51.061206572 +0100
-@@ -4176,13 +4176,17 @@ compute_avail (void)
- && ref2->opcode != MEM_REF
- && ref2 != &operands[0])
- --ref2;
-- if ((ref1->opcode == TARGET_MEM_REF
-- || ref1->opcode == MEM_REF)
-- && (TYPE_ALIGN (ref1->type)
-- > TYPE_ALIGN (ref2->type)))
-- ref1->type
-- = build_aligned_type (ref1->type,
-- TYPE_ALIGN (ref2->type));
-+ if (ref1->opcode == TARGET_MEM_REF
-+ || ref1->opcode == MEM_REF)
-+ {
-+ if (TYPE_ALIGN (ref1->type)
-+ > TYPE_ALIGN (ref2->type))
-+ ref1->type
-+ = build_aligned_type (ref1->type,
-+ TYPE_ALIGN (ref2->type));
-+ }
-+ else
-+ set = ref->set;
- /* TBAA behavior is an obvious part so make sure
- that the hashtable one covers this as well
- by adjusting the ref alias set and its base. */
---- gcc/testsuite/g++.dg/opt/pr98282.C.jj 2020-12-15 12:26:25.868415230 +0100
-+++ gcc/testsuite/g++.dg/opt/pr98282.C 2020-12-15 12:28:00.346353067 +0100
-@@ -0,0 +1,80 @@
-+// PR tree-optimization/98282
-+// { dg-do compile { target c++11 } }
-+// { dg-options "-O2" }
-+
-+template struct g;
-+template struct g { typedef b c; };
-+template typename g::c &&d(b &&e) {
-+ return static_cast::c &&>(e);
-+}
-+void *operator new(__SIZE_TYPE__, void *f) { return f; }
-+struct h;
-+struct k {
-+ using i = h *;
-+};
-+struct D {
-+ k::i j;
-+};
-+struct p : D {
-+ p(p &&) : D() {}
-+};
-+struct r {
-+ using l = int;
-+ r(r &&) : ad() {}
-+ l *ad;
-+};
-+struct s {
-+ static s m();
-+};
-+struct t {
-+ template void operator=(ah);
-+};
-+struct I {
-+ template void q(o ai) {
-+ *ai = aj();
-+ s::m();
-+ }
-+ h aj();
-+};
-+template class as;
-+struct J {
-+ int a;
-+ char av;
-+};
-+template struct aw : J {
-+ void ax(...) {}
-+};
-+template
-+struct aw, an, n...> : aw, n...> {
-+ using az = as;
-+ using ba = aw;
-+ char bb;
-+ an &bc() { return *reinterpret_cast(this); }
-+ void ax(az *bd) {
-+ if (bb)
-+ new (bd) an(d(bc()));
-+ ba::ax(bd);
-+ }
-+};
-+template struct as : aw, n...> {
-+ as();
-+ as(as &&be) { be.ax(this); }
-+ void operator=(as be) { be.ax(this); }
-+};
-+struct h {
-+ as bg;
-+};
-+using bh = t;
-+struct u {
-+ bh bj;
-+};
-+I bk();
-+template void bl() {
-+ h a;
-+ bk().q(&a);
-+}
-+template void bn(int) {
-+ u b;
-+ b.bj = bl;
-+}
-+void bp() { bn(0); }
diff --git a/sources b/sources
index 7997ecd..40a9915 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-11.0.0-20201223.tar.xz) = 46bd2b601027ce420d5659e0e8638f9f3971eaf637960db9aced7a335ea234b761ae5b671ffc1fcee772c804cbdf9058346f461ad360019777feca89491afdd9
+SHA512 (gcc-11.0.0-20210109.tar.xz) = eb3864cf6fef07077175fec2f1ce0b67e678da70a85ce09888f78d1587e7b4c94c398a19aa4a77c32ffdebc34e877ce28deb881c3545521f22c6b158c3087d5d
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From ac8f498836cb54282caf6ee9c6bb0c179029c18c Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Sat, 9 Jan 2021 12:42:33 +0100
Subject: [PATCH 015/293] 11.0.0-0.12
---
gcc.spec | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/gcc.spec b/gcc.spec
index 04470c6..95796d4 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -294,7 +294,7 @@ Patch12: gcc11-pr98338-workaround.patch
%if %{build_go}
# Avoid stripping these libraries and binaries.
%global __os_install_post \
-chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.18.* \
+chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.19.* \
chmod 644 %{buildroot}%{_prefix}/bin/go.gcc \
chmod 644 %{buildroot}%{_prefix}/bin/gofmt.gcc \
chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cgo \
@@ -302,7 +302,7 @@ chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}
chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/test2json \
chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/vet \
%__os_install_post \
-chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgo.so.18.* \
+chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgo.so.19.* \
chmod 755 %{buildroot}%{_prefix}/bin/go.gcc \
chmod 755 %{buildroot}%{_prefix}/bin/gofmt.gcc \
chmod 755 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cgo \
@@ -1388,7 +1388,7 @@ ln -sf ../../../libstdc++.so.6.*[0-9] libstdc++.so
ln -sf ../../../libgfortran.so.5.* libgfortran.so
ln -sf ../../../libgomp.so.1.* libgomp.so
%if %{build_go}
-ln -sf ../../../libgo.so.18.* libgo.so
+ln -sf ../../../libgo.so.19.* libgo.so
%endif
%if %{build_libquadmath}
ln -sf ../../../libquadmath.so.0.* libquadmath.so
@@ -1418,7 +1418,7 @@ ln -sf ../../../../%{_lib}/libstdc++.so.6.*[0-9] libstdc++.so
ln -sf ../../../../%{_lib}/libgfortran.so.5.* libgfortran.so
ln -sf ../../../../%{_lib}/libgomp.so.1.* libgomp.so
%if %{build_go}
-ln -sf ../../../../%{_lib}/libgo.so.18.* libgo.so
+ln -sf ../../../../%{_lib}/libgo.so.19.* libgo.so
%endif
%if %{build_libquadmath}
ln -sf ../../../../%{_lib}/libquadmath.so.0.* libquadmath.so
@@ -1538,8 +1538,8 @@ ln -sf ../`echo ../../../../lib/libgfortran.so.5.* | sed s~/lib/~/lib64/~` 64/li
ln -sf ../`echo ../../../../lib/libgomp.so.1.* | sed s~/lib/~/lib64/~` 64/libgomp.so
%if %{build_go}
rm -f libgo.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgo.so.18.* | sed 's,^.*libg,libg,'`' )' > libgo.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgo.so.18.* | sed 's,^.*libg,libg,'`' )' > 64/libgo.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgo.so.19.* | sed 's,^.*libg,libg,'`' )' > libgo.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgo.so.19.* | sed 's,^.*libg,libg,'`' )' > 64/libgo.so
%endif
%if %{build_libquadmath}
rm -f libquadmath.so
@@ -1637,8 +1637,8 @@ ln -sf ../`echo ../../../../lib64/libgfortran.so.5.* | sed s~/../lib64/~/~` 32/l
ln -sf ../`echo ../../../../lib64/libgomp.so.1.* | sed s~/../lib64/~/~` 32/libgomp.so
%if %{build_go}
rm -f libgo.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgo.so.18.* | sed 's,^.*libg,libg,'`' )' > libgo.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgo.so.18.* | sed 's,^.*libg,libg,'`' )' > 32/libgo.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgo.so.19.* | sed 's,^.*libg,libg,'`' )' > libgo.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgo.so.19.* | sed 's,^.*libg,libg,'`' )' > 32/libgo.so
%endif
%if %{build_libquadmath}
rm -f libquadmath.so
@@ -1825,7 +1825,7 @@ chmod 755 %{buildroot}%{_prefix}/%{_lib}/liblsan.so.0.*
%endif
%if %{build_go}
# Avoid stripping these libraries and binaries.
-chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.18.*
+chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.19.*
chmod 644 %{buildroot}%{_prefix}/bin/go.gcc
chmod 644 %{buildroot}%{_prefix}/bin/gofmt.gcc
chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cgo
@@ -2961,7 +2961,7 @@ end
%doc rpm.doc/go/*
%files -n libgo
-%attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.18*
+%attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.19*
%doc rpm.doc/libgo/*
%files -n libgo-devel
From 93487d62ed16b755a08045b1ff13f06ca4b28dbc Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Wed, 13 Jan 2021 16:29:47 +0100
Subject: [PATCH 016/293] 11.0.0-0.13
---
.gitignore | 1 +
gcc.spec | 17 ++++++++++++++---
sources | 2 +-
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/.gitignore b/.gitignore
index 2ec5a75..48a9c85 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,3 +27,4 @@
/gcc-11.0.0-20201217.tar.xz
/gcc-11.0.0-20201223.tar.xz
/gcc-11.0.0-20210109.tar.xz
+/gcc-11.0.0-20210113.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 95796d4..3f4f4d3 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,5 +1,5 @@
-%global DATE 20210109
-%global gitrev 9971024e74d1681c78e9b1f0b7ea1e8a6cda7304
+%global DATE 20210113
+%global gitrev 12a2ec94f0612806441cdf5a9aab09ecf9b23deb
%global gcc_version 11.0.0
%global gcc_major 11
# Note, gcc_release must be integer, if you want to add suffixes to
@@ -119,7 +119,7 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
-Release: %{gcc_release}.12%{?dist}
+Release: %{gcc_release}.13%{?dist}
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@@ -3069,6 +3069,17 @@ end
%endif
%changelog
+* Wed Jan 13 2021 Jakub Jelinek 11.0.0-0.13
+- update from trunk
+ - PRs analyzer/98628, c++/97284, c++/98481, c++/98556, c++/98611, c++/98620,
+ c/98592, debug/97714, jit/98615, libstdc++/98613,
+ rtl-optimization/98603, target/97875, target/97969, target/98612,
+ testsuite/98225, testsuite/98602, tree-optimization/91403,
+ tree-optimization/95731, tree-optimization/95852,
+ tree-optimization/95867, tree-optimization/98526,
+ tree-optimization/98550, tree-optimization/98629
+ - fix ICEs in print_mem_ref (#1915400, #1915437, #1915781, PR c/98597)
+
* Sat Jan 9 2021 Jakub Jelinek 11.0.0-0.12
- update from trunk
- PRs analyzer/97072, analyzer/97074, analyzer/98073, analyzer/98223,
diff --git a/sources b/sources
index 40a9915..7a5fa14 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-11.0.0-20210109.tar.xz) = eb3864cf6fef07077175fec2f1ce0b67e678da70a85ce09888f78d1587e7b4c94c398a19aa4a77c32ffdebc34e877ce28deb881c3545521f22c6b158c3087d5d
+SHA512 (gcc-11.0.0-20210113.tar.xz) = f11fbefb813368de29eb1368219938ce3f77b96f543b18d2ce14be113f25c8eaa46a450f1b88ed5752cf8180ed8881273f9ac5771bf1274d11e10d1fa16131e6
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From f49280a03bb6435cf5b1e69bcbcefb91f5fa410d Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Sat, 16 Jan 2021 11:31:41 +0100
Subject: [PATCH 017/293] 11.0.0-0.14
---
.gitignore | 1 +
gcc.spec | 21 ++++++++++++++++++---
sources | 2 +-
3 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/.gitignore b/.gitignore
index 48a9c85..66ca0a7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,3 +28,4 @@
/gcc-11.0.0-20201223.tar.xz
/gcc-11.0.0-20210109.tar.xz
/gcc-11.0.0-20210113.tar.xz
+/gcc-11.0.0-20210116.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 3f4f4d3..f0ebf45 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,5 +1,5 @@
-%global DATE 20210113
-%global gitrev 12a2ec94f0612806441cdf5a9aab09ecf9b23deb
+%global DATE 20210116
+%global gitrev d42629234e8a859ed1be99bf5e06bce1a4e3fb0c
%global gcc_version 11.0.0
%global gcc_major 11
# Note, gcc_release must be integer, if you want to add suffixes to
@@ -119,7 +119,7 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
-Release: %{gcc_release}.13%{?dist}
+Release: %{gcc_release}.14%{?dist}
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@@ -3069,6 +3069,21 @@ end
%endif
%changelog
+* Sat Jan 16 2021 Jakub Jelinek 11.0.0-0.14
+- update from trunk
+ - PRs ada/98595, analyzer/98679, bootstrap/98696, c++/63707, c++/98231,
+ c++/98372, c++/98538, c++/98591, c++/98626, c++/98642, fortran/98661,
+ ipa/98652, jit/98586, libgomp/65099, libstdc++/98466, libstdc++/98471,
+ preprocessor/95253, target/70454, target/71233, target/88836,
+ target/95905, target/96938, target/98667, target/98671, target/98676,
+ testsuite/96098, testsuite/96147, tree-optimization/92645,
+ tree-optimization/96376, tree-optimization/96669,
+ tree-optimization/96681, tree-optimization/96688,
+ tree-optimization/96691, tree-optimization/98455,
+ tree-optimization/98597, tree-optimization/98640,
+ tree-optimization/98674, tree-optimization/98685
+ - fix up pmovzx permutation SSE4.1 patterns (#1916240, PR target/98670)
+
* Wed Jan 13 2021 Jakub Jelinek 11.0.0-0.13
- update from trunk
- PRs analyzer/98628, c++/97284, c++/98481, c++/98556, c++/98611, c++/98620,
diff --git a/sources b/sources
index 7a5fa14..6d46e14 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-11.0.0-20210113.tar.xz) = f11fbefb813368de29eb1368219938ce3f77b96f543b18d2ce14be113f25c8eaa46a450f1b88ed5752cf8180ed8881273f9ac5771bf1274d11e10d1fa16131e6
+SHA512 (gcc-11.0.0-20210116.tar.xz) = befda0f25ccc682205d2ed6a50edba3da059042fa0a25e3a435011765c8f61e895eef52ebeed7de0bf61f97ee8308645779f3dc55675cabe51acc6ea74c517b0
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From dd22b2a0a26b8d079b8f9e71476191ca4056f5fc Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Sat, 16 Jan 2021 12:34:08 +0100
Subject: [PATCH 018/293] 11.0.0-0.14
---
gcc.spec | 2 --
gcc11-i386-libgomp.patch | 11 -----------
2 files changed, 13 deletions(-)
delete mode 100644 gcc11-i386-libgomp.patch
diff --git a/gcc.spec b/gcc.spec
index f0ebf45..28f89b2 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -261,7 +261,6 @@ Provides: bundled(libiberty)
Provides: gcc(major) = %{gcc_major}
Patch0: gcc11-hack.patch
-Patch1: gcc11-i386-libgomp.patch
Patch2: gcc11-sparc-config-detection.patch
Patch3: gcc11-libgomp-omp_h-multilib.patch
Patch4: gcc11-libtool-no-rpath.patch
@@ -767,7 +766,6 @@ to NVidia PTX capable devices if available.
%prep
%setup -q -n gcc-%{version}-%{DATE} -a 1 -a 2
%patch0 -p0 -b .hack~
-%patch1 -p0 -b .i386-libgomp~
%patch2 -p0 -b .sparc-config-detection~
%patch3 -p0 -b .libgomp-omp_h-multilib~
%patch4 -p0 -b .libtool-no-rpath~
diff --git a/gcc11-i386-libgomp.patch b/gcc11-i386-libgomp.patch
deleted file mode 100644
index 520561e..0000000
--- a/gcc11-i386-libgomp.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- libgomp/configure.tgt.jj 2008-01-10 20:53:48.000000000 +0100
-+++ libgomp/configure.tgt 2008-03-27 12:44:51.000000000 +0100
-@@ -67,7 +67,7 @@ if test $enable_linux_futex = yes; then
- ;;
- *)
- if test -z "$with_arch"; then
-- XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
-+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
- fi
- esac
- ;;
From 983aa76b9bc21ce2eab8bdf6b28cf1aa30a3253c Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Tue, 19 Jan 2021 14:28:03 +0100
Subject: [PATCH 019/293] 11.0.0-0.15
---
gcc.spec | 26 ++++++++-
gcc11-pr98672.patch | 87 +++++++++++++++++++++++++++++
gcc11-pr98687.patch | 130 ++++++++++++++++++++++++++++++++++++++++++++
gcc11-pr98721.patch | 91 +++++++++++++++++++++++++++++++
gcc11-pr98742.patch | 42 ++++++++++++++
5 files changed, 373 insertions(+), 3 deletions(-)
create mode 100644 gcc11-pr98672.patch
create mode 100644 gcc11-pr98687.patch
create mode 100644 gcc11-pr98721.patch
create mode 100644 gcc11-pr98742.patch
diff --git a/gcc.spec b/gcc.spec
index 28f89b2..86f8247 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,5 +1,5 @@
-%global DATE 20210116
-%global gitrev d42629234e8a859ed1be99bf5e06bce1a4e3fb0c
+%global DATE 20210119
+%global gitrev 4b9bffe2c626b87d403f11674a5bd63c6078c777
%global gcc_version 11.0.0
%global gcc_major 11
# Note, gcc_release must be integer, if you want to add suffixes to
@@ -119,7 +119,7 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
-Release: %{gcc_release}.14%{?dist}
+Release: %{gcc_release}.15%{?dist}
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@@ -272,6 +272,10 @@ Patch9: gcc11-Wno-format-security.patch
Patch10: gcc11-rh1574936.patch
Patch11: gcc11-d-shared-libphobos.patch
Patch12: gcc11-pr98338-workaround.patch
+Patch13: gcc11-pr98672.patch
+Patch14: gcc11-pr98687.patch
+Patch15: gcc11-pr98721.patch
+Patch16: gcc11-pr98742.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -783,6 +787,12 @@ to NVidia PTX capable devices if available.
%endif
%patch11 -p0 -b .d-shared-libphobos~
%patch12 -p0 -b .pr98338-workaround~
+%patch13 -p0 -b .pr98672~
+%patch14 -p0 -b .pr98687~
+%patch15 -p0 -b .pr98721~
+%patch16 -p0 -b .pr98742~
+
+rm -f libgomp/testsuite/*/*task-detach*
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@@ -3067,6 +3077,16 @@ end
%endif
%changelog
+* Tue Jan 19 2021 Jakub Jelinek 11.0.0-0.15
+- update from trunk
+ - PRs debug/98708, debug/98716, ipa/98222, libstdc++/98725, target/97847,
+ testsuite/97299, testsuite/97494, testsuite/97987,
+ tree-optimization/96271
+ - fix miscompilation of portable signed multiplication overflow check
+ (#1916576, PR tree-optimization/98727)
+ - switch to DWARF 5 by default
+- fix PRs c++/98672, c++/98687, c++/98742, tree-optimization/98721
+
* Sat Jan 16 2021 Jakub Jelinek 11.0.0-0.14
- update from trunk
- PRs ada/98595, analyzer/98679, bootstrap/98696, c++/63707, c++/98231,
diff --git a/gcc11-pr98672.patch b/gcc11-pr98672.patch
new file mode 100644
index 0000000..b7ac680
--- /dev/null
+++ b/gcc11-pr98672.patch
@@ -0,0 +1,87 @@
+2021-01-15 Jakub Jelinek
+
+ PR c++/98672
+ * constexpr.c (potential_constant_expression_1) ,
+ : If the condition isn't constant true, check if
+ the loop body can contain a return stmt.
+
+ * g++.dg/cpp1y/constexpr-98672.C: New test.
+
+--- gcc/cp/constexpr.c.jj 2021-01-13 19:19:44.368469462 +0100
++++ gcc/cp/constexpr.c 2021-01-14 12:02:27.347042704 +0100
+@@ -8190,7 +8190,17 @@ potential_constant_expression_1 (tree t,
+ /* If we couldn't evaluate the condition, it might not ever be
+ true. */
+ if (!integer_onep (tmp))
+- return true;
++ {
++ /* Before returning true, check if the for body can contain
++ a return. */
++ hash_set pset;
++ check_for_return_continue_data data = { &pset, NULL_TREE };
++ if (tree ret_expr
++ = cp_walk_tree (&FOR_BODY (t), check_for_return_continue,
++ &data, &pset))
++ *jump_target = ret_expr;
++ return true;
++ }
+ }
+ if (!RECUR (FOR_EXPR (t), any))
+ return false;
+@@ -8219,7 +8229,17 @@ potential_constant_expression_1 (tree t,
+ tmp = cxx_eval_outermost_constant_expr (tmp, true);
+ /* If we couldn't evaluate the condition, it might not ever be true. */
+ if (!integer_onep (tmp))
+- return true;
++ {
++ /* Before returning true, check if the while body can contain
++ a return. */
++ hash_set pset;
++ check_for_return_continue_data data = { &pset, NULL_TREE };
++ if (tree ret_expr
++ = cp_walk_tree (&WHILE_BODY (t), check_for_return_continue,
++ &data, &pset))
++ *jump_target = ret_expr;
++ return true;
++ }
+ if (!RECUR (WHILE_BODY (t), any))
+ return false;
+ if (breaks (jump_target) || continues (jump_target))
+--- gcc/testsuite/g++.dg/cpp1y/constexpr-98672.C.jj 2021-01-14 12:19:24.842438847 +0100
++++ gcc/testsuite/g++.dg/cpp1y/constexpr-98672.C 2021-01-14 12:07:33.935551155 +0100
+@@ -0,0 +1,35 @@
++// PR c++/98672
++// { dg-do compile { target c++14 } }
++
++void
++foo ()
++{
++}
++
++constexpr int
++bar ()
++{
++ for (int i = 0; i < 5; ++i)
++ return i;
++ foo ();
++ return 0;
++}
++
++constexpr int
++baz ()
++{
++ int i = 0;
++ while (i < 5)
++ {
++ if (i == 3)
++ return i;
++ else
++ ++i;
++ }
++ foo ();
++ return 0;
++}
++
++constexpr int i = bar ();
++constexpr int j = baz ();
++static_assert (i == 0 && j == 3, "");
diff --git a/gcc11-pr98687.patch b/gcc11-pr98687.patch
new file mode 100644
index 0000000..d2e1ce0
--- /dev/null
+++ b/gcc11-pr98687.patch
@@ -0,0 +1,130 @@
+My recent patch that introduced push_using_decl_bindings didn't
+handle USING_DECL redeclaration, therefore things broke. This
+patch amends that. Note that I don't know if the other parts of
+finish_nonmember_using_decl are needed (e.g. the binding->type
+setting) -- I couldn't trigger it by any of my hand-made testcases.
+
+Sorry for not thinking harder about redeclarations in the original
+patch :(.
+
+2021-01-15 Marek Polacek
+
+ PR c++/98687
+ * name-lookup.c (push_using_decl_bindings): If we found an
+ existing local binding, update it if it's not identical.
+
+ * g++.dg/lookup/using64.C: New test.
+ * g++.dg/lookup/using65.C: New test.
+
+--- gcc/cp/name-lookup.c
++++ gcc/cp/name-lookup.c
+@@ -9285,8 +9285,24 @@ push_operator_bindings ()
+ void
+ push_using_decl_bindings (tree decl)
+ {
+- push_local_binding (DECL_NAME (decl), USING_DECL_DECLS (decl),
+- /*using*/true);
++ tree name = DECL_NAME (decl);
++ tree value = USING_DECL_DECLS (decl);
++
++ cxx_binding *binding = find_local_binding (current_binding_level, name);
++ if (binding)
++ {
++ if (value == binding->value)
++ /* Redeclaration of this USING_DECL. */;
++ else if (binding->value && TREE_CODE (value) == OVERLOAD)
++ {
++ /* We already have this binding, so replace it. */
++ update_local_overload (IDENTIFIER_BINDING (name), value);
++ IDENTIFIER_BINDING (name)->value = value;
++ }
++ }
++ else
++ /* Install the new binding. */
++ push_local_binding (DECL_NAME (decl), value, /*using*/true);
+ }
+
+ #include "gt-cp-name-lookup.h"
+--- gcc/testsuite/g++.dg/lookup/using64.C
++++ gcc/testsuite/g++.dg/lookup/using64.C
+@@ -0,0 +1,60 @@
++// PR c++/98687
++// { dg-do compile }
++
++struct S { };
++
++namespace N {
++ template
++ bool operator==(T, int);
++
++ template
++ void X(T);
++}
++
++namespace M {
++ template
++ bool operator==(T, double);
++}
++
++template
++bool fn1 (T t)
++{
++ using N::operator==;
++ return t == 1;
++}
++
++template
++bool fn2 (T t)
++{
++ // Redeclaration.
++ using N::operator==;
++ using N::operator==;
++ return t == 1;
++}
++
++template
++bool fn3 (T t)
++{
++ // Need update_local_overload.
++ using N::operator==;
++ using M::operator==;
++ return t == 1;
++}
++
++template
++void fn4 (T t)
++{
++ struct X { };
++ using N::X;
++ X(1);
++}
++
++void
++g ()
++{
++ S s;
++ fn1 (s);
++ fn2 (s);
++ fn3 (s);
++ fn4 (s);
++}
+--- gcc/testsuite/g++.dg/lookup/using65.C
++++ gcc/testsuite/g++.dg/lookup/using65.C
+@@ -0,0 +1,17 @@
++// PR c++/98687
++// { dg-do compile }
++
++extern "C" namespace std {
++ double log1p(double);
++}
++namespace std_fallback {
++ template void log1p();
++}
++template struct log1p_impl {
++ static int run() {
++ using std::log1p;
++ using std_fallback::log1p;
++ return 0;
++ }
++};
++void log1p() { log1p_impl::run(); }
diff --git a/gcc11-pr98721.patch b/gcc11-pr98721.patch
new file mode 100644
index 0000000..6459a9c
--- /dev/null
+++ b/gcc11-pr98721.patch
@@ -0,0 +1,91 @@
+2021-01-19 Jakub Jelinek
+
+ PR tree-optimization/98721
+ * builtins.c (access_ref::inform_access): Don't assume
+ SSA_NAME_IDENTIFIER must be non-NULL. Print messages about
+ object whenever allocfn is NULL, rather than only when DECL_P
+ is true. Use %qE instead of %qD for that. Formatting fixes.
+
+ * gcc.dg/pr98721-1.c: New test.
+ * gcc.dg/pr98721-2.c: New test.
+
+--- gcc/builtins.c.jj 2021-01-18 19:07:16.022895507 +0100
++++ gcc/builtins.c 2021-01-19 11:56:52.247070923 +0100
+@@ -4414,8 +4414,8 @@ access_ref::inform_access (access_mode m
+ MAXREF on which the result is based. */
+ const offset_int orng[] =
+ {
+- offrng[0] - maxref.offrng[0],
+- wi::smax (offrng[1] - maxref.offrng[1], offrng[0]),
++ offrng[0] - maxref.offrng[0],
++ wi::smax (offrng[1] - maxref.offrng[1], offrng[0]),
+ };
+
+ /* Add the final PHI's offset to that of each of the arguments
+@@ -4493,12 +4493,15 @@ access_ref::inform_access (access_mode m
+ /* Strip the SSA_NAME suffix from the variable name and
+ recreate an identifier with the VLA's original name. */
+ ref = gimple_call_lhs (stmt);
+- ref = SSA_NAME_IDENTIFIER (ref);
+- const char *id = IDENTIFIER_POINTER (ref);
+- size_t len = strcspn (id, ".$");
+- if (!len)
+- len = strlen (id);
+- ref = get_identifier_with_length (id, len);
++ if (SSA_NAME_IDENTIFIER (ref))
++ {
++ ref = SSA_NAME_IDENTIFIER (ref);
++ const char *id = IDENTIFIER_POINTER (ref);
++ size_t len = strcspn (id, ".$");
++ if (!len)
++ len = strlen (id);
++ ref = get_identifier_with_length (id, len);
++ }
+ }
+ else
+ {
+@@ -4557,13 +4560,13 @@ access_ref::inform_access (access_mode m
+ return;
+ }
+
+- if (DECL_P (ref))
++ if (allocfn == NULL_TREE)
+ {
+ if (*offstr)
+- inform (loc, "at offset %s into source object %qD of size %s",
++ inform (loc, "at offset %s into source object %qE of size %s",
+ offstr, ref, sizestr);
+ else
+- inform (loc, "source object %qD of size %s", ref, sizestr);
++ inform (loc, "source object %qE of size %s", ref, sizestr);
+
+ return;
+ }
+--- gcc/testsuite/gcc.dg/pr98721-1.c.jj 2021-01-19 12:15:03.825600828 +0100
++++ gcc/testsuite/gcc.dg/pr98721-1.c 2021-01-19 12:14:24.730045488 +0100
+@@ -0,0 +1,14 @@
++/* PR tree-optimization/98721 */
++/* { dg-do compile } */
++/* { dg-options "-O2" } */
++
++int
++foo (int n)
++{
++ if (n <= 0)
++ {
++ char vla[n]; /* { dg-message "source object 'vla' of size 0" } */
++ return __builtin_strlen (vla); /* { dg-warning "'__builtin_strlen' reading 1 or more bytes from a region of size 0" } */
++ }
++ return -1;
++}
+--- gcc/testsuite/gcc.dg/pr98721-2.c.jj 2021-01-19 12:00:16.005742548 +0100
++++ gcc/testsuite/gcc.dg/pr98721-2.c 2021-01-19 11:59:29.372275423 +0100
+@@ -0,0 +1,8 @@
++/* PR tree-optimization/98721 */
++/* { dg-do compile } */
++
++int
++foo (void)
++{
++ return __builtin_strlen (__builtin_alloca_with_align (0, 16)); /* { dg-warning "'__builtin_strlen' reading 1 or more bytes from a region of size 0" } */
++} /* { dg-message "source object '' of size 0" "" { target *-*-* } .-1 } */
diff --git a/gcc11-pr98742.patch b/gcc11-pr98742.patch
new file mode 100644
index 0000000..1b76510
--- /dev/null
+++ b/gcc11-pr98742.patch
@@ -0,0 +1,42 @@
+2021-01-19 Jakub Jelinek
+
+ PR c++/98742
+ * semantics.c (finish_omp_clauses) : If
+ error_operand_p, remove clause without further checking. Check
+ for non-NULL TYPE_NAME.
+
+ * c-c++-common/gomp/task-detach-2.c: New test.
+
+--- gcc/cp/semantics.c.jj 2021-01-16 22:52:33.608413922 +0100
++++ gcc/cp/semantics.c 2021-01-19 10:53:07.979801786 +0100
+@@ -7430,12 +7430,18 @@ finish_omp_clauses (tree clauses, enum c
+ remove = true;
+ break;
+ }
++ else if (error_operand_p (t))
++ {
++ remove = true;
++ break;
++ }
+ else
+ {
+ tree type = TYPE_MAIN_VARIANT (TREE_TYPE (t));
+ if (!type_dependent_expression_p (t)
+ && (!INTEGRAL_TYPE_P (type)
+ || TREE_CODE (type) != ENUMERAL_TYPE
++ || TYPE_NAME (type) == NULL_TREE
+ || (DECL_NAME (TYPE_NAME (type))
+ != get_identifier ("omp_event_handle_t"))))
+ {
+--- gcc/testsuite/c-c++-common/gomp/task-detach-2.c.jj 2021-01-19 11:07:29.345948289 +0100
++++ gcc/testsuite/c-c++-common/gomp/task-detach-2.c 2021-01-19 11:06:57.090317518 +0100
+@@ -0,0 +1,9 @@
++/* PR c++/98742 */
++/* { dg-do compile } */
++
++void
++foo ()
++{
++#pragma omp task detach(0) /* { dg-error "before numeric constant" } */
++ ;
++}
From 6e2000ccdcdb66c5cfdc8eb6cbde89a7900e4603 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Tue, 19 Jan 2021 14:36:34 +0100
Subject: [PATCH 020/293] 11.0.0-0.15
---
.gitignore | 1 +
gcc.spec | 5 ++++-
gcc11-pr98638.patch | 29 +++++++++++++++++++++++++++++
sources | 2 +-
4 files changed, 35 insertions(+), 2 deletions(-)
create mode 100644 gcc11-pr98638.patch
diff --git a/.gitignore b/.gitignore
index 66ca0a7..16d11cc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,3 +29,4 @@
/gcc-11.0.0-20210109.tar.xz
/gcc-11.0.0-20210113.tar.xz
/gcc-11.0.0-20210116.tar.xz
+/gcc-11.0.0-20210119.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 86f8247..5a69606 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -276,6 +276,7 @@ Patch13: gcc11-pr98672.patch
Patch14: gcc11-pr98687.patch
Patch15: gcc11-pr98721.patch
Patch16: gcc11-pr98742.patch
+Patch17: gcc11-pr98638.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -791,6 +792,7 @@ to NVidia PTX capable devices if available.
%patch14 -p0 -b .pr98687~
%patch15 -p0 -b .pr98721~
%patch16 -p0 -b .pr98742~
+%patch17 -p0 -b .pr98638~
rm -f libgomp/testsuite/*/*task-detach*
@@ -3085,7 +3087,8 @@ end
- fix miscompilation of portable signed multiplication overflow check
(#1916576, PR tree-optimization/98727)
- switch to DWARF 5 by default
-- fix PRs c++/98672, c++/98687, c++/98742, tree-optimization/98721
+- fix PRs c++/98672, c++/98687, c++/98742, middle-end/98638,
+ tree-optimization/98721
* Sat Jan 16 2021 Jakub Jelinek 11.0.0-0.14
- update from trunk
diff --git a/gcc11-pr98638.patch b/gcc11-pr98638.patch
new file mode 100644
index 0000000..c399a30
--- /dev/null
+++ b/gcc11-pr98638.patch
@@ -0,0 +1,29 @@
+Since SSA names do leak into global tree data structures like
+TYPE_SIZE or in this case GFC_DECL_SAVED_DESCRIPTOR because of
+frontend bugs we have to be careful to wipe references to the
+CFG when we deconstruct SSA form because we now do ggc_free that.
+
+Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.
+
+2021-01-19 Richard Biener
+
+ PR middle-end/98638
+ * tree-ssanames.c (fini_ssanames): Zero SSA_NAME_DEF_STMT.
+
+--- gcc/tree-ssanames.c
++++ gcc/tree-ssanames.c
+@@ -102,6 +102,14 @@ init_ssanames (struct function *fn, int size)
+ void
+ fini_ssanames (struct function *fn)
+ {
++ unsigned i;
++ tree name;
++ /* Some SSA names leak into global tree data structures so we can't simply
++ ggc_free them. But make sure to clear references to stmts since we now
++ ggc_free the CFG itself. */
++ FOR_EACH_VEC_SAFE_ELT (SSANAMES (fn), i, name)
++ if (name)
++ SSA_NAME_DEF_STMT (name) = NULL;
+ vec_free (SSANAMES (fn));
+ vec_free (FREE_SSANAMES (fn));
+ vec_free (FREE_SSANAMES_QUEUE (fn));
diff --git a/sources b/sources
index 6d46e14..9f41955 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-11.0.0-20210116.tar.xz) = befda0f25ccc682205d2ed6a50edba3da059042fa0a25e3a435011765c8f61e895eef52ebeed7de0bf61f97ee8308645779f3dc55675cabe51acc6ea74c517b0
+SHA512 (gcc-11.0.0-20210119.tar.xz) = 67fc01799d7af841f5b2b63fe40fc5eac01fe25cb6bb0994de46babbdabe8aee384ea0fbd41b5ac7b53b32ce5724618cb0026ac2e1d3d2431751b225f8e96783
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From b08544362ee92895e04e7363d2c9f5cbd09a820e Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Wed, 20 Jan 2021 17:54:51 +0100
Subject: [PATCH 021/293] 11.0.0-0.16
---
gcc.spec | 14 ++-
gcc11-libgomp-task.patch | 69 +++++++++++++++
gcc11-pr98751.patch | 185 +++++++++++++++++++++++++++++++++++++++
gcc11-pr98765.patch | 83 ++++++++++++++++++
4 files changed, 350 insertions(+), 1 deletion(-)
create mode 100644 gcc11-libgomp-task.patch
create mode 100644 gcc11-pr98751.patch
create mode 100644 gcc11-pr98765.patch
diff --git a/gcc.spec b/gcc.spec
index 5a69606..96ba798 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -119,7 +119,7 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
-Release: %{gcc_release}.15%{?dist}
+Release: %{gcc_release}.16%{?dist}
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@@ -277,6 +277,9 @@ Patch14: gcc11-pr98687.patch
Patch15: gcc11-pr98721.patch
Patch16: gcc11-pr98742.patch
Patch17: gcc11-pr98638.patch
+Patch18: gcc11-pr98765.patch
+Patch19: gcc11-libgomp-task.patch
+Patch20: gcc11-pr98751.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -793,6 +796,9 @@ to NVidia PTX capable devices if available.
%patch15 -p0 -b .pr98721~
%patch16 -p0 -b .pr98742~
%patch17 -p0 -b .pr98638~
+%patch18 -p0 -b .pr98765~
+%patch19 -p0 -b .libgomp-task~
+%patch20 -p0 -b .pr98751~
rm -f libgomp/testsuite/*/*task-detach*
@@ -3079,6 +3085,12 @@ end
%endif
%changelog
+* Wed Jan 20 2021 Jakub Jelinek 11.0.0-0.16
+- fix DWARF5 -g -flto -ffat-lto-objects, so that LTO sections can be stripped off
+ later (PR debug/98765)
+- fix GOMP_task caller stack corruption on s390x
+- libgccjit DWARF5 fixes (PR debug/98751)
+
* Tue Jan 19 2021 Jakub Jelinek 11.0.0-0.15
- update from trunk
- PRs debug/98708, debug/98716, ipa/98222, libstdc++/98725, target/97847,
diff --git a/gcc11-libgomp-task.patch b/gcc11-libgomp-task.patch
new file mode 100644
index 0000000..b0ba04e
--- /dev/null
+++ b/gcc11-libgomp-task.patch
@@ -0,0 +1,69 @@
+2021-01-20 Jakub Jelinek
+
+ * task.c (GOMP_task): Rename priority argument to priority_arg,
+ add priority automatic variable and modify that variable. Instead of
+ clearing detach argument when GOMP_TASK_FLAG_DETACH bit is not set,
+ check flags for that bit.
+
+--- libgomp/task.c.jj 2021-01-18 07:18:42.362339622 +0100
++++ libgomp/task.c 2021-01-20 17:23:36.973758174 +0100
+@@ -354,10 +354,11 @@ task_fulfilled_p (struct gomp_task *task
+ void
+ GOMP_task (void (*fn) (void *), void *data, void (*cpyfn) (void *, void *),
+ long arg_size, long arg_align, bool if_clause, unsigned flags,
+- void **depend, int priority, void *detach)
++ void **depend, int priority_arg, void *detach)
+ {
+ struct gomp_thread *thr = gomp_thread ();
+ struct gomp_team *team = thr->ts.team;
++ int priority = 0;
+
+ #ifdef HAVE_BROKEN_POSIX_SEMAPHORES
+ /* If pthread_mutex_* is used for omp_*lock*, then each task must be
+@@ -385,13 +386,12 @@ GOMP_task (void (*fn) (void *), void *da
+ }
+ }
+
+- if ((flags & GOMP_TASK_FLAG_PRIORITY) == 0)
+- priority = 0;
+- else if (priority > gomp_max_task_priority_var)
+- priority = gomp_max_task_priority_var;
+-
+- if ((flags & GOMP_TASK_FLAG_DETACH) == 0)
+- detach = NULL;
++ if (__builtin_expect ((flags & GOMP_TASK_FLAG_PRIORITY) != 0, 0))
++ {
++ priority = priority_arg;
++ if (priority > gomp_max_task_priority_var)
++ priority = gomp_max_task_priority_var;
++ }
+
+ if (!if_clause || team == NULL
+ || (thr->task && thr->task->final_task)
+@@ -415,7 +415,7 @@ GOMP_task (void (*fn) (void *), void *da
+ || (flags & GOMP_TASK_FLAG_FINAL);
+ task.priority = priority;
+
+- if (detach)
++ if ((flags & GOMP_TASK_FLAG_DETACH) != 0)
+ {
+ task.detach = true;
+ gomp_sem_init (&task.completion_sem, 0);
+@@ -443,7 +443,7 @@ GOMP_task (void (*fn) (void *), void *da
+ else
+ fn (data);
+
+- if (detach && !task_fulfilled_p (&task))
++ if (task.detach && !task_fulfilled_p (&task))
+ gomp_sem_wait (&task.completion_sem);
+
+ /* Access to "children" is normally done inside a task_lock
+@@ -484,7 +484,7 @@ GOMP_task (void (*fn) (void *), void *da
+ task->kind = GOMP_TASK_UNDEFERRED;
+ task->in_tied_task = parent->in_tied_task;
+ task->taskgroup = taskgroup;
+- if (detach)
++ if ((flags & GOMP_TASK_FLAG_DETACH) != 0)
+ {
+ task->detach = true;
+ gomp_sem_init (&task->completion_sem, 0);
diff --git a/gcc11-pr98751.patch b/gcc11-pr98751.patch
new file mode 100644
index 0000000..c0caaf8
--- /dev/null
+++ b/gcc11-pr98751.patch
@@ -0,0 +1,185 @@
+2021-01-19 David Malcolm
+
+ PR debug/98751
+ * dwarf2out.c (output_line_info): Rename static variable
+ "generation", moving it out of the function to...
+ (output_line_info_generation): New.
+ (init_sections_and_labels): Likewise, renaming the variable to...
+ (init_sections_and_labels_generation): New.
+ (dwarf2out_c_finalize): Reset the new variables.
+
+--- gcc/dwarf2out.c
++++ gcc/dwarf2out.c
+@@ -12709,22 +12709,27 @@ output_one_line_info_table (dw_line_info_table *table)
+ dw2_asm_output_data (1, DW_LNE_end_sequence, NULL);
+ }
+
++static unsigned int output_line_info_generation;
++
+ /* Output the source line number correspondence information. This
+ information goes into the .debug_line section. */
+
+ static void
+ output_line_info (bool prologue_only)
+ {
+- static unsigned int generation;
+ char l1[MAX_ARTIFICIAL_LABEL_BYTES], l2[MAX_ARTIFICIAL_LABEL_BYTES];
+ char p1[MAX_ARTIFICIAL_LABEL_BYTES], p2[MAX_ARTIFICIAL_LABEL_BYTES];
+ bool saw_one = false;
+ int opc;
+
+- ASM_GENERATE_INTERNAL_LABEL (l1, LINE_NUMBER_BEGIN_LABEL, generation);
+- ASM_GENERATE_INTERNAL_LABEL (l2, LINE_NUMBER_END_LABEL, generation);
+- ASM_GENERATE_INTERNAL_LABEL (p1, LN_PROLOG_AS_LABEL, generation);
+- ASM_GENERATE_INTERNAL_LABEL (p2, LN_PROLOG_END_LABEL, generation++);
++ ASM_GENERATE_INTERNAL_LABEL (l1, LINE_NUMBER_BEGIN_LABEL,
++ output_line_info_generation);
++ ASM_GENERATE_INTERNAL_LABEL (l2, LINE_NUMBER_END_LABEL,
++ output_line_info_generation);
++ ASM_GENERATE_INTERNAL_LABEL (p1, LN_PROLOG_AS_LABEL,
++ output_line_info_generation);
++ ASM_GENERATE_INTERNAL_LABEL (p2, LN_PROLOG_END_LABEL,
++ output_line_info_generation++);
+
+ if (!XCOFF_DEBUGGING_INFO)
+ {
+@@ -28589,6 +28594,10 @@ output_macinfo (const char *debug_line_label, bool early_lto_debug)
+ macinfo_label_base += macinfo_label_base_adj;
+ }
+
++/* As init_sections_and_labels may get called multiple times, have a
++ generation count for labels. */
++static unsigned init_sections_and_labels_generation;
++
+ /* Initialize the various sections and labels for dwarf output and prefix
+ them with PREFIX if non-NULL. Returns the generation (zero based
+ number of times function was called). */
+@@ -28596,10 +28605,6 @@ output_macinfo (const char *debug_line_label, bool early_lto_debug)
+ static unsigned
+ init_sections_and_labels (bool early_lto_debug)
+ {
+- /* As we may get called multiple times have a generation count for
+- labels. */
+- static unsigned generation = 0;
+-
+ if (early_lto_debug)
+ {
+ if (!dwarf_split_debug_info)
+@@ -28634,7 +28639,7 @@ init_sections_and_labels (bool early_lto_debug)
+ SECTION_DEBUG | SECTION_EXCLUDE, NULL);
+ ASM_GENERATE_INTERNAL_LABEL (debug_skeleton_abbrev_section_label,
+ DEBUG_SKELETON_ABBREV_SECTION_LABEL,
+- generation);
++ init_sections_and_labels_generation);
+
+ /* Somewhat confusing detail: The skeleton_[abbrev|info] sections
+ stay in the main .o, but the skeleton_line goes into the split
+@@ -28644,14 +28649,14 @@ init_sections_and_labels (bool early_lto_debug)
+ SECTION_DEBUG | SECTION_EXCLUDE, NULL);
+ ASM_GENERATE_INTERNAL_LABEL (debug_skeleton_line_section_label,
+ DEBUG_SKELETON_LINE_SECTION_LABEL,
+- generation);
++ init_sections_and_labels_generation);
+ debug_str_offsets_section
+ = get_section (DEBUG_LTO_DWO_STR_OFFSETS_SECTION,
+ SECTION_DEBUG | SECTION_EXCLUDE,
+ NULL);
+ ASM_GENERATE_INTERNAL_LABEL (debug_skeleton_info_section_label,
+ DEBUG_SKELETON_INFO_SECTION_LABEL,
+- generation);
++ init_sections_and_labels_generation);
+ debug_str_dwo_section = get_section (DEBUG_LTO_STR_DWO_SECTION,
+ DEBUG_STR_DWO_SECTION_FLAGS,
+ NULL);
+@@ -28667,7 +28672,8 @@ init_sections_and_labels (bool early_lto_debug)
+ debug_line_section = get_section (DEBUG_LTO_LINE_SECTION,
+ SECTION_DEBUG | SECTION_EXCLUDE, NULL);
+ ASM_GENERATE_INTERNAL_LABEL (debug_line_section_label,
+- DEBUG_LINE_SECTION_LABEL, generation);
++ DEBUG_LINE_SECTION_LABEL,
++ init_sections_and_labels_generation);
+
+ debug_str_section = get_section (DEBUG_LTO_STR_SECTION,
+ DEBUG_STR_SECTION_FLAGS
+@@ -28711,7 +28717,7 @@ init_sections_and_labels (bool early_lto_debug)
+ SECTION_DEBUG, NULL);
+ ASM_GENERATE_INTERNAL_LABEL (debug_skeleton_abbrev_section_label,
+ DEBUG_SKELETON_ABBREV_SECTION_LABEL,
+- generation);
++ init_sections_and_labels_generation);
+
+ /* Somewhat confusing detail: The skeleton_[abbrev|info] sections
+ stay in the main .o, but the skeleton_line goes into the
+@@ -28721,13 +28727,13 @@ init_sections_and_labels (bool early_lto_debug)
+ SECTION_DEBUG | SECTION_EXCLUDE, NULL);
+ ASM_GENERATE_INTERNAL_LABEL (debug_skeleton_line_section_label,
+ DEBUG_SKELETON_LINE_SECTION_LABEL,
+- generation);
++ init_sections_and_labels_generation);
+ debug_str_offsets_section
+ = get_section (DEBUG_DWO_STR_OFFSETS_SECTION,
+ SECTION_DEBUG | SECTION_EXCLUDE, NULL);
+ ASM_GENERATE_INTERNAL_LABEL (debug_skeleton_info_section_label,
+ DEBUG_SKELETON_INFO_SECTION_LABEL,
+- generation);
++ init_sections_and_labels_generation);
+ debug_loc_section = get_section (dwarf_version >= 5
+ ? DEBUG_DWO_LOCLISTS_SECTION
+ : DEBUG_DWO_LOC_SECTION,
+@@ -28767,31 +28773,37 @@ init_sections_and_labels (bool early_lto_debug)
+ }
+
+ ASM_GENERATE_INTERNAL_LABEL (abbrev_section_label,
+- DEBUG_ABBREV_SECTION_LABEL, generation);
++ DEBUG_ABBREV_SECTION_LABEL,
++ init_sections_and_labels_generation);
+ ASM_GENERATE_INTERNAL_LABEL (debug_info_section_label,
+- DEBUG_INFO_SECTION_LABEL, generation);
++ DEBUG_INFO_SECTION_LABEL,
++ init_sections_and_labels_generation);
+ info_section_emitted = false;
+ ASM_GENERATE_INTERNAL_LABEL (debug_line_section_label,
+- DEBUG_LINE_SECTION_LABEL, generation);
++ DEBUG_LINE_SECTION_LABEL,
++ init_sections_and_labels_generation);
+ /* There are up to 4 unique ranges labels per generation.
+ See also output_rnglists. */
+ ASM_GENERATE_INTERNAL_LABEL (ranges_section_label,
+- DEBUG_RANGES_SECTION_LABEL, generation * 4);
++ DEBUG_RANGES_SECTION_LABEL,
++ init_sections_and_labels_generation * 4);
+ if (dwarf_version >= 5 && dwarf_split_debug_info)
+ ASM_GENERATE_INTERNAL_LABEL (ranges_base_label,
+ DEBUG_RANGES_SECTION_LABEL,
+- 1 + generation * 4);
++ 1 + init_sections_and_labels_generation * 4);
+ ASM_GENERATE_INTERNAL_LABEL (debug_addr_section_label,
+- DEBUG_ADDR_SECTION_LABEL, generation);
++ DEBUG_ADDR_SECTION_LABEL,
++ init_sections_and_labels_generation);
+ ASM_GENERATE_INTERNAL_LABEL (macinfo_section_label,
+ (dwarf_strict && dwarf_version < 5)
+ ? DEBUG_MACINFO_SECTION_LABEL
+- : DEBUG_MACRO_SECTION_LABEL, generation);
++ : DEBUG_MACRO_SECTION_LABEL,
++ init_sections_and_labels_generation);
+ ASM_GENERATE_INTERNAL_LABEL (loc_section_label, DEBUG_LOC_SECTION_LABEL,
+- generation);
++ init_sections_and_labels_generation);
+
+- ++generation;
+- return generation - 1;
++ ++init_sections_and_labels_generation;
++ return init_sections_and_labels_generation - 1;
+ }
+
+ /* Set up for Dwarf output at the start of compilation. */
+@@ -32379,6 +32391,8 @@ dwarf2out_c_finalize (void)
+ base_types.release ();
+ XDELETEVEC (producer_string);
+ producer_string = NULL;
++ output_line_info_generation = 0;
++ init_sections_and_labels_generation = 0;
+ }
+
+ #include "gt-dwarf2out.h"
diff --git a/gcc11-pr98765.patch b/gcc11-pr98765.patch
new file mode 100644
index 0000000..e4cda36
--- /dev/null
+++ b/gcc11-pr98765.patch
@@ -0,0 +1,83 @@
+2021-01-20 Jakub Jelinek
+
+ PR debug/98765
+ * dwarf2out.c (reset_indirect_string): Also reset indirect strings
+ with DW_FORM_line_strp form.
+ (prune_unused_types_update_strings): Don't add into debug_str_hash
+ indirect strings with DW_FORM_line_strp form.
+ (adjust_name_comp_dir): New function.
+ (dwarf2out_finish): Call it on CU DIEs after resetting
+ debug_line_str_hash.
+
+--- gcc/dwarf2out.c.jj 2021-01-20 08:32:09.612958930 +0100
++++ gcc/dwarf2out.c 2021-01-20 15:41:30.343417095 +0100
+@@ -4733,7 +4733,9 @@ int
+ reset_indirect_string (indirect_string_node **h, void *)
+ {
+ struct indirect_string_node *node = *h;
+- if (node->form == DW_FORM_strp || node->form == dwarf_FORM (DW_FORM_strx))
++ if (node->form == DW_FORM_strp
++ || node->form == DW_FORM_line_strp
++ || node->form == dwarf_FORM (DW_FORM_strx))
+ {
+ free (node->label);
+ node->label = NULL;
+@@ -29477,8 +29479,9 @@ prune_unused_types_update_strings (dw_di
+ s->refcount++;
+ /* Avoid unnecessarily putting strings that are used less than
+ twice in the hash table. */
+- if (s->refcount
+- == ((DEBUG_STR_SECTION_FLAGS & SECTION_MERGE) ? 1 : 2))
++ if (s->form != DW_FORM_line_strp
++ && (s->refcount
++ == ((DEBUG_STR_SECTION_FLAGS & SECTION_MERGE) ? 1 : 2)))
+ {
+ indirect_string_node **slot
+ = debug_str_hash->find_slot_with_hash (s->str,
+@@ -31325,6 +31328,33 @@ reset_dies (dw_die_ref die)
+ FOR_EACH_CHILD (die, c, reset_dies (c));
+ }
+
++/* reset_indirect_string removed the references coming from DW_AT_name
++ and DW_AT_comp_dir attributes on compilation unit DIEs. Readd them as
++ .debug_line_str strings again. */
++
++static void
++adjust_name_comp_dir (dw_die_ref die)
++{
++ for (int i = 0; i < 2; i++)
++ {
++ dwarf_attribute attr_kind = i ? DW_AT_comp_dir : DW_AT_name;
++ dw_attr_node *a = get_AT (die, attr_kind);
++ if (a == NULL || a->dw_attr_val.val_class != dw_val_class_str)
++ continue;
++
++ if (!debug_line_str_hash)
++ debug_line_str_hash
++ = hash_table::create_ggc (10);
++
++ struct indirect_string_node *node
++ = find_AT_string_in_table (a->dw_attr_val.v.val_str->str,
++ debug_line_str_hash);
++ set_indirect_string (node);
++ node->form = DW_FORM_line_strp;
++ a->dw_attr_val.v.val_str = node;
++ }
++}
++
+ /* Output stuff that dwarf requires at the end of every file,
+ and generate the DWARF-2 debugging info. */
+
+@@ -31398,6 +31428,12 @@ dwarf2out_finish (const char *filename)
+ {
+ debug_line_str_hash->traverse (NULL);
+ debug_line_str_hash = NULL;
++ if (asm_outputs_debug_line_str ())
++ {
++ adjust_name_comp_dir (comp_unit_die ());
++ for (limbo_die_node *node = cu_die_list; node; node = node->next)
++ adjust_name_comp_dir (node->die);
++ }
+ }
+ }
+
From 2a97a4485a84bad8a4cbcc39a7ea535632d7b887 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Sat, 23 Jan 2021 10:08:25 +0100
Subject: [PATCH 022/293] 11.0.0-0.17
---
.gitignore | 1 +
gcc.spec | 48 +++++-----
gcc11-libgomp-task.patch | 69 ---------------
gcc11-pr98638.patch | 29 ------
gcc11-pr98672.patch | 87 ------------------
gcc11-pr98681.patch | 48 ++++++++++
gcc11-pr98687.patch | 130 ---------------------------
gcc11-pr98721.patch | 91 -------------------
gcc11-pr98742.patch | 42 ---------
gcc11-pr98751.patch | 185 ---------------------------------------
gcc11-pr98765.patch | 83 ------------------
sources | 2 +-
12 files changed, 77 insertions(+), 738 deletions(-)
delete mode 100644 gcc11-libgomp-task.patch
delete mode 100644 gcc11-pr98638.patch
delete mode 100644 gcc11-pr98672.patch
create mode 100644 gcc11-pr98681.patch
delete mode 100644 gcc11-pr98687.patch
delete mode 100644 gcc11-pr98721.patch
delete mode 100644 gcc11-pr98742.patch
delete mode 100644 gcc11-pr98751.patch
delete mode 100644 gcc11-pr98765.patch
diff --git a/.gitignore b/.gitignore
index 16d11cc..c8bd1c1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,3 +30,4 @@
/gcc-11.0.0-20210113.tar.xz
/gcc-11.0.0-20210116.tar.xz
/gcc-11.0.0-20210119.tar.xz
+/gcc-11.0.0-20210123.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 96ba798..8b82fbf 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,5 +1,5 @@
-%global DATE 20210119
-%global gitrev 4b9bffe2c626b87d403f11674a5bd63c6078c777
+%global DATE 20210123
+%global gitrev 6efa61bd94ae86200aaed7ec513de6b3726220bf
%global gcc_version 11.0.0
%global gcc_major 11
# Note, gcc_release must be integer, if you want to add suffixes to
@@ -119,7 +119,7 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
-Release: %{gcc_release}.16%{?dist}
+Release: %{gcc_release}.17%{?dist}
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@@ -272,14 +272,7 @@ Patch9: gcc11-Wno-format-security.patch
Patch10: gcc11-rh1574936.patch
Patch11: gcc11-d-shared-libphobos.patch
Patch12: gcc11-pr98338-workaround.patch
-Patch13: gcc11-pr98672.patch
-Patch14: gcc11-pr98687.patch
-Patch15: gcc11-pr98721.patch
-Patch16: gcc11-pr98742.patch
-Patch17: gcc11-pr98638.patch
-Patch18: gcc11-pr98765.patch
-Patch19: gcc11-libgomp-task.patch
-Patch20: gcc11-pr98751.patch
+Patch13: gcc11-pr98681.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -791,14 +784,7 @@ to NVidia PTX capable devices if available.
%endif
%patch11 -p0 -b .d-shared-libphobos~
%patch12 -p0 -b .pr98338-workaround~
-%patch13 -p0 -b .pr98672~
-%patch14 -p0 -b .pr98687~
-%patch15 -p0 -b .pr98721~
-%patch16 -p0 -b .pr98742~
-%patch17 -p0 -b .pr98638~
-%patch18 -p0 -b .pr98765~
-%patch19 -p0 -b .libgomp-task~
-%patch20 -p0 -b .pr98751~
+%patch13 -p0 -b .pr98681~
rm -f libgomp/testsuite/*/*task-detach*
@@ -3085,9 +3071,29 @@ end
%endif
%changelog
+* Sat Jan 23 2021 Jakub Jelinek 11.0.0-0.17
+- update from trunk
+ - PRs ada/98740, c++/41437, c++/58993, c++/71879, c++/82613, c++/95434,
+ c++/96623, c++/97399, c++/97966, c++/98333, c++/98530, c++/98545,
+ c++/98624, c++/98659, c++/98744, fortran/96320, fortran/98476,
+ fortran/98565, fortran/98757, fortran/98763, gcov-profile/98739,
+ ipa/97673, ipa/98330, ipa/98690, middle-end/98664, middle-end/98773,
+ middle-end/98793, rtl-optimization/92294, rtl-optimization/98694,
+ rtl-optimization/98722, rtl-optimization/98777, sanitizer/95693,
+ target/79251, target/96372, target/96891, target/98065, target/98093,
+ target/98348, target/98636, testsuite/97301, testsuite/98241,
+ testsuite/98795, tree-optimization/47059, tree-optimization/90248,
+ tree-optimization/96674, tree-optimization/98255,
+ tree-optimization/98535, tree-optimization/98758,
+ tree-optimization/98766, tree-optimization/98786
+ - ensure for empty CUs -gdwarf-5 emits at least the required 0th directory
+ and filename entry in the .debug_line section (#1919243, PR debug/98796)
+- fix aarch64 bug where emitted ubfix insn can't be assembled
+ (PR target/98681)
+
* Wed Jan 20 2021 Jakub Jelinek 11.0.0-0.16
-- fix DWARF5 -g -flto -ffat-lto-objects, so that LTO sections can be stripped off
- later (PR debug/98765)
+- fix DWARF5 -g -flto -ffat-lto-objects, so that LTO sections can be stripped
+ off later (PR debug/98765)
- fix GOMP_task caller stack corruption on s390x
- libgccjit DWARF5 fixes (PR debug/98751)
diff --git a/gcc11-libgomp-task.patch b/gcc11-libgomp-task.patch
deleted file mode 100644
index b0ba04e..0000000
--- a/gcc11-libgomp-task.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-2021-01-20 Jakub Jelinek
-
- * task.c (GOMP_task): Rename priority argument to priority_arg,
- add priority automatic variable and modify that variable. Instead of
- clearing detach argument when GOMP_TASK_FLAG_DETACH bit is not set,
- check flags for that bit.
-
---- libgomp/task.c.jj 2021-01-18 07:18:42.362339622 +0100
-+++ libgomp/task.c 2021-01-20 17:23:36.973758174 +0100
-@@ -354,10 +354,11 @@ task_fulfilled_p (struct gomp_task *task
- void
- GOMP_task (void (*fn) (void *), void *data, void (*cpyfn) (void *, void *),
- long arg_size, long arg_align, bool if_clause, unsigned flags,
-- void **depend, int priority, void *detach)
-+ void **depend, int priority_arg, void *detach)
- {
- struct gomp_thread *thr = gomp_thread ();
- struct gomp_team *team = thr->ts.team;
-+ int priority = 0;
-
- #ifdef HAVE_BROKEN_POSIX_SEMAPHORES
- /* If pthread_mutex_* is used for omp_*lock*, then each task must be
-@@ -385,13 +386,12 @@ GOMP_task (void (*fn) (void *), void *da
- }
- }
-
-- if ((flags & GOMP_TASK_FLAG_PRIORITY) == 0)
-- priority = 0;
-- else if (priority > gomp_max_task_priority_var)
-- priority = gomp_max_task_priority_var;
--
-- if ((flags & GOMP_TASK_FLAG_DETACH) == 0)
-- detach = NULL;
-+ if (__builtin_expect ((flags & GOMP_TASK_FLAG_PRIORITY) != 0, 0))
-+ {
-+ priority = priority_arg;
-+ if (priority > gomp_max_task_priority_var)
-+ priority = gomp_max_task_priority_var;
-+ }
-
- if (!if_clause || team == NULL
- || (thr->task && thr->task->final_task)
-@@ -415,7 +415,7 @@ GOMP_task (void (*fn) (void *), void *da
- || (flags & GOMP_TASK_FLAG_FINAL);
- task.priority = priority;
-
-- if (detach)
-+ if ((flags & GOMP_TASK_FLAG_DETACH) != 0)
- {
- task.detach = true;
- gomp_sem_init (&task.completion_sem, 0);
-@@ -443,7 +443,7 @@ GOMP_task (void (*fn) (void *), void *da
- else
- fn (data);
-
-- if (detach && !task_fulfilled_p (&task))
-+ if (task.detach && !task_fulfilled_p (&task))
- gomp_sem_wait (&task.completion_sem);
-
- /* Access to "children" is normally done inside a task_lock
-@@ -484,7 +484,7 @@ GOMP_task (void (*fn) (void *), void *da
- task->kind = GOMP_TASK_UNDEFERRED;
- task->in_tied_task = parent->in_tied_task;
- task->taskgroup = taskgroup;
-- if (detach)
-+ if ((flags & GOMP_TASK_FLAG_DETACH) != 0)
- {
- task->detach = true;
- gomp_sem_init (&task->completion_sem, 0);
diff --git a/gcc11-pr98638.patch b/gcc11-pr98638.patch
deleted file mode 100644
index c399a30..0000000
--- a/gcc11-pr98638.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Since SSA names do leak into global tree data structures like
-TYPE_SIZE or in this case GFC_DECL_SAVED_DESCRIPTOR because of
-frontend bugs we have to be careful to wipe references to the
-CFG when we deconstruct SSA form because we now do ggc_free that.
-
-Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.
-
-2021-01-19 Richard Biener
-
- PR middle-end/98638
- * tree-ssanames.c (fini_ssanames): Zero SSA_NAME_DEF_STMT.
-
---- gcc/tree-ssanames.c
-+++ gcc/tree-ssanames.c
-@@ -102,6 +102,14 @@ init_ssanames (struct function *fn, int size)
- void
- fini_ssanames (struct function *fn)
- {
-+ unsigned i;
-+ tree name;
-+ /* Some SSA names leak into global tree data structures so we can't simply
-+ ggc_free them. But make sure to clear references to stmts since we now
-+ ggc_free the CFG itself. */
-+ FOR_EACH_VEC_SAFE_ELT (SSANAMES (fn), i, name)
-+ if (name)
-+ SSA_NAME_DEF_STMT (name) = NULL;
- vec_free (SSANAMES (fn));
- vec_free (FREE_SSANAMES (fn));
- vec_free (FREE_SSANAMES_QUEUE (fn));
diff --git a/gcc11-pr98672.patch b/gcc11-pr98672.patch
deleted file mode 100644
index b7ac680..0000000
--- a/gcc11-pr98672.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-2021-01-15 Jakub Jelinek
-
- PR c++/98672
- * constexpr.c (potential_constant_expression_1) ,
- : If the condition isn't constant true, check if
- the loop body can contain a return stmt.
-
- * g++.dg/cpp1y/constexpr-98672.C: New test.
-
---- gcc/cp/constexpr.c.jj 2021-01-13 19:19:44.368469462 +0100
-+++ gcc/cp/constexpr.c 2021-01-14 12:02:27.347042704 +0100
-@@ -8190,7 +8190,17 @@ potential_constant_expression_1 (tree t,
- /* If we couldn't evaluate the condition, it might not ever be
- true. */
- if (!integer_onep (tmp))
-- return true;
-+ {
-+ /* Before returning true, check if the for body can contain
-+ a return. */
-+ hash_set pset;
-+ check_for_return_continue_data data = { &pset, NULL_TREE };
-+ if (tree ret_expr
-+ = cp_walk_tree (&FOR_BODY (t), check_for_return_continue,
-+ &data, &pset))
-+ *jump_target = ret_expr;
-+ return true;
-+ }
- }
- if (!RECUR (FOR_EXPR (t), any))
- return false;
-@@ -8219,7 +8229,17 @@ potential_constant_expression_1 (tree t,
- tmp = cxx_eval_outermost_constant_expr (tmp, true);
- /* If we couldn't evaluate the condition, it might not ever be true. */
- if (!integer_onep (tmp))
-- return true;
-+ {
-+ /* Before returning true, check if the while body can contain
-+ a return. */
-+ hash_set pset;
-+ check_for_return_continue_data data = { &pset, NULL_TREE };
-+ if (tree ret_expr
-+ = cp_walk_tree (&WHILE_BODY (t), check_for_return_continue,
-+ &data, &pset))
-+ *jump_target = ret_expr;
-+ return true;
-+ }
- if (!RECUR (WHILE_BODY (t), any))
- return false;
- if (breaks (jump_target) || continues (jump_target))
---- gcc/testsuite/g++.dg/cpp1y/constexpr-98672.C.jj 2021-01-14 12:19:24.842438847 +0100
-+++ gcc/testsuite/g++.dg/cpp1y/constexpr-98672.C 2021-01-14 12:07:33.935551155 +0100
-@@ -0,0 +1,35 @@
-+// PR c++/98672
-+// { dg-do compile { target c++14 } }
-+
-+void
-+foo ()
-+{
-+}
-+
-+constexpr int
-+bar ()
-+{
-+ for (int i = 0; i < 5; ++i)
-+ return i;
-+ foo ();
-+ return 0;
-+}
-+
-+constexpr int
-+baz ()
-+{
-+ int i = 0;
-+ while (i < 5)
-+ {
-+ if (i == 3)
-+ return i;
-+ else
-+ ++i;
-+ }
-+ foo ();
-+ return 0;
-+}
-+
-+constexpr int i = bar ();
-+constexpr int j = baz ();
-+static_assert (i == 0 && j == 3, "");
diff --git a/gcc11-pr98681.patch b/gcc11-pr98681.patch
new file mode 100644
index 0000000..6b2bb1f
--- /dev/null
+++ b/gcc11-pr98681.patch
@@ -0,0 +1,48 @@
+2021-01-22 Jakub Jelinek
+
+ PR target/98681
+ * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
+ Use UINTVAL (shft_amnt) and UINTVAL (mask) instead of INTVAL (shft_amnt)
+ and INTVAL (mask). Add && INTVAL (mask) > 0 condition.
+
+ * gcc.c-torture/execute/pr98681.c: New test.
+
+--- gcc/config/aarch64/aarch64.c.jj 2021-01-13 11:36:27.069888393 +0100
++++ gcc/config/aarch64/aarch64.c 2021-01-22 18:53:18.611518461 +0100
+@@ -12060,10 +12060,11 @@ aarch64_mask_and_shift_for_ubfiz_p (scal
+ rtx shft_amnt)
+ {
+ return CONST_INT_P (mask) && CONST_INT_P (shft_amnt)
+- && INTVAL (shft_amnt) < GET_MODE_BITSIZE (mode)
+- && exact_log2 ((INTVAL (mask) >> INTVAL (shft_amnt)) + 1) >= 0
+- && (INTVAL (mask)
+- & ((HOST_WIDE_INT_1U << INTVAL (shft_amnt)) - 1)) == 0;
++ && INTVAL (mask) > 0
++ && UINTVAL (shft_amnt) < GET_MODE_BITSIZE (mode)
++ && exact_log2 ((UINTVAL (mask) >> UINTVAL (shft_amnt)) + 1) >= 0
++ && (UINTVAL (mask)
++ & ((HOST_WIDE_INT_1U << UINTVAL (shft_amnt)) - 1)) == 0;
+ }
+
+ /* Return true if the masks and a shift amount from an RTX of the form
+--- gcc/testsuite/gcc.c-torture/execute/pr98681.c.jj 2021-01-22 16:45:05.102070501 +0100
++++ gcc/testsuite/gcc.c-torture/execute/pr98681.c 2021-01-22 16:44:34.165416961 +0100
+@@ -0,0 +1,18 @@
++/* PR target/98681 */
++
++__attribute__((noipa)) int
++foo (int x)
++{
++ if (x > 32)
++ return (x << -64) & 255;
++ else
++ return x;
++}
++
++int
++main ()
++{
++ if (foo (32) != 32 || foo (-150) != -150)
++ __builtin_abort ();
++ return 0;
++}
diff --git a/gcc11-pr98687.patch b/gcc11-pr98687.patch
deleted file mode 100644
index d2e1ce0..0000000
--- a/gcc11-pr98687.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-My recent patch that introduced push_using_decl_bindings didn't
-handle USING_DECL redeclaration, therefore things broke. This
-patch amends that. Note that I don't know if the other parts of
-finish_nonmember_using_decl are needed (e.g. the binding->type
-setting) -- I couldn't trigger it by any of my hand-made testcases.
-
-Sorry for not thinking harder about redeclarations in the original
-patch :(.
-
-2021-01-15 Marek Polacek
-
- PR c++/98687
- * name-lookup.c (push_using_decl_bindings): If we found an
- existing local binding, update it if it's not identical.
-
- * g++.dg/lookup/using64.C: New test.
- * g++.dg/lookup/using65.C: New test.
-
---- gcc/cp/name-lookup.c
-+++ gcc/cp/name-lookup.c
-@@ -9285,8 +9285,24 @@ push_operator_bindings ()
- void
- push_using_decl_bindings (tree decl)
- {
-- push_local_binding (DECL_NAME (decl), USING_DECL_DECLS (decl),
-- /*using*/true);
-+ tree name = DECL_NAME (decl);
-+ tree value = USING_DECL_DECLS (decl);
-+
-+ cxx_binding *binding = find_local_binding (current_binding_level, name);
-+ if (binding)
-+ {
-+ if (value == binding->value)
-+ /* Redeclaration of this USING_DECL. */;
-+ else if (binding->value && TREE_CODE (value) == OVERLOAD)
-+ {
-+ /* We already have this binding, so replace it. */
-+ update_local_overload (IDENTIFIER_BINDING (name), value);
-+ IDENTIFIER_BINDING (name)->value = value;
-+ }
-+ }
-+ else
-+ /* Install the new binding. */
-+ push_local_binding (DECL_NAME (decl), value, /*using*/true);
- }
-
- #include "gt-cp-name-lookup.h"
---- gcc/testsuite/g++.dg/lookup/using64.C
-+++ gcc/testsuite/g++.dg/lookup/using64.C
-@@ -0,0 +1,60 @@
-+// PR c++/98687
-+// { dg-do compile }
-+
-+struct S { };
-+
-+namespace N {
-+ template
-+ bool operator==(T, int);
-+
-+ template
-+ void X(T);
-+}
-+
-+namespace M {
-+ template
-+ bool operator==(T, double);
-+}
-+
-+template
-+bool fn1 (T t)
-+{
-+ using N::operator==;
-+ return t == 1;
-+}
-+
-+template
-+bool fn2 (T t)
-+{
-+ // Redeclaration.
-+ using N::operator==;
-+ using N::operator==;
-+ return t == 1;
-+}
-+
-+template
-+bool fn3 (T t)
-+{
-+ // Need update_local_overload.
-+ using N::operator==;
-+ using M::operator==;
-+ return t == 1;
-+}
-+
-+template
-+void fn4 (T t)
-+{
-+ struct X { };
-+ using N::X;
-+ X(1);
-+}
-+
-+void
-+g ()
-+{
-+ S s;
-+ fn1 (s);
-+ fn2 (s);
-+ fn3 (s);
-+ fn4 (s);
-+}
---- gcc/testsuite/g++.dg/lookup/using65.C
-+++ gcc/testsuite/g++.dg/lookup/using65.C
-@@ -0,0 +1,17 @@
-+// PR c++/98687
-+// { dg-do compile }
-+
-+extern "C" namespace std {
-+ double log1p(double);
-+}
-+namespace std_fallback {
-+ template void log1p();
-+}
-+template struct log1p_impl {
-+ static int run() {
-+ using std::log1p;
-+ using std_fallback::log1p;
-+ return 0;
-+ }
-+};
-+void log1p() { log1p_impl::run(); }
diff --git a/gcc11-pr98721.patch b/gcc11-pr98721.patch
deleted file mode 100644
index 6459a9c..0000000
--- a/gcc11-pr98721.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-2021-01-19 Jakub Jelinek
-
- PR tree-optimization/98721
- * builtins.c (access_ref::inform_access): Don't assume
- SSA_NAME_IDENTIFIER must be non-NULL. Print messages about
- object whenever allocfn is NULL, rather than only when DECL_P
- is true. Use %qE instead of %qD for that. Formatting fixes.
-
- * gcc.dg/pr98721-1.c: New test.
- * gcc.dg/pr98721-2.c: New test.
-
---- gcc/builtins.c.jj 2021-01-18 19:07:16.022895507 +0100
-+++ gcc/builtins.c 2021-01-19 11:56:52.247070923 +0100
-@@ -4414,8 +4414,8 @@ access_ref::inform_access (access_mode m
- MAXREF on which the result is based. */
- const offset_int orng[] =
- {
-- offrng[0] - maxref.offrng[0],
-- wi::smax (offrng[1] - maxref.offrng[1], offrng[0]),
-+ offrng[0] - maxref.offrng[0],
-+ wi::smax (offrng[1] - maxref.offrng[1], offrng[0]),
- };
-
- /* Add the final PHI's offset to that of each of the arguments
-@@ -4493,12 +4493,15 @@ access_ref::inform_access (access_mode m
- /* Strip the SSA_NAME suffix from the variable name and
- recreate an identifier with the VLA's original name. */
- ref = gimple_call_lhs (stmt);
-- ref = SSA_NAME_IDENTIFIER (ref);
-- const char *id = IDENTIFIER_POINTER (ref);
-- size_t len = strcspn (id, ".$");
-- if (!len)
-- len = strlen (id);
-- ref = get_identifier_with_length (id, len);
-+ if (SSA_NAME_IDENTIFIER (ref))
-+ {
-+ ref = SSA_NAME_IDENTIFIER (ref);
-+ const char *id = IDENTIFIER_POINTER (ref);
-+ size_t len = strcspn (id, ".$");
-+ if (!len)
-+ len = strlen (id);
-+ ref = get_identifier_with_length (id, len);
-+ }
- }
- else
- {
-@@ -4557,13 +4560,13 @@ access_ref::inform_access (access_mode m
- return;
- }
-
-- if (DECL_P (ref))
-+ if (allocfn == NULL_TREE)
- {
- if (*offstr)
-- inform (loc, "at offset %s into source object %qD of size %s",
-+ inform (loc, "at offset %s into source object %qE of size %s",
- offstr, ref, sizestr);
- else
-- inform (loc, "source object %qD of size %s", ref, sizestr);
-+ inform (loc, "source object %qE of size %s", ref, sizestr);
-
- return;
- }
---- gcc/testsuite/gcc.dg/pr98721-1.c.jj 2021-01-19 12:15:03.825600828 +0100
-+++ gcc/testsuite/gcc.dg/pr98721-1.c 2021-01-19 12:14:24.730045488 +0100
-@@ -0,0 +1,14 @@
-+/* PR tree-optimization/98721 */
-+/* { dg-do compile } */
-+/* { dg-options "-O2" } */
-+
-+int
-+foo (int n)
-+{
-+ if (n <= 0)
-+ {
-+ char vla[n]; /* { dg-message "source object 'vla' of size 0" } */
-+ return __builtin_strlen (vla); /* { dg-warning "'__builtin_strlen' reading 1 or more bytes from a region of size 0" } */
-+ }
-+ return -1;
-+}
---- gcc/testsuite/gcc.dg/pr98721-2.c.jj 2021-01-19 12:00:16.005742548 +0100
-+++ gcc/testsuite/gcc.dg/pr98721-2.c 2021-01-19 11:59:29.372275423 +0100
-@@ -0,0 +1,8 @@
-+/* PR tree-optimization/98721 */
-+/* { dg-do compile } */
-+
-+int
-+foo (void)
-+{
-+ return __builtin_strlen (__builtin_alloca_with_align (0, 16)); /* { dg-warning "'__builtin_strlen' reading 1 or more bytes from a region of size 0" } */
-+} /* { dg-message "source object '' of size 0" "" { target *-*-* } .-1 } */
diff --git a/gcc11-pr98742.patch b/gcc11-pr98742.patch
deleted file mode 100644
index 1b76510..0000000
--- a/gcc11-pr98742.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-2021-01-19 Jakub Jelinek
-
- PR c++/98742
- * semantics.c (finish_omp_clauses) : If
- error_operand_p, remove clause without further checking. Check
- for non-NULL TYPE_NAME.
-
- * c-c++-common/gomp/task-detach-2.c: New test.
-
---- gcc/cp/semantics.c.jj 2021-01-16 22:52:33.608413922 +0100
-+++ gcc/cp/semantics.c 2021-01-19 10:53:07.979801786 +0100
-@@ -7430,12 +7430,18 @@ finish_omp_clauses (tree clauses, enum c
- remove = true;
- break;
- }
-+ else if (error_operand_p (t))
-+ {
-+ remove = true;
-+ break;
-+ }
- else
- {
- tree type = TYPE_MAIN_VARIANT (TREE_TYPE (t));
- if (!type_dependent_expression_p (t)
- && (!INTEGRAL_TYPE_P (type)
- || TREE_CODE (type) != ENUMERAL_TYPE
-+ || TYPE_NAME (type) == NULL_TREE
- || (DECL_NAME (TYPE_NAME (type))
- != get_identifier ("omp_event_handle_t"))))
- {
---- gcc/testsuite/c-c++-common/gomp/task-detach-2.c.jj 2021-01-19 11:07:29.345948289 +0100
-+++ gcc/testsuite/c-c++-common/gomp/task-detach-2.c 2021-01-19 11:06:57.090317518 +0100
-@@ -0,0 +1,9 @@
-+/* PR c++/98742 */
-+/* { dg-do compile } */
-+
-+void
-+foo ()
-+{
-+#pragma omp task detach(0) /* { dg-error "before numeric constant" } */
-+ ;
-+}
diff --git a/gcc11-pr98751.patch b/gcc11-pr98751.patch
deleted file mode 100644
index c0caaf8..0000000
--- a/gcc11-pr98751.patch
+++ /dev/null
@@ -1,185 +0,0 @@
-2021-01-19 David Malcolm
-
- PR debug/98751
- * dwarf2out.c (output_line_info): Rename static variable
- "generation", moving it out of the function to...
- (output_line_info_generation): New.
- (init_sections_and_labels): Likewise, renaming the variable to...
- (init_sections_and_labels_generation): New.
- (dwarf2out_c_finalize): Reset the new variables.
-
---- gcc/dwarf2out.c
-+++ gcc/dwarf2out.c
-@@ -12709,22 +12709,27 @@ output_one_line_info_table (dw_line_info_table *table)
- dw2_asm_output_data (1, DW_LNE_end_sequence, NULL);
- }
-
-+static unsigned int output_line_info_generation;
-+
- /* Output the source line number correspondence information. This
- information goes into the .debug_line section. */
-
- static void
- output_line_info (bool prologue_only)
- {
-- static unsigned int generation;
- char l1[MAX_ARTIFICIAL_LABEL_BYTES], l2[MAX_ARTIFICIAL_LABEL_BYTES];
- char p1[MAX_ARTIFICIAL_LABEL_BYTES], p2[MAX_ARTIFICIAL_LABEL_BYTES];
- bool saw_one = false;
- int opc;
-
-- ASM_GENERATE_INTERNAL_LABEL (l1, LINE_NUMBER_BEGIN_LABEL, generation);
-- ASM_GENERATE_INTERNAL_LABEL (l2, LINE_NUMBER_END_LABEL, generation);
-- ASM_GENERATE_INTERNAL_LABEL (p1, LN_PROLOG_AS_LABEL, generation);
-- ASM_GENERATE_INTERNAL_LABEL (p2, LN_PROLOG_END_LABEL, generation++);
-+ ASM_GENERATE_INTERNAL_LABEL (l1, LINE_NUMBER_BEGIN_LABEL,
-+ output_line_info_generation);
-+ ASM_GENERATE_INTERNAL_LABEL (l2, LINE_NUMBER_END_LABEL,
-+ output_line_info_generation);
-+ ASM_GENERATE_INTERNAL_LABEL (p1, LN_PROLOG_AS_LABEL,
-+ output_line_info_generation);
-+ ASM_GENERATE_INTERNAL_LABEL (p2, LN_PROLOG_END_LABEL,
-+ output_line_info_generation++);
-
- if (!XCOFF_DEBUGGING_INFO)
- {
-@@ -28589,6 +28594,10 @@ output_macinfo (const char *debug_line_label, bool early_lto_debug)
- macinfo_label_base += macinfo_label_base_adj;
- }
-
-+/* As init_sections_and_labels may get called multiple times, have a
-+ generation count for labels. */
-+static unsigned init_sections_and_labels_generation;
-+
- /* Initialize the various sections and labels for dwarf output and prefix
- them with PREFIX if non-NULL. Returns the generation (zero based
- number of times function was called). */
-@@ -28596,10 +28605,6 @@ output_macinfo (const char *debug_line_label, bool early_lto_debug)
- static unsigned
- init_sections_and_labels (bool early_lto_debug)
- {
-- /* As we may get called multiple times have a generation count for
-- labels. */
-- static unsigned generation = 0;
--
- if (early_lto_debug)
- {
- if (!dwarf_split_debug_info)
-@@ -28634,7 +28639,7 @@ init_sections_and_labels (bool early_lto_debug)
- SECTION_DEBUG | SECTION_EXCLUDE, NULL);
- ASM_GENERATE_INTERNAL_LABEL (debug_skeleton_abbrev_section_label,
- DEBUG_SKELETON_ABBREV_SECTION_LABEL,
-- generation);
-+ init_sections_and_labels_generation);
-
- /* Somewhat confusing detail: The skeleton_[abbrev|info] sections
- stay in the main .o, but the skeleton_line goes into the split
-@@ -28644,14 +28649,14 @@ init_sections_and_labels (bool early_lto_debug)
- SECTION_DEBUG | SECTION_EXCLUDE, NULL);
- ASM_GENERATE_INTERNAL_LABEL (debug_skeleton_line_section_label,
- DEBUG_SKELETON_LINE_SECTION_LABEL,
-- generation);
-+ init_sections_and_labels_generation);
- debug_str_offsets_section
- = get_section (DEBUG_LTO_DWO_STR_OFFSETS_SECTION,
- SECTION_DEBUG | SECTION_EXCLUDE,
- NULL);
- ASM_GENERATE_INTERNAL_LABEL (debug_skeleton_info_section_label,
- DEBUG_SKELETON_INFO_SECTION_LABEL,
-- generation);
-+ init_sections_and_labels_generation);
- debug_str_dwo_section = get_section (DEBUG_LTO_STR_DWO_SECTION,
- DEBUG_STR_DWO_SECTION_FLAGS,
- NULL);
-@@ -28667,7 +28672,8 @@ init_sections_and_labels (bool early_lto_debug)
- debug_line_section = get_section (DEBUG_LTO_LINE_SECTION,
- SECTION_DEBUG | SECTION_EXCLUDE, NULL);
- ASM_GENERATE_INTERNAL_LABEL (debug_line_section_label,
-- DEBUG_LINE_SECTION_LABEL, generation);
-+ DEBUG_LINE_SECTION_LABEL,
-+ init_sections_and_labels_generation);
-
- debug_str_section = get_section (DEBUG_LTO_STR_SECTION,
- DEBUG_STR_SECTION_FLAGS
-@@ -28711,7 +28717,7 @@ init_sections_and_labels (bool early_lto_debug)
- SECTION_DEBUG, NULL);
- ASM_GENERATE_INTERNAL_LABEL (debug_skeleton_abbrev_section_label,
- DEBUG_SKELETON_ABBREV_SECTION_LABEL,
-- generation);
-+ init_sections_and_labels_generation);
-
- /* Somewhat confusing detail: The skeleton_[abbrev|info] sections
- stay in the main .o, but the skeleton_line goes into the
-@@ -28721,13 +28727,13 @@ init_sections_and_labels (bool early_lto_debug)
- SECTION_DEBUG | SECTION_EXCLUDE, NULL);
- ASM_GENERATE_INTERNAL_LABEL (debug_skeleton_line_section_label,
- DEBUG_SKELETON_LINE_SECTION_LABEL,
-- generation);
-+ init_sections_and_labels_generation);
- debug_str_offsets_section
- = get_section (DEBUG_DWO_STR_OFFSETS_SECTION,
- SECTION_DEBUG | SECTION_EXCLUDE, NULL);
- ASM_GENERATE_INTERNAL_LABEL (debug_skeleton_info_section_label,
- DEBUG_SKELETON_INFO_SECTION_LABEL,
-- generation);
-+ init_sections_and_labels_generation);
- debug_loc_section = get_section (dwarf_version >= 5
- ? DEBUG_DWO_LOCLISTS_SECTION
- : DEBUG_DWO_LOC_SECTION,
-@@ -28767,31 +28773,37 @@ init_sections_and_labels (bool early_lto_debug)
- }
-
- ASM_GENERATE_INTERNAL_LABEL (abbrev_section_label,
-- DEBUG_ABBREV_SECTION_LABEL, generation);
-+ DEBUG_ABBREV_SECTION_LABEL,
-+ init_sections_and_labels_generation);
- ASM_GENERATE_INTERNAL_LABEL (debug_info_section_label,
-- DEBUG_INFO_SECTION_LABEL, generation);
-+ DEBUG_INFO_SECTION_LABEL,
-+ init_sections_and_labels_generation);
- info_section_emitted = false;
- ASM_GENERATE_INTERNAL_LABEL (debug_line_section_label,
-- DEBUG_LINE_SECTION_LABEL, generation);
-+ DEBUG_LINE_SECTION_LABEL,
-+ init_sections_and_labels_generation);
- /* There are up to 4 unique ranges labels per generation.
- See also output_rnglists. */
- ASM_GENERATE_INTERNAL_LABEL (ranges_section_label,
-- DEBUG_RANGES_SECTION_LABEL, generation * 4);
-+ DEBUG_RANGES_SECTION_LABEL,
-+ init_sections_and_labels_generation * 4);
- if (dwarf_version >= 5 && dwarf_split_debug_info)
- ASM_GENERATE_INTERNAL_LABEL (ranges_base_label,
- DEBUG_RANGES_SECTION_LABEL,
-- 1 + generation * 4);
-+ 1 + init_sections_and_labels_generation * 4);
- ASM_GENERATE_INTERNAL_LABEL (debug_addr_section_label,
-- DEBUG_ADDR_SECTION_LABEL, generation);
-+ DEBUG_ADDR_SECTION_LABEL,
-+ init_sections_and_labels_generation);
- ASM_GENERATE_INTERNAL_LABEL (macinfo_section_label,
- (dwarf_strict && dwarf_version < 5)
- ? DEBUG_MACINFO_SECTION_LABEL
-- : DEBUG_MACRO_SECTION_LABEL, generation);
-+ : DEBUG_MACRO_SECTION_LABEL,
-+ init_sections_and_labels_generation);
- ASM_GENERATE_INTERNAL_LABEL (loc_section_label, DEBUG_LOC_SECTION_LABEL,
-- generation);
-+ init_sections_and_labels_generation);
-
-- ++generation;
-- return generation - 1;
-+ ++init_sections_and_labels_generation;
-+ return init_sections_and_labels_generation - 1;
- }
-
- /* Set up for Dwarf output at the start of compilation. */
-@@ -32379,6 +32391,8 @@ dwarf2out_c_finalize (void)
- base_types.release ();
- XDELETEVEC (producer_string);
- producer_string = NULL;
-+ output_line_info_generation = 0;
-+ init_sections_and_labels_generation = 0;
- }
-
- #include "gt-dwarf2out.h"
diff --git a/gcc11-pr98765.patch b/gcc11-pr98765.patch
deleted file mode 100644
index e4cda36..0000000
--- a/gcc11-pr98765.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-2021-01-20 Jakub Jelinek
-
- PR debug/98765
- * dwarf2out.c (reset_indirect_string): Also reset indirect strings
- with DW_FORM_line_strp form.
- (prune_unused_types_update_strings): Don't add into debug_str_hash
- indirect strings with DW_FORM_line_strp form.
- (adjust_name_comp_dir): New function.
- (dwarf2out_finish): Call it on CU DIEs after resetting
- debug_line_str_hash.
-
---- gcc/dwarf2out.c.jj 2021-01-20 08:32:09.612958930 +0100
-+++ gcc/dwarf2out.c 2021-01-20 15:41:30.343417095 +0100
-@@ -4733,7 +4733,9 @@ int
- reset_indirect_string (indirect_string_node **h, void *)
- {
- struct indirect_string_node *node = *h;
-- if (node->form == DW_FORM_strp || node->form == dwarf_FORM (DW_FORM_strx))
-+ if (node->form == DW_FORM_strp
-+ || node->form == DW_FORM_line_strp
-+ || node->form == dwarf_FORM (DW_FORM_strx))
- {
- free (node->label);
- node->label = NULL;
-@@ -29477,8 +29479,9 @@ prune_unused_types_update_strings (dw_di
- s->refcount++;
- /* Avoid unnecessarily putting strings that are used less than
- twice in the hash table. */
-- if (s->refcount
-- == ((DEBUG_STR_SECTION_FLAGS & SECTION_MERGE) ? 1 : 2))
-+ if (s->form != DW_FORM_line_strp
-+ && (s->refcount
-+ == ((DEBUG_STR_SECTION_FLAGS & SECTION_MERGE) ? 1 : 2)))
- {
- indirect_string_node **slot
- = debug_str_hash->find_slot_with_hash (s->str,
-@@ -31325,6 +31328,33 @@ reset_dies (dw_die_ref die)
- FOR_EACH_CHILD (die, c, reset_dies (c));
- }
-
-+/* reset_indirect_string removed the references coming from DW_AT_name
-+ and DW_AT_comp_dir attributes on compilation unit DIEs. Readd them as
-+ .debug_line_str strings again. */
-+
-+static void
-+adjust_name_comp_dir (dw_die_ref die)
-+{
-+ for (int i = 0; i < 2; i++)
-+ {
-+ dwarf_attribute attr_kind = i ? DW_AT_comp_dir : DW_AT_name;
-+ dw_attr_node *a = get_AT (die, attr_kind);
-+ if (a == NULL || a->dw_attr_val.val_class != dw_val_class_str)
-+ continue;
-+
-+ if (!debug_line_str_hash)
-+ debug_line_str_hash
-+ = hash_table::create_ggc (10);
-+
-+ struct indirect_string_node *node
-+ = find_AT_string_in_table (a->dw_attr_val.v.val_str->str,
-+ debug_line_str_hash);
-+ set_indirect_string (node);
-+ node->form = DW_FORM_line_strp;
-+ a->dw_attr_val.v.val_str = node;
-+ }
-+}
-+
- /* Output stuff that dwarf requires at the end of every file,
- and generate the DWARF-2 debugging info. */
-
-@@ -31398,6 +31428,12 @@ dwarf2out_finish (const char *filename)
- {
- debug_line_str_hash->traverse (NULL);
- debug_line_str_hash = NULL;
-+ if (asm_outputs_debug_line_str ())
-+ {
-+ adjust_name_comp_dir (comp_unit_die ());
-+ for (limbo_die_node *node = cu_die_list; node; node = node->next)
-+ adjust_name_comp_dir (node->die);
-+ }
- }
- }
-
diff --git a/sources b/sources
index 9f41955..34f651a 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-11.0.0-20210119.tar.xz) = 67fc01799d7af841f5b2b63fe40fc5eac01fe25cb6bb0994de46babbdabe8aee384ea0fbd41b5ac7b53b32ce5724618cb0026ac2e1d3d2431751b225f8e96783
+SHA512 (gcc-11.0.0-20210123.tar.xz) = 0c1ee7eab7ef8380c168e4841360667fe7f07d93df54c2f5c814d7830ec812f6087e0ded2761db5f316e1a16772fbc5c39c31a3b2862a3e455c44edc29eb624b
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From 9087b59fd480ac9243586dd0c07ec08bcaaec74a Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Tue, 26 Jan 2021 06:25:27 +0000
Subject: [PATCH 023/293] - Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering
---
gcc.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gcc.spec b/gcc.spec
index 8b82fbf..b766701 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -119,7 +119,7 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
-Release: %{gcc_release}.17%{?dist}
+Release: %{gcc_release}.17%{?dist}.1
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@@ -3071,6 +3071,9 @@ end
%endif
%changelog
+* Tue Jan 26 2021 Fedora Release Engineering - 11.0.0-0.17.1
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
+
* Sat Jan 23 2021 Jakub Jelinek 11.0.0-0.17
- update from trunk
- PRs ada/98740, c++/41437, c++/58993, c++/71879, c++/82613, c++/95434,
From 931429764e94630029a620c3eedda8972e63c821 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Sat, 30 Jan 2021 15:22:11 +0100
Subject: [PATCH 024/293] 11.0.0-0.18
---
.gitignore | 1 +
gcc.spec | 24 ++++++++++++++++-------
gcc11-pr98681.patch | 48 ---------------------------------------------
sources | 2 +-
4 files changed, 19 insertions(+), 56 deletions(-)
delete mode 100644 gcc11-pr98681.patch
diff --git a/.gitignore b/.gitignore
index c8bd1c1..8c3ed5f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,3 +31,4 @@
/gcc-11.0.0-20210116.tar.xz
/gcc-11.0.0-20210119.tar.xz
/gcc-11.0.0-20210123.tar.xz
+/gcc-11.0.0-20210130.tar.xz
diff --git a/gcc.spec b/gcc.spec
index b766701..a49fbbe 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,5 +1,5 @@
-%global DATE 20210123
-%global gitrev 6efa61bd94ae86200aaed7ec513de6b3726220bf
+%global DATE 20210130
+%global gitrev 17ea13f46910e81a4891636c35aec2b3dabe5879
%global gcc_version 11.0.0
%global gcc_major 11
# Note, gcc_release must be integer, if you want to add suffixes to
@@ -119,7 +119,7 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
-Release: %{gcc_release}.17%{?dist}.1
+Release: %{gcc_release}.18%{?dist}
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@@ -272,7 +272,6 @@ Patch9: gcc11-Wno-format-security.patch
Patch10: gcc11-rh1574936.patch
Patch11: gcc11-d-shared-libphobos.patch
Patch12: gcc11-pr98338-workaround.patch
-Patch13: gcc11-pr98681.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -784,7 +783,6 @@ to NVidia PTX capable devices if available.
%endif
%patch11 -p0 -b .d-shared-libphobos~
%patch12 -p0 -b .pr98338-workaround~
-%patch13 -p0 -b .pr98681~
rm -f libgomp/testsuite/*/*task-detach*
@@ -3071,8 +3069,20 @@ end
%endif
%changelog
-* Tue Jan 26 2021 Fedora Release Engineering - 11.0.0-0.17.1
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
+* Sat Jan 30 2021 Jakub Jelinek 11.0.0-0.18
+- update from trunk
+ - PRs ada/98228, bootstrap/98839, c++/33661, c++/88548, c++/94775,
+ c++/96137, c++/97474, c++/97566, c++/97874, c++/98463, c++/98646,
+ c++/98770, c++/98841, c++/98843, c++/98847, d/98806, debug/98331,
+ debug/98811, fortran/67539, fortran/70070, fortran/86470,
+ fortran/93924, fortran/93925, fortran/96843, fortran/98472,
+ fortran/98517, libstdc++/66414, lto/85574, middle-end/98726,
+ middle-end/98807, rtl-optimization/80960, rtl-optimization/97684,
+ rtl-optimization/98144, rtl-optimization/98863, sanitizer/98828,
+ target/97701, target/98730, target/98799, target/98827, target/98833,
+ target/98849, target/98853, testsuite/98771, testsuite/98870,
+ tree-optimization/97260, tree-optimization/97627,
+ tree-optimization/98854, tree-optimization/98866
* Sat Jan 23 2021 Jakub Jelinek 11.0.0-0.17
- update from trunk
diff --git a/gcc11-pr98681.patch b/gcc11-pr98681.patch
deleted file mode 100644
index 6b2bb1f..0000000
--- a/gcc11-pr98681.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-2021-01-22 Jakub Jelinek
-
- PR target/98681
- * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
- Use UINTVAL (shft_amnt) and UINTVAL (mask) instead of INTVAL (shft_amnt)
- and INTVAL (mask). Add && INTVAL (mask) > 0 condition.
-
- * gcc.c-torture/execute/pr98681.c: New test.
-
---- gcc/config/aarch64/aarch64.c.jj 2021-01-13 11:36:27.069888393 +0100
-+++ gcc/config/aarch64/aarch64.c 2021-01-22 18:53:18.611518461 +0100
-@@ -12060,10 +12060,11 @@ aarch64_mask_and_shift_for_ubfiz_p (scal
- rtx shft_amnt)
- {
- return CONST_INT_P (mask) && CONST_INT_P (shft_amnt)
-- && INTVAL (shft_amnt) < GET_MODE_BITSIZE (mode)
-- && exact_log2 ((INTVAL (mask) >> INTVAL (shft_amnt)) + 1) >= 0
-- && (INTVAL (mask)
-- & ((HOST_WIDE_INT_1U << INTVAL (shft_amnt)) - 1)) == 0;
-+ && INTVAL (mask) > 0
-+ && UINTVAL (shft_amnt) < GET_MODE_BITSIZE (mode)
-+ && exact_log2 ((UINTVAL (mask) >> UINTVAL (shft_amnt)) + 1) >= 0
-+ && (UINTVAL (mask)
-+ & ((HOST_WIDE_INT_1U << UINTVAL (shft_amnt)) - 1)) == 0;
- }
-
- /* Return true if the masks and a shift amount from an RTX of the form
---- gcc/testsuite/gcc.c-torture/execute/pr98681.c.jj 2021-01-22 16:45:05.102070501 +0100
-+++ gcc/testsuite/gcc.c-torture/execute/pr98681.c 2021-01-22 16:44:34.165416961 +0100
-@@ -0,0 +1,18 @@
-+/* PR target/98681 */
-+
-+__attribute__((noipa)) int
-+foo (int x)
-+{
-+ if (x > 32)
-+ return (x << -64) & 255;
-+ else
-+ return x;
-+}
-+
-+int
-+main ()
-+{
-+ if (foo (32) != 32 || foo (-150) != -150)
-+ __builtin_abort ();
-+ return 0;
-+}
diff --git a/sources b/sources
index 34f651a..aae8777 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-11.0.0-20210123.tar.xz) = 0c1ee7eab7ef8380c168e4841360667fe7f07d93df54c2f5c814d7830ec812f6087e0ded2761db5f316e1a16772fbc5c39c31a3b2862a3e455c44edc29eb624b
+SHA512 (gcc-11.0.0-20210130.tar.xz) = 8f7a43910a8097a146987c1f336cd51fff2c236ecdf3e1e46b87a6f0336f40483922d997d8a95f26b35b97e91879fbb3a3840492ef823110a280f29745d437f8
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From c7b83880f7d31a09d20787b0dced6df9d390924e Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Sun, 31 Jan 2021 12:15:51 +0100
Subject: [PATCH 025/293] Add RHEL Fortran patchset.
---
gcc.spec | 24 +
gcc11-fortran-fdec-add-missing-indexes.patch | 181 ++
gcc11-fortran-fdec-duplicates.patch | 215 ++
gcc11-fortran-fdec-ichar.patch | 78 +
gcc11-fortran-fdec-non-integer-index.patch | 158 ++
gcc11-fortran-fdec-non-logical-if.patch | 378 ++++
gcc11-fortran-fdec-old-init.patch | 185 ++
gcc11-fortran-fdec-override-kind.patch | 588 +++++
gcc11-fortran-fdec-promotion.patch | 2093 ++++++++++++++++++
gcc11-fortran-fdec-sequence.patch | 262 +++
gcc11-fortran-flogical-as-integer.patch | 305 +++
11 files changed, 4467 insertions(+)
create mode 100644 gcc11-fortran-fdec-add-missing-indexes.patch
create mode 100644 gcc11-fortran-fdec-duplicates.patch
create mode 100644 gcc11-fortran-fdec-ichar.patch
create mode 100644 gcc11-fortran-fdec-non-integer-index.patch
create mode 100644 gcc11-fortran-fdec-non-logical-if.patch
create mode 100644 gcc11-fortran-fdec-old-init.patch
create mode 100644 gcc11-fortran-fdec-override-kind.patch
create mode 100644 gcc11-fortran-fdec-promotion.patch
create mode 100644 gcc11-fortran-fdec-sequence.patch
create mode 100644 gcc11-fortran-flogical-as-integer.patch
diff --git a/gcc.spec b/gcc.spec
index a49fbbe..99687e5 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -273,6 +273,17 @@ Patch10: gcc11-rh1574936.patch
Patch11: gcc11-d-shared-libphobos.patch
Patch12: gcc11-pr98338-workaround.patch
+Patch100: gcc11-fortran-fdec-duplicates.patch
+Patch101: gcc11-fortran-flogical-as-integer.patch
+Patch102: gcc11-fortran-fdec-ichar.patch
+Patch103: gcc11-fortran-fdec-non-integer-index.patch
+Patch104: gcc11-fortran-fdec-old-init.patch
+Patch105: gcc11-fortran-fdec-override-kind.patch
+Patch106: gcc11-fortran-fdec-non-logical-if.patch
+Patch107: gcc11-fortran-fdec-promotion.patch
+Patch108: gcc11-fortran-fdec-sequence.patch
+Patch109: gcc11-fortran-fdec-add-missing-indexes.patch
+
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
%ifnarch %{arm}
@@ -784,6 +795,19 @@ to NVidia PTX capable devices if available.
%patch11 -p0 -b .d-shared-libphobos~
%patch12 -p0 -b .pr98338-workaround~
+%if %{?rhel} >= 9
+%patch100 -p1 -b .fortran-fdec-duplicates~
+%patch101 -p1 -b .fortran-flogical-as-integer~
+%patch102 -p1 -b .fortran-fdec-ichar~
+%patch103 -p1 -b .fortran-fdec-non-integer-index~
+%patch104 -p1 -b .fortran-fdec-old-init~
+%patch105 -p1 -b .fortran-fdec-override-kind~
+%patch106 -p1 -b .fortran-fdec-non-logical-if~
+%patch107 -p1 -b .fortran-fdec-promotion~
+%patch108 -p1 -b .fortran-fdec-sequence~
+%patch109 -p1 -b .fortran-fdec-add-missing-indexes~
+%endif
+
rm -f libgomp/testsuite/*/*task-detach*
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
diff --git a/gcc11-fortran-fdec-add-missing-indexes.patch b/gcc11-fortran-fdec-add-missing-indexes.patch
new file mode 100644
index 0000000..d707b94
--- /dev/null
+++ b/gcc11-fortran-fdec-add-missing-indexes.patch
@@ -0,0 +1,181 @@
+From 7001d522d0273658d9e1fb12ca104d56bfcae34d Mon Sep 17 00:00:00 2001
+From: Mark Eggleston
+Date: Fri, 22 Jan 2021 15:06:08 +0000
+Subject: [PATCH 10/10] Fill in missing array dimensions using the lower bound
+
+Use -fdec-add-missing-indexes to enable feature. Also enabled by fdec.
+---
+ gcc/fortran/lang.opt | 8 ++++++++
+ gcc/fortran/options.c | 1 +
+ gcc/fortran/resolve.c | 24 ++++++++++++++++++++++++
+ gcc/testsuite/gfortran.dg/array_6.f90 | 23 +++++++++++++++++++++++
+ gcc/testsuite/gfortran.dg/array_7.f90 | 23 +++++++++++++++++++++++
+ gcc/testsuite/gfortran.dg/array_8.f90 | 23 +++++++++++++++++++++++
+ 6 files changed, 102 insertions(+)
+ create mode 100644 gcc/testsuite/gfortran.dg/array_6.f90
+ create mode 100644 gcc/testsuite/gfortran.dg/array_7.f90
+ create mode 100644 gcc/testsuite/gfortran.dg/array_8.f90
+
+diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt
+index 019c798cf09..f27de88ea3f 100644
+--- a/gcc/fortran/lang.opt
++++ b/gcc/fortran/lang.opt
+@@ -281,6 +281,10 @@ Wmissing-include-dirs
+ Fortran
+ ; Documented in C/C++
+
++Wmissing-index
++Fortran Var(warn_missing_index) Warning LangEnabledBy(Fortran,Wall)
++Warn that the lower bound of a missing index will be used.
++
+ Wuse-without-only
+ Fortran Var(warn_use_without_only) Warning
+ Warn about USE statements that have no ONLY qualifier.
+@@ -460,6 +464,10 @@ fdec
+ Fortran Var(flag_dec)
+ Enable all DEC language extensions.
+
++fdec-add-missing-indexes
++Fortran Var(flag_dec_add_missing_indexes)
++Enable the addition of missing indexes using their lower bounds.
++
+ fdec-blank-format-item
+ Fortran Var(flag_dec_blank_format_item)
+ Enable the use of blank format items in format strings.
+diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
+index 050f56fdc25..c3b2822685d 100644
+--- a/gcc/fortran/options.c
++++ b/gcc/fortran/options.c
+@@ -84,6 +84,7 @@ set_dec_flags (int value)
+ SET_BITFLAG (flag_dec_non_logical_if, value, value);
+ SET_BITFLAG (flag_dec_promotion, value, value);
+ SET_BITFLAG (flag_dec_sequence, value, value);
++ SET_BITFLAG (flag_dec_add_missing_indexes, value, value);
+ }
+
+ /* Finalize DEC flags. */
+diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
+index fe7d0cc5944..0efeedab46e 100644
+--- a/gcc/fortran/resolve.c
++++ b/gcc/fortran/resolve.c
+@@ -4806,6 +4806,30 @@ compare_spec_to_ref (gfc_array_ref *ar)
+ if (ar->type == AR_FULL)
+ return true;
+
++ if (flag_dec_add_missing_indexes && as->rank > ar->dimen)
++ {
++ /* Add in the missing dimensions, assuming they are the lower bound
++ of that dimension if not specified. */
++ int j;
++ if (warn_missing_index)
++ {
++ gfc_warning (OPT_Wmissing_index, "Using the lower bound for "
++ "unspecified dimensions in array reference at %L",
++ &ar->where);
++ }
++ /* Other parts of the code iterate ar->start and ar->end from 0 to
++ ar->dimen, so it is safe to assume slots from ar->dimen upwards
++ are unused (i.e. there are no gaps; the specified indexes are
++ contiguous and start at zero. */
++ for(j = ar->dimen; j <= as->rank; j++)
++ {
++ ar->start[j] = gfc_copy_expr (as->lower[j]);
++ ar->end[j] = gfc_copy_expr (as->lower[j]);
++ ar->dimen_type[j] = DIMEN_ELEMENT;
++ }
++ ar->dimen = as->rank;
++ }
++
+ if (as->rank != ar->dimen)
+ {
+ gfc_error ("Rank mismatch in array reference at %L (%d/%d)",
+diff --git a/gcc/testsuite/gfortran.dg/array_6.f90 b/gcc/testsuite/gfortran.dg/array_6.f90
+new file mode 100644
+index 00000000000..5c26e18ab3e
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/array_6.f90
+@@ -0,0 +1,23 @@
++! { dg-do run }
++! { dg-options "-fdec -Wmissing-index" }!
++! Checks that under-specified arrays (referencing arrays with fewer
++! dimensions than the array spec) generates a warning.
++!
++! Contributed by Jim MacArthur
++! Updated by Mark Eggleston
++!
++
++program under_specified_array
++ integer chessboard(8,8)
++ integer chessboard3d(8,8,3:5)
++ chessboard(3,1) = 5
++ chessboard(3,2) = 55
++ chessboard3d(4,1,3) = 6
++ chessboard3d(4,1,4) = 66
++ chessboard3d(4,4,3) = 7
++ chessboard3d(4,4,4) = 77
++
++ if (chessboard(3).ne.5) stop 1 ! { dg-warning "Using the lower bound for unspecified dimensions in array reference" }
++ if (chessboard3d(4).ne.6) stop 2 ! { dg-warning "Using the lower bound for unspecified dimensions in array reference" }
++ if (chessboard3d(4,4).ne.7) stop 3 ! { dg-warning "Using the lower bound for unspecified dimensions in array reference" }
++end program
+diff --git a/gcc/testsuite/gfortran.dg/array_7.f90 b/gcc/testsuite/gfortran.dg/array_7.f90
+new file mode 100644
+index 00000000000..5588a5bd02d
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/array_7.f90
+@@ -0,0 +1,23 @@
++! { dg-do run }
++! { dg-options "-fdec-add-missing-indexes -Wmissing-index" }!
++! Checks that under-specified arrays (referencing arrays with fewer
++! dimensions than the array spec) generates a warning.
++!
++! Contributed by Jim MacArthur
++! Updated by Mark Eggleston
++!
++
++program under_specified_array
++ integer chessboard(8,8)
++ integer chessboard3d(8,8,3:5)
++ chessboard(3,1) = 5
++ chessboard(3,2) = 55
++ chessboard3d(4,1,3) = 6
++ chessboard3d(4,1,4) = 66
++ chessboard3d(4,4,3) = 7
++ chessboard3d(4,4,4) = 77
++
++ if (chessboard(3).ne.5) stop 1 ! { dg-warning "Using the lower bound for unspecified dimensions in array reference" }
++ if (chessboard3d(4).ne.6) stop 2 ! { dg-warning "Using the lower bound for unspecified dimensions in array reference" }
++ if (chessboard3d(4,4).ne.7) stop 3 ! { dg-warning "Using the lower bound for unspecified dimensions in array reference" }
++end program
+diff --git a/gcc/testsuite/gfortran.dg/array_8.f90 b/gcc/testsuite/gfortran.dg/array_8.f90
+new file mode 100644
+index 00000000000..f0d2ef5e37d
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/array_8.f90
+@@ -0,0 +1,23 @@
++! { dg-do compile }
++! { dg-options "-fdec -fno-dec-add-missing-indexes" }!
++! Checks that under-specified arrays (referencing arrays with fewer
++! dimensions than the array spec) generates a warning.
++!
++! Contributed by Jim MacArthur
++! Updated by Mark Eggleston
++!
++
++program under_specified_array
++ integer chessboard(8,8)
++ integer chessboard3d(8,8,3:5)
++ chessboard(3,1) = 5
++ chessboard(3,2) = 55
++ chessboard3d(4,1,3) = 6
++ chessboard3d(4,1,4) = 66
++ chessboard3d(4,4,3) = 7
++ chessboard3d(4,4,4) = 77
++
++ if (chessboard(3).ne.5) stop 1 ! { dg-error "Rank mismatch" }
++ if (chessboard3d(4).ne.6) stop 2 ! { dg-error "Rank mismatch" }
++ if (chessboard3d(4,4).ne.7) stop 3 ! { dg-error "Rank mismatch" }
++end program
+--
+2.27.0
+
diff --git a/gcc11-fortran-fdec-duplicates.patch b/gcc11-fortran-fdec-duplicates.patch
new file mode 100644
index 0000000..b5d1104
--- /dev/null
+++ b/gcc11-fortran-fdec-duplicates.patch
@@ -0,0 +1,215 @@
+From 23b1fcb104c666429451ffaf936f8da5fcd3d43a Mon Sep 17 00:00:00 2001
+From: Mark Eggleston
+Date: Fri, 22 Jan 2021 12:29:47 +0000
+Subject: [PATCH 01/10] Allow duplicate declarations.
+
+Enabled by -fdec-duplicates and -fdec.
+
+Some fixes by Jim MacArthur
+Addition of -fdec-duplicates by Mark Eggleston
+---
+ gcc/fortran/lang.opt | 4 ++++
+ gcc/fortran/options.c | 1 +
+ gcc/fortran/symbol.c | 21 +++++++++++++++++--
+ .../gfortran.dg/duplicate_type_4.f90 | 13 ++++++++++++
+ .../gfortran.dg/duplicate_type_5.f90 | 13 ++++++++++++
+ .../gfortran.dg/duplicate_type_6.f90 | 13 ++++++++++++
+ .../gfortran.dg/duplicate_type_7.f90 | 13 ++++++++++++
+ .../gfortran.dg/duplicate_type_8.f90 | 12 +++++++++++
+ .../gfortran.dg/duplicate_type_9.f90 | 12 +++++++++++
+ 9 files changed, 100 insertions(+), 2 deletions(-)
+ create mode 100644 gcc/testsuite/gfortran.dg/duplicate_type_4.f90
+ create mode 100644 gcc/testsuite/gfortran.dg/duplicate_type_5.f90
+ create mode 100644 gcc/testsuite/gfortran.dg/duplicate_type_6.f90
+ create mode 100644 gcc/testsuite/gfortran.dg/duplicate_type_7.f90
+ create mode 100644 gcc/testsuite/gfortran.dg/duplicate_type_8.f90
+ create mode 100644 gcc/testsuite/gfortran.dg/duplicate_type_9.f90
+
+diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt
+index 2b1977c523b..52bd522051e 100644
+--- a/gcc/fortran/lang.opt
++++ b/gcc/fortran/lang.opt
+@@ -469,6 +469,10 @@ Fortran Var(flag_dec_char_conversions)
+ Enable the use of character literals in assignments and data statements
+ for non-character variables.
+
++fdec-duplicates
++Fortran Var(flag_dec_duplicates)
++Allow varibles to be duplicated in the type specification matches.
++
+ fdec-include
+ Fortran Var(flag_dec_include)
+ Enable legacy parsing of INCLUDE as statement.
+diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
+index 3a0b98bf1ec..f19ba87f8a0 100644
+--- a/gcc/fortran/options.c
++++ b/gcc/fortran/options.c
+@@ -77,6 +77,7 @@ set_dec_flags (int value)
+ SET_BITFLAG (flag_dec_format_defaults, value, value);
+ SET_BITFLAG (flag_dec_blank_format_item, value, value);
+ SET_BITFLAG (flag_dec_char_conversions, value, value);
++ SET_BITFLAG (flag_dec_duplicates, value, value);
+ }
+
+ /* Finalize DEC flags. */
+diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
+index 3b988d1be22..9843175cc2a 100644
+--- a/gcc/fortran/symbol.c
++++ b/gcc/fortran/symbol.c
+@@ -1995,6 +1995,8 @@ gfc_add_type (gfc_symbol *sym, gfc_typespec *ts, locus *where)
+ if (sym->attr.result && type == BT_UNKNOWN && sym->ns->proc_name)
+ type = sym->ns->proc_name->ts.type;
+
++ flavor = sym->attr.flavor;
++
+ if (type != BT_UNKNOWN && !(sym->attr.function && sym->attr.implicit_type)
+ && !(gfc_state_stack->previous && gfc_state_stack->previous->previous
+ && gfc_state_stack->previous->previous->state == COMP_SUBMODULE)
+@@ -2007,6 +2009,23 @@ gfc_add_type (gfc_symbol *sym, gfc_typespec *ts, locus *where)
+ else if (sym->attr.function && sym->attr.result)
+ gfc_error ("Symbol %qs at %L already has basic type of %s",
+ sym->ns->proc_name->name, where, gfc_basic_typename (type));
++ else if (flag_dec_duplicates)
++ {
++ /* Ignore temporaries and class/procedure names */
++ if (sym->ts.type == BT_DERIVED || sym->ts.type == BT_CLASS
++ || sym->ts.type == BT_PROCEDURE)
++ return false;
++
++ if (gfc_compare_types (&sym->ts, ts)
++ && (flavor == FL_UNKNOWN || flavor == FL_VARIABLE
++ || flavor == FL_PROCEDURE))
++ {
++ return gfc_notify_std (GFC_STD_LEGACY,
++ "Symbol '%qs' at %L already has "
++ "basic type of %s", sym->name, where,
++ gfc_basic_typename (type));
++ }
++ }
+ else
+ gfc_error ("Symbol %qs at %L already has basic type of %s", sym->name,
+ where, gfc_basic_typename (type));
+@@ -2020,8 +2039,6 @@ gfc_add_type (gfc_symbol *sym, gfc_typespec *ts, locus *where)
+ return false;
+ }
+
+- flavor = sym->attr.flavor;
+-
+ if (flavor == FL_PROGRAM || flavor == FL_BLOCK_DATA || flavor == FL_MODULE
+ || flavor == FL_LABEL
+ || (flavor == FL_PROCEDURE && sym->attr.subroutine)
+diff --git a/gcc/testsuite/gfortran.dg/duplicate_type_4.f90 b/gcc/testsuite/gfortran.dg/duplicate_type_4.f90
+new file mode 100644
+index 00000000000..cdd29ea8846
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/duplicate_type_4.f90
+@@ -0,0 +1,13 @@
++! { dg-do compile }
++! { dg-options "-std=f95" }
++
++! PR fortran/30239
++! Check for errors when a symbol gets declared a type twice, even if it
++! is the same.
++
++INTEGER FUNCTION foo ()
++ IMPLICIT NONE
++ INTEGER :: x
++ INTEGER :: x ! { dg-error "basic type of" }
++ x = 42
++END FUNCTION foo
+diff --git a/gcc/testsuite/gfortran.dg/duplicate_type_5.f90 b/gcc/testsuite/gfortran.dg/duplicate_type_5.f90
+new file mode 100644
+index 00000000000..00f931809aa
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/duplicate_type_5.f90
+@@ -0,0 +1,13 @@
++! { dg-do run }
++! { dg-options "-fdec" }
++!
++! Test case contributed by Mark Eggleston
++!
++
++program test
++ implicit none
++ integer :: x
++ integer :: x
++ x = 42
++ if (x /= 42) stop 1
++end program test
+diff --git a/gcc/testsuite/gfortran.dg/duplicate_type_6.f90 b/gcc/testsuite/gfortran.dg/duplicate_type_6.f90
+new file mode 100644
+index 00000000000..f0df27e323c
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/duplicate_type_6.f90
+@@ -0,0 +1,13 @@
++! { dg-do run }
++! { dg-options "-std=legacy -fdec-duplicates" }
++!
++! Test case contributed by Mark Eggleston
++!
++
++program test
++ implicit none
++ integer :: x
++ integer :: x
++ x = 42
++ if (x /= 42) stop 1
++end program test
+diff --git a/gcc/testsuite/gfortran.dg/duplicate_type_7.f90 b/gcc/testsuite/gfortran.dg/duplicate_type_7.f90
+new file mode 100644
+index 00000000000..f32472ff586
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/duplicate_type_7.f90
+@@ -0,0 +1,13 @@
++! { dg-do run }
++! { dg-options "-fdec-duplicates" }
++!
++! Test case contributed by Mark Eggleston
++!
++
++program test
++ implicit none
++ integer :: x
++ integer :: x! { dg-warning "Legacy Extension" }
++ x = 42
++ if (x /= 42) stop 1
++end program test
+diff --git a/gcc/testsuite/gfortran.dg/duplicate_type_8.f90 b/gcc/testsuite/gfortran.dg/duplicate_type_8.f90
+new file mode 100644
+index 00000000000..23c94add179
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/duplicate_type_8.f90
+@@ -0,0 +1,12 @@
++! { dg-do compile }
++! { dg-options "-fdec -fno-dec-duplicates" }
++!
++! Test case contributed by Mark Eggleston
++!
++
++integer function foo ()
++ implicit none
++ integer :: x
++ integer :: x ! { dg-error "basic type of" }
++ x = 42
++end function foo
+diff --git a/gcc/testsuite/gfortran.dg/duplicate_type_9.f90 b/gcc/testsuite/gfortran.dg/duplicate_type_9.f90
+new file mode 100644
+index 00000000000..d5edee4d8ee
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/duplicate_type_9.f90
+@@ -0,0 +1,12 @@
++! { dg-do compile }
++! { dg-options "-fdec-duplicates -fno-dec-duplicates" }
++!
++! Test case contributed by Mark Eggleston
++!
++
++integer function foo ()
++ implicit none
++ integer :: x
++ integer :: x ! { dg-error "basic type of" }
++ x = 42
++end function foo
+--
+2.27.0
+
diff --git a/gcc11-fortran-fdec-ichar.patch b/gcc11-fortran-fdec-ichar.patch
new file mode 100644
index 0000000..e7b0522
--- /dev/null
+++ b/gcc11-fortran-fdec-ichar.patch
@@ -0,0 +1,78 @@
+From f883ac209b0feea860354cb4ef7ff06dc8063fab Mon Sep 17 00:00:00 2001
+From: Mark Eggleston
+Date: Fri, 22 Jan 2021 12:53:35 +0000
+Subject: [PATCH 03/10] Allow more than one character as argument to ICHAR
+
+Use -fdec to enable.
+---
+ gcc/fortran/check.c | 2 +-
+ gcc/fortran/simplify.c | 4 ++--
+ .../gfortran.dg/dec_ichar_with_string_1.f | 21 +++++++++++++++++++
+ 3 files changed, 24 insertions(+), 3 deletions(-)
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_ichar_with_string_1.f
+
+diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c
+index 82db8e4e1b2..623c1cc470e 100644
+--- a/gcc/fortran/check.c
++++ b/gcc/fortran/check.c
+@@ -3157,7 +3157,7 @@ gfc_check_ichar_iachar (gfc_expr *c, gfc_expr *kind)
+ else
+ return true;
+
+- if (i != 1)
++ if (i != 1 && !flag_dec)
+ {
+ gfc_error ("Argument of %s at %L must be of length one",
+ gfc_current_intrinsic, &c->where);
+diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c
+index 23317a2e2d9..9900572424f 100644
+--- a/gcc/fortran/simplify.c
++++ b/gcc/fortran/simplify.c
+@@ -3261,7 +3261,7 @@ gfc_simplify_iachar (gfc_expr *e, gfc_expr *kind)
+ if (e->expr_type != EXPR_CONSTANT)
+ return NULL;
+
+- if (e->value.character.length != 1)
++ if (e->value.character.length != 1 && !flag_dec)
+ {
+ gfc_error ("Argument of IACHAR at %L must be of length one", &e->where);
+ return &gfc_bad_expr;
+@@ -3459,7 +3459,7 @@ gfc_simplify_ichar (gfc_expr *e, gfc_expr *kind)
+ if (e->expr_type != EXPR_CONSTANT)
+ return NULL;
+
+- if (e->value.character.length != 1)
++ if (e->value.character.length != 1 && !flag_dec)
+ {
+ gfc_error ("Argument of ICHAR at %L must be of length one", &e->where);
+ return &gfc_bad_expr;
+diff --git a/gcc/testsuite/gfortran.dg/dec_ichar_with_string_1.f b/gcc/testsuite/gfortran.dg/dec_ichar_with_string_1.f
+new file mode 100644
+index 00000000000..85efccecc0f
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_ichar_with_string_1.f
+@@ -0,0 +1,21 @@
++! { dg-do run }
++! { dg-options "-fdec" }
++!
++! Test ICHAR and IACHAR with more than one character as argument
++!
++! Test case contributed by Jim MacArthur
++! Modified by Mark Eggleston
++!
++ PROGRAM ichar_more_than_one_character
++ CHARACTER*4 st/'Test'/
++ INTEGER i
++
++ i = ICHAR(st)
++ if (i.NE.84) STOP 1
++ i = IACHAR(st)
++ if (i.NE.84) STOP 2
++ i = ICHAR('Test')
++ if (i.NE.84) STOP 3
++ i = IACHAR('Test')
++ if (i.NE.84) STOP 4
++ END
+--
+2.27.0
+
diff --git a/gcc11-fortran-fdec-non-integer-index.patch b/gcc11-fortran-fdec-non-integer-index.patch
new file mode 100644
index 0000000..074df3b
--- /dev/null
+++ b/gcc11-fortran-fdec-non-integer-index.patch
@@ -0,0 +1,158 @@
+From 67aef262311d6a746786ee0f59748ccaa7e1e711 Mon Sep 17 00:00:00 2001
+From: Mark Eggleston
+Date: Fri, 22 Jan 2021 13:09:54 +0000
+Subject: [PATCH 04/10] Allow non-integer substring indexes
+
+Use -fdec-non-integer-index compiler flag to enable. Also enabled by -fdec.
+---
+ gcc/fortran/lang.opt | 4 ++++
+ gcc/fortran/options.c | 1 +
+ gcc/fortran/resolve.c | 20 +++++++++++++++++++
+ .../dec_not_integer_substring_indexes_1.f | 18 +++++++++++++++++
+ .../dec_not_integer_substring_indexes_2.f | 18 +++++++++++++++++
+ .../dec_not_integer_substring_indexes_3.f | 18 +++++++++++++++++
+ 6 files changed, 79 insertions(+)
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_not_integer_substring_indexes_1.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_not_integer_substring_indexes_2.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_not_integer_substring_indexes_3.f
+
+diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt
+index c4da248f07c..d527c106bd6 100644
+--- a/gcc/fortran/lang.opt
++++ b/gcc/fortran/lang.opt
+@@ -489,6 +489,10 @@ fdec-math
+ Fortran Var(flag_dec_math)
+ Enable legacy math intrinsics for compatibility.
+
++fdec-non-integer-index
++Fortran Var(flag_dec_non_integer_index)
++Enable support for non-integer substring indexes.
++
+ fdec-structure
+ Fortran Var(flag_dec_structure)
+ Enable support for DEC STRUCTURE/RECORD.
+diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
+index f19ba87f8a0..9a042f64881 100644
+--- a/gcc/fortran/options.c
++++ b/gcc/fortran/options.c
+@@ -78,6 +78,7 @@ set_dec_flags (int value)
+ SET_BITFLAG (flag_dec_blank_format_item, value, value);
+ SET_BITFLAG (flag_dec_char_conversions, value, value);
+ SET_BITFLAG (flag_dec_duplicates, value, value);
++ SET_BITFLAG (flag_dec_non_integer_index, value, value);
+ }
+
+ /* Finalize DEC flags. */
+diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
+index 4b90cb59902..bc0df0fdb99 100644
+--- a/gcc/fortran/resolve.c
++++ b/gcc/fortran/resolve.c
+@@ -5131,6 +5131,16 @@ gfc_resolve_substring (gfc_ref *ref, bool *equal_length)
+ if (!gfc_resolve_expr (ref->u.ss.start))
+ return false;
+
++ /* In legacy mode, allow non-integer string indexes by converting */
++ if (flag_dec_non_integer_index && ref->u.ss.start->ts.type != BT_INTEGER
++ && gfc_numeric_ts (&ref->u.ss.start->ts))
++ {
++ gfc_typespec t;
++ t.type = BT_INTEGER;
++ t.kind = ref->u.ss.start->ts.kind;
++ gfc_convert_type_warn (ref->u.ss.start, &t, 2, 1);
++ }
++
+ if (ref->u.ss.start->ts.type != BT_INTEGER)
+ {
+ gfc_error ("Substring start index at %L must be of type INTEGER",
+@@ -5160,6 +5170,16 @@ gfc_resolve_substring (gfc_ref *ref, bool *equal_length)
+ if (!gfc_resolve_expr (ref->u.ss.end))
+ return false;
+
++ /* Non-integer string index endings, as for start */
++ if (flag_dec_non_integer_index && ref->u.ss.end->ts.type != BT_INTEGER
++ && gfc_numeric_ts (&ref->u.ss.end->ts))
++ {
++ gfc_typespec t;
++ t.type = BT_INTEGER;
++ t.kind = ref->u.ss.end->ts.kind;
++ gfc_convert_type_warn (ref->u.ss.end, &t, 2, 1);
++ }
++
+ if (ref->u.ss.end->ts.type != BT_INTEGER)
+ {
+ gfc_error ("Substring end index at %L must be of type INTEGER",
+diff --git a/gcc/testsuite/gfortran.dg/dec_not_integer_substring_indexes_1.f b/gcc/testsuite/gfortran.dg/dec_not_integer_substring_indexes_1.f
+new file mode 100644
+index 00000000000..0be28abaa4b
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_not_integer_substring_indexes_1.f
+@@ -0,0 +1,18 @@
++! { dg-do run }
++! { dg-options "-fdec" }
++!
++! Test not integer substring indexes
++!
++! Test case contributed by Mark Eggleston
++!
++ PROGRAM not_integer_substring_indexes
++ CHARACTER*5 st/'Tests'/
++ REAL ir/1.0/
++ REAL ir2/4.0/
++
++ if (st(ir:4).ne.'Test') stop 1
++ if (st(1:ir2).ne.'Test') stop 2
++ if (st(1.0:4).ne.'Test') stop 3
++ if (st(1:4.0).ne.'Test') stop 4
++ if (st(2.5:4).ne.'est') stop 5
++ END
+diff --git a/gcc/testsuite/gfortran.dg/dec_not_integer_substring_indexes_2.f b/gcc/testsuite/gfortran.dg/dec_not_integer_substring_indexes_2.f
+new file mode 100644
+index 00000000000..3cf05296d0c
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_not_integer_substring_indexes_2.f
+@@ -0,0 +1,18 @@
++! { dg-do run }
++! { dg-options "-fdec-non-integer-index" }
++!
++! Test not integer substring indexes
++!
++! Test case contributed by Mark Eggleston
++!
++ PROGRAM not_integer_substring_indexes
++ CHARACTER*5 st/'Tests'/
++ REAL ir/1.0/
++ REAL ir2/4.0/
++
++ if (st(ir:4).ne.'Test') stop 1
++ if (st(1:ir2).ne.'Test') stop 2
++ if (st(1.0:4).ne.'Test') stop 3
++ if (st(1:4.0).ne.'Test') stop 4
++ if (st(2.5:4).ne.'est') stop 5
++ END
+diff --git a/gcc/testsuite/gfortran.dg/dec_not_integer_substring_indexes_3.f b/gcc/testsuite/gfortran.dg/dec_not_integer_substring_indexes_3.f
+new file mode 100644
+index 00000000000..703de995897
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_not_integer_substring_indexes_3.f
+@@ -0,0 +1,18 @@
++! { dg-do compile }
++! { dg-options "-fdec -fno-dec-non-integer-index" }
++!
++! Test not integer substring indexes
++!
++! Test case contributed by Mark Eggleston
++!
++ PROGRAM not_integer_substring_indexes
++ CHARACTER*5 st/'Tests'/
++ REAL ir/1.0/
++ REAL ir2/4.0/
++
++ if (st(ir:4).ne.'Test') stop 1 ! { dg-error "Substring start index" }
++ if (st(1:ir2).ne.'Test') stop 2 ! { dg-error "Substring end index" }
++ if (st(1.0:4).ne.'Test') stop 3 ! { dg-error "Substring start index" }
++ if (st(1:4.0).ne.'Test') stop 4 ! { dg-error "Substring end index" }
++ if (st(2.5:4).ne.'est') stop 5 ! { dg-error "Substring start index" }
++ END
+--
+2.27.0
+
diff --git a/gcc11-fortran-fdec-non-logical-if.patch b/gcc11-fortran-fdec-non-logical-if.patch
new file mode 100644
index 0000000..0133d23
--- /dev/null
+++ b/gcc11-fortran-fdec-non-logical-if.patch
@@ -0,0 +1,378 @@
+From cc87ddb841017bb0976b05091733609ee17d7f05 Mon Sep 17 00:00:00 2001
+From: Mark Eggleston
+Date: Fri, 22 Jan 2021 13:15:17 +0000
+Subject: [PATCH 07/10] Allow non-logical expressions in IF statements
+
+Use -fdec-non-logical-if to enable feature. Also enabled using -fdec.
+---
+ gcc/fortran/lang.opt | 4 ++
+ gcc/fortran/options.c | 1 +
+ gcc/fortran/resolve.c | 60 ++++++++++++++++---
+ ...gical_expressions_if_statements_blocks_1.f | 25 ++++++++
+ ...gical_expressions_if_statements_blocks_2.f | 25 ++++++++
+ ...gical_expressions_if_statements_blocks_3.f | 25 ++++++++
+ ...gical_expressions_if_statements_blocks_4.f | 45 ++++++++++++++
+ ...gical_expressions_if_statements_blocks_5.f | 45 ++++++++++++++
+ ...gical_expressions_if_statements_blocks_6.f | 45 ++++++++++++++
+ 9 files changed, 266 insertions(+), 9 deletions(-)
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_logical_expressions_if_statements_blocks_1.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_logical_expressions_if_statements_blocks_2.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_logical_expressions_if_statements_blocks_3.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_logical_expressions_if_statements_blocks_4.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_logical_expressions_if_statements_blocks_5.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_logical_expressions_if_statements_blocks_6.f
+
+diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt
+index 4a269ebb22d..d886c2f33ed 100644
+--- a/gcc/fortran/lang.opt
++++ b/gcc/fortran/lang.opt
+@@ -497,6 +497,10 @@ fdec-override-kind
+ Fortran Var(flag_dec_override_kind)
+ Enable support for per variable kind specification.
+
++fdec-non-logical-if
++Fortran Var(flag_dec_non_logical_if)
++Enable support for non-logical expressions in if statements.
++
+ fdec-old-init
+ Fortran Var(flag_dec_old_init)
+ Enable support for old style initializers in derived types.
+diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
+index edbab483b36..a946c86790a 100644
+--- a/gcc/fortran/options.c
++++ b/gcc/fortran/options.c
+@@ -81,6 +81,7 @@ set_dec_flags (int value)
+ SET_BITFLAG (flag_dec_non_integer_index, value, value);
+ SET_BITFLAG (flag_dec_old_init, value, value);
+ SET_BITFLAG (flag_dec_override_kind, value, value);
++ SET_BITFLAG (flag_dec_non_logical_if, value, value);
+ }
+
+ /* Finalize DEC flags. */
+diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
+index bc0df0fdb99..07dd039f3bf 100644
+--- a/gcc/fortran/resolve.c
++++ b/gcc/fortran/resolve.c
+@@ -10789,10 +10789,31 @@ gfc_resolve_blocks (gfc_code *b, gfc_namespace *ns)
+ switch (b->op)
+ {
+ case EXEC_IF:
+- if (t && b->expr1 != NULL
+- && (b->expr1->ts.type != BT_LOGICAL || b->expr1->rank != 0))
+- gfc_error ("IF clause at %L requires a scalar LOGICAL expression",
+- &b->expr1->where);
++ if (t && b->expr1 != NULL)
++ {
++ if (flag_dec_non_logical_if && b->expr1->ts.type != BT_LOGICAL)
++ {
++ gfc_expr* cast;
++ cast = gfc_ne (b->expr1,
++ gfc_get_int_expr (1, &gfc_current_locus, 0),
++ INTRINSIC_NE);
++ if (cast == NULL)
++ gfc_internal_error ("gfc_resolve_blocks(): Failed to cast "
++ "to LOGICAL in IF");
++ b->expr1 = cast;
++ if (warn_conversion_extra)
++ {
++ gfc_warning (OPT_Wconversion_extra, "Non-LOGICAL type in"
++ " IF statement condition %L will be true if"
++ " it evaluates to nonzero",
++ &b->expr1->where);
++ }
++ }
++
++ if ((b->expr1->ts.type != BT_LOGICAL || b->expr1->rank != 0))
++ gfc_error ("IF clause at %L requires a scalar LOGICAL "
++ "expression", &b->expr1->where);
++ }
+ break;
+
+ case EXEC_WHERE:
+@@ -12093,11 +12114,32 @@ start:
+ break;
+
+ case EXEC_IF:
+- if (t && code->expr1 != NULL
+- && (code->expr1->ts.type != BT_LOGICAL
+- || code->expr1->rank != 0))
+- gfc_error ("IF clause at %L requires a scalar LOGICAL expression",
+- &code->expr1->where);
++ if (t && code->expr1 != NULL)
++ {
++ if (flag_dec_non_logical_if
++ && code->expr1->ts.type != BT_LOGICAL)
++ {
++ gfc_expr* cast;
++ cast = gfc_ne (code->expr1,
++ gfc_get_int_expr (1, &gfc_current_locus, 0),
++ INTRINSIC_NE);
++ if (cast == NULL)
++ gfc_internal_error ("gfc_resolve_code(): Failed to cast "
++ "to LOGICAL in IF");
++ code->expr1 = cast;
++ if (warn_conversion_extra)
++ {
++ gfc_warning (OPT_Wconversion_extra, "Non-LOGICAL type in"
++ " IF statement condition %L will be true if"
++ " it evaluates to nonzero",
++ &code->expr1->where);
++ }
++ }
++
++ if (code->expr1->ts.type != BT_LOGICAL || code->expr1->rank != 0)
++ gfc_error ("IF clause at %L requires a scalar LOGICAL "
++ "expression", &code->expr1->where);
++ }
+ break;
+
+ case EXEC_CALL:
+diff --git a/gcc/testsuite/gfortran.dg/dec_logical_expressions_if_statements_blocks_1.f b/gcc/testsuite/gfortran.dg/dec_logical_expressions_if_statements_blocks_1.f
+new file mode 100644
+index 00000000000..0101db893ca
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_logical_expressions_if_statements_blocks_1.f
+@@ -0,0 +1,25 @@
++! { dg-do run }
++! { dg-options "-fdec -Wconversion-extra" }
++!
++! Allow logical expressions in if statements and blocks
++!
++! Contributed by Francisco Redondo Marchena
++! and Jeff Law
++! Modified by Mark Eggleston
++!
++ PROGRAM logical_exp_if_st_bl
++ INTEGER ipos/1/
++ INTEGER ineg/0/
++
++ ! Test non logical variables
++ if (ineg) STOP 1 ! { dg-warning "if it evaluates to nonzero" }
++ if (0) STOP 2 ! { dg-warning "if it evaluates to nonzero" }
++
++ ! Test non logical expressions in if statements
++ if (MOD(ipos, 1)) STOP 3 ! { dg-warning "if it evaluates to nonzero" }
++
++ ! Test non logical expressions in if blocks
++ if (MOD(2 * ipos, 2)) then ! { dg-warning "if it evaluates to nonzero" }
++ STOP 4
++ endif
++ END
+diff --git a/gcc/testsuite/gfortran.dg/dec_logical_expressions_if_statements_blocks_2.f b/gcc/testsuite/gfortran.dg/dec_logical_expressions_if_statements_blocks_2.f
+new file mode 100644
+index 00000000000..876f4e09508
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_logical_expressions_if_statements_blocks_2.f
+@@ -0,0 +1,25 @@
++! { dg-do run }
++! { dg-options "-fdec-non-logical-if -Wconversion-extra" }
++!
++! Allow logical expressions in if statements and blocks
++!
++! Contributed by Francisco Redondo Marchena
++! and Jeff Law
++! Modified by Mark Eggleston
++!
++ PROGRAM logical_exp_if_st_bl
++ INTEGER ipos/1/
++ INTEGER ineg/0/
++
++ ! Test non logical variables
++ if (ineg) STOP 1 ! { dg-warning "if it evaluates to nonzero" }
++ if (0) STOP 2 ! { dg-warning "if it evaluates to nonzero" }
++
++ ! Test non logical expressions in if statements
++ if (MOD(ipos, 1)) STOP 3 ! { dg-warning "if it evaluates to nonzero" }
++
++ ! Test non logical expressions in if blocks
++ if (MOD(2 * ipos, 2)) then ! { dg-warning "if it evaluates to nonzero" }
++ STOP 4
++ endif
++ END
+diff --git a/gcc/testsuite/gfortran.dg/dec_logical_expressions_if_statements_blocks_3.f b/gcc/testsuite/gfortran.dg/dec_logical_expressions_if_statements_blocks_3.f
+new file mode 100644
+index 00000000000..35cb4c51b8d
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_logical_expressions_if_statements_blocks_3.f
+@@ -0,0 +1,25 @@
++! { dg-do compile }
++! { dg-options "-fdec -fno-dec-non-logical-if" }
++!
++! Allow logical expressions in if statements and blocks
++!
++! Contributed by Francisco Redondo Marchena
++! and Jeff Law
++! Modified by Mark Eggleston
++!
++ PROGRAM logical_exp_if_st_bl
++ INTEGER ipos/1/
++ INTEGER ineg/0/
++
++ ! Test non logical variables
++ if (ineg) STOP 1 ! { dg-error "IF clause at" }
++ if (0) STOP 2 ! { dg-error "IF clause at" }
++
++ ! Test non logical expressions in if statements
++ if (MOD(ipos, 1)) STOP 3 ! { dg-error "IF clause at" }
++
++ ! Test non logical expressions in if blocks
++ if (MOD(2 * ipos, 2)) then ! { dg-error "IF clause at" }
++ STOP 4
++ endif
++ END
+diff --git a/gcc/testsuite/gfortran.dg/dec_logical_expressions_if_statements_blocks_4.f b/gcc/testsuite/gfortran.dg/dec_logical_expressions_if_statements_blocks_4.f
+new file mode 100644
+index 00000000000..7b60b60827f
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_logical_expressions_if_statements_blocks_4.f
+@@ -0,0 +1,45 @@
++! { dg-do run }
++! { dg-options "-fdec -Wconversion-extra" }
++!
++! Contributed by Francisco Redondo Marchena
++! and Jeff Law
++! Modified by Mark Eggleston
++!
++ function othersub1()
++ integer*4 othersub1
++ othersub1 = 9
++ end
++
++ function othersub2()
++ integer*4 othersub2
++ othersub2 = 0
++ end
++
++ program MAIN
++ integer*4 othersub1
++ integer*4 othersub2
++ integer a /1/
++ integer b /2/
++
++ if (othersub1()) then ! { dg-warning "if it evaluates to nonzero" }
++ write(*,*) "OK"
++ else
++ stop 1
++ end if
++ if (othersub2()) then ! { dg-warning "if it evaluates to nonzero" }
++ stop 2
++ else
++ write(*,*) "OK"
++ end if
++ if (a-b) then ! { dg-warning "if it evaluates to nonzero" }
++ write(*,*) "OK"
++ else
++ stop 3
++ end if
++ if (b-(a+1)) then ! { dg-warning "if it evaluates to nonzero" }
++ stop 3
++ else
++ write(*,*) "OK"
++ end if
++ end
++
+diff --git a/gcc/testsuite/gfortran.dg/dec_logical_expressions_if_statements_blocks_5.f b/gcc/testsuite/gfortran.dg/dec_logical_expressions_if_statements_blocks_5.f
+new file mode 100644
+index 00000000000..80336f48ca1
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_logical_expressions_if_statements_blocks_5.f
+@@ -0,0 +1,45 @@
++! { dg-do run }
++! { dg-options "-fdec-non-logical-if -Wconversion-extra" }
++!
++! Contributed by Francisco Redondo Marchena
++! and Jeff Law
++! Modified by Mark Eggleston
++!
++ function othersub1()
++ integer*4 othersub1
++ othersub1 = 9
++ end
++
++ function othersub2()
++ integer*4 othersub2
++ othersub2 = 0
++ end
++
++ program MAIN
++ integer*4 othersub1
++ integer*4 othersub2
++ integer a /1/
++ integer b /2/
++
++ if (othersub1()) then ! { dg-warning "Non-LOGICAL type in IF statement" }
++ write(*,*) "OK"
++ else
++ stop 1
++ end if
++ if (othersub2()) then ! { dg-warning "Non-LOGICAL type in IF statement" }
++ stop 2
++ else
++ write(*,*) "OK"
++ end if
++ if (a-b) then ! { dg-warning "Non-LOGICAL type in IF statement" }
++ write(*,*) "OK"
++ else
++ stop 3
++ end if
++ if (b-(a+1)) then ! { dg-warning "Non-LOGICAL type in IF statement" }
++ stop 3
++ else
++ write(*,*) "OK"
++ end if
++ end
++
+diff --git a/gcc/testsuite/gfortran.dg/dec_logical_expressions_if_statements_blocks_6.f b/gcc/testsuite/gfortran.dg/dec_logical_expressions_if_statements_blocks_6.f
+new file mode 100644
+index 00000000000..e1125ca717a
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_logical_expressions_if_statements_blocks_6.f
+@@ -0,0 +1,45 @@
++! { dg-do compile }
++! { dg-options "-fdec -fno-dec-non-logical-if" }
++!
++! Contributed by Francisco Redondo Marchena
++! and Jeff Law
++! Modified by Mark Eggleston
++!
++ function othersub1()
++ integer*4 othersub1
++ othersub1 = 9
++ end
++
++ function othersub2()
++ integer*4 othersub2
++ othersub2 = 0
++ end
++
++ program MAIN
++ integer*4 othersub1
++ integer*4 othersub2
++ integer a /1/
++ integer b /2/
++
++ if (othersub1()) then ! { dg-error "IF clause at" }
++ write(*,*) "OK"
++ else
++ stop 1
++ end if
++ if (othersub2()) then ! { dg-error "IF clause at" }
++ stop 2
++ else
++ write(*,*) "OK"
++ end if
++ if (a-b) then ! { dg-error "IF clause at" }
++ write(*,*) "OK"
++ else
++ stop 3
++ end if
++ if (b-(a+1)) then ! { dg-error "IF clause at" }
++ stop 3
++ else
++ write(*,*) "OK"
++ end if
++ end
++
+--
+2.27.0
+
diff --git a/gcc11-fortran-fdec-old-init.patch b/gcc11-fortran-fdec-old-init.patch
new file mode 100644
index 0000000..8554f2e
--- /dev/null
+++ b/gcc11-fortran-fdec-old-init.patch
@@ -0,0 +1,185 @@
+From 8bcc0f85ed1718c0dd9033ad4a34df181aabaffe Mon Sep 17 00:00:00 2001
+From: Mark Eggleston
+Date: Fri, 22 Jan 2021 13:11:06 +0000
+Subject: [PATCH 05/10] Allow old-style initializers in derived types
+
+This allows simple declarations in derived types and structures, such as:
+ LOGICAL*1 NIL /0/
+Only single value expressions are allowed at the moment.
+
+Use -fdec-old-init to enable. Also enabled by -fdec.
+---
+ gcc/fortran/decl.c | 27 +++++++++++++++----
+ gcc/fortran/lang.opt | 4 +++
+ gcc/fortran/options.c | 1 +
+ ...ec_derived_types_initialised_old_style_1.f | 25 +++++++++++++++++
+ ...ec_derived_types_initialised_old_style_2.f | 25 +++++++++++++++++
+ ...ec_derived_types_initialised_old_style_3.f | 26 ++++++++++++++++++
+ 6 files changed, 103 insertions(+), 5 deletions(-)
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_derived_types_initialised_old_style_1.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_derived_types_initialised_old_style_2.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_derived_types_initialised_old_style_3.f
+
+diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
+index 723915822f3..5c8c1b7981b 100644
+--- a/gcc/fortran/decl.c
++++ b/gcc/fortran/decl.c
+@@ -2827,12 +2827,29 @@ variable_decl (int elem)
+ but not components of derived types. */
+ else if (gfc_current_state () == COMP_DERIVED)
+ {
+- gfc_error ("Invalid old style initialization for derived type "
+- "component at %C");
+- m = MATCH_ERROR;
+- goto cleanup;
++ if (flag_dec_old_init)
++ {
++ /* Attempt to match an old-style initializer which is a simple
++ integer or character expression; this will not work with
++ multiple values. */
++ m = gfc_match_init_expr (&initializer);
++ if (m == MATCH_ERROR)
++ goto cleanup;
++ else if (m == MATCH_YES)
++ {
++ m = gfc_match ("/");
++ if (m != MATCH_YES)
++ goto cleanup;
++ }
++ }
++ else
++ {
++ gfc_error ("Invalid old style initialization for derived type "
++ "component at %C");
++ m = MATCH_ERROR;
++ goto cleanup;
++ }
+ }
+-
+ /* For structure components, read the initializer as a special
+ expression and let the rest of this function apply the initializer
+ as usual. */
+diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt
+index d527c106bd6..25cc948699b 100644
+--- a/gcc/fortran/lang.opt
++++ b/gcc/fortran/lang.opt
+@@ -493,6 +493,10 @@ fdec-non-integer-index
+ Fortran Var(flag_dec_non_integer_index)
+ Enable support for non-integer substring indexes.
+
++fdec-old-init
++Fortran Var(flag_dec_old_init)
++Enable support for old style initializers in derived types.
++
+ fdec-structure
+ Fortran Var(flag_dec_structure)
+ Enable support for DEC STRUCTURE/RECORD.
+diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
+index 9a042f64881..d6bd36c3a8a 100644
+--- a/gcc/fortran/options.c
++++ b/gcc/fortran/options.c
+@@ -79,6 +79,7 @@ set_dec_flags (int value)
+ SET_BITFLAG (flag_dec_char_conversions, value, value);
+ SET_BITFLAG (flag_dec_duplicates, value, value);
+ SET_BITFLAG (flag_dec_non_integer_index, value, value);
++ SET_BITFLAG (flag_dec_old_init, value, value);
+ }
+
+ /* Finalize DEC flags. */
+diff --git a/gcc/testsuite/gfortran.dg/dec_derived_types_initialised_old_style_1.f b/gcc/testsuite/gfortran.dg/dec_derived_types_initialised_old_style_1.f
+new file mode 100644
+index 00000000000..eac4f9bfcf1
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_derived_types_initialised_old_style_1.f
+@@ -0,0 +1,25 @@
++! { dg-do run }
++! { dg-options "-fdec" }
++!
++! Test old style initializers in derived types
++!
++! Contributed by Jim MacArthur
++! Modified by Mark Eggleston
++!
++ PROGRAM spec_in_var
++ TYPE STRUCT1
++ INTEGER*4 ID /8/
++ INTEGER*4 TYPE /5/
++ INTEGER*8 DEFVAL /0/
++ CHARACTER*(5) NAME /'tests'/
++ LOGICAL*1 NIL /0/
++ END TYPE STRUCT1
++
++ TYPE (STRUCT1) SINST
++
++ IF(SINST%ID.NE.8) STOP 1
++ IF(SINST%TYPE.NE.5) STOP 2
++ IF(SINST%DEFVAL.NE.0) STOP 3
++ IF(SINST%NAME.NE.'tests') STOP 4
++ IF(SINST%NIL) STOP 5
++ END
+diff --git a/gcc/testsuite/gfortran.dg/dec_derived_types_initialised_old_style_2.f b/gcc/testsuite/gfortran.dg/dec_derived_types_initialised_old_style_2.f
+new file mode 100644
+index 00000000000..d904c8b2974
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_derived_types_initialised_old_style_2.f
+@@ -0,0 +1,25 @@
++! { dg-do run }
++! { dg-options "-std=legacy -fdec-old-init" }
++!
++! Test old style initializers in derived types
++!
++! Contributed by Jim MacArthur
++! Modified by Mark Eggleston
++!
++ PROGRAM spec_in_var
++ TYPE STRUCT1
++ INTEGER*4 ID /8/
++ INTEGER*4 TYPE /5/
++ INTEGER*8 DEFVAL /0/
++ CHARACTER*(5) NAME /'tests'/
++ LOGICAL*1 NIL /0/
++ END TYPE STRUCT1
++
++ TYPE (STRUCT1) SINST
++
++ IF(SINST%ID.NE.8) STOP 1
++ IF(SINST%TYPE.NE.5) STOP 2
++ IF(SINST%DEFVAL.NE.0) STOP 3
++ IF(SINST%NAME.NE.'tests') STOP 4
++ IF(SINST%NIL) STOP 5
++ END
+diff --git a/gcc/testsuite/gfortran.dg/dec_derived_types_initialised_old_style_3.f b/gcc/testsuite/gfortran.dg/dec_derived_types_initialised_old_style_3.f
+new file mode 100644
+index 00000000000..58c2b4b66cf
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_derived_types_initialised_old_style_3.f
+@@ -0,0 +1,26 @@
++! { dg-do compile }
++! { dg-options "-std=legacy -fdec -fno-dec-old-init" }
++!
++! Test old style initializers in derived types
++!
++! Contributed by Jim MacArthur
++! Modified by Mark Eggleston
++!
++
++ PROGRAM spec_in_var
++ TYPE STRUCT1
++ INTEGER*4 ID /8/ ! { dg-error "Invalid old style initialization" }
++ INTEGER*4 TYPE /5/ ! { dg-error "Invalid old style initialization" }
++ INTEGER*8 DEFVAL /0/ ! { dg-error "Invalid old style initialization" }
++ CHARACTER*(5) NAME /'tests'/ ! { dg-error "Invalid old style initialization" }
++ LOGICAL*1 NIL /0/ ! { dg-error "Invalid old style initialization" }
++ END TYPE STRUCT1
++
++ TYPE (STRUCT1) SINST
++
++ IF(SINST%ID.NE.8) STOP 1 ! { dg-error "'id' at \\(1\\) is not a member" }
++ IF(SINST%TYPE.NE.5) STOP 2 ! { dg-error "'type' at \\(1\\) is not a member" }
++ IF(SINST%DEFVAL.NE.0) STOP 3 ! { dg-error "'defval' at \\(1\\) is not a member" }
++ IF(SINST%NAME.NE.'tests') STOP 4 ! { dg-error "'name' at \\(1\\) is not a member" }
++ IF(SINST%NIL) STOP 5 ! { dg-error "'nil' at \\(1\\) is not a member" }
++ END
+--
+2.27.0
+
diff --git a/gcc11-fortran-fdec-override-kind.patch b/gcc11-fortran-fdec-override-kind.patch
new file mode 100644
index 0000000..e1c7b83
--- /dev/null
+++ b/gcc11-fortran-fdec-override-kind.patch
@@ -0,0 +1,588 @@
+From 786869fd62813e80da9b6545a295d53c36275c19 Mon Sep 17 00:00:00 2001
+From: Mark Eggleston
+Date: Fri, 22 Jan 2021 13:12:14 +0000
+Subject: [PATCH 06/10] Allow string length and kind to be specified on a per
+ variable basis.
+
+This allows kind/length to be mixed with array specification in
+declarations.
+
+e.g.
+
+ INTEGER*4 x*2, y*8
+ CHARACTER names*20(10)
+ REAL v(100)*8, vv*4(50)
+
+The per-variable size overrides the kind or length specified for the type.
+
+Use -fdec-override-kind to enable. Also enabled by -fdec.
+
+Note: this feature is a merger of two previously separate features.
+
+Now accepts named constants as kind parameters:
+
+ INTEGER A
+ PARAMETER (A=2)
+ INTEGER B*(A)
+
+Contributed by Mark Eggleston
+
+Now rejects invalid kind parameters and prints error messages:
+
+ INTEGER X*3
+
+caused an internal compiler error.
+
+Contributed by Mark Eggleston
+---
+ gcc/fortran/decl.c | 156 ++++++++++++++----
+ gcc/fortran/lang.opt | 4 +
+ gcc/fortran/options.c | 1 +
+ .../dec_mixed_char_array_declaration_1.f | 13 ++
+ .../dec_mixed_char_array_declaration_2.f | 13 ++
+ .../dec_mixed_char_array_declaration_3.f | 13 ++
+ .../gfortran.dg/dec_spec_in_variable_1.f | 31 ++++
+ .../gfortran.dg/dec_spec_in_variable_2.f | 31 ++++
+ .../gfortran.dg/dec_spec_in_variable_3.f | 31 ++++
+ .../gfortran.dg/dec_spec_in_variable_4.f | 14 ++
+ .../gfortran.dg/dec_spec_in_variable_5.f | 19 +++
+ .../gfortran.dg/dec_spec_in_variable_6.f | 19 +++
+ .../gfortran.dg/dec_spec_in_variable_7.f | 15 ++
+ .../gfortran.dg/dec_spec_in_variable_8.f | 14 ++
+ 14 files changed, 340 insertions(+), 34 deletions(-)
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_mixed_char_array_declaration_1.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_mixed_char_array_declaration_2.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_mixed_char_array_declaration_3.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_spec_in_variable_1.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_spec_in_variable_2.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_spec_in_variable_3.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_spec_in_variable_4.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_spec_in_variable_5.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_spec_in_variable_6.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_spec_in_variable_7.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_spec_in_variable_8.f
+
+diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
+index 5c8c1b7981b..f7dc9d8263d 100644
+--- a/gcc/fortran/decl.c
++++ b/gcc/fortran/decl.c
+@@ -1213,6 +1213,54 @@ syntax:
+ return MATCH_ERROR;
+ }
+
++/* This matches the nonstandard kind given after a variable name, like:
++ INTEGER x*2, y*4
++ The per-variable kind will override any kind given in the type
++ declaration.
++*/
++
++static match
++match_per_symbol_kind (int *length)
++{
++ match m;
++ gfc_expr *expr = NULL;
++
++ m = gfc_match_char ('*');
++ if (m != MATCH_YES)
++ return m;
++
++ m = gfc_match_small_literal_int (length, NULL);
++ if (m == MATCH_YES || m == MATCH_ERROR)
++ return m;
++
++ if (gfc_match_char ('(') == MATCH_NO)
++ return MATCH_ERROR;
++
++ m = gfc_match_expr (&expr);
++ if (m == MATCH_YES)
++ {
++ m = MATCH_ERROR; // Assume error
++ if (gfc_expr_check_typed (expr, gfc_current_ns, false))
++ {
++ if ((expr->expr_type == EXPR_CONSTANT)
++ && (expr->ts.type == BT_INTEGER))
++ {
++ *length = mpz_get_si(expr->value.integer);
++ m = MATCH_YES;
++ }
++ }
++
++ if (m == MATCH_YES)
++ {
++ if (gfc_match_char (')') == MATCH_NO)
++ m = MATCH_ERROR;
++ }
++ }
++
++ if (expr != NULL)
++ gfc_free_expr (expr);
++ return m;
++}
+
+ /* Special subroutine for finding a symbol. Check if the name is found
+ in the current name space. If not, and we're compiling a function or
+@@ -2443,6 +2491,35 @@ check_function_name (char *name)
+ }
+
+
++static match
++match_character_length_clause (gfc_charlen **cl, bool *cl_deferred, int elem)
++{
++ gfc_expr* char_len;
++ char_len = NULL;
++
++ match m = match_char_length (&char_len, cl_deferred, false);
++ if (m == MATCH_YES)
++ {
++ *cl = gfc_new_charlen (gfc_current_ns, NULL);
++ (*cl)->length = char_len;
++ }
++ else if (m == MATCH_NO)
++ {
++ if (elem > 1
++ && (current_ts.u.cl->length == NULL
++ || current_ts.u.cl->length->expr_type != EXPR_CONSTANT))
++ {
++ *cl = gfc_new_charlen (gfc_current_ns, NULL);
++ (*cl)->length = gfc_copy_expr (current_ts.u.cl->length);
++ }
++ else
++ *cl = current_ts.u.cl;
++
++ *cl_deferred = current_ts.deferred;
++ }
++ return m;
++}
++
+ /* Match a variable name with an optional initializer. When this
+ subroutine is called, a variable is expected to be parsed next.
+ Depending on what is happening at the moment, updates either the
+@@ -2453,7 +2530,7 @@ variable_decl (int elem)
+ {
+ char name[GFC_MAX_SYMBOL_LEN + 1];
+ static unsigned int fill_id = 0;
+- gfc_expr *initializer, *char_len;
++ gfc_expr *initializer;
+ gfc_array_spec *as;
+ gfc_array_spec *cp_as; /* Extra copy for Cray Pointees. */
+ gfc_charlen *cl;
+@@ -2462,11 +2539,15 @@ variable_decl (int elem)
+ match m;
+ bool t;
+ gfc_symbol *sym;
++ match cl_match;
++ match kind_match;
++ int overridden_kind;
+ char c;
+
+ initializer = NULL;
+ as = NULL;
+ cp_as = NULL;
++ kind_match = MATCH_NO;
+
+ /* When we get here, we've just matched a list of attributes and
+ maybe a type and a double colon. The next thing we expect to see
+@@ -2519,6 +2600,28 @@ variable_decl (int elem)
+
+ var_locus = gfc_current_locus;
+
++
++ cl = NULL;
++ cl_deferred = false;
++ cl_match = MATCH_NO;
++
++ /* Check for a character length clause before an array clause */
++ if (flag_dec_override_kind)
++ {
++ if (current_ts.type == BT_CHARACTER)
++ {
++ cl_match = match_character_length_clause (&cl, &cl_deferred, elem);
++ if (cl_match == MATCH_ERROR)
++ goto cleanup;
++ }
++ else
++ {
++ kind_match = match_per_symbol_kind (&overridden_kind);
++ if (kind_match == MATCH_ERROR)
++ goto cleanup;
++ }
++ }
++
+ /* Now we could see the optional array spec. or character length. */
+ m = gfc_match_array_spec (&as, true, true);
+ if (m == MATCH_ERROR)
+@@ -2667,40 +2770,12 @@ variable_decl (int elem)
+ }
+ }
+
+- char_len = NULL;
+- cl = NULL;
+- cl_deferred = false;
+-
+- if (current_ts.type == BT_CHARACTER)
++ /* Second chance for a character length clause */
++ if (cl_match == MATCH_NO && current_ts.type == BT_CHARACTER)
+ {
+- switch (match_char_length (&char_len, &cl_deferred, false))
+- {
+- case MATCH_YES:
+- cl = gfc_new_charlen (gfc_current_ns, NULL);
+-
+- cl->length = char_len;
+- break;
+-
+- /* Non-constant lengths need to be copied after the first
+- element. Also copy assumed lengths. */
+- case MATCH_NO:
+- if (elem > 1
+- && (current_ts.u.cl->length == NULL
+- || current_ts.u.cl->length->expr_type != EXPR_CONSTANT))
+- {
+- cl = gfc_new_charlen (gfc_current_ns, NULL);
+- cl->length = gfc_copy_expr (current_ts.u.cl->length);
+- }
+- else
+- cl = current_ts.u.cl;
+-
+- cl_deferred = current_ts.deferred;
+-
+- break;
+-
+- case MATCH_ERROR:
+- goto cleanup;
+- }
++ m = match_character_length_clause (&cl, &cl_deferred, elem);
++ if (m == MATCH_ERROR)
++ goto cleanup;
+ }
+
+ /* The dummy arguments and result of the abreviated form of MODULE
+@@ -2802,6 +2877,19 @@ variable_decl (int elem)
+ goto cleanup;
+ }
+
++ if (kind_match == MATCH_YES)
++ {
++ gfc_find_symbol (name, gfc_current_ns, 1, &sym);
++ /* sym *must* be found at this point */
++ sym->ts.kind = overridden_kind;
++ if (gfc_validate_kind (sym->ts.type, sym->ts.kind, true) < 0)
++ {
++ gfc_error ("Kind %d not supported for type %s at %C",
++ sym->ts.kind, gfc_basic_typename (sym->ts.type));
++ return MATCH_ERROR;
++ }
++ }
++
+ if (!check_function_name (name))
+ {
+ m = MATCH_ERROR;
+diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt
+index 25cc948699b..4a269ebb22d 100644
+--- a/gcc/fortran/lang.opt
++++ b/gcc/fortran/lang.opt
+@@ -493,6 +493,10 @@ fdec-non-integer-index
+ Fortran Var(flag_dec_non_integer_index)
+ Enable support for non-integer substring indexes.
+
++fdec-override-kind
++Fortran Var(flag_dec_override_kind)
++Enable support for per variable kind specification.
++
+ fdec-old-init
+ Fortran Var(flag_dec_old_init)
+ Enable support for old style initializers in derived types.
+diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
+index d6bd36c3a8a..edbab483b36 100644
+--- a/gcc/fortran/options.c
++++ b/gcc/fortran/options.c
+@@ -80,6 +80,7 @@ set_dec_flags (int value)
+ SET_BITFLAG (flag_dec_duplicates, value, value);
+ SET_BITFLAG (flag_dec_non_integer_index, value, value);
+ SET_BITFLAG (flag_dec_old_init, value, value);
++ SET_BITFLAG (flag_dec_override_kind, value, value);
+ }
+
+ /* Finalize DEC flags. */
+diff --git a/gcc/testsuite/gfortran.dg/dec_mixed_char_array_declaration_1.f b/gcc/testsuite/gfortran.dg/dec_mixed_char_array_declaration_1.f
+new file mode 100644
+index 00000000000..706ea4112a4
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_mixed_char_array_declaration_1.f
+@@ -0,0 +1,13 @@
++! { dg-do run }
++! { dg-options "-fdec" }
++!
++! Test character declaration with mixed string length and array specification
++!
++! Contributed by Jim MacArthur
++! Modified by Mark Eggleston
++!
++ PROGRAM character_declaration
++ CHARACTER ASPEC_SLENGTH*2 (5) /'01','02','03','04','05'/
++ CHARACTER SLENGTH_ASPEC(5)*2 /'01','02','03','04','05'/
++ if (ASPEC_SLENGTH(3).NE.SLENGTH_ASPEC(3)) STOP 1
++ END
+diff --git a/gcc/testsuite/gfortran.dg/dec_mixed_char_array_declaration_2.f b/gcc/testsuite/gfortran.dg/dec_mixed_char_array_declaration_2.f
+new file mode 100644
+index 00000000000..26d2acf01de
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_mixed_char_array_declaration_2.f
+@@ -0,0 +1,13 @@
++! { dg-do run }
++! { dg-options "-fdec-override-kind" }
++!
++! Test character declaration with mixed string length and array specification
++!
++! Contributed by Jim MacArthur
++! Modified by Mark Eggleston
++!
++ PROGRAM character_declaration
++ CHARACTER ASPEC_SLENGTH*2 (5) /'01','02','03','04','05'/
++ CHARACTER SLENGTH_ASPEC(5)*2 /'01','02','03','04','05'/
++ if (ASPEC_SLENGTH(3).NE.SLENGTH_ASPEC(3)) STOP 1
++ END
+diff --git a/gcc/testsuite/gfortran.dg/dec_mixed_char_array_declaration_3.f b/gcc/testsuite/gfortran.dg/dec_mixed_char_array_declaration_3.f
+new file mode 100644
+index 00000000000..76e4f0bdb93
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_mixed_char_array_declaration_3.f
+@@ -0,0 +1,13 @@
++! { dg-do compile }
++! { dg-options "-fdec-override-kind -fno-dec-override-kind" }
++!
++! Test character declaration with mixed string length and array specification
++!
++! Contributed by Jim MacArthur
++! Modified by Mark Eggleston
++!
++ PROGRAM character_declaration
++ CHARACTER ASPEC_SLENGTH*2 (5) /'01','02','03','04','05'/ ! { dg-error "Syntax error" }
++ CHARACTER SLENGTH_ASPEC(5)*2 /'01','02','03','04','05'/
++ if (ASPEC_SLENGTH(3).NE.SLENGTH_ASPEC(3)) STOP 1 ! { dg-error " Operands of comparison operator" }
++ END
+diff --git a/gcc/testsuite/gfortran.dg/dec_spec_in_variable_1.f b/gcc/testsuite/gfortran.dg/dec_spec_in_variable_1.f
+new file mode 100644
+index 00000000000..edd0f5874b7
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_spec_in_variable_1.f
+@@ -0,0 +1,31 @@
++! { dg-do run }
++! { dg-options "-fdec" }
++!
++! Test kind specification in variable not in type
++!
++! Contributed by Mark Eggleston
++!
++ program spec_in_var
++ integer*8 ai*1, bi*4, ci
++ real*4 ar*4, br*8, cr
++
++ ai = 1
++ ar = 1.0
++ bi = 2
++ br = 2.0
++ ci = 3
++ cr = 3.0
++
++ if (ai .ne. 1) stop 1
++ if (abs(ar - 1.0) > 1.0D-6) stop 2
++ if (bi .ne. 2) stop 3
++ if (abs(br - 2.0) > 1.0D-6) stop 4
++ if (ci .ne. 3) stop 5
++ if (abs(cr - 3.0) > 1.0D-6) stop 6
++ if (kind(ai) .ne. 1) stop 7
++ if (kind(ar) .ne. 4) stop 8
++ if (kind(bi) .ne. 4) stop 9
++ if (kind(br) .ne. 8) stop 10
++ if (kind(ci) .ne. 8) stop 11
++ if (kind(cr) .ne. 4) stop 12
++ end
+diff --git a/gcc/testsuite/gfortran.dg/dec_spec_in_variable_2.f b/gcc/testsuite/gfortran.dg/dec_spec_in_variable_2.f
+new file mode 100644
+index 00000000000..bfaba584dbb
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_spec_in_variable_2.f
+@@ -0,0 +1,31 @@
++! { dg-do run }
++! { dg-options "-fdec-override-kind" }
++!
++! Test kind specification in variable not in type
++!
++! Contributed by Mark Eggleston
++!
++ program spec_in_var
++ integer*8 ai*1, bi*4, ci
++ real*4 ar*4, br*8, cr
++
++ ai = 1
++ ar = 1.0
++ bi = 2
++ br = 2.0
++ ci = 3
++ cr = 3.0
++
++ if (ai .ne. 1) stop 1
++ if (abs(ar - 1.0) > 1.0D-6) stop 2
++ if (bi .ne. 2) stop 3
++ if (abs(br - 2.0) > 1.0D-6) stop 4
++ if (ci .ne. 3) stop 5
++ if (abs(cr - 3.0) > 1.0D-6) stop 6
++ if (kind(ai) .ne. 1) stop 7
++ if (kind(ar) .ne. 4) stop 8
++ if (kind(bi) .ne. 4) stop 9
++ if (kind(br) .ne. 8) stop 10
++ if (kind(ci) .ne. 8) stop 11
++ if (kind(cr) .ne. 4) stop 12
++ end
+diff --git a/gcc/testsuite/gfortran.dg/dec_spec_in_variable_3.f b/gcc/testsuite/gfortran.dg/dec_spec_in_variable_3.f
+new file mode 100644
+index 00000000000..5ff434e7466
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_spec_in_variable_3.f
+@@ -0,0 +1,31 @@
++! { dg-do compile }
++! { dg-options "-fdec -fno-dec-override-kind" }
++!
++! Test kind specification in variable not in type
++!
++! Contributed by Mark Eggleston
++!
++ program spec_in_var
++ integer*8 ai*1, bi*4, ci ! { dg-error "Syntax error" }
++ real*4 ar*4, br*8, cr ! { dg-error "Syntax error" }
++
++ ai = 1
++ ar = 1.0
++ bi = 2
++ br = 2.0
++ ci = 3
++ cr = 3.0
++
++ if (ai .ne. 1) stop 1
++ if (abs(ar - 1.0) > 1.0D-6) stop 2
++ if (bi .ne. 2) stop 3
++ if (abs(br - 2.0) > 1.0D-6) stop 4
++ if (ci .ne. 3) stop 5
++ if (abs(cr - 3.0) > 1.0D-6) stop 6
++ if (kind(ai) .ne. 1) stop 7
++ if (kind(ar) .ne. 4) stop 8
++ if (kind(bi) .ne. 4) stop 9
++ if (kind(br) .ne. 8) stop 10
++ if (kind(ci) .ne. 8) stop 11
++ if (kind(cr) .ne. 4) stop 12
++ end
+diff --git a/gcc/testsuite/gfortran.dg/dec_spec_in_variable_4.f b/gcc/testsuite/gfortran.dg/dec_spec_in_variable_4.f
+new file mode 100644
+index 00000000000..c01980e8b9d
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_spec_in_variable_4.f
+@@ -0,0 +1,14 @@
++! { dg-do compile }
++!
++! Test kind specification in variable not in type. The per variable
++! kind specification is not enabled so these should fail
++!
++! Contributed by Mark Eggleston
++!
++ program spec_in_var
++ integer a
++ parameter(a=2)
++ integer b*(a) ! { dg-error "Syntax error" }
++ real c*(8) ! { dg-error "Syntax error" }
++ logical d*1_1 ! { dg-error "Syntax error" }
++ end
+diff --git a/gcc/testsuite/gfortran.dg/dec_spec_in_variable_5.f b/gcc/testsuite/gfortran.dg/dec_spec_in_variable_5.f
+new file mode 100644
+index 00000000000..e2f39da3f4f
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_spec_in_variable_5.f
+@@ -0,0 +1,19 @@
++! { dg-do run }
++! { dg-options "-fdec-override-kind" }
++!
++! Test kind specification in variable not in type
++!
++! Contributed by Mark Eggleston
++!
++ program spec_in_var
++ integer a
++ parameter(a=2)
++ integer b*(a)
++ real c*(8)
++ logical d*(1_1)
++ character e*(a)
++ if (kind(b).ne.2) stop 1
++ if (kind(c).ne.8) stop 2
++ if (kind(d).ne.1) stop 3
++ if (len(e).ne.2) stop 4
++ end
+diff --git a/gcc/testsuite/gfortran.dg/dec_spec_in_variable_6.f b/gcc/testsuite/gfortran.dg/dec_spec_in_variable_6.f
+new file mode 100644
+index 00000000000..569747874e3
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_spec_in_variable_6.f
+@@ -0,0 +1,19 @@
++! { dg-do run }
++! { dg-options "-fdec" }
++!
++! Test kind specification in variable not in type
++!
++! Contributed by Mark Eggleston
++!
++ program spec_in_var
++ integer a
++ parameter(a=2)
++ integer b*(a)
++ real c*(8)
++ logical d*(1_1)
++ character e*(a)
++ if (kind(b).ne.2) stop 1
++ if (kind(c).ne.8) stop 2
++ if (kind(d).ne.1) stop 3
++ if (len(e).ne.2) stop 4
++ end
+diff --git a/gcc/testsuite/gfortran.dg/dec_spec_in_variable_7.f b/gcc/testsuite/gfortran.dg/dec_spec_in_variable_7.f
+new file mode 100644
+index 00000000000..b975bfd15c5
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_spec_in_variable_7.f
+@@ -0,0 +1,15 @@
++! { dg-do compile }
++! { dg-options "-fdec -fno-dec-override-kind" }
++!
++! Test kind specification in variable not in type as the per variable
++! kind specification is not enables these should fail
++!
++! Contributed by Mark Eggleston
++!
++ program spec_in_var
++ integer a
++ parameter(a=2)
++ integer b*(a) ! { dg-error "Syntax error" }
++ real c*(8) ! { dg-error "Syntax error" }
++ logical d*1_1 ! { dg-error "Syntax error" }
++ end
+diff --git a/gcc/testsuite/gfortran.dg/dec_spec_in_variable_8.f b/gcc/testsuite/gfortran.dg/dec_spec_in_variable_8.f
+new file mode 100644
+index 00000000000..85732e0bd85
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_spec_in_variable_8.f
+@@ -0,0 +1,14 @@
++! { dg-do compile }
++! { dg-options "-fdec" }
++!
++! Check that invalid kind values are rejected.
++!
++! Contributed by Mark Eggleston
++!
++ program spec_in_var
++ integer a
++ parameter(a=3)
++ integer b*(a) ! { dg-error "Kind 3 not supported" }
++ real c*(78) ! { dg-error "Kind 78 not supported" }
++ logical d*(*) ! { dg-error "Invalid character" }
++ end
+--
+2.27.0
+
diff --git a/gcc11-fortran-fdec-promotion.patch b/gcc11-fortran-fdec-promotion.patch
new file mode 100644
index 0000000..8643405
--- /dev/null
+++ b/gcc11-fortran-fdec-promotion.patch
@@ -0,0 +1,2093 @@
+From 7a27318818e359a277f2fa5f7dc3932d0fb950f5 Mon Sep 17 00:00:00 2001
+From: Mark Eggleston
+Date: Fri, 22 Jan 2021 14:58:07 +0000
+Subject: [PATCH 08/10] Support type promotion in calls to intrinsics
+
+Use -fdec-promotion or -fdec to enable this feature.
+
+Merged 2 commits: worked on by Ben Brewer ,
+Francisco Redondo Marchena and
+Jeff Law
+
+Re-worked by Mark Eggleston
+---
+ gcc/fortran/check.c | 71 +++++-
+ gcc/fortran/intrinsic.c | 5 +
+ gcc/fortran/iresolve.c | 91 ++++---
+ gcc/fortran/lang.opt | 4 +
+ gcc/fortran/options.c | 1 +
+ gcc/fortran/simplify.c | 240 ++++++++++++++----
+ ...trinsic_int_real_array_const_promotion_1.f | 18 ++
+ ...trinsic_int_real_array_const_promotion_2.f | 18 ++
+ ...trinsic_int_real_array_const_promotion_3.f | 18 ++
+ ...dec_intrinsic_int_real_const_promotion_1.f | 90 +++++++
+ ...dec_intrinsic_int_real_const_promotion_2.f | 90 +++++++
+ ...dec_intrinsic_int_real_const_promotion_3.f | 92 +++++++
+ .../dec_intrinsic_int_real_promotion_1.f | 130 ++++++++++
+ .../dec_intrinsic_int_real_promotion_2.f | 130 ++++++++++
+ .../dec_intrinsic_int_real_promotion_3.f | 130 ++++++++++
+ .../dec_intrinsic_int_real_promotion_4.f | 118 +++++++++
+ .../dec_intrinsic_int_real_promotion_5.f | 118 +++++++++
+ .../dec_intrinsic_int_real_promotion_6.f | 118 +++++++++
+ .../dec_intrinsic_int_real_promotion_7.f | 118 +++++++++
+ .../gfortran.dg/dec_kind_promotion-1.f | 40 +++
+ .../gfortran.dg/dec_kind_promotion-2.f | 40 +++
+ .../gfortran.dg/dec_kind_promotion-3.f | 39 +++
+ 22 files changed, 1639 insertions(+), 80 deletions(-)
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_array_const_promotion_1.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_array_const_promotion_2.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_array_const_promotion_3.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_const_promotion_1.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_const_promotion_2.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_const_promotion_3.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_promotion_1.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_promotion_2.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_promotion_3.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_promotion_4.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_promotion_5.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_promotion_6.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_promotion_7.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_kind_promotion-1.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_kind_promotion-2.f
+ create mode 100644 gcc/testsuite/gfortran.dg/dec_kind_promotion-3.f
+
+diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c
+index 623c1cc470e..e20a834a860 100644
+--- a/gcc/fortran/check.c
++++ b/gcc/fortran/check.c
+@@ -1396,12 +1396,40 @@ gfc_check_allocated (gfc_expr *array)
+ }
+
+
++/* Check function where both arguments must be real or integer
++ and warn if they are different types. */
++
++bool
++check_int_real_promotion (gfc_expr *a, gfc_expr *b)
++{
++ gfc_expr *i;
++
++ if (!int_or_real_check (a, 0))
++ return false;
++
++ if (!int_or_real_check (b, 1))
++ return false;
++
++ if (a->ts.type != b->ts.type)
++ {
++ i = (a->ts.type != BT_REAL ? a : b);
++ gfc_warning_now (OPT_Wconversion, "Conversion from INTEGER to REAL "
++ "at %L might lose precision", &i->where);
++ }
++
++ return true;
++}
++
++
+ /* Common check function where the first argument must be real or
+ integer and the second argument must be the same as the first. */
+
+ bool
+ gfc_check_a_p (gfc_expr *a, gfc_expr *p)
+ {
++ if (flag_dec_promotion)
++ return check_int_real_promotion (a, p);
++
+ if (!int_or_real_check (a, 0))
+ return false;
+
+@@ -3724,6 +3752,41 @@ check_rest (bt type, int kind, gfc_actual_arglist *arglist)
+ }
+
+
++/* Check function where all arguments of an argument list must be real
++ or integer. */
++
++static bool
++check_rest_int_real (gfc_actual_arglist *arglist)
++{
++ gfc_actual_arglist *arg, *tmp;
++ gfc_expr *x;
++ int m, n;
++
++ if (!min_max_args (arglist))
++ return false;
++
++ for (arg = arglist, n=1; arg; arg = arg->next, n++)
++ {
++ x = arg->expr;
++ if (x->ts.type != BT_INTEGER && x->ts.type != BT_REAL)
++ {
++ gfc_error ("% argument of %qs intrinsic at %L must be "
++ "INTEGER or REAL", n, gfc_current_intrinsic, &x->where);
++ return false;
++ }
++
++ for (tmp = arglist, m=1; tmp != arg; tmp = tmp->next, m++)
++ if (!gfc_check_conformance (tmp->expr, x,
++ "arguments 'a%d' and 'a%d' for "
++ "intrinsic '%s'", m, n,
++ gfc_current_intrinsic))
++ return false;
++ }
++
++ return true;
++}
++
++
+ bool
+ gfc_check_min_max (gfc_actual_arglist *arg)
+ {
+@@ -3748,7 +3811,10 @@ gfc_check_min_max (gfc_actual_arglist *arg)
+ return false;
+ }
+
+- return check_rest (x->ts.type, x->ts.kind, arg);
++ if (flag_dec_promotion && x->ts.type != BT_CHARACTER)
++ return check_rest_int_real (arg);
++ else
++ return check_rest (x->ts.type, x->ts.kind, arg);
+ }
+
+
+@@ -5121,6 +5187,9 @@ gfc_check_shift (gfc_expr *i, gfc_expr *shift)
+ bool
+ gfc_check_sign (gfc_expr *a, gfc_expr *b)
+ {
++ if (flag_dec_promotion)
++ return check_int_real_promotion (a, b);
++
+ if (!int_or_real_check (a, 0))
+ return false;
+
+diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c
+index e68eff8bdbb..81b3a24c2be 100644
+--- a/gcc/fortran/intrinsic.c
++++ b/gcc/fortran/intrinsic.c
+@@ -4467,6 +4467,11 @@ check_arglist (gfc_actual_arglist **ap, gfc_intrinsic_sym *sym,
+ if (ts.kind == 0)
+ ts.kind = actual->expr->ts.kind;
+
++ /* If kind promotion is allowed don't check for kind if it is smaller */
++ if (flag_dec_promotion && ts.type == BT_INTEGER)
++ if (actual->expr->ts.kind < ts.kind)
++ ts.kind = actual->expr->ts.kind;
++
+ if (!gfc_compare_types (&ts, &actual->expr->ts))
+ {
+ if (error_flag)
+diff --git a/gcc/fortran/iresolve.c b/gcc/fortran/iresolve.c
+index e17fe45f080..b9cdaff2499 100644
+--- a/gcc/fortran/iresolve.c
++++ b/gcc/fortran/iresolve.c
+@@ -817,19 +817,22 @@ gfc_resolve_dble (gfc_expr *f, gfc_expr *a)
+ void
+ gfc_resolve_dim (gfc_expr *f, gfc_expr *a, gfc_expr *p)
+ {
+- f->ts.type = a->ts.type;
+ if (p != NULL)
+- f->ts.kind = gfc_kind_max (a,p);
+- else
+- f->ts.kind = a->ts.kind;
+-
+- if (p != NULL && a->ts.kind != p->ts.kind)
+ {
+- if (a->ts.kind == gfc_kind_max (a,p))
+- gfc_convert_type (p, &a->ts, 2);
++ f->ts.kind = gfc_kind_max (a,p);
++ if (a->ts.type == BT_REAL || p->ts.type == BT_REAL)
++ f->ts.type = BT_REAL;
+ else
+- gfc_convert_type (a, &p->ts, 2);
++ f->ts.type = BT_INTEGER;
++
++ if (a->ts.kind != f->ts.kind || a->ts.type != f->ts.type)
++ gfc_convert_type (a, &f->ts, 2);
++
++ if (p->ts.kind != f->ts.kind || p->ts.type != f->ts.type)
++ gfc_convert_type (p, &f->ts, 2);
+ }
++ else
++ f->ts = a->ts;
+
+ f->value.function.name
+ = gfc_get_string ("__dim_%c%d", gfc_type_letter (f->ts.type), f->ts.kind);
+@@ -1606,14 +1609,17 @@ gfc_resolve_minmax (const char *name, gfc_expr *f, gfc_actual_arglist *args)
+ /* Find the largest type kind. */
+ for (a = args->next; a; a = a->next)
+ {
++ if (a->expr-> ts.type == BT_REAL)
++ f->ts.type = BT_REAL;
++
+ if (a->expr->ts.kind > f->ts.kind)
+ f->ts.kind = a->expr->ts.kind;
+ }
+
+- /* Convert all parameters to the required kind. */
++ /* Convert all parameters to the required type and/or kind. */
+ for (a = args; a; a = a->next)
+ {
+- if (a->expr->ts.kind != f->ts.kind)
++ if (a->expr->ts.type != f->ts.type || a->expr->ts.kind != f->ts.kind)
+ gfc_convert_type (a->expr, &f->ts, 2);
+ }
+
+@@ -2106,19 +2112,22 @@ gfc_resolve_minval (gfc_expr *f, gfc_expr *array, gfc_expr *dim,
+ void
+ gfc_resolve_mod (gfc_expr *f, gfc_expr *a, gfc_expr *p)
+ {
+- f->ts.type = a->ts.type;
+ if (p != NULL)
+- f->ts.kind = gfc_kind_max (a,p);
+- else
+- f->ts.kind = a->ts.kind;
+-
+- if (p != NULL && a->ts.kind != p->ts.kind)
+ {
+- if (a->ts.kind == gfc_kind_max (a,p))
+- gfc_convert_type (p, &a->ts, 2);
++ f->ts.kind = gfc_kind_max (a,p);
++ if (a->ts.type == BT_REAL || p->ts.type == BT_REAL)
++ f->ts.type = BT_REAL;
+ else
+- gfc_convert_type (a, &p->ts, 2);
++ f->ts.type = BT_INTEGER;
++
++ if (a->ts.kind != f->ts.kind || a->ts.type != f->ts.type)
++ gfc_convert_type (a, &f->ts, 2);
++
++ if (p->ts.kind != f->ts.kind || p->ts.type != f->ts.type)
++ gfc_convert_type (p, &f->ts, 2);
+ }
++ else
++ f->ts = a->ts;
+
+ f->value.function.name
+ = gfc_get_string ("__mod_%c%d", gfc_type_letter (f->ts.type), f->ts.kind);
+@@ -2128,19 +2137,22 @@ gfc_resolve_mod (gfc_expr *f, gfc_expr *a, gfc_expr *p)
+ void
+ gfc_resolve_modulo (gfc_expr *f, gfc_expr *a, gfc_expr *p)
+ {
+- f->ts.type = a->ts.type;
+ if (p != NULL)
+- f->ts.kind = gfc_kind_max (a,p);
+- else
+- f->ts.kind = a->ts.kind;
+-
+- if (p != NULL && a->ts.kind != p->ts.kind)
+ {
+- if (a->ts.kind == gfc_kind_max (a,p))
+- gfc_convert_type (p, &a->ts, 2);
++ f->ts.kind = gfc_kind_max (a,p);
++ if (a->ts.type == BT_REAL || p->ts.type == BT_REAL)
++ f->ts.type = BT_REAL;
+ else
+- gfc_convert_type (a, &p->ts, 2);
++ f->ts.type = BT_INTEGER;
++
++ if (a->ts.kind != f->ts.kind || a->ts.type != f->ts.type)
++ gfc_convert_type (a, &f->ts, 2);
++
++ if (p->ts.kind != f->ts.kind || p->ts.type != f->ts.type)
++ gfc_convert_type (p, &f->ts, 2);
+ }
++ else
++ f->ts = a->ts;
+
+ f->value.function.name
+ = gfc_get_string ("__modulo_%c%d", gfc_type_letter (f->ts.type),
+@@ -2515,9 +2527,26 @@ gfc_resolve_shift (gfc_expr *f, gfc_expr *i, gfc_expr *shift ATTRIBUTE_UNUSED)
+
+
+ void
+-gfc_resolve_sign (gfc_expr *f, gfc_expr *a, gfc_expr *b ATTRIBUTE_UNUSED)
++gfc_resolve_sign (gfc_expr *f, gfc_expr *a, gfc_expr *b)
+ {
+- f->ts = a->ts;
++ if (b != NULL)
++ {
++ f->ts.kind = gfc_kind_max (a, b);
++ if (a->ts.type == BT_REAL || b->ts.type == BT_REAL)
++ f->ts.type = BT_REAL;
++ else
++ f->ts.type = BT_INTEGER;
++
++ if (a->ts.kind != f->ts.kind || a->ts.type != f->ts.type)
++ gfc_convert_type (a, &f->ts, 2);
++
++ if (b->ts.kind != f->ts.kind || b->ts.type != f->ts.type)
++ gfc_convert_type (b, &f->ts, 2);
++ }
++ else
++ {
++ f->ts = a->ts;
++ }
+ f->value.function.name
+ = gfc_get_string ("__sign_%c%d", gfc_type_letter (a->ts.type), a->ts.kind);
+ }
+diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt
+index d886c2f33ed..4ca2f93f2df 100644
+--- a/gcc/fortran/lang.opt
++++ b/gcc/fortran/lang.opt
+@@ -505,6 +505,10 @@ fdec-old-init
+ Fortran Var(flag_dec_old_init)
+ Enable support for old style initializers in derived types.
+
++fdec-promotion
++Fortran Var(flag_dec_promotion)
++Add support for type promotion in intrinsic arguments
++
+ fdec-structure
+ Fortran Var(flag_dec_structure)
+ Enable support for DEC STRUCTURE/RECORD.
+diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
+index a946c86790a..15079c7e95a 100644
+--- a/gcc/fortran/options.c
++++ b/gcc/fortran/options.c
+@@ -82,6 +82,7 @@ set_dec_flags (int value)
+ SET_BITFLAG (flag_dec_old_init, value, value);
+ SET_BITFLAG (flag_dec_override_kind, value, value);
+ SET_BITFLAG (flag_dec_non_logical_if, value, value);
++ SET_BITFLAG (flag_dec_promotion, value, value);
+ }
+
+ /* Finalize DEC flags. */
+diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c
+index 9900572424f..3419e06fec2 100644
+--- a/gcc/fortran/simplify.c
++++ b/gcc/fortran/simplify.c
+@@ -2333,39 +2333,79 @@ gfc_simplify_digits (gfc_expr *x)
+ }
+
+
++/* Simplify function which sets the floating-point value of ar from
++ the value of a independently if a is integer of real. */
++
++static void
++simplify_int_real_promotion (const gfc_expr *a, const gfc_expr *b, mpfr_t *ar)
++{
++ if (a->ts.type == BT_REAL)
++ {
++ mpfr_init2 (*ar, (a->ts.kind * 8));
++ mpfr_set (*ar, a->value.real, GFC_RND_MODE);
++ }
++ else
++ {
++ mpfr_init2 (*ar, (b->ts.kind * 8));
++ mpfr_set_z (*ar, a->value.integer, GFC_RND_MODE);
++ }
++}
++
++
++/* Simplify function which promotes a and b arguments from integer to real if
++ required in ar and br floating-point values. This function returns true if
++ a or b are reals and false otherwise. */
++
++static bool
++simplify_int_real_promotion2 (const gfc_expr *a, const gfc_expr *b, mpfr_t *ar,
++ mpfr_t *br)
++{
++ if (a->ts.type != BT_REAL && b->ts.type != BT_REAL)
++ return false;
++
++ simplify_int_real_promotion (a, b, ar);
++ simplify_int_real_promotion (b, a, br);
++
++ return true;
++}
++
++
+ gfc_expr *
+ gfc_simplify_dim (gfc_expr *x, gfc_expr *y)
+ {
+ gfc_expr *result;
+ int kind;
+
++ mpfr_t xr;
++ mpfr_t yr;
++
+ if (x->expr_type != EXPR_CONSTANT || y->expr_type != EXPR_CONSTANT)
+ return NULL;
+
+- kind = x->ts.kind > y->ts.kind ? x->ts.kind : y->ts.kind;
+- result = gfc_get_constant_expr (x->ts.type, kind, &x->where);
+-
+- switch (x->ts.type)
++ if ((x->ts.type != BT_REAL && x->ts.type != BT_INTEGER)
++ || (y->ts.type != BT_REAL && y->ts.type != BT_INTEGER))
+ {
+- case BT_INTEGER:
+- if (mpz_cmp (x->value.integer, y->value.integer) > 0)
+- mpz_sub (result->value.integer, x->value.integer, y->value.integer);
+- else
+- mpz_set_ui (result->value.integer, 0);
+-
+- break;
+-
+- case BT_REAL:
+- if (mpfr_cmp (x->value.real, y->value.real) > 0)
+- mpfr_sub (result->value.real, x->value.real, y->value.real,
+- GFC_RND_MODE);
+- else
+- mpfr_set_ui (result->value.real, 0, GFC_RND_MODE);
++ gfc_internal_error ("gfc_simplify_dim(): Bad arguments");
++ return NULL;
++ }
+
+- break;
++ kind = x->ts.kind > y->ts.kind ? x->ts.kind : y->ts.kind;
+
+- default:
+- gfc_internal_error ("gfc_simplify_dim(): Bad type");
++ if (simplify_int_real_promotion2 (x, y, &xr, &yr))
++ {
++ result = gfc_get_constant_expr (BT_REAL, kind, &x->where);
++ if (mpfr_cmp (xr, yr) > 0)
++ mpfr_sub (result->value.real, xr, yr, GFC_RND_MODE);
++ else
++ mpfr_set_ui (result->value.real, 0, GFC_RND_MODE);
++ }
++ else
++ {
++ result = gfc_get_constant_expr (BT_INTEGER, kind, &x->where);
++ if (mpz_cmp (x->value.integer, y->value.integer) > 0)
++ mpz_sub (result->value.integer, x->value.integer, y->value.integer);
++ else
++ mpz_set_ui (result->value.integer, 0);
+ }
+
+ return range_check (result, "DIM");
+@@ -4953,6 +4993,76 @@ min_max_choose (gfc_expr *arg, gfc_expr *extremum, int sign, bool back_val)
+ {
+ int ret;
+
++ mpfr_t *arp;
++ mpfr_t *erp;
++ mpfr_t ar;
++ mpfr_t er;
++
++ if (arg->ts.type != extremum->ts.type)
++ {
++ if (arg->ts.type == BT_REAL)
++ {
++ arp = &arg->value.real;
++ }
++ else
++ {
++ mpfr_init2 (ar, (arg->ts.kind * 8));
++ mpfr_set_z (ar, arg->value.integer, GFC_RND_MODE);
++ arp = &ar;
++ }
++
++ if (extremum->ts.type == BT_REAL)
++ {
++ erp = &extremum->value.real;
++ }
++ else
++ {
++ mpfr_init2 (er, (extremum->ts.kind * 8));
++ mpfr_set_z (er, extremum->value.integer, GFC_RND_MODE);
++ erp = &er;
++ }
++
++ if (mpfr_nan_p (*erp))
++ {
++ ret = 1;
++ extremum->ts.type = arg->ts.type;
++ extremum->ts.kind = arg->ts.kind;
++ if (arg->ts.type == BT_INTEGER)
++ {
++ mpz_init2 (extremum->value.integer, (arg->ts.kind * 8));
++ mpz_set (extremum->value.integer, arg->value.integer);
++ }
++ else
++ {
++ mpfr_init2 (extremum->value.real, (arg->ts.kind * 8));
++ mpfr_set (extremum->value.real, *arp, GFC_RND_MODE);
++ }
++ }
++ else if (mpfr_nan_p (*arp))
++ ret = -1;
++ else
++ {
++ ret = mpfr_cmp (*arp, *erp) * sign;
++ if (ret > 0)
++ {
++ extremum->ts.type = arg->ts.type;
++ extremum->ts.kind = arg->ts.kind;
++ if (arg->ts.type == BT_INTEGER)
++ {
++ mpz_init2 (extremum->value.integer, (arg->ts.kind * 8));
++ mpz_set (extremum->value.integer, arg->value.integer);
++ }
++ else
++ {
++ mpfr_init2 (extremum->value.real, (arg->ts.kind * 8));
++ mpfr_set (extremum->value.real, *arp, GFC_RND_MODE);
++ }
++ }
++ }
++
++ return ret;
++ }
++
+ switch (arg->ts.type)
+ {
+ case BT_INTEGER:
+@@ -5912,7 +6022,9 @@ gfc_simplify_mod (gfc_expr *a, gfc_expr *p)
+ gfc_expr *result;
+ int kind;
+
+- /* First check p. */
++ mpfr_t ar;
++ mpfr_t pr;
++
+ if (p->expr_type != EXPR_CONSTANT)
+ return NULL;
+
+@@ -5942,16 +6054,24 @@ gfc_simplify_mod (gfc_expr *a, gfc_expr *p)
+ if (a->expr_type != EXPR_CONSTANT)
+ return NULL;
+
++ if (a->ts.type != BT_REAL && a->ts.type != BT_INTEGER)
++ {
++ gfc_internal_error ("gfc_simplify_mod(): Bad arguments");
++ return NULL;
++ }
++
+ kind = a->ts.kind > p->ts.kind ? a->ts.kind : p->ts.kind;
+- result = gfc_get_constant_expr (a->ts.type, kind, &a->where);
+
+- if (a->ts.type == BT_INTEGER)
+- mpz_tdiv_r (result->value.integer, a->value.integer, p->value.integer);
+- else
++ if (simplify_int_real_promotion2 (a, p, &ar, &pr))
+ {
++ result = gfc_get_constant_expr (BT_REAL, kind, &a->where);
+ gfc_set_model_kind (kind);
+- mpfr_fmod (result->value.real, a->value.real, p->value.real,
+- GFC_RND_MODE);
++ mpfr_fmod (result->value.real, ar, pr, GFC_RND_MODE);
++ }
++ else
++ {
++ result = gfc_get_constant_expr (BT_INTEGER, kind, &a->where);
++ mpz_tdiv_r (result->value.integer, a->value.integer, p->value.integer);
+ }
+
+ return range_check (result, "MOD");
+@@ -5964,7 +6084,9 @@ gfc_simplify_modulo (gfc_expr *a, gfc_expr *p)
+ gfc_expr *result;
+ int kind;
+
+- /* First check p. */
++ mpfr_t ar;
++ mpfr_t pr;
++
+ if (p->expr_type != EXPR_CONSTANT)
+ return NULL;
+
+@@ -5991,28 +6113,36 @@ gfc_simplify_modulo (gfc_expr *a, gfc_expr *p)
+ gfc_internal_error ("gfc_simplify_modulo(): Bad arguments");
+ }
+
++ if (a->ts.type != BT_REAL && a->ts.type != BT_INTEGER)
++ {
++ gfc_internal_error ("gfc_simplify_modulo(): Bad arguments");
++ return NULL;
++ }
++
+ if (a->expr_type != EXPR_CONSTANT)
+ return NULL;
+
+ kind = a->ts.kind > p->ts.kind ? a->ts.kind : p->ts.kind;
+- result = gfc_get_constant_expr (a->ts.type, kind, &a->where);
+
+- if (a->ts.type == BT_INTEGER)
+- mpz_fdiv_r (result->value.integer, a->value.integer, p->value.integer);
+- else
++ if (simplify_int_real_promotion2 (a, p, &ar, &pr))
+ {
++ result = gfc_get_constant_expr (BT_REAL, kind, &a->where);
+ gfc_set_model_kind (kind);
+- mpfr_fmod (result->value.real, a->value.real, p->value.real,
+- GFC_RND_MODE);
++ mpfr_fmod (result->value.real, ar, pr, GFC_RND_MODE);
+ if (mpfr_cmp_ui (result->value.real, 0) != 0)
+- {
+- if (mpfr_signbit (a->value.real) != mpfr_signbit (p->value.real))
+- mpfr_add (result->value.real, result->value.real, p->value.real,
+- GFC_RND_MODE);
+- }
+- else
+- mpfr_copysign (result->value.real, result->value.real,
+- p->value.real, GFC_RND_MODE);
++ {
++ if (mpfr_signbit (ar) != mpfr_signbit (pr))
++ mpfr_add (result->value.real, result->value.real, pr,
++ GFC_RND_MODE);
++ }
++ else
++ mpfr_copysign (result->value.real, result->value.real, pr,
++ GFC_RND_MODE);
++ }
++ else
++ {
++ result = gfc_get_constant_expr (BT_INTEGER, kind, &a->where);
++ mpz_fdiv_r (result->value.integer, a->value.integer, p->value.integer);
+ }
+
+ return range_check (result, "MODULO");
+@@ -7578,27 +7708,41 @@ gfc_expr *
+ gfc_simplify_sign (gfc_expr *x, gfc_expr *y)
+ {
+ gfc_expr *result;
++ bool neg;
+
+ if (x->expr_type != EXPR_CONSTANT || y->expr_type != EXPR_CONSTANT)
+ return NULL;
+
+ result = gfc_get_constant_expr (x->ts.type, x->ts.kind, &x->where);
+
++ switch (y->ts.type)
++ {
++ case BT_INTEGER:
++ neg = (mpz_sgn (y->value.integer) < 0);
++ break;
++
++ case BT_REAL:
++ neg = (mpfr_sgn (y->value.real) < 0);
++ break;
++
++ default:
++ gfc_internal_error ("Bad type in gfc_simplify_sign");
++ }
++
+ switch (x->ts.type)
+ {
+ case BT_INTEGER:
+ mpz_abs (result->value.integer, x->value.integer);
+- if (mpz_sgn (y->value.integer) < 0)
++ if (neg)
+ mpz_neg (result->value.integer, result->value.integer);
+ break;
+
+ case BT_REAL:
+- if (flag_sign_zero)
++ if (flag_sign_zero && y->ts.type == BT_REAL)
+ mpfr_copysign (result->value.real, x->value.real, y->value.real,
+- GFC_RND_MODE);
++ GFC_RND_MODE);
+ else
+- mpfr_setsign (result->value.real, x->value.real,
+- mpfr_sgn (y->value.real) < 0 ? 1 : 0, GFC_RND_MODE);
++ mpfr_setsign (result->value.real, x->value.real, neg, GFC_RND_MODE);
+ break;
+
+ default:
+diff --git a/gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_array_const_promotion_1.f b/gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_array_const_promotion_1.f
+new file mode 100644
+index 00000000000..25763852139
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_array_const_promotion_1.f
+@@ -0,0 +1,18 @@
++! { dg-do compile }
++! { dg-options "-fdec" }
++!
++! Test promotion between integers and reals for mod and modulo where
++! A is a constant array and P is zero.
++!
++! Compilation errors are expected
++!
++! Contributed by Francisco Redondo Marchena
++! and Jeff Law
++! Modified by Mark Eggleston
++!
++ program promotion_int_real_array_const
++ real a(2) = mod([12, 34], 0.0)*4 ! { dg-error "shall not be zero" }
++ a = mod([12.0, 34.0], 0)*4 ! { dg-error "shall not be zero" }
++ real b(2) = modulo([12, 34], 0.0)*4 ! { dg-error "shall not be zero" }
++ b = modulo([12.0, 34.0], 0)*4 ! { dg-error "shall not be zero" }
++ end program
+diff --git a/gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_array_const_promotion_2.f b/gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_array_const_promotion_2.f
+new file mode 100644
+index 00000000000..b78a46054f4
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_array_const_promotion_2.f
+@@ -0,0 +1,18 @@
++! { dg-do compile }
++! { dg-options "-fdec-promotion" }
++!
++! Test promotion between integers and reals for mod and modulo where
++! A is a constant array and P is zero.
++!
++! Compilation errors are expected
++!
++! Contributed by Francisco Redondo Marchena
++! and Jeff Law
++! Modified by Mark Eggleston
++!
++ program promotion_int_real_array_const
++ real a(2) = mod([12, 34], 0.0)*4 ! { dg-error "shall not be zero" }
++ a = mod([12.0, 34.0], 0)*4 ! { dg-error "shall not be zero" }
++ real b(2) = modulo([12, 34], 0.0)*4 ! { dg-error "shall not be zero" }
++ b = modulo([12.0, 34.0], 0)*4 ! { dg-error "shall not be zero" }
++ end program
+diff --git a/gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_array_const_promotion_3.f b/gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_array_const_promotion_3.f
+new file mode 100644
+index 00000000000..318ab5db97e
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_array_const_promotion_3.f
+@@ -0,0 +1,18 @@
++! { dg-do compile }
++! { dg-options "-fdec -fno-dec-promotion" }
++!
++! Test promotion between integers and reals for mod and modulo where
++! A is a constant array and P is zero.
++!
++! Compilation errors are expected
++!
++! Contributed by Francisco Redondo Marchena
++! and Jeff Law
++! Modified by Mark Eggleston
++!
++ program promotion_int_real_array_const
++ real a(2) = mod([12, 34], 0.0)*4 ! { dg-error "'a' and 'p' arguments of 'mod'" }
++ a = mod([12.0, 34.0], 0)*4 ! { dg-error "'a' and 'p' arguments of 'mod'" }
++ real b(2) = modulo([12, 34], 0.0)*4 ! { dg-error "'a' and 'p' arguments of 'modulo'" }
++ b = modulo([12.0, 34.0], 0)*4 ! { dg-error "'a' and 'p' arguments of 'modulo'" }
++ end program
+diff --git a/gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_const_promotion_1.f b/gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_const_promotion_1.f
+new file mode 100644
+index 00000000000..27eb2582bb2
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/dec_intrinsic_int_real_const_promotion_1.f
+@@ -0,0 +1,90 @@
++! { dg-do run }
++! { dg-options "-fdec -finit-real=snan" }
++!
++! Test promotion between integers and reals in intrinsic operations.
++! These operations are: mod, modulo, dim, sign, min, max, minloc and
++! maxloc.
++!
++! Contributed by Francisco Redondo Marchena
++! and Jeff Law