Compare commits

...

43 Commits

Author SHA1 Message Date
108ae1dd96
Backport two RISCV [target] fixes from trunk
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2025-01-26 09:46:21 +02:00
7fa5b80a3c
Merge remote-tracking branch 'up/main' into main-riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2025-01-26 09:38:02 +02:00
Jakub Jelinek
f97b22af10 15.0.1-0.4 2025-01-25 11:06:55 +01:00
Jakub Jelinek
46a6d80764 Fix up sed command for libstdc++ modules json. 2025-01-21 17:25:58 +01:00
Fedora Release Engineering
c142771541 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 19:32:58 +00:00
Jakub Jelinek
b46eae0019 Add noautorebuild. 2025-01-14 20:34:30 +01:00
Jakub Jelinek
ca394fe46b 15.0.1-0.3 2025-01-14 13:11:09 +01:00
Jakub Jelinek
2f3ea848fe 15.0.1-0.2 2025-01-14 11:45:44 +01:00
Jakub Jelinek
48a562d802 15.0.1-0.2 2025-01-14 11:45:25 +01:00
Jakub Jelinek
741ed4a5a9 15.0.1-0.1 2025-01-14 00:08:34 +01:00
Jakub Jelinek
37a3863034 15.0.1-0.1 2025-01-14 00:05:44 +01:00
Jakub Jelinek
33699f47c3 15.0.0-0.4 2025-01-11 11:38:09 +01:00
Jakub Jelinek
f7d926bced 15.0.0-0.3 2025-01-09 21:35:16 +01:00
Jakub Jelinek
130b5c0e0e Fix up PR118362 patch. 2025-01-09 09:43:05 +01:00
Jakub Jelinek
e48becc49a gcc-15.0.0-0.3 2025-01-09 09:20:53 +01:00
Jakub Jelinek
82653994cf Also revert -mearly-ldp-fusion and -mlate-ldp-fusion default hack 2024-12-05 20:15:14 +01:00
Jakub Jelinek
806e75093d Fix up #2330362 2024-12-05 20:08:15 +01:00
Jakub Jelinek
02c34dfa36 14.2.1-6 2024-11-04 16:02:03 +01:00
Jakub Jelinek
3c526fa26b 14.2.1-5 2024-10-25 17:59:54 +02:00
Jakub Jelinek
8cd5593dfc 14.2.1-5 2024-10-25 17:45:57 +02:00
Jakub Jelinek
a706a6fd25 Use https:// instead of git:// in git URLs. 2024-09-30 18:28:50 +02:00
Siddhesh Poyarekar
d021080ea7 Default tuning to power 10 for RHEL10 and later 2024-09-24 22:41:47 -04:00
Jakub Jelinek
dc203d1b77 14.2.1-3 2024-09-12 20:49:36 +02:00
Jakub Jelinek
0425b2638c 14.2.1-2 2024-09-05 12:47:04 +02:00
Jakub Jelinek
b100864ab2 14.2.1-1 2024-08-01 20:59:14 +02:00
Fedora Release Engineering
5032483c40 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-18 00:14:52 +00:00
Jakub Jelinek
4b5f87d836 14.1.1-7 2024-07-01 10:54:56 +02:00
Zbigniew Jędrzejewski-Szmek
5551c1491d Replace homegrown byte compilation with %py_byte_compile
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=2294381.

Note that the 'touch -r' calls should not be necessary since
https://fedoraproject.org/wiki/Changes/ReproducibleBuildsClampMtimes.
2024-06-27 21:56:16 +02:00
Jakub Jelinek
467c94cde8 14.1.1-6 2024-06-20 13:48:15 +02:00
Jakub Jelinek
73893f6935 14.1.1-5 2024-06-07 11:06:03 +02:00
Jakub Jelinek
c6f99ecd74 gcc-14.1.1-4 2024-05-22 11:58:56 +02:00
Siddhesh Poyarekar
face1955f5 Update new SPDX identifiers from all outstanding issues. 2024-05-21 13:37:31 -04:00
Marek Polacek
150f0ee915 14.1.1-2 2024-05-17 10:04:53 -04:00
Marek Polacek
7b746958a3 14.1.1-2 2024-05-17 09:50:05 -04:00
Jakub Jelinek
8e7867c2d3 14.1.1-1 2024-05-08 10:49:53 +02:00
Jakub Jelinek
551363d0e2 14.1.1-1 2024-05-08 10:47:09 +02:00
Marek Polacek
13569d0f04 Don't require rocm-runtime on RHEL 2024-05-07 13:20:04 -04:00
Marek Polacek
6c8229ada4 Don't build offload-amdgcn on RHEL 2024-05-03 16:09:15 -04:00
Marek Polacek
20746dd85f 14.0.1-0.17
Enable hardening and configure with --enable-host-pie --enable-host-bind-now on RHEL
2024-05-03 14:49:35 -04:00
Jakub Jelinek
d6fcb33cdc 14.0.1-0.16 2024-04-30 13:32:34 +02:00
Jakub Jelinek
e703f37eb8 14.0.1-0.16 2024-04-30 13:32:03 +02:00
Jakub Jelinek
3b5d747556 Fix last commit. 2024-04-25 12:19:59 +02:00
Jakub Jelinek
d818c7e53a Small tweaks. 2024-04-25 12:16:50 +02:00
21 changed files with 1593 additions and 462 deletions

22
.gitignore vendored
View File

@ -1,16 +1,8 @@
/gcc-14.0.1-20240113.tar.xz
/isl-0.24.tar.bz2
/newlib-cygwin-5f15d7c5817b07a6b18cbab17342c95cb7b42be4.tar.xz
/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6.tar.xz
/gcc-14.0.1-20240118.tar.xz
/newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed.tar.xz
/gcc-14.0.1-20240125.tar.xz
/gcc-14.0.1-20240127.tar.xz
/gcc-14.0.1-20240207.tar.xz
/gcc-14.0.1-20240208.tar.xz
/gcc-14.0.1-20240217.tar.xz
/gcc-14.0.1-20240228.tar.xz
/gcc-14.0.1-20240316.tar.xz
/gcc-14.0.1-20240328.tar.xz
/gcc-14.0.1-20240410.tar.xz
/gcc-14.0.1-20240411.tar.xz
/nvptx-tools-87ce9dc5999e5fca2e1d3478a30888d9864c9804.tar.xz
/gcc-15.0.0-20250109.tar.xz
/newlib-cygwin-2e4db338ac125579d555aeee516e48588a628a16.tar.xz
/gcc-15.0.0-20250111.tar.xz
/gcc-15.0.1-20250113.tar.xz
/gcc-15.0.1-20250114.tar.xz
/gcc-15.0.1-20250125.tar.xz

637
gcc.spec
View File

