Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2220893/?format=api
{ "id": 2220893, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2220893/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260408114925.21A734A0B3@imap1.dmz-prg2.suse.org/", "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": "<20260408114925.21A734A0B3@imap1.dmz-prg2.suse.org>", "date": "2026-04-08T11:49:09", "name": "tree-optimization/124810 - ICE with loop fixup", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "1d0028c7150a7baf713e69e6bf2471aaa7a22856", "submitter": { "id": 4338, "url": "http://patchwork.ozlabs.org/api/1.1/people/4338/?format=api", "name": "Richard Biener", "email": "rguenther@suse.de" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260408114925.21A734A0B3@imap1.dmz-prg2.suse.org/mbox/", "series": [ { "id": 499124, "url": "http://patchwork.ozlabs.org/api/1.1/series/499124/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=499124", "date": "2026-04-08T11:49:09", "name": "tree-optimization/124810 - ICE with loop fixup", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/499124/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2220893/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2220893/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=suse.de header.i=@suse.de header.a=rsa-sha256\n header.s=susede2_rsa header.b=zZ5QD0dz;\n\tdkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=DUcxqV0u;\n\tdkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de\n header.a=rsa-sha256 header.s=susede2_rsa header.b=zZ5QD0dz;\n\tdkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=DUcxqV0u;\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=suse.de header.i=@suse.de header.a=rsa-sha256\n header.s=susede2_rsa header.b=zZ5QD0dz;\n\tdkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=DUcxqV0u;\n\tdkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de\n header.a=rsa-sha256 header.s=susede2_rsa header.b=zZ5QD0dz;\n\tdkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=DUcxqV0u", "sourceware.org;\n dmarc=pass (p=none dis=none) header.from=suse.de", "sourceware.org; spf=pass smtp.mailfrom=suse.de", "server2.sourceware.org;\n arc=none smtp.remote-ip=195.135.223.130", "smtp-out1.suse.de;\n dkim=pass header.d=suse.de header.s=susede2_rsa header.b=zZ5QD0dz;\n dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=DUcxqV0u" ], "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 4frLw95VQQz1xv0\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 08 Apr 2026 21:50:00 +1000 (AEST)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 74B814BA2E27\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 8 Apr 2026 11:49:58 +0000 (GMT)", "from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130])\n by sourceware.org (Postfix) with ESMTPS id 627B14BA2E09\n for <gcc-patches@gcc.gnu.org>; Wed, 8 Apr 2026 11:49:26 +0000 (GMT)", "from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org\n [IPv6:2a07:de40:b281:104:10:150:64:97])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smtp-out1.suse.de (Postfix) with ESMTPS id 394ED4DA1F\n for <gcc-patches@gcc.gnu.org>; Wed, 8 Apr 2026 11:49:25 +0000 (UTC)", "from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 21A734A0B3\n for <gcc-patches@gcc.gnu.org>; Wed, 8 Apr 2026 11:49:25 +0000 (UTC)", "from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])\n by imap1.dmz-prg2.suse.org with ESMTPSA id ExPBBsVA1mmwQAAAD6G6ig\n (envelope-from <rguenther@suse.de>)\n for <gcc-patches@gcc.gnu.org>; Wed, 08 Apr 2026 11:49:25 +0000" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 74B814BA2E27", "OpenDKIM Filter v2.11.0 sourceware.org 627B14BA2E09" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 627B14BA2E09", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 627B14BA2E09", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775648966; cv=none;\n b=vZyuH2k/3YDPpof9DqCclVwgOfpkmInXRVIN2TUIfPOC1Y6URpNtcxXxzkUx3+vHEXKoAfzUZDc0cPfh0Dqf00qjitd1ivQxgZ0C2eTM77+v0XzKZu+zwbH4i5OHYHpNwiFf8Srw5/5Vb99n8DvvW6VpnpBPEn2JfWO7sfnUM44=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1775648966; c=relaxed/simple;\n bh=DNBVG/xGl+qlB1CDnrcD1aPZsJipgIb+8ZT8Vb/lez4=;\n h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:Date:\n From:To:Subject:MIME-Version:Message-Id;\n b=bwHrQTRU27QAbANUwylZzwdFSP6LYIOeEPutXJd93hcvunlYbKtdFnWqe8JMaMyi9WHb1gQ0+doumFdWauyW7VtgSYBsx0f9Z7Ps3lND9oYAr7XA3GDGK/BTQxtW5EedBHmsCzp7jyOQrSVIQNxAHJEGegyfJyDfKMVrwTOuN44=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1775648965; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:\n mime-version:mime-version:content-type:content-type;\n bh=ZfcglJE0j8HrbqpYo/MlMz1tU0RyFbuxlm27k+61JK0=;\n b=zZ5QD0dzmtGWvaXtsPfW1oWF9JRo8tOmz73tdeJLkXSp/TxM4rQ7oRkvfPGgMh4uXugG9b\n KE3p8P2723ZuNf1jY9paqxYXx5Kw1xFYBPgYjt9/Xnunygxz/rJEc/shVI74cep6tNoMPN\n x2calgp23aJiycmrsCEWVIH+Hg0YL2o=", "v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1775648965;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:\n mime-version:mime-version:content-type:content-type;\n bh=ZfcglJE0j8HrbqpYo/MlMz1tU0RyFbuxlm27k+61JK0=;\n b=DUcxqV0u7CoNc+PdgwaiGTnjU2bMBObtXyWzQk0mxzhVSEaNlUWv0BIeeuJDFbK7qheaPN\n 6O7L0pT+5ouwrFCw==", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1775648965; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:\n mime-version:mime-version:content-type:content-type;\n bh=ZfcglJE0j8HrbqpYo/MlMz1tU0RyFbuxlm27k+61JK0=;\n b=zZ5QD0dzmtGWvaXtsPfW1oWF9JRo8tOmz73tdeJLkXSp/TxM4rQ7oRkvfPGgMh4uXugG9b\n KE3p8P2723ZuNf1jY9paqxYXx5Kw1xFYBPgYjt9/Xnunygxz/rJEc/shVI74cep6tNoMPN\n x2calgp23aJiycmrsCEWVIH+Hg0YL2o=", "v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1775648965;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:\n mime-version:mime-version:content-type:content-type;\n bh=ZfcglJE0j8HrbqpYo/MlMz1tU0RyFbuxlm27k+61JK0=;\n b=DUcxqV0u7CoNc+PdgwaiGTnjU2bMBObtXyWzQk0mxzhVSEaNlUWv0BIeeuJDFbK7qheaPN\n 6O7L0pT+5ouwrFCw==" ], "Date": "Wed, 8 Apr 2026 13:49:09 +0200 (CEST)", "From": "Richard Biener <rguenther@suse.de>", "To": "gcc-patches@gcc.gnu.org", "Subject": "[PATCH] tree-optimization/124810 - ICE with loop fixup", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=US-ASCII", "Message-Id": "<20260408114925.21A734A0B3@imap1.dmz-prg2.suse.org>", "X-Rspamd-Action": "no action", "X-Rspamd-Server": "rspamd2.dmz-prg2.suse.org", "X-Spamd-Result": "default: False [-4.51 / 50.00]; BAYES_HAM(-3.00)[100.00%];\n NEURAL_HAM_LONG(-1.00)[-1.000];\n R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];\n NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain];\n MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[];\n FROM_HAS_DN(0.00)[];\n DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];\n FUZZY_RATELIMITED(0.00)[rspamd.com];\n RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from];\n RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[];\n DKIM_TRACE(0.00)[suse.de:+]; MISSING_XM_UA(0.00)[];\n TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2];\n FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+];\n DNSWL_BLOCKED(0.00)[2a07:de40:b281:104:10:150:64:97:from,2a07:de40:b281:106:10:150:64:167:received];\n RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received];\n PREVIOUSLY_DELIVERED(0.00)[gcc-patches@gcc.gnu.org];\n RCVD_VIA_SMTP_AUTH(0.00)[];\n SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]", "X-Rspamd-Queue-Id": "394ED4DA1F", "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": "The following fixes fix_loop_placements to properly consider\nre-parenting only outer loops of a nest.\n\nBootstrapped and tested on x86_64-unknown-linux-gnu, pushed.\n\n\tPR tree-optimization/124810\n\t* cfgloopmanip.cc (fix_loop_placements): Do not stop\n\titerating when an inner loop didn't get re-parented.\n\tCompute the outermost loop we have to consider re-parenting.\n\n\t* gcc.dg/torture/pr124810.c: New testcase.\n---\n gcc/cfgloopmanip.cc | 37 +++++++++++++++++--------\n gcc/testsuite/gcc.dg/torture/pr124810.c | 23 +++++++++++++++\n 2 files changed, 48 insertions(+), 12 deletions(-)\n create mode 100644 gcc/testsuite/gcc.dg/torture/pr124810.c", "diff": "diff --git a/gcc/cfgloopmanip.cc b/gcc/cfgloopmanip.cc\nindex d8acbad6e55..72f7c1896ba 100644\n--- a/gcc/cfgloopmanip.cc\n+++ b/gcc/cfgloopmanip.cc\n@@ -1061,23 +1061,36 @@ static void\n fix_loop_placements (class loop *loop, bool *irred_invalidated,\n \t\t bitmap loop_closed_ssa_invalidated)\n {\n- class loop *outer;\n+ if (!loop_outer (loop))\n+ return;\n+\n+ auto_vec<edge> exits = get_loop_exit_edges (loop);\n+ unsigned i;\n+ edge e;\n \n+ /* We might need to only re-parent an outer loop, but as the constraint\n+ is that we removed an exit from LOOP, we have a limit for what level\n+ of outer loop we eventually have to re-parent to. */\n+ class loop *outermost = loop;\n+ FOR_EACH_VEC_ELT (exits, i, e)\n+ outermost = find_common_loop (outermost, e->dest->loop_father);\n+\n+ class loop *outer;\n while (loop_outer (loop))\n {\n outer = loop_outer (loop);\n- if (!fix_loop_placement (loop, irred_invalidated,\n-\t\t\t loop_closed_ssa_invalidated))\n-\tbreak;\n-\n- /* Changing the placement of a loop in the loop tree may alter the\n-\t validity of condition 2) of the description of fix_bb_placement\n-\t for its preheader, because the successor is the header and belongs\n-\t to the loop. So call fix_bb_placements to fix up the placement\n-\t of the preheader and (possibly) of its predecessors. */\n- fix_bb_placements (loop_preheader_edge (loop)->src,\n-\t\t\t irred_invalidated, loop_closed_ssa_invalidated);\n+ if (fix_loop_placement (loop, irred_invalidated,\n+\t\t\t loop_closed_ssa_invalidated))\n+\t/* Changing the placement of a loop in the loop tree may alter the\n+\t validity of condition 2) of the description of fix_bb_placement\n+\t for its preheader, because the successor is the header and belongs\n+\t to the loop. So call fix_bb_placements to fix up the placement\n+\t of the preheader and (possibly) of its predecessors. */\n+\tfix_bb_placements (loop_preheader_edge (loop)->src,\n+\t\t\t irred_invalidated, loop_closed_ssa_invalidated);\n loop = outer;\n+ if (outer == outermost)\n+\tbreak;\n }\n }\n \ndiff --git a/gcc/testsuite/gcc.dg/torture/pr124810.c b/gcc/testsuite/gcc.dg/torture/pr124810.c\nnew file mode 100644\nindex 00000000000..bd2b03592d2\n--- /dev/null\n+++ b/gcc/testsuite/gcc.dg/torture/pr124810.c\n@@ -0,0 +1,23 @@\n+/* { dg-additional-options \"-fno-tree-ch -fno-tree-dce -fno-tree-dominator-opts -fno-tree-vrp -fno-tree-dse\" } */\n+\n+int a, b[9], c, d;\n+static void e() {\n+ int f[9];\n+ unsigned char g;\n+h:\n+i:\n+ if (a)\n+ goto h;\n+ g = 0;\n+ for (; g < 9; g++) {\n+ b[g] = f[8] ? 0 : g;\n+ if (g)\n+ goto i;\n+ d ? c && d < 0 : c;\n+ }\n+}\n+int main() {\n+ while (c)\n+ e();\n+ return 0;\n+}\n", "prefixes": [] }