Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2223248/?format=api
{ "id": 2223248, "url": "http://patchwork.ozlabs.org/api/patches/2223248/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260414195353.221467-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": "<20260414195353.221467-1-ppalka@redhat.com>", "list_archive_url": null, "date": "2026-04-14T19:53:53", "name": "c++: static local meta::info as &targ [PR124824]", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "2f5dd12ffeae037dd9eed648b2edb6d991728fd7", "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/20260414195353.221467-1-ppalka@redhat.com/mbox/", "series": [ { "id": 499889, "url": "http://patchwork.ozlabs.org/api/series/499889/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=499889", "date": "2026-04-14T19:53:53", "name": "c++: static local meta::info as &targ [PR124824]", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/499889/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2223248/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2223248/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=hZG8I4p/;\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=hZG8I4p/", "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 4fwFNf4S5Tz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 05:54:41 +1000 (AEST)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 65E554BA5436\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 19:54:39 +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 82CE14BA5436\n for <gcc-patches@gcc.gnu.org>; Tue, 14 Apr 2026 19:54:12 +0000 (GMT)", "from mail-qv1-f72.google.com (mail-qv1-f72.google.com\n [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-642-IHq22O6KNYy9dYQB24aqdg-1; Tue, 14 Apr 2026 15:54:11 -0400", "by mail-qv1-f72.google.com with SMTP id\n 6a1803df08f44-8acb3741d12so7134606d6.0\n for <gcc-patches@gcc.gnu.org>; Tue, 14 Apr 2026 12:54:10 -0700 (PDT)", "from idea ([2600:4040:aa66:bf00:9e8e:99ff:fed1:71f])\n by smtp.gmail.com with ESMTPSA id\n 6a1803df08f44-8ae685b2c3esm1830026d6.41.2026.04.14.12.54.07\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 14 Apr 2026 12:54:07 -0700 (PDT)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 65E554BA5436", "OpenDKIM Filter v2.11.0 sourceware.org 82CE14BA5436" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 82CE14BA5436", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 82CE14BA5436", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776196452; cv=none;\n b=jqn6NTCvBQnnu2pjWQv8k4AhUF6kKuPuZSJURqJPHyHdUoOTIHb0bzJCkCgkkhaR5D59DDaKBiGPuqJ6Ok0Lh3vY2C+Us0praGmruTdjhGpEWgHknP5m5sAJrbHnKS99l1VYx/2Dq+1/O4oReoAy2Xo1Vw404Bf14aUko2DPY8I=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776196452; c=relaxed/simple;\n bh=zbtpk2aqQrCdwgo9ALNVhswzzTl+N7jJGo/0hZNx57U=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=X+XcfNWWGbuuul7qocTOwbEaYFCQemPIq1UZtO5QC9w+Woz14dnmWHYOEO5HeETyW6Oe2Ys0rl6l7VQuLWg2k/Se3gAMpoD5TRrDhK+ulC6vamycTSwDywGgtyBPE1k9PfDMxaGc3GM/ZkEpA+rS+NVfofcC/DyekjR01dlhPx4=", "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=1776196452;\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=Brhxviey9oOdtAw6s71BTdbpN4rcUXl2VeR5KW27Gi4=;\n b=hZG8I4p/zUWsh6hjYuzcs3/e1dOUutjae/ALdpyc0fW6iYsyF9hu+N6/RowwpqVicgu28P\n IDTbedWL275Bm9mOa7Pf2Fr0GGsEoxEAz5mfw1HcRofiVtRghOUb9zlIijYKqrpCjHkmd/\n ChR/nmWoWQ9ywbCk4ZedWq3llxiRD3w=", "X-MC-Unique": "IHq22O6KNYy9dYQB24aqdg-1", "X-Mimecast-MFC-AGG-ID": "IHq22O6KNYy9dYQB24aqdg_1776196450", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776196449; x=1776801249;\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=Brhxviey9oOdtAw6s71BTdbpN4rcUXl2VeR5KW27Gi4=;\n b=O7iLrdkLZ8MnxXwpa17hAQ9/jeP91zyC+3X7YA8Xnr1fZj5Tbx8k5+BSbzputPMoGm\n QuuUlodjZx/Dhm5/gTQs6zF4TMWpuudVDUJoCfpI4r7MvCDs08zND1GP4h7h6jb2MN5P\n qF1gbtLwfbwo8Ru2Z9INihH3DaI3Mprx+ylQX851MksyJRlyYliYo4mpofQHk2Cu2rim\n xhVkcGT37WIm34/RxlotcWjEIUMLaXkYAAMAXGuUca3uXj1I5LLYUjnGan46jaPPyvxZ\n QnSNqoQciYGcNLk4/FW3E4KiNvhYYh4pmNwXCc+azEr7Hg6piacSQw+HPivMXdkTdw2j\n 5CeQ==", "X-Gm-Message-State": "AOJu0Yyj7gbgOR21Nz0/k77ljruMrZLxpWCMl6WWwzF+hOk9SKhq+YwP\n qHlpq6BNNGF9KpD04a7Hi3bTfCreczHkXLz3XvgvbD/k3zIOfk8fGiiwP2EuQNdNbv2jueVNhOQ\n Ifpin5ZvWxDfe9VM8nDa7NgzvGt47awUQugpo43sd/oVMiJh2goJDj965yhvifGyn0tZExQ8f07\n wAwETzXIi6yraDIpw1oRInwYR4u4a19lC40wstLxNm", "X-Gm-Gg": "AeBDievukQVZcI70+OYuDxzXJ6qJBAPZtxE1n2S6uSzpoAa56RMBAfcHX6/MHduYp2j\n FxXTEadeRCqogILJQ+LalR5YBZdUdCYWpCiKoZtW4jMWYuLHSTKWMyXRn/xTF0C+i68ZWzabZkb\n OhKfcX94brfEpyzJubXtP4kqdzNU4wGY0lSucOCO0kQ3E2SdVtE/fBR4imIqj9+kT5q9EMSkY6c\n InqSh5Pge0MxSW8deuhIQxWr6xh6lEXfXdl0y3jQakhjaxRnTvvWGzHJJnOhBjmmJi6zFaS56p4\n jxJ2CeXgU5EF35WVCOyPgkqpZXYT9EvnLvLRSG6NXcJJ0llQX8/UJnkK6qwHXg5HnSWpSeJTDG3\n NnnHQIL9LEn45", "X-Received": [ "by 2002:a05:6214:2024:b0:8ac:8337:ca0e with SMTP id\n 6a1803df08f44-8ac862ad020mr225566206d6.6.1776196449142;\n Tue, 14 Apr 2026 12:54:09 -0700 (PDT)", "by 2002:a05:6214:2024:b0:8ac:8337:ca0e with SMTP id\n 6a1803df08f44-8ac862ad020mr225565826d6.6.1776196448527;\n Tue, 14 Apr 2026 12:54:08 -0700 (PDT)" ], "From": "Patrick Palka <ppalka@redhat.com>", "To": "gcc-patches@gcc.gnu.org", "Cc": "jason@redhat.com,\n\tpolacek@redhat.com,\n\tPatrick Palka <ppalka@redhat.com>", "Subject": "[PATCH] c++: static local meta::info as &targ [PR124824]", "Date": "Tue, 14 Apr 2026 15:53:53 -0400", "Message-ID": "<20260414195353.221467-1-ppalka@redhat.com>", "X-Mailer": "git-send-email 2.54.0.rc1.54.g60f07c4f5c", "MIME-Version": "1.0", "X-Mimecast-Spam-Score": "0", "X-Mimecast-MFC-PROC-ID": "6BOTMzm5bl_aDk4HTOCL5OGDJULi6AcBN7RRmmoDi3o_1776196450", "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?\n\n-- >8 --\n\nWe're crashing in discriminator_for_local_entity for a static local\nmeta::info variable because determine_local_discriminator is never\ncalled for it from cp_finish_decl. The code path was disabled for\nconsteval-only types in the main Reflection commit r16-6808 to avoid\ncreating a varpool_node for such types.\n\nThis patch naively restricts the get_create call itself rather than the\nentire block so that we still call determine_local_discriminator, which\nseems to suffice to accept the below testcase.\n\n\tPR c++/124824\n\ngcc/cp/ChangeLog:\n\n\t* decl.cc (cp_finish_decl): Sink !consteval_only_p check\n\tso that we still call determine_local_discriminator for\n\tconsteval-only types.\n\ngcc/testsuite/ChangeLog:\n\n\t* g++.dg/reflect/expr17.C: New test.\n---\n gcc/cp/decl.cc | 10 +++++-----\n gcc/testsuite/g++.dg/reflect/expr17.C | 10 ++++++++++\n 2 files changed, 15 insertions(+), 5 deletions(-)\n create mode 100644 gcc/testsuite/g++.dg/reflect/expr17.C", "diff": "diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc\nindex 930253d96460..23b984500444 100644\n--- a/gcc/cp/decl.cc\n+++ b/gcc/cp/decl.cc\n@@ -9885,8 +9885,7 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p,\n \t variable. */\n if (DECL_FUNCTION_SCOPE_P (decl)\n \t && TREE_STATIC (decl)\n-\t && !DECL_ARTIFICIAL (decl)\n-\t && !consteval_only_p (decl))\n+\t && !DECL_ARTIFICIAL (decl))\n \t{\n \t /* The variable holding an anonymous union will have had its\n \t discriminator set in finish_anon_union, after which it's\n@@ -9904,9 +9903,10 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p,\n \t walk_tree (&init, notice_forced_label_r, NULL, NULL);\n \t add_local_decl (cfun, decl);\n \t }\n-\t /* And make sure it's in the symbol table for\n-\t c_parse_final_cleanups to find. */\n-\t varpool_node::get_create (decl);\n+\t if (!consteval_only_p (decl))\n+\t /* And make sure it's in the symbol table for\n+\t c_parse_final_cleanups to find. */\n+\t varpool_node::get_create (decl);\n \t}\n \n if (flag_openmp\ndiff --git a/gcc/testsuite/g++.dg/reflect/expr17.C b/gcc/testsuite/g++.dg/reflect/expr17.C\nnew file mode 100644\nindex 000000000000..d4f04d2c4094\n--- /dev/null\n+++ b/gcc/testsuite/g++.dg/reflect/expr17.C\n@@ -0,0 +1,10 @@\n+// PR c++/124824\n+// { dg-do compile { target c++26 } }\n+// { dg-additional-options \"-freflection\" }\n+\n+template<auto> void f() { }\n+\n+int main() {\n+ static constexpr auto M = ^^int;\n+ f<&M>();\n+}\n", "prefixes": [] }