sys-devel/gcc: Sync with Gentoo

It's from Gentoo commit 20ca6700b5d18a505b8011623da9c69adb4f6221.
This commit is contained in:
Flatcar Buildbot 2025-04-14 07:12:11 +00:00 committed by Krzesimir Nowak
parent 8b0db69c0f
commit 1981728e83
10 changed files with 775 additions and 0 deletions

View File

@ -9,6 +9,7 @@ DIST gcc-12-20250227.tar.xz 79915940 BLAKE2B 0adb19847cb3f317316549f657434654b99
DIST gcc-12-20250320.tar.xz 79921688 BLAKE2B cafdd710d1bf04083f8db4cce873667caded67961b701760f95e95f76ad98924582b51752061fe404e2e7f6dbab4215e0fe5c4436826ac320d9bd224ae7a061c SHA512 1dc331f1a942c4a10ae56fc234bcc37c72dd720df1cb9e1aa1802092307378abffd83b887b718a8f8d11c16296c0a7aa53011a7358aea86c8e60522d8f50e76d
DIST gcc-12-20250327.tar.xz 79923680 BLAKE2B 7bbe5a736f42ad9e04740b6c8adcb06ae8bd405e32b4f45897c76c15eb24428a55827f2ba715456c48a906d02693b42b280f8b73e61926d05c4c99316de4a4b3 SHA512 8cf3aced94a42635b68f7a0f57e831d09718d1674272ee9134c1419a81a2b6f7d056f156ff3b0c5565c098eb62334d318a1320a268e6713a3c64ac59c5ad910a
DIST gcc-12-20250403.tar.xz 79905284 BLAKE2B 768f10e1dd000f0f409552ad73198df6eb9c8f7f5950b9e0995700e76a71dfc7732d2ae176807f1410d48191bc457bca895bc3142ba8166c3225b264e204c2bc SHA512 c2df1232658a7a58def2ebdb991f09487b5badf8ab1fbd265308fabf54e329acd7307971861ac143271fef5a6ce93791ea4278faad7e960419072abe5f4a9984
DIST gcc-12-20250410.tar.xz 79914700 BLAKE2B 06dab76008cdebc974ba8e72fb99ffc5f4a875a77b2b0c487e1a9e9fc877f29b86ccb859f1e421297312b4f0831ce4b5ef686da31985fd94b8f0356547498cdb SHA512 ae55bf088a02819e5e116ee0afead1fdcd1aab8b6301a08a14df278eb733f9745e7d91cd121177302b4d61d5a62d3efde08cc49a05d00203dcd42387fc4ba154
DIST gcc-12.4.0-musl-patches-1.tar.xz 3068 BLAKE2B e5e39c24934072ea89e4467d0dc5196f3dadfb5ffba0c856d051648a2fbf57d434a57e95227cdf2b8cea45f0f5555aec2bc372d2f6cb0b69efd87831d248d364 SHA512 b9db204845a25be043d76cae826d42eebeeb4f9be7c3049af6fe7601a552bedfd24731156a6a36b4b5e2e2af656a589a5c556d2b0b3ded33ba290a773ee87c62
DIST gcc-12.4.0-patches-1.tar.xz 15576 BLAKE2B 98c29888de7701b365be7ac9062f0cee3340d58c85485e26f0d02f1483ec64cc9c10651488a4fd937551afe30f4e19777e6766871a724ae3ba6c290c16f4fdf1 SHA512 3f7c5d36e56e07ea9dd143a5d13342a6c1ccbf0643abd1c0bcbfb46bb7c7b1308aef6e3e882031c9c191610f01af906b19be5aa2b139cf617614f46e97463aec
DIST gcc-12.4.0-patches-2.tar.xz 14876 BLAKE2B 6bf5abbb2abba4b9fe9fa153ac4112fe5f563e97cd4e1b885ccd0d88abf1124fa91f20d6be972e2242410447be73bca60014785f8551b8087ed0d4cc3e868225 SHA512 dfd5f02d4c1076fad4ee998b2f620171dd3eb65a1160312def9dae89b18327a06db853f569e0e3c049e5ab06c61488bb6faecec52bafe737fddeb43628c54a1f
@ -19,6 +20,7 @@ DIST gcc-13-20250301.tar.xz 84525780 BLAKE2B c366f4de63b7956abb1bf2d1039acdf90c7
DIST gcc-13-20250321.tar.xz 84515248 BLAKE2B b07d6f518bf2d32ad17b3c169ddb782dfe4de5efb157e2d4b8b2eb00f68f50b9250ba9e873b4dee269506740330176d98b1160d754ca6c714e1d6c76358c6493 SHA512 16a2acce5b2900749b7100a445ae387b03504a6e2319f76cd0a8a1d67eae8c04493f845f63e4e040d8fecba9123105d8b9fed433220e1fa6abc87448180dccd8
DIST gcc-13-20250328.tar.xz 84532580 BLAKE2B e518053fd44461632560334c536ca29a3510493147bffba3906c3a9f2f08f4a124bd50132a0f2b82eb8a783fa3de58c5a41507c4558fd701d0cb9e2667526ad5 SHA512 277348fff14e1c44d32ffa717c9b2496fbf2975b95a237256a2c8585bbdba6b833b7212b0d9c59c3b430ebc98fe2866fe07e6acc429b09c0087e72da631f5ad3
DIST gcc-13-20250404.tar.xz 84527280 BLAKE2B 1cd4592ccd2f0e6a712f74f5e7aa57f4b7cece92eb02cbb6049a11567a345589ee7993b81d2d9dc7b5cc1af8fe1d4350e3969377f4f389878d19eca7bf9520bc SHA512 7511736852972cae3578973ad11941cb9f758aea10e0b49cf4d67302bf0e4ad2c7b7ed4663e3d4c17ad6e350742b182652f8bfeb502134bf2e2b0d758037f0a9
DIST gcc-13-20250411.tar.xz 84527868 BLAKE2B 1a3ea6a3ff4cf8cb0185e51fc9f8745a5216505e757bf80d4f6fff6edb25399f4fc3cfa60697ec71b27b27526753f897757c4d149dd2ff096dd5559b32b787d9 SHA512 fb452eabc0308e90dbbdac67b7f7a46e6d43932060926a81b05384cec0cf138ccda996b7b90ab6d89174e7b046cf0c8596efe6c66dbda42dd5c1c6d830eab2c7
DIST gcc-13.2.0-musl-patches-2.tar.xz 5292 BLAKE2B c057d6574d03c05854edaa9f3fd40e9149662b04f3ac7a7db3eb078d73a7b535726d1bf52e5b12736dedb2f9898ad731f2e48a6421fcfbf7b90f929dee072fcb SHA512 a691da0c87c443a5e9d23731f4005f27871c5b12bc9102873ffa24d374aa7b9fbd187c4f5635d23fa9ffb17e351e76173c2d3fdf40646e355c4cb314b538de69
DIST gcc-13.2.0-patches-3.tar.xz 30956 BLAKE2B 29ce043b46645640ca1e983397af3e158588ad87575f0bc59451ea4a7dd5e3bb5b190ed031de6a22cd790d423ba111e95d222187dd09985dceb12db9f0a2d907 SHA512 4ffecae7be320124ad0c4e71e39e142b7aa8db0e70b5f486f491d7a33ea31efc6464c6abeea77df02a8bd5cf81f08225d625c8af5c27f9afa32c0d7d989f7a3c
DIST gcc-13.2.0.tar.xz 87858592 BLAKE2B 0034b29d3d6cc05821f0c4253ce077805943aff7b370729dd203bda57d89c107edd657eeddc2fb1e69ea15c7b0323b961f46516c7f4af89a3ccf7fea84701be2 SHA512 d99e4826a70db04504467e349e9fbaedaa5870766cda7c5cab50cdebedc4be755ebca5b789e1232a34a20be1a0b60097de9280efe47bdb71c73251e30b0862a2
@ -28,12 +30,15 @@ DIST gcc-14-20250301.tar.xz 88230928 BLAKE2B 2b65e7cccbf431a74df73adac53995873e7
DIST gcc-14-20250322.tar.xz 88221060 BLAKE2B c8ec3dcbaaed1ee9a8d35f866a21879192a10707600a9ffa10c9a958de84e0fec3f8bd93950a5cdd53f2e4d9fcc74b45c4416a357eb271e70b314bd339da4818 SHA512 860049792547bfc21c4f61f1648056510495f16e97ea47444d02a740e60bfea1870d3ff437548854681e94fb2e7099a186526a6acecb02df7753e0f5661f6d30
DIST gcc-14-20250329.tar.xz 88223376 BLAKE2B 024343e0307d8cc18efe326a137f599c25304346e23ba2a501e7a414c7c96891cd339ac5f82c9b6b1f8bfa0101734aafc3580d8577405d8f18d0c809f5d1b2d2 SHA512 ae86076dee09826ef3bed6ae927c757205ea48c9fcef59c61a74a3ca31117797a958ba2307cdee785f2c2bbccd87dd93316a0e3415f0e81bf2712d6abebcdef3
DIST gcc-14-20250405.tar.xz 88235744 BLAKE2B 8de5bb1e182391c20b887b84da2ef04aab01bfd8f50d0a0fdca107fde89059f492d2920604ce7680be66f0aca319ed3fbb79f671e3d89b8fda0d33f447074210 SHA512 ba12a47dd3c2f3af4def7d582241b450e1e6ca9e8585839089401bf00dedfb93020bfd8a05ecb1a120491d664208c319f7ae2f763fb49c764492efe6a109cf92
DIST gcc-14-20250412.tar.xz 88240916 BLAKE2B 775e364f4709858507cb8ef6a365a9ebc05dc523a261b70141e53931eb84a2f260b2b91d5fe85b73ae5403687959bd6fd83b3351af1a8f76cffeb5518069bec1 SHA512 193476123bd6a635a1cc1c19b85520f796138ebf85d61632606bfb8cfe4eb32945524932c35e2e13b510a874286febf2772f5f850cf1834be1e239c8c3335afb
DIST gcc-14.1.0-musl-patches-1.tar.xz 3600 BLAKE2B 4cd920b7ca1f122cae806707564d8e45bfd48e78c88788a12a301f6068b5a5f335d8885e67479ac536c66aeaa81f2ecb7240ae56e9fc821a7246ab66b453711f SHA512 61c48d90a55dfc2129d96aee69d939d6a89f6407f69f7bd12c1a619f28989f471fd219d731958f8e62b0fd650c32300f0ad8dc06d5df23d9fc8c1a77fe210c25
DIST gcc-14.2.0-patches-7.tar.xz 14244 BLAKE2B 11236e91e1fe83fec8ffaa40ec0cdd4b52a00a951e9aa9a7a0a932b234b8f1a9603333a7ccf55859f4ef53dd4d8ad1fd5c1d2514b6e45fce5b86bb58622a0ecc SHA512 5a4d86d943e31fa068b5a784c0132bd83c23243dcb3cf972557a42e004469a415e1b3185f31b1bb36f916594d475f266a2fda031a414e4a15e0bbfe471269eee
DIST gcc-14.2.0-patches-8.tar.xz 14540 BLAKE2B 09f66035343d4cab694b8ab382170f8e2d546ddffedf3477f26edbd6a798ddf94294f569c2661729d40088d590bc17a4eb651710d8d9f66f33703734a1a82b67 SHA512 7a9a2724ef8db3c57b033d90751192969c16e5eaa8f4777b7f16470222ff3a18771b461bd89feaad701e7f0d573b883b487981588129933c732fb76117728b86
DIST gcc-15-20250406.tar.xz 91871244 BLAKE2B d9b4f8b382c5755f62e5f8b89deac74fdbe177e3961c205bba1d887c2157486908b85e80e0171e4d1ed6233d0cd8704af89850a3d2f6dcf0c6e703aa27b23fd9 SHA512 3a4b135833660107b6d3129570a24b3977e7da0f85296d663cfa8949eb8b2bd97237086535b1ff3eaf6423afcf799d18f21aaadc4fcc35835dca2f10cc154c7c
DIST gcc-15-20250413.tar.xz 91915660 BLAKE2B 80b2ad128d4bdbf3abf2295abfe452c1a1b1d831d73715e8d99d625dd0ec8e1293198fb0cbe7a04920eeb4ec88ce147d1120d297430cd6321e72b2c7948bcb08 SHA512 6b9b5bd62dd9624d8b49fe001f057cfa87a59c01064de108f4f24224849f19bb3fbfe4d7f70ee57cc7db88c41741cb5f49100402f88bbbe5fa1d07f50d4dc7aa
DIST gcc-15.0.0-musl-patches-2.tar.xz 3076 BLAKE2B 0073248fe4f7dd827980559017b5aa1fb5c4c46acc9ad5c410dc152fd1e44966d3066bf7152338573cb45b1c36027de5f0c519abd414d97a37bccef07f6a5281 SHA512 295f1a669020bbe2874e9b03afd46b5d083073b276fca3543f3767a2d74f35df81cf0a67abad50c200cf7a3af36ec98ff9977cb7d5c19f334af7d3bb1926a3de
DIST gcc-15.0.0-patches-53.tar.xz 27892 BLAKE2B 0c1455cae4aee49051fb5a8c31b8f82765da8ad9509ef17cb8c9f96d2c53a73fe1c8cfc0a2708e3bce0f8deb6f5e16807d8739bfd06cc6c08788331a719ded73 SHA512 c8f375f4de882ba99872f649f2cbbcc1b9f89d3dc9b355c1d11abfb6daf3ae7e89b82e002497215b641175d42d9f9a94749add2af2a5b6bcc1f3f5b41320df5b
DIST gcc-15.0.0-patches-54.tar.xz 20764 BLAKE2B fdd746b5243858d940e67f3dc11e085f370244c890e35b3f0b1b4af4f978ec98b5204b9874e9defd422f508262060e0b489ef85f5ba9b2296af371a7ed879bd5 SHA512 ecf38b4637c30ee7a0f74c73c55a3ba2d193d39e82e4bfe058494a5d125596bef547ea70ce52bf109cdec4aa31c3ed8c2b32ae52a9d9827be2b10e8fe0875e82
DIST gcc-8.5.0-patches-4.tar.xz 18616 BLAKE2B 7594cbaea5daecf1a0b3d526c06aeba0a84c6da66aee2e105a51fda6be8d30a37ccc3814281b284a4582d892a1d556bca063551584edfc2525bed8ea5b6888e7 SHA512 1aa5742c361186637e7855f06feb1a4547e7d4d5de6e51f3d049e0ef3c19e2eff179465f52781739f59422035b7f8e4c0efa3844849f920f3c96acfdc37ca6a6
DIST gcc-8.5.0.tar.xz 63841008 BLAKE2B aa81a1a730fd7371360f6abed6ba78b5843fd18c58d5de5687acc320741b9e430e85df3535a1ef7a26051409be8d2f0945f503e5968480d919103123a99d4b12 SHA512 92f599680e6b7fbce88bcdda810f468777d541e5fddfbb287f7977d51093de2a5178bd0e6a08dfe37090ea10a0508a43ccd00220041abbbec33f1179bfc174d8
DIST gcc-9.5.0-patches-2.tar.xz 14324 BLAKE2B 1d3bf3e673108ad2fcdcb86daefb4603d1c9f6aa815e34d1591054d466b76d6f50cce124ab4760528c4951ea16eb00888a3e6485417f81ebf250548732df4a8e SHA512 a6d6f650aaf0bd193a17ac279649f0544a282cea295824384c59341c3000eac4b574b60e00dd427585d928f9768166abf85168b47772132790ad98854acacbbf

