From 8f8d2ea9c326784bce044ff86547107611dda338 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 18 Dec 2025 17:22:02 +0100 Subject: [PATCH 01/12] 16.0.0-0.2 --- .gitignore | 1 + gcc.spec | 766 +++++------------- gcc15-libgomp-strchr.patch | 15 - ...y.patch => gcc16-Wno-format-security.patch | 8 +- ...os.patch => gcc16-d-shared-libphobos.patch | 0 ...tch => gcc16-fortran-fdec-duplicates.patch | 0 gcc15-hack.patch => gcc16-hack.patch | 0 gcc15-isl-dl.patch => gcc16-isl-dl.patch | 0 gcc15-isl-dl2.patch => gcc16-isl-dl2.patch | 0 gcc16-libgomp-build.patch | 17 + ...atch => gcc16-libgomp-omp_h-multilib.patch | 0 ...+-docs.patch => gcc16-libstdc++-docs.patch | 4 +- ...path.patch => gcc16-libtool-no-rpath.patch | 0 ...-needed.patch => gcc16-no-add-needed.patch | 2 +- gcc15-pr119006.patch => gcc16-pr119006.patch | 0 gcc16-pr123114.patch | 46 ++ gcc16-pr123115.patch | 17 + gcc16-pr123152.patch | 157 ++++ ...5-rh1574936.patch => gcc16-rh1574936.patch | 0 ...atch => gcc16-sparc-config-detection.patch | 0 sources | 2 +- 21 files changed, 443 insertions(+), 592 deletions(-) delete mode 100644 gcc15-libgomp-strchr.patch rename gcc15-Wno-format-security.patch => gcc16-Wno-format-security.patch (89%) rename gcc15-d-shared-libphobos.patch => gcc16-d-shared-libphobos.patch (100%) rename gcc15-fortran-fdec-duplicates.patch => gcc16-fortran-fdec-duplicates.patch (100%) rename gcc15-hack.patch => gcc16-hack.patch (100%) rename gcc15-isl-dl.patch => gcc16-isl-dl.patch (100%) rename gcc15-isl-dl2.patch => gcc16-isl-dl2.patch (100%) create mode 100644 gcc16-libgomp-build.patch rename gcc15-libgomp-omp_h-multilib.patch => gcc16-libgomp-omp_h-multilib.patch (100%) rename gcc15-libstdc++-docs.patch => gcc16-libstdc++-docs.patch (96%) rename gcc15-libtool-no-rpath.patch => gcc16-libtool-no-rpath.patch (100%) rename gcc15-no-add-needed.patch => gcc16-no-add-needed.patch (96%) rename gcc15-pr119006.patch => gcc16-pr119006.patch (100%) create mode 100644 gcc16-pr123114.patch create mode 100644 gcc16-pr123115.patch create mode 100644 gcc16-pr123152.patch rename gcc15-rh1574936.patch => gcc16-rh1574936.patch (100%) rename gcc15-sparc-config-detection.patch => gcc16-sparc-config-detection.patch (100%) diff --git a/.gitignore b/.gitignore index 02ae8bb..02b5869 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ /gcc-15.2.1-20251022.tar.xz /gcc-15.2.1-20251111.tar.xz /gcc-15.2.1-20251211.tar.xz +/gcc-16.0.0-20251218.tar.xz diff --git a/gcc.spec b/gcc.spec index 8624697..c1ba99a 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,10 +1,10 @@ -%global DATE 20251211 -%global gitrev 3c2c408e5ef993f208fbdcbd39b01717ab15be80 -%global gcc_version 15.2.1 -%global gcc_major 15 +%global DATE 20251218 +%global gitrev f73d23f06a1b8aa7cdce95a6092c0ce0f5650a00 +%global gcc_version 16.0.0 +%global gcc_major 16 # Note, gcc_release must be integer, if you want to add suffixes to # %%{release}, append them after %%{gcc_release} on Release: line. -%global gcc_release 5 +%global gcc_release 0 %global nvptx_tools_gitrev a0c1fff6534a4df9fb17937c3c4a4b1071212029 %global newlib_cygwin_gitrev d35cc82b5ec15bb8a5fe0fe11e183d1887992e99 %global _unpackaged_files_terminate_build 0 @@ -45,6 +45,7 @@ %global build_d 0 %global build_m2 0 %global build_cobol 0 +%global build_algol68 0 %else %ifarch %{ix86} x86_64 ia64 ppc %{power64} alpha s390x %{arm} aarch64 riscv64 %global build_ada 1 @@ -67,11 +68,12 @@ %else %global build_m2 0 %endif -%ifarch x86_64 aarch64 +%ifarch x86_64 aarch64 ppc64le %global build_cobol 1 %else %global build_cobol 0 %endif +%global build_algol68 1 %endif %ifarch %{ix86} x86_64 ia64 ppc64le %global build_libquadmath 1 @@ -156,7 +158,7 @@ Summary: Various compilers (C, C++, Objective-C, ...) Name: gcc Version: %{gcc_version} -Release: %{gcc_release}%{?dist} +Release: %{gcc_release}.2%{?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 @@ -218,6 +220,9 @@ BuildRequires: gcc, gcc-c++, make %if %{build_go} BuildRequires: hostname, procps %endif +%if %{build_cobol} +BuildRequires: libxml2-devel +%endif # For VTA guality testing BuildRequires: gdb # Make sure pthread.h doesn't contain __thread tokens @@ -300,23 +305,26 @@ Provides: bundled(libbacktrace) Provides: bundled(libffi) Provides: gcc(major) = %{gcc_major} -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-pr119006.patch -Patch13: gcc15-libgomp-strchr.patch +Patch0: gcc16-hack.patch +Patch2: gcc16-sparc-config-detection.patch +Patch3: gcc16-libgomp-omp_h-multilib.patch +Patch4: gcc16-libtool-no-rpath.patch +Patch5: gcc16-isl-dl.patch +Patch6: gcc16-isl-dl2.patch +Patch7: gcc16-libstdc++-docs.patch +Patch8: gcc16-no-add-needed.patch +Patch9: gcc16-Wno-format-security.patch +Patch10: gcc16-rh1574936.patch +Patch11: gcc16-d-shared-libphobos.patch +Patch12: gcc16-pr119006.patch +Patch13: gcc16-pr123152.patch +Patch14: gcc16-pr123114.patch +Patch15: gcc16-pr123115.patch +Patch16: gcc16-libgomp-build.patch Patch50: isl-rh2155127.patch -Patch100: gcc15-fortran-fdec-duplicates.patch +Patch100: gcc16-fortran-fdec-duplicates.patch # On ARM EABI systems, we do want -gnueabi to be part of the # target triple. @@ -338,7 +346,7 @@ Patch100: gcc15-fortran-fdec-duplicates.patch %if %{build_go} # Avoid stripping these libraries and binaries. %global __os_install_post \ -chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.24.* \ +chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.25.* \ chmod 644 %{buildroot}%{_prefix}/bin/go.gcc \ chmod 644 %{buildroot}%{_prefix}/bin/gofmt.gcc \ chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cgo \ @@ -346,7 +354,7 @@ chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major} chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/test2json \ chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/vet \ %__os_install_post \ -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgo.so.24.* \ +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgo.so.25.* \ chmod 755 %{buildroot}%{_prefix}/bin/go.gcc \ chmod 755 %{buildroot}%{_prefix}/bin/gofmt.gcc \ chmod 755 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cgo \ @@ -588,15 +596,41 @@ Requires: gcc-gcobol = %{version}-%{release} %description -n libgcobol-static This package contains static COBOL libraries. +%package algol68 +Summary: Algol 68 support +Requires: gcc = %{version}-%{release} +Requires: libga68 = %{version}-%{release} +Autoreq: true + +%description algol68 +The gcc-algol68 package provides support for compiling Algol 68 +programs with the GNU Compiler Collection. + +%package -n libga68 +Summary: Algol 68 runtime +Autoreq: true + +%description -n libga68 +This package contains Algol 68 shared libraries which are needed to run +Algol 68 dynamically linked programs. + +%package -n libga68-static +Summary: Static Algol 68 libraries +Requires: libga68 = %{version}-%{release} +Requires: gcc-algol68 = %{version}-%{release} + +%description -n libga68-static +This package contains static Algol 68 libraries. + %package -n libgomp -Summary: GCC OpenMP v4.5 shared support library +Summary: GCC OpenMP v5.2 shared support library %description -n libgomp This package contains GCC shared support library which is needed -for OpenMP v4.5 support. +for OpenMP v5.2 support. %package -n libgomp-offload-nvptx -Summary: GCC OpenMP v4.5 plugin for offloading to NVPTX +Summary: GCC OpenMP v5.2 plugin for offloading to NVPTX Requires: libgomp = %{version}-%{release} %description -n libgomp-offload-nvptx @@ -605,7 +639,7 @@ PTX. The plugin needs libcuda.so.1 shared library that has to be installed separately. %package -n libgomp-offload-amdgcn -Summary: GCC OpenMP v4.5 plugin for offloading to AMD GCN +Summary: GCC OpenMP v5.2 plugin for offloading to AMD GCN Requires: libgomp = %{version}-%{release} %if 0%{?fedora:1} Requires: rocm-runtime >= 6.0.0 @@ -963,14 +997,12 @@ rm -f libphobos/testsuite/libphobos.gc/forkgc2.d echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE -cp -a libstdc++-v3/config/cpu/i{4,3}86/atomicity.h - ./contrib/gcc_update --touch LC_ALL=C sed -i -e 's/\xa0/ /' gcc/doc/options.texi sed -i -e 's/Common Driver Var(flag_report_bug)/& Init(1)/' gcc/common.opt -sed -i -e 's/m_report_bug = false;/m_report_bug = true;/' gcc/diagnostic.cc +sed -i -e 's/m_report_bug = false;/m_report_bug = true;/' gcc/diagnostics/context.cc %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then @@ -1133,6 +1165,7 @@ enablelobjc= enableld= enablelm2= enablelcob= +enablela68= %if %{build_objc} enablelobjc=,objc,obj-c++ %endif @@ -1151,6 +1184,9 @@ enablelm2=,m2 %if %{build_cobol} enablelcob=,cobol %endif +%if %{build_algol68} +enablela68=,algol68 +%endif offloadtgts= %if %{build_offload_nvptx} offloadtgts=nvptx-none @@ -1247,6 +1283,9 @@ CONFIGURE_OPTS="\ %ifarch %{ix86} x86_64 --enable-cet \ --with-tune=generic \ +%if 0%{?fedora} >= 44 || 0%{?rhel} >= 11 + --with-tls=gnu2 \ +%endif %endif %if 0%{?rhel} >= 7 %ifarch %{ix86} @@ -1339,7 +1378,7 @@ CC="$CC" CXX="$CXX" CFLAGS="$OPT_FLAGS" \ | sed 's/ -Wformat-security / -Wformat -Wformat-security /'`" \ XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \ ../configure --enable-bootstrap \ - --enable-languages=c,c++,fortran${enablelobjc}${enablelada}${enablelgo}${enableld}${enablelm2}${enablelcob},lto \ + --enable-languages=c,c++,fortran${enablelobjc}${enablelada}${enablelgo}${enableld}${enablelm2}${enablelcob}${enablela68},lto \ $CONFIGURE_OPTS %ifarch sparc sparcv9 sparc64 @@ -1395,7 +1434,7 @@ cd ../.. # Copy various doc files here and there cd .. -mkdir -p rpm.doc/{gfortran,objc,gdc,libphobos,gm2,libgm2,libgdiagnostics-devel,gcobol,libgcobol} +mkdir -p rpm.doc/{gfortran,objc,gdc,libphobos,gm2,libgm2,libgdiagnostics-devel,gcobol,libgcobol,algol68,libga68} 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} @@ -1439,6 +1478,14 @@ done) cp -p $i ../rpm.doc/libgcobol/$i.libgcobol done) %endif +%if %{build_algol68} +(cd gcc/algol68; for i in ChangeLog*; do + cp -p $i ../../rpm.doc/algol68/$i.algol68 +done) +(cd libga68; for i in ChangeLog*; do + cp -p $i ../rpm.doc/libga68/$i.libga68 +done) +%endif %if %{build_libquadmath} (cd libquadmath; for i in ChangeLog* COPYING.LIB; do cp -p $i ../rpm.doc/libquadmath/$i.libquadmath @@ -1697,6 +1744,9 @@ mv %{buildroot}%{_prefix}/%{_lib}/libsanitizer.spec $FULLPATH/ %if %{build_cobol} mv %{buildroot}%{_prefix}/%{_lib}/libgcobol.spec $FULLPATH/ %endif +%if %{build_algol68} +mv %{buildroot}%{_prefix}/%{_lib}/libga68.spec $FULLPATH/ +%endif mkdir -p %{buildroot}/%{_lib} mv -f %{buildroot}%{_prefix}/%{_lib}/libgcc_s.so.1 %{buildroot}/%{_lib}/libgcc_s-%{gcc_major}-%{DATE}.so.1 @@ -1782,7 +1832,7 @@ ln -sf ../../../libstdc++.so.6.*[0-9] libstdc++.so ln -sf ../../../libgfortran.so.5.* libgfortran.so ln -sf ../../../libgomp.so.1.* libgomp.so %if %{build_go} -ln -sf ../../../libgo.so.24.* libgo.so +ln -sf ../../../libgo.so.25.* libgo.so %endif %if %{build_libquadmath} ln -sf ../../../libquadmath.so.0.* libquadmath.so @@ -1793,11 +1843,14 @@ 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.20.* libm2$i.so + ln -sf ../../../libm2$i.so.21.* libm2$i.so done %endif %if %{build_cobol} -ln -sf ../../../libgcobol.so.1.* libgcobol.so +ln -sf ../../../libgcobol.so.2.* libgcobol.so +%endif +%if %{build_algol68} +ln -sf ../../../libga68.so.2.* libga68.so %endif %if %{build_libitm} ln -sf ../../../libitm.so.1.* libitm.so @@ -1820,7 +1873,7 @@ ln -sf ../../../../%{_lib}/libstdc++.so.6.*[0-9] libstdc++.so ln -sf ../../../../%{_lib}/libgfortran.so.5.* libgfortran.so ln -sf ../../../../%{_lib}/libgomp.so.1.* libgomp.so %if %{build_go} -ln -sf ../../../../%{_lib}/libgo.so.24.* libgo.so +ln -sf ../../../../%{_lib}/libgo.so.25.* libgo.so %endif %if %{build_libquadmath} ln -sf ../../../../%{_lib}/libquadmath.so.0.* libquadmath.so @@ -1831,11 +1884,14 @@ 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.20.* libm2$i.so + ln -sf ../../../../%{_lib}/libm2$i.so.21.* libm2$i.so done %endif %if %{build_cobol} -ln -sf ../../../../%{_lib}/libgcobol.so.1.* libgcobol.so +ln -sf ../../../../%{_lib}/libgcobol.so.2.* libgcobol.so +%endif +%if %{build_algol68} +ln -sf ../../../../%{_lib}/libga68.so.2.* libga68.so %endif %if %{build_libitm} ln -sf ../../../../%{_lib}/libitm.so.1.* libitm.so @@ -1893,6 +1949,9 @@ done %if %{build_cobol} mv -f %{buildroot}%{_prefix}/%{_lib}/libgcobol.*a $FULLLPATH/ %endif +%if %{build_algol68} +mv -f %{buildroot}%{_prefix}/%{_lib}/libga68.*a $FULLLPATH/ +%endif %if %{build_libitm} mv -f %{buildroot}%{_prefix}/%{_lib}/libitm.*a $FULLLPATH/ %endif @@ -1968,8 +2027,8 @@ ln -sf ../`echo ../../../../lib/libgfortran.so.5.* | sed s~/lib/~/lib64/~` 64/li ln -sf ../`echo ../../../../lib/libgomp.so.1.* | sed s~/lib/~/lib64/~` 64/libgomp.so %if %{build_go} rm -f libgo.so -echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgo.so.24.* | sed 's,^.*libg,libg,'`' )' > libgo.so -echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgo.so.24.* | sed 's,^.*libg,libg,'`' )' > 64/libgo.so +echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgo.so.25.* | sed 's,^.*libg,libg,'`' )' > libgo.so +echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgo.so.25.* | sed 's,^.*libg,libg,'`' )' > 64/libgo.so %endif %if %{build_libquadmath} rm -f libquadmath.so @@ -1986,8 +2045,8 @@ echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgphobos.so.6.* | sed 's %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.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 + echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libm2$i.so.21.* | sed 's,^.*libm,libm,'`' )' > libm2$i.so + echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libm2$i.so.21.* | 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/ @@ -1995,8 +2054,13 @@ done %endif %if %{build_cobol} rm -f libgcobol.so -echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgcobol.so.1.* | sed 's,^.*libg,libg,'`' )' > libgcobol.so -echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgcobol.so.1.* | sed 's,^.*libg,libg,'`' )' > 64/libgcobol.so +echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgcobol.so.2.* | sed 's,^.*libg,libg,'`' )' > libgcobol.so +echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgcobol.so.2.* | sed 's,^.*libg,libg,'`' )' > 64/libgcobol.so +%endif +%if %{build_algol68} +rm -f libga68.so +echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libga68.so.2.* | sed 's,^.*libg,libg,'`' )' > libga68.so +echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libga68.so.2.* | sed 's,^.*libg,libg,'`' )' > 64/libga68.so %endif %if %{build_libitm} rm -f libitm.so @@ -2053,6 +2117,10 @@ done ln -sf lib32/libgcobol.a libgcobol.a ln -sf ../lib64/libgcobol.a 64/libgcobol.a %endif +%if %{build_algol68} +ln -sf lib32/libga68.a libga68.a +ln -sf ../lib64/libga68.a 64/libga68.a +%endif %if %{build_libitm} ln -sf lib32/libitm.a libitm.a ln -sf ../lib64/libitm.a 64/libitm.a @@ -2094,8 +2162,8 @@ ln -sf ../`echo ../../../../lib64/libgfortran.so.5.* | sed s~/../lib64/~/~` 32/l ln -sf ../`echo ../../../../lib64/libgomp.so.1.* | sed s~/../lib64/~/~` 32/libgomp.so %if %{build_go} rm -f libgo.so -echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgo.so.24.* | sed 's,^.*libg,libg,'`' )' > libgo.so -echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgo.so.24.* | sed 's,^.*libg,libg,'`' )' > 32/libgo.so +echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgo.so.25.* | sed 's,^.*libg,libg,'`' )' > libgo.so +echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgo.so.25.* | sed 's,^.*libg,libg,'`' )' > 32/libgo.so %endif %if %{build_libquadmath} rm -f libquadmath.so @@ -2112,8 +2180,8 @@ echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgphobos.so.6.* | sed 's %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.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 + echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libm2$i.so.21.* | sed 's,^.*libm,libm,'`' )' > libm2$i.so + echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libm2$i.so.21.* | 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/ @@ -2121,8 +2189,13 @@ done %endif %if %{build_cobol} rm -f libgcobol.so -echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgcobol.so.1.* | sed 's,^.*libg,libg,'`' )' > libgcobol.so -#echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgcobol.so.1.* | sed 's,^.*libg,libg,'`' )' > 32/libgcobol.so +echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgcobol.so.2.* | sed 's,^.*libg,libg,'`' )' > libgcobol.so +#echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgcobol.so.2.* | sed 's,^.*libg,libg,'`' )' > 32/libgcobol.so +%endif +%if %{build_algol68} +rm -f libga68.so +echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libga68.so.2.* | sed 's,^.*libg,libg,'`' )' > libga68.so +echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libga68.so.2.* | sed 's,^.*libg,libg,'`' )' > 32/libga68.so %endif %if %{build_libitm} rm -f libitm.so @@ -2181,6 +2254,10 @@ done ln -sf ../lib32/libgcobol.a 32/libgcobol.a ln -sf lib64/libgcobol.a libgcobol.a %endif +%if %{build_algol68} +ln -sf ../lib32/libga68.a 32/libga68.a +ln -sf lib64/libga68.a libga68.a +%endif %if %{build_libitm} ln -sf ../lib32/libitm.a 32/libitm.a ln -sf lib64/libitm.a libitm.a @@ -2233,6 +2310,9 @@ done %if %{build_cobol} #ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libgcobol.a 32/libgcobol.a %endif +%if %{build_algol68} +ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libga68.a 32/libga68.a +%endif %if %{build_libitm} ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libitm.a 32/libitm.a %endif @@ -2303,11 +2383,14 @@ 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.20.* + chmod 755 %{buildroot}%{_prefix}/%{_lib}/libm2$i.so.21.* done %endif %if %{build_cobol} -chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgcobol.so.1.* +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgcobol.so.2.* +%endif +%if %{build_algol68} +chmod 755 %{buildroot}%{_prefix}/%{_lib}/libga68.so.2.* %endif %if %{build_libitm} chmod 755 %{buildroot}%{_prefix}/%{_lib}/libitm.so.1.* @@ -2332,7 +2415,7 @@ chmod 755 %{buildroot}%{_prefix}/%{_lib}/liblsan.so.0.* %endif %if %{build_go} # Avoid stripping these libraries and binaries. -chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.24.* +chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.25.* chmod 644 %{buildroot}%{_prefix}/bin/go.gcc chmod 644 %{buildroot}%{_prefix}/bin/gofmt.gcc chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cgo @@ -2403,6 +2486,7 @@ rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gdc || : rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gm2 || : rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcobc || : rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcobol || : +rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-ga68 || : %ifarch %{multilib_64_archs} # Remove libraries for the other arch on multilib arches @@ -2428,7 +2512,7 @@ rm -rf %{buildroot}%{_prefix}/lib64/go/%{gcc_major}/%{gcc_target_platform} rm -f %{buildroot}%{_prefix}/lib*/lib*.spec || : rm -f %{buildroot}%{_prefix}/lib*/libstdc++.modules.json || : -rm -f %{buildroot}%{_prefix}/%{_lib}/lib{asan,atomic,gcc_s,gcobol,gdruntime,gfortran,go,gomp-plugin-*,gomp,gphobos,hwasan}.so || : +rm -f %{buildroot}%{_prefix}/%{_lib}/lib{asan,atomic,gcc_s,gcobol,ga68,gdruntime,gfortran,go,gomp-plugin-*,gomp,gphobos,hwasan}.so || : rm -f %{buildroot}%{_prefix}/%{_lib}/lib{itm,lsan,m2{cor,iso,log,min,pim},objc,quadmath,stdc++,tsan,ubsan}.so || : rm -f %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/install-tools/{fixinc.sh,mkinstalldirs} || : rm -f %{buildroot}%{_prefix}/share/locale/*/LC_MESSAGES/libstdc++.mo || : @@ -2648,6 +2732,7 @@ end %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/stdatomic.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/gcov.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/stdckdint.h +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/stdcountof.h %ifarch %{ix86} x86_64 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/mmintrin.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/xmmintrin.h @@ -2759,12 +2844,6 @@ end %{_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 @@ -2772,6 +2851,8 @@ end %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2minmaxintrin.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2satcvtintrin.h %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/movrsintrin.h +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512bmmintrin.h +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512bmmvlintrin.h %endif %ifarch ia64 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/ia64intrin.h @@ -2836,6 +2917,7 @@ end %{_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/sifive_vector.h +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/andes_vector.h %endif %if %{build_libasan} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/sanitizer @@ -3294,7 +3376,7 @@ end %doc rpm.doc/gm2/* %files -n libgm2 -%{_prefix}/%{_lib}/libm2*.so.20* +%{_prefix}/%{_lib}/libm2*.so.21* %doc rpm.doc/libgm2/* %files -n libgm2-static @@ -3326,11 +3408,11 @@ end %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cobol1 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgcobol.spec %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgcobol.so -%{_datadir}/gcobol +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/cobol %doc rpm.doc/gcobol/* %files -n libgcobol -%{_prefix}/%{_lib}/libgcobol.so.1* +%{_prefix}/%{_lib}/libgcobol.so.2* %doc rpm.doc/libgcobol/* %files -n libgcobol-static @@ -3340,6 +3422,53 @@ end %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgcobol.a %endif +%if %{build_algol68} +%files algol68 +%{_prefix}/bin/ga68 +%{_mandir}/man1/ga68.1* +%dir %{_prefix}/libexec/gcc +%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} +%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major} +%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/a681 +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libga68.spec +%ifarch sparcv9 sparc64 ppc ppc64 ppc64p7 +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libga68.a +%endif +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libga68.so +%ifarch sparcv9 ppc +%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64 +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libga68.a +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libga68.so +%endif +%ifarch %{multilib_64_archs} +%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32 +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libga68.a +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libga68.so +%endif +%{_infodir}/ga68* +%doc rpm.doc/algol68/* + +%files -n libga68 +%{_prefix}/%{_lib}/libga68.so.2* +%doc rpm.doc/libga68/* + +%files -n libga68-static +%dir %{_prefix}/lib/gcc +%dir %{_prefix}/lib/gcc/%{gcc_target_platform} +%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major} +%ifarch sparcv9 ppc +%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib32 +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib32/libga68.a +%endif +%ifarch sparc64 ppc64 ppc64p7 +%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib64 +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib64/libga68.a +%endif +%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7 +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libga68.a +%endif +%endif + %if %{build_ada} %files gnat %{_prefix}/bin/gnat @@ -3656,8 +3785,8 @@ end %doc rpm.doc/go/* %files -n libgo -%{_prefix}/%{_lib}/libgo.so.24 -%attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.24.* +%{_prefix}/%{_lib}/libgo.so.25 +%attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.25.* %doc rpm.doc/libgo/* %files -n libgo-devel @@ -3809,510 +3938,5 @@ end %endif %changelog -* Thu Dec 11 2025 Jakub Jelinek 15.2.1-5 -- update from releases/gcc-15 branch - - PRs ada/111433, ada/115305, ada/122640, ada/123037, c/121506, c/123018, - c++/119580, c++/120529, c++/120876, c++/121325, c++/121445, - c++/122625, c++/122658, c++/122677, c++/122789, fortran/122709, - fortran/122977, libstdc++/122661, libstdc++/122726, libstdc++/122743, - libstdc++/122842, libstdc++/122921, lto/122515, middle-end/120052, - middle-end/120564, middle-end/121581, middle-end/122624, - rtl-optimization/122627, target/110796, target/118446, target/119275, - target/121853, target/122175, target/122189, target/122216, - target/122446, target/122539, target/122652, target/122656, - target/122692, target/122695, target/122858, target/122867, - target/122991, tree-optimization/121776, tree-optimization/122126, - tree-optimization/122225, tree-optimization/122943 -- create gnatgcc symlink only when building Ada -- avoid building libssp and disabled libraries -- remove various unpackaged files from the buildroot - -* Tue Nov 11 2025 Jakub Jelinek 15.2.1-4 -- update from releases/gcc-15 branch - - PRs ada/81087, ada/118208, ada/118782, c++/122192, c++/122253, c++/122310, - c++/122381, c++/122421, fortran/107968, fortran/114023, - fortran/122206, fortran/122386, rtl-optimization/122321, - target/99930, target/118460, target/119079, target/120674, - target/121604, target/122097, target/122270, target/122323, - target/122516, target/122527, tree-optimization/122012, - tree-optimization/122394, tree-optimization/122408, - tree-optimization/122505 - - fix ICE while building firefox with LTO+PGO (#2395476, PR lto/122620) - -* Wed Oct 22 2025 Jakub Jelinek 15.2.1-3 -- update from releases/gcc-15 branch - - PRs ada/107536, ada/113536, ada/117517, ada/118343, c/122188, c++/120757, - c++/121981, c++/122302, fortran/108581, fortran/121616, - fortran/121939, go/104290, libstdc++/122062, libstdc++/122322, - middle-end/121922, middle-end/122133, target/110812, target/121599, - target/121652, target/121742, target/121780, target/121781, - target/121845, target/121875, target/122119, target/122177, - target/122187, target/122210, target/122220, target/122222, - target/122223, tree-optimization/121772, tree-optimization/122104, - tree-optimization/122213 -- package libgcobol.spec (#2401679) - -* Wed Sep 24 2025 Jakub Jelinek 15.2.1-2 -- update from releases/gcc-15 branch - - PRs ada/121968, bootstrap/118009, bootstrap/119089, c++/97740, c++/119859, - c++/120499, c++/120620, c++/121351, c++/121396, c++/121524, - c++/121724, c++/121795, c++/121801, c++/121977, c++/122015, - c++/122019, fortran/89092, fortran/121263, libfortran/121234, - libgcc/117600, libstdc++/110853, libstdc++/117276, libstdc++/119861, - libstdc++/120390, libstdc++/120698, libstdc++/121097, - libstdc++/121313, libstdc++/121374, libstdc++/121496, - libstdc++/121745, libstdc++/121827, middle-end/121453, - middle-end/121828, middle-end/121831, rtl-optimization/87600, - rtl-optimization/120718, rtl-optimization/120983, - rtl-optimization/121253, rtl-optimization/121757, target/49857, - target/81540, target/116445, target/118280, target/118885, - target/119830, target/120476, target/120691, target/120986, - target/121007, target/121118, target/121208, target/121294, - target/121414, target/121449, target/121464, target/121510, - target/121534, target/121542, target/121548, target/121602, - target/121608, target/121634, target/121749, target/121794, - target/121906, testsuite/118567, tree-optimization/107997, - tree-optimization/121370, tree-optimization/121527, - tree-optimization/121659, tree-optimization/121844, - tree-optimization/121870, tree-optimization/122016 - -* Fri Aug 8 2025 Jakub Jelinek 15.2.1-1 -- update from releases/gcc-15 branch - - GCC 15.2 release - - PRs ada/120440, ada/121184, c/119950, c/120055, c/120353, c/120354, - c++/95615, c++/108080, c++/109283, c++/115605, c++/115908, c++/116775, - c++/118074, c++/118903, c++/119916, c++/120224, c++/120243, - c++/120273, c++/120412, c++/120453, c++/120495, c++/120577, - c++/120756, c++/120800, c++/120845, c++/121055, c++/121133, - c++/121219, c++/121238, cobol/119231, cobol/119323, cobol/119335, - cobol/119337, cobol/119377, cobol/119524, cobol/119632, cobol/119695, - cobol/119770, cobol/119771, cobol/119772, cobol/119790, cobol/119810, - cobol/119885, cobol/119975, cobol/120251, cobol/120328, cobol/120402, - cobol/120621, cobol/120765, cobol/120772, cobol/120779, cobol/120790, - cobol/120791, cobol/120794, fortran/119106, fortran/121145, - fortran/121203, ipa/114790, libstdc++/119962, libstdc++/121373, - lto/120308, middle-end/119835, middle-end/121095, middle-end/121159, - middle-end/121322, middle-end/121389, rtl-optimization/121340, - target/118891, target/119692, target/119737, target/119853, - target/119854, target/120119, target/120351, target/120427, - target/120530, target/120645, target/120714, target/121027, - target/121028, target/121064, target/121121, target/121274, - target/121277, testsuite/121286, testsuite/121288, - tree-optimization/117423, tree-optimization/118891, - tree-optimization/119085, tree-optimization/121127, - tree-optimization/121130, tree-optimization/121190, - tree-optimization/121202, tree-optimization/121256, - tree-optimization/121264, tree-optimization/121320, - tree-optimization/121323, tree-optimization/121413 - -* Sat Jul 19 2025 Jakub Jelinek 15.1.1-5 -- update from releases/gcc-15 branch - - PRs cobol/119818, middle-end/120935, modula2/121164, testsuite/119508 - -* Fri Jul 18 2025 Jakub Jelinek 15.1.1-4 -- update from releases/gcc-15 branch - - PRs ada/121056, c++/87097, c++/120569, c++/120628, c++/120954, - fortran/104428, fortran/120637, fortran/120843, fortran/120847, - fortran/121060, ipa/121023, libstdc++/118681, libstdc++/119754, - libstdc++/120997, middle-end/120709, modula2/117203, modula2/119650, - modula2/120253, modula2/120389, modula2/120474, modula2/120497, - modula2/120542, modula2/120606, modula2/120673, modula2/120731, - modula2/120912, rtl-optimization/120242, rtl-optimization/120627, - rtl-optimization/120736, rtl-optimization/120813, target/118241, - target/120356, target/120807, target/120908, target/120995, - target/120999, tree-optimization/118669, tree-optimization/120358, - tree-optimization/120780, tree-optimization/120817, - tree-optimization/120924, tree-optimization/120944, - tree-optimization/121035, tree-optimization/121049, - tree-optimization/121059, tree-optimization/121131 - -* Mon Jul 7 2025 Jakub Jelinek 15.1.1-3 -- update from releases/gcc-15 branch - - PRs ada/120665, ada/120705, ada/120854, c/120180, c++/116064, c++/120123, - c++/120363, c++/120413, c++/120414, c++/120471, c++/120502, - c++/120555, c++/120575, c++/120684, c++/120940, fortran/51961, - fortran/85750, fortran/99838, fortran/101735, fortran/102599, - fortran/114022, fortran/119856, fortran/119948, fortran/120193, - fortran/120355, fortran/120483, fortran/120711, fortran/120784, - ipa/120295, libfortran/119856, libstdc++/99832, libstdc++/120367, - libstdc++/120432, libstdc++/120465, libstdc++/120548, - libstdc++/120625, libstdc++/120648, libstdc++/120650, - libstdc++/120931, libstdc++/120934, middle-end/118694, - middle-end/120369, middle-end/120547, middle-end/120608, - middle-end/120631, rtl-optimization/116389, rtl-optimization/120050, - rtl-optimization/120182, rtl-optimization/120347, - rtl-optimization/120423, rtl-optimization/120550, - rtl-optimization/120795, target/86772, target/119971, target/120042, - target/120441, target/120442, target/120480, target/120624, - testsuite/52641, testsuite/120082, testsuite/120919, - tree-optimization/116352, tree-optimization/119960, - tree-optimization/120003, tree-optimization/120341, - tree-optimization/120357, tree-optimization/120638, - tree-optimization/120654, tree-optimization/120677, - tree-optimization/120729, tree-optimization/120927 -- fix up FE lowering of pointer arith (PR c/120837) -- perform %%check with -foffload=disable flag - -* Wed May 21 2025 Jakub Jelinek 15.1.1-2 -- update from releases/gcc-15 branch - - PRs ada/112958, ada/120104, c/120057, c++/119863, c++/119864, c++/119938, - c++/119939, c++/119981, c++/119996, c++/120012, c++/120013, - c++/120023, c++/120125, c++/120161, c++/120350, fortran/102891, - fortran/102900, fortran/119928, fortran/119986, fortran/120049, - fortran/120107, fortran/120139, fortran/120163, fortran/120179, - fortran/120191, ipa/119852, ipa/119973, ipa/120006, ipa/120146, - libfortran/120152, libfortran/120153, libfortran/120158, - libfortran/120196, libstdc++/118260, libstdc++/119427, - libstdc++/119714, libstdc++/120029, libstdc++/120114, - libstdc++/120159, libstdc++/120187, libstdc++/120190, - libstdc++/120198, libstdc++/120293, modula2/115276, modula2/119914, - modula2/119915, modula2/120117, modula2/120188, preprocessor/116047, - preprocessor/120061, target/119610, testsuite/119909, - tree-optimization/111873, tree-optimization/119712, - tree-optimization/120043, tree-optimization/120048, - tree-optimization/120074, tree-optimization/120089, - tree-optimization/120143, tree-optimization/120211 - -* Fri Apr 25 2025 Jakub Jelinek 15.1.1-1 -- update from releases/gcc-15 branch - - GCC 15.1 release - - PRs fortran/119836, target/119327, target/119873, tree-optimization/118407 - -* Fri Apr 18 2025 Jakub Jelinek 15.0.1-0.14 -- update from releases/gcc-14 branch - - GCC 15.1.0-rc1 - - PRs tree-optimization/119858 - -* Thu Apr 17 2025 Jakub Jelinek 15.0.1-0.13 -- update from trunk and releases/gcc-14 branch - - PRs ada/119643, c/88382, c/119717, c++/99214, c++/101180, c++/106618, - c++/111075, c++/112288, c++/113360, c++/113835, c++/114772, - c++/114970, c++/115639, c++/116416, c++/116954, c++/119175, - c++/119345, c++/119687, c++/119692, c++/119755, c++/119807, - cobol/119217, cobol/119302, cobol/119694, cobol/119759, cobol/119776, - cobol/119777, d/109023, d/119758, d/119761, d/119799, d/119817, - d/119826, driver/90465, driver/119727, fortran/106948, fortran/119669, - ipa/113203, ipa/119318, ipa/119803, libfortran/119502, libgcc/101075, - libgcc/119796, libgomp/119849, libstdc++/21334, libstdc++/119725, - libstdc++/119748, libstdc++/119840, lto/119792, middle-end/14708, - middle-end/105548, middle-end/119706, middle-end/119808, - modula2/119735, modula2/119779, rtl-optimization/118502, - rtl-optimization/119785, rust/119341, rust/119342, sanitizer/119801, - target/42683, target/97106, target/97585, target/106445, - target/108134, target/113633, target/116827, target/118794, - target/119298, target/119386, target/119533, target/119547, - target/119673, target/119784, target/119834, testsuite/117706, - translation/119684, tree-optimization/71094, tree-optimization/87909, - tree-optimization/112822, tree-optimization/116093, - tree-optimization/118476, tree-optimization/119351, - tree-optimization/119399, tree-optimization/119706, - tree-optimization/119707, tree-optimization/119718, - tree-optimization/119722, tree-optimization/119757, - tree-optimization/119778 - -* Thu Apr 10 2025 Jakub Jelinek 15.0.1-0.12 -- update from trunk - - PRs ada/119571, analyzer/113253, bootstrap/119680, c/78008, c/81831, - c/101440, c/114957, c/117689, c/118118, c/119173, c/119582, c/119612, - c++/60972, c++/64500, c++/90468, c++/99546, c++/106976, c++/109961, - c++/113925, c++/116285, c++/116960, c++/117336, c++/117530, - c++/117849, c++/118249, c++/118626, c++/118629, c++/118698, - c++/118982, c++/119303, c++/119383, c++/119387, c++/119401, - c++/119462, c++/119518, c++/119551, c++/119563, c++/119564, - c++/119574, c++/119608, c++/119652, cobol/119283, cobol/119295, - cobol/119364, cobol/119414, cobol/119521, cobol/119682, d/117002, - d/117832, d/118309, driver/58973, fortran/101602, fortran/119460, - fortran/119656, gcov-profile/119535, gcov-profile/119553, - gcov-profile/119618, ipa/119599, libfortran/119460, libstdc++/109162, - libstdc++/110498, libstdc++/114758, libstdc++/114945, - libstdc++/115046, libstdc++/119517, libstdc++/119545, - libstdc++/119550, libstdc++/119593, libstdc++/119620, - libstdc++/119642, libstdc++/119671, middle-end/78874, - middle-end/101018, middle-end/112589, middle-end/116595, - middle-end/118965, middle-end/119442, middle-end/119482, - middle-end/119537, middle-end/119541, middle-end/119559, - middle-end/119613, middle-end/119662, preprocessor/118674, - preprocessor/119391, rtl-optimization/119291, rtl-optimization/119594, - rtl-optimization/119672, rtl-optimization/119689, target/117759, - target/119308, target/119369, target/119473, target/119539, - target/119549, target/119556, target/119572, target/119573, - target/119645, target/119664, target/119678, testsuite/116398, - testsuite/118597, tree-optimization/80331, tree-optimization/87502, - tree-optimization/103827, tree-optimization/113281, - tree-optimization/118924, tree-optimization/119491, - tree-optimization/119493, tree-optimization/119532, - tree-optimization/119534, tree-optimization/119586, - tree-optimization/119614, tree-optimization/119616, - tree-optimization/119640, web/119227 - - fix up LTO opts handling (##2356219, PR lto/119625) - -* Sat Mar 29 2025 Jakub Jelinek 15.0.1-0.11 -- update from trunk - - PRs ada/119265, ada/119440, analyzer/119278, bootstrap/119513, c/116545, - c/118061, c/118765, c/119311, c/119350, c/119366, c++/101881, - c++/114525, c++/114992, c++/118104, c++/118920, c++/118961, - c++/119194, c++/119233, c++/119316, c++/119344, c++/119370, - c++/119378, c++/119379, cobol/119213, cobol/119214, cobol/119241, - cobol/119242, cobol/119244, cobol/119290, cobol/119301, cobol/119390, - d/117621, d/118545, debug/101533, driver/101544, fortran/60560, - fortran/85836, fortran/116706, fortran/118796, fortran/119272, - fortran/119338, fortran/119349, fortran/119380, fortran/119403, - fortran/119406, fortran/119419, gcov-profile/118442, ipa/98265, - ipa/116572, ipa/119147, ipa/119376, ipa/119484, libfortran/85836, - libgomp/96835, libitm/88319, libstdc++/101527, libstdc++/101587, - libstdc++/108487, libstdc++/111055, libstdc++/111138, - libstdc++/116440, libstdc++/117214, libstdc++/117983, - libstdc++/118699, libstdc++/119135, libstdc++/119282, - libstdc++/119358, libstdc++/119415, libstdc++/119429, - libstdc++/119469, libstdc++/119488, middle-end/93437, - middle-end/112938, middle-end/113546, middle-end/117811, - middle-end/118627, middle-end/118795, middle-end/119325, - modula2/115111, modula2/118045, modula2/118600, modula2/119449, - modula2/119504, other/42270, other/119218, other/119250, other/119510, - preprocessor/108900, rtl-optimization/118615, rtl-optimization/118914, - rtl-optimization/119285, rtl-optimization/119307, rust/119333, - target/55583, target/91614, target/92713, target/96226, target/98743, - target/101544, target/112980, target/117069, target/117092, - target/117452, target/118068, target/119010, target/119114, - target/119120, target/119172, target/119224, target/119235, - target/119270, target/119286, target/119355, target/119357, - target/119408, target/119421, target/119425, target/119428, - target/119450, target/119465, testsuite/113634, testsuite/113965, - testsuite/116163, testsuite/119220, testsuite/119382, - testsuite/119489, tree-optimization/37143, tree-optimization/105820, - tree-optimization/118616, tree-optimization/119155, - tree-optimization/119274, tree-optimization/119287, - tree-optimization/119389, tree-optimization/119417, - tree-optimization/119483 -- package gcc-gcobol on x86_64 and aarch64 so far -- turn unversioned obsoletes into versioned ones - -* Thu Mar 13 2025 Jakub Jelinek 15.0.1-0.10 -- update from trunk - - PRs analyzer/117262, c/60440, c/67301, c/112960, c/113515, c/117029, - c/117178, c/118579, c/119183, c++/98533, c++/100589, c++/109431, - c++/110584, c++/114795, c++/115580, c++/116740, c++/117364, - c++/117504, c++/117512, c++/118775, c++/118787, c++/118799, - c++/118874, c++/119073, c++/119076, c++/119102, c++/119123, - c++/119134, c++/119138, c++/119150, c++/119154, c++/119162, - cobol/119216, cobol/119229, d/119139, debug/119190, fortran/47928, - fortran/77872, fortran/98903, fortran/101577, fortran/103391, - fortran/104684, fortran/104826, fortran/107143, fortran/118747, - fortran/119049, fortran/119054, fortran/119074, fortran/119078, - fortran/119118, fortran/119157, fortran/119199, ipa/118318, - ipa/118785, ipa/119067, libgcc/119151, libstdc++/108053, - libstdc++/113310, libstdc++/115215, libstdc++/115218, - libstdc++/119081, libstdc++/119110, libstdc++/119121, - libstdc++/119144, lto/114501, middle-end/97323, middle-end/118457, - middle-end/118801, middle-end/119119, middle-end/119204, - middle-end/119219, middle-end/119226, modula2/118998, modula2/119088, - modula2/119192, other/38768, other/119052, preprocessor/119202, - rtl-optimization/114492, rtl-optimization/116564, - rtl-optimization/117477, rtl-optimization/118739, - rtl-optimization/119046, rtl-optimization/119071, - rtl-optimization/119099, sanitizer/56682, target/114222, - target/114991, target/115258, target/115439, target/115485, - target/115835, target/116708, target/116901, target/117931, - target/117955, target/118351, target/118892, target/118906, - target/118934, target/118942, target/118956, target/119084, - target/119115, target/119127, target/119131, target/119133, - target/119171, target/119238, testsuite/115248, - tree-optimization/116125, tree-optimization/116901, - tree-optimization/117919, tree-optimization/118922, - tree-optimization/118976, tree-optimization/119057, - tree-optimization/119096, tree-optimization/119145, - tree-optimization/119166 -- use %%autopatch in the spec file - -* Sat Mar 1 2025 Jakub Jelinek 15.0.1-0.9 -- update from trunk - - PRs c/114870, c/119001, c++/110822, c++/114913, c++/118516, c++/118928, - c++/118986, c++/119038, c++/119045, d/116961, d/118654, - fortran/108233, fortran/108369, fortran/118730, fortran/118789, - ipa/111245, ipa/118243, jit/117047, libstdc++/93059, libstdc++/104606, - libstdc++/105609, libstdc++/106612, libstdc++/112490, - libstdc++/112803, libstdc++/118083, lto/91299, middle-end/66279, - middle-end/115871, middle-end/118819, middle-end/118860, - middle-end/119021, rtl-optimization/116336, rtl-optimization/117712, - rtl-optimization/119002, target/107635, target/109189, target/115458, - target/118931, target/118940, testsuite/115028, testsuite/116143, - translation/118991, tree-optimization/87984, tree-optimization/116855, - tree-optimization/118464, tree-optimization/119030 -- fix ranger related miscompilation (PR tree-optimization/118953) -- fix miscompilation of floating point comparisons if NaNs can appear - (#2346233, PR rtl-optimization/119002) -- fix ICF related miscompilation (PR ipa/119006) - -* Tue Feb 25 2025 Jakub Jelinek 15.0.1-0.8 -- update from trunk - - PRs analyzer/118300, c/117023, c/119000, c++/66519, c++/66878, c++/70037, - c++/70536, c++/82794, c++/82936, c++/83144, c++/86769, c++/86933, - c++/94100, c++/96364, c++/101740, c++/102455, c++/107637, c++/110345, - c++/113800, c++/115586, c++/116379, c++/117106, c++/117324, - c++/118053, c++/118190, c++/118282, c++/118304, c++/118306, - c++/118319, c++/118574, c++/118661, c++/118763, c++/118773, - c++/118807, c++/118822, c++/118833, c++/118846, c++/118849, - c++/118856, c++/118876, c++/118923, c++/118981, c++/188574, d/111628, - debug/118790, driver/117739, fortran/24878, fortran/47485, - fortran/48958, fortran/56423, fortran/59252, fortran/107635, - fortran/115271, fortran/116829, fortran/117430, fortran/118080, - fortran/118159, fortran/118740, fortran/118745, fortran/118750, - fortran/118845, fortran/118862, go/118746, ipa/118097, jit/118780, - libfortran/114618, libstdc++/100612, libstdc++/111050, - libstdc++/115209, libstdc++/118160, libstdc++/118559, - libstdc++/118701, libstdc++/118811, libstdc++/118855, - libstdc++/118865, lto/118125, middle-end/107067, middle-end/113525, - middle-end/116351, middle-end/117263, middle-end/118288, - middle-end/118950, middle-end/118993, modula2/115112, modula2/118761, - modula2/118978, other/116613, other/118919, rtl-optimization/102150, - rtl-optimization/108840, rtl-optimization/115568, - rtl-optimization/115932, rtl-optimization/116028, - rtl-optimization/116244, rtl-optimization/117081, - rtl-optimization/117082, rtl-optimization/117239, - rtl-optimization/117506, rtl-optimization/117922, - rtl-optimization/118497, sarif-replay/118792, sarif-replay/118881, - target/69374, target/86660, target/94282, target/109093, - target/109780, target/113331, target/114516, target/114522, - target/115123, target/115478, target/115703, target/117674, - target/117991, target/118089, target/118146, target/118248, - target/118540, target/118561, target/118601, target/118623, - target/118685, target/118764, target/118768, target/118771, - target/118772, target/118776, target/118806, target/118813, - target/118815, target/118825, target/118828, target/118832, - target/118835, target/118843, target/118844, target/118872, - target/118878, target/118936, testsuite/116604, testsuite/116986, - testsuite/118754, tree-optimization/82142, tree-optimization/86270, - tree-optimization/90579, tree-optimization/98028, - tree-optimization/98845, tree-optimization/108357, - tree-optimization/110449, tree-optimization/115538, - tree-optimization/117790, tree-optimization/118521, - tree-optimization/118706, tree-optimization/118727, - tree-optimization/118749, tree-optimization/118756, - tree-optimization/118805, tree-optimization/118817, - tree-optimization/118852, tree-optimization/118895, - tree-optimization/118915, tree-optimization/118954, - tree-optimization/118973 -- drop on riscv riscv_cmo.h header from file list, add sifive_vector.h - -* Tue Feb 4 2025 Jakub Jelinek 15.0.1-0.7 -- update from trunk - - PRs ada/118712, ada/118731, c/118742, c++/79786, c++/98893, c++/108205, - c++/109918, c++/114619, c++/116506, c++/116880, c++/116914, - c++/117114, c++/117778, c++/118265, c++/118470, c++/118491, - c++/118718, c++/118719, fortran/93289, lto/113207, middle-end/115913, - middle-end/116926, modula2/117411, modula2/118703, - rtl-optimization/111673, rtl-optimization/117248, - rtl-optimization/117611, target/116010, target/118713, - testsuite/116845, tree-optimization/117113, tree-optimization/118717 - -* Sat Feb 1 2025 Jakub Jelinek 15.0.1-0.6 -- update from trunk - - PRs c++/117501, c++/117516, debug/100530, fortran/108454, fortran/118714, - ipa/117432, libstdc++/118156, middle-end/117498, modula2/115032, - rtl-optimization/116234, target/113689, target/115673, - tree-optimization/114277 -- use rpm.execute instead of posix.fork, posix.exec and posix.wait in libgcc - scriptlets; guard them on ldconfig macro existence and use that macro instead - of explicit /sbin/ldconfig (#2291927) - -* Thu Jan 30 2025 Jakub Jelinek 15.0.1-0.5 -- update from trunk - - PRs c/116357, c++/57533, c++/114292, c++/116524, c++/117855, c++/118239, - c++/118285, c++/118632, c++/118655, c++/118673, d/118477, - fortran/58857, fortran/110993, fortran/118640, fortran/118683, - libstdc++/98749, libstdc++/118413, libstdc++/118563, - middle-end/118643, middle-end/118684, middle-end/118692, - middle-end/118695, modula2/116073, modula2/117737, modula2/118183, - other/118675, preprocessor/118168, rtl-optimization/118320, - rtl-optimization/118429, rtl-optimization/118638, - rtl-optimization/118662, target/114085, target/116860, target/117173, - target/117688, target/118103, target/118490, target/118642, - target/118646, target/118663, target/118696, testsuite/118127, - tree-optimization/112859, tree-optimization/114052, - tree-optimization/115347, tree-optimization/117270, - tree-optimization/117424, tree-optimization/117892, - tree-optimization/118505, tree-optimization/118637, - tree-optimization/118653 -- fix up C++ list conversion for #embed or large series of comma - separated small constants (PR c++/118671) -- punt in niters clz/ctz creation if internal function can't be used - and frontend didn't build __builtin_c{l,t}z{,l,ll} builtins - (PR tree-optimization/118689) - -* Sat Jan 25 2025 Jakub Jelinek 15.0.1-0.4 -- update from trunk - - 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 - -* Tue Jan 14 2025 Jakub Jelinek 15.0.1-0.3 -- temporary fix for coroutine range for handling (PR c++/117231) - -* Tue Jan 14 2025 Jakub Jelinek 15.0.1-0.2 -- update from trunk - - PRs ada/118459, c/116871, c++/118445, modula2/116557, target/116030, - target/117682, tree-optimization/118405 - -* Mon Jan 13 2025 Jakub Jelinek 15.0.1-0.1 -- update from trunk - - 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 Jan 11 2025 Jakub Jelinek 15.0.0-0.4 -- update from trunk - - 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 Jan 9 2025 Jakub Jelinek 15.0.0-0.3 +* Thu Dec 18 2025 Jakub Jelinek 16.0.0-0.2 - new package diff --git a/gcc15-libgomp-strchr.patch b/gcc15-libgomp-strchr.patch deleted file mode 100644 index 802f142..0000000 --- a/gcc15-libgomp-strchr.patch +++ /dev/null @@ -1,15 +0,0 @@ -2025-11-22 Frank Scheiner - - * affinity-fmt.c: Make char *q a pointer to a const char. - ---- libgomp/affinity-fmt.c.jj -+++ libgomp/affinity-fmt.c -@@ -327,7 +327,7 @@ gomp_display_affinity (char *buffer, size_t size, - } - if (c == '{') - { -- char *q = strchr (p + 1, '}'); -+ const char *q = strchr (p + 1, '}'); - if (q) - gomp_fatal ("unsupported long type name '%.*s' in affinity " - "format", (int) (q - (p + 1)), p + 1); diff --git a/gcc15-Wno-format-security.patch b/gcc16-Wno-format-security.patch similarity index 89% rename from gcc15-Wno-format-security.patch rename to gcc16-Wno-format-security.patch index 66f62b8..9f4a8f9 100644 --- a/gcc15-Wno-format-security.patch +++ b/gcc16-Wno-format-security.patch @@ -32,14 +32,16 @@ fi --- Makefile.tpl.jj 2023-11-29 13:21:41.680292662 +0100 +++ Makefile.tpl 2024-11-30 13:35:29.303196246 +0100 -@@ -450,9 +450,9 @@ LDFLAGS = @LDFLAGS@ +@@ -450,10 +450,10 @@ LDFLAGS = @LDFLAGS@ LIBCFLAGS = $(CFLAGS) CXXFLAGS = @CXXFLAGS@ LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates -GOCFLAGS = $(CFLAGS) +-GA68FLAGS = @GA68FLAGS@ -GDCFLAGS = @GDCFLAGS@ -GM2FLAGS = $(CFLAGS) +GOCFLAGS = $(filter-out -Wformat-security,$(CFLAGS)) ++GA68FLAGS = $(filter-out -Wformat-security,@GA68FLAGS@) +GDCFLAGS = $(filter-out -Wformat-security,@GDCFLAGS@) +GM2FLAGS = $(filter-out -Wformat-security,$(CFLAGS)) @@ -47,14 +49,16 @@ --- Makefile.in.jj 2023-11-29 13:21:41.691292507 +0100 +++ Makefile.in 2024-11-30 13:36:12.113594079 +0100 -@@ -447,9 +447,9 @@ LDFLAGS = @LDFLAGS@ +@@ -447,10 +447,10 @@ LDFLAGS = @LDFLAGS@ LIBCFLAGS = $(CFLAGS) CXXFLAGS = @CXXFLAGS@ LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates -GOCFLAGS = $(CFLAGS) +-GA68FLAGS = @GA68FLAGS@ -GDCFLAGS = @GDCFLAGS@ -GM2FLAGS = $(CFLAGS) +GOCFLAGS = $(filter-out -Wformat-security,$(CFLAGS)) ++GA68FLAGS = $(filter-out -Wformat-security,@GA68FLAGS@) +GDCFLAGS = $(filter-out -Wformat-security,@GDCFLAGS@) +GM2FLAGS = $(filter-out -Wformat-security,$(CFLAGS)) diff --git a/gcc15-d-shared-libphobos.patch b/gcc16-d-shared-libphobos.patch similarity index 100% rename from gcc15-d-shared-libphobos.patch rename to gcc16-d-shared-libphobos.patch diff --git a/gcc15-fortran-fdec-duplicates.patch b/gcc16-fortran-fdec-duplicates.patch similarity index 100% rename from gcc15-fortran-fdec-duplicates.patch rename to gcc16-fortran-fdec-duplicates.patch diff --git a/gcc15-hack.patch b/gcc16-hack.patch similarity index 100% rename from gcc15-hack.patch rename to gcc16-hack.patch diff --git a/gcc15-isl-dl.patch b/gcc16-isl-dl.patch similarity index 100% rename from gcc15-isl-dl.patch rename to gcc16-isl-dl.patch diff --git a/gcc15-isl-dl2.patch b/gcc16-isl-dl2.patch similarity index 100% rename from gcc15-isl-dl2.patch rename to gcc16-isl-dl2.patch diff --git a/gcc16-libgomp-build.patch b/gcc16-libgomp-build.patch new file mode 100644 index 0000000..d814d18 --- /dev/null +++ b/gcc16-libgomp-build.patch @@ -0,0 +1,17 @@ +2025-12-15 Jakub Jelinek + + * plugin/build-target-indirect-htab.h (create_target_indirect_map): + Use (void) htab_find instead of assert (htab_find) to silence + -Werror=unused-function because the latter triggers -Werror=address. + +--- libgomp/plugin/build-target-indirect-htab.h.jj 2025-09-17 09:03:28.934357899 +0200 ++++ libgomp/plugin/build-target-indirect-htab.h 2025-12-15 16:11:51.894866968 +0100 +@@ -65,7 +65,7 @@ void* + create_target_indirect_map (size_t *h_size, size_t count, + uint64_t *host_addrs, uint64_t *device_addrs) + { +- assert (htab_find); /* Silence -Werror=unused-function. */ ++ (void) htab_find; /* Silence -Werror=unused-function. */ + + htab_t indirect_htab = htab_create (count); + diff --git a/gcc15-libgomp-omp_h-multilib.patch b/gcc16-libgomp-omp_h-multilib.patch similarity index 100% rename from gcc15-libgomp-omp_h-multilib.patch rename to gcc16-libgomp-omp_h-multilib.patch diff --git a/gcc15-libstdc++-docs.patch b/gcc16-libstdc++-docs.patch similarity index 96% rename from gcc15-libstdc++-docs.patch rename to gcc16-libstdc++-docs.patch index f9f33a7..f1fa736 100644 --- a/gcc15-libstdc++-docs.patch +++ b/gcc16-libstdc++-docs.patch @@ -4,7 +4,7 @@ FSF

