From c618ee386921dc18a8f6cf0e74e2f010f397aa48 Mon Sep 17 00:00:00 2001
From: MSVSphere Packaging Team
Date: Wed, 13 Nov 2024 16:07:35 +0300
Subject: [PATCH] import gcc-11.5.0-2.el9
---
.gcc.metadata | 2 +-
.gitignore | 2 +-
SOURCES/gcc11-libgfortran-flush.patch | 51 +++
SOURCES/gcc11-libstdc++-docs.patch | 4 +-
SOURCES/gcc11-pr105157.patch | 105 ++++++
SOURCES/gcc11-pr113960.patch | 107 ++++++
SOURCES/gcc11-pr116034.patch | 65 ++++
SOURCES/gcc11-pr96024.patch | 40 --
...uite-aarch64-add-fno-stack-protector.patch | 348 ++++++++++++++++++
SOURCES/gcc11-testsuite-fixes-3.patch | 150 ++++++++
SPECS/gcc.spec | 103 +++++-
11 files changed, 927 insertions(+), 50 deletions(-)
create mode 100644 SOURCES/gcc11-libgfortran-flush.patch
create mode 100644 SOURCES/gcc11-pr105157.patch
create mode 100644 SOURCES/gcc11-pr113960.patch
create mode 100644 SOURCES/gcc11-pr116034.patch
delete mode 100644 SOURCES/gcc11-pr96024.patch
create mode 100644 SOURCES/gcc11-testsuite-aarch64-add-fno-stack-protector.patch
create mode 100644 SOURCES/gcc11-testsuite-fixes-3.patch
diff --git a/.gcc.metadata b/.gcc.metadata
index fa7055b..cefdc61 100644
--- a/.gcc.metadata
+++ b/.gcc.metadata
@@ -1,4 +1,4 @@
-510b05103d9ea05aaf9ae26709c55af0cc21b32f SOURCES/gcc-11.4.1-20230605.tar.xz
+fdeaf702eb50579d38faf7dc2aadbf5e27a2c432 SOURCES/gcc-11.5.0-20240719.tar.xz
bbffc5a2b05e4f0c97e882f96c448504491dc4ed SOURCES/isl-0.18.tar.bz2
6ec33952e824e837fef0e829c93d39d6a507082f SOURCES/newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz
0e0c6f8d68ab0878f02287ac082c1077c831cd81 SOURCES/nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz
diff --git a/.gitignore b/.gitignore
index 3799ab3..94b3d9f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-SOURCES/gcc-11.4.1-20230605.tar.xz
+SOURCES/gcc-11.5.0-20240719.tar.xz
SOURCES/isl-0.18.tar.bz2
SOURCES/newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz
SOURCES/nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz
diff --git a/SOURCES/gcc11-libgfortran-flush.patch b/SOURCES/gcc11-libgfortran-flush.patch
new file mode 100644
index 0000000..8e3016a
--- /dev/null
+++ b/SOURCES/gcc11-libgfortran-flush.patch
@@ -0,0 +1,51 @@
+commit c14f38d4292ec22462a4080841d526f87428130a
+Author: Francois-Xavier Coudert
+Date: Thu Dec 16 15:33:17 2021 +0100
+
+ Fix FLUSH IOSTAT value
+
+ PR libfortran/101255
+
+ libgfortran/ChangeLog:
+
+ * io/file_pos.c: Fix error code.
+
+ gcc/testsuite/ChangeLog:
+
+ * gfortran.dg/iostat_5.f90: New file.
+
+diff --git a/gcc/testsuite/gfortran.dg/iostat_5.f90 b/gcc/testsuite/gfortran.dg/iostat_5.f90
+new file mode 100644
+index 00000000000..1e72dfdf7e1
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/iostat_5.f90
+@@ -0,0 +1,16 @@
++! PR libfortran/101255
++! { dg-do run }
++
++program test
++ use ISO_FORTRAN_ENV, only: IOSTAT_EOR, IOSTAT_END
++ implicit none
++ character(len=50) :: err
++ integer :: i
++
++ err = ""
++ flush(99, iostat=i, iomsg=err)
++
++ if (err == "") stop 1
++ if (i >= 0) stop 2
++ if (i == IOSTAT_EOR .or. i == IOSTAT_END) stop 3
++end
+diff --git a/libgfortran/io/file_pos.c b/libgfortran/io/file_pos.c
+index 7e71ca577e0..4ed1698f17a 100644
+--- a/libgfortran/io/file_pos.c
++++ b/libgfortran/io/file_pos.c
+@@ -527,7 +527,7 @@ st_flush (st_parameter_filepos *fpp)
+ }
+ else
+ /* FLUSH on unconnected unit is illegal: F95 std., 9.3.5. */
+- generate_error (&fpp->common, LIBERROR_BAD_OPTION,
++ generate_error (&fpp->common, -LIBERROR_BAD_UNIT,
+ "Specified UNIT in FLUSH is not connected");
+
+ if (needs_unlock)
diff --git a/SOURCES/gcc11-libstdc++-docs.patch b/SOURCES/gcc11-libstdc++-docs.patch
index 353ab27..b0f7deb 100644
--- a/SOURCES/gcc11-libstdc++-docs.patch
+++ b/SOURCES/gcc11-libstdc++-docs.patch
@@ -4,7 +4,7 @@
FSF
-+ Release 11.4.1
++ Release 11.5.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 11.4.1 release,
++ for the 11.5.0 release,
+ online
for each GCC release
and
diff --git a/SOURCES/gcc11-pr105157.patch b/SOURCES/gcc11-pr105157.patch
new file mode 100644
index 0000000..79cac28
--- /dev/null
+++ b/SOURCES/gcc11-pr105157.patch
@@ -0,0 +1,105 @@
+The original patch had
+#define TARGET_CPU_NBITS 8
+but I've changed it to
+#define TARGET_CPU_NBITS 7
+
+commit 5522dec054cb940fe83661b96249aa12c54c1d77
+Author: Andre Vieira
+Date: Fri Apr 8 15:12:23 2022 +0100
+
+ aarch64: PR target/105157 Increase number of cores TARGET_CPU_DEFAULT can encode
+
+ This addresses the compile-time increase seen in the PR target/105157. This was
+ being caused by selecting the wrong core tuning, as when we added the latest
+ AArch64 the TARGET_CPU_generic tuning was pushed beyond the 0x3f mask we used
+ to encode both target cpu and attributes into TARGET_CPU_DEFAULT.
+
+ gcc/ChangeLog:
+
+ PR target/105157
+ * config.gcc: Shift ext_mask by TARGET_CPU_NBITS.
+ * config/aarch64/aarch64.h (TARGET_CPU_NBITS): New macro.
+ (TARGET_CPU_MASK): Likewise.
+ (TARGET_CPU_DEFAULT): Use TARGET_CPU_NBITS.
+ * config/aarch64/aarch64.cc (aarch64_get_tune_cpu): Use TARGET_CPU_MASK.
+ (aarch64_get_arch): Likewise.
+ (aarch64_override_options): Use TARGET_CPU_NBITS.
+
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -4261,7 +4261,7 @@ case "${target}" in
+ ext_val=`echo $ext_val | sed -e 's/[a-z0-9]\+//'`
+ done
+
+- ext_mask="(("$ext_mask") << 6)"
++ ext_mask="(("$ext_mask") << TARGET_CPU_NBITS)"
+ if [ x"$base_id" != x ]; then
+ target_cpu_cname="TARGET_CPU_$base_id | $ext_mask"
+ fi
+--- a/gcc/config/aarch64/aarch64.c
++++ b/gcc/config/aarch64/aarch64.c
+@@ -18053,6 +18053,9 @@ aarch64_validate_mtune (const char *str, const struct processor **res)
+ return false;
+ }
+
++static_assert (TARGET_CPU_generic < TARGET_CPU_MASK,
++ "TARGET_CPU_NBITS is big enough");
++
+ /* Return the CPU corresponding to the enum CPU.
+ If it doesn't specify a cpu, return the default. */
+
+@@ -18062,12 +18065,12 @@ aarch64_get_tune_cpu (enum aarch64_processor cpu)
+ if (cpu != aarch64_none)
+ return &all_cores[cpu];
+
+- /* The & 0x3f is to extract the bottom 6 bits that encode the
+- default cpu as selected by the --with-cpu GCC configure option
++ /* The & TARGET_CPU_MASK is to extract the bottom TARGET_CPU_NBITS bits that
++ encode the default cpu as selected by the --with-cpu GCC configure option
+ in config.gcc.
+ ???: The whole TARGET_CPU_DEFAULT and AARCH64_CPU_DEFAULT_FLAGS
+ flags mechanism should be reworked to make it more sane. */
+- return &all_cores[TARGET_CPU_DEFAULT & 0x3f];
++ return &all_cores[TARGET_CPU_DEFAULT & TARGET_CPU_MASK];
+ }
+
+ /* Return the architecture corresponding to the enum ARCH.
+@@ -18079,7 +18082,8 @@ aarch64_get_arch (enum aarch64_arch arch)
+ if (arch != aarch64_no_arch)
+ return &all_architectures[arch];
+
+- const struct processor *cpu = &all_cores[TARGET_CPU_DEFAULT & 0x3f];
++ const struct processor *cpu
++ = &all_cores[TARGET_CPU_DEFAULT & TARGET_CPU_MASK];
+
+ return &all_architectures[cpu->arch];
+ }
+@@ -18166,7 +18170,7 @@ aarch64_override_options (void)
+ {
+ /* Get default configure-time CPU. */
+ selected_cpu = aarch64_get_tune_cpu (aarch64_none);
+- aarch64_isa_flags = TARGET_CPU_DEFAULT >> 6;
++ aarch64_isa_flags = TARGET_CPU_DEFAULT >> TARGET_CPU_NBITS;
+ }
+
+ if (selected_tune)
+--- a/gcc/config/aarch64/aarch64.h
++++ b/gcc/config/aarch64/aarch64.h
+@@ -813,10 +813,16 @@ enum target_cpus
+ TARGET_CPU_generic
+ };
+
++/* Define how many bits are used to represent the CPU in TARGET_CPU_DEFAULT.
++ This needs to be big enough to fit the value of TARGET_CPU_generic.
++ All bits after this are used to represent the AARCH64_CPU_DEFAULT_FLAGS. */
++#define TARGET_CPU_NBITS 7
++#define TARGET_CPU_MASK ((1 << TARGET_CPU_NBITS) - 1)
++
+ /* If there is no CPU defined at configure, use generic as default. */
+ #ifndef TARGET_CPU_DEFAULT
+ #define TARGET_CPU_DEFAULT \
+- (TARGET_CPU_generic | (AARCH64_CPU_DEFAULT_FLAGS << 6))
++ (TARGET_CPU_generic | (AARCH64_CPU_DEFAULT_FLAGS << TARGET_CPU_NBITS))
+ #endif
+
+ /* If inserting NOP before a mult-accumulate insn remember to adjust the
diff --git a/SOURCES/gcc11-pr113960.patch b/SOURCES/gcc11-pr113960.patch
new file mode 100644
index 0000000..b9ca081
--- /dev/null
+++ b/SOURCES/gcc11-pr113960.patch
@@ -0,0 +1,107 @@
+commit 6f5dcea85a31845ec6f4b6886734b0f02e013718
+Author: Jonathan Wakely
+Date: Tue Feb 27 17:50:34 2024 +0000
+
+ libstdc++: Fix conditions for using memcmp in std::lexicographical_compare_three_way [PR113960]
+
+ The change in r11-2981-g2f983fa69005b6 meant that
+ std::lexicographical_compare_three_way started to use memcmp for
+ unsigned integers on big endian targets, but for that to be valid we
+ need the two value types to have the same size and we need to use that
+ size to compute the length passed to memcmp.
+
+ I already defined a __is_memcmp_ordered_with trait that does the right
+ checks, std::lexicographical_compare_three_way just needs to use it.
+
+ libstdc++-v3/ChangeLog:
+
+ PR libstdc++/113960
+ * include/bits/stl_algobase.h (__is_byte_iter): Replace with ...
+ (__memcmp_ordered_with): New concept.
+ (lexicographical_compare_three_way): Use __memcmp_ordered_with
+ instead of __is_byte_iter. Use correct length for memcmp.
+ * testsuite/25_algorithms/lexicographical_compare_three_way/113960.cc:
+ New test.
+
+ (cherry picked from commit f5cdda8acb06c20335855ed353ab9a441c12128a)
+
+diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h
+index 7664301a208..6e648e48ad0 100644
+--- a/libstdc++-v3/include/bits/stl_algobase.h
++++ b/libstdc++-v3/include/bits/stl_algobase.h
+@@ -1780,11 +1780,14 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO
+ }
+
+ #if __cpp_lib_three_way_comparison
+- // Iter points to a contiguous range of unsigned narrow character type
+- // or std::byte, suitable for comparison by memcmp.
+- template
+- concept __is_byte_iter = contiguous_iterator<_Iter>
+- && __is_memcmp_ordered>::__value;
++ // Both iterators refer to contiguous ranges of unsigned narrow characters,
++ // or std::byte, or big-endian unsigned integers, suitable for comparison
++ // using memcmp.
++ template
++ concept __memcmp_ordered_with
++ = (__is_memcmp_ordered_with,
++ iter_value_t<_Iter2>>::__value)
++ && contiguous_iterator<_Iter1> && contiguous_iterator<_Iter2>;
+
+ // Return a struct with two members, initialized to the smaller of x and y
+ // (or x if they compare equal) and the result of the comparison x <=> y.
+@@ -1834,20 +1837,20 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO
+ if (!std::is_constant_evaluated())
+ if constexpr (same_as<_Comp, __detail::_Synth3way>
+ || same_as<_Comp, compare_three_way>)
+- if constexpr (__is_byte_iter<_InputIter1>)
+- if constexpr (__is_byte_iter<_InputIter2>)
+- {
+- const auto [__len, __lencmp] = _GLIBCXX_STD_A::
+- __min_cmp(__last1 - __first1, __last2 - __first2);
+- if (__len)
+- {
+- const auto __c
+- = __builtin_memcmp(&*__first1, &*__first2, __len) <=> 0;
+- if (__c != 0)
+- return __c;
+- }
+- return __lencmp;
+- }
++ if constexpr (__memcmp_ordered_with<_InputIter1, _InputIter2>)
++ {
++ const auto [__len, __lencmp] = _GLIBCXX_STD_A::
++ __min_cmp(__last1 - __first1, __last2 - __first2);
++ if (__len)
++ {
++ const auto __blen = __len * sizeof(*__first1);
++ const auto __c
++ = __builtin_memcmp(&*__first1, &*__first2, __blen) <=> 0;
++ if (__c != 0)
++ return __c;
++ }
++ return __lencmp;
++ }
+ #endif // is_constant_evaluated
+ while (__first1 != __last1)
+ {
+diff --git a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare_three_way/113960.cc b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare_three_way/113960.cc
+new file mode 100644
+index 00000000000..d51ae1a3d50
+--- /dev/null
++++ b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare_three_way/113960.cc
+@@ -0,0 +1,15 @@
++// { dg-do run { target c++20 } }
++
++// PR libstdc++/113960
++// std::map with std::vector as input overwrites itself with c++20, on s390x
++
++#include
++#include
++
++int main()
++{
++ unsigned short a1[] { 1, 2, 3 };
++ unsigned short a2[] { 1, 2, 4 };
++ // Incorrect memcmp comparison for big endian targets.
++ VERIFY( std::lexicographical_compare_three_way(a1, a1+3, a2, a2+3) < 0 );
++}
diff --git a/SOURCES/gcc11-pr116034.patch b/SOURCES/gcc11-pr116034.patch
new file mode 100644
index 0000000..1f194de
--- /dev/null
+++ b/SOURCES/gcc11-pr116034.patch
@@ -0,0 +1,65 @@
+commit 084768c865cd50a6f7ff177db2dbdbb7aadaeee0
+Author: Jakub Jelinek
+Date: Tue Jul 23 10:50:29 2024 +0200
+
+ ssa: Fix up maybe_rewrite_mem_ref_base complex type handling [PR116034]
+
+ The folding into REALPART_EXPR is correct, used only when the mem_offset
+ is zero, but for IMAGPART_EXPR it didn't check the exact offset value (just
+ that it is not 0).
+ The following patch fixes that by using IMAGPART_EXPR only if the offset
+ is right and using BITFIELD_REF or whatever else otherwise.
+
+ 2024-07-23 Jakub Jelinek
+ Andrew Pinski
+
+ PR tree-optimization/116034
+ * tree-ssa.c (maybe_rewrite_mem_ref_base): Only use IMAGPART_EXPR
+ if MEM_REF offset is equal to element type size.
+
+ * gcc.dg/pr116034.c: New test.
+
+ (cherry picked from commit b9cefd67a2a464a3c9413e6b3f28e7dc7a9ef162)
+
+diff --git a/gcc/testsuite/gcc.dg/pr116034.c b/gcc/testsuite/gcc.dg/pr116034.c
+new file mode 100644
+index 00000000000..9a31de03424
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/pr116034.c
+@@ -0,0 +1,22 @@
++/* PR tree-optimization/116034 */
++/* { dg-do run } */
++/* { dg-options "-O1 -fno-strict-aliasing" } */
++
++int g;
++
++static inline int
++foo (_Complex unsigned short c)
++{
++ __builtin_memmove (&g, 1 + (char *) &c, 2);
++ return g;
++}
++
++int
++main ()
++{
++ if (__SIZEOF_SHORT__ == 2
++ && __CHAR_BIT__ == 8
++ && (foo (__BYTE_ORDER__ != __ORDER_BIG_ENDIAN__ ? 0x100 : 1)
++ != (__BYTE_ORDER__ != __ORDER_BIG_ENDIAN__ ? 1 : 0x100)))
++ __builtin_abort ();
++}
+--- a/gcc/tree-ssa.c
++++ b/gcc/tree-ssa.c
+@@ -1506,7 +1506,10 @@ maybe_rewrite_mem_ref_base (tree *tp, bitmap suitable_for_renaming)
+ }
+ else if (TREE_CODE (TREE_TYPE (sym)) == COMPLEX_TYPE
+ && useless_type_conversion_p (TREE_TYPE (*tp),
+- TREE_TYPE (TREE_TYPE (sym))))
++ TREE_TYPE (TREE_TYPE (sym)))
++ && (integer_zerop (TREE_OPERAND (*tp, 1))
++ || tree_int_cst_equal (TREE_OPERAND (*tp, 1),
++ TYPE_SIZE_UNIT (TREE_TYPE (*tp)))))
+ {
+ *tp = build1 (integer_zerop (TREE_OPERAND (*tp, 1))
+ ? REALPART_EXPR : IMAGPART_EXPR,
diff --git a/SOURCES/gcc11-pr96024.patch b/SOURCES/gcc11-pr96024.patch
deleted file mode 100644
index fd883f1..0000000
--- a/SOURCES/gcc11-pr96024.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-commit 7f875e435b23dfb439bc7784cade4aebbd5d4a69
-Author: Jakub Jelinek
-Date: Fri Jun 9 09:10:29 2023 +0200
-
- fortran: Fix ICE on pr96024.f90 on big-endian hosts [PR96024]
-
- The pr96024.f90 testcase ICEs on big-endian hosts. The problem is
- that length->val.integer is accessed after checking
- length->expr_type == EXPR_CONSTANT, but it is a CHARACTER constant
- which uses length->val.character union member instead and on big-endian
- we end up reading constant 0x100000000 rather than some small number
- on little-endian and if target doesn't have enough memory for 4 times
- that (i.e. 16GB allocation), it ICEs.
-
- 2023-06-09 Jakub Jelinek
-
- PR fortran/96024
- * primary.c (gfc_convert_to_structure_constructor): Only do
- constant string ctor length verification and truncation/padding
- if constant length has INTEGER type.
-
- (cherry picked from commit 4cf6e322adc19f927859e0a5edfa93cec4b8c844)
-
-diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c
-index 1b93f96367f..5cad2d2682b 100644
---- a/gcc/fortran/primary.c
-+++ b/gcc/fortran/primary.c
-@@ -3188,10 +3188,11 @@ gfc_convert_to_structure_constructor (gfc_expr *e, gfc_symbol *sym, gfc_expr **c
- goto cleanup;
-
- /* For a constant string constructor, make sure the length is
-- correct; truncate of fill with blanks if needed. */
-+ correct; truncate or fill with blanks if needed. */
- if (this_comp->ts.type == BT_CHARACTER && !this_comp->attr.allocatable
- && this_comp->ts.u.cl && this_comp->ts.u.cl->length
- && this_comp->ts.u.cl->length->expr_type == EXPR_CONSTANT
-+ && this_comp->ts.u.cl->length->ts.type == BT_INTEGER
- && actual->expr->ts.type == BT_CHARACTER
- && actual->expr->expr_type == EXPR_CONSTANT)
- {
diff --git a/SOURCES/gcc11-testsuite-aarch64-add-fno-stack-protector.patch b/SOURCES/gcc11-testsuite-aarch64-add-fno-stack-protector.patch
new file mode 100644
index 0000000..0ab9be8
--- /dev/null
+++ b/SOURCES/gcc11-testsuite-aarch64-add-fno-stack-protector.patch
@@ -0,0 +1,348 @@
+From 3439b79cb7f97464d65316a94d40d49505fb2150 Mon Sep 17 00:00:00 2001
+From: Marek Polacek
+Date: Wed, 6 Dec 2023 15:34:24 -0500
+Subject: [PATCH] aarch64: add -fno-stack-protector to tests
+
+These tests fail when the testsuite is executed with -fstack-protector-strong.
+To avoid this, this patch adds -fno-stack-protector to dg-options.
+
+---
+ gcc/testsuite/gcc.target/aarch64/ldp_stp_unaligned_2.c | 2 +-
+ gcc/testsuite/gcc.target/aarch64/stack-check-12.c | 2 +-
+ gcc/testsuite/gcc.target/aarch64/stack-check-prologue-11.c | 2 +-
+ gcc/testsuite/gcc.target/aarch64/stack-check-prologue-12.c | 2 +-
+ gcc/testsuite/gcc.target/aarch64/stack-check-prologue-13.c | 4 ++--
+ gcc/testsuite/gcc.target/aarch64/stack-check-prologue-14.c | 4 ++--
+ gcc/testsuite/gcc.target/aarch64/stack-check-prologue-15.c | 2 +-
+ gcc/testsuite/gcc.target/aarch64/stack-check-prologue-17.c | 2 +-
+ gcc/testsuite/gcc.target/aarch64/stack-check-prologue-18.c | 2 +-
+ gcc/testsuite/gcc.target/aarch64/stack-check-prologue-2.c | 2 +-
+ gcc/testsuite/gcc.target/aarch64/stack-check-prologue-5.c | 2 +-
+ gcc/testsuite/gcc.target/aarch64/stack-check-prologue-6.c | 2 +-
+ gcc/testsuite/gcc.target/aarch64/stack-check-prologue-8.c | 2 +-
+ gcc/testsuite/gcc.target/aarch64/stack-check-prologue-9.c | 2 +-
+ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_24.c | 2 +-
+ gcc/testsuite/gcc.target/aarch64/test_frame_1.c | 2 +-
+ gcc/testsuite/gcc.target/aarch64/test_frame_10.c | 2 +-
+ gcc/testsuite/gcc.target/aarch64/test_frame_11.c | 2 +-
+ gcc/testsuite/gcc.target/aarch64/test_frame_13.c | 2 +-
+ gcc/testsuite/gcc.target/aarch64/test_frame_15.c | 2 +-
+ gcc/testsuite/gcc.target/aarch64/test_frame_2.c | 2 +-
+ gcc/testsuite/gcc.target/aarch64/test_frame_4.c | 2 +-
+ gcc/testsuite/gcc.target/aarch64/test_frame_6.c | 2 +-
+ gcc/testsuite/gcc.target/aarch64/test_frame_7.c | 2 +-
+ gcc/testsuite/gcc.target/aarch64/test_frame_8.c | 2 +-
+ 30 files changed, 32 insertions(+), 32 deletions(-)
+
+diff --git a/gcc/testsuite/gcc.target/aarch64/ldp_stp_unaligned_2.c b/gcc/testsuite/gcc.target/aarch64/ldp_stp_unaligned_2.c
+index 1e46755a39a..50d7d7a2d5d 100644
+--- a/gcc/testsuite/gcc.target/aarch64/ldp_stp_unaligned_2.c
++++ b/gcc/testsuite/gcc.target/aarch64/ldp_stp_unaligned_2.c
+@@ -1,4 +1,4 @@
+-/* { dg-options "-O2 -fomit-frame-pointer" } */
++/* { dg-options "-O2 -fomit-frame-pointer -fno-stack-protector" } */
+
+ /* Check that we split unaligned LDP/STP into base and aligned offset. */
+
+diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-12.c b/gcc/testsuite/gcc.target/aarch64/stack-check-12.c
+index be5a57a9ec6..e1a4c67b041 100644
+--- a/gcc/testsuite/gcc.target/aarch64/stack-check-12.c
++++ b/gcc/testsuite/gcc.target/aarch64/stack-check-12.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -fno-asynchronous-unwind-tables -fno-unwind-tables" } */
++/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-stack-protector" } */
+ /* { dg-require-effective-target supports_stack_clash_protection } */
+
+ typedef unsigned __attribute__((mode(DI))) uint64_t;
+diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-11.c b/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-11.c
+index 741f2f5fadc..d57aece05bb 100644
+--- a/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-11.c
++++ b/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-11.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16" } */
++/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -fno-stack-protector" } */
+ /* { dg-require-effective-target supports_stack_clash_protection } */
+
+ #define SIZE (6 * 64 * 1024) + (1 * 32 * 1024)
+diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-12.c b/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-12.c
+index ece68003ade..895d130e4fa 100644
+--- a/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-12.c
++++ b/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-12.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -fomit-frame-pointer -momit-leaf-frame-pointer" } */
++/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -fomit-frame-pointer -momit-leaf-frame-pointer -fno-stack-protector" } */
+ /* { dg-require-effective-target supports_stack_clash_protection } */
+
+ void
+diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-13.c b/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-13.c
+index 0fc900c6943..1f1a6c497be 100644
+--- a/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-13.c
++++ b/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-13.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -fomit-frame-pointer -momit-leaf-frame-pointer" } */
++/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -fomit-frame-pointer -momit-leaf-frame-pointer -fno-stack-protector" } */
+ /* { dg-require-effective-target supports_stack_clash_protection } */
+
+ void h (void) __attribute__ ((noreturn));
+@@ -17,4 +17,4 @@ f (void)
+
+ /* SIZE is more than 1 guard-size, but only one 64KB page is used, expect only 1
+ probe. Leaf function and omitting leaf pointers, tail call to noreturn which
+- may only omit an epilogue and not a prologue. Checking for LR saving. */
+\ No newline at end of file
++ may only omit an epilogue and not a prologue. Checking for LR saving. */
+diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-14.c b/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-14.c
+index ea733f861e7..facb3cb72a7 100644
+--- a/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-14.c
++++ b/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-14.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -fomit-frame-pointer -momit-leaf-frame-pointer" } */
++/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -fomit-frame-pointer -momit-leaf-frame-pointer -fno-stack-protector" } */
+ /* { dg-require-effective-target supports_stack_clash_protection } */
+
+ void h (void) __attribute__ ((noreturn));
+@@ -21,4 +21,4 @@ f (void)
+ probe at 1024 and one implicit probe due to LR being saved. Leaf function
+ and omitting leaf pointers, tail call to noreturn which may only omit an
+ epilogue and not a prologue and control flow in between. Checking for
+- LR saving. */
+\ No newline at end of file
++ LR saving. */
+diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-15.c b/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-15.c
+index 63df4a5609a..f2ac60a6214 100644
+--- a/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-15.c
++++ b/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-15.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -fomit-frame-pointer -momit-leaf-frame-pointer" } */
++/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -fomit-frame-pointer -momit-leaf-frame-pointer -fno-stack-protector" } */
+ /* { dg-require-effective-target supports_stack_clash_protection } */
+
+ void g (volatile int *x) ;
+diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-17.c b/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-17.c
+index f0ec1389771..1cf6fbbb085 100644
+--- a/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-17.c
++++ b/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-17.c
+@@ -1,4 +1,4 @@
+-/* { dg-options "-O2 -fstack-clash-protection -fomit-frame-pointer --param stack-clash-protection-guard-size=12" } */
++/* { dg-options "-O2 -fstack-clash-protection -fomit-frame-pointer --param stack-clash-protection-guard-size=12 -fno-stack-protector" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+
+ void f(int, ...);
+diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-18.c b/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-18.c
+index 6383bec5ebc..2e06346c158 100644
+--- a/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-18.c
++++ b/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-18.c
+@@ -1,4 +1,4 @@
+-/* { dg-options "-O2 -fstack-clash-protection -fomit-frame-pointer --param stack-clash-protection-guard-size=12" } */
++/* { dg-options "-O2 -fstack-clash-protection -fomit-frame-pointer --param stack-clash-protection-guard-size=12 -fno-stack-protector" } */
+ /* { dg-final { check-function-bodies "**" "" } } */
+
+ void f(int, ...);
+diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-2.c b/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-2.c
+index 61c52a251a7..b37f62cad27 100644
+--- a/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-2.c
++++ b/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-2.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16" } */
++/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -fno-stack-protector" } */
+ /* { dg-require-effective-target supports_stack_clash_protection } */
+
+ #define SIZE 2 * 1024
+diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-5.c b/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-5.c
+index 2ee16350127..34a438671d0 100644
+--- a/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-5.c
++++ b/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-5.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16" } */
++/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -fno-stack-protector" } */
+ /* { dg-require-effective-target supports_stack_clash_protection } */
+
+ #define SIZE 64 * 1024
+diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-6.c b/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-6.c
+index 3c9b606cbe0..a4e34e2fe6a 100644
+--- a/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-6.c
++++ b/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-6.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16" } */
++/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -fno-stack-protector" } */
+ /* { dg-require-effective-target supports_stack_clash_protection } */
+
+ #define SIZE 65 * 1024
+diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-8.c b/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-8.c
+index 333f5fcc360..277dce4c71e 100644
+--- a/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-8.c
++++ b/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-8.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16" } */
++/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -fno-stack-protector" } */
+ /* { dg-require-effective-target supports_stack_clash_protection } */
+
+ #define SIZE 128 * 1024
+diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-9.c b/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-9.c
+index a3ff89b5581..a21305541c1 100644
+--- a/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-9.c
++++ b/gcc/testsuite/gcc.target/aarch64/stack-check-prologue-9.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16" } */
++/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -fno-stack-protector" } */
+ /* { dg-require-effective-target supports_stack_clash_protection } */
+
+ #define SIZE 6 * 64 * 1024
+diff --git a/gcc/testsuite/gcc.target/aarch64/sve/struct_vect_24.c b/gcc/testsuite/gcc.target/aarch64/sve/struct_vect_24.c
+index 68a9d5e3d2e..19be6de0c2e 100644
+--- a/gcc/testsuite/gcc.target/aarch64/sve/struct_vect_24.c
++++ b/gcc/testsuite/gcc.target/aarch64/sve/struct_vect_24.c
+@@ -1,6 +1,6 @@
+ /* { dg-do compile } */
+ /* { dg-require-effective-target supports_stack_clash_protection } */
+-/* { dg-options "-O3 -fopenmp-simd -fstack-clash-protection --param stack-clash-protection-guard-size=16" } */
++/* { dg-options "-O3 -fopenmp-simd -fstack-clash-protection --param stack-clash-protection-guard-size=16 -fno-stack-protector" } */
+
+ #include
+
+diff --git a/gcc/testsuite/gcc.target/aarch64/test_frame_1.c b/gcc/testsuite/gcc.target/aarch64/test_frame_1.c
+index f906b073545..c9b8822b4b1 100644
+--- a/gcc/testsuite/gcc.target/aarch64/test_frame_1.c
++++ b/gcc/testsuite/gcc.target/aarch64/test_frame_1.c
+@@ -6,7 +6,7 @@
+ * optimized code should use "str !" for stack adjustment. */
+
+ /* { dg-do run } */
+-/* { dg-options "-O2 -fomit-frame-pointer --save-temps" } */
++/* { dg-options "-O2 -fomit-frame-pointer --save-temps -fno-stack-protector" } */
+
+ #include "test_frame_common.h"
+
+diff --git a/gcc/testsuite/gcc.target/aarch64/test_frame_10.c b/gcc/testsuite/gcc.target/aarch64/test_frame_10.c
+index c54ab2d0ccb..fe5cbd9ed05 100644
+--- a/gcc/testsuite/gcc.target/aarch64/test_frame_10.c
++++ b/gcc/testsuite/gcc.target/aarch64/test_frame_10.c
+@@ -7,7 +7,7 @@
+ * Use a single stack adjustment, no writeback. */
+
+ /* { dg-do run } */
+-/* { dg-options "-O2 -fomit-frame-pointer --save-temps" } */
++/* { dg-options "-O2 -fomit-frame-pointer --save-temps -fno-stack-protector" } */
+
+ #include "test_frame_common.h"
+
+diff --git a/gcc/testsuite/gcc.target/aarch64/test_frame_11.c b/gcc/testsuite/gcc.target/aarch64/test_frame_11.c
+index f162cc091e0..11cf471168d 100644
+--- a/gcc/testsuite/gcc.target/aarch64/test_frame_11.c
++++ b/gcc/testsuite/gcc.target/aarch64/test_frame_11.c
+@@ -5,7 +5,7 @@
+ * optimized code should use "stp !" for stack adjustment. */
+
+ /* { dg-do run } */
+-/* { dg-options "-O2 --save-temps" } */
++/* { dg-options "-O2 --save-temps -fno-stack-protector" } */
+
+ #include "test_frame_common.h"
+
+diff --git a/gcc/testsuite/gcc.target/aarch64/test_frame_13.c b/gcc/testsuite/gcc.target/aarch64/test_frame_13.c
+index 74b3370fa46..ec56963c038 100644
+--- a/gcc/testsuite/gcc.target/aarch64/test_frame_13.c
++++ b/gcc/testsuite/gcc.target/aarch64/test_frame_13.c
+@@ -5,7 +5,7 @@
+ * Use a single stack adjustment, no writeback. */
+
+ /* { dg-do run } */
+-/* { dg-options "-O2 --save-temps" } */
++/* { dg-options "-O2 --save-temps -fno-stack-protector" } */
+
+ #include "test_frame_common.h"
+
+diff --git a/gcc/testsuite/gcc.target/aarch64/test_frame_15.c b/gcc/testsuite/gcc.target/aarch64/test_frame_15.c
+index bed6714b4fe..4247008de8e 100644
+--- a/gcc/testsuite/gcc.target/aarch64/test_frame_15.c
++++ b/gcc/testsuite/gcc.target/aarch64/test_frame_15.c
+@@ -6,7 +6,7 @@
+ * Use a single stack adjustment, no writeback. */
+
+ /* { dg-do run } */
+-/* { dg-options "-O2 --save-temps" } */
++/* { dg-options "-O2 --save-temps -fno-stack-protector" } */
+
+ #include "test_frame_common.h"
+
+diff --git a/gcc/testsuite/gcc.target/aarch64/test_frame_2.c b/gcc/testsuite/gcc.target/aarch64/test_frame_2.c
+index 0d715314cb8..9c4243b6480 100644
+--- a/gcc/testsuite/gcc.target/aarch64/test_frame_2.c
++++ b/gcc/testsuite/gcc.target/aarch64/test_frame_2.c
+@@ -6,7 +6,7 @@
+ * optimized code should use "stp !" for stack adjustment. */
+
+ /* { dg-do run } */
+-/* { dg-options "-O2 -fomit-frame-pointer --save-temps" } */
++/* { dg-options "-O2 -fomit-frame-pointer --save-temps -fno-stack-protector" } */
+
+ #include "test_frame_common.h"
+
+diff --git a/gcc/testsuite/gcc.target/aarch64/test_frame_4.c b/gcc/testsuite/gcc.target/aarch64/test_frame_4.c
+index b41229c42f4..8d0bed93e44 100644
+--- a/gcc/testsuite/gcc.target/aarch64/test_frame_4.c
++++ b/gcc/testsuite/gcc.target/aarch64/test_frame_4.c
+@@ -6,7 +6,7 @@
+ * we can use "stp !" to optimize stack adjustment. */
+
+ /* { dg-do run } */
+-/* { dg-options "-O2 -fomit-frame-pointer --save-temps" } */
++/* { dg-options "-O2 -fomit-frame-pointer --save-temps -fno-stack-protector" } */
+
+ #include "test_frame_common.h"
+
+diff --git a/gcc/testsuite/gcc.target/aarch64/test_frame_6.c b/gcc/testsuite/gcc.target/aarch64/test_frame_6.c
+index 56259c945d2..2944a8bbe16 100644
+--- a/gcc/testsuite/gcc.target/aarch64/test_frame_6.c
++++ b/gcc/testsuite/gcc.target/aarch64/test_frame_6.c
+@@ -6,7 +6,7 @@
+ * use a single stack adjustment, no writeback. */
+
+ /* { dg-do run } */
+-/* { dg-options "-O2 -fomit-frame-pointer --save-temps" } */
++/* { dg-options "-O2 -fomit-frame-pointer --save-temps -fno-stack-protector" } */
+
+ #include "test_frame_common.h"
+
+diff --git a/gcc/testsuite/gcc.target/aarch64/test_frame_7.c b/gcc/testsuite/gcc.target/aarch64/test_frame_7.c
+index 5702656a5da..ca371632d81 100644
+--- a/gcc/testsuite/gcc.target/aarch64/test_frame_7.c
++++ b/gcc/testsuite/gcc.target/aarch64/test_frame_7.c
+@@ -6,7 +6,7 @@
+ * use a single stack adjustment, no writeback. */
+
+ /* { dg-do run } */
+-/* { dg-options "-O2 -fomit-frame-pointer --save-temps" } */
++/* { dg-options "-O2 -fomit-frame-pointer --save-temps -fno-stack-protector" } */
+
+ #include "test_frame_common.h"
+
+diff --git a/gcc/testsuite/gcc.target/aarch64/test_frame_8.c b/gcc/testsuite/gcc.target/aarch64/test_frame_8.c
+index 75a68b41e08..084e8fac373 100644
+--- a/gcc/testsuite/gcc.target/aarch64/test_frame_8.c
++++ b/gcc/testsuite/gcc.target/aarch64/test_frame_8.c
+@@ -5,7 +5,7 @@
+ * number of callee-saved reg == 1. */
+
+ /* { dg-do run } */
+-/* { dg-options "-O2 -fomit-frame-pointer --save-temps" } */
++/* { dg-options "-O2 -fomit-frame-pointer --save-temps -fno-stack-protector" } */
+
+ #include "test_frame_common.h"
+
+
+base-commit: 1bd15d87031e8bf8fe9585fbc166b315303f676c
+--
+2.43.0
+
diff --git a/SOURCES/gcc11-testsuite-fixes-3.patch b/SOURCES/gcc11-testsuite-fixes-3.patch
new file mode 100644
index 0000000..25ea3a9
--- /dev/null
+++ b/SOURCES/gcc11-testsuite-fixes-3.patch
@@ -0,0 +1,150 @@
+commit f1b1d515aa5836844cdb45e8bb2b941784f78fd2
+Author: Jakub Jelinek
+Date: Mon Apr 22 18:00:06 2024 +0200
+
+ libstdc++: Workaround kernel-headers on s390x-linux
+
+ We see
+ FAIL: 17_intro/headers/c++1998/all_attributes.cc (test for excess errors)
+ FAIL: 17_intro/headers/c++2011/all_attributes.cc (test for excess errors)
+ FAIL: 17_intro/headers/c++2014/all_attributes.cc (test for excess errors)
+ FAIL: 17_intro/headers/c++2017/all_attributes.cc (test for excess errors)
+ FAIL: 17_intro/headers/c++2020/all_attributes.cc (test for excess errors)
+ FAIL: 17_intro/names.cc -std=gnu++17 (test for excess errors)
+ on s390x-linux.
+ The first 5 are due to kernel-headers not using uglified attribute names,
+ where contains
+ __attribute__((packed, aligned(4)))
+ I've filed a downstream bugreport for this in
+ https://bugzilla.redhat.com/show_bug.cgi?id=2276084
+ (not really sure where to report kernel-headers issues upstream), while the
+ last one is due to from glibc containing:
+ #ifdef __USE_MISC
+ # define __ctx(fld) fld
+ #else
+ # define __ctx(fld) __ ## fld
+ #endif
+ ...
+ typedef union
+ {
+ double __ctx(d);
+ float __ctx(f);
+ } fpreg_t;
+ and g++ predefining -D_GNU_SOURCE which implies define __USE_MISC.
+
+ The following patch adds a workaround for this on the libstdc++ testsuite
+ side.
+
+ 2024-04-22 Jakub Jelinek
+
+ * testsuite/17_intro/names.cc (d, f): Undefine on s390*-linux*.
+ * testsuite/17_intro/headers/c++1998/all_attributes.cc (packed): Don't
+ define on s390.
+ * testsuite/17_intro/headers/c++2011/all_attributes.cc (packed):
+ Likewise.
+ * testsuite/17_intro/headers/c++2014/all_attributes.cc (packed):
+ Likewise.
+ * testsuite/17_intro/headers/c++2017/all_attributes.cc (packed):
+ Likewise.
+ * testsuite/17_intro/headers/c++2020/all_attributes.cc (packed):
+ Likewise.
+
+ (cherry picked from commit cf5f7791056b3ed993bc8024be767a86157514a9)
+
+diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc
+index 74268b6a482..658063bd0a4 100644
+--- a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc
++++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc
+@@ -29,7 +29,11 @@
+ # define noreturn 1
+ # define visibility 1
+ #endif
++#ifndef __s390__
++// kernel-headers uses __attribute__((packed,aligned(4))) on
++// S390.
+ #define packed 1
++#endif
+ #define pure 1
+ // glibc's sysdeps/unix/sysv/linux/arm/sys/ucontext.h uses this on ARM.
+ #ifndef __arm__
+diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc
+index 5d0c5fe8177..f1bcc1fbbc8 100644
+--- a/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc
++++ b/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc
+@@ -29,7 +29,11 @@
+ # define visibility 1
+ #endif
+ #define no_unique_address 1
++#ifndef __s390__
++// kernel-headers uses __attribute__((packed,aligned(4))) on
++// S390.
+ #define packed 1
++#endif
+ #define pure 1
+ // glibc's sysdeps/unix/sysv/linux/arm/sys/ucontext.h uses this on ARM.
+ #ifndef __arm__
+diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc
+index 3cac2190ec7..48e7ef64afb 100644
+--- a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc
++++ b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc
+@@ -29,7 +29,11 @@
+ # define visibility 1
+ #endif
+ #define no_unique_address 1
++#ifndef __s390__
++// kernel-headers uses __attribute__((packed,aligned(4))) on
++// S390.
+ #define packed 1
++#endif
+ #define pure 1
+ // glibc's sysdeps/unix/sysv/linux/arm/sys/ucontext.h uses this on ARM.
+ #ifndef __arm__
+diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc
+index f607532aa90..03e4e23c686 100644
+--- a/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc
++++ b/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc
+@@ -28,7 +28,11 @@
+ # define visibility 1
+ #endif
+ #define no_unique_address 1
++#ifndef __s390__
++// kernel-headers uses __attribute__((packed,aligned(4))) on
++// S390.
+ #define packed 1
++#endif
+ #define pure 1
+ // glibc's sysdeps/unix/sysv/linux/arm/sys/ucontext.h uses this on ARM.
+ #ifndef __arm__
+diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_attributes.cc
+index 5732633c7e4..7375dc88bb1 100644
+--- a/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_attributes.cc
++++ b/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_attributes.cc
+@@ -27,7 +27,11 @@
+ # define cold 1
+ # define visibility 1
+ #endif
++#ifndef __s390__
++// kernel-headers uses __attribute__((packed,aligned(4))) on
++// S390.
+ #define packed 1
++#endif
+ #define pure 1
+ // glibc's sysdeps/unix/sysv/linux/arm/sys/ucontext.h uses this on ARM.
+ #ifndef __arm__
+diff --git a/libstdc++-v3/testsuite/17_intro/names.cc b/libstdc++-v3/testsuite/17_intro/names.cc
+index eb4d064177c..864bc20f146 100644
+--- a/libstdc++-v3/testsuite/17_intro/names.cc
++++ b/libstdc++-v3/testsuite/17_intro/names.cc
+@@ -267,6 +267,12 @@
+ #undef u
+ #endif
+
++#if defined (__linux__) && defined (__s390__)
++// defines fpreg_t::d and fpreg_t::f
++#undef d
++#undef f
++#endif
++
+ #if defined (__linux__) && defined (__sparc__)
+ #undef y
+ #endif
diff --git a/SPECS/gcc.spec b/SPECS/gcc.spec
index 1d508d4..c8fed28 100644
--- a/SPECS/gcc.spec
+++ b/SPECS/gcc.spec
@@ -1,6 +1,6 @@
-%global DATE 20230605
-%global gitrev 2c7f17ca0b642790d74cca6c798196e9053a4bcf
-%global gcc_version 11.4.1
+%global DATE 20240719
+%global gitrev a985e3068a6f8045f8a6f2d2d5ae75f5eb0a8767
+%global gcc_version 11.5.0
%global gcc_major 11
# Note, gcc_release must be integer, if you want to add suffixes to
# %%{release}, append them after %%{gcc_release} on Release: line.
@@ -128,7 +128,7 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
-Release: %{gcc_release}.1%{?dist}
+Release: %{gcc_release}%{?dist}
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@@ -291,8 +291,13 @@ Patch27: gcc11-s390x-regarg-1.patch
Patch28: gcc11-s390x-regarg-2.patch
Patch29: gcc11-s390x-regarg-3.patch
Patch30: gcc11-testsuite-fixes.patch
-Patch31: gcc11-pr96024.patch
Patch32: gcc11-testsuite-fixes-2.patch
+Patch33: gcc11-testsuite-fixes-3.patch
+Patch34: gcc11-pr116034.patch
+Patch35: gcc11-testsuite-aarch64-add-fno-stack-protector.patch
+Patch36: gcc11-libgfortran-flush.patch
+Patch37: gcc11-pr113960.patch
+Patch38: gcc11-pr105157.patch
Patch100: gcc11-fortran-fdec-duplicates.patch
Patch101: gcc11-fortran-flogical-as-integer.patch
@@ -889,8 +894,13 @@ mark them as cross compiled.
%patch28 -p1 -b .s390x-regarg-2~
%patch29 -p1 -b .s390x-regarg-3~
%patch30 -p1 -b .testsuite~
-%patch31 -p1 -b .pr96024~
%patch32 -p1 -b .testsuite2~
+%patch33 -p1 -b .testsuite3~
+%patch34 -p1 -b .pr116034~
+%patch35 -p1 -b .testsuite4~
+%patch36 -p1 -b .libgfortran-flush~
+%patch37 -p1 -b .pr113960~
+%patch38 -p1 -b .pr105157~
%if 0%{?rhel} >= 9
%patch100 -p1 -b .fortran-fdec-duplicates~
@@ -3584,6 +3594,87 @@ end
%endif
%changelog
+* Mon Jul 22 2024 Marek Polacek 11.5.0-2
+- fix TARGET_CPU_DEFAULT (PR target/105157, RHEL-50037)
+- libstdc++: Workaround kernel-headers on s390x-linux (RHEL-50054)
+- fix wrong code with memcpy from _Complex (PR tree-optimization/116034)
+
+* Fri Jul 19 2024 Marek Polacek 11.5.0-1
+- update from releases/gcc-11 branch (RHEL-35635)
+ - GCC 11.5 release
+ - PRs ada/113893, ada/113979, analyzer/104042, c/113262, c/114007, c/114493,
+ c++/89224, c++/92145, c++/92407, c++/97990, c++/99710, c++/100667,
+ c++/100772, c++/101765, c++/103185, c++/104051, c++/111485,
+ c++/111529, c++/113598, c++/113674, c++/114537, c++/114561,
+ c++/114562, c++/114572, c++/114634, c++/114691, d/113125, d/113758,
+ d/114171, debug/111080, debug/112718, driver/115440, fortran/50410,
+ fortran/103715, fortran/104908, fortran/107426, fortran/114474,
+ fortran/114825, gcov-profile/114115, libfortran/110651,
+ libgomp/113192, libquadmath/114533, libstdc++/104259,
+ libstdc++/104606, libstdc++/105417, libstdc++/110054,
+ libstdc++/113250, libstdc++/114147, libstdc++/114401,
+ libstdc++/114750, libstdc++/114803, libstdc++/115269,
+ libstdc++/115454, libstdc++/115575, middle-end/90348,
+ middle-end/95351, middle-end/107385, middle-end/108789,
+ middle-end/110027, middle-end/110115, middle-end/110176,
+ middle-end/111422, middle-end/111632, middle-end/112732,
+ middle-end/113907, middle-end/113921, middle-end/114599,
+ middle-end/114734, middle-end/114753, middle-end/115527,
+ middle-end/115836, objc/101666, objc/101718, preprocessor/105608,
+ rtl-optimization/100303, rtl-optimization/108086,
+ rtl-optimization/110079, rtl-optimization/114768,
+ rtl-optimization/114902, rtl-optimization/115092, sanitizer/97696,
+ sanitizer/111736, sanitizer/114956, sanitizer/115172, target/88309,
+ target/101737, target/101865, target/105522, target/108120,
+ target/108743, target/110411, target/111610, target/111677,
+ target/112397, target/113122, target/113281, target/114049,
+ target/114098, target/114130, target/114184, target/114310,
+ target/114837, target/114846, target/115253, target/115297,
+ target/115360, target/115457, target/115475, target/115611,
+ target/115691, testsuite/113175, testsuite/114034, testsuite/114036,
+ tree-optimization/110386, tree-optimization/110422,
+ tree-optimization/111039, tree-optimization/111070,
+ tree-optimization/111331, tree-optimization/111407,
+ tree-optimization/111445, tree-optimization/111736,
+ tree-optimization/112495, tree-optimization/112505,
+ tree-optimization/112793, tree-optimization/113372,
+ tree-optimization/113552, tree-optimization/113603,
+ tree-optimization/114027, tree-optimization/114115,
+ tree-optimization/114566, tree-optimization/114876,
+ tree-optimization/115192, tree-optimization/115337,
+ tree-optimization/115843
+- fix FLUSH IOSTAT value (PR libfortran/101255, RHEL-32536)
+- fix conditions for using memcmp in
+ std::lexicographical_compare_three_way (PR libstdc++/113960)
+
+* Mon Dec 18 2023 Marek Polacek 11.4.1-3
+- update from releases/gcc-11-branch (RHEL-17638)
+ - PRs c++/106310, c++/106890, c++/109666, c++/109761, c++/111357,
+ c++/111512, c++/112795, d/108842, d/110359, d/110511, d/110516,
+ debug/110295, fortran/95947, fortran/103506, fortran/107397,
+ fortran/110288, fortran/110585, fortran/110658, fortran/111837,
+ fortran/111880, libstdc++/95048, libstdc++/99327, libstdc++/104161,
+ libstdc++/104242, libstdc++/108178, libstdc++/111050,
+ libstdc++/111511, libstdc++/112314, libstdc++/112491,
+ middle-end/110200, middle-end/111699, middle-end/111818,
+ middle-end/112733, rtl-optimization/110237, sanitizer/112727,
+ target/96762, target/101177, target/101469, target/105325,
+ target/109800, target/109932, target/110011, target/110044,
+ target/110170, target/110309, target/110741, target/111001,
+ target/111340, target/111367, target/111408, target/111815,
+ target/112672, target/112816, target/112837, target/112845,
+ target/112891, testsuite/66005, tree-optimization/110298,
+ tree-optimization/110731, tree-optimization/110914,
+ tree-optimization/111015, tree-optimization/111614,
+ tree-optimization/111764, tree-optimization/111917
+- use -fno-stack-protector in some aarch64 tests
+
+* Tue Oct 3 2023 Marek Polacek 11.4.1-2.3
+- fix member vs global template (RHEL-2607)
+
+* Mon Oct 2 2023 Marek Polacek 11.4.1-2.2
+- guard the bit test merging code in if-combine (RHEL-6068)
+
* Fri Jun 9 2023 Marek Polacek 11.4.1-2.1
- fix ICE on pr96024.f90 on big-endian hosts (PR fortran/96024, #2213211)
- use -fno-stack-protector to fix bit-field aarch64 tests (#2213221)