View File

@ -0,0 +1,88 @@
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=088887de7717a22b1503760e9b79dfbe22a0f428
From 088887de7717a22b1503760e9b79dfbe22a0f428 Mon Sep 17 00:00:00 2001
From: Richard Biener <rguenther@suse.de>
Date: Wed, 9 Apr 2025 14:36:19 +0200
Subject: [PATCH] rtl-optimization/119689 - compare-debug failure with LRA
The previous change to fix LRA rematerialization broke compare-debug
for i586 bootstrap. Fixed by using prev_nonnote_nondebug_insn
instead of prev_nonnote_insn.
PR rtl-optimization/119689
PR rtl-optimization/115568
* lra-remat.cc (create_cands): Use prev_nonnote_nondebug_insn
to check whether insn2 is directly before insn.
* g++.target/i386/pr119689.C: New testcase.
---
gcc/lra-remat.cc | 2 +-
gcc/testsuite/g++.target/i386/pr119689.C | 44 ++++++++++++++++++++++++
2 files changed, 45 insertions(+), 1 deletion(-)
create mode 100644 gcc/testsuite/g++.target/i386/pr119689.C
diff --git a/gcc/lra-remat.cc b/gcc/lra-remat.cc
index 2f3afffcf5be..5f823193aa73 100644
--- a/gcc/lra-remat.cc
+++ b/gcc/lra-remat.cc
@@ -460,7 +460,7 @@ create_cands (void)
&& dst_regno >= FIRST_PSEUDO_REGISTER
&& reg_renumber[dst_regno] < 0
&& BLOCK_FOR_INSN (insn2) == BLOCK_FOR_INSN (insn)
- && insn2 == prev_nonnote_insn (insn))
+ && insn2 == prev_nonnote_nondebug_insn (insn))
{
create_cand (insn2, regno_potential_cand[src_regno].nop,
dst_regno, insn);
diff --git a/gcc/testsuite/g++.target/i386/pr119689.C b/gcc/testsuite/g++.target/i386/pr119689.C
new file mode 100644
index 000000000000..cdc6d2dade53
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/pr119689.C
@@ -0,0 +1,44 @@
+// { dg-do compile }
+// { dg-options "-O2 -fcompare-debug" }
+// { dg-additional-options "-march=i586 -mtune=generic" { target ia32 } }
+// { dg-additional-options "-fPIC" { target { fpic } } }
+
+enum gimple_code { GIMPLE_ASSIGN, GIMPLE_RETURN };
+bool is_gimple_call();
+int m_sig, m_exp, sreal_new_exp;
+struct sreal {
+ sreal(long long sig) {
+ long long __trans_tmp_6 = sig >= 0 ? sig : -(unsigned long long)sig;
+ sig = __trans_tmp_6 <<= sreal_new_exp -= m_exp = __trans_tmp_6;
+ m_sig = sig;
+ }
+ void operator/(sreal);
+};
+struct ipa_predicate {
+ ipa_predicate(bool = true);
+ void operator&=(ipa_predicate);
+ void operator&(ipa_predicate);
+};
+void add_condition();
+gimple_code eliminated_by_inlining_prob_code;
+static int eliminated_by_inlining_prob() {
+ switch (eliminated_by_inlining_prob_code) {
+ case GIMPLE_RETURN:
+ return 2;
+ case GIMPLE_ASSIGN:
+ return 1;
+ }
+ return 0;
+}
+void fp_expression_p() {
+ ipa_predicate bb_predicate;
+ for (;;) {
+ int prob = eliminated_by_inlining_prob();
+ ipa_predicate sra_predicate;
+ sra_predicate &= add_condition;
+ if (is_gimple_call())
+ sreal(prob) / 2;
+ if (prob != 2)
+ bb_predicate & sra_predicate;
+ }
+}
--
2.43.5

View File

@ -0,0 +1,216 @@
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=1f32b87117b0e2ecc33b844d929d723de3fe8085
From 1f32b87117b0e2ecc33b844d929d723de3fe8085 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com>
Date: Thu, 10 Apr 2025 18:39:52 +0200
Subject: [PATCH] c++: Use G_ instead of _ around cp/errors.cc
gcc-internal-format strings [PR119684]
These pp_printf/pp_verbatim format strings should be gcc-internal-format,
they use the pretty-print.cc format specifier handling rather than libc
*printf, but pp_printf/pp_verbatim are intentionally not handled through
exgettext because not everything done through them should be translated
(e.g. its use for dump files shouldn't be).
In addition, composing translatable messages from
"in requirements " and later on "with " might make it harder to be
translated.
I've verified these strings (at least those which don't use format
specifiers added post GCC 4.3 which gettext doesn't handle) are properly
marked as gcc-internal-format in gcc.pot. The lack of that caused
ICEs on German translation of the "%s%s%sIn instantiation of %q#D:\n"
message because it contained too many %s.
2025-04-10 Jakub Jelinek <jakub@redhat.com>
PR translation/119684
* error.cc (cp_print_error_function): Use G_ instead of _ for
pp_printf arguments.
(function_category): Use G_ instead of _.
(print_instantiation_full_context): Use G_ instead of _ in pp_verbatim
arguments.
(print_location): Likewise.
(print_instantiation_partial_context): Likewise.
(maybe_print_constexpr_context): Likewise.
(print_constrained_decl_info): Use G_() around pp_verbatim argument.
(print_concept_check_info): Likewise.
(print_constraint_context_head): Likewise.
(print_requires_expression_info): Likewise. Merge separate pp_verbatim
"in requirements " and "with " into one with conditional messages.
---
gcc/cp/error.cc | 59 ++++++++++++++++++++++++-------------------------
1 file changed, 29 insertions(+), 30 deletions(-)
diff --git a/gcc/cp/error.cc b/gcc/cp/error.cc
index ec7527e96d18..499eb1b15a85 100644
--- a/gcc/cp/error.cc
+++ b/gcc/cp/error.cc
@@ -3788,18 +3788,18 @@ cp_print_error_function (diagnostic_text_output_format &text_output,
{
if (text_output.show_column_p () && s.column != 0)
pp_printf (pp,
- _(" inlined from %qD at %r%s:%d:%d%R"),
+ G_(" inlined from %qD at %r%s:%d:%d%R"),
fndecl,
"locus", s.file, s.line, s.column);
else
pp_printf (pp,
- _(" inlined from %qD at %r%s:%d%R"),
+ G_(" inlined from %qD at %r%s:%d%R"),
fndecl,
"locus", s.file, s.line);
}
else
- pp_printf (pp, _(" inlined from %qD"),
+ pp_printf (pp, G_(" inlined from %qD"),
fndecl);
}
}
@@ -3825,22 +3825,22 @@ function_category (tree fn)
&& DECL_FUNCTION_MEMBER_P (fn))
{
if (DECL_STATIC_FUNCTION_P (fn))
- return _("In static member function %qD");
+ return G_("In static member function %qD");
else if (DECL_COPY_CONSTRUCTOR_P (fn))
- return _("In copy constructor %qD");
+ return G_("In copy constructor %qD");
else if (DECL_CONSTRUCTOR_P (fn))
- return _("In constructor %qD");
+ return G_("In constructor %qD");
else if (DECL_DESTRUCTOR_P (fn))
- return _("In destructor %qD");
+ return G_("In destructor %qD");
else if (LAMBDA_FUNCTION_P (fn))
- return _("In lambda function");
+ return G_("In lambda function");
else if (DECL_XOBJ_MEMBER_FUNCTION_P (fn))
- return _("In explicit object member function %qD");
+ return G_("In explicit object member function %qD");
else
- return _("In member function %qD");
+ return G_("In member function %qD");
}
else
- return _("In function %qD");
+ return G_("In function %qD");
}
/* Disable warnings about missing quoting in GCC diagnostics for
@@ -3867,8 +3867,8 @@ print_instantiation_full_context (diagnostic_text_output_format &text_output)
char *indent = text_output.build_indent_prefix (true);
pp_verbatim (text_output.get_printer (),
p->list_p ()
- ? _("%s%s%sIn substitution of %qS:\n")
- : _("%s%s%sIn instantiation of %q#D:\n"),
+ ? G_("%s%s%sIn substitution of %qS:\n")
+ : G_("%s%s%sIn instantiation of %q#D:\n"),
indent,
show_file ? LOCATION_FILE (location) : "",
show_file ? ": " : "",
@@ -3888,10 +3888,10 @@ print_location (diagnostic_text_output_format &text_output,
expanded_location xloc = expand_location (loc);
pretty_printer *const pp = text_output.get_printer ();
if (text_output.show_column_p ())
- pp_verbatim (pp, _("%r%s:%d:%d:%R "),
+ pp_verbatim (pp, G_("%r%s:%d:%d:%R "),
"locus", xloc.file, xloc.line, xloc.column);
else
- pp_verbatim (pp, _("%r%s:%d:%R "),
+ pp_verbatim (pp, G_("%r%s:%d:%R "),
"locus", xloc.file, xloc.line);
}
@@ -3984,22 +3984,22 @@ print_instantiation_partial_context_line (diagnostic_text_output_format &text_ou
if (t->list_p ())
pp_verbatim (pp,
recursive_p
- ? _("recursively required by substitution of %qS\n")
- : _("required by substitution of %qS\n"),
+ ? G_("recursively required by substitution of %qS\n")
+ : G_("required by substitution of %qS\n"),
t->get_node ());
else
pp_verbatim (pp,
recursive_p
- ? _("recursively required from %q#D\n")
- : _("required from %q#D\n"),
+ ? G_("recursively required from %q#D\n")
+ : G_("required from %q#D\n"),
t->get_node ());
}
else
{
pp_verbatim (pp,
recursive_p
- ? _("recursively required from here\n")
- : _("required from here\n"));
+ ? G_("recursively required from here\n")
+ : G_("required from here\n"));
}
}
@@ -4049,8 +4049,8 @@ print_instantiation_partial_context (diagnostic_text_output_format &text_output,
{
auto_context_line sentinel (text_output, loc);
pp_verbatim (text_output.get_printer (),
- _("[ skipping %d instantiation contexts,"
- " use -ftemplate-backtrace-limit=0 to disable ]\n"),
+ G_("[ skipping %d instantiation contexts,"
+ " use -ftemplate-backtrace-limit=0 to disable ]\n"),
skip);
do {
loc = t->locus;
@@ -4101,7 +4101,7 @@ maybe_print_constexpr_context (diagnostic_text_output_format &text_output)
pretty_printer *const pp = text_output.get_printer ();
auto_context_line sentinel (text_output, EXPR_LOCATION (t));
pp_verbatim (pp,
- _("in %<constexpr%> expansion of %qs"),
+ G_("in %<constexpr%> expansion of %qs"),
s);
pp_newline (pp);
}
@@ -4114,7 +4114,7 @@ print_constrained_decl_info (diagnostic_text_output_format &text_output,
{
auto_context_line sentinel (text_output, DECL_SOURCE_LOCATION (decl));
pretty_printer *const pp = text_output.get_printer ();
- pp_verbatim (pp, "required by the constraints of %q#D\n", decl);
+ pp_verbatim (pp, G_("required by the constraints of %q#D\n"), decl);
}
static void
@@ -4129,7 +4129,7 @@ print_concept_check_info (diagnostic_text_output_format &text_output,
cxx_pretty_printer *const pp
= (cxx_pretty_printer *)text_output.get_printer ();
- pp_verbatim (pp, "required for the satisfaction of %qE", expr);
+ pp_verbatim (pp, G_("required for the satisfaction of %qE"), expr);
if (map && map != error_mark_node)
{
tree subst_map = tsubst_parameter_mapping (map, args, tf_none, NULL_TREE);
@@ -4151,7 +4151,7 @@ print_constraint_context_head (diagnostic_text_output_format &text_output,
{
auto_context_line sentinel (text_output, input_location);
pretty_printer *const pp = text_output.get_printer ();
- pp_verbatim (pp, "required for constraint satisfaction\n");
+ pp_verbatim (pp, G_("required for constraint satisfaction\n"));
return NULL_TREE;
}
if (DECL_P (src))
@@ -4180,11 +4180,10 @@ print_requires_expression_info (diagnostic_text_output_format &text_output,
auto_context_line sentinel (text_output, cp_expr_loc_or_input_loc (expr));
cxx_pretty_printer *const pp
= static_cast <cxx_pretty_printer *> (text_output.get_printer ());
- pp_verbatim (pp, "in requirements ");
tree parms = TREE_OPERAND (expr, 0);
- if (parms)
- pp_verbatim (pp, "with ");
+ pp_verbatim (pp, parms ? G_("in requirements with ")
+ : G_("in requirements "));
while (parms)
{
pp_verbatim (pp, "%q#D", parms);
--
2.43.5

View File

@ -0,0 +1,77 @@
https://inbox.sourceware.org/gcc-patches/20250409151104.2600656-1-ppalka@redhat.com/
From 660e4bf9391692acb0bb18ba5eb38e689ae0a8a6 Mon Sep 17 00:00:00 2001
Message-ID: <660e4bf9391692acb0bb18ba5eb38e689ae0a8a6.1744212391.git.sam@gentoo.org>
From: Patrick Palka <ppalka@redhat.com>
Date: Wed, 9 Apr 2025 11:11:04 -0400
Subject: [PATCH] c++: alias_ctad_tweaks ICE w/ inherited CTAD [PR119687]
With inherited CTAD the set of guides may be a two-dimensional overload
set (i.e. OVERLOADs containing OVERLOADs) so alias_ctad_tweaks (which
also handles the inherited CTAD transformation) needs to use the 2D-aware
lkp_iterator instead of ovl_iterator. Actually, we might as well use
the more idiomatic lkp_range here.
PR c++/119687
gcc/cp/ChangeLog:
* pt.cc (alias_ctad_tweaks): Use lkp_range / lkp_iterator
instead of ovl_iterator.
gcc/testsuite/ChangeLog:
* g++.dg/cpp23/class-deduction-inherited8.C: New test.
---
gcc/cp/pt.cc | 3 +--
.../g++.dg/cpp23/class-deduction-inherited8.C | 21 +++++++++++++++++++
2 files changed, 22 insertions(+), 2 deletions(-)
create mode 100644 gcc/testsuite/g++.dg/cpp23/class-deduction-inherited8.C
diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc
index 0e120c4040ed..352a7f4ed316 100644
--- a/gcc/cp/pt.cc
+++ b/gcc/cp/pt.cc
@@ -30937,9 +30937,8 @@ alias_ctad_tweaks (tree tmpl, tree uguides)
tree aguides = NULL_TREE;
tree atparms = INNERMOST_TEMPLATE_PARMS (fullatparms);
unsigned natparms = TREE_VEC_LENGTH (atparms);
- for (ovl_iterator iter (uguides); iter; ++iter)
+ for (tree f : lkp_range (uguides))
{
- tree f = *iter;
tree in_decl = f;
location_t loc = DECL_SOURCE_LOCATION (f);
tree ret = TREE_TYPE (TREE_TYPE (f));
diff --git a/gcc/testsuite/g++.dg/cpp23/class-deduction-inherited8.C b/gcc/testsuite/g++.dg/cpp23/class-deduction-inherited8.C
new file mode 100644
index 000000000000..79fceadd9e1c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/class-deduction-inherited8.C
@@ -0,0 +1,21 @@
+// PR c++/119687
+// { dg-do compile { target c++20 } }
+
+template <typename> class QFlagsStorage{};
+
+template <typename Enum> struct QFlagsStorageHelper : QFlagsStorage<Enum> {
+ using QFlagsStorage<Enum>::QFlagsStorage;
+
+public:
+ QFlagsStorageHelper(Enum);
+};
+
+template <typename Enum> struct QFlags : public QFlagsStorageHelper<Enum> {
+ using Base = QFlagsStorageHelper<Enum>;
+ using Base::Base;
+ QFlags(Enum);
+};
+
+void f(int flag) {
+ QFlags{int{}};
+}
base-commit: 334545194d9023fb9b2f72ee0dcde8af94930f25
--
2.49.0

View File

@ -0,0 +1,81 @@
https://gcc.gnu.org/PR119672
https://gcc.gnu.org/PR119713
https://bugs.gentoo.org/953420
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=04918a2d3f20b02ac3efad1096c33894d57789a0
From 04918a2d3f20b02ac3efad1096c33894d57789a0 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com>
Date: Tue, 8 Apr 2025 15:14:58 +0200
Subject: [PATCH] simplify-rtx: Fix up POPCOUNT optimization [PR119672]
The gcc.dg/vect/pr113281-1.c test and many others ICE on riscv since
presumably the r15-9238 change which allowed more cases of vector modes
in simplify_const_relational_operation.
In the testcase it is EQ of
(popcount:SI (unspec:RVVMF32BI [
(and:RVVMF32BI (const_vector:RVVMF32BI repeat [
(const_int 1 [0x1])
])
(reg:RVVMF32BI 147 [ mask__6.8_35 ]))
(reg:SI 143 [ _41 ])
(const_int 0 [0])
(reg:SI 66 vl)
(reg:SI 67 vtype)
] UNSPEC_VPREDICATE))
and
(const_int 0 [0])
which it tries to fold as EQ comparison of
(unspec:RVVMF32BI [
(and:RVVMF32BI (const_vector:RVVMF32BI repeat [
(const_int 1 [0x1])
])
(reg:RVVMF32BI 147 [ mask__6.8_35 ]))
(reg:SI 143 [ _41 ])
(const_int 0 [0])
(reg:SI 66 vl)
(reg:SI 67 vtype)
] UNSPEC_VPREDICATE)
with
(const_int 0 [0])
which ICEs because const0_rtx isn't a vector.
Fixed by using CONST0_RTX, so that we pass
(const_vector:RVVMF32BI repeat [
(const_int 0 [0])
])
instead.
2025-04-08 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/119672
* simplify-rtx.cc (simplify_context::simplify_relational_operation_1):
For POPCOUNT == 0 or != 0 optimizations use
CONST0_RTX (GET_MODE (XEXP (op0, 0))) rather than const0_rtx.
---
gcc/simplify-rtx.cc | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gcc/simplify-rtx.cc b/gcc/simplify-rtx.cc
index 6f969effdf99..88d31a71c05a 100644
--- a/gcc/simplify-rtx.cc
+++ b/gcc/simplify-rtx.cc
@@ -6465,14 +6465,16 @@ simplify_context::simplify_relational_operation_1 (rtx_code code,
case LEU:
/* (eq (popcount x) (const_int 0)) -> (eq x (const_int 0)). */
return simplify_gen_relational (EQ, mode, GET_MODE (XEXP (op0, 0)),
- XEXP (op0, 0), const0_rtx);
+ XEXP (op0, 0),
+ CONST0_RTX (GET_MODE (XEXP (op0, 0))));
case NE:
case GT:
case GTU:
/* (ne (popcount x) (const_int 0)) -> (ne x (const_int 0)). */
return simplify_gen_relational (NE, mode, GET_MODE (XEXP (op0, 0)),
- XEXP (op0, 0), const0_rtx);
+ XEXP (op0, 0),
+ CONST0_RTX (GET_MODE (XEXP (op0, 0))));
default:
break;
--
2.43.5

