Compare commits

..

2 Commits

Author SHA1 Message Date
eabdullin
88c0b6e780 Fix glibc BR 2025-09-27 15:04:59 +03:00
59c7481e81 import CS gcc-toolset-15-gcc-15.1.1-2.4.el9 2025-09-26 13:29:11 +00:00
47 changed files with 37 additions and 636 deletions

View File

@ -1 +0,0 @@
1

View File

@ -0,0 +1,4 @@
5a3445261fc63c005a158be98df75ab25f0ef592 SOURCES/gcc-15.1.1-20250521.tar.xz
ae5fbb33bcb442121fbbf482a93f6b3c84d489ee SOURCES/isl-0.24.tar.bz2
a773e95eebbe32d537e03b2f080a3b5fdaf771b0 SOURCES/newlib-cygwin-d35cc82b5ec15bb8a5fe0fe11e183d1887992e99.tar.xz
c1e42726a71ca4a385502580778439bd326c6d4e SOURCES/nvptx-tools-87ce9dc5999e5fca2e1d3478a30888d9864c9804.tar.xz

4
.gitignore vendored
View File

@ -0,0 +1,4 @@
SOURCES/gcc-15.1.1-20250521.tar.xz
SOURCES/isl-0.24.tar.bz2
SOURCES/newlib-cygwin-d35cc82b5ec15bb8a5fe0fe11e183d1887992e99.tar.xz
SOURCES/nvptx-tools-87ce9dc5999e5fca2e1d3478a30888d9864c9804.tar.xz

View File

@ -1,72 +0,0 @@
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/12791.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/12791.cc
index fa740b42b88..5d808ee51ee 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/12791.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/12791.cc
@@ -39,14 +39,14 @@ void test01()
const ios_base::iostate good = ios_base::goodbit;
ios_base::iostate errorstate = good;
- iss.str("62/04/71");
+ iss.str("60/04/71");
iterator_type is_it01(iss);
tm time01;
errorstate = good;
iterator_type ret01 = tim_get.get_date(is_it01, end, iss, errorstate,
&time01);
VERIFY( errorstate == ios_base::failbit );
- VERIFY( *ret01 == '2' );
+ VERIFY( *ret01 == '6' );
iss.str("04/38/71");
iterator_type is_it02(iss);
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/12791.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/12791.cc
index 07f4c369e58..c975c8523d8 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/12791.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/12791.cc
@@ -40,14 +40,14 @@ void test01()
const ios_base::iostate good = ios_base::goodbit;
ios_base::iostate errorstate = good;
- iss.str(L"62/04/71");
+ iss.str(L"60/04/71");
iterator_type is_it01(iss);
tm time01;
errorstate = good;
iterator_type ret01 = tim_get.get_date(is_it01, end, iss, errorstate,
&time01);
VERIFY( errorstate == ios_base::failbit );
- VERIFY( *ret01 == L'2' );
+ VERIFY( *ret01 == L'6' );
iss.str(L"04/38/71");
iterator_type is_it02(iss);
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc
index e6f53de4a55..c9d9896a6c0 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc
@@ -76,8 +76,8 @@ void test01()
errorstate = good;
iterator_type ret03 = tim_get.get_year(is_it03, end, iss, errorstate,
&time03);
- VERIFY( time03.tm_year == 197 - 1900 );
- VERIFY( errorstate == good );
+ VERIFY( time03.tm_year == 3 );
+ VERIFY( errorstate == ios_base::failbit );
VERIFY( *ret03 == 'd' );
iss.str("71d71");
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc
index ba95fb91520..e17712098f4 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc
@@ -76,8 +76,8 @@ void test01()
errorstate = good;
iterator_type ret03 = tim_get.get_year(is_it03, end, iss, errorstate,
&time03);
- VERIFY( time03.tm_year == 197 - 1900 );
- VERIFY( errorstate == good );
+ VERIFY( time03.tm_year == 3 );
+ VERIFY( errorstate == ios_base::failbit );
VERIFY( *ret03 == L'd' );
iss.str(L"71d71");

View File

