Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.0/patches/2223078/?format=api
{ "id": 2223078, "url": "http://patchwork.ozlabs.org/api/1.0/patches/2223078/?format=api", "project": { "id": 17, "url": "http://patchwork.ozlabs.org/api/1.0/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": "<20260414111602.4D2654B3FA@imap1.dmz-prg2.suse.org>", "date": "2026-04-14T11:16:01", "name": "middle-end/124877 - fix mis-apply of PROMOTE_PROTOTYPES", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "015efc8eba8b69de2f85269efc628b29a28469e5", "submitter": { "id": 4338, "url": "http://patchwork.ozlabs.org/api/1.0/people/4338/?format=api", "name": "Richard Biener", "email": "rguenther@suse.de" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260414111602.4D2654B3FA@imap1.dmz-prg2.suse.org/mbox/", "series": [ { "id": 499819, "url": "http://patchwork.ozlabs.org/api/1.0/series/499819/?format=api", "date": "2026-04-14T11:16:01", "name": "middle-end/124877 - fix mis-apply of PROMOTE_PROTOTYPES", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/499819/mbox/" } ], "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2223078/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=QrrWJ1az;\n\tdkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=1gSQwa9h;\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=HfBpXd1M;\n\tdkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=nqFuXCLL;\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=QrrWJ1az;\n\tdkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=1gSQwa9h;\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=HfBpXd1M;\n\tdkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=nqFuXCLL", "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=HfBpXd1M;\n dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=nqFuXCLL" ], "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 4fw1tq3F0rz1yDF\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 21:16:35 +1000 (AEST)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 6A9414BA23C2\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 11:16:33 +0000 (GMT)", "from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130])\n by sourceware.org (Postfix) with ESMTPS id 8B6674BA5439\n for <gcc-patches@gcc.gnu.org>; Tue, 14 Apr 2026 11:16:04 +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 86E836A8E3;\n Tue, 14 Apr 2026 11:16:02 +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 4D2654B3FA;\n Tue, 14 Apr 2026 11:16:02 +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 Gs84EfIh3mnWOgAAD6G6ig\n (envelope-from <rguenther@suse.de>); Tue, 14 Apr 2026 11:16:02 +0000" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 6A9414BA23C2", "OpenDKIM Filter v2.11.0 sourceware.org 8B6674BA5439" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 8B6674BA5439", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 8B6674BA5439", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776165364; cv=none;\n b=CnvedbYwY9rCDMgpMv20vLm7Q4YvP1igM+bwCoxXPExW1UL1edBHd5CvNraDsGry/eV1E3phJZ26+Uv0D+BWPj2Tqe+U0cMWhVd0ZLzX12iWnyFue17SQvFwmkWGi4VgzPssQ27eT4elOzULcAVPIRgnPfWnlv9FBlu81V8t4KA=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776165364; c=relaxed/simple;\n bh=2BFddV/esZtcvig5j6lMBs9b7WkXi+aIw+4zaJsVpDA=;\n h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:Date:\n From:To:Subject:MIME-Version:Message-Id;\n b=Rmv1Z/fX2ksdub6zrO6MJCr/X+5tMTWhQOJQkhNpwAV780idacp1J0qhONPvijMqkeUk8qMJsNzYXI6C+Wswj/QsIeaGtp4k/yXO+mnCsLwnqOuq+uhDMOT2U+B3dJEAJvOmc920FlilC1PjOfP20GcOrRYJ5iWRrFZ3rtq62Io=", "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=1776165363;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:content-type:content-type;\n bh=hQdsLbX20ASs9xs+dQCmLN3pLmO1IZLlzfPQWNxnIJs=;\n b=QrrWJ1azfIlkdvqsSiC6hapyNCWTMjSeH0c1CBZ7nzYKXS0anuDJP9cRmIIrWw4lTzfbd7\n LbwIOKK5GzsN4CNQfYQ8RSuzkI5ODkS07fJ+zgiC5CjJRjaX06gugD5sMIsC1gTtyJ1lkh\n w/TwOi7bWizYBFCQ1+/Z70a7DbLdAkE=", "v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1776165363;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:content-type:content-type;\n bh=hQdsLbX20ASs9xs+dQCmLN3pLmO1IZLlzfPQWNxnIJs=;\n b=1gSQwa9hgBzyBRL4MASEi/hsM2JgYsBfGWsgxv6Tbnr20l8yXlY7nZcY0UmCXmmemRNOAi\n mSl03q74BSCYEXAA==", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1776165362;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:content-type:content-type;\n bh=hQdsLbX20ASs9xs+dQCmLN3pLmO1IZLlzfPQWNxnIJs=;\n b=HfBpXd1M3by01kpG71TeIoXxpxtxIgb/5xFXviUtU7HSsuYhT88zgQbmpTvGUFx8aTSdtQ\n GXYXnR0BXdLnyQBSej2dcfCZzAXYoS4b96V7h8Q3Tl13UfiAqMwEgLAeoxjcYAV9eTKFUp\n x1oqIUWKBzpnBcaBune+JpG1snRVc8I=", "v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1776165362;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:content-type:content-type;\n bh=hQdsLbX20ASs9xs+dQCmLN3pLmO1IZLlzfPQWNxnIJs=;\n b=nqFuXCLLewXwFnOIG7WnJ0vQim68RL85M4SRMpVo+l3IBbD3vAVA/syAV1Fj4HngqdrTIN\n jzg3+k72SAgE8jBQ==" ], "Date": "Tue, 14 Apr 2026 13:16:01 +0200 (CEST)", "From": "Richard Biener <rguenther@suse.de>", "To": "gcc-patches@gcc.gnu.org", "cc": "Jakub Jelinek <jakub@redhat.com>, jeffrey.law@oss.qualcomm.com,\n hjl.tools@gmail.com", "Subject": "[PATCH] middle-end/124877 - fix mis-apply of PROMOTE_PROTOTYPES", "MIME-Version": "1.0", "Content-Type": "multipart/mixed;\n boundary=\"-1463801166-1668255294-1776165362=:295737\"", "Message-Id": "<20260414111602.4D2654B3FA@imap1.dmz-prg2.suse.org>", "X-Spamd-Result": "default: False [-1.91 / 50.00]; BAYES_HAM(-3.00)[100.00%];\n SUSPICIOUS_RECIPS(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000];\n MIME_BASE64_TEXT_BOGUS(1.00)[];\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_BASE64_TEXT(0.10)[];\n MIME_GOOD(-0.10)[multipart/mixed,text/plain]; MX_GOOD(-0.01)[];\n TO_MATCH_ENVRCPT_ALL(0.00)[];\n DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];\n ARC_NA(0.00)[]; FUZZY_RATELIMITED(0.00)[rspamd.com];\n TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+];\n FREEMAIL_ENVRCPT(0.00)[gmail.com]; RCVD_TLS_ALL(0.00)[];\n FREEMAIL_CC(0.00)[redhat.com,oss.qualcomm.com,gmail.com];\n RCVD_COUNT_TWO(0.00)[2]; TAGGED_RCPT(0.00)[];\n FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[];\n SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from];\n RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[4];\n MISSING_XM_UA(0.00)[]; HAS_ATTACHMENT(0.00)[];\n DKIM_TRACE(0.00)[suse.de:+];\n DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,\n imap1.dmz-prg2.suse.org:mid, imap1.dmz-prg2.suse.org:helo, suse.de:dkim,\n suse.de:email]", "X-Rspamd-Action": "no action", "X-Rspamd-Server": "rspamd1.dmz-prg2.suse.org", "X-Rspamd-Queue-Id": "86E836A8E3", "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 corrects how we apply PROMOTE_PROTOTYPES during RTL\nexpansion. The unsignedp field in args info is supposed to\ndenote the signedness of the unpromoted value, but we've set it\nto the signedness of integer_type_node. So delay adjusting the\ntype until after we compute signedness of the formal argument.\n\nBootstrapped and tested on x86_64-unknown-linux-gnu.\n\nThere's two variants, the inline one affects transparent union\npassing, promoting a smaller than int first element, while the\nattached one does not. This was originally changed for GCC16\nwith r16-169-g78db4753c9646a and r16-170-ga670ebde399548.\n\nOverall this restores behavior to that of GCC 15 before we\nmoved PROMOTE_PROTOTYPES application from frontends to RTL\nexpansion. GCC 15 did not apply promotion to the transparent\nunion case.\n\nOK for trunk? Which variant?\n\nThanks,\nRichard.\n\n\tPR middle-end/124877\n\t* calls.cc (initialize_argument_information): Compute\n\tsignedness of the formal argument type before applying\n\tPROMOTE_PROTOTYPES promotion.\n\n\t* gcc.target/i386/pr124877.c: New testcase.\n---\n gcc/calls.cc | 9 +++++----\n gcc/testsuite/gcc.target/i386/pr124877.c | 11 +++++++++++\n 2 files changed, 16 insertions(+), 4 deletions(-)\n create mode 100644 gcc/testsuite/gcc.target/i386/pr124877.c", "diff": "diff --git a/gcc/calls.cc b/gcc/calls.cc\nindex 337e01065c2..4cdc2361a4b 100644\n--- a/gcc/calls.cc\n+++ b/gcc/calls.cc\n@@ -1396,10 +1396,6 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED,\n /* Replace erroneous argument with constant zero. */\n if (type == error_mark_node || !COMPLETE_TYPE_P (type))\n \targs[i].tree_value = integer_zero_node, type = integer_type_node;\n- else if (promote_p\n-\t && INTEGRAL_TYPE_P (type)\n-\t && TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node))\n-\ttype = integer_type_node;\n \n /* If TYPE is a transparent union or record, pass things the way\n \t we would pass the first field of the union or record. We have\n@@ -1541,6 +1537,11 @@ initialize_argument_information (int num_actuals ATTRIBUTE_UNUSED,\n \t}\n \n unsignedp = TYPE_UNSIGNED (type);\n+ if (promote_p\n+\t && INTEGRAL_TYPE_P (type)\n+\t && TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node))\n+\ttype = integer_type_node;\n+\n arg.type = type;\n arg.mode\n \t= promote_function_mode (type, TYPE_MODE (type), &unsignedp,\ndiff --git a/gcc/testsuite/gcc.target/i386/pr124877.c b/gcc/testsuite/gcc.target/i386/pr124877.c\nnew file mode 100644\nindex 00000000000..0be0b08d9e8\n--- /dev/null\n+++ b/gcc/testsuite/gcc.target/i386/pr124877.c\n@@ -0,0 +1,11 @@\n+/* { dg-do compile } */\n+\n+void bar(unsigned char x);\n+void foo()\n+{\n+ bar(225);\n+}\n+\n+/* PROMOTE_PROTOTYPES should make us pass 225, not -31, both would\n+ be valid according to the ABI. */\n+/* { dg-final { scan-assembler \"movl\\[ \\t\\]+\\\\\\$225, %edi\" { target { ! ia32 } } } } */\n", "prefixes": [] }