View File

@ -0,0 +1,68 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Maintenance notes and explanations of GCC handling are on the wiki:
# https://wiki.gentoo.org/wiki/Project:Toolchain/sys-devel/gcc
TOOLCHAIN_PATCH_DEV="sam"
TOOLCHAIN_HAS_TESTS=1
PATCH_GCC_VER="12.4.0"
PATCH_VER="3"
MUSL_VER="1"
MUSL_GCC_VER="12.4.0"
PYTHON_COMPAT=( python3_{10..13} )
if [[ ${PV} == *.9999 ]] ; then
MY_PV_2=$(ver_cut 2)
MY_PV_3=1
if [[ ${MY_PV_2} == 0 ]] ; then
MY_PV_2=0
MY_PV_3=0
else
MY_PV_2=$((${MY_PV_2} - 1))
fi
# e.g. 12.2.9999 -> 12.1.1
TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
# Cheesy hack for RCs
MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
MY_P=${PN}-${MY_PV}
GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
TOOLCHAIN_SET_S=no
S="${WORKDIR}"/${MY_P}
fi
inherit toolchain
if tc_is_live ; then
# Needs to be after inherit (for now?), bug #830908
EGIT_BRANCH=releases/gcc-$(ver_cut 1)
elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
# Don't keyword live ebuilds
#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
:;
fi
if [[ ${CATEGORY} != cross-* ]] ; then
# Technically only if USE=hardened *too* right now, but no point in complicating it further.
# If GCC is enabling CET by default, we need glibc to be built with support for it.
# bug #830454
RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
DEPEND="${RDEPEND}"
fi
src_prepare() {
local p upstreamed_patches=(
# add them here
)
for p in "${upstreamed_patches[@]}"; do
rm -v "${WORKDIR}/patch/${p}" || die
done
toolchain_src_prepare
eapply_user
}