@ -5,7 +5,7 @@ index b64e71dae22..5bf47b20820 100644
@@ -12,7 +12,6 @@
jump threading opportunities. Skip the later tests on aarch64. */
/* { dg-final { scan-tree-dump-not "Jumps threaded" "dom3" { target { ! aarch64*-*-* } } } } */
/* { dg-final { scan-tree-dump "Jumps threaded: 10" "thread2" { target { ! aarch64*-*-* } } } } */
/* { dg-final { scan-tree-dump "Jumps threaded: 9" "thread2" { target { ! aarch64*-*-* } } } } */
-/* { dg-final { scan-tree-dump "Jumps threaded: 17" "thread2" { target { aarch64*-*-* } } } } */
enum STATE {

View File

@ -8744,7 +8744,7 @@
+//asm (".hidden _ZNKSt10filesystem4_Dir7currentEv");
--- libstdc++-v3/src/nonshared17/Makefile.am.jj 2025-05-06 15:48:48.687747618 +0200
+++ libstdc++-v3/src/nonshared17/Makefile.am 2025-05-06 16:10:20.603262671 +0200
@@ -0,0 +1,174 @@
@@ -0,0 +1,155 @@
+## Makefile for the C++17 sources of the GNU C++ Standard library.
+##
+## Copyright (C) 1997-2025 Free Software Foundation, Inc.
@ -8839,25 +8839,6 @@
+libnonshared17convenience110_la_SOURCES = $(sources110) $(inst_sources110)
+libnonshared17convenience140_la_SOURCES = $(sources140) $(inst_sources140)
+
+if GLIBCXX_LDBL_ALT128_COMPAT
+floating_from_chars.lo: floating_from_chars.cc
+ $(LTCXXCOMPILE) -mabi=ibmlongdouble $(LONG_DOUBLE_128_FLAGS) -c $<
+floating_from_chars.o: floating_from_chars.cc
+ $(CXXCOMPILE) -mabi=ibmlongdouble $(LONG_DOUBLE_128_FLAGS) -c $<
+floating_to_chars.lo: floating_to_chars.cc
+ $(LTCXXCOMPILE) -mabi=ibmlongdouble $(LONG_DOUBLE_128_FLAGS) -c $<
+floating_to_chars.o: floating_to_chars.cc
+ $(CXXCOMPILE) -mabi=ibmlongdouble $(LONG_DOUBLE_128_FLAGS) -c $<
+floating_from_chars110.lo: floating_from_chars110.cc
+ $(LTCXXCOMPILE) -mabi=ibmlongdouble $(LONG_DOUBLE_128_FLAGS) -c $<
+floating_from_chars110.o: floating_from_chars110.cc
+ $(CXXCOMPILE) -mabi=ibmlongdouble $(LONG_DOUBLE_128_FLAGS) -c $<
+floating_to_chars110.lo: floating_to_chars110.cc
+ $(LTCXXCOMPILE) -mabi=ibmlongdouble $(LONG_DOUBLE_128_FLAGS) -c $<
+floating_to_chars110.o: floating_to_chars110.cc
+ $(CXXCOMPILE) -mabi=ibmlongdouble $(LONG_DOUBLE_128_FLAGS) -c $<
+endif
+
+# AM_CXXFLAGS needs to be in each subdirectory so that it can be
+# modified in a per-library or per-sub-library way. Need to manually
+# set this option because CONFIG_CXXFLAGS has to be after
@ -8947,7 +8928,7 @@
+#include "../c++17/cow-string-inst.cc"
--- libstdc++-v3/src/nonshared17/Makefile.in.jj 2025-05-06 15:48:48.688747604 +0200
+++ libstdc++-v3/src/nonshared17/Makefile.in 2025-05-07 10:09:21.643442963 +0200
@@ -0,0 +1,871 @@
@@ -0,0 +1,854 @@
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# @configure_input@
+
@ -9799,23 +9780,6 @@
+
+vpath % $(top_srcdir)/src/nonshared17
+
+@GLIBCXX_LDBL_ALT128_COMPAT_TRUE@floating_from_chars.lo: floating_from_chars.cc
+@GLIBCXX_LDBL_ALT128_COMPAT_TRUE@ $(LTCXXCOMPILE) -mabi=ibmlongdouble $(LONG_DOUBLE_128_FLAGS) -c $<
+@GLIBCXX_LDBL_ALT128_COMPAT_TRUE@floating_from_chars.o: floating_from_chars.cc
+@GLIBCXX_LDBL_ALT128_COMPAT_TRUE@ $(CXXCOMPILE) -mabi=ibmlongdouble $(LONG_DOUBLE_128_FLAGS) -c $<
+@GLIBCXX_LDBL_ALT128_COMPAT_TRUE@floating_to_chars.lo: floating_to_chars.cc
+@GLIBCXX_LDBL_ALT128_COMPAT_TRUE@ $(LTCXXCOMPILE) -mabi=ibmlongdouble $(LONG_DOUBLE_128_FLAGS) -c $<
+@GLIBCXX_LDBL_ALT128_COMPAT_TRUE@floating_to_chars.o: floating_to_chars.cc
+@GLIBCXX_LDBL_ALT128_COMPAT_TRUE@ $(CXXCOMPILE) -mabi=ibmlongdouble $(LONG_DOUBLE_128_FLAGS) -c $<
+@GLIBCXX_LDBL_ALT128_COMPAT_TRUE@floating_from_chars110.lo: floating_from_chars110.cc
+@GLIBCXX_LDBL_ALT128_COMPAT_TRUE@ $(LTCXXCOMPILE) -mabi=ibmlongdouble $(LONG_DOUBLE_128_FLAGS) -c $<
+@GLIBCXX_LDBL_ALT128_COMPAT_TRUE@floating_from_chars110.o: floating_from_chars110.cc
+@GLIBCXX_LDBL_ALT128_COMPAT_TRUE@ $(CXXCOMPILE) -mabi=ibmlongdouble $(LONG_DOUBLE_128_FLAGS) -c $<
+@GLIBCXX_LDBL_ALT128_COMPAT_TRUE@floating_to_chars110.lo: floating_to_chars110.cc
+@GLIBCXX_LDBL_ALT128_COMPAT_TRUE@ $(LTCXXCOMPILE) -mabi=ibmlongdouble $(LONG_DOUBLE_128_FLAGS) -c $<
+@GLIBCXX_LDBL_ALT128_COMPAT_TRUE@floating_to_chars110.o: floating_to_chars110.cc
+@GLIBCXX_LDBL_ALT128_COMPAT_TRUE@ $(CXXCOMPILE) -mabi=ibmlongdouble $(LONG_DOUBLE_128_FLAGS) -c $<
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

View File

@ -4,7 +4,6 @@
%global have_scl_utils 0
%endif
%global gts_ver 15
%global gts_next %(v="%{gts_ver}"; echo $((++v)))
%{?scl_package:%global scl gcc-toolset-%{gts_ver}}
%global scl_prefix gcc-toolset-%{gts_ver}-
%if %have_scl_utils
@ -16,13 +15,13 @@ BuildRequires: gcc-toolset-%{gts_ver}-devel
%{?scl:%global __strip %%{_scl_root}/usr/bin/strip}
%{?scl:%global __objdump %%{_scl_root}/usr/bin/objdump}
%{?scl:%scl_package gcc}
%global DATE 20260123
%global gitrev 226e8310eed1ce10784f98f199e1aa4b12ca86b7
%global gcc_version 15.2.1
%global DATE 20250521
%global gitrev b9def1721b12cae307c1a1ebc49030fce6531dfa
%global gcc_version 15.1.1
%global gcc_major 15
# Note, gcc_release must be integer, if you want to add suffixes to
# %%{release}, append them after %%{gcc_release} on Release: line.
%global gcc_release 8
%global gcc_release 2
%global nvptx_tools_gitrev 87ce9dc5999e5fca2e1d3478a30888d9864c9804
%global newlib_cygwin_gitrev d35cc82b5ec15bb8a5fe0fe11e183d1887992e99
%global isl_version 0.24
@ -172,7 +171,7 @@ BuildRequires: gcc-toolset-%{gts_ver}-devel
Summary: GCC version %{gcc_major}
Name: %{?scl_prefix}gcc
Version: %{gcc_version}
Release: %{gcc_release}%{?dist}
Release: %{gcc_release}.4%{?dist}.alma.1
# License notes for some of the less obvious ones:
# gcc/doc/cppinternals.texi: Linux-man-pages-copyleft-2-para
# isl: MIT, BSD-2-Clause
@ -299,7 +298,9 @@ Requires: libgcc >= 4.1.2-43
Requires: libgomp >= 4.4.4-13
# lto-wrapper invokes make
Requires: make
Requires: (%{?scl_prefix}runtime >= %{gts_ver} with %{?scl_prefix}runtime < %{gts_next})
%if %have_scl_utils
%{?scl:Requires:%scl_runtime}
%endif
AutoReq: true
# Various libraries are imported. #1859893 asks us to list them all.
Provides: bundled(libiberty)
@ -357,10 +358,6 @@ Patch9: gcc15-Wno-format-security.patch
Patch10: gcc15-rh1574936.patch
Patch11: gcc15-d-shared-libphobos.patch
Patch12: gcc15-pr119006.patch
Patch13: gcc15-pr123273.patch
Patch14: gcc15-pr123667.patch
Patch15: gcc15-pr123737.patch
Patch16: gcc15-pr112653.patch
Patch50: isl-rh2155127.patch
@ -724,10 +721,6 @@ so that there cannot be any synchronization problems.
%patch -P10 -p0 -b .rh1574936~
%patch -P11 -p0 -b .d-shared-libphobos~
%patch -P12 -p0 -b .pr119006~
%patch -P13 -p0 -b .pr123273~
%patch -P14 -p0 -b .pr123667~
%patch -P15 -p0 -b .pr123737~
%patch -P16 -p1 -b .pr112653~
%patch -P100 -p1 -b .fortran-fdec-duplicates~
@ -831,6 +824,13 @@ sed -i '/^GENERATE_TREEVIEW/s/YES/NO/' libstdc++-v3/doc/doxygen/user.cfg.in
# Undo the broken autoconf change in recent Fedora versions
export CONFIG_SITE=NONE
%if 0%{?rhel} == 10
# Work around https://issues.redhat.com/browse/RHEL-49348
%ifarch ppc64le
export GLIBC_TUNABLES=glibc.cpu.hwcaps=-arch_3_1
%endif
%endif
CC=gcc
CXX=g++
OPT_FLAGS="%{optflags}"
@ -2910,53 +2910,21 @@ fi
%endif
%changelog
* Mon Jul 20 2026 Siddhesh Poyarekar <siddhesh@redhat.com> 15.2.1-8
- fix wrong optimization of conditional dynamic allocation (RHEL-192425)
* Fri Sep 26 2025 Eduard Abdullin <eabdullin@almalinux.org> 15.1.1-2.4.alma.1
- Fix glibc BR
* Mon Jan 26 2026 Siddhesh Poyarekar <siddhesh@redhat.com> 15.2.1-7
- update from releases/gcc-15 branch (RHEL-116507)
- PRs ada/68179, ada/123060, ada/123088, ada/123096, ada/123138, ada/123185,
ada/123289, ada/123302, ada/123306, ada/123371, ada/123589,
analyzer/122975, analyzer/123085, c/123156, c++/91388, c++/114764,
c++/116952, c++/120446, c++/121854, c++/121966, c++/122048,
c++/122070, c++/122550, c++/122668, c++/122752, c++/122772,
c++/122834, c++/122922, c++/123331, c++/123597, debug/121964,
diagnostics/120063, fortran/107406, libfortran/122936,
libstdc++/120446, libstdc++/122812, libstdc++/122907,
libstdc++/123147, middle-end/111817, middle-end/123107,
middle-end/123392, middle-end/123703, rtl-optimization/121773,
rtl-optimization/122215, rtl-optimization/123121,
rtl-optimization/123523, target/117575, target/119130,
target/120250, target/121192, target/121485, target/123022,
target/123092, target/123155, target/123217, target/123460,
target/123484, target/123489, target/123521, target/123607,
target/123742, testsuite/123353, tree-optimization/122793,
tree-optimization/122868, tree-optimization/123040,
tree-optimization/123300, tree-optimization/123351,
tree-optimization/123372, tree-optimization/123431,
tree-optimization/123513, tree-optimization/123602,
tree-optimization/123736, tree-optimization/123741
* Mon Jun 16 2025 Marek Polacek <polacek@redhat.com> 15.1.1-2.4
- ship libstdc++.modules.json (RHEL-97095)
* Tue Sep 9 2025 Siddhesh Poyarekar <siddhesh@redhat.com> 15.1.1-2.6
- Fix glibc32 build dependency (RHEL-113183)
* Wed Jul 30 2025 Siddhesh Poyarekar <siddhesh@redhat.com> 15.1.1-2.5
- Drop the workaround for CVE-2025-5702 (RHEL-100161)
* Fri Jun 20 2025 Siddhesh Poyarekar <siddhesh@redhat.com> 15.1.1-2.4
- Require gcc-toolset-N-runtime (RHEL-94672)
* Mon Jun 16 2025 Marek Polacek <polacek@redhat.com> 15.1.1-2.3
- ship libstdc++.modules.json (RHEL-97043)
- configure with --with-long-double-format=ieee (RHEL-97055)
* Thu Jun 12 2025 Siddhesh Poyarekar <siddhesh@redhat.com> 15.1.1-2.2
- Tune for z16 on s390x by default on RHEL10 and later (RHEL-94282)
* Thu Jun 12 2025 Siddhesh Poyarekar <siddhesh@redhat.com> 15.1.1-2.3
- Add AS_NEEDED libstdc++.so.6 when only needed through libstdc++_nonshared
(RHEL-84680)
(RHEL-94866)
* Fri Jun 6 2025 Marek Polacek <polacek@redhat.com> 15.1.1-2.1
- configure with --enable-host-pie --enable-host-bind-now (RHEL-95595)
* Fri Jun 6 2025 Marek Polacek <polacek@redhat.com> 15.1.1-2.2
- configure with --enable-host-pie --enable-host-bind-now (RHEL-95564)
* Wed Jun 4 2025 Marek Polacek <polacek@redhat.com> 15.1.1-2.1
- re-enable annobin-plugin and offload-nvptx
* Wed May 21 2025 Marek Polacek <polacek@redhat.com> 15.1.1-2
- update from releases/gcc-15 branch

View File

@ -1,7 +0,0 @@
--- !Policy
product_versions:
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.gate-build-fast-lane.functional}
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.gate-build-slow-lane.functional}

