summaryrefslogtreecommitdiff
path: root/sys-devel
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/Manifest.gzbin6226 -> 6222 bytes
-rw-r--r--sys-devel/gcc/Manifest3
-rw-r--r--sys-devel/gcc/files/gcc-15.0.1_pre20250323-disable-musttail.patch199
-rw-r--r--sys-devel/gcc/files/gcc-15.0.1_pre20250323-e2fsprogs.patch112
-rw-r--r--sys-devel/gcc/gcc-15.0.1_pre20250323-r1.ebuild54
5 files changed, 368 insertions, 0 deletions
diff --git a/sys-devel/Manifest.gz b/sys-devel/Manifest.gz
index 2c027cde55bd..1faaae9e8c0b 100644
--- a/sys-devel/Manifest.gz
+++ b/sys-devel/Manifest.gz
Binary files differ
diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index a3cec737a06f..aeadc49b5249 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -3,6 +3,8 @@ AUX gcc-14.2.1_p20241221-arm-Revert-arm-MVE-intrinsics-Fix-support-for-predicate
AUX gcc-15.0.1_pre20250223-c-Fix-range-for-with-PMFs-PR118923.patch 7059 BLAKE2B 20118efd091888c495b25a1fc9372931a328336fe94fd43c084419557c44b054859ff98283e66cc59d633a3402c9b7260fe84344502c3e5a42f234cd51afaf5f SHA512 1b19210be96e337abf1cd2cc6879f7e418aadaa098314013b80c0adf767ad9bb7923aee72bca25d148482f1779550bf70f280adeac1538963fb8ded51365c172
AUX gcc-15.0.1_pre20250302-firefox-ice.patch 3245 BLAKE2B 10d80ae54ca2dc82d1fa16db1bd49339aae3477ecf812ba6015396c1a23a85c47426ebed7dcc3e9bd4296917ab082e92cfc5ae1e28f4a98ce9065c4aefdb0aea SHA512 6d7d6385bb6bb6303d4f863f4ae9729d719bc46caa88025bda1e5798875688357f3446374c7e0fbd7225ce2eae70cb1ce177252ba4a20dfa18dcf20b0e3c7e85
AUX gcc-15.0.1_pre20250302-firefox-pgo-ice.patch 1993 BLAKE2B ea3be0d39bb52f49f96f541205676438182ebb1aaee96aa34c145ea1a301adf3f6f38902910cc8d36daff64a9d1c1462ecd881cdee703e7a50a64b000377cbd6 SHA512 552199c7f1f8d27644b0a4b0efbb24bb57c30405ce4d9d461beb5d3a7b3ef186d5fa5e8fd8a6559c0c965ecc2d8318d33a3c657b0dd66694b6e0fbd866da6ca3
+AUX gcc-15.0.1_pre20250323-disable-musttail.patch 7995 BLAKE2B b147d64f1757c6ddf17963cc62bc0304cf344ae3e42b26ca0ff8a04f447355057ce5906107b946aa40848c72957f92637aaed0276a8decd715c48e6b3fbb5b0c SHA512 2d1af2c1ce6bf0801665cb1014a01bd43cbbcf174e196c6f2f47a4bdcbf5a36e2aa8ff1ec52574a2dc9395404a98d3efbbd4d88fb3ecb5f9a44a562d8e6552a1
+AUX gcc-15.0.1_pre20250323-e2fsprogs.patch 4467 BLAKE2B 80ced89c0ea4d44ed5bac8adcdeb985ea1ea2ae46e269beb8dd7a825207cf52dc3f0e49724d54681f8a787d9c103ff806c88f941b073160a2674f8aafed2f21e SHA512 42382c7e5b1fc527ca4f30c9507edbe966d06a47b281299adebbf1bc2c97ef8bffe46aae75a227eb50506e76685b34ead2a0e8cf531e9ea1199e77cb2e4b398b
AUX gcc-configure-texinfo.patch 341 BLAKE2B d2ea3b2ea08f5d3a498ba27d0fb95e325097e2104e55caa28b66515cb48662649140d90b639369aedc54b2b1178fa4b49cda442f5f504e09d88a2efa45a5057c SHA512 e8d34c5077409df5495cf0c5fbf5e77f841c5698108fa6a5fde33eb28202c685603bdefd8368918e55f30c4b995e895d71d64c715c1ec2b017e09eb2c54c09ff
DIST gcc-10.5.0-musl-patches-2.tar.xz 3452 BLAKE2B 5387e516d07d81477b3f39b8b3bd986bf861d32cd25dc5481c97bd3620d00c918c5661e86857f66dbf28a655401a53e43417f638c443e44cbfdbf5e950caac4d SHA512 86f2ce31cc4fc4fb5a6043fb527bf822d895e1a6220652024f78a1cbd5a962edb6be8dc5f43c32053e075f39bb2350ea8f14e7d57e0473dd2933a7b44676bde5
DIST gcc-10.5.0-patches-6.tar.xz 18208 BLAKE2B 4cac3340108fb378c76ad62b728429f3c97f348d178744e7536575f3576ca8aa682b878b7df3b1c162dccae64a3cb56c66d8d60eae323e1ece2de4278084fdbd SHA512 9d6c84325fbc118cee01347468ce729c278e5b026b16da945fe54050726e26f86a46ee7b71a01a47cf927b70bfcce459c49a6bc4fb93dcfaa047c76d4c5bc5bc
@@ -72,6 +74,7 @@ EBUILD gcc-14.2.1_p20250322.ebuild 1440 BLAKE2B 403218e223a17ec1336d65ecc5268614
EBUILD gcc-14.3.9999.ebuild 1410 BLAKE2B 0f77f0e17b7bf3d617ed4feec61406108d92e9ac8bd3597651b7f6814c45ddf56393228cda23fccf189e3fa106b9d389196da4f565283a10923bfe29a06fbfe2 SHA512 802582faf27fe46fcd75b8b917aa155739e4e0f70d010f14bf42cea3007da124a53fe1ee903e6004d4d8277350ac88d7ade78f79ce8a036b29e14dec45ba2d15
EBUILD gcc-15.0.1_pre20250309.ebuild 1359 BLAKE2B 0e4dcef21ac4b8541a43eb8fad28c3cafddbc91b186f8d5f3ed67e42c3c34f8614234d203b0e80f314f9454b1132c30e5b1f79b08a4f4b34c061839e911b8b7e SHA512 4b5f3b8b0df693d95204b8983d3c51a07a286ef0d0b56e9a1b3d9bfa37a4e8559fa7133eae15a101c70e5b9783dc7c81d8d72437366ae08b2e4d62732db9de2e
EBUILD gcc-15.0.1_pre20250316.ebuild 1359 BLAKE2B 995a99d18cd9ec5673f26c151acf0da40b64dae9458dea37996224c55fd6d7c626b1dbfce7a07ba798f21d27ebdec70813066cc5c22484da55df522647e890d6 SHA512 322e4eb468a5254273ad1c96b5febd64d206fadde020538e555da5e368f0a07ab8b6c417b1c756ee6a45ae3b38a458981a7799590da7b5f05bfe9e66173b6b06
+EBUILD gcc-15.0.1_pre20250323-r1.ebuild 1452 BLAKE2B 2c427df26493c01541d282a69beb1d25234719cebd4f5bd75f5e1a0da86fed0c3f81932d8299dff57b968ee4b0c8c7b2cdc7c8846c36e4490aa72d8fbb0c3015 SHA512 6216ff4968b2547daac9b8ac81cc992c4a8dd97a401b5488bbf8c6a80d9e3399a4949e77b0cbbeb552f84f20a2c4ac483d320488f45349b202141ce849391d71
EBUILD gcc-15.0.1_pre20250323.ebuild 1359 BLAKE2B 6c1b94944f84702929df803aa967fef49df1f3a0942adcc7d2bf85ad5edf13983da261f4709b98b509b855c153a06cebc76a26bb5cd5c43a0521b09832ad7b74 SHA512 76f32f38f4a35763da98bf3919cb885a72f64f9db945ed957b98875f5d8f00919687eee63d0f70cec55a52eee24146d80928fd779bb224d217020688cf0ea335
EBUILD gcc-15.0.9999.ebuild 1332 BLAKE2B 6f17f77603522bac72d4d57094cc086263a9bfe6273c04d91b169ebc23d78fa2943c0950d4a40fe846d9d92648e54ca54ad1cecd5446ed5710062f9dca569b4b SHA512 4e4a673229a36dee68238e10efb2d9e0ff1c530411395e5230bbf567c92342a4b79d0ecb0ec91573c52fd8b5efd5cf6d20e612971848c9529378e0c42c0e213d
EBUILD gcc-8.5.0-r2.ebuild 549 BLAKE2B 2856372670c76fbe54778c0532815e3510b01b1c8aad99acc3e9183bf6829251952e29887340895625c1e421e19302430ae1a0a8dddcd8470bd71cc221f0b6b0 SHA512 559ba0dbdc7542b6af5d101f19a5b3c9eab38b9996c26330834ffa924fd8c792988f223b492e6ac84255eccbc4af762be50c2d60e84ca24b7a9ebba134608c6d
diff --git a/sys-devel/gcc/files/gcc-15.0.1_pre20250323-disable-musttail.patch b/sys-devel/gcc/files/gcc-15.0.1_pre20250323-disable-musttail.patch
new file mode 100644
index 000000000000..537496f9a2d2
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-15.0.1_pre20250323-disable-musttail.patch
@@ -0,0 +1,199 @@
+https://inbox.sourceware.org/gcc-patches/20250320013102.1336516-1-andi@firstfloor.org/
+
+From 592f60bef27cb60ea6405ca8603449fc4d92e640 Mon Sep 17 00:00:00 2001
+Message-ID: <592f60bef27cb60ea6405ca8603449fc4d92e640.1742435883.git.sam@gentoo.org>
+From: Andi Kleen <ak@gcc.gnu.org>
+Date: Wed, 19 Mar 2025 18:31:02 -0700
+Subject: [PATCH] PR119376: Disable clang musttail
+
+There are multiple reports (see PR 119376) now where semantic differences
+in the gcc musttail implementation break existing programs written for the clang
+variant.
+
+Even though that can be all hopefully fixed eventually,
+for the gcc 15 release it seems safer to disable clang::musttail,
+and only keep gnu::musttail.
+
+That means that programs that use __has_c_attribute to check for
+clang::musttail must opt-in explicitly.
+
+Reported-by: Sam James
+
+gcc/c/ChangeLog:
+
+ PR ipa/119376
+ * c-parser.cc (c_parser_handle_musttail): Drop clang namespace
+ check.
+
+gcc/cp/ChangeLog:
+
+ PR ipa/119376
+ * parser.cc (cp_parser_jump_statement): Drop clang namespace
+ check.
+
+gcc/ChangeLog:
+
+ PR ipa/119376
+ * doc/extend.texi: Drop clang::musttail reference.
+
+gcc/testsuite/ChangeLog:
+
+PR ipa/119376
+ * c-c++-common/musttail23.c: Don't use clang::musttail
+ * c-c++-common/musttail24.c: Dito.
+ * c-c++-common/musttail3.c: Dito.
+ * g++.dg/musttail14.C: Dito.
+---
+ gcc/c/c-parser.cc | 5 -----
+ gcc/cp/parser.cc | 6 ------
+ gcc/doc/extend.texi | 2 +-
+ gcc/testsuite/c-c++-common/musttail23.c | 10 +++++-----
+ gcc/testsuite/c-c++-common/musttail24.c | 6 ------
+ gcc/testsuite/c-c++-common/musttail3.c | 6 +++---
+ gcc/testsuite/g++.dg/musttail14.C | 4 ++--
+ 7 files changed, 11 insertions(+), 28 deletions(-)
+
+diff --git a/gcc/c/c-parser.cc b/gcc/c/c-parser.cc
+index d49d5c58659f..79654448acaa 100644
+--- a/gcc/c/c-parser.cc
++++ b/gcc/c/c-parser.cc
+@@ -7409,11 +7409,6 @@ c_parser_handle_musttail (c_parser *parser, tree std_attrs, attr_state &attr)
+ std_attrs = remove_attribute ("gnu", "musttail", std_attrs);
+ attr.musttail_p = true;
+ }
+- if (lookup_attribute ("clang", "musttail", std_attrs))
+- {
+- std_attrs = remove_attribute ("clang", "musttail", std_attrs);
+- attr.musttail_p = true;
+- }
+ }
+ return std_attrs;
+ }
+diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc
+index 2fb1dc5992d4..da7700b55c64 100644
+--- a/gcc/cp/parser.cc
++++ b/gcc/cp/parser.cc
+@@ -15342,12 +15342,6 @@ cp_parser_jump_statement (cp_parser* parser, tree &std_attrs)
+ musttail_p = true;
+ std_attrs = remove_attribute ("gnu", "musttail", std_attrs);
+ }
+- /* Support this for compatibility. */
+- if (lookup_attribute ("clang", "musttail", std_attrs))
+- {
+- musttail_p = true;
+- std_attrs = remove_attribute ("clang", "musttail", std_attrs);
+- }
+
+ tree ret_expr = expr;
+ if (ret_expr && TREE_CODE (ret_expr) == TARGET_EXPR)
+diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
+index b919df914648..50f95e968ff9 100644
+--- a/gcc/doc/extend.texi
++++ b/gcc/doc/extend.texi
+@@ -10241,7 +10241,7 @@ have to optimize it to just @code{return 42 + 42;}.
+ @cindex @code{musttail} statement attribute
+ @item musttail
+
+-The @code{gnu::musttail} or @code{clang::musttail} standard attribute
++The @code{gnu::musttail} standard attribute
+ or @code{musttail} GNU attribute can be applied to a @code{return} statement
+ with a return-value expression that is a function call. It asserts that the
+ call must be a tail call that does not allocate extra stack space, so it is
+diff --git a/gcc/testsuite/c-c++-common/musttail23.c b/gcc/testsuite/c-c++-common/musttail23.c
+index d2ba70b03250..1ceab1165129 100644
+--- a/gcc/testsuite/c-c++-common/musttail23.c
++++ b/gcc/testsuite/c-c++-common/musttail23.c
+@@ -19,10 +19,10 @@ foo (int x)
+ [[gnu::musttail (1, "", 3)]] return bar (); /* { dg-error "'musttail' attribute does not take any arguments" } */
+ /* { dg-error "expected" "" { target c } .-1 } */
+ if (x == 3)
+- [[clang::musttail (1)]] return bar (); /* { dg-error "'musttail' attribute does not take any arguments" } */
++ [[gnu::musttail (1)]] return bar (); /* { dg-error "'musttail' attribute does not take any arguments" } */
+ /* { dg-error "expected" "" { target c } .-1 } */
+ if (x == 4)
+- [[clang::musttail (1, "", 3)]] return bar (); /* { dg-error "'musttail' attribute does not take any arguments" } */
++ [[gnu::musttail (1, "", 3)]] return bar (); /* { dg-error "'musttail' attribute does not take any arguments" } */
+ /* { dg-error "expected" "" { target c } .-1 } */
+ if (x == 5)
+ __attribute__((fallthrough, musttail)) return bar (); /* { dg-warning "attribute 'musttail' mixed with other attributes on 'return' statement" "" { target c } } */
+@@ -32,14 +32,14 @@ foo (int x)
+ [[fallthrough]] [[gnu::musttail]] return bar (); /* { dg-warning "'fallthrough' attribute ignored" "" { target c } } */
+ /* { dg-warning "attributes at the beginning of statement are ignored" "" { target c++ } .-1 } */
+ if (x == 7)
+- [[clang::musttail, fallthrough]] return bar (); /* { dg-warning "'fallthrough' attribute ignored" "" { target c } } */
++ [[gnu::musttail, fallthrough]] return bar (); /* { dg-warning "'fallthrough' attribute ignored" "" { target c } } */
+ /* { dg-warning "attributes at the beginning of statement are ignored" "" { target c++ } .-1 } */
+ if (x == 8)
+ __attribute__((musttail, musttail)) return bar ();
+ if (x == 9)
+ [[gnu::musttail, gnu::musttail]] return bar ();
+ if (x == 10)
+- [[clang::musttail]] [[clang::musttail]] return bar ();
++ [[gnu::musttail]] [[gnu::musttail]] return bar ();
+ if (x == 11)
+- [[clang::musttail]] [[gnu::musttail]] return bar ();
++ [[gnu::musttail]] [[gnu::musttail]] return bar ();
+ }
+diff --git a/gcc/testsuite/c-c++-common/musttail24.c b/gcc/testsuite/c-c++-common/musttail24.c
+index 10c2d3f188d8..26b8dbfb4c8e 100644
+--- a/gcc/testsuite/c-c++-common/musttail24.c
++++ b/gcc/testsuite/c-c++-common/musttail24.c
+@@ -8,14 +8,8 @@
+ #if !__has_cpp_attribute (gnu::musttail)
+ #error missing gnu::musttail attribute
+ #endif
+-#if !__has_cpp_attribute (clang::musttail)
+-#error missing clang::musttail attribute
+-#endif
+ #else
+ #if !__has_c_attribute (gnu::musttail)
+ #error missing gnu::musttail attribute
+ #endif
+-#if !__has_c_attribute (clang::musttail)
+-#error missing clang::musttail attribute
+-#endif
+ #endif
+diff --git a/gcc/testsuite/c-c++-common/musttail3.c b/gcc/testsuite/c-c++-common/musttail3.c
+index 7499fd6460b4..daedca28852a 100644
+--- a/gcc/testsuite/c-c++-common/musttail3.c
++++ b/gcc/testsuite/c-c++-common/musttail3.c
+@@ -11,7 +11,7 @@ struct str
+ cstruct (int x)
+ {
+ if (x < 10)
+- [[clang::musttail]] return cstruct (x + 1);
++ [[gnu::musttail]] return cstruct (x + 1);
+ return ((struct str){ x, 0 });
+ }
+
+@@ -19,11 +19,11 @@ int
+ foo (int x)
+ {
+ if (x < 10)
+- [[clang::musttail]] return foo2 (x, 29);
++ [[gnu::musttail]] return foo2 (x, 29);
+ if (x < 100)
+ {
+ int k = foo (x + 1);
+- [[clang::musttail]] return k; /* { dg-error "cannot tail-call: " } */
++ [[gnu::musttail]] return k; /* { dg-error "cannot tail-call: " } */
+ }
+ return x;
+ }
+diff --git a/gcc/testsuite/g++.dg/musttail14.C b/gcc/testsuite/g++.dg/musttail14.C
+index 810b45546d61..e4764a3bc03b 100644
+--- a/gcc/testsuite/g++.dg/musttail14.C
++++ b/gcc/testsuite/g++.dg/musttail14.C
+@@ -58,8 +58,8 @@ garply (int x)
+ case 3:
+ __attribute__(()) [[gnu::musttail]] __attribute__(()) [[]] __attribute__(()) return qux (45);
+ case 4:
+- [[]] __attribute__(()) [[clang::musttail]] __attribute__(()) [[]] return corge (46);
++ [[]] __attribute__(()) [[gnu::musttail]] __attribute__(()) [[]] return corge (46);
+ default:
+- __attribute__(()) [[clang::musttail]] __attribute__(()) [[]] __attribute__(()) return freddy (47);
++ __attribute__(()) [[gnu::musttail]] __attribute__(()) [[]] __attribute__(()) return freddy (47);
+ }
+ }
+--
+2.49.0
diff --git a/sys-devel/gcc/files/gcc-15.0.1_pre20250323-e2fsprogs.patch b/sys-devel/gcc/files/gcc-15.0.1_pre20250323-e2fsprogs.patch
new file mode 100644
index 000000000000..5619bd5ef5a4
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-15.0.1_pre20250323-e2fsprogs.patch
@@ -0,0 +1,112 @@
+https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=584b346a4c7a6e6e77da6dc80968401a3c08161d
+
+From 584b346a4c7a6e6e77da6dc80968401a3c08161d Mon Sep 17 00:00:00 2001
+From: Jakub Jelinek <jakub@redhat.com>
+Date: Tue, 25 Mar 2025 16:55:24 +0100
+Subject: [PATCH] i386: Fix up combination of -2 r<<= (x & 7) into btr
+ [PR119428]
+
+The following patch is miscompiled from r15-8478 but latently already
+since my r11-5756 and r11-6631 changes.
+The r11-5756 change was
+https://gcc.gnu.org/pipermail/gcc-patches/2020-December/561164.html
+which changed the splitters to immediately throw away the masking.
+And the r11-6631 change was an optimization to recognize
+(set (zero_extract:HI (...) (const_int 1) (...)) (const_int 1)
+as btr.
+
+The problem is their interaction. x86 is not a SHIFT_COUNT_TRUNCATED
+target, so the masking needs to be explicit in the IL.
+And combine.cc (make_field_assignment) has since 1992 optimizations
+which try to optimize x &= (-2 r<< y) into zero_extract (x) = 0.
+Now, such an optimization is fine if y has not been masked or if the
+chosen zero_extract has the same mode as the rotate (or it recognizes
+something with a left shift too). IMHO such optimization is invalid
+for SHIFT_COUNT_TRUNCATED targets because we explicitly say that
+the masking of the shift/rotate counts are redundant there and don't
+need to be part of the IL (I have a patch for that, but because it
+is just latent, I'm not sure it needs to be posted for gcc 15 (and
+also am not sure if it should punt or add operand masking just in case)).
+x86 is not SHIFT_COUNT_TRUNCATED though and so even fixing combine
+not to do that for SHIFT_COUNT_TRUNCATED targets doesn't help, and we don't
+have QImode insv, so it is optimized into HImode insertions. Now,
+if the y in x &= (-2 r<< y) wasn't masked in any way, turning it into
+HImode btr is just fine, but if it was x &= (-2 r<< (y & 7)) and we just
+decided to throw away the masking, using btr changes the behavior on it
+and causes e2fsprogs and sqlite miscompilations.
+
+So IMHO on !SHIFT_COUNT_TRUNCATED targets, we need to keep the maskings
+explicit in the IL, either at least for the duration of the combine pass
+as does the following patch (where combine is the only known pass to have
+such transformation), or even keep it until final pass in case there are
+some later optimizations that would also need to know whether there was
+explicit masking or not and with what mask. The latter change would be
+much larger.
+
+The following patch just reverts the r11-5756 change and adds a testcase.
+
+2025-03-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/96226
+ PR target/119428
+ * config/i386/i386.md (splitter after *<rotate_insn><mode>3_mask,
+ splitter after *<rotate_insn><mode>3_mask_1): Revert 2020-12-05
+ changes.
+
+ * gcc.c-torture/execute/pr119428.c: New test.
+---
+ gcc/config/i386/i386.md | 6 ++++--
+ gcc/testsuite/gcc.c-torture/execute/pr119428.c | 18 ++++++++++++++++++
+ 2 files changed, 22 insertions(+), 2 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr119428.c
+
+diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
+index 2b3cffc1f350..9d1b34e55959 100644
+--- a/gcc/config/i386/i386.md
++++ b/gcc/config/i386/i386.md
+@@ -18168,7 +18168,8 @@
+ [(set (match_dup 4) (match_dup 1))
+ (set (match_dup 0)
+ (any_rotate:SWI (match_dup 4)
+- (subreg:QI (match_dup 2) 0)))]
++ (subreg:QI
++ (and:SI (match_dup 2) (match_dup 3)) 0)))]
+ "operands[4] = gen_reg_rtx (<MODE>mode);")
+
+ (define_insn_and_split "*<insn><mode>3_mask_1"
+@@ -18202,7 +18203,8 @@
+ == GET_MODE_BITSIZE (<MODE>mode) - 1"
+ [(set (match_dup 4) (match_dup 1))
+ (set (match_dup 0)
+- (any_rotate:SWI (match_dup 4) (match_dup 2)))]
++ (any_rotate:SWI (match_dup 4)
++ (and:QI (match_dup 2) (match_dup 3))))]
+ "operands[4] = gen_reg_rtx (<MODE>mode);")
+
+ (define_insn_and_split "*<insn><mode>3_add"
+diff --git a/gcc/testsuite/gcc.c-torture/execute/pr119428.c b/gcc/testsuite/gcc.c-torture/execute/pr119428.c
+new file mode 100644
+index 000000000000..33a93f46b3bd
+--- /dev/null
++++ b/gcc/testsuite/gcc.c-torture/execute/pr119428.c
+@@ -0,0 +1,18 @@
++/* PR target/119428 */
++
++__attribute__((noipa)) void
++foo (unsigned int x, unsigned char *y)
++{
++ y += x >> 3;
++ *y &= (unsigned char) ~(1 << (x & 0x07));
++}
++
++int
++main ()
++{
++ unsigned char buf[8];
++ __builtin_memset (buf, 0xff, 8);
++ foo (8, buf);
++ if (buf[1] != 0xfe)
++ __builtin_abort ();
++}
+--
+2.43.5
diff --git a/sys-devel/gcc/gcc-15.0.1_pre20250323-r1.ebuild b/sys-devel/gcc/gcc-15.0.1_pre20250323-r1.ebuild
new file mode 100644
index 000000000000..1e3625724cb0
--- /dev/null
+++ b/sys-devel/gcc/gcc-15.0.1_pre20250323-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+TOOLCHAIN_HAS_TESTS=1
+PATCH_GCC_VER="15.0.0"
+PATCH_VER="48"
+MUSL_VER="2"
+MUSL_GCC_VER="15.0.0"
+PYTHON_COMPAT=( python3_{10..12} )
+
+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}-e2fsprogs.patch
+ eapply "${FILESDIR}"/${P}-disable-musttail.patch
+ eapply_user
+}