From 04dfce99db37552092a9ff193316dd5f3ea602a2 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Sat, 18 Jan 2020 18:35:20 +0100
Subject: [PATCH 001/341] Update to GCC 10 prerelease snapshot.
---
.gitignore | 84 +-
gcc.spec | 570 ++---------
...y.patch => gcc10-Wno-format-security.patch | 4 +-
...os.patch => gcc10-d-shared-libphobos.patch | 0
...ault.patch => gcc10-foffload-default.patch | 10 +-
gcc9-hack.patch => gcc10-hack.patch | 0
...-libgomp.patch => gcc10-i386-libgomp.patch | 0
gcc9-isl-dl.patch => gcc10-isl-dl.patch | 6 +-
...atch => gcc10-libgomp-omp_h-multilib.patch | 0
...+-docs.patch => gcc10-libstdc++-docs.patch | 4 +-
...path.patch => gcc10-libtool-no-rpath.patch | 0
...-needed.patch => gcc10-no-add-needed.patch | 0
gcc9-rh1574936.patch => gcc10-rh1574936.patch | 7 +-
...atch => gcc10-sparc-config-detection.patch | 0
nvptx-tools-build.patch | 11 -
nvptx-tools-glibc.patch | 32 -
nvptx-tools-no-ptxas.patch | 947 ------------------
sources | 6 +-
update-gcc.sh | 7 +
19 files changed, 95 insertions(+), 1593 deletions(-)
rename gcc9-Wno-format-security.patch => gcc10-Wno-format-security.patch (88%)
rename gcc9-d-shared-libphobos.patch => gcc10-d-shared-libphobos.patch (100%)
rename gcc9-foffload-default.patch => gcc10-foffload-default.patch (92%)
rename gcc9-hack.patch => gcc10-hack.patch (100%)
rename gcc9-i386-libgomp.patch => gcc10-i386-libgomp.patch (100%)
rename gcc9-isl-dl.patch => gcc10-isl-dl.patch (99%)
rename gcc9-libgomp-omp_h-multilib.patch => gcc10-libgomp-omp_h-multilib.patch (100%)
rename gcc9-libstdc++-docs.patch => gcc10-libstdc++-docs.patch (91%)
rename gcc9-libtool-no-rpath.patch => gcc10-libtool-no-rpath.patch (100%)
rename gcc9-no-add-needed.patch => gcc10-no-add-needed.patch (100%)
rename gcc9-rh1574936.patch => gcc10-rh1574936.patch (88%)
rename gcc9-sparc-config-detection.patch => gcc10-sparc-config-detection.patch (100%)
delete mode 100644 nvptx-tools-build.patch
delete mode 100644 nvptx-tools-glibc.patch
delete mode 100644 nvptx-tools-no-ptxas.patch
create mode 100755 update-gcc.sh
diff --git a/.gitignore b/.gitignore
index b8f2015..d6c3fb3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,81 +1,3 @@
-/gcc-7.0.1-20170126.tar.bz2
-/nvptx-newlib-aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24.tar.bz2
-/nvptx-tools-c28050f60193b3b95a18866a96f03334e874e78f.tar.bz2
-/gcc-7.0.1-20170128.tar.bz2
-/gcc-7.0.1-20170131.tar.bz2
-/gcc-7.0.1-20170201.tar.bz2
-/gcc-7.0.1-20170204.tar.bz2
-/gcc-7.0.1-20170209.tar.bz2
-/gcc-7.0.1-20170211.tar.bz2
-/gcc-7.0.1-20170219.tar.bz2
-/gcc-7.0.1-20170225.tar.bz2
-/gcc-7.0.1-20170308.tar.bz2
-/gcc-7.0.1-20170309.tar.bz2
-/gcc-7.0.1-20170327.tar.bz2
-/gcc-7.0.1-20170410.tar.bz2
-/gcc-7.0.1-20170421.tar.bz2
-/gcc-7.0.1-20170425.tar.bz2
-/gcc-7.1.1-20170503.tar.bz2
-/gcc-7.1.1-20170526.tar.bz2
-/gcc-7.1.1-20170622.tar.bz2
-/gcc-7.1.1-20170708.tar.bz2
-/gcc-7.1.1-20170711.tar.bz2
-/gcc-7.1.1-20170718.tar.bz2
-/gcc-7.1.1-20170802.tar.bz2
-/gcc-7.2.1-20170829.tar.bz2
-/gcc-7.2.1-20170915.tar.bz2
-/gcc-7.2.1-20180101.tar.bz2
-/gcc-7.2.1-20180104.tar.bz2
-/gcc-7.2.1-20180117.tar.bz2
-/gcc-7.3.1-20180125.tar.bz2
-/gcc-8.0.1-20180127.tar.xz
-/nvptx-newlib-aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24.tar.xz
-/nvptx-tools-c28050f60193b3b95a18866a96f03334e874e78f.tar.xz
-/gcc-8.0.1-20180830.tar.xz
-/gcc-8.0.1-20180130.tar.xz
-/gcc-8.0.1-20180131.tar.xz
-/gcc-8.0.1-20180207.tar.xz
-/gcc-8.0.1-20180210.tar.xz
-/gcc-8.0.1-20180218.tar.xz
-/gcc-8.0.1-20180220.tar.xz
-/gcc-8.0.1-20180222.tar.xz
-/gcc-8.0.1-20180310.tar.xz
-/gcc-8.0.1-20180312.tar.xz
-/gcc-8.0.1-20180317.tar.xz
-/gcc-8.0.1-20180324.tar.xz
-/gcc-8.0.1-20180410.tar.xz
-/gcc-8.0.1-20180424.tar.xz
-/gcc-8.0.1-20180425.tar.xz
-/gcc-8.1.1-20180502.tar.xz
-/gcc-8.1.1-20180620.tar.xz
-/gcc-8.1.1-20180626.tar.xz
-/gcc-8.1.1-20180712.tar.xz
-/gcc-8.2.1-20180726.tar.xz
-/gcc-8.2.1-20180801.tar.xz
-/gcc-8.2.1-20180905.tar.xz
-/gcc-8.2.1-20181011.tar.xz
-/gcc-8.2.1-20181105.tar.xz
-/gcc-8.2.1-20181215.tar.xz
-/gcc-8.2.1-20190109.tar.xz
-/gcc-9.0.0-20190119.tar.xz
-/gcc-9.0.0-20190121.tar.xz
-/gcc-9.0.1-20190123.tar.xz
-/gcc-9.0.1-20190129.tar.xz
-/gcc-9.0.1-20190203.tar.xz
-/gcc-9.0.1-20190209.tar.xz
-/gcc-9.0.1-20190215.tar.xz
-/gcc-9.0.1-20190219.tar.xz
-/gcc-9.0.1-20190221.tar.xz
-/gcc-9.0.1-20190227.tar.xz
-/gcc-9.0.1-20190309.tar.xz
-/gcc-9.0.1-20190312.tar.xz
-/gcc-9.0.1-20190320.tar.xz
-/gcc-9.0.1-20190328.tar.xz
-/gcc-9.0.1-20190415.tar.xz
-/gcc-9.0.1-20190418.tar.xz
-/gcc-9.0.1-20190426.tar.xz
-/gcc-9.0.1-20190430.tar.xz
-/gcc-9.1.1-20190503.tar.xz
-/gcc-9.1.1-20190605.tar.xz
-/gcc-9.2.1-20190827.tar.xz
-/gcc-9.2.1-20191120.tar.xz
+/gcc-10.0.1-20200118.tar.xz
+/newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz
+/nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 0d2d9a3..2d6aadd 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,12 +1,12 @@
-%global DATE 20191120
-%global SVNREV 278493
-%global gcc_version 9.2.1
-%global gcc_major 9
+%global DATE 20200118
+%global gitrev cef2a35ef0b6b1f728face9ba5530f0eb69b1d50
+%global gcc_version 10.0.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 2
-%global nvptx_tools_gitrev c28050f60193b3b95a18866a96f03334e874e78f
-%global nvptx_newlib_gitrev aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24
+%global gcc_release 0.3
+%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
+%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
%global _performance_build 1
# Hardening slows the compiler way too much.
@@ -113,23 +113,25 @@ Release: %{gcc_release}%{?dist}
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:
-# svn export svn://gcc.gnu.org/svn/gcc/branches/redhat/gcc-9-branch@%%{SVNREV} gcc-%%{version}-%%{DATE}
-# tar cf - gcc-%%{version}-%%{DATE} | xz -9e > gcc-%%{version}-%%{DATE}.tar.xz
+# 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
+# rm -rf gcc-dir.tmp
Source0: gcc-%{version}-%{DATE}.tar.xz
# The source for nvptx-tools package was pulled from upstream's vcs. Use the
# following commands to generate the tarball:
-# git clone https://github.com/MentorEmbedded/nvptx-tools.git
-# cd nvptx-tools
-# git archive origin/master --prefix=nvptx-tools-%%{nvptx_tools_gitrev}/ | xz -9e > ../nvptx-tools-%%{nvptx_tools_gitrev}.tar.xz
-# cd ..; rm -rf nvptx-tools
+# git clone --depth 1 git://github.com/MentorEmbedded/nvptx-tools.git nvptx-tools-dir.tmp
+# git --git-dir=nvptx-tools-dir.tmp/.git fetch --depth 1 origin %%{nvptx_tools_gitrev}
+# git --git-dir=nvptx-tools-dir.tmp/.git archive --prefix=nvptx-tools-%%{nvptx_tools_gitrev}/ %%{nvptx_tools_gitrev} | xz -9e > nvptx-tools-%%{nvptx_tools_gitrev}.tar.xz
+# rm -rf nvptx-tools-dir.tmp
Source1: nvptx-tools-%{nvptx_tools_gitrev}.tar.xz
# The source for nvptx-newlib package was pulled from upstream's vcs. Use the
# following commands to generate the tarball:
-# git clone https://github.com/MentorEmbedded/nvptx-newlib.git
-# cd nvptx-newlib
-# git archive origin/master --prefix=nvptx-newlib-%%{nvptx_newlib_gitrev}/ | xz -9 > ../nvptx-newlib-%%{nvptx_newlib_gitrev}.tar.xz
-# cd ..; rm -rf nvptx-newlib
-Source2: nvptx-newlib-%{nvptx_newlib_gitrev}.tar.xz
+# git clone --depth 1 git://sourceware.org/git/newlib-cygwin.git newlib-cygwin-dir.tmp
+# git --git-dir=newlib-cygwin-dir.tmp/.git fetch --depth 1 origin %%{newlib_cygwin_gitrev}
+# git --git-dir=newlib-cygwin-dir.tmp/.git archive --prefix=newlib-cygwin-%%{newlib_cygwin_gitrev}/ %%{newlib_cygwin_gitrev} | xz -9e > newlib-cygwin-%%{newlib_cygwin_gitrev}.tar.xz
+# rm -rf newlib-cygwin-dir.tmp
+Source2: newlib-cygwin-%{newlib_cygwin_gitrev}.tar.xz
%global isl_version 0.16.1
URL: http://gcc.gnu.org
# Need binutils with -pie support >= 2.14.90.0.4-4
@@ -242,23 +244,18 @@ AutoReq: true
Provides: bundled(libiberty)
Provides: gcc(major) = %{gcc_major}
-Patch0: gcc9-hack.patch
-Patch1: gcc9-i386-libgomp.patch
-Patch2: gcc9-sparc-config-detection.patch
-Patch3: gcc9-libgomp-omp_h-multilib.patch
-Patch4: gcc9-libtool-no-rpath.patch
-Patch5: gcc9-isl-dl.patch
-Patch6: gcc9-libstdc++-docs.patch
-Patch7: gcc9-no-add-needed.patch
-Patch8: gcc9-foffload-default.patch
-Patch9: gcc9-Wno-format-security.patch
-Patch10: gcc9-rh1574936.patch
-Patch11: gcc9-d-shared-libphobos.patch
-
-Patch1000: nvptx-tools-no-ptxas.patch
-Patch1001: nvptx-tools-build.patch
-Patch1002: nvptx-tools-glibc.patch
-
+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
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -280,7 +277,7 @@ Patch1002: nvptx-tools-glibc.patch
%if %{build_go}
# Avoid stripping these libraries and binaries.
%global __os_install_post \
-chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.14.* \
+chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.15.* \
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 \
@@ -288,7 +285,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.14.* \
+chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgo.so.15.* \
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 \
@@ -299,11 +296,11 @@ chmod 755 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}
%endif
%description
-The gcc package contains the GNU Compiler Collection version 9.
+The gcc package contains the GNU Compiler Collection version 10.
You'll need this package in order to compile C code.
%package -n libgcc
-Summary: GCC version 9 shared support library
+Summary: GCC version 10 shared support library
Autoreq: false
%if !%{build_ada}
Obsoletes: libgnat < %{version}-%{release}
@@ -771,12 +768,6 @@ to NVidia PTX capable devices if available.
%endif
%patch11 -p0 -b .d-shared-libphobos~
-cd nvptx-tools-%{nvptx_tools_gitrev}
-%patch1000 -p1 -b .nvptx-tools-no-ptxas~
-%patch1001 -p1 -b .nvptx-tools-build~
-%patch1002 -p1 -b .nvptx-tools-glibc~
-cd ..
-
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
cp -a libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
@@ -846,7 +837,7 @@ make %{?_smp_mflags}
make install prefix=${IROOT}%{_prefix}
cd ../..
-ln -sf nvptx-newlib-%{nvptx_newlib_gitrev}/newlib newlib
+ln -sf newlib-cygwin-%{newlib_cygwin_gitrev}/newlib newlib
rm -rf obj-offload-nvptx-none
mkdir obj-offload-nvptx-none
@@ -1126,7 +1117,7 @@ cd obj-%{gcc_target_platform}
make install prefix=%{buildroot}%{_prefix}
cd ../..
-ln -sf nvptx-newlib-%{nvptx_newlib_gitrev}/newlib newlib
+ln -sf newlib-cygwin-%{newlib_cygwin_gitrev}/newlib newlib
cd obj-offload-nvptx-none
make prefix=%{buildroot}%{_prefix} mandir=%{buildroot}%{_mandir} \
infodir=%{buildroot}%{_infodir} install
@@ -1355,7 +1346,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.14.* libgo.so
+ln -sf ../../../libgo.so.15.* libgo.so
%endif
%if %{build_libquadmath}
ln -sf ../../../libquadmath.so.0.* libquadmath.so
@@ -1371,7 +1362,7 @@ ln -sf ../../../libitm.so.1.* libitm.so
ln -sf ../../../libatomic.so.1.* libatomic.so
%endif
%if %{build_libasan}
-ln -sf ../../../libasan.so.5.* libasan.so
+ln -sf ../../../libasan.so.6.* libasan.so
mv ../../../libasan_preinit.o libasan_preinit.o
%endif
%if %{build_libubsan}
@@ -1385,7 +1376,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.14.* libgo.so
+ln -sf ../../../../%{_lib}/libgo.so.15.* libgo.so
%endif
%if %{build_libquadmath}
ln -sf ../../../../%{_lib}/libquadmath.so.0.* libquadmath.so
@@ -1401,7 +1392,7 @@ ln -sf ../../../../%{_lib}/libitm.so.1.* libitm.so
ln -sf ../../../../%{_lib}/libatomic.so.1.* libatomic.so
%endif
%if %{build_libasan}
-ln -sf ../../../../%{_lib}/libasan.so.5.* libasan.so
+ln -sf ../../../../%{_lib}/libasan.so.6.* libasan.so
mv ../../../../%{_lib}/libasan_preinit.o libasan_preinit.o
%endif
%if %{build_libubsan}
@@ -1505,8 +1496,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.14.* | sed 's,^.*libg,libg,'`' )' > libgo.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgo.so.14.* | sed 's,^.*libg,libg,'`' )' > 64/libgo.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgo.so.15.* | sed 's,^.*libg,libg,'`' )' > libgo.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgo.so.15.* | sed 's,^.*libg,libg,'`' )' > 64/libgo.so
%endif
%if %{build_libquadmath}
rm -f libquadmath.so
@@ -1532,8 +1523,8 @@ echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libatomic.so.1.* | sed 's,
%endif
%if %{build_libasan}
rm -f libasan.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libasan.so.5.* | sed 's,^.*liba,liba,'`' )' > libasan.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libasan.so.5.* | sed 's,^.*liba,liba,'`' )' > 64/libasan.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libasan.so.6.* | sed 's,^.*liba,liba,'`' )' > libasan.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libasan.so.6.* | sed 's,^.*liba,liba,'`' )' > 64/libasan.so
mv ../../../../lib64/libasan_preinit.o 64/libasan_preinit.o
%endif
%if %{build_libubsan}
@@ -1604,8 +1595,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.14.* | sed 's,^.*libg,libg,'`' )' > libgo.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgo.so.14.* | sed 's,^.*libg,libg,'`' )' > 32/libgo.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgo.so.15.* | sed 's,^.*libg,libg,'`' )' > libgo.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgo.so.15.* | sed 's,^.*libg,libg,'`' )' > 32/libgo.so
%endif
%if %{build_libquadmath}
rm -f libquadmath.so
@@ -1631,8 +1622,8 @@ echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libatomic.so.1.* | sed 's,
%endif
%if %{build_libasan}
rm -f libasan.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libasan.so.5.* | sed 's,^.*liba,liba,'`' )' > libasan.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libasan.so.5.* | sed 's,^.*liba,liba,'`' )' > 32/libasan.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libasan.so.6.* | sed 's,^.*liba,liba,'`' )' > libasan.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libasan.so.6.* | sed 's,^.*liba,liba,'`' )' > 32/libasan.so
mv ../../../../lib/libasan_preinit.o 32/libasan_preinit.o
%endif
%if %{build_libubsan}
@@ -1779,7 +1770,7 @@ chmod 755 %{buildroot}%{_prefix}/%{_lib}/libitm.so.1.*
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libatomic.so.1.*
%endif
%if %{build_libasan}
-chmod 755 %{buildroot}%{_prefix}/%{_lib}/libasan.so.5.*
+chmod 755 %{buildroot}%{_prefix}/%{_lib}/libasan.so.6.*
%endif
%if %{build_libubsan}
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libubsan.so.1.*
@@ -1792,7 +1783,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.14.*
+chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.15.*
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
@@ -1988,6 +1979,7 @@ end
%{_prefix}/bin/gcc-ar
%{_prefix}/bin/gcc-nm
%{_prefix}/bin/gcc-ranlib
+%{_prefix}/bin/lto-dump
%ifarch ppc
%{_prefix}/bin/%{_target_platform}-gcc
%endif
@@ -2003,6 +1995,7 @@ end
%{_mandir}/man1/gcov.1*
%{_mandir}/man1/gcov-tool.1*
%{_mandir}/man1/gcov-dump.1*
+%{_mandir}/man1/lto-dump.1*
%{_infodir}/gcc*
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
@@ -2027,6 +2020,7 @@ end
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/unwind.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/omp.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/openacc.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/acc_prof.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/stdint.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/stdint-gcc.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/stdalign.h
@@ -2112,6 +2106,11 @@ end
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/movdirintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/waitpkgintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/cldemoteintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512bf16vlintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512bf16intrin.h
+%{_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
%endif
%ifarch ia64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/ia64intrin.h
@@ -2578,16 +2577,19 @@ end
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/adainclude
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/adalib
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/ada_target_properties
%endif
%ifarch %{multilib_64_archs}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/adainclude
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/adalib
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/ada_target_properties
%endif
%ifarch sparcv9 sparc64 ppc ppc64 ppc64p7
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/adainclude
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/adalib
%endif
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/ada_target_properties
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/gnat1
%doc rpm.doc/changelogs/gcc/ada/ChangeLog*
@@ -2742,7 +2744,7 @@ end
%if %{build_libasan}
%files -n libasan
-%{_prefix}/%{_lib}/libasan.so.5*
+%{_prefix}/%{_lib}/libasan.so.6*
%files -n libasan-static
%dir %{_prefix}/lib/gcc
@@ -2862,7 +2864,7 @@ end
%doc rpm.doc/go/*
%files -n libgo
-%attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.14*
+%attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.15*
%doc rpm.doc/libgo/*
%files -n libgo-devel
@@ -2949,6 +2951,7 @@ end
%files offload-nvptx
%{_prefix}/bin/nvptx-none-*
%{_prefix}/bin/%{gcc_target_platform}-accel-nvptx-none-gcc
+%{_prefix}/bin/%{gcc_target_platform}-accel-nvptx-none-lto-dump
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}
@@ -2969,444 +2972,5 @@ end
%endif
%changelog
-* Wed Nov 20 2019 Jakub Jelinek 9.2.1-2
-- update from 9 branch
- - PRs ada/91995, bootstrap/90543, c++/85254, c++/88203, c++/90767,
- c++/90947, c++/90998, c++/91129, c++/91155, c++/91606, c++/91705,
- c++/91740, c++/91923, c++/91925, c++/91974, c++/92015, c++/92062,
- c++/92106, c++/92201, c++/92343, c++/92384, c++/92504, c/90898,
- c/91401, debug/91772, debug/91887, driver/69471, fortran/47054,
- fortran/69455, fortran/83113, fortran/84487, fortran/86248,
- fortran/87752, fortran/89943, fortran/91253, fortran/91496,
- fortran/91550, fortran/91551, fortran/91552, fortran/91553,
- fortran/91557, fortran/91564, fortran/91565, fortran/91566,
- fortran/91586, fortran/91587, fortran/91588, fortran/91589,
- fortran/91641, fortran/91642, fortran/91649, fortran/91660,
- fortran/91714, fortran/91715, fortran/91716, fortran/91727,
- fortran/91785, fortran/91801, fortran/91802, fortran/91863,
- fortran/91864, fortran/91926, fortran/91942, fortran/92113,
- fortran/92174, fortran/92208, fortran/92277, fortran/92284,
- fortran/92321, fortran/92470, fortran/92500, gcov-profile/91601,
- go/91617, libfortran/90038, libstdc++/61761, libstdc++/89164,
- libstdc++/90682, libstdc++/91067, libstdc++/91456, libstdc++/91748,
- libstdc++/92059, libstdc++/92143, lto/91572, lto/91968,
- middle-end/90840, middle-end/91001, middle-end/91105,
- middle-end/91106, middle-end/91450, middle-end/91623,
- middle-end/91920, middle-end/92153, middle-end/92231, pch/61250,
- preprocessor/92296, rtl-optimization/88751, rtl-optimization/89435,
- rtl-optimization/89795, rtl-optimization/91720,
- rtl-optimization/92007, rtl-optimization/92430, sanitizer/92154,
- target/59888, target/65342, target/67183, target/70010, target/80672,
- target/81800, target/86040, target/86805, target/87243, target/87833,
- target/87853, target/88167, target/88562, target/88630, target/89400,
- target/90867, target/91269, target/91275, target/91289, target/91472,
- target/91481, target/91635, target/91683, target/91704, target/91769,
- target/92022, target/92093, target/92095, target/92225, target/92389,
- tree-optimization/85887, tree-optimization/90278,
- tree-optimization/90637, tree-optimization/90930,
- tree-optimization/91351, tree-optimization/91568,
- tree-optimization/91597, tree-optimization/91632,
- tree-optimization/91665, tree-optimization/91723,
- tree-optimization/91734, tree-optimization/91790,
- tree-optimization/91812, tree-optimization/91885,
- tree-optimization/92056, tree-optimization/92131
-
-* Wed Oct 9 2019 Jerry James 9.2.1-1.3
-- build against mpfr4 and libmpc linked with mpfr4
-- drop multilib support for s390x since glibc32 already did
-
-* Tue Oct 8 2019 Jerry James 9.2.1-1.2
-- build against mpfr3 and libmpc-mpfr3 so an mpfr 4.x version can be built
-
-* Thu Oct 03 2019 Miro Hrončok 9.2.1-1.1
-- rebuilt for Python 3.8.0rc1 (#1748018)
-
-* Tue Aug 27 2019 Jakub Jelinek 9.2.1-1
-- update from 9 branch
- - GCC 9.2 release
- - PRs ada/80590, bootstrap/87030, c++/60223, c++/63149, c++/64372,
- c++/81429, c++/82081, c++/85552, c++/86205, c++/87519, c++/88095,
- c++/90098, c++/90099, c++/90101, c++/90393, c++/90473, c++/90490,
- c++/90538, c++/90736, c++/90810, c++/90825, c++/90832, c++/90884,
- c++/90947, c++/90950, c++/91024, c++/91125, c++/91230, c++/91378,
- c++/91436, c++/91521, c/53633, c/90474, c/90737, c/90760, c/91149,
- c/91192, debug/90900, debug/90914, debug/91231, driver/90684,
- driver/91130, driver/91172, fortran/42546, fortran/68544,
- fortran/69398, fortran/69499, fortran/77632, fortran/78719,
- fortran/78739, fortran/82992, fortran/86587, fortran/87233,
- fortran/87907, fortran/87991, fortran/87993, fortran/88072,
- fortran/89344, fortran/89647, fortran/90002, fortran/90290,
- fortran/90561, fortran/90563, fortran/90577, fortran/90578,
- fortran/90744, fortran/90786, fortran/90813, fortran/90937,
- fortran/91077, fortran/91296, fortran/91359, fortran/91414,
- fortran/91422, fortran/91424, fortran/91471, fortran/91485,
- gcov-profile/91087, ipa/90939, ipa/90982, ipa/91062, ipa/91404,
- ipa/91438, ipa/91508, libfortran/91030, libsanitizer/87880,
- libstdc++/51333, libstdc++/85494, libstdc++/90252, libstdc++/90281,
- libstdc++/90361, libstdc++/90770, libstdc++/90920, libstdc++/91012,
- libstdc++/91067, libstdc++/91308, lto/90369, lto/90924, lto/91287,
- lto/91375, middle-end/64242, middle-end/78884, middle-end/90899,
- middle-end/91131, middle-end/91162, middle-end/91216,
- middle-end/91301, objc/90709, rtl-optimisation/64895,
- rtl-optimization/90756, rtl-optimization/91136,
- rtl-optimization/91173, rtl-optimization/91347, sanitizer/90954,
- target/63891, target/83531, target/90698, target/90751, target/90811,
- target/90991, target/91135, target/91150, target/91349, target/91386,
- target/91533, testsuite/27221, testsuite/58321, testsuite/65364,
- testsuite/67958, testsuite/78529, testsuite/91004, testsuite/91175,
- tree-optimization/90328, tree-optimization/90402,
- tree-optimization/90450, tree-optimization/90892,
- tree-optimization/90930, tree-optimization/90949,
- tree-optimization/90972, tree-optimization/90989,
- tree-optimization/91063, tree-optimization/91091,
- tree-optimization/91108, tree-optimization/91109,
- tree-optimization/91126, tree-optimization/91137,
- tree-optimization/91145, tree-optimization/91157,
- tree-optimization/91178, tree-optimization/91200,
- tree-optimization/91280, tree-optimization/91293,
- tree-optimization/91445
-
-* Wed Jun 5 2019 Jakub Jelinek 9.1.1-2
-- update from 9 branch
- - PRs bootstrap/90543, c++/78010, c++/90173, c++/90265, c++/90383,
- c++/90484, c++/90532, c++/90548, c++/90572, c++/90598, debug/90197,
- debug/90733, fortran/54613, fortran/90093, fortran/90329,
- fortran/90351, fortran/90352, fortran/90355, fortran/90498,
- gcov-profile/90380, libfortran/90038, libgomp/90527, libgomp/90585,
- libgomp/90641, libstdc++/81266, libstdc++/90299, libstdc++/90397,
- libstdc++/90454, libstdc++/90557, libstdc++/90634, libstdc++/90686,
- libstdc++/90700, pch/90326, sanitizer/90312, sanitizer/90570,
- target/82920, target/89424, target/89765, target/90357, target/90379,
- target/90530, target/90547, testsuite/81058, tree-optimization/90385,
- tree-optimization/90416
-
-* Fri May 3 2019 Jakub Jelinek 9.1.1-1
-- update from 9 branch
- - GCC 9.1 release
- - PR tree-optimization/90316
-- fix up devirtualization ICE with fastcall attribute (#1705081,
- PR tree-optimization/90303)
-- move Obsoletes for lib{cilkrts,mpx}{,-static} from gcc to libgcc subpackage
-
-* Tue Apr 30 2019 Jakub Jelinek 9.0.1-0.16
-- update from 9 branch
- - gcc 9.1-rc2
- - PRs middle-end/90258, target/86538, translation/90274,
- tree-optimization/90273
-- enable D on s390{,x} and riscv64
-
-* Fri Apr 26 2019 Jakub Jelinek 9.0.1-0.15
-- update from trunk and 9 branch
- - gcc 9.1-rc1
- - PRs c++/87366, c++/87554, c++/89900, c++/90108, c++/90138, c++/90171,
- c++/90190, c++/90227, c++/90236, c/89888, d/88431, d/88654, d/89293,
- d/89432, d/90086, d/90250, debug/90131, fortran/57284, fortran/90166,
- ipa/85051, libstdc++/90165, libstdc++/90220, libstdc++/90239,
- middle-end/85164, middle-end/89765, middle-end/89797,
- middle-end/90139, middle-end/90194, middle-end/90213, other/90257,
- rtl-optimization/84032, rtl-optimization/87871,
- rtl-optimization/87979, target/89929, target/89952, target/90187,
- target/90193, translation/90118, tree-optimization/88055,
- tree-optimization/90021, tree-optimization/90037,
- tree-optimization/90078, tree-optimization/90208,
- tree-optimization/90211, tree-optimization/90240
-
-* Thu Apr 18 2019 Jakub Jelinek 9.0.1-0.14
-- update from trunk
- - PRs bootstrap/89864, c++/86953, c++/89325, c++/90047, c++/90124,
- debug/89528, fortran/90048, fortran/90067, fortran/90114,
- libstdc++/90105, middle-end/90095, rtl-optimization/86438,
- rtl-optimization/90082, target/17108, target/84369, target/90096,
- target/90125, translation/79183, tree-optimization/56049,
- tree-optimization/90090
-- buildrequire /usr/bin/python for better dg-extract-results.sh
-
-* Mon Apr 15 2019 Jakub Jelinek 9.0.1-0.13
-- update from trunk
- - PRs bootstrap/89980, c++/47488, c++/56643, c++/61327, c++/62207,
- c++/65619, c++/66548, c++/81506, c++/81866, c++/86586, c++/86946,
- c++/86986, c++/87145, c++/87603, c++/89331, c++/89612, c++/89744,
- c++/89833, c++/89836, c++/89852, c++/89871, c++/89876, c++/89878,
- c++/89914, c++/89917, c++/89948, c++/89966, c++/89973, c++/89974,
- c++/90010, c/71598, c/88383, c/89288, c/89685, c/89797, c/89798,
- c/89872, c/89933, c/89946, c/89985, d/87799, d/88150, d/88462,
- d/89255, d/89823, debug/89892, debug/89905, driver/89861,
- fortran/68567, fortran/79842, fortran/83515, fortran/85448,
- fortran/85797, fortran/87352, fortran/89375, fortran/89841,
- fortran/89842, fortran/89843, fortran/89846, fortran/89866,
- fortran/89904, fortran/89981, fortran/90022, gcov-profile/89959,
- gcov-profile/89961, ipa/88936, ipa/pr89693, libstdc++/85184,
- libstdc++/87431, libstdc++/89851, libstdc++/89986, libstdc++/90008,
- libstdc++/90046, lto/89358, lto/89896, middle-end/89621,
- middle-end/89911, middle-end/89934, middle-end/89957,
- middle-end/89970, middle-end/90025, other/89394,
- rtl-optimization/46590, rtl-optimization/81025,
- rtl-optimization/84206, rtl-optimization/85412,
- rtl-optimization/85876, rtl-optimization/86928,
- rtl-optimization/87273, rtl-optimization/87485,
- rtl-optimization/89399, rtl-optimization/89862,
- rtl-optimization/89865, rtl-optimization/89965,
- rtl-optimization/90026, sanitizer/89869, sanitizer/89941,
- target/83033, target/89623, target/89848, target/89865, target/89902,
- target/89903, target/89945, target/90015, target/90016, target/90024,
- testsuite/89907, testsuite/89916, translation/89912,
- translation/89936, translation/89939, translation/90011,
- translation/90035, translation/90041, tree-optimization/46590,
- tree-optimization/84101, tree-optimization/89725,
- tree-optimization/89730, tree-optimization/89956,
- tree-optimization/89998, tree-optimization/90006,
- tree-optimization/90018, tree-optimization/90020
-- PRs rtl-optimization/89794, tree-optimization/90071, debug/90074
-
-* Thu Mar 28 2019 Jakub Jelinek 9.0.1-0.12
-- update from trunk
- - PRs ada/89583, bootstrap/89829, c++/60702, c++/78645, c++/82643,
- c++/84598, c++/84661, c++/85013, c++/86429, c++/86932, c++/87327,
- c++/87480, c++/87481, c++/87748, c++/89214, c++/89421, c++/89705,
- c++/89767, c++/89785, c++/89796, c++/89831, c/79022, c/89812, d/89017,
- debug/86964, fortran/29383, fortran/56408, fortran/71861,
- fortran/78865, fortran/85537, fortran/88247, fortran/89773,
- libgfortran/79540, libstdc++/85965, libstdc++/88066, libstdc++/89816,
- libstdc++/89824, libstdc++/89825, lto/89692, middle-end/89725,
- middle-end/89790, rtl-optimization/88347, rtl-optimization/88423,
- rtl-optimization/89313, rtl-optimization/89676,
- rtl-optimization/89826, target/85667, target/89775, target/89784,
- target/89827, testsuite/89834, tree-optimization/81740,
- tree-optimization/89350, tree-optimization/89463,
- tree-optimization/89779, tree-optimization/89789,
- tree-optimization/89802
-
-* Wed Mar 20 2019 Jakub Jelinek 9.0.1-0.11
-- update from trunk
- - PRs c++/63508, c++/85014, c++/85558, c++/88534, c++/88537, c++/88979,
- c++/89512, c++/89571, c++/89630, c++/89640, c++/89660, c++/89682,
- c++/89686, c++/89709, c++/89761, c/89734, d/87866, d/88957,
- debug/88389, debug/89498, debug/89704, fortran/60091, fortran/66695,
- fortran/68009, fortran/77746, fortran/79485, fortran/84394,
- fortran/87045, fortran/87673, fortran/88008, fortran/89363,
- fortran/89364, fortran/89601, fortran/89724, ipa/89684,
- libstdc++/89461, lto/87809, lto/89335, middle-end/86979,
- middle-end/88588, middle-end/88945, middle-end/89677,
- middle-end/89698, middle-end/89737, other/89712,
- rtl-optimization/89679, rtl-optimization/89721,
- rtl-optimization/89753, rtl-optimization/89768, sanitizer/80953,
- target/52726, target/85860, target/87532, target/87561, target/89378,
- target/89411, target/89523, target/89627, target/89650, target/89711,
- target/89719, target/89726, target/89736, target/89746, target/89752,
- testsuite/83453, testsuite/84174, testsuite/89393, testsuite/89471,
- testsuite/89666, tree-optimization/89546, tree-optimization/89644,
- tree-optimization/89662, tree-optimization/89688,
- tree-optimization/89703, tree-optimization/89710,
- tree-optimization/89720
-- turn libgcc_s.so into a linker script on i?86, x86_64, ppc64le and also on
- ppc and ppc64 for 64-bit multilib (#1688766)
-
-* Tue Mar 12 2019 Jakub Jelinek 9.0.1-0.10
-- update from trunk
- - PRs bootstrap/89656, c++/70349, c++/86521, c++/87571, c++/87750,
- c++/89648, c/88568, contrib/82704, d/89041, fortran/66089,
- fortran/71544, fortran/84504, fortran/87734, fortran/89639,
- fortran/89651, inline-asm/87010, libbacktrace/89669, libstdc++/89460,
- libstdc++/89641, middle-end/68733, middle-end/89655, middle-end/89663,
- rtl-optimization/89588, testsuite/89472, tree-optimization/85459,
- tree-optimization/85762, tree-optimization/87008,
- tree-optimization/89649, tree-optimization/89664
-- fix ICE in constexpr loop handling of SAVE_EXPRs (PR c++/89652)
-- temporarily revert -Wredundant-move warning false positive
- improvement (PR c++/89660)
-
-* Sat Mar 9 2019 Jakub Jelinek 9.0.1-0.9
-- update from trunk
- - PRs bootstrap/89539, bootstrap/89560, c++/22149, c++/63540, c++/71446,
- c++/80916, c++/82075, c++/84518, c++/84605, c++/86485, c++/86969,
- c++/87068, c++/87148, c++/87378, c++/88049, c++/88123, c++/88183,
- c++/88820, c++/88857, c++/89381, c++/89511, c++/89513, c++/89522,
- c++/89532, c++/89537, c++/89576, c++/89585, c++/89599, c++/89622,
- c/85870, c/89520, c/89521, c/89525, debug/89631, fortran/71203,
- fortran/72714, fortran/77583, fortran/89433, fortran/89516,
- gcov-profile/89577, go/63560, go/89227, go/89406, ipa/80000,
- ipa/88235, libgfortran/89593, libstdc++/86655, libstdc++/88996,
- libstdc++/89562, libstdc++/89608, lto/87525, lto/88585,
- middle-end/89497, middle-end/89503, middle-end/89541,
- middle-end/89572, middle-end/89578, middle-end/89590,
- middle-end/89618, other/80058, rtl-optimization/85899,
- rtl-optimization/88845, rtl-optimization/89634, sanitizer/88684,
- target/68924, target/78782, target/79645, target/79846, target/79926,
- target/80003, target/80190, target/85665, target/86952, target/87558,
- target/89222, target/89455, target/89506, target/89517, target/89587,
- target/89602, testsuite/89441, testsuite/89551, translation/79999,
- tree-optimization/89437, tree-optimization/89487,
- tree-optimization/89535, tree-optimization/89536,
- tree-optimization/89550, tree-optimization/89566,
- tree-optimization/89570, tree-optimization/89594,
- tree-optimization/89595
-- fix libstdc++ hashing of > 2GB strings (PR libstdc++/89629)
-
-* Wed Feb 27 2019 Jakub Jelinek 9.0.1-0.8
-- update from trunk
- - PRs c++/84585, c++/84676, c++/87685, c++/88294, c++/88394, c++/88419,
- c++/88869, c++/88987, c++/89285, c++/89419, c++/89420, c++/89422,
- c++/89481, c++/89488, c++/89507, c/77754, c/80409, c/89425, c/89495,
- debug/88878, debug/89514, driver/69471, fortran/43210, fortran/72741,
- fortran/78027, fortran/83057, fortran/84387, fortran/88117,
- fortran/88326, fortran/89174, fortran/89266, fortran/89282,
- fortran/89366, fortran/89385, fortran/89431, fortran/89492,
- fortran/89496, go/89170, libfortran/89274, libstdc++/89446,
- libstdc++/89466, libstdc++/89477, middle-end/85598, middle-end/87609,
- rtl-optimization/86096, rtl-optimization/87761,
- rtl-optimization/89445, target/87007, target/88530, target/89324,
- target/89338, target/89339, target/89434, target/89438, target/89444,
- target/89474, testsuite/89476, tree-optimization/87609,
- tree-optimization/88853, tree-optimization/88993,
- tree-optimization/89280, tree-optimization/89440,
- tree-optimization/89489, tree-optimization/89500,
- tree-optimization/89505
-- improve arm and aarch64 casesi (PR target/70341)
-- don't use section anchors block infrastructure for mergeable section
- data (PR rtl-optimization/89490)
-
-* Thu Feb 21 2019 Jakub Jelinek 9.0.1-0.7
-- update from trunk
- - PRs c++/84536, c++/87513, c++/87921, c++/88368, c++/88380, c++/88572,
- c++/88690, c++/89403, c++/89405, c/89410, fortran/86119,
- fortran/89384, hsa/89302, libstdc++/89402, libstdc++/89416,
- middle-end/89091, middle-end/89392, middle-end/89412,
- middle-end/89415, sanitizer/89409, target/86487, target/87412,
- target/88100
-
-* Tue Feb 19 2019 Jakub Jelinek 9.0.1-0.6
-- update from trunk
- - PRs c++/88680, c++/89217, c++/89315, c++/89336, c++/89356, c++/89383,
- c++/89387, c++/89390, c++/89391, c/87924, d/88127, fortran/71066,
- fortran/87689, fortran/88299, ipa/89306, middle-end/88074,
- middle-end/89294, rtl-optimization/66152, target/89271, target/89361,
- target/89372, target/89397, tree-optimization/89209,
- tree-optimization/89296
- - fix s390{,x} (#1677602, PR target/89369)
-
-* Fri Feb 15 2019 Jakub Jelinek 9.0.1-0.5
-- update from trunk
- - PRs c++/77304, c++/86379, c++/87322, c++/87996, c++/88977, c++/88986,
- c++/89036, c++/89144, c++/89212, c++/89241, c++/89297, c/89340,
- d/87864, fortran/67679, fortran/71723, fortran/72715, fortran/81552,
- fortran/88248, fortran/88649, fortran/89200, go/89193, ipa/88711,
- ipa/88755, ipa/89009, libbacktrace/81983, libstdc++/89023,
- libstdc++/89345, lto/87957, lto/88147, lto/88677, lto/88858,
- lto/88876, lto/89272, middle-end/89281, middle-end/89284,
- middle-end/89303, other/69006, other/89342, rtl-optimization/88308,
- rtl-optimization/89242, rtl-optimization/89354, target/88847,
- target/89190, target/89233, target/89290, tree-optimization/88771,
- tree-optimization/89253, tree-optimization/89268,
- tree-optimization/89278, tree-optimization/89314
-
-* Sat Feb 9 2019 Jakub Jelinek 9.0.1-0.4
-- update from trunk
- - PRs c++/44648, c++/71302, c++/86218, c++/87770, c++/89158, c++/89187,
- c/69661, c/88584, c/88606, c/88698, c/89211, debug/87451,
- fortran/52789, fortran/71860, fortran/88912, fortran/89077,
- fortran/89185, gcov-profile/89000, go/89019, ipa/88985,
- libbacktrace/78063, libstdc++/71044, libstdc++/87106, libstdc++/89090,
- libstdc++/89102, libstdc++/89128, libstdc++/89130, libstdc++/89194,
- middle-end/88560, middle-end/89150, middle-end/89210,
- middle-end/89223, middle-end/89246, rtl-optimization/11304,
- rtl-optimization/89195, rtl-optimization/89225,
- rtl-optimization/89234, target/88343, target/88856, target/89112,
- target/89186, target/89188, target/89229, testsuite/89250,
- testsuite/89258, tree-optimization/86637, tree-optimization/89182,
- tree-optimization/89235, tree-optimization/89247
-- add gcc-g++ and g++ provides to gcc-c++, gcc-fortran and gfortran
- provides to gcc-gfortran, gcc-d and gdc provides to gcc-gdc and gccgo
- provides to gcc-go
-
-* Sun Feb 3 2019 Jakub Jelinek 9.0.1-0.3
-- update from trunk
- - PRs c++/80864, c++/86943, c++/87175, c++/88325, c++/88752, c++/88761,
- c++/88983, c++/88988, c++/89083, c++/89105, c++/89119, c/88956,
- c/89061, c/89122, fortran/52564, fortran/52884, fortran/57048,
- fortran/81344, fortran/83246, fortran/88298, fortran/88393,
- fortran/88669, fortran/88685, fortran/88980, fortran/89084, hsa/87863,
- libbacktrace/89136, libfortran/78314, libfortran/88678,
- libstdc++/88170, libstdc++/89117, middle-end/87887, middle-end/88597,
- middle-end/89137, other/89106, rtl-optimization/87246,
- rtl-optimization/88593, rtl-optimization/89115, sanitizer/89124,
- target/89071, testsuite/87451, testsuite/88920, testsuite/89110,
- tree-optimization/85497, tree-optimization/88107,
- tree-optimization/88932, tree-optimization/89111,
- tree-optimization/89135, tree-optimization/89143
-
-* Tue Jan 29 2019 Jakub Jelinek 9.0.1-0.2
-- update from trunk
- - PRs c++/66676, c++/88358, c++/88815, c++/88865, c++/88969, c++/88976,
- c++/89001, c++/89024, c++/89089, c/86125, c/88886, c/89045, d/89042,
- debug/87295, debug/89006, debug/89076, fortran/57553, fortran/70696,
- fortran/85780, fortran/88929, gcc/87763, gcov-profile/88994,
- ipa/88933, ipa/89104, libfortran/89020, libgcc/88931, libstdc++/68737,
- libstdc++/88840, lto/87187, middle-end/86308, middle-end/89002,
- middle-end/89015, middle-end/89037, preprocessor/88974,
- rtl-optimization/88846, rtl-optimization/88948, target/85711,
- target/87214, target/88998, target/89073, testsuite/89064,
- tree-optimization/86865, tree-optimization/88739,
- tree-optimization/89027, tree-optimization/89049
-- make sure ARM unwinder doesn't use VFP registers (#1670069, PR target/89093)
-
-* Wed Jan 23 2019 Jakub Jelinek 9.0.1-0.1
-- update from trunk
- - PRs c++/87893, c++/88293, c++/88757, c++/88984, c/44715, driver/89014,
- fortran/88579, libstdc++/88740, lto/88422, middle-end/88968,
- rtl-optimization/87763, sanitizer/86229, sanitizer/89010,
- target/87835, target/88469, target/88909, target/88939, target/88941,
- target/88954, target/88965, target/PR88946, tree-optimization/88862,
- tree-optimization/88964, tree-optimization/89008
- - hopefully fix arm C++ issues (#1668323)
-- fix aarch64 -march=native (#1668631)
-
-* Tue Jan 22 2019 David Abdurachmanov
-- fix libgphobos-static requires (#1668204)
-
-* Mon Jan 21 2019 Jakub Jelinek 9.0.0-0.4
-- update from trunk
- - PRs c++/88949, c/88928, fortran/37835, fortran/56789, fortran/77960,
- ipa/87615, libstdc++/86590, target/71659, target/88938,
- tree-optimization/88934
-- fix up min/max reduction on ppc64le (PR target/87064)
-- fix up thread_jump on thumb1 (PR rtl-optimization/88904)
-- fix up doubleword unop REG_EQUAL notes with const args (PR target/88905)
-- fix up DSE on memcpy/memmove/memcmp libcalls (PR rtl-optimization/49429,
- PR target/49454, PR rtl-optimization/86334, PR target/88906)
-
-* Sat Jan 19 2019 Jakub Jelinek 9.0.0-0.3
-- update from trunk
- - PRs c++/86205, c++/86740, c++/86926, c++/88699, c++/88875, c/88664,
- fortran/88871, fortran/88898, fortran/88902, libbacktrace/88890,
- libstdc++/87514, libstdc++/87520, libstdc++/88782, middle-end/88273,
- middle-end/88587, target/85596, target/88799, target/88892,
- tree-optimization/88800, tree-optimization/88903
-- fix transfer_intrinsic_3.f90 miscompilation on ppc64le and s390x
- (PR tree-optimization/88044)
-- fix -fsanitize=pointer-{compare,subtract} in C++ templates
- (PR sanitizer/88901)
-- add Obsoletes for libmpx and libmpx-static
-
-* Thu Jan 17 2019 Jakub Jelinek 9.0.0-0.2
-- update from trunk
- - PRs c++/78244, c++/86610, c++/86648, c++/87768, c++/87882, c++/88114,
- c++/88146, c++/88312, c++/88613, c++/88692, c++/88795, c++/88825,
- c++/88830, c++/88866, c/51628, d/87824, debug/88046, fortran/35031,
- fortran/43136, fortran/57992, fortran/59345, fortran/61765,
- fortran/81849, fortran/88803, gcov-profile/88263, inline-asm/52813,
- ipa/88788, libbacktrace/82857, libfortran/88776, libfortran/88807,
- libstdc++/83306, libstdc++/88738, libstdc++/88802, libstdc++/88811,
- libstdc++/88881, libstdc++/88884, lto/86736, lto/88733,
- middle-end/85956, middle-end/88703, rtl-optimization/87305,
- rtl-optimization/88796, rtl-optimization/88870, target/80547,
- target/85381, target/85486, target/88614, target/86891, target/87306,
- target/88489, target/88638, target/88682, target/88777, target/88794,
- target/88850, target/88851, target/88861, tree-optimization/86214,
- tree-optimization/88693, tree-optimization/88775,
- tree-optimization/88855
-- fix arm bootstrap failure (PR bootstrap/88714)
-- fix on aarch64 and arm (PR target/88734)
-- default to -shared-libphobos for gdc
-
-* Fri Jan 11 2019 Jakub Jelinek 9.0.0-0.1
+* Sat Jan 18 2020 Jakub Jelinek 10.0.1-0.3
- new package
diff --git a/gcc9-Wno-format-security.patch b/gcc10-Wno-format-security.patch
similarity index 88%
rename from gcc9-Wno-format-security.patch
rename to gcc10-Wno-format-security.patch
index cb21e5d..974ea44 100644
--- a/gcc9-Wno-format-security.patch
+++ b/gcc10-Wno-format-security.patch
@@ -5,7 +5,7 @@
--- gcc/configure.ac.jj 2017-02-13 12:20:53.000000000 +0100
+++ gcc/configure.ac 2017-02-25 12:42:32.859175403 +0100
-@@ -481,7 +481,7 @@ AC_ARG_ENABLE(build-format-warnings,
+@@ -480,7 +480,7 @@ AC_ARG_ENABLE(build-format-warnings,
AS_HELP_STRING([--disable-build-format-warnings],[don't use -Wformat while building GCC]),
[],[enable_build_format_warnings=yes])
AS_IF([test $enable_build_format_warnings = no],
@@ -13,7 +13,7 @@
+ [wf_opt="-Wno-format -Wno-format-security"],[wf_opt=])
ACX_PROG_CXX_WARNING_OPTS(
m4_quote(m4_do([-W -Wall -Wno-narrowing -Wwrite-strings ],
- [-Wcast-qual $wf_opt])), [loose_warn])
+ [-Wcast-qual -Wno-error=format-diag $wf_opt])),
--- gcc/configure.jj 2017-02-13 12:20:52.000000000 +0100
+++ gcc/configure 2017-02-25 12:42:50.041946391 +0100
@@ -6647,7 +6647,7 @@ else
diff --git a/gcc9-d-shared-libphobos.patch b/gcc10-d-shared-libphobos.patch
similarity index 100%
rename from gcc9-d-shared-libphobos.patch
rename to gcc10-d-shared-libphobos.patch
diff --git a/gcc9-foffload-default.patch b/gcc10-foffload-default.patch
similarity index 92%
rename from gcc9-foffload-default.patch
rename to gcc10-foffload-default.patch
index ac462f1..4a87e9f 100644
--- a/gcc9-foffload-default.patch
+++ b/gcc10-foffload-default.patch
@@ -58,7 +58,7 @@ libgomp/
enum lto_mode_d {
LTO_MODE_NONE, /* Not doing LTO. */
-@@ -820,6 +821,12 @@ compile_offload_image (const char *targe
+@@ -822,6 +823,12 @@ compile_offload_image (const char *targe
break;
}
@@ -70,8 +70,8 @@ libgomp/
+
if (!compiler)
fatal_error (input_location,
- "could not find %s in %s (consider using %<-B%>)\n",
-@@ -883,6 +890,7 @@ compile_images_for_offload_targets (unsi
+ "could not find %s in %s (consider using %<-B%>)",
+@@ -885,6 +892,7 @@ compile_images_for_offload_targets (unsi
unsigned num_targets = parse_env_var (target_names, &names, NULL);
int next_name_entry = 0;
@@ -79,7 +79,7 @@ libgomp/
const char *compiler_path = getenv ("COMPILER_PATH");
if (!compiler_path)
goto out;
-@@ -895,18 +903,26 @@ compile_images_for_offload_targets (unsi
+@@ -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)
@@ -95,7 +95,7 @@ libgomp/
linker_opts, linker_opt_count);
if (!offload_names[next_name_entry])
- fatal_error (input_location,
-- "problem with building target image for %s\n", names[i]);
+- "problem with building target image for %s", names[i]);
+ continue;
next_name_entry++;
}
diff --git a/gcc9-hack.patch b/gcc10-hack.patch
similarity index 100%
rename from gcc9-hack.patch
rename to gcc10-hack.patch
diff --git a/gcc9-i386-libgomp.patch b/gcc10-i386-libgomp.patch
similarity index 100%
rename from gcc9-i386-libgomp.patch
rename to gcc10-i386-libgomp.patch
diff --git a/gcc9-isl-dl.patch b/gcc10-isl-dl.patch
similarity index 99%
rename from gcc9-isl-dl.patch
rename to gcc10-isl-dl.patch
index 46d3b0d..c681895 100644
--- a/gcc9-isl-dl.patch
+++ b/gcc10-isl-dl.patch
@@ -1,15 +1,15 @@
--- gcc/Makefile.in.jj 2015-06-06 10:00:25.000000000 +0200
+++ gcc/Makefile.in 2015-11-04 14:56:02.643536437 +0100
-@@ -1046,7 +1046,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
+@@ -1063,7 +1063,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
# and the system's installed libraries.
LIBS = @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) \
$(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS)
-BACKENDLIBS = $(ISLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
+BACKENDLIBS = $(if $(ISLLIBS),-ldl) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
- $(ZLIB)
+ $(ZLIB) $(ZSTD_LIB)
# Any system libraries needed just for GNAT.
SYSLIBS = @GNAT_LIBEXC@
-@@ -2196,6 +2196,15 @@ $(out_object_file): $(out_file)
+@@ -2302,6 +2302,15 @@ $(out_object_file): $(out_file)
$(common_out_object_file): $(common_out_file)
$(COMPILE) $<
$(POSTCOMPILE)
diff --git a/gcc9-libgomp-omp_h-multilib.patch b/gcc10-libgomp-omp_h-multilib.patch
similarity index 100%
rename from gcc9-libgomp-omp_h-multilib.patch
rename to gcc10-libgomp-omp_h-multilib.patch
diff --git a/gcc9-libstdc++-docs.patch b/gcc10-libstdc++-docs.patch
similarity index 91%
rename from gcc9-libstdc++-docs.patch
rename to gcc10-libstdc++-docs.patch
index 25990ff..56c01da 100644
--- a/gcc9-libstdc++-docs.patch
+++ b/gcc10-libstdc++-docs.patch
@@ -4,7 +4,7 @@
FSF
-+ Release 9.2.1
++ Release 10.0.1
+
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation
@@ -17,7 +17,7 @@
- The API documentation, rendered into HTML, can be viewed online
+ The API documentation, rendered into HTML, can be viewed locally
-+ for the 9.2.1 release,
++ for the 10.0.1 release,
+ online
for each GCC release
and
diff --git a/gcc9-libtool-no-rpath.patch b/gcc10-libtool-no-rpath.patch
similarity index 100%
rename from gcc9-libtool-no-rpath.patch
rename to gcc10-libtool-no-rpath.patch
diff --git a/gcc9-no-add-needed.patch b/gcc10-no-add-needed.patch
similarity index 100%
rename from gcc9-no-add-needed.patch
rename to gcc10-no-add-needed.patch
diff --git a/gcc9-rh1574936.patch b/gcc10-rh1574936.patch
similarity index 88%
rename from gcc9-rh1574936.patch
rename to gcc10-rh1574936.patch
index 32db990..6b4be0c 100644
--- a/gcc9-rh1574936.patch
+++ b/gcc10-rh1574936.patch
@@ -12,7 +12,7 @@ these notes only confer that there is no other annobin markup.
--- libgcc/Makefile.in 2018-01-13 13:05:41.000000000 +0100
+++ libgcc/Makefile.in 2018-07-25 13:15:02.036226940 +0200
-@@ -244,6 +244,7 @@
+@@ -246,6 +246,7 @@ LIBGCC2_DEBUG_CFLAGS = -g
LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \
$(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 \
-fbuilding-libgcc -fno-stack-protector \
@@ -20,12 +20,11 @@ these notes only confer that there is no other annobin markup.
$(INHIBIT_LIBC_CFLAGS)
# Additional options to use when compiling libgcc2.a.
-@@ -297,6 +298,7 @@
+@@ -301,6 +302,7 @@ CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(IN
$(NO_PIE_CFLAGS) -finhibit-size-directive -fno-inline -fno-exceptions \
-fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \
-fbuilding-libgcc -fno-stack-protector $(FORCE_EXPLICIT_EH_REGISTRY) \
+ -Wa,--generate-missing-build-notes=yes \
- $(INHIBIT_LIBC_CFLAGS)
+ $(INHIBIT_LIBC_CFLAGS) $(USE_TM_CLONE_REGISTRY)
# Extra flags to use when compiling crt{begin,end}.o.
-
diff --git a/gcc9-sparc-config-detection.patch b/gcc10-sparc-config-detection.patch
similarity index 100%
rename from gcc9-sparc-config-detection.patch
rename to gcc10-sparc-config-detection.patch
diff --git a/nvptx-tools-build.patch b/nvptx-tools-build.patch
deleted file mode 100644
index 53d7483..0000000
--- a/nvptx-tools-build.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- nvptx-tools/nvptx-as.c.jj 2017-01-20 12:40:18.000000000 +0100
-+++ nvptx-tools/nvptx-as.c 2017-01-20 12:43:53.864271442 +0100
-@@ -939,7 +939,7 @@ fork_execute (const char *prog, char *co
- fatal_error ("%s: %m", errmsg);
- }
- else
-- fatal_error (errmsg);
-+ fatal_error ("%s", errmsg);
- }
- do_wait (prog, pex);
- }
diff --git a/nvptx-tools-glibc.patch b/nvptx-tools-glibc.patch
deleted file mode 100644
index 4b50114..0000000
--- a/nvptx-tools-glibc.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- nvptx-tools/configure.ac.jj 2017-01-13 12:48:31.000000000 +0100
-+++ nvptx-tools/configure.ac 2017-05-03 10:26:57.076092259 +0200
-@@ -66,6 +66,8 @@ CPPFLAGS=$save_CPPFLAGS
- LDFLAGS=$save_LDFLAGS
- LIBS=$save_LIBS
-
-+AC_CHECK_DECLS(getopt)
-+
- AC_CONFIG_SUBDIRS([libiberty])
- AC_CONFIG_FILES([Makefile dejagnu.exp])
- AC_OUTPUT
---- nvptx-tools/configure.jj 2017-01-13 12:48:54.000000000 +0100
-+++ nvptx-tools/configure 2017-05-03 10:27:13.503876809 +0200
-@@ -3963,6 +3963,18 @@ CPPFLAGS=$save_CPPFLAGS
- LDFLAGS=$save_LDFLAGS
- LIBS=$save_LIBS
-
-+ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
-+if test "x$ac_cv_have_decl_getopt" = x""yes; then :
-+ ac_have_decl=1
-+else
-+ ac_have_decl=0
-+fi
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_DECL_GETOPT $ac_have_decl
-+_ACEOF
-+
-+
-
-
- subdirs="$subdirs libiberty"
diff --git a/nvptx-tools-no-ptxas.patch b/nvptx-tools-no-ptxas.patch
deleted file mode 100644
index 28bc597..0000000
--- a/nvptx-tools-no-ptxas.patch
+++ /dev/null
@@ -1,947 +0,0 @@
---- nvptx-tools/configure.ac
-+++ nvptx-tools/configure.ac
-@@ -51,6 +51,7 @@ LIBS="$LIBS -lcuda"
- AC_CHECK_FUNCS([[cuGetErrorName] [cuGetErrorString]])
- AC_CHECK_DECLS([[cuGetErrorName], [cuGetErrorString]],
- [], [], [[#include ]])
-+AC_CHECK_HEADERS(unistd.h sys/stat.h)
-
- AC_MSG_CHECKING([for extra programs to build requiring -lcuda])
- NVPTX_RUN=
---- nvptx-tools/include/libiberty.h
-+++ nvptx-tools/include/libiberty.h
-@@ -390,6 +390,17 @@ extern void hex_init (void);
- /* Save files used for communication between processes. */
- #define PEX_SAVE_TEMPS 0x4
-
-+/* Max number of alloca bytes per call before we must switch to malloc.
-+
-+ ?? Swiped from gnulib's regex_internal.h header. Is this actually
-+ the case? This number seems arbitrary, though sane.
-+
-+ The OS usually guarantees only one guard page at the bottom of the stack,
-+ and a page size can be as small as 4096 bytes. So we cannot safely
-+ allocate anything larger than 4096 bytes. Also care for the possibility
-+ of a few compiler-allocated temporary stack slots. */
-+#define MAX_ALLOCA_SIZE 4032
-+
- /* Prepare to execute one or more programs, with standard output of
- each program fed to standard input of the next.
- FLAGS As above.
---- nvptx-tools/nvptx-as.c
-+++ nvptx-tools/nvptx-as.c
-@@ -30,6 +30,9 @@
- #include
- #include
- #include
-+#ifdef HAVE_SYS_STAT_H
-+#include
-+#endif
- #include
- #define obstack_chunk_alloc malloc
- #define obstack_chunk_free free
-@@ -42,6 +45,38 @@
-
- #include "version.h"
-
-+#ifndef R_OK
-+#define R_OK 4
-+#define W_OK 2
-+#define X_OK 1
-+#endif
-+
-+#ifndef DIR_SEPARATOR
-+# define DIR_SEPARATOR '/'
-+#endif
-+
-+#if defined (_WIN32) || defined (__MSDOS__) \
-+ || defined (__DJGPP__) || defined (__OS2__)
-+# define HAVE_DOS_BASED_FILE_SYSTEM
-+# define HAVE_HOST_EXECUTABLE_SUFFIX
-+# define HOST_EXECUTABLE_SUFFIX ".exe"
-+# ifndef DIR_SEPARATOR_2
-+# define DIR_SEPARATOR_2 '\\'
-+# endif
-+# define PATH_SEPARATOR ';'
-+#else
-+# define PATH_SEPARATOR ':'
-+#endif
-+
-+#ifndef DIR_SEPARATOR_2
-+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
-+#else
-+# define IS_DIR_SEPARATOR(ch) \
-+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
-+#endif
-+
-+#define DIR_UP ".."
-+
- static const char *outname = NULL;
-
- static void __attribute__ ((format (printf, 1, 2)))
-@@ -816,7 +851,7 @@ traverse (void **slot, void *data)
- }
-
- static void
--process (FILE *in, FILE *out)
-+process (FILE *in, FILE *out, int verify, const char *outname)
- {
- symbol_table = htab_create (500, hash_string_hash, hash_string_eq,
- NULL);
-@@ -824,6 +859,18 @@ process (FILE *in, FILE *out)
- const char *input = read_file (in);
- Token *tok = tokenize (input);
-
-+ /* By default, when ptxas is not in PATH, do minimalistic verification,
-+ just require that the first non-comment directive is .version. */
-+ if (verify < 0)
-+ {
-+ size_t i;
-+ for (i = 0; tok[i].kind == K_comment; i++)
-+ ;
-+ if (tok[i].kind != K_dotted || !is_keyword (&tok[i], "version"))
-+ fatal_error ("missing .version directive at start of file '%s'",
-+ outname);
-+ }
-+
- do
- tok = parse_file (tok);
- while (tok->kind);
-@@ -897,9 +944,83 @@ fork_execute (const char *prog, char *const *argv)
- do_wait (prog, pex);
- }
-
-+/* Determine if progname is available in PATH. */
-+static bool
-+program_available (const char *progname)
-+{
-+ char *temp = getenv ("PATH");
-+ if (temp)
-+ {
-+ char *startp, *endp, *nstore, *alloc_ptr = NULL;
-+ size_t prefixlen = strlen (temp) + 1;
-+ size_t len;
-+ if (prefixlen < 2)
-+ prefixlen = 2;
-+
-+ len = prefixlen + strlen (progname) + 1;
-+#ifdef HAVE_HOST_EXECUTABLE_SUFFIX
-+ len += strlen (HOST_EXECUTABLE_SUFFIX);
-+#endif
-+ if (len < MAX_ALLOCA_SIZE)
-+ nstore = (char *) alloca (len);
-+ else
-+ alloc_ptr = nstore = (char *) malloc (len);
-+
-+ startp = endp = temp;
-+ while (1)
-+ {
-+ if (*endp == PATH_SEPARATOR || *endp == 0)
-+ {
-+ if (endp == startp)
-+ {
-+ nstore[0] = '.';
-+ nstore[1] = DIR_SEPARATOR;
-+ nstore[2] = '\0';
-+ }
-+ else
-+ {
-+ memcpy (nstore, startp, endp - startp);
-+ if (! IS_DIR_SEPARATOR (endp[-1]))
-+ {
-+ nstore[endp - startp] = DIR_SEPARATOR;
-+ nstore[endp - startp + 1] = 0;
-+ }
-+ else
-+ nstore[endp - startp] = 0;
-+ }
-+ strcat (nstore, progname);
-+ if (! access (nstore, X_OK)
-+#ifdef HAVE_HOST_EXECUTABLE_SUFFIX
-+ || ! access (strcat (nstore, HOST_EXECUTABLE_SUFFIX), X_OK)
-+#endif
-+ )
-+ {
-+#if defined (HAVE_SYS_STAT_H) && defined (S_ISREG)
-+ struct stat st;
-+ if (stat (nstore, &st) >= 0 && S_ISREG (st.st_mode))
-+#endif
-+ {
-+ free (alloc_ptr);
-+ return true;
-+ }
-+ }
-+
-+ if (*endp == 0)
-+ break;
-+ endp = startp = endp + 1;
-+ }
-+ else
-+ endp++;
-+ }
-+ free (alloc_ptr);
-+ }
-+ return false;
-+}
-+
- static struct option long_options[] = {
- {"traditional-format", no_argument, 0, 0 },
- {"save-temps", no_argument, 0, 0 },
-+ {"verify", no_argument, 0, 0 },
- {"no-verify", no_argument, 0, 0 },
- {"help", no_argument, 0, 'h' },
- {"version", no_argument, 0, 'V' },
-@@ -912,7 +1033,7 @@ main (int argc, char **argv)
- FILE *in = stdin;
- FILE *out = stdout;
- bool verbose __attribute__((unused)) = false;
-- bool verify = true;
-+ int verify = -1;
- const char *smver = "sm_30";
-
- int o;
-@@ -923,7 +1044,9 @@ main (int argc, char **argv)
- {
- case 0:
- if (option_index == 2)
-- verify = false;
-+ verify = 1;
-+ else if (option_index == 3)
-+ verify = 0;
- break;
- case 'v':
- verbose = true;
-@@ -948,7 +1071,8 @@ Usage: nvptx-none-as [option...] [asmfile]\n\
- Options:\n\
- -o FILE Write output to FILE\n\
- -v Be verbose\n\
-+ --verify Do verify output is acceptable to ptxas\n\
- --no-verify Do not verify output is acceptable to ptxas\n\
- --help Print this help and exit\n\
- --version Print version number and exit\n\
- \n\
-@@ -983,11 +1108,17 @@ This program has absolutely no warranty.\n",
- if (!in)
- fatal_error ("cannot open input ptx file");
-
-- process (in, out);
-- if (outname)
-+ if (outname == NULL)
-+ verify = 0;
-+ else if (verify == -1)
-+ if (program_available ("ptxas"))
-+ verify = 1;
-+
-+ process (in, out, verify, outname);
-+ if (outname)
- fclose (out);
-
-- if (verify && outname)
-+ if (verify > 0)
- {
- struct obstack argv_obstack;
- obstack_init (&argv_obstack);
---- nvptx-tools/configure
-+++ nvptx-tools/configure
-@@ -168,7 +168,8 @@ test x\$exitcode = x0 || exit 1"
- as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
- as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
- eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
-- test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
-+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
-+test \$(( 1 + 1 )) = 2 || exit 1"
- if (eval "$as_required") 2>/dev/null; then :
- as_have_required=yes
- else
-@@ -552,11 +553,50 @@ PACKAGE_URL=
-
- ac_unique_file="nvptx-tools"
- ac_unique_file="nvptx-as.c"
-+# Factoring default headers for most tests.
-+ac_includes_default="\
-+#include
-+#ifdef HAVE_SYS_TYPES_H
-+# include
-+#endif
-+#ifdef HAVE_SYS_STAT_H
-+# include
-+#endif
-+#ifdef STDC_HEADERS
-+# include
-+# include
-+#else
-+# ifdef HAVE_STDLIB_H
-+# include
-+# endif
-+#endif
-+#ifdef HAVE_STRING_H
-+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-+# include
-+# endif
-+# include
-+#endif
-+#ifdef HAVE_STRINGS_H
-+# include
-+#endif
-+#ifdef HAVE_INTTYPES_H
-+# include
-+#endif
-+#ifdef HAVE_STDINT_H
-+# include
-+#endif
-+#ifdef HAVE_UNISTD_H
-+# include
-+#endif"
-+
- enable_option_checking=no
- ac_subst_vars='LTLIBOBJS
- LIBOBJS
- subdirs
- NVPTX_RUN
-+EGREP
-+GREP
-+CPP
- CUDA_DRIVER_LDFLAGS
- CUDA_DRIVER_CPPFLAGS
- AR
-@@ -635,7 +675,8 @@ LIBS
- CPPFLAGS
- CXX
- CXXFLAGS
--CCC'
-+CCC
-+CPP'
- ac_subdirs_all='libiberty'
-
- # Initialize some variables set by options.
-@@ -1267,6 +1308,7 @@ Some influential environment variables:
- you have headers in a nonstandard directory
- CXX C++ compiler command
- CXXFLAGS C++ compiler flags
-+ CPP C preprocessor
-
- Use these variables to override the choices made by `configure' or to help
- it to find libraries and programs with nonstandard names/locations.
-@@ -1575,6 +1617,203 @@ $as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
- } # ac_fn_c_check_decl
-+
-+# ac_fn_c_try_cpp LINENO
-+# ----------------------
-+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-+ac_fn_c_try_cpp ()
-+{
-+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-+ if { { ac_try="$ac_cpp conftest.$ac_ext"
-+case "(($ac_try" in
-+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+ *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-+$as_echo "$ac_try_echo"; } >&5
-+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
-+ ac_status=$?
-+ if test -s conftest.err; then
-+ grep -v '^ *+' conftest.err >conftest.er1
-+ cat conftest.er1 >&5
-+ mv -f conftest.er1 conftest.err
-+ fi
-+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+ test $ac_status = 0; } >/dev/null && {
-+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-+ test ! -s conftest.err
-+ }; then :
-+ ac_retval=0
-+else
-+ $as_echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ ac_retval=1
-+fi
-+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-+ return $ac_retval
-+
-+} # ac_fn_c_try_cpp
-+
-+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-+# -------------------------------------------------------
-+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-+# the include files in INCLUDES and setting the cache variable VAR
-+# accordingly.
-+ac_fn_c_check_header_mongrel ()
-+{
-+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-+ if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-+$as_echo_n "checking for $2... " >&6; }
-+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-+ $as_echo_n "(cached) " >&6
-+fi
-+eval ac_res=\$$3
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-+$as_echo "$ac_res" >&6; }
-+else
-+ # Is the header compilable?
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-+$as_echo_n "checking $2 usability... " >&6; }
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+$4
-+#include <$2>
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+ ac_header_compiler=yes
-+else
-+ ac_header_compiler=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-+$as_echo "$ac_header_compiler" >&6; }
-+
-+# Is the header present?
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-+$as_echo_n "checking $2 presence... " >&6; }
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#include <$2>
-+_ACEOF
-+if ac_fn_c_try_cpp "$LINENO"; then :
-+ ac_header_preproc=yes
-+else
-+ ac_header_preproc=no
-+fi
-+rm -f conftest.err conftest.$ac_ext
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-+$as_echo "$ac_header_preproc" >&6; }
-+
-+# So? What about this header?
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
-+ yes:no: )
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-+ ;;
-+ no:yes:* )
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
-+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
-+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-+ ;;
-+esac
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-+$as_echo_n "checking for $2... " >&6; }
-+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ eval "$3=\$ac_header_compiler"
-+fi
-+eval ac_res=\$$3
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-+$as_echo "$ac_res" >&6; }
-+fi
-+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-+
-+} # ac_fn_c_check_header_mongrel
-+
-+# ac_fn_c_try_run LINENO
-+# ----------------------
-+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-+# that executables *can* be run.
-+ac_fn_c_try_run ()
-+{
-+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-+ if { { ac_try="$ac_link"
-+case "(($ac_try" in
-+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+ *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-+$as_echo "$ac_try_echo"; } >&5
-+ (eval "$ac_link") 2>&5
-+ ac_status=$?
-+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
-+ { { case "(($ac_try" in
-+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+ *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-+$as_echo "$ac_try_echo"; } >&5
-+ (eval "$ac_try") 2>&5
-+ ac_status=$?
-+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+ test $ac_status = 0; }; }; then :
-+ ac_retval=0
-+else
-+ $as_echo "$as_me: program exited with status $ac_status" >&5
-+ $as_echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ ac_retval=$ac_status
-+fi
-+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-+ return $ac_retval
-+
-+} # ac_fn_c_try_run
-+
-+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-+# -------------------------------------------------------
-+# Tests whether HEADER exists and can be compiled using the include files in
-+# INCLUDES, setting the cache variable VAR accordingly.
-+ac_fn_c_check_header_compile ()
-+{
-+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-+$as_echo_n "checking for $2... " >&6; }
-+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+$4
-+#include <$2>
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+ eval "$3=yes"
-+else
-+ eval "$3=no"
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+eval ac_res=\$$3
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-+$as_echo "$ac_res" >&6; }
-+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-+
-+} # ac_fn_c_check_header_compile
- cat >config.log <<_ACEOF
- This file contains any messages produced by compilers while
- running configure, to aid debugging if configure makes a mistake.
-@@ -3284,6 +3523,418 @@ cat >>confdefs.h <<_ACEOF
- #define HAVE_DECL_CUGETERRORSTRING $ac_have_decl
- _ACEOF
-
-+ac_ext=c
-+ac_cpp='$CPP $CPPFLAGS'
-+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-+$as_echo_n "checking how to run the C preprocessor... " >&6; }
-+# On Suns, sometimes $CPP names a directory.
-+if test -n "$CPP" && test -d "$CPP"; then
-+ CPP=
-+fi
-+if test -z "$CPP"; then
-+ if test "${ac_cv_prog_CPP+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ # Double quotes because CPP needs to be expanded
-+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-+ do
-+ ac_preproc_ok=false
-+for ac_c_preproc_warn_flag in '' yes
-+do
-+ # Use a header file that comes with gcc, so configuring glibc
-+ # with a fresh cross-compiler works.
-+ # Prefer to if __STDC__ is defined, since
-+ # exists even on freestanding compilers.
-+ # On the NeXT, cc -E runs the code through the compiler's parser,
-+ # not just through cpp. "Syntax error" is here to catch this case.
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#ifdef __STDC__
-+# include
-+#else
-+# include
-+#endif
-+ Syntax error
-+_ACEOF
-+if ac_fn_c_try_cpp "$LINENO"; then :
-+
-+else
-+ # Broken: fails on valid input.
-+continue
-+fi
-+rm -f conftest.err conftest.$ac_ext
-+
-+ # OK, works on sane cases. Now check whether nonexistent headers
-+ # can be detected and how.
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#include
-+_ACEOF
-+if ac_fn_c_try_cpp "$LINENO"; then :
-+ # Broken: success on invalid input.
-+continue
-+else
-+ # Passes both tests.
-+ac_preproc_ok=:
-+break
-+fi
-+rm -f conftest.err conftest.$ac_ext
-+
-+done
-+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-+rm -f conftest.err conftest.$ac_ext
-+if $ac_preproc_ok; then :
-+ break
-+fi
-+
-+ done
-+ ac_cv_prog_CPP=$CPP
-+
-+fi
-+ CPP=$ac_cv_prog_CPP
-+else
-+ ac_cv_prog_CPP=$CPP
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-+$as_echo "$CPP" >&6; }
-+ac_preproc_ok=false
-+for ac_c_preproc_warn_flag in '' yes
-+do
-+ # Use a header file that comes with gcc, so configuring glibc
-+ # with a fresh cross-compiler works.
-+ # Prefer to if __STDC__ is defined, since
-+ # exists even on freestanding compilers.
-+ # On the NeXT, cc -E runs the code through the compiler's parser,
-+ # not just through cpp. "Syntax error" is here to catch this case.
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#ifdef __STDC__
-+# include
-+#else
-+# include
-+#endif
-+ Syntax error
-+_ACEOF
-+if ac_fn_c_try_cpp "$LINENO"; then :
-+
-+else
-+ # Broken: fails on valid input.
-+continue
-+fi
-+rm -f conftest.err conftest.$ac_ext
-+
-+ # OK, works on sane cases. Now check whether nonexistent headers
-+ # can be detected and how.
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#include
-+_ACEOF
-+if ac_fn_c_try_cpp "$LINENO"; then :
-+ # Broken: success on invalid input.
-+continue
-+else
-+ # Passes both tests.
-+ac_preproc_ok=:
-+break
-+fi
-+rm -f conftest.err conftest.$ac_ext
-+
-+done
-+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-+rm -f conftest.err conftest.$ac_ext
-+if $ac_preproc_ok; then :
-+
-+else
-+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+as_fn_error "C preprocessor \"$CPP\" fails sanity check
-+See \`config.log' for more details." "$LINENO" 5; }
-+fi
-+
-+ac_ext=c
-+ac_cpp='$CPP $CPPFLAGS'
-+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-+
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-+if test "${ac_cv_path_GREP+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -z "$GREP"; then
-+ ac_path_GREP_found=false
-+ # Loop through the user's path and test for each of PROGNAME-LIST
-+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_prog in grep ggrep; do
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-+# Check for GNU ac_path_GREP and select it if it is found.
-+ # Check for GNU $ac_path_GREP
-+case `"$ac_path_GREP" --version 2>&1` in
-+*GNU*)
-+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-+*)
-+ ac_count=0
-+ $as_echo_n 0123456789 >"conftest.in"
-+ while :
-+ do
-+ cat "conftest.in" "conftest.in" >"conftest.tmp"
-+ mv "conftest.tmp" "conftest.in"
-+ cp "conftest.in" "conftest.nl"
-+ $as_echo 'GREP' >> "conftest.nl"
-+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-+ as_fn_arith $ac_count + 1 && ac_count=$as_val
-+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
-+ # Best one so far, save it but keep looking for a better one
-+ ac_cv_path_GREP="$ac_path_GREP"
-+ ac_path_GREP_max=$ac_count
-+ fi
-+ # 10*(2^10) chars as input seems more than enough
-+ test $ac_count -gt 10 && break
-+ done
-+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-+esac
-+
-+ $ac_path_GREP_found && break 3
-+ done
-+ done
-+ done
-+IFS=$as_save_IFS
-+ if test -z "$ac_cv_path_GREP"; then
-+ as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-+ fi
-+else
-+ ac_cv_path_GREP=$GREP
-+fi
-+
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-+$as_echo "$ac_cv_path_GREP" >&6; }
-+ GREP="$ac_cv_path_GREP"
-+
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-+$as_echo_n "checking for egrep... " >&6; }
-+if test "${ac_cv_path_EGREP+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-+ then ac_cv_path_EGREP="$GREP -E"
-+ else
-+ if test -z "$EGREP"; then
-+ ac_path_EGREP_found=false
-+ # Loop through the user's path and test for each of PROGNAME-LIST
-+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_prog in egrep; do
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-+# Check for GNU ac_path_EGREP and select it if it is found.
-+ # Check for GNU $ac_path_EGREP
-+case `"$ac_path_EGREP" --version 2>&1` in
-+*GNU*)
-+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-+*)
-+ ac_count=0
-+ $as_echo_n 0123456789 >"conftest.in"
-+ while :
-+ do
-+ cat "conftest.in" "conftest.in" >"conftest.tmp"
-+ mv "conftest.tmp" "conftest.in"
-+ cp "conftest.in" "conftest.nl"
-+ $as_echo 'EGREP' >> "conftest.nl"
-+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-+ as_fn_arith $ac_count + 1 && ac_count=$as_val
-+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
-+ # Best one so far, save it but keep looking for a better one
-+ ac_cv_path_EGREP="$ac_path_EGREP"
-+ ac_path_EGREP_max=$ac_count
-+ fi
-+ # 10*(2^10) chars as input seems more than enough
-+ test $ac_count -gt 10 && break
-+ done
-+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-+esac
-+
-+ $ac_path_EGREP_found && break 3
-+ done
-+ done
-+ done
-+IFS=$as_save_IFS
-+ if test -z "$ac_cv_path_EGREP"; then
-+ as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-+ fi
-+else
-+ ac_cv_path_EGREP=$EGREP
-+fi
-+
-+ fi
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-+$as_echo "$ac_cv_path_EGREP" >&6; }
-+ EGREP="$ac_cv_path_EGREP"
-+
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-+$as_echo_n "checking for ANSI C header files... " >&6; }
-+if test "${ac_cv_header_stdc+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#include
-+#include
-+#include
-+#include
-+
-+int
-+main ()
-+{
-+
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+ ac_cv_header_stdc=yes
-+else
-+ ac_cv_header_stdc=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+
-+if test $ac_cv_header_stdc = yes; then
-+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#include
-+
-+_ACEOF
-+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-+ $EGREP "memchr" >/dev/null 2>&1; then :
-+
-+else
-+ ac_cv_header_stdc=no
-+fi
-+rm -f conftest*
-+
-+fi
-+
-+if test $ac_cv_header_stdc = yes; then
-+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#include
-+
-+_ACEOF
-+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-+ $EGREP "free" >/dev/null 2>&1; then :
-+
-+else
-+ ac_cv_header_stdc=no
-+fi
-+rm -f conftest*
-+
-+fi
-+
-+if test $ac_cv_header_stdc = yes; then
-+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-+ if test "$cross_compiling" = yes; then :
-+ :
-+else
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#include
-+#include
-+#if ((' ' & 0x0FF) == 0x020)
-+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-+#else
-+# define ISLOWER(c) \
-+ (('a' <= (c) && (c) <= 'i') \
-+ || ('j' <= (c) && (c) <= 'r') \
-+ || ('s' <= (c) && (c) <= 'z'))
-+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-+#endif
-+
-+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-+int
-+main ()
-+{
-+ int i;
-+ for (i = 0; i < 256; i++)
-+ if (XOR (islower (i), ISLOWER (i))
-+ || toupper (i) != TOUPPER (i))
-+ return 2;
-+ return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+
-+else
-+ ac_cv_header_stdc=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+ conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
-+
-+fi
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-+$as_echo "$ac_cv_header_stdc" >&6; }
-+if test $ac_cv_header_stdc = yes; then
-+
-+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-+
-+fi
-+
-+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-+ inttypes.h stdint.h unistd.h
-+do :
-+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-+"
-+eval as_val=\$$as_ac_Header
-+ if test "x$as_val" = x""yes; then :
-+ cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
-+
-+done
-+
-+
-+for ac_header in unistd.h sys/stat.h
-+do :
-+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+ if test "x$as_val" = x""yes; then :
-+ cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
-+
-+done
-+
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra programs to build requiring -lcuda" >&5
- $as_echo_n "checking for extra programs to build requiring -lcuda... " >&6; }
diff --git a/sources b/sources
index 04b7e4e..0422319 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-9.2.1-20191120.tar.xz) = cbd156d19afc4d4e752df3aee159906899f229342c314dcb16699e29bb43c0ac63b35ced11fcc50c4017c20e4e0e5609d941d88abcfe16e3903c3e7da6050acd
-SHA512 (nvptx-newlib-aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24.tar.xz) = 94f7089365296f7dfa485107b4143bebc850a81586f3460fd896bbbb6ba099a00217d4042133424fd2183b352132f4fd367e6a60599bdae2a26dfd48a77d0e04
-SHA512 (nvptx-tools-c28050f60193b3b95a18866a96f03334e874e78f.tar.xz) = a688cb12cf805950a5abbb13b52f45c81dbee98e310b7ed57ae20e76dbfa5964a16270148374a6426d177db71909d28360490f091c86a5d19d4faa5127beeee1
+SHA512 (gcc-10.0.1-20200118.tar.xz) = 665e1cea975dbfc2ad75db3eb3e5a757487b2a371fa3dd830a3a0897cf9553853e7b85ee1d2b221897cdeb7b861da22e05d20a0740c12ff137700c1a82cfdd4f
+SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 9ceea0b883185fe489724d54a7e909bb6ed4785fcadf80162033dc6a133e2657337175601278e4155d1f8fac275ff9c8a02572aea876166c608774c809f832e9
+SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
diff --git a/update-gcc.sh b/update-gcc.sh
new file mode 100755
index 0000000..845a024
--- /dev/null
+++ b/update-gcc.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+[ -d gcc-dir.tmp ] && echo gcc-dir.tmp already exists && exit 1
+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.0.1-$d/ $1 | xz -9e > gcc-10.0.1-$d.tar.xz
+rm -rf gcc-dir.tmp
From 57a884df51484cf26a86d39d10bf7ad8eb6835ed Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Sat, 18 Jan 2020 19:07:51 +0100
Subject: [PATCH 002/341] Fix nvptx-none build.
---
gcc.spec | 2 ++
gcc10-coroutines.patch | 16 ++++++++++++++++
2 files changed, 18 insertions(+)
create mode 100644 gcc10-coroutines.patch
diff --git a/gcc.spec b/gcc.spec
index 2d6aadd..59a6d95 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -256,6 +256,7 @@ Patch8: gcc10-foffload-default.patch
Patch9: gcc10-Wno-format-security.patch
Patch10: gcc10-rh1574936.patch
Patch11: gcc10-d-shared-libphobos.patch
+Patch12: gcc10-coroutines.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -767,6 +768,7 @@ to NVidia PTX capable devices if available.
%patch10 -p0 -b .rh1574936~
%endif
%patch11 -p0 -b .d-shared-libphobos~
+%patch12 -p0 -b .coroutines~
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
diff --git a/gcc10-coroutines.patch b/gcc10-coroutines.patch
new file mode 100644
index 0000000..87d3db1
--- /dev/null
+++ b/gcc10-coroutines.patch
@@ -0,0 +1,16 @@
+2020-01-18 Jakub Jelinek
+
+ * coroutines.cc (get_fn_local_identifier): Fix NO_DOT_IN_LABEL
+ but non-NO_DOLLAR_IN_LABEL case build.
+
+--- gcc/cp/coroutines.cc.jj 2020-01-18 13:47:09.318360691 +0100
++++ gcc/cp/coroutines.cc 2020-01-18 19:05:48.349119608 +0100
+@@ -2252,7 +2252,7 @@ get_fn_local_identifier (tree orig, cons
+ sep = ".";
+ #else
+ #ifndef NO_DOLLAR_IN_LABEL
+- sep = "$"
++ sep = "$";
+ #else
+ sep = "_";
+ pfx = "__";
From 562d27c22f5dae7241c83184ae0880c716b0187f Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Tue, 21 Jan 2020 14:19:34 +0100
Subject: [PATCH 003/341] 10.0.1-0.4
---
.gitignore | 1 +
gcc.spec | 21 ++++++++++++++++++---
sources | 2 +-
3 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/.gitignore b/.gitignore
index d6c3fb3..494a188 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/gcc-10.0.1-20200118.tar.xz
/newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz
/nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz
+/gcc-10.0.1-20200121.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 59a6d95..3fffd84 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20200118
-%global gitrev cef2a35ef0b6b1f728face9ba5530f0eb69b1d50
+%global DATE 20200121
+%global gitrev 0d664c7566fe5bf444420c5333401ac056e1a5d6
%global gcc_version 10.0.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 0.3
+%global gcc_release 0.4
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -15,6 +15,9 @@
# Until annobin is fixed (#1519165).
%undefine _annotated_build
%endif
+%if 0%{?__brp_strip_static_archive:1}
+%global __brp_strip_static_archive %{__brp_strip_static_archive} || :
+%endif
%if 0%{?fedora} < 32
%global multilib_64_archs sparc64 ppc64 ppc64p7 s390x x86_64
%else
@@ -2145,11 +2148,14 @@ end
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_acle.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_cmse.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_fp16.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_bf16.h
%endif
%ifarch aarch64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_neon.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_acle.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_fp16.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_bf16.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_sve.h
%endif
%ifarch sparc sparcv9 sparc64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/visintrin.h
@@ -2974,5 +2980,14 @@ end
%endif
%changelog
+* 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
- new package
diff --git a/sources b/sources
index 0422319..cc3b4a0 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-10.0.1-20200118.tar.xz) = 665e1cea975dbfc2ad75db3eb3e5a757487b2a371fa3dd830a3a0897cf9553853e7b85ee1d2b221897cdeb7b861da22e05d20a0740c12ff137700c1a82cfdd4f
+SHA512 (gcc-10.0.1-20200121.tar.xz) = da870a96e739a3091392b7f62d7fbe4ceef7d6f49644ca366a9a2918b87b70d859f58b3dccc8a53546b81012f4af9d92a709eed4d94ba137f713a08606a59fb6
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 9ceea0b883185fe489724d54a7e909bb6ed4785fcadf80162033dc6a133e2657337175601278e4155d1f8fac275ff9c8a02572aea876166c608774c809f832e9
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From 576d41c1c648410119dc3a9d3bb79e6504dce6d0 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Tue, 21 Jan 2020 14:25:31 +0100
Subject: [PATCH 004/341] 10.0.1-0.4
---
gcc.spec | 2 --
gcc10-coroutines.patch | 16 ----------------
2 files changed, 18 deletions(-)
delete mode 100644 gcc10-coroutines.patch
diff --git a/gcc.spec b/gcc.spec
index 3fffd84..346eef5 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -259,7 +259,6 @@ Patch8: gcc10-foffload-default.patch
Patch9: gcc10-Wno-format-security.patch
Patch10: gcc10-rh1574936.patch
Patch11: gcc10-d-shared-libphobos.patch
-Patch12: gcc10-coroutines.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -771,7 +770,6 @@ to NVidia PTX capable devices if available.
%patch10 -p0 -b .rh1574936~
%endif
%patch11 -p0 -b .d-shared-libphobos~
-%patch12 -p0 -b .coroutines~
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
diff --git a/gcc10-coroutines.patch b/gcc10-coroutines.patch
deleted file mode 100644
index 87d3db1..0000000
--- a/gcc10-coroutines.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-2020-01-18 Jakub Jelinek
-
- * coroutines.cc (get_fn_local_identifier): Fix NO_DOT_IN_LABEL
- but non-NO_DOLLAR_IN_LABEL case build.
-
---- gcc/cp/coroutines.cc.jj 2020-01-18 13:47:09.318360691 +0100
-+++ gcc/cp/coroutines.cc 2020-01-18 19:05:48.349119608 +0100
-@@ -2252,7 +2252,7 @@ get_fn_local_identifier (tree orig, cons
- sep = ".";
- #else
- #ifndef NO_DOLLAR_IN_LABEL
-- sep = "$"
-+ sep = "$";
- #else
- sep = "_";
- pfx = "__";
From 7de85a260324e7085a409d767e045458bcddb1bf Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Tue, 21 Jan 2020 14:37:47 +0100
Subject: [PATCH 005/341] 10.0.1-0.4
---
gcc.spec | 2 ++
gcc10-libcpp-lex-workaround.patch | 20 ++++++++++++++++++++
2 files changed, 22 insertions(+)
create mode 100644 gcc10-libcpp-lex-workaround.patch
diff --git a/gcc.spec b/gcc.spec
index 346eef5..29b2779 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -259,6 +259,7 @@ Patch8: gcc10-foffload-default.patch
Patch9: gcc10-Wno-format-security.patch
Patch10: gcc10-rh1574936.patch
Patch11: gcc10-d-shared-libphobos.patch
+Patch12: gcc10-libcpp-lex-workaround.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -770,6 +771,7 @@ to NVidia PTX capable devices if available.
%patch10 -p0 -b .rh1574936~
%endif
%patch11 -p0 -b .d-shared-libphobos~
+%patch12 -p0 -b .libcpp-lex-workaround~
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
diff --git a/gcc10-libcpp-lex-workaround.patch b/gcc10-libcpp-lex-workaround.patch
new file mode 100644
index 0000000..bcf5a33
--- /dev/null
+++ b/gcc10-libcpp-lex-workaround.patch
@@ -0,0 +1,20 @@
+--- libcpp/lex.c 2020-01-12 11:54:38.565380941 +0100
++++ libcpp/lex.c 2020-01-21 14:35:36.182794214 +0100
+@@ -752,7 +752,7 @@ search_line_fast (const uchar *s, const
+ }
+ }
+
+-#elif defined (__ARM_NEON) && defined (__ARM_64BIT_STATE)
++#elif defined (__ARM_NEON) && defined (__ARM_64BIT_STATE) && __has_include("arm_bf16.h")
+ #include "arm_neon.h"
+
+ /* This doesn't have to be the exact page size, but no system may use
+@@ -847,7 +847,7 @@ done:
+ + __builtin_ctz (found));
+ }
+
+-#elif defined (__ARM_NEON)
++#elif defined (__ARM_NEON) && __has_include("arm_bf16.h")
+ #include "arm_neon.h"
+
+ static const uchar *
From b84725ac52620fc887f578f76e736a4de204f3e2 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Thu, 23 Jan 2020 21:05:35 +0100
Subject: [PATCH 006/341] 10.0.1-0.5
---
.gitignore | 1 +
gcc.spec | 20 +++++++++++++++-----
sources | 2 +-
3 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/.gitignore b/.gitignore
index 494a188..8ce888f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
/newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz
/nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz
/gcc-10.0.1-20200121.tar.xz
+/gcc-10.0.1-20200123.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 29b2779..f398d51 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20200121
-%global gitrev 0d664c7566fe5bf444420c5333401ac056e1a5d6
+%global DATE 20200123
+%global gitrev 083f4455962cb0f38e406792b5aaa198f77ecc60
%global gcc_version 10.0.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 0.4
+%global gcc_release 0.5
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -259,7 +259,6 @@ Patch8: gcc10-foffload-default.patch
Patch9: gcc10-Wno-format-security.patch
Patch10: gcc10-rh1574936.patch
Patch11: gcc10-d-shared-libphobos.patch
-Patch12: gcc10-libcpp-lex-workaround.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -771,7 +770,6 @@ to NVidia PTX capable devices if available.
%patch10 -p0 -b .rh1574936~
%endif
%patch11 -p0 -b .d-shared-libphobos~
-%patch12 -p0 -b .libcpp-lex-workaround~
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@@ -2980,6 +2978,18 @@ end
%endif
%changelog
+* 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,
diff --git a/sources b/sources
index cc3b4a0..7f8eaea 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-10.0.1-20200121.tar.xz) = da870a96e739a3091392b7f62d7fbe4ceef7d6f49644ca366a9a2918b87b70d859f58b3dccc8a53546b81012f4af9d92a709eed4d94ba137f713a08606a59fb6
+SHA512 (gcc-10.0.1-20200123.tar.xz) = 0f729f71a0538c18c9ad882871abaed82c25d00d9bec6d65fac484cf4d9397308a5a69260c10a5d3e7c461972d102032857cf89951026490bbe2076bc693f892
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 9ceea0b883185fe489724d54a7e909bb6ed4785fcadf80162033dc6a133e2657337175601278e4155d1f8fac275ff9c8a02572aea876166c608774c809f832e9
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From 912e74c75637675ffb6285270645062c573f97fb Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Thu, 23 Jan 2020 22:56:53 +0100
Subject: [PATCH 007/341] Bump libgo.so version from 15 to 16.
---
gcc.spec | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/gcc.spec b/gcc.spec
index f398d51..8512f0c 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -280,7 +280,7 @@ Patch11: gcc10-d-shared-libphobos.patch
%if %{build_go}
# Avoid stripping these libraries and binaries.
%global __os_install_post \
-chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.15.* \
+chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.16.* \
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 \
@@ -288,7 +288,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.15.* \
+chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgo.so.16.* \
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 \
@@ -1349,7 +1349,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.15.* libgo.so
+ln -sf ../../../libgo.so.16.* libgo.so
%endif
%if %{build_libquadmath}
ln -sf ../../../libquadmath.so.0.* libquadmath.so
@@ -1379,7 +1379,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.15.* libgo.so
+ln -sf ../../../../%{_lib}/libgo.so.16.* libgo.so
%endif
%if %{build_libquadmath}
ln -sf ../../../../%{_lib}/libquadmath.so.0.* libquadmath.so
@@ -1499,8 +1499,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.15.* | sed 's,^.*libg,libg,'`' )' > libgo.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgo.so.15.* | sed 's,^.*libg,libg,'`' )' > 64/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
%endif
%if %{build_libquadmath}
rm -f libquadmath.so
@@ -1598,8 +1598,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.15.* | sed 's,^.*libg,libg,'`' )' > libgo.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgo.so.15.* | sed 's,^.*libg,libg,'`' )' > 32/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
%endif
%if %{build_libquadmath}
rm -f libquadmath.so
@@ -1786,7 +1786,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.15.*
+chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.16.*
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
@@ -2870,7 +2870,7 @@ end
%doc rpm.doc/go/*
%files -n libgo
-%attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.15*
+%attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.16*
%doc rpm.doc/libgo/*
%files -n libgo-devel
From 5e141990fb42f73cb145e51058cc3a2919cf7bf9 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Sun, 26 Jan 2020 19:19:00 +0100
Subject: [PATCH 008/341] 10.0.1-0.6
---
.gitignore | 1 +
gcc.spec | 45 +++++++++++++++++++++++++-----
gcc10-pr92765-workaround.patch | 51 ++++++++++++++++++++++++++++++++++
sources | 2 +-
4 files changed, 91 insertions(+), 8 deletions(-)
create mode 100644 gcc10-pr92765-workaround.patch
diff --git a/.gitignore b/.gitignore
index 8ce888f..97c751e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
/nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz
/gcc-10.0.1-20200121.tar.xz
/gcc-10.0.1-20200123.tar.xz
+/gcc-10.0.1-20200126.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 8512f0c..0ab2cfc 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20200123
-%global gitrev 083f4455962cb0f38e406792b5aaa198f77ecc60
+%global DATE 20200126
+%global gitrev 834af6f1f10cfe4642e6f690f0c7b6dae44de101
%global gcc_version 10.0.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 0.5
+%global gcc_release 0.6
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -29,13 +29,13 @@
%global build_go 0
%global build_d 0
%else
-%ifarch %{ix86} x86_64 ia64 ppc %{power64} alpha s390x %{arm} aarch64
+%ifarch %{ix86} x86_64 ia64 ppc %{power64} alpha s390x %{arm} aarch64 riscv64
%global build_ada 1
%else
%global build_ada 0
%endif
%global build_objc 1
-%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64 %{mips}
+%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64 %{mips} riscv64
%global build_go 1
%else
%global build_go 0
@@ -71,7 +71,7 @@
%else
%global build_libubsan 0
%endif
-%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64 %{mips}
+%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64 %{mips} riscv64
%global build_libatomic 1
%else
%global build_libatomic 0
@@ -259,6 +259,7 @@ Patch8: gcc10-foffload-default.patch
Patch9: gcc10-Wno-format-security.patch
Patch10: gcc10-rh1574936.patch
Patch11: gcc10-d-shared-libphobos.patch
+Patch12: gcc10-pr92765-workaround.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -770,6 +771,7 @@ to NVidia PTX capable devices if available.
%patch10 -p0 -b .rh1574936~
%endif
%patch11 -p0 -b .d-shared-libphobos~
+%patch12 -p0 -b .pr92765-workaround~
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@@ -889,7 +891,7 @@ CONFIGURE_OPTS="\
%ifarch ppc64le
--enable-targets=powerpcle-linux \
%endif
-%ifarch ppc64le %{mips} riscv64 s390x
+%ifarch ppc64le %{mips} s390x
%ifarch s390x
%if 0%{?fedora} < 32
--enable-multilib \
@@ -999,6 +1001,9 @@ CONFIGURE_OPTS="\
%ifarch mips64 mips64el
--with-arch=mips64r2 --with-abi=64 \
%endif
+%ifarch riscv64
+ --with-arch=rv64gc --with-abi=lp64d --with-multilib-list=lp64d \
+%endif
%ifnarch sparc sparcv9 ppc
--build=%{gcc_target_platform} \
%endif
@@ -1113,6 +1118,19 @@ find rpm.doc -name \*ChangeLog\* | xargs bzip2 -9
%install
rm -rf %{buildroot}
+mkdir -p %{buildroot}
+
+# RISC-V ABI wants to install everything in /lib64/lp64d or /usr/lib64/lp64d.
+# Make these be symlinks to /lib64 or /usr/lib64 respectively. See:
+# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/DRHT5YTPK4WWVGL3GIN5BF2IKX2ODHZ3/
+%ifarch riscv64
+for d in %{buildroot}%{_libdir} %{buildroot}/%{_lib} \
+ %{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib} \
+ %{buildroot}%{_prefix}/include/c++/%{gcc_major}/%{gcc_target_platform}/%{_lib}; do
+ mkdir -p $d
+ (cd $d && ln -sf . lp64d)
+done
+%endif
%if %{build_offload_nvptx}
cd nvptx-tools-%{nvptx_tools_gitrev}
@@ -2349,6 +2367,10 @@ end
%dir %{_datadir}/gdb/auto-load
%dir %{_datadir}/gdb/auto-load/%{_prefix}
%dir %{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/
+# Package symlink to keep compatibility
+%ifarch riscv64
+%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/lp64d
+%endif
%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/libstdc*gdb.py*
%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/__pycache__
%dir %{_prefix}/share/gcc-%{gcc_major}
@@ -2978,6 +3000,15 @@ end
%endif
%changelog
+* 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,
diff --git a/gcc10-pr92765-workaround.patch b/gcc10-pr92765-workaround.patch
new file mode 100644
index 0000000..ce8e033
--- /dev/null
+++ b/gcc10-pr92765-workaround.patch
@@ -0,0 +1,51 @@
+2020-01-26 Jakub Jelinek
+
+ PR tree-optimization/92765
+ * tree-ssa-strlen.c (handle_builtin_string_cmp): Temporarily disable
+ broken optimization.
+
+ * gcc.dg/strlenopt-65.c: Add xfail.
+ * gcc.dg/strlenopt-69.c: Likewise.
+ * gcc.dg/strcmpopt_3.c: Likewise.
+
+--- gcc/tree-ssa-strlen.c.jj 2020-01-16 15:13:55.789044796 +0100
++++ gcc/tree-ssa-strlen.c 2020-01-26 18:58:17.787571444 +0100
+@@ -4461,8 +4461,11 @@ handle_builtin_string_cmp (gimple_stmt_i
+ known to be unequal set the range of the result to non-zero.
+ This allows the call to be eliminated if its result is only
+ used in tests for equality to zero. */
++#if 0
++ /* Temporarily disabled due to PR92765. */
+ wide_int zero = wi::zero (TYPE_PRECISION (TREE_TYPE (lhs)));
+ set_range_info (lhs, VR_ANTI_RANGE, zero, zero);
++#endif
+ return false;
+ }
+ /* When the two strings are definitely equal (such as when they
+--- gcc/testsuite/gcc.dg/strlenopt-65.c.jj 2020-01-12 11:54:37.518396737 +0100
++++ gcc/testsuite/gcc.dg/strlenopt-65.c 2020-01-26 19:03:42.310607725 +0100
+@@ -173,7 +173,7 @@ void test_strncmp_keep (const char *s, c
+ }
+ }
+
+-/* { dg-final { scan-tree-dump-times "call_in_true_branch_not_eliminated_" 0 "optimized" } }
++/* { dg-final { scan-tree-dump-times "call_in_true_branch_not_eliminated_" 0 "optimized" { xfail *-*-* } } }
+
+ { dg-final { scan-tree-dump-times "call_made_in_true_branch_on_line_1\[0-9\]\[0-9\]\[0-9\]" 11 "optimized" } }
+ { dg-final { scan-tree-dump-times "call_made_in_false_branch_on_line_1\[0-9\]\[0-9\]\[0-9\]" 11 "optimized" } } */
+--- gcc/testsuite/gcc.dg/strlenopt-69.c.jj 2020-01-12 11:54:37.518396737 +0100
++++ gcc/testsuite/gcc.dg/strlenopt-69.c 2020-01-26 19:04:04.913262008 +0100
+@@ -126,4 +126,4 @@ void test_array_copy_bounded (void)
+ A (strncmp (s, a4, 5)); clobber (a4);
+ }
+
+-/* { dg-final { scan-tree-dump-not "abort|strcmp|strncmp" "optimized" } } */
++/* { dg-final { scan-tree-dump-not "abort|strcmp|strncmp" "optimized" { xfail *-*-* } } } */
+--- gcc/testsuite/gcc.dg/strcmpopt_3.c.jj 2020-01-12 11:54:37.515396783 +0100
++++ gcc/testsuite/gcc.dg/strcmpopt_3.c 2020-01-26 19:03:08.123130636 +0100
+@@ -28,4 +28,4 @@ int main (void)
+ return 0;
+ }
+
+-/* { dg-final { scan-tree-dump-times "strcmp" 0 "optimized" } } */
++/* { dg-final { scan-tree-dump-times "strcmp" 0 "optimized" { xfail *-*-* } } } */
diff --git a/sources b/sources
index 7f8eaea..14edf4b 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-10.0.1-20200123.tar.xz) = 0f729f71a0538c18c9ad882871abaed82c25d00d9bec6d65fac484cf4d9397308a5a69260c10a5d3e7c461972d102032857cf89951026490bbe2076bc693f892
+SHA512 (gcc-10.0.1-20200126.tar.xz) = 6263b1e255939d37f51e99493658d140902aab17f8aa78ff26255076e77fe301694aa2993e258423c500d665614f372f68f20e3c910d497cdd35490b84c39975
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 9ceea0b883185fe489724d54a7e909bb6ed4785fcadf80162033dc6a133e2657337175601278e4155d1f8fac275ff9c8a02572aea876166c608774c809f832e9
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From f8b6352429d2f25594017b8b6dbff2704e4bf6d6 Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Tue, 28 Jan 2020 19:39:07 +0000
Subject: [PATCH 009/341] - Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_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 0ab2cfc..38850c6 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -110,7 +110,7 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
-Release: %{gcc_release}%{?dist}
+Release: %{gcc_release}%{?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
@@ -3000,6 +3000,9 @@ end
%endif
%changelog
+* Tue Jan 28 2020 Fedora Release Engineering - 10.0.1-0.6.1
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
+
* 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,
From 55f9b2f3362a72cd6a65d4b4eef018cd26c401ea Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Thu, 30 Jan 2020 22:04:12 +0100
Subject: [PATCH 010/341] 10.0.1-0.7
---
.gitignore | 1 +
gcc.spec | 32 +++++++++++++++++++++++++------
gcc10-libcpp-lex-workaround.patch | 20 -------------------
sources | 2 +-
4 files changed, 28 insertions(+), 27 deletions(-)
delete mode 100644 gcc10-libcpp-lex-workaround.patch
diff --git a/.gitignore b/.gitignore
index 97c751e..f7a4b74 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
/gcc-10.0.1-20200121.tar.xz
/gcc-10.0.1-20200123.tar.xz
/gcc-10.0.1-20200126.tar.xz
+/gcc-10.0.1-20200130.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 38850c6..203d962 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20200126
-%global gitrev 834af6f1f10cfe4642e6f690f0c7b6dae44de101
+%global DATE 20200130
+%global gitrev e391c69b766a2056ab10cf80fa0cbe777f338235
%global gcc_version 10.0.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 0.6
+%global gcc_release 0.7
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -110,7 +110,7 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
-Release: %{gcc_release}%{?dist}.1
+Release: %{gcc_release}%{?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
@@ -3000,8 +3000,28 @@ end
%endif
%changelog
-* Tue Jan 28 2020 Fedora Release Engineering - 10.0.1-0.6.1
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
+* 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
diff --git a/gcc10-libcpp-lex-workaround.patch b/gcc10-libcpp-lex-workaround.patch
deleted file mode 100644
index bcf5a33..0000000
--- a/gcc10-libcpp-lex-workaround.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- libcpp/lex.c 2020-01-12 11:54:38.565380941 +0100
-+++ libcpp/lex.c 2020-01-21 14:35:36.182794214 +0100
-@@ -752,7 +752,7 @@ search_line_fast (const uchar *s, const
- }
- }
-
--#elif defined (__ARM_NEON) && defined (__ARM_64BIT_STATE)
-+#elif defined (__ARM_NEON) && defined (__ARM_64BIT_STATE) && __has_include("arm_bf16.h")
- #include "arm_neon.h"
-
- /* This doesn't have to be the exact page size, but no system may use
-@@ -847,7 +847,7 @@ done:
- + __builtin_ctz (found));
- }
-
--#elif defined (__ARM_NEON)
-+#elif defined (__ARM_NEON) && __has_include("arm_bf16.h")
- #include "arm_neon.h"
-
- static const uchar *
diff --git a/sources b/sources
index 14edf4b..e98646f 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-10.0.1-20200126.tar.xz) = 6263b1e255939d37f51e99493658d140902aab17f8aa78ff26255076e77fe301694aa2993e258423c500d665614f372f68f20e3c910d497cdd35490b84c39975
+SHA512 (gcc-10.0.1-20200130.tar.xz) = b7a96cac1876ac821cd9b758edf5acd07a621419533fa9a0676f87e10482bdbd750862484199572ed58a2fa243e41a7cad8abd5a1a53ea18f4e6c6e2e991c27c
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 9ceea0b883185fe489724d54a7e909bb6ed4785fcadf80162033dc6a133e2657337175601278e4155d1f8fac275ff9c8a02572aea876166c608774c809f832e9
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From 9bce8e2449bf9915807f03d1f2fa069fa4deb1c1 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Sun, 16 Feb 2020 13:44:17 +0100
Subject: [PATCH 011/341] 10.0.1-0.8
---
.gitignore | 1 +
gcc.spec | 42 ++++++++++++++++++++++++----
gcc10-pr92765-workaround.patch | 51 ----------------------------------
sources | 2 +-
4 files changed, 39 insertions(+), 57 deletions(-)
delete mode 100644 gcc10-pr92765-workaround.patch
diff --git a/.gitignore b/.gitignore
index f7a4b74..e6e4e89 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
/gcc-10.0.1-20200123.tar.xz
/gcc-10.0.1-20200126.tar.xz
/gcc-10.0.1-20200130.tar.xz
+/gcc-10.0.1-20200216.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 203d962..b910993 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20200130
-%global gitrev e391c69b766a2056ab10cf80fa0cbe777f338235
+%global DATE 20200216
+%global gitrev e192529cb03e8c4fb50bff9ce451d0f9e12b863f
%global gcc_version 10.0.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 0.7
+%global gcc_release 0.8
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -259,7 +259,6 @@ Patch8: gcc10-foffload-default.patch
Patch9: gcc10-Wno-format-security.patch
Patch10: gcc10-rh1574936.patch
Patch11: gcc10-d-shared-libphobos.patch
-Patch12: gcc10-pr92765-workaround.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -771,7 +770,6 @@ to NVidia PTX capable devices if available.
%patch10 -p0 -b .rh1574936~
%endif
%patch11 -p0 -b .d-shared-libphobos~
-%patch12 -p0 -b .pr92765-workaround~
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@@ -3000,6 +2998,40 @@ end
%endif
%changelog
+* 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,
diff --git a/gcc10-pr92765-workaround.patch b/gcc10-pr92765-workaround.patch
deleted file mode 100644
index ce8e033..0000000
--- a/gcc10-pr92765-workaround.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-2020-01-26 Jakub Jelinek
-
- PR tree-optimization/92765
- * tree-ssa-strlen.c (handle_builtin_string_cmp): Temporarily disable
- broken optimization.
-
- * gcc.dg/strlenopt-65.c: Add xfail.
- * gcc.dg/strlenopt-69.c: Likewise.
- * gcc.dg/strcmpopt_3.c: Likewise.
-
---- gcc/tree-ssa-strlen.c.jj 2020-01-16 15:13:55.789044796 +0100
-+++ gcc/tree-ssa-strlen.c 2020-01-26 18:58:17.787571444 +0100
-@@ -4461,8 +4461,11 @@ handle_builtin_string_cmp (gimple_stmt_i
- known to be unequal set the range of the result to non-zero.
- This allows the call to be eliminated if its result is only
- used in tests for equality to zero. */
-+#if 0
-+ /* Temporarily disabled due to PR92765. */
- wide_int zero = wi::zero (TYPE_PRECISION (TREE_TYPE (lhs)));
- set_range_info (lhs, VR_ANTI_RANGE, zero, zero);
-+#endif
- return false;
- }
- /* When the two strings are definitely equal (such as when they
---- gcc/testsuite/gcc.dg/strlenopt-65.c.jj 2020-01-12 11:54:37.518396737 +0100
-+++ gcc/testsuite/gcc.dg/strlenopt-65.c 2020-01-26 19:03:42.310607725 +0100
-@@ -173,7 +173,7 @@ void test_strncmp_keep (const char *s, c
- }
- }
-
--/* { dg-final { scan-tree-dump-times "call_in_true_branch_not_eliminated_" 0 "optimized" } }
-+/* { dg-final { scan-tree-dump-times "call_in_true_branch_not_eliminated_" 0 "optimized" { xfail *-*-* } } }
-
- { dg-final { scan-tree-dump-times "call_made_in_true_branch_on_line_1\[0-9\]\[0-9\]\[0-9\]" 11 "optimized" } }
- { dg-final { scan-tree-dump-times "call_made_in_false_branch_on_line_1\[0-9\]\[0-9\]\[0-9\]" 11 "optimized" } } */
---- gcc/testsuite/gcc.dg/strlenopt-69.c.jj 2020-01-12 11:54:37.518396737 +0100
-+++ gcc/testsuite/gcc.dg/strlenopt-69.c 2020-01-26 19:04:04.913262008 +0100
-@@ -126,4 +126,4 @@ void test_array_copy_bounded (void)
- A (strncmp (s, a4, 5)); clobber (a4);
- }
-
--/* { dg-final { scan-tree-dump-not "abort|strcmp|strncmp" "optimized" } } */
-+/* { dg-final { scan-tree-dump-not "abort|strcmp|strncmp" "optimized" { xfail *-*-* } } } */
---- gcc/testsuite/gcc.dg/strcmpopt_3.c.jj 2020-01-12 11:54:37.515396783 +0100
-+++ gcc/testsuite/gcc.dg/strcmpopt_3.c 2020-01-26 19:03:08.123130636 +0100
-@@ -28,4 +28,4 @@ int main (void)
- return 0;
- }
-
--/* { dg-final { scan-tree-dump-times "strcmp" 0 "optimized" } } */
-+/* { dg-final { scan-tree-dump-times "strcmp" 0 "optimized" { xfail *-*-* } } } */
diff --git a/sources b/sources
index e98646f..385d0e9 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-10.0.1-20200130.tar.xz) = b7a96cac1876ac821cd9b758edf5acd07a621419533fa9a0676f87e10482bdbd750862484199572ed58a2fa243e41a7cad8abd5a1a53ea18f4e6c6e2e991c27c
+SHA512 (gcc-10.0.1-20200216.tar.xz) = 56507e273b00e85ed4145e80df65d9b4e4791f23e7cb5d931f85b9420cbf3a7125ba49978dc73c2987c0a6101f741dc5a60a08cb3346d4c5082400cbcfcdd008
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 9ceea0b883185fe489724d54a7e909bb6ed4785fcadf80162033dc6a133e2657337175601278e4155d1f8fac275ff9c8a02572aea876166c608774c809f832e9
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From 891cef7d9b2772b549b8fc7c9ef05400b37a4e6b Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Sun, 16 Feb 2020 17:23:40 +0100
Subject: [PATCH 012/341] 10.0.1-0.8
---
gcc.spec | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gcc.spec b/gcc.spec
index b910993..f39c7d1 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -15,9 +15,14 @@
# Until annobin is fixed (#1519165).
%undefine _annotated_build
%endif
+# Strip will fail on nvptx-none *.a archives and the brp-* scripts will
+# fail randomly depending on what is stripped last.
%if 0%{?__brp_strip_static_archive:1}
%global __brp_strip_static_archive %{__brp_strip_static_archive} || :
%endif
+%if 0%{?__brp_strip_lto:1}
+%global __brp_strip_lto %{__brp_strip_lto} || :
+%endif
%if 0%{?fedora} < 32
%global multilib_64_archs sparc64 ppc64 ppc64p7 s390x x86_64
%else
From 09eade535385d8b1f19d70feaa49cf9571675e6c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?=
Date: Tue, 21 Jan 2020 15:21:22 +0100
Subject: [PATCH 013/341] Stop using Python 2 at build time
Python 2 is End of Life.
See https://fedoraproject.org/wiki/Changes/RetirePython2
---
gcc.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc.spec b/gcc.spec
index f39c7d1..ef4de19 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -167,7 +167,7 @@ BuildRequires: zlib-devel, gettext, dejagnu, bison, flex, sharutils
BuildRequires: texinfo, texinfo-tex, /usr/bin/pod2man
BuildRequires: systemtap-sdt-devel >= 1.3
BuildRequires: gmp-devel >= 4.1.2-8, mpfr-devel >= 2.2.1, libmpc-devel >= 0.8.1
-BuildRequires: python2-devel, python3-devel, /usr/bin/python
+BuildRequires: python3-devel, /usr/bin/python
BuildRequires: gcc, gcc-c++
%if %{build_go}
BuildRequires: hostname, procps
From fec5ba4393659be855d63cc1b5958baa34027011 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Thu, 12 Mar 2020 00:01:59 +0100
Subject: [PATCH 014/341] 10.0.1-0.9
---
.gitignore | 1 +
gcc.spec | 70 +++++++-
gcc10-pr94015.patch | 414 ++++++++++++++++++++++++++++++++++++++++++++
gcc10-pr94130.patch | 85 +++++++++
sources | 2 +-
5 files changed, 568 insertions(+), 4 deletions(-)
create mode 100644 gcc10-pr94015.patch
create mode 100644 gcc10-pr94130.patch
diff --git a/.gitignore b/.gitignore
index e6e4e89..eac4938 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@
/gcc-10.0.1-20200126.tar.xz
/gcc-10.0.1-20200130.tar.xz
/gcc-10.0.1-20200216.tar.xz
+/gcc-10.0.1-20200311.tar.xz
diff --git a/gcc.spec b/gcc.spec
index ef4de19..aa0b27f 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20200216
-%global gitrev e192529cb03e8c4fb50bff9ce451d0f9e12b863f
+%global DATE 20200311
+%global gitrev 61bcda69ca5dc9e9d5e25de7b914dd3a86089244
%global gcc_version 10.0.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 0.8
+%global gcc_release 0.9
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -264,6 +264,8 @@ Patch8: gcc10-foffload-default.patch
Patch9: gcc10-Wno-format-security.patch
Patch10: gcc10-rh1574936.patch
Patch11: gcc10-d-shared-libphobos.patch
+Patch12: gcc10-pr94015.patch
+Patch13: gcc10-pr94130.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -775,6 +777,8 @@ to NVidia PTX capable devices if available.
%patch10 -p0 -b .rh1574936~
%endif
%patch11 -p0 -b .d-shared-libphobos~
+%patch12 -p0 -b .pr94015~
+%patch13 -p0 -b .pr94130~
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@@ -3003,6 +3007,66 @@ end
%endif
%changelog
+* 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,
diff --git a/gcc10-pr94015.patch b/gcc10-pr94015.patch
new file mode 100644
index 0000000..822db72
--- /dev/null
+++ b/gcc10-pr94015.patch
@@ -0,0 +1,414 @@
+2020-03-03 Jakub Jelinek
+
+ PR tree-optimization/94015
+ * tree-ssa-strlen.c (count_nonzero_bytes): Split portions of the
+ function where EXP is address of the bytes being stored rather than
+ the bytes themselves into count_nonzero_bytes_addr. Punt on zero
+ sized MEM_REF. Use VAR_P macro and handle CONST_DECL like VAR_DECLs.
+ Use ctor_for_folding instead of looking at DECL_INITIAL. Punt before
+ calling native_encode_expr if host or target doesn't have 8-bit
+ chars. Formatting fixes.
+ (count_nonzero_bytes_addr): New function.
+
+ * gcc.dg/pr94015.c: New test.
+
+--- gcc/tree-ssa-strlen.c.jj 2020-03-03 07:57:22.324124042 +0100
++++ gcc/tree-ssa-strlen.c 2020-03-03 18:37:29.382722923 +0100
+@@ -4585,6 +4585,11 @@ int ssa_name_limit_t::next_ssa_name (tre
+ return 0;
+ }
+
++static bool
++count_nonzero_bytes_addr (tree, unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT,
++ unsigned [3], bool *, bool *, bool *,
++ const vr_values *, ssa_name_limit_t &);
++
+ /* Determines the minimum and maximum number of leading non-zero bytes
+ in the representation of EXP and set LENRANGE[0] and LENRANGE[1]
+ to each.
+@@ -4607,102 +4612,6 @@ count_nonzero_bytes (tree exp, unsigned
+ bool *allnul, bool *allnonnul, const vr_values *rvals,
+ ssa_name_limit_t &snlim)
+ {
+- int idx = get_stridx (exp);
+- if (idx > 0)
+- {
+- strinfo *si = get_strinfo (idx);
+- if (!si)
+- return false;
+-
+- /* Handle both constant lengths as well non-constant lengths
+- in some range. */
+- unsigned HOST_WIDE_INT minlen, maxlen;
+- if (tree_fits_shwi_p (si->nonzero_chars))
+- minlen = maxlen = tree_to_shwi (si->nonzero_chars);
+- else if (nbytes
+- && si->nonzero_chars
+- && TREE_CODE (si->nonzero_chars) == SSA_NAME)
+- {
+- const value_range_equiv *vr
+- = CONST_CAST (class vr_values *, rvals)
+- ->get_value_range (si->nonzero_chars);
+- if (vr->kind () != VR_RANGE
+- || !range_int_cst_p (vr))
+- return false;
+-
+- minlen = tree_to_uhwi (vr->min ());
+- maxlen = tree_to_uhwi (vr->max ());
+- }
+- else
+- return false;
+-
+- if (maxlen < offset)
+- return false;
+-
+- minlen = minlen < offset ? 0 : minlen - offset;
+- maxlen -= offset;
+- if (maxlen + 1 < nbytes)
+- return false;
+-
+- if (!nbytes
+- && TREE_CODE (si->ptr) == SSA_NAME
+- && !POINTER_TYPE_P (TREE_TYPE (si->ptr)))
+- {
+- /* SI->PTR is an SSA_NAME with a DEF_STMT like
+- _1 = MEM [(char * {ref-all})s_4(D)]; */
+- gimple *stmt = SSA_NAME_DEF_STMT (exp);
+- if (gimple_assign_single_p (stmt)
+- && gimple_assign_rhs_code (stmt) == MEM_REF)
+- {
+- tree rhs = gimple_assign_rhs1 (stmt);
+- if (tree refsize = TYPE_SIZE_UNIT (TREE_TYPE (rhs)))
+- if (tree_fits_uhwi_p (refsize))
+- {
+- nbytes = tree_to_uhwi (refsize);
+- maxlen = nbytes;
+- }
+- }
+-
+- if (!nbytes)
+- return false;
+- }
+-
+- if (nbytes <= minlen)
+- *nulterm = false;
+-
+- if (nbytes < minlen)
+- {
+- minlen = nbytes;
+- if (nbytes < maxlen)
+- maxlen = nbytes;
+- }
+-
+- if (minlen < lenrange[0])
+- lenrange[0] = minlen;
+- if (lenrange[1] < maxlen)
+- lenrange[1] = maxlen;
+-
+- if (lenrange[2] < nbytes)
+- lenrange[2] = nbytes;
+-
+- /* Since only the length of the string are known and not its contents,
+- clear ALLNUL and ALLNONNUL purely on the basis of the length. */
+- *allnul = false;
+- if (minlen < nbytes)
+- *allnonnul = false;
+-
+- return true;
+- }
+-
+- if (TREE_CODE (exp) == ADDR_EXPR)
+- {
+- /* If the size of the access hasn't been determined yet it's that
+- of a pointer. */
+- if (!nbytes)
+- nbytes = tree_to_uhwi (TYPE_SIZE_UNIT (TREE_TYPE (exp)));
+- exp = TREE_OPERAND (exp, 0);
+- }
+-
+ if (TREE_CODE (exp) == SSA_NAME)
+ {
+ /* Handle non-zero single-character stores specially. */
+@@ -4758,8 +4667,7 @@ count_nonzero_bytes (tree exp, unsigned
+ tree arg = TREE_OPERAND (exp, 0);
+ tree off = TREE_OPERAND (exp, 1);
+
+- if (TREE_CODE (off) != INTEGER_CST
+- || !tree_fits_uhwi_p (off))
++ if (TREE_CODE (off) != INTEGER_CST || !tree_fits_uhwi_p (off))
+ return false;
+
+ unsigned HOST_WIDE_INT wioff = tree_to_uhwi (off);
+@@ -4776,15 +4684,17 @@ count_nonzero_bytes (tree exp, unsigned
+ if (!typesize || !tree_fits_uhwi_p (typesize))
+ return false;
+ nbytes = tree_to_uhwi (typesize);
++ if (!nbytes)
++ return false;
+
+ /* Handle MEM_REF = SSA_NAME types of assignments. */
+- return count_nonzero_bytes (arg, offset, nbytes, lenrange, nulterm,
+- allnul, allnonnul, rvals, snlim);
++ return count_nonzero_bytes_addr (arg, offset, nbytes, lenrange, nulterm,
++ allnul, allnonnul, rvals, snlim);
+ }
+
+- if (TREE_CODE (exp) == VAR_DECL && TREE_READONLY (exp))
++ if (VAR_P (exp) || TREE_CODE (exp) == CONST_DECL)
+ {
+- exp = DECL_INITIAL (exp);
++ exp = ctor_for_folding (exp);
+ if (!exp)
+ return false;
+ }
+@@ -4809,6 +4719,8 @@ count_nonzero_bytes (tree exp, unsigned
+ unsigned char buf[256];
+ if (!prep)
+ {
++ if (CHAR_BIT != 8 || BITS_PER_UNIT != 8)
++ return false;
+ /* If the pointer to representation hasn't been set above
+ for STRING_CST point it at the buffer. */
+ prep = reinterpret_cast (buf);
+@@ -4852,8 +4764,8 @@ count_nonzero_bytes (tree exp, unsigned
+ if (n)
+ {
+ /* When the initial number of non-zero bytes N is non-zero, reset
+- *ALLNUL; if N is less than that the size of the representation
+- also clear *ALLNONNUL. */
++ *ALLNUL; if N is less than that the size of the representation
++ also clear *ALLNONNUL. */
+ *allnul = false;
+ if (n < nbytes)
+ *allnonnul = false;
+@@ -4879,6 +4791,120 @@ count_nonzero_bytes (tree exp, unsigned
+ return true;
+ }
+
++/* Like count_nonzero_bytes, but instead of counting bytes in EXP, count
++ bytes that are pointed to by EXP, which should be a pointer. */
++
++static bool
++count_nonzero_bytes_addr (tree exp, unsigned HOST_WIDE_INT offset,
++ unsigned HOST_WIDE_INT nbytes,
++ unsigned lenrange[3], bool *nulterm,
++ bool *allnul, bool *allnonnul,
++ const vr_values *rvals, ssa_name_limit_t &snlim)
++{
++ int idx = get_stridx (exp);
++ if (idx > 0)
++ {
++ strinfo *si = get_strinfo (idx);
++ if (!si)
++ return false;
++
++ /* Handle both constant lengths as well non-constant lengths
++ in some range. */
++ unsigned HOST_WIDE_INT minlen, maxlen;
++ if (tree_fits_shwi_p (si->nonzero_chars))
++ minlen = maxlen = tree_to_shwi (si->nonzero_chars);
++ else if (si->nonzero_chars
++ && TREE_CODE (si->nonzero_chars) == SSA_NAME)
++ {
++ vr_values *v = CONST_CAST (vr_values *, rvals);
++ const value_range_equiv *vr = v->get_value_range (si->nonzero_chars);
++ if (vr->kind () != VR_RANGE || !range_int_cst_p (vr))
++ return false;
++
++ minlen = tree_to_uhwi (vr->min ());
++ maxlen = tree_to_uhwi (vr->max ());
++ }
++ else
++ return false;
++
++ if (maxlen < offset)
++ return false;
++
++ minlen = minlen < offset ? 0 : minlen - offset;
++ maxlen -= offset;
++ if (maxlen + 1 < nbytes)
++ return false;
++
++ if (nbytes <= minlen)
++ *nulterm = false;
++
++ if (nbytes < minlen)
++ {
++ minlen = nbytes;
++ if (nbytes < maxlen)
++ maxlen = nbytes;
++ }
++
++ if (minlen < lenrange[0])
++ lenrange[0] = minlen;
++ if (lenrange[1] < maxlen)
++ lenrange[1] = maxlen;
++
++ if (lenrange[2] < nbytes)
++ lenrange[2] = nbytes;
++
++ /* Since only the length of the string are known and not its contents,
++ clear ALLNUL and ALLNONNUL purely on the basis of the length. */
++ *allnul = false;
++ if (minlen < nbytes)
++ *allnonnul = false;
++
++ return true;
++ }
++
++ if (TREE_CODE (exp) == ADDR_EXPR)
++ return count_nonzero_bytes (TREE_OPERAND (exp, 0), offset, nbytes,
++ lenrange, nulterm, allnul, allnonnul, rvals,
++ snlim);
++
++ if (TREE_CODE (exp) == SSA_NAME)
++ {
++ gimple *stmt = SSA_NAME_DEF_STMT (exp);
++ if (gimple_code (stmt) == GIMPLE_PHI)
++ {
++ /* Avoid processing an SSA_NAME that has already been visited
++ or if an SSA_NAME limit has been reached. Indicate success
++ if the former and failure if the latter. */
++ if (int res = snlim.next_ssa_name (exp))
++ return res > 0;
++
++ /* Determine the minimum and maximum from the PHI arguments. */
++ unsigned int n = gimple_phi_num_args (stmt);
++ for (unsigned i = 0; i != n; i++)
++ {
++ tree def = gimple_phi_arg_def (stmt, i);
++ if (!count_nonzero_bytes_addr (def, offset, nbytes, lenrange,
++ nulterm, allnul, allnonnul, rvals,
++ snlim))
++ return false;
++ }
++
++ return true;
++ }
++ }
++
++ /* Otherwise we don't know anything. */
++ lenrange[0] = 0;
++ if (lenrange[1] < nbytes)
++ lenrange[1] = nbytes;
++ if (lenrange[2] < nbytes)
++ lenrange[2] = nbytes;
++ *nulterm = false;
++ *allnul = false;
++ *allnonnul = false;
++ return true;
++}
++
+ /* Same as above except with an implicit SSA_NAME limit. RVALS is used
+ to determine ranges of dynamically computed string lengths (the results
+ of strlen). */
+--- gcc/testsuite/gcc.dg/pr94015.c.jj 2020-03-03 18:04:47.928594261 +0100
++++ gcc/testsuite/gcc.dg/pr94015.c 2020-03-03 18:04:34.345794259 +0100
+@@ -0,0 +1,107 @@
++/* PR tree-optimization/94015 */
++/* { dg-do run } */
++/* { dg-options "-O2" } */
++
++char buf[10] = "AAAAAAAAA";
++
++__attribute__((noipa)) char *
++alloc (void)
++{
++ return buf;
++}
++
++__attribute__((noipa)) void
++f1 (void)
++{
++ char *s = alloc ();
++ *(char **)s = "1234567";
++ s[7] = '\0';
++}
++
++__attribute__((noipa)) void
++f2 (void)
++{
++ char *s = alloc ();
++ *(char **)s = "123456";
++ s[6] = '\0';
++}
++
++__attribute__((noipa)) void
++f3 (void)
++{
++ char *s = alloc ();
++ *(char **)s = "12345";
++ s[5] = '\0';
++}
++
++__attribute__((noipa)) void
++f4 (void)
++{
++ char *s = alloc ();
++ *(char **)s = "1234";
++ s[4] = '\0';
++}
++
++__attribute__((noipa)) void
++f5 (void)
++{
++ char *s = alloc ();
++ *(char **)s = "123";
++ s[3] = '\0';
++}
++
++__attribute__((noipa)) void
++f6 (void)
++{
++ char *s = alloc ();
++ *(char **)s = "12";
++ s[2] = '\0';
++}
++
++__attribute__((noipa)) void
++f7 (void)
++{
++ char *s = alloc ();
++ *(char **)s = "1";
++ s[1] = '\0';
++}
++
++__attribute__((noipa)) void
++f8 (void)
++{
++ char *s = alloc ();
++ *(char **)s = "";
++ s[0] = '\0';
++}
++
++int
++main ()
++{
++ if (sizeof (char *) > 8)
++ return 0;
++ f1 ();
++ if (buf[7] != 0)
++ __builtin_abort ();
++ f2 ();
++ if (buf[6] != 0)
++ __builtin_abort ();
++ f3 ();
++ if (buf[5] != 0)
++ __builtin_abort ();
++ f4 ();
++ if (buf[4] != 0)
++ __builtin_abort ();
++ f5 ();
++ if (buf[3] != 0)
++ __builtin_abort ();
++ f6 ();
++ if (buf[2] != 0)
++ __builtin_abort ();
++ f7 ();
++ if (buf[1] != 0)
++ __builtin_abort ();
++ f8 ();
++ if (buf[0] != 0)
++ __builtin_abort ();
++ return 0;
++}
diff --git a/gcc10-pr94130.patch b/gcc10-pr94130.patch
new file mode 100644
index 0000000..10cbc0a
--- /dev/null
+++ b/gcc10-pr94130.patch
@@ -0,0 +1,85 @@
+2020-03-11 Jakub Jelinek
+
+ PR tree-optimization/94130
+ * tree-ssa-dse.c: Include gimplify.h.
+ (increment_start_addr): If stmt has lhs, drop the lhs from call and
+ set it after the call to the original value of the first argument.
+ Formatting fixes.
+ (decrement_count): Formatting fix.
+
+ * gcc.c-torture/execute/pr94130.c: New test.
+
+--- gcc/tree-ssa-dse.c.jj 2020-03-03 11:04:46.367821907 +0100
++++ gcc/tree-ssa-dse.c 2020-03-11 13:57:38.671845186 +0100
+@@ -38,6 +38,7 @@ along with GCC; see the file COPYING3.
+ #include "tree-ssa-dse.h"
+ #include "builtins.h"
+ #include "gimple-fold.h"
++#include "gimplify.h"
+
+ /* This file implements dead store elimination.
+
+@@ -422,29 +423,38 @@ decrement_count (gimple *stmt, int decre
+ gcc_assert (TREE_CODE (*countp) == INTEGER_CST);
+ *countp = wide_int_to_tree (TREE_TYPE (*countp), (TREE_INT_CST_LOW (*countp)
+ - decrement));
+-
+ }
+
+ static void
+ increment_start_addr (gimple *stmt, tree *where, int increment)
+ {
++ if (tree lhs = gimple_call_lhs (stmt))
++ if (where == gimple_call_arg_ptr (stmt, 0))
++ {
++ gassign *newop = gimple_build_assign (lhs, unshare_expr (*where));
++ gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
++ gsi_insert_after (&gsi, newop, GSI_SAME_STMT);
++ gimple_call_set_lhs (stmt, NULL_TREE);
++ update_stmt (stmt);
++ }
++
+ if (TREE_CODE (*where) == SSA_NAME)
+ {
+ tree tem = make_ssa_name (TREE_TYPE (*where));
+ gassign *newop
+- = gimple_build_assign (tem, POINTER_PLUS_EXPR, *where,
++ = gimple_build_assign (tem, POINTER_PLUS_EXPR, *where,
+ build_int_cst (sizetype, increment));
+ gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
+ gsi_insert_before (&gsi, newop, GSI_SAME_STMT);
+ *where = tem;
+- update_stmt (gsi_stmt (gsi));
++ update_stmt (stmt);
+ return;
+ }
+
+ *where = build_fold_addr_expr (fold_build2 (MEM_REF, char_type_node,
+- *where,
+- build_int_cst (ptr_type_node,
+- increment)));
++ *where,
++ build_int_cst (ptr_type_node,
++ increment)));
+ }
+
+ /* STMT is builtin call that writes bytes in bitmap ORIG, some bytes are dead
+--- gcc/testsuite/gcc.c-torture/execute/pr94130.c.jj 2020-03-11 14:01:49.431180291 +0100
++++ gcc/testsuite/gcc.c-torture/execute/pr94130.c 2020-03-11 14:01:37.654352419 +0100
+@@ -0,0 +1,16 @@
++/* PR tree-optimization/94130 */
++
++int
++main ()
++{
++ int a[8];
++ char *b = __builtin_memset (a, 0, sizeof (a));
++ a[0] = 1;
++ a[1] = 2;
++ a[2] = 3;
++ if (b != (char *) a)
++ __builtin_abort ();
++ else
++ asm volatile ("" : : "g" (a) : "memory");
++ return 0;
++}
diff --git a/sources b/sources
index 385d0e9..c6f9b84 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-10.0.1-20200216.tar.xz) = 56507e273b00e85ed4145e80df65d9b4e4791f23e7cb5d931f85b9420cbf3a7125ba49978dc73c2987c0a6101f741dc5a60a08cb3346d4c5082400cbcfcdd008
+SHA512 (gcc-10.0.1-20200311.tar.xz) = b2b730beaf28b75409d4cef72fd9cae20b910442b8b8d4d91911a80bed6e2a63228f08bb31b783f58e31e714be3f3a9f6ceded1f351b4fdded1671e1468eaca7
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 9ceea0b883185fe489724d54a7e909bb6ed4785fcadf80162033dc6a133e2657337175601278e4155d1f8fac275ff9c8a02572aea876166c608774c809f832e9
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From 5ae836ea9d850fc4cfa33d5a1ebc9d5ca86bc99a Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Wed, 25 Mar 2020 11:27:42 +0100
Subject: [PATCH 015/341] 10.0.1-0.10
---
.gitignore | 1 +
gcc.spec | 42 ++++-
gcc10-pr94015.patch | 414 --------------------------------------------
gcc10-pr94130.patch | 85 ---------
gcc10-pr94308.patch | 52 ++++++
sources | 2 +-
6 files changed, 89 insertions(+), 507 deletions(-)
delete mode 100644 gcc10-pr94015.patch
delete mode 100644 gcc10-pr94130.patch
create mode 100644 gcc10-pr94308.patch
diff --git a/.gitignore b/.gitignore
index eac4938..b3422f4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
/gcc-10.0.1-20200130.tar.xz
/gcc-10.0.1-20200216.tar.xz
/gcc-10.0.1-20200311.tar.xz
+/gcc-10.0.1-20200325.tar.xz
diff --git a/gcc.spec b/gcc.spec
index aa0b27f..4d19025 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20200311
-%global gitrev 61bcda69ca5dc9e9d5e25de7b914dd3a86089244
+%global DATE 20200325
+%global gitrev 17146084e899406b7b39093e945561c737dfe02c
%global gcc_version 10.0.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 0.9
+%global gcc_release 0.10
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -264,8 +264,7 @@ Patch8: gcc10-foffload-default.patch
Patch9: gcc10-Wno-format-security.patch
Patch10: gcc10-rh1574936.patch
Patch11: gcc10-d-shared-libphobos.patch
-Patch12: gcc10-pr94015.patch
-Patch13: gcc10-pr94130.patch
+Patch12: gcc10-pr94308.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -777,8 +776,7 @@ to NVidia PTX capable devices if available.
%patch10 -p0 -b .rh1574936~
%endif
%patch11 -p0 -b .d-shared-libphobos~
-%patch12 -p0 -b .pr94015~
-%patch13 -p0 -b .pr94130~
+%patch12 -p0 -b .pr94308~
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@@ -3007,6 +3005,36 @@ end
%endif
%changelog
+* 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)
+
* Wed Mar 11 2020 Jakub Jelinek 10.0.1-0.9
- update from trunk
- PRs ada/91100, analyzer/93032, analyzer/93388, analyzer/93692,
diff --git a/gcc10-pr94015.patch b/gcc10-pr94015.patch
deleted file mode 100644
index 822db72..0000000
--- a/gcc10-pr94015.patch
+++ /dev/null
@@ -1,414 +0,0 @@
-2020-03-03 Jakub Jelinek
-
- PR tree-optimization/94015
- * tree-ssa-strlen.c (count_nonzero_bytes): Split portions of the
- function where EXP is address of the bytes being stored rather than
- the bytes themselves into count_nonzero_bytes_addr. Punt on zero
- sized MEM_REF. Use VAR_P macro and handle CONST_DECL like VAR_DECLs.
- Use ctor_for_folding instead of looking at DECL_INITIAL. Punt before
- calling native_encode_expr if host or target doesn't have 8-bit
- chars. Formatting fixes.
- (count_nonzero_bytes_addr): New function.
-
- * gcc.dg/pr94015.c: New test.
-
---- gcc/tree-ssa-strlen.c.jj 2020-03-03 07:57:22.324124042 +0100
-+++ gcc/tree-ssa-strlen.c 2020-03-03 18:37:29.382722923 +0100
-@@ -4585,6 +4585,11 @@ int ssa_name_limit_t::next_ssa_name (tre
- return 0;
- }
-
-+static bool
-+count_nonzero_bytes_addr (tree, unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT,
-+ unsigned [3], bool *, bool *, bool *,
-+ const vr_values *, ssa_name_limit_t &);
-+
- /* Determines the minimum and maximum number of leading non-zero bytes
- in the representation of EXP and set LENRANGE[0] and LENRANGE[1]
- to each.
-@@ -4607,102 +4612,6 @@ count_nonzero_bytes (tree exp, unsigned
- bool *allnul, bool *allnonnul, const vr_values *rvals,
- ssa_name_limit_t &snlim)
- {
-- int idx = get_stridx (exp);
-- if (idx > 0)
-- {
-- strinfo *si = get_strinfo (idx);
-- if (!si)
-- return false;
--
-- /* Handle both constant lengths as well non-constant lengths
-- in some range. */
-- unsigned HOST_WIDE_INT minlen, maxlen;
-- if (tree_fits_shwi_p (si->nonzero_chars))
-- minlen = maxlen = tree_to_shwi (si->nonzero_chars);
-- else if (nbytes
-- && si->nonzero_chars
-- && TREE_CODE (si->nonzero_chars) == SSA_NAME)
-- {
-- const value_range_equiv *vr
-- = CONST_CAST (class vr_values *, rvals)
-- ->get_value_range (si->nonzero_chars);
-- if (vr->kind () != VR_RANGE
-- || !range_int_cst_p (vr))
-- return false;
--
-- minlen = tree_to_uhwi (vr->min ());
-- maxlen = tree_to_uhwi (vr->max ());
-- }
-- else
-- return false;
--
-- if (maxlen < offset)
-- return false;
--
-- minlen = minlen < offset ? 0 : minlen - offset;
-- maxlen -= offset;
-- if (maxlen + 1 < nbytes)
-- return false;
--
-- if (!nbytes
-- && TREE_CODE (si->ptr) == SSA_NAME
-- && !POINTER_TYPE_P (TREE_TYPE (si->ptr)))
-- {
-- /* SI->PTR is an SSA_NAME with a DEF_STMT like
-- _1 = MEM [(char * {ref-all})s_4(D)]; */
-- gimple *stmt = SSA_NAME_DEF_STMT (exp);
-- if (gimple_assign_single_p (stmt)
-- && gimple_assign_rhs_code (stmt) == MEM_REF)
-- {
-- tree rhs = gimple_assign_rhs1 (stmt);
-- if (tree refsize = TYPE_SIZE_UNIT (TREE_TYPE (rhs)))
-- if (tree_fits_uhwi_p (refsize))
-- {
-- nbytes = tree_to_uhwi (refsize);
-- maxlen = nbytes;
-- }
-- }
--
-- if (!nbytes)
-- return false;
-- }
--
-- if (nbytes <= minlen)
-- *nulterm = false;
--
-- if (nbytes < minlen)
-- {
-- minlen = nbytes;
-- if (nbytes < maxlen)
-- maxlen = nbytes;
-- }
--
-- if (minlen < lenrange[0])
-- lenrange[0] = minlen;
-- if (lenrange[1] < maxlen)
-- lenrange[1] = maxlen;
--
-- if (lenrange[2] < nbytes)
-- lenrange[2] = nbytes;
--
-- /* Since only the length of the string are known and not its contents,
-- clear ALLNUL and ALLNONNUL purely on the basis of the length. */
-- *allnul = false;
-- if (minlen < nbytes)
-- *allnonnul = false;
--
-- return true;
-- }
--
-- if (TREE_CODE (exp) == ADDR_EXPR)
-- {
-- /* If the size of the access hasn't been determined yet it's that
-- of a pointer. */
-- if (!nbytes)
-- nbytes = tree_to_uhwi (TYPE_SIZE_UNIT (TREE_TYPE (exp)));
-- exp = TREE_OPERAND (exp, 0);
-- }
--
- if (TREE_CODE (exp) == SSA_NAME)
- {
- /* Handle non-zero single-character stores specially. */
-@@ -4758,8 +4667,7 @@ count_nonzero_bytes (tree exp, unsigned
- tree arg = TREE_OPERAND (exp, 0);
- tree off = TREE_OPERAND (exp, 1);
-
-- if (TREE_CODE (off) != INTEGER_CST
-- || !tree_fits_uhwi_p (off))
-+ if (TREE_CODE (off) != INTEGER_CST || !tree_fits_uhwi_p (off))
- return false;
-
- unsigned HOST_WIDE_INT wioff = tree_to_uhwi (off);
-@@ -4776,15 +4684,17 @@ count_nonzero_bytes (tree exp, unsigned
- if (!typesize || !tree_fits_uhwi_p (typesize))
- return false;
- nbytes = tree_to_uhwi (typesize);
-+ if (!nbytes)
-+ return false;
-
- /* Handle MEM_REF = SSA_NAME types of assignments. */
-- return count_nonzero_bytes (arg, offset, nbytes, lenrange, nulterm,
-- allnul, allnonnul, rvals, snlim);
-+ return count_nonzero_bytes_addr (arg, offset, nbytes, lenrange, nulterm,
-+ allnul, allnonnul, rvals, snlim);
- }
-
-- if (TREE_CODE (exp) == VAR_DECL && TREE_READONLY (exp))
-+ if (VAR_P (exp) || TREE_CODE (exp) == CONST_DECL)
- {
-- exp = DECL_INITIAL (exp);
-+ exp = ctor_for_folding (exp);
- if (!exp)
- return false;
- }
-@@ -4809,6 +4719,8 @@ count_nonzero_bytes (tree exp, unsigned
- unsigned char buf[256];
- if (!prep)
- {
-+ if (CHAR_BIT != 8 || BITS_PER_UNIT != 8)
-+ return false;
- /* If the pointer to representation hasn't been set above
- for STRING_CST point it at the buffer. */
- prep = reinterpret_cast (buf);
-@@ -4852,8 +4764,8 @@ count_nonzero_bytes (tree exp, unsigned
- if (n)
- {
- /* When the initial number of non-zero bytes N is non-zero, reset
-- *ALLNUL; if N is less than that the size of the representation
-- also clear *ALLNONNUL. */
-+ *ALLNUL; if N is less than that the size of the representation
-+ also clear *ALLNONNUL. */
- *allnul = false;
- if (n < nbytes)
- *allnonnul = false;
-@@ -4879,6 +4791,120 @@ count_nonzero_bytes (tree exp, unsigned
- return true;
- }
-
-+/* Like count_nonzero_bytes, but instead of counting bytes in EXP, count
-+ bytes that are pointed to by EXP, which should be a pointer. */
-+
-+static bool
-+count_nonzero_bytes_addr (tree exp, unsigned HOST_WIDE_INT offset,
-+ unsigned HOST_WIDE_INT nbytes,
-+ unsigned lenrange[3], bool *nulterm,
-+ bool *allnul, bool *allnonnul,
-+ const vr_values *rvals, ssa_name_limit_t &snlim)
-+{
-+ int idx = get_stridx (exp);
-+ if (idx > 0)
-+ {
-+ strinfo *si = get_strinfo (idx);
-+ if (!si)
-+ return false;
-+
-+ /* Handle both constant lengths as well non-constant lengths
-+ in some range. */
-+ unsigned HOST_WIDE_INT minlen, maxlen;
-+ if (tree_fits_shwi_p (si->nonzero_chars))
-+ minlen = maxlen = tree_to_shwi (si->nonzero_chars);
-+ else if (si->nonzero_chars
-+ && TREE_CODE (si->nonzero_chars) == SSA_NAME)
-+ {
-+ vr_values *v = CONST_CAST (vr_values *, rvals);
-+ const value_range_equiv *vr = v->get_value_range (si->nonzero_chars);
-+ if (vr->kind () != VR_RANGE || !range_int_cst_p (vr))
-+ return false;
-+
-+ minlen = tree_to_uhwi (vr->min ());
-+ maxlen = tree_to_uhwi (vr->max ());
-+ }
-+ else
-+ return false;
-+
-+ if (maxlen < offset)
-+ return false;
-+
-+ minlen = minlen < offset ? 0 : minlen - offset;
-+ maxlen -= offset;
-+ if (maxlen + 1 < nbytes)
-+ return false;
-+
-+ if (nbytes <= minlen)
-+ *nulterm = false;
-+
-+ if (nbytes < minlen)
-+ {
-+ minlen = nbytes;
-+ if (nbytes < maxlen)
-+ maxlen = nbytes;
-+ }
-+
-+ if (minlen < lenrange[0])
-+ lenrange[0] = minlen;
-+ if (lenrange[1] < maxlen)
-+ lenrange[1] = maxlen;
-+
-+ if (lenrange[2] < nbytes)
-+ lenrange[2] = nbytes;
-+
-+ /* Since only the length of the string are known and not its contents,
-+ clear ALLNUL and ALLNONNUL purely on the basis of the length. */
-+ *allnul = false;
-+ if (minlen < nbytes)
-+ *allnonnul = false;
-+
-+ return true;
-+ }
-+
-+ if (TREE_CODE (exp) == ADDR_EXPR)
-+ return count_nonzero_bytes (TREE_OPERAND (exp, 0), offset, nbytes,
-+ lenrange, nulterm, allnul, allnonnul, rvals,
-+ snlim);
-+
-+ if (TREE_CODE (exp) == SSA_NAME)
-+ {
-+ gimple *stmt = SSA_NAME_DEF_STMT (exp);
-+ if (gimple_code (stmt) == GIMPLE_PHI)
-+ {
-+ /* Avoid processing an SSA_NAME that has already been visited
-+ or if an SSA_NAME limit has been reached. Indicate success
-+ if the former and failure if the latter. */
-+ if (int res = snlim.next_ssa_name (exp))
-+ return res > 0;
-+
-+ /* Determine the minimum and maximum from the PHI arguments. */
-+ unsigned int n = gimple_phi_num_args (stmt);
-+ for (unsigned i = 0; i != n; i++)
-+ {
-+ tree def = gimple_phi_arg_def (stmt, i);
-+ if (!count_nonzero_bytes_addr (def, offset, nbytes, lenrange,
-+ nulterm, allnul, allnonnul, rvals,
-+ snlim))
-+ return false;
-+ }
-+
-+ return true;
-+ }
-+ }
-+
-+ /* Otherwise we don't know anything. */
-+ lenrange[0] = 0;
-+ if (lenrange[1] < nbytes)
-+ lenrange[1] = nbytes;
-+ if (lenrange[2] < nbytes)
-+ lenrange[2] = nbytes;
-+ *nulterm = false;
-+ *allnul = false;
-+ *allnonnul = false;
-+ return true;
-+}
-+
- /* Same as above except with an implicit SSA_NAME limit. RVALS is used
- to determine ranges of dynamically computed string lengths (the results
- of strlen). */
---- gcc/testsuite/gcc.dg/pr94015.c.jj 2020-03-03 18:04:47.928594261 +0100
-+++ gcc/testsuite/gcc.dg/pr94015.c 2020-03-03 18:04:34.345794259 +0100
-@@ -0,0 +1,107 @@
-+/* PR tree-optimization/94015 */
-+/* { dg-do run } */
-+/* { dg-options "-O2" } */
-+
-+char buf[10] = "AAAAAAAAA";
-+
-+__attribute__((noipa)) char *
-+alloc (void)
-+{
-+ return buf;
-+}
-+
-+__attribute__((noipa)) void
-+f1 (void)
-+{
-+ char *s = alloc ();
-+ *(char **)s = "1234567";
-+ s[7] = '\0';
-+}
-+
-+__attribute__((noipa)) void
-+f2 (void)
-+{
-+ char *s = alloc ();
-+ *(char **)s = "123456";
-+ s[6] = '\0';
-+}
-+
-+__attribute__((noipa)) void
-+f3 (void)
-+{
-+ char *s = alloc ();
-+ *(char **)s = "12345";
-+ s[5] = '\0';
-+}
-+
-+__attribute__((noipa)) void
-+f4 (void)
-+{
-+ char *s = alloc ();
-+ *(char **)s = "1234";
-+ s[4] = '\0';
-+}
-+
-+__attribute__((noipa)) void
-+f5 (void)
-+{
-+ char *s = alloc ();
-+ *(char **)s = "123";
-+ s[3] = '\0';
-+}
-+
-+__attribute__((noipa)) void
-+f6 (void)
-+{
-+ char *s = alloc ();
-+ *(char **)s = "12";
-+ s[2] = '\0';
-+}
-+
-+__attribute__((noipa)) void
-+f7 (void)
-+{
-+ char *s = alloc ();
-+ *(char **)s = "1";
-+ s[1] = '\0';
-+}
-+
-+__attribute__((noipa)) void
-+f8 (void)
-+{
-+ char *s = alloc ();
-+ *(char **)s = "";
-+ s[0] = '\0';
-+}
-+
-+int
-+main ()
-+{
-+ if (sizeof (char *) > 8)
-+ return 0;
-+ f1 ();
-+ if (buf[7] != 0)
-+ __builtin_abort ();
-+ f2 ();
-+ if (buf[6] != 0)
-+ __builtin_abort ();
-+ f3 ();
-+ if (buf[5] != 0)
-+ __builtin_abort ();
-+ f4 ();
-+ if (buf[4] != 0)
-+ __builtin_abort ();
-+ f5 ();
-+ if (buf[3] != 0)
-+ __builtin_abort ();
-+ f6 ();
-+ if (buf[2] != 0)
-+ __builtin_abort ();
-+ f7 ();
-+ if (buf[1] != 0)
-+ __builtin_abort ();
-+ f8 ();
-+ if (buf[0] != 0)
-+ __builtin_abort ();
-+ return 0;
-+}
diff --git a/gcc10-pr94130.patch b/gcc10-pr94130.patch
deleted file mode 100644
index 10cbc0a..0000000
--- a/gcc10-pr94130.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-2020-03-11 Jakub Jelinek
-
- PR tree-optimization/94130
- * tree-ssa-dse.c: Include gimplify.h.
- (increment_start_addr): If stmt has lhs, drop the lhs from call and
- set it after the call to the original value of the first argument.
- Formatting fixes.
- (decrement_count): Formatting fix.
-
- * gcc.c-torture/execute/pr94130.c: New test.
-
---- gcc/tree-ssa-dse.c.jj 2020-03-03 11:04:46.367821907 +0100
-+++ gcc/tree-ssa-dse.c 2020-03-11 13:57:38.671845186 +0100
-@@ -38,6 +38,7 @@ along with GCC; see the file COPYING3.
- #include "tree-ssa-dse.h"
- #include "builtins.h"
- #include "gimple-fold.h"
-+#include "gimplify.h"
-
- /* This file implements dead store elimination.
-
-@@ -422,29 +423,38 @@ decrement_count (gimple *stmt, int decre
- gcc_assert (TREE_CODE (*countp) == INTEGER_CST);
- *countp = wide_int_to_tree (TREE_TYPE (*countp), (TREE_INT_CST_LOW (*countp)
- - decrement));
--
- }
-
- static void
- increment_start_addr (gimple *stmt, tree *where, int increment)
- {
-+ if (tree lhs = gimple_call_lhs (stmt))
-+ if (where == gimple_call_arg_ptr (stmt, 0))
-+ {
-+ gassign *newop = gimple_build_assign (lhs, unshare_expr (*where));
-+ gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
-+ gsi_insert_after (&gsi, newop, GSI_SAME_STMT);
-+ gimple_call_set_lhs (stmt, NULL_TREE);
-+ update_stmt (stmt);
-+ }
-+
- if (TREE_CODE (*where) == SSA_NAME)
- {
- tree tem = make_ssa_name (TREE_TYPE (*where));
- gassign *newop
-- = gimple_build_assign (tem, POINTER_PLUS_EXPR, *where,
-+ = gimple_build_assign (tem, POINTER_PLUS_EXPR, *where,
- build_int_cst (sizetype, increment));
- gimple_stmt_iterator gsi = gsi_for_stmt (stmt);
- gsi_insert_before (&gsi, newop, GSI_SAME_STMT);
- *where = tem;
-- update_stmt (gsi_stmt (gsi));
-+ update_stmt (stmt);
- return;
- }
-
- *where = build_fold_addr_expr (fold_build2 (MEM_REF, char_type_node,
-- *where,
-- build_int_cst (ptr_type_node,
-- increment)));
-+ *where,
-+ build_int_cst (ptr_type_node,
-+ increment)));
- }
-
- /* STMT is builtin call that writes bytes in bitmap ORIG, some bytes are dead
---- gcc/testsuite/gcc.c-torture/execute/pr94130.c.jj 2020-03-11 14:01:49.431180291 +0100
-+++ gcc/testsuite/gcc.c-torture/execute/pr94130.c 2020-03-11 14:01:37.654352419 +0100
-@@ -0,0 +1,16 @@
-+/* PR tree-optimization/94130 */
-+
-+int
-+main ()
-+{
-+ int a[8];
-+ char *b = __builtin_memset (a, 0, sizeof (a));
-+ a[0] = 1;
-+ a[1] = 2;
-+ a[2] = 3;
-+ if (b != (char *) a)
-+ __builtin_abort ();
-+ else
-+ asm volatile ("" : : "g" (a) : "memory");
-+ return 0;
-+}
diff --git a/gcc10-pr94308.patch b/gcc10-pr94308.patch
new file mode 100644
index 0000000..78eeae4
--- /dev/null
+++ b/gcc10-pr94308.patch
@@ -0,0 +1,52 @@
+2020-03-25 Jakub Jelinek
+
+ PR target/94308
+ * config/i386/i386-features.c (ix86_add_reg_usage_to_vzeroupper): Set
+ INSN_CODE (insn) to -1 when changing the pattern.
+
+ * gcc.target/i386/pr94308.c: New test.
+
+--- gcc/config/i386/i386-features.c.jj 2020-03-17 13:50:52.955933209 +0100
++++ gcc/config/i386/i386-features.c 2020-03-24 19:19:17.801609289 +0100
+@@ -1792,6 +1792,7 @@ ix86_add_reg_usage_to_vzeroupper (rtx_in
+ RTVEC_ELT (vec, j) = gen_rtx_SET (reg, reg);
+ }
+ XVEC (pattern, 0) = vec;
++ INSN_CODE (insn) = -1;
+ df_insn_rescan (insn);
+ }
+
+--- gcc/testsuite/gcc.target/i386/pr94308.c.jj 2020-03-24 19:32:51.964436310 +0100
++++ gcc/testsuite/gcc.target/i386/pr94308.c 2020-03-24 19:32:39.848617482 +0100
+@@ -0,0 +1,31 @@
++/* PR target/94308 */
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfpmath=sse -mavx2 -mfma" } */
++
++#include
++
++void
++foo (float *x, const float *y, const float *z, unsigned int w)
++{
++ unsigned int a;
++ const unsigned int b = w / 8;
++ const float *c = y;
++ const float *d = z;
++ __m256 e = _mm256_setzero_ps ();
++ __m256 f, g;
++ for (a = 0; a < b; a++)
++ {
++ f = _mm256_loadu_ps (c);
++ g = _mm256_loadu_ps (d);
++ c += 8;
++ d += 8;
++ e = _mm256_fmadd_ps (f, g, e);
++ }
++ __attribute__ ((aligned (32))) float h[8];
++ _mm256_storeu_ps (h, e);
++ _mm256_zeroupper ();
++ float i = h[0] + h[1] + h[2] + h[3] + h[4] + h[5] + h[6] + h[7];
++ for (a = b * 8; a < w; a++)
++ i += (*c++) * (*d++);
++ *x = i;
++}
diff --git a/sources b/sources
index c6f9b84..634dbf6 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-10.0.1-20200311.tar.xz) = b2b730beaf28b75409d4cef72fd9cae20b910442b8b8d4d91911a80bed6e2a63228f08bb31b783f58e31e714be3f3a9f6ceded1f351b4fdded1671e1468eaca7
+SHA512 (gcc-10.0.1-20200325.tar.xz) = 5431edeeb9ef900ce49e4fa13869c63d84c244f846be96f1e782249b0a4ac3c6d5ce73117bd3fb1d2d786e82d394ec0a5ea5cc4615f8cc61d7f6aa43db6a8ce9
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 9ceea0b883185fe489724d54a7e909bb6ed4785fcadf80162033dc6a133e2657337175601278e4155d1f8fac275ff9c8a02572aea876166c608774c809f832e9
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From 19b1c942e0f872dc202cd4d0cf10765071b81316 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Wed, 25 Mar 2020 12:18:53 +0100
Subject: [PATCH 016/341] Adjust for libgphobos SONAME changes.
---
gcc.spec | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/gcc.spec b/gcc.spec
index 4d19025..a5cafcf 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1378,8 +1378,8 @@ ln -sf ../../../libgo.so.16.* libgo.so
ln -sf ../../../libquadmath.so.0.* libquadmath.so
%endif
%if %{build_d}
-ln -sf ../../../libgdruntime.so.76.* libgdruntime.so
-ln -sf ../../../libgphobos.so.76.* libgphobos.so
+ln -sf ../../../libgdruntime.so.1.* libgdruntime.so
+ln -sf ../../../libgphobos.so.1.* libgphobos.so
%endif
%if %{build_libitm}
ln -sf ../../../libitm.so.1.* libitm.so
@@ -1408,8 +1408,8 @@ ln -sf ../../../../%{_lib}/libgo.so.16.* libgo.so
ln -sf ../../../../%{_lib}/libquadmath.so.0.* libquadmath.so
%endif
%if %{build_d}
-ln -sf ../../../../%{_lib}/libgdruntime.so.76.* libgdruntime.so
-ln -sf ../../../../%{_lib}/libgphobos.so.76.* libgphobos.so
+ln -sf ../../../../%{_lib}/libgdruntime.so.1.* libgdruntime.so
+ln -sf ../../../../%{_lib}/libgphobos.so.1.* libgphobos.so
%endif
%if %{build_libitm}
ln -sf ../../../../%{_lib}/libitm.so.1.* libitm.so
@@ -1532,10 +1532,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.76.* | sed 's,^.*libg,libg,'`' )' > libgdruntime.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgdruntime.so.76.* | sed 's,^.*libg,libg,'`' )' > 64/libgdruntime.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgphobos.so.76.* | sed 's,^.*libg,libg,'`' )' > libgphobos.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgphobos.so.76.* | sed 's,^.*libg,libg,'`' )' > 64/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
%endif
%if %{build_libitm}
rm -f libitm.so
@@ -1631,10 +1631,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.76.* | sed 's,^.*libg,libg,'`' )' > libgdruntime.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgdruntime.so.76.* | sed 's,^.*libg,libg,'`' )' > 32/libgdruntime.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgphobos.so.76.* | sed 's,^.*libg,libg,'`' )' > libgphobos.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgphobos.so.76.* | sed 's,^.*libg,libg,'`' )' > 32/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
%endif
%if %{build_libitm}
rm -f libitm.so
@@ -1786,8 +1786,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.76.*
-chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgphobos.so.76.*
+chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgdruntime.so.1.*
+chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgphobos.so.1.*
%endif
%if %{build_libitm}
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libitm.so.1.*
@@ -2571,8 +2571,8 @@ end
%doc rpm.doc/gdc/*
%files -n libgphobos
-%{_prefix}/%{_lib}/libgdruntime.so.76*
-%{_prefix}/%{_lib}/libgphobos.so.76*
+%{_prefix}/%{_lib}/libgdruntime.so.1*
+%{_prefix}/%{_lib}/libgphobos.so.1*
%doc rpm.doc/libphobos/*
%files -n libgphobos-static
From 6768e0a3916c1d2668e43c8a21064534e2cac74a Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Wed, 25 Mar 2020 12:29:44 +0100
Subject: [PATCH 017/341] 10.0.1-0.10
---
gcc.spec | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gcc.spec b/gcc.spec
index a5cafcf..34f3a13 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -265,6 +265,7 @@ Patch9: gcc10-Wno-format-security.patch
Patch10: gcc10-rh1574936.patch
Patch11: gcc10-d-shared-libphobos.patch
Patch12: gcc10-pr94308.patch
+Patch13: gcc10-pr94254.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -777,6 +778,7 @@ to NVidia PTX capable devices if available.
%endif
%patch11 -p0 -b .d-shared-libphobos~
%patch12 -p0 -b .pr94308~
+%patch13 -p0 -b .pr94254~
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@@ -3034,6 +3036,7 @@ end
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
From 047162357c43e82c7bd5c08b573156bead75900b Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Wed, 25 Mar 2020 12:32:34 +0100
Subject: [PATCH 018/341] 10.0.1-0.10
---
gcc10-pr94254.patch | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
create mode 100644 gcc10-pr94254.patch
diff --git a/gcc10-pr94254.patch b/gcc10-pr94254.patch
new file mode 100644
index 0000000..408b90a
--- /dev/null
+++ b/gcc10-pr94254.patch
@@ -0,0 +1,24 @@
+2020-03-23 Richard Sandiford
+
+ PR target/94254
+ * config/rs6000/rs6000.c (rs6000_can_change_mode_class): Allow
+ FPRs to change between SDmode and DDmode.
+
+--- gcc/config/rs6000/rs6000.c
++++ gcc/config/rs6000/rs6000.c
+@@ -12307,6 +12307,15 @@ rs6000_can_change_mode_class (machine_mode from,
+ if (!BYTES_BIG_ENDIAN && (to == TDmode || from == TDmode))
+ return false;
+
++ /* Allow SD<->DD changes, since SDmode values are stored in
++ the low half of the DDmode, just like target-independent
++ code expects. We need to allow at least SD->DD since
++ rs6000_secondary_memory_needed_mode asks for that change
++ to be made for SD reloads. */
++ if ((to == DDmode && from == SDmode)
++ || (to == SDmode && from == DDmode))
++ return true;
++
+ if (from_size < 8 || to_size < 8)
+ return false;
+
From 643c97a3d8490ca6940a63a7d6cf1395e806e4d9 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Sat, 28 Mar 2020 11:00:41 +0100
Subject: [PATCH 019/341] 10.0.1-0.11
---
.gitignore | 1 +
gcc.spec | 29 +++++++++++++----
gcc10-pr93069.patch | 70 ++++++++++++++++++++++++++++++++++++++++
gcc10-pr94254.patch | 24 --------------
gcc10-pr94308.patch | 52 ------------------------------
gcc10-pr94343.patch | 78 +++++++++++++++++++++++++++++++++++++++++++++
sources | 2 +-
7 files changed, 172 insertions(+), 84 deletions(-)
create mode 100644 gcc10-pr93069.patch
delete mode 100644 gcc10-pr94254.patch
delete mode 100644 gcc10-pr94308.patch
create mode 100644 gcc10-pr94343.patch
diff --git a/.gitignore b/.gitignore
index b3422f4..a320272 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@
/gcc-10.0.1-20200216.tar.xz
/gcc-10.0.1-20200311.tar.xz
/gcc-10.0.1-20200325.tar.xz
+/gcc-10.0.1-20200328.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 34f3a13..131b321 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20200325
-%global gitrev 17146084e899406b7b39093e945561c737dfe02c
+%global DATE 20200328
+%global gitrev 97ad35f30b0d8ed5376febf09cefa2b93f9dc423
%global gcc_version 10.0.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 0.10
+%global gcc_release 0.11
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -180,6 +180,7 @@ BuildRequires: gdb
BuildRequires: glibc-devel >= 2.4.90-13
BuildRequires: elfutils-devel >= 0.147
BuildRequires: elfutils-libelf-devel >= 0.147
+BuildRequires: libzstd-devel
%ifarch ppc ppc64 ppc64le ppc64p7 s390 s390x sparc sparcv9 alpha
# Make sure glibc supports TFmode long double
BuildRequires: glibc >= 2.3.90-35
@@ -264,8 +265,8 @@ Patch8: gcc10-foffload-default.patch
Patch9: gcc10-Wno-format-security.patch
Patch10: gcc10-rh1574936.patch
Patch11: gcc10-d-shared-libphobos.patch
-Patch12: gcc10-pr94308.patch
-Patch13: gcc10-pr94254.patch
+Patch12: gcc10-pr93069.patch
+Patch13: gcc10-pr94343.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -777,8 +778,8 @@ to NVidia PTX capable devices if available.
%patch10 -p0 -b .rh1574936~
%endif
%patch11 -p0 -b .d-shared-libphobos~
-%patch12 -p0 -b .pr94308~
-%patch13 -p0 -b .pr94254~
+%patch12 -p0 -b .pr93069~
+%patch13 -p0 -b .pr94343~
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@@ -3007,6 +3008,20 @@ end
%endif
%changelog
+* 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,
diff --git a/gcc10-pr93069.patch b/gcc10-pr93069.patch
new file mode 100644
index 0000000..3451fb6
--- /dev/null
+++ b/gcc10-pr93069.patch
@@ -0,0 +1,70 @@
+2020-03-26 Jakub Jelinek
+
+ PR target/93069
+ * config/i386/sse.md (vec_extract_lo_): Use
+ instead of m in output operand constraint.
+ (vec_extract_hi_): Use instead of
+ %{%3%}.
+
+ * gcc.target/i386/avx512vl-pr93069.c: New test.
+ * gcc.dg/vect/pr93069.c: New test.
+
+--- gcc/config/i386/sse.md.jj 2019-12-27 18:16:48.146431083 +0100
++++ gcc/config/i386/sse.md 2019-12-28 14:43:29.181456611 +0100
+@@ -8782,7 +8782,8 @@
+ })
+
+ (define_insn "vec_extract_lo_"
+- [(set (match_operand: 0 "nonimmediate_operand" "=v,v,m")
++ [(set (match_operand: 0 ""
++ "=v,v,")
+ (vec_select:
+ (match_operand:V16FI 1 ""
+ "v,,v")
+@@ -8834,7 +8835,8 @@
+ })
+
+ (define_insn "vec_extract_lo_"
+- [(set (match_operand: 0 "" "=v,v,m")
++ [(set (match_operand: 0 ""
++ "=v,v,")
+ (vec_select:
+ (match_operand:VI8F_256 1 ""
+ "v,,v")
+@@ -8844,7 +8846,7 @@
+ && ( || !(MEM_P (operands[0]) && MEM_P (operands[1])))"
+ {
+ if ()
+- return "vextract64x2\t{$0x0, %1, %0%{%3%}|%0%{%3%}, %1, 0x0}";
++ return "vextract64x2\t{$0x0, %1, %0|%0, %1, 0x0}";
+ else
+ return "#";
+ }
+--- gcc/testsuite/gcc.target/i386/avx512vl-pr93069.c.jj 2019-12-28 16:31:30.118695074 +0100
++++ gcc/testsuite/gcc.target/i386/avx512vl-pr93069.c 2019-12-28 16:32:16.920990539 +0100
+@@ -0,0 +1,12 @@
++/* PR target/93069 */
++/* { dg-do assemble { target vect_simd_clones } } */
++/* { dg-options "-O2 -fopenmp-simd -mtune=skylake-avx512" } */
++/* { dg-additional-options "-mavx512vl" { target avx512vl } } */
++/* { dg-additional-options "-mavx512dq" { target avx512dq } } */
++
++#pragma omp declare simd
++int
++foo (int x, int y)
++{
++ return x == 0 ? x : y;
++}
+--- gcc/testsuite/gcc.dg/vect/pr93069.c.jj 2019-12-28 16:31:01.822121036 +0100
++++ gcc/testsuite/gcc.dg/vect/pr93069.c 2019-12-28 16:30:35.503517205 +0100
+@@ -0,0 +1,10 @@
++/* PR target/93069 */
++/* { dg-do assemble { target vect_simd_clones } } */
++/* { dg-options "-O2 -fopenmp-simd" } */
++
++#pragma omp declare simd
++int
++foo (int x, int y)
++{
++ return x == 0 ? x : y;
++}
diff --git a/gcc10-pr94254.patch b/gcc10-pr94254.patch
deleted file mode 100644
index 408b90a..0000000
--- a/gcc10-pr94254.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-2020-03-23 Richard Sandiford
-
- PR target/94254
- * config/rs6000/rs6000.c (rs6000_can_change_mode_class): Allow
- FPRs to change between SDmode and DDmode.
-
---- gcc/config/rs6000/rs6000.c
-+++ gcc/config/rs6000/rs6000.c
-@@ -12307,6 +12307,15 @@ rs6000_can_change_mode_class (machine_mode from,
- if (!BYTES_BIG_ENDIAN && (to == TDmode || from == TDmode))
- return false;
-
-+ /* Allow SD<->DD changes, since SDmode values are stored in
-+ the low half of the DDmode, just like target-independent
-+ code expects. We need to allow at least SD->DD since
-+ rs6000_secondary_memory_needed_mode asks for that change
-+ to be made for SD reloads. */
-+ if ((to == DDmode && from == SDmode)
-+ || (to == SDmode && from == DDmode))
-+ return true;
-+
- if (from_size < 8 || to_size < 8)
- return false;
-
diff --git a/gcc10-pr94308.patch b/gcc10-pr94308.patch
deleted file mode 100644
index 78eeae4..0000000
--- a/gcc10-pr94308.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-2020-03-25 Jakub Jelinek
-
- PR target/94308
- * config/i386/i386-features.c (ix86_add_reg_usage_to_vzeroupper): Set
- INSN_CODE (insn) to -1 when changing the pattern.
-
- * gcc.target/i386/pr94308.c: New test.
-
---- gcc/config/i386/i386-features.c.jj 2020-03-17 13:50:52.955933209 +0100
-+++ gcc/config/i386/i386-features.c 2020-03-24 19:19:17.801609289 +0100
-@@ -1792,6 +1792,7 @@ ix86_add_reg_usage_to_vzeroupper (rtx_in
- RTVEC_ELT (vec, j) = gen_rtx_SET (reg, reg);
- }
- XVEC (pattern, 0) = vec;
-+ INSN_CODE (insn) = -1;
- df_insn_rescan (insn);
- }
-
---- gcc/testsuite/gcc.target/i386/pr94308.c.jj 2020-03-24 19:32:51.964436310 +0100
-+++ gcc/testsuite/gcc.target/i386/pr94308.c 2020-03-24 19:32:39.848617482 +0100
-@@ -0,0 +1,31 @@
-+/* PR target/94308 */
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfpmath=sse -mavx2 -mfma" } */
-+
-+#include
-+
-+void
-+foo (float *x, const float *y, const float *z, unsigned int w)
-+{
-+ unsigned int a;
-+ const unsigned int b = w / 8;
-+ const float *c = y;
-+ const float *d = z;
-+ __m256 e = _mm256_setzero_ps ();
-+ __m256 f, g;
-+ for (a = 0; a < b; a++)
-+ {
-+ f = _mm256_loadu_ps (c);
-+ g = _mm256_loadu_ps (d);
-+ c += 8;
-+ d += 8;
-+ e = _mm256_fmadd_ps (f, g, e);
-+ }
-+ __attribute__ ((aligned (32))) float h[8];
-+ _mm256_storeu_ps (h, e);
-+ _mm256_zeroupper ();
-+ float i = h[0] + h[1] + h[2] + h[3] + h[4] + h[5] + h[6] + h[7];
-+ for (a = b * 8; a < w; a++)
-+ i += (*c++) * (*d++);
-+ *x = i;
-+}
diff --git a/gcc10-pr94343.patch b/gcc10-pr94343.patch
new file mode 100644
index 0000000..c8515df
--- /dev/null
+++ b/gcc10-pr94343.patch
@@ -0,0 +1,78 @@
+2020-03-26 Jakub Jelinek
+
+ PR target/94343
+ * config/i386/sse.md (one_cmpl2): If
+ !TARGET_AVX512VL, use 512-bit vpternlog and make sure the input
+ operand is a register. Don't enable masked variants for V*[QH]Imode.
+
+ * gcc.target/i386/avx512f-pr94343.c: New test.
+ * gcc.target/i386/avx512vl-pr94343.c: New test.
+
+--- gcc/config/i386/sse.md.jj 2020-03-06 11:35:46.284074858 +0100
++++ gcc/config/i386/sse.md 2020-03-26 18:49:39.644131577 +0100
+@@ -12796,14 +12796,29 @@ (define_expand "one_cmpl2"
+ })
+
+ (define_insn "one_cmpl2"
+- [(set (match_operand:VI 0 "register_operand" "=v")
+- (xor:VI (match_operand:VI 1 "nonimmediate_operand" "vm")
+- (match_operand:VI 2 "vector_all_ones_operand" "BC")))]
+- "TARGET_AVX512F"
+- "vpternlog\t{$0x55, %1, %0, %0|%0, %0, %1, 0x55}"
++ [(set (match_operand:VI 0 "register_operand" "=v,v")
++ (xor:VI (match_operand:VI 1 "nonimmediate_operand" "v,m")
++ (match_operand:VI 2 "vector_all_ones_operand" "BC,BC")))]
++ "TARGET_AVX512F
++ && (!
++ || mode == SImode
++ || mode == DImode)"
++{
++ if (TARGET_AVX512VL)
++ return "vpternlog\t{$0x55, %1, %0, %0|%0, %0, %1, 0x55}";
++ else
++ return "vpternlog\t{$0x55, %g1, %g0, %g0|%g0, %g0, %g1, 0x55}";
++}
+ [(set_attr "type" "sselog")
+ (set_attr "prefix" "evex")
+- (set_attr "mode" "")])
++ (set (attr "mode")
++ (if_then_else (match_test "TARGET_AVX512VL")
++ (const_string "")
++ (const_string "XI")))
++ (set (attr "enabled")
++ (if_then_else (eq_attr "alternative" "1")
++ (symbol_ref " == 64 || TARGET_AVX512VL")
++ (const_int 1)))])
+
+ (define_expand "_andnot3"
+ [(set (match_operand:VI_AVX2 0 "register_operand")
+--- gcc/testsuite/gcc.target/i386/avx512f-pr94343.c.jj 2020-03-26 17:47:40.008654504 +0100
++++ gcc/testsuite/gcc.target/i386/avx512f-pr94343.c 2020-03-26 17:48:37.169811375 +0100
+@@ -0,0 +1,12 @@
++/* PR target/94343 */
++/* { dg-do compile } */
++/* { dg-options "-O2 -mavx512f -mno-avx512vl" } */
++/* { dg-final { scan-assembler-not "vpternlogd\[^\n\r]*xmm\[0-9]*" } } */
++
++typedef int __v4si __attribute__((vector_size (16)));
++
++__v4si
++foo (__v4si a)
++{
++ return ~a;
++}
+--- gcc/testsuite/gcc.target/i386/avx512vl-pr94343.c.jj 2020-03-26 17:48:53.232573115 +0100
++++ gcc/testsuite/gcc.target/i386/avx512vl-pr94343.c 2020-03-26 17:49:08.034352968 +0100
+@@ -0,0 +1,12 @@
++/* PR target/94343 */
++/* { dg-do compile } */
++/* { dg-options "-O2 -mavx512vl" } */
++/* { dg-final { scan-assembler "vpternlogd\[^\n\r]*xmm\[0-9]*" } } */
++
++typedef int __v4si __attribute__((vector_size (16)));
++
++__v4si
++foo (__v4si a)
++{
++ return ~a;
++}
diff --git a/sources b/sources
index 634dbf6..c20f1e4 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-10.0.1-20200325.tar.xz) = 5431edeeb9ef900ce49e4fa13869c63d84c244f846be96f1e782249b0a4ac3c6d5ce73117bd3fb1d2d786e82d394ec0a5ea5cc4615f8cc61d7f6aa43db6a8ce9
+SHA512 (gcc-10.0.1-20200328.tar.xz) = 567f7b9c7b3ac41465bac0354d94f58ab92abe8a5cc2462551397d4bee6071a90ae79c65a4e1d84f51dde6b8639574606675204c78ce0d16f3fc47c169a4ef60
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 9ceea0b883185fe489724d54a7e909bb6ed4785fcadf80162033dc6a133e2657337175601278e4155d1f8fac275ff9c8a02572aea876166c608774c809f832e9
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From 9d851d2a4e5e87dd91e0bd48339ba1afb4b5aa2a Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Mon, 20 Apr 2020 16:27:49 +0200
Subject: [PATCH 020/341] 10.0.1-0.12
---
.gitignore | 1 +
gcc.spec | 55 ++++++++++++++++++++++++++++----
gcc10-pr93069.patch | 70 ----------------------------------------
gcc10-pr94343.patch | 78 ---------------------------------------------
sources | 2 +-
5 files changed, 50 insertions(+), 156 deletions(-)
delete mode 100644 gcc10-pr93069.patch
delete mode 100644 gcc10-pr94343.patch
diff --git a/.gitignore b/.gitignore
index a320272..8d6a745 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,4 @@
/gcc-10.0.1-20200311.tar.xz
/gcc-10.0.1-20200325.tar.xz
/gcc-10.0.1-20200328.tar.xz
+/gcc-10.0.1-20200420.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 131b321..74cb899 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20200328
-%global gitrev 97ad35f30b0d8ed5376febf09cefa2b93f9dc423
+%global DATE 20200420
+%global gitrev dbc1bb99e280740e5bda658a911d9dd3f431ad4d
%global gcc_version 10.0.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 0.11
+%global gcc_release 0.12
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -265,8 +265,6 @@ Patch8: gcc10-foffload-default.patch
Patch9: gcc10-Wno-format-security.patch
Patch10: gcc10-rh1574936.patch
Patch11: gcc10-d-shared-libphobos.patch
-Patch12: gcc10-pr93069.patch
-Patch13: gcc10-pr94343.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -778,8 +776,6 @@ to NVidia PTX capable devices if available.
%patch10 -p0 -b .rh1574936~
%endif
%patch11 -p0 -b .d-shared-libphobos~
-%patch12 -p0 -b .pr93069~
-%patch13 -p0 -b .pr94343~
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@@ -3008,6 +3004,51 @@ end
%endif
%changelog
+* Mon Apr 20 2020 Jakub Jelinek 10.0.1-0.12
+- 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
+
* 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,
diff --git a/gcc10-pr93069.patch b/gcc10-pr93069.patch
deleted file mode 100644
index 3451fb6..0000000
--- a/gcc10-pr93069.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-2020-03-26 Jakub Jelinek
-
- PR target/93069
- * config/i386/sse.md (vec_extract_lo_): Use
- instead of m in output operand constraint.
- (vec_extract_hi_): Use instead of
- %{%3%}.
-
- * gcc.target/i386/avx512vl-pr93069.c: New test.
- * gcc.dg/vect/pr93069.c: New test.
-
---- gcc/config/i386/sse.md.jj 2019-12-27 18:16:48.146431083 +0100
-+++ gcc/config/i386/sse.md 2019-12-28 14:43:29.181456611 +0100
-@@ -8782,7 +8782,8 @@
- })
-
- (define_insn "vec_extract_lo_"
-- [(set (match_operand: 0 "nonimmediate_operand" "=v,v,m")
-+ [(set (match_operand: 0 ""
-+ "=v,v,")
- (vec_select:
- (match_operand:V16FI 1 ""
- "v,,v")
-@@ -8834,7 +8835,8 @@
- })
-
- (define_insn "vec_extract_lo_"
-- [(set (match_operand: 0 "" "=v,v,m")
-+ [(set (match_operand: 0 ""
-+ "=v,v,")
- (vec_select:
- (match_operand:VI8F_256 1 ""
- "v,,v")
-@@ -8844,7 +8846,7 @@
- && ( || !(MEM_P (operands[0]) && MEM_P (operands[1])))"
- {
- if ()
-- return "vextract64x2\t{$0x0, %1, %0%{%3%}|%0%{%3%}, %1, 0x0}";
-+ return "vextract64x2\t{$0x0, %1, %0|%0, %1, 0x0}";
- else
- return "#";
- }
---- gcc/testsuite/gcc.target/i386/avx512vl-pr93069.c.jj 2019-12-28 16:31:30.118695074 +0100
-+++ gcc/testsuite/gcc.target/i386/avx512vl-pr93069.c 2019-12-28 16:32:16.920990539 +0100
-@@ -0,0 +1,12 @@
-+/* PR target/93069 */
-+/* { dg-do assemble { target vect_simd_clones } } */
-+/* { dg-options "-O2 -fopenmp-simd -mtune=skylake-avx512" } */
-+/* { dg-additional-options "-mavx512vl" { target avx512vl } } */
-+/* { dg-additional-options "-mavx512dq" { target avx512dq } } */
-+
-+#pragma omp declare simd
-+int
-+foo (int x, int y)
-+{
-+ return x == 0 ? x : y;
-+}
---- gcc/testsuite/gcc.dg/vect/pr93069.c.jj 2019-12-28 16:31:01.822121036 +0100
-+++ gcc/testsuite/gcc.dg/vect/pr93069.c 2019-12-28 16:30:35.503517205 +0100
-@@ -0,0 +1,10 @@
-+/* PR target/93069 */
-+/* { dg-do assemble { target vect_simd_clones } } */
-+/* { dg-options "-O2 -fopenmp-simd" } */
-+
-+#pragma omp declare simd
-+int
-+foo (int x, int y)
-+{
-+ return x == 0 ? x : y;
-+}
diff --git a/gcc10-pr94343.patch b/gcc10-pr94343.patch
deleted file mode 100644
index c8515df..0000000
--- a/gcc10-pr94343.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-2020-03-26 Jakub Jelinek
-
- PR target/94343
- * config/i386/sse.md (one_cmpl2): If
- !TARGET_AVX512VL, use 512-bit vpternlog and make sure the input
- operand is a register. Don't enable masked variants for V*[QH]Imode.
-
- * gcc.target/i386/avx512f-pr94343.c: New test.
- * gcc.target/i386/avx512vl-pr94343.c: New test.
-
---- gcc/config/i386/sse.md.jj 2020-03-06 11:35:46.284074858 +0100
-+++ gcc/config/i386/sse.md 2020-03-26 18:49:39.644131577 +0100
-@@ -12796,14 +12796,29 @@ (define_expand "one_cmpl2"
- })
-
- (define_insn "one_cmpl2"
-- [(set (match_operand:VI 0 "register_operand" "=v")
-- (xor:VI (match_operand:VI 1 "nonimmediate_operand" "vm")
-- (match_operand:VI 2 "vector_all_ones_operand" "BC")))]
-- "TARGET_AVX512F"
-- "vpternlog\t{$0x55, %1, %0, %0|%0, %0, %1, 0x55}"
-+ [(set (match_operand:VI 0 "register_operand" "=v,v")
-+ (xor:VI (match_operand:VI 1 "nonimmediate_operand" "v,m")
-+ (match_operand:VI 2 "vector_all_ones_operand" "BC,BC")))]
-+ "TARGET_AVX512F
-+ && (!
-+ || mode == SImode
-+ || mode == DImode)"
-+{
-+ if (TARGET_AVX512VL)
-+ return "vpternlog\t{$0x55, %1, %0, %0|%0, %0, %1, 0x55}";
-+ else
-+ return "vpternlog\t{$0x55, %g1, %g0, %g0|%g0, %g0, %g1, 0x55}";
-+}
- [(set_attr "type" "sselog")
- (set_attr "prefix" "evex")
-- (set_attr "mode" "")])
-+ (set (attr "mode")
-+ (if_then_else (match_test "TARGET_AVX512VL")
-+ (const_string "")
-+ (const_string "XI")))
-+ (set (attr "enabled")
-+ (if_then_else (eq_attr "alternative" "1")
-+ (symbol_ref " == 64 || TARGET_AVX512VL")
-+ (const_int 1)))])
-
- (define_expand "_andnot3"
- [(set (match_operand:VI_AVX2 0 "register_operand")
---- gcc/testsuite/gcc.target/i386/avx512f-pr94343.c.jj 2020-03-26 17:47:40.008654504 +0100
-+++ gcc/testsuite/gcc.target/i386/avx512f-pr94343.c 2020-03-26 17:48:37.169811375 +0100
-@@ -0,0 +1,12 @@
-+/* PR target/94343 */
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mavx512f -mno-avx512vl" } */
-+/* { dg-final { scan-assembler-not "vpternlogd\[^\n\r]*xmm\[0-9]*" } } */
-+
-+typedef int __v4si __attribute__((vector_size (16)));
-+
-+__v4si
-+foo (__v4si a)
-+{
-+ return ~a;
-+}
---- gcc/testsuite/gcc.target/i386/avx512vl-pr94343.c.jj 2020-03-26 17:48:53.232573115 +0100
-+++ gcc/testsuite/gcc.target/i386/avx512vl-pr94343.c 2020-03-26 17:49:08.034352968 +0100
-@@ -0,0 +1,12 @@
-+/* PR target/94343 */
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mavx512vl" } */
-+/* { dg-final { scan-assembler "vpternlogd\[^\n\r]*xmm\[0-9]*" } } */
-+
-+typedef int __v4si __attribute__((vector_size (16)));
-+
-+__v4si
-+foo (__v4si a)
-+{
-+ return ~a;
-+}
diff --git a/sources b/sources
index c20f1e4..2ebda5a 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-10.0.1-20200328.tar.xz) = 567f7b9c7b3ac41465bac0354d94f58ab92abe8a5cc2462551397d4bee6071a90ae79c65a4e1d84f51dde6b8639574606675204c78ce0d16f3fc47c169a4ef60
+SHA512 (gcc-10.0.1-20200420.tar.xz) = 3504ebfe7b9fbe59daaf5568ffe3d2c286180dda52ca57600dca370aca51231464e553758148487d1ea15c1d50f1cb72229910592a5137e4901ef537394437e4
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 9ceea0b883185fe489724d54a7e909bb6ed4785fcadf80162033dc6a133e2657337175601278e4155d1f8fac275ff9c8a02572aea876166c608774c809f832e9
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From 93ba12bdcb15c325344517880171ef9c1d7e016f Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Fri, 1 May 2020 00:13:49 +0200
Subject: [PATCH 021/341] 10.0.1-0.13
---
gcc.spec | 36 +++++++++++++++++++++++++++++++++---
1 file changed, 33 insertions(+), 3 deletions(-)
diff --git a/gcc.spec b/gcc.spec
index 74cb899..7084411 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20200420
-%global gitrev dbc1bb99e280740e5bda658a911d9dd3f431ad4d
+%global DATE 20200501
+%global gitrev 563509ad4338c7193d06f4008e9df657990628a5
%global gcc_version 10.0.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 0.12
+%global gcc_release 0.13
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -3004,6 +3004,36 @@ end
%endif
%changelog
+* 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
- update from trunk
- PRs analyzer/94378, bootstrap/89494, bootstrap/92008, c++/67825,
From 1cd0b2d684f457e20c4d4297cf4fd66bcffbb1a0 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Fri, 1 May 2020 00:20:13 +0200
Subject: [PATCH 022/341] 10.0.1-0.13
---
.gitignore | 1 +
sources | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 8d6a745..650f837 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,4 @@
/gcc-10.0.1-20200325.tar.xz
/gcc-10.0.1-20200328.tar.xz
/gcc-10.0.1-20200420.tar.xz
+/gcc-10.0.1-20200501.tar.xz
diff --git a/sources b/sources
index 2ebda5a..cfafe0e 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-10.0.1-20200420.tar.xz) = 3504ebfe7b9fbe59daaf5568ffe3d2c286180dda52ca57600dca370aca51231464e553758148487d1ea15c1d50f1cb72229910592a5137e4901ef537394437e4
+SHA512 (gcc-10.0.1-20200501.tar.xz) = c83c1a44b48d4da2ed492e63447c5d4a1ca8e4814acb7b841981ce0604588d288639ef84e0c548bb8b7709450da59842040e37e9481e0393e32bed5912ab9d3e
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 9ceea0b883185fe489724d54a7e909bb6ed4785fcadf80162033dc6a133e2657337175601278e4155d1f8fac275ff9c8a02572aea876166c608774c809f832e9
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From 062d80630de4709e58a37cab01567b4936fba061 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Fri, 1 May 2020 00:30:58 +0200
Subject: [PATCH 023/341] 10.0.1-0.13
---
gcc10-d-shared-libphobos.patch | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc10-d-shared-libphobos.patch b/gcc10-d-shared-libphobos.patch
index 392d631..6384bbb 100644
--- a/gcc10-d-shared-libphobos.patch
+++ b/gcc10-d-shared-libphobos.patch
@@ -5,9 +5,9 @@
--- gcc/d/d-spec.cc.jj 2019-01-01 12:37:49.502444257 +0100
+++ gcc/d/d-spec.cc 2019-01-17 17:09:45.364949246 +0100
-@@ -405,9 +405,9 @@ lang_specific_driver (cl_decoded_option
+@@ -408,9 +408,9 @@ lang_specific_driver (cl_decoded_option
/* Add `-lgphobos' if we haven't already done so. */
- if (phobos_library != PHOBOS_NOLINK && need_phobos)
+ if (phobos_library != PHOBOS_NOLINK)
{
- /* Default to static linking. */
- if (phobos_library != PHOBOS_DYNAMIC)
@@ -17,4 +17,4 @@
+ phobos_library = PHOBOS_DYNAMIC;
#ifdef HAVE_LD_STATIC_DYNAMIC
- if (phobos_library == PHOBOS_DYNAMIC && static_link)
+ if (phobos_library == PHOBOS_STATIC && !static_link)
From 95507e8b681b5013b87bbbcb0514dd27941e648a Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Sat, 2 May 2020 10:44:07 +0200
Subject: [PATCH 024/341] 10.0.1-0.14
---
gcc.spec | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/gcc.spec b/gcc.spec
index 7084411..7084364 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20200501
+%global DATE 20200502
%global gitrev 563509ad4338c7193d06f4008e9df657990628a5
%global gcc_version 10.0.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 0.13
+%global gcc_release 0.14
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -1290,7 +1290,7 @@ mkdir -p %{buildroot}/%{_lib}
mv -f %{buildroot}%{_prefix}/%{_lib}/libgcc_s.so.1 %{buildroot}/%{_lib}/libgcc_s-%{gcc_major}-%{DATE}.so.1
chmod 755 %{buildroot}/%{_lib}/libgcc_s-%{gcc_major}-%{DATE}.so.1
ln -sf libgcc_s-%{gcc_major}-%{DATE}.so.1 %{buildroot}/%{_lib}/libgcc_s.so.1
-%ifarch %{ix86} x86_64 ppc ppc64 ppc64p7 ppc64le %{arm}
+%ifarch %{ix86} x86_64 ppc ppc64 ppc64p7 ppc64le %{arm} aarch64 riscv64
rm -f $FULLPATH/libgcc_s.so
echo '/* GNU ld script
Use the shared library, but some functions are only in
@@ -3004,6 +3004,9 @@ end
%endif
%changelog
+* 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
From 291926a2e8be4b39e0a47fe227800ba6bc275812 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Sat, 2 May 2020 12:27:09 +0200
Subject: [PATCH 025/341] 10.0.1-0.14
---
gcc.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc.spec b/gcc.spec
index 7084364..f9a716c 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,4 +1,4 @@
-%global DATE 20200502
+%global DATE 20200501
%global gitrev 563509ad4338c7193d06f4008e9df657990628a5
%global gcc_version 10.0.1
%global gcc_major 10
From d53415ef0173df0a1aae456a94cbe8deb6b8bdf0 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Thu, 7 May 2020 22:30:17 +0200
Subject: [PATCH 026/341] 10.1.1-1
---
.gitignore | 1 +
gcc.spec | 13 ++++++++++---
gcc10-libstdc++-docs.patch | 4 ++--
sources | 2 +-
update-gcc.sh | 2 +-
5 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/.gitignore b/.gitignore
index 650f837..30bc40a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,4 @@
/gcc-10.0.1-20200328.tar.xz
/gcc-10.0.1-20200420.tar.xz
/gcc-10.0.1-20200501.tar.xz
+/gcc-10.1.1-20200507.tar.xz
diff --git a/gcc.spec b/gcc.spec
index f9a716c..1cfe789 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20200501
+%global DATE 20200507
%global gitrev 563509ad4338c7193d06f4008e9df657990628a5
-%global gcc_version 10.0.1
+%global gcc_version 10.1.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 0.14
+%global gcc_release 1
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -3004,6 +3004,13 @@ end
%endif
%changelog
+* 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)
diff --git a/gcc10-libstdc++-docs.patch b/gcc10-libstdc++-docs.patch
index 56c01da..cf881d8 100644
--- a/gcc10-libstdc++-docs.patch
+++ b/gcc10-libstdc++-docs.patch
@@ -4,7 +4,7 @@
FSF
-+ Release 10.0.1
++ Release 10.1.1
+
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation
@@ -17,7 +17,7 @@
- The API documentation, rendered into HTML, can be viewed online
+ The API documentation, rendered into HTML, can be viewed locally
-+ for the 10.0.1 release,
++ for the 10.1.1 release,
+ online
for each GCC release
and
diff --git a/sources b/sources
index cfafe0e..cc0c822 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-10.0.1-20200501.tar.xz) = c83c1a44b48d4da2ed492e63447c5d4a1ca8e4814acb7b841981ce0604588d288639ef84e0c548bb8b7709450da59842040e37e9481e0393e32bed5912ab9d3e
+SHA512 (gcc-10.1.1-20200507.tar.xz) = 2847d8d44ea2f174dc4f510a1727150691c66ab4cc4e256630cafeb5f10272d1b1ab2aaa7dda21539cbd414a108355e7798b269cd91e0fe964ebc4bbcfc19604
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 9ceea0b883185fe489724d54a7e909bb6ed4785fcadf80162033dc6a133e2657337175601278e4155d1f8fac275ff9c8a02572aea876166c608774c809f832e9
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
diff --git a/update-gcc.sh b/update-gcc.sh
index 845a024..89d0859 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.0.1-$d/ $1 | xz -9e > gcc-10.0.1-$d.tar.xz
+git --git-dir=gcc-dir.tmp/.git archive --prefix=gcc-10.1.1-$d/ $1 | xz -9e > gcc-10.1.1-$d.tar.xz
rm -rf gcc-dir.tmp
From 2b448df91ac3df4ffffa8aa100c05d7f5cde13de Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Thu, 11 Jun 2020 12:31:02 +0200
Subject: [PATCH 027/341] correct instructions for creation of newlib tarball,
filter out sun-rpc licensed code that is never used during the package build
---
gcc.spec | 8 +++++---
sources | 2 +-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/gcc.spec b/gcc.spec
index 1cfe789..5758fbd 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -135,9 +135,8 @@ Source0: gcc-%{version}-%{DATE}.tar.xz
Source1: nvptx-tools-%{nvptx_tools_gitrev}.tar.xz
# The source for nvptx-newlib package was pulled from upstream's vcs. Use the
# following commands to generate the tarball:
-# git clone --depth 1 git://sourceware.org/git/newlib-cygwin.git newlib-cygwin-dir.tmp
-# git --git-dir=newlib-cygwin-dir.tmp/.git fetch --depth 1 origin %%{newlib_cygwin_gitrev}
-# git --git-dir=newlib-cygwin-dir.tmp/.git archive --prefix=newlib-cygwin-%%{newlib_cygwin_gitrev}/ %%{newlib_cygwin_gitrev} | xz -9e > newlib-cygwin-%%{newlib_cygwin_gitrev}.tar.xz
+# git clone git://sourceware.org/git/newlib-cygwin.git newlib-cygwin-dir.tmp
+# git --git-dir=newlib-cygwin-dir.tmp/.git archive --prefix=newlib-cygwin-%%{newlib_cygwin_gitrev}/ %%{newlib_cygwin_gitrev} ":(exclude)newlib/libc/sys/linux/include/rpc/*.[hx]" | xz -9e > newlib-cygwin-%%{newlib_cygwin_gitrev}.tar.xz
# rm -rf newlib-cygwin-dir.tmp
Source2: newlib-cygwin-%{newlib_cygwin_gitrev}.tar.xz
%global isl_version 0.16.1
@@ -3004,6 +3003,9 @@ end
%endif
%changelog
+- correct instructions for creation of newlib tarball, filter out sun-rpc
+ licensed code that is never used during the package build
+
* Thu May 7 2020 Jakub Jelinek 10.1.1-1
- update from releases/gcc-10 branch
- GCC 10.1.0 release
diff --git a/sources b/sources
index cc0c822..1be3dc6 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
SHA512 (gcc-10.1.1-20200507.tar.xz) = 2847d8d44ea2f174dc4f510a1727150691c66ab4cc4e256630cafeb5f10272d1b1ab2aaa7dda21539cbd414a108355e7798b269cd91e0fe964ebc4bbcfc19604
-SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 9ceea0b883185fe489724d54a7e909bb6ed4785fcadf80162033dc6a133e2657337175601278e4155d1f8fac275ff9c8a02572aea876166c608774c809f832e9
+SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From 9f9248e195ba6a8c8917dd1567ae5829176dea5c Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Thu, 18 Jun 2020 14:41:28 +0200
Subject: [PATCH 028/341] 10.1.1-2
---
.gitignore | 1 +
gcc.spec | 41 ++++++++++++++++++++++++++++++++++++++---
sources | 2 +-
3 files changed, 40 insertions(+), 4 deletions(-)
diff --git a/.gitignore b/.gitignore
index 30bc40a..2fc7303 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,4 @@
/gcc-10.0.1-20200420.tar.xz
/gcc-10.0.1-20200501.tar.xz
/gcc-10.1.1-20200507.tar.xz
+/gcc-10.1.1-20200618.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 5758fbd..bf8af0d 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20200507
-%global gitrev 563509ad4338c7193d06f4008e9df657990628a5
+%global DATE 20200618
+%global gitrev c518050989be3a224a04a8b33d73f37a16c30fbb
%global gcc_version 10.1.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 1
+%global gcc_release 2
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -1906,6 +1906,11 @@ rm -f %{buildroot}%{mandir}/man3/ffi*
# Help plugins find out nvra.
echo gcc-%{version}-%{release}.%{_arch} > $FULLPATH/rpmver
+# Add symlink to lto plugin in the binutils plugin directory.
+%{__mkdir_p} %{buildroot}%{_libdir}/bfd-plugins/
+ln -s ../../libexec/gcc/%{gcc_target_platform}/%{gcc_major}/liblto_plugin.so \
+ %{buildroot}%{_libdir}/bfd-plugins/
+
%check
cd obj-%{gcc_target_platform}
@@ -2031,6 +2036,7 @@ end
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/lto1
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/lto-wrapper
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/liblto_plugin.so*
+%{_libdir}/bfd-plugins/liblto_plugin.so
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/rpmver
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/stddef.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/stdarg.h
@@ -3003,9 +3009,38 @@ end
%endif
%changelog
+* 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
diff --git a/sources b/sources
index 1be3dc6..9a9bb69 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-10.1.1-20200507.tar.xz) = 2847d8d44ea2f174dc4f510a1727150691c66ab4cc4e256630cafeb5f10272d1b1ab2aaa7dda21539cbd414a108355e7798b269cd91e0fe964ebc4bbcfc19604
+SHA512 (gcc-10.1.1-20200618.tar.xz) = 7dbec01ce5199c37072f97874b11b59b9e5a5b20d9782f662eb856c34009faeb1644e39fb7f13e8c8e016ad552d9c9fcf5d5ba9562297dccf66ebc75f1b963cf
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From f5bff3fc5156f2393e8b24695171d496b775959e Mon Sep 17 00:00:00 2001
From: Troy Dawson
Date: Tue, 14 Jul 2020 14:54:16 +0000
Subject: [PATCH 029/341] Minor conditional tweak for ELN
This minor conditional change allows the package to build in ELN.
Signed-off-by: Troy Dawson tdawson@redhat.com
---
gcc.spec | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc.spec b/gcc.spec
index bf8af0d..003660e 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -23,7 +23,7 @@
%if 0%{?__brp_strip_lto:1}
%global __brp_strip_lto %{__brp_strip_lto} || :
%endif
-%if 0%{?fedora} < 32
+%if 0%{?fedora} < 32 && 0%{?rhel} < 8
%global multilib_64_archs sparc64 ppc64 ppc64p7 s390x x86_64
%else
%global multilib_64_archs sparc64 ppc64 ppc64p7 x86_64
@@ -98,7 +98,7 @@
%else
%global build_offload_nvptx 0
%endif
-%if 0%{?fedora} < 32
+%if 0%{?fedora} < 32 && 0%{?rhel} < 8
%ifarch s390x
%global multilib_32_arch s390
%endif
From 6d54c72548f3f9e5df37d799a02c8a019841cb3d Mon Sep 17 00:00:00 2001
From: Troy Dawson
Date: Wed, 15 Jul 2020 13:45:53 +0000
Subject: [PATCH 030/341] Final minor conditional tweak for ELN
Yesterday, my pull request was rushed. I only waited two hours through the build before thinking it was fixed.
Because I rushed I missed one other conditional, and the builds still don't builds in ELN.
This time, with this pull request, I waited the full 8+ hours. It builds successfully, completely.
We are still in a bit of a time crunch, so if you wouldn't mind merging this pull request, I would appreciate it.
Signed-off-by: Troy Dawson
---
gcc.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc.spec b/gcc.spec
index 003660e..5541192 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -896,7 +896,7 @@ CONFIGURE_OPTS="\
%endif
%ifarch ppc64le %{mips} s390x
%ifarch s390x
-%if 0%{?fedora} < 32
+%if 0%{?fedora} < 32 && 0%{?rhel} < 8
--enable-multilib \
%else
--disable-multilib \
From ac758fe7b95ea94f328690d6786f0a113f263819 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Thu, 23 Jul 2020 11:48:38 +0200
Subject: [PATCH 031/341] 10.2.1-1
---
.gitignore | 1 +
gcc.spec | 38 ++++++++++++++++++++++++++++++++++----
gcc10-libstdc++-docs.patch | 4 ++--
sources | 2 +-
update-gcc.sh | 2 +-
5 files changed, 39 insertions(+), 8 deletions(-)
diff --git a/.gitignore b/.gitignore
index 2fc7303..a1ab839 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,4 @@
/gcc-10.0.1-20200501.tar.xz
/gcc-10.1.1-20200507.tar.xz
/gcc-10.1.1-20200618.tar.xz
+/gcc-10.2.1-20200723.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 5541192..c1d3081 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20200618
-%global gitrev c518050989be3a224a04a8b33d73f37a16c30fbb
-%global gcc_version 10.1.1
+%global DATE 20200723
+%global gitrev 3fc88aa16f1bf661db4518d6d62869f081981981
+%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 2
+%global gcc_release 1
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -3009,6 +3009,36 @@ end
%endif
%changelog
+* 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
+
* 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,
diff --git a/gcc10-libstdc++-docs.patch b/gcc10-libstdc++-docs.patch
index cf881d8..d51b6d3 100644
--- a/gcc10-libstdc++-docs.patch
+++ b/gcc10-libstdc++-docs.patch
@@ -4,7 +4,7 @@
FSF
-+ Release 10.1.1
++ Release 10.2.1
+
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation
@@ -17,7 +17,7 @@
- The API documentation, rendered into HTML, can be viewed online
+ The API documentation, rendered into HTML, can be viewed locally
-+ for the 10.1.1 release,
++ for the 10.2.1 release,
+ online
for each GCC release
and
diff --git a/sources b/sources
index 9a9bb69..0e888d0 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-10.1.1-20200618.tar.xz) = 7dbec01ce5199c37072f97874b11b59b9e5a5b20d9782f662eb856c34009faeb1644e39fb7f13e8c8e016ad552d9c9fcf5d5ba9562297dccf66ebc75f1b963cf
+SHA512 (gcc-10.2.1-20200723.tar.xz) = e1719e4a18f43bb76acb91c0d768711e78d7e8c478b72e691911094e233570597997ed108ba7ed4fb136542993af935ea38ec462a1972689c9220d4cc0e2933f
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 89d0859..c04b746 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.1.1-$d/ $1 | xz -9e > gcc-10.1.1-$d.tar.xz
+git --git-dir=gcc-dir.tmp/.git archive --prefix=gcc-10.2.1-$d/ $1 | xz -9e > gcc-10.2.1-$d.tar.xz
rm -rf gcc-dir.tmp
From 77db02d7c8ae996c22a8853a6ef067bbf87c8d01 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Thu, 23 Jul 2020 12:14:52 +0200
Subject: [PATCH 032/341] 10.2.1-1
---
gcc.spec | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gcc.spec b/gcc.spec
index c1d3081..b55bb2d 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -814,6 +814,7 @@ export CONFIG_SITE=NONE
CC=gcc
CXX=g++
OPT_FLAGS=`echo %{optflags}|sed -e 's/\(-Wp,\)\?-D_FORTIFY_SOURCE=[12]//g'`
+OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-flto//g;s/-ffat-lto-objects//g'`
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-m64//g;s/-m32//g;s/-m31//g'`
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mfpmath=sse/-mfpmath=sse -msse2/g'`
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/ -pipe / /g'`
@@ -3038,6 +3039,9 @@ end
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
From ba2f1bfa9d5744ce3295d089ee25d192d08a180b Mon Sep 17 00:00:00 2001
From: Marek Polacek
Date: Thu, 23 Jul 2020 16:05:40 -0400
Subject: [PATCH 033/341] Require MPFR Library version 3.1.0 (or later).
---
gcc.spec | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc.spec b/gcc.spec
index b55bb2d..19e6137 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -165,7 +165,7 @@ BuildRequires: glibc-static
BuildRequires: zlib-devel, gettext, dejagnu, bison, flex, sharutils
BuildRequires: texinfo, texinfo-tex, /usr/bin/pod2man
BuildRequires: systemtap-sdt-devel >= 1.3
-BuildRequires: gmp-devel >= 4.1.2-8, mpfr-devel >= 2.2.1, libmpc-devel >= 0.8.1
+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++
%if %{build_go}
@@ -737,7 +737,7 @@ This package contains static Go libraries.
%package plugin-devel
Summary: Support for compiling GCC plugins
Requires: gcc = %{version}-%{release}
-Requires: gmp-devel >= 4.1.2-8, mpfr-devel >= 2.2.1, libmpc-devel >= 0.8.1
+Requires: gmp-devel >= 4.1.2-8, mpfr-devel >= 3.1.0, libmpc-devel >= 0.8.1
%description plugin-devel
This package contains header files and other support files
From 38049fe0f399c2a4a5284f9c2e2e25362791fe7a Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Mon, 27 Jul 2020 18:20:11 +0000
Subject: [PATCH 034/341] - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_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 19e6137..595e70a 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -115,7 +115,7 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
-Release: %{gcc_release}%{?dist}
+Release: %{gcc_release}%{?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
@@ -3010,6 +3010,9 @@ end
%endif
%changelog
+* Mon Jul 27 2020 Fedora Release Engineering - 10.2.1-1.1
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
+
* Thu Jul 23 2020 Jakub Jelinek 10.2.1-1
- update from releases/gcc-10 branch
- GCC 10.2 release
From 9186451072460793e94e869f774316766874d364 Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Sat, 1 Aug 2020 01:07:14 +0000
Subject: [PATCH 035/341] - Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering
---
gcc.spec | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gcc.spec b/gcc.spec
index 595e70a..9085b66 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -115,7 +115,7 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
-Release: %{gcc_release}%{?dist}.1
+Release: %{gcc_release}%{?dist}.2
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@@ -3010,6 +3010,10 @@ end
%endif
%changelog
+* Sat Aug 01 2020 Fedora Release Engineering - 10.2.1-1.2
+- Second attempt - Rebuilt for
+ https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
+
* Mon Jul 27 2020 Fedora Release Engineering - 10.2.1-1.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
From d6a2f172d658927a1f21b6111d490cf2a4fb773d Mon Sep 17 00:00:00 2001
From: Aleksandra Fedorova
Date: Sat, 25 Jul 2020 18:34:17 +0200
Subject: [PATCH 036/341] Build both C an C++ hello world programs as
integration test
Add simple test which builds Hello World programs for both C and C++.
Build options provided by default rpm macro.
Based on
https://github.com/CentOS/sig-core-t_functional/tree/master/tests/p_annobin
Gating is not enabled yet, so the test will not be blocking.
---
tests/build_hello_world.sh | 9 +++++++++
tests/data/hello.c | 5 +++++
tests/data/hello.cpp | 5 +++++
tests/tests.yml | 14 ++++++++++++++
4 files changed, 33 insertions(+)
create mode 100755 tests/build_hello_world.sh
create mode 100644 tests/data/hello.c
create mode 100644 tests/data/hello.cpp
create mode 100644 tests/tests.yml
diff --git a/tests/build_hello_world.sh b/tests/build_hello_world.sh
new file mode 100755
index 0000000..f6aae70
--- /dev/null
+++ b/tests/build_hello_world.sh
@@ -0,0 +1,9 @@
+#!/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
new file mode 100644
index 0000000..fe064a2
--- /dev/null
+++ b/tests/data/hello.c
@@ -0,0 +1,5 @@
+#include
+int main() {
+ printf("Hello World!\n");
+ return 0;
+}
diff --git a/tests/data/hello.cpp b/tests/data/hello.cpp
new file mode 100644
index 0000000..2131d8a
--- /dev/null
+++ b/tests/data/hello.cpp
@@ -0,0 +1,5 @@
+#include
+int main() {
+ std::cout << "Hello World!\n";
+ return 0;
+}
diff --git a/tests/tests.yml b/tests/tests.yml
new file mode 100644
index 0000000..dfe09e0
--- /dev/null
+++ b/tests/tests.yml
@@ -0,0 +1,14 @@
+- 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 65f713bb7ba674795c9b15fa72c8815a19c94af3 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Tue, 4 Aug 2020 20:15:39 +0200
Subject: [PATCH 037/341] 10.2.1-2
---
.gitignore | 1 +
gcc.spec | 32 +++---
gcc10-pr96383.patch | 236 ++++++++++++++++++++++++++++++++++++++++++++
gcc10-pr96385.patch | 22 +++++
sources | 2 +-
5 files changed, 281 insertions(+), 12 deletions(-)
create mode 100644 gcc10-pr96383.patch
create mode 100644 gcc10-pr96385.patch
diff --git a/.gitignore b/.gitignore
index a1ab839..1442363 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,4 @@
/gcc-10.1.1-20200507.tar.xz
/gcc-10.1.1-20200618.tar.xz
/gcc-10.2.1-20200723.tar.xz
+/gcc-10.2.1-20200804.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 9085b66..363ba81 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20200723
-%global gitrev 3fc88aa16f1bf661db4518d6d62869f081981981
+%global DATE 20200803
+%global gitrev 08d83635c2ab388f6139db6965e600b296ad85e6
%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 1
+%global gcc_release 2
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -115,7 +115,7 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
-Release: %{gcc_release}%{?dist}.2
+Release: %{gcc_release}%{?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
@@ -264,6 +264,8 @@ 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-pr96385.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -775,6 +777,8 @@ 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 .pr96385~
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@@ -814,7 +818,7 @@ export CONFIG_SITE=NONE
CC=gcc
CXX=g++
OPT_FLAGS=`echo %{optflags}|sed -e 's/\(-Wp,\)\?-D_FORTIFY_SOURCE=[12]//g'`
-OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-flto//g;s/-ffat-lto-objects//g'`
+OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-flto=auto//g;s/-flto//g;s/-ffat-lto-objects//g'`
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-m64//g;s/-m32//g;s/-m31//g'`
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mfpmath=sse/-mfpmath=sse -msse2/g'`
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/ -pipe / /g'`
@@ -3010,12 +3014,18 @@ end
%endif
%changelog
-* Sat Aug 01 2020 Fedora Release Engineering - 10.2.1-1.2
-- Second attempt - Rebuilt for
- https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
-
-* Mon Jul 27 2020 Fedora Release Engineering - 10.2.1-1.1
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
+* Tue Aug 3 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
diff --git a/gcc10-pr96383.patch b/gcc10-pr96383.patch
new file mode 100644
index 0000000..950a2f4
--- /dev/null
+++ b/gcc10-pr96383.patch
@@ -0,0 +1,236 @@
+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-pr96385.patch b/gcc10-pr96385.patch
new file mode 100644
index 0000000..22fe68e
--- /dev/null
+++ b/gcc10-pr96385.patch
@@ -0,0 +1,22 @@
+2020-08-03 Richard Biener
+
+ PR lto/96385
+libiberty/
+ * simple-object-elf.c
+ (simple_object_elf_copy_lto_debug_sections): Localize global
+ UNDEFs and reuse the prevailing name.
+
+--- libiberty/simple-object-elf.c
++++ libiberty/simple-object-elf.c
+@@ -1467,6 +1467,11 @@ simple_object_elf_copy_lto_debug_sections (simple_object_read *sobj,
+ && st_shndx < shnum
+ && pfnret[st_shndx - 1] == -1)
+ discard = 1;
++ /* We also need to remove global UNDEFs which can
++ cause link fails later. */
++ else if (st_shndx == SHN_UNDEF
++ && ELF_ST_BIND (*st_info) == STB_GLOBAL)
++ discard = 1;
+
+ if (discard)
+ {
diff --git a/sources b/sources
index 0e888d0..44ce687 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-10.2.1-20200723.tar.xz) = e1719e4a18f43bb76acb91c0d768711e78d7e8c478b72e691911094e233570597997ed108ba7ed4fb136542993af935ea38ec462a1972689c9220d4cc0e2933f
+SHA512 (gcc-10.2.1-20200804.tar.xz) = be849af9a5a8924c0ad957805a80859243f08d908f652b1290080ac6fd474d874be9745ecd209c9a069a65c44a3923841bec84f348f7352999cb3eac95b1c1cc
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From 83f0a4ca6816109c3649c66e5cb7f8aaab1b75a5 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Tue, 4 Aug 2020 20:17:45 +0200
Subject: [PATCH 038/341] 10.2.1-2
---
gcc.spec | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc.spec b/gcc.spec
index 363ba81..a648fbf 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,4 +1,4 @@
-%global DATE 20200803
+%global DATE 20200804
%global gitrev 08d83635c2ab388f6139db6965e600b296ad85e6
%global gcc_version 10.2.1
%global gcc_major 10
@@ -3014,7 +3014,7 @@ end
%endif
%changelog
-* Tue Aug 3 2020 Jakub Jelinek 10.2.1-2
+* 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,
From eed69448a1b464a87c168ea90080ba3c70576ea5 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Wed, 12 Aug 2020 12:31:55 +0200
Subject: [PATCH 039/341] during %%check perform tests whether annobin is
usable with the newly built compiler or whether it might need to be rebuilt
---
gcc.spec | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/gcc.spec b/gcc.spec
index a648fbf..610464e 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1926,8 +1926,39 @@ LC_ALL=C make %{?_smp_mflags} -k check ALT_CC_UNDER_TEST=gcc ALT_CXX_UNDER_TEST=
%else
RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector}'" || :
%endif
+if [ -f %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/annobin.so ]; then
+ # Test whether current annobin plugin won't fail miserably with the newly built gcc.
+ echo -e '#include \nint main () { printf ("Hello, world!\\n"); return 0; }' > annobin-test.c
+ echo -e '#include \nint main () { std::cout << "Hello, world!" << std::endl; return 0; }' > annobin-test.C
+ `%{gcc_target_platform}/libstdc++-v3/scripts/testsuite_flags --build-cc` \
+ -O2 -g -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS \
+ -fexceptions -fstack-protector-strong -grecord-gcc-switches -o annobin-test{c,.c} \
+ -Wl,-rpath,%{gcc_target_platform}/libgcc/ \
+ -fplugin=%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/annobin.so \
+ 2> ANNOBINOUT1 || echo Annobin test 1 FAIL > ANNOBINOUT2;
+ `%{gcc_target_platform}/libstdc++-v3/scripts/testsuite_flags --build-cxx` \
+ `%{gcc_target_platform}/libstdc++-v3/scripts/testsuite_flags --build-includes` \
+ -O2 -g -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS \
+ -fexceptions -fstack-protector-strong -grecord-gcc-switches -o annobin-test{C,.C} \
+ -Wl,-rpath,%{gcc_target_platform}/libgcc/:%{gcc_target_platform}/libstdc++-v3/src/.libs/ \
+ -fplugin=%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/annobin.so \
+ -B %{gcc_target_platform}/libstdc++-v3/src/.libs/ \
+ 2> ANNOBINOUT3 || echo Annobin test 2 FAIL > ANNOBINOUT4;
+ [ -f ./annobin-testc ] || echo Annobin test 1 MISSING > ANNOBINOUT5;
+ [ -f ./annobin-testc ] && \
+ ( ./annobin-testc > ANNOBINRES1 2>&1 || echo Annobin test 1 RUNFAIL > ANNOBINOUT6 );
+ [ -f ./annobin-testC ] || echo Annobin test 2 MISSING > ANNOBINOUT7;
+ [ -f ./annobin-testC ] && \
+ ( ./annobin-testC > ANNOBINRES2 2>&1 || echo Annobin test 2 RUNFAIL > ANNOBINOUT8 );
+ cat ANNOBINOUT[1-8] > ANNOBINOUT
+ touch ANNOBINRES1 ANNOBINRES2
+ [ -s ANNOBINOUT ] && echo Annobin testing FAILed > ANNOBINRES
+ cat ANNOBINOUT ANNOBINRES[12] >> ANNOBINRES
+ rm -f ANNOBINOUT* ANNOBINRES[12] annobin-test{c,C}
+fi
echo ====================TESTING=========================
( LC_ALL=C ../contrib/test_summary || : ) 2>&1 | sed -n '/^cat.*EOF/,/^EOF/{/^cat.*EOF/d;/^EOF/d;/^LAST_UPDATED:/d;p;}'
+[ -f ANNOBINRES ] && cat ANNOBINRES
echo ====================TESTING END=====================
mkdir testlogs-%{_target_platform}-%{version}-%{release}
for i in `find . -name \*.log | grep -F testsuite/ | grep -v 'config.log\|acats.*/tests/'`; do
@@ -3014,6 +3045,9 @@ end
%endif
%changelog
+- during %%check perform tests whether annobin is usable with the newly built
+ compiler or whether it might need to be rebuilt
+
* 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,
From e0d96135635a45bd0bfe31ebb8cc1acf6f6060b5 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Wed, 26 Aug 2020 11:39:03 +0200
Subject: [PATCH 040/341] 10.2.1-3
---
.gitignore | 1 +
gcc.spec | 23 +++++++++++++--
gcc10-pr96690.patch | 70 +++++++++++++++++++++++++++++++++++++++++++++
sources | 2 +-
4 files changed, 92 insertions(+), 4 deletions(-)
create mode 100644 gcc10-pr96690.patch
diff --git a/.gitignore b/.gitignore
index 1442363..55534ee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,4 @@
/gcc-10.1.1-20200618.tar.xz
/gcc-10.2.1-20200723.tar.xz
/gcc-10.2.1-20200804.tar.xz
+/gcc-10.2.1-20200826.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 610464e..530067d 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20200804
-%global gitrev 08d83635c2ab388f6139db6965e600b296ad85e6
+%global DATE 20200826
+%global gitrev c59c8927f43fb78d6a72a0ff93a47b36e43282d5
%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 2
+%global gcc_release 3
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -266,6 +266,7 @@ Patch10: gcc10-rh1574936.patch
Patch11: gcc10-d-shared-libphobos.patch
Patch12: gcc10-pr96383.patch
Patch13: gcc10-pr96385.patch
+Patch14: gcc10-pr96690.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -779,6 +780,7 @@ to NVidia PTX capable devices if available.
%patch11 -p0 -b .d-shared-libphobos~
%patch12 -p0 -b .pr96383~
%patch13 -p0 -b .pr96385~
+%patch14 -p0 -b .pr96690~
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@@ -3045,6 +3047,21 @@ end
%endif
%changelog
+* 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
diff --git a/gcc10-pr96690.patch b/gcc10-pr96690.patch
new file mode 100644
index 0000000..bab66d4
--- /dev/null
+++ b/gcc10-pr96690.patch
@@ -0,0 +1,70 @@
+2020-08-25 Richard Biener
+
+ PR debug/96690
+ * dwarf2out.c (reference_to_unused): Make FUNCTION_DECL
+ processing more consistent with respect to
+ symtab->global_info_ready.
+ (tree_add_const_value_attribute): Unconditionally call
+ rtl_for_decl_init to do all mangling early but throw
+ away the result if early_dwarf.
+
+ * g++.dg/lto/pr96690_0.C: New testcase.
+
+--- gcc/dwarf2out.c
++++ gcc/dwarf2out.c
+@@ -19756,7 +19756,7 @@ reference_to_unused (tree * tp, int * walk_subtrees,
+ /* ??? The C++ FE emits debug information for using decls, so
+ putting gcc_unreachable here falls over. See PR31899. For now
+ be conservative. */
+- else if (!symtab->global_info_ready && VAR_OR_FUNCTION_DECL_P (*tp))
++ else if (!symtab->global_info_ready && VAR_P (*tp))
+ return *tp;
+ else if (VAR_P (*tp))
+ {
+@@ -19771,7 +19771,7 @@ reference_to_unused (tree * tp, int * walk_subtrees,
+ optimizing and gimplifying the CU by now.
+ So if *TP has no call graph node associated
+ to it, it means *TP will not be emitted. */
+- if (!cgraph_node::get (*tp))
++ if (!symtab->global_info_ready || !cgraph_node::get (*tp))
+ return *tp;
+ }
+ else if (TREE_CODE (*tp) == STRING_CST && !TREE_ASM_WRITTEN (*tp))
+@@ -20295,12 +20295,11 @@ tree_add_const_value_attribute (dw_die_ref die, tree t)
+ return true;
+ }
+ }
+- if (! early_dwarf)
+- {
+- rtl = rtl_for_decl_init (init, type);
+- if (rtl)
+- return add_const_value_attribute (die, rtl);
+- }
++ /* Generate the RTL even if early_dwarf to force mangling of all refered to
++ symbols. */
++ rtl = rtl_for_decl_init (init, type);
++ if (rtl && !early_dwarf)
++ return add_const_value_attribute (die, rtl);
+ /* If the host and target are sane, try harder. */
+ if (CHAR_BIT == 8 && BITS_PER_UNIT == 8
+ && initializer_constant_valid_p (init, type))
+--- gcc/testsuite/g++.dg/lto/pr96690_0.C
++++ gcc/testsuite/g++.dg/lto/pr96690_0.C
+@@ -0,0 +1,17 @@
++// { dg-lto-do assemble }
++// { dg-lto-options { { -flto -ffat-lto-objects -g } } }
++struct A { A (int); };
++template class B { T f; };
++unsigned char *foo (int *, bool *, const int &);
++template struct C {};
++struct D { B > d; };
++struct E { D e; };
++struct F {};
++struct G { static int bar (A, F, E, int); };
++
++void
++baz ()
++{
++ F f;
++ G::bar (0, f, E (), 0);
++}
diff --git a/sources b/sources
index 44ce687..5f420de 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-10.2.1-20200804.tar.xz) = be849af9a5a8924c0ad957805a80859243f08d908f652b1290080ac6fd474d874be9745ecd209c9a069a65c44a3923841bec84f348f7352999cb3eac95b1c1cc
+SHA512 (gcc-10.2.1-20200826.tar.xz) = b6949ea780618400dec06b8fc7b2728414d46e5972970ed70949ce16100547e4a9a6a5ce84ae1f47309a0610607b5454b0acc5fe5ecbb2889c84346bcdbdc8ab
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From 9dd34982d8ae09339039d42eb27d90d7a187dd3b Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Wed, 26 Aug 2020 12:16:47 +0200
Subject: [PATCH 041/341] 10.2.1-3
---
gcc.spec | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gcc.spec b/gcc.spec
index 530067d..00598ca 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -86,7 +86,11 @@
%else
%global build_libitm 0
%endif
+%if 0%{?rhel} > 8
+%global build_isl 0
+%else
%global build_isl 1
+%endif
%global build_libstdcxx_docs 1
%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64 %{mips}
%global attr_ifunc 1
@@ -3064,6 +3068,7 @@ end
(#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
From d10315732bb882596aee583fe93784c4557a1a2f Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Wed, 16 Sep 2020 11:42:59 +0200
Subject: [PATCH 042/341] 10.2.1-4
---
.gitignore | 1 +
gcc.spec | 36 ++++++++++++--
gcc10-pr96939-2.patch | 51 +++++++++++++++++++
gcc10-pr96939-3.patch | 111 ++++++++++++++++++++++++++++++++++++++++++
gcc10-pr96939.patch | 64 ++++++++++++++++++++++++
gcc10-pr97032.patch | 89 +++++++++++++++++++++++++++++++++
gcc10-pr97060.patch | 53 ++++++++++++++++++++
sources | 2 +-
8 files changed, 403 insertions(+), 4 deletions(-)
create mode 100644 gcc10-pr96939-2.patch
create mode 100644 gcc10-pr96939-3.patch
create mode 100644 gcc10-pr96939.patch
create mode 100644 gcc10-pr97032.patch
create mode 100644 gcc10-pr97060.patch
diff --git a/.gitignore b/.gitignore
index 55534ee..6fa7600 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,3 +16,4 @@
/gcc-10.2.1-20200723.tar.xz
/gcc-10.2.1-20200804.tar.xz
/gcc-10.2.1-20200826.tar.xz
+/gcc-10.2.1-20200916.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 00598ca..22001c7 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20200826
-%global gitrev c59c8927f43fb78d6a72a0ff93a47b36e43282d5
+%global DATE 20200916
+%global gitrev c65817433fde22de2a18a00be00c2c3d83228453
%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 3
+%global gcc_release 4
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -271,6 +271,11 @@ Patch11: gcc10-d-shared-libphobos.patch
Patch12: gcc10-pr96383.patch
Patch13: gcc10-pr96385.patch
Patch14: gcc10-pr96690.patch
+Patch15: gcc10-pr96939.patch
+Patch16: gcc10-pr96939-2.patch
+Patch17: gcc10-pr96939-3.patch
+Patch18: gcc10-pr97032.patch
+Patch19: gcc10-pr97060.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -785,6 +790,12 @@ to NVidia PTX capable devices if available.
%patch12 -p0 -b .pr96383~
%patch13 -p0 -b .pr96385~
%patch14 -p0 -b .pr96690~
+%patch15 -p0 -b .pr96939~
+%patch16 -p0 -b .pr96939-2~
+%patch17 -p0 -b .pr96939-3~
+%patch18 -p0 -b .pr97032~
+%patch19 -p0 -b .pr97060~
+find gcc/testsuite -name \*.pr96939~ | xargs rm -f
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@@ -3051,6 +3062,25 @@ end
%endif
%changelog
+* 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)
+- emit DW_AT_declaration on DIEs for external FUNCTION_DECLs without body
+ (PR debug/97060)
+
* 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,
diff --git a/gcc10-pr96939-2.patch b/gcc10-pr96939-2.patch
new file mode 100644
index 0000000..e9e406f
--- /dev/null
+++ b/gcc10-pr96939-2.patch
@@ -0,0 +1,51 @@
+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
new file mode 100644
index 0000000..f133f8d
--- /dev/null
+++ b/gcc10-pr96939-3.patch
@@ -0,0 +1,111 @@
+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
new file mode 100644
index 0000000..4659c3f
--- /dev/null
+++ b/gcc10-pr96939.patch
@@ -0,0 +1,64 @@
+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-pr97032.patch b/gcc10-pr97032.patch
new file mode 100644
index 0000000..109a90b
--- /dev/null
+++ b/gcc10-pr97032.patch
@@ -0,0 +1,89 @@
+2020-09-14 H.J. Lu
+
+ PR target/97032
+ * cfgexpand.c (asm_clobber_reg_kind): Set sp_is_clobbered_by_asm
+ to true if the stack pointer is clobbered by asm statement.
+ * emit-rtl.h (rtl_data): Add sp_is_clobbered_by_asm.
+ * config/i386/i386.c (ix86_get_drap_rtx): Set need_drap to true
+ if the stack pointer is clobbered by asm statement.
+
+ * gcc.target/i386/pr97032.c: New test.
+
+--- gcc/cfgexpand.c
++++ gcc/cfgexpand.c
+@@ -2879,11 +2879,15 @@ asm_clobber_reg_is_valid (int regno, int nregs, const char *regname)
+ as it was before, so no asm can validly clobber the stack pointer in
+ the usual sense. Adding the stack pointer to the clobber list has
+ traditionally had some undocumented and somewhat obscure side-effects. */
+- if (overlaps_hard_reg_set_p (regset, Pmode, STACK_POINTER_REGNUM)
+- && warning (OPT_Wdeprecated, "listing the stack pointer register"
+- " %qs in a clobber list is deprecated", regname))
+- inform (input_location, "the value of the stack pointer after an %"
+- " statement must be the same as it was before the statement");
++ if (overlaps_hard_reg_set_p (regset, Pmode, STACK_POINTER_REGNUM))
++ {
++ crtl->sp_is_clobbered_by_asm = true;
++ if (warning (OPT_Wdeprecated, "listing the stack pointer register"
++ " %qs in a clobber list is deprecated", regname))
++ inform (input_location, "the value of the stack pointer after"
++ " an % statement must be the same as it was before"
++ " the statement");
++ }
+
+ return is_valid;
+ }
+--- gcc/config/i386/i386.c
++++ gcc/config/i386/i386.c
+@@ -12283,10 +12283,12 @@ ix86_update_stack_boundary (void)
+ static rtx
+ ix86_get_drap_rtx (void)
+ {
+- /* We must use DRAP if there are outgoing arguments on stack and
++ /* We must use DRAP if there are outgoing arguments on stack or
++ the stack pointer register is clobbered by asm statment and
+ ACCUMULATE_OUTGOING_ARGS is false. */
+ if (ix86_force_drap
+- || (cfun->machine->outgoing_args_on_stack
++ || ((cfun->machine->outgoing_args_on_stack
++ || crtl->sp_is_clobbered_by_asm)
+ && !ACCUMULATE_OUTGOING_ARGS))
+ crtl->need_drap = true;
+
+--- gcc/emit-rtl.h
++++ gcc/emit-rtl.h
+@@ -266,6 +266,9 @@ struct GTY(()) rtl_data {
+ pass_stack_ptr_mod has run. */
+ bool sp_is_unchanging;
+
++ /* True if the stack pointer is clobbered by asm statement. */
++ bool sp_is_clobbered_by_asm;
++
+ /* Nonzero if function being compiled doesn't contain any calls
+ (ignoring the prologue and epilogue). This is set prior to
+ register allocation in IRA and is valid for the remaining
+--- gcc/testsuite/gcc.target/i386/pr97032.c
++++ gcc/testsuite/gcc.target/i386/pr97032.c
+@@ -0,0 +1,23 @@
++/* { dg-do compile { target { ia32 && fstack_protector } } } */
++/* { dg-options "-O2 -mincoming-stack-boundary=2 -fstack-protector-all" } */
++
++#include
++
++extern int *__errno_location (void);
++
++long
++sys_socketcall (int op, ...)
++{
++ long int res;
++ va_list ap;
++ va_start (ap, op);
++ asm volatile ("push %%ebx; movl %2, %%ebx; int $0x80; pop %%ebx"
++ /* { dg-warning "listing the stack pointer register" "" { target *-*-* } .-1 } */
++ : "=a" (res) : "0" (102), "ri" (16), "c" (ap) : "memory", "esp");
++ if (__builtin_expect (res > 4294963200UL, 0))
++ *__errno_location () = -res;
++ va_end (ap);
++ return res;
++}
++
++/* { dg-final { scan-assembler "call\[ \t\]*_?__errno_location" } } */
diff --git a/gcc10-pr97060.patch b/gcc10-pr97060.patch
new file mode 100644
index 0000000..a38da60
--- /dev/null
+++ b/gcc10-pr97060.patch
@@ -0,0 +1,53 @@
+2020-09-16 Jakub Jelinek
+
+ PR debug/97060
+ * dwarf2out.c (dwarf2out_early_global_decl): For FUNCTION_DECLs
+ and their abstract origins, if they don't have gimple body,
+ set current_function_decl to NULL rather than the decl or origin.
+
+ * gcc.dg/debug/dwarf2/pr97060.c: New test.
+
+--- gcc/dwarf2out.c.jj 2020-09-07 13:17:58.383594248 +0200
++++ gcc/dwarf2out.c 2020-09-16 11:14:57.763550862 +0200
+@@ -26547,7 +26547,11 @@ dwarf2out_early_global_decl (tree decl)
+ && ((origin_die = lookup_decl_die (origin)) == NULL
+ || is_declaration_die (origin_die)))
+ {
+- current_function_decl = origin;
++ cgraph_node *cnode = cgraph_node::get (origin);
++ if (cnode && cnode->has_gimple_body_p ())
++ current_function_decl = origin;
++ else
++ current_function_decl = NULL_TREE;
+ dwarf2out_decl (origin);
+ }
+
+@@ -26556,7 +26560,11 @@ dwarf2out_early_global_decl (tree decl)
+ if ((old_die = lookup_decl_die (decl)) == NULL
+ || is_declaration_die (old_die))
+ {
+- current_function_decl = decl;
++ cgraph_node *cnode = cgraph_node::get (decl);
++ if (cnode && cnode->has_gimple_body_p ())
++ current_function_decl = decl;
++ else
++ current_function_decl = NULL_TREE;
+ dwarf2out_decl (decl);
+ }
+
+--- gcc/testsuite/gcc.dg/debug/dwarf2/pr97060.c.jj 2020-09-16 11:03:22.358420449 +0200
++++ gcc/testsuite/gcc.dg/debug/dwarf2/pr97060.c 2020-09-16 11:03:17.717486318 +0200
+@@ -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 5f420de..65d1391 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-10.2.1-20200826.tar.xz) = b6949ea780618400dec06b8fc7b2728414d46e5972970ed70949ce16100547e4a9a6a5ce84ae1f47309a0610607b5454b0acc5fe5ecbb2889c84346bcdbdc8ab
+SHA512 (gcc-10.2.1-20200916.tar.xz) = 1dd5ef9b6eb785e8356751b198462f61ed6a06b460285f4ddf274a85ed79a452723fd71b6bf5eb3c68821bf798299a1a352481e265e61bd836976927187879e5
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From 6b90f867141f55a8bd001ee3d708098afb203fad Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Wed, 16 Sep 2020 11:51:20 +0200
Subject: [PATCH 043/341] 10.2.1-4
---
gcc.spec | 26 ++++++++++++--------------
gcc10-pr96385.patch | 22 ----------------------
2 files changed, 12 insertions(+), 36 deletions(-)
delete mode 100644 gcc10-pr96385.patch
diff --git a/gcc.spec b/gcc.spec
index 22001c7..40d011c 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -269,13 +269,12 @@ Patch9: gcc10-Wno-format-security.patch
Patch10: gcc10-rh1574936.patch
Patch11: gcc10-d-shared-libphobos.patch
Patch12: gcc10-pr96383.patch
-Patch13: gcc10-pr96385.patch
-Patch14: gcc10-pr96690.patch
-Patch15: gcc10-pr96939.patch
-Patch16: gcc10-pr96939-2.patch
-Patch17: gcc10-pr96939-3.patch
-Patch18: gcc10-pr97032.patch
-Patch19: gcc10-pr97060.patch
+Patch13: gcc10-pr96690.patch
+Patch14: gcc10-pr96939.patch
+Patch15: gcc10-pr96939-2.patch
+Patch16: gcc10-pr96939-3.patch
+Patch17: gcc10-pr97032.patch
+Patch18: gcc10-pr97060.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -788,13 +787,12 @@ to NVidia PTX capable devices if available.
%endif
%patch11 -p0 -b .d-shared-libphobos~
%patch12 -p0 -b .pr96383~
-%patch13 -p0 -b .pr96385~
-%patch14 -p0 -b .pr96690~
-%patch15 -p0 -b .pr96939~
-%patch16 -p0 -b .pr96939-2~
-%patch17 -p0 -b .pr96939-3~
-%patch18 -p0 -b .pr97032~
-%patch19 -p0 -b .pr97060~
+%patch13 -p0 -b .pr96690~
+%patch14 -p0 -b .pr96939~
+%patch15 -p0 -b .pr96939-2~
+%patch16 -p0 -b .pr96939-3~
+%patch17 -p0 -b .pr97032~
+%patch18 -p0 -b .pr97060~
find gcc/testsuite -name \*.pr96939~ | xargs rm -f
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
diff --git a/gcc10-pr96385.patch b/gcc10-pr96385.patch
deleted file mode 100644
index 22fe68e..0000000
--- a/gcc10-pr96385.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-2020-08-03 Richard Biener
-
- PR lto/96385
-libiberty/
- * simple-object-elf.c
- (simple_object_elf_copy_lto_debug_sections): Localize global
- UNDEFs and reuse the prevailing name.
-
---- libiberty/simple-object-elf.c
-+++ libiberty/simple-object-elf.c
-@@ -1467,6 +1467,11 @@ simple_object_elf_copy_lto_debug_sections (simple_object_read *sobj,
- && st_shndx < shnum
- && pfnret[st_shndx - 1] == -1)
- discard = 1;
-+ /* We also need to remove global UNDEFs which can
-+ cause link fails later. */
-+ else if (st_shndx == SHN_UNDEF
-+ && ELF_ST_BIND (*st_info) == STB_GLOBAL)
-+ discard = 1;
-
- if (discard)
- {
From 15fd636cd1160ca1346a267f5510b356fa8aacd0 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Wed, 16 Sep 2020 12:13:04 +0200
Subject: [PATCH 044/341] 10.2.1-4
---
gcc.spec | 22 +++++++-------
gcc10-pr96690.patch | 70 ---------------------------------------------
2 files changed, 10 insertions(+), 82 deletions(-)
delete mode 100644 gcc10-pr96690.patch
diff --git a/gcc.spec b/gcc.spec
index 40d011c..491b205 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -269,12 +269,11 @@ Patch9: gcc10-Wno-format-security.patch
Patch10: gcc10-rh1574936.patch
Patch11: gcc10-d-shared-libphobos.patch
Patch12: gcc10-pr96383.patch
-Patch13: gcc10-pr96690.patch
-Patch14: gcc10-pr96939.patch
-Patch15: gcc10-pr96939-2.patch
-Patch16: gcc10-pr96939-3.patch
-Patch17: gcc10-pr97032.patch
-Patch18: gcc10-pr97060.patch
+Patch13: gcc10-pr96939.patch
+Patch14: gcc10-pr96939-2.patch
+Patch15: gcc10-pr96939-3.patch
+Patch16: gcc10-pr97032.patch
+Patch17: gcc10-pr97060.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -787,12 +786,11 @@ to NVidia PTX capable devices if available.
%endif
%patch11 -p0 -b .d-shared-libphobos~
%patch12 -p0 -b .pr96383~
-%patch13 -p0 -b .pr96690~
-%patch14 -p0 -b .pr96939~
-%patch15 -p0 -b .pr96939-2~
-%patch16 -p0 -b .pr96939-3~
-%patch17 -p0 -b .pr97032~
-%patch18 -p0 -b .pr97060~
+%patch13 -p0 -b .pr96939~
+%patch14 -p0 -b .pr96939-2~
+%patch15 -p0 -b .pr96939-3~
+%patch16 -p0 -b .pr97032~
+%patch17 -p0 -b .pr97060~
find gcc/testsuite -name \*.pr96939~ | xargs rm -f
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
diff --git a/gcc10-pr96690.patch b/gcc10-pr96690.patch
deleted file mode 100644
index bab66d4..0000000
--- a/gcc10-pr96690.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-2020-08-25 Richard Biener
-
- PR debug/96690
- * dwarf2out.c (reference_to_unused): Make FUNCTION_DECL
- processing more consistent with respect to
- symtab->global_info_ready.
- (tree_add_const_value_attribute): Unconditionally call
- rtl_for_decl_init to do all mangling early but throw
- away the result if early_dwarf.
-
- * g++.dg/lto/pr96690_0.C: New testcase.
-
---- gcc/dwarf2out.c
-+++ gcc/dwarf2out.c
-@@ -19756,7 +19756,7 @@ reference_to_unused (tree * tp, int * walk_subtrees,
- /* ??? The C++ FE emits debug information for using decls, so
- putting gcc_unreachable here falls over. See PR31899. For now
- be conservative. */
-- else if (!symtab->global_info_ready && VAR_OR_FUNCTION_DECL_P (*tp))
-+ else if (!symtab->global_info_ready && VAR_P (*tp))
- return *tp;
- else if (VAR_P (*tp))
- {
-@@ -19771,7 +19771,7 @@ reference_to_unused (tree * tp, int * walk_subtrees,
- optimizing and gimplifying the CU by now.
- So if *TP has no call graph node associated
- to it, it means *TP will not be emitted. */
-- if (!cgraph_node::get (*tp))
-+ if (!symtab->global_info_ready || !cgraph_node::get (*tp))
- return *tp;
- }
- else if (TREE_CODE (*tp) == STRING_CST && !TREE_ASM_WRITTEN (*tp))
-@@ -20295,12 +20295,11 @@ tree_add_const_value_attribute (dw_die_ref die, tree t)
- return true;
- }
- }
-- if (! early_dwarf)
-- {
-- rtl = rtl_for_decl_init (init, type);
-- if (rtl)
-- return add_const_value_attribute (die, rtl);
-- }
-+ /* Generate the RTL even if early_dwarf to force mangling of all refered to
-+ symbols. */
-+ rtl = rtl_for_decl_init (init, type);
-+ if (rtl && !early_dwarf)
-+ return add_const_value_attribute (die, rtl);
- /* If the host and target are sane, try harder. */
- if (CHAR_BIT == 8 && BITS_PER_UNIT == 8
- && initializer_constant_valid_p (init, type))
---- gcc/testsuite/g++.dg/lto/pr96690_0.C
-+++ gcc/testsuite/g++.dg/lto/pr96690_0.C
-@@ -0,0 +1,17 @@
-+// { dg-lto-do assemble }
-+// { dg-lto-options { { -flto -ffat-lto-objects -g } } }
-+struct A { A (int); };
-+template class B { T f; };
-+unsigned char *foo (int *, bool *, const int &);
-+template struct C {};
-+struct D { B > d; };
-+struct E { D e; };
-+struct F {};
-+struct G { static int bar (A, F, E, int); };
-+
-+void
-+baz ()
-+{
-+ F f;
-+ G::bar (0, f, E (), 0);
-+}
From 888bd7b767b0d415235d5146af74fd87d9074dde Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Wed, 16 Sep 2020 13:35:23 +0200
Subject: [PATCH 045/341] 10.2.1-4
---
gcc.spec | 4 ----
gcc10-pr97060.patch | 53 ---------------------------------------------
2 files changed, 57 deletions(-)
delete mode 100644 gcc10-pr97060.patch
diff --git a/gcc.spec b/gcc.spec
index 491b205..ef371b2 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -273,7 +273,6 @@ Patch13: gcc10-pr96939.patch
Patch14: gcc10-pr96939-2.patch
Patch15: gcc10-pr96939-3.patch
Patch16: gcc10-pr97032.patch
-Patch17: gcc10-pr97060.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -790,7 +789,6 @@ to NVidia PTX capable devices if available.
%patch14 -p0 -b .pr96939-2~
%patch15 -p0 -b .pr96939-3~
%patch16 -p0 -b .pr97032~
-%patch17 -p0 -b .pr97060~
find gcc/testsuite -name \*.pr96939~ | xargs rm -f
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@@ -3074,8 +3072,6 @@ end
- 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)
-- emit DW_AT_declaration on DIEs for external FUNCTION_DECLs without body
- (PR debug/97060)
* Wed Aug 26 2020 Jakub Jelinek 10.2.1-3
- update from releases/gcc-10 branch
diff --git a/gcc10-pr97060.patch b/gcc10-pr97060.patch
deleted file mode 100644
index a38da60..0000000
--- a/gcc10-pr97060.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-2020-09-16 Jakub Jelinek
-
- PR debug/97060
- * dwarf2out.c (dwarf2out_early_global_decl): For FUNCTION_DECLs
- and their abstract origins, if they don't have gimple body,
- set current_function_decl to NULL rather than the decl or origin.
-
- * gcc.dg/debug/dwarf2/pr97060.c: New test.
-
---- gcc/dwarf2out.c.jj 2020-09-07 13:17:58.383594248 +0200
-+++ gcc/dwarf2out.c 2020-09-16 11:14:57.763550862 +0200
-@@ -26547,7 +26547,11 @@ dwarf2out_early_global_decl (tree decl)
- && ((origin_die = lookup_decl_die (origin)) == NULL
- || is_declaration_die (origin_die)))
- {
-- current_function_decl = origin;
-+ cgraph_node *cnode = cgraph_node::get (origin);
-+ if (cnode && cnode->has_gimple_body_p ())
-+ current_function_decl = origin;
-+ else
-+ current_function_decl = NULL_TREE;
- dwarf2out_decl (origin);
- }
-
-@@ -26556,7 +26560,11 @@ dwarf2out_early_global_decl (tree decl)
- if ((old_die = lookup_decl_die (decl)) == NULL
- || is_declaration_die (old_die))
- {
-- current_function_decl = decl;
-+ cgraph_node *cnode = cgraph_node::get (decl);
-+ if (cnode && cnode->has_gimple_body_p ())
-+ current_function_decl = decl;
-+ else
-+ current_function_decl = NULL_TREE;
- dwarf2out_decl (decl);
- }
-
---- gcc/testsuite/gcc.dg/debug/dwarf2/pr97060.c.jj 2020-09-16 11:03:22.358420449 +0200
-+++ gcc/testsuite/gcc.dg/debug/dwarf2/pr97060.c 2020-09-16 11:03:17.717486318 +0200
-@@ -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;
-+}
From a7c26b2bf9ba269caa57e62fda9eb0b7f5cce087 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Mon, 5 Oct 2020 10:44:00 +0200
Subject: [PATCH 046/341] 10.2.1-5
---
.gitignore | 1 +
gcc.spec | 19 +++++++---
gcc10-pr97032.patch | 89 ---------------------------------------------
sources | 2 +-
4 files changed, 16 insertions(+), 95 deletions(-)
delete mode 100644 gcc10-pr97032.patch
diff --git a/.gitignore b/.gitignore
index 6fa7600..8032556 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,3 +17,4 @@
/gcc-10.2.1-20200804.tar.xz
/gcc-10.2.1-20200826.tar.xz
/gcc-10.2.1-20200916.tar.xz
+/gcc-10.2.1-20201005.tar.xz
diff --git a/gcc.spec b/gcc.spec
index ef371b2..f11e9f6 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20200916
-%global gitrev c65817433fde22de2a18a00be00c2c3d83228453
+%global DATE 20201005
+%global gitrev 2417bb617beaf81ca86c86977e1589ee77c59a99
%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 4
+%global gcc_release 5
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -272,7 +272,6 @@ Patch12: gcc10-pr96383.patch
Patch13: gcc10-pr96939.patch
Patch14: gcc10-pr96939-2.patch
Patch15: gcc10-pr96939-3.patch
-Patch16: gcc10-pr97032.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.
%patch13 -p0 -b .pr96939~
%patch14 -p0 -b .pr96939-2~
%patch15 -p0 -b .pr96939-3~
-%patch16 -p0 -b .pr97032~
find gcc/testsuite -name \*.pr96939~ | xargs rm -f
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@@ -3056,6 +3054,17 @@ end
%endif
%changelog
+* 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,
diff --git a/gcc10-pr97032.patch b/gcc10-pr97032.patch
deleted file mode 100644
index 109a90b..0000000
--- a/gcc10-pr97032.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-2020-09-14 H.J. Lu
-
- PR target/97032
- * cfgexpand.c (asm_clobber_reg_kind): Set sp_is_clobbered_by_asm
- to true if the stack pointer is clobbered by asm statement.
- * emit-rtl.h (rtl_data): Add sp_is_clobbered_by_asm.
- * config/i386/i386.c (ix86_get_drap_rtx): Set need_drap to true
- if the stack pointer is clobbered by asm statement.
-
- * gcc.target/i386/pr97032.c: New test.
-
---- gcc/cfgexpand.c
-+++ gcc/cfgexpand.c
-@@ -2879,11 +2879,15 @@ asm_clobber_reg_is_valid (int regno, int nregs, const char *regname)
- as it was before, so no asm can validly clobber the stack pointer in
- the usual sense. Adding the stack pointer to the clobber list has
- traditionally had some undocumented and somewhat obscure side-effects. */
-- if (overlaps_hard_reg_set_p (regset, Pmode, STACK_POINTER_REGNUM)
-- && warning (OPT_Wdeprecated, "listing the stack pointer register"
-- " %qs in a clobber list is deprecated", regname))
-- inform (input_location, "the value of the stack pointer after an %"
-- " statement must be the same as it was before the statement");
-+ if (overlaps_hard_reg_set_p (regset, Pmode, STACK_POINTER_REGNUM))
-+ {
-+ crtl->sp_is_clobbered_by_asm = true;
-+ if (warning (OPT_Wdeprecated, "listing the stack pointer register"
-+ " %qs in a clobber list is deprecated", regname))
-+ inform (input_location, "the value of the stack pointer after"
-+ " an % statement must be the same as it was before"
-+ " the statement");
-+ }
-
- return is_valid;
- }
---- gcc/config/i386/i386.c
-+++ gcc/config/i386/i386.c
-@@ -12283,10 +12283,12 @@ ix86_update_stack_boundary (void)
- static rtx
- ix86_get_drap_rtx (void)
- {
-- /* We must use DRAP if there are outgoing arguments on stack and
-+ /* We must use DRAP if there are outgoing arguments on stack or
-+ the stack pointer register is clobbered by asm statment and
- ACCUMULATE_OUTGOING_ARGS is false. */
- if (ix86_force_drap
-- || (cfun->machine->outgoing_args_on_stack
-+ || ((cfun->machine->outgoing_args_on_stack
-+ || crtl->sp_is_clobbered_by_asm)
- && !ACCUMULATE_OUTGOING_ARGS))
- crtl->need_drap = true;
-
---- gcc/emit-rtl.h
-+++ gcc/emit-rtl.h
-@@ -266,6 +266,9 @@ struct GTY(()) rtl_data {
- pass_stack_ptr_mod has run. */
- bool sp_is_unchanging;
-
-+ /* True if the stack pointer is clobbered by asm statement. */
-+ bool sp_is_clobbered_by_asm;
-+
- /* Nonzero if function being compiled doesn't contain any calls
- (ignoring the prologue and epilogue). This is set prior to
- register allocation in IRA and is valid for the remaining
---- gcc/testsuite/gcc.target/i386/pr97032.c
-+++ gcc/testsuite/gcc.target/i386/pr97032.c
-@@ -0,0 +1,23 @@
-+/* { dg-do compile { target { ia32 && fstack_protector } } } */
-+/* { dg-options "-O2 -mincoming-stack-boundary=2 -fstack-protector-all" } */
-+
-+#include
-+
-+extern int *__errno_location (void);
-+
-+long
-+sys_socketcall (int op, ...)
-+{
-+ long int res;
-+ va_list ap;
-+ va_start (ap, op);
-+ asm volatile ("push %%ebx; movl %2, %%ebx; int $0x80; pop %%ebx"
-+ /* { dg-warning "listing the stack pointer register" "" { target *-*-* } .-1 } */
-+ : "=a" (res) : "0" (102), "ri" (16), "c" (ap) : "memory", "esp");
-+ if (__builtin_expect (res > 4294963200UL, 0))
-+ *__errno_location () = -res;
-+ va_end (ap);
-+ return res;
-+}
-+
-+/* { dg-final { scan-assembler "call\[ \t\]*_?__errno_location" } } */
diff --git a/sources b/sources
index 65d1391..dc303a1 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-10.2.1-20200916.tar.xz) = 1dd5ef9b6eb785e8356751b198462f61ed6a06b460285f4ddf274a85ed79a452723fd71b6bf5eb3c68821bf798299a1a352481e265e61bd836976927187879e5
+SHA512 (gcc-10.2.1-20201005.tar.xz) = f330ba17ed2b3fb3d2eb0f4552055192605d4a762e11e0fdc0b11a29d1309cb36eae60e79863226a0bd51425bde312662272874482748480aad9732770f88f5a
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From 26a9740f02970892dd1cccc47c31f7027345a28f Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Mon, 5 Oct 2020 17:18:55 +0200
Subject: [PATCH 047/341] Adjust rhel == 8 s390x --with-arch= and --with-tune=.
---
gcc.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc.spec b/gcc.spec
index f11e9f6..32ff8c4 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -995,7 +995,7 @@ CONFIGURE_OPTS="\
%ifarch s390 s390x
%if 0%{?rhel} >= 7
%if 0%{?rhel} > 7
- --with-arch=zEC12 --with-tune=z13 \
+ --with-arch=z13 --with-tune=z14 \
%else
--with-arch=z196 --with-tune=zEC12 \
%endif
From 3f45c9c1656e3a105f589a0accd9a542cff51d92 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Fri, 16 Oct 2020 14:04:18 +0200
Subject: [PATCH 048/341] 10.2.1-6
---
.gitignore | 1 +
gcc.spec | 15 ++++++++++++---
sources | 2 +-
3 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/.gitignore b/.gitignore
index 8032556..736c846 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,4 @@
/gcc-10.2.1-20200826.tar.xz
/gcc-10.2.1-20200916.tar.xz
/gcc-10.2.1-20201005.tar.xz
+/gcc-10.2.1-20201016.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 32ff8c4..51a5a24 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20201005
-%global gitrev 2417bb617beaf81ca86c86977e1589ee77c59a99
+%global DATE 20201016
+%global gitrev b55a9d01144097312b48281486c03e83cf03fde5
%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 5
+%global gcc_release 6
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -3054,6 +3054,15 @@ end
%endif
%changelog
+* 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,
diff --git a/sources b/sources
index dc303a1..160a0d6 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-10.2.1-20201005.tar.xz) = f330ba17ed2b3fb3d2eb0f4552055192605d4a762e11e0fdc0b11a29d1309cb36eae60e79863226a0bd51425bde312662272874482748480aad9732770f88f5a
+SHA512 (gcc-10.2.1-20201016.tar.xz) = d324b7c872210a14aabdc117567ae6eff98d40ee8bf7a705a8caf1330d698e167016fb98f095ab56de43140e5f19932775ff3d5757434e3f78f2eec57d3dd1c4
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
From a067db068a3f74404bf2e2a906d02bd5da123518 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Mon, 2 Nov 2020 13:32:00 +0100
Subject: [PATCH 049/341] 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 050/341] 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 051/341] 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 052/341] 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 053/341] 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 054/341] 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 055/341] 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 056/341] 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 057/341] 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 058/341] 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 059/341] 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 060/341] 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 061/341] 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 062/341] 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 063/341] 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 064/341] 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 065/341] 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 066/341] 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 067/341] 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 068/341] 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 069/341] 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 070/341] 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 071/341] - 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 072/341] 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 073/341] 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