View File

@ -0,0 +1,69 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Maintenance notes and explanations of GCC handling are on the wiki:
# https://wiki.gentoo.org/wiki/Project:Toolchain/sys-devel/gcc
TOOLCHAIN_PATCH_DEV="sam"
TOOLCHAIN_HAS_TESTS=1
PATCH_GCC_VER="13.3.0"
MUSL_GCC_VER="13.2.0"
PATCH_VER="2"
MUSL_VER="2"
PYTHON_COMPAT=( python3_{10..13} )
if [[ ${PV} == *.9999 ]] ; then
MY_PV_2=$(ver_cut 2)
MY_PV_3=1
if [[ ${MY_PV_2} == 0 ]] ; then
MY_PV_2=0
MY_PV_3=0
else
MY_PV_2=$((${MY_PV_2} - 1))
fi
# e.g. 12.2.9999 -> 12.1.1
TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
# Cheesy hack for RCs
MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
MY_P=${PN}-${MY_PV}
GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
TOOLCHAIN_SET_S=no
S="${WORKDIR}"/${MY_P}
fi
inherit toolchain
if tc_is_live ; then
# Needs to be after inherit (for now?), bug #830908
EGIT_BRANCH=releases/gcc-$(ver_cut 1)
elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
# Don't keyword live ebuilds
#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
:;
fi
if [[ ${CATEGORY} != cross-* ]] ; then
# Technically only if USE=hardened *too* right now, but no point in complicating it further.
# If GCC is enabling CET by default, we need glibc to be built with support for it.
# bug #830454
RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
DEPEND="${RDEPEND}"
fi
src_prepare() {
local p upstreamed_patches=(
# add them here
)
for p in "${upstreamed_patches[@]}"; do
rm -v "${WORKDIR}/patch/${p}" || die
done
toolchain_src_prepare
eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch
eapply_user
}

