From 39ca35621bf82c2c8e7bb45663c8d0da9d1fb390 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Thu, 25 Jul 2024 12:31:42 -0400 Subject: [PATCH] 11.5.0-2 Apply gcc11-testsuite-fixes-4.patch Resolves: RHEL-50054 --- gcc.spec | 2 ++ gcc11-testsuite-fixes-4.patch | 38 +++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 gcc11-testsuite-fixes-4.patch diff --git a/gcc.spec b/gcc.spec index c8fed28..909e6ef 100644 --- a/gcc.spec +++ b/gcc.spec @@ -298,6 +298,7 @@ Patch35: gcc11-testsuite-aarch64-add-fno-stack-protector.patch Patch36: gcc11-libgfortran-flush.patch Patch37: gcc11-pr113960.patch Patch38: gcc11-pr105157.patch +Patch39: gcc11-testsuite-fixes-4.patch Patch100: gcc11-fortran-fdec-duplicates.patch Patch101: gcc11-fortran-flogical-as-integer.patch @@ -901,6 +902,7 @@ mark them as cross compiled. %patch36 -p1 -b .libgfortran-flush~ %patch37 -p1 -b .pr113960~ %patch38 -p1 -b .pr105157~ +%patch39 -p1 -b .testsuite4~ %if 0%{?rhel} >= 9 %patch100 -p1 -b .fortran-fdec-duplicates~ diff --git a/gcc11-testsuite-fixes-4.patch b/gcc11-testsuite-fixes-4.patch new file mode 100644 index 0000000..cab2e7e --- /dev/null +++ b/gcc11-testsuite-fixes-4.patch @@ -0,0 +1,38 @@ +commit 181f40f5cf8510a16191e4768dadbe2cb7a5c095 +Author: Jakub Jelinek +Date: Wed Jul 24 18:00:05 2024 +0200 + + testsuite: Fix up pr116034.c test for big/pdp endian [PR116061] + + Didn't notice the memmove is into an int variable, so the test + was still failing on big endian. + + 2024-07-24 Jakub Jelinek + + PR tree-optimization/116034 + PR testsuite/116061 + * gcc.dg/pr116034.c (g): Change type from int to unsigned short. + (foo): Guard memmove call on __SIZEOF_SHORT__ == 2. + + (cherry picked from commit 69e69847e21a8d951ab5f09fd3421449564dba31) + +diff --git a/gcc/testsuite/gcc.dg/pr116034.c b/gcc/testsuite/gcc.dg/pr116034.c +index 9a31de03424..955b4c9e86b 100644 +--- a/gcc/testsuite/gcc.dg/pr116034.c ++++ b/gcc/testsuite/gcc.dg/pr116034.c +@@ -2,12 +2,13 @@ + /* { dg-do run } */ + /* { dg-options "-O1 -fno-strict-aliasing" } */ + +-int g; ++unsigned short int g; + + static inline int + foo (_Complex unsigned short c) + { +- __builtin_memmove (&g, 1 + (char *) &c, 2); ++ if (__SIZEOF_SHORT__ == 2) ++ __builtin_memmove (&g, 1 + (char *) &c, 2); + return g; + } +