diff --git a/gcc.spec b/gcc.spec index 057c607..02cef41 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,5 +1,5 @@ -%global DATE 20230102 -%global gitrev 03416d670d42ba9bb15caa682778b63ffffdeb92 +%global DATE 20230106 +%global gitrev c6c750faf80327e73b3001de89080943a2ee71f6 %global gcc_version 13.0.0 %global gcc_major 13 # Note, gcc_release must be integer, if you want to add suffixes to @@ -136,7 +136,7 @@ Summary: Various compilers (C, C++, Objective-C, ...) Name: gcc Version: %{gcc_version} -Release: %{gcc_release}.5%{?dist} +Release: %{gcc_release}.6%{?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 @@ -286,8 +286,8 @@ Patch8: gcc13-no-add-needed.patch Patch9: gcc13-Wno-format-security.patch Patch10: gcc13-rh1574936.patch Patch11: gcc13-d-shared-libphobos.patch -Patch12: gcc13-pr108263.patch -Patch13: gcc13-pr108264.patch +Patch12: gcc13-pr107453.patch +Patch13: gcc13-pr108047.patch Patch50: isl-rh2155127.patch @@ -860,8 +860,8 @@ so that there cannot be any synchronization problems. %patch10 -p0 -b .rh1574936~ %endif %patch11 -p0 -b .d-shared-libphobos~ -%patch12 -p0 -b .pr108263~ -%patch13 -p0 -b .pr108264~ +%patch12 -p0 -b .pr107453~ +%patch13 -p0 -b .pr108047~ %patch50 -p0 -b .rh2155127~ touch -r isl-0.24/m4/ax_prog_cxx_for_build.m4 isl-0.24/m4/ax_prog_cc_for_build.m4 @@ -3450,5 +3450,5 @@ end %endif %changelog -* Mon Jan 2 2023 Jakub Jelinek 13.0.0-0.5 +* Fri Jan 6 2023 Jakub Jelinek 13.0.0-0.6 - new package diff --git a/gcc13-pr107453.patch b/gcc13-pr107453.patch new file mode 100644 index 0000000..6461f1d --- /dev/null +++ b/gcc13-pr107453.patch @@ -0,0 +1,38 @@ +2023-01-06 Jakub Jelinek + + PR target/107453 + * calls.cc (expand_call): For calls with + TYPE_NO_NAMED_ARGS_STDARG_P (funtype) use zero for n_named_args. + Formatting fix. + +--- gcc/calls.cc.jj 2023-01-02 09:32:28.834192105 +0100 ++++ gcc/calls.cc 2023-01-06 14:52:14.740594896 +0100 +@@ -2908,8 +2908,8 @@ expand_call (tree exp, rtx target, int i + } + + /* Count the arguments and set NUM_ACTUALS. */ +- num_actuals = +- call_expr_nargs (exp) + num_complex_actuals + structure_value_addr_parm; ++ num_actuals ++ = call_expr_nargs (exp) + num_complex_actuals + structure_value_addr_parm; + + /* Compute number of named args. + First, do a raw count of the args for INIT_CUMULATIVE_ARGS. */ +@@ -2919,6 +2919,8 @@ expand_call (tree exp, rtx target, int i + = (list_length (type_arg_types) + /* Count the struct value address, if it is passed as a parm. */ + + structure_value_addr_parm); ++ else if (TYPE_NO_NAMED_ARGS_STDARG_P (funtype)) ++ n_named_args = 0; + else + /* If we know nothing, treat all args as named. */ + n_named_args = num_actuals; +@@ -2957,6 +2959,8 @@ expand_call (tree exp, rtx target, int i + && ! targetm.calls.pretend_outgoing_varargs_named (args_so_far)) + /* Don't include the last named arg. */ + --n_named_args; ++ else if (TYPE_NO_NAMED_ARGS_STDARG_P (funtype)) ++ n_named_args = 0; + else + /* Treat all args as named. */ + n_named_args = num_actuals; diff --git a/gcc13-pr108047.patch b/gcc13-pr108047.patch new file mode 100644 index 0000000..cb4b8d1 --- /dev/null +++ b/gcc13-pr108047.patch @@ -0,0 +1,81 @@ +2023-01-06 Jakub Jelinek + + PR c++/105838 + PR c++/108047 + PR c++/108266 + * call.cc (maybe_init_list_as_range): Always return NULL_TREE if + processing_template_decl. + + * g++.dg/tree-ssa/initlist-opt2.C: New test. + * g++.dg/tree-ssa/initlist-opt3.C: New test. + +--- gcc/cp/call.cc.jj 2022-12-15 09:24:44.265935297 +0100 ++++ gcc/cp/call.cc 2023-01-06 11:24:44.837270905 +0100 +@@ -4285,7 +4285,8 @@ maybe_init_list_as_array (tree elttype, + static tree + maybe_init_list_as_range (tree fn, tree expr) + { +- if (BRACE_ENCLOSED_INITIALIZER_P (expr) ++ if (!processing_template_decl ++ && BRACE_ENCLOSED_INITIALIZER_P (expr) + && is_list_ctor (fn) + && decl_in_std_namespace_p (fn)) + { +--- gcc/testsuite/g++.dg/tree-ssa/initlist-opt2.C.jj 2023-01-06 11:53:13.160432870 +0100 ++++ gcc/testsuite/g++.dg/tree-ssa/initlist-opt2.C 2023-01-06 11:53:44.561976302 +0100 +@@ -0,0 +1,31 @@ ++// PR c++/105838 ++// { dg-additional-options -fdump-tree-gimple } ++// { dg-do compile { target c++11 } } ++ ++// Test that we do range-initialization from const char *. ++// { dg-final { scan-tree-dump {_M_range_initialize} "gimple" } } ++ ++#include ++#include ++ ++void g (const void *); ++ ++template ++void f (const char *p) ++{ ++ std::vector lst = { ++ "aahing", "aaliis", "aarrgh", "abacas", "abacus", "abakas", "abamps", "abands", "abased", "abaser", "abases", "abasia", ++ "abated", "abater", "abates", "abatis", "abator", "abattu", "abayas", "abbacy", "abbess", "abbeys", "abbots", "abcees", ++ "abdabs", "abduce", "abduct", "abears", "abeigh", "abeles", "abelia", "abends", "abhors", "abided", "abider", "abides", ++ "abject", "abjure", "ablate", "ablaut", "ablaze", "ablest", "ablets", "abling", "ablins", "abloom", "ablush", "abmhos", ++ "aboard", "aboded", "abodes", "abohms", "abolla", "abomas", "aboral", "abords", "aborne", "aborts", "abound", "abouts", ++ "aboves", "abrade", "abraid", "abrash", "abrays", "abrazo", "abrege", "abrins", "abroad", "abrupt", "abseil", "absent", ++ }; ++ ++ g(&lst); ++} ++ ++void h (const char *p) ++{ ++ f<0> (p); ++} +--- gcc/testsuite/g++.dg/tree-ssa/initlist-opt3.C.jj 2023-01-06 11:56:36.981469370 +0100 ++++ gcc/testsuite/g++.dg/tree-ssa/initlist-opt3.C 2023-01-06 11:56:09.984861898 +0100 +@@ -0,0 +1,21 @@ ++// PR c++/108266 ++// { dg-do compile { target c++11 } } ++ ++#include ++#include ++ ++struct S { S (const char *); }; ++void bar (std::vector); ++ ++template ++void ++foo () ++{ ++ bar ({"", ""}); ++} ++ ++void ++baz () ++{ ++ foo<0> (); ++} diff --git a/gcc13-pr108263.patch b/gcc13-pr108263.patch deleted file mode 100644 index efbac3e..0000000 --- a/gcc13-pr108263.patch +++ /dev/null @@ -1,67 +0,0 @@ -2023-01-02 Jakub Jelinek - - PR rtl-optimization/108263 - * cfgrtl.cc (fixup_reorder_chain): Avoid trying to redirect - asm goto to EXIT. - - * gcc.dg/pr108263.c: New test. - ---- gcc/cfgrtl.cc.jj 2023-01-02 09:32:32.000000000 +0100 -+++ gcc/cfgrtl.cc 2023-01-02 14:13:40.658338194 +0100 -@@ -3910,6 +3910,7 @@ fixup_reorder_chain (void) - rtx ret_label = NULL_RTX; - basic_block nb; - edge_iterator ei; -+ bool asm_goto = false; - - if (EDGE_COUNT (bb->succs) == 0) - continue; -@@ -4016,7 +4017,9 @@ fixup_reorder_chain (void) - || e_fall->dest == EXIT_BLOCK_PTR_FOR_FN (cfun)) - continue; - -- /* Otherwise we'll have to use the fallthru fixup below. */ -+ /* Otherwise we'll have to use the fallthru fixup below. -+ But avoid redirecting asm goto to EXIT. */ -+ asm_goto = true; - } - else - { -@@ -4048,7 +4051,8 @@ fixup_reorder_chain (void) - return rather than a jump to the return block. */ - rtx_insn *ret, *use; - basic_block dest; -- if (bb_is_just_return (e_fall->dest, &ret, &use) -+ if (!asm_goto -+ && bb_is_just_return (e_fall->dest, &ret, &use) - && ((PATTERN (ret) == simple_return_rtx && targetm.have_simple_return ()) - || (PATTERN (ret) == ret_rtx && targetm.have_return ()))) - { ---- gcc/testsuite/gcc.dg/pr108263.c.jj 2023-01-02 14:09:49.381614027 +0100 -+++ gcc/testsuite/gcc.dg/pr108263.c 2023-01-02 14:07:16.899772608 +0100 -@@ -0,0 +1,25 @@ -+/* PR rtl-optimization/108263 */ -+/* { dg-do compile } */ -+/* { dg-options "-O2" } */ -+ -+int v, *p; -+ -+void -+foo (void) -+{ -+ int i; -+ for (i = 0; ; i++) -+ { -+ if (v) -+ { -+ __label__ l1; -+ asm goto ("" : : : : l1); -+ l1: -+ return; -+ } -+ if (p[i]) -+ break; -+ } -+ asm goto ("" : : "r" (i) : : l2); -+l2:; -+} diff --git a/gcc13-pr108264.patch b/gcc13-pr108264.patch deleted file mode 100644 index 8683dad..0000000 --- a/gcc13-pr108264.patch +++ /dev/null @@ -1,51 +0,0 @@ -2023-01-02 Jakub Jelinek - - PR middle-end/108264 - * expr.cc (store_expr): For stores into SUBREG_PROMOTED_* targets - from source which doesn't have scalar integral mode first convert - it to outer_mode. - - * gcc.dg/pr108264.c: New test. - ---- gcc/expr.cc.jj 2023-01-02 09:32:23.000000000 +0100 -+++ gcc/expr.cc 2023-01-02 16:48:13.226990815 +0100 -@@ -6226,6 +6226,9 @@ store_expr (tree exp, rtx target, int ca - temp = convert_modes (inner_mode, outer_mode, temp, - SUBREG_PROMOTED_SIGN (target)); - } -+ else if (!SCALAR_INT_MODE_P (GET_MODE (temp))) -+ temp = convert_modes (outer_mode, TYPE_MODE (TREE_TYPE (exp)), -+ temp, SUBREG_PROMOTED_SIGN (target)); - - convert_move (SUBREG_REG (target), temp, - SUBREG_PROMOTED_SIGN (target)); ---- gcc/testsuite/gcc.dg/pr108264.c.jj 2023-01-02 17:01:14.865887522 +0100 -+++ gcc/testsuite/gcc.dg/pr108264.c 2023-01-02 17:00:52.238209030 +0100 -@@ -0,0 +1,27 @@ -+/* PR middle-end/108264 */ -+/* { dg-do compile } */ -+/* { dg-options "-O2" } */ -+/* { dg-additional-options "-fpic" { target fpic } } */ -+ -+int v; -+extern int bar (void); -+ -+static inline void -+foo (char *d) -+{ -+ switch (bar ()) -+ { -+ case 2: -+ d[0] = d[1] = d[2] = d[3] = v; -+ break; -+ case 4: -+ d[0] = 0; -+ } -+} -+ -+int -+baz (int x) -+{ -+ foo ((char *) &x); -+ return x; -+}