sys-devel/gcc: Sync with Gentoo

It's from Gentoo commit e29b38741763c5919e572ea0b7b5a2aff18f9751.
This commit is contained in:
Flatcar Buildbot 2025-03-31 07:11:42 +00:00
parent 55af27bf5f
commit 3b915b8b13
30 changed files with 362 additions and 437 deletions

View File

@ -6,32 +6,32 @@ DIST gcc-11.5.0-patches-1.tar.xz 13664 BLAKE2B 64fd9c2d074aca58ecd8c0035ccf2d2b8
DIST gcc-11.5.0.tar.xz 82399864 BLAKE2B f4a61faad32aac9e9cb553c1a1a011df0a057f6e2cac92a13cc7e285d08191dd4a117f41a8faac2359c0e2a16f954c7fef354dda9df8c63bff1c5cefda82602c SHA512 88f17d5a5e69eeb53aaf0a9bc9daab1c4e501d145b388c5485ebeb2cc36178fbb2d3e49ebef4a8c007a05e88471a06b97cf9b08870478249f77fbfa3d4abd9a8
DIST gcc-12-20241219.tar.xz 79920016 BLAKE2B 71044352515f33eaf0bcc64cc6eacdecb8b7b1dbca6d8836b629f76e60320f5090178ff37b6804fbda0913c0f55afca37588647974fd72e9961edd338ccf6ffb SHA512 e0c08366f392083feb1ae242242e9bd335681234808ed44d4e75afe157be2814bef321d2327186d217f38bbb6176706e1258228904d31fdb3bb37c8e245dacb0
DIST gcc-12-20250227.tar.xz 79915940 BLAKE2B 0adb19847cb3f317316549f657434654b9923806366a4b95e496effea9c07995b7d3de65c40cc2f62ba1e87cfb0f8cd8a1a833284042fdc5e6fce2bd7e7e9543 SHA512 d01cad1771762f5b56c783d6a3b39415be1c7619229b5ff056fe40ef0bf821c67a2d1a2272c2227a44f92825582579625352d19e2342d11f76a079556dae0ae8
DIST gcc-12-20250306.tar.xz 79914120 BLAKE2B 52744beac63301b3e0f2564efc82384f6452cd05bb2543f3c421d14fdfc4eed107d25d24183e9d7045d33f1e9f14741b8cb8580bb0c7e8cda8b3e5b4dd5e0d4e SHA512 585aeab071fda880a6ad5c9e0e766164683faf4e84ad63764ad7dc0420fe5e355452338234f76f6f2cb2b25f4b39b059658323f53594c2c7da3db6631c69a14c
DIST gcc-12-20250313.tar.xz 79917528 BLAKE2B 2ce76d12f0d90d5728df2e14ece3c13e781005eac43dd10357602efc1dd3a9c939fee7640c1baae643df88354905bdbcd314d6bb7c7f384df9148074d8448afc SHA512 465a9923c8ebef98cf4590096afd44468993116cf38ba1e5bbbc70dfb57ec1716ad55a544dc12444011663dc8cd3c9a7c19326d69dfcea181d07783a0aceb73f
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.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
DIST gcc-12.4.0.tar.xz 83377372 BLAKE2B 0d5aa9995bf53fa2dc976a846240cfb8fafd125ad6c54f45dc9d770215eae3e9ea0db82a9a4f79c51b4d5f8461a1d730c17db6841bc31bd96dba11d9ed7544ae SHA512 5bd29402cad2deb5d9388d0236c7146414d77e5b8d5f1c6c941c7a1f47691c3389f08656d5f6e8e2d6717bf2c81f018d326f632fb468f42925b40bd217fc4853
DIST gcc-13-20241220.tar.xz 84504500 BLAKE2B 60d6dcdcafa36399a0c0de7fef3a4eb4ca8e0b6780cd31c9eace2965c53115205bf64e8247b833a4375c1e3ad2d94820b5bdc97a4689be95d8ab55a676afa689 SHA512 10fe009dc3b8872b24350e4fb999f71b848bd5a03e48e8292f76e6eca3dbdef8383a3b13b813aada983ebdbe3ecab1642961b3210cd1e0063a86655a44493017
DIST gcc-13-20250301.tar.xz 84525780 BLAKE2B c366f4de63b7956abb1bf2d1039acdf90c7a801adbb2793e4c199b0f743d143327aac9c2b078991f802da758ed4326dd913d9f60aec4fc471eff9af72f781a8e SHA512 075bfb3c5aeaf1c9bf7ab69ef117fcc1fd3ce1042edc9442d95df717e622c2ea9cfabbabf8be5eda32b3cf115d7d3e73907fd577a69f0beb6895f7ec2c5fc813
DIST gcc-13-20250307.tar.xz 84518416 BLAKE2B 2afe5b57ab2d6af1800c3c74ab629e9033ec4368471d103377958d5225912ffa259f1fbb9d04804f817df9527b7659913ff762b40147a40f65eaa1caaef2c4f5 SHA512 c2a63fcab70db6a5123347897a47a60d7423723e3e202e4c56c77f50caeb460b629d7fa3af9102467c73271273e7018fc431f2254993b039d5270ba093c7a865
DIST gcc-13-20250314.tar.xz 84540844 BLAKE2B 7e032e0fafeb9eb47f8acb387d49d024fb44ba54d782c0afce26b0751b099208212a5a977d3c027a9c5c0efc3d3a5ed99ad98e56b16f2cabf234cc8bca89e6de SHA512 51320889e0e959b763bdcb1334d38aff48ba6099e6bcc75055633d81a17e1f59c71e81597ec391eab95f86614b7b62cff37aa00827c61d949d6596f9ba36fb9c
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.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
DIST gcc-13.3.0-patches-2.tar.xz 44440 BLAKE2B ebde73f6c3cd1a5fdc5bbce36414a59dda0925cba9d422d3689fc9c14fece44ee2391982a674411aa99bf47ffd49200f3ce51cc908beb8298adfff78e709a84c SHA512 eb56e0d7e69b5c3cca21f4cbff21c1204cf64ede7e66d689f45cf5ff37de8a59f24eb1f4b30d9c4222fd4126654fe4ffc146851f504761014995553c1202e8fd
DIST gcc-14-20241221.tar.xz 88198252 BLAKE2B 7491c2e1c8885e201859143bdf5cae95af4c0db77709ec7d761ad535df30042f5deb8488ba7c508de3673e4b0f2af1de8d17476f39cd47b745ddccec6a9e4470 SHA512 91fe1e1d1f8e8fad64930a2eadf942a542bd42f841fceb49f475bccac00f04692b8cd38821ea9ee05f78b5c51001d8bd39df5f71f3a3d89aab8980019cea9be8
DIST gcc-14-20250301.tar.xz 88230928 BLAKE2B 2b65e7cccbf431a74df73adac53995873e78240d7abd97e9c9c576806c389b3c1abb6d47710a25a26f2ee399de750a07c3fb7916a580875d08a3a83354d89c1c SHA512 6b2afe19ce95a595307ae10b89054927116d33b499f1ef8233936d719271c04cb8f66890068ef2252c59ab0276dd0e6210990cb88abdfb4965818c25949f431e
DIST gcc-14-20250308.tar.xz 88224372 BLAKE2B d5b76b553cc48aa16a4d00fb1ba232856a52deef32049a10b9d2ffe7a010a5afbc782ad1ebec0a2546ec74703e0afabea936d81180b19ce8c4786d07b0495bf2 SHA512 900a43be42471e6d9484dbfdc972065fcd342908d0115f28edb35ff371e3f4ae0e219e99a4ecd52bcd23a156b3df2da80d508e2236cbb7495ae3df655154dc9c
DIST gcc-14-20250315.tar.xz 88211476 BLAKE2B e99ef61416fc5fdec4e2c65257bf36e8d2e8f8a61e558dd989682e53c9d33253aca897834f0fd7060b1055f0cb7accd88a41db96e03d7f924d76cbd51dd8c1a8 SHA512 2c288ff52d730e2a8bb4600519cc2ddb1de140377c7dccefa7f268032b86c4f51b87f563abc0d6393bb7a2d7de5d0d2d6f7105869e9c998ae33479dcec7b0f39
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.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-20250309.tar.xz 90853908 BLAKE2B 403b9b3a2eb1ed5d23558eff000784b8b6345c419b9050d68e38343a30ceb58c7ddaebb44c345668c98e19f66c1dd1edcc22a3a911754cb85f8fbfc6559ba3f1 SHA512 b20760997cf8111429524ca1400e1a23c328e303a8b4652cd859dcc3dc3e2dd11c72cf9e1b744c88374ebdb9fbb90f217ffe892eca24e581b781e2741b177d04
DIST gcc-15-20250316.tar.xz 91424124 BLAKE2B 4a33b98d04961a8dd2bdc2890d0e1547902fc6bba63cea1b995bc82c6ef1b384a0843792961cd77162cae948808d41c2d5758f526371bbc501143c575e683a10 SHA512 5bd5a524b76a523a1979054bebc10ddbe3dce4c1f905b123dc8da983506c4cefb34cc035234845c021d4f7b3110dd5a8383da9c134af0bc54a154a0cdac8eea5
DIST gcc-15-20250323.tar.xz 91685912 BLAKE2B cd56bfe95b80358cbc44ae27a15d297d60630495f452e5d8158f5dfb7be457cdbb144226ef3bc8bdac6eec7f9e20185240a7a4ddc229ab96b7a9ef5c502c308a SHA512 45e44a9136c466ef1ace86129cc5e4629f4cbeefd896967ef9701711a09f806ac0505232f5eb840823aeaca82c8e6107b6cbb3ea7b912264402b4faf5cd19788
DIST gcc-15-20250330.tar.xz 91772420 BLAKE2B 164a4db7f83d40a010edbed11ecf949e459a5f0c866425812299d55ed96965fcc537bb40190dc78a16f66dfaa8da110b74fb612d8e76fe29ce4031d6196ef0b3 SHA512 719f5b1d79cd8ba4462d6916b1ddb401ca7ee9a9596610e6be00085fdf0d20c7ccbdc88983a22cfea73a0b21b28e1edb8dfd095ca95696362d1d9d62fe6551c2
DIST gcc-15.0.0-musl-patches-2.tar.xz 3076 BLAKE2B 0073248fe4f7dd827980559017b5aa1fb5c4c46acc9ad5c410dc152fd1e44966d3066bf7152338573cb45b1c36027de5f0c519abd414d97a37bccef07f6a5281 SHA512 295f1a669020bbe2874e9b03afd46b5d083073b276fca3543f3767a2d74f35df81cf0a67abad50c200cf7a3af36ec98ff9977cb7d5c19f334af7d3bb1926a3de
DIST gcc-15.0.0-patches-46.tar.xz 22212 BLAKE2B 159b2693ded0b1dbddd271ca56d7f6db3569a8f79155521737b968ad131eee2730d3441dacef821b9dcd31b17ca0bf16a7b24001e7cb4ae1b36c55750184a3f6 SHA512 26d293ee368c75570e606949480feed18a69baad4687beaf2f50629bfc72d542bbce4b1cb6580fe7e578409a108891dc9762bb15c53b611434c83db5dd83d695
DIST gcc-15.0.0-patches-47.tar.xz 16456 BLAKE2B c1b60eb5b0717f74ca528462e7cddfc6c2386cc122e8d0394152e974e092ae7c29bcfd96e7dbfde85aaa9194950dd867aef59fea17f1be1bb0f9f30eb192cd3f SHA512 c2f74c561eaa5b158de44b251116a923f3e81e5c5b6126d7cb387211c83697813fc22695ae36d245844e3e0dd2a6076fd710fbbed39965a151209a34812ba752
DIST gcc-15.0.0-patches-48.tar.xz 18120 BLAKE2B bfb1e7330c1c0499d2d0a0046506961cccaac1df8e5779f9de599e8b6d89e9014b512072159ed18fb58243e95716b79aaa0d7665e7742ceda117d40a867cf34f SHA512 1cc61250e943e2cae543a5336fdc9ad04851186f8f45e4b82cb9be287a804374e84066cec0efd55662211107cecde92f78b6d3c745e421bc83b3d60101be9ebd
DIST gcc-15.0.0-patches-50.tar.xz 25208 BLAKE2B 09e98c3dcdd3c60ede26c6e322d513b3df09efddfa21ea95b2cb7c3ee57b4c054f41fc60668706e33e56f022ef4b7cb96f7cc01b4a25d62d9777ef8b3b0d1ade SHA512 3b69d97a08c894a387fbcc4934bf0c519af8f66aff394c2a2565ed545fcb93f0bd70526cc74f5d952047d8d6782847c6d8e4aa7a408f0f89b1666c747ada8b4d
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

