Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2228781/?format=api
{ "id": 2228781, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2228781/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260427113504.3202-1-gerris.rs@gmail.com/", "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": "<20260427113504.3202-1-gerris.rs@gmail.com>", "date": "2026-04-27T11:35:04", "name": "[gccrs,COMMIT] Fix ICE in get_function_expr when cfg'd return type inside macro", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "2ae322f8d8f5446dd459a46bde135caaaa42fdb8", "submitter": { "id": 92092, "url": "http://patchwork.ozlabs.org/api/1.1/people/92092/?format=api", "name": null, "email": "gerris.rs@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260427113504.3202-1-gerris.rs@gmail.com/mbox/", "series": [ { "id": 501629, "url": "http://patchwork.ozlabs.org/api/1.1/series/501629/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=501629", "date": "2026-04-27T11:35:04", "name": "[gccrs,COMMIT] Fix ICE in get_function_expr when cfg'd return type inside macro", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/501629/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2228781/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2228781/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 (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=Uj17k+CE;\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 (2048-bit key,\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=Uj17k+CE", "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=74.125.82.176" ], "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 4g41jB2cfxz1xvV\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 27 Apr 2026 21:35:37 +1000 (AEST)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id B4A664BABF02\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 27 Apr 2026 11:35:34 +0000 (GMT)", "from mail-dy1-f176.google.com (mail-dy1-f176.google.com\n [74.125.82.176])\n by sourceware.org (Postfix) with ESMTPS id 51F474B9DB7E\n for <gcc-patches@gcc.gnu.org>; Mon, 27 Apr 2026 11:35:08 +0000 (GMT)", "by mail-dy1-f176.google.com with SMTP id\n 5a478bee46e88-2c156c4a9efso13588126eec.1\n for <gcc-patches@gcc.gnu.org>; Mon, 27 Apr 2026 04:35:08 -0700 (PDT)", "from\n runnervmeorf1.qpzkutmjvgyufgtdg0u1on0xvf.phxx.internal.cloudapp.net\n ([20.168.119.244]) by smtp.gmail.com with ESMTPSA id\n 5a478bee46e88-2e53a4a80c7sm53382418eec.10.2026.04.27.04.35.05\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 27 Apr 2026 04:35:06 -0700 (PDT)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org B4A664BABF02", "OpenDKIM Filter v2.11.0 sourceware.org 51F474B9DB7E" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 51F474B9DB7E", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 51F474B9DB7E", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777289708; cv=none;\n b=CBg1mg9B735r3lh36gLuediPr3TjmUpnc7GFERrNgRfsaN+/NztioUO8bdLuF1FOgpF5MtGSHlbAjorE7YVEmIjRwagERW4FAGvhfocgKF/tOQrbZ1yA4MJyzaj7dPGJ0hjOe+LnWIfRkjPLRdUrKO+kQYkFmcoaziiNwH2z0UU=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1777289708; c=relaxed/simple;\n bh=gGjepEzob/RN77CrFCTZdM4hZ4X/OokzpAoQdGXiv5I=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=dhaafVsB7gDpsbm0oIkoxqThfJUGmI7wI0lr0yoT+wsZhOZCWXha//uydHxwAF/akgFx4uzWJvLyrjKnv8Tt2UyPcrgRsrEXq4klDDdrnVO1xIUW68fKdGi+DWn++xim7n2iT5p/7PlIvQHFhdd9RQ+dPPamypjX8trFZnzsS4Y=", "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=1777289707; x=1777894507; 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=HPrOUWEcczmNGsZKdhQkmZG3C04+tCacqAPq2RWL+Ss=;\n b=Uj17k+CEf29NjGoLAzVUrogy3LcnwY7/wGrLYDyzZPBaqBtQRr8CpwUneIhJHkW1FX\n dZPBJ2jTYGlMnNTzNc+I6LMDIQLO/KuFR2SbLVo7CGaZkKPpDeerCqgNaTA9eNoxunIN\n fbwpjcwJFuFjbfFp3lSEixvHsd50ldII75qzhGv/f3W8lPRgcpxQR6okKWBCWG1Z8KEX\n oLCkTB2bGy6fYRHTluqTvWh/HqY4AAbFJ/toYcCzGyjQwxLdd4G/pVmnH0/mNEr0HsE4\n wBHMWP20T4QtHgAsO6JGQj1Hf6k1kbGVt1gmcpeAuZ2raPOdN+xbHVtBcSiapKe9Szn2\n 9bLg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777289707; x=1777894507;\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=HPrOUWEcczmNGsZKdhQkmZG3C04+tCacqAPq2RWL+Ss=;\n b=hKh47rVxuASK+Vlpu1vhWqr7/srxrAG6NHnZr1VZfz2KE4pl43vMorqCraI0ZyfVLJ\n AUffA5nxDudMnrYu5D2lnIo9Bas68qaHZ5PsqtzuUlSVwYrwvwnG1t6mHATAmqN6ieTw\n 37nKBxDF4oxqQIvabXqceV0r5FWvb9H1S8zVGO6bjCFzqVdeo50AbLttFemHTeLM4G0X\n 0bntVWR9Ttg5g1ERag6cgWtOdg1jV+efPpwz9435i8wwI15iCl88LQEjsT1JJJoTJMQ7\n r7Vr3aw1LQnzVxlIoe/sZAbbquff55V8O8y4A7Y/BqHWiGq9ml1HrgNLtA7/4RfarsoY\n 7Lxg==", "X-Gm-Message-State": "AOJu0YxnfCR+FE4u3+SQcO6CLUPLioqtZSmd2RB61NCh4XZgY8mIJZjr\n Sd2VEISn55tij420kNtkOCpJ+fLeqz+BGXHRNWWuNJH9YSSzZYPMgDKU4x/HJw==", "X-Gm-Gg": "AeBDievu5FgLLy48eAoVQcGi5bu69g+goK4JcaD6HOHGoLyvLy6/ZmkSmhBy6TPX6KD\n +nySWJw5GyBtQc7owstorWb7HVZcmAUWsV7IjiHe2Zi77JZN1ZbIntaDEwAC83GQnUwm+Cx0Vuq\n USsYB0IJ+l20bRf6Ehcy3tjV0QQAPeGZ4ytQhjhZwVr2VeR4rsWsJdpESY0RV7tgsDk7sz6GG/6\n zdmwpKogEv93TAj78xvoMB4DOL2hajExDAK7fOFh/e90EJ6yXEGs5E6bJjgkJ/hPZC7xjhuonwO\n t+GqfM0y3I/YCVQIB3FAy/w2lH+cZjGgYeZFjMjrpU3iUj45DM+3uC/pwSuykebLu5nmy9DViWO\n E6C3xJ2dgqHSbd2U2CNIZo3CYpSKy3KF0bdnSU+WSX+bKmgRSbvod3GkPgF+VLF/huWLUffCGEB\n nP7ztkTtQ5chdvMPSx9i8u9Vhpw9c8Vn6L/3WTzi1rJgU8T1Divb/NJ4LK7sBeug5qZ6B1VuL16\n CYmknpqKeqXexKcnMjVL5up9rWr6V5HZQ11+k/0eOucDe8=", "X-Received": "by 2002:a05:7300:3211:b0:2dd:db16:478e with SMTP id\n 5a478bee46e88-2e4654880bemr21046627eec.10.1777289706906;\n Mon, 27 Apr 2026 04:35:06 -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, Harishankar <harishankarpp7@gmail.com>", "Subject": "[gccrs COMMIT] Fix ICE in get_function_expr when cfg'd return type\n inside macro", "Date": "Mon, 27 Apr 2026 11:35:04 +0000", "Message-ID": "<20260427113504.3202-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: Harishankar <harishankarpp7@gmail.com>\n\nthe problem is cfg-strip emits an error for unstrippable expressions but\ndoesn't mark the parent for strip, leaving a broken subtree for later\npasses to ICE on.\n\ngcc/rust/ChangeLog:\n\n\t* expand/rust-cfg-strip.cc (CfgStrip::visit): mark CallExpr for\n\tstrip when function expression fails stripping.\n\t(CfgStrip::visit): mark ArrayIndexExpr for strip when array or\n\tindex expression fails stripping.\n\ngcc/testsuite/ChangeLog:\n\n\t* rust/compile/issue-4167.rs: New test.\n\nSigned-off-by: Harishankar <harishankarpp7@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/46ab8c2e73e538105d3f09c872a9109506acf3c8\n\nThe commit has been mentioned in the following pull-request(s):\n - https://github.com/Rust-GCC/gccrs/pull/4526\n\n gcc/rust/expand/rust-cfg-strip.cc | 20 ++++++++++++++------\n gcc/testsuite/rust/compile/issue-4167.rs | 15 +++++++++++++++\n 2 files changed, 29 insertions(+), 6 deletions(-)\n create mode 100644 gcc/testsuite/rust/compile/issue-4167.rs\n\n\nbase-commit: 679aad3804e8443ec5181fd184785d82aec42bdf", "diff": "diff --git a/gcc/rust/expand/rust-cfg-strip.cc b/gcc/rust/expand/rust-cfg-strip.cc\nindex 2e6971e63..67baebec1 100644\n--- a/gcc/rust/expand/rust-cfg-strip.cc\n+++ b/gcc/rust/expand/rust-cfg-strip.cc\n@@ -828,9 +828,13 @@ CfgStrip::visit (AST::ArrayIndexExpr &expr)\n \n const auto &array_expr = expr.get_array_expr ();\n if (array_expr.is_marked_for_strip ())\n- rust_error_at (array_expr.get_locus (),\n-\t\t \"cannot strip expression in this position - outer \"\n-\t\t \"attributes not allowed\");\n+ {\n+ rust_error_at (array_expr.get_locus (),\n+\t\t \"cannot strip expression in this position - outer \"\n+\t\t \"attributes not allowed\");\n+ expr.mark_for_strip ();\n+ return;\n+ }\n \n const auto &index_expr = expr.get_index_expr ();\n if (index_expr.is_marked_for_strip ())\n@@ -1044,9 +1048,13 @@ CfgStrip::visit (AST::CallExpr &expr)\n \n auto &function = expr.get_function_expr ();\n if (function.is_marked_for_strip ())\n- rust_error_at (function.get_locus (),\n-\t\t \"cannot strip expression in this position - outer \"\n-\t\t \"attributes not allowed\");\n+ {\n+ rust_error_at (function.get_locus (),\n+\t\t \"cannot strip expression in this position - outer \"\n+\t\t \"attributes not allowed\");\n+ expr.mark_for_strip ();\n+ return;\n+ }\n \n /* spec says outer attributes are specifically allowed for elements\n * of call expressions, so full stripping possible */\ndiff --git a/gcc/testsuite/rust/compile/issue-4167.rs b/gcc/testsuite/rust/compile/issue-4167.rs\nnew file mode 100644\nindex 000000000..47f4e88ea\n--- /dev/null\n+++ b/gcc/testsuite/rust/compile/issue-4167.rs\n@@ -0,0 +1,15 @@\n+#![feature(no_core)]\n+#![no_core]\n+macro_rules! the_macro {\n+ ( $foo:stmt ; $bar:stmt ; ) => {\n+ #[cfg(foo)]\n+ $foo\n+\n+ $foo[cfg(bar)]\n+ $bar\n+ };\n+}\n+\n+fn the_function() {\n+ the_macro!( (); (); ); // { dg-error \"cannot strip expression in this position\" }\n+}\n", "prefixes": [ "gccrs", "COMMIT" ] }