get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2217016,
    "url": "http://patchwork.ozlabs.org/api/patches/2217016/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260327142740.487710-1-ppalka@redhat.com/",
    "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": "<20260327142740.487710-1-ppalka@redhat.com>",
    "list_archive_url": null,
    "date": "2026-03-27T14:27:40",
    "name": "c++: templated static local var has value-dep addr, cont [PR123529]",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "dd4c0fb0eec2315c42bd2032888d024f093fae2c",
    "submitter": {
        "id": 78319,
        "url": "http://patchwork.ozlabs.org/api/people/78319/?format=api",
        "name": "Patrick Palka",
        "email": "ppalka@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260327142740.487710-1-ppalka@redhat.com/mbox/",
    "series": [
        {
            "id": 497778,
            "url": "http://patchwork.ozlabs.org/api/series/497778/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=497778",
            "date": "2026-03-27T14:27:40",
            "name": "c++: templated static local var has value-dep addr, cont [PR123529]",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/497778/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2217016/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2217016/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 (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=Vl3Gwwkj;\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=Vl3Gwwkj",
            "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.129.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 4fj30P3Xjvz1y1x\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 28 Mar 2026 01:28:19 +1100 (AEDT)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 8BB3D4BA23C6\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 14:28:17 +0000 (GMT)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by sourceware.org (Postfix) with ESMTP id 232F14BA23D1\n for <gcc-patches@gcc.gnu.org>; Fri, 27 Mar 2026 14:27:46 +0000 (GMT)",
            "from mail-qt1-f198.google.com (mail-qt1-f198.google.com\n [209.85.160.198]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-247-yWLp7yveOe-mYQqSTcfObA-1; Fri, 27 Mar 2026 10:27:44 -0400",
            "by mail-qt1-f198.google.com with SMTP id\n d75a77b69052e-50943e69b08so6739091cf.2\n for <gcc-patches@gcc.gnu.org>; Fri, 27 Mar 2026 07:27:44 -0700 (PDT)",
            "from idea ([2600:4040:aa66:bf00:9e8e:99ff:fed1:71f])\n by smtp.gmail.com with ESMTPSA id\n 6a1803df08f44-89cd5a6a840sm51247246d6.36.2026.03.27.07.27.41\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 27 Mar 2026 07:27:41 -0700 (PDT)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 8BB3D4BA23C6",
            "OpenDKIM Filter v2.11.0 sourceware.org 232F14BA23D1"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 232F14BA23D1",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 232F14BA23D1",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1774621666; cv=none;\n b=toFhqV2HMqRlhlylpZyszsvoyltH91eX0ppfFS5l5wBMbDMKdfpwyWzs6AJdwzCqneaqt23zG4G10fzhZ5pq7rUEQJ+d4EuVwPgAHv93dIgafM71byPQU4KkpqWM5dIWwfobbOgzLqxBNO4dMjWlxqmP0FC/FXO6fuo02wsuCCQ=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1774621666; c=relaxed/simple;\n bh=xg/iXf4J2Jn1++WPvTW//7e7D/etV0Y7fh9f+vAMPsQ=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=H8jg19uhXAFTsvROU2Hz7wb7nAzFfcUmBx5zhnTq74FoDnr7NS1061o8XQfrFwCv6+kylV/XITG/XHbhQWJ5/h+vlOIV7TEoTEzBfnJHOTSzhEz+xRp/gUxzauepiTs0p83InwGQU7y0FVYfPeQFXOCD6gLJvlvuxsPzr5M5D5Q=",
        "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=1774621665;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=b0mWOl9dnqp1RYZSzTZhUIuCy92nsg3W0ECvlqWGtHc=;\n b=Vl3Gwwkj0eb50ICXdFy9wTiLX9bnhpZ6kUNyzaX1BxStPPfPGK3owzjIS6IS68JJ4HGJb7\n vPj7GKZcYPFfZPhNYivDmVwOw0me4LWM5kCaVAXtAwLcjDY8E6K4MQIAwFbnHQ/pv5lAus\n YuWiDR9eBNADZxx6nG1XRI0pe27O3U4=",
        "X-MC-Unique": "yWLp7yveOe-mYQqSTcfObA-1",
        "X-Mimecast-MFC-AGG-ID": "yWLp7yveOe-mYQqSTcfObA_1774621664",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774621663; x=1775226463;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=b0mWOl9dnqp1RYZSzTZhUIuCy92nsg3W0ECvlqWGtHc=;\n b=anku9w+1ddVYojwO3ZSgyTjqmJxUBiS4RfNazzu6/rn61enCxgKpAsV5EGq5ETvO49\n 4D+4rW1LS+YFRarKerORQkqLDw2XpFlJL//4jCxedLSfQnCSdvu5JmYzJb3jrAzvoxiC\n bmEbtdrhIxL2szNh9emY2x458GaW/KkIXBUrFHjsGEe8fbYuZTUkby2G6F1/QQlAmivM\n TtFThe14fSvyRtb8IhiZ2HfS+1xfVX4rTBwrburyledGx86/cgkTZTn+m1rttre7f/r9\n U3kNs+IJTkYUH5OxYvuoNKHcwOZGB7eYbTrrLD4whsfUOPQfUtPu5Y2tBdqss1FA7ILd\n DWRQ==",
        "X-Gm-Message-State": "AOJu0YyIXRrk9AKULItVzeA344sEH5MaBVQxtuWafvspWliyy52TkaJA\n kYwUONSQf/Oys6x2yow5VRjlz3J3u8bapX36PLr6kZrT2yosiRTZ4NYHe1tUWoCy4SORhm003nS\n rpxpOkLePr7G5eDWU3ebJGvATp+Nz3UuOcK9H8Sawx54SI6WgtOOi7ZR5kfLavZQsuWmhKks4Kf\n UlVJG4AzRtx2zScMkMbO835ts8LaZWHBoSsOia0vCH",
        "X-Gm-Gg": "ATEYQzxM4lDzZgagf6IM1tsonKRQC9ZfYEDDyeazGlbryg288CZECZAmS0B2oOzwrb1\n AfCBgt++6vxPvjezzgnqrR6nq2GtH5nD9ln1xHfEJeDa581selwuxep8Wzr17J03fFJD4P3o/9h\n Le1U57DaMAAIxuZB/OpmxRkZ/5s5vfLPeipzJOEBQoL3sLHndqkhtqcjY6ceNvE1hxwgXKnZqCN\n orvhxFNGL0GVjpPKqwvQjPMlXQDb7tNYeeCPVOT4cuoIv8xNHDa6dp4Apo1nMiiDDZQvjaXwSC+\n VJi8xesRYaLlbhqnmhfeNkVtBtV4YwBso9FmRLvPW0Iy4lldA4OpB9w9k8TGHXpK6N02te8n7zH\n bUx/T/JcJQ/bc",
        "X-Received": [
            "by 2002:ac8:5fd3:0:b0:501:4767:a6f with SMTP id\n d75a77b69052e-50ba386e25bmr27323741cf.3.1774621663064;\n Fri, 27 Mar 2026 07:27:43 -0700 (PDT)",
            "by 2002:ac8:5fd3:0:b0:501:4767:a6f with SMTP id\n d75a77b69052e-50ba386e25bmr27323191cf.3.1774621662398;\n Fri, 27 Mar 2026 07:27:42 -0700 (PDT)"
        ],
        "From": "Patrick Palka <ppalka@redhat.com>",
        "To": "gcc-patches@gcc.gnu.org",
        "Cc": "jason@redhat.com,\n\tPatrick Palka <ppalka@redhat.com>",
        "Subject": "[PATCH] c++: templated static local var has value-dep addr,\n cont [PR123529]",
        "Date": "Fri, 27 Mar 2026 10:27:40 -0400",
        "Message-ID": "<20260327142740.487710-1-ppalka@redhat.com>",
        "X-Mailer": "git-send-email 2.53.0.719.g41688c1a23",
        "MIME-Version": "1.0",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-MFC-PROC-ID": "QDSL5rUGO2ftQWf8lb90fYXIzhMYmjwD8V7lE3oWJIs_1774621664",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "content-type": "text/plain; charset=\"US-ASCII\"; x-default=true",
        "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": "Tested on x86_64-pc-linux-gnu, does this look OK for trunk/backports?\n\n-- >8 --\n\nhas_value_dependent_address for a static local variable checks type\ndependence of its context, but that's too narrow and we need a more\ngeneral dependence check that considers outer template arguments as\nwell, so that in the testcase below we deem A<T>::g()::i to have a\nvalue-dependent address (making f<&i>() a dependent call).\n\n\tPR c++/123529\n\tPR c++/98930\n\ngcc/cp/ChangeLog:\n\n\t* pt.cc (has_value_dependent_address): Correct context\n\tdependence check for a static local variable.\n\ngcc/testsuite/ChangeLog:\n\n\t* g++.dg/cpp1z/nontype9.C: New test.\n---\n gcc/cp/pt.cc                          |  3 ++-\n gcc/testsuite/g++.dg/cpp1z/nontype9.C | 16 ++++++++++++++++\n 2 files changed, 18 insertions(+), 1 deletion(-)\n create mode 100644 gcc/testsuite/g++.dg/cpp1z/nontype9.C",
    "diff": "diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc\nindex 60afc6b99266..d9aa3e3369c3 100644\n--- a/gcc/cp/pt.cc\n+++ b/gcc/cp/pt.cc\n@@ -7133,7 +7133,8 @@ has_value_dependent_address (tree op)\n       if (VAR_P (op)\n \t  && TREE_STATIC (op)\n \t  && TREE_CODE (ctx) == FUNCTION_DECL\n-\t  && type_dependent_expression_p (ctx))\n+\t  && DECL_TEMPLATE_INFO (ctx)\n+\t  && any_dependent_template_arguments_p (DECL_TI_ARGS (ctx)))\n \treturn true;\n     }\n \ndiff --git a/gcc/testsuite/g++.dg/cpp1z/nontype9.C b/gcc/testsuite/g++.dg/cpp1z/nontype9.C\nnew file mode 100644\nindex 000000000000..6f4d927eff39\n--- /dev/null\n+++ b/gcc/testsuite/g++.dg/cpp1z/nontype9.C\n@@ -0,0 +1,16 @@\n+// PR c++/123529\n+// { dg-do compile { target c++17 } }\n+\n+template<int* P>\n+void f();\n+\n+template<class T>\n+struct A {\n+  static void g() {\n+    static int i;\n+    f<&i>();\n+  }\n+};\n+\n+template struct A<char>;\n+template struct A<int>;\n",
    "prefixes": []
}