-+ Release 15.2.1 ++ Release 16.0.0 +

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation @@ -17,7 +17,7 @@

- The API documentation, rendered into HTML, can be viewed online + The API documentation, rendered into HTML, can be viewed locally -+ for the 15.2.1 release, ++ for the 16.0.0 release, + online for each GCC release and diff --git a/gcc15-libtool-no-rpath.patch b/gcc16-libtool-no-rpath.patch similarity index 100% rename from gcc15-libtool-no-rpath.patch rename to gcc16-libtool-no-rpath.patch diff --git a/gcc15-no-add-needed.patch b/gcc16-no-add-needed.patch similarity index 96% rename from gcc15-no-add-needed.patch rename to gcc16-no-add-needed.patch index 5817299..74f5c1f 100644 --- a/gcc15-no-add-needed.patch +++ b/gcc16-no-add-needed.patch @@ -34,4 +34,4 @@ +#define LINK_EH_SPEC "--no-add-needed %{!static|static-pie:--eh-frame-hdr} " #endif - #define GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC \ + diff --git a/gcc15-pr119006.patch b/gcc16-pr119006.patch similarity index 100% rename from gcc15-pr119006.patch rename to gcc16-pr119006.patch diff --git a/gcc16-pr123114.patch b/gcc16-pr123114.patch new file mode 100644 index 0000000..1e8eb9c --- /dev/null +++ b/gcc16-pr123114.patch @@ -0,0 +1,46 @@ +2025-12-13 Jakub Jelinek + + PR rtl-optimization/123114 + * simplify-rtx.cc (simplify_context::simplify_relational_operation): + Verify XEXP (XEXP (op0, 0), 0) mode and use CONST0_RTX (cmp_mode) + instead of CONST0_RTX (mode). + + * gcc.dg/pr123114.c: New test. + +--- gcc/simplify-rtx.cc.jj 2025-12-09 10:18:55.437229339 +0100 ++++ gcc/simplify-rtx.cc 2025-12-13 23:04:14.672186706 +0100 +@@ -6509,8 +6509,9 @@ simplify_context::simplify_relational_op + /* only enters if op1 is 0 */ + /* Verify IOR operand is NE */ + && GET_CODE (XEXP (op0, 0)) == NE ++ && GET_MODE (XEXP (XEXP (op0, 0), 0)) == cmp_mode + /* Verify second NE operand is 0 */ +- && XEXP (XEXP (op0, 0), 1) == CONST0_RTX (mode)) ++ && XEXP (XEXP (op0, 0), 1) == CONST0_RTX (cmp_mode)) + { + rtx t = gen_rtx_IOR (cmp_mode, XEXP (XEXP (op0, 0), 0), XEXP (op0, 1)); + t = gen_rtx_fmt_ee (code, mode, t, CONST0_RTX (mode)); +--- gcc/testsuite/gcc.dg/pr123114.c.jj 2025-12-13 23:13:53.528178273 +0100 ++++ gcc/testsuite/gcc.dg/pr123114.c 2025-12-13 23:13:25.964657498 +0100 +@@ -0,0 +1,21 @@ ++/* PR rtl-optimization/123114 */ ++/* { dg-do compile } */ ++/* { dg-options "-O3 -fno-tree-vrp" } */ ++ ++volatile int a, b, g; ++unsigned short e; ++int f; ++ ++int ++main () ++{ ++ int c, d; ++ while (a) ++ { ++ c = e = b << 2; ++ d = f; ++ g = (c <= 0 && d) || c ? 0 : d; ++ a = g; ++ } ++ return 0; ++} diff --git a/gcc16-pr123115.patch b/gcc16-pr123115.patch new file mode 100644 index 0000000..2a75016 --- /dev/null +++ b/gcc16-pr123115.patch @@ -0,0 +1,17 @@ +2025-12-15 Jakub Jelinek + + PR middle-end/123115 + * defaults.h (EH_RETURN_DATA_REGNO): Add void (N) to the macro + definition inside of a comma expression before INVALID_REGNUM. + +--- gcc/defaults.h.jj 2025-08-05 08:19:26.667814010 +0200 ++++ gcc/defaults.h 2025-12-15 11:33:16.656762266 +0100 +@@ -390,7 +390,7 @@ see the files COPYING3 and COPYING.RUNTI + /* Provide defaults for stuff that may not be defined when using + sjlj exceptions. */ + #ifndef EH_RETURN_DATA_REGNO +-#define EH_RETURN_DATA_REGNO(N) INVALID_REGNUM ++#define EH_RETURN_DATA_REGNO(N) (void (N), INVALID_REGNUM) + #endif + + /* Offset between the eh handler address and entry in eh tables. */ diff --git a/gcc16-pr123152.patch b/gcc16-pr123152.patch new file mode 100644 index 0000000..a19ca73 --- /dev/null +++ b/gcc16-pr123152.patch @@ -0,0 +1,157 @@ +The `recompute_dominator' function used in the code fragment within +this patch assumes correctness in the rest of the CFG. Consequently, +it is wrong to rely upon it before the subsequent updates are made in +the "Update dominators for multiple exits" loop in the function. + +Furthermore, if `loop_exit' == `scalar_exit', the "Update dominators for +multiple exits" logic will already take care of updating the +dominator for `scalar_exit->dest', such that the moved statement is +unnecessary. + +2025-12-18 Victor Do Nascimento + + PR tree-optimization/123152 + * tree-vect-loop-manip.cc (slpeel_tree_duplicate_loop_to_edge_cfg): + Correct order of dominator update. + + * gcc.dg/vect/vect-uncounted-prolog-peel_2.c: New. + * gcc.dg/vect/vect-uncounted-prolog-peel_3.c: Likewise. + * g++.dg/vect/vect-uncounted-prolog-peel_1.cc: Likewise. + +--- gcc/tree-vect-loop-manip.cc.jj ++++ gcc/tree-vect-loop-manip.cc +@@ -1989,11 +1989,6 @@ slpeel_tree_duplicate_loop_to_edge_cfg (class loop *loop, edge loop_exit, + flush_pending_stmts (new_exit); + set_immediate_dominator (CDI_DOMINATORS, preheader, new_exit->src); + +- if (create_main_e) +- set_immediate_dominator (CDI_DOMINATORS, scalar_exit->dest, +- recompute_dominator (CDI_DOMINATORS, +- scalar_exit->dest)); +- + /* And remove the non-necessary forwarder again. Keep the other + one so we have a proper pre-header for the loop at the exit edge. */ + redirect_edge_pred (single_succ_edge (new_preheader), +@@ -2024,6 +2019,11 @@ slpeel_tree_duplicate_loop_to_edge_cfg (class loop *loop, edge loop_exit, + } + } + } ++ ++ if (create_main_e && loop_exit != scalar_exit) ++ set_immediate_dominator (CDI_DOMINATORS, scalar_exit->dest, ++ recompute_dominator (CDI_DOMINATORS, ++ scalar_exit->dest)); + } + + free (new_bbs); +--- gcc/testsuite/g++.dg/vect/vect-uncounted-prolog-peel_1.cc.jj ++++ gcc/testsuite/g++.dg/vect/vect-uncounted-prolog-peel_1.cc +@@ -0,0 +1,51 @@ ++/* { dg-add-options vect_early_break } */ ++/* { dg-do compile } */ ++/* { dg-require-effective-target vect_early_break } */ ++/* { dg-require-effective-target vect_int } */ ++/* { dg-additional-options "-w" } */ ++ ++namespace a { ++class b { ++public: ++ b d(long); ++}; ++class e : public b {}; ++typedef short f; ++typedef struct g *h; ++typedef struct g { ++ f c; ++ e *fp; ++ f j, *k, *l; ++} m; ++static h n(m *, unsigned, unsigned *); ++f o(m *, unsigned); ++void p(short *t) { ++ m *ffile; ++ int q; ++ unsigned r; ++ int i; ++ q = t[i]; ++ n(ffile, q, &r); ++} ++h n(m *ffile, unsigned q, unsigned *) { ++ h glyph; ++ for (; glyph;) ++ if (glyph->c) ++ o(ffile, q); ++ int i; ++s: ++ for (i = 0; ffile->j; i++) ++ if (ffile->k[i]) { ++ if (q) ++ ffile->fp->d(ffile->l[i]); ++ break; ++ } ++ if (q < 6) { ++ q += 61440; ++ goto s; ++ } ++} ++} // namespace a ++ ++/* { dg-final { scan-tree-dump {note:\s*Alignment of access forced using peeling.} "vect" } } */ ++/* { dg-final { scan-tree-dump {vectorized 1 loops in function} "vect" } } */ +--- gcc/testsuite/gcc.dg/vect/vect-uncounted-prolog-peel_2.c.jj ++++ gcc/testsuite/gcc.dg/vect/vect-uncounted-prolog-peel_2.c +@@ -0,0 +1,25 @@ ++/* { dg-add-options vect_early_break } */ ++/* { dg-do compile } */ ++/* { dg-require-effective-target vect_early_break } */ ++/* { dg-require-effective-target vect_int } */ ++ ++char b; ++int c(char *d) { ++ int *a = 0; ++ while (*d) { ++ while (*a) ++ if (*a++ == 1) ++ return 1; ++ d++; ++ } ++} ++void e() { ++ c(&b); ++ char *f = &b; ++ while (f[0]) ++ ++b; ++} ++ ++/* { dg-final { scan-tree-dump {note:\s*Alignment of access forced using peeling.} "vect" } } */ ++/* { dg-final { scan-tree-dump {if \(ivtmp_[0-9_]+ >= prolog_loop_niters.[0-9_]+\)\n\s*goto} "vect" } } */ ++/* { dg-final { scan-tree-dump {vectorized 1 loops in function} "vect" } } */ +--- gcc/testsuite/gcc.dg/vect/vect-uncounted-prolog-peel_3.c.jj ++++ gcc/testsuite/gcc.dg/vect/vect-uncounted-prolog-peel_3.c +@@ -0,0 +1,26 @@ ++/* { dg-add-options vect_early_break } */ ++/* { dg-do compile } */ ++/* { dg-require-effective-target vect_early_break } */ ++/* { dg-require-effective-target vect_int } */ ++ ++struct { ++ int segments[]; ++} seek_to_sample_coarse_f; ++ ++int seek_to_sample_coarse_i, seek_to_sample_coarse_f_1; ++ ++void seek_to_sample_coarse() { ++ int end_pos = seek_to_sample_coarse_f_1; ++ for (;;) { ++ seek_to_sample_coarse_i = end_pos; ++ for (; end_pos > 0; --end_pos) ++ if (seek_to_sample_coarse_f.segments[end_pos - 1]) ++ break; ++ if (end_pos) ++ break; ++ } ++} ++ ++/* { dg-final { scan-tree-dump {note:\s*Alignment of access forced using peeling.} "vect" } } */ ++/* { dg-final { scan-tree-dump {if \(ivtmp_[0-9_]+ >= prolog_loop_niters.[0-9_]+\)\n\s*goto} "vect" } } */ ++/* { dg-final { scan-tree-dump {vectorized 1 loops in function} "vect" } } */ diff --git a/gcc15-rh1574936.patch b/gcc16-rh1574936.patch similarity index 100% rename from gcc15-rh1574936.patch rename to gcc16-rh1574936.patch diff --git a/gcc15-sparc-config-detection.patch b/gcc16-sparc-config-detection.patch similarity index 100% rename from gcc15-sparc-config-detection.patch rename to gcc16-sparc-config-detection.patch diff --git a/sources b/sources index 5429ac5..6f41a0a 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (gcc-15.2.1-20251211.tar.xz) = 9ad5a1ef0f21327fafe37eb52a2e8ff4ebd773c34e9a70053fa70436fa7d35b1eb3b85f0a38211b06fba3fc6a3e35dcb939822d0c0eca1592ea24aa6b2726c99 +SHA512 (gcc-16.0.0-20251218.tar.xz) = ba37982b367362a525395b4c55a5e289176145e65eb96069a9a889ef0290ad47c3376c4b4877ec0e6efe9724b55c03e75824661a7199eee73109d8f1b50485ae SHA512 (isl-0.24.tar.bz2) = aab3bddbda96b801d0f56d2869f943157aad52a6f6e6a61745edd740234c635c38231af20bc3f1a08d416a5e973a90e18249078ed8e4ae2f1d5de57658738e95 SHA512 (newlib-cygwin-d35cc82b5ec15bb8a5fe0fe11e183d1887992e99.tar.xz) = ef9495745a96d1d76f9f425c4a48c807fface36a1aa92351c5d024103678d144d046e8de55d195103784472c14874e29e4b9284d5d6a2e7bb27fd98c8455a881 SHA512 (nvptx-tools-a0c1fff6534a4df9fb17937c3c4a4b1071212029.tar.xz) = 7f862986065028df70c843fc3f2c89e200a76b48ad0bd51c749ac8a5aab7be0ebdf35be182fad2407b3281615e75be1ac6833ab6a5130ae9920169a0412f94f0 From f184fa5d6b9425fa8cdfda4a474134e0af5723c3 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 18 Dec 2025 17:45:18 +0100 Subject: [PATCH 02/12] gcc-16.0.0-0.2 --- gcc.spec | 1 - gcc16-libgomp-build.patch | 17 ----------------- 2 files changed, 18 deletions(-) delete mode 100644 gcc16-libgomp-build.patch diff --git a/gcc.spec b/gcc.spec index c1ba99a..449537f 100644 --- a/gcc.spec +++ b/gcc.spec @@ -320,7 +320,6 @@ Patch12: gcc16-pr119006.patch Patch13: gcc16-pr123152.patch Patch14: gcc16-pr123114.patch Patch15: gcc16-pr123115.patch -Patch16: gcc16-libgomp-build.patch Patch50: isl-rh2155127.patch diff --git a/gcc16-libgomp-build.patch b/gcc16-libgomp-build.patch deleted file mode 100644 index d814d18..0000000 --- a/gcc16-libgomp-build.patch +++ /dev/null @@ -1,17 +0,0 @@ -2025-12-15 Jakub Jelinek - - * plugin/build-target-indirect-htab.h (create_target_indirect_map): - Use (void) htab_find instead of assert (htab_find) to silence - -Werror=unused-function because the latter triggers -Werror=address. - ---- libgomp/plugin/build-target-indirect-htab.h.jj 2025-09-17 09:03:28.934357899 +0200 -+++ libgomp/plugin/build-target-indirect-htab.h 2025-12-15 16:11:51.894866968 +0100 -@@ -65,7 +65,7 @@ void* - create_target_indirect_map (size_t *h_size, size_t count, - uint64_t *host_addrs, uint64_t *device_addrs) - { -- assert (htab_find); /* Silence -Werror=unused-function. */ -+ (void) htab_find; /* Silence -Werror=unused-function. */ - - htab_t indirect_htab = htab_create (count); - From 54fd0a9c601745b8d0113f3784bd00a8827ce018 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 20 Dec 2025 19:06:25 +0100 Subject: [PATCH 03/12] 16.0.0-0.3 --- .gitignore | 1 + gcc.spec | 24 +++++-- gcc16-pr123152.patch | 157 ------------------------------------------- sources | 2 +- 4 files changed, 20 insertions(+), 164 deletions(-) delete mode 100644 gcc16-pr123152.patch diff --git a/.gitignore b/.gitignore index 02b5869..89bdb24 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ /gcc-15.2.1-20251111.tar.xz /gcc-15.2.1-20251211.tar.xz /gcc-16.0.0-20251218.tar.xz +/gcc-16.0.0-20251220.tar.xz diff --git a/gcc.spec b/gcc.spec index 449537f..278d014 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,5 +1,5 @@ -%global DATE 20251218 -%global gitrev f73d23f06a1b8aa7cdce95a6092c0ce0f5650a00 +%global DATE 20251220 +%global gitrev ac4db8ee4097571c12b053c4724d2ca8b98dcfe9 %global gcc_version 16.0.0 %global gcc_major 16 # Note, gcc_release must be integer, if you want to add suffixes to @@ -158,7 +158,7 @@ Summary: Various compilers (C, C++, Objective-C, ...) Name: gcc Version: %{gcc_version} -Release: %{gcc_release}.2%{?dist} +Release: %{gcc_release}.3%{?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 @@ -317,9 +317,8 @@ Patch9: gcc16-Wno-format-security.patch Patch10: gcc16-rh1574936.patch Patch11: gcc16-d-shared-libphobos.patch Patch12: gcc16-pr119006.patch -Patch13: gcc16-pr123152.patch -Patch14: gcc16-pr123114.patch -Patch15: gcc16-pr123115.patch +Patch13: gcc16-pr123114.patch +Patch14: gcc16-pr123115.patch Patch50: isl-rh2155127.patch @@ -3937,5 +3936,18 @@ end %endif %changelog +* Sat Dec 20 2025 Jakub Jelinek 16.0.0-0.3 +- update from trunk + - PRs bootstrap/12407, c/123156, c++/91388, c++/117034, c++/122070, + c++/122509, c++/122690, c++/122712, c++/122772, c++/122834, + c++/122922, c++/122995, c++/123030, c++/123044, c++/123186, + debug/122968, fortran/71565, fortran/92613, libstdc++/112591, + libstdc++/123147, libstdc++/123180, rtl-optimization/123223, + target/55212, target/122970, target/123171, target/123216, + target/123217, tree-optimization/122734, tree-optimization/123097, + tree-optimization/123117, tree-optimization/123118, + tree-optimization/123152, tree-optimization/123153, + tree-optimization/123192, tree-optimization/123205 + * Thu Dec 18 2025 Jakub Jelinek 16.0.0-0.2 - new package diff --git a/gcc16-pr123152.patch b/gcc16-pr123152.patch deleted file mode 100644 index a19ca73..0000000 --- a/gcc16-pr123152.patch +++ /dev/null @@ -1,157 +0,0 @@ -The `recompute_dominator' function used in the code fragment within -this patch assumes correctness in the rest of the CFG. Consequently, -it is wrong to rely upon it before the subsequent updates are made in -the "Update dominators for multiple exits" loop in the function. - -Furthermore, if `loop_exit' == `scalar_exit', the "Update dominators for -multiple exits" logic will already take care of updating the -dominator for `scalar_exit->dest', such that the moved statement is -unnecessary. - -2025-12-18 Victor Do Nascimento - - PR tree-optimization/123152 - * tree-vect-loop-manip.cc (slpeel_tree_duplicate_loop_to_edge_cfg): - Correct order of dominator update. - - * gcc.dg/vect/vect-uncounted-prolog-peel_2.c: New. - * gcc.dg/vect/vect-uncounted-prolog-peel_3.c: Likewise. - * g++.dg/vect/vect-uncounted-prolog-peel_1.cc: Likewise. - ---- gcc/tree-vect-loop-manip.cc.jj -+++ gcc/tree-vect-loop-manip.cc -@@ -1989,11 +1989,6 @@ slpeel_tree_duplicate_loop_to_edge_cfg (class loop *loop, edge loop_exit, - flush_pending_stmts (new_exit); - set_immediate_dominator (CDI_DOMINATORS, preheader, new_exit->src); - -- if (create_main_e) -- set_immediate_dominator (CDI_DOMINATORS, scalar_exit->dest, -- recompute_dominator (CDI_DOMINATORS, -- scalar_exit->dest)); -- - /* And remove the non-necessary forwarder again. Keep the other - one so we have a proper pre-header for the loop at the exit edge. */ - redirect_edge_pred (single_succ_edge (new_preheader), -@@ -2024,6 +2019,11 @@ slpeel_tree_duplicate_loop_to_edge_cfg (class loop *loop, edge loop_exit, - } - } - } -+ -+ if (create_main_e && loop_exit != scalar_exit) -+ set_immediate_dominator (CDI_DOMINATORS, scalar_exit->dest, -+ recompute_dominator (CDI_DOMINATORS, -+ scalar_exit->dest)); - } - - free (new_bbs); ---- gcc/testsuite/g++.dg/vect/vect-uncounted-prolog-peel_1.cc.jj -+++ gcc/testsuite/g++.dg/vect/vect-uncounted-prolog-peel_1.cc -@@ -0,0 +1,51 @@ -+/* { dg-add-options vect_early_break } */ -+/* { dg-do compile } */ -+/* { dg-require-effective-target vect_early_break } */ -+/* { dg-require-effective-target vect_int } */ -+/* { dg-additional-options "-w" } */ -+ -+namespace a { -+class b { -+public: -+ b d(long); -+}; -+class e : public b {}; -+typedef short f; -+typedef struct g *h; -+typedef struct g { -+ f c; -+ e *fp; -+ f j, *k, *l; -+} m; -+static h n(m *, unsigned, unsigned *); -+f o(m *, unsigned); -+void p(short *t) { -+ m *ffile; -+ int q; -+ unsigned r; -+ int i; -+ q = t[i]; -+ n(ffile, q, &r); -+} -+h n(m *ffile, unsigned q, unsigned *) { -+ h glyph; -+ for (; glyph;) -+ if (glyph->c) -+ o(ffile, q); -+ int i; -+s: -+ for (i = 0; ffile->j; i++) -+ if (ffile->k[i]) { -+ if (q) -+ ffile->fp->d(ffile->l[i]); -+ break; -+ } -+ if (q < 6) { -+ q += 61440; -+ goto s; -+ } -+} -+} // namespace a -+ -+/* { dg-final { scan-tree-dump {note:\s*Alignment of access forced using peeling.} "vect" } } */ -+/* { dg-final { scan-tree-dump {vectorized 1 loops in function} "vect" } } */ ---- gcc/testsuite/gcc.dg/vect/vect-uncounted-prolog-peel_2.c.jj -+++ gcc/testsuite/gcc.dg/vect/vect-uncounted-prolog-peel_2.c -@@ -0,0 +1,25 @@ -+/* { dg-add-options vect_early_break } */ -+/* { dg-do compile } */ -+/* { dg-require-effective-target vect_early_break } */ -+/* { dg-require-effective-target vect_int } */ -+ -+char b; -+int c(char *d) { -+ int *a = 0; -+ while (*d) { -+ while (*a) -+ if (*a++ == 1) -+ return 1; -+ d++; -+ } -+} -+void e() { -+ c(&b); -+ char *f = &b; -+ while (f[0]) -+ ++b; -+} -+ -+/* { dg-final { scan-tree-dump {note:\s*Alignment of access forced using peeling.} "vect" } } */ -+/* { dg-final { scan-tree-dump {if \(ivtmp_[0-9_]+ >= prolog_loop_niters.[0-9_]+\)\n\s*goto} "vect" } } */ -+/* { dg-final { scan-tree-dump {vectorized 1 loops in function} "vect" } } */ ---- gcc/testsuite/gcc.dg/vect/vect-uncounted-prolog-peel_3.c.jj -+++ gcc/testsuite/gcc.dg/vect/vect-uncounted-prolog-peel_3.c -@@ -0,0 +1,26 @@ -+/* { dg-add-options vect_early_break } */ -+/* { dg-do compile } */ -+/* { dg-require-effective-target vect_early_break } */ -+/* { dg-require-effective-target vect_int } */ -+ -+struct { -+ int segments[]; -+} seek_to_sample_coarse_f; -+ -+int seek_to_sample_coarse_i, seek_to_sample_coarse_f_1; -+ -+void seek_to_sample_coarse() { -+ int end_pos = seek_to_sample_coarse_f_1; -+ for (;;) { -+ seek_to_sample_coarse_i = end_pos; -+ for (; end_pos > 0; --end_pos) -+ if (seek_to_sample_coarse_f.segments[end_pos - 1]) -+ break; -+ if (end_pos) -+ break; -+ } -+} -+ -+/* { dg-final { scan-tree-dump {note:\s*Alignment of access forced using peeling.} "vect" } } */ -+/* { dg-final { scan-tree-dump {if \(ivtmp_[0-9_]+ >= prolog_loop_niters.[0-9_]+\)\n\s*goto} "vect" } } */ -+/* { dg-final { scan-tree-dump {vectorized 1 loops in function} "vect" } } */ diff --git a/sources b/sources index 6f41a0a..7fdac69 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (gcc-16.0.0-20251218.tar.xz) = ba37982b367362a525395b4c55a5e289176145e65eb96069a9a889ef0290ad47c3376c4b4877ec0e6efe9724b55c03e75824661a7199eee73109d8f1b50485ae +SHA512 (gcc-16.0.0-20251220.tar.xz) = b705797b1ab6b8c8d2c41782c8b59642daf8d6d162ea62ebe611fd78bbc2d951f9f5b7cf68c0e4d9f68bdd6712cd91291c1657c1dbb3876e317a75d658aa9205 SHA512 (isl-0.24.tar.bz2) = aab3bddbda96b801d0f56d2869f943157aad52a6f6e6a61745edd740234c635c38231af20bc3f1a08d416a5e973a90e18249078ed8e4ae2f1d5de57658738e95 SHA512 (newlib-cygwin-d35cc82b5ec15bb8a5fe0fe11e183d1887992e99.tar.xz) = ef9495745a96d1d76f9f425c4a48c807fface36a1aa92351c5d024103678d144d046e8de55d195103784472c14874e29e4b9284d5d6a2e7bb27fd98c8455a881 SHA512 (nvptx-tools-a0c1fff6534a4df9fb17937c3c4a4b1071212029.tar.xz) = 7f862986065028df70c843fc3f2c89e200a76b48ad0bd51c749ac8a5aab7be0ebdf35be182fad2407b3281615e75be1ac6833ab6a5130ae9920169a0412f94f0 From 406a54e096359d42f5774227898bf158ba8b096c Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 3 Jan 2026 13:41:22 +0100 Subject: [PATCH 04/12] 16.0.0-0.4 --- .gitignore | 1 + gcc.spec | 31 ++++++++++++++++++---- gcc16-pr120250.patch | 61 ++++++++++++++++++++++++++++++++++++++++++++ gcc16-pr123114.patch | 46 --------------------------------- gcc16-pr123372.patch | 49 +++++++++++++++++++++++++++++++++++ sources | 2 +- 6 files changed, 138 insertions(+), 52 deletions(-) create mode 100644 gcc16-pr120250.patch delete mode 100644 gcc16-pr123114.patch create mode 100644 gcc16-pr123372.patch diff --git a/.gitignore b/.gitignore index 89bdb24..b12b8aa 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ /gcc-15.2.1-20251211.tar.xz /gcc-16.0.0-20251218.tar.xz /gcc-16.0.0-20251220.tar.xz +/gcc-16.0.0-20260103.tar.xz diff --git a/gcc.spec b/gcc.spec index 278d014..61bfc5c 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,5 +1,5 @@ -%global DATE 20251220 -%global gitrev ac4db8ee4097571c12b053c4724d2ca8b98dcfe9 +%global DATE 20260103 +%global gitrev b48538f45d8b883ab0ed4e77c445dc12b122cb3a %global gcc_version 16.0.0 %global gcc_major 16 # Note, gcc_release must be integer, if you want to add suffixes to @@ -158,7 +158,7 @@ Summary: Various compilers (C, C++, Objective-C, ...) Name: gcc Version: %{gcc_version} -Release: %{gcc_release}.3%{?dist} +Release: %{gcc_release}.4%{?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 @@ -293,6 +293,9 @@ Requires: glibc >= 2.16 %endif Requires: libgcc >= %{version}-%{release} Requires: libgomp = %{version}-%{release} +%if %{build_libatomic} +Requires: libatomic = %{version}-%{release} +%endif # lto-wrapper invokes make Requires: make %if !%{build_ada} @@ -317,8 +320,9 @@ Patch9: gcc16-Wno-format-security.patch Patch10: gcc16-rh1574936.patch Patch11: gcc16-d-shared-libphobos.patch Patch12: gcc16-pr119006.patch -Patch13: gcc16-pr123114.patch -Patch14: gcc16-pr123115.patch +Patch13: gcc16-pr123115.patch +Patch14: gcc16-pr120250.patch +Patch15: gcc16-pr123372.patch Patch50: isl-rh2155127.patch @@ -3936,6 +3940,23 @@ end %endif %changelog +* Sat Jan 3 2026 Jakub Jelinek 16.0.0-0.4 +- update from trunk + - PRs ada/123060, ada/123088, ada/123185, ada/123289, ada/123302, + ada/123306, ada/15605, c++/117518, c++/119097, c++/120005, c++/121864, + c++/122550, c++/122690, c++/122712, c++/122819, c++/122958, + c++/122994, c++/123080, c++/123261, c++/123277, fortran/101399, + fortran/121472, fortran/121475, fortran/122957, fortran/123201, + fortran/123253, libfortran/119136, middle-end/123067, + middle-end/123222, other/122243, rtl-optimization/123114, + rtl-optimization/123267, rtl-optimization/123276, + rtl-optimization/123295, rtl-optimization/123308, target/121485, + target/122769, target/123216, target/123217, target/123274, + target/123278, target/123283, target/123318, testsuite/123299, + testsuite/123334, tree-optimization/123089 +- require libatomic package from gcc package as -latomic is now linked + as-needed by default + * Sat Dec 20 2025 Jakub Jelinek 16.0.0-0.3 - update from trunk - PRs bootstrap/12407, c/123156, c++/91388, c++/117034, c++/122070, diff --git a/gcc16-pr120250.patch b/gcc16-pr120250.patch new file mode 100644 index 0000000..96aa78b --- /dev/null +++ b/gcc16-pr120250.patch @@ -0,0 +1,61 @@ +2025-11-20 Jakub Jelinek + + PR target/120250 + * combine.cc (recog_for_combine): Don't try to put SET_SRC + into a constant pool if SET_DEST is pc_rtx. + + * gcc.c-torture/compile/pr120250.c: New test. + +--- gcc/combine.cc.jj 2025-10-21 11:27:04.884882995 +0200 ++++ gcc/combine.cc 2025-11-19 15:03:23.350157882 +0100 +@@ -11759,7 +11759,8 @@ recog_for_combine (rtx *pnewpat, rtx_ins + rtx src = SET_SRC (pat); + if (CONSTANT_P (src) + && !CONST_INT_P (src) +- && crtl->uses_const_pool) ++ && crtl->uses_const_pool ++ && SET_DEST (pat) != pc_rtx) + { + machine_mode mode = GET_MODE (src); + if (mode == VOIDmode) +--- gcc/testsuite/gcc.c-torture/compile/pr120250.c.jj 2025-11-19 15:28:12.937891927 +0100 ++++ gcc/testsuite/gcc.c-torture/compile/pr120250.c 2025-11-19 15:27:53.225174446 +0100 +@@ -0,0 +1,38 @@ ++/* PR target/120250 */ ++ ++int a = 5, b = 7, c, *d; ++void *l; ++void foo (const char *s); ++void bar (void); ++void qux (const char *, int); ++ ++int ++baz (int *d, int a, int b) ++{ ++ int c = 0; ++ for (int i = 0; i < a; ++i) ++ for (int j = 0; j < b; ++j) ++ c += d[i * b + j]; ++ return c; ++} ++ ++int ++main () ++{ ++ d = __builtin_malloc (a * b * sizeof (int)); ++ if (!d) ++ { ++ foo ("foo"); ++ __builtin_exit (1); ++ } ++ for (int i = 0; i < a; ++i) ++ for (int j = 0; j < b; ++j) ++ d[i * b + j] = i * b + j; ++ l = (void *) &bar; ++ goto *l; ++bar: ++ c = baz (d, a, b); ++ qux ("bar", c); ++ __builtin_free (d); ++ return 0; ++} diff --git a/gcc16-pr123114.patch b/gcc16-pr123114.patch deleted file mode 100644 index 1e8eb9c..0000000 --- a/gcc16-pr123114.patch +++ /dev/null @@ -1,46 +0,0 @@ -2025-12-13 Jakub Jelinek - - PR rtl-optimization/123114 - * simplify-rtx.cc (simplify_context::simplify_relational_operation): - Verify XEXP (XEXP (op0, 0), 0) mode and use CONST0_RTX (cmp_mode) - instead of CONST0_RTX (mode). - - * gcc.dg/pr123114.c: New test. - ---- gcc/simplify-rtx.cc.jj 2025-12-09 10:18:55.437229339 +0100 -+++ gcc/simplify-rtx.cc 2025-12-13 23:04:14.672186706 +0100 -@@ -6509,8 +6509,9 @@ simplify_context::simplify_relational_op - /* only enters if op1 is 0 */ - /* Verify IOR operand is NE */ - && GET_CODE (XEXP (op0, 0)) == NE -+ && GET_MODE (XEXP (XEXP (op0, 0), 0)) == cmp_mode - /* Verify second NE operand is 0 */ -- && XEXP (XEXP (op0, 0), 1) == CONST0_RTX (mode)) -+ && XEXP (XEXP (op0, 0), 1) == CONST0_RTX (cmp_mode)) - { - rtx t = gen_rtx_IOR (cmp_mode, XEXP (XEXP (op0, 0), 0), XEXP (op0, 1)); - t = gen_rtx_fmt_ee (code, mode, t, CONST0_RTX (mode)); ---- gcc/testsuite/gcc.dg/pr123114.c.jj 2025-12-13 23:13:53.528178273 +0100 -+++ gcc/testsuite/gcc.dg/pr123114.c 2025-12-13 23:13:25.964657498 +0100 -@@ -0,0 +1,21 @@ -+/* PR rtl-optimization/123114 */ -+/* { dg-do compile } */ -+/* { dg-options "-O3 -fno-tree-vrp" } */ -+ -+volatile int a, b, g; -+unsigned short e; -+int f; -+ -+int -+main () -+{ -+ int c, d; -+ while (a) -+ { -+ c = e = b << 2; -+ d = f; -+ g = (c <= 0 && d) || c ? 0 : d; -+ a = g; -+ } -+ return 0; -+} diff --git a/gcc16-pr123372.patch b/gcc16-pr123372.patch new file mode 100644 index 0000000..1f75086 --- /dev/null +++ b/gcc16-pr123372.patch @@ -0,0 +1,49 @@ +2026-01-03 Jakub Jelinek + + PR tree-optimization/123372 + * tree-ssa-math-opts.cc + (build_saturation_binary_arith_call_and_replace): Pass type of op_0 + rather than type of lhs as second argument to + direct_internal_fn_supported_p. + + * gcc.dg/tree-ssa/pr123372.c: New test. + +--- gcc/tree-ssa-math-opts.cc.jj 2026-01-02 09:56:10.390332748 +0100 ++++ gcc/tree-ssa-math-opts.cc 2026-01-02 18:45:57.087546705 +0100 +@@ -4083,7 +4083,7 @@ build_saturation_binary_arith_call_and_r + internal_fn fn, tree lhs, + tree op_0, tree op_1) + { +- if (direct_internal_fn_supported_p (fn, TREE_TYPE (lhs), OPTIMIZE_FOR_BOTH)) ++ if (direct_internal_fn_supported_p (fn, TREE_TYPE (op_0), OPTIMIZE_FOR_BOTH)) + { + gcall *call = gimple_build_call_internal (fn, 2, op_0, op_1); + gimple_call_set_lhs (call, lhs); +--- gcc/testsuite/gcc.dg/tree-ssa/pr123372.c.jj 2026-01-02 18:49:45.419717435 +0100 ++++ gcc/testsuite/gcc.dg/tree-ssa/pr123372.c 2026-01-02 18:51:22.256093427 +0100 +@@ -0,0 +1,25 @@ ++/* PR tree-optimization/123372 */ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -fgimple" } */ ++ ++#ifdef __SIZEOF_INT128__ ++#define T unsigned __int128 ++#else ++#define T unsigned long long ++#endif ++ ++unsigned int __GIMPLE (ssa,startwith("phiopt4")) ++foo (T a, T b) ++{ ++ T _4; ++ unsigned int _1; ++ bool _5; ++ unsigned int _6; ++ ++ __BB(2): ++ _5 = a_2(D) >= b_3(D); ++ _4 = a_2(D) - b_3(D); ++ _6 = (unsigned int) _4; ++ _1 = _5 ? _6 : 0U; ++ return _1; ++} diff --git a/sources b/sources index 7fdac69..bfe5a8f 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (gcc-16.0.0-20251220.tar.xz) = b705797b1ab6b8c8d2c41782c8b59642daf8d6d162ea62ebe611fd78bbc2d951f9f5b7cf68c0e4d9f68bdd6712cd91291c1657c1dbb3876e317a75d658aa9205 +SHA512 (gcc-16.0.0-20260103.tar.xz) = cc9c1dcc04eec3ef8357320cac1e1f51166832061a065ba2391d1888a8eddbb4436073c0c3db6c33cd8f79ad1a1cfb35f867a57ed6cbc25f57980b5f60f8fa76 SHA512 (isl-0.24.tar.bz2) = aab3bddbda96b801d0f56d2869f943157aad52a6f6e6a61745edd740234c635c38231af20bc3f1a08d416a5e973a90e18249078ed8e4ae2f1d5de57658738e95 SHA512 (newlib-cygwin-d35cc82b5ec15bb8a5fe0fe11e183d1887992e99.tar.xz) = ef9495745a96d1d76f9f425c4a48c807fface36a1aa92351c5d024103678d144d046e8de55d195103784472c14874e29e4b9284d5d6a2e7bb27fd98c8455a881 SHA512 (nvptx-tools-a0c1fff6534a4df9fb17937c3c4a4b1071212029.tar.xz) = 7f862986065028df70c843fc3f2c89e200a76b48ad0bd51c749ac8a5aab7be0ebdf35be182fad2407b3281615e75be1ac6833ab6a5130ae9920169a0412f94f0 From 55e669d29afecbf8713ba2e25f3f274800e4cf2b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 3 Jan 2026 14:04:21 +0100 Subject: [PATCH 05/12] 16.0.0-0.4 --- gcc16-hack.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc16-hack.patch b/gcc16-hack.patch index 9c5d57b..61331bf 100644 --- a/gcc16-hack.patch +++ b/gcc16-hack.patch @@ -64,7 +64,7 @@ + infodir="$(infodir)" \ GOCFLAGS="$(GOCFLAGS) $${flags}" \ GDCFLAGS="$(GDCFLAGS) $${flags}" \ - CXXFLAGS="$(CXXFLAGS) $${flags}" \ + A68FLAGS="$(A68FLAGS) $${flags}" \ --- libcpp/macro.cc.jj 2019-01-09 13:01:21.420552123 +0100 +++ libcpp/macro.cc 2024-11-30 13:16:41.163056391 +0100 @@ -3680,8 +3680,6 @@ static cpp_macro * From 461b2c1a00bdd7f452451952996e8b89f3e9088b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 3 Jan 2026 14:24:24 +0100 Subject: [PATCH 06/12] 16.0.0-0.4 --- gcc.spec | 41 ++++++----------------------------------- 1 file changed, 6 insertions(+), 35 deletions(-) diff --git a/gcc.spec b/gcc.spec index 61bfc5c..8ca074a 100644 --- a/gcc.spec +++ b/gcc.spec @@ -295,6 +295,7 @@ Requires: libgcc >= %{version}-%{release} Requires: libgomp = %{version}-%{release} %if %{build_libatomic} Requires: libatomic = %{version}-%{release} +Obsoletes: libatomic-static < %{version}-%{release} %endif # lto-wrapper invokes make Requires: make @@ -746,13 +747,6 @@ This package contains the GNU Atomic library which is a GCC support runtime library for atomic operations not supported by hardware. -%package -n libatomic-static -Summary: The GNU Atomic static library -Requires: libatomic = %{version}-%{release} - -%description -n libatomic-static -This package contains GNU Atomic static libraries. - %package -n libasan Summary: The Address Sanitizer runtime library @@ -1958,7 +1952,7 @@ mv -f %{buildroot}%{_prefix}/%{_lib}/libga68.*a $FULLLPATH/ mv -f %{buildroot}%{_prefix}/%{_lib}/libitm.*a $FULLLPATH/ %endif %if %{build_libatomic} -mv -f %{buildroot}%{_prefix}/%{_lib}/libatomic.*a $FULLLPATH/ +mv -f %{buildroot}%{_prefix}/%{_lib}/libatomic.*a $FULLPATH/ %endif %if %{build_libasan} mv -f %{buildroot}%{_prefix}/%{_lib}/libasan.*a $FULLLPATH/ @@ -2073,6 +2067,7 @@ echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libitm.so.1.* | sed 's,^.* rm -f libatomic.so echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libatomic.so.1.* | sed 's,^.*liba,liba,'`' )' > libatomic.so echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libatomic.so.1.* | sed 's,^.*liba,liba,'`' )' > 64/libatomic.so +mv -f %{buildroot}%{_prefix}/lib64/libatomic.*a 64/ %endif %if %{build_libasan} rm -f libasan.so @@ -2127,10 +2122,6 @@ ln -sf ../lib64/libga68.a 64/libga68.a ln -sf lib32/libitm.a libitm.a ln -sf ../lib64/libitm.a 64/libitm.a %endif -%if %{build_libatomic} -ln -sf lib32/libatomic.a libatomic.a -ln -sf ../lib64/libatomic.a 64/libatomic.a -%endif %if %{build_libasan} ln -sf lib32/libasan.a libasan.a ln -sf ../lib64/libasan.a 64/libasan.a @@ -2208,6 +2199,7 @@ echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libitm.so.1.* | sed 's,^.* rm -f libatomic.so echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libatomic.so.1.* | sed 's,^.*liba,liba,'`' )' > libatomic.so echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libatomic.so.1.* | sed 's,^.*liba,liba,'`' )' > 32/libatomic.so +mv -f %{buildroot}%{_prefix}/lib/libatomic.*a 32/ %endif %if %{build_libasan} rm -f libasan.so @@ -2264,10 +2256,6 @@ ln -sf lib64/libga68.a libga68.a ln -sf ../lib32/libitm.a 32/libitm.a ln -sf lib64/libitm.a libitm.a %endif -%if %{build_libatomic} -ln -sf ../lib32/libatomic.a 32/libatomic.a -ln -sf lib64/libatomic.a libatomic.a -%endif %if %{build_libasan} ln -sf ../lib32/libasan.a 32/libasan.a ln -sf lib64/libasan.a libasan.a @@ -2318,9 +2306,6 @@ ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libga6 %if %{build_libitm} ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libitm.a 32/libitm.a %endif -%if %{build_libatomic} -ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libatomic.a 32/libatomic.a -%endif %if %{build_libasan} ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libasan.a 32/libasan.a %endif @@ -3028,6 +3013,7 @@ end %endif %else %if %{build_libatomic} +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libatomic.a %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libatomic.so %endif %if %{build_libasan} @@ -3632,22 +3618,6 @@ end %if %{build_libatomic} %files -n libatomic %{_prefix}/%{_lib}/libatomic.so.1* - -%files -n libatomic-static -%dir %{_prefix}/lib/gcc -%dir %{_prefix}/lib/gcc/%{gcc_target_platform} -%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major} -%ifarch sparcv9 ppc -%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib32 -%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib32/libatomic.a -%endif -%ifarch sparc64 ppc64 ppc64p7 -%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib64 -%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib64/libatomic.a -%endif -%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7 -%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libatomic.a -%endif %doc rpm.doc/changelogs/libatomic/ChangeLog* %endif @@ -3956,6 +3926,7 @@ end testsuite/123334, tree-optimization/123089 - require libatomic package from gcc package as -latomic is now linked as-needed by default +- remove libatomic-static package, move libatomic.a into gcc package * Sat Dec 20 2025 Jakub Jelinek 16.0.0-0.3 - update from trunk From 2df9f5e1831b0143b359addf7e09e7d5c67d9fa4 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 3 Jan 2026 14:56:53 +0100 Subject: [PATCH 07/12] 16.0.0-0.4 --- gcc16-Wno-format-security.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc16-Wno-format-security.patch b/gcc16-Wno-format-security.patch index 9f4a8f9..2a4f0f3 100644 --- a/gcc16-Wno-format-security.patch +++ b/gcc16-Wno-format-security.patch @@ -37,11 +37,11 @@ CXXFLAGS = @CXXFLAGS@ LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates -GOCFLAGS = $(CFLAGS) --GA68FLAGS = @GA68FLAGS@ +-A68FLAGS = @A68FLAGS@ -GDCFLAGS = @GDCFLAGS@ -GM2FLAGS = $(CFLAGS) +GOCFLAGS = $(filter-out -Wformat-security,$(CFLAGS)) -+GA68FLAGS = $(filter-out -Wformat-security,@GA68FLAGS@) ++A68FLAGS = $(filter-out -Wformat-security,@A68FLAGS@) +GDCFLAGS = $(filter-out -Wformat-security,@GDCFLAGS@) +GM2FLAGS = $(filter-out -Wformat-security,$(CFLAGS)) @@ -54,11 +54,11 @@ CXXFLAGS = @CXXFLAGS@ LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates -GOCFLAGS = $(CFLAGS) --GA68FLAGS = @GA68FLAGS@ +-A68FLAGS = @A68FLAGS@ -GDCFLAGS = @GDCFLAGS@ -GM2FLAGS = $(CFLAGS) +GOCFLAGS = $(filter-out -Wformat-security,$(CFLAGS)) -+GA68FLAGS = $(filter-out -Wformat-security,@GA68FLAGS@) ++A68FLAGS = $(filter-out -Wformat-security,@A68FLAGS@) +GDCFLAGS = $(filter-out -Wformat-security,@GDCFLAGS@) +GM2FLAGS = $(filter-out -Wformat-security,$(CFLAGS)) From bf9047fd71076d22b6887c2cd3375d81467f7892 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 10 Jan 2026 11:57:52 +0100 Subject: [PATCH 08/12] 16.0.0-0.5 --- .gitignore | 1 + gcc.spec | 41 ++++++++++++++++++++++++++++--- gcc16-pr123189.patch | 58 ++++++++++++++++++++++++++++++++++++++++++++ gcc16-pr123273.patch | 54 +++++++++++++++++++++++++++++++++++++++++ gcc16-pr123372.patch | 49 ------------------------------------- sources | 2 +- 6 files changed, 151 insertions(+), 54 deletions(-) create mode 100644 gcc16-pr123189.patch create mode 100644 gcc16-pr123273.patch delete mode 100644 gcc16-pr123372.patch diff --git a/.gitignore b/.gitignore index b12b8aa..2196596 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ /gcc-16.0.0-20251218.tar.xz /gcc-16.0.0-20251220.tar.xz /gcc-16.0.0-20260103.tar.xz +/gcc-16.0.0-20260110.tar.xz diff --git a/gcc.spec b/gcc.spec index 8ca074a..4d79f03 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,5 +1,5 @@ -%global DATE 20260103 -%global gitrev b48538f45d8b883ab0ed4e77c445dc12b122cb3a +%global DATE 20260110 +%global gitrev 000ed919272a9a0a6b6e52ae9e2052d90baa6964 %global gcc_version 16.0.0 %global gcc_major 16 # Note, gcc_release must be integer, if you want to add suffixes to @@ -158,7 +158,7 @@ Summary: Various compilers (C, C++, Objective-C, ...) Name: gcc Version: %{gcc_version} -Release: %{gcc_release}.4%{?dist} +Release: %{gcc_release}.5%{?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 @@ -296,6 +296,7 @@ Requires: libgomp = %{version}-%{release} %if %{build_libatomic} Requires: libatomic = %{version}-%{release} Obsoletes: libatomic-static < %{version}-%{release} +Provides: libatomic-static = %{version}-%{release} %endif # lto-wrapper invokes make Requires: make @@ -323,7 +324,8 @@ Patch11: gcc16-d-shared-libphobos.patch Patch12: gcc16-pr119006.patch Patch13: gcc16-pr123115.patch Patch14: gcc16-pr120250.patch -Patch15: gcc16-pr123372.patch +Patch15: gcc16-pr123189.patch +Patch16: gcc16-pr123273.patch Patch50: isl-rh2155127.patch @@ -3910,6 +3912,37 @@ end %endif %changelog +* Sat Jan 10 2026 Jakub Jelinek 16.0.0-0.5 +- update from trunk + - PRs ada/123003, ada/123371, ada/123490, c/117687, c/121081, c/121507, + c/123212, c/123435, c/123463, c/123475, c++/123331, c++/123347, + c++/123393, debug/123259, fortran/90218, fortran/123012, + fortran/123029, fortran/123071, fortran/123321, fortran/123352, + fortran/123483, gcov-profile/123019, ipa/123383, libstdc++/122878, + libstdc++/123100, libstdc++/123183, libstdc++/123326, + libstdc++/123378, libstdc++/123406, middle-end/111817, + middle-end/123107, rtl-optimization/119291, rtl-optimization/121675, + rtl-optimization/121773, rtl-optimization/123121, + rtl-optimization/123491, target/119430, target/121192, target/121290, + target/121535, target/121778, target/122846, target/123010, + target/123017, target/123268, target/123269, target/123317, + target/123320, target/123390, target/123403, target/123457, + target/123489, target/123492, testsuite/123353, testsuite/123377, + tree-optimization/42196, tree-optimization/102486, + tree-optimization/102954, tree-optimization/122103, + tree-optimization/122608, tree-optimization/122793, + tree-optimization/123197, tree-optimization/123200, + tree-optimization/123221, tree-optimization/123298, + tree-optimization/123300, tree-optimization/123310, + tree-optimization/123315, tree-optimization/123316, + tree-optimization/123319, tree-optimization/123351, + tree-optimization/123372, tree-optimization/123374, + tree-optimization/123382, tree-optimization/123414, + tree-optimization/123431 +- fix ICE on friend with noexcept (PR c++/123189) +- fix -E -fdirectives-only comment handling (PR preprocessor/123273) +- provide libatomic-static from gcc subpackage + * Sat Jan 3 2026 Jakub Jelinek 16.0.0-0.4 - update from trunk - PRs ada/123060, ada/123088, ada/123185, ada/123289, ada/123302, diff --git a/gcc16-pr123189.patch b/gcc16-pr123189.patch new file mode 100644 index 0000000..4262362 --- /dev/null +++ b/gcc16-pr123189.patch @@ -0,0 +1,58 @@ +Since we now defer noexcept parsing for templated friends, some places +need to be updated to cope with friend template specializations -- their +TI_TEMPLATE is a TREE_LIST rather than a TEMPLATE_DECL, and they never +introduce new template parameters. + +2026-01-09 Patrick Palka + + PR c++/123189 + +gcc/cp/ChangeLog: + + * name-lookup.cc (binding_to_template_parms_of_scope_p): + Gracefully handle TEMPLATE_INFO whose TI_TEMPLATE is a TREE_LIST. + * pt.cc (maybe_begin_member_template_processing): For a friend + template specialization consider its class context instead. + +gcc/testsuite/ChangeLog: + + * g++.dg/cpp0x/noexcept92.C: New test. + +--- gcc/cp/name-lookup.cc ++++ gcc/cp/name-lookup.cc +@@ -8004,6 +8004,7 @@ binding_to_template_parms_of_scope_p (cxx_binding *binding, + /* The template of the current scope, iff said scope is a primary + template. */ + tmpl = (tinfo ++ && TREE_CODE (TI_TEMPLATE (tinfo)) == TEMPLATE_DECL + && PRIMARY_TEMPLATE_P (TI_TEMPLATE (tinfo)) + ? TI_TEMPLATE (tinfo) + : NULL_TREE); +--- gcc/cp/pt.cc ++++ gcc/cp/pt.cc +@@ -546,9 +546,9 @@ maybe_begin_member_template_processing (tree decl) + int levels = 0; + bool nsdmi = TREE_CODE (decl) == FIELD_DECL; + +- if (nsdmi) ++ if (nsdmi || decl_specialization_friend_p (decl)) + { +- tree ctx = DECL_CONTEXT (decl); ++ tree ctx = nsdmi ? DECL_CONTEXT (decl) : DECL_CHAIN (decl); + decl = (CLASSTYPE_TEMPLATE_INFO (ctx) + /* Disregard full specializations (c++/60999). */ + && uses_template_parms (ctx) +--- gcc/testsuite/g++.dg/cpp0x/noexcept92.C ++++ gcc/testsuite/g++.dg/cpp0x/noexcept92.C +@@ -0,0 +1,11 @@ ++// PR c++/123189 ++// { dg-do compile { target c++11 } } ++ ++template void f() noexcept(noexcept(T())); ++ ++template ++struct A { ++ friend void f() noexcept(noexcept(T())); ++}; ++ ++template struct A; diff --git a/gcc16-pr123273.patch b/gcc16-pr123273.patch new file mode 100644 index 0000000..987f6e0 --- /dev/null +++ b/gcc16-pr123273.patch @@ -0,0 +1,54 @@ +2026-01-06 Jakub Jelinek + + PR preprocessor/123273 + * lex.cc (cpp_directive_only_process): Only go to done_comment + for '/' if star is true and esc is false. When seeing '\\' with + esc set to true, clear esc as well as star instead of keeping esc + set. + + * c-c++-common/cpp/dir-only-10.c: New test. + * c-c++-common/cpp/dir-only-11.c: New test. + +--- libcpp/lex.cc.jj 2026-01-02 09:56:10.417332292 +0100 ++++ libcpp/lex.cc 2026-01-05 16:40:26.413766032 +0100 +@@ -5461,7 +5461,13 @@ cpp_directive_only_process (cpp_reader * + switch (c) + { + case '\\': +- esc = true; ++ if (esc) ++ { ++ star = false; ++ esc = false; ++ } ++ else ++ esc = true; + break; + + case '\r': +@@ -5492,7 +5498,7 @@ cpp_directive_only_process (cpp_reader * + break; + + case '/': +- if (star) ++ if (star && !esc) + goto done_comment; + /* FALLTHROUGH */ + +--- gcc/testsuite/c-c++-common/cpp/dir-only-10.c.jj 2026-01-05 17:04:26.144566116 +0100 ++++ gcc/testsuite/c-c++-common/cpp/dir-only-10.c 2026-01-05 17:05:02.226946201 +0100 +@@ -0,0 +1,5 @@ ++/* PR preprocessor/123273 */ ++/* { dg-do preprocess } */ ++/* { dg-options -fdirectives-only } */ ++ ++/* *\/""" */ +--- gcc/testsuite/c-c++-common/cpp/dir-only-11.c.jj 2026-01-05 17:05:18.498666647 +0100 ++++ gcc/testsuite/c-c++-common/cpp/dir-only-11.c 2026-01-05 17:06:17.574651691 +0100 +@@ -0,0 +1,6 @@ ++/* PR preprocessor/123273 */ ++/* { dg-do preprocess } */ ++/* { dg-options -fdirectives-only } */ ++ ++/* *\\ ++/""" */ diff --git a/gcc16-pr123372.patch b/gcc16-pr123372.patch deleted file mode 100644 index 1f75086..0000000 --- a/gcc16-pr123372.patch +++ /dev/null @@ -1,49 +0,0 @@ -2026-01-03 Jakub Jelinek - - PR tree-optimization/123372 - * tree-ssa-math-opts.cc - (build_saturation_binary_arith_call_and_replace): Pass type of op_0 - rather than type of lhs as second argument to - direct_internal_fn_supported_p. - - * gcc.dg/tree-ssa/pr123372.c: New test. - ---- gcc/tree-ssa-math-opts.cc.jj 2026-01-02 09:56:10.390332748 +0100 -+++ gcc/tree-ssa-math-opts.cc 2026-01-02 18:45:57.087546705 +0100 -@@ -4083,7 +4083,7 @@ build_saturation_binary_arith_call_and_r - internal_fn fn, tree lhs, - tree op_0, tree op_1) - { -- if (direct_internal_fn_supported_p (fn, TREE_TYPE (lhs), OPTIMIZE_FOR_BOTH)) -+ if (direct_internal_fn_supported_p (fn, TREE_TYPE (op_0), OPTIMIZE_FOR_BOTH)) - { - gcall *call = gimple_build_call_internal (fn, 2, op_0, op_1); - gimple_call_set_lhs (call, lhs); ---- gcc/testsuite/gcc.dg/tree-ssa/pr123372.c.jj 2026-01-02 18:49:45.419717435 +0100 -+++ gcc/testsuite/gcc.dg/tree-ssa/pr123372.c 2026-01-02 18:51:22.256093427 +0100 -@@ -0,0 +1,25 @@ -+/* PR tree-optimization/123372 */ -+/* { dg-do compile } */ -+/* { dg-options "-O2 -fgimple" } */ -+ -+#ifdef __SIZEOF_INT128__ -+#define T unsigned __int128 -+#else -+#define T unsigned long long -+#endif -+ -+unsigned int __GIMPLE (ssa,startwith("phiopt4")) -+foo (T a, T b) -+{ -+ T _4; -+ unsigned int _1; -+ bool _5; -+ unsigned int _6; -+ -+ __BB(2): -+ _5 = a_2(D) >= b_3(D); -+ _4 = a_2(D) - b_3(D); -+ _6 = (unsigned int) _4; -+ _1 = _5 ? _6 : 0U; -+ return _1; -+} diff --git a/sources b/sources index bfe5a8f..2d3f1fe 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (gcc-16.0.0-20260103.tar.xz) = cc9c1dcc04eec3ef8357320cac1e1f51166832061a065ba2391d1888a8eddbb4436073c0c3db6c33cd8f79ad1a1cfb35f867a57ed6cbc25f57980b5f60f8fa76 +SHA512 (gcc-16.0.0-20260110.tar.xz) = 9be9b72ae45f888efe30ef50f8b497ebeaef327d037ab7a70a354d05986567115447dce8ff660b69b96d3cc6e145f509f35261d3f33902f97a7169817a972eed SHA512 (isl-0.24.tar.bz2) = aab3bddbda96b801d0f56d2869f943157aad52a6f6e6a61745edd740234c635c38231af20bc3f1a08d416a5e973a90e18249078ed8e4ae2f1d5de57658738e95 SHA512 (newlib-cygwin-d35cc82b5ec15bb8a5fe0fe11e183d1887992e99.tar.xz) = ef9495745a96d1d76f9f425c4a48c807fface36a1aa92351c5d024103678d144d046e8de55d195103784472c14874e29e4b9284d5d6a2e7bb27fd98c8455a881 SHA512 (nvptx-tools-a0c1fff6534a4df9fb17937c3c4a4b1071212029.tar.xz) = 7f862986065028df70c843fc3f2c89e200a76b48ad0bd51c749ac8a5aab7be0ebdf35be182fad2407b3281615e75be1ac6833ab6a5130ae9920169a0412f94f0 From 8d258e58bdb298d7f8c9926d168cc8c808fdf4e3 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 12 Jan 2026 20:15:57 +0100 Subject: [PATCH 09/12] 16.0.1-0.1 --- .gitignore | 2 + gcc.spec | 22 +- gcc16-ipacp-revert.patch | 1079 +++++++++++++++++++++++++++++++++++ gcc16-libstdc++-docs.patch | 4 +- gcc16-pr121778-revert.patch | 170 ++++++ gcc16-pr123189.patch | 58 -- gcc16-pr123414-revert.patch | 92 +++ sources | 2 +- 8 files changed, 1362 insertions(+), 67 deletions(-) create mode 100644 gcc16-ipacp-revert.patch create mode 100644 gcc16-pr121778-revert.patch delete mode 100644 gcc16-pr123189.patch create mode 100644 gcc16-pr123414-revert.patch diff --git a/.gitignore b/.gitignore index 2196596..73b38af 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,5 @@ /gcc-16.0.0-20251220.tar.xz /gcc-16.0.0-20260103.tar.xz /gcc-16.0.0-20260110.tar.xz +/gcc-16.0.0-20260112.tar.xz +/gcc-16.0.1-20260112.tar.xz diff --git a/gcc.spec b/gcc.spec index 4d79f03..e461bcf 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,6 +1,6 @@ -%global DATE 20260110 -%global gitrev 000ed919272a9a0a6b6e52ae9e2052d90baa6964 -%global gcc_version 16.0.0 +%global DATE 20260112 +%global gitrev 25ea0dce3d78a294015cf5df891a4630172b0d12 +%global gcc_version 16.0.1 %global gcc_major 16 # Note, gcc_release must be integer, if you want to add suffixes to # %%{release}, append them after %%{gcc_release} on Release: line. @@ -158,7 +158,7 @@ Summary: Various compilers (C, C++, Objective-C, ...) Name: gcc Version: %{gcc_version} -Release: %{gcc_release}.5%{?dist} +Release: %{gcc_release}.1%{?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 @@ -324,8 +324,10 @@ Patch11: gcc16-d-shared-libphobos.patch Patch12: gcc16-pr119006.patch Patch13: gcc16-pr123115.patch Patch14: gcc16-pr120250.patch -Patch15: gcc16-pr123189.patch -Patch16: gcc16-pr123273.patch +Patch15: gcc16-pr123273.patch +Patch16: gcc16-ipacp-revert.patch +Patch17: gcc16-pr121778-revert.patch +Patch18: gcc16-pr123414-revert.patch Patch50: isl-rh2155127.patch @@ -3912,6 +3914,14 @@ end %endif %changelog +* Mon Jan 12 2026 Jakub Jelinek 16.0.1-0.1 +- update from trunk + - PRs c++/81337, c++/115163, c++/123526, fortran/77415, ipa/122458, + ipa/123543, libfortran/123012, middle-end/123175, + rtl-optimization/123523, target/123415, testsuite/121752, + testsuite/123129, tree-optimization/122824, tree-optimization/122830, + tree-optimization/123417, tree-optimization/123528 + * Sat Jan 10 2026 Jakub Jelinek 16.0.0-0.5 - update from trunk - PRs ada/123003, ada/123371, ada/123490, c/117687, c/121081, c/121507, diff --git a/gcc16-ipacp-revert.patch b/gcc16-ipacp-revert.patch new file mode 100644 index 0000000..dae3ba2 --- /dev/null +++ b/gcc16-ipacp-revert.patch @@ -0,0 +1,1079 @@ +Temporarily revert until PR123542 is resolved. + +2026-01-06 Martin Jambor + + * ipa-cp.h (class ipcp_bits_lattice): New members set_recipient_only, + recipient_only_p and m_recipient_only. + (class ipcp_vr_lattice): Likewise. + (ipcp_vr_lattice::init): Initialize also m_recipient_only. + * ipa-cp.cc (ipcp_bits_lattice::print): Adjust printting to also + print the new flag. + (ipcp_vr_lattice::print): Likewise. + (ipcp_vr_lattice::set_recipient_only): New function. + (ipcp_bits_lattice::set_recipient_only): Likewise. + (set_all_contains_variable): New parameter MAKE_SIMPLE_RECIPIENTS, set + bits and vr lattices to recibient only insted to bottom when it is + true. + (initialize_node_lattices): Pass true to the second parameter of + set_all_contains_variable. + (propagate_bits_across_jump_function): Treat recipient_only source + lattices like bottom. + (propagate_vr_across_jump_function): Likewise. + (ipcp_store_vr_results): Skip non-local nodes. + +2026-01-09 Martin Jambor + + * ipa-cp.cc (good_cloning_opportunity_p): Dump a message when + bailing out early too. + (find_more_scalar_values_for_callers_subset): Rename to + find_scalar_values_for_callers_subset, collect constants regardless of + what is already in the vector. Remove dumping. + (find_more_contexts_for_caller_subset): Rename to + find_contexts_for_caller_subset, collect contexts regardless of what + is already in the vector. Remove dumping. + (find_aggregate_values_for_callers_subset): Rename to + find_aggregate_values_for_callers_subset_gc, implement using new + functions. + (find_aggregate_values_for_callers_subset_1): New function. + (find_aggregate_values_for_callers_subset): Likewise. + (copy_known_vectors_add_val): Removed. + (dump_reestimation_message): New function. + (decide_about_value): Remove formal parameter avals, compute it + independently, and use it to estimate local cloning effects. + (struct cloning_opportunity_ranking): New type. + (compare_cloning_opportunities): New function. + (cloning_opportunity_ranking_evaluation): Likewise. + (decide_whether_version_node): Pre-sort candidates for cloning before + really evaluating them. Calculate context independent values only + when considering versioning for all contexts. + (ipcp_val_agg_replacement_ok_p): Renamed to + ipcp_val_replacement_ok_p, check also non-aggregate values. + +--- gcc/ipa-cp.cc ++++ gcc/ipa-cp.cc +@@ -339,25 +339,18 @@ ipcp_print_widest_int (FILE *f, const widest_int &value) + void + ipcp_bits_lattice::print (FILE *f) + { +- if (bottom_p ()) +- { +- fprintf (f, " Bits unusable (BOTTOM)\n"); +- return; +- } +- + if (top_p ()) +- fprintf (f, " Bits unknown (TOP)"); ++ fprintf (f, " Bits unknown (TOP)\n"); ++ else if (bottom_p ()) ++ fprintf (f, " Bits unusable (BOTTOM)\n"); + else + { + fprintf (f, " Bits: value = "); + ipcp_print_widest_int (f, get_value ()); + fprintf (f, ", mask = "); + ipcp_print_widest_int (f, get_mask ()); ++ fprintf (f, "\n"); + } +- +- if (m_recipient_only) +- fprintf (f, " (recipient only)"); +- fprintf (f, "\n"); + } + + /* Print value range lattice to F. */ +@@ -365,8 +358,6 @@ ipcp_bits_lattice::print (FILE *f) + void + ipcp_vr_lattice::print (FILE * f) + { +- if (m_recipient_only) +- fprintf (f, "(recipient only) "); + m_vr.dump (f); + } + +@@ -897,18 +888,6 @@ ipcp_vr_lattice::set_to_bottom () + return true; + } + +-/* Set the flag that this lattice is a recipient only, return true if it was +- not set before. */ +- +-bool +-ipcp_vr_lattice::set_recipient_only () +-{ +- if (m_recipient_only) +- return false; +- m_recipient_only = true; +- return true; +-} +- + /* Set lattice value to bottom, if it already isn't the case. */ + + bool +@@ -945,18 +924,6 @@ ipcp_bits_lattice::known_nonzero_p () const + return wi::ne_p (wi::bit_and (wi::bit_not (m_mask), m_value), 0); + } + +-/* Set the flag that this lattice is a recipient only, return true if it was not +- set before. */ +- +-bool +-ipcp_bits_lattice::set_recipient_only () +-{ +- if (m_recipient_only) +- return false; +- m_recipient_only = true; +- return true; +-} +- + /* Convert operand to value, mask form. */ + + void +@@ -1359,28 +1326,17 @@ intersect_argaggs_with (vec &elts, + } + + /* Mark bot aggregate and scalar lattices as containing an unknown variable, +- return true is any of them has not been marked as such so far. If if +- MAKE_SIMPLE_RECIPIENTS is true, set the lattices that can only hold one +- value to being recipients only, otherwise also set them to bottom. */ ++ return true is any of them has not been marked as such so far. */ + + static inline bool +-set_all_contains_variable (class ipcp_param_lattices *plats, +- bool make_simple_recipients = false) ++set_all_contains_variable (class ipcp_param_lattices *plats) + { + bool ret; + ret = plats->itself.set_contains_variable (); + ret |= plats->ctxlat.set_contains_variable (); + ret |= set_agg_lats_contain_variable (plats); +- if (make_simple_recipients) +- { +- ret |= plats->bits_lattice.set_recipient_only (); +- ret |= plats->m_value_range.set_recipient_only (); +- } +- else +- { +- ret |= plats->bits_lattice.set_to_bottom (); +- ret |= plats->m_value_range.set_to_bottom (); +- } ++ ret |= plats->bits_lattice.set_to_bottom (); ++ ret |= plats->m_value_range.set_to_bottom (); + return ret; + } + +@@ -1525,7 +1481,7 @@ initialize_node_lattices (struct cgraph_node *node) + { + plats->m_value_range.init (type); + if (variable) +- set_all_contains_variable (plats, true); ++ set_all_contains_variable (plats); + } + } + +@@ -2617,8 +2573,7 @@ propagate_bits_across_jump_function (cgraph_edge *cs, int idx, + result of x & 0xff == 0xff, which gets computed during ccp1 pass + and we store it in jump function during analysis stage. */ + +- if (!src_lats->bits_lattice.bottom_p () +- && !src_lats->bits_lattice.recipient_only_p ()) ++ if (!src_lats->bits_lattice.bottom_p ()) + { + if (!op_type) + op_type = ipa_get_type (caller_info, src_idx); +@@ -2684,8 +2639,7 @@ propagate_vr_across_jump_function (cgraph_edge *cs, ipa_jump_func *jfunc, + = ipa_get_parm_lattices (caller_info, src_idx); + tree operand_type = ipa_get_type (caller_info, src_idx); + +- if (src_lats->m_value_range.bottom_p () +- || src_lats->m_value_range.recipient_only_p ()) ++ if (src_lats->m_value_range.bottom_p ()) + return dest_lat->set_to_bottom (); + + if (ipa_get_jf_pass_through_operation (jfunc) == NOP_EXPR +@@ -3443,13 +3397,7 @@ good_cloning_opportunity_p (struct cgraph_node *node, sreal time_benefit, + /* If there is no call which was executed in profiling or where + profile is missing, we do not want to clone. */ + || (!called_without_ipa_profile && !count_sum.nonzero_p ())) +- { +- if (dump_file && (dump_flags & TDF_DETAILS)) +- fprintf (dump_file, " good_cloning_opportunity_p (time: %g, " +- "size: %i): Definitely not good or prohibited.\n", +- time_benefit.to_double (), size_cost); +- return false; +- } ++ return false; + + gcc_assert (size_cost > 0); + +@@ -5290,29 +5238,24 @@ self_recursive_agg_pass_through_p (const cgraph_edge *cs, + KNOWN_CSTS with constants that are also known for all of the CALLERS. */ + + static void +-find_scalar_values_for_callers_subset (vec &known_csts, +- ipa_node_params *info, +- const vec &callers) ++find_more_scalar_values_for_callers_subset (struct cgraph_node *node, ++ vec &known_csts, ++ const vec &callers) + { ++ ipa_node_params *info = ipa_node_params_sum->get (node); + int i, count = ipa_get_param_count (info); + + for (i = 0; i < count; i++) + { +- ipcp_lattice *lat = ipa_get_scalar_lat (info, i); +- if (lat->bottom) +- continue; +- if (lat->is_single_const ()) +- { +- known_csts[i] = lat->values->value; +- continue; +- } +- + struct cgraph_edge *cs; + tree newval = NULL_TREE; + int j; + bool first = true; + tree type = ipa_get_type (info, i); + ++ if (ipa_get_scalar_lat (info, i)->bottom || known_csts[i]) ++ continue; ++ + FOR_EACH_VEC_ELT (callers, j, cs) + { + struct ipa_jump_func *jump_func; +@@ -5369,7 +5312,18 @@ find_scalar_values_for_callers_subset (vec &known_csts, + } + + if (newval) +- known_csts[i] = newval; ++ { ++ if (dump_file && (dump_flags & TDF_DETAILS)) ++ { ++ fprintf (dump_file, " adding an extra known scalar value "); ++ print_ipcp_constant_value (dump_file, newval); ++ fprintf (dump_file, " for "); ++ ipa_dump_param (dump_file, info, i); ++ fprintf (dump_file, "\n"); ++ } ++ ++ known_csts[i] = newval; ++ } + } + } + +@@ -5378,34 +5332,23 @@ find_scalar_values_for_callers_subset (vec &known_csts, + CALLERS. */ + + static void +-find_contexts_for_caller_subset (vec +- &known_contexts, +- ipa_node_params *info, +- const vec &callers) ++find_more_contexts_for_caller_subset (cgraph_node *node, ++ vec ++ *known_contexts, ++ const vec &callers) + { ++ ipa_node_params *info = ipa_node_params_sum->get (node); + int i, count = ipa_get_param_count (info); + + for (i = 0; i < count; i++) + { +- if (!ipa_is_param_used (info, i)) +- continue; ++ cgraph_edge *cs; + +- ipcp_lattice *ctxlat +- = ipa_get_poly_ctx_lat (info, i); +- if (ctxlat->bottom) ++ if (ipa_get_poly_ctx_lat (info, i)->bottom ++ || (known_contexts->exists () ++ && !(*known_contexts)[i].useless_p ())) + continue; +- if (ctxlat->is_single_const ()) +- { +- if (!ctxlat->values->value.useless_p ()) +- { +- if (known_contexts.is_empty ()) +- known_contexts.safe_grow_cleared (count, true); +- known_contexts[i] = ctxlat->values->value; +- } +- continue; +- } + +- cgraph_edge *cs; + ipa_polymorphic_call_context newval; + bool first = true; + int j; +@@ -5433,9 +5376,20 @@ find_contexts_for_caller_subset (vec + + if (!newval.useless_p ()) + { +- if (known_contexts.is_empty ()) +- known_contexts.safe_grow_cleared (count, true); +- known_contexts[i] = newval; ++ if (dump_file && (dump_flags & TDF_DETAILS)) ++ { ++ fprintf (dump_file, " adding an extra known polymorphic " ++ "context "); ++ print_ipcp_constant_value (dump_file, newval); ++ fprintf (dump_file, " for "); ++ ipa_dump_param (dump_file, info, i); ++ fprintf (dump_file, "\n"); ++ } ++ ++ if (!known_contexts->exists ()) ++ known_contexts->safe_grow_cleared (ipa_get_param_count (info), ++ true); ++ (*known_contexts)[i] = newval; + } + + } +@@ -5622,12 +5576,11 @@ push_agg_values_from_edge (struct cgraph_edge *cs, + + + /* Look at edges in CALLERS and collect all known aggregate values that arrive +- from all of them into INTERIM. Return how many there are. */ ++ from all of them. Return nullptr if there are none. */ + +-static unsigned int +-find_aggregate_values_for_callers_subset_1 (vec &interim, +- struct cgraph_node *node, +- const vec &callers) ++static struct vec * ++find_aggregate_values_for_callers_subset (struct cgraph_node *node, ++ const vec &callers) + { + ipa_node_params *dest_info = ipa_node_params_sum->get (node); + if (dest_info->ipcp_orig_node) +@@ -5635,11 +5588,12 @@ find_aggregate_values_for_callers_subset_1 (vec &interim, + + /* gather_edges_for_value puts a non-recursive call into the first element of + callers if it can. */ ++ auto_vec interim; + push_agg_values_from_edge (callers[0], dest_info, &interim, NULL, true); + + unsigned valid_entries = interim.length (); + if (!valid_entries) +- return 0; ++ return nullptr; + + unsigned caller_count = callers.length(); + for (unsigned i = 1; i < caller_count; i++) +@@ -5650,47 +5604,9 @@ find_aggregate_values_for_callers_subset_1 (vec &interim, + + valid_entries = intersect_argaggs_with (interim, last); + if (!valid_entries) +- return 0; ++ return nullptr; + } + +- return valid_entries; +-} +- +-/* Look at edges in CALLERS and collect all known aggregate values that arrive +- from all of them and return them in a garbage-collected vector. Return +- nullptr if there are none. */ +- +-static void +-find_aggregate_values_for_callers_subset (vec &res, +- struct cgraph_node *node, +- const vec &callers) +-{ +- auto_vec interim; +- unsigned valid_entries +- = find_aggregate_values_for_callers_subset_1 (interim, node, callers); +- if (!valid_entries) +- return; +- +- for (const ipa_argagg_value &av : interim) +- if (av.value) +- res.safe_push(av); +- return; +-} +- +-/* Look at edges in CALLERS and collect all known aggregate values that arrive +- from all of them and return them in a garbage-collected vector. Return +- nullptr if there are none. */ +- +-static struct vec * +-find_aggregate_values_for_callers_subset_gc (struct cgraph_node *node, +- const vec &callers) +-{ +- auto_vec interim; +- unsigned valid_entries +- = find_aggregate_values_for_callers_subset_1 (interim, node, callers); +- if (!valid_entries) +- return nullptr; +- + vec *res = NULL; + vec_safe_reserve_exact (res, valid_entries); + for (const ipa_argagg_value &av : interim) +@@ -5821,78 +5737,62 @@ copy_useful_known_contexts (const vec &known_conte + return vNULL; + } + +-/* Return true if the VALUE is represented in KNOWN_CSTS at INDEX if OFFSET is +- minus one or in AGGVALS for INDEX and OFFSET otherwise. */ ++/* Copy known scalar values from AVALS into KNOWN_CSTS and modify the copy ++ according to VAL and INDEX. If non-empty, replace KNOWN_CONTEXTS with its ++ copy too. */ + +-DEBUG_FUNCTION bool +-ipcp_val_replacement_ok_p (vec &known_csts, +- vec &, +- vec *aggvals, +- int index, HOST_WIDE_INT offset, tree value) ++static void ++copy_known_vectors_add_val (ipa_auto_call_arg_values *avals, ++ vec *known_csts, ++ vec *known_contexts, ++ ipcp_value *val, int index) + { +- tree v; +- if (offset == -1) +- v = known_csts[index]; +- else +- { +- const ipa_argagg_value_list avl (aggvals); +- v = avl.get_value (index, offset / BITS_PER_UNIT); +- } ++ *known_csts = avals->m_known_vals.copy (); ++ *known_contexts = copy_useful_known_contexts (avals->m_known_contexts); ++ (*known_csts)[index] = val->value; ++} + +- return v && values_equal_for_ipcp_p (v, value); ++/* Copy known scalar values from AVALS into KNOWN_CSTS. Similarly, copy ++ contexts to KNOWN_CONTEXTS and modify the copy according to VAL and ++ INDEX. */ ++ ++static void ++copy_known_vectors_add_val (ipa_auto_call_arg_values *avals, ++ vec *known_csts, ++ vec *known_contexts, ++ ipcp_value *val, ++ int index) ++{ ++ *known_csts = avals->m_known_vals.copy (); ++ *known_contexts = avals->m_known_contexts.copy (); ++ (*known_contexts)[index] = val->value; + } + +-/* Dump to F all the values in AVALS for which we are re-evaluating the effects +- on the function represented b INFO. */ ++/* Return true if OFFSET indicates this was not an aggregate value or there is ++ a replacement equivalent to VALUE, INDEX and OFFSET among those in the ++ AGGVALS list. */ + +-DEBUG_FUNCTION void +-dump_reestimation_message (FILE *f, ipa_node_params *info, +- const ipa_auto_call_arg_values &avals) +-{ +- fprintf (f, " Re-estimating effects with\n" +- " Scalar constants:"); +- int param_count = ipa_get_param_count (info); +- for (int i = 0; i < param_count; i++) +- if (avals.m_known_vals[i]) +- { +- fprintf (f, " %i:", i); +- print_ipcp_constant_value (f, avals.m_known_vals[i]); +- } +- fprintf (f, "\n"); +- if (!avals.m_known_contexts.is_empty ()) +- { +- fprintf (f, " Pol. contexts:"); +- for (int i = 0; i < param_count; i++) +- if (!avals.m_known_contexts[i].useless_p ()) +- { +- fprintf (f, " %i:", i); +- avals.m_known_contexts[i].dump (f); +- } +- fprintf (f, "\n"); +- } +- if (!avals.m_known_aggs.is_empty ()) +- { +- fprintf (f, " Aggregate replacements:"); +- ipa_argagg_value_list avs (&avals); +- avs.dump (f); +- } ++DEBUG_FUNCTION bool ++ipcp_val_agg_replacement_ok_p (vec *aggvals, ++ int index, HOST_WIDE_INT offset, tree value) ++{ ++ if (offset == -1) ++ return true; ++ ++ const ipa_argagg_value_list avl (aggvals); ++ tree v = avl.get_value (index, offset / BITS_PER_UNIT); ++ return v && values_equal_for_ipcp_p (v, value); + } + +-/* Return true if the VALUE is represented in KNOWN_CONTEXTS at INDEX and that +- if OFFSET is is equal to minus one (because source of a polymorphic context +- cannot be an aggregate value). */ ++/* Return true if offset is minus one because source of a polymorphic context ++ cannot be an aggregate value. */ + + DEBUG_FUNCTION bool +-ipcp_val_replacement_ok_p (vec &, +- vec &known_contexts, +- vec *, +- int index, HOST_WIDE_INT offset, +- ipa_polymorphic_call_context value) ++ipcp_val_agg_replacement_ok_p (vec *, ++ int , HOST_WIDE_INT offset, ++ ipa_polymorphic_call_context) + { +- if (offset != -1) +- return false; +- return (!known_contexts[index].useless_p () +- && known_contexts[index].equal_to (value)); ++ return offset == -1; + } + + /* Decide whether to create a special version of NODE for value VAL of +@@ -5906,12 +5806,13 @@ ipcp_val_replacement_ok_p (vec &, + template + static bool + decide_about_value (struct cgraph_node *node, int index, HOST_WIDE_INT offset, +- ipcp_value *val, ++ ipcp_value *val, ipa_auto_call_arg_values *avals, + vec *self_gen_clones, int cur_sweep) + { + int caller_count; + sreal freq_sum; + profile_count count_sum, rec_count_sum; ++ vec callers; + bool called_without_ipa_profile; + + if (val->spec_node) +@@ -5965,78 +5866,36 @@ decide_about_value (struct cgraph_node *node, int index, HOST_WIDE_INT offset, + fprintf (dump_file, " (caller_count: %i)\n", caller_count); + } + +- vec callers; +- callers = gather_edges_for_value (val, node, caller_count); +- ipa_node_params *info = ipa_node_params_sum->get (node); +- ipa_auto_call_arg_values avals; +- avals.m_known_vals.safe_grow_cleared (ipa_get_param_count (info), true); +- find_scalar_values_for_callers_subset (avals.m_known_vals, info, callers); +- find_contexts_for_caller_subset (avals.m_known_contexts, info, callers); +- find_aggregate_values_for_callers_subset (avals.m_known_aggs, node, callers); +- +- +- if (good_cloning_opportunity_p (node, val->prop_time_benefit, +- freq_sum, count_sum, val->prop_size_cost, +- called_without_ipa_profile, cur_sweep)) +- ; +- else +- { +- /* Extern inline functions are only meaningful to clione to propagate +- values to their callees. */ +- if (DECL_EXTERNAL (node->decl) && DECL_DECLARED_INLINE_P (node->decl)) +- { +- if (dump_file && (dump_flags & TDF_DETAILS)) +- fprintf (dump_file, " Skipping extern inline.\n"); +- return false; +- } +- if (dump_file && (dump_flags & TDF_DETAILS)) +- dump_reestimation_message (dump_file, info, avals); +- +- ipa_call_estimates estimates; +- estimate_ipcp_clone_size_and_time (node, &avals, &estimates); +- int removable_params_cost = 0; +- for (tree t : avals.m_known_vals) +- if (t) +- removable_params_cost += estimate_move_cost (TREE_TYPE (t), true); +- +- int size = estimates.size - caller_count * removable_params_cost; +- +- if (size <= 0) +- { +- if (dump_file) +- fprintf (dump_file, " Code not going to grow.\n"); +- } +- else +- { +- sreal time_benefit +- = ((estimates.nonspecialized_time - estimates.time) +- + hint_time_bonus (node, estimates) +- + (devirtualization_time_bonus (node, &avals) +- + removable_params_cost)); +- +- if (!good_cloning_opportunity_p (node, time_benefit, freq_sum, +- count_sum, size, +- called_without_ipa_profile, +- cur_sweep)) +- return false; +- } +- } ++ if (!good_cloning_opportunity_p (node, val->local_time_benefit, ++ freq_sum, count_sum, ++ val->local_size_cost, ++ called_without_ipa_profile, cur_sweep) ++ && !good_cloning_opportunity_p (node, val->prop_time_benefit, ++ freq_sum, count_sum, val->prop_size_cost, ++ called_without_ipa_profile, cur_sweep)) ++ return false; + + if (dump_file) + fprintf (dump_file, " Creating a specialized node of %s.\n", + node->dump_name ()); + +- vec known_csts = avals.m_known_vals.copy (); +- vec known_contexts +- = copy_useful_known_contexts (avals.m_known_contexts); +- +- vec *aggvals = NULL; +- vec_safe_reserve_exact (aggvals, avals.m_known_aggs.length ()); +- for (const ipa_argagg_value &av : avals.m_known_aggs) +- aggvals->quick_push (av); +- gcc_checking_assert (ipcp_val_replacement_ok_p (known_csts, known_contexts, +- aggvals, index, +- offset, val->value)); ++ vec known_csts; ++ vec known_contexts; ++ ++ callers = gather_edges_for_value (val, node, caller_count); ++ if (offset == -1) ++ copy_known_vectors_add_val (avals, &known_csts, &known_contexts, val, index); ++ else ++ { ++ known_csts = avals->m_known_vals.copy (); ++ known_contexts = copy_useful_known_contexts (avals->m_known_contexts); ++ } ++ find_more_scalar_values_for_callers_subset (node, known_csts, callers); ++ find_more_contexts_for_caller_subset (node, &known_contexts, callers); ++ vec *aggvals ++ = find_aggregate_values_for_callers_subset (node, callers); ++ gcc_checking_assert (ipcp_val_agg_replacement_ok_p (aggvals, index, ++ offset, val->value)); + val->spec_node = create_specialized_node (node, known_csts, known_contexts, + aggvals, callers); + +@@ -6074,52 +5933,6 @@ ipa_range_contains_p (const vrange &r, tree val) + return r.contains_p (val); + } + +-/* Structure holding opportunitties so that they can be pre-sorted. */ +- +-struct cloning_opportunity_ranking +-{ +- /* A very rough evaluation of likely benefit. */ +- sreal eval; +- /* In the case of aggregate constants, a non-negative offset within their +- aggregates. -1 for scalar constants, -2 for polymorphic contexts. */ +- HOST_WIDE_INT offset; +- /* The value being considered for evaluation for cloning. */ +- ipcp_value_base *val; +- /* Index of the formal parameter the value is coming in. */ +- int index; +-}; +- +-/* Helper function to qsort a vecotr of cloning opportunities. */ +- +-static int +-compare_cloning_opportunities (const void *a, const void *b) +-{ +- const cloning_opportunity_ranking *o1 +- = (const cloning_opportunity_ranking *) a; +- const cloning_opportunity_ranking *o2 +- = (const cloning_opportunity_ranking *) b; +- if (o1->eval < o2->eval) +- return 1; +- if (o1->eval > o2->eval) +- return -1; +- return 0; +-} +- +-/* Use the estimations in VAL to determine how good a candidate it represents +- for the purposes of ordering real evaluation of opportunities (which +- includes information about incoming edges, among other things). */ +- +-static sreal +-cloning_opportunity_ranking_evaluation (const ipcp_value_base *val) +-{ +- sreal e1 = (val->local_time_benefit * 1000) / MAX (val->local_size_cost, 1); +- sreal e2 = (val->prop_time_benefit * 1000) / MAX (val->prop_size_cost, 1); +- if (e2 > e1) +- return e2; +- else +- return e1; +-} +- + /* Decide whether and what specialized clones of NODE should be created. + CUR_SWEEP is the number of the current sweep of the call-graph during the + decision stage. */ +@@ -6128,7 +5941,7 @@ static bool + decide_whether_version_node (struct cgraph_node *node, int cur_sweep) + { + ipa_node_params *info = ipa_node_params_sum->get (node); +- int count = ipa_get_param_count (info); ++ int i, count = ipa_get_param_count (info); + bool ret = false; + + if (info->node_dead || count == 0) +@@ -6138,8 +5951,13 @@ decide_whether_version_node (struct cgraph_node *node, int cur_sweep) + fprintf (dump_file, "\nEvaluating opportunities for %s.\n", + node->dump_name ()); + +- auto_vec opp_ranking; +- for (int i = 0; i < count;i++) ++ auto_vec self_gen_clones; ++ ipa_auto_call_arg_values avals; ++ int removable_params_cost; ++ bool ctx_independent_const ++ = gather_context_independent_values (info, &avals, &removable_params_cost); ++ ++ for (i = 0; i < count;i++) + { + if (!ipa_is_param_used (info, i)) + continue; +@@ -6149,7 +5967,7 @@ decide_whether_version_node (struct cgraph_node *node, int cur_sweep) + ipcp_lattice *ctxlat = &plats->ctxlat; + + if (!lat->bottom +- && !lat->is_single_const ()) ++ && !avals.m_known_vals[i]) + { + ipcp_value *val; + for (val = lat->values; val; val = val->next) +@@ -6176,12 +5994,8 @@ decide_whether_version_node (struct cgraph_node *node, int cur_sweep) + } + continue; + } +- cloning_opportunity_ranking opp; +- opp.eval = cloning_opportunity_ranking_evaluation (val); +- opp.offset = -1; +- opp.val = val; +- opp.index = i; +- opp_ranking.safe_push (opp); ++ ret |= decide_about_value (node, i, -1, val, &avals, ++ &self_gen_clones, cur_sweep); + } + } + +@@ -6196,83 +6010,37 @@ decide_whether_version_node (struct cgraph_node *node, int cur_sweep) + && (plats->aggs_contain_variable + || !aglat->is_single_const ())) + for (val = aglat->values; val; val = val->next) +- { +- cloning_opportunity_ranking opp; +- opp.eval = cloning_opportunity_ranking_evaluation (val); +- opp.offset = aglat->offset; +- opp.val = val; +- opp.index = i; +- opp_ranking.safe_push (opp); +- } ++ ret |= decide_about_value (node, i, aglat->offset, val, &avals, ++ &self_gen_clones, cur_sweep); + } + + if (!ctxlat->bottom +- && !ctxlat->is_single_const ()) ++ && avals.m_known_contexts[i].useless_p ()) + { + ipcp_value *val; + for (val = ctxlat->values; val; val = val->next) +- if (!val->value.useless_p ()) +- { +- cloning_opportunity_ranking opp; +- opp.eval = cloning_opportunity_ranking_evaluation (val); +- opp.offset = -2; +- opp.val = val; +- opp.index = i; +- opp_ranking.safe_push (opp); +- } +- } +- } +- +- if (!opp_ranking.is_empty ()) +- { +- opp_ranking.qsort (compare_cloning_opportunities); +- auto_vec self_gen_clones; +- for (const cloning_opportunity_ranking &opp : opp_ranking) +- if (opp.offset == -2) +- { +- ipcp_value *val +- = static_cast *> +- (opp.val); +- ret |= decide_about_value (node, opp.index, -1, val, ++ ret |= decide_about_value (node, i, -1, val, &avals, + &self_gen_clones, cur_sweep); +- } +- else +- { +- ipcp_value *val = static_cast *> (opp.val); +- ret |= decide_about_value (node, opp.index, opp.offset, val, +- &self_gen_clones, cur_sweep); +- } +- +- if (!self_gen_clones.is_empty ()) +- { +- self_gen_clones.safe_push (node); +- update_counts_for_self_gen_clones (node, self_gen_clones); + } + } + +- struct caller_statistics stats; +- init_caller_stats (&stats); +- node->call_for_symbol_thunks_and_aliases (gather_caller_stats, &stats, +- false); +- if (!stats.n_calls) ++ if (!self_gen_clones.is_empty ()) + { +- if (dump_file) +- fprintf (dump_file, " Not cloning for all contexts because " +- "there are no callers of the original node (any more).\n"); +- return ret; ++ self_gen_clones.safe_push (node); ++ update_counts_for_self_gen_clones (node, self_gen_clones); + } + + bool do_clone_for_all_contexts = false; +- ipa_auto_call_arg_values avals; +- int removable_params_cost; +- bool ctx_independent_const +- = gather_context_independent_values (info, &avals, &removable_params_cost); + sreal devirt_bonus = devirtualization_time_bonus (node, &avals); + if (ctx_independent_const || devirt_bonus > 0 + || (removable_params_cost && clone_for_param_removal_p (node))) + { +- ipa_call_estimates estimates; ++ struct caller_statistics stats; ++ ipa_call_estimates estimates; + ++ init_caller_stats (&stats); ++ node->call_for_symbol_thunks_and_aliases (gather_caller_stats, &stats, ++ false); + estimate_ipcp_clone_size_and_time (node, &avals, &estimates); + sreal time = estimates.nonspecialized_time - estimates.time; + time += devirt_bonus; +@@ -6284,7 +6052,13 @@ decide_whether_version_node (struct cgraph_node *node, int cur_sweep) + fprintf (dump_file, " - context independent values, size: %i, " + "time_benefit: %f\n", size, (time).to_double ()); + +- if (size <= 0 || node->local) ++ if (!stats.n_calls) ++ { ++ if (dump_file) ++ fprintf (dump_file, " Not cloning for all contexts because " ++ "there are no callers of the original node left.\n"); ++ } ++ else if (size <= 0 || node->local) + { + if (!dbg_cnt (ipa_cp_values)) + return ret; +@@ -6344,14 +6118,19 @@ decide_whether_version_node (struct cgraph_node *node, int cur_sweep) + fprintf (dump_file, " Creating a specialized node of %s " + "for all known contexts.\n", node->dump_name ()); + +- vec known_csts = vNULL; +- known_csts.safe_grow_cleared (count, true); +- find_scalar_values_for_callers_subset (known_csts, info, callers); +- vec known_contexts = vNULL; +- find_contexts_for_caller_subset (known_contexts, info, callers); ++ vec known_csts = avals.m_known_vals.copy (); ++ vec known_contexts ++ = copy_useful_known_contexts (avals.m_known_contexts); ++ find_more_scalar_values_for_callers_subset (node, known_csts, callers); ++ find_more_contexts_for_caller_subset (node, &known_contexts, callers); + vec *aggvals +- = find_aggregate_values_for_callers_subset_gc (node, callers); ++ = find_aggregate_values_for_callers_subset (node, callers); + ++ if (!known_contexts_useful_p (known_contexts)) ++ { ++ known_contexts.release (); ++ known_contexts = vNULL; ++ } + struct cgraph_node *clone = create_specialized_node (node, known_csts, + known_contexts, + aggvals, callers); +@@ -6576,11 +6355,6 @@ ipcp_store_vr_results (void) + bool do_vr = true; + bool do_bits = true; + +- /* If the function is not local, the gathered information is only useful +- for clones. */ +- if (!node->local) +- continue; +- + if (!info || !opt_for_fn (node->decl, flag_ipa_vrp)) + { + if (dump_file) +--- gcc/ipa-cp.h ++++ gcc/ipa-cp.h +@@ -201,8 +201,6 @@ public: + bool set_to_bottom (); + bool set_to_constant (widest_int, widest_int); + bool known_nonzero_p () const; +- bool set_recipient_only (); +- bool recipient_only_p () const {return m_recipient_only; } + + widest_int get_value () const { return m_value; } + widest_int get_mask () const { return m_mask; } +@@ -218,11 +216,6 @@ private: + enum { IPA_BITS_UNDEFINED, IPA_BITS_CONSTANT, IPA_BITS_VARYING } + m_lattice_val = IPA_BITS_UNDEFINED; + +- /* Set to true if the lattice is valid only as a recipient of propagatad +- values but cannot be used as source of propagation because there may be +- unknown callers. */ +- bool m_recipient_only; +- + /* Similar to ccp_lattice_t, mask represents which bits of value are constant. + If a bit in mask is set to 0, then the corresponding bit in + value is known to be constant. */ +@@ -238,16 +231,10 @@ class ipcp_vr_lattice + { + public: + value_range m_vr; +- /* Set to true if the lattice is valid only as a recipient of propagatad +- values but cannot be used as source of propagation because there may be +- unknown callers. */ +- bool m_recipient_only; + + inline bool bottom_p () const; + inline bool top_p () const; + inline bool set_to_bottom (); +- bool set_recipient_only (); +- bool recipient_only_p () const {return m_recipient_only; } + bool meet_with (const vrange &p_vr); + bool meet_with (const ipcp_vr_lattice &other); + void init (tree type); +@@ -264,7 +251,6 @@ ipcp_vr_lattice::init (tree type) + m_vr.set_type (type); + + // Otherwise m_vr will default to unsupported_range. +- m_recipient_only = false; + } + + /* Structure containing lattices for a parameter itself and for pieces of +--- gcc/testsuite/gcc.dg/ipa/ipcp-agg-14.c ++++ gcc/testsuite/gcc.dg/ipa/ipcp-agg-14.c +@@ -1,49 +0,0 @@ +-/* { dg-do compile } */ +-/* { dg-options "-O3 -fno-ipa-sra -fno-partial-inlining -fdump-ipa-cp-details" } */ +- +-struct S +-{ +- int a, b, m, n, o, p; +-}; +- +- +-void __attribute__ ((noinline)) +-foo (struct S *p, double *x, double *y, double *z) +-{ +- if (p->a == 0 && p->b == 0) +- return; +- +- /* Something long so that we do not clone unless we know it will +- disappear: */ +- for (int i = 0; i < p->m; i++) +- { +- if (i < p->m-1) +- x[i] += x[i+1] * y[0]; +- for (int j = 0; j < p->n; j++) +- for (int k = 0; j < p->o; k++) +- { +- double s = *z; +- for (int l = 1; l < p->p; l++) +- s += z[l]; +- x[i] += s + 2*y[j] + 7*z[k]; +- } +- } +-} +- +-int get_int (void); +- +-void +- entry (int c, double *x, double *y, double *z) +-{ +- struct S s; +- +- s.a = 0; +- s.b = 0; +- s.m = get_int (); +- s.n = get_int (); +- s.o = get_int (); +- s.p = get_int (); +- foo (&s, x, y, z); +-} +- +-/* { dg-final { scan-ipa-dump "Creating a specialized node of foo" "cp" } } */ +--- gcc/testsuite/gcc.dg/ipa/ipcp-agg-2.c ++++ gcc/testsuite/gcc.dg/ipa/ipcp-agg-2.c +@@ -37,5 +37,5 @@ entry (int c) + foo (&s); + } + /* { dg-final { scan-ipa-dump-times "Creating a specialized node of foo/\[0-9\]*\\." 2 "cp" } } */ +-/* { dg-final { scan-ipa-dump "Aggregate replacements:" "cp" } } */ ++/* { dg-final { scan-ipa-dump-times "Aggregate replacements:" 4 "cp" } } */ + /* { dg-final { scan-tree-dump-not "->c;" "optimized" } } */ +--- gcc/testsuite/gcc.dg/ipa/ipcp-agg-3.c ++++ gcc/testsuite/gcc.dg/ipa/ipcp-agg-3.c +@@ -37,6 +37,6 @@ entry (int c) + foo (0, &s); + } + /* { dg-final { scan-ipa-dump-times "Creating a specialized node of foo/\[0-9\]*\\." 2 "cp" } } */ +-/* { dg-final { scan-ipa-dump "Aggregate replacements: 1" "cp" } } */ +-/* { dg-final { scan-ipa-dump "Aggregate replacements: 0" "cp" } } */ ++/* { dg-final { scan-ipa-dump-times "Aggregate replacements: 1" 2 "cp" } } */ ++/* { dg-final { scan-ipa-dump-times "Aggregate replacements: 0" 2 "cp" } } */ + /* { dg-final { scan-tree-dump-not "->c;" "optimized" } } */ +--- gcc/testsuite/gcc.dg/ipa/ipcp-agg-4.c ++++ gcc/testsuite/gcc.dg/ipa/ipcp-agg-4.c +@@ -56,5 +56,5 @@ entry2 (int c) + } + + /* { dg-final { scan-ipa-dump-times "Creating a specialized node of foo/\[0-9\]*\\." 2 "cp" } } */ +-/* { dg-final { scan-ipa-dump "Aggregate replacements:" "cp" } } */ ++/* { dg-final { scan-ipa-dump-times "Aggregate replacements:" 4 "cp" } } */ + /* { dg-final { scan-tree-dump-not "->c;" "optimized" } } */ +--- gcc/testsuite/gcc.dg/vect/pr101145_1.c ++++ gcc/testsuite/gcc.dg/vect/pr101145_1.c +@@ -1,5 +1,5 @@ + /* { dg-require-effective-target vect_char_add } */ +-/* { dg-additional-options "-O3 -fno-ipa-cp" } */ ++/* { dg-additional-options "-O3" } */ + #define TYPE signed char + #define MIN -128 + #define MAX 127 +--- gcc/testsuite/gcc.dg/vect/pr101145_2.c ++++ gcc/testsuite/gcc.dg/vect/pr101145_2.c +@@ -1,5 +1,5 @@ + /* { dg-require-effective-target vect_char_add } */ +-/* { dg-additional-options "-O3 -fno-ipa-cp" } */ ++/* { dg-additional-options "-O3" } */ + #define TYPE unsigned char + #define MIN 0 + #define MAX 255 +--- gcc/testsuite/gcc.dg/vect/pr101145_3.c ++++ gcc/testsuite/gcc.dg/vect/pr101145_3.c +@@ -1,5 +1,5 @@ + /* { dg-require-effective-target vect_long_long } */ +-/* { dg-additional-options "-O3 -fno-ipa-cp" } */ ++/* { dg-additional-options "-O3" } */ + #define TYPE int * + #define MIN ((TYPE)0) + #define MAX ((TYPE)((long long)-1)) +--- gcc/testsuite/gcc.dg/ipa/pr123543.c ++++ gcc/testsuite/gcc.dg/ipa/pr123543.c +@@ -1,14 +0,0 @@ ++/* { dg-do run } */ ++/* { dg-options "-O3" } */ ++ ++__attribute__((noinline)) ++static int local_f(int a, int b) { return a + b; } ++ ++__attribute__((noinline)) ++int extern_f(int a, int b) { return local_f(a, b); } ++ ++int unused_g1(int b) { return extern_f(0, b); } ++ ++int (*volatile fp)(int, int) = extern_f; ++ ++int main() { if (fp(1, 2) != 3) __builtin_abort(); } diff --git a/gcc16-libstdc++-docs.patch b/gcc16-libstdc++-docs.patch index f1fa736..7d2d357 100644 --- a/gcc16-libstdc++-docs.patch +++ b/gcc16-libstdc++-docs.patch @@ -4,7 +4,7 @@ FSF