View File

@ -0,0 +1,57 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Maintenance notes and explanations of GCC handling are on the wiki:
# https://wiki.gentoo.org/wiki/Project:Toolchain/sys-devel/gcc
TOOLCHAIN_PATCH_DEV="sam"
TOOLCHAIN_HAS_TESTS=1
PATCH_GCC_VER="14.2.0"
PATCH_VER="8"
MUSL_VER="1"
MUSL_GCC_VER="14.1.0"
PYTHON_COMPAT=( python3_{10..13} )
if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
# Cheesy hack for RCs
MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
MY_P=${PN}-${MY_PV}
GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
TOOLCHAIN_SET_S=no
S="${WORKDIR}"/${MY_P}
fi
inherit toolchain
if tc_is_live ; then
# Needs to be after inherit (for now?), bug #830908
EGIT_BRANCH=releases/gcc-$(ver_cut 1)
elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
# m68k doesnt build (ICE, bug 932733)
#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
:;
fi
if [[ ${CATEGORY} != cross-* ]] ; then
# Technically only if USE=hardened *too* right now, but no point in complicating it further.
# If GCC is enabling CET by default, we need glibc to be built with support for it.
# bug #830454
RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
DEPEND="${RDEPEND}"
fi
src_prepare() {
local p upstreamed_patches=(
# add them here
)
for p in "${upstreamed_patches[@]}"; do
rm -v "${WORKDIR}/patch/${p}" || die
done
toolchain_src_prepare
eapply "${FILESDIR}"/${PN}-13-fix-cross-fixincludes.patch
eapply_user
}