@ -1,16 +1,18 @@
%global DATE 20240411
%global gitrev da6ad93fb1885bcdefecdf09fee4b9e901607710
%global gcc_version 14.0.1
%global gcc_major 14
%global DATE 20250125
%global gitrev 971fa9cf8655e9ba26529620b624bac77d9a584b
%global gcc_version 15.0.1
%global gcc_major 15
# 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
%global nvptx_tools_gitrev c5ad8ada3e86d96b10a9d352b7a764f801478ba6
%global newlib_cygwin_gitrev d45261f62a15f8abd94a1031020b9a9f455e4eed
%global nvptx_tools_gitrev 87ce9dc5999e5fca2e1d3478a30888d9864c9804
%global newlib_cygwin_gitrev 2e4db338ac125579d555aeee516e48588a628a16
%global _unpackaged_files_terminate_build 0
%if 0%{?fedora:1}
%global _performance_build 1
# Hardening slows the compiler way too much.
%undefine _hardened_build
%endif
%undefine _auto_set_build_flags
%if 0%{?fedora} > 27 || 0%{?rhel} > 7
# Until annobin is fixed (#1519165).
@ -141,30 +143,24 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
Release: %{gcc_release}.15.0.riscv64%{?dist}
Release: %{gcc_release}.4.0.riscv64%{?dist}
# License notes for some of the less obvious ones:
# gcc/doc/cppinternals.texi: Linux-man-pages-copyleft-2-para
# isl: MIT, BSD-2-Clause
# libcody: Apache-2.0
# libphobos/src/etc/c/curl.d: curl
# All of the remaining license soup is in newlib.
# Outstanding new SPDX identifier requests:
# https://github.com/spdx/license-list-XML/issues/2395
# https://github.com/spdx/license-list-XML/issues/2406
# https://github.com/spdx/license-list-XML/issues/2408
# https://github.com/spdx/license-list-XML/issues/2409
# https://github.com/spdx/license-list-XML/issues/2410
# https://github.com/spdx/license-list-XML/issues/2411
License: GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn
License: GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
# 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
# rm -rf gcc-dir.tmp
# branch. Use the following command to generate the tarball:
# ./update-gcc.sh %%{gitrev}
# optionally if say /usr/src/gcc/.git/ is an existing gcc git clone
# ./update-gcc.sh %%{gitrev} /usr/src/gcc/.git/
# to speed up the clone operations. Note, %%{gitrev} macro in
# gcc.spec shouldn't be updated before running the script, the script
# will update it, fill in some %%changelog details etc.
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:
@ -175,7 +171,7 @@ 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 git://sourceware.org/git/newlib-cygwin.git newlib-cygwin-dir.tmp
# git clone https://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
@ -195,11 +191,8 @@ URL: http://gcc.gnu.org
# Need binutils which support -plugin
# Need binutils which support .loc view >= 2.30
# Need binutils which support --generate-missing-build-notes=yes >= 2.31
%if 0%{?fedora} >= 29 || 0%{?rhel} > 7
BuildRequires: binutils >= 2.31
%else
BuildRequires: binutils >= 2.24
%endif
# Need binutils which support .base64 >= 2.43
BuildRequires: binutils >= 2.43
# While gcc doesn't include statically linked binaries, during testing
# -static is used several times.
BuildRequires: glibc-static
@ -266,11 +259,8 @@ Requires: cpp = %{version}-%{release}
# Need binutils that support -plugin
# Need binutils that support .loc view >= 2.30
# Need binutils which support --generate-missing-build-notes=yes >= 2.31
%if 0%{?fedora} >= 29 || 0%{?rhel} > 7
Requires: binutils >= 2.31
%else
Requires: binutils >= 2.24
%endif
# Need binutils that support .base64 >= 2.43
Requires: binutils >= 2.43
# Make sure gdb will understand DW_FORM_strp
Conflicts: gdb < 5.1-2
Requires: glibc-devel >= 2.2.90-12
@ -297,21 +287,28 @@ Provides: bundled(libbacktrace)
Provides: bundled(libffi)
Provides: gcc(major) = %{gcc_major}
Patch0: gcc14-hack.patch
Patch2: gcc14-sparc-config-detection.patch
Patch3: gcc14-libgomp-omp_h-multilib.patch
Patch4: gcc14-libtool-no-rpath.patch
Patch5: gcc14-isl-dl.patch
Patch6: gcc14-isl-dl2.patch
Patch7: gcc14-libstdc++-docs.patch
Patch8: gcc14-no-add-needed.patch
Patch9: gcc14-Wno-format-security.patch
Patch10: gcc14-rh1574936.patch
Patch11: gcc14-d-shared-libphobos.patch
Patch0: gcc15-hack.patch
Patch2: gcc15-sparc-config-detection.patch
Patch3: gcc15-libgomp-omp_h-multilib.patch
Patch4: gcc15-libtool-no-rpath.patch
Patch5: gcc15-isl-dl.patch
Patch6: gcc15-isl-dl2.patch
Patch7: gcc15-libstdc++-docs.patch
Patch8: gcc15-no-add-needed.patch
Patch9: gcc15-Wno-format-security.patch
Patch10: gcc15-rh1574936.patch
Patch11: gcc15-d-shared-libphobos.patch
Patch12: gcc15-pr118206.patch
Patch13: gcc15-d-deps.patch
Patch14: gcc15-pr117231.patch
# RISCV
Patch20: gcc15-pr116256.patch
Patch21: gcc15-pr118103.patch
Patch50: isl-rh2155127.patch
Patch100: gcc14-fortran-fdec-duplicates.patch
Patch100: gcc15-fortran-fdec-duplicates.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@ -575,7 +572,9 @@ installed separately.
%package -n libgomp-offload-amdgcn
Summary: GCC OpenMP v4.5 plugin for offloading to AMD GCN
Requires: libgomp = %{version}-%{release}
%if 0%{?fedora:1}
Requires: rocm-runtime >= 6.0.0
%endif
%description -n libgomp-offload-amdgcn
This package contains libgomp plugin for offloading to AMD ROCm capable
@ -607,6 +606,20 @@ Requires: libgccjit = %{version}-%{release}
%description -n libgccjit-devel
This package contains header files and documentation for GCC JIT front-end.
%package -n libgdiagnostics
Summary: Library for emitting diagnostics
%description -n libgdiagnostics
This package contains libgdiagnostics shared library and sarif-replay program.
%package -n libgdiagnostics-devel
Summary: Support for emitting diagnostics
Requires: libgdiagnostics = %{version}-%{release}
%description -n libgdiagnostics-devel
This package contains header files and documentation for the libgdiagnostics
library.
%package -n libquadmath
Summary: GCC __float128 shared support library
@ -906,6 +919,13 @@ so that there cannot be any synchronization problems.
%patch -P10 -p0 -b .rh1574936~
%endif
%patch -P11 -p0 -b .d-shared-libphobos~
%patch -P12 -p0 -b .pr118206~
%patch -P13 -p0 -b .d-deps~
%patch -P14 -p0 -b .pr117231~
# RISCV
%patch -P20 -p0 -b .pr116256~
%patch -P21 -p0 -b .pr118103~
%patch -P50 -p0 -b .rh2155127~
touch -r isl-0.24/m4/ax_prog_cxx_for_build.m4 isl-0.24/m4/ax_prog_cc_for_build.m4
@ -928,10 +948,8 @@ cp -a libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
LC_ALL=C sed -i -e 's/\xa0/ /' gcc/doc/options.texi
sed -i -e '/ldp_fusion/s/Init(1)/Init(0)/' gcc/config/aarch64/aarch64.opt
sed -i -e 's/Common Driver Var(flag_report_bug)/& Init(1)/' gcc/common.opt
sed -i -e 's/context->report_bug = false;/context->report_bug = true;/' gcc/diagnostic.cc
sed -i -e 's/m_report_bug = false;/m_report_bug = true;/' gcc/diagnostic.cc
%ifarch ppc
if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then
@ -1188,7 +1206,11 @@ CONFIGURE_OPTS="\
%endif
%ifarch ppc64le
%if 0%{?rhel} >= 9
%if 0%{?rhel} >= 10
--with-cpu-32=power9 --with-tune-32=power10 --with-cpu-64=power9 --with-tune-64=power10 \
%else
--with-cpu-32=power9 --with-tune-32=power9 --with-cpu-64=power9 --with-tune-64=power9 \
%endif
%else
--with-cpu-32=power8 --with-tune-32=power8 --with-cpu-64=power8 --with-tune-64=power8 \
%endif
@ -1206,7 +1228,11 @@ CONFIGURE_OPTS="\
%endif
%ifarch x86_64
%if 0%{?rhel} > 8
%if 0%{?rhel} > 9
--with-arch_64=x86-64-v3 \
%else
--with-arch_64=x86-64-v2 \
%endif
%endif
--with-arch_32=x86-64 \
%endif
@ -1266,6 +1292,9 @@ CONFIGURE_OPTS="\
%ifnarch %{arm}
--with-build-config=bootstrap-lto --enable-link-serialization=1 \
%endif
%endif
%if 0%{?rhel:1}
--enable-host-pie --enable-host-bind-now \
%endif
"
@ -1295,7 +1324,7 @@ CC="$CC" CXX="$CXX" CFLAGS="$OPT_FLAGS" \
| sed 's/ -Wformat-security / -Wformat -Wformat-security /'`" \
XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \
../../configure --disable-bootstrap --enable-host-shared \
--enable-languages=jit $CONFIGURE_OPTS
--enable-languages=jit --enable-libgdiagnostics $CONFIGURE_OPTS
make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" all-gcc
cp -a gcc/libgccjit.so* ../gcc/
cd ../gcc/
@ -1330,7 +1359,7 @@ cd ../..
# Copy various doc files here and there
cd ..
mkdir -p rpm.doc/{gfortran,objc,gdc,libphobos,gm2,libgm2}
mkdir -p rpm.doc/{gfortran,objc,gdc,libphobos,gm2,libgm2,libgdiagnostics-devel}
mkdir -p rpm.doc/go rpm.doc/libgo rpm.doc/libquadmath rpm.doc/libitm
mkdir -p rpm.doc/changelogs/{gcc/cp,gcc/ada,gcc/jit,libstdc++-v3,libobjc,libgomp,libcc1,libatomic,libsanitizer}
@ -1384,6 +1413,8 @@ done)
cp -p $i ../rpm.doc/libgo/$i.libgo
done)
%endif
(cd gcc/doc/libgdiagnostics; make html; \
mv _build/html ../../../rpm.doc/libgdiagnostics-devel/html )
rm -f rpm.doc/changelogs/gcc/ChangeLog.[1-9]
find rpm.doc -name \*ChangeLog\* | xargs bzip2 -9
@ -1436,6 +1467,7 @@ cd obj-offload-nvptx-none
make prefix=%{buildroot}%{_prefix} mandir=%{buildroot}%{_mandir} \
infodir=%{buildroot}%{_infodir} install
rm -rf %{buildroot}%{_prefix}/libexec/gcc/nvptx-none/%{gcc_major}/install-tools
rm -rf %{buildroot}%{_prefix}/libexec/gcc/nvptx-none/%{gcc_major}/g++-mapper-server
rm -rf %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/accel/nvptx-none/{install-tools,plugin,cc1,cc1plus,f951}
rm -rf %{buildroot}%{_infodir} %{buildroot}%{_mandir}/man7 %{buildroot}%{_prefix}/share/locale
rm -rf %{buildroot}%{_prefix}/lib/gcc/nvptx-none/%{gcc_major}/{install-tools,plugin}
@ -1443,12 +1475,8 @@ rm -rf %{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/accel/
rm -rf %{buildroot}%{_prefix}/%{_lib}/libc[cp]1*
mv -f %{buildroot}%{_prefix}/nvptx-none/lib/*.{a,spec} %{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/accel/nvptx-none/
mv -f %{buildroot}%{_prefix}/nvptx-none/lib/mgomp/*.{a,spec} %{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/accel/nvptx-none/mgomp/
mv -f %{buildroot}%{_prefix}/nvptx-none/lib/mptx-3.1/*.{a,spec} %{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/accel/nvptx-none/mptx-3.1/
mv -f %{buildroot}%{_prefix}/nvptx-none/lib/mgomp/mptx-3.1/*.{a,spec} %{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/accel/nvptx-none/mgomp/mptx-3.1/
mv -f %{buildroot}%{_prefix}/lib/gcc/nvptx-none/%{gcc_major}/*.a %{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/accel/nvptx-none/
mv -f %{buildroot}%{_prefix}/lib/gcc/nvptx-none/%{gcc_major}/mgomp/*.a %{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/accel/nvptx-none/mgomp/
mv -f %{buildroot}%{_prefix}/lib/gcc/nvptx-none/%{gcc_major}/mptx-3.1/*.a %{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/accel/nvptx-none/mptx-3.1/
mv -f %{buildroot}%{_prefix}/lib/gcc/nvptx-none/%{gcc_major}/mgomp/mptx-3.1/*.a %{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/accel/nvptx-none/mgomp/mptx-3.1/
find %{buildroot}%{_prefix}/lib/gcc/nvptx-none %{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/accel/nvptx-none \
%{buildroot}%{_prefix}/nvptx-none/lib -name \*.la | xargs rm
cd ..
@ -1473,6 +1501,7 @@ cd obj-offload-amdgcn-amdhsa
make prefix=%{buildroot}%{_prefix} mandir=%{buildroot}%{_mandir} \
infodir=%{buildroot}%{_infodir} install
rm -rf %{buildroot}%{_prefix}/libexec/gcc/amdgcn-amdhsa/%{gcc_major}/install-tools
rm -rf %{buildroot}%{_prefix}/libexec/gcc/amdgcn-amdhsa/%{gcc_major}/g++-mapper-server
rm -rf %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/accel/amdgcn-amdhsa/{install-tools,plugin,cc1,cc1plus,f951}
rm -rf %{buildroot}%{_infodir} %{buildroot}%{_mandir}/man7 %{buildroot}%{_prefix}/share/locale
rm -rf %{buildroot}%{_prefix}/lib/gcc/amdgcn-amdhsa/%{gcc_major}/{install-tools,plugin}
@ -1564,12 +1593,10 @@ for f in `find %{buildroot}%{_prefix}/include/c++/%{gcc_major}/%{gcc_target_plat
done
# Nuke bits/*.h.gch dirs
# 1) there is no bits/*.h header installed, so when gch file can't be
# used, compilation fails
# 2) sometimes it is hard to match the exact options used for building
# 1) sometimes it is hard to match the exact options used for building
# libstdc++-v3 or they aren't desirable
# 3) there are multilib issues, conflicts etc. with this
# 4) it is huge
# 2) there are multilib issues, conflicts etc. with this
# 3) it is huge
# People can always precompile on their own whatever they want, but
# shipping this for everybody is unnecessary.
rm -rf %{buildroot}%{_prefix}/include/c++/%{gcc_major}/%{gcc_target_platform}/bits/*.h.gch
@ -1677,18 +1704,8 @@ fi
mkdir -p %{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}
mv -f %{buildroot}%{_prefix}/%{_lib}/libstdc++*gdb.py* \
%{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/
pushd ../libstdc++-v3/python
for i in `find . -name \*.py`; do
touch -r $i %{buildroot}%{_prefix}/share/gcc-%{gcc_major}/python/$i
done
touch -r hook.in %{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/libstdc++*gdb.py
popd
for f in `find %{buildroot}%{_prefix}/share/gcc-%{gcc_major}/python/ \
%{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/ -name \*.py`; do
r=${f/$RPM_BUILD_ROOT/}
%{__python3} -c 'import py_compile; py_compile.compile("'$f'", dfile="'$r'")'
%{__python3} -O -c 'import py_compile; py_compile.compile("'$f'", dfile="'$r'")'
done
%py_byte_compile %{python3} %{buildroot}%{_prefix}/share/gcc-%{gcc_major}/python/
%py_byte_compile %{python3} %{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/
rm -f $FULLEPATH/libgccjit.so
cp -a objlibgccjit/gcc/libgccjit.so* %{buildroot}%{_prefix}/%{_lib}/
@ -1696,6 +1713,15 @@ cp -a ../gcc/jit/libgccjit*.h %{buildroot}%{_prefix}/include/
/usr/bin/install -c -m 644 objlibgccjit/gcc/doc/libgccjit.info %{buildroot}/%{_infodir}/
gzip -9 %{buildroot}/%{_infodir}/libgccjit.info
rm -f $FULLEPATH/libgdiagnostics.so
cp -a objlibgccjit/gcc/libgdiagnostics.so* %{buildroot}%{_prefix}/%{_lib}/
cp -a ../gcc/libgdiagnostics*.h %{buildroot}%{_prefix}/include/
cp -a objlibgccjit/gcc/sarif-replay %{buildroot}%{_prefix}/bin/
sed -e 's,\.\./include/,../../../../include/,' \
%{buildroot}%{_prefix}/%{_lib}/libstdc++.modules.json \
> $FULLPATH/libstdc++.modules.json
pushd $FULLPATH
if [ "%{_lib}" = "lib" ]; then
%if %{build_objc}
@ -1711,12 +1737,12 @@ ln -sf ../../../libgo.so.23.* libgo.so
ln -sf ../../../libquadmath.so.0.* libquadmath.so
%endif
%if %{build_d}
ln -sf ../../../libgdruntime.so.5.* libgdruntime.so
ln -sf ../../../libgphobos.so.5.* libgphobos.so
ln -sf ../../../libgdruntime.so.6.* libgdruntime.so
ln -sf ../../../libgphobos.so.6.* libgphobos.so
%endif
%if %{build_m2}
for i in cor iso log min pim; do
ln -sf ../../../libm2$i.so.19.* libm2$i.so
ln -sf ../../../libm2$i.so.20.* libm2$i.so
done
%endif
%if %{build_libitm}
@ -1746,12 +1772,12 @@ ln -sf ../../../../%{_lib}/libgo.so.23.* libgo.so
ln -sf ../../../../%{_lib}/libquadmath.so.0.* libquadmath.so
%endif
%if %{build_d}
ln -sf ../../../../%{_lib}/libgdruntime.so.5.* libgdruntime.so
ln -sf ../../../../%{_lib}/libgphobos.so.5.* libgphobos.so
ln -sf ../../../../%{_lib}/libgdruntime.so.6.* libgdruntime.so
ln -sf ../../../../%{_lib}/libgphobos.so.6.* libgphobos.so
%endif
%if %{build_m2}
for i in cor iso log min pim; do
ln -sf ../../../../%{_lib}/libm2$i.so.19.* libm2$i.so
ln -sf ../../../../%{_lib}/libm2$i.so.20.* libm2$i.so
done
%endif
%if %{build_libitm}
@ -1892,16 +1918,16 @@ 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.5.* | sed 's,^.*libg,libg,'`' )' > libgdruntime.so
echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgdruntime.so.5.* | sed 's,^.*libg,libg,'`' )' > 64/libgdruntime.so
echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgphobos.so.5.* | sed 's,^.*libg,libg,'`' )' > libgphobos.so
echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgphobos.so.5.* | sed 's,^.*libg,libg,'`' )' > 64/libgphobos.so
echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgdruntime.so.6.* | sed 's,^.*libg,libg,'`' )' > libgdruntime.so
echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgdruntime.so.6.* | sed 's,^.*libg,libg,'`' )' > 64/libgdruntime.so
echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgphobos.so.6.* | sed 's,^.*libg,libg,'`' )' > libgphobos.so
echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgphobos.so.6.* | sed 's,^.*libg,libg,'`' )' > 64/libgphobos.so
%endif
%if %{build_m2}
for i in cor iso log min pim; do
rm -f libm2$i.so
echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libm2$i.so.19.* | sed 's,^.*libm,libm,'`' )' > libm2$i.so
echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libm2$i.so.19.* | sed 's,^.*libm,libm,'`' )' > 64/libm2$i.so
echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libm2$i.so.20.* | sed 's,^.*libm,libm,'`' )' > libm2$i.so
echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libm2$i.so.20.* | sed 's,^.*libm,libm,'`' )' > 64/libm2$i.so
rm -f 64/m2/m2$i/*.{a,la}
ln -sf ../../libm2$i.so 64/m2/m2$i/
ln -sf ../../libm2$i.a 64/m2/m2$i/
@ -2009,16 +2035,16 @@ 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.5.* | sed 's,^.*libg,libg,'`' )' > libgdruntime.so
echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgdruntime.so.5.* | sed 's,^.*libg,libg,'`' )' > 32/libgdruntime.so
echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgphobos.so.5.* | sed 's,^.*libg,libg,'`' )' > libgphobos.so
echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgphobos.so.5.* | sed 's,^.*libg,libg,'`' )' > 32/libgphobos.so
echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgdruntime.so.6.* | sed 's,^.*libg,libg,'`' )' > libgdruntime.so
echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgdruntime.so.6.* | sed 's,^.*libg,libg,'`' )' > 32/libgdruntime.so
echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgphobos.so.6.* | sed 's,^.*libg,libg,'`' )' > libgphobos.so
echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgphobos.so.6.* | sed 's,^.*libg,libg,'`' )' > 32/libgphobos.so
%endif
%if %{build_m2}
for i in cor iso log min pim; do
rm -f libm2$i.so
echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libm2$i.so.19.* | sed 's,^.*libm,libm,'`' )' > libm2$i.so
echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libm2$i.so.19.* | sed 's,^.*libm,libm,'`' )' > 32/libm2$i.so
echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libm2$i.so.20.* | sed 's,^.*libm,libm,'`' )' > libm2$i.so
echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libm2$i.so.20.* | sed 's,^.*libm,libm,'`' )' > 32/libm2$i.so
rm -f 32/m2/m2$i/*.{a,la}
ln -sf ../../libm2$i.so 32/m2/m2$i/
ln -sf ../../libm2$i.a 32/m2/m2$i/
@ -2189,12 +2215,12 @@ 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.5.*
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgphobos.so.5.*
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgdruntime.so.6.*
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgphobos.so.6.*
%endif
%if %{build_m2}
for i in cor iso log min pim; do
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libm2$i.so.19.*
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libm2$i.so.20.*
done
%endif
%if %{build_libitm}
@ -2313,7 +2339,13 @@ rm -rf %{buildroot}%{_prefix}/lib64/go/%{gcc_major}/%{gcc_target_platform}
%endif
%endif
rm -f %{buildroot}%{mandir}/man3/ffi*
%if %{build_offload_nvptx}
rm -f %{buildroot}%{_mandir}/man1/*-accel-*nvptx*
%endif
%if %{build_offload_amdgcn}
rm -f %{buildroot}%{_mandir}/man1/*-accel-*amdgcn*
%endif
rm -f %{buildroot}%{_mandir}/man7/{gpl,gfdl,fsf-funding}.7*
# Help plugins find out nvra.
echo gcc-%{version}-%{release}.%{_arch} > $FULLPATH/rpmver
@ -2439,6 +2471,8 @@ end
%ldconfig_scriptlets -n libgccjit
%ldconfig_scriptlets -n libgdiagnostics
%ldconfig_scriptlets -n libquadmath
%ldconfig_scriptlets -n libitm
@ -2551,9 +2585,7 @@ end
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/xsaveintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/xsaveoptintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512cdintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512erintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512fintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512pfintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/shaintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/mm_malloc.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/mm3dnow.h
@ -2575,8 +2607,6 @@ end
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/xsavesintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/clzerointrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/pkuintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx5124fmapsintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx5124vnniwintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512vpopcntdqintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/sgxintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/gfniintrin.h
@ -2627,6 +2657,24 @@ end
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/sm3intrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/sm4intrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/usermsrintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/amxavx512intrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/amxfp8intrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/amxmovrsintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/amxtf32intrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/amxtransposeintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2-512bf16intrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2-512convertintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2-512mediaintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2-512minmaxintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2-512satcvtintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2bf16intrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2convertintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2copyintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2mediaintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2minmaxintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2roundingintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2satcvtintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/movrsintrin.h
%endif
%ifarch ia64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/ia64intrin.h
@ -2671,6 +2719,10 @@ end
%{_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
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_sme.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_neon_sve_bridge.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_private_fp8.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_private_neon_types.h
%endif
%ifarch sparc sparcv9 sparc64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/visintrin.h
@ -2686,6 +2738,7 @@ end
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/riscv_crypto.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/riscv_bitmanip.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/riscv_th_vector.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/riscv_cmo.h
%endif
%if %{build_libasan}
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/sanitizer
@ -2817,7 +2870,7 @@ end
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/liblsan_preinit.o
%endif
%{_prefix}/libexec/getconf/default
%doc gcc/README* rpm.doc/changelogs/gcc/ChangeLog*
%doc gcc/README* rpm.doc/changelogs/gcc/ChangeLog*
%{!?_licensedir:%global license %%doc}
%license gcc/COPYING* COPYING.RUNTIME
@ -2902,6 +2955,7 @@ end
%ifnarch sparcv9 ppc %{multilib_64_archs}
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libstdc++.so
%endif
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libstdc++.modules.json
%ifarch sparcv9 ppc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib32
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib32/libstdc++fs.a
@ -3085,8 +3139,8 @@ end
%doc rpm.doc/gdc/*
%files -n libgphobos
%{_prefix}/%{_lib}/libgdruntime.so.5*
%{_prefix}/%{_lib}/libgphobos.so.5*
%{_prefix}/%{_lib}/libgdruntime.so.6*
%{_prefix}/%{_lib}/libgphobos.so.6*
%doc rpm.doc/libphobos/*
%files -n libgphobos-static
@ -3113,6 +3167,7 @@ end
%files gm2
%{_prefix}/bin/gm2
%{_mandir}/man1/gm2.1*
%{_infodir}/m2*
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}
@ -3142,7 +3197,7 @@ end
%doc rpm.doc/gm2/*
%files -n libgm2
%{_prefix}/%{_lib}/libm2*.so.19*
%{_prefix}/%{_lib}/libm2*.so.20*
%doc rpm.doc/libgm2/*
%files -n libgm2-static
@ -3539,6 +3594,15 @@ end
%doc rpm.doc/libgccjit-devel/*
%doc gcc/jit/docs/examples
%files -n libgdiagnostics
%{_prefix}/bin/sarif-replay
%{_prefix}/%{_lib}/libgdiagnostics.so.*
%files -n libgdiagnostics-devel
%{_prefix}/%{_lib}/libgdiagnostics.so
%{_prefix}/include/libgdiagnostics*.h
%doc rpm.doc/libgdiagnostics-devel/*
%files plugin-devel
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
@ -3621,315 +3685,84 @@ end
%endif
%changelog
* Sun Apr 14 2024 David Abdurachmanov <davidlt@rivosinc.com> 14.0.1-0.15.0.riscv64
- Adjust for riscv64
* Sun Jan 26 2025 David Abdurachmanov <davidlt@rivosinc.com> 15.0.1-0.4.0.riscv64
- Pull riscv fixes from trunk
- PRs target/116256, target/118103
* Thu Apr 11 2024 Jakub Jelinek <jakub@redhat.com> 14.0.1-0.15
* Sat Jan 25 2025 Jakub Jelinek <jakub@redhat.com> 15.0.1-0.4
- update from trunk
- PRs analyzer/114472, c++/114303, c++/114409, debug/112878,
fortran/106500, middle-end/110027, middle-end/114681, target/114639,
tree-optimization/109596, tree-optimization/114672
- fix symbol version of std::__basic_file<char>::native_handle() const
(PR libstdc++/114692)
- emit -Whardened warning even for -fhardened -fcf-protection=none
(#2273610, PR target/114606)
- PRs c/118639, c++/105440, c++/107522, c++/107741, c++/115769, c++/116417,
c++/116568, c++/116756, c++/117153, c++/117397, c++/117602,
c++/117775, c++/117827, c++/118047, c++/118049, c++/118101,
c++/118124, c++/118139, c++/118147, c++/118199, c++/118214,
c++/118225, c++/118245, c++/118255, c++/118278, c++/118355,
c++/118390, c++/118396, c++/118454, c++/118486, c++/118509,
c++/118513, c++/118523, c++/118525, c++/118528, c++/118532,
c++/118534, c++/118582, c++/118590, c++/118604, d/114434, d/115249,
d/116373, d/117115, d/118438, d/118448, d/118449, d/118584,
fortran/71884, fortran/81978, fortran/96087, fortran/107122,
fortran/118321, fortran/118359, fortran/118441, fortran/118613,
gcov-profile/116743, ipa/116068, ipa/118400, jit/117886,
libfortran/118406, libfortran/118536, libfortran/118571,
libstdc++/99995, libstdc++/100249, libstdc++/109849, libstdc++/118158,
libstdc++/118185, lto/118238, middle-end/112779, middle-end/113904,
middle-end/114596, middle-end/114877, middle-end/118140,
middle-end/118273, middle-end/118472, modula2/118010, modula2/118589,
objc++/118586, rtl-optimization/109592, rtl-optimization/113994,
rtl-optimization/117868, rtl-optimization/118067,
rtl-optimization/118562, rtl-optimization/118591,
rtl-optimization/1180167, sarif-replay/117670, target/80813,
target/110901, target/113257, target/113560, target/114442,
target/116256, target/116308, target/116593, target/117079,
target/117726, target/118154, target/118170, target/118182,
target/118270, target/118329, target/118357, target/118489,
target/118497, target/118501, target/118510, target/118511,
target/118512, target/118531, target/118560, target/118609,
testsuite/116448, testsuite/117958, testsuite/118451,
tree-optimization/92539, tree-optimization/102705,
tree-optimization/115494, tree-optimization/115777,
tree-optimization/115895, tree-optimization/116010,
tree-optimization/117668, tree-optimization/117875,
tree-optimization/118012, tree-optimization/118077,
tree-optimization/118224, tree-optimization/118348,
tree-optimization/118360, tree-optimization/118384,
tree-optimization/118430, tree-optimization/118456,
tree-optimization/118483, tree-optimization/118487,
tree-optimization/118514, tree-optimization/118522,
tree-optimization/118529, tree-optimization/118552,
tree-optimization/118558, tree-optimization/118569,
tree-optimization/118572, tree-optimization/118605,
tree-optimization/118628, tree-optimization/118634
- fix libstdc++.modules.json content after relocation
* Wed Apr 10 2024 Jakub Jelinek <jakub@redhat.com> 14.0.1-0.14
* Tue Jan 14 2025 Jakub Jelinek <jakub@redhat.com> 15.0.1-0.3
- temporary fix for coroutine range for handling (PR c++/117231)
* Tue Jan 14 2025 Jakub Jelinek <jakub@redhat.com> 15.0.1-0.2
- update from trunk
- PRs analyzer/114588, bootstrap/106472, c++/91079, c++/99377, c++/100667,
c++/103825, c++/104040, c++/111132, c++/114377, c++/114462,
c++/114479, c++/114537, c++/114561, c++/114562, c++/114572,
c++/114580, c/114361, debug/114608, fortran/36337, fortran/50410,
fortran/106999, fortran/110987, fortran/112407, fortran/113885,
fortran/113956, fortran/114474, fortran/114535, gcov-profile/113765,
gcov-profile/114115, gcov-profile/114601, ipa/111571, ipa/113359,
ipa/113907, ipa/113964, libquadmath/114533, libquadmath/114623,
libstdc++/104606, libstdc++/114519, libstdc++/114633, lto/114655,
middle-end/114552, middle-end/114599, middle-end/114604,
middle-end/114627, middle-end/114628, modula2/114517,
modula2/114520, modula2/114548, modula2/114565, modula2/114617,
modula2/114648, rtl-optimization/112560, rtl-optimization/114415,
target/88309, target/101865, target/112919, target/113233,
target/113986, target/114577, target/114587, target/114590,
target/114603, target/114607, testsuite/114034, testsuite/114036,
testsuite/114307, testsuite/114614, testsuite/114642,
testsuite/114662, tree-optimization/112303,
tree-optimization/114115, tree-optimization/114480,
tree-optimization/114485, tree-optimization/114551,
tree-optimization/114555, tree-optimization/114557,
tree-optimization/114566, tree-optimization/114624
- don't emit VEX encoded AES-NI instructions when just -maes and not -mavx
is enabled (#2272758, PR target/114576)
- fix s390* peephole2 to check mode of constant pool entries and for
64-bit extraction from 128-bit constant pool entry extract the correct
half of the value (#2273618, PR target/114605)
- PRs ada/118459, c/116871, c++/118445, modula2/116557, target/116030,
target/117682, tree-optimization/118405
* Thu Mar 28 2024 Jakub Jelinek <jakub@redhat.com> 14.0.1-0.13
* Mon Jan 13 2025 Jakub Jelinek <jakub@redhat.com> 15.0.1-0.1
- update from trunk
- PRs analyzer/109251, analyzer/110902, analyzer/110928, analyzer/111305,
analyzer/111441, analyzer/112974, analyzer/112975, analyzer/113505,
analyzer/113619, analyzer/114286, analyzer/114408, analyzer/114473,
bootstrap/114369, c++/59465, c++/100557, c++/110323, c++/111918,
c++/112631, c++/112724, c++/114349, c++/114439, c/109619, c/114364,
fortran/30802, fortran/55978, fortran/101135, fortran/103715,
fortran/107426, fortran/111781, fortran/114475, ipa/108802,
ipa/114254, libfortran/107031, libgcc/111731, libgcc/114397,
libstdc++/101228, libstdc++/113841, libstdc++/114316,
libstdc++/114359, libstdc++/114367, libstdc++/114394,
libstdc++/114400, libstdc++/114401, middle-end/111151,
middle-end/111632, middle-end/111683, middle-end/113396,
middle-end/114347, middle-end/114348, middle-end/114480,
modula2/113836, modula2/114296, modula2/114380, modula2/114418,
modula2/114422, modula2/114443, modula2/114444, modula2/114478,
rtl-optimization/101523, rtl-optimization/112415, sanitizer/111736,
target/99829, target/111822, target/112651, target/114049,
target/114150, target/114175, target/114194, target/114272,
target/114323, target/114334, target/114352, target/114407,
target/114431, testsuite/114320, testsuite/114486,
tree-optimization/96147, tree-optimization/109925,
tree-optimization/111736, tree-optimization/113727,
tree-optimization/114057, tree-optimization/114151,
tree-optimization/114322, tree-optimization/114329,
tree-optimization/114365, tree-optimization/114375,
tree-optimization/114396, tree-optimization/114405,
tree-optimization/114425, tree-optimization/114433,
tree-optimization/114464, tree-optimization/114469,
tree-optimization/114471
- PRs c/118112, c++/114630, d/117701, fortran/115788, fortran/118432,
lto/118181, middle-end/64242, middle-end/118303, middle-end/118411,
middle-end/118415, modula2/118453, rtl-optimization/107455,
target/115910, target/115921, target/118418, tree-optimization/117119,
tree-optimization/117997, tree-optimization/118409
* Sat Mar 16 2024 Jakub Jelinek <jakub@redhat.com> 14.0.1-0.12
* Sat Jan 11 2025 Jakub Jelinek <jakub@redhat.com> 15.0.0-0.4
- update from trunk
- PRs ada/113979, analyzer/114159, c++/92687, c++/98356, c++/98645,
c++/98688, c++/98881, c++/103994, c++/104919, c++/105512,
c++/106009, c++/110025, c++/110031, c++/110347, c++/110730,
c++/111224, c++/111710, c++/113629, c++/113802, c++/113976,
c++/113987, c++/114005, c++/114114, c++/114138, c++/114170,
c++/114229, d/112285, d/112290, d/114171, debug/113519,
debug/113777, debug/113918, debug/114015, debug/114186,
driver/114314, fortran/82943, fortran/86148, fortran/86268,
fortran/87477, fortran/89645, fortran/99065, fortran/103707,
fortran/104819, fortran/106987, fortran/110826, fortran/114001,
fortran/114141, fortran/114280, fortran/114283, ipa/113757,
libbacktrace/114201, libcc1/113977, libfortran/105437,
libfortran/114304, libgcc/114327, libgomp/114216, libstdc++/66146,
libstdc++/113960, libstdc++/114103, libstdc++/114147,
libstdc++/114152, libstdc++/114240, libstdc++/114244,
libstdc++/114279, libstdc++/114325, middle-end/95351,
middle-end/105533, middle-end/113907, middle-end/114108,
middle-end/114136, middle-end/114156, middle-end/114157,
middle-end/114196, middle-end/114209, middle-end/114299,
middle-end/114313, middle-end/114319, middle-end/114332,
modula2/102344, modula2/109969, modula2/114227, modula2/114294,
modula2/114295, modula2/114333, preprocessor/80755,
preprocessor/110558, rtl-optimization/110079,
rtl-optimization/113010, rtl-optimization/114190,
rtl-optimization/114211, sanitizer/97696, sanitizer/112709,
target/92729, target/101737, target/102250, target/108174,
target/111362, target/112337, target/112817, target/112871,
target/113001, target/113453, target/113510, target/113542,
target/113618, target/113720, target/113790, target/113915,
target/113950, target/114100, target/114116, target/114130,
target/114132, target/114184, target/114187, target/114200,
target/114202, target/114232, target/114233, target/114264,
target/114284, target/114288, target/114310, target/114339,
testsuite/96109, testsuite/108355, testsuite/113418,
testsuite/113428, tree-optimization/98238, tree-optimization/110199,
tree-optimization/113466, tree-optimization/113557,
tree-optimization/114009, tree-optimization/114071,
tree-optimization/114121, tree-optimization/114164,
tree-optimization/114192, tree-optimization/114197,
tree-optimization/114203, tree-optimization/114231,
tree-optimization/114239, tree-optimization/114246,
tree-optimization/114249, tree-optimization/114269,
tree-optimization/114278, tree-optimization/114293,
tree-optimization/114297
- PRs ada/18765, ada/118274, c/116060, c/117866, c/118376, c++/117792,
c++/117887, c++/117925, c++/117937, c++/117993, c++/118060,
c++/118277, c++/118387, c++/118391, fortran/108434, fortran/118337,
ipa/118138, rtl-optimization/117186, rtl-optimization/117467,
rtl-optimization/117934, rtl-optimization/118266, target/65181,
target/118017, target/118131, target/118188, target/118332,
target/118362, testsuite/118025, tree-optimization/88575,
tree-optimization/116126, tree-optimization/117927,
tree-optimization/118206, tree-optimization/118211,
tree-optimization/118344
* Thu Mar 7 2024 Siddhesh Poyarekar <siddhesh@redhat.com>
- update License identifier in the spec file
* Mon Mar 4 2024 Jakub Jelinek <jakub@redhat.com>
- add --without-clang-plugin --without-llvm-plugin to annobin configure
options
* Thu Feb 29 2024 David Abdurachmanov <davidlt@rivosinc.com>
- enable support for riscv64
* Wed Feb 28 2024 Jakub Jelinek <jakub@redhat.com> 14.0.1-0.8
- update from trunk
- PRs ada/113893, analyzer/110483, analyzer/110520, analyzer/111289,
analyzer/111802, analyzer/111881, analyzer/113983, analyzer/113998,
analyzer/113999, c++/113083, c++/113966, c++/113970, c/114007,
c/114042, fortran/105658, fortran/107071, fortran/114012,
fortran/114024, ipa/61159, ipa/70582, ipa/111960, ipa/113476,
libfortran/105456, libfortran/105473, middle-end/112344,
middle-end/114070, middle-end/114073, middle-end/114084,
modula2/113749, modula2/113889, modula2/114026, modula2/114055,
other/109668, other/113957, rtl-optimization/54052,
rtl-optimization/114044, rtl-optimization/114054, target/90785,
target/108120, target/109987, target/112103, target/112375,
target/112397, target/113220, target/113295, target/113613,
target/113696, target/113805, target/113912, target/113971,
target/113995, target/114017, target/114028, target/114094,
target/114097, target/114098, testsuite/111462,
tree-optimization/91567, tree-optimization/109804,
tree-optimization/113205, tree-optimization/113967,
tree-optimization/113988, tree-optimization/113993,
tree-optimization/114027, tree-optimization/114038,
tree-optimization/114040, tree-optimization/114041,
tree-optimization/114048, tree-optimization/114068,
tree-optimization/114074, tree-optimization/114081,
tree-optimization/114090, tree-optimization/114099
- fix up handling of C++ inline var specializations
(#2264986, PR c++/114013)
- punt on vectorization of +- with non-integral emulated vectors
(#2265489, PR tree-optimization/114075)
- fix up handling of references of comdat local symbols forced into
memory (#2260416, PR rtl-optimization/113617)
* Sat Feb 17 2024 Jakub Jelinek <jakub@redhat.com> 14.0.1-0.7
- update from trunk
- PRs analyzer/111266, c++/97202, c++/97990, c++/98388, c++/99573,
c++/107126, c++/111682, c++/112436, c++/112580, c++/113158,
c++/113332, c++/113545, c++/113612, c++/113649, c++/113658,
c++/113674, c++/113706, c++/113708, c++/113760, c++/113789,
c++/113834, c++/113853, c++/113908, c++/113929, d/104739, d/113125,
d/113667, d/113758, d/113772, fortran/99210, fortran/105847,
fortran/113799, fortran/113866, fortran/113883, fortran/113911,
ipa/98237, libfortran/107068, libgcc/113850, libgomp/113843,
libstdc++/87744, libstdc++/99117, libstdc++/100147,
libstdc++/113294, libstdc++/113806, libstdc++/113807,
libstdc++/113811, libstdc++/113931, libstdc++/113961,
middle-end/107385, middle-end/110754, middle-end/113415,
middle-end/113508, middle-end/113576, middle-end/113904,
middle-end/113921, modula2/113848, modula2/113888, other/113336,
sanitizer/113785, target/106543, target/109349, target/113742,
target/113780, target/113855, target/113871, target/113876,
target/113909, target/113927, testsuite/113278, testsuite/113448,
testsuite/113861, testsuite/113899, tree-optimization/108355,
tree-optimization/111054, tree-optimization/111156,
tree-optimization/113567, tree-optimization/113734,
tree-optimization/113774, tree-optimization/113783,
tree-optimization/113818, tree-optimization/113831,
tree-optimization/113849, tree-optimization/113863,
tree-optimization/113895, tree-optimization/113896,
tree-optimization/113898, tree-optimization/113902,
tree-optimization/113910
- fix bugs in Fortran allocatable character component assignments
(#2261826, PR fortran/113503)
* Thu Feb 8 2024 Jakub Jelinek <jakub@redhat.com> 14.0.1-0.6
- update from trunk
- PRs c++/113814, c/113776, target/113711, target/113733, target/113824,
testsuite/113710, tree-optimization/113735, tree-optimization/113808
* Wed Feb 7 2024 Jakub Jelinek <jakub@redhat.com> 14.0.1-0.5
- update from trunk
- PRs analyzer/113253, analyzer/113509, analyzer/113654, c++/94231,
c++/107291, c++/107594, c++/109359, c++/110006, c++/110084,
c++/110358, c++/111286, c++/112437, c++/112439, c++/112737,
c++/112769, c++/112846, c++/113451, c++/113531, c++/113544,
c++/113638, c++/113640, c++/113644, c++/113788, c/111059, c/111911,
c/112571, c/113438, c/113740, debug/103047, debug/113394,
debug/113637, fortran/104908, libfortran/111022, libgcc/113337,
libgcc/113402, libgcc/113403, libgcc/113604, libstdc++/109203,
libstdc++/113309, libstdc++/113335, libstdc++/90276,
middle-end/101195, middle-end/110176, middle-end/112917,
middle-end/113100, middle-end/113607, middle-end/113622,
middle-end/113699, middle-end/113705, middle-end/113722,
modula2/111627, modula2/112506, modula2/113730,
rtl-optimization/113656, sanitizer/110676, sanitizer/112644,
target/38534, target/59778, target/103503, target/105576,
target/108933, target/111677, target/112577, target/112861,
target/112862, target/112863, target/112864, target/112950,
target/113059, target/113249, target/113255, target/113312,
target/113560, target/113615, target/113616, target/113623,
target/113636, target/113655, target/113657, target/113689,
target/113690, target/113697, target/113700, target/113701,
target/113763, target/113766, testsuite/113502,
tree-optimization/110603, tree-optimization/111268,
tree-optimization/111444, tree-optimization/113467,
tree-optimization/113568, tree-optimization/113588,
tree-optimization/113603, tree-optimization/113614,
tree-optimization/113630, tree-optimization/113639,
tree-optimization/113659, tree-optimization/113670,
tree-optimization/113691, tree-optimization/113692,
tree-optimization/113693, tree-optimization/113707,
tree-optimization/113731, tree-optimization/113736,
tree-optimization/113737, tree-optimization/113750,
tree-optimization/113753, tree-optimization/113756,
tree-optimization/113759, tree-optimization/113796
- fix PCH writing assertion (#2259912)
* Sat Jan 27 2024 Jakub Jelinek <jakub@redhat.com> 14.0.1-0.4
- update from trunk
- PRs analyzer/112969, c++/109227, c++/112899, c++/113580, c++/113598,
c++/113599, middle-end/112971, other/113575, preprocessor/105608,
target/100204, target/100212, target/112987, target/113469,
target/113526, target/113538, target/113601, testsuite/113558,
tree-optimization/113602
- temporarily disable -mearly-ldp-fusion -mlate-ldp-fusion on aarch64 again
(#2260449, #2260560, #2260562)
- use gcc_major macro in the spec some more
- require llvm >= 15 and lld >= 15 for the amdgcn offloading
where they are used as assembler and linker
* Thu Jan 25 2024 Jakub Jelinek <jakub@redhat.com> 14.0.1-0.3
- update from trunk
- PRs analyzer/111361, analyzer/112705, analyzer/112811, analyzer/112927,
analyzer/112977, bootstrap/113554, c++/67898, c++/90463, c++/90464,
c++/100707, c++/102607, c++/104594, c++/109640, c++/109642,
c++/111357, c++/111410, c++/111607, c++/112594, c++/112632,
c++/112820, c++/113256, c++/113347, c++/113405, c++/113498,
c++/113529, c/102998, c/107942, c/109708, c/110029, c/113492,
c/113518, debug/107058, debug/112718, debug/113382, debug/113488,
fortran/48776, fortran/111291, fortran/113377, fortran/113471,
ipa/108007, ipa/108470, ipa/110705, ipa/112616, ipa/113490,
libstdc++/113500, libstdc++/113512, middle-end/88345,
middle-end/112684, middle-end/113574, modula2/113559, other/111966,
rtl-optimization/111267, rtl-optimization/113255, target/82420,
target/100942, target/108521, target/108640, target/109092,
target/109636, target/110934, target/111279, target/112989,
target/113030, target/113070, target/113089, target/113095,
target/113114, target/113356, target/113420, target/113485,
target/113486, target/113495, target/113550, target/113556,
target/113572, testsuite/113437, testsuite/113548,
tree-optimization/69807, tree-optimization/113364,
tree-optimization/113373, tree-optimization/113459,
tree-optimization/113462, tree-optimization/113463,
tree-optimization/113464, tree-optimization/113491,
tree-optimization/113494, tree-optimization/113552,
tree-optimization/113576
- add offloading support for AMD GCN ROCm capable devices
* Thu Jan 18 2024 Jakub Jelinek <jakub@redhat.com> 14.0.1-0.2
- update from trunk
- PRs ada/113397, analyzer/106229, analyzer/113150, analyzer/113333,
bootstrap/113445, c++/99493, c++/104634, c++/109899, c++/110065,
c++/112588, c++/113242, c++/113292, c++/113307, c++/113340,
c++/113389, c/111693, fortran/67277, fortran/113305, libstdc++/108822,
libstdc++/108827, libstdc++/109536, libstdc++/111327,
libstdc++/113318, libstdc++/113450, middle-end/90348,
middle-end/110115, middle-end/110847, middle-end/111422,
middle-end/111659, middle-end/113354, middle-end/113406,
middle-end/113409, middle-end/113410, modula2/111956, other/113399,
rtl-optimization/96388, rtl-optimization/111554,
rtl-optimization/113048, rust/108111, target/105522, target/107201,
target/112573, target/112944, target/112973, target/113122,
target/113156, target/113221, target/113247, target/113281,
target/113393, target/113404, target/113429, testsuite/109705,
testsuite/111850, testsuite/113366, testsuite/113369,
testsuite/113446, testsuite/113452, translation/108890,
tree-optimization/91624, tree-optimization/107823,
tree-optimization/110251, tree-optimization/110422,
tree-optimization/110450, tree-optimization/110768,
tree-optimization/110794, tree-optimization/110841,
tree-optimization/110852, tree-optimization/110941,
tree-optimization/112774, tree-optimization/113091,
tree-optimization/113287, tree-optimization/113361,
tree-optimization/113370, tree-optimization/113371,
tree-optimization/113372, tree-optimization/113374,
tree-optimization/113385, tree-optimization/113408,
tree-optimization/113421, tree-optimization/113431,
tree-optimization/113475
* Sat Jan 13 2024 Jakub Jelinek <jakub@redhat.com> 14.0.1-0.1
* Thu Jan 9 2025 Jakub Jelinek <jakub@redhat.com> 15.0.0-0.3
- new package

View File

@ -9,15 +9,15 @@
* configure: Regenerated.
--- gcc/configure.ac.jj 2017-02-13 12:20:53.000000000 +0100
+++ gcc/configure.ac 2017-02-25 12:42:32.859175403 +0100
@@ -570,7 +570,7 @@ AC_ARG_ENABLE(build-format-warnings,
+++ gcc/configure.ac 2024-11-30 13:34:11.100296256 +0100
@@ -592,7 +592,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],
- [wf_opt=-Wno-format],[wf_opt=])
+ [wf_opt="-Wno-format -Wno-format-security"],[wf_opt=])
ACX_PROG_CXX_WARNING_OPTS(
m4_quote(m4_do([-W -Wall -Wno-narrowing -Wwrite-strings ],
m4_quote(m4_do([-W -Wall -Wno-error=narrowing -Wwrite-strings ],
[-Wcast-qual $wf_opt])),
--- gcc/configure.jj 2017-02-13 12:20:52.000000000 +0100
+++ gcc/configure 2017-02-25 12:42:50.041946391 +0100
@ -31,8 +31,8 @@
wf_opt=
fi
--- Makefile.tpl.jj 2023-11-29 13:21:41.680292662 +0100
+++ Makefile.tpl 2023-11-29 13:23:24.677839321 +0100
@@ -448,9 +448,9 @@ LDFLAGS = @LDFLAGS@
+++ Makefile.tpl 2024-11-30 13:35:29.303196246 +0100
@@ -450,9 +450,9 @@ LDFLAGS = @LDFLAGS@
LIBCFLAGS = $(CFLAGS)
CXXFLAGS = @CXXFLAGS@
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
@ -43,11 +43,11 @@
+GDCFLAGS = $(filter-out -Wformat-security,@GDCFLAGS@)
+GM2FLAGS = $(filter-out -Wformat-security,$(CFLAGS))
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
CRAB1_LIBS = @CRAB1_LIBS@
--- Makefile.in.jj 2023-11-29 13:21:41.691292507 +0100
+++ Makefile.in 2023-11-29 13:24:01.254323180 +0100
@@ -445,9 +445,9 @@ LDFLAGS = @LDFLAGS@
+++ Makefile.in 2024-11-30 13:36:12.113594079 +0100
@@ -447,9 +447,9 @@ LDFLAGS = @LDFLAGS@
LIBCFLAGS = $(CFLAGS)
CXXFLAGS = @CXXFLAGS@
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
@ -58,5 +58,5 @@
+GDCFLAGS = $(filter-out -Wformat-security,@GDCFLAGS@)
+GM2FLAGS = $(filter-out -Wformat-security,$(CFLAGS))
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
CRAB1_LIBS = @CRAB1_LIBS@

19
gcc15-d-deps.patch Normal file
View File

@ -0,0 +1,19 @@
2025-01-13 Arsen Arsenović <arsen@aarsen.me>
Jakub Jelinek <jakub@redhat.com>
* Make-lang.in (DCOMPILE, DPOSTCOMPILE): Use $(basename $(@F))
instead of $(*F).
--- gcc/d/Make-lang.in.jj 2025-01-13 09:12:07.408983471 +0100
+++ gcc/d/Make-lang.in 2025-01-13 10:57:16.398315375 +0100
@@ -65,8 +65,8 @@ ALL_DFLAGS = $(DFLAGS-$@) $(GDCFLAGS) -f
$(WARN_DFLAGS)
DCOMPILE.base = $(GDC) -c $(ALL_DFLAGS) -o $@
-DCOMPILE = $(DCOMPILE.base) -MT $@ -MMD -MP -MF $(@D)/$(DEPDIR)/$(*F).TPo
-DPOSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(*F).TPo $(@D)/$(DEPDIR)/$(*F).Po
+DCOMPILE = $(DCOMPILE.base) -MT $@ -MMD -MP -MF $(@D)/$(DEPDIR)/$(basename $(@F)).TPo
+DPOSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(basename $(@F)).TPo $(@D)/$(DEPDIR)/$(basename $(@F)).Po
DLINKER = $(GDC) $(NO_PIE_FLAG) -lstdc++
# Like LINKER, but use a mutex for serializing front end links.

View File

@ -66,61 +66,117 @@
GDCFLAGS="$(GDCFLAGS) $${flags}" \
CXXFLAGS="$(CXXFLAGS) $${flags}" \
--- libcpp/macro.cc.jj 2019-01-09 13:01:21.420552123 +0100
+++ libcpp/macro.cc 2019-01-11 18:18:17.736876285 +0100
@@ -3256,8 +3256,6 @@ static cpp_macro *
+++ libcpp/macro.cc 2024-11-30 13:16:41.163056391 +0100
@@ -3680,8 +3680,6 @@ static cpp_macro *
create_iso_definition (cpp_reader *pfile)
{
bool following_paste_op = false;
- const char *paste_op_error_msg =
- N_("'##' cannot appear at either end of a macro expansion");
- N_("%<##%> cannot appear at either end of a macro expansion");
unsigned int num_extra_tokens = 0;
unsigned nparms = 0;
cpp_hashnode **params = NULL;
@@ -3382,7 +3380,9 @@ create_iso_definition (cpp_reader *pfile
@@ -3809,7 +3807,9 @@ create_iso_definition (cpp_reader *pfile
function-like macros, but not at the end. */
if (following_paste_op)
{
- cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
+ cpp_error (pfile, CPP_DL_ERROR,
+ "'##' cannot appear at either end of a macro "
+ "%<##%> cannot appear at either end of a macro "
+ "expansion");
goto out;
}
if (!vaopt_tracker.completed ())
@@ -3397,7 +3397,9 @@ create_iso_definition (cpp_reader *pfile
@@ -3824,7 +3824,9 @@ create_iso_definition (cpp_reader *pfile
function-like macros, but not at the beginning. */
if (macro->count == 1)
{
- cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
+ cpp_error (pfile, CPP_DL_ERROR,
+ "'##' cannot appear at either end of a macro "
+ "%<##%> cannot appear at either end of a macro "
+ "expansion");
goto out;
}
--- libcpp/expr.cc.jj 2019-01-09 13:01:22.415535734 +0100
+++ libcpp/expr.cc 2019-01-11 18:16:23.444726882 +0100
@@ -803,16 +803,17 @@ cpp_classify_number (cpp_reader *pfile,
+++ libcpp/expr.cc 2024-11-30 13:14:52.468583689 +0100
@@ -874,50 +874,54 @@ cpp_classify_number (cpp_reader *pfile,
if ((result & CPP_N_WIDTH) == CPP_N_LARGE
&& CPP_OPTION (pfile, cpp_warn_long_long))
{
- const char *message = CPP_OPTION (pfile, cplusplus)
- const char *message = CPP_OPTION (pfile, cplusplus)
- ? N_("use of C++11 long long integer constant")
- : N_("use of C99 long long integer constant");
-
if (CPP_OPTION (pfile, c99))
cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location,
- cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location,
- 0, message);
+ 0, CPP_OPTION (pfile, cplusplus)
+ ? N_("use of C++11 long long integer constant")
+ : N_("use of C99 long long integer constant"));
+ cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location, 0,
+ CPP_OPTION (pfile, cplusplus)
+ ? N_("use of C++11 long long integer "
+ "constant")
+ : N_("use of C99 long long integer "
+ "constant"));
else
cpp_pedwarning_with_line (pfile, CPP_W_LONG_LONG,
- virtual_location, 0, message);
+ virtual_location, 0,
+ CPP_OPTION (pfile, cplusplus)
+ ? N_("use of C++11 long long integer constant")
+ : N_("use of C99 long long integer constant"));
+ ? N_("use of C++11 long long integer "
+ "constant")
+ : N_("use of C99 long long integer "
+ "constant"));
}
if ((result & CPP_N_SIZE_T) == CPP_N_SIZE_T
&& !CPP_OPTION (pfile, size_t_literals))
- {
- const char *message
- = (result & CPP_N_UNSIGNED) == CPP_N_UNSIGNED
- ? N_("use of C++23 %<size_t%> integer constant")
- : N_("use of C++23 %<make_signed_t<size_t>%> integer constant");
- cpp_warning_with_line (pfile, CPP_W_SIZE_T_LITERALS,
- virtual_location, 0, message);
- }
+ cpp_warning_with_line (pfile, CPP_W_SIZE_T_LITERALS,
+ virtual_location, 0,
+ (result & CPP_N_UNSIGNED) == CPP_N_UNSIGNED
+ ? N_("use of C++23 %<size_t%> integer "
+ "constant")
+ : N_("use of C++23 %<make_signed_t<size_t>%> "
+ "integer constant"));
if ((result & CPP_N_BITINT) != 0
&& CPP_OPTION (pfile, cpp_warn_c11_c23_compat) != 0)
{
if (CPP_OPTION (pfile, cpp_warn_c11_c23_compat) > 0)
{
- const char *message = N_("ISO C does not support literal "
- "%<wb%> suffixes before C23");
if (CPP_PEDANTIC (pfile) && !CPP_OPTION (pfile, true_false))
cpp_pedwarning_with_line (pfile, CPP_W_C11_C23_COMPAT,
- virtual_location, 0, message);
+ virtual_location, 0,
+ "ISO C does not support literal "
+ "%<wb%> suffixes before C23");
else
cpp_warning_with_line (pfile, CPP_W_C11_C23_COMPAT,
- virtual_location, 0, message);
- }
- else if (!CPP_OPTION (pfile, true_false))
- {
- const char *message = N_("ISO C does not support literal "
+ virtual_location, 0,
+ "ISO C does not support literal "
"%<wb%> suffixes before C23");
- cpp_pedwarning_with_line (pfile, CPP_W_PEDANTIC,
- virtual_location, 0, message);
}
+ else if (!CPP_OPTION (pfile, true_false))
+ cpp_pedwarning_with_line (pfile, CPP_W_PEDANTIC,
+ virtual_location, 0,
+ "ISO C does not support literal "
+ "%<wb%> suffixes before C23");
}
result |= CPP_N_INTEGER;