@ -1,231 +0,0 @@
From a41b3f54c13890b1327bb3d4fbae8f7feb37d00b Mon Sep 17 00:00:00 2001
Message-ID: <a41b3f54c13890b1327bb3d4fbae8f7feb37d00b.1740542521.git.sam@gentoo.org>
From: Jakub Jelinek <jakub@redhat.com>
Date: Tue, 25 Feb 2025 09:26:46 +0100
Subject: [PATCH] c++: Fix range for with PMFs [PR118923]
The following testcases segfault because the new range for -frange-for-ext-temps
temporary extension extends even the internal TARGET_EXPRs created by
get_member_function_from_ptrfunc.
The following patch fixes that by using get_internal_target_expr for those
instead of force_target_expr (similarly in cp_finish_decl and
build_comparison_op) and using force_target_expr inside of
get_internal_target_expr.
2025-02-25 Jakub Jelinek <jakub@redhat.com>
PR c++/118923
* tree.cc (get_internal_target_expr): Use force_target_expr
instead of build_target_expr_with_type.
* typeck.cc (get_member_function_from_ptrfunc): Use
get_internal_target_expr instead of force_target_expr.
* decl.cc (cp_finish_decl): Likewise.
* method.cc (build_comparison_op): Likewise.
* g++.dg/cpp0x/pr118923.C: New test.
* g++.dg/cpp1y/pr118923.C: New test.
---
gcc/cp/decl.cc | 6 +--
gcc/cp/method.cc | 2 +-
gcc/cp/tree.cc | 3 +-
gcc/cp/typeck.cc | 6 +--
gcc/testsuite/g++.dg/cpp0x/pr118923.C | 66 +++++++++++++++++++++++++++
gcc/testsuite/g++.dg/cpp1y/pr118923.C | 38 +++++++++++++++
6 files changed, 110 insertions(+), 11 deletions(-)
create mode 100644 gcc/testsuite/g++.dg/cpp0x/pr118923.C
create mode 100644 gcc/testsuite/g++.dg/cpp1y/pr118923.C
diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc
index 05ad9bb24d59..936e48e907e2 100644
--- a/gcc/cp/decl.cc
+++ b/gcc/cp/decl.cc
@@ -9377,8 +9377,7 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p,
tree guard = NULL_TREE;
if (cleanups || cleanup)
{
- guard = force_target_expr (boolean_type_node,
- boolean_false_node, tf_none);
+ guard = get_internal_target_expr (boolean_false_node);
add_stmt (guard);
guard = TARGET_EXPR_SLOT (guard);
}
@@ -9407,8 +9406,7 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p,
popped that all, so push those extra cleanups around
the whole sequence with a guard variable. */
gcc_assert (TREE_CODE (sl) == STATEMENT_LIST);
- guard = force_target_expr (integer_type_node,
- integer_zero_node, tf_none);
+ guard = get_internal_target_expr (integer_zero_node);
add_stmt (guard);
guard = TARGET_EXPR_SLOT (guard);
for (unsigned i = 0; i < n_extra_cleanups; ++i)
diff --git a/gcc/cp/method.cc b/gcc/cp/method.cc
index 3914bbb1ef23..05c19cf0661e 100644
--- a/gcc/cp/method.cc
+++ b/gcc/cp/method.cc
@@ -1597,7 +1597,7 @@ build_comparison_op (tree fndecl, bool defining, tsubst_flags_t complain)
/* Some other array, will need runtime loop. */
else
{
- idx = force_target_expr (sizetype, maxval, complain);
+ idx = get_internal_target_expr (maxval);
loop_indexes = tree_cons (idx, NULL_TREE, loop_indexes);
}
expr_type = TREE_TYPE (expr_type);
diff --git a/gcc/cp/tree.cc b/gcc/cp/tree.cc
index 5628a576f01b..5863b6878f02 100644
--- a/gcc/cp/tree.cc
+++ b/gcc/cp/tree.cc
@@ -982,8 +982,7 @@ tree
get_internal_target_expr (tree init)
{
init = convert_bitfield_to_declared_type (init);
- tree t = build_target_expr_with_type (init, TREE_TYPE (init),
- tf_warning_or_error);
+ tree t = force_target_expr (TREE_TYPE (init), init, tf_warning_or_error);
TARGET_EXPR_INTERNAL_P (t) = true;
return t;
}
diff --git a/gcc/cp/typeck.cc b/gcc/cp/typeck.cc
index a9c32ff930d5..bbaca960bd7c 100644
--- a/gcc/cp/typeck.cc
+++ b/gcc/cp/typeck.cc
@@ -4219,16 +4219,14 @@ get_member_function_from_ptrfunc (tree *instance_ptrptr, tree function,
&& !DECL_P (instance_ptr)
&& !TREE_CONSTANT (instance_ptr)))
instance_ptr = instance_save_expr
- = force_target_expr (TREE_TYPE (instance_ptr), instance_ptr,
- complain);
+ = get_internal_target_expr (instance_ptr);
/* See above comment. */
if (TREE_SIDE_EFFECTS (function)
|| (!nonvirtual
&& !DECL_P (function)
&& !TREE_CONSTANT (function)))
- function
- = force_target_expr (TREE_TYPE (function), function, complain);
+ function = get_internal_target_expr (function);
/* Start by extracting all the information from the PMF itself. */
e3 = pfn_from_ptrmemfunc (function);
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr118923.C b/gcc/testsuite/g++.dg/cpp0x/pr118923.C
new file mode 100644
index 000000000000..55d3052b61f3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr118923.C
@@ -0,0 +1,66 @@
+// PR c++/118923
+// { dg-do run { target c++11 } }
+// { dg-additional-options "-frange-for-ext-temps" { target c++23 } }
+// { dg-additional-options "-fno-range-for-ext-temps" { target c++20_down } }
+
+int g;
+
+struct A {
+ int a[3];
+ A (int x, int y, int z) : a{x, y, z} { if ((g++ & 7) != 4) __builtin_abort (); }
+ A (const A &x) = delete;
+ ~A () { if ((g++ & 7) != 7 - 2 * (__cpp_range_based_for >= 202211)) __builtin_abort (); }
+ int *begin () { return a; }
+ int *end () { return a + 3; }
+};
+
+struct B {
+ B () { if ((g++ & 7) != 3) __builtin_abort (); }
+ B (const B &) = delete;
+ ~B () { if ((g++ & 7) != 5 + (__cpp_range_based_for >= 202211)) __builtin_abort (); }
+};
+
+struct C {
+ A foo (const B &) { return { 1, 2, 3 }; }
+ A bar (const B &) { return { 4, 5, 6 }; }
+ bool baz () { return b; }
+ bool b = false;
+ static C c;
+};
+
+C C::c;
+
+struct D {
+ D () { if ((g++ & 5) != 0) __builtin_abort (); }
+ D (const D &) = delete;
+ ~D () { if ((g & 7) != 1 && (g & 7) != 6 + (__cpp_range_based_for >= 202211)) __builtin_abort (); g++; }
+};
+
+inline C *
+qux (const D &)
+{
+ return &C::c;
+}
+
+void
+foo ()
+{
+ int z = 1;
+ auto d = qux (D {})->baz () ? &C::bar : &C::foo;
+ for (const int &r : (qux (D {})->*d) (B {}))
+ if (z++ != r)
+ __builtin_abort ();
+ C::c.b = true;
+ d = qux (D {})->baz () ? &C::bar : &C::foo;
+ for (const int &r : (qux (D {})->*d) (B {}))
+ if (z++ != r)
+ __builtin_abort ();
+}
+
+int
+main ()
+{
+ foo ();
+ if (g != 16)
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr118923.C b/gcc/testsuite/g++.dg/cpp1y/pr118923.C
new file mode 100644
index 000000000000..b375f47a7d0f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr118923.C
@@ -0,0 +1,38 @@
+// PR c++/118923
+// { dg-do run { target c++14 } }
+
+struct A {
+ int a[3] = { 0, 0, 0 };
+ int *begin () { return a; }
+ int *end () { return a + 3; }
+};
+
+struct B {
+ A foo () { return { 1, 2, 3 }; }
+ A bar () { return { 1, 2, 3 }; }
+ bool baz () { return b; }
+ bool b = false;
+ static B c;
+};
+
+B B::c;
+
+inline B *
+qux ()
+{
+ return &B::c;
+}
+
+void
+foo ()
+{
+ auto d = qux ()->baz () ? &B::foo : &B::bar;
+ for (const int &r : (qux ()->*d) ())
+ ;
+}
+
+int
+main ()
+{
+ foo ();
+}
--
2.48.1

View File

@ -1,99 +0,0 @@
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=f22e89167b3abfbf6d67f42fc4d689d8ffdc1810
https://gcc.gnu.org/PR119067
From f22e89167b3abfbf6d67f42fc4d689d8ffdc1810 Mon Sep 17 00:00:00 2001
From: Richard Biener <rguenther@suse.de>
Date: Mon, 3 Mar 2025 09:54:15 +0100
Subject: [PATCH] ipa/119067 - bogus TYPE_PRECISION check on VECTOR_TYPE
odr_types_equivalent_p can end up using TYPE_PRECISION on vector
types which is a no-go. The following instead uses TYPE_VECTOR_SUBPARTS
for vector types so we also end up comparing the number of vector elements.
PR ipa/119067
* ipa-devirt.cc (odr_types_equivalent_p): Check
TYPE_VECTOR_SUBPARTS for vectors.
* g++.dg/lto/pr119067_0.C: New testcase.
* g++.dg/lto/pr119067_1.C: Likewise.
---
gcc/ipa-devirt.cc | 10 +++++++++-
gcc/testsuite/g++.dg/lto/pr119067_0.C | 22 ++++++++++++++++++++++
gcc/testsuite/g++.dg/lto/pr119067_1.C | 10 ++++++++++
3 files changed, 41 insertions(+), 1 deletion(-)
create mode 100644 gcc/testsuite/g++.dg/lto/pr119067_0.C
create mode 100644 gcc/testsuite/g++.dg/lto/pr119067_1.C
diff --git a/gcc/ipa-devirt.cc b/gcc/ipa-devirt.cc
index c31658f57ef2..532e25e87c60 100644
--- a/gcc/ipa-devirt.cc
+++ b/gcc/ipa-devirt.cc
@@ -1259,13 +1259,21 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned,
|| TREE_CODE (t1) == OFFSET_TYPE
|| POINTER_TYPE_P (t1))
{
- if (TYPE_PRECISION (t1) != TYPE_PRECISION (t2))
+ if (!VECTOR_TYPE_P (t1) && TYPE_PRECISION (t1) != TYPE_PRECISION (t2))
{
warn_odr (t1, t2, NULL, NULL, warn, warned,
G_("a type with different precision is defined "
"in another translation unit"));
return false;
}
+ if (VECTOR_TYPE_P (t1)
+ && maybe_ne (TYPE_VECTOR_SUBPARTS (t1), TYPE_VECTOR_SUBPARTS (t2)))
+ {
+ warn_odr (t1, t2, NULL, NULL, warn, warned,
+ G_("a vector type with different number of elements "
+ "is defined in another translation unit"));
+ return false;
+ }
if (TYPE_UNSIGNED (t1) != TYPE_UNSIGNED (t2))
{
warn_odr (t1, t2, NULL, NULL, warn, warned,
diff --git a/gcc/testsuite/g++.dg/lto/pr119067_0.C b/gcc/testsuite/g++.dg/lto/pr119067_0.C
new file mode 100644
index 000000000000..e0f813ceffed
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/pr119067_0.C
@@ -0,0 +1,22 @@
+/* { dg-lto-do link } */
+/* { dg-skip-if "" { ! { x86_64-*-* i?86-*-* } } } */
+/* { dg-require-effective-target avx2 } */
+/* { dg-require-effective-target shared } */
+/* { dg-lto-options { { -O2 -fPIC -flto } } } */
+/* { dg-extra-ld-options { -shared } } */
+
+#pragma GCC push_options
+#pragma GCC target("avx2")
+typedef char __v32qi __attribute__ ((__vector_size__ (32)));
+struct ff
+{
+ __v32qi t;
+};
+__v32qi g(struct ff a);
+
+__v32qi h(__v32qi a)
+{
+ struct ff t = {a};
+ return g(t);
+}
+#pragma GCC pop_options
diff --git a/gcc/testsuite/g++.dg/lto/pr119067_1.C b/gcc/testsuite/g++.dg/lto/pr119067_1.C
new file mode 100644
index 000000000000..d8e2935fa24d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/pr119067_1.C
@@ -0,0 +1,10 @@
+/* { dg-options "-mavx2" } */
+
+typedef char __v32qi __attribute__ ((__vector_size__ (32)));
+struct ff
+{
+ __v32qi t;
+};
+__v32qi g(struct ff a) {
+ return a.t;
+}
--
2.43.5

View File

@ -1,58 +0,0 @@
https://inbox.sourceware.org/gcc-patches/ri6bjui45il.fsf@virgil.suse.cz/
From 833d679c3c071b78dfb22015fe03d2cecfd650ec Mon Sep 17 00:00:00 2001
Message-ID: <833d679c3c071b78dfb22015fe03d2cecfd650ec.1741019831.git.sam@gentoo.org>
From: Martin Jambor <mjambor@suse.cz>
Date: Mon, 3 Mar 2025 14:18:10 +0100
Subject: [PATCH] ipa-cp: Avoid ICE when redistributing nodes among edges to
recursive clones (PR 118318)
Hi,
PR 118318 reported an ICE during PGO build of Firefox when IPA-CP, in
the final stages of update_counts_for_self_gen_clones where it
attempts to guess how to distribute profile count among clones created
for recursive edges and the various edges that are created in the
process. If one such edge has profile count of kind GUESSED_GLOBAL0,
the compatibility check in the operator+ will lead to an ICE. After
discussing the situation with Honza, we concluded that there is little
more we can do other than check for this situation before touching the
edge count, so this is what this patch does.
Bootstrapped and LTO-profile-bootstrapped and tested on x86_64. OK for
master? (Should I then backport this to active release branches? I
guess it would make sense.)
Thanks,
Martin
gcc/ChangeLog:
2025-02-28 Martin Jambor <mjambor@suse.cz>
PR ipa/118318
* ipa-cp.cc (adjust_clone_incoming_counts): Add a compatible_p check.
---
gcc/ipa-cp.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/ipa-cp.cc b/gcc/ipa-cp.cc
index 3c994f24f540..264568989a96 100644
--- a/gcc/ipa-cp.cc
+++ b/gcc/ipa-cp.cc
@@ -4638,7 +4638,8 @@ adjust_clone_incoming_counts (cgraph_node *node,
cs->count = cs->count.combine_with_ipa_count (sum);
}
else if (!desc->processed_edges->contains (cs)
- && cs->caller->clone_of == desc->orig)
+ && cs->caller->clone_of == desc->orig
+ && cs->count.compatible_p (desc->count))
{
cs->count += desc->count;
if (dump_file)
base-commit: f1c30c6213fb228f1e8b5973d10c868b834a4acd
--
2.48.1

View File

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

View File

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

View File

@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -9,7 +9,7 @@ PATCH_GCC_VER="10.5.0"
PATCH_VER="6"
MUSL_VER="2"
MUSL_GCC_VER="10.5.0"
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
if [[ ${PV} == *.9999 ]] ; then
MY_PV_2=$(ver_cut 2)

View File

@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -9,7 +9,7 @@ PATCH_GCC_VER="11.5.0"
PATCH_VER="1"
MUSL_VER="2"
MUSL_GCC_VER="11.4.0"
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
if [[ ${PV} == *.9999 ]] ; then
MY_PV_2=$(ver_cut 2)

View File

@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -9,7 +9,7 @@ PATCH_GCC_VER="12.4.0"
PATCH_VER="1"
MUSL_VER="1"
MUSL_GCC_VER="12.4.0"
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
if [[ ${PV} == *.9999 ]] ; then
MY_PV_2=$(ver_cut 2)

View File

@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -9,7 +9,7 @@ PATCH_GCC_VER="12.4.0"
PATCH_VER="2"
MUSL_VER="1"
MUSL_GCC_VER="12.4.0"
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
if [[ ${PV} == *.9999 ]] ; then
MY_PV_2=$(ver_cut 2)

View File

@ -9,7 +9,7 @@ PATCH_GCC_VER="12.4.0"
PATCH_VER="2"
MUSL_VER="1"
MUSL_GCC_VER="12.4.0"
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
if [[ ${PV} == *.9999 ]] ; then
MY_PV_2=$(ver_cut 2)

View File

@ -9,7 +9,7 @@ PATCH_GCC_VER="12.4.0"
PATCH_VER="2"
MUSL_VER="1"
MUSL_GCC_VER="12.4.0"
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
if [[ ${PV} == *.9999 ]] ; then
MY_PV_2=$(ver_cut 2)

View File

@ -9,7 +9,7 @@ PATCH_GCC_VER="12.4.0"
PATCH_VER="2"
MUSL_VER="1"
MUSL_GCC_VER="12.4.0"
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
if [[ ${PV} == *.9999 ]] ; then
MY_PV_2=$(ver_cut 2)

View File

@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -7,7 +7,7 @@ TOOLCHAIN_PATCH_DEV="sam"
TOOLCHAIN_HAS_TESTS=1
PATCH_GCC_VER="12.4.0"
MUSL_GCC_VER="12.4.0"
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
if [[ ${PV} == *.9999 ]] ; then
MY_PV_2=$(ver_cut 2)

View File

@ -1,9 +1,9 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
TOOLCHAIN_PATCH_DEV="sam"
TOOLCHAIN_HAS_TESTS=1
PATCH_GCC_VER="13.2.0"

View File

@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -9,7 +9,7 @@ PATCH_GCC_VER="13.3.0"
MUSL_GCC_VER="13.2.0"
PATCH_VER="2"
MUSL_VER="2"
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
if [[ ${PV} == *.9999 ]] ; then
MY_PV_2=$(ver_cut 2)

View File

@ -9,7 +9,7 @@ PATCH_GCC_VER="13.3.0"
MUSL_GCC_VER="13.2.0"
PATCH_VER="2"
MUSL_VER="2"
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
if [[ ${PV} == *.9999 ]] ; then
MY_PV_2=$(ver_cut 2)

View File

@ -9,7 +9,7 @@ PATCH_GCC_VER="13.3.0"
MUSL_GCC_VER="13.2.0"
PATCH_VER="2"
MUSL_VER="2"
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
if [[ ${PV} == *.9999 ]] ; then
MY_PV_2=$(ver_cut 2)

View File

@ -9,7 +9,7 @@ PATCH_GCC_VER="13.3.0"
MUSL_GCC_VER="13.2.0"
PATCH_VER="2"
MUSL_VER="2"
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
if [[ ${PV} == *.9999 ]] ; then
MY_PV_2=$(ver_cut 2)

View File

@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -7,7 +7,7 @@ TOOLCHAIN_PATCH_DEV="sam"
TOOLCHAIN_HAS_TESTS=1
PATCH_GCC_VER="13.3.0"
MUSL_GCC_VER="13.3.0"
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
if [[ ${PV} == *.9999 ]] ; then
MY_PV_2=$(ver_cut 2)

View File

@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -9,7 +9,7 @@ PATCH_GCC_VER="14.2.0"
PATCH_VER="7"
MUSL_VER="1"
MUSL_GCC_VER="14.1.0"
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
# Cheesy hack for RCs

View File

@ -9,7 +9,7 @@ PATCH_GCC_VER="14.2.0"
PATCH_VER="8"
MUSL_VER="1"
MUSL_GCC_VER="14.1.0"
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
# Cheesy hack for RCs

View File

@ -9,7 +9,7 @@ PATCH_GCC_VER="14.2.0"
PATCH_VER="8"
MUSL_VER="1"
MUSL_GCC_VER="14.1.0"
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
# Cheesy hack for RCs

View File

@ -9,7 +9,7 @@ PATCH_GCC_VER="14.2.0"
PATCH_VER="8"
MUSL_VER="1"
MUSL_GCC_VER="14.1.0"
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
# Cheesy hack for RCs

View File

@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -7,7 +7,7 @@ TOOLCHAIN_PATCH_DEV="sam"
TOOLCHAIN_HAS_TESTS=1
PATCH_GCC_VER="14.2.0"
MUSL_GCC_VER="14.2.0"
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
# Cheesy hack for RCs

View File

@ -6,10 +6,10 @@ EAPI=8
TOOLCHAIN_PATCH_DEV="sam"
TOOLCHAIN_HAS_TESTS=1
PATCH_GCC_VER="15.0.0"
PATCH_VER="47"
PATCH_VER="48"
MUSL_VER="2"
MUSL_GCC_VER="15.0.0"
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
# Cheesy hack for RCs
@ -48,5 +48,7 @@ src_prepare() {
done
toolchain_src_prepare
eapply "${FILESDIR}"/${P}-e2fsprogs.patch
eapply "${FILESDIR}"/${P}-disable-musttail.patch
eapply_user
}

View File

@ -6,10 +6,10 @@ EAPI=8
TOOLCHAIN_PATCH_DEV="sam"
TOOLCHAIN_HAS_TESTS=1
PATCH_GCC_VER="15.0.0"
PATCH_VER="46"
PATCH_VER="50"
MUSL_VER="2"
MUSL_GCC_VER="15.0.0"
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
# Cheesy hack for RCs

View File

@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -7,7 +7,7 @@ TOOLCHAIN_PATCH_DEV="sam"
TOOLCHAIN_HAS_TESTS=1
PATCH_GCC_VER="15.0.0"
MUSL_GCC_VER="15.0.0"
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
if [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
# Cheesy hack for RCs

View File

@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
@ -7,7 +7,7 @@ TOOLCHAIN_PATCH_SUFFIX="xz"
TOOLCHAIN_PATCH_DEV="sam"
TOOLCHAIN_HAS_TESTS=1
PATCH_VER="4"
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
inherit toolchain

View File

@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -7,7 +7,7 @@ TOOLCHAIN_PATCH_DEV="sam"
TOOLCHAIN_HAS_TESTS=1
PATCH_GCC_VER="9.5.0"
PATCH_VER="2"
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{10..13} )
if [[ ${PV} == *.9999 ]] ; then
MY_PV_2=$(ver_cut 2)