View File

@ -1,160 +0,0 @@
From a67e31af273205a4ea4acf40a15d687142d1747c Mon Sep 17 00:00:00 2001
From: Eric Botcazou <ebotcazou@adacore.com>
Date: Wed, 1 Jul 2026 10:23:46 +0200
Subject: [PATCH] PTA: Fix wrong optimization of conditional dynamic allocation
This is a regression present on mainline, 16, 15 and 14 branches introduced
by the fix for PR tree-optimization/112653 (PTA and return). What happens
is that DSE incorrectly eliminates a call to memcpy, whose destination is
obtained from (an equivalent of) malloc and is ultimately returned from the
function. But this happens only when the dynamic allocation is conditional.
The difference between the unconditional and conditional cases is:
ESCAPED_RETURN = { ESCAPED NONLOCAL HEAP(30) }
vs
ESCAPED_RETURN = { ANYTHING }
The fix is to apply in set_uids_in_ptset the same treatment to ANYTHING in
the escaped return case as in the escaped case.
gcc/
* tree-ssa-structalias.cc (set_uids_in_ptset): If ANYTHING is
present in the ESCAPED_RETURN solution, record that the global
solution has an escaped heap if FROM contains a heap variable.
gcc/testsuite/
* gnat.dg/opt109.adb: New test.
* gnat.dg/opt109_pkg.ads, gnat.dg/opt109_pkg.adb: New helper.
---
gcc/testsuite/gnat.dg/opt109.adb | 13 +++++++++++
gcc/testsuite/gnat.dg/opt109_pkg.adb | 16 ++++++++++++++
gcc/testsuite/gnat.dg/opt109_pkg.ads | 33 ++++++++++++++++++++++++++++
gcc/tree-ssa-structalias.cc | 17 +++++++++-----
4 files changed, 73 insertions(+), 6 deletions(-)
create mode 100644 gcc/testsuite/gnat.dg/opt109.adb
create mode 100644 gcc/testsuite/gnat.dg/opt109_pkg.adb
create mode 100644 gcc/testsuite/gnat.dg/opt109_pkg.ads
diff --git a/gcc/testsuite/gnat.dg/opt109.adb b/gcc/testsuite/gnat.dg/opt109.adb
new file mode 100644
index 00000000000..caa9e587123
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt109.adb
@@ -0,0 +1,13 @@
+-- { dg-do run }
+-- { dg-options "-O" }
+
+with Opt109_Pkg; use Opt109_Pkg;
+
+procedure Opt109 is
+ S : constant String := "Hello World!";
+ R : constant Rec := F (S);
+begin
+ if R.B.Data.all /= S then
+ raise Program_Error;
+ end if;
+end;
diff --git a/gcc/testsuite/gnat.dg/opt109_pkg.adb b/gcc/testsuite/gnat.dg/opt109_pkg.adb
new file mode 100644
index 00000000000..410a3e41755
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt109_pkg.adb
@@ -0,0 +1,16 @@
+package body Opt109_Pkg is
+
+ function F (Value : String) return Rec is
+ begin
+ if Value'Length > Max then
+ return Result : Rec (Is_Small => False) do
+ Result.B.Data := new String'(Value);
+ end return;
+ else
+ return Result : Rec (Is_Small => True) do
+ Result.S.Data (Value'Length + 1 .. Max) := (others => ' ');
+ end return;
+ end if;
+ end;
+
+end Opt109_Pkg;
diff --git a/gcc/testsuite/gnat.dg/opt109_pkg.ads b/gcc/testsuite/gnat.dg/opt109_pkg.ads
new file mode 100644
index 00000000000..0e483ed40c7
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt109_pkg.ads
@@ -0,0 +1,33 @@
+with System;
+
+package Opt109_Pkg is
+
+ Max : constant Natural := 7;
+ subtype Small_String_Size is Natural range 0 .. Max;
+
+ type Small_String is record
+ Is_Small : Boolean;
+ Length : Small_String_Size;
+ Data : aliased String (1 .. Max);
+ end record;
+
+ type Big_String_Access is access all String;
+
+ type Big_String is record
+ Data : Big_String_Access := null;
+ end record;
+
+ for Big_String use record
+ Data at 0 range 0 .. System.Word_Size - 1;
+ end record;
+
+ type Rec (Is_Small : Boolean := True) is record
+ case Is_Small is
+ when True => S : Small_String;
+ when False => B : Big_String;
+ end case;
+ end record with Unchecked_Union;
+
+ function F (Value : String) return Rec;
+
+end Opt109_Pkg;
diff --git a/gcc/tree-ssa-structalias.cc b/gcc/tree-ssa-structalias.cc
index 0215243d5be..f729cf4216a 100644
--- a/gcc/tree-ssa-structalias.cc
+++ b/gcc/tree-ssa-structalias.cc
@@ -6782,12 +6782,15 @@ static void
set_uids_in_ptset (bitmap into, bitmap from, struct pt_solution *pt,
tree fndecl)
{
+ const varinfo_t escaped_vi = get_varinfo (find (escaped_id));
+ const varinfo_t escaped_return_vi = get_varinfo (find (escaped_return_id));
+ const bool everything_escaped
+ = escaped_vi->solution && bitmap_bit_p (escaped_vi->solution, anything_id);
+ const bool everything_escaped_return
+ = escaped_return_vi->solution
+ && bitmap_bit_p (escaped_return_vi->solution, anything_id);
unsigned int i;
bitmap_iterator bi;
- varinfo_t escaped_vi = get_varinfo (find (escaped_id));
- varinfo_t escaped_return_vi = get_varinfo (find (escaped_return_id));
- bool everything_escaped
- = escaped_vi->solution && bitmap_bit_p (escaped_vi->solution, anything_id);
EXECUTE_IF_SET_IN_BITMAP (from, 0, i, bi)
{
@@ -6803,8 +6806,10 @@ set_uids_in_ptset (bitmap into, bitmap from, struct pt_solution *pt,
pt->vars_contains_escaped = true;
pt->vars_contains_escaped_heap |= vi->is_heap_var;
}
- if (escaped_return_vi->solution
- && bitmap_bit_p (escaped_return_vi->solution, i))
+
+ if (everything_escaped_return
+ || (escaped_return_vi->solution
+ && bitmap_bit_p (escaped_return_vi->solution, i)))
pt->vars_contains_escaped_heap |= vi->is_heap_var;
if (vi->is_restrict_var)
--
2.55.0

View File

@ -1,54 +0,0 @@
2026-01-06 Jakub Jelinek <jakub@redhat.com>
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 } */
+
+/* *\\
+/""" */

View File

@ -1,94 +0,0 @@
2026-01-21 Jakub Jelinek <jakub@redhat.com>
PR c++/123667
* semantics.cc (finish_decltype_type): Allow a structured binding
for ptds.saved to have DECL_HAS_VALUE_EXPR_P cleared, if it is
not within current_function_decl, but in that case assert that
lookup_decomp_type succeeded.
* g++.dg/cpp1z/decomp66.C: New test.
* g++.dg/cpp1z/decomp67.C: New test.
--- gcc/cp/semantics.cc.jj 2026-01-15 16:33:46.000000000 +0100
+++ gcc/cp/semantics.cc 2026-01-21 17:55:14.272577246 +0100
@@ -13062,12 +13062,16 @@ finish_decltype_type (tree expr, bool id
{
if (ptds.saved)
{
- gcc_checking_assert (DECL_HAS_VALUE_EXPR_P (expr));
+ gcc_checking_assert (DECL_HAS_VALUE_EXPR_P (expr)
+ || (DECL_CONTEXT (expr)
+ != current_function_decl));
/* DECL_HAS_VALUE_EXPR_P is always set if
- processing_template_decl. If lookup_decomp_type
+ processing_template_decl at least for structured bindings
+ within the template. If lookup_decomp_type
returns non-NULL, it is the tuple case. */
if (tree ret = lookup_decomp_type (expr))
return ret;
+ gcc_checking_assert (DECL_HAS_VALUE_EXPR_P (expr));
}
if (DECL_HAS_VALUE_EXPR_P (expr))
/* Expr is an array or struct subobject proxy, handle
--- gcc/testsuite/g++.dg/cpp1z/decomp66.C.jj 2026-01-21 17:59:28.122275457 +0100
+++ gcc/testsuite/g++.dg/cpp1z/decomp66.C 2026-01-21 17:58:30.737247916 +0100
@@ -0,0 +1,23 @@
+// PR c++/123667
+// { dg-do compile { target c++14 } }
+// { dg-options "" }
+
+namespace std {
+ template <typename T> struct tuple_size;
+ template <int, typename> struct tuple_element;
+}
+
+struct A {
+ int i;
+ template <int I> int &get () { return i; }
+};
+
+template <> struct std::tuple_size <A> { static const int value = 2; };
+template <int I> struct std::tuple_element <I,A> { using type = int; };
+
+int
+main ()
+{
+ auto [ x, y ] = A { 0 }; // { dg-warning "structured bindings only available with" "" { target c++14_down } }
+ [] (auto t) { using z = decltype (x); } (1);
+}
--- gcc/testsuite/g++.dg/cpp1z/decomp67.C.jj 2026-01-21 17:59:31.139224331 +0100
+++ gcc/testsuite/g++.dg/cpp1z/decomp67.C 2026-01-21 17:59:07.235629406 +0100
@@ -0,0 +1,33 @@
+// PR c++/123667
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
+
+namespace std {
+ template <typename T> struct tuple_size;
+ template <int, typename> struct tuple_element;
+}
+
+struct A {
+ int i;
+ template <int I> int &get () { return i; }
+};
+
+template <> struct std::tuple_size <A> { static const int value = 2; };
+template <int I> struct std::tuple_element <I,A> { using type = int; };
+
+auto [ x, y ] = A { 0 }; // { dg-warning "structured bindings only available with" "" { target c++14_down } }
+
+template <int N>
+void
+foo ()
+{
+ using a = decltype (x);
+ auto [ x, y ] = A { 0 }; // { dg-warning "structured bindings only available with" "" { target c++14_down } }
+ using b = decltype (x);
+}
+
+void
+bar ()
+{
+ foo <42> ();
+}

View File

@ -1,86 +0,0 @@
2026-01-21 Jakub Jelinek <jakub@redhat.com>
PR c++/123737
* parser.cc (cp_parser_expression): Don't handle CPP_EMBED just
as the last byte in it if expression has or might have overloaded
type. In that case call build_x_compound_expr for each byte
in CPP_EMBED separately.
* g++.dg/cpp/embed-28.C: New test.
* g++.dg/parse/comma3.C: New test.
--- gcc/cp/parser.cc.jj 2026-01-20 01:13:20.324260446 +0100
+++ gcc/cp/parser.cc 2026-01-21 14:04:32.086336386 +0100
@@ -12132,10 +12132,24 @@ cp_parser_expression (cp_parser* parser,
and one CPP_NUMBER plus CPP_COMMA before it and one
CPP_COMMA plus CPP_NUMBER after it is guaranteed by
the preprocessor. Thus, parse the whole CPP_EMBED just
- as a single INTEGER_CST, the last byte in it. */
+ as a single INTEGER_CST, the last byte in it. Though,
+ don't use that shortcut if the comma operator could be
+ overloaded. */
tree raw_data = cp_lexer_peek_token (parser->lexer)->u.value;
location_t loc = cp_lexer_peek_token (parser->lexer)->location;
cp_lexer_consume_token (parser->lexer);
+ if (OVERLOAD_TYPE_P (TREE_TYPE (expression))
+ || type_dependent_expression_p (expression))
+ for (unsigned i = 0; i < RAW_DATA_LENGTH (raw_data) - 1U; ++i)
+ {
+ assignment_expression
+ = *raw_data_iterator (raw_data, i);
+ assignment_expression.set_location (loc);
+ expression
+ = build_x_compound_expr (loc, expression,
+ assignment_expression, NULL_TREE,
+ complain_flags (decltype_p));
+ }
assignment_expression
= *raw_data_iterator (raw_data, RAW_DATA_LENGTH (raw_data) - 1);
assignment_expression.set_location (loc);
--- gcc/testsuite/g++.dg/cpp/embed-28.C.jj 2026-01-21 14:11:14.617520864 +0100
+++ gcc/testsuite/g++.dg/cpp/embed-28.C 2026-01-21 14:11:01.121749695 +0100
@@ -0,0 +1,19 @@
+// PR c++/123737
+// { dg-do run }
+// { dg-options "--embed-dir=${srcdir}/c-c++-common/cpp/embed-dir" }
+
+struct A {
+ A (int x) : a (0), e (x) {}
+ unsigned long a, e;
+ A &operator, (int) { ++a; return *this; }
+ ~A () { if (a != e) __builtin_abort (); }
+};
+
+int
+main ()
+{
+ A a = 231;
+ a,
+#embed <magna-carta.txt> limit (231)
+ ;
+}
--- gcc/testsuite/g++.dg/parse/comma3.C.jj 2026-01-21 14:08:53.834908004 +0100
+++ gcc/testsuite/g++.dg/parse/comma3.C 2026-01-21 12:15:02.334948163 +0100
@@ -0,0 +1,22 @@
+// PR c++/123737
+// { dg-do run }
+
+struct A {
+ A (int x) : a (0), e (x) {}
+ unsigned long a, e;
+ A &operator, (int) { ++a; return *this; }
+ ~A () { if (a != e) __builtin_abort (); }
+};
+
+int
+main ()
+{
+ A a = 131;
+ a, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
+}

View File

@ -1,38 +0,0 @@
# Tier 0 test plan. It's actually Tier 1
# - limited to its public part
# - executed on the architecture at hand
# When run by osci.tier0 on CentOS Stream or RHEL, it receives the following
# context:
# arch=x86_64 (the architecture at hand, currently OSCI uses just x86_64)
# distro=rhel<M>.<m> (even for CentOS Stream builds)
# trigger=build
---
summary: Tier 0 test plan
context:
component: gcc-toolset-15-gcc
environment+:
WITH_SCL: gcc-toolset-15-env
discover:
- name: collect_info
how: shell
tests:
- name: /info/rpms
test: rpm -qa --last
- name: public_tests
how: fmf
url: https://gitlab.com/redhat/centos-stream/tests/gcc.git
filter: 'tag: CI-Tier-1'
provision+:
hardware:
disk:
- size: ">= 60 GiB"
memory: ">= 8 GiB"
prepare+:
- how: shell
script:
- dnf config-manager --set-enabled '*CRB*' || true
- dnf config-manager --set-enabled crb || true
- dnf config-manager --set-enabled rhel-buildroot || true
- dnf config-manager --set-enabled epel || true
execute:
how: tmt

View File

@ -1,23 +0,0 @@
badfuncs:
# GCC doesn't use the "forbidden" functions as such. Just some of its
# sanitizers can instrument those functions which leads to false
# positives in the badfuncs test.
ignore:
- /usr/lib*/libasan.so.*.*.*
- /usr/lib*/libtsan.so.*.*.*
specname:
# In GCC toolsets builds, the spec file name and the package may not
# be exactly the same, the package is prefixed with gcc-toolset-NN-.
# Let's ignore the prefix.
match: suffix
primary: filename
runpath:
# Although gcc-toolset sanitizers link gcc-toolset libraries from
# /opt/..., they themselves are placed in /usr. The runpath test
# doesn't like this difference. Explicitly allow it.
allowed_paths:
- /opt/rh/gcc-toolset-15/root/usr/lib
- /opt/rh/gcc-toolset-15/root/usr/lib/../lib64
- /opt/rh/gcc-toolset-15/root/usr/lib64

View File

@ -1,4 +0,0 @@
SHA512 (gcc-15.2.1-20260123.tar.xz) = c4f0513e4027632f2d62b1feead9fa197e46f796212bd7f07eaff9b2e84a1230b601f3a6f2cabfc9994ca0e47f95b21fcb9a182575a27e30100e3206d6767070
SHA512 (isl-0.24.tar.bz2) = aab3bddbda96b801d0f56d2869f943157aad52a6f6e6a61745edd740234c635c38231af20bc3f1a08d416a5e973a90e18249078ed8e4ae2f1d5de57658738e95
SHA512 (newlib-cygwin-d35cc82b5ec15bb8a5fe0fe11e183d1887992e99.tar.xz) = ef9495745a96d1d76f9f425c4a48c807fface36a1aa92351c5d024103678d144d046e8de55d195103784472c14874e29e4b9284d5d6a2e7bb27fd98c8455a881
SHA512 (nvptx-tools-87ce9dc5999e5fca2e1d3478a30888d9864c9804.tar.xz) = 941e763af8601b89f0e4ec48a2d68ae0a8e70ee1e6ba6859394b021ad7bd7d143cc529f3c35c08d7f84e5554980ddcc97cf05b6c4755c2bc36c91161b79e8cea