View File

@ -696,16 +696,16 @@
static void
--- gcc/toplev.cc.jj 2017-02-19 13:02:31.000000000 +0100
+++ gcc/toplev.cc 2017-02-19 16:50:25.536301350 +0100
@@ -94,6 +94,7 @@ along with GCC; see the file COPYING3.
+++ gcc/toplev.cc 2024-11-30 13:22:34.175096117 +0100
@@ -100,6 +100,7 @@ along with GCC; see the file COPYING3.
#ifdef HAVE_isl
#include <isl/version.h>
+extern const char *get_isl_version (bool);
#endif
static void general_init (const char *, bool);
@@ -683,7 +684,7 @@ print_version (FILE *file, const char *i
static void general_init (const char *, bool, unique_argv original_argv);
@@ -652,7 +653,7 @@ print_version (FILE *file, const char *i
#ifndef HAVE_isl
"none"
#else

View File

@ -6,8 +6,8 @@
directory.
--- gcc/toplev.cc.jj 2008-12-09 23:59:10.000000000 +0100
+++ gcc/toplev.cc 2009-01-27 14:33:52.000000000 +0100
@@ -113,6 +113,8 @@ static void finalize (bool);
+++ gcc/toplev.cc 2024-11-30 13:26:05.085132543 +0100
@@ -112,6 +112,8 @@ static void finalize ();
static void crash_signal (int) ATTRIBUTE_NORETURN;
static void compile_file (void);
@ -16,14 +16,14 @@
/* Decoded options, and number of such options. */
struct cl_decoded_option *save_decoded_options;
unsigned int save_decoded_options_count;
@@ -2239,6 +2241,8 @@ toplev::main (int argc, char **argv)
@@ -2296,6 +2298,8 @@ toplev::main (int argc, char **argv)
expandargv (&argc, &argv);
+ toplev_main_argv = CONST_CAST2 (const char **, char **, argv);
+
/* Initialization of GCC's environment, and diagnostics. */
general_init (argv[0], m_init_signals);
general_init (argv[0], m_init_signals, std::move (original_argv));
--- gcc/graphite.cc.jj 2010-12-01 10:24:32.000000000 -0500
+++ gcc/graphite.cc 2010-12-01 11:46:07.832118193 -0500

View File

@ -4,21 +4,21 @@
<a class="link" href="https://www.fsf.org" target="_top">FSF
</a>
</p><p>
+ Release 14.0.1
+ Release 15.0.1
+ </p><p>
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation
License, Version 1.2 or any later version published by the
--- libstdc++-v3/doc/html/api.html.jj 2011-01-03 12:53:21.000000000 +0100
+++ libstdc++-v3/doc/html/api.html 2011-01-04 18:12:01.672757784 +0100
+++ libstdc++-v3/doc/html/api.html 2024-11-30 13:30:16.607594623 +0100
@@ -20,7 +20,9 @@
member functions for the library classes, finding out what is in a
particular include file, looking at inheritance diagrams, etc.
</p><p>
- The API documentation, rendered into HTML, can be viewed online
+ The API documentation, rendered into HTML, can be viewed locally
+ <a class="link" href="api/index.html" target="_top">for the 14.0.1 release</a>,
+ <a class="link" href="api/index.html" target="_top">for the 15.0.1 release</a>,
+ online
<a class="link" href="http://gcc.gnu.org/onlinedocs/" target="_top">for each GCC release</a>
<a class="link" href="https://gcc.gnu.org/onlinedocs/" target="_top">for each GCC release</a>
and
<a class="link" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/index.html" target="_top">
<a class="link" href="https://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/index.html" target="_top">

227
gcc15-pr116256.patch Normal file
View File

@ -0,0 +1,227 @@
From e5990a6ce611f522b8f48c2b469983da19d39777 Mon Sep 17 00:00:00 2001
From: Jeff Law <jlaw@ventanamicro.com>
Date: Sat, 25 Jan 2025 09:42:19 -0700
Subject: [PATCH] [RISC-V][PR target/116256] Improve handling of single bit
constants
So under the umbrella of pr116256 (P3 regression) I've been exploring removal
of the mvconst_internal pattern. Not surprisingly, that's going to cause all
kinds of undesirable fallout. While I can kind of see a path forward for that
work, it's going to require some combine work that I don't think we want to
tackle in the context of gcc-15.
Essentially without mvconst_internal we'll have fully exposed constant
synthesis prior to combine. Remember that combine has limits on what
combinations it will perform based on how many instructions are in the source
sequence. If we need 2+ instructions to synthesize the constant, those eat
into our budget.
In a world without mvconst_internal we'd need to either improve combine to
handle 5 insns cases (which do show up in the testsuite) or we need to
significantly improve how combine handles REG_EQUAL notes. 5 insn combinations
sound like insanity to me. So I'd tend to lean towards the latter, though
that's going to need some refactoring and diving into note redistribution
(ugh!).
In the mean time we can start limiting mvconst_internal. For the remaining
case in pr116256 we have this code in combine:
> (insn 8 5 10 2 (set (reg:V2048HF 138 [ _5 ])
> (vec_duplicate:V2048HF (reg:HF 142 [ x ]))) "j.c":152:11 3712 {*vec_duplicatev2048hf}
> (expr_list:REG_DEAD (reg:HF 142 [ x ])
> (nil)))
> (insn 10 8 11 2 (set (reg:DI 139)
> (const_int 2048 [0x800])) "j.c":152:11 275 {*mvconst_internal}
> (nil)) (insn 11 10 0 2 (set (mem:V2048HF (reg/f:DI 141 [ in ]) [1 MEM <vector(2048) _Float16> [(_Float16 *)in_7(D)]+0 S4096 A128])
> (if_then_else:V2048HF (unspec:V2048BI [
> (const_vector:V2048BI [
> (const_int 1 [0x1]) repeated x2048
> ])
> (reg:DI 139)
> (const_int 2 [0x2]) repeated x3
> (reg:SI 66 vl)
> (reg:SI 67 vtype)
> ] UNSPEC_VPREDICATE)
> (reg:V2048HF 138 [ _5 ])
> (unspec:V2048HF [
> (reg:DI 0 zero)
> ] UNSPEC_VUNDEF))) "j.c":152:11 3843 {*pred_movv2048hf}
> (expr_list:REG_DEAD (reg/f:DI 141 [ in ])
> (expr_list:REG_DEAD (reg:DI 0 zero)
> (expr_list:REG_DEAD (reg:SI 66 vl)
> (expr_list:REG_DEAD (reg:SI 67 vtype)
> (expr_list:REG_DEAD (reg:V2048HF 138 [ _5 ])
> (expr_list:REG_DEAD (reg:DI 139)
> (nil))))))))
Note a couple things. First insn 8 will be split shortly after combine and
will need the constant 2048. But that's obviously exposed late. Second (of
course) is the mvconst_internal pattern at insn 10. After split1 we'll have:
> (insn 16 5 17 2 (set (reg:DI 144) (const_int 4096 [0x1000])) "j.c":152:11 -1
> (nil))
> (insn 17 16 18 2 (set (reg:DI 143)
> (plus:DI (reg:DI 144)
> (const_int -2048 [0xfffffffffffff800]))) "j.c":152:11 -1
> (expr_list:REG_EQUAL (const_int 2048 [0x800])
> (nil)))
> (insn 18 17 19 2 (set (reg:V2048HF 138 [ _5 ])
> (if_then_else:V2048HF (unspec:V2048BI [ (const_vector:V2048BI [
> (const_int 1 [0x1]) repeated x2048
> ])
> (reg:DI 143)
> (const_int 2 [0x2]) repeated x3
> (reg:SI 66 vl)
> (reg:SI 67 vtype)
> ] UNSPEC_VPREDICATE)
> (vec_duplicate:V2048HF (reg:HF 142 [ x ]))
> (unspec:V2048HF [ (reg:DI 0 zero)
> ] UNSPEC_VUNDEF))) "j.c":152:11 -1
> (nil))
> (insn 19 18 20 2 (set (reg:DI 145)
> (const_int 4096 [0x1000])) "j.c":152:11 -1
> (nil))
> (insn 20 19 11 2 (set (reg:DI 139)
> (plus:DI (reg:DI 145)
> (const_int -2048 [0xfffffffffffff800]))) "j.c":152:11 -1
> (expr_list:REG_EQUAL (const_int 2048 [0x800])
> (nil)))
> (insn 11 20 0 2 (set (mem:V2048HF (reg/f:DI 141 [ in ]) [1 MEM <vector(2048) _Float16> [(_Float16 *)in_7(D)]+0 S4096 A128])
> (if_then_else:V2048HF (unspec:V2048BI [
> (const_vector:V2048BI [
> (const_int 1 [0x1]) repeated x2048
> ])
> (reg:DI 139) (const_int 2 [0x2]) repeated x3
> (reg:SI 66 vl)
> (reg:SI 67 vtype)
> ] UNSPEC_VPREDICATE)
> (reg:V2048HF 138 [ _5 ])
> (unspec:V2048HF [ (reg:DI 0 zero)
> ] UNSPEC_VUNDEF))) "j.c":152:11 3843 {*pred_movv2048hf}
> (expr_list:REG_DEAD (reg/f:DI 141 [ in ])
> (expr_list:REG_DEAD (reg:DI 0 zero) (expr_list:REG_DEAD (reg:SI 66 vl)
> (expr_list:REG_DEAD (reg:SI 67 vtype)
> (expr_list:REG_DEAD (reg:V2048HF 138 [ _5 ])
> (expr_list:REG_DEAD (reg:DI 139)
> (nil))))))))
Note the synthesis of 2048 appears twice. I seriously considered adding a
local cprop pass at this point. That could be done with a bit of work. It
didn't look too bad -- the biggest problem is cprop isn't designed to run once
we've left cfglayout. But we could probably finesse that by not allowing it to
change jumps if we've left cfglayout or converting it to do the more complex
jump fixups.
You might ask why the post-reload optimizers don't help since this at least
looks like a case where they could. After LRA the RTL looks like:
> (insn 26 5 25 2 (set (reg:DI 15 a5 [144])
> (const_int 4096 [0x1000])) "/home/jlaw/test/gcc/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/dup-1.c":152:11 277 {*movdi_64bit} (expr_list:REG_EQUIV (const_int 4096 [0x1000])
> (nil)))
> (insn 25 26 19 2 (set (reg:DI 15 a5 [143])
> (plus:DI (reg:DI 15 a5 [144])
> (const_int -2048 [0xfffffffffffff800]))) "/home/jlaw/test/gcc/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/dup-1.c":152:11 5 {adddi3}
> (expr_list:REG_EQUIV (const_int 2048 [0x800])
> (nil)))
> (insn 19 25 20 2 (set (reg:V2048QI 100 v4 [orig:138 _11 ] [138])
> (if_then_else:V2048QI (unspec:V2048BI [
> (const_vector:V2048BI [
> (const_int 1 [0x1]) repeated x2048
> ])
> (reg:DI 15 a5 [143])
> (const_int 2 [0x2]) repeated x3
> (reg:SI 66 vl)
> (reg:SI 67 vtype)
> ] UNSPEC_VPREDICATE)
> (vec_duplicate:V2048QI (reg:QI 12 a2 [145]))
> (unspec:V2048QI [ (reg:DI 0 zero)
> ] UNSPEC_VUNDEF))) "/home/jlaw/test/gcc/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/dup-1.c":152:11 4172 {*pred_broadcastv2048qi}
> (nil)) (insn 20 19 21 2 (set (reg:DI 15 a5 [146])
> (const_int 4096 [0x1000])) "/home/jlaw/test/gcc/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/dup-1.c":152:11 277 {*movdi_64bit} (expr_list:REG_EQUIV (const_int 4096 [0x1000])
> (nil)))
> (insn 21 20 11 2 (set (reg:DI 15 a5 [139])
> (plus:DI (reg:DI 15 a5 [146])
> (const_int -2048 [0xfffffffffffff800]))) "/home/jlaw/test/gcc/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/dup-1.c":152:11 5 {adddi3}
> (expr_list:REG_EQUIV (const_int 2048 [0x800])
> (nil)))
Note the re-use of a5 for the constant synthesis steps. That's going to spoil
any chance of reload_cse saving us. That re-use also gets in the way of vsetvl
elimination and we ultimately get this code:
> foo10:
> li a5,4096
> addi a5,a5,-2048
> vsetvli zero,a5,e16,m8,ta,ma
> vfmv.v.f v8,fa0
> li a5,4096
> addi a5,a5,-2048
> vsetvli zero,a5,e16,m8,ta,ma
> vse16.v v8,0(a0)
> ret
The regression is we have the obviously redundant vsetvl. The additional copy
of the synthesis is undesirable as well.
If we filter out single bit constants from mvconst_internal we trivially fix
that regression. The only fallout is a class of saturation tests which want to
test against 0x80000000. Under the hood this is a minor codegen issue
interacting badly with combine's deliberate rejection of simplification of
extensions of constants. Rather than constructing the SImode constant, then
zero extending the result we can just generate the constant we actually want
directly in DImode.
The net is we fix the regression, don't introduce any obvious new regressions
and slightly reduce our dependence on mvconst_internal. All good in my book.
Obviously I'll wait for pre-commit CI to render a verdict.
PR target/116256
gcc/
* config/riscv/riscv.md (mvconst_internal): Reject single bit
constants.
* config/riscv/riscv.cc (riscv_gen_zero_extend_rtx): Improve
handling constants.
---
gcc/config/riscv/riscv.cc | 12 +++++++++---
gcc/config/riscv/riscv.md | 3 ++-
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
index 5a3a05041773..4652454b8fec 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -12684,10 +12684,16 @@ riscv_gen_zero_extend_rtx (rtx x, machine_mode mode)
emit_move_insn (xmode_reg, x);
else
{
- rtx reg_x = gen_reg_rtx (mode);
+ /* Combine deliberately does not simplify extensions of constants
+ (long story). So try to generate the zero extended constant
+ efficiently.
- emit_move_insn (reg_x, x);
- riscv_emit_unary (ZERO_EXTEND, xmode_reg, reg_x);
+ First extract the constant and mask off all the bits not in MODE. */
+ HOST_WIDE_INT val = INTVAL (x);
+ val &= GET_MODE_MASK (mode);
+
+ /* X may need synthesis, so do not blindly copy it. */
+ xmode_reg = force_reg (Xmode, gen_int_mode (val, Xmode));
}
return xmode_reg;
diff --git a/gcc/config/riscv/riscv.md b/gcc/config/riscv/riscv.md
index e4123c912dcb..09053df1eb9b 100644
--- a/gcc/config/riscv/riscv.md
+++ b/gcc/config/riscv/riscv.md
@@ -2470,7 +2470,8 @@
(match_operand:GPR 1 "splittable_const_int_operand" "i"))]
"!ira_in_progress
&& !(p2m1_shift_operand (operands[1], <MODE>mode)
- || high_mask_shift_operand (operands[1], <MODE>mode))"
+ || high_mask_shift_operand (operands[1], <MODE>mode)
+ || exact_log2 (INTVAL (operands[1])) >= 0)"
"#"
"&& 1"
[(const_int 0)]
--
2.43.5

