Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2229917/?format=api
{ "id": 2229917, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2229917/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/afEirwz810jBBjm2@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": "<afEirwz810jBBjm2@tucnak>", "date": "2026-04-28T21:12:15", "name": "c++: Fix up REFLECT_BASE comparison", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "73a3a68249d915de9e9285cd91f0e2fbbd68c22d", "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/afEirwz810jBBjm2@tucnak/mbox/", "series": [ { "id": 501934, "url": "http://patchwork.ozlabs.org/api/1.1/series/501934/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=501934", "date": "2026-04-28T21:12:15", "name": "c++: Fix up REFLECT_BASE comparison", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/501934/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2229917/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2229917/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=NnUKEXlE;\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=NnUKEXlE", "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 4g4tSY5Cywz1yHZ\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 07:13:00 +1000 (AEST)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 839734BBC0CB\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 21:12:56 +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 8933A4B920F0\n for <gcc-patches@gcc.gnu.org>; Tue, 28 Apr 2026 21:12:23 +0000 (GMT)", "from mx-prod-mc-03.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-677-9rCvAY8KMLWYgPilplBfbw-1; Tue,\n 28 Apr 2026 17:12:20 -0400", "from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93])\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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id B31021956072\n for <gcc-patches@gcc.gnu.org>; Tue, 28 Apr 2026 21:12:19 +0000 (UTC)", "from tucnak.zalov.cz (unknown [10.44.34.21])\n by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with\n ESMTPS\n id F14E7180047F; Tue, 28 Apr 2026 21:12:18 +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 63SLCGIO1271174\n (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);\n Tue, 28 Apr 2026 23:12:16 +0200", "(from jakub@localhost)\n by tucnak.zalov.cz (8.18.1/8.18.1/Submit) id 63SLCFhK1271173;\n Tue, 28 Apr 2026 23:12:15 +0200" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 839734BBC0CB", "OpenDKIM Filter v2.11.0 sourceware.org 8933A4B920F0" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 8933A4B920F0", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 8933A4B920F0", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777410743; cv=none;\n b=iALRJyBh4SX5xmtQd/k+jFsy9mhWcnL9AtjTvu7q+kaJpsPPzXRhcF8008L0xefTNKzOPN0UFVxkrB5vxZTVboPHe26mW61EF3S5yxGeGEmjyzGVri7fwy9IG8JIYOeFjU43i5PBs806K/vttkjMUaGblb1FsVPhB2pM6YsY3qA=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1777410743; c=relaxed/simple;\n bh=rKOflKaFLbfENrqeF9FXXQaSYupD5CwVc5TveuudyOY=;\n h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;\n b=ntxM67Yc5KsRPb0EieYJp7FtE0ikpdQYKFhONqsGnDt+CZDwfOJlxNp7QnI3RBMMKNWPpxMoeNDdCQ9r8DEiV9rrs7+exl8aiVK2O6RtaFwTZ/shEnCvHK0oetRudzNfDBPT0662p1dIIcEQfeJgo3y0N23DdDArMUdaBMwrwb0=", "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=1777410743;\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:in-reply-to:in-reply-to: references:references;\n bh=wEY/QYNxtfGBkBqDqotnksGdFUtslhIuLL+hW4rLYFQ=;\n b=NnUKEXlEnFYkwxoviy6upQMskYt6VZ8z+76ri+VBkarC+9jbLLbF5qsNwED2jAIcxxHQlh\n UZPojuHau3KtvJcTTrQ4z9lgNF+uQCCWw80Fr7yEtP7RS5SYrb02GsNPe1uBMT+H0mXc6R\n RvLEhlZpHQxUF5IXGBG34Gl3cY+qQsk=", "X-MC-Unique": "9rCvAY8KMLWYgPilplBfbw-1", "X-Mimecast-MFC-AGG-ID": "9rCvAY8KMLWYgPilplBfbw_1777410739", "Date": "Tue, 28 Apr 2026 23:12:15 +0200", "From": "Jakub Jelinek <jakub@redhat.com>", "To": "Jason Merrill <jason@redhat.com>, Marek Polacek <polacek@redhat.com>", "Cc": "gcc-patches@gcc.gnu.org", "Subject": "[PATCH] c++: Fix up REFLECT_BASE comparison", "Message-ID": "<afEirwz810jBBjm2@tucnak>", "References": "<afBgbg_d74JbZLKi@tucnak>\n <af1ae3c0-f3f3-480b-889a-8e4200a8701e@redhat.com>", "MIME-Version": "1.0", "In-Reply-To": "<af1ae3c0-f3f3-480b-889a-8e4200a8701e@redhat.com>", "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.93", "X-Mimecast-Spam-Score": "0", "X-Mimecast-MFC-PROC-ID": "qCHwRq3zHMicYNWaKKBopzCFiF8dPBf_9evmZfQqCek_1777410739", "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": "On Tue, Apr 28, 2026 at 03:23:38PM -0400, Jason Merrill wrote:\n> > The second fix is what I found while writing testcase for this.\n> > The r16-7260 change to compare_reflections broke REFLECT_BASE comparisons.\n> > It now calls cp_tree_equal on their REFLECT_EXPR_HANDLE which is TREE_BINFO.\n> > It works if lhs == rhs, returns true, or if TREE_CODE is different (returns\n> > false), but otherwise the function isn't prepared to handle TREE_BINFO\n> > and because TREE_BINFO is tcc_exceptional, ends with\n> > default:\n> > gcc_unreachable ();\n> > (for --disable-checking it actually works by doing return false; after\n> > this). This patch fixes that in the third hunk by doing lhs == rhs\n> > comparison only.\n> \n> Sounds good.\n\nWould you mind if this is done separately, because it can take a while to\nsettle on the printing?\n\nThe following patch just fixes the comparison and adds a new testcase which\nICEs without the change and succeeds with it. Will bootstrap/regtest it on\nx86_64-linux and i686-linux momentarily.\n\n2026-04-28 Jakub Jelinek <jakub@redhat.com>\n\n\t* reflect.cc (compare_reflection): For REFLECT_BASE use lhs == rhs rather\n\tthan cp_tree_equal.\n\n\t* g++.dg/reflect/compare12.C: New test.\n\n\n\n\tJakub", "diff": "--- gcc/cp/reflect.cc.jj\t2026-04-28 22:59:39.893450512 +0200\n+++ gcc/cp/reflect.cc\t2026-04-28 23:08:25.130424253 +0200\n@@ -8872,6 +8872,8 @@ compare_reflections (tree lhs, tree rhs)\n }\n else if (lkind == REFLECT_ANNOTATION)\n return TREE_VALUE (lhs) == TREE_VALUE (rhs);\n+ else if (lkind == REFLECT_BASE)\n+ return lhs == rhs;\n else if (TYPE_P (lhs) && TYPE_P (rhs))\n {\n /* Given \"using A = int;\", \"^^int != ^^A\" should hold. */\n--- gcc/testsuite/g++.dg/reflect/compare12.C.jj\t2026-04-28 23:05:29.926452550 +0200\n+++ gcc/testsuite/g++.dg/reflect/compare12.C\t2026-04-28 23:06:36.594300232 +0200\n@@ -0,0 +1,12 @@\n+// { dg-do compile { target c++26 } }\n+// { dg-additional-options \"-freflection\" }\n+\n+#include <meta>\n+\n+struct A {};\n+struct B {};\n+struct C : A, B {};\n+struct D : A, B {};\n+constexpr auto ctx = std::meta::access_context::unchecked ();\n+static_assert (bases_of (^^C, ctx)[0] != bases_of (^^C, ctx)[1]);\n+static_assert (bases_of (^^C, ctx)[1] != bases_of (^^D, ctx)[1]);\n", "prefixes": [] }