get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2196527,
    "url": "http://patchwork.ozlabs.org/api/patches/2196527/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/alpine.DEB.2.21.2602141442310.2574@angie.orcam.me.uk/",
    "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": "<alpine.DEB.2.21.2602141442310.2574@angie.orcam.me.uk>",
    "list_archive_url": null,
    "date": "2026-02-14T15:14:35",
    "name": "[committed,v2] VAX: Fix ICE in fixup_reorder_chain when building gimple_match.cc [PR112400]",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "a00c9eb51fd1daab2ffb64170bd84ab47e3e5c90",
    "submitter": {
        "id": 80960,
        "url": "http://patchwork.ozlabs.org/api/people/80960/?format=api",
        "name": "Maciej W. Rozycki",
        "email": "macro@orcam.me.uk"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/alpine.DEB.2.21.2602141442310.2574@angie.orcam.me.uk/mbox/",
    "series": [
        {
            "id": 492181,
            "url": "http://patchwork.ozlabs.org/api/series/492181/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=492181",
            "date": "2026-02-14T15:14:35",
            "name": "[committed,v2] VAX: Fix ICE in fixup_reorder_chain when building gimple_match.cc [PR112400]",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/492181/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2196527/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2196527/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 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 dmarc=none (p=none dis=none) header.from=orcam.me.uk",
            "sourceware.org; spf=none smtp.mailfrom=orcam.me.uk",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=78.133.224.34"
        ],
        "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 4fCszF23DVz1xr1\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 15 Feb 2026 02:15:05 +1100 (AEDT)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 11D604B9DB7F\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 14 Feb 2026 15:15:03 +0000 (GMT)",
            "from angie.orcam.me.uk (angie.orcam.me.uk [78.133.224.34])\n by sourceware.org (Postfix) with ESMTP id 8E0C04BAD173\n for <gcc-patches@gcc.gnu.org>; Sat, 14 Feb 2026 15:14:36 +0000 (GMT)",
            "by angie.orcam.me.uk (Postfix, from userid 500)\n id 9EBCF92009D; Sat, 14 Feb 2026 16:14:35 +0100 (CET)",
            "from localhost (localhost [127.0.0.1])\n by angie.orcam.me.uk (Postfix) with ESMTP id 9819792009C;\n Sat, 14 Feb 2026 15:14:35 +0000 (GMT)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 11D604B9DB7F",
            "OpenDKIM Filter v2.11.0 sourceware.org 8E0C04BAD173"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 8E0C04BAD173",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 8E0C04BAD173",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771082076; cv=none;\n b=fxsKYTZyk9MYvy9yLsKgRhaXfmj8taWzPuoS/NSaek4vZr2ldByJI9iukbLOAKVjp91hLEoe78HVwbRJJGdYV9mwnIbj5l0e47PMDZAhzh8cTABLrh3G1mOU3TCoylt3wJ8g9HkQxB0nzcRaKUy6T/GOYzDJIPDLQNHzZwezOek=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1771082076; c=relaxed/simple;\n bh=teXkLWjSVaFCKf9Cr1VWeuxvutOkM/fACl01GnPm5yg=;\n h=Date:From:To:Subject:Message-ID:MIME-Version;\n b=Ui7ErhapLTHYKnOnyemq/EGpXHyb+mlgsdPlfOfnZDsCyAVBmkNsTHdF3Hth8FO++12bq6vNfZkcpN31VFR/Fdo+mngeCbFXyWo0gO8zlIimUw+DemUNSHPMTs5xIU766EKybfLRwTskq5EZq5Gec+mRdCqXr3K90D99ywRlr2A=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "Date": "Sat, 14 Feb 2026 15:14:35 +0000 (GMT)",
        "From": "\"Maciej W. Rozycki\" <macro@orcam.me.uk>",
        "To": "gcc-patches@gcc.gnu.org",
        "cc": "Kalvis Duckmanton <kalvisd@gmail.com>",
        "Subject": "[committed v2] VAX: Fix ICE in fixup_reorder_chain when building\n gimple_match.cc [PR112400]",
        "Message-ID": "<alpine.DEB.2.21.2602141442310.2574@angie.orcam.me.uk>",
        "User-Agent": "Alpine 2.21 (DEB 202 2017-01-01)",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=US-ASCII",
        "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": "From: Kalvis Duckmanton <kalvisd@gmail.com>\n\nWhen cross-compiling itself for VAX, GCC terminates abruptly with an ICE \nwhen compiling gimple_match.cc; the root cause seems to be an \nincompletely removed computed jump instruction, which causes the \nassertion in cfgrtl.cc around line 4083, to no longer hold.\n\nI have verified that the problem is present in GCC 15.2.0 and believe \nthat it's also present in trunk (based on the fact that the patterns for \nthe \"casesi1\" and \"*casesi1\" instructions in 15.2.0 and trunk are the \nsame).\n\nTo fix this issue wrap the limit operand in a USE, to allow `single_set' \nto identify it as an RTL expression setting PC.  This allows the \noptimizer to optimize away case statements branching only to a basic \nblock, removing the ICE.\n\nInclude a test case reduced from gimple_match.cc, which demonstrates the \nproblem in GCC 15.2.0 on NetBSD/amd64 cross-compiling for VAX.\n\n\tgcc/\n\tPR target/112400\n\t* config/vax/vax.md (casesi1): Wrap naked operand 1 with a USE \n\twhere used with the insn split to.\n\t(*casesi1): Likewise naked incoming operand 1.\n\n\tgcc/testsuite/\n\tPR target/112400\n\t* g++.dg/torture/pr112400.C: New file.\n---\n gcc/config/vax/vax.md                   |   4 +-\n gcc/testsuite/g++.dg/torture/pr112400.C | 114 ++++++++++++++++++++++++\n 2 files changed, 116 insertions(+), 2 deletions(-)\n create mode 100644 gcc/testsuite/g++.dg/torture/pr112400.C",
    "diff": "diff --git a/gcc/config/vax/vax.md b/gcc/config/vax/vax.md\nindex 9eb831c49f8..71345e4c3ea 100644\n--- a/gcc/config/vax/vax.md\n+++ b/gcc/config/vax/vax.md\n@@ -2909,7 +2909,7 @@ (define_insn_and_split \"casesi1\"\n   \"#\"\n   \"reload_completed\"\n   [(parallel\n-     [(match_dup 1)\n+     [(use (match_dup 1))\n       (set (pc)\n \t   (plus:SI (sign_extend:SI\n \t\t      (mem:HI (plus:SI\n@@ -2922,7 +2922,7 @@ (define_insn_and_split \"casesi1\"\n   \"\")\n \n (define_insn \"*casesi1\"\n-  [(match_operand:SI 1 \"const_int_operand\" \"n\")\n+  [(use (match_operand:SI 1 \"const_int_operand\" \"n\"))\n    (set (pc)\n \t(plus:SI (sign_extend:SI\n \t\t   (mem:HI (plus:SI\ndiff --git a/gcc/testsuite/g++.dg/torture/pr112400.C b/gcc/testsuite/g++.dg/torture/pr112400.C\nnew file mode 100644\nindex 00000000000..b703c80ce73\n--- /dev/null\n+++ b/gcc/testsuite/g++.dg/torture/pr112400.C\n@@ -0,0 +1,114 @@\n+/* { dg-do compile } */\n+/* { dg-options \"-Wno-return-type\" } */\n+\n+typedef struct a *b;\n+template <typename c, typename d> c e(d);\n+enum f { g, h, i };\n+enum j { k, l, m, aa };\n+struct a {\n+  f ab;\n+};\n+struct af {\n+} n;\n+struct ah;\n+class al;\n+b q;\n+void r(a *);\n+struct o : af {};\n+struct p : o {};\n+struct ag : p {};\n+j s(af *);\n+b t();\n+f fn4();\n+unsigned fn5(ag *);\n+b u(ag *, unsigned);\n+af *v(b(b), b);\n+static bool w(al *, af *, b(b), b aw, b *ax, j) {\n+  r(ax[2]);\n+  if (aw)\n+    return false;\n+}\n+ag *ay;\n+void x(al *at, b as(b), b bb, b bc) {\n+  switch (bb->ab)\n+  case i:\n+    if (af *bd = v(as, bb))\n+      if (e<ah *>(bd))\n+\tswitch (fn4())\n+\tcase h: {\n+\t  b be;\n+\t  switch (be->ab)\n+\t  case i:\n+\t    if (af *bf = v(as, be))\n+\t      if (e<ah *>(bf))\n+\t\tif (ag *bg = e<ag *>(bf))\n+\t\t  switch (s(bg)) {\n+\t\t  case k:\n+\t\t    if (fn5(bg) == 1) {\n+\t\t      b bh = u(bg, 0);\n+\t\t      bh = t();\n+\t\t      switch (bc->ab)\n+\t\t      case g: {\n+\t\t\tb ax[]{be, bh, bc};\n+\t\t\tw(at, &n, as, q, ax, k);\n+\t\t      }\n+\t\t    }\n+\t\t    break;\n+\t\t  case l:\n+\t\t    if (fn5(bg) == 1) {\n+\t\t      b bh = u(bg, 0);\n+\t\t      bh = t();\n+\t\t      switch (bc->ab)\n+\t\t      case g: {\n+\t\t\tb ax[]{be, bh, bc};\n+\t\t\tw(at, &n, as, q, ax, l);\n+\t\t      }\n+\t\t    }\n+\t\t  }\n+\t}\n+\t  else switch (s(ay)) {\n+\t  case k:\n+\t    if (fn5(ay) == 1) {\n+\t      b be = u(ay, 0);\n+\t      be = t();\n+\t      switch (bc->ab)\n+\t      case g: {\n+\t\tb ax[]{bb, be, bc};\n+\t\tw(at, &n, as, q, ax, k);\n+\t      }\n+\t    }\n+\t    break;\n+\t  case l:\n+\t    if (fn5(ay) == 1) {\n+\t      b be = u(ay, 0);\n+\t      be = t();\n+\t      switch (bc->ab)\n+\t      case g: {\n+\t\tb ax[]{bb, be, bc};\n+\t\tw(at, &n, as, q, ax, l);\n+\t      }\n+\t    }\n+\t    break;\n+\t  case m:\n+\t    if (fn5(ay) == 1) {\n+\t      b be = u(ay, 0);\n+\t      be = t();\n+\t      switch (bc->ab)\n+\t      case g: {\n+\t\tb ax[]{bb, be, bc};\n+\t\tw(at, &n, as, q, ax, m);\n+\t      }\n+\t    }\n+\t    break;\n+\t  case aa:\n+\t    if (fn5(ay) == 1) {\n+\t      b be = u(ay, 0);\n+\t      be = t();\n+\t      switch (bc->ab)\n+\t      case g: {\n+\t\tb ax[]{bb, be, bc};\n+\t\tw(at, &n, as, q, ax, aa);\n+\t      }\n+\t    }\n+\t  }\n+}\n",
    "prefixes": [
        "committed",
        "v2"
    ]
}