Compare commits

..

No commits in common. "rawhide" and "f40" have entirely different histories.

22 changed files with 866 additions and 911 deletions

55
.gitignore vendored
View file

@ -1,32 +1,27 @@
/gcc-14.0.1-20240113.tar.xz
/isl-0.24.tar.bz2
/newlib-cygwin-5f15d7c5817b07a6b18cbab17342c95cb7b42be4.tar.xz
/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6.tar.xz
/gcc-14.0.1-20240118.tar.xz
/newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed.tar.xz
/gcc-14.0.1-20240125.tar.xz
/gcc-14.0.1-20240127.tar.xz
/gcc-14.0.1-20240207.tar.xz
/gcc-14.0.1-20240208.tar.xz
/gcc-14.0.1-20240217.tar.xz
/gcc-14.0.1-20240228.tar.xz
/gcc-14.0.1-20240316.tar.xz
/gcc-14.0.1-20240328.tar.xz
/gcc-14.0.1-20240410.tar.xz
/gcc-14.0.1-20240411.tar.xz
/gcc-14.0.1-20240430.tar.xz
/nvptx-tools-9962793f41e016318dc5eca07ae602041cf526ff.tar.xz
/gcc-14.1.1-20240508.tar.xz
/gcc-14.1.1-20240522.tar.xz
/gcc-14.1.1-20240607.tar.xz
/nvptx-tools-87ce9dc5999e5fca2e1d3478a30888d9864c9804.tar.xz
/newlib-cygwin-2e4db338ac125579d555aeee516e48588a628a16.tar.xz
/gcc-15.0.1-20250201.tar.xz
/gcc-15.0.1-20250204.tar.xz
/gcc-15.0.1-20250225.tar.xz
/gcc-15.0.1-20250301.tar.xz
/gcc-15.0.1-20250313.tar.xz
/gcc-15.0.1-20250329.tar.xz
/gcc-15.0.1-20250410.tar.xz
/newlib-cygwin-d35cc82b5ec15bb8a5fe0fe11e183d1887992e99.tar.xz
/gcc-15.0.1-20250417.tar.xz
/gcc-15.0.1-20250418.tar.xz
/gcc-15.1.1-20250425.tar.xz
/gcc-15.1.1-20250521.tar.xz
/gcc-15.1.1-20250707.tar.xz
/gcc-15.1.1-20250718.tar.xz
/gcc-15.1.1-20250719.tar.xz
/gcc-15.2.1-20250808.tar.xz
/nvptx-tools-a0c1fff6534a4df9fb17937c3c4a4b1071212029.tar.xz
/gcc-15.2.1-20250924.tar.xz
/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
/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
/gcc-16.0.1-20260113.tar.xz
/gcc-16.0.1-20260115.tar.xz
/gcc-14.1.1-20240620.tar.xz
/gcc-14.1.1-20240701.tar.xz
/gcc-14.2.1-20240801.tar.xz
/gcc-14.2.1-20240905.tar.xz
/gcc-14.2.1-20240912.tar.xz

1227
gcc.spec

File diff suppressed because it is too large Load diff

View file

