Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2229329/?format=api
{ "id": 2229329, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2229329/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/afBgbg_d74JbZLKi@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": "<afBgbg_d74JbZLKi@tucnak>", "date": "2026-04-28T07:23:26", "name": "c++: Improve REFLECT_EXPR printing [PR125007]", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "7f6bef31bbd78c96253889d7ad4e3b726da4ccb8", "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/afBgbg_d74JbZLKi@tucnak/mbox/", "series": [ { "id": 501771, "url": "http://patchwork.ozlabs.org/api/1.1/series/501771/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=501771", "date": "2026-04-28T07:23:26", "name": "c++: Improve REFLECT_EXPR printing [PR125007]", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/501771/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2229329/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2229329/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=LBr2POxN;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.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=LBr2POxN", "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 [38.145.34.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 4g4X462lzHz1yHX\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 17:24:06 +1000 (AEST)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 4E75A4BA23DB\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 07:24:04 +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 C549F4BA2E05\n for <gcc-patches@gcc.gnu.org>; Tue, 28 Apr 2026 07:23:33 +0000 (GMT)", "from mx-prod-mc-05.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-249-LRMBFXb-NnOPnewyOLBAcQ-1; Tue,\n 28 Apr 2026 03:23:31 -0400", "from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4])\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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 6EDAE19560AF\n for <gcc-patches@gcc.gnu.org>; Tue, 28 Apr 2026 07:23:30 +0000 (UTC)", "from tucnak.zalov.cz (unknown [10.44.34.21])\n by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with\n ESMTPS\n id B098A3000C22; Tue, 28 Apr 2026 07:23:29 +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 63S7NQmm296548\n (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);\n Tue, 28 Apr 2026 09:23:27 +0200", "(from jakub@localhost)\n by tucnak.zalov.cz (8.18.1/8.18.1/Submit) id 63S7NQOW296547;\n Tue, 28 Apr 2026 09:23:26 +0200" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 4E75A4BA23DB", "OpenDKIM Filter v2.11.0 sourceware.org C549F4BA2E05" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org C549F4BA2E05", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org C549F4BA2E05", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777361013; cv=none;\n b=cKFK4Z3pEFoAFzMDIJdYFifhrDg/cQeCmmq7tjUx5N2TMeKVaA0f6YTCA7TNHm3bpEwOKsIkGcRIND3MDrmVMsiAC1AdIVEilkGw/RKoRcvOq+t573VDkyxNEEQaQPcBIbkH+WO9e43IJNNpiAYqCqJUSBuOpejoL2lSvwAMoG0=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1777361013; c=relaxed/simple;\n bh=ElJjWtyHZz0Yh/zlnXCppLflvjCACS++P+pbURTSTgQ=;\n h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;\n b=a+WJZexgibTuSm5jZBft57FIK5HnrvP55885pDI5hhURfYqu2aUQaW+vq+3qEQ02q+krYnv78mL1zVZk1vtMVrCU3dvgKZDxDG5kIINGYhb8etCThGJmcRPK8lfQf02zT8cyQouoRHXMfjK8jqNpGaK0UNGNhI1KcdWouf+NQ5g=", "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=1777361013;\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; bh=4rWuIouwbbe2WJhsdRTymc78bHYa18mPCiIBmamwH2w=;\n b=LBr2POxN++hH0ydFOmvsCopE4bykhVciVVBfoQDUyU78331TlwkANWQM/7YeDQlBBiHdRy\n 0QWBsz/0Cts6rWFYlJFNywVBpSyVEISrnabDcOdB3S7dVyjFN/Zm1eLj08ghlCagCn0dvm\n ckh5A9Dn5kYPVINcq4LSxxWMoJ+fqac=", "X-MC-Unique": "LRMBFXb-NnOPnewyOLBAcQ-1", "X-Mimecast-MFC-AGG-ID": "LRMBFXb-NnOPnewyOLBAcQ_1777361010", "Date": "Tue, 28 Apr 2026 09:23:26 +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++: Improve REFLECT_EXPR printing [PR125007]", "Message-ID": "<afBgbg_d74JbZLKi@tucnak>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.4", "X-Mimecast-Spam-Score": "0", "X-Mimecast-MFC-PROC-ID": "ryRuNOzKhIubdG81eHm74y5ngOTrJYqwl2xBvSTGV8g_1777361010", "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": "Hi!\n\nThe following patch fixes 2 reflection related problems.\nOne is that the REFLECT_EXPR printing is weird, it prints everything\nas ^^ followed by dumping the decl/type/expr handle of the REFLECT_EXPR_HANDLE\nexcept the weird printing of data member specifications.\nE.g. annotations are printed as ^^ and dump_expr on the REFLECT_EXPR_HANDLE,\nwhich is a TREE_LIST so it prints the TREE_VALUE of TREE_VALUE of that in\nthe end and prints e.g. reflection of [[=1]] as ^^1.\nThe following patch prints reflections of annotations as ^^[[=1]] which is\nalso not valid C++ syntax, but because the IL doesn't store the decl/type\netc. in whose DECL_ATTRIBUTES/TYPE_ATTRIBUTES it appears, I'm afraid we\ncan't do much better (like print annotations_of(^^something)[N]).\nFor REFLECT_BASE/REFLECT_PARM/REFLECT_DATA_MEMBER_SPEC, it attempts to use\nthe C++ valid syntax, so prints\nbases_of(^^type,std::meta::access_context::unchecked())[N]\nparameters_of(^^decl)[N]\ndata_member_spec(^^type,{.name=\"foo\"})\netc. Admittedly, haven't handled REFLECT_VALUE and REFLECT_OBJECT there,\nguess incrementally we should print there std::meta::reflect_constant(...)\netc.\n\nThe second fix is what I found while writing testcase for this.\nThe r16-7260 change to compare_reflections broke REFLECT_BASE comparisons.\nIt now calls cp_tree_equal on their REFLECT_EXPR_HANDLE which is TREE_BINFO.\nIt works if lhs == rhs, returns true, or if TREE_CODE is different (returns\nfalse), but otherwise the function isn't prepared to handle TREE_BINFO\nand 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\nthis). This patch fixes that in the third hunk by doing lhs == rhs\ncomparison only.\n\nBootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk/16.2?\n\n2026-04-27 Jakub Jelinek <jakub@redhat.com>\n\n\tPR c++/125007\n\t* cp-tree.h (maybe_update_function_parm): Declare.\n\t* reflect.cc (maybe_update_function_parm): No longer static.\n\t(compare_reflections): For REFLECT_BASE use lhs == rhs rather\n\tthan cp_tree_equal.\n\t* error.cc (dump_expr) <case REFLECT_EXPR>: Improve printing\n\tof various reflections.\n\n\t* g++.dg/reflect/pr125007.C: New test.\n\n\n\tJakub", "diff": "--- gcc/cp/cp-tree.h.jj\t2026-04-24 14:30:10.720144687 +0200\n+++ gcc/cp/cp-tree.h\t2026-04-27 16:39:10.689016338 +0200\n@@ -9441,6 +9441,7 @@ extern void coro_set_ramp_function\t\t(tre\n \n /* In reflect.cc */\n extern void init_reflection ();\n+extern tree maybe_update_function_parm (tree);\n extern bool metafunction_p (tree) ATTRIBUTE_PURE;\n extern tree direct_base_derived (tree) ATTRIBUTE_PURE;\n extern tree process_metafunction (const constexpr_ctx *, tree, tree,\n--- gcc/cp/reflect.cc.jj\t2026-04-24 14:30:10.735144434 +0200\n+++ gcc/cp/reflect.cc\t2026-04-27 18:07:14.557161080 +0200\n@@ -278,7 +278,7 @@ maybe_strip_typedefs (tree t)\n DECL_ARGUMENTS (DECL_CONTEXT (parm)) chain. Return corresponding\n PARM_DECL which is in the chain. */\n \n-static tree\n+tree\n maybe_update_function_parm (tree parm)\n {\n if (!OLD_PARM_DECL_P (parm))\n@@ -8867,6 +8867,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/cp/error.cc.jj\t2026-04-16 18:56:51.661066918 +0200\n+++ gcc/cp/error.cc\t2026-04-27 18:18:35.825578985 +0200\n@@ -3331,21 +3331,126 @@ dump_expr (cxx_pretty_printer *pp, tree\n \n case REFLECT_EXPR:\n {\n-\tpp_string (pp, \"^^\");\n \ttree h = REFLECT_EXPR_HANDLE (t);\n-\tif (DECL_P (h))\n-\t dump_decl (pp, h, flags);\n-\telse if (TYPE_P (h))\n-\t dump_type (pp, h, flags);\n-\telse if (TREE_CODE (h) == TREE_VEC)\n+\tbool any;\n+\tswitch (REFLECT_EXPR_KIND (t))\n \t {\n-\t pp_format_decoder (pp) = cp_printer;\n-\t pp->set_format_postprocessor\n-\t (std::make_unique<cxx_format_postprocessor> ());\n-\t dump_data_member_spec (pp, h);\n+\t case REFLECT_ANNOTATION:\n+\t pp_string (pp, \"^^[[=\");\n+\t pp->set_padding (pp_none);\n+\t dump_expr (pp, TREE_VALUE (TREE_VALUE (h)), flags);\n+\t pp_string (pp, \"]]\");\n+\t break;\n+\t case REFLECT_DATA_MEMBER_SPEC:\n+\t pp_cxx_ws_string (pp, \"data_member_spec\");\n+\t pp_string (pp, \"(^^\");\n+\t pp->set_padding (pp_none);\n+\t dump_type (pp, TREE_VEC_ELT (h, 0), flags);\n+\t pp_string (pp, \",{\");\n+\t any = false;\n+\t if (TREE_VEC_ELT (h, 1))\n+\t {\n+\t\tpp_string (pp, \".name=\");\n+\t\tpp_doublequote (pp);\n+\t\tpp->set_padding (pp_none);\n+\t\tdump_decl (pp, TREE_VEC_ELT (h, 1), flags);\n+\t\tpp_doublequote (pp);\n+\t\tany = true;\n+\t }\n+\t if (TREE_VEC_ELT (h, 2))\n+\t {\n+\t\tif (any)\n+\t\t pp_comma (pp);\n+\t\tpp_string (pp, \".alignment=\");\n+\t\tpp->set_padding (pp_none);\n+\t\tdump_expr (pp, TREE_VEC_ELT (h, 2), flags);\n+\t\tany = true;\n+\t }\n+\t if (TREE_VEC_ELT (h, 3))\n+\t {\n+\t\tif (any)\n+\t\t pp_comma (pp);\n+\t\tpp_string (pp, \".bit_width=\");\n+\t\tpp->set_padding (pp_none);\n+\t\tdump_expr (pp, TREE_VEC_ELT (h, 3), flags);\n+\t\tany = true;\n+\t }\n+\t if (TREE_VEC_ELT (h, 4) && !integer_zerop (TREE_VEC_ELT (h, 4)))\n+\t {\n+\t\tif (any)\n+\t\t pp_comma (pp);\n+\t\tpp_string (pp, \".no_unique_address=\");\n+\t\tpp->set_padding (pp_none);\n+\t\tdump_expr (pp, TREE_VEC_ELT (h, 4), flags);\n+\t\tany = true;\n+\t }\n+\t if (TREE_VEC_LENGTH (h) > 5)\n+\t {\n+\t\tif (any)\n+\t\t pp_comma (pp);\n+\t\tpp_string (pp, \".annotations={\");\n+\t\tfor (int i = 5; i < TREE_VEC_LENGTH (h); ++i)\n+\t\t {\n+\t\t dump_expr (pp, TREE_VEC_ELT (h, i), flags);\n+\t\t if (i != TREE_VEC_LENGTH (h) - 1)\n+\t\t pp_comma (pp);\n+\t\t pp->set_padding (pp_none);\n+\t\t }\n+\t\tpp_right_brace (pp);\n+\t }\n+\t pp_string (pp, \"})\");\n+\t break;\n+\t case REFLECT_BASE:\n+\t {\n+\t pp_cxx_ws_string (pp, \"bases_of\");\n+\t pp_string (pp, \"(^^\");\n+\t pp->set_padding (pp_none);\n+\t tree d = direct_base_derived (h);\n+\t dump_type (pp, d, flags);\n+\t pp_string (pp, \",std::meta::access_context::unchecked())[\");\n+\t pp->set_padding (pp_none);\n+\t tree binfo = TYPE_BINFO (d), base_binfo;\n+\t for (unsigned i = 0; BINFO_BASE_ITERATE (binfo, i, base_binfo);\n+\t\t i++)\n+\t\tif (base_binfo == h)\n+\t\t {\n+\t\t pp_wide_integer (pp, i);\n+\t\t break;\n+\t\t }\n+\t pp_right_bracket (pp);\n+\t break;\n+\t }\n+\t case REFLECT_PARM:\n+\t {\n+\t pp_cxx_ws_string (pp, \"parameters_of\");\n+\t pp_string (pp, \"(^^\");\n+\t pp->set_padding (pp_none);\n+\t h = maybe_update_function_parm (h);\n+\t dump_decl (pp, DECL_CONTEXT (h), flags);\n+\t pp_string (pp, \")[\");\n+\t pp->set_padding (pp_none);\n+\t unsigned int i = 0;\n+\t for (tree arg = FUNCTION_FIRST_USER_PARM (DECL_CONTEXT (h));\n+\t\t arg; arg = DECL_CHAIN (arg), ++i)\n+\t\tif (arg == h)\n+\t\t {\n+\t\t pp_wide_integer (pp, i);\n+\t\t break;\n+\t\t }\n+\t pp_right_bracket (pp);\n+\t break;\n+\t }\n+\t default:\n+\t pp_string (pp, \"^^\");\n+\t pp->set_padding (pp_none);\n+\t if (DECL_P (h))\n+\t dump_decl (pp, h, flags);\n+\t else if (TYPE_P (h))\n+\t dump_type (pp, h, flags);\n+\t else\n+\t dump_expr (pp, h, flags);\n+\t break;\n \t }\n-\telse\n-\t dump_expr (pp, h, flags);\n \tbreak;\n }\n \n--- gcc/testsuite/g++.dg/reflect/pr125007.C.jj\t2026-04-27 18:02:22.128133412 +0200\n+++ gcc/testsuite/g++.dg/reflect/pr125007.C\t2026-04-27 18:29:02.136933028 +0200\n@@ -0,0 +1,30 @@\n+// PR c++/125007\n+// { dg-do compile { target c++26 } }\n+// { dg-additional-options \"-freflection\" }\n+\n+#include <meta>\n+\n+[[=1]] void foo (int x, int y);\n+[[=2]] void foo (int x, int z);\n+\n+struct A { int a; };\n+struct B { int b; };\n+struct C : public A, B {};\n+struct D : public A, B {};\n+\n+constexpr auto ctx = std::meta::access_context::unchecked ();\n+static_assert (annotations_of (^^foo)[0] == annotations_of (^^foo)[1]);\t// { dg-error \"static assertion failed\" }\n+// { dg-message \"note: the comparison reduces to '\\\\\\(\\\\\\^\\\\\\^\\\\\\[\\\\\\[=1\\\\\\]\\\\\\] == \\\\\\^\\\\\\^\\\\\\[\\\\\\[=2\\\\\\]\\\\\\]\\\\\\)'\" \"\" { target *-*-* } .-1 }\n+static_assert (parameters_of (^^foo)[0] == parameters_of (^^foo)[1]);\t// { dg-error \"static assertion failed\" }\n+// { dg-message \"note: the comparison reduces to '\\\\\\(parameters_of\\\\\\(\\\\\\^\\\\\\^foo\\\\\\(int, int\\\\\\)\\\\\\)\\\\\\[0\\\\\\] == parameters_of\\\\\\(\\\\\\^\\\\\\^foo\\\\\\(int, int\\\\\\)\\\\\\)\\\\\\[1\\\\\\]\\\\\\)'\" \"\" { target *-*-* } .-1 }\n+static_assert (bases_of (^^C, ctx)[0] == bases_of (^^C, ctx)[1]);\t// { dg-error \"static assertion failed\" }\n+// { dg-message \"note: the comparison reduces to '\\\\\\(bases_of\\\\\\(\\\\\\^\\\\\\^C,std::meta::access_context::unchecked\\\\\\(\\\\\\)\\\\\\)\\\\\\[0\\\\\\] == bases_of\\\\\\(\\\\\\^\\\\\\^C,std::meta::access_context::unchecked\\\\\\(\\\\\\)\\\\\\)\\\\\\[1\\\\\\]\\\\\\)'\" \"\" { target *-*-* } .-1 }\n+static_assert (bases_of (^^C, ctx)[1] == bases_of (^^D, ctx)[1]);\t// { dg-error \"static assertion failed\" }\n+// { dg-message \"note: the comparison reduces to '\\\\\\(bases_of\\\\\\(\\\\\\^\\\\\\^C,std::meta::access_context::unchecked\\\\\\(\\\\\\)\\\\\\)\\\\\\[1\\\\\\] == bases_of\\\\\\(\\\\\\^\\\\\\^D,std::meta::access_context::unchecked\\\\\\(\\\\\\)\\\\\\)\\\\\\[1\\\\\\]\\\\\\)'\" \"\" { target *-*-* } .-1 }\n+constexpr auto an1 = annotations_of (^^foo)[0];\n+constexpr auto an2 = annotations_of (^^foo)[1];\n+constexpr auto an3 = std::meta::reflect_constant (3);\n+static_assert (data_member_spec (^^int, { .name = \"foo\", .alignment = 64, .no_unique_address = true, .annotations = { an1, an2, an3 } }) == ^^::);\t// { dg-error \"static assertion failed\" }\n+// { dg-message \"note: the comparison reduces to '\\\\\\(data_member_spec\\\\\\(\\\\\\^\\\\\\^int,\\\\\\{.name=\\\\\\\"foo\\\\\\\",.alignment=64,.no_unique_address=true,.annotations=\\\\\\{\\\\\\^\\\\\\^1,\\\\\\^\\\\\\^2,\\\\\\^\\\\\\^3\\\\\\}\\\\\\}\\\\\\) == \\\\\\^\\\\\\^::\\\\\\)'\" \"\" { target *-*-* } .-1 }\n+static_assert (data_member_spec (^^int, { .bit_width = 5 }) == ^^::);\t// { dg-error \"static assertion failed\" }\n+// { dg-message \"note: the comparison reduces to '\\\\\\(data_member_spec\\\\\\(\\\\\\^\\\\\\^int,\\\\\\{.bit_width=5\\\\\\}\\\\\\) == \\\\\\^\\\\\\^::\\\\\\)'\" \"\" { target *-*-* } .-1 }\n", "prefixes": [] }