-+ Release 16.0.0 ++ Release 16.0.1 +

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation @@ -17,7 +17,7 @@

- The API documentation, rendered into HTML, can be viewed online + The API documentation, rendered into HTML, can be viewed locally -+ for the 16.0.0 release, ++ for the 16.0.1 release, + online for each GCC release and diff --git a/gcc16-pr121778-revert.patch b/gcc16-pr121778-revert.patch new file mode 100644 index 0000000..5d43cad --- /dev/null +++ b/gcc16-pr121778-revert.patch @@ -0,0 +1,170 @@ +Temporarily revert PR121778 until PR123530 is fixed. + +2026-01-09 Shreya Munnangi + Jeff Law + + PR target/121778 + gcc/ + * match.pd: Add pattern to recognize rotate with one or more + bits flipped via xor. + * config/sh/sh.md (*rotcl); New variant which handles the output + we get after the match.pd change above. + + gcc/testsuite/ + * gcc.target/riscv/pr121778.c: New test. + +--- gcc/config/sh/sh.md ++++ gcc/config/sh/sh.md +@@ -3271,25 +3271,6 @@ (define_insn_and_split "*rotcl" + operands[3] = get_t_reg_rtx (); + }) + +-(define_insn_and_split "*rotcl" +- [(set (match_operand:SI 0 "arith_reg_dest") +- (xor:SI (rotate:SI (match_operand:SI 1 "arith_reg_operand") +- (const_int 1)) +- (const_int 1))) +- (clobber (reg:SI T_REG))] +- "TARGET_SH1 && can_create_pseudo_p ()" +- "#" +- "&& 1" +- [(parallel [(set (match_dup 0) +- (ior:SI (ashift:SI (match_dup 1) (const_int 1)) +- (and:SI (match_dup 3) (const_int 1)))) +- (clobber (reg:SI T_REG))])] +-{ +- rtx t = gen_rtx_GE (SImode, operands[1], const0_rtx); +- sh_split_treg_set_expr (t, curr_insn); +- operands[3] = get_t_reg_rtx (); +-}) +- + (define_insn_and_split "*rotcl" + [(set (match_operand:SI 0 "arith_reg_dest") + (ior:SI (and:SI (match_operand:SI 1 "arith_reg_or_t_reg_operand") +--- gcc/match.pd ++++ gcc/match.pd +@@ -12172,27 +12172,3 @@ and, + (simplify + (IFN_VEC_SHL_INSERT (vec_duplicate@1 @0) @0) + @1) +- +-/* In this case the XOR flips bits that originate from the result of the +- right shift and do not impact the result of the left shift. We can +- reassociate the XOR to work on the final result and simplify the rest +- to a rotate. */ +-(simplify +- (bit_ior:c (lshift @0 INTEGER_CST@1) +- (bit_xor (rshift @2 INTEGER_CST@3) INTEGER_CST@4)) +- (if (((~((HOST_WIDE_INT_1U << tree_to_uhwi (@1)) - 1)) & tree_to_uhwi (@4)) == 0 +- && (tree_to_uhwi (@1) + tree_to_uhwi (@3)) == TYPE_PRECISION (type) +- && TYPE_UNSIGNED (type) +- && @0 == @2) +- (bit_xor (rrotate @0 @3) @4))) +- +-/* Similarly, but in this case the XOR flips bits that originate from the +- result of the left shift. */ +-(simplify +- (bit_ior:c (bit_xor (lshift @0 INTEGER_CST@1) INTEGER_CST@2) +- (rshift @3 INTEGER_CST@4)) +- (if ((((((HOST_WIDE_INT_1U << tree_to_uhwi (@1)) - 1)) & tree_to_uhwi (@2)) == 0) +- && (tree_to_uhwi (@1) + tree_to_uhwi (@4)) == TYPE_PRECISION (type) +- && TYPE_UNSIGNED (type) +- && @0 == @3) +- (bit_xor (rrotate @0 @4) @2))) +--- gcc/testsuite/gcc.target/riscv/pr121778.c ++++ gcc/testsuite/gcc.target/riscv/pr121778.c +@@ -1,94 +0,0 @@ +-/* { dg-do compile } */ +-/* { dg-options "-O2 -march=rv64gcb -mabi=lp64d" { target rv64} } */ +-/* { dg-options "-O2 -march=rv32gcb -mabi=ilp32" { target rv32} } */ +- +-/* We need to adjust the constant so this works for rv32 and rv64. */ +-#if __riscv_xlen == 32 +-#define ONE 1U +-#define TYPE unsigned int +-#else +-#define ONE 1UL +-#define TYPE unsigned long +-#endif +- +-#define F1(C) TYPE test_01##C (TYPE a) { return (a << (__riscv_xlen - C)) | ((a >> C) ^ 1); } +-#define F2(C) TYPE test_02##C (TYPE a) { return ((a >> (__riscv_xlen - C)) ^ 1) | (a << C); } +-#define F3(C) TYPE test_03##C (TYPE a) { return ((a << (__riscv_xlen - C)) ^ (ONE << (__riscv_xlen - 1))) | (a >> C); } +-#define F4(C) TYPE test_04##C (TYPE a) { return (a >> (__riscv_xlen - C)) | ((a << C) ^ (ONE << (__riscv_xlen - 1))); } +- +-#define F(C) F1(C) F2(C) F3(C) F4(C) +- +- +-F (1) +-F (2) +-F (3) +-F (4) +-F (5) +-F (6) +-F (7) +-F (8) +-F (9) +-F (10) +-F (11) +-F (12) +-F (13) +-F (14) +-F (15) +-F (16) +-F (17) +-F (18) +-F (19) +-F (20) +-F (21) +-F (22) +-F (23) +-F (24) +-F (25) +-F (26) +-F (27) +-F (28) +-F (29) +-F (30) +-F (31) +-#if __riscv_xlen == 64 +-F (32) +-F (33) +-F (34) +-F (35) +-F (36) +-F (37) +-F (38) +-F (39) +-F (40) +-F (41) +-F (42) +-F (43) +-F (44) +-F (45) +-F (46) +-F (47) +-F (48) +-F (49) +-F (50) +-F (51) +-F (52) +-F (53) +-F (54) +-F (55) +-F (56) +-F (57) +-F (58) +-F (59) +-F (60) +-F (61) +-F (62) +-F (63) +- +-/* { dg-final { scan-assembler-times "\trori" 252 { target { rv64 } } } } */ +-/* { dg-final { scan-assembler-times "\txori" 126 { target { rv64 } } } } */ +-/* { dg-final { scan-assembler-times "\tbinv" 126 { target { rv64 } } } } */ +- +-/* { dg-final { scan-assembler-times "\trori" 124 { target { rv32 } } } } */ +-/* { dg-final { scan-assembler-times "\txori" 62 { target { rv32 } } } } */ +-/* { dg-final { scan-assembler-times "\tbinv" 62 { target { rv32 } } } } */ +-#endif diff --git a/gcc16-pr123189.patch b/gcc16-pr123189.patch deleted file mode 100644 index 4262362..0000000 --- a/gcc16-pr123189.patch +++ /dev/null @@ -1,58 +0,0 @@ -Since we now defer noexcept parsing for templated friends, some places -need to be updated to cope with friend template specializations -- their -TI_TEMPLATE is a TREE_LIST rather than a TEMPLATE_DECL, and they never -introduce new template parameters. - -2026-01-09 Patrick Palka - - PR c++/123189 - -gcc/cp/ChangeLog: - - * name-lookup.cc (binding_to_template_parms_of_scope_p): - Gracefully handle TEMPLATE_INFO whose TI_TEMPLATE is a TREE_LIST. - * pt.cc (maybe_begin_member_template_processing): For a friend - template specialization consider its class context instead. - -gcc/testsuite/ChangeLog: - - * g++.dg/cpp0x/noexcept92.C: New test. - ---- gcc/cp/name-lookup.cc -+++ gcc/cp/name-lookup.cc -@@ -8004,6 +8004,7 @@ binding_to_template_parms_of_scope_p (cxx_binding *binding, - /* The template of the current scope, iff said scope is a primary - template. */ - tmpl = (tinfo -+ && TREE_CODE (TI_TEMPLATE (tinfo)) == TEMPLATE_DECL - && PRIMARY_TEMPLATE_P (TI_TEMPLATE (tinfo)) - ? TI_TEMPLATE (tinfo) - : NULL_TREE); ---- gcc/cp/pt.cc -+++ gcc/cp/pt.cc -@@ -546,9 +546,9 @@ maybe_begin_member_template_processing (tree decl) - int levels = 0; - bool nsdmi = TREE_CODE (decl) == FIELD_DECL; - -- if (nsdmi) -+ if (nsdmi || decl_specialization_friend_p (decl)) - { -- tree ctx = DECL_CONTEXT (decl); -+ tree ctx = nsdmi ? DECL_CONTEXT (decl) : DECL_CHAIN (decl); - decl = (CLASSTYPE_TEMPLATE_INFO (ctx) - /* Disregard full specializations (c++/60999). */ - && uses_template_parms (ctx) ---- gcc/testsuite/g++.dg/cpp0x/noexcept92.C -+++ gcc/testsuite/g++.dg/cpp0x/noexcept92.C -@@ -0,0 +1,11 @@ -+// PR c++/123189 -+// { dg-do compile { target c++11 } } -+ -+template void f() noexcept(noexcept(T())); -+ -+template -+struct A { -+ friend void f() noexcept(noexcept(T())); -+}; -+ -+template struct A; diff --git a/gcc16-pr123414-revert.patch b/gcc16-pr123414-revert.patch new file mode 100644 index 0000000..475ca7b --- /dev/null +++ b/gcc16-pr123414-revert.patch @@ -0,0 +1,92 @@ +Temporarily revert PR123414 until PR123525 is fixed. + +2026-01-09 Robin Dapp + + PR tree-optimization/123414 + * tree-ssa-forwprop.cc (simplify_vector_constructor): + Use ssizetype as mask type. + +--- gcc/tree-ssa-forwprop.cc ++++ gcc/tree-ssa-forwprop.cc +@@ -3829,8 +3829,8 @@ static bool + simplify_vector_constructor (gimple_stmt_iterator *gsi) + { + gimple *stmt = gsi_stmt (*gsi); +- tree op, orig[2], type; +- unsigned i; ++ tree op, orig[2], type, elem_type; ++ unsigned elem_size, i; + unsigned HOST_WIDE_INT nelts; + unsigned HOST_WIDE_INT refnelts; + enum tree_code conv_code; +@@ -3843,6 +3843,8 @@ simplify_vector_constructor (gimple_stmt_iterator *gsi) + + if (!TYPE_VECTOR_SUBPARTS (type).is_constant (&nelts)) + return false; ++ elem_type = TREE_TYPE (type); ++ elem_size = TREE_INT_CST_LOW (TYPE_SIZE (elem_type)); + + orig[0] = NULL; + orig[1] = NULL; +@@ -4175,7 +4177,13 @@ simplify_vector_constructor (gimple_stmt_iterator *gsi) + machine_mode vmode = TYPE_MODE (perm_type); + if (!can_vec_perm_const_p (vmode, vmode, indices)) + return false; +- mask_type = build_vector_type (ssizetype, refnelts); ++ mask_type ++ = build_vector_type (build_nonstandard_integer_type (elem_size, 1), ++ refnelts); ++ if (GET_MODE_CLASS (TYPE_MODE (mask_type)) != MODE_VECTOR_INT ++ || maybe_ne (GET_MODE_SIZE (TYPE_MODE (mask_type)), ++ GET_MODE_SIZE (TYPE_MODE (perm_type)))) ++ return false; + tree op2 = vec_perm_indices_to_tree (mask_type, indices); + bool converted_orig1 = false; + gimple_seq stmts = NULL; +@@ -4240,7 +4248,13 @@ simplify_vector_constructor (gimple_stmt_iterator *gsi) + machine_mode vmode = TYPE_MODE (type); + if (!can_vec_perm_const_p (vmode, vmode, indices)) + return false; +- mask_type = build_vector_type (ssizetype, nelts); ++ mask_type ++ = build_vector_type (build_nonstandard_integer_type (elem_size, 1), ++ nelts); ++ if (GET_MODE_CLASS (TYPE_MODE (mask_type)) != MODE_VECTOR_INT ++ || maybe_ne (GET_MODE_SIZE (TYPE_MODE (mask_type)), ++ GET_MODE_SIZE (TYPE_MODE (type)))) ++ return false; + blend_op2 = vec_perm_indices_to_tree (mask_type, indices); + } + +--- gcc/testsuite/gcc.target/riscv/rvv/autovec/pr123414.c ++++ gcc/testsuite/gcc.target/riscv/rvv/autovec/pr123414.c +@@ -1,29 +0,0 @@ +-/* { dg-do compile } */ +-/* { dg-options "-march=rv64gcv_zvl256b -mabi=lp64d -mrvv-max-lmul=m8 -O3 -fsigned-char -fno-strict-aliasing -fwrapv -fdump-tree-optimized -std=gnu99" } */ +- +-signed char a=2; +-long long b; +-long c = 93; +-int e[1][9]; +- +-void +-g (long cc, int ee[][9]) +-{ +- for (int i = 0; i < 4; i++) +- for (int j = 0; j < 5; j++) +- for (unsigned k = 0; k < 9; k++) +- { +- a *= cc; +- for (int l = 0; l < 6; l += (ee[k] <= 0) + 2) +- ; +- } +-} +- +-int main() { +- g( c, e); +- b = (int)a; +- if (b != 34) +- __builtin_abort (); +-} +- +-/* { dg-final { scan-tree-dump-times "\[a-zA-Z_\]\[a-zA-Z0-9_\]+.=.VEC_PERM_EXPR <_\[0-9\]+, \\\{ 1(?:, 1){255} \\\}, \\\{ 0, 257, 258" 3 "optimized" } } */ diff --git a/sources b/sources index 2d3f1fe..7ba5726 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (gcc-16.0.0-20260110.tar.xz) = 9be9b72ae45f888efe30ef50f8b497ebeaef327d037ab7a70a354d05986567115447dce8ff660b69b96d3cc6e145f509f35261d3f33902f97a7169817a972eed +SHA512 (gcc-16.0.1-20260112.tar.xz) = ca2a3a0daae98b90dbde92591126de93325e8caee66fd7f6cbdff7ef453d1329e87c0593636e4db5d63a3503645cabede86ed894760ce6d3ccd3a95a974dc120 SHA512 (isl-0.24.tar.bz2) = aab3bddbda96b801d0f56d2869f943157aad52a6f6e6a61745edd740234c635c38231af20bc3f1a08d416a5e973a90e18249078ed8e4ae2f1d5de57658738e95 SHA512 (newlib-cygwin-d35cc82b5ec15bb8a5fe0fe11e183d1887992e99.tar.xz) = ef9495745a96d1d76f9f425c4a48c807fface36a1aa92351c5d024103678d144d046e8de55d195103784472c14874e29e4b9284d5d6a2e7bb27fd98c8455a881 SHA512 (nvptx-tools-a0c1fff6534a4df9fb17937c3c4a4b1071212029.tar.xz) = 7f862986065028df70c843fc3f2c89e200a76b48ad0bd51c749ac8a5aab7be0ebdf35be182fad2407b3281615e75be1ac6833ab6a5130ae9920169a0412f94f0 From 1c7da76a52dc36fd6ace3cfeba45abdee82d820d Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 12 Jan 2026 20:27:05 +0100 Subject: [PATCH 10/12] 16.0.1-0.1 --- gcc16-ipacp-revert.patch | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/gcc16-ipacp-revert.patch b/gcc16-ipacp-revert.patch index dae3ba2..c1424b4 100644 --- a/gcc16-ipacp-revert.patch +++ b/gcc16-ipacp-revert.patch @@ -1063,17 +1063,17 @@ Temporarily revert until PR123542 is resolved. --- gcc/testsuite/gcc.dg/ipa/pr123543.c +++ gcc/testsuite/gcc.dg/ipa/pr123543.c @@ -1,14 +0,0 @@ -+/* { dg-do run } */ -+/* { dg-options "-O3" } */ -+ -+__attribute__((noinline)) -+static int local_f(int a, int b) { return a + b; } -+ -+__attribute__((noinline)) -+int extern_f(int a, int b) { return local_f(a, b); } -+ -+int unused_g1(int b) { return extern_f(0, b); } -+ -+int (*volatile fp)(int, int) = extern_f; -+ -+int main() { if (fp(1, 2) != 3) __builtin_abort(); } +-/* { dg-do run } */ +-/* { dg-options "-O3" } */ +- +-__attribute__((noinline)) +-static int local_f(int a, int b) { return a + b; } +- +-__attribute__((noinline)) +-int extern_f(int a, int b) { return local_f(a, b); } +- +-int unused_g1(int b) { return extern_f(0, b); } +- +-int (*volatile fp)(int, int) = extern_f; +- +-int main() { if (fp(1, 2) != 3) __builtin_abort(); } From fa1effd14b1163d57f66a353a5cb3a20f13edf04 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 13 Jan 2026 14:43:02 +0100 Subject: [PATCH 11/12] 16.0.1-0.2 --- .gitignore | 1 + gcc.spec | 76 ++++++++++++++++++++++++++++-- gcc16-pr123414-revert.patch | 92 ------------------------------------- gcc16-pr123573.patch | 53 +++++++++++++++++++++ sources | 2 +- 5 files changed, 127 insertions(+), 97 deletions(-) delete mode 100644 gcc16-pr123414-revert.patch create mode 100644 gcc16-pr123573.patch diff --git a/.gitignore b/.gitignore index 73b38af..5fed11f 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ /gcc-16.0.0-20260110.tar.xz /gcc-16.0.0-20260112.tar.xz /gcc-16.0.1-20260112.tar.xz +/gcc-16.0.1-20260113.tar.xz diff --git a/gcc.spec b/gcc.spec index e461bcf..6e7eb04 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,5 +1,5 @@ -%global DATE 20260112 -%global gitrev 25ea0dce3d78a294015cf5df891a4630172b0d12 +%global DATE 20260113 +%global gitrev a0ec01c1ccb192681b09dd03c265e84fe2bd00e5 %global gcc_version 16.0.1 %global gcc_major 16 # Note, gcc_release must be integer, if you want to add suffixes to @@ -158,7 +158,7 @@ Summary: Various compilers (C, C++, Objective-C, ...) Name: gcc Version: %{gcc_version} -Release: %{gcc_release}.1%{?dist} +Release: %{gcc_release}.2%{?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 @@ -327,7 +327,7 @@ Patch14: gcc16-pr120250.patch Patch15: gcc16-pr123273.patch Patch16: gcc16-ipacp-revert.patch Patch17: gcc16-pr121778-revert.patch -Patch18: gcc16-pr123414-revert.patch +Patch18: gcc16-pr123573.patch Patch50: isl-rh2155127.patch @@ -1762,6 +1762,11 @@ GROUP ( /%{_lib}/libgcc_s.so.1 libgcc.a )' > $FULLPATH/libgcc_s.so %else ln -sf /%{_lib}/libgcc_s.so.1 $FULLPATH/libgcc_s.so %endif +rm -f $FULLPATH/libgcc_s_asneeded.so +echo '/* GNU ld script + Add DT_NEEDED entry for libgcc_s.so only if needed. */ +OUTPUT_FORMAT('`gcc -Wl,--print-output-format -nostdlib -r -o /dev/null`') +INPUT ( AS_NEEDED ( -lgcc_s ) )' > $FULLPATH/libgcc_s_asneeded.so %ifarch sparcv9 ppc %ifarch ppc rm -f $FULLPATH/64/libgcc_s.so @@ -1773,6 +1778,11 @@ GROUP ( /lib64/libgcc_s.so.1 libgcc.a )' > $FULLPATH/64/libgcc_s.so %else ln -sf /lib64/libgcc_s.so.1 $FULLPATH/64/libgcc_s.so %endif +rm -f $FULLPATH/64/libgcc_s_asneeded.so +echo '/* GNU ld script + Add DT_NEEDED entry for libgcc_s.so only if needed. */ +OUTPUT_FORMAT('`gcc -m64 -Wl,--print-output-format -nostdlib -r -o /dev/null`') +INPUT ( AS_NEEDED ( -lgcc_s ) )' > $FULLPATH/64/libgcc_s_asneeded.so %endif %ifarch %{multilib_64_archs} %ifarch x86_64 ppc64 ppc64p7 @@ -1785,6 +1795,11 @@ GROUP ( /lib/libgcc_s.so.1 libgcc.a )' > $FULLPATH/32/libgcc_s.so %else ln -sf /lib/libgcc_s.so.1 $FULLPATH/32/libgcc_s.so %endif +rm -f $FULLPATH/32/libgcc_s_asneeded.so +echo '/* GNU ld script + Add DT_NEEDED entry for libgcc_s.so only if needed. */ +OUTPUT_FORMAT('`gcc -m32 -Wl,--print-output-format -nostdlib -r -o /dev/null`') +INPUT ( AS_NEEDED ( -lgcc_s ) )' > $FULLPATH/32/libgcc_s_asneeded.so %endif mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.spec $FULLPATH/ @@ -1857,6 +1872,12 @@ ln -sf ../../../libitm.so.1.* libitm.so %endif %if %{build_libatomic} ln -sf ../../../libatomic.so.1.* libatomic.so +rm -f libatomic_asneeded.so libatomic_asneeded.a +echo '/* GNU ld script + Add DT_NEEDED entry for -latomic only if needed. */ +OUTPUT_FORMAT('`gcc -Wl,--print-output-format -nostdlib -r -o /dev/null`') +INPUT ( AS_NEEDED ( -latomic ) )' > libatomic_asneeded.so +ln -sf libatomic.a libatomic_asneeded.a %endif %if %{build_libasan} ln -sf ../../../libasan.so.8.* libasan.so @@ -1898,6 +1919,12 @@ ln -sf ../../../../%{_lib}/libitm.so.1.* libitm.so %endif %if %{build_libatomic} ln -sf ../../../../%{_lib}/libatomic.so.1.* libatomic.so +rm -f libatomic_asneeded.so libatomic_asneeded.a +echo '/* GNU ld script + Add DT_NEEDED entry for -latomic only if needed. */ +OUTPUT_FORMAT('`gcc -Wl,--print-output-format -nostdlib -r -o /dev/null`') +INPUT ( AS_NEEDED ( -latomic ) )' > libatomic_asneeded.so +ln -sf libatomic.a libatomic_asneeded.a %endif %if %{build_libasan} ln -sf ../../../../%{_lib}/libasan.so.8.* libasan.so @@ -2072,6 +2099,17 @@ rm -f libatomic.so echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libatomic.so.1.* | sed 's,^.*liba,liba,'`' )' > libatomic.so echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libatomic.so.1.* | sed 's,^.*liba,liba,'`' )' > 64/libatomic.so mv -f %{buildroot}%{_prefix}/lib64/libatomic.*a 64/ +rm -f libatomic_asneeded.so libatomic_asneeded.a 64/libatomic_asneeded.so 64/libatomic_asneeded.a +echo '/* GNU ld script + Add DT_NEEDED entry for -latomic only if needed. */ +OUTPUT_FORMAT('`gcc -Wl,--print-output-format -nostdlib -r -o /dev/null`') +INPUT ( AS_NEEDED ( -latomic ) )' > libatomic_asneeded.so +ln -sf libatomic.a libatomic_asneeded.a +echo '/* GNU ld script + Add DT_NEEDED entry for -latomic only if needed. */ +OUTPUT_FORMAT('`gcc -m64 -Wl,--print-output-format -nostdlib -r -o /dev/null`') +INPUT ( AS_NEEDED ( -latomic ) )' > 64/libatomic_asneeded.so +ln -sf libatomic.a 64/libatomic_asneeded.a %endif %if %{build_libasan} rm -f libasan.so @@ -2204,6 +2242,17 @@ rm -f libatomic.so echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libatomic.so.1.* | sed 's,^.*liba,liba,'`' )' > libatomic.so echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libatomic.so.1.* | sed 's,^.*liba,liba,'`' )' > 32/libatomic.so mv -f %{buildroot}%{_prefix}/lib/libatomic.*a 32/ +rm -f libatomic_asneeded.so libatomic_asneeded.a 32/libatomic_asneeded.so 32/libatomic_asneeded.a +echo '/* GNU ld script + Add DT_NEEDED entry for -latomic only if needed. */ +OUTPUT_FORMAT('`gcc -Wl,--print-output-format -nostdlib -r -o /dev/null`') +INPUT ( AS_NEEDED ( -latomic ) )' > libatomic_asneeded.so +ln -sf libatomic.a libatomic_asneeded.a +echo '/* GNU ld script + Add DT_NEEDED entry for -latomic only if needed. */ +OUTPUT_FORMAT('`gcc -m32 -Wl,--print-output-format -nostdlib -r -o /dev/null`') +INPUT ( AS_NEEDED ( -latomic ) )' > 32/libatomic_asneeded.so +ln -sf libatomic.a 32/libatomic_asneeded.a %endif %if %{build_libasan} rm -f libasan.so @@ -2919,6 +2968,7 @@ end %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgcov.a %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgcc_eh.a %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgcc_s.so +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgcc_s_asneeded.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgomp.spec %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgomp.a %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgomp.so @@ -2938,6 +2988,7 @@ end %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libgcov.a %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libgcc_eh.a %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libgcc_s.so +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libgcc_s_asneeded.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libgomp.a %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libgomp.so %if %{build_libquadmath} @@ -2951,6 +3002,8 @@ end %if %{build_libatomic} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libatomic.a %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libatomic.so +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libatomic_asneeded.a +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libatomic_asneeded.so %endif %if %{build_libasan} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libasan.a @@ -2969,6 +3022,7 @@ end %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libgcov.a %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libgcc_eh.a %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libgcc_s.so +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libgcc_s_asneeded.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libgomp.a %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libgomp.so %if %{build_libquadmath} @@ -2982,6 +3036,8 @@ end %if %{build_libatomic} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libatomic.a %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libatomic.so +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libatomic_asneeded.a +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libatomic_asneeded.so %endif %if %{build_libasan} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libasan.a @@ -3005,6 +3061,8 @@ end %if %{build_libatomic} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libatomic.a %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libatomic.so +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libatomic_asneeded.a +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libatomic_asneeded.so %endif %if %{build_libasan} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libasan.a @@ -3019,6 +3077,8 @@ end %if %{build_libatomic} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libatomic.a %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libatomic.so +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libatomic_asneeded.a +%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libatomic_asneeded.so %endif %if %{build_libasan} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libasan.so @@ -3914,6 +3974,14 @@ end %endif %changelog +* Tue Jan 13 2026 Jakub Jelinek 16.0.1-0.2 +- update from trunk + - PRs fortran/91960, fortran/112460, libstdc++/123396, + rtl-optimization/123444, rtl-optimization/123501, target/117581, + target/123484, testsuite/123098, tree-optimization/122843, + tree-optimization/122845, tree-optimization/123301, + tree-optimization/123525, tree-optimization/123539 + * Mon Jan 12 2026 Jakub Jelinek 16.0.1-0.1 - update from trunk - PRs c++/81337, c++/115163, c++/123526, fortran/77415, ipa/122458, diff --git a/gcc16-pr123414-revert.patch b/gcc16-pr123414-revert.patch deleted file mode 100644 index 475ca7b..0000000 --- a/gcc16-pr123414-revert.patch +++ /dev/null @@ -1,92 +0,0 @@ -Temporarily revert PR123414 until PR123525 is fixed. - -2026-01-09 Robin Dapp - - PR tree-optimization/123414 - * tree-ssa-forwprop.cc (simplify_vector_constructor): - Use ssizetype as mask type. - ---- gcc/tree-ssa-forwprop.cc -+++ gcc/tree-ssa-forwprop.cc -@@ -3829,8 +3829,8 @@ static bool - simplify_vector_constructor (gimple_stmt_iterator *gsi) - { - gimple *stmt = gsi_stmt (*gsi); -- tree op, orig[2], type; -- unsigned i; -+ tree op, orig[2], type, elem_type; -+ unsigned elem_size, i; - unsigned HOST_WIDE_INT nelts; - unsigned HOST_WIDE_INT refnelts; - enum tree_code conv_code; -@@ -3843,6 +3843,8 @@ simplify_vector_constructor (gimple_stmt_iterator *gsi) - - if (!TYPE_VECTOR_SUBPARTS (type).is_constant (&nelts)) - return false; -+ elem_type = TREE_TYPE (type); -+ elem_size = TREE_INT_CST_LOW (TYPE_SIZE (elem_type)); - - orig[0] = NULL; - orig[1] = NULL; -@@ -4175,7 +4177,13 @@ simplify_vector_constructor (gimple_stmt_iterator *gsi) - machine_mode vmode = TYPE_MODE (perm_type); - if (!can_vec_perm_const_p (vmode, vmode, indices)) - return false; -- mask_type = build_vector_type (ssizetype, refnelts); -+ mask_type -+ = build_vector_type (build_nonstandard_integer_type (elem_size, 1), -+ refnelts); -+ if (GET_MODE_CLASS (TYPE_MODE (mask_type)) != MODE_VECTOR_INT -+ || maybe_ne (GET_MODE_SIZE (TYPE_MODE (mask_type)), -+ GET_MODE_SIZE (TYPE_MODE (perm_type)))) -+ return false; - tree op2 = vec_perm_indices_to_tree (mask_type, indices); - bool converted_orig1 = false; - gimple_seq stmts = NULL; -@@ -4240,7 +4248,13 @@ simplify_vector_constructor (gimple_stmt_iterator *gsi) - machine_mode vmode = TYPE_MODE (type); - if (!can_vec_perm_const_p (vmode, vmode, indices)) - return false; -- mask_type = build_vector_type (ssizetype, nelts); -+ mask_type -+ = build_vector_type (build_nonstandard_integer_type (elem_size, 1), -+ nelts); -+ if (GET_MODE_CLASS (TYPE_MODE (mask_type)) != MODE_VECTOR_INT -+ || maybe_ne (GET_MODE_SIZE (TYPE_MODE (mask_type)), -+ GET_MODE_SIZE (TYPE_MODE (type)))) -+ return false; - blend_op2 = vec_perm_indices_to_tree (mask_type, indices); - } - ---- gcc/testsuite/gcc.target/riscv/rvv/autovec/pr123414.c -+++ gcc/testsuite/gcc.target/riscv/rvv/autovec/pr123414.c -@@ -1,29 +0,0 @@ --/* { dg-do compile } */ --/* { dg-options "-march=rv64gcv_zvl256b -mabi=lp64d -mrvv-max-lmul=m8 -O3 -fsigned-char -fno-strict-aliasing -fwrapv -fdump-tree-optimized -std=gnu99" } */ -- --signed char a=2; --long long b; --long c = 93; --int e[1][9]; -- --void --g (long cc, int ee[][9]) --{ -- for (int i = 0; i < 4; i++) -- for (int j = 0; j < 5; j++) -- for (unsigned k = 0; k < 9; k++) -- { -- a *= cc; -- for (int l = 0; l < 6; l += (ee[k] <= 0) + 2) -- ; -- } --} -- --int main() { -- g( c, e); -- b = (int)a; -- if (b != 34) -- __builtin_abort (); --} -- --/* { dg-final { scan-tree-dump-times "\[a-zA-Z_\]\[a-zA-Z0-9_\]+.=.VEC_PERM_EXPR <_\[0-9\]+, \\\{ 1(?:, 1){255} \\\}, \\\{ 0, 257, 258" 3 "optimized" } } */ diff --git a/gcc16-pr123573.patch b/gcc16-pr123573.patch new file mode 100644 index 0000000..2bc769d --- /dev/null +++ b/gcc16-pr123573.patch @@ -0,0 +1,53 @@ +The following fixes the fix from r16-6709-ga4716ece529dfd some +more by making sure permute to one operand folding faces same +element number vectors but also insert a VIEW_CONVERT_EXPR for +the case one is VLA and one is VLS (when the VLA case is actually +constant, like with -msve-vector-bits=128). It also makes the +assert that output and input element numbers match done in +fold_vec_perm which this pattern eventually dispatches to into +a check (as the comment already indicates). + +Testcases are in the target specific aarch64 testsuite already. + +Bootstrap and regtest ongoing on x86_64-unknown-linux-gnu. + +2026-01-13 Richard Biener + + PR middle-end/123573 + * fold-const.cc (fold_vec_perm): Actually check, not assert, + that input and output vector element numbers agree. + * match.pd (vec_perm @0 @1 @2): Make sure element numbers + are the same when folding to an input vector and wrap that + inside a VIEW_CONVERT_EXPR. + +--- gcc/fold-const.cc ++++ gcc/fold-const.cc +@@ -10704,11 +10704,10 @@ fold_vec_perm (tree type, tree arg0, tree arg1, const vec_perm_indices &sel) + + /* For fall back case, we want to ensure we have VLS vectors + with equal length. */ +- if (!sel.length ().is_constant (&nelts)) ++ if (!sel.length ().is_constant (&nelts) ++ || !known_eq (sel.length (), TYPE_VECTOR_SUBPARTS (TREE_TYPE (arg0)))) + return NULL_TREE; + +- gcc_assert (known_eq (sel.length (), +- TYPE_VECTOR_SUBPARTS (TREE_TYPE (arg0)))); + tree *in_elts = XALLOCAVEC (tree, nelts * 2); + if (!vec_cst_ctor_to_array (arg0, nelts, in_elts) + || !vec_cst_ctor_to_array (arg1, nelts, in_elts + nelts)) +--- gcc/match.pd ++++ gcc/match.pd +@@ -11528,9 +11528,9 @@ and, + vec_perm_indices sel (builder, single_arg ? 1 : 2, nelts_in); + } + (if (known_eq (nelts, nelts_in) && sel.series_p (0, 1, 0, 1)) +- { op0; } +- (if (sel.series_p (0, 1, nelts_in, 1)) +- { op1; } ++ (view_convert @0) ++ (if (known_eq (nelts, nelts_in) && sel.series_p (0, 1, nelts_in, 1)) ++ (view_convert @1) + (with + { + if (!single_arg) diff --git a/sources b/sources index 7ba5726..5fa3693 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (gcc-16.0.1-20260112.tar.xz) = ca2a3a0daae98b90dbde92591126de93325e8caee66fd7f6cbdff7ef453d1329e87c0593636e4db5d63a3503645cabede86ed894760ce6d3ccd3a95a974dc120 +SHA512 (gcc-16.0.1-20260113.tar.xz) = 1cd4985667f4a0add59b053bc1ba945f8e7176eace95f3ba05e15de10e50ceaccc4343237c7e552d9bad36c35a7c15c46dccd9d2ff195ab5a85a32cbd5a78e82 SHA512 (isl-0.24.tar.bz2) = aab3bddbda96b801d0f56d2869f943157aad52a6f6e6a61745edd740234c635c38231af20bc3f1a08d416a5e973a90e18249078ed8e4ae2f1d5de57658738e95 SHA512 (newlib-cygwin-d35cc82b5ec15bb8a5fe0fe11e183d1887992e99.tar.xz) = ef9495745a96d1d76f9f425c4a48c807fface36a1aa92351c5d024103678d144d046e8de55d195103784472c14874e29e4b9284d5d6a2e7bb27fd98c8455a881 SHA512 (nvptx-tools-a0c1fff6534a4df9fb17937c3c4a4b1071212029.tar.xz) = 7f862986065028df70c843fc3f2c89e200a76b48ad0bd51c749ac8a5aab7be0ebdf35be182fad2407b3281615e75be1ac6833ab6a5130ae9920169a0412f94f0 From 11a761516774c8cdcf418b698858b56a72414a39 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 15 Jan 2026 16:59:36 +0100 Subject: [PATCH 12/12] 16.0.1-0.3 --- .gitignore | 1 + gcc.spec | 27 +- gcc16-ipacp-revert.patch | 1079 ----------------------------------- gcc16-pr120250.patch | 61 -- gcc16-pr121778-revert.patch | 170 ------ gcc16-pr123115.patch | 17 - gcc16-pr123573.patch | 53 -- sources | 2 +- 8 files changed, 19 insertions(+), 1391 deletions(-) delete mode 100644 gcc16-ipacp-revert.patch delete mode 100644 gcc16-pr120250.patch delete mode 100644 gcc16-pr121778-revert.patch delete mode 100644 gcc16-pr123115.patch delete mode 100644 gcc16-pr123573.patch diff --git a/.gitignore b/.gitignore index 5fed11f..b67c902 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ /gcc-16.0.0-20260112.tar.xz /gcc-16.0.1-20260112.tar.xz /gcc-16.0.1-20260113.tar.xz +/gcc-16.0.1-20260115.tar.xz diff --git a/gcc.spec b/gcc.spec index 6e7eb04..71e5d1d 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,5 +1,5 @@ -%global DATE 20260113 -%global gitrev a0ec01c1ccb192681b09dd03c265e84fe2bd00e5 +%global DATE 20260115 +%global gitrev 1a9a51aca25eaad91d80869c43859274fe5e1096 %global gcc_version 16.0.1 %global gcc_major 16 # Note, gcc_release must be integer, if you want to add suffixes to @@ -158,7 +158,7 @@ Summary: Various compilers (C, C++, Objective-C, ...) Name: gcc Version: %{gcc_version} -Release: %{gcc_release}.2%{?dist} +Release: %{gcc_release}.3%{?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 @@ -322,12 +322,7 @@ Patch9: gcc16-Wno-format-security.patch Patch10: gcc16-rh1574936.patch Patch11: gcc16-d-shared-libphobos.patch Patch12: gcc16-pr119006.patch -Patch13: gcc16-pr123115.patch -Patch14: gcc16-pr120250.patch -Patch15: gcc16-pr123273.patch -Patch16: gcc16-ipacp-revert.patch -Patch17: gcc16-pr121778-revert.patch -Patch18: gcc16-pr123573.patch +Patch13: gcc16-pr123273.patch Patch50: isl-rh2155127.patch @@ -2553,7 +2548,8 @@ rm -rf %{buildroot}%{_prefix}/lib64/go/%{gcc_major}/%{gcc_target_platform} rm -f %{buildroot}%{_prefix}/lib*/lib*.spec || : rm -f %{buildroot}%{_prefix}/lib*/libstdc++.modules.json || : rm -f %{buildroot}%{_prefix}/%{_lib}/lib{asan,atomic,gcc_s,gcobol,ga68,gdruntime,gfortran,go,gomp-plugin-*,gomp,gphobos,hwasan}.so || : -rm -f %{buildroot}%{_prefix}/%{_lib}/lib{itm,lsan,m2{cor,iso,log,min,pim},objc,quadmath,stdc++,tsan,ubsan}.so || : +rm -f %{buildroot}%{_prefix}/%{_lib}/lib{itm,lsan,m2{cor,iso,log,min,pim},objc,quadmath,stdc++,tsan,ubsan,gcc_s_asneeded,atomic_asneeded}.so || : +rm -f %{buildroot}%{_prefix}/%{_lib}/libatomic_asneeded.a || : rm -f %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/install-tools/{fixinc.sh,mkinstalldirs} || : rm -f %{buildroot}%{_prefix}/share/locale/*/LC_MESSAGES/libstdc++.mo || : rm -f %{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include-fixed/README || : @@ -3974,6 +3970,17 @@ end %endif %changelog +* Thu Jan 15 2026 Jakub Jelinek 16.0.1-0.3 +- update from trunk + - PRs c/123309, c++/120775, c++/122634, c++/123081, c++/123551, + debug/121045, driver/108865, driver/123504, ipa/122852, ipa/123542, + middle-end/123115, middle-end/123392, middle-end/123573, + rtl-optimization/123312, rtl-optimization/123544, target/38118, + target/114528, target/120250, target/121240, target/123092, + testsuite/122522, tree-optimization/119402, tree-optimization/120322, + tree-optimization/123109, tree-optimization/123190, + tree-optimization/123530 + * Tue Jan 13 2026 Jakub Jelinek 16.0.1-0.2 - update from trunk - PRs fortran/91960, fortran/112460, libstdc++/123396, diff --git a/gcc16-ipacp-revert.patch b/gcc16-ipacp-revert.patch deleted file mode 100644 index c1424b4..0000000 --- a/gcc16-ipacp-revert.patch +++ /dev/null @@ -1,1079 +0,0 @@ -Temporarily revert until PR123542 is resolved. - -2026-01-06 Martin Jambor - - * ipa-cp.h (class ipcp_bits_lattice): New members set_recipient_only, - recipient_only_p and m_recipient_only. - (class ipcp_vr_lattice): Likewise. - (ipcp_vr_lattice::init): Initialize also m_recipient_only. - * ipa-cp.cc (ipcp_bits_lattice::print): Adjust printting to also - print the new flag. - (ipcp_vr_lattice::print): Likewise. - (ipcp_vr_lattice::set_recipient_only): New function. - (ipcp_bits_lattice::set_recipient_only): Likewise. - (set_all_contains_variable): New parameter MAKE_SIMPLE_RECIPIENTS, set - bits and vr lattices to recibient only insted to bottom when it is - true. - (initialize_node_lattices): Pass true to the second parameter of - set_all_contains_variable. - (propagate_bits_across_jump_function): Treat recipient_only source - lattices like bottom. - (propagate_vr_across_jump_function): Likewise. - (ipcp_store_vr_results): Skip non-local nodes. - -2026-01-09 Martin Jambor - - * ipa-cp.cc (good_cloning_opportunity_p): Dump a message when - bailing out early too. - (find_more_scalar_values_for_callers_subset): Rename to - find_scalar_values_for_callers_subset, collect constants regardless of - what is already in the vector. Remove dumping. - (find_more_contexts_for_caller_subset): Rename to - find_contexts_for_caller_subset, collect contexts regardless of what - is already in the vector. Remove dumping. - (find_aggregate_values_for_callers_subset): Rename to - find_aggregate_values_for_callers_subset_gc, implement using new - functions. - (find_aggregate_values_for_callers_subset_1): New function. - (find_aggregate_values_for_callers_subset): Likewise. - (copy_known_vectors_add_val): Removed. - (dump_reestimation_message): New function. - (decide_about_value): Remove formal parameter avals, compute it - independently, and use it to estimate local cloning effects. - (struct cloning_opportunity_ranking): New type. - (compare_cloning_opportunities): New function. - (cloning_opportunity_ranking_evaluation): Likewise. - (decide_whether_version_node): Pre-sort candidates for cloning before - really evaluating them. Calculate context independent values only - when considering versioning for all contexts. - (ipcp_val_agg_replacement_ok_p): Renamed to - ipcp_val_replacement_ok_p, check also non-aggregate values. - ---- gcc/ipa-cp.cc -+++ gcc/ipa-cp.cc -@@ -339,25 +339,18 @@ ipcp_print_widest_int (FILE *f, const widest_int &value) - void - ipcp_bits_lattice::print (FILE *f) - { -- if (bottom_p ()) -- { -- fprintf (f, " Bits unusable (BOTTOM)\n"); -- return; -- } -- - if (top_p ()) -- fprintf (f, " Bits unknown (TOP)"); -+ fprintf (f, " Bits unknown (TOP)\n"); -+ else if (bottom_p ()) -+ fprintf (f, " Bits unusable (BOTTOM)\n"); - else - { - fprintf (f, " Bits: value = "); - ipcp_print_widest_int (f, get_value ()); - fprintf (f, ", mask = "); - ipcp_print_widest_int (f, get_mask ()); -+ fprintf (f, "\n"); - } -- -- if (m_recipient_only) -- fprintf (f, " (recipient only)"); -- fprintf (f, "\n"); - } - - /* Print value range lattice to F. */ -@@ -365,8 +358,6 @@ ipcp_bits_lattice::print (FILE *f) - void - ipcp_vr_lattice::print (FILE * f) - { -- if (m_recipient_only) -- fprintf (f, "(recipient only) "); - m_vr.dump (f); - } - -@@ -897,18 +888,6 @@ ipcp_vr_lattice::set_to_bottom () - return true; - } - --/* Set the flag that this lattice is a recipient only, return true if it was -- not set before. */ -- --bool --ipcp_vr_lattice::set_recipient_only () --{ -- if (m_recipient_only) -- return false; -- m_recipient_only = true; -- return true; --} -- - /* Set lattice value to bottom, if it already isn't the case. */ - - bool -@@ -945,18 +924,6 @@ ipcp_bits_lattice::known_nonzero_p () const - return wi::ne_p (wi::bit_and (wi::bit_not (m_mask), m_value), 0); - } - --/* Set the flag that this lattice is a recipient only, return true if it was not -- set before. */ -- --bool --ipcp_bits_lattice::set_recipient_only () --{ -- if (m_recipient_only) -- return false; -- m_recipient_only = true; -- return true; --} -- - /* Convert operand to value, mask form. */ - - void -@@ -1359,28 +1326,17 @@ intersect_argaggs_with (vec &elts, - } - - /* Mark bot aggregate and scalar lattices as containing an unknown variable, -- return true is any of them has not been marked as such so far. If if -- MAKE_SIMPLE_RECIPIENTS is true, set the lattices that can only hold one -- value to being recipients only, otherwise also set them to bottom. */ -+ return true is any of them has not been marked as such so far. */ - - static inline bool --set_all_contains_variable (class ipcp_param_lattices *plats, -- bool make_simple_recipients = false) -+set_all_contains_variable (class ipcp_param_lattices *plats) - { - bool ret; - ret = plats->itself.set_contains_variable (); - ret |= plats->ctxlat.set_contains_variable (); - ret |= set_agg_lats_contain_variable (plats); -- if (make_simple_recipients) -- { -- ret |= plats->bits_lattice.set_recipient_only (); -- ret |= plats->m_value_range.set_recipient_only (); -- } -- else -- { -- ret |= plats->bits_lattice.set_to_bottom (); -- ret |= plats->m_value_range.set_to_bottom (); -- } -+ ret |= plats->bits_lattice.set_to_bottom (); -+ ret |= plats->m_value_range.set_to_bottom (); - return ret; - } - -@@ -1525,7 +1481,7 @@ initialize_node_lattices (struct cgraph_node *node) - { - plats->m_value_range.init (type); - if (variable) -- set_all_contains_variable (plats, true); -+ set_all_contains_variable (plats); - } - } - -@@ -2617,8 +2573,7 @@ propagate_bits_across_jump_function (cgraph_edge *cs, int idx, - result of x & 0xff == 0xff, which gets computed during ccp1 pass - and we store it in jump function during analysis stage. */ - -- if (!src_lats->bits_lattice.bottom_p () -- && !src_lats->bits_lattice.recipient_only_p ()) -+ if (!src_lats->bits_lattice.bottom_p ()) - { - if (!op_type) - op_type = ipa_get_type (caller_info, src_idx); -@@ -2684,8 +2639,7 @@ propagate_vr_across_jump_function (cgraph_edge *cs, ipa_jump_func *jfunc, - = ipa_get_parm_lattices (caller_info, src_idx); - tree operand_type = ipa_get_type (caller_info, src_idx); - -- if (src_lats->m_value_range.bottom_p () -- || src_lats->m_value_range.recipient_only_p ()) -+ if (src_lats->m_value_range.bottom_p ()) - return dest_lat->set_to_bottom (); - - if (ipa_get_jf_pass_through_operation (jfunc) == NOP_EXPR -@@ -3443,13 +3397,7 @@ good_cloning_opportunity_p (struct cgraph_node *node, sreal time_benefit, - /* If there is no call which was executed in profiling or where - profile is missing, we do not want to clone. */ - || (!called_without_ipa_profile && !count_sum.nonzero_p ())) -- { -- if (dump_file && (dump_flags & TDF_DETAILS)) -- fprintf (dump_file, " good_cloning_opportunity_p (time: %g, " -- "size: %i): Definitely not good or prohibited.\n", -- time_benefit.to_double (), size_cost); -- return false; -- } -+ return false; - - gcc_assert (size_cost > 0); - -@@ -5290,29 +5238,24 @@ self_recursive_agg_pass_through_p (const cgraph_edge *cs, - KNOWN_CSTS with constants that are also known for all of the CALLERS. */ - - static void --find_scalar_values_for_callers_subset (vec &known_csts, -- ipa_node_params *info, -- const vec &callers) -+find_more_scalar_values_for_callers_subset (struct cgraph_node *node, -+ vec &known_csts, -+ const vec &callers) - { -+ ipa_node_params *info = ipa_node_params_sum->get (node); - int i, count = ipa_get_param_count (info); - - for (i = 0; i < count; i++) - { -- ipcp_lattice *lat = ipa_get_scalar_lat (info, i); -- if (lat->bottom) -- continue; -- if (lat->is_single_const ()) -- { -- known_csts[i] = lat->values->value; -- continue; -- } -- - struct cgraph_edge *cs; - tree newval = NULL_TREE; - int j; - bool first = true; - tree type = ipa_get_type (info, i); - -+ if (ipa_get_scalar_lat (info, i)->bottom || known_csts[i]) -+ continue; -+ - FOR_EACH_VEC_ELT (callers, j, cs) - { - struct ipa_jump_func *jump_func; -@@ -5369,7 +5312,18 @@ find_scalar_values_for_callers_subset (vec &known_csts, - } - - if (newval) -- known_csts[i] = newval; -+ { -+ if (dump_file && (dump_flags & TDF_DETAILS)) -+ { -+ fprintf (dump_file, " adding an extra known scalar value "); -+ print_ipcp_constant_value (dump_file, newval); -+ fprintf (dump_file, " for "); -+ ipa_dump_param (dump_file, info, i); -+ fprintf (dump_file, "\n"); -+ } -+ -+ known_csts[i] = newval; -+ } - } - } - -@@ -5378,34 +5332,23 @@ find_scalar_values_for_callers_subset (vec &known_csts, - CALLERS. */ - - static void --find_contexts_for_caller_subset (vec -- &known_contexts, -- ipa_node_params *info, -- const vec &callers) -+find_more_contexts_for_caller_subset (cgraph_node *node, -+ vec -+ *known_contexts, -+ const vec &callers) - { -+ ipa_node_params *info = ipa_node_params_sum->get (node); - int i, count = ipa_get_param_count (info); - - for (i = 0; i < count; i++) - { -- if (!ipa_is_param_used (info, i)) -- continue; -+ cgraph_edge *cs; - -- ipcp_lattice *ctxlat -- = ipa_get_poly_ctx_lat (info, i); -- if (ctxlat->bottom) -+ if (ipa_get_poly_ctx_lat (info, i)->bottom -+ || (known_contexts->exists () -+ && !(*known_contexts)[i].useless_p ())) - continue; -- if (ctxlat->is_single_const ()) -- { -- if (!ctxlat->values->value.useless_p ()) -- { -- if (known_contexts.is_empty ()) -- known_contexts.safe_grow_cleared (count, true); -- known_contexts[i] = ctxlat->values->value; -- } -- continue; -- } - -- cgraph_edge *cs; - ipa_polymorphic_call_context newval; - bool first = true; - int j; -@@ -5433,9 +5376,20 @@ find_contexts_for_caller_subset (vec - - if (!newval.useless_p ()) - { -- if (known_contexts.is_empty ()) -- known_contexts.safe_grow_cleared (count, true); -- known_contexts[i] = newval; -+ if (dump_file && (dump_flags & TDF_DETAILS)) -+ { -+ fprintf (dump_file, " adding an extra known polymorphic " -+ "context "); -+ print_ipcp_constant_value (dump_file, newval); -+ fprintf (dump_file, " for "); -+ ipa_dump_param (dump_file, info, i); -+ fprintf (dump_file, "\n"); -+ } -+ -+ if (!known_contexts->exists ()) -+ known_contexts->safe_grow_cleared (ipa_get_param_count (info), -+ true); -+ (*known_contexts)[i] = newval; - } - - } -@@ -5622,12 +5576,11 @@ push_agg_values_from_edge (struct cgraph_edge *cs, - - - /* Look at edges in CALLERS and collect all known aggregate values that arrive -- from all of them into INTERIM. Return how many there are. */ -+ from all of them. Return nullptr if there are none. */ - --static unsigned int --find_aggregate_values_for_callers_subset_1 (vec &interim, -- struct cgraph_node *node, -- const vec &callers) -+static struct vec * -+find_aggregate_values_for_callers_subset (struct cgraph_node *node, -+ const vec &callers) - { - ipa_node_params *dest_info = ipa_node_params_sum->get (node); - if (dest_info->ipcp_orig_node) -@@ -5635,11 +5588,12 @@ find_aggregate_values_for_callers_subset_1 (vec &interim, - - /* gather_edges_for_value puts a non-recursive call into the first element of - callers if it can. */ -+ auto_vec interim; - push_agg_values_from_edge (callers[0], dest_info, &interim, NULL, true); - - unsigned valid_entries = interim.length (); - if (!valid_entries) -- return 0; -+ return nullptr; - - unsigned caller_count = callers.length(); - for (unsigned i = 1; i < caller_count; i++) -@@ -5650,47 +5604,9 @@ find_aggregate_values_for_callers_subset_1 (vec &interim, - - valid_entries = intersect_argaggs_with (interim, last); - if (!valid_entries) -- return 0; -+ return nullptr; - } - -- return valid_entries; --} -- --/* Look at edges in CALLERS and collect all known aggregate values that arrive -- from all of them and return them in a garbage-collected vector. Return -- nullptr if there are none. */ -- --static void --find_aggregate_values_for_callers_subset (vec &res, -- struct cgraph_node *node, -- const vec &callers) --{ -- auto_vec interim; -- unsigned valid_entries -- = find_aggregate_values_for_callers_subset_1 (interim, node, callers); -- if (!valid_entries) -- return; -- -- for (const ipa_argagg_value &av : interim) -- if (av.value) -- res.safe_push(av); -- return; --} -- --/* Look at edges in CALLERS and collect all known aggregate values that arrive -- from all of them and return them in a garbage-collected vector. Return -- nullptr if there are none. */ -- --static struct vec * --find_aggregate_values_for_callers_subset_gc (struct cgraph_node *node, -- const vec &callers) --{ -- auto_vec interim; -- unsigned valid_entries -- = find_aggregate_values_for_callers_subset_1 (interim, node, callers); -- if (!valid_entries) -- return nullptr; -- - vec *res = NULL; - vec_safe_reserve_exact (res, valid_entries); - for (const ipa_argagg_value &av : interim) -@@ -5821,78 +5737,62 @@ copy_useful_known_contexts (const vec &known_conte - return vNULL; - } - --/* Return true if the VALUE is represented in KNOWN_CSTS at INDEX if OFFSET is -- minus one or in AGGVALS for INDEX and OFFSET otherwise. */ -+/* Copy known scalar values from AVALS into KNOWN_CSTS and modify the copy -+ according to VAL and INDEX. If non-empty, replace KNOWN_CONTEXTS with its -+ copy too. */ - --DEBUG_FUNCTION bool --ipcp_val_replacement_ok_p (vec &known_csts, -- vec &, -- vec *aggvals, -- int index, HOST_WIDE_INT offset, tree value) -+static void -+copy_known_vectors_add_val (ipa_auto_call_arg_values *avals, -+ vec *known_csts, -+ vec *known_contexts, -+ ipcp_value *val, int index) - { -- tree v; -- if (offset == -1) -- v = known_csts[index]; -- else -- { -- const ipa_argagg_value_list avl (aggvals); -- v = avl.get_value (index, offset / BITS_PER_UNIT); -- } -+ *known_csts = avals->m_known_vals.copy (); -+ *known_contexts = copy_useful_known_contexts (avals->m_known_contexts); -+ (*known_csts)[index] = val->value; -+} - -- return v && values_equal_for_ipcp_p (v, value); -+/* Copy known scalar values from AVALS into KNOWN_CSTS. Similarly, copy -+ contexts to KNOWN_CONTEXTS and modify the copy according to VAL and -+ INDEX. */ -+ -+static void -+copy_known_vectors_add_val (ipa_auto_call_arg_values *avals, -+ vec *known_csts, -+ vec *known_contexts, -+ ipcp_value *val, -+ int index) -+{ -+ *known_csts = avals->m_known_vals.copy (); -+ *known_contexts = avals->m_known_contexts.copy (); -+ (*known_contexts)[index] = val->value; - } - --/* Dump to F all the values in AVALS for which we are re-evaluating the effects -- on the function represented b INFO. */ -+/* Return true if OFFSET indicates this was not an aggregate value or there is -+ a replacement equivalent to VALUE, INDEX and OFFSET among those in the -+ AGGVALS list. */ - --DEBUG_FUNCTION void --dump_reestimation_message (FILE *f, ipa_node_params *info, -- const ipa_auto_call_arg_values &avals) --{ -- fprintf (f, " Re-estimating effects with\n" -- " Scalar constants:"); -- int param_count = ipa_get_param_count (info); -- for (int i = 0; i < param_count; i++) -- if (avals.m_known_vals[i]) -- { -- fprintf (f, " %i:", i); -- print_ipcp_constant_value (f, avals.m_known_vals[i]); -- } -- fprintf (f, "\n"); -- if (!avals.m_known_contexts.is_empty ()) -- { -- fprintf (f, " Pol. contexts:"); -- for (int i = 0; i < param_count; i++) -- if (!avals.m_known_contexts[i].useless_p ()) -- { -- fprintf (f, " %i:", i); -- avals.m_known_contexts[i].dump (f); -- } -- fprintf (f, "\n"); -- } -- if (!avals.m_known_aggs.is_empty ()) -- { -- fprintf (f, " Aggregate replacements:"); -- ipa_argagg_value_list avs (&avals); -- avs.dump (f); -- } -+DEBUG_FUNCTION bool -+ipcp_val_agg_replacement_ok_p (vec *aggvals, -+ int index, HOST_WIDE_INT offset, tree value) -+{ -+ if (offset == -1) -+ return true; -+ -+ const ipa_argagg_value_list avl (aggvals); -+ tree v = avl.get_value (index, offset / BITS_PER_UNIT); -+ return v && values_equal_for_ipcp_p (v, value); - } - --/* Return true if the VALUE is represented in KNOWN_CONTEXTS at INDEX and that -- if OFFSET is is equal to minus one (because source of a polymorphic context -- cannot be an aggregate value). */ -+/* Return true if offset is minus one because source of a polymorphic context -+ cannot be an aggregate value. */ - - DEBUG_FUNCTION bool --ipcp_val_replacement_ok_p (vec &, -- vec &known_contexts, -- vec *, -- int index, HOST_WIDE_INT offset, -- ipa_polymorphic_call_context value) -+ipcp_val_agg_replacement_ok_p (vec *, -+ int , HOST_WIDE_INT offset, -+ ipa_polymorphic_call_context) - { -- if (offset != -1) -- return false; -- return (!known_contexts[index].useless_p () -- && known_contexts[index].equal_to (value)); -+ return offset == -1; - } - - /* Decide whether to create a special version of NODE for value VAL of -@@ -5906,12 +5806,13 @@ ipcp_val_replacement_ok_p (vec &, - template - static bool - decide_about_value (struct cgraph_node *node, int index, HOST_WIDE_INT offset, -- ipcp_value *val, -+ ipcp_value *val, ipa_auto_call_arg_values *avals, - vec *self_gen_clones, int cur_sweep) - { - int caller_count; - sreal freq_sum; - profile_count count_sum, rec_count_sum; -+ vec callers; - bool called_without_ipa_profile; - - if (val->spec_node) -@@ -5965,78 +5866,36 @@ decide_about_value (struct cgraph_node *node, int index, HOST_WIDE_INT offset, - fprintf (dump_file, " (caller_count: %i)\n", caller_count); - } - -- vec callers; -- callers = gather_edges_for_value (val, node, caller_count); -- ipa_node_params *info = ipa_node_params_sum->get (node); -- ipa_auto_call_arg_values avals; -- avals.m_known_vals.safe_grow_cleared (ipa_get_param_count (info), true); -- find_scalar_values_for_callers_subset (avals.m_known_vals, info, callers); -- find_contexts_for_caller_subset (avals.m_known_contexts, info, callers); -- find_aggregate_values_for_callers_subset (avals.m_known_aggs, node, callers); -- -- -- if (good_cloning_opportunity_p (node, val->prop_time_benefit, -- freq_sum, count_sum, val->prop_size_cost, -- called_without_ipa_profile, cur_sweep)) -- ; -- else -- { -- /* Extern inline functions are only meaningful to clione to propagate -- values to their callees. */ -- if (DECL_EXTERNAL (node->decl) && DECL_DECLARED_INLINE_P (node->decl)) -- { -- if (dump_file && (dump_flags & TDF_DETAILS)) -- fprintf (dump_file, " Skipping extern inline.\n"); -- return false; -- } -- if (dump_file && (dump_flags & TDF_DETAILS)) -- dump_reestimation_message (dump_file, info, avals); -- -- ipa_call_estimates estimates; -- estimate_ipcp_clone_size_and_time (node, &avals, &estimates); -- int removable_params_cost = 0; -- for (tree t : avals.m_known_vals) -- if (t) -- removable_params_cost += estimate_move_cost (TREE_TYPE (t), true); -- -- int size = estimates.size - caller_count * removable_params_cost; -- -- if (size <= 0) -- { -- if (dump_file) -- fprintf (dump_file, " Code not going to grow.\n"); -- } -- else -- { -- sreal time_benefit -- = ((estimates.nonspecialized_time - estimates.time) -- + hint_time_bonus (node, estimates) -- + (devirtualization_time_bonus (node, &avals) -- + removable_params_cost)); -- -- if (!good_cloning_opportunity_p (node, time_benefit, freq_sum, -- count_sum, size, -- called_without_ipa_profile, -- cur_sweep)) -- return false; -- } -- } -+ if (!good_cloning_opportunity_p (node, val->local_time_benefit, -+ freq_sum, count_sum, -+ val->local_size_cost, -+ called_without_ipa_profile, cur_sweep) -+ && !good_cloning_opportunity_p (node, val->prop_time_benefit, -+ freq_sum, count_sum, val->prop_size_cost, -+ called_without_ipa_profile, cur_sweep)) -+ return false; - - if (dump_file) - fprintf (dump_file, " Creating a specialized node of %s.\n", - node->dump_name ()); - -- vec known_csts = avals.m_known_vals.copy (); -- vec known_contexts -- = copy_useful_known_contexts (avals.m_known_contexts); -- -- vec *aggvals = NULL; -- vec_safe_reserve_exact (aggvals, avals.m_known_aggs.length ()); -- for (const ipa_argagg_value &av : avals.m_known_aggs) -- aggvals->quick_push (av); -- gcc_checking_assert (ipcp_val_replacement_ok_p (known_csts, known_contexts, -- aggvals, index, -- offset, val->value)); -+ vec known_csts; -+ vec known_contexts; -+ -+ callers = gather_edges_for_value (val, node, caller_count); -+ if (offset == -1) -+ copy_known_vectors_add_val (avals, &known_csts, &known_contexts, val, index); -+ else -+ { -+ known_csts = avals->m_known_vals.copy (); -+ known_contexts = copy_useful_known_contexts (avals->m_known_contexts); -+ } -+ find_more_scalar_values_for_callers_subset (node, known_csts, callers); -+ find_more_contexts_for_caller_subset (node, &known_contexts, callers); -+ vec *aggvals -+ = find_aggregate_values_for_callers_subset (node, callers); -+ gcc_checking_assert (ipcp_val_agg_replacement_ok_p (aggvals, index, -+ offset, val->value)); - val->spec_node = create_specialized_node (node, known_csts, known_contexts, - aggvals, callers); - -@@ -6074,52 +5933,6 @@ ipa_range_contains_p (const vrange &r, tree val) - return r.contains_p (val); - } - --/* Structure holding opportunitties so that they can be pre-sorted. */ -- --struct cloning_opportunity_ranking --{ -- /* A very rough evaluation of likely benefit. */ -- sreal eval; -- /* In the case of aggregate constants, a non-negative offset within their -- aggregates. -1 for scalar constants, -2 for polymorphic contexts. */ -- HOST_WIDE_INT offset; -- /* The value being considered for evaluation for cloning. */ -- ipcp_value_base *val; -- /* Index of the formal parameter the value is coming in. */ -- int index; --}; -- --/* Helper function to qsort a vecotr of cloning opportunities. */ -- --static int --compare_cloning_opportunities (const void *a, const void *b) --{ -- const cloning_opportunity_ranking *o1 -- = (const cloning_opportunity_ranking *) a; -- const cloning_opportunity_ranking *o2 -- = (const cloning_opportunity_ranking *) b; -- if (o1->eval < o2->eval) -- return 1; -- if (o1->eval > o2->eval) -- return -1; -- return 0; --} -- --/* Use the estimations in VAL to determine how good a candidate it represents -- for the purposes of ordering real evaluation of opportunities (which -- includes information about incoming edges, among other things). */ -- --static sreal --cloning_opportunity_ranking_evaluation (const ipcp_value_base *val) --{ -- sreal e1 = (val->local_time_benefit * 1000) / MAX (val->local_size_cost, 1); -- sreal e2 = (val->prop_time_benefit * 1000) / MAX (val->prop_size_cost, 1); -- if (e2 > e1) -- return e2; -- else -- return e1; --} -- - /* Decide whether and what specialized clones of NODE should be created. - CUR_SWEEP is the number of the current sweep of the call-graph during the - decision stage. */ -@@ -6128,7 +5941,7 @@ static bool - decide_whether_version_node (struct cgraph_node *node, int cur_sweep) - { - ipa_node_params *info = ipa_node_params_sum->get (node); -- int count = ipa_get_param_count (info); -+ int i, count = ipa_get_param_count (info); - bool ret = false; - - if (info->node_dead || count == 0) -@@ -6138,8 +5951,13 @@ decide_whether_version_node (struct cgraph_node *node, int cur_sweep) - fprintf (dump_file, "\nEvaluating opportunities for %s.\n", - node->dump_name ()); - -- auto_vec opp_ranking; -- for (int i = 0; i < count;i++) -+ auto_vec self_gen_clones; -+ ipa_auto_call_arg_values avals; -+ int removable_params_cost; -+ bool ctx_independent_const -+ = gather_context_independent_values (info, &avals, &removable_params_cost); -+ -+ for (i = 0; i < count;i++) - { - if (!ipa_is_param_used (info, i)) - continue; -@@ -6149,7 +5967,7 @@ decide_whether_version_node (struct cgraph_node *node, int cur_sweep) - ipcp_lattice *ctxlat = &plats->ctxlat; - - if (!lat->bottom -- && !lat->is_single_const ()) -+ && !avals.m_known_vals[i]) - { - ipcp_value *val; - for (val = lat->values; val; val = val->next) -@@ -6176,12 +5994,8 @@ decide_whether_version_node (struct cgraph_node *node, int cur_sweep) - } - continue; - } -- cloning_opportunity_ranking opp; -- opp.eval = cloning_opportunity_ranking_evaluation (val); -- opp.offset = -1; -- opp.val = val; -- opp.index = i; -- opp_ranking.safe_push (opp); -+ ret |= decide_about_value (node, i, -1, val, &avals, -+ &self_gen_clones, cur_sweep); - } - } - -@@ -6196,83 +6010,37 @@ decide_whether_version_node (struct cgraph_node *node, int cur_sweep) - && (plats->aggs_contain_variable - || !aglat->is_single_const ())) - for (val = aglat->values; val; val = val->next) -- { -- cloning_opportunity_ranking opp; -- opp.eval = cloning_opportunity_ranking_evaluation (val); -- opp.offset = aglat->offset; -- opp.val = val; -- opp.index = i; -- opp_ranking.safe_push (opp); -- } -+ ret |= decide_about_value (node, i, aglat->offset, val, &avals, -+ &self_gen_clones, cur_sweep); - } - - if (!ctxlat->bottom -- && !ctxlat->is_single_const ()) -+ && avals.m_known_contexts[i].useless_p ()) - { - ipcp_value *val; - for (val = ctxlat->values; val; val = val->next) -- if (!val->value.useless_p ()) -- { -- cloning_opportunity_ranking opp; -- opp.eval = cloning_opportunity_ranking_evaluation (val); -- opp.offset = -2; -- opp.val = val; -- opp.index = i; -- opp_ranking.safe_push (opp); -- } -- } -- } -- -- if (!opp_ranking.is_empty ()) -- { -- opp_ranking.qsort (compare_cloning_opportunities); -- auto_vec self_gen_clones; -- for (const cloning_opportunity_ranking &opp : opp_ranking) -- if (opp.offset == -2) -- { -- ipcp_value *val -- = static_cast *> -- (opp.val); -- ret |= decide_about_value (node, opp.index, -1, val, -+ ret |= decide_about_value (node, i, -1, val, &avals, - &self_gen_clones, cur_sweep); -- } -- else -- { -- ipcp_value *val = static_cast *> (opp.val); -- ret |= decide_about_value (node, opp.index, opp.offset, val, -- &self_gen_clones, cur_sweep); -- } -- -- if (!self_gen_clones.is_empty ()) -- { -- self_gen_clones.safe_push (node); -- update_counts_for_self_gen_clones (node, self_gen_clones); - } - } - -- struct caller_statistics stats; -- init_caller_stats (&stats); -- node->call_for_symbol_thunks_and_aliases (gather_caller_stats, &stats, -- false); -- if (!stats.n_calls) -+ if (!self_gen_clones.is_empty ()) - { -- if (dump_file) -- fprintf (dump_file, " Not cloning for all contexts because " -- "there are no callers of the original node (any more).\n"); -- return ret; -+ self_gen_clones.safe_push (node); -+ update_counts_for_self_gen_clones (node, self_gen_clones); - } - - bool do_clone_for_all_contexts = false; -- ipa_auto_call_arg_values avals; -- int removable_params_cost; -- bool ctx_independent_const -- = gather_context_independent_values (info, &avals, &removable_params_cost); - sreal devirt_bonus = devirtualization_time_bonus (node, &avals); - if (ctx_independent_const || devirt_bonus > 0 - || (removable_params_cost && clone_for_param_removal_p (node))) - { -- ipa_call_estimates estimates; -+ struct caller_statistics stats; -+ ipa_call_estimates estimates; - -+ init_caller_stats (&stats); -+ node->call_for_symbol_thunks_and_aliases (gather_caller_stats, &stats, -+ false); - estimate_ipcp_clone_size_and_time (node, &avals, &estimates); - sreal time = estimates.nonspecialized_time - estimates.time; - time += devirt_bonus; -@@ -6284,7 +6052,13 @@ decide_whether_version_node (struct cgraph_node *node, int cur_sweep) - fprintf (dump_file, " - context independent values, size: %i, " - "time_benefit: %f\n", size, (time).to_double ()); - -- if (size <= 0 || node->local) -+ if (!stats.n_calls) -+ { -+ if (dump_file) -+ fprintf (dump_file, " Not cloning for all contexts because " -+ "there are no callers of the original node left.\n"); -+ } -+ else if (size <= 0 || node->local) - { - if (!dbg_cnt (ipa_cp_values)) - return ret; -@@ -6344,14 +6118,19 @@ decide_whether_version_node (struct cgraph_node *node, int cur_sweep) - fprintf (dump_file, " Creating a specialized node of %s " - "for all known contexts.\n", node->dump_name ()); - -- vec known_csts = vNULL; -- known_csts.safe_grow_cleared (count, true); -- find_scalar_values_for_callers_subset (known_csts, info, callers); -- vec known_contexts = vNULL; -- find_contexts_for_caller_subset (known_contexts, info, callers); -+ vec known_csts = avals.m_known_vals.copy (); -+ vec known_contexts -+ = copy_useful_known_contexts (avals.m_known_contexts); -+ find_more_scalar_values_for_callers_subset (node, known_csts, callers); -+ find_more_contexts_for_caller_subset (node, &known_contexts, callers); - vec *aggvals -- = find_aggregate_values_for_callers_subset_gc (node, callers); -+ = find_aggregate_values_for_callers_subset (node, callers); - -+ if (!known_contexts_useful_p (known_contexts)) -+ { -+ known_contexts.release (); -+ known_contexts = vNULL; -+ } - struct cgraph_node *clone = create_specialized_node (node, known_csts, - known_contexts, - aggvals, callers); -@@ -6576,11 +6355,6 @@ ipcp_store_vr_results (void) - bool do_vr = true; - bool do_bits = true; - -- /* If the function is not local, the gathered information is only useful -- for clones. */ -- if (!node->local) -- continue; -- - if (!info || !opt_for_fn (node->decl, flag_ipa_vrp)) - { - if (dump_file) ---- gcc/ipa-cp.h -+++ gcc/ipa-cp.h -@@ -201,8 +201,6 @@ public: - bool set_to_bottom (); - bool set_to_constant (widest_int, widest_int); - bool known_nonzero_p () const; -- bool set_recipient_only (); -- bool recipient_only_p () const {return m_recipient_only; } - - widest_int get_value () const { return m_value; } - widest_int get_mask () const { return m_mask; } -@@ -218,11 +216,6 @@ private: - enum { IPA_BITS_UNDEFINED, IPA_BITS_CONSTANT, IPA_BITS_VARYING } - m_lattice_val = IPA_BITS_UNDEFINED; - -- /* Set to true if the lattice is valid only as a recipient of propagatad -- values but cannot be used as source of propagation because there may be -- unknown callers. */ -- bool m_recipient_only; -- - /* Similar to ccp_lattice_t, mask represents which bits of value are constant. - If a bit in mask is set to 0, then the corresponding bit in - value is known to be constant. */ -@@ -238,16 +231,10 @@ class ipcp_vr_lattice - { - public: - value_range m_vr; -- /* Set to true if the lattice is valid only as a recipient of propagatad -- values but cannot be used as source of propagation because there may be -- unknown callers. */ -- bool m_recipient_only; - - inline bool bottom_p () const; - inline bool top_p () const; - inline bool set_to_bottom (); -- bool set_recipient_only (); -- bool recipient_only_p () const {return m_recipient_only; } - bool meet_with (const vrange &p_vr); - bool meet_with (const ipcp_vr_lattice &other); - void init (tree type); -@@ -264,7 +251,6 @@ ipcp_vr_lattice::init (tree type) - m_vr.set_type (type); - - // Otherwise m_vr will default to unsupported_range. -- m_recipient_only = false; - } - - /* Structure containing lattices for a parameter itself and for pieces of ---- gcc/testsuite/gcc.dg/ipa/ipcp-agg-14.c -+++ gcc/testsuite/gcc.dg/ipa/ipcp-agg-14.c -@@ -1,49 +0,0 @@ --/* { dg-do compile } */ --/* { dg-options "-O3 -fno-ipa-sra -fno-partial-inlining -fdump-ipa-cp-details" } */ -- --struct S --{ -- int a, b, m, n, o, p; --}; -- -- --void __attribute__ ((noinline)) --foo (struct S *p, double *x, double *y, double *z) --{ -- if (p->a == 0 && p->b == 0) -- return; -- -- /* Something long so that we do not clone unless we know it will -- disappear: */ -- for (int i = 0; i < p->m; i++) -- { -- if (i < p->m-1) -- x[i] += x[i+1] * y[0]; -- for (int j = 0; j < p->n; j++) -- for (int k = 0; j < p->o; k++) -- { -- double s = *z; -- for (int l = 1; l < p->p; l++) -- s += z[l]; -- x[i] += s + 2*y[j] + 7*z[k]; -- } -- } --} -- --int get_int (void); -- --void -- entry (int c, double *x, double *y, double *z) --{ -- struct S s; -- -- s.a = 0; -- s.b = 0; -- s.m = get_int (); -- s.n = get_int (); -- s.o = get_int (); -- s.p = get_int (); -- foo (&s, x, y, z); --} -- --/* { dg-final { scan-ipa-dump "Creating a specialized node of foo" "cp" } } */ ---- gcc/testsuite/gcc.dg/ipa/ipcp-agg-2.c -+++ gcc/testsuite/gcc.dg/ipa/ipcp-agg-2.c -@@ -37,5 +37,5 @@ entry (int c) - foo (&s); - } - /* { dg-final { scan-ipa-dump-times "Creating a specialized node of foo/\[0-9\]*\\." 2 "cp" } } */ --/* { dg-final { scan-ipa-dump "Aggregate replacements:" "cp" } } */ -+/* { dg-final { scan-ipa-dump-times "Aggregate replacements:" 4 "cp" } } */ - /* { dg-final { scan-tree-dump-not "->c;" "optimized" } } */ ---- gcc/testsuite/gcc.dg/ipa/ipcp-agg-3.c -+++ gcc/testsuite/gcc.dg/ipa/ipcp-agg-3.c -@@ -37,6 +37,6 @@ entry (int c) - foo (0, &s); - } - /* { dg-final { scan-ipa-dump-times "Creating a specialized node of foo/\[0-9\]*\\." 2 "cp" } } */ --/* { dg-final { scan-ipa-dump "Aggregate replacements: 1" "cp" } } */ --/* { dg-final { scan-ipa-dump "Aggregate replacements: 0" "cp" } } */ -+/* { dg-final { scan-ipa-dump-times "Aggregate replacements: 1" 2 "cp" } } */ -+/* { dg-final { scan-ipa-dump-times "Aggregate replacements: 0" 2 "cp" } } */ - /* { dg-final { scan-tree-dump-not "->c;" "optimized" } } */ ---- gcc/testsuite/gcc.dg/ipa/ipcp-agg-4.c -+++ gcc/testsuite/gcc.dg/ipa/ipcp-agg-4.c -@@ -56,5 +56,5 @@ entry2 (int c) - } - - /* { dg-final { scan-ipa-dump-times "Creating a specialized node of foo/\[0-9\]*\\." 2 "cp" } } */ --/* { dg-final { scan-ipa-dump "Aggregate replacements:" "cp" } } */ -+/* { dg-final { scan-ipa-dump-times "Aggregate replacements:" 4 "cp" } } */ - /* { dg-final { scan-tree-dump-not "->c;" "optimized" } } */ ---- gcc/testsuite/gcc.dg/vect/pr101145_1.c -+++ gcc/testsuite/gcc.dg/vect/pr101145_1.c -@@ -1,5 +1,5 @@ - /* { dg-require-effective-target vect_char_add } */ --/* { dg-additional-options "-O3 -fno-ipa-cp" } */ -+/* { dg-additional-options "-O3" } */ - #define TYPE signed char - #define MIN -128 - #define MAX 127 ---- gcc/testsuite/gcc.dg/vect/pr101145_2.c -+++ gcc/testsuite/gcc.dg/vect/pr101145_2.c -@@ -1,5 +1,5 @@ - /* { dg-require-effective-target vect_char_add } */ --/* { dg-additional-options "-O3 -fno-ipa-cp" } */ -+/* { dg-additional-options "-O3" } */ - #define TYPE unsigned char - #define MIN 0 - #define MAX 255 ---- gcc/testsuite/gcc.dg/vect/pr101145_3.c -+++ gcc/testsuite/gcc.dg/vect/pr101145_3.c -@@ -1,5 +1,5 @@ - /* { dg-require-effective-target vect_long_long } */ --/* { dg-additional-options "-O3 -fno-ipa-cp" } */ -+/* { dg-additional-options "-O3" } */ - #define TYPE int * - #define MIN ((TYPE)0) - #define MAX ((TYPE)((long long)-1)) ---- gcc/testsuite/gcc.dg/ipa/pr123543.c -+++ gcc/testsuite/gcc.dg/ipa/pr123543.c -@@ -1,14 +0,0 @@ --/* { dg-do run } */ --/* { dg-options "-O3" } */ -- --__attribute__((noinline)) --static int local_f(int a, int b) { return a + b; } -- --__attribute__((noinline)) --int extern_f(int a, int b) { return local_f(a, b); } -- --int unused_g1(int b) { return extern_f(0, b); } -- --int (*volatile fp)(int, int) = extern_f; -- --int main() { if (fp(1, 2) != 3) __builtin_abort(); } diff --git a/gcc16-pr120250.patch b/gcc16-pr120250.patch deleted file mode 100644 index 96aa78b..0000000 --- a/gcc16-pr120250.patch +++ /dev/null @@ -1,61 +0,0 @@ -2025-11-20 Jakub Jelinek - - PR target/120250 - * combine.cc (recog_for_combine): Don't try to put SET_SRC - into a constant pool if SET_DEST is pc_rtx. - - * gcc.c-torture/compile/pr120250.c: New test. - ---- gcc/combine.cc.jj 2025-10-21 11:27:04.884882995 +0200 -+++ gcc/combine.cc 2025-11-19 15:03:23.350157882 +0100 -@@ -11759,7 +11759,8 @@ recog_for_combine (rtx *pnewpat, rtx_ins - rtx src = SET_SRC (pat); - if (CONSTANT_P (src) - && !CONST_INT_P (src) -- && crtl->uses_const_pool) -+ && crtl->uses_const_pool -+ && SET_DEST (pat) != pc_rtx) - { - machine_mode mode = GET_MODE (src); - if (mode == VOIDmode) ---- gcc/testsuite/gcc.c-torture/compile/pr120250.c.jj 2025-11-19 15:28:12.937891927 +0100 -+++ gcc/testsuite/gcc.c-torture/compile/pr120250.c 2025-11-19 15:27:53.225174446 +0100 -@@ -0,0 +1,38 @@ -+/* PR target/120250 */ -+ -+int a = 5, b = 7, c, *d; -+void *l; -+void foo (const char *s); -+void bar (void); -+void qux (const char *, int); -+ -+int -+baz (int *d, int a, int b) -+{ -+ int c = 0; -+ for (int i = 0; i < a; ++i) -+ for (int j = 0; j < b; ++j) -+ c += d[i * b + j]; -+ return c; -+} -+ -+int -+main () -+{ -+ d = __builtin_malloc (a * b * sizeof (int)); -+ if (!d) -+ { -+ foo ("foo"); -+ __builtin_exit (1); -+ } -+ for (int i = 0; i < a; ++i) -+ for (int j = 0; j < b; ++j) -+ d[i * b + j] = i * b + j; -+ l = (void *) &bar; -+ goto *l; -+bar: -+ c = baz (d, a, b); -+ qux ("bar", c); -+ __builtin_free (d); -+ return 0; -+} diff --git a/gcc16-pr121778-revert.patch b/gcc16-pr121778-revert.patch deleted file mode 100644 index 5d43cad..0000000 --- a/gcc16-pr121778-revert.patch +++ /dev/null @@ -1,170 +0,0 @@ -Temporarily revert PR121778 until PR123530 is fixed. - -2026-01-09 Shreya Munnangi - Jeff Law - - PR target/121778 - gcc/ - * match.pd: Add pattern to recognize rotate with one or more - bits flipped via xor. - * config/sh/sh.md (*rotcl); New variant which handles the output - we get after the match.pd change above. - - gcc/testsuite/ - * gcc.target/riscv/pr121778.c: New test. - ---- gcc/config/sh/sh.md -+++ gcc/config/sh/sh.md -@@ -3271,25 +3271,6 @@ (define_insn_and_split "*rotcl" - operands[3] = get_t_reg_rtx (); - }) - --(define_insn_and_split "*rotcl" -- [(set (match_operand:SI 0 "arith_reg_dest") -- (xor:SI (rotate:SI (match_operand:SI 1 "arith_reg_operand") -- (const_int 1)) -- (const_int 1))) -- (clobber (reg:SI T_REG))] -- "TARGET_SH1 && can_create_pseudo_p ()" -- "#" -- "&& 1" -- [(parallel [(set (match_dup 0) -- (ior:SI (ashift:SI (match_dup 1) (const_int 1)) -- (and:SI (match_dup 3) (const_int 1)))) -- (clobber (reg:SI T_REG))])] --{ -- rtx t = gen_rtx_GE (SImode, operands[1], const0_rtx); -- sh_split_treg_set_expr (t, curr_insn); -- operands[3] = get_t_reg_rtx (); --}) -- - (define_insn_and_split "*rotcl" - [(set (match_operand:SI 0 "arith_reg_dest") - (ior:SI (and:SI (match_operand:SI 1 "arith_reg_or_t_reg_operand") ---- gcc/match.pd -+++ gcc/match.pd -@@ -12172,27 +12172,3 @@ and, - (simplify - (IFN_VEC_SHL_INSERT (vec_duplicate@1 @0) @0) - @1) -- --/* In this case the XOR flips bits that originate from the result of the -- right shift and do not impact the result of the left shift. We can -- reassociate the XOR to work on the final result and simplify the rest -- to a rotate. */ --(simplify -- (bit_ior:c (lshift @0 INTEGER_CST@1) -- (bit_xor (rshift @2 INTEGER_CST@3) INTEGER_CST@4)) -- (if (((~((HOST_WIDE_INT_1U << tree_to_uhwi (@1)) - 1)) & tree_to_uhwi (@4)) == 0 -- && (tree_to_uhwi (@1) + tree_to_uhwi (@3)) == TYPE_PRECISION (type) -- && TYPE_UNSIGNED (type) -- && @0 == @2) -- (bit_xor (rrotate @0 @3) @4))) -- --/* Similarly, but in this case the XOR flips bits that originate from the -- result of the left shift. */ --(simplify -- (bit_ior:c (bit_xor (lshift @0 INTEGER_CST@1) INTEGER_CST@2) -- (rshift @3 INTEGER_CST@4)) -- (if ((((((HOST_WIDE_INT_1U << tree_to_uhwi (@1)) - 1)) & tree_to_uhwi (@2)) == 0) -- && (tree_to_uhwi (@1) + tree_to_uhwi (@4)) == TYPE_PRECISION (type) -- && TYPE_UNSIGNED (type) -- && @0 == @3) -- (bit_xor (rrotate @0 @4) @2))) ---- gcc/testsuite/gcc.target/riscv/pr121778.c -+++ gcc/testsuite/gcc.target/riscv/pr121778.c -@@ -1,94 +0,0 @@ --/* { dg-do compile } */ --/* { dg-options "-O2 -march=rv64gcb -mabi=lp64d" { target rv64} } */ --/* { dg-options "-O2 -march=rv32gcb -mabi=ilp32" { target rv32} } */ -- --/* We need to adjust the constant so this works for rv32 and rv64. */ --#if __riscv_xlen == 32 --#define ONE 1U --#define TYPE unsigned int --#else --#define ONE 1UL --#define TYPE unsigned long --#endif -- --#define F1(C) TYPE test_01##C (TYPE a) { return (a << (__riscv_xlen - C)) | ((a >> C) ^ 1); } --#define F2(C) TYPE test_02##C (TYPE a) { return ((a >> (__riscv_xlen - C)) ^ 1) | (a << C); } --#define F3(C) TYPE test_03##C (TYPE a) { return ((a << (__riscv_xlen - C)) ^ (ONE << (__riscv_xlen - 1))) | (a >> C); } --#define F4(C) TYPE test_04##C (TYPE a) { return (a >> (__riscv_xlen - C)) | ((a << C) ^ (ONE << (__riscv_xlen - 1))); } -- --#define F(C) F1(C) F2(C) F3(C) F4(C) -- -- --F (1) --F (2) --F (3) --F (4) --F (5) --F (6) --F (7) --F (8) --F (9) --F (10) --F (11) --F (12) --F (13) --F (14) --F (15) --F (16) --F (17) --F (18) --F (19) --F (20) --F (21) --F (22) --F (23) --F (24) --F (25) --F (26) --F (27) --F (28) --F (29) --F (30) --F (31) --#if __riscv_xlen == 64 --F (32) --F (33) --F (34) --F (35) --F (36) --F (37) --F (38) --F (39) --F (40) --F (41) --F (42) --F (43) --F (44) --F (45) --F (46) --F (47) --F (48) --F (49) --F (50) --F (51) --F (52) --F (53) --F (54) --F (55) --F (56) --F (57) --F (58) --F (59) --F (60) --F (61) --F (62) --F (63) -- --/* { dg-final { scan-assembler-times "\trori" 252 { target { rv64 } } } } */ --/* { dg-final { scan-assembler-times "\txori" 126 { target { rv64 } } } } */ --/* { dg-final { scan-assembler-times "\tbinv" 126 { target { rv64 } } } } */ -- --/* { dg-final { scan-assembler-times "\trori" 124 { target { rv32 } } } } */ --/* { dg-final { scan-assembler-times "\txori" 62 { target { rv32 } } } } */ --/* { dg-final { scan-assembler-times "\tbinv" 62 { target { rv32 } } } } */ --#endif diff --git a/gcc16-pr123115.patch b/gcc16-pr123115.patch deleted file mode 100644 index 2a75016..0000000 --- a/gcc16-pr123115.patch +++ /dev/null @@ -1,17 +0,0 @@ -2025-12-15 Jakub Jelinek - - PR middle-end/123115 - * defaults.h (EH_RETURN_DATA_REGNO): Add void (N) to the macro - definition inside of a comma expression before INVALID_REGNUM. - ---- gcc/defaults.h.jj 2025-08-05 08:19:26.667814010 +0200 -+++ gcc/defaults.h 2025-12-15 11:33:16.656762266 +0100 -@@ -390,7 +390,7 @@ see the files COPYING3 and COPYING.RUNTI - /* Provide defaults for stuff that may not be defined when using - sjlj exceptions. */ - #ifndef EH_RETURN_DATA_REGNO --#define EH_RETURN_DATA_REGNO(N) INVALID_REGNUM -+#define EH_RETURN_DATA_REGNO(N) (void (N), INVALID_REGNUM) - #endif - - /* Offset between the eh handler address and entry in eh tables. */ diff --git a/gcc16-pr123573.patch b/gcc16-pr123573.patch deleted file mode 100644 index 2bc769d..0000000 --- a/gcc16-pr123573.patch +++ /dev/null @@ -1,53 +0,0 @@ -The following fixes the fix from r16-6709-ga4716ece529dfd some -more by making sure permute to one operand folding faces same -element number vectors but also insert a VIEW_CONVERT_EXPR for -the case one is VLA and one is VLS (when the VLA case is actually -constant, like with -msve-vector-bits=128). It also makes the -assert that output and input element numbers match done in -fold_vec_perm which this pattern eventually dispatches to into -a check (as the comment already indicates). - -Testcases are in the target specific aarch64 testsuite already. - -Bootstrap and regtest ongoing on x86_64-unknown-linux-gnu. - -2026-01-13 Richard Biener - - PR middle-end/123573 - * fold-const.cc (fold_vec_perm): Actually check, not assert, - that input and output vector element numbers agree. - * match.pd (vec_perm @0 @1 @2): Make sure element numbers - are the same when folding to an input vector and wrap that - inside a VIEW_CONVERT_EXPR. - ---- gcc/fold-const.cc -+++ gcc/fold-const.cc -@@ -10704,11 +10704,10 @@ fold_vec_perm (tree type, tree arg0, tree arg1, const vec_perm_indices &sel) - - /* For fall back case, we want to ensure we have VLS vectors - with equal length. */ -- if (!sel.length ().is_constant (&nelts)) -+ if (!sel.length ().is_constant (&nelts) -+ || !known_eq (sel.length (), TYPE_VECTOR_SUBPARTS (TREE_TYPE (arg0)))) - return NULL_TREE; - -- gcc_assert (known_eq (sel.length (), -- TYPE_VECTOR_SUBPARTS (TREE_TYPE (arg0)))); - tree *in_elts = XALLOCAVEC (tree, nelts * 2); - if (!vec_cst_ctor_to_array (arg0, nelts, in_elts) - || !vec_cst_ctor_to_array (arg1, nelts, in_elts + nelts)) ---- gcc/match.pd -+++ gcc/match.pd -@@ -11528,9 +11528,9 @@ and, - vec_perm_indices sel (builder, single_arg ? 1 : 2, nelts_in); - } - (if (known_eq (nelts, nelts_in) && sel.series_p (0, 1, 0, 1)) -- { op0; } -- (if (sel.series_p (0, 1, nelts_in, 1)) -- { op1; } -+ (view_convert @0) -+ (if (known_eq (nelts, nelts_in) && sel.series_p (0, 1, nelts_in, 1)) -+ (view_convert @1) - (with - { - if (!single_arg) diff --git a/sources b/sources index 5fa3693..f1dba4c 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (gcc-16.0.1-20260113.tar.xz) = 1cd4985667f4a0add59b053bc1ba945f8e7176eace95f3ba05e15de10e50ceaccc4343237c7e552d9bad36c35a7c15c46dccd9d2ff195ab5a85a32cbd5a78e82 +SHA512 (gcc-16.0.1-20260115.tar.xz) = 51ab079dedde5547caba601ce03954d4c5b2bf687538f106d3e851a8918162017fe65817d9e22fd115cf4d4f970bfba6a70a34db183141ce28c5c203a68eec0b SHA512 (isl-0.24.tar.bz2) = aab3bddbda96b801d0f56d2869f943157aad52a6f6e6a61745edd740234c635c38231af20bc3f1a08d416a5e973a90e18249078ed8e4ae2f1d5de57658738e95 SHA512 (newlib-cygwin-d35cc82b5ec15bb8a5fe0fe11e183d1887992e99.tar.xz) = ef9495745a96d1d76f9f425c4a48c807fface36a1aa92351c5d024103678d144d046e8de55d195103784472c14874e29e4b9284d5d6a2e7bb27fd98c8455a881 SHA512 (nvptx-tools-a0c1fff6534a4df9fb17937c3c4a4b1071212029.tar.xz) = 7f862986065028df70c843fc3f2c89e200a76b48ad0bd51c749ac8a5aab7be0ebdf35be182fad2407b3281615e75be1ac6833ab6a5130ae9920169a0412f94f0