View File

@ -0,0 +1,59 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Maintenance notes and explanations of GCC handling are on the wiki:
# https://wiki.gentoo.org/wiki/Project:Toolchain/sys-devel/gcc
TOOLCHAIN_PATCH_DEV="sam"
TOOLCHAIN_HAS_TESTS=1
PATCH_GCC_VER="15.0.0"
PATCH_VER="53"
MUSL_VER="2"
MUSL_GCC_VER="15.0.0"
PYTHON_COMPAT=( python3_{10..13} )
if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
# Cheesy hack for RCs
MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
MY_P=${PN}-${MY_PV}
GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
TOOLCHAIN_SET_S=no
S="${WORKDIR}"/${MY_P}
fi
inherit toolchain
if tc_is_live ; then
# Needs to be after inherit (for now?), bug #830908
EGIT_BRANCH=master
elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
# Don't keyword live ebuilds
#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
:;
fi
if [[ ${CATEGORY} != cross-* ]] ; then
# Technically only if USE=hardened *too* right now, but no point in complicating it further.
# If GCC is enabling CET by default, we need glibc to be built with support for it.
# bug #830454
RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
DEPEND="${RDEPEND}"
fi
src_prepare() {
local p upstreamed_patches=(
# add them here
)
for p in "${upstreamed_patches[@]}"; do
rm -v "${WORKDIR}/patch/${p}" || die
done
toolchain_src_prepare
eapply "${FILESDIR}"/${P}-simplify-oops.patch
eapply "${FILESDIR}"/${P}-compare-debug.patch
eapply "${FILESDIR}"/${P}-de-locale.patch
eapply "${FILESDIR}"/${P}-qt.patch
eapply_user
}