177
gcc15-pr117231.patch Normal file
View File

@ -0,0 +1,177 @@
In the current implementation, statement expressions were intentionally
unsupported (as a C++ extension). However since they are quite heavily
used by end-users and also now emitted by the compiler in some cases
we are now working to add them. This first patch ensures that we
recurse into statement expressions (and therefore handle coroutine
keywords that might appear inside them).
PR c++/115851
PR c++/116914
PR c++/117231
gcc/cp/ChangeLog:
* coroutines.cc (await_statement_expander): Walk into
statement expressions.
(await_statement_walker): Likewise.
gcc/testsuite/ChangeLog:
* g++.dg/coroutines/pr115851.C: New test.
* g++.dg/coroutines/pr116914.C: New test.
* g++.dg/coroutines/pr117231.C: New test.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
---
gcc/cp/coroutines.cc | 22 ++++++++++++
gcc/testsuite/g++.dg/coroutines/pr115851.C | 35 +++++++++++++++++++
gcc/testsuite/g++.dg/coroutines/pr116914.C | 40 ++++++++++++++++++++++
gcc/testsuite/g++.dg/coroutines/pr117231.C | 21 ++++++++++++
4 files changed, 118 insertions(+)
create mode 100644 gcc/testsuite/g++.dg/coroutines/pr115851.C
create mode 100644 gcc/testsuite/g++.dg/coroutines/pr116914.C
create mode 100644 gcc/testsuite/g++.dg/coroutines/pr117231.C
--- gcc/cp/coroutines.cc
+++ gcc/cp/coroutines.cc
@@ -2128,6 +2128,14 @@ await_statement_expander (tree *stmt, int *do_subtree, void *d)
}
else if (EXPR_P (*stmt))
{
+ /* Look for ({}) at the top level - just recurse into these. */
+ if (TREE_CODE (*stmt) == EXPR_STMT)
+ {
+ tree inner = EXPR_STMT_EXPR (*stmt);
+ if (TREE_CODE (inner) == STATEMENT_LIST
+ || TREE_CODE (inner) == BIND_EXPR)
+ return NULL_TREE; // process contents
+ }
process_one_statement (stmt, d);
*do_subtree = 0; /* Done subtrees. */
}
@@ -3857,6 +3865,20 @@ await_statement_walker (tree *stmt, int *do_subtree, void *d)
if (!(cp_walk_tree (stmt, find_any_await, &await_ptr, &visited)))
return NULL_TREE; /* Nothing special to do here. */
+ /* Handle statement expressions. */
+ if (TREE_CODE (expr) == EXPR_STMT)
+ {
+ tree inner = EXPR_STMT_EXPR (expr);
+ if (TREE_CODE (inner) == STATEMENT_LIST
+ || TREE_CODE (inner) == BIND_EXPR)
+ {
+ res = cp_walk_tree (&EXPR_STMT_EXPR (expr),
+ await_statement_walker, d, NULL);
+ *do_subtree = 0;
+ return res;
+ }
+ }
+
visited.empty ();
awpts->saw_awaits = 0;
hash_set<tree> truth_aoif_to_expand;
--- gcc/testsuite/g++.dg/coroutines/pr115851.C
+++ gcc/testsuite/g++.dg/coroutines/pr115851.C
@@ -0,0 +1,35 @@
+// { dg-additional-options "-Wno-pedantic " }
+#include <coroutine>
+
+struct SuspendNever {
+ bool await_ready() noexcept;
+ void await_suspend(std::coroutine_handle<>) noexcept;
+ void await_resume() noexcept;
+};
+
+struct Coroutine;
+
+struct PromiseType {
+ Coroutine get_return_object();
+ SuspendNever initial_suspend();
+ SuspendNever final_suspend() noexcept;
+ void unhandled_exception () {}
+};
+
+struct Coroutine {
+ using promise_type = PromiseType;
+};
+
+struct ErrorOr {
+ int release_error();
+};
+
+void warnln(int const&);
+
+Coroutine __async_test_input_basic() {
+ ({
+ co_await SuspendNever{};
+ ErrorOr _temporary_result2;
+ warnln(_temporary_result2.release_error());
+ });
+}
--- gcc/testsuite/g++.dg/coroutines/pr116914.C
+++ gcc/testsuite/g++.dg/coroutines/pr116914.C
@@ -0,0 +1,40 @@
+// { dg-additional-options "-std=gnu++20 -fpreprocessed" }
+
+namespace std {
+template <typename a, typename> struct coroutine_traits : a {};
+template <typename = void> struct coroutine_handle {
+ static coroutine_handle from_address(void *);
+ operator coroutine_handle<>();
+ void *address();
+};
+struct b {
+ int await_ready() noexcept;
+ void await_suspend(coroutine_handle<>) noexcept;
+ void await_resume() noexcept;
+};
+} // namespace std
+struct c;
+struct d {
+ c get_return_object();
+ std::b initial_suspend();
+ std::b final_suspend() noexcept;
+ void unhandled_exception();
+ std::b yield_value(int);
+};
+struct e {
+ void operator++();
+ int operator*();
+ int operator!=(e);
+};
+struct c {
+ using promise_type = d;
+ e begin();
+ e end();
+ c f() {
+ c g;
+ for (auto h : g) {
+ auto i = 1;
+ co_yield i;
+ }
+ }
+};
--- gcc/testsuite/g++.dg/coroutines/pr117231.C
+++ gcc/testsuite/g++.dg/coroutines/pr117231.C
@@ -0,0 +1,21 @@
+// { dg-additional-options "-std=c++23 " }
+// { dg-do run }
+#include <generator>
+//#include <print>
+#include <vector>
+
+std::generator<int> get_seq()
+{
+ std::vector<int> data_{1, 2, 3};
+ for (auto item : data_)
+ co_yield item;
+}
+
+int main()
+{
+ int res = 0;
+ for (auto item : get_seq())
+ res = item; //std::println("{}", item);
+ if (res != 3)
+ __builtin_abort ();
+}

