Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2218067/?format=api
{ "id": 2218067, "url": "http://patchwork.ozlabs.org/api/patches/2218067/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260331104050.3135-1-gerris.rs@gmail.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": "<20260331104050.3135-1-gerris.rs@gmail.com>", "list_archive_url": null, "date": "2026-03-31T10:40:50", "name": "[gccrs,COMMIT] gccrs: Fix ICE caused by TypeCheckBase::parse_repr_options", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "eb6b27763cff04769ddf76b10d30747a2642f6ab", "submitter": { "id": 92092, "url": "http://patchwork.ozlabs.org/api/people/92092/?format=api", "name": null, "email": "gerris.rs@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260331104050.3135-1-gerris.rs@gmail.com/mbox/", "series": [ { "id": 498171, "url": "http://patchwork.ozlabs.org/api/series/498171/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=498171", "date": "2026-03-31T10:40:50", "name": "[gccrs,COMMIT] gccrs: Fix ICE caused by TypeCheckBase::parse_repr_options", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/498171/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2218067/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2218067/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 (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=K6Rmcke4;\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 (2048-bit key,\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=K6Rmcke4", "sourceware.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "sourceware.org; spf=pass smtp.mailfrom=gmail.com", "server2.sourceware.org;\n arc=none smtp.remote-ip=209.85.222.171" ], "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 4flPmq0SHGz1y1q\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 Mar 2026 21:41:30 +1100 (AEDT)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 7C0244BB58EC\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 Mar 2026 10:41:27 +0000 (GMT)", "from mail-qk1-f171.google.com (mail-qk1-f171.google.com\n [209.85.222.171])\n by sourceware.org (Postfix) with ESMTPS id 5D0144BB58BE\n for <gcc-patches@gcc.gnu.org>; Tue, 31 Mar 2026 10:40:52 +0000 (GMT)", "by mail-qk1-f171.google.com with SMTP id\n af79cd13be357-8cd90401034so556048685a.0\n for <gcc-patches@gcc.gnu.org>; Tue, 31 Mar 2026 03:40:52 -0700 (PDT)", "from\n runnervmrg6be.dtj4yddoao4ujjevhu1asbapuf.cx.internal.cloudapp.net\n ([20.109.92.215]) by smtp.gmail.com with ESMTPSA id\n 6a1803df08f44-89ecf285307sm89026046d6.29.2026.03.31.03.40.50\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 31 Mar 2026 03:40:51 -0700 (PDT)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 7C0244BB58EC", "OpenDKIM Filter v2.11.0 sourceware.org 5D0144BB58BE" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 5D0144BB58BE", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 5D0144BB58BE", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1774953652; cv=none;\n b=xMSzpJvOtOyg+knih1l3A/ODkZEDBeuwnH+yYQr4KjyJeFLwI/NigAzfXhsOW/jLiGemcbGaQrmf00ZjTLSw66cnAa5+MD2GeM0DzOwnLDFV3nOTlZEIbIDHCftQ9AxzJ+sG3NP9M2tiI29gbWzIX2TAps0iK8A9AkNaHlQnOfU=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1774953652; c=relaxed/simple;\n bh=PqIaXroBZOXU5pDgp3fEUwWe/j4bCln6yGDrGS//XyY=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=DWU9OKx+/H7n/dZKUIGuA10G/FoGA1EJrDNF5y8hYkqzHa8U15HEJ1P31PW1/YAv8hC4zT8IVKQ57Us9DDwIs/2eIGufGdWegZYpB40UNoIDIhdwXE/2+ighQfGzhcxlBS3eQ4x5Lk/cyhADp4IPfd7erSINMSk4jjdaiCBXONk=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1774953652; x=1775558452; darn=gcc.gnu.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=WmShtDLGF7BwZOnWcLwcLjtinYlJfg6BKsytW4/s0QU=;\n b=K6Rmcke49LQZAZJC5SCAtQxULcaLuI9wYdhdpWLQphDxNdUCeIbEXyjDSL9oOilDjF\n bnxfQGxOtHlaMHdEdKfCBEorR9gq6SiKui1hgBsOb/vzD9qv9X2JWWZKmV+d/yw64OKr\n sDMLEVB7N/YUrGKrie2S/01z16+DJ1lrQSDmGHogo10mcnDhz3FWGeC+tNPNqx5bxK0S\n 2WnNkpCbrSdH4j68TPFNuGVl7sjXF810MBnyNxR6u9O0SFenlZvCGgeQUZTRRlngo+Ot\n Si5I2fscwierNWNuJR0cWsLZpClc46U8jscRqCHOvG8UVMFE1HEPF6d73d2pcwTsXnJG\n H5xg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774953652; x=1775558452;\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=WmShtDLGF7BwZOnWcLwcLjtinYlJfg6BKsytW4/s0QU=;\n b=Fk+9lcZWP4JcsgDgS+WoCdbkNcnMVfSobWeVVydE7vuCobQgLCpC1FN2LD0y68yFao\n qZgdWKvuQloqjPOyZSNn07DNAAehxjPEOcvGK4oHGOW8pVYagSAegxj2RkM+z1Ob9soX\n rqFtclPtdNj408HW+OIrjA4uq1jjwkklj08ctRlD8woZEuVrY1FrGGHbJl2y+sb2w+d0\n gnWcWTATPj0jT3nxbunIFaEt6GOi7MS8khQZWSYfm7u5gMon5wv8tlzzQXkaYa84vRYi\n 8CkVpC5zJ6i9PBNQnTnQGiZBmK5X8DQS4KfUA6nJuXLac2M+sC8wbyW4NBUDdn1Ay9BO\n oHNg==", "X-Gm-Message-State": "AOJu0Yz0sI7IRFhesgEEMhjC3mRjG1N5Ni9h65Z9/D84EXxrmLcRHCl4\n TUplLHemhU8LgM9r5uHtBMgtt+zYebg7mglyXIzeB17Kxe7b+c9oWXPROnVlq/jY", "X-Gm-Gg": "ATEYQzzJ3mEM1Fsdxhdaj04UfuhE+frNCeoSmHyby487kkjfQesayhVVqp9jXj6Eu9X\n bzMhpSWwIVpL65WBYrVRidJPqOEPZ215or2/gNAzZowA7FFlWhFq6OmWhblvagfpi5EhiSNfavn\n kcDfny+bkZOPrHnRCSaTd31QRMAGQOPGg1FKLyRdY/0c+gxVstAF2M+Z71prvba03gasWHNJQ3Y\n xyDqb6glqxiD0jkeK9tcBZZ9oq5wHPq3dYaoJ6BScjILqnKO3KB4w+jAwqRJ8HG0Aq49DMuAZ79\n wVXAO0fmVpsLeMuwUEI6I2dycdUAA0AGWljxjOUGN5+R4pyPQszMPLehdWEVvt/avE03LLCFaGJ\n OddaUPrEQh38xF1O6i3ZiGTk6suBg9QI/kUM71iPlQBwR4xS/UH1E95EPtoWD8lRF5nuDurIXsT\n 8q/4etilOkltnCGDu0kTu2ZmEoXqmqwsOWLQwM8AzE/67BYLYln0AwSPnitiK+mAlacLwYHCGGh\n O/TvEmE+6dOfogjWHXy4w==", "X-Received": "by 2002:a05:622a:5cc:b0:50b:3876:b0e4 with SMTP id\n d75a77b69052e-50ba38fc39cmr210240651cf.43.1774953651750;\n Tue, 31 Mar 2026 03:40:51 -0700 (PDT)", "From": "gerris.rs@gmail.com", "To": "gcc-patches@gcc.gnu.org,\n\tgcc-rust@gcc.gnu.org", "Cc": "pierre-emmanuel.patry@embecosm.com, arthur.cohen@embecosm.com,\n dkm+gccrs@kataplop.net, Yap Zhi Heng <yapzhhg@gmail.com>", "Subject": "[gccrs COMMIT] gccrs: Fix ICE caused by\n TypeCheckBase::parse_repr_options", "Date": "Tue, 31 Mar 2026 10:40:50 +0000", "Message-ID": "<20260331104050.3135-1-gerris.rs@gmail.com>", "X-Mailer": "git-send-email 2.43.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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: Yap Zhi Heng <yapzhhg@gmail.com>\n\nFixes Rust-GCC/gccrs#3550. Previously parse_repr_options assumes that all attrs in its\nparams are token trees, but it is possible that already-parsed meta items can be passed\nas params as well due to expansion of cfg_attr.\n\ngcc/rust/ChangeLog:\n\n\t* typecheck/rust-hir-type-check-base.cc (TypeCheckBase::parse_repr_options):\n\tAllow parsing of AttrInputMetaItemContainer.\n\nSigned-off-by: Yap Zhi Heng <yapzhhg@gmail.com>\n---\nThis change was merged into the gccrs repository and is posted here for\nupstream visibility and potential drive-by review, as requested by GCC\nrelease managers.\nEach commit email contains a link to its details on github from where you can\nfind the Pull-Request and associated discussions.\n\n\nCommit on github: https://github.com/Rust-GCC/gccrs/commit/7c402e98b69f2eccc47365cbcec4384c9dff27b3\n\nThe commit has been mentioned in the following pull-request(s):\n - https://github.com/Rust-GCC/gccrs/pull/4500\n\n .../typecheck/rust-hir-type-check-base.cc | 21 +++++++++++++++----\n gcc/testsuite/rust/compile/issue-3550.rs | 7 +++++++\n 2 files changed, 24 insertions(+), 4 deletions(-)\n create mode 100644 gcc/testsuite/rust/compile/issue-3550.rs\n\n\nbase-commit: 1dd416791aafc60d40feae798945ab67775d34ab", "diff": "diff --git a/gcc/rust/typecheck/rust-hir-type-check-base.cc b/gcc/rust/typecheck/rust-hir-type-check-base.cc\nindex 835e8ca79..6c3cb4054 100644\n--- a/gcc/rust/typecheck/rust-hir-type-check-base.cc\n+++ b/gcc/rust/typecheck/rust-hir-type-check-base.cc\n@@ -421,14 +421,27 @@ TypeCheckBase::parse_repr_options (const AST::AttrVec &attrs, location_t locus)\n \t const AST::AttrInput &input = attr.get_attr_input ();\n \t bool is_token_tree = input.get_attr_input_type ()\n \t\t\t == AST::AttrInput::AttrInputType::TOKEN_TREE;\n-\t if (!is_token_tree)\n+\t bool is_meta_item = input.get_attr_input_type ()\n+\t\t\t == AST::AttrInput::AttrInputType::META_ITEM;\n+\t if (!is_token_tree && !is_meta_item)\n \t {\n \t rust_error_at (attr.get_locus (), \"malformed %<repr%> attribute\");\n \t continue;\n \t }\n-\t const auto &option = static_cast<const AST::DelimTokenTree &> (input);\n-\t AST::AttrInputMetaItemContainer *meta_items\n-\t = option.parse_to_meta_item ();\n+\n+\t const AST::AttrInputMetaItemContainer *meta_items = nullptr;\n+\t if (is_token_tree)\n+\t {\n+\t const auto &option\n+\t\t= static_cast<const AST::DelimTokenTree &> (input);\n+\t meta_items = option.parse_to_meta_item ();\n+\t }\n+\t else\n+\t { // is_meta_item is true\n+\t const auto &option\n+\t\t= static_cast<const AST::AttrInputMetaItemContainer &> (input);\n+\t meta_items = new AST::AttrInputMetaItemContainer (option);\n+\t }\n \n \t if (meta_items == nullptr)\n \t {\ndiff --git a/gcc/testsuite/rust/compile/issue-3550.rs b/gcc/testsuite/rust/compile/issue-3550.rs\nnew file mode 100644\nindex 000000000..50b8bbd41\n--- /dev/null\n+++ b/gcc/testsuite/rust/compile/issue-3550.rs\n@@ -0,0 +1,7 @@\n+#![feature(no_core)]\n+#![no_core]\n+\n+#[cfg_attr(not(wrong = \"32\"), repr(i32))]\n+enum Eu64 {\n+ Au64 = 0,\n+}\n\\ No newline at end of file\n", "prefixes": [ "gccrs", "COMMIT" ] }