View File

@ -0,0 +1,55 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Maintenance notes and explanations of GCC handling are on the wiki:
# https://wiki.gentoo.org/wiki/Project:Toolchain/sys-devel/gcc
TOOLCHAIN_PATCH_DEV="sam"
TOOLCHAIN_HAS_TESTS=1
PATCH_GCC_VER="15.0.0"
PATCH_VER="54"
MUSL_VER="2"
MUSL_GCC_VER="15.0.0"
PYTHON_COMPAT=( python3_{10..13} )
if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
# Cheesy hack for RCs
MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
MY_P=${PN}-${MY_PV}
GCC_TARBALL_SRC_URI="mirror://gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
TOOLCHAIN_SET_S=no
S="${WORKDIR}"/${MY_P}
fi
inherit toolchain
if tc_is_live ; then
# Needs to be after inherit (for now?), bug #830908
EGIT_BRANCH=master
elif [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
# Don't keyword live ebuilds
#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
:;
fi
if [[ ${CATEGORY} != cross-* ]] ; then
# Technically only if USE=hardened *too* right now, but no point in complicating it further.
# If GCC is enabling CET by default, we need glibc to be built with support for it.
# bug #830454
RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
DEPEND="${RDEPEND}"
fi
src_prepare() {
local p upstreamed_patches=(
# add them here
)
for p in "${upstreamed_patches[@]}"; do
rm -v "${WORKDIR}/patch/${p}" || die
done
toolchain_src_prepare
eapply_user
}