@ -9,15 +9,15 @@
* configure: Regenerated.
--- gcc/configure.ac.jj 2017-02-13 12:20:53.000000000 +0100
+++ gcc/configure.ac 2024-11-30 13:34:11.100296256 +0100
@@ -592,7 +592,7 @@ AC_ARG_ENABLE(build-format-warnings,
+++ gcc/configure.ac 2017-02-25 12:42:32.859175403 +0100
@@ -570,7 +570,7 @@ AC_ARG_ENABLE(build-format-warnings,
AS_HELP_STRING([--disable-build-format-warnings],[don't use -Wformat while building GCC]),
[],[enable_build_format_warnings=yes])
AS_IF([test $enable_build_format_warnings = no],
- [wf_opt=-Wno-format],[wf_opt=])
+ [wf_opt="-Wno-format -Wno-format-security"],[wf_opt=])
ACX_PROG_CXX_WARNING_OPTS(
m4_quote(m4_do([-W -Wall -Wno-error=narrowing -Wwrite-strings ],
m4_quote(m4_do([-W -Wall -Wno-narrowing -Wwrite-strings ],
[-Wcast-qual $wf_opt])),
--- gcc/configure.jj 2017-02-13 12:20:52.000000000 +0100
+++ gcc/configure 2017-02-25 12:42:50.041946391 +0100
@ -31,36 +31,32 @@
wf_opt=
fi
--- Makefile.tpl.jj 2023-11-29 13:21:41.680292662 +0100
+++ Makefile.tpl 2024-11-30 13:35:29.303196246 +0100
@@ -450,10 +450,10 @@ LDFLAGS = @LDFLAGS@
+++ Makefile.tpl 2023-11-29 13:23:24.677839321 +0100
@@ -448,9 +448,9 @@ LDFLAGS = @LDFLAGS@
LIBCFLAGS = $(CFLAGS)
CXXFLAGS = @CXXFLAGS@
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
-GOCFLAGS = $(CFLAGS)
-A68FLAGS = @A68FLAGS@
-GDCFLAGS = @GDCFLAGS@
-GM2FLAGS = $(CFLAGS)
+GOCFLAGS = $(filter-out -Wformat-security,$(CFLAGS))
+A68FLAGS = $(filter-out -Wformat-security,@A68FLAGS@)
+GDCFLAGS = $(filter-out -Wformat-security,@GDCFLAGS@)
+GM2FLAGS = $(filter-out -Wformat-security,$(CFLAGS))
CRAB1_LIBS = @CRAB1_LIBS@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
--- Makefile.in.jj 2023-11-29 13:21:41.691292507 +0100
+++ Makefile.in 2024-11-30 13:36:12.113594079 +0100
@@ -447,10 +447,10 @@ LDFLAGS = @LDFLAGS@
+++ Makefile.in 2023-11-29 13:24:01.254323180 +0100
@@ -445,9 +445,9 @@ LDFLAGS = @LDFLAGS@
LIBCFLAGS = $(CFLAGS)
CXXFLAGS = @CXXFLAGS@
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
-GOCFLAGS = $(CFLAGS)
-A68FLAGS = @A68FLAGS@
-GDCFLAGS = @GDCFLAGS@
-GM2FLAGS = $(CFLAGS)
+GOCFLAGS = $(filter-out -Wformat-security,$(CFLAGS))
+A68FLAGS = $(filter-out -Wformat-security,@A68FLAGS@)
+GDCFLAGS = $(filter-out -Wformat-security,@GDCFLAGS@)
+GM2FLAGS = $(filter-out -Wformat-security,$(CFLAGS))
CRAB1_LIBS = @CRAB1_LIBS@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@

View file

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

View file

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

View file

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

View file

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

View file

@ -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 \

76
gcc14-pr101523.patch Normal file
View file

@ -0,0 +1,76 @@
Based on Richi's patch:
<https://gcc.gnu.org/pipermail/gcc-patches/2024-April/648725.html>
~~
The following avoids re-walking and re-combining the instructions
between i2 and i3 when the pattern of i2 doesn't change.
Bootstrap and regtest running ontop of a reversal of
r14-9692-g839bc42772ba7a.
It brings down memory use from 9GB to 400MB and compile-time from
80s to 3.5s. r14-9692-g839bc42772ba7a does better in both metrics
but has shown code generation regressions across architectures.
PR rtl-optimization/101523
* combine.cc (try_combine): When the pattern of i2 doesn't
change do not re-start combining at i2 or an earlier insn which
had links or notes added.
~~
But, since the patch affects code generation (for instance,
libstdc++-v3/src/c++17/floating_from_chars.o), we limit the bailing out
only when I2 hasn't been changed 1000x. I've measured how many times
at most is I2 unchanged during a bootstrap + regtest.
x86: 134
aarch64: 736 (gimple-match-1.cc)
s390x: 635 (gimple-match-*)
ppc64le: 620 (gimple-match-*)
while certain pathological testcases trigger it more than 10,000 times.
With the limit in place this patch doesn't affect common code.
--- a/gcc/combine.cc
+++ b/gcc/combine.cc
@@ -92,6 +92,11 @@ along with GCC; see the file COPYING3. If not see
#include "function-abi.h"
#include "rtlanal.h"
+/* Number of times I2 didn't change in try_combine. Used to prevent a
+ combinatorial explosion. */
+
+static int combine_i2_unchanged;
+
/* Number of attempts to combine instructions in this function. */
static int combine_attempts;
@@ -1127,6 +1132,7 @@ combine_instructions (rtx_insn *f, unsigned int nregs)
return false;
combine_attempts = 0;
+ combine_i2_unchanged = 0;
combine_merges = 0;
combine_extras = 0;
combine_successes = 0;
@@ -4196,6 +4201,10 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0,
adjust_for_new_dest (i3);
}
+ bool i2_i2_unchanged = false;
+ if (rtx_equal_p (newi2pat, PATTERN (i2)))
+ i2_i2_unchanged = true;
+
/* We now know that we can do this combination. Merge the insns and
update the status of registers and LOG_LINKS. */
@@ -4762,6 +4771,13 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0,
combine_successes++;
undo_commit ();
+ if (i2_i2_unchanged)
+ {
+ if (combine_i2_unchanged == 1000)
+ return i3;
+ ++combine_i2_unchanged;
+ }
+
rtx_insn *ret = newi2pat ? i2 : i3;
if (added_links_insn && DF_INSN_LUID (added_links_insn) < DF_INSN_LUID (ret))
ret = added_links_insn;

100
gcc14-pr116621.patch Normal file
View file

@ -0,0 +1,100 @@
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Sep 6 05:24:07 2024 -0700
x86-64: Don't use temp for argument in a TImode register
Don't use temp for a PARALLEL BLKmode argument of an EXPR_LIST expression
in a TImode register. Otherwise, the TImode variable will be put in
the GPR save area which guarantees only 8-byte alignment.
PR target/116621
* config/i386/i386.cc (ix86_gimplify_va_arg): Don't use temp for
a PARALLEL BLKmode container of an EXPR_LIST expression in a
TImode register.
* gcc.target/i386/pr116621.c: New test.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
--- gcc/config/i386/i386.cc
+++ gcc/config/i386/i386.cc
@@ -4908,13 +4908,31 @@ ix86_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p,
examine_argument (nat_mode, type, 0, &needed_intregs, &needed_sseregs);
- need_temp = (!REG_P (container)
+ bool container_in_reg = false;
+ if (REG_P (container))
+ container_in_reg = true;
+ else if (GET_CODE (container) == PARALLEL
+ && GET_MODE (container) == BLKmode
+ && XVECLEN (container, 0) == 1)
+ {
+ /* Check if it is a PARALLEL BLKmode container of an EXPR_LIST
+ expression in a TImode register. In this case, temp isn't
+ needed. Otherwise, the TImode variable will be put in the
+ GPR save area which guarantees only 8-byte alignment. */
+ rtx x = XVECEXP (container, 0, 0);
+ if (GET_CODE (x) == EXPR_LIST
+ && REG_P (XEXP (x, 0))
+ && XEXP (x, 1) == const0_rtx)
+ container_in_reg = true;
+ }
+
+ need_temp = (!container_in_reg
&& ((needed_intregs && TYPE_ALIGN (type) > 64)
|| TYPE_ALIGN (type) > 128));
/* In case we are passing structure, verify that it is consecutive block
on the register save area. If not we need to do moves. */
- if (!need_temp && !REG_P (container))
+ if (!need_temp && !container_in_reg)
{
/* Verify that all registers are strictly consecutive */
if (SSE_REGNO_P (REGNO (XEXP (XVECEXP (container, 0, 0), 0))))
--- gcc/testsuite/gcc.target/i386/pr116621.c
+++ gcc/testsuite/gcc.target/i386/pr116621.c
@@ -0,0 +1,43 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+#include <stdarg.h>
+#include <string.h>
+
+union S8302
+{
+ union
+ {
+ double b;
+ int c;
+ } a;
+ long double d;
+ unsigned short int f[5];
+};
+
+union S8302 s8302;
+extern void check8302va (int i, ...);
+
+int
+main (void)
+{
+ memset (&s8302, '\0', sizeof (s8302));
+ s8302.a.b = -221438.250000;
+ check8302va (1, s8302);
+ return 0;
+}
+
+__attribute__((noinline, noclone))
+void
+check8302va (int z, ...)
+{
+ union S8302 arg, *p;
+ va_list ap;
+
+ __builtin_va_start (ap, z);
+ p = &s8302;
+ arg = __builtin_va_arg (ap, union S8302);
+ if (p->a.b != arg.a.b)
+ __builtin_abort ();
+ __builtin_va_end (ap);
+}

View file

@ -1,76 +0,0 @@
2025-02-27 Jakub Jelinek <jakub@redhat.com>
PR ipa/119006
* ipa-icf-gimple.cc (func_checker::compare_operand): If t1 and t2
are ADDR_EXPRs, call operand_equal_p on their operands rather than on
the ADDR_EXPRs themselves. Formatting fix.
* g++.dg/opt/pr119006.C: New test.
--- gcc/ipa-icf-gimple.cc.jj 2025-02-01 00:50:02.080774328 +0100
+++ gcc/ipa-icf-gimple.cc 2025-02-27 14:35:19.931183246 +0100
@@ -437,12 +437,23 @@ func_checker::compare_operand (tree t1,
("compare_ao_refs failed (dependence clique difference)");
gcc_unreachable ();
}
+ else if (TREE_CODE (t1) == ADDR_EXPR && TREE_CODE (t2) == ADDR_EXPR)
+ {
+ /* For ADDR_EXPR compare the operands of the ADDR_EXPR rather than
+ the ADDR_EXPRs themselves. operand_equal_p will compare the
+ operands with OEP_ADDRESS_OF and only care about the value
+ of the ADDR_EXPR, rather than e.g. types of MEM_REFs in there.
+ Some optimizations use such details though, see PR119006. */
+ if (operand_equal_p (TREE_OPERAND (t1, 0), TREE_OPERAND (t2, 0),
+ OEP_MATCH_SIDE_EFFECTS))
+ return true;
+ return return_false_with_msg ("operand_equal_p failed");
+ }
else
{
if (operand_equal_p (t1, t2, OEP_MATCH_SIDE_EFFECTS))
return true;
- return return_false_with_msg
- ("operand_equal_p failed");
+ return return_false_with_msg ("operand_equal_p failed");
}
}
--- gcc/testsuite/g++.dg/opt/pr119006.C.jj 2025-02-27 14:37:05.952707350 +0100
+++ gcc/testsuite/g++.dg/opt/pr119006.C 2025-02-27 14:36:29.251218260 +0100
@@ -0,0 +1,36 @@
+// PR ipa/119006
+// { dg-do run { target c++11 } }
+// { dg-options "-O2 -fwhole-program" }
+
+struct A {
+ bool operator== (const char *x) const { return x && !__builtin_strcmp (a, x); }
+ char a[11];
+};
+
+struct B {
+ bool operator== (const char *x) const { return x && !__builtin_strcmp (a, x); }
+ bool operator!= (const char *x) const { return !(*this == x); }
+ char a[128];
+};
+
+[[gnu::noinline,gnu::used]] int
+foo (const A& lhs, const char* rhs)
+{
+ return lhs == rhs;
+}
+
+constexpr const char *t = "abcdefghijklmno";
+
+[[gnu::noinline,gnu::used]] void
+bar (B x)
+{
+ if (x != t) __builtin_abort ();
+}
+
+int
+main ()
+{
+ B b;
+ __builtin_strcpy (b.a, t);
+ bar (b);
+}

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,7 +1,7 @@
summary: CI Gating Plan
discover:
how: fmf
url: https://gitlab.com/redhat/centos-stream/tests/gcc.git
url: https://src.fedoraproject.org/tests/gcc.git
filter: 'tag: Fedora-CI-gating'
execute:
how: tmt

View file

@ -1,37 +0,0 @@
inspections:
# GCC subpackages are inter-dependent but without requesting an explicit
# version - which rpmdeps dislikes and creates huge reports. We can't fix
# it easily and it's not a practical problem anyway. Unfortunately we
# can't tell rpmdeps to ignore just that particular warning. Switching off
# the rpmdeps checks looks like a lesser evil.
rpmdeps: off
badfuncs:
# GCC doesn't use the so called bad functions "much". If they appear then
# - it is instrumenting them in sanitizers
# - in languages that don't move further downstream.
# We are OK with that.
ignore:
- /usr/lib*/libasan.so.*.*.*
- /usr/lib*/libtsan.so.*.*.*
- /usr/lib*/libgnat-*.so
- /usr/lib*/libgphobos.so.*.*.*
- /usr/lib*/libm2iso.so.*.*.*
- /usr/lib*/libm2pim.so.*.*.*
pathmigration:
# Incomplete UsrMove, known but not planned at the moment
ignore:
- /lib*/libgcc_s-*.so.*
- /lib*/libgcc_s.so.*
debuginfo:
# Skip the Go binaries, they ship unstripped
ignore:
- /usr/bin/go.gcc
- /usr/bin/gofmt.gcc
- /usr/lib*/libgo.so.*.*.*
- /usr/libexec/gcc/*-redhat-linux/*/buildid
- /usr/libexec/gcc/*-redhat-linux/*/cgo
- /usr/libexec/gcc/*-redhat-linux/*/test2json
- /usr/libexec/gcc/*-redhat-linux/*/vet

View file

@ -1,4 +1,4 @@
SHA512 (gcc-16.0.1-20260115.tar.xz) = 51ab079dedde5547caba601ce03954d4c5b2bf687538f106d3e851a8918162017fe65817d9e22fd115cf4d4f970bfba6a70a34db183141ce28c5c203a68eec0b
SHA512 (gcc-14.2.1-20240912.tar.xz) = 9a36fd5c2211f348bf18e887861c9123745bfa40837a5f92b1cd0ee0820edb7ef59094caac06870f00ef0d0305f674a5c23cc5aec940132cf581cd18c0368bb2
SHA512 (isl-0.24.tar.bz2) = aab3bddbda96b801d0f56d2869f943157aad52a6f6e6a61745edd740234c635c38231af20bc3f1a08d416a5e973a90e18249078ed8e4ae2f1d5de57658738e95
SHA512 (newlib-cygwin-d35cc82b5ec15bb8a5fe0fe11e183d1887992e99.tar.xz) = ef9495745a96d1d76f9f425c4a48c807fface36a1aa92351c5d024103678d144d046e8de55d195103784472c14874e29e4b9284d5d6a2e7bb27fd98c8455a881
SHA512 (nvptx-tools-a0c1fff6534a4df9fb17937c3c4a4b1071212029.tar.xz) = 7f862986065028df70c843fc3f2c89e200a76b48ad0bd51c749ac8a5aab7be0ebdf35be182fad2407b3281615e75be1ac6833ab6a5130ae9920169a0412f94f0
SHA512 (newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed.tar.xz) = 31bfc19429797236e268e22b752c5abeabb9c0f39b1058634af8dab329b4f028fc72a35888193c9575f6cee5cf2c069669d79fcb4d4e3a4318f57413452f707d
SHA512 (nvptx-tools-87ce9dc5999e5fca2e1d3478a30888d9864c9804.tar.xz) = 941e763af8601b89f0e4ec48a2d68ae0a8e70ee1e6ba6859394b021ad7bd7d143cc529f3c35c08d7f84e5554980ddcc97cf05b6c4755c2bc36c91161b79e8cea

View file

@ -10,9 +10,9 @@ v=`sed -n 's/^%global gcc_version //p' gcc.spec`
p=`sed -n 's/^%global gitrev //p' gcc.spec`
h=$1
if [ "$#" -ge 2 ]; then
git clone --dissociate --reference $2 https://gcc.gnu.org/git/gcc.git gcc-dir.tmp
git clone --dissociate --reference $2 git://gcc.gnu.org/git/gcc.git gcc-dir.tmp
else
git clone https://gcc.gnu.org/git/gcc.git gcc-dir.tmp
git clone git://gcc.gnu.org/git/gcc.git gcc-dir.tmp
fi
git --git-dir=gcc-dir.tmp/.git fetch origin $h
d=`date --iso | sed 's/-//g'`