Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2194237/?format=api
{ "id": 2194237, "url": "http://patchwork.ozlabs.org/api/patches/2194237/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260207152455.314061-1-dmalcolm@redhat.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": "<20260207152455.314061-1-dmalcolm@redhat.com>", "list_archive_url": null, "date": "2026-02-07T15:24:55", "name": "[pushed:,r16-7383] analyzer: fix ICE on operator new with discarded result [PR116228]", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "0ea63eeb5cc2dda0e41d85ec82ddd00f5b0570ee", "submitter": { "id": 24465, "url": "http://patchwork.ozlabs.org/api/people/24465/?format=api", "name": "David Malcolm", "email": "dmalcolm@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260207152455.314061-1-dmalcolm@redhat.com/mbox/", "series": [ { "id": 491383, "url": "http://patchwork.ozlabs.org/api/series/491383/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=491383", "date": "2026-02-07T15:24:55", "name": "[pushed:,r16-7383] analyzer: fix ICE on operator new with discarded result [PR116228]", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/491383/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2194237/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2194237/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 (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=iG8Gs6W+;\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=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=iG8Gs6W+", "sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com", "sourceware.org; spf=pass smtp.mailfrom=redhat.com", "server2.sourceware.org;\n arc=none smtp.remote-ip=170.10.133.124" ], "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 4f7ZXY2ZBGz1xvh\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 08 Feb 2026 02:25:32 +1100 (AEDT)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 0752D48F52C6\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 7 Feb 2026 15:25:30 +0000 (GMT)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by sourceware.org (Postfix) with ESMTP id D7BDB4B1A36F\n for <gcc-patches@gcc.gnu.org>; Sat, 7 Feb 2026 15:25:00 +0000 (GMT)", "from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-348-LNfFVti4ORO5zO84vl8NeQ-1; Sat,\n 07 Feb 2026 10:24:59 -0500", "from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 45A0A1956094\n for <gcc-patches@gcc.gnu.org>; Sat, 7 Feb 2026 15:24:58 +0000 (UTC)", "from t14s.localdomain.com (unknown [10.22.80.30])\n by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 68E7E18003F5; Sat, 7 Feb 2026 15:24:57 +0000 (UTC)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 0752D48F52C6", "OpenDKIM Filter v2.11.0 sourceware.org D7BDB4B1A36F" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org D7BDB4B1A36F", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org D7BDB4B1A36F", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770477901; cv=none;\n b=g7lbJgHQ39Fd40eIPjozwAse7vPd+rd+4SIkd8YKwlLSeULdh29HAoU/0bCK/tp2aVX9TNBfbKCxqI/n72UcIup5o0VGjQuADqTZ9ar2v40efFGtkkoZ0DgZ/gFotnrMW+dikxPjrQ9GzN/hG5qBD7jp14jaK8pI/fmFz4B2NNI=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1770477901; c=relaxed/simple;\n bh=tiKipJ8Kkp0uEHXomfq1SmTOY05VFE3AhIEP2VYi29o=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=qsA83BGWZmfKXg0MZFwg4wprIgDJpdFQhBav07jIscFE+arOiyKGe9XmdiKdQdkPT7eAdqAmzdzPfQQbpb1dohJGQlrSO6z21gIGxnL5FET6U6XjhsAr49dRBKBVzrmu4t4K3ZxvRwaB7DcD0KNwFU2t7pZqYAvS+unXnojHu5Y=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1770477900;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=WLkbwkjRCdPt3lRbQCQkNNllfGKUt+O7pkJjAJvvOBE=;\n b=iG8Gs6W+KPpKuuSmHUglbYFX5af4tw4YUv/UUtwTP/AlJQvWHpgMwkfP9Wus8+8V2tYSc3\n l1eI0Z0aYGHtSGkZ7j5fcGDfoUWecMzAh6sWii6CRzyo1KZeP3lUh4vqC+Ttp4XYMcc272\n ES4Hg7Ij7MaK/XHbAqW6cTc2ed8Pu1w=", "X-MC-Unique": "LNfFVti4ORO5zO84vl8NeQ-1", "X-Mimecast-MFC-AGG-ID": "LNfFVti4ORO5zO84vl8NeQ_1770477898", "From": "David Malcolm <dmalcolm@redhat.com>", "To": "gcc-patches@gcc.gnu.org", "Cc": "David Malcolm <dmalcolm@redhat.com>", "Subject": "[pushed: r16-7383] analyzer: fix ICE on operator new with discarded\n result [PR116228]", "Date": "Sat, 7 Feb 2026 10:24:55 -0500", "Message-ID": "<20260207152455.314061-1-dmalcolm@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.111", "X-Mimecast-Spam-Score": "0", "X-Mimecast-MFC-PROC-ID": "-j-mffp2Psow1ccDDBF8pz3dx-c7sSjjvLRYJVQ9igo_1770477898", "X-Mimecast-Originator": "redhat.com", "Content-Transfer-Encoding": "8bit", "content-type": "text/plain; charset=\"US-ASCII\"; x-default=true", "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": "Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.\nSuccessful run of analyzer integration tests on x86_64-pc-linux-gnu.\nPushed to trunk as r16-7383-gf3f7e7514a794f.\n\ngcc/analyzer/ChangeLog:\n\tPR analyzer/116228\n\t* kf-lang-cp.cc (kf_operator_new::impl_call_post): Don't try to\n\tadd a constraint if the return value is discarded.\n\ngcc/testsuite/ChangeLog:\n\tPR analyzer/116228\n\t* g++.dg/analyzer/ice-pr116228.C: New test.\n\nSigned-off-by: David Malcolm <dmalcolm@redhat.com>\n---\n gcc/analyzer/kf-lang-cp.cc | 4 ++-\n gcc/testsuite/g++.dg/analyzer/ice-pr116228.C | 33 ++++++++++++++++++++\n 2 files changed, 36 insertions(+), 1 deletion(-)\n create mode 100644 gcc/testsuite/g++.dg/analyzer/ice-pr116228.C", "diff": "diff --git a/gcc/analyzer/kf-lang-cp.cc b/gcc/analyzer/kf-lang-cp.cc\nindex c92864b0b276..5d57bcc5fcb6 100644\n--- a/gcc/analyzer/kf-lang-cp.cc\n+++ b/gcc/analyzer/kf-lang-cp.cc\n@@ -140,7 +140,9 @@ public:\n \n /* If the call is guaranteed to return nonnull\n then add a nonnull constraint to the allocated region. */\n- if (!TREE_NOTHROW (callee_fndecl) && flag_exceptions)\n+ if (!TREE_NOTHROW (callee_fndecl)\n+\t&& flag_exceptions\n+\t&& cd.get_lhs_type ())\n {\n \tconst svalue *null_sval\n \t = mgr->get_or_create_null_ptr (cd.get_lhs_type ());\ndiff --git a/gcc/testsuite/g++.dg/analyzer/ice-pr116228.C b/gcc/testsuite/g++.dg/analyzer/ice-pr116228.C\nnew file mode 100644\nindex 000000000000..df6d2aabbdab\n--- /dev/null\n+++ b/gcc/testsuite/g++.dg/analyzer/ice-pr116228.C\n@@ -0,0 +1,33 @@\n+// { dg-additional-options \"-O3\" }\n+\n+void *operator new(unsigned long, void *);\n+int to_constant();\n+int vec_copy_construct_n, vec_stmts_size, vectorizable_load_vec_stmt,\n+ vectorizable_load_offvar;\n+enum tree_code { POINTER_PLUS_EXPR };\n+void gimple_build_assign(int, tree_code, int, int);\n+int cse_and_gimplify_to_preheader(int, int);\n+void vectorizable_load() {\n+ int i, stride_step, const_nunits = to_constant();\n+ bool costing_p = vectorizable_load_vec_stmt;\n+ if (!costing_p) {\n+ stride_step = 0;\n+ stride_step = cse_and_gimplify_to_preheader(0, stride_step);\n+ }\n+ for (; vec_stmts_size;) {\n+ i = 0;\n+ for (; i < const_nunits; i++) {\n+ if (costing_p)\n+ continue;\n+ gimple_build_assign(0, POINTER_PLUS_EXPR, vectorizable_load_offvar,\n+ stride_step);\n+ }\n+ if (const_nunits)\n+ if (!costing_p) {\n+ {\n+ for (; vec_copy_construct_n;)\n+ new (0) int;\n+ }\n+ }\n+ }\n+}\n", "prefixes": [ "pushed:", "r16-7383" ] }