Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2197422/?format=api
{ "id": 2197422, "url": "http://patchwork.ozlabs.org/api/patches/2197422/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/000601dca057$32cd0c50$986724f0$@nextmovesoftware.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": "<000601dca057$32cd0c50$986724f0$@nextmovesoftware.com>", "list_archive_url": null, "date": "2026-02-17T21:48:47", "name": "[middle-end] Fix some unexpected error_mark_node ICEs.", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "8bc1ce6630a97e7730df24773a347b0a63262eca", "submitter": { "id": 68376, "url": "http://patchwork.ozlabs.org/api/people/68376/?format=api", "name": "Roger Sayle", "email": "roger@nextmovesoftware.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/000601dca057$32cd0c50$986724f0$@nextmovesoftware.com/mbox/", "series": [ { "id": 492487, "url": "http://patchwork.ozlabs.org/api/series/492487/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=492487", "date": "2026-02-17T21:48:47", "name": "[middle-end] Fix some unexpected error_mark_node ICEs.", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/492487/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2197422/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2197422/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=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=nextmovesoftware.com header.i=@nextmovesoftware.com\n header.a=rsa-sha256 header.s=default header.b=XQM3IBQQ;\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=fail reason=\"signature verification failed\" (2048-bit key,\n unprotected) header.d=nextmovesoftware.com header.i=@nextmovesoftware.com\n header.a=rsa-sha256 header.s=default header.b=XQM3IBQQ", "sourceware.org; dmarc=pass (p=none dis=none)\n header.from=nextmovesoftware.com", "sourceware.org;\n spf=pass smtp.mailfrom=nextmovesoftware.com", "server2.sourceware.org;\n arc=none smtp.remote-ip=69.48.154.134" ], "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 4fFtZn6PmGz1xvq\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 18 Feb 2026 08:49:21 +1100 (AEDT)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id BC7D44BA23EE\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 17 Feb 2026 21:49:19 +0000 (GMT)", "from server.nextmovesoftware.com (server.nextmovesoftware.com\n [69.48.154.134])\n by sourceware.org (Postfix) with ESMTPS id 11C854BA2E10\n for <gcc-patches@gcc.gnu.org>; Tue, 17 Feb 2026 21:48:49 +0000 (GMT)", "from [168.86.199.44] (port=63142 helo=Dell)\n by server.nextmovesoftware.com with esmtpsa (TLS1.2) tls\n TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.99.1)\n (envelope-from <roger@nextmovesoftware.com>)\n id 1vsSw4-00000009MQI-1Blv for gcc-patches@gcc.gnu.org;\n Tue, 17 Feb 2026 16:48:48 -0500" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org BC7D44BA23EE", "OpenDKIM Filter v2.11.0 sourceware.org 11C854BA2E10" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 11C854BA2E10", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 11C854BA2E10", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771364929; cv=none;\n b=rmNQ3+wD34n9sJhpCPaS8ok+n32IFh824zNi2NH+Nx1hSpWQ7w8wtPhn8eAQ3NQaYuI5/kBIk485P9JIl93zAbX1pfZbNU3wi8B9qCuf0ZLCn9d8X1oZkS1IAXkiIDXSltFH1SeNM3W8qjMc3RZGBwiJRiD9vzwzrBwpkGx8yC8=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1771364929; c=relaxed/simple;\n bh=VDuQ7kmLYty7nIs12+Q210RQkEux59GM5nwK53k7pHI=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=wjuGLUMDadsdiP1QznkcFx4vuPjkQR8O/1BTnUblEXFkX3uDqtKJnCj16BgTCrU8J8yxMW5GO3qgFvUHN8mLfsfTPSu8AH4h7FyV/WTX5UoMqUghv2LytzYrDL0MEhxH98aFAs7DzxrcImPWTMLjMCzh4LE5TucO+tolnLUAhMQ=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n d=nextmovesoftware.com; s=default; h=Content-Type:MIME-Version:Message-ID:\n Date:Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:\n Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:\n List-Subscribe:List-Post:List-Owner:List-Archive;\n bh=1JnhLW+IlgRiYuishwpKl0EN5NvxtbFanJxsuG+ccro=; b=XQM3IBQQyp8OdEfwG4I+nQSCKS\n 8AsFiXyHCuN5tq1iiq3tX+0GJzpUc3EPPVR0TGVAgR+9hdJv0m3sC/uU2CzaZTKrq2o85Nsw6TKY0\n lo0XZM5qcE4FzVUsnLXWKfGvaivpmbHmJR3BGxr4s7ECduJwDvcwZrDjn9k5hprkaGQZp861DYtS5\n UJQt+5nxEMPm9Z2jC9lB/+xLCJCiH+fOTcoIfCKMLSZscgL90ixw7+oAAaUXu5jCb4qFwUDGiO1R2\n OZgweRISuARlzGQalQlkUBJ9iLziP+rfvKKBdbSVMdNdnelaGzYI3yT3OifZyaGwF3rLfWFoW9O0O\n +YtbnL+g==;", "From": "\"Roger Sayle\" <roger@nextmovesoftware.com>", "To": "\"'GCC Patches'\" <gcc-patches@gcc.gnu.org>", "Subject": "[PATCH middle-end] Fix some unexpected error_mark_node ICEs.", "Date": "Tue, 17 Feb 2026 21:48:47 -0000", "Message-ID": "<000601dca057$32cd0c50$986724f0$@nextmovesoftware.com>", "MIME-Version": "1.0", "Content-Type": "multipart/mixed;\n boundary=\"----=_NextPart_000_0007_01DCA057.32CDCFA0\"", "X-Mailer": "Microsoft Outlook 16.0", "Thread-Index": "AdygVpLimyuTfuzOQ92EQDDIhLw9pw==", "Content-Language": "en-gb", "X-AntiAbuse": [ "This header was added to track abuse,\n please include it with any abuse report", "Primary Hostname - server.nextmovesoftware.com", "Original Domain - gcc.gnu.org", "Originator/Caller UID/GID - [47 12] / [47 12]", "Sender Address Domain - nextmovesoftware.com" ], "X-Get-Message-Sender-Via": "server.nextmovesoftware.com: authenticated_id:\n roger@nextmovesoftware.com", "X-Authenticated-Sender": "server.nextmovesoftware.com:\n roger@nextmovesoftware.com", "X-Source": "", "X-Source-Args": "", "X-Source-Dir": "", "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": "This patch resolves PR c/119651 and PR c/123716 P4 regressions.\nTested on x86_64-pc-linux-gnu with make bootstrap and make -k check\nwith no new regressions. Ok for mainline?\n\n\n2026-02-17 Roger Sayle <roger@nextmovesoftware.com>\n\ngcc/ChangeLog\n PR c/119651\n PR c/123716\n * fold-const.cc (tree_nonzero_bits) <case CONVERT>: Check both\n the inner and outer types are not error_mark_node.\n * tree.cc (tree_nop_conversion_p): Move sanity checks on\n inner_type to here...\n (tree_nop_conversion): .. from here.\n\ngcc/testsuite/ChangeLog\n PR c/119651\n PR c/123716\n * gcc.dg/pr119651.c: New test case.\n * gcc.dg/pr123716.c: Likewise.\n\nRoger\n--", "diff": "diff --git a/gcc/fold-const.cc b/gcc/fold-const.cc\nindex 41681d38570..8929c758011 100644\n--- a/gcc/fold-const.cc\n+++ b/gcc/fold-const.cc\n@@ -16733,6 +16733,9 @@ tree_nonzero_bits (const_tree t)\n return wi::bit_or (tree_nonzero_bits (TREE_OPERAND (t, 1)),\n \t\t\t tree_nonzero_bits (TREE_OPERAND (t, 2)));\n CASE_CONVERT:\n+ if (TREE_TYPE (t) == error_mark_node\n+\t || TREE_TYPE (TREE_OPERAND (t, 0)) == error_mark_node)\n+\tbreak;\n return wide_int::from (tree_nonzero_bits (TREE_OPERAND (t, 0)),\n \t\t\t TYPE_PRECISION (TREE_TYPE (t)),\n \t\t\t TYPE_SIGN (TREE_TYPE (TREE_OPERAND (t, 0))));\ndiff --git a/gcc/tree.cc b/gcc/tree.cc\nindex 02f98f87003..d0e745e8d28 100644\n--- a/gcc/tree.cc\n+++ b/gcc/tree.cc\n@@ -12333,6 +12333,9 @@ block_ultimate_origin (const_tree block)\n bool\n tree_nop_conversion_p (const_tree outer_type, const_tree inner_type)\n {\n+ if (!inner_type || inner_type == error_mark_node)\n+ return false;\n+\n /* Do not strip casts into or out of differing address spaces. */\n if (POINTER_TYPE_P (outer_type)\n && TYPE_ADDR_SPACE (TREE_TYPE (outer_type)) != ADDR_SPACE_GENERIC)\n@@ -12382,8 +12385,6 @@ tree_nop_conversion (const_tree exp)\n \n outer_type = TREE_TYPE (exp);\n inner_type = TREE_TYPE (TREE_OPERAND (exp, 0));\n- if (!inner_type || inner_type == error_mark_node)\n- return false;\n \n return tree_nop_conversion_p (outer_type, inner_type);\n }\ndiff --git a/gcc/testsuite/gcc.dg/pr119651.c b/gcc/testsuite/gcc.dg/pr119651.c\nnew file mode 100644\nindex 00000000000..d89c3c2b8cf\n--- /dev/null\n+++ b/gcc/testsuite/gcc.dg/pr119651.c\n@@ -0,0 +1,10 @@\n+/* PR c/119651 */\n+/* { dg-do compile } */\n+/* { dg-options \"-O2\" } */\n+int main() {\n+ int r = 0;\n+ while (r % 2 == 0) {\n+ }\n+ double r = (double) sizeof(int); /* { dg-error \"conflicting type\" } */\n+ return 0;\n+}\ndiff --git a/gcc/testsuite/gcc.dg/pr123716.c b/gcc/testsuite/gcc.dg/pr123716.c\nnew file mode 100644\nindex 00000000000..0ac34361e89\n--- /dev/null\n+++ b/gcc/testsuite/gcc.dg/pr123716.c\n@@ -0,0 +1,9 @@\n+/* PR c/123716 */\n+/* { dg-do compile } */\n+/* { dg-options \"-O2\" } */\n+int f(unsigned s)\n+{\n+ int i;\n+ for (i = 0; i < s; ++i);\n+ unsigned i[1]; /* { dg-error \"conflicting type\" } */\n+}\n", "prefixes": [ "middle-end" ] }