217
gcc15-pr118103.patch Normal file
View File

@ -0,0 +1,217 @@
From 55d288d4ff5360c572f2a017ba9385840ac5134e Mon Sep 17 00:00:00 2001
From: Pan Li <pan2.li@intel.com>
Date: Sat, 25 Jan 2025 15:45:10 +0800
Subject: [PATCH] RISC-V: Make FRM as global register [PR118103]
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit
After we enabled the labe-combine pass after the mode-switching pass, it
will try to combine below insn patterns into op. Aka:
(insn 40 5 41 2 (set (reg:SI 11 a1 [151])
(reg:SI 69 frm)) "pr118103-simple.c":67:15 2712 {frrmsi}
(nil))
(insn 41 40 7 2 (set (reg:SI 69 frm)
(const_int 2 [0x2])) "pr118103-simple.c":69:8 2710 {fsrmsi_restore}
(nil))
(insn 42 10 11 2 (set (reg:SI 69 frm)
(reg:SI 11 a1 [151])) "pr118103-simple.c":70:8 2710 {fsrmsi_restore}
(nil))
trying to combine definition of r11 in:
40: a1:SI=frm:SI
into:
42: frm:SI=a1:SI
instruction becomes a no-op:
(set (reg:SI 69 frm)
(reg:SI 69 frm))
original cost = 4 + 4 (weighted: 8.000000), replacement cost =
2147483647; keeping replacement
rescanning insn with uid = 42.
updating insn 42 in-place
verify found no changes in insn with uid = 42.
deleting insn 40
For example we have code as blow:
9 │ int test_exampe () {
10 │ test ();
11 │
12 │ size_t vl = 4;
13 │ vfloat16m1_t va = __riscv_vle16_v_f16m1(a, vl);
14 │ va = __riscv_vfnmadd_vv_f16m1_rm(va, va, va, __RISCV_FRM_RDN, vl);
15 │ va = __riscv_vfmsac_vv_f16m1(va, va, va, vl);
16 │
17 │ __riscv_vse16_v_f16m1(b, va, vl);
18 │
19 │ return 0;
20 │ }
it will be compiled to:
53 │ main:
54 │ addi sp,sp,-16
55 │ sd ra,8(sp)
56 │ call initialize
57 │ lui a6,%hi(b)
58 │ lui a2,%hi(a)
59 │ addi a3,a6,%lo(b)
60 │ addi a2,a2,%lo(a)
61 │ li a4,4
62 │ .L8:
63 │ fsrmi 2
64 │ vsetvli a5,a4,e16,m1,ta,ma
65 │ vle16.v v1,0(a2)
66 │ slli a1,a5,1
67 │ subw a4,a4,a5
68 │ add a2,a2,a1
69 │ vfnmadd.vv v1,v1,v1
>> The fsrm a0 insn is deleted by late-combine <<
70 │ vfmsub.vv v1,v1,v1
71 │ vse16.v v1,0(a3)
72 │ add a3,a3,a1
73 │ bgt a4,zero,.L8
74 │ lh a4,%lo(b)(a6)
75 │ li a5,-20480
76 │ addi a5,a5,-1382
77 │ bne a4,a5,.L14
78 │ ld ra,8(sp)
79 │ li a0,0
80 │ addi sp,sp,16
81 │ jr ra
This patch would like to add the FRM register to the global_regs as it
is a cooperatively-managed global register. And then the fsrm insn will
not be eliminated by late-combine. The related spec17 cam4 failure may
also caused by this issue too.
The below test suites are passed for this patch.
* The rv64gcv fully regression test.
PR target/118103
gcc/ChangeLog:
* config/riscv/riscv.cc (riscv_conditional_register_usage): Add
the FRM as the global_regs.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/base/pr118103-1.c: New test.
* gcc.target/riscv/rvv/base/pr118103-run-1.c: New test.
Signed-off-by: Pan Li <pan2.li@intel.com>
---
gcc/config/riscv/riscv.cc | 4 +-
.../gcc.target/riscv/rvv/base/pr118103-1.c | 27 ++++++++++
.../riscv/rvv/base/pr118103-run-1.c | 50 +++++++++++++++++++
3 files changed, 80 insertions(+), 1 deletion(-)
create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/base/pr118103-1.c
create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/base/pr118103-run-1.c
diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc
index 4652454b8fec..dd50fe4eddfb 100644
--- a/gcc/config/riscv/riscv.cc
+++ b/gcc/config/riscv/riscv.cc
@@ -10885,7 +10885,9 @@ riscv_conditional_register_usage (void)
call_used_regs[r] = 1;
}
- if (!TARGET_HARD_FLOAT)
+ if (TARGET_HARD_FLOAT)
+ global_regs[FRM_REGNUM] = 1;
+ else
{
for (int regno = FP_REG_FIRST; regno <= FP_REG_LAST; regno++)
fixed_regs[regno] = call_used_regs[regno] = 1;
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/pr118103-1.c b/gcc/testsuite/gcc.target/riscv/rvv/base/pr118103-1.c
new file mode 100644
index 000000000000..1afa5d3afb50
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/base/pr118103-1.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -march=rv64gcv_zvfh -mabi=lp64d" } */
+
+#include "riscv_vector.h"
+
+#define N 4
+typedef _Float16 float16_t;
+float16_t a[N]; float16_t b[N];
+
+extern void test ();
+
+int test_exampe () {
+ test ();
+
+ size_t vl = N;
+ vfloat16m1_t va = __riscv_vle16_v_f16m1(a, vl);
+ va = __riscv_vfnmadd_vv_f16m1_rm(va, va, va, __RISCV_FRM_RDN, vl);
+ va = __riscv_vfmsac_vv_f16m1(va, va, va, vl);
+
+ __riscv_vse16_v_f16m1(b, va, vl);
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times {frrm\s+[axs][0-9]+} 1 } } */
+/* { dg-final { scan-assembler-times {fsrmi\s+[01234]} 1 } } */
+/* { dg-final { scan-assembler-times {fsrm\s+[axs][0-9]+} 1 } } */
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/pr118103-run-1.c b/gcc/testsuite/gcc.target/riscv/rvv/base/pr118103-run-1.c
new file mode 100644
index 000000000000..62375c63ee86
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/base/pr118103-run-1.c
@@ -0,0 +1,50 @@
+/* { dg-do run { target { riscv_zvfh } } } */
+/* { dg-options "-O3 -fno-strict-aliasing" } */
+
+#include "riscv_vector.h"
+#define N 4
+typedef _Float16 float16_t;
+float16_t a[N]; float16_t b[N];
+
+void initialize () {
+ uint16_t tmp_0[N] = {43883, 3213, 238, 275, };
+
+ for (int i = 0; i < N; ++i)
+ {
+ union { float16_t f16; uint16_t u16; } converter;
+ converter.u16 = tmp_0[i];
+ a[i] = converter.f16;
+ }
+
+ for (int i = 0; i < N; ++i)
+ b[i] = 0;
+}
+
+void compute ()
+{
+ int avl = N;
+ float16_t* ptr_a = a; float16_t* ptr_b = b;
+
+ for (size_t vl; avl > 0; avl -= vl)
+ {
+ vl = __riscv_vsetvl_e16m1(avl);
+ vfloat16m1_t va = __riscv_vle16_v_f16m1(ptr_a, vl);
+ va = __riscv_vfnmadd_vv_f16m1_rm(va, va, va, __RISCV_FRM_RDN, vl);
+ va = __riscv_vfmsac_vv_f16m1(va, va, va, vl);
+ __riscv_vse16_v_f16m1(ptr_b, va, vl);
+ ptr_a += vl; ptr_b += vl;
+ }
+}
+
+int main ()
+{
+ initialize();
+ compute();
+
+ short *tmp = (short *)b;
+
+ if (*tmp != -21862)
+ __builtin_abort ();
+
+ return 0;
+}
--
2.43.5

