Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2227715/?format=api
{ "id": 2227715, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2227715/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/aesH9vN50MTHzuvT@tucnak/", "project": { "id": 17, "url": "http://patchwork.ozlabs.org/api/1.1/projects/17/?format=api", "name": "GNU Compiler Collection", "link_name": "gcc", "list_id": "gcc-patches.gcc.gnu.org", "list_email": "gcc-patches@gcc.gnu.org", "web_url": null, "scm_url": null, "webscm_url": null }, "msgid": "<aesH9vN50MTHzuvT@tucnak>", "date": "2026-04-24T06:04:38", "name": "bitintlower: Padding bit fixes, part 5 [PR123635]", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "91b2ad1b2f6bceb50653bcb36796397fb7d67dda", "submitter": { "id": 671, "url": "http://patchwork.ozlabs.org/api/1.1/people/671/?format=api", "name": "Jakub Jelinek", "email": "jakub@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/aesH9vN50MTHzuvT@tucnak/mbox/", "series": [ { "id": 501305, "url": "http://patchwork.ozlabs.org/api/1.1/series/501305/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=501305", "date": "2026-04-24T06:04:38", "name": "bitintlower: Padding bit fixes, part 5 [PR123635]", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/501305/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2227715/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2227715/checks/", "tags": {}, "headers": { "Return-Path": "<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "gcc-patches@gcc.gnu.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "gcc-patches@gcc.gnu.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=dHqWFe4C;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)", "sourceware.org;\n\tdkim=pass (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=dHqWFe4C", "sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com", "sourceware.org; spf=pass smtp.mailfrom=redhat.com", "server2.sourceware.org;\n arc=none smtp.remote-ip=170.10.133.124" ], "Received": [ "from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g22W54Wd6z1yD5\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 24 Apr 2026 16:05:20 +1000 (AEST)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 664634BB1C31\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 24 Apr 2026 06:05:18 +0000 (GMT)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by sourceware.org (Postfix) with ESMTP id 162D44BB1C30\n for <gcc-patches@gcc.gnu.org>; Fri, 24 Apr 2026 06:04:46 +0000 (GMT)", "from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-648-bTCSe4RQMrCdLaENRa0_7A-1; Fri,\n 24 Apr 2026 02:04:44 -0400", "from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 1E93F1956089; Fri, 24 Apr 2026 06:04:43 +0000 (UTC)", "from tucnak.zalov.cz (unknown [10.44.48.12])\n by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with\n ESMTPS\n id 5B7D8300757C; Fri, 24 Apr 2026 06:04:42 +0000 (UTC)", "from tucnak.zalov.cz (localhost [127.0.0.1])\n by tucnak.zalov.cz (8.18.1/8.18.1) with ESMTPS id 63O64dfL3446901\n (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);\n Fri, 24 Apr 2026 08:04:39 +0200", "(from jakub@localhost)\n by tucnak.zalov.cz (8.18.1/8.18.1/Submit) id 63O64dtS3446885;\n Fri, 24 Apr 2026 08:04:39 +0200" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 664634BB1C31", "OpenDKIM Filter v2.11.0 sourceware.org 162D44BB1C30" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 162D44BB1C30", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 162D44BB1C30", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777010686; cv=none;\n b=jjxC3icw1FytdqZfWhUdxwOsB5b24KIwAWjIgMtQim3Z5gGNUJurR968RnEreoTzRVXVXKAmAMUCAWW9Zw9Ny960+iMEaLifxBDrh5CGgqjQcdOmyL6RRILu1/jF0FNsuHyYRkiOP2mUlxSiWrBgMk9TZ9k6+z0SocJKEhK9OKk=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1777010686; c=relaxed/simple;\n bh=pbLz14Ic57ywktkS1bTxoB47DQ/unHRVgkTTtli29No=;\n h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;\n b=dqvR0va+s4jtXGVveha39NaP9ywSK8r9xF175MABRXsOeG0cM9ph6DRTx8R7EUF+lmi8PGodtm3MkvXhzo8YUjT3VLiz0KY9KexroE7eNAfzIviuyi4hpd8bZRoX2zFhes/GPtYofaHiwNNZw0H6nK2sPWCrPQEI6LR5BNF2DuE=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1777010685;\n h=from:from:reply-to:reply-to:subject:subject:date:date:\n message-id:message-id:to:to:cc:cc:mime-version:mime-version:\n content-type:content-type; bh=Bn09IaB4NUmasjmAdF73qRtZryhkTPcoJ3DqKMZeqRQ=;\n b=dHqWFe4Cu1OllyU5lxJ7LmFzpM+Ulg1QGNHU3W0NNswMsem5pjr+y1cuFDqMkzVxINEPQv\n mXE3zOUN7QbVm/SXAuL0jdnRI2/glWfTNBycQz3Du+2s70k1dfsUPtJHV9maXCtReM7oMT\n Hx5kKXgHLnejdzwbJuHbV6YIlM2h3zQ=", "X-MC-Unique": "bTCSe4RQMrCdLaENRa0_7A-1", "X-Mimecast-MFC-AGG-ID": "bTCSe4RQMrCdLaENRa0_7A_1777010683", "Date": "Fri, 24 Apr 2026 08:04:38 +0200", "From": "Jakub Jelinek <jakub@redhat.com>", "To": "Richard Biener <rguenther@suse.de>", "Cc": "gcc-patches@gcc.gnu.org", "Subject": "[PATCH] bitintlower: Padding bit fixes, part 5 [PR123635]", "Message-ID": "<aesH9vN50MTHzuvT@tucnak>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.4", "X-Mimecast-Spam-Score": "0", "X-Mimecast-MFC-PROC-ID": "83vaH7RWkI22wF6Ew9nyHnhdXs6fby_veeI3Yhgs-CQ_1777010683", "X-Mimecast-Originator": "redhat.com", "Content-Type": "text/plain; charset=us-ascii", "Content-Disposition": "inline", "X-BeenThere": "gcc-patches@gcc.gnu.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "Gcc-patches mailing list <gcc-patches.gcc.gnu.org>", "List-Unsubscribe": "<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>", "List-Archive": "<https://gcc.gnu.org/pipermail/gcc-patches/>", "List-Post": "<mailto:gcc-patches@gcc.gnu.org>", "List-Help": "<mailto:gcc-patches-request@gcc.gnu.org?subject=help>", "List-Subscribe": "<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>", "Reply-To": "Jakub Jelinek <jakub@redhat.com>", "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org" }, "content": "Hi!\n\nThe following patch is hopefully the last missing part of the _BitInt\nbitint_extended padding bit fixes, this time for\n__builtin_{add,sub,mul}_overflow. For __builtin_{add,sub}_overflow,\nthe extension in the padding bits of a partial limb (if any) is already\ndone in some cases during the handling of the limbs (and the last\nhunk in gimple-lower-bitint.cc just adds it to one spot where it was\nmissing). The extension in the padding bits of a full limb of padding\nbits (if any) and for __builtin_mul_overflow partial limb too is done\nin finish_arith_overflow. If both var and obj are NULL, it is\n__builtin_*_overflow_p or __builtin_*_overflow that ignores the result\nof the operation and only cares about whether it overflowed or not; in\nthat case there is nothing to extend.\n\nBootstrapped/regtested on x86_64-linux and i686-linux, built and regtested\non aarch64-linux and tested with\nmake -j8 -k check-gcc GCC_TEST_RUN_EXPENSIVE=1 RUNTESTFLAGS=\"GCC_TEST_RUN_EXPENSIVE=1 dg.exp='*bitint* pr112673.c builtin-stdc-bit-*.c pr112566-2.c pr112511.c pr116588.c pr116003.c pr113693.c pr113602.c flex-array-counted-by-7.c' dg-torture.exp='*bitint* pr116480-2.c pr114312.c pr114121.c' dfp.exp=*bitint* vect.exp='vect-early-break_99-pr113287.c' tree-ssa.exp=pr113735.c\"\non riscv64-linux, ok for trunk and 16.2?\n\n2026-04-24 Jakub Jelinek <jakub@redhat.com>\n\n\tPR middle-end/123635\n\tPR tree-optimization/124988\n\t* gimple-lower-bitint.cc (bitint_large_huge::finish_arith_overflow):\n\tHandle bitint_extend.\n\t(bitint_large_huge::lower_addsub_overflow): Fix up comment spelling.\n\tFor bitint_extended extend the partial limb if any.\n\n\t* gcc.dg/torture/bitint-91.c: New test.\n\t* gcc.dg/torture/bitint-92.c: New test.\n\t* gcc.dg/torture/bitint-93.c: New test.\n\t* gcc.dg/torture/bitint-94.c: New test.\n\t* gcc.dg/torture/bitint-95.c: New test.\n\n\n\tJakub", "diff": "--- gcc/gimple-lower-bitint.cc.jj\t2026-04-21 11:51:08.577310657 +0200\n+++ gcc/gimple-lower-bitint.cc\t2026-04-23 14:19:04.286181193 +0200\n@@ -4478,6 +4478,65 @@ bitint_large_huge::finish_arith_overflow\n {\n unsigned HOST_WIDE_INT obj_nelts = 0;\n tree atype = NULL_TREE;\n+ if (bitint_extended && (var || obj))\n+\t{\n+\t unsigned prec = TYPE_PRECISION (type);\n+\t unsigned prec_limbs = CEIL (prec, limb_prec);\n+\t bool ext_ms_limb\n+\t = (bitint_extended == bitint_ext_full\n+\t && abi_limb_prec > limb_prec\n+\t && (CEIL (prec, abi_limb_prec) * abi_limb_prec\n+\t\t > CEIL (prec, limb_prec) * limb_prec));\n+\t /* For .{ADD,SUB}_OVERFLOW the partial limb if any is\n+\t already extended in lower_addsub_overflow. */\n+\t if ((code == MULT_EXPR && (prec % limb_prec) != 0)\n+\t || (ext_ms_limb && !TYPE_UNSIGNED (type)))\n+\t {\n+\t tree plm1idx = size_int (bitint_big_endian ? 0 : prec_limbs - 1);\n+\t tree plm1type = limb_access_type (type, plm1idx);\n+\t tree l = limb_access (type, var ? var : obj, plm1idx, true);\n+\t tree rhs = make_ssa_name (TREE_TYPE (l));\n+\t g = gimple_build_assign (rhs, l);\n+\t insert_before (g);\n+\t if (code == MULT_EXPR && (prec % limb_prec) != 0)\n+\t\t{\n+\t\t if (!useless_type_conversion_p (plm1type, TREE_TYPE (rhs)))\n+\t\t rhs = add_cast (plm1type, rhs);\n+\t\t if (!useless_type_conversion_p (TREE_TYPE (l),\n+\t\t\t\t\t\t TREE_TYPE (rhs)))\n+\t\t rhs = add_cast (TREE_TYPE (l), rhs);\n+\t\t l = limb_access (type, var ? var : obj, plm1idx, true);\n+\t\t g = gimple_build_assign (l, rhs);\n+\t\t insert_before (g);\n+\t\t}\n+\t if (ext_ms_limb && !TYPE_UNSIGNED (type))\n+\t\t{\n+\t\t rhs = add_cast (signed_type_for (m_limb_type), rhs);\n+\t\t tree lpm1 = build_int_cst (unsigned_type_node,\n+\t\t\t\t\t limb_prec - 1);\n+\t\t tree v = make_ssa_name (TREE_TYPE (rhs));\n+\t\t g = gimple_build_assign (v, RSHIFT_EXPR, rhs, lpm1);\n+\t\t insert_before (g);\n+\t\t unsigned int i\n+\t\t = CEIL (prec, abi_limb_prec) * abi_limb_prec / limb_prec;\n+\t\t v = add_cast (m_limb_type, v);\n+\t\t g = gimple_build_assign (limb_access (type, var ? var : obj,\n+\t\t\t\t\t\t\tsize_int (i - 1),\n+\t\t\t\t\t\t\ttrue), v);\n+\t\t insert_before (g);\n+\t\t ext_ms_limb = false;\n+\t\t}\n+\t }\n+\t if (ext_ms_limb)\n+\t {\n+\t unsigned int i\n+\t\t= CEIL (prec, abi_limb_prec) * abi_limb_prec / limb_prec;\n+\t g = gimple_build_assign (limb_access (type, var ? var : obj,\n+\t\t\t\t\t\t size_int (i - 1), true),\n+\t\t\t\t build_zero_cst (m_limb_type));\n+\t insert_before (g);\n+\t }\n+\t}\n if (obj)\n \t{\n \t obj_nelts = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (obj))) / limb_prec;\n@@ -4673,7 +4732,7 @@ bitint_large_huge::lower_addsub_overflow\n int prec0 = range_to_prec (arg0, stmt);\n int prec1 = range_to_prec (arg1, stmt);\n /* If PREC0 >= 0 && PREC1 >= 0 and CODE is not MINUS_EXPR, PREC2 is\n- the be minimum unsigned precision of any possible operation's\n+ the minimum unsigned precision of any possible operation's\n result, otherwise it is minimum signed precision.\n Some examples:\n If PREC0 or PREC1 is 8, it means that argument is [0, 0xff],\n@@ -5149,6 +5208,12 @@ bitint_large_huge::lower_addsub_overflow\n \t\t }\n \t\t}\n \t tree l = limb_access (type, var ? var : obj, idxl, true);\n+\t if (bitint_extended && tree_fits_uhwi_p (idxl))\n+\t\t{\n+\t\t tree atype = limb_access_type (type, idxl);\n+\t\t if (!useless_type_conversion_p (atype, TREE_TYPE (rhs)))\n+\t\t rhs = add_cast (atype, rhs);\n+\t\t}\n \t if (!useless_type_conversion_p (TREE_TYPE (l), TREE_TYPE (rhs)))\n \t\trhs = add_cast (TREE_TYPE (l), rhs);\n \t g = gimple_build_assign (l, rhs);\n--- gcc/testsuite/gcc.dg/torture/bitint-91.c.jj\t2026-04-23 12:23:26.844248848 +0200\n+++ gcc/testsuite/gcc.dg/torture/bitint-91.c\t2026-04-23 14:17:44.470514400 +0200\n@@ -0,0 +1,140 @@\n+/* PR middle-end/123635 */\n+/* { dg-do run { target bitint } } */\n+/* { dg-options \"-std=c23 -pedantic-errors\" } */\n+/* { dg-skip-if \"\" { ! run_expensive_tests } { \"*\" } { \"-O0\" \"-O2\" } } */\n+/* { dg-skip-if \"\" { ! run_expensive_tests } { \"-flto\" } { \"\" } } */\n+\n+#if __BITINT_MAXWIDTH__ >= 513\n+_BitInt(513) a, b, c, d;\n+unsigned _BitInt(513) e, f, g, h;\n+#endif\n+\n+#include \"../bitintext.h\"\n+\n+#if __BITINT_MAXWIDTH__ >= 513\n+[[gnu::noipa]] bool\n+f1 (_BitInt(513) q, _BitInt(513) r, _BitInt(513) s, _BitInt(513) t,\n+ _BitInt(513) u, _BitInt(513) v, _BitInt(513) w, _BitInt(513) x)\n+{\n+ bool res = false;\n+ res |= __builtin_add_overflow (q, r, &a);\n+ BEXTC (a);\n+ res |= __builtin_add_overflow (s, t, &b);\n+ BEXTC (b);\n+ res |= __builtin_sub_overflow (u, v, &c);\n+ BEXTC (c);\n+ res |= __builtin_sub_overflow (w, x, &d);\n+ BEXTC (d);\n+ return res;\n+}\n+\n+[[gnu::noipa]] bool\n+f2 (unsigned _BitInt(513) q, unsigned _BitInt(513) r, unsigned _BitInt(513) s,\n+ unsigned _BitInt(513) t, unsigned _BitInt(513) u, unsigned _BitInt(513) v,\n+ unsigned _BitInt(513) w, unsigned _BitInt(513) x)\n+{\n+ bool res = false;\n+ res |= __builtin_add_overflow (q, r, &e);\n+ BEXTC (e);\n+ res |= __builtin_add_overflow (s, t, &f);\n+ BEXTC (f);\n+ res |= __builtin_sub_overflow (u, v, &g);\n+ BEXTC (g);\n+ res |= __builtin_sub_overflow (w, x, &h);\n+ BEXTC (h);\n+ return res;\n+}\n+#endif\n+\n+#if __BITINT_MAXWIDTH__ >= 1025\n+[[gnu::noipa]] bool\n+f3 (_BitInt(1025) q, _BitInt(1025) r, _BitInt(1025) s, _BitInt(1025) t,\n+ _BitInt(1025) u, _BitInt(1025) v, _BitInt(1025) w, _BitInt(1025) x)\n+{\n+ bool res = false;\n+ res |= __builtin_add_overflow (q, r, &a);\n+ BEXTC (a);\n+ res |= __builtin_add_overflow (s, t, &b);\n+ BEXTC (b);\n+ res |= __builtin_sub_overflow (u, v, &c);\n+ BEXTC (c);\n+ res |= __builtin_sub_overflow (w, x, &d);\n+ BEXTC (d);\n+ return res;\n+}\n+\n+[[gnu::noipa]] bool\n+f4 (unsigned _BitInt(1025) q, unsigned _BitInt(1025) r,\n+ unsigned _BitInt(1025) s, unsigned _BitInt(1025) t,\n+ unsigned _BitInt(1025) u, unsigned _BitInt(1025) v,\n+ unsigned _BitInt(1025) w, unsigned _BitInt(1025) x)\n+{\n+ bool res = false;\n+ res |= __builtin_add_overflow (q, r, &e);\n+ BEXTC (e);\n+ res |= __builtin_add_overflow (s, t, &f);\n+ BEXTC (f);\n+ res |= __builtin_sub_overflow (u, v, &g);\n+ BEXTC (g);\n+ res |= __builtin_sub_overflow (w, x, &h);\n+ BEXTC (h);\n+ return res;\n+}\n+#endif\n+\n+int\n+main ()\n+{\n+#if __BITINT_MAXWIDTH__ >= 513\n+ __builtin_memset (&a, 0x55, sizeof (a));\n+ __builtin_memset (&b, 0xaa, sizeof (b));\n+ __builtin_memset (&c, 0x55, sizeof (c));\n+ __builtin_memset (&d, 0xaa, sizeof (d));\n+ f1 (9655959669318785079954371230049554909200604556467603939808122955133717885340333846085453917625768204337699198414625928325836300792547598919086330010444969wb,\n+ 7603664655075175676551887792243938044412742856114886907427675169347553852589402599411290168288930382377283108890322269708884902998253293780483440129483327wb,\n+ -10324098565034498465875215630604107238940128063553910460445433007166121079968132667074154355395844552937058899426253790777657675901838010055644316728526393wb,\n+ -12236477238783553839340584917720106564483878483173525158555406923388638347150144919001024905877475401353674848301774791298367823029012449896858367218938488wb,\n+ 9966990594172406012310078765295767555782555285684385899869231608869471023379202086947215337899533069949801311225161562404400717858011700306179102121342515wb,\n+ -12983782114594329520373595420695508584715919272703648469298375086460508080215963268729027546042229893937296428010493668720716318664505339275354851120734372wb,\n+ -9655954001341551443087909192198932353132996418457245295521644079521230896558300756133292365213357603788911695147437530569709679437147630523365259553067954wb,\n+ 7072009366582949478473862650011262253783850301083169883440824883235985480601391689101153902500460700035282434290760483209786664550714449512762684388339187wb);\n+ __builtin_memset (&e, 0x55, sizeof (e));\n+ __builtin_memset (&f, 0xaa, sizeof (f));\n+ __builtin_memset (&g, 0x55, sizeof (g));\n+ __builtin_memset (&h, 0xaa, sizeof (h));\n+ f2 (2964639554149490973596341394839758078409778829067653681666106821776834568408151111543733982288078570825867875863050348925537769671189456471968723686512034uwb,\n+ 5957364445683686818410817200949409124779631391545643887373796564697563753416937684648786338497928327653380765964317808469492623477785654419190708204181795uwb,\n+ 19191677104746999910669997770314557441327241058126327798712726258248174396859949489325836442238807787970653545840621658707862487865809500322706194229135252uwb,\n+ 24586718166970605619478065808613217078037607297232337682881885486187967367467012073369595089067814569116855119567799143349802467998026209123576080005659752uwb,\n+ 10462823982820178661190434713437061473290880952772417752401116804833406586088773886481041433195457558834409214235712063242433511929332344716172942804205442uwb,\n+ 16419753656873030796354060609416030388733546880849213639440646945524833982946459564500329809304700518677496254061943255280441489964246119308925190525772266uwb,\n+ 10405391186665161836576844847101505242465502880093273915903880455941412499859291312405803977208427105275040816651924471784587928355909534429001102837285163uwb,\n+ 17157919740278597151158601296325640095140225651359053582867340974133209625747219873488488134575281986967033985073454136035802749428039704256375550535464357uwb);\n+#endif\n+#if __BITINT_MAXWIDTH__ >= 1025\n+ __builtin_memset (&a, 0x55, sizeof (a));\n+ __builtin_memset (&b, 0xaa, sizeof (b));\n+ __builtin_memset (&c, 0x55, sizeof (c));\n+ __builtin_memset (&d, 0xaa, sizeof (d));\n+ f3 (9655959669318785079954371230049554909200604556467603939808122955133717885340333846085453917625768204337699198414625928325836300792547598919086330010444969wb,\n+ 7603664655075175676551887792243938044412742856114886907427675169347553852589402599411290168288930382377283108890322269708884902998253293780483440129483327wb,\n+ -10324098565034498465875215630604107238940128063553910460445433007166121079968132667074154355395844552937058899426253790777657675901838010055644316728526393wb,\n+ -12236477238783553839340584917720106564483878483173525158555406923388638347150144919001024905877475401353674848301774791298367823029012449896858367218938488wb,\n+ 9966990594172406012310078765295767555782555285684385899869231608869471023379202086947215337899533069949801311225161562404400717858011700306179102121342515wb,\n+ -12983782114594329520373595420695508584715919272703648469298375086460508080215963268729027546042229893937296428010493668720716318664505339275354851120734372wb,\n+ -9655954001341551443087909192198932353132996418457245295521644079521230896558300756133292365213357603788911695147437530569709679437147630523365259553067954wb,\n+ 7072009366582949478473862650011262253783850301083169883440824883235985480601391689101153902500460700035282434290760483209786664550714449512762684388339187wb);\n+ __builtin_memset (&e, 0x55, sizeof (e));\n+ __builtin_memset (&f, 0xaa, sizeof (f));\n+ __builtin_memset (&g, 0x55, sizeof (g));\n+ __builtin_memset (&h, 0xaa, sizeof (h));\n+ f4 (2964639554149490973596341394839758078409778829067653681666106821776834568408151111543733982288078570825867875863050348925537769671189456471968723686512034uwb,\n+ 5957364445683686818410817200949409124779631391545643887373796564697563753416937684648786338497928327653380765964317808469492623477785654419190708204181795uwb,\n+ 19191677104746999910669997770314557441327241058126327798712726258248174396859949489325836442238807787970653545840621658707862487865809500322706194229135252uwb,\n+ 24586718166970605619478065808613217078037607297232337682881885486187967367467012073369595089067814569116855119567799143349802467998026209123576080005659752uwb,\n+ 10462823982820178661190434713437061473290880952772417752401116804833406586088773886481041433195457558834409214235712063242433511929332344716172942804205442uwb,\n+ 16419753656873030796354060609416030388733546880849213639440646945524833982946459564500329809304700518677496254061943255280441489964246119308925190525772266uwb,\n+ 10405391186665161836576844847101505242465502880093273915903880455941412499859291312405803977208427105275040816651924471784587928355909534429001102837285163uwb,\n+ 17157919740278597151158601296325640095140225651359053582867340974133209625747219873488488134575281986967033985073454136035802749428039704256375550535464357uwb);\n+#endif\n+}\n--- gcc/testsuite/gcc.dg/torture/bitint-92.c.jj\t2026-04-23 12:24:19.245362017 +0200\n+++ gcc/testsuite/gcc.dg/torture/bitint-92.c\t2026-04-23 14:17:50.397415229 +0200\n@@ -0,0 +1,140 @@\n+/* PR middle-end/123635 */\n+/* { dg-do run { target bitint } } */\n+/* { dg-options \"-std=c23 -pedantic-errors\" } */\n+/* { dg-skip-if \"\" { ! run_expensive_tests } { \"*\" } { \"-O0\" \"-O2\" } } */\n+/* { dg-skip-if \"\" { ! run_expensive_tests } { \"-flto\" } { \"\" } } */\n+\n+#if __BITINT_MAXWIDTH__ >= 511\n+_BitInt(511) a, b, c, d;\n+unsigned _BitInt(511) e, f, g, h;\n+#endif\n+\n+#include \"../bitintext.h\"\n+\n+#if __BITINT_MAXWIDTH__ >= 511\n+[[gnu::noipa]] bool\n+f1 (_BitInt(511) q, _BitInt(511) r, _BitInt(511) s, _BitInt(511) t,\n+ _BitInt(511) u, _BitInt(511) v, _BitInt(511) w, _BitInt(511) x)\n+{\n+ bool res = false;\n+ res |= __builtin_add_overflow (q, r, &a);\n+ BEXTC (a);\n+ res |= __builtin_add_overflow (s, t, &b);\n+ BEXTC (b);\n+ res |= __builtin_sub_overflow (u, v, &c);\n+ BEXTC (c);\n+ res |= __builtin_sub_overflow (w, x, &d);\n+ BEXTC (d);\n+ return res;\n+}\n+\n+[[gnu::noipa]] bool\n+f2 (unsigned _BitInt(511) q, unsigned _BitInt(511) r, unsigned _BitInt(511) s,\n+ unsigned _BitInt(511) t, unsigned _BitInt(511) u, unsigned _BitInt(511) v,\n+ unsigned _BitInt(511) w, unsigned _BitInt(511) x)\n+{\n+ bool res = false;\n+ res |= __builtin_add_overflow (q, r, &e);\n+ BEXTC (e);\n+ res |= __builtin_add_overflow (s, t, &f);\n+ BEXTC (f);\n+ res |= __builtin_sub_overflow (u, v, &g);\n+ BEXTC (g);\n+ res |= __builtin_sub_overflow (w, x, &h);\n+ BEXTC (h);\n+ return res;\n+}\n+#endif\n+\n+#if __BITINT_MAXWIDTH__ >= 1023\n+[[gnu::noipa]] bool\n+f3 (_BitInt(1023) q, _BitInt(1023) r, _BitInt(1023) s, _BitInt(1023) t,\n+ _BitInt(1023) u, _BitInt(1023) v, _BitInt(1023) w, _BitInt(1023) x)\n+{\n+ bool res = false;\n+ res |= __builtin_add_overflow (q, r, &a);\n+ BEXTC (a);\n+ res |= __builtin_add_overflow (s, t, &b);\n+ BEXTC (b);\n+ res |= __builtin_sub_overflow (u, v, &c);\n+ BEXTC (c);\n+ res |= __builtin_sub_overflow (w, x, &d);\n+ BEXTC (d);\n+ return res;\n+}\n+\n+[[gnu::noipa]] bool\n+f4 (unsigned _BitInt(1023) q, unsigned _BitInt(1023) r,\n+ unsigned _BitInt(1023) s, unsigned _BitInt(1023) t,\n+ unsigned _BitInt(1023) u, unsigned _BitInt(1023) v,\n+ unsigned _BitInt(1023) w, unsigned _BitInt(1023) x)\n+{\n+ bool res = false;\n+ res |= __builtin_add_overflow (q, r, &e);\n+ BEXTC (e);\n+ res |= __builtin_add_overflow (s, t, &f);\n+ BEXTC (f);\n+ res |= __builtin_sub_overflow (u, v, &g);\n+ BEXTC (g);\n+ res |= __builtin_sub_overflow (w, x, &h);\n+ BEXTC (h);\n+ return res;\n+}\n+#endif\n+\n+int\n+main ()\n+{\n+#if __BITINT_MAXWIDTH__ >= 511\n+ __builtin_memset (&a, 0x55, sizeof (a));\n+ __builtin_memset (&b, 0xaa, sizeof (b));\n+ __builtin_memset (&c, 0x55, sizeof (c));\n+ __builtin_memset (&d, 0xaa, sizeof (d));\n+ f1 (1390399912725058458200009048198820064492005235154664882378103191585647121798330571086629470693362953212791514491575158989602893218788902339652768462242628wb,\n+ 249177562235295607181226393168319684003354962277368763264203376508018272147140149371861361061154101827443514415658157865648522550758405852726010180808769wb,\n+ -1780354034824880726793039893594299865138723691931754426795433194731471391545042339625233657837435887106690554340836104535849707683265009199435873463559020wb,\n+ -740336545197937933670467416719493466419101689845476460441897613938923219348614699785899092241758652210632646359181180435230820349533052964898247331288194wb,\n+ 1264371856933908934004928210670432922219833109703326669407665736158573607996286450258750907679580905729735376144263375732104941574779989141805339934906103wb,\n+ -1800762928143884868360591340947709805381121865559594609800602059770468706915015121333590484473244364203044167384984634798933392092472849088487188206919199wb,\n+ -1874437506355165235214302048933351258782970556591446143241539194417790344619692436179305620246514867157285378788470027340983415072326706619779323878095044wb,\n+ 465089731165341206127432983731596524669687828142734277104372042775063012806153170457800193495447488542433104457447397078966750100194606523184187779891236wb);\n+ __builtin_memset (&e, 0x55, sizeof (e));\n+ __builtin_memset (&f, 0xaa, sizeof (f));\n+ __builtin_memset (&g, 0x55, sizeof (g));\n+ __builtin_memset (&h, 0xaa, sizeof (h));\n+ f2 (1769288740652242299842741192560763693851113543365386227639113810655132281658311706354953254148690319453722073610881280531971362644037227748091681178317919uwb,\n+ 6609813168053391222543030306163941663953801084514170716266507032727748531561564744911045686719066313628734721154746698442483812155667254002473644708866548uwb,\n+ 2165581935187317546841478283262759103626305739168208417811840048675479552879740382682893926794456473657370285890451624909369445002539226077543796184885282uwb,\n+ 5583940649350967625413437252987234424283831963591403609577766560068787593281191860443568915932187805635333850527113490331304189378639908270408210201131036uwb,\n+ 4709767295913180049914868365292708657912010821088789452741841268048043047122882916441448275499420638756517585965684291097104349699944179639251796038947955uwb,\n+ 6280470013560252695084315130173483896550287179700449102345092527255864285425735025909066687910837200841028187788564127729392389462477148514426504126205653uwb,\n+ 5729764965697040092309843504303102973344572729567710548288594203184644343090550648393517676044608898029180050379384056057530481830153485215690201926045860uwb,\n+ 2025545578012992696919009225822788038691815646525577733706021933464568718262575612415581176797970841793616511309641023298056786955966008679910134224064441uwb);\n+#endif\n+#if __BITINT_MAXWIDTH__ >= 1023\n+ __builtin_memset (&a, 0x55, sizeof (a));\n+ __builtin_memset (&b, 0xaa, sizeof (b));\n+ __builtin_memset (&c, 0x55, sizeof (c));\n+ __builtin_memset (&d, 0xaa, sizeof (d));\n+ f3 (1390399912725058458200009048198820064492005235154664882378103191585647121798330571086629470693362953212791514491575158989602893218788902339652768462242628wb,\n+ 249177562235295607181226393168319684003354962277368763264203376508018272147140149371861361061154101827443514415658157865648522550758405852726010180808769wb,\n+ -1780354034824880726793039893594299865138723691931754426795433194731471391545042339625233657837435887106690554340836104535849707683265009199435873463559020wb,\n+ -740336545197937933670467416719493466419101689845476460441897613938923219348614699785899092241758652210632646359181180435230820349533052964898247331288194wb,\n+ 1264371856933908934004928210670432922219833109703326669407665736158573607996286450258750907679580905729735376144263375732104941574779989141805339934906103wb,\n+ -1800762928143884868360591340947709805381121865559594609800602059770468706915015121333590484473244364203044167384984634798933392092472849088487188206919199wb,\n+ -1874437506355165235214302048933351258782970556591446143241539194417790344619692436179305620246514867157285378788470027340983415072326706619779323878095044wb,\n+ 465089731165341206127432983731596524669687828142734277104372042775063012806153170457800193495447488542433104457447397078966750100194606523184187779891236wb);\n+ __builtin_memset (&e, 0x55, sizeof (e));\n+ __builtin_memset (&f, 0xaa, sizeof (f));\n+ __builtin_memset (&g, 0x55, sizeof (g));\n+ __builtin_memset (&h, 0xaa, sizeof (h));\n+ f4 (1769288740652242299842741192560763693851113543365386227639113810655132281658311706354953254148690319453722073610881280531971362644037227748091681178317919uwb,\n+ 6609813168053391222543030306163941663953801084514170716266507032727748531561564744911045686719066313628734721154746698442483812155667254002473644708866548uwb,\n+ 2165581935187317546841478283262759103626305739168208417811840048675479552879740382682893926794456473657370285890451624909369445002539226077543796184885282uwb,\n+ 5583940649350967625413437252987234424283831963591403609577766560068787593281191860443568915932187805635333850527113490331304189378639908270408210201131036uwb,\n+ 4709767295913180049914868365292708657912010821088789452741841268048043047122882916441448275499420638756517585965684291097104349699944179639251796038947955uwb,\n+ 6280470013560252695084315130173483896550287179700449102345092527255864285425735025909066687910837200841028187788564127729392389462477148514426504126205653uwb,\n+ 5729764965697040092309843504303102973344572729567710548288594203184644343090550648393517676044608898029180050379384056057530481830153485215690201926045860uwb,\n+ 2025545578012992696919009225822788038691815646525577733706021933464568718262575612415581176797970841793616511309641023298056786955966008679910134224064441uwb);\n+#endif\n+}\n--- gcc/testsuite/gcc.dg/torture/bitint-93.c.jj\t2026-04-23 12:28:40.670937670 +0200\n+++ gcc/testsuite/gcc.dg/torture/bitint-93.c\t2026-04-23 14:17:55.779325177 +0200\n@@ -0,0 +1,140 @@\n+/* PR middle-end/123635 */\n+/* { dg-do run { target bitint } } */\n+/* { dg-options \"-std=c23 -pedantic-errors\" } */\n+/* { dg-skip-if \"\" { ! run_expensive_tests } { \"*\" } { \"-O0\" \"-O2\" } } */\n+/* { dg-skip-if \"\" { ! run_expensive_tests } { \"-flto\" } { \"\" } } */\n+\n+#if __BITINT_MAXWIDTH__ >= 513\n+_BitInt(513) a, b, c, d;\n+unsigned _BitInt(513) e, f, g, h;\n+#endif\n+\n+#include \"../bitintext.h\"\n+\n+#if __BITINT_MAXWIDTH__ >= 513\n+[[gnu::noipa]] bool\n+f1 (_BitInt(513) q, _BitInt(513) r, _BitInt(513) s, _BitInt(513) t,\n+ _BitInt(513) u, _BitInt(513) v, _BitInt(513) w, _BitInt(513) x)\n+{\n+ bool res = false;\n+ res |= __builtin_mul_overflow (q, r, &a);\n+ BEXTC (a);\n+ res |= __builtin_mul_overflow (s, t, &b);\n+ BEXTC (b);\n+ res |= __builtin_mul_overflow (u, v, &c);\n+ BEXTC (c);\n+ res |= __builtin_mul_overflow (w, x, &d);\n+ BEXTC (d);\n+ return res;\n+}\n+\n+[[gnu::noipa]] bool\n+f2 (unsigned _BitInt(513) q, unsigned _BitInt(513) r, unsigned _BitInt(513) s,\n+ unsigned _BitInt(513) t, unsigned _BitInt(513) u, unsigned _BitInt(513) v,\n+ unsigned _BitInt(513) w, unsigned _BitInt(513) x)\n+{\n+ bool res = false;\n+ res |= __builtin_mul_overflow (q, r, &e);\n+ BEXTC (e);\n+ res |= __builtin_mul_overflow (s, t, &f);\n+ BEXTC (f);\n+ res |= __builtin_mul_overflow (u, v, &g);\n+ BEXTC (g);\n+ res |= __builtin_mul_overflow (w, x, &h);\n+ BEXTC (h);\n+ return res;\n+}\n+#endif\n+\n+#if __BITINT_MAXWIDTH__ >= 1025\n+[[gnu::noipa]] bool\n+f3 (_BitInt(1025) q, _BitInt(1025) r, _BitInt(1025) s, _BitInt(1025) t,\n+ _BitInt(1025) u, _BitInt(1025) v, _BitInt(1025) w, _BitInt(1025) x)\n+{\n+ bool res = false;\n+ res |= __builtin_mul_overflow (q, r, &a);\n+ BEXTC (a);\n+ res |= __builtin_mul_overflow (s, t, &b);\n+ BEXTC (b);\n+ res |= __builtin_mul_overflow (u, v, &c);\n+ BEXTC (c);\n+ res |= __builtin_mul_overflow (w, x, &d);\n+ BEXTC (d);\n+ return res;\n+}\n+\n+[[gnu::noipa]] bool\n+f4 (unsigned _BitInt(1025) q, unsigned _BitInt(1025) r,\n+ unsigned _BitInt(1025) s, unsigned _BitInt(1025) t,\n+ unsigned _BitInt(1025) u, unsigned _BitInt(1025) v,\n+ unsigned _BitInt(1025) w, unsigned _BitInt(1025) x)\n+{\n+ bool res = false;\n+ res |= __builtin_mul_overflow (q, r, &e);\n+ BEXTC (e);\n+ res |= __builtin_mul_overflow (s, t, &f);\n+ BEXTC (f);\n+ res |= __builtin_mul_overflow (u, v, &g);\n+ BEXTC (g);\n+ res |= __builtin_mul_overflow (w, x, &h);\n+ BEXTC (h);\n+ return res;\n+}\n+#endif\n+\n+int\n+main ()\n+{\n+#if __BITINT_MAXWIDTH__ >= 513\n+ __builtin_memset (&a, 0x55, sizeof (a));\n+ __builtin_memset (&b, 0xaa, sizeof (b));\n+ __builtin_memset (&c, 0x55, sizeof (c));\n+ __builtin_memset (&d, 0xaa, sizeof (d));\n+ f1 (9655959669318785079954371230049554909200604556467603939808122955133717885340333846085453917625768204337699198414625928325836300792547598919086330010444969wb,\n+ 7603664655075175676551887792243938044412742856114886907427675169347553852589402599411290168288930382377283108890322269708884902998253293780483440129483327wb,\n+ -10324098565034498465875215630604107238940128063553910460445433007166121079968132667074154355395844552937058899426253790777657675901838010055644316728526393wb,\n+ -12236477238783553839340584917720106564483878483173525158555406923388638347150144919001024905877475401353674848301774791298367823029012449896858367218938488wb,\n+ 9966990594172406012310078765295767555782555285684385899869231608869471023379202086947215337899533069949801311225161562404400717858011700306179102121342515wb,\n+ -12983782114594329520373595420695508584715919272703648469298375086460508080215963268729027546042229893937296428010493668720716318664505339275354851120734372wb,\n+ -9655954001341551443087909192198932353132996418457245295521644079521230896558300756133292365213357603788911695147437530569709679437147630523365259553067954wb,\n+ 7072009366582949478473862650011262253783850301083169883440824883235985480601391689101153902500460700035282434290760483209786664550714449512762684388339187wb);\n+ __builtin_memset (&e, 0x55, sizeof (e));\n+ __builtin_memset (&f, 0xaa, sizeof (f));\n+ __builtin_memset (&g, 0x55, sizeof (g));\n+ __builtin_memset (&h, 0xaa, sizeof (h));\n+ f2 (2964639554149490973596341394839758078409778829067653681666106821776834568408151111543733982288078570825867875863050348925537769671189456471968723686512034uwb,\n+ 5957364445683686818410817200949409124779631391545643887373796564697563753416937684648786338497928327653380765964317808469492623477785654419190708204181795uwb,\n+ 19191677104746999910669997770314557441327241058126327798712726258248174396859949489325836442238807787970653545840621658707862487865809500322706194229135252uwb,\n+ 24586718166970605619478065808613217078037607297232337682881885486187967367467012073369595089067814569116855119567799143349802467998026209123576080005659752uwb,\n+ 10462823982820178661190434713437061473290880952772417752401116804833406586088773886481041433195457558834409214235712063242433511929332344716172942804205442uwb,\n+ 16419753656873030796354060609416030388733546880849213639440646945524833982946459564500329809304700518677496254061943255280441489964246119308925190525772266uwb,\n+ 10405391186665161836576844847101505242465502880093273915903880455941412499859291312405803977208427105275040816651924471784587928355909534429001102837285163uwb,\n+ 17157919740278597151158601296325640095140225651359053582867340974133209625747219873488488134575281986967033985073454136035802749428039704256375550535464357uwb);\n+#endif\n+#if __BITINT_MAXWIDTH__ >= 1025\n+ __builtin_memset (&a, 0x55, sizeof (a));\n+ __builtin_memset (&b, 0xaa, sizeof (b));\n+ __builtin_memset (&c, 0x55, sizeof (c));\n+ __builtin_memset (&d, 0xaa, sizeof (d));\n+ f3 (9655959669318785079954371230049554909200604556467603939808122955133717885340333846085453917625768204337699198414625928325836300792547598919086330010444969wb,\n+ 7603664655075175676551887792243938044412742856114886907427675169347553852589402599411290168288930382377283108890322269708884902998253293780483440129483327wb,\n+ -10324098565034498465875215630604107238940128063553910460445433007166121079968132667074154355395844552937058899426253790777657675901838010055644316728526393wb,\n+ -12236477238783553839340584917720106564483878483173525158555406923388638347150144919001024905877475401353674848301774791298367823029012449896858367218938488wb,\n+ 9966990594172406012310078765295767555782555285684385899869231608869471023379202086947215337899533069949801311225161562404400717858011700306179102121342515wb,\n+ -12983782114594329520373595420695508584715919272703648469298375086460508080215963268729027546042229893937296428010493668720716318664505339275354851120734372wb,\n+ -9655954001341551443087909192198932353132996418457245295521644079521230896558300756133292365213357603788911695147437530569709679437147630523365259553067954wb,\n+ 7072009366582949478473862650011262253783850301083169883440824883235985480601391689101153902500460700035282434290760483209786664550714449512762684388339187wb);\n+ __builtin_memset (&e, 0x55, sizeof (e));\n+ __builtin_memset (&f, 0xaa, sizeof (f));\n+ __builtin_memset (&g, 0x55, sizeof (g));\n+ __builtin_memset (&h, 0xaa, sizeof (h));\n+ f4 (2964639554149490973596341394839758078409778829067653681666106821776834568408151111543733982288078570825867875863050348925537769671189456471968723686512034uwb,\n+ 5957364445683686818410817200949409124779631391545643887373796564697563753416937684648786338497928327653380765964317808469492623477785654419190708204181795uwb,\n+ 19191677104746999910669997770314557441327241058126327798712726258248174396859949489325836442238807787970653545840621658707862487865809500322706194229135252uwb,\n+ 24586718166970605619478065808613217078037607297232337682881885486187967367467012073369595089067814569116855119567799143349802467998026209123576080005659752uwb,\n+ 10462823982820178661190434713437061473290880952772417752401116804833406586088773886481041433195457558834409214235712063242433511929332344716172942804205442uwb,\n+ 16419753656873030796354060609416030388733546880849213639440646945524833982946459564500329809304700518677496254061943255280441489964246119308925190525772266uwb,\n+ 10405391186665161836576844847101505242465502880093273915903880455941412499859291312405803977208427105275040816651924471784587928355909534429001102837285163uwb,\n+ 17157919740278597151158601296325640095140225651359053582867340974133209625747219873488488134575281986967033985073454136035802749428039704256375550535464357uwb);\n+#endif\n+}\n--- gcc/testsuite/gcc.dg/torture/bitint-94.c.jj\t2026-04-23 12:29:00.161607812 +0200\n+++ gcc/testsuite/gcc.dg/torture/bitint-94.c\t2026-04-23 14:18:01.446230357 +0200\n@@ -0,0 +1,140 @@\n+/* PR middle-end/123635 */\n+/* { dg-do run { target bitint } } */\n+/* { dg-options \"-std=c23 -pedantic-errors\" } */\n+/* { dg-skip-if \"\" { ! run_expensive_tests } { \"*\" } { \"-O0\" \"-O2\" } } */\n+/* { dg-skip-if \"\" { ! run_expensive_tests } { \"-flto\" } { \"\" } } */\n+\n+#if __BITINT_MAXWIDTH__ >= 511\n+_BitInt(511) a, b, c, d;\n+unsigned _BitInt(511) e, f, g, h;\n+#endif\n+\n+#include \"../bitintext.h\"\n+\n+#if __BITINT_MAXWIDTH__ >= 511\n+[[gnu::noipa]] bool\n+f1 (_BitInt(511) q, _BitInt(511) r, _BitInt(511) s, _BitInt(511) t,\n+ _BitInt(511) u, _BitInt(511) v, _BitInt(511) w, _BitInt(511) x)\n+{\n+ bool res = false;\n+ res |= __builtin_mul_overflow (q, r, &a);\n+ BEXTC (a);\n+ res |= __builtin_mul_overflow (s, t, &b);\n+ BEXTC (b);\n+ res |= __builtin_mul_overflow (u, v, &c);\n+ BEXTC (c);\n+ res |= __builtin_mul_overflow (w, x, &d);\n+ BEXTC (d);\n+ return res;\n+}\n+\n+[[gnu::noipa]] bool\n+f2 (unsigned _BitInt(511) q, unsigned _BitInt(511) r, unsigned _BitInt(511) s,\n+ unsigned _BitInt(511) t, unsigned _BitInt(511) u, unsigned _BitInt(511) v,\n+ unsigned _BitInt(511) w, unsigned _BitInt(511) x)\n+{\n+ bool res = false;\n+ res |= __builtin_mul_overflow (q, r, &e);\n+ BEXTC (e);\n+ res |= __builtin_mul_overflow (s, t, &f);\n+ BEXTC (f);\n+ res |= __builtin_mul_overflow (u, v, &g);\n+ BEXTC (g);\n+ res |= __builtin_mul_overflow (w, x, &h);\n+ BEXTC (h);\n+ return res;\n+}\n+#endif\n+\n+#if __BITINT_MAXWIDTH__ >= 1023\n+[[gnu::noipa]] bool\n+f3 (_BitInt(1023) q, _BitInt(1023) r, _BitInt(1023) s, _BitInt(1023) t,\n+ _BitInt(1023) u, _BitInt(1023) v, _BitInt(1023) w, _BitInt(1023) x)\n+{\n+ bool res = false;\n+ res |= __builtin_mul_overflow (q, r, &a);\n+ BEXTC (a);\n+ res |= __builtin_mul_overflow (s, t, &b);\n+ BEXTC (b);\n+ res |= __builtin_mul_overflow (u, v, &c);\n+ BEXTC (c);\n+ res |= __builtin_mul_overflow (w, x, &d);\n+ BEXTC (d);\n+ return res;\n+}\n+\n+[[gnu::noipa]] bool\n+f4 (unsigned _BitInt(1023) q, unsigned _BitInt(1023) r,\n+ unsigned _BitInt(1023) s, unsigned _BitInt(1023) t,\n+ unsigned _BitInt(1023) u, unsigned _BitInt(1023) v,\n+ unsigned _BitInt(1023) w, unsigned _BitInt(1023) x)\n+{\n+ bool res = false;\n+ res |= __builtin_mul_overflow (q, r, &e);\n+ BEXTC (e);\n+ res |= __builtin_mul_overflow (s, t, &f);\n+ BEXTC (f);\n+ res |= __builtin_mul_overflow (u, v, &g);\n+ BEXTC (g);\n+ res |= __builtin_mul_overflow (w, x, &h);\n+ BEXTC (h);\n+ return res;\n+}\n+#endif\n+\n+int\n+main ()\n+{\n+#if __BITINT_MAXWIDTH__ >= 511\n+ __builtin_memset (&a, 0x55, sizeof (a));\n+ __builtin_memset (&b, 0xaa, sizeof (b));\n+ __builtin_memset (&c, 0x55, sizeof (c));\n+ __builtin_memset (&d, 0xaa, sizeof (d));\n+ f1 (1390399912725058458200009048198820064492005235154664882378103191585647121798330571086629470693362953212791514491575158989602893218788902339652768462242628wb,\n+ 249177562235295607181226393168319684003354962277368763264203376508018272147140149371861361061154101827443514415658157865648522550758405852726010180808769wb,\n+ -1780354034824880726793039893594299865138723691931754426795433194731471391545042339625233657837435887106690554340836104535849707683265009199435873463559020wb,\n+ -740336545197937933670467416719493466419101689845476460441897613938923219348614699785899092241758652210632646359181180435230820349533052964898247331288194wb,\n+ 1264371856933908934004928210670432922219833109703326669407665736158573607996286450258750907679580905729735376144263375732104941574779989141805339934906103wb,\n+ -1800762928143884868360591340947709805381121865559594609800602059770468706915015121333590484473244364203044167384984634798933392092472849088487188206919199wb,\n+ -1874437506355165235214302048933351258782970556591446143241539194417790344619692436179305620246514867157285378788470027340983415072326706619779323878095044wb,\n+ 465089731165341206127432983731596524669687828142734277104372042775063012806153170457800193495447488542433104457447397078966750100194606523184187779891236wb);\n+ __builtin_memset (&e, 0x55, sizeof (e));\n+ __builtin_memset (&f, 0xaa, sizeof (f));\n+ __builtin_memset (&g, 0x55, sizeof (g));\n+ __builtin_memset (&h, 0xaa, sizeof (h));\n+ f2 (1769288740652242299842741192560763693851113543365386227639113810655132281658311706354953254148690319453722073610881280531971362644037227748091681178317919uwb,\n+ 6609813168053391222543030306163941663953801084514170716266507032727748531561564744911045686719066313628734721154746698442483812155667254002473644708866548uwb,\n+ 2165581935187317546841478283262759103626305739168208417811840048675479552879740382682893926794456473657370285890451624909369445002539226077543796184885282uwb,\n+ 5583940649350967625413437252987234424283831963591403609577766560068787593281191860443568915932187805635333850527113490331304189378639908270408210201131036uwb,\n+ 4709767295913180049914868365292708657912010821088789452741841268048043047122882916441448275499420638756517585965684291097104349699944179639251796038947955uwb,\n+ 6280470013560252695084315130173483896550287179700449102345092527255864285425735025909066687910837200841028187788564127729392389462477148514426504126205653uwb,\n+ 5729764965697040092309843504303102973344572729567710548288594203184644343090550648393517676044608898029180050379384056057530481830153485215690201926045860uwb,\n+ 2025545578012992696919009225822788038691815646525577733706021933464568718262575612415581176797970841793616511309641023298056786955966008679910134224064441uwb);\n+#endif\n+#if __BITINT_MAXWIDTH__ >= 1023\n+ __builtin_memset (&a, 0x55, sizeof (a));\n+ __builtin_memset (&b, 0xaa, sizeof (b));\n+ __builtin_memset (&c, 0x55, sizeof (c));\n+ __builtin_memset (&d, 0xaa, sizeof (d));\n+ f3 (1390399912725058458200009048198820064492005235154664882378103191585647121798330571086629470693362953212791514491575158989602893218788902339652768462242628wb,\n+ 249177562235295607181226393168319684003354962277368763264203376508018272147140149371861361061154101827443514415658157865648522550758405852726010180808769wb,\n+ -1780354034824880726793039893594299865138723691931754426795433194731471391545042339625233657837435887106690554340836104535849707683265009199435873463559020wb,\n+ -740336545197937933670467416719493466419101689845476460441897613938923219348614699785899092241758652210632646359181180435230820349533052964898247331288194wb,\n+ 1264371856933908934004928210670432922219833109703326669407665736158573607996286450258750907679580905729735376144263375732104941574779989141805339934906103wb,\n+ -1800762928143884868360591340947709805381121865559594609800602059770468706915015121333590484473244364203044167384984634798933392092472849088487188206919199wb,\n+ -1874437506355165235214302048933351258782970556591446143241539194417790344619692436179305620246514867157285378788470027340983415072326706619779323878095044wb,\n+ 465089731165341206127432983731596524669687828142734277104372042775063012806153170457800193495447488542433104457447397078966750100194606523184187779891236wb);\n+ __builtin_memset (&e, 0x55, sizeof (e));\n+ __builtin_memset (&f, 0xaa, sizeof (f));\n+ __builtin_memset (&g, 0x55, sizeof (g));\n+ __builtin_memset (&h, 0xaa, sizeof (h));\n+ f4 (1769288740652242299842741192560763693851113543365386227639113810655132281658311706354953254148690319453722073610881280531971362644037227748091681178317919uwb,\n+ 6609813168053391222543030306163941663953801084514170716266507032727748531561564744911045686719066313628734721154746698442483812155667254002473644708866548uwb,\n+ 2165581935187317546841478283262759103626305739168208417811840048675479552879740382682893926794456473657370285890451624909369445002539226077543796184885282uwb,\n+ 5583940649350967625413437252987234424283831963591403609577766560068787593281191860443568915932187805635333850527113490331304189378639908270408210201131036uwb,\n+ 4709767295913180049914868365292708657912010821088789452741841268048043047122882916441448275499420638756517585965684291097104349699944179639251796038947955uwb,\n+ 6280470013560252695084315130173483896550287179700449102345092527255864285425735025909066687910837200841028187788564127729392389462477148514426504126205653uwb,\n+ 5729764965697040092309843504303102973344572729567710548288594203184644343090550648393517676044608898029180050379384056057530481830153485215690201926045860uwb,\n+ 2025545578012992696919009225822788038691815646525577733706021933464568718262575612415581176797970841793616511309641023298056786955966008679910134224064441uwb);\n+#endif\n+}\n--- gcc/testsuite/gcc.dg/torture/bitint-95.c.jj\t2026-04-23 17:07:39.107709287 +0200\n+++ gcc/testsuite/gcc.dg/torture/bitint-95.c\t2026-04-23 17:07:31.914830202 +0200\n@@ -0,0 +1,22 @@\n+/* PR tree-optimization/124988 */\n+/* { dg-do run } */\n+\n+int a;\n+unsigned _BitInt(132) b;\n+\n+unsigned _BitInt(128)\n+foo (unsigned _BitInt(192) d)\n+{\n+ bool o = __builtin_mul_overflow (d, 1, &b);\n+ if (!o)\n+ __atomic_sub_fetch (&a, 1, 0);\n+ return b >> 8;\n+}\n+\n+int\n+main ()\n+{\n+ unsigned _BitInt(128) x = foo (0x1100ffeeddccbbaa998877665544332211wb);\n+ if (x != 0x100ffeeddccbbaa9988776655443322wb)\n+ __builtin_abort ();\n+}\n", "prefixes": [] }