get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2218203/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2218203,
    "url": "http://patchwork.ozlabs.org/api/patches/2218203/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/7928901.EvYhyI6sBW@fomalhaut/",
    "project": {
        "id": 17,
        "url": "http://patchwork.ozlabs.org/api/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,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<7928901.EvYhyI6sBW@fomalhaut>",
    "list_archive_url": null,
    "date": "2026-03-31T15:57:28",
    "name": "Fix internal error in GIMPLE DSE",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "b83f7a466c58a5041dc85adc41bd2e103d720369",
    "submitter": {
        "id": 78832,
        "url": "http://patchwork.ozlabs.org/api/people/78832/?format=api",
        "name": "Eric Botcazou",
        "email": "botcazou@adacore.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/7928901.EvYhyI6sBW@fomalhaut/mbox/",
    "series": [
        {
            "id": 498226,
            "url": "http://patchwork.ozlabs.org/api/series/498226/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=498226",
            "date": "2026-03-31T15:57:28",
            "name": "Fix internal error in GIMPLE DSE",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/498226/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2218203/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2218203/checks/",
    "tags": {},
    "related": [],
    "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 (2048-bit key;\n secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256\n header.s=google header.b=Kfq8tVMI;\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 (2048-bit key,\n secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256\n header.s=google header.b=Kfq8tVMI",
            "sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=adacore.com",
            "sourceware.org; spf=pass smtp.mailfrom=adacore.com",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=209.85.128.45"
        ],
        "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 4flXp51Qr2z1yCp\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 02:58:05 +1100 (AEDT)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 02E264B7A1E3\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 Mar 2026 15:58:03 +0000 (GMT)",
            "from mail-wm1-f45.google.com (mail-wm1-f45.google.com\n [209.85.128.45])\n by sourceware.org (Postfix) with ESMTPS id 160C04BA543C\n for <gcc-patches@gcc.gnu.org>; Tue, 31 Mar 2026 15:57:32 +0000 (GMT)",
            "by mail-wm1-f45.google.com with SMTP id\n 5b1f17b1804b1-486fb14227cso77354195e9.3\n for <gcc-patches@gcc.gnu.org>; Tue, 31 Mar 2026 08:57:32 -0700 (PDT)",
            "from fomalhaut.localnet ([2a01:e0a:107c:2f10:e654:e8ff:fe8f:2ce6])\n by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-4887e80a63esm59863495e9.3.2026.03.31.08.57.29\n for <gcc-patches@gcc.gnu.org>\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 31 Mar 2026 08:57:30 -0700 (PDT)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 02E264B7A1E3",
            "OpenDKIM Filter v2.11.0 sourceware.org 160C04BA543C"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 160C04BA543C",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 160C04BA543C",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1774972652; cv=none;\n b=pw2gvqFyUjNzBfZLpYqqwgL6MGweDMuG74oJACP0M1pUFO93VNOkWzv8NQFIsvrbZEgr4CooGqwX7gebcnBceOs9ZzLVKOLiOALnHBiuX1i7jykG/eB32wfQgHu3wdH5jJB7kQo0GiaKaFwabQXeR6G7SgzFepxNEsWS5loF3SA=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1774972652; c=relaxed/simple;\n bh=XLN/ma3xYDCGrPqsLp4iM86Q0SXEjaqfU/GVaK36Tos=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=Vj59O6l8IT0y7WkzsnBbQhYO6TgsFrDW3PYRwSFe6nJCScI6ZVTyP41F+BncgC3GyYQF5lFsxNq58YwuvLbpZoiVGEo5Qc4J19ZYCAuo8ODzhPhhDLNYDO839BHoxFUb1Cq8PvW5H9wxP2NHhQ9V0fVYf7UzbSxGmSewfoSRFxI=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=adacore.com; s=google; t=1774972651; x=1775577451; darn=gcc.gnu.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:to\n :from:from:to:cc:subject:date:message-id:reply-to;\n bh=KGWC8Cy+9+zWhh9v3p45IydY2uRDSYMTQDj3Gb2cQuU=;\n b=Kfq8tVMIyWjLPehuqyWiAa/a8JzlsjCgtwkRqARUG16NI4XpVXLUenxrgG6PznV/5m\n 0MoyvnRfgXMEBafsHYBPsVJnfAq5pIO/am/qJjTqDtcMR5RqMLHUSk0Ftriy4MdBo+Qa\n VlDOeZ5QnyW0nk8YEYOJectGwfoFKaoVv6/DDHp00Jy5RONpXWLmOQ2ZERfW6TQkigEq\n 590H/16DKVSG4nfd7CqWex3sJYTiNpt4ZJi12QWjNi/pDkEfm8lF/GBl4FwIpJHr/53E\n yXHnMi9+nDKitPdWgVqqLY3yQsLNKFpmksN9/BoyXOj3nixcOIin2MaFNa97PKwHnaNh\n AD7A==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774972651; x=1775577451;\n h=content-transfer-encoding:mime-version:message-id:date:subject:to\n :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=KGWC8Cy+9+zWhh9v3p45IydY2uRDSYMTQDj3Gb2cQuU=;\n b=Q3EEGdPBFP2V58b2TKRChNjJfJv9wRoaf84hgNfu1om9JiL3Dpe3NnAStxD2rGR8U+\n K4MiUoFbAMlasg1Puddo1H6uMbpRiwZdwzuXX3TVu6O4DN2OGoJC9Wqt1f6+fDHhrJ81\n ygc59dsOsIEoZSGEfhHKzQsc2YHB+5w9gaGRV8fp4a2PZ8luZCZ1eGZZ0otc9V5gxCTg\n RbQ2Vg8D0VvI4vy9T1SB+8KtyGHK7rFtb+u1IWyJYbLHxpJV+dRpdq4wSPZvcIUEZprb\n F6c4DvVI+Dm2Sxyk+JpoZnV0ZtINd8K1VrpfxVBcK3asXzNi18vlV5mLb42+UJtv6Uyi\n Nb4Q==",
        "X-Gm-Message-State": "AOJu0YwpLjCjTTr6naxM7Rmg+AJMCE/mePc57IZB0b1LAMk+OjA+IZ42\n vzGcvYJD3skfwJbHtjWzJpedoTaC8iqq3IgM+B0sr/SVp4B+q3vXZyD4gsAu3PO/4MC0Pvl9e87\n FNZQ=",
        "X-Gm-Gg": "ATEYQzwdntECPnd2ONlTv7F0yZsEXUKQzIY9e/tChRhmrjjVpfqyUNRZ8VJZCvPupRY\n eGwD3f/JXkncs/QOmsyLPRc/3uZ0CnLypXV+QVIyzh/VjHbZbGmuwX30ZkpD/mOenhB50LksOzT\n TxSrN4E/umoo0vMnrvujTrP5IwSoDP/xGPXk7uXRwZSfDUFI8ajScKwgveSYHATarkLNpOQiL5x\n r3mxxjBP//wmpLC/nlV6HB6p+PLr7YG2oYQ0jE02+tVCRm8iPUh3hwOOngGLrBEi0BnJPTNd116\n sKOfoTiNkrNA08d+CAStGBj4RvvvgrLcM5aLlprjv6Nvb7AFKvDt0ZpVvnDSYZDpQK20fziBabx\n qBvekBFwnp/PCjdGds7yAExrRL/iUnJlvsAsc0vEJAY5nLLTHZntpWNyrUv7P7XlAjedTBzLgHO\n rgvoxOQcAJ2L6+DEfjHzMFLpLGvGhyxrstpi+Q",
        "X-Received": "by 2002:a05:600c:4483:b0:488:78f2:6b0 with SMTP id\n 5b1f17b1804b1-48878f2076amr38523905e9.29.1774972650836;\n Tue, 31 Mar 2026 08:57:30 -0700 (PDT)",
        "From": "Eric Botcazou <botcazou@adacore.com>",
        "X-Google-Original-From": "Eric Botcazou <ebotcazou@adacore.com>",
        "To": "gcc-patches@gcc.gnu.org",
        "Subject": "[PATCH] Fix internal error in GIMPLE DSE",
        "Date": "Tue, 31 Mar 2026 17:57:28 +0200",
        "Message-ID": "<7928901.EvYhyI6sBW@fomalhaut>",
        "MIME-Version": "1.0",
        "Content-Type": "multipart/mixed; boundary=\"nextPart3940553.kQq0lBPeGt\"",
        "Content-Transfer-Encoding": "7Bit",
        "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>",
        "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"
    },
    "content": "Hi,\n\nthis is a regression present on all the active branches and a sibling of:\n  https://gcc.gnu.org/pipermail/gcc-patches/2024-February/646628.html\n\nduring GIMPLE pass: dse\n+===========================GNAT BUG DETECTED==============================+\n| 16.0.1 20260331 (experimental) [master r16-8354-gbf6989de817] (x86_64-suse-\nlinux) GCC error:|\n| in exact_div, at poly-int.h:2179                                         |\n| Error detected around opt107.adb:26:11                                   |\n| Compiling opt107.adb\n\nSo at least one caller of compute_trims, namely maybe_trim_constructor_store, \nexpects ref->size to be a multiple of a byte for trimming, and that's probably \nthe case for others in practice, from a cursory reading.  Therefore the patch \nadds the same test on ref->size as the one added to ref->offset above.\n\nTested on x86-64/Linux, OK for all the active branches?\n\n\n2026-03-31  Eric Botcazou  <ebotcazou@adacore.com>\n\n\t* tree-ssa-dse.cc (compute_trims): Bail out if ref->size is not\n\tbyte aligned either.\n\n\n2026-03-31  Eric Botcazou  <ebotcazou@adacore.com>\n\n\t* gnat.dg/opt107.adb: New test.\n\t* gnat.dg/opt107_pkg.ads: New helper.",
    "diff": "diff --git a/gcc/tree-ssa-dse.cc b/gcc/tree-ssa-dse.cc\nindex cc381b4cd7b..58cfa9ec129 100644\n--- a/gcc/tree-ssa-dse.cc\n+++ b/gcc/tree-ssa-dse.cc\n@@ -423,8 +423,10 @@ compute_trims (ao_ref *ref, sbitmap live, int *trim_head, int *trim_tail,\n      the bitmap extends through ref->max_size, so we know that in the original\n      bitmap bits 0 .. ref->max_size were true.  But we need to check that this\n      covers the bytes of REF exactly.  */\n-  const unsigned int align = known_alignment (ref->offset);\n-  if ((align > 0 && align < BITS_PER_UNIT)\n+  const unsigned int offset_align = known_alignment (ref->offset);\n+  const unsigned int size_align = known_alignment (ref->size);\n+  if ((offset_align > 0 && offset_align < BITS_PER_UNIT)\n+      || (size_align > 0 && size_align < BITS_PER_UNIT)\n       || !known_eq (ref->size, ref->max_size))\n     return;\n \n",
    "prefixes": []
}