581
gcc15-pr118206.patch Normal file
View File

@ -0,0 +1,581 @@
2025-01-09 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/118206
* gimple-fold.cc (fold_truth_andor_for_ifcombine): Temporarily disable.
* fold-const.cc (decode_field_reference, all_ones_mask_p, unextend,
fold_truth_andor_1): Temporarily revert 2024-12-12 changes.
--- gcc/gimple-fold.cc.jj 2025-01-02 11:23:09.379616499 +0100
+++ gcc/gimple-fold.cc 2025-01-09 09:08:53.789628193 +0100
@@ -8037,7 +8037,8 @@ fold_truth_andor_for_ifcombine (enum tre
it were surrounded with a NE_EXPR. */
if (TREE_CODE_CLASS (lcode) != tcc_comparison
- || TREE_CODE_CLASS (rcode) != tcc_comparison)
+ || TREE_CODE_CLASS (rcode) != tcc_comparison
+ || 1)
return 0;
/* We don't normally find TRUTH_*IF_EXPR in gimple, but these codes may be
--- gcc/fold-const.cc.jj
+++ gcc/fold-const.cc
@@ -137,6 +137,7 @@ static tree range_successor (tree);
static tree fold_range_test (location_t, enum tree_code, tree, tree, tree);
static tree fold_cond_expr_with_comparison (location_t, tree, enum tree_code,
tree, tree, tree, tree);
+static tree unextend (tree, int, int, tree);
static tree extract_muldiv (tree, tree, enum tree_code, tree, bool *);
static tree extract_muldiv_1 (tree, tree, enum tree_code, tree, bool *);
static tree fold_binary_op_with_conditional_arg (location_t,
@@ -5021,6 +5022,136 @@ optimize_bit_field_compare (location_t loc, enum tree_code code,
return lhs;
}
+/* Subroutine for fold_truth_andor_1: decode a field reference.
+
+ If EXP is a comparison reference, we return the innermost reference.
+
+ *PBITSIZE is set to the number of bits in the reference, *PBITPOS is
+ set to the starting bit number.
+
+ If the innermost field can be completely contained in a mode-sized
+ unit, *PMODE is set to that mode. Otherwise, it is set to VOIDmode.
+
+ *PVOLATILEP is set to 1 if the any expression encountered is volatile;
+ otherwise it is not changed.
+
+ *PUNSIGNEDP is set to the signedness of the field.
+
+ *PREVERSEP is set to the storage order of the field.
+
+ *PMASK is set to the mask used. This is either contained in a
+ BIT_AND_EXPR or derived from the width of the field.
+
+ *PAND_MASK is set to the mask found in a BIT_AND_EXPR, if any.
+
+ Return 0 if this is not a component reference or is one that we can't
+ do anything with. */
+
+static tree
+decode_field_reference (location_t loc, tree *exp_, HOST_WIDE_INT *pbitsize,
+ HOST_WIDE_INT *pbitpos, machine_mode *pmode,
+ int *punsignedp, int *preversep, int *pvolatilep,
+ tree *pmask, tree *pand_mask)
+{
+ tree exp = *exp_;
+ tree outer_type = 0;
+ tree and_mask = 0;
+ tree mask, inner, offset;
+ tree unsigned_type;
+ unsigned int precision;
+
+ /* All the optimizations using this function assume integer fields.
+ There are problems with FP fields since the type_for_size call
+ below can fail for, e.g., XFmode. */
+ if (! INTEGRAL_TYPE_P (TREE_TYPE (exp)))
+ return NULL_TREE;
+
+ /* We are interested in the bare arrangement of bits, so strip everything
+ that doesn't affect the machine mode. However, record the type of the
+ outermost expression if it may matter below. */
+ if (CONVERT_EXPR_P (exp)
+ || TREE_CODE (exp) == NON_LVALUE_EXPR)
+ outer_type = TREE_TYPE (exp);
+ STRIP_NOPS (exp);
+
+ if (TREE_CODE (exp) == BIT_AND_EXPR)
+ {
+ and_mask = TREE_OPERAND (exp, 1);
+ exp = TREE_OPERAND (exp, 0);
+ STRIP_NOPS (exp); STRIP_NOPS (and_mask);
+ if (TREE_CODE (and_mask) != INTEGER_CST)
+ return NULL_TREE;
+ }
+
+ poly_int64 poly_bitsize, poly_bitpos;
+ inner = get_inner_reference (exp, &poly_bitsize, &poly_bitpos, &offset,
+ pmode, punsignedp, preversep, pvolatilep);
+ if ((inner == exp && and_mask == 0)
+ || !poly_bitsize.is_constant (pbitsize)
+ || !poly_bitpos.is_constant (pbitpos)
+ || *pbitsize < 0
+ || offset != 0
+ || TREE_CODE (inner) == PLACEHOLDER_EXPR
+ /* We eventually want to build a larger reference and need to take
+ the address of this. */
+ || (!REFERENCE_CLASS_P (inner) && !DECL_P (inner))
+ /* Reject out-of-bound accesses (PR79731). */
+ || (! AGGREGATE_TYPE_P (TREE_TYPE (inner))
+ && compare_tree_int (TYPE_SIZE (TREE_TYPE (inner)),
+ *pbitpos + *pbitsize) < 0))
+ return NULL_TREE;
+
+ unsigned_type = lang_hooks.types.type_for_size (*pbitsize, 1);
+ if (unsigned_type == NULL_TREE)
+ return NULL_TREE;
+
+ *exp_ = exp;
+
+ /* If the number of bits in the reference is the same as the bitsize of
+ the outer type, then the outer type gives the signedness. Otherwise
+ (in case of a small bitfield) the signedness is unchanged. */
+ if (outer_type && *pbitsize == TYPE_PRECISION (outer_type))
+ *punsignedp = TYPE_UNSIGNED (outer_type);
+
+ /* Compute the mask to access the bitfield. */
+ precision = TYPE_PRECISION (unsigned_type);
+
+ mask = build_int_cst_type (unsigned_type, -1);
+
+ mask = const_binop (LSHIFT_EXPR, mask, size_int (precision - *pbitsize));
+ mask = const_binop (RSHIFT_EXPR, mask, size_int (precision - *pbitsize));
+
+ /* Merge it with the mask we found in the BIT_AND_EXPR, if any. */
+ if (and_mask != 0)
+ mask = fold_build2_loc (loc, BIT_AND_EXPR, unsigned_type,
+ fold_convert_loc (loc, unsigned_type, and_mask), mask);
+
+ *pmask = mask;
+ *pand_mask = and_mask;
+ return inner;
+}
+
+/* Return nonzero if MASK represents a mask of SIZE ones in the low-order
+ bit positions and MASK is SIGNED. */
+
+static bool
+all_ones_mask_p (const_tree mask, unsigned int size)
+{
+ tree type = TREE_TYPE (mask);
+ unsigned int precision = TYPE_PRECISION (type);
+
+ /* If this function returns true when the type of the mask is
+ UNSIGNED, then there will be errors. In particular see
+ gcc.c-torture/execute/990326-1.c. There does not appear to be
+ any documentation paper trail as to why this is so. But the pre
+ wide-int worked with that restriction and it has been preserved
+ here. */
+ if (size > precision || TYPE_SIGN (type) == UNSIGNED)
+ return false;
+
+ return wi::mask (size, false, precision) == wi::to_wide (mask);
+}
+
/* Subroutine for fold: determine if VAL is the INTEGER_CONST that
represents the sign bit of EXP's type. If EXP represents a sign
or zero extension, also test VAL against the unextended type.
@@ -6330,6 +6461,48 @@ fold_range_test (location_t loc, enum tree_code code, tree type,
return 0;
}
+/* Subroutine for fold_truth_andor_1: C is an INTEGER_CST interpreted as a P
+ bit value. Arrange things so the extra bits will be set to zero if and
+ only if C is signed-extended to its full width. If MASK is nonzero,
+ it is an INTEGER_CST that should be AND'ed with the extra bits. */
+
+static tree
+unextend (tree c, int p, int unsignedp, tree mask)
+{
+ tree type = TREE_TYPE (c);
+ int modesize = GET_MODE_BITSIZE (SCALAR_INT_TYPE_MODE (type));
+ tree temp;
+
+ if (p == modesize || unsignedp)
+ return c;
+
+ /* We work by getting just the sign bit into the low-order bit, then
+ into the high-order bit, then sign-extend. We then XOR that value
+ with C. */
+ temp = build_int_cst (TREE_TYPE (c),
+ wi::extract_uhwi (wi::to_wide (c), p - 1, 1));
+
+ /* We must use a signed type in order to get an arithmetic right shift.
+ However, we must also avoid introducing accidental overflows, so that
+ a subsequent call to integer_zerop will work. Hence we must
+ do the type conversion here. At this point, the constant is either
+ zero or one, and the conversion to a signed type can never overflow.
+ We could get an overflow if this conversion is done anywhere else. */
+ if (TYPE_UNSIGNED (type))
+ temp = fold_convert (signed_type_for (type), temp);
+
+ temp = const_binop (LSHIFT_EXPR, temp, size_int (modesize - 1));
+ temp = const_binop (RSHIFT_EXPR, temp, size_int (modesize - p - 1));
+ if (mask != 0)
+ temp = const_binop (BIT_AND_EXPR, temp,
+ fold_convert (TREE_TYPE (c), mask));
+ /* If necessary, convert the type back to match the type of C. */
+ if (TYPE_UNSIGNED (type))
+ temp = fold_convert (type, temp);
+
+ return fold_convert (type, const_binop (BIT_XOR_EXPR, c, temp));
+}
+
/* For an expression that has the form
(A && B) || ~B
or
@@ -6400,13 +6573,20 @@ merge_truthop_with_opposite_arm (location_t loc, tree op, tree cmpop,
lhs, rhs);
return NULL_TREE;
}
-
+
/* Find ways of folding logical expressions of LHS and RHS:
Try to merge two comparisons to the same innermost item.
Look for range tests like "ch >= '0' && ch <= '9'".
Look for combinations of simple terms on machines with expensive branches
and evaluate the RHS unconditionally.
+ For example, if we have p->a == 2 && p->b == 4 and we can make an
+ object large enough to span both A and B, we can do this with a comparison
+ against the object ANDed with the a mask.
+
+ If we have p->a == q->a && p->b == q->b, we may be able to use bit masking
+ operations to do this with one comparison.
+
We check for both normal comparisons and the BIT_AND_EXPRs made this by
function and the one above.
@@ -6431,9 +6611,24 @@ fold_truth_andor_1 (location_t loc, enum tree_code code, tree truth_type,
convert EQ_EXPR to NE_EXPR so we need not reject the "wrong"
comparison for one-bit fields. */
+ enum tree_code wanted_code;
enum tree_code lcode, rcode;
tree ll_arg, lr_arg, rl_arg, rr_arg;
- tree result;
+ tree ll_inner, lr_inner, rl_inner, rr_inner;
+ HOST_WIDE_INT ll_bitsize, ll_bitpos, lr_bitsize, lr_bitpos;
+ HOST_WIDE_INT rl_bitsize, rl_bitpos, rr_bitsize, rr_bitpos;
+ HOST_WIDE_INT xll_bitpos, xlr_bitpos, xrl_bitpos, xrr_bitpos;
+ HOST_WIDE_INT lnbitsize, lnbitpos, rnbitsize, rnbitpos;
+ int ll_unsignedp, lr_unsignedp, rl_unsignedp, rr_unsignedp;
+ int ll_reversep, lr_reversep, rl_reversep, rr_reversep;
+ machine_mode ll_mode, lr_mode, rl_mode, rr_mode;
+ scalar_int_mode lnmode, rnmode;
+ tree ll_mask, lr_mask, rl_mask, rr_mask;
+ tree ll_and_mask, lr_and_mask, rl_and_mask, rr_and_mask;
+ tree l_const, r_const;
+ tree lntype, rntype, result;
+ HOST_WIDE_INT first_bit, end_bit;
+ int volatilep;
/* Start by getting the comparison codes. Fail if anything is volatile.
If one operand is a BIT_AND_EXPR with the constant one, treat it as if
@@ -6528,7 +6723,316 @@ fold_truth_andor_1 (location_t loc, enum tree_code code, tree truth_type,
build_int_cst (TREE_TYPE (ll_arg), 0));
}
- return 0;
+ /* See if the comparisons can be merged. Then get all the parameters for
+ each side. */
+
+ if ((lcode != EQ_EXPR && lcode != NE_EXPR)
+ || (rcode != EQ_EXPR && rcode != NE_EXPR))
+ return 0;
+
+ ll_reversep = lr_reversep = rl_reversep = rr_reversep = 0;
+ volatilep = 0;
+ ll_inner = decode_field_reference (loc, &ll_arg,
+ &ll_bitsize, &ll_bitpos, &ll_mode,
+ &ll_unsignedp, &ll_reversep, &volatilep,
+ &ll_mask, &ll_and_mask);
+ lr_inner = decode_field_reference (loc, &lr_arg,
+ &lr_bitsize, &lr_bitpos, &lr_mode,
+ &lr_unsignedp, &lr_reversep, &volatilep,
+ &lr_mask, &lr_and_mask);
+ rl_inner = decode_field_reference (loc, &rl_arg,
+ &rl_bitsize, &rl_bitpos, &rl_mode,
+ &rl_unsignedp, &rl_reversep, &volatilep,
+ &rl_mask, &rl_and_mask);
+ rr_inner = decode_field_reference (loc, &rr_arg,
+ &rr_bitsize, &rr_bitpos, &rr_mode,
+ &rr_unsignedp, &rr_reversep, &volatilep,
+ &rr_mask, &rr_and_mask);
+
+ /* It must be true that the inner operation on the lhs of each
+ comparison must be the same if we are to be able to do anything.
+ Then see if we have constants. If not, the same must be true for
+ the rhs's. */
+ if (volatilep
+ || ll_reversep != rl_reversep
+ || ll_inner == 0 || rl_inner == 0
+ || ! operand_equal_p (ll_inner, rl_inner, 0))
+ return 0;
+
+ if (TREE_CODE (lr_arg) == INTEGER_CST
+ && TREE_CODE (rr_arg) == INTEGER_CST)
+ {
+ l_const = lr_arg, r_const = rr_arg;
+ lr_reversep = ll_reversep;
+ }
+ else if (lr_reversep != rr_reversep
+ || lr_inner == 0 || rr_inner == 0
+ || ! operand_equal_p (lr_inner, rr_inner, 0))
+ return 0;
+ else
+ l_const = r_const = 0;
+
+ /* If either comparison code is not correct for our logical operation,
+ fail. However, we can convert a one-bit comparison against zero into
+ the opposite comparison against that bit being set in the field. */
+
+ wanted_code = (code == TRUTH_AND_EXPR ? EQ_EXPR : NE_EXPR);
+ if (lcode != wanted_code)
+ {
+ if (l_const && integer_zerop (l_const) && integer_pow2p (ll_mask))
+ {
+ /* Make the left operand unsigned, since we are only interested
+ in the value of one bit. Otherwise we are doing the wrong
+ thing below. */
+ ll_unsignedp = 1;
+ l_const = ll_mask;
+ }
+ else
+ return 0;
+ }
+
+ /* This is analogous to the code for l_const above. */
+ if (rcode != wanted_code)
+ {
+ if (r_const && integer_zerop (r_const) && integer_pow2p (rl_mask))
+ {
+ rl_unsignedp = 1;
+ r_const = rl_mask;
+ }
+ else
+ return 0;
+ }
+
+ /* See if we can find a mode that contains both fields being compared on
+ the left. If we can't, fail. Otherwise, update all constants and masks
+ to be relative to a field of that size. */
+ first_bit = MIN (ll_bitpos, rl_bitpos);
+ end_bit = MAX (ll_bitpos + ll_bitsize, rl_bitpos + rl_bitsize);
+ if (!get_best_mode (end_bit - first_bit, first_bit, 0, 0,
+ TYPE_ALIGN (TREE_TYPE (ll_inner)), BITS_PER_WORD,
+ volatilep, &lnmode))
+ return 0;
+
+ lnbitsize = GET_MODE_BITSIZE (lnmode);
+ lnbitpos = first_bit & ~ (lnbitsize - 1);
+ lntype = lang_hooks.types.type_for_size (lnbitsize, 1);
+ xll_bitpos = ll_bitpos - lnbitpos, xrl_bitpos = rl_bitpos - lnbitpos;
+
+ if (ll_reversep ? !BYTES_BIG_ENDIAN : BYTES_BIG_ENDIAN)
+ {
+ xll_bitpos = lnbitsize - xll_bitpos - ll_bitsize;
+ xrl_bitpos = lnbitsize - xrl_bitpos - rl_bitsize;
+ }
+
+ ll_mask = const_binop (LSHIFT_EXPR, fold_convert_loc (loc, lntype, ll_mask),
+ size_int (xll_bitpos));
+ rl_mask = const_binop (LSHIFT_EXPR, fold_convert_loc (loc, lntype, rl_mask),
+ size_int (xrl_bitpos));
+ if (ll_mask == NULL_TREE || rl_mask == NULL_TREE)
+ return 0;
+
+ if (l_const)
+ {
+ l_const = fold_convert_loc (loc, lntype, l_const);
+ l_const = unextend (l_const, ll_bitsize, ll_unsignedp, ll_and_mask);
+ l_const = const_binop (LSHIFT_EXPR, l_const, size_int (xll_bitpos));
+ if (l_const == NULL_TREE)
+ return 0;
+ if (! integer_zerop (const_binop (BIT_AND_EXPR, l_const,
+ fold_build1_loc (loc, BIT_NOT_EXPR,
+ lntype, ll_mask))))
+ {
+ warning (0, "comparison is always %d", wanted_code == NE_EXPR);
+
+ return constant_boolean_node (wanted_code == NE_EXPR, truth_type);
+ }
+ }
+ if (r_const)
+ {
+ r_const = fold_convert_loc (loc, lntype, r_const);
+ r_const = unextend (r_const, rl_bitsize, rl_unsignedp, rl_and_mask);
+ r_const = const_binop (LSHIFT_EXPR, r_const, size_int (xrl_bitpos));
+ if (r_const == NULL_TREE)
+ return 0;
+ if (! integer_zerop (const_binop (BIT_AND_EXPR, r_const,
+ fold_build1_loc (loc, BIT_NOT_EXPR,
+ lntype, rl_mask))))
+ {
+ warning (0, "comparison is always %d", wanted_code == NE_EXPR);
+
+ return constant_boolean_node (wanted_code == NE_EXPR, truth_type);
+ }
+ }
+
+ /* If the right sides are not constant, do the same for it. Also,
+ disallow this optimization if a size, signedness or storage order
+ mismatch occurs between the left and right sides. */
+ if (l_const == 0)
+ {
+ if (ll_bitsize != lr_bitsize || rl_bitsize != rr_bitsize
+ || ll_unsignedp != lr_unsignedp || rl_unsignedp != rr_unsignedp
+ || ll_reversep != lr_reversep
+ /* Make sure the two fields on the right
+ correspond to the left without being swapped. */
+ || ll_bitpos - rl_bitpos != lr_bitpos - rr_bitpos)
+ return 0;
+
+ first_bit = MIN (lr_bitpos, rr_bitpos);
+ end_bit = MAX (lr_bitpos + lr_bitsize, rr_bitpos + rr_bitsize);
+ if (!get_best_mode (end_bit - first_bit, first_bit, 0, 0,
+ TYPE_ALIGN (TREE_TYPE (lr_inner)), BITS_PER_WORD,
+ volatilep, &rnmode))
+ return 0;
+
+ rnbitsize = GET_MODE_BITSIZE (rnmode);
+ rnbitpos = first_bit & ~ (rnbitsize - 1);
+ rntype = lang_hooks.types.type_for_size (rnbitsize, 1);
+ xlr_bitpos = lr_bitpos - rnbitpos, xrr_bitpos = rr_bitpos - rnbitpos;
+
+ if (lr_reversep ? !BYTES_BIG_ENDIAN : BYTES_BIG_ENDIAN)
+ {
+ xlr_bitpos = rnbitsize - xlr_bitpos - lr_bitsize;
+ xrr_bitpos = rnbitsize - xrr_bitpos - rr_bitsize;
+ }
+
+ lr_mask = const_binop (LSHIFT_EXPR, fold_convert_loc (loc,
+ rntype, lr_mask),
+ size_int (xlr_bitpos));
+ rr_mask = const_binop (LSHIFT_EXPR, fold_convert_loc (loc,
+ rntype, rr_mask),
+ size_int (xrr_bitpos));
+ if (lr_mask == NULL_TREE || rr_mask == NULL_TREE)
+ return 0;
+
+ /* Make a mask that corresponds to both fields being compared.
+ Do this for both items being compared. If the operands are the
+ same size and the bits being compared are in the same position
+ then we can do this by masking both and comparing the masked
+ results. */
+ ll_mask = const_binop (BIT_IOR_EXPR, ll_mask, rl_mask);
+ lr_mask = const_binop (BIT_IOR_EXPR, lr_mask, rr_mask);
+ if (lnbitsize == rnbitsize
+ && xll_bitpos == xlr_bitpos
+ && lnbitpos >= 0
+ && rnbitpos >= 0)
+ {
+ lhs = make_bit_field_ref (loc, ll_inner, ll_arg,
+ lntype, lnbitsize, lnbitpos,
+ ll_unsignedp || rl_unsignedp, ll_reversep);
+ if (! all_ones_mask_p (ll_mask, lnbitsize))
+ lhs = build2 (BIT_AND_EXPR, lntype, lhs, ll_mask);
+
+ rhs = make_bit_field_ref (loc, lr_inner, lr_arg,
+ rntype, rnbitsize, rnbitpos,
+ lr_unsignedp || rr_unsignedp, lr_reversep);
+ if (! all_ones_mask_p (lr_mask, rnbitsize))
+ rhs = build2 (BIT_AND_EXPR, rntype, rhs, lr_mask);
+
+ return build2_loc (loc, wanted_code, truth_type, lhs, rhs);
+ }
+
+ /* There is still another way we can do something: If both pairs of
+ fields being compared are adjacent, we may be able to make a wider
+ field containing them both.
+
+ Note that we still must mask the lhs/rhs expressions. Furthermore,
+ the mask must be shifted to account for the shift done by
+ make_bit_field_ref. */
+ if (((ll_bitsize + ll_bitpos == rl_bitpos
+ && lr_bitsize + lr_bitpos == rr_bitpos)
+ || (ll_bitpos == rl_bitpos + rl_bitsize
+ && lr_bitpos == rr_bitpos + rr_bitsize))
+ && ll_bitpos >= 0
+ && rl_bitpos >= 0
+ && lr_bitpos >= 0
+ && rr_bitpos >= 0)
+ {
+ tree type;
+
+ lhs = make_bit_field_ref (loc, ll_inner, ll_arg, lntype,
+ ll_bitsize + rl_bitsize,
+ MIN (ll_bitpos, rl_bitpos),
+ ll_unsignedp, ll_reversep);
+ rhs = make_bit_field_ref (loc, lr_inner, lr_arg, rntype,
+ lr_bitsize + rr_bitsize,
+ MIN (lr_bitpos, rr_bitpos),
+ lr_unsignedp, lr_reversep);
+
+ ll_mask = const_binop (RSHIFT_EXPR, ll_mask,
+ size_int (MIN (xll_bitpos, xrl_bitpos)));
+ lr_mask = const_binop (RSHIFT_EXPR, lr_mask,
+ size_int (MIN (xlr_bitpos, xrr_bitpos)));
+ if (ll_mask == NULL_TREE || lr_mask == NULL_TREE)
+ return 0;
+
+ /* Convert to the smaller type before masking out unwanted bits. */
+ type = lntype;
+ if (lntype != rntype)
+ {
+ if (lnbitsize > rnbitsize)
+ {
+ lhs = fold_convert_loc (loc, rntype, lhs);
+ ll_mask = fold_convert_loc (loc, rntype, ll_mask);
+ type = rntype;
+ }
+ else if (lnbitsize < rnbitsize)
+ {
+ rhs = fold_convert_loc (loc, lntype, rhs);
+ lr_mask = fold_convert_loc (loc, lntype, lr_mask);
+ type = lntype;
+ }
+ }
+
+ if (! all_ones_mask_p (ll_mask, ll_bitsize + rl_bitsize))
+ lhs = build2 (BIT_AND_EXPR, type, lhs, ll_mask);
+
+ if (! all_ones_mask_p (lr_mask, lr_bitsize + rr_bitsize))
+ rhs = build2 (BIT_AND_EXPR, type, rhs, lr_mask);
+
+ return build2_loc (loc, wanted_code, truth_type, lhs, rhs);
+ }
+
+ return 0;
+ }
+
+ /* Handle the case of comparisons with constants. If there is something in
+ common between the masks, those bits of the constants must be the same.
+ If not, the condition is always false. Test for this to avoid generating
+ incorrect code below. */
+ result = const_binop (BIT_AND_EXPR, ll_mask, rl_mask);
+ if (! integer_zerop (result)
+ && simple_cst_equal (const_binop (BIT_AND_EXPR, result, l_const),
+ const_binop (BIT_AND_EXPR, result, r_const)) != 1)
+ {
+ if (wanted_code == NE_EXPR)
+ {
+ warning (0, "%<or%> of unmatched not-equal tests is always 1");
+ return constant_boolean_node (true, truth_type);
+ }
+ else
+ {
+ warning (0, "%<and%> of mutually exclusive equal-tests is always 0");
+ return constant_boolean_node (false, truth_type);
+ }
+ }
+
+ if (lnbitpos < 0)
+ return 0;
+
+ /* Construct the expression we will return. First get the component
+ reference we will make. Unless the mask is all ones the width of
+ that field, perform the mask operation. Then compare with the
+ merged constant. */
+ result = make_bit_field_ref (loc, ll_inner, ll_arg,
+ lntype, lnbitsize, lnbitpos,
+ ll_unsignedp || rl_unsignedp, ll_reversep);
+
+ ll_mask = const_binop (BIT_IOR_EXPR, ll_mask, rl_mask);
+ if (! all_ones_mask_p (ll_mask, lnbitsize))
+ result = build2_loc (loc, BIT_AND_EXPR, lntype, result, ll_mask);
+
+ return build2_loc (loc, wanted_code, truth_type, result,
+ const_binop (BIT_IOR_EXPR, l_const, r_const));
}
/* T is an integer expression that is being multiplied, divided, or taken a

View File

@ -1,4 +1,4 @@
SHA512 (gcc-14.0.1-20240411.tar.xz) = aa7a43ed6ee1149530edc10cb14cbc7402f61d6165aa1ee89366cc6235dc9327a7a1201b3f0024a7d77e946ba095504f4d69c4abbf59de9d3abf3459298f05c9
SHA512 (gcc-15.0.1-20250125.tar.xz) = 5ee2c0a48d740a90ad102b4d4f4e5b51929e57816099d3eb41ab26bc6991fa144b7f1fca81584bad5b7b819687b2bd3c9b51472ba8cb0a2c03d585653458a28e
SHA512 (isl-0.24.tar.bz2) = aab3bddbda96b801d0f56d2869f943157aad52a6f6e6a61745edd740234c635c38231af20bc3f1a08d416a5e973a90e18249078ed8e4ae2f1d5de57658738e95
SHA512 (newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed.tar.xz) = 31bfc19429797236e268e22b752c5abeabb9c0f39b1058634af8dab329b4f028fc72a35888193c9575f6cee5cf2c069669d79fcb4d4e3a4318f57413452f707d
SHA512 (nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6.tar.xz) = 8a5c282852c995fabf75a8d6331db807a1acd935fd82022e00801b798fb850392d03e29cfa4aa7e3d5cfd8f48510e5e25b79a647fbec79c8566792584a0c1c49
SHA512 (newlib-cygwin-2e4db338ac125579d555aeee516e48588a628a16.tar.xz) = 839bb0c45b5023a83e1a5bf8773050af46bd075754502fc49a62ab860144c9a6bdc0a7d52e6c7ded87ba13ce58192755dd3f83333bc7c61ffb184fef4142a808
SHA512 (nvptx-tools-87ce9dc5999e5fca2e1d3478a30888d9864c9804.tar.xz) = 941e763af8601b89f0e4ec48a2d68ae0a8e70ee1e6ba6859394b021ad7bd7d143cc529f3c35c08d7f84e5554980ddcc97cf05b6c4755c2bc36c91161b79e8cea

View File

@ -1,7 +1,36 @@
#!/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
if [ "$#" -eq 0 ]; then
echo "Usage: ./update-gcc.sh gcc/redhat/heads/gcc-NN-branch_commit_hash [git_reference_dir_to_speed_up]"
exit 1
fi
export LC_ALL=C
if ! [ -f gcc.spec ]; then echo Must be run in the directory with gcc.spec file.; exit 1; fi
if [ -d gcc-dir.tmp ]; then echo gcc-dir.tmp already exists.; exit 1; fi
v=`sed -n 's/^%global gcc_version //p' gcc.spec`
p=`sed -n 's/^%global gitrev //p' gcc.spec`
h=$1
if [ "$#" -ge 2 ]; then
git clone --dissociate --reference $2 https://gcc.gnu.org/git/gcc.git gcc-dir.tmp
else
git clone https://gcc.gnu.org/git/gcc.git gcc-dir.tmp
fi
git --git-dir=gcc-dir.tmp/.git fetch origin $h
d=`date --iso | sed 's/-//g'`
git --git-dir=gcc-dir.tmp/.git archive --prefix=gcc-14.0.1-$d/ $1 | xz -9e > gcc-14.0.1-$d.tar.xz
cd gcc-dir.tmp
git diff $p..$h > P1
git log --format=%B `git log --format='%ae %H' $p..$h | awk '/^gccadmin@gcc.gnu.org/{print $2;exit 0}'`..$h > P2
diff -up /dev/null P2 >> P1
sed -n 's,^+[[:blank:]]\+PR \([a-z0-9+-]\+/[0-9]\+\)$,\1,p' P1 | sed 's/ - .*$//;s/[: ;.]//g' | LC_ALL=C sort -u -t / -k 1,1 -k 2,2n > P3
> P4
for i in `cat P3`; do if grep -F $i ../gcc.spec >/dev/null; then echo $i already recorded.; else echo $i >> P4; fi; done
case "$v" in
*.0.*) echo "- update from trunk" > P5;;
*) echo "- update from releases/gcc-`echo $v | sed 's/\..*$//'` branch" > P5;;
esac
echo `cat P4` | sed 's/ /, /g' | fold -w 71 -s | sed '1s/^/ - PRs /;2,$s/^/ /;s/, $/,/' >> P5
echo >> P5
cd ..
sed -i -e '/^%global gitrev /s/ [0-9a-f]\+$/ '$h'/;/^%global DATE /s/ [0-9]\+$/ '$d'/;/^%changelog$/r gcc-dir.tmp/P5' gcc.spec
git --git-dir=gcc-dir.tmp/.git archive --prefix=gcc-$v-$d/ $h | xz -9e > gcc-$v-$d.tar.xz
rm -rf gcc-dir.tmp
fedpkg new-sources gcc-$v-$d.tar.xz `sed 's/SHA512 (\(.*\)) = [0-9a-f]\+$/\1/' sources | grep -v '^gcc-'`