get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2196449/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2196449,
    "url": "http://patchwork.ozlabs.org/api/patches/2196449/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260214003950.2088418-1-andrew.pinski@oss.qualcomm.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": "<20260214003950.2088418-1-andrew.pinski@oss.qualcomm.com>",
    "list_archive_url": null,
    "date": "2026-02-14T00:39:50",
    "name": "complex-lowering: Fix up extraction with VCEs [PR124086]",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "038693d2ba8d4648e7ed58911d38f25cf0ecdea6",
    "submitter": {
        "id": 91428,
        "url": "http://patchwork.ozlabs.org/api/people/91428/?format=api",
        "name": "Andrew Pinski",
        "email": "andrew.pinski@oss.qualcomm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260214003950.2088418-1-andrew.pinski@oss.qualcomm.com/mbox/",
    "series": [
        {
            "id": 492150,
            "url": "http://patchwork.ozlabs.org/api/series/492150/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=492150",
            "date": "2026-02-14T00:39:50",
            "name": "complex-lowering: Fix up extraction with VCEs [PR124086]",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/492150/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2196449/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2196449/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 (2048-bit key;\n unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256\n header.s=qcppdkim1 header.b=RoJeKklr;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.a=rsa-sha256 header.s=google header.b=U322kxPE;\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 (2048-bit key,\n unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256\n header.s=qcppdkim1 header.b=RoJeKklr;\n\tdkim=pass (2048-bit key,\n unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.a=rsa-sha256 header.s=google header.b=U322kxPE",
            "sourceware.org; dmarc=none (p=none dis=none)\n header.from=oss.qualcomm.com",
            "sourceware.org;\n spf=pass smtp.mailfrom=oss.qualcomm.com",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=205.220.168.131"
        ],
        "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 4fCVZG6Vg3z1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 14 Feb 2026 11:40:38 +1100 (AEDT)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id DE79D4BAD162\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 14 Feb 2026 00:40:35 +0000 (GMT)",
            "from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com\n [205.220.168.131])\n by sourceware.org (Postfix) with ESMTPS id 4A6A84B9DB4D\n for <gcc-patches@gcc.gnu.org>; Sat, 14 Feb 2026 00:39:59 +0000 (GMT)",
            "from pps.filterd (m0279863.ppops.net [127.0.0.1])\n by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 61DHI3ef4170780\n for <gcc-patches@gcc.gnu.org>; Sat, 14 Feb 2026 00:39:58 GMT",
            "from mail-pl1-f199.google.com (mail-pl1-f199.google.com\n [209.85.214.199])\n by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ca87w1636-1\n (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT)\n for <gcc-patches@gcc.gnu.org>; Sat, 14 Feb 2026 00:39:58 +0000 (GMT)",
            "by mail-pl1-f199.google.com with SMTP id\n d9443c01a7336-2aad60525deso57183005ad.1\n for <gcc-patches@gcc.gnu.org>; Fri, 13 Feb 2026 16:39:57 -0800 (PST)",
            "from xeond2.wrightpinski.org ([98.97.36.20])\n by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2ad1a9d5c20sm2668195ad.46.2026.02.13.16.39.55\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 13 Feb 2026 16:39:56 -0800 (PST)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org DE79D4BAD162",
            "OpenDKIM Filter v2.11.0 sourceware.org 4A6A84B9DB4D"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 4A6A84B9DB4D",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 4A6A84B9DB4D",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771029599; cv=none;\n b=sT6WUqQ6wc1/V1sbBK11xLLs2bBywd7cxDG9tXfvpGK2QB5y0oWyO4NEKRHWtuquLGQ3JfKrANoj8QVyjx/PppBlazhfTN27/3FnzFibXln75lbrsm4KRGuN/OBpQnmmpACfv4eo1X8I7pBV2tkKR4XGX65Heu/APuy4mmlqQTc=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1771029599; c=relaxed/simple;\n bh=vh/J2Jaj/9oKeHxdS8HEcQv5h8qtsoVWVp3Su9qrvjs=;\n h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID:\n MIME-Version;\n b=R+ij6SRm5v8K0tVPN+zb/kt2jyW+6RBhn1j061g8v9adBTtKBvy86z7nX8rNbjcX4d5+i2yhoVKYR+zD2Aig+A21ZqFtmbID8pwX0B6MWELcP/pITF25eLHpah/ySZYl2aB6L42Mw+7SoUFAvo9LsuL92YUcwGk+/GfJ9FNsgAc=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=\n cc:content-transfer-encoding:date:from:message-id:mime-version\n :subject:to; s=qcppdkim1; bh=kWMlVBCCZc1/RYjEUSa/JfZQE4VJRXbUSwO\n /P5GzGIg=; b=RoJeKklr/2Vn/Mr7yri/9woORIvq8VgMMJJfpPJOBDHs8vdtoz6\n rhBSTI+OkCjdbbE1ayPydjTufxNJTbBvOdwFTJSZc+OdedG03oChZVTsxN21cgvu\n hG4qn3nMIOS3F5kDYvf+5NQALyY7eIONy4Dx24Pxuo+u+Jjn7oN0sJ6DXRplVbAv\n abWIin4fkItHdHvCkJU+AmFJA19deuu+fYQuqdZFhxo4WfOCzYwJwwMOC7/wkPXf\n p0tHokRDWynG9uVL/RE8KtlpFqG+7xxJ8qOnm5d2l3ZzgdBNPRwWD93JF7doz22+\n RtAL4oA4jPkuAsGZohXq1mxlkzz1JH9XteQ==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oss.qualcomm.com; s=google; t=1771029597; x=1771634397; 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=kWMlVBCCZc1/RYjEUSa/JfZQE4VJRXbUSwO/P5GzGIg=;\n b=U322kxPEfYaVuLItt1+oEYL6zll4R5xST3XcN8bufCm0pZJx3zgqL0ot7EchjWkj6L\n wJF2iltW6h9i/2PCUmVWm326wTxD4SzerxWu//rhjJ+54XsZ56F5yEwLZ00ADOESXobZ\n 3VkKEkGNDWu7RZNpsNSK5UgmmYsV8e5lj1M5FoxF/EtugGeWIaMDQZTeATmMURJVJBAP\n ZVSd1gAzpz/AGgwhyVBBxwuAIwBiPVEdf3xVMAFh23lkmxgCGggMcz1GFdThXD9pRD09\n jSsfrXHsVnYglZ5exUC+lte4Pe24UkiUj8QaQ3PCxjMnp0gQ2spGB2QDXLBuFQRqtQE3\n wBPA=="
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1771029597; x=1771634397;\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=kWMlVBCCZc1/RYjEUSa/JfZQE4VJRXbUSwO/P5GzGIg=;\n b=LIemsVnbeDlw8okNnsWnZH1BLEbf5c60Pa4zTJc/wdN33rfTm4GNXAgzUO6ctNbqCK\n nOW6DvXBzya7BUv47qSusPWFCSmfMT/CC88C7ySi6HYbyaVSPI7/EmbAW8o41imRAwPy\n azMho8VNHJgRRA4/bJmLiPr/7Q1MuEkK5aerdHFrsb6kTDKapUH+RUnRke849HB6b1HD\n jeMTNx4cmPCXFDM7bM1kA8GgJnr0n9gmlpWoohxPFRmsKtw4YiEvh1gsNkBOL2bamXW9\n cJm5YmaKFWrtgOQMpgvdoKIXNEGW1BYKrUqAGicvfS9mJQDgKXB/Bp9ofrO2ZYqAMMM8\n Ip9A==",
        "X-Gm-Message-State": "AOJu0Yy0P1MpIzj1W5yj1Q56Ui80dAotZQmr4aeYitx+CEae72VgJPLe\n DmgKMJKm4WV/QrSGp6iuB2jbNpSBCp0pYO1x5iwJY50adMs8UhlyJEpKfVZwyBKQrtYP9mV63DE\n Y8YsiouyC7C8xVDSiXAeu3Eajdiyq9ti5Gd6uuGx8NE5KldCFWlp86JNFRcHscVFyNPbl",
        "X-Gm-Gg": "AZuq6aL7dPgLO3lxM8CAJGC467Aa3ur0aWPsx+MW5UlppPKypWulysdLgFug/IdxKKU\n LUxReMxVQGPt5cPaw7nBwbXQXSSLmqBh3Lu3AQyWiYLa/dqwtIGsho0L5J/iqJaZbkN6IYbG0xL\n NigSoQX69c3FZ7R7SZ4DMB/RlBUKb3DE1TjlgFQXd+cWhjq8BbL4ex4p51SgfIk2DHH+FrtDHuw\n p9vnQNqwvGUrDVFE7jh32qXiYjg/Cb9Y2dpZxPzSfYFlcsR2NcEMD6FaQYEVJLuxEj6BFoLSXyX\n +sx9N+I+mkzap7Q4KuH6la7sygN2vdnfZKhkgmR2r1QBWN8zAUIOs2P/wJEzMiPLYU706sS49XH\n Ccs1Jb5BPStPTf1/TEVZAibXWawyr+QJ1TJKsomRxgllokWk=",
        "X-Received": [
            "by 2002:a17:902:d48e:b0:2a9:2942:e15d with SMTP id\n d9443c01a7336-2ab4cf4f447mr49524555ad.5.1771029597112;\n Fri, 13 Feb 2026 16:39:57 -0800 (PST)",
            "by 2002:a17:902:d48e:b0:2a9:2942:e15d with SMTP id\n d9443c01a7336-2ab4cf4f447mr49524255ad.5.1771029596545;\n Fri, 13 Feb 2026 16:39:56 -0800 (PST)"
        ],
        "From": "Andrew Pinski <andrew.pinski@oss.qualcomm.com>",
        "To": "gcc-patches@gcc.gnu.org",
        "Cc": "Andrew Pinski <andrew.pinski@oss.qualcomm.com>",
        "Subject": "[PATCH] complex-lowering: Fix up extraction with VCEs [PR124086]",
        "Date": "Fri, 13 Feb 2026 16:39:50 -0800",
        "Message-ID": "<20260214003950.2088418-1-andrew.pinski@oss.qualcomm.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Authority-Analysis": "v=2.4 cv=LoOfC3dc c=1 sm=1 tr=0 ts=698fc45e cx=c_pps\n a=JL+w9abYAAE89/QcEU+0QA==:117 a=OFTEO+MNSLyTRHJ1mgLEyg==:17\n a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22\n a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=EUspDBNiAAAA:8\n a=apGgIcb9OS97Nw-dy0oA:9 a=324X-CrmTo6CU4MGRt3R:22",
        "X-Proofpoint-ORIG-GUID": "j5UC0ExZjMw6KOePjXoALsM0epEXaHuc",
        "X-Proofpoint-GUID": "j5UC0ExZjMw6KOePjXoALsM0epEXaHuc",
        "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwMjE0MDAwMiBTYWx0ZWRfX6lykUAsJVYXh\n Y0nuwAURe+nMZV1xTbEgN8ZBkTq0wzkbnbQ5r4+Yc5yIwetL5q7ZBbEyCFEw1wldf76oPvUE+sy\n c4VUqCjhIP10xlJsqWZfpE6sTOcKOnYNS0nQmq4cA6jpzgoYatoznuIk8Gsl2oWIgMGngbVNAGl\n 4ihsMoAxhkzIDy6Ts5dF/0Rp8tZN85lwTC2RloBtNSmuhOFHKx24pXWbf5GknKVofK7W2gXDXF7\n Nv/PfAydztNKFm1U6aXSr52Btlvk7EPqS4CwuiRJwkd90O192Inu6mqYaJdEXs0VW+fehsexBVL\n jgPXGHHXytQETxo2JT3/i+dRRDW0PA8K2diJ+BwUa6C0oY5BPAdl5E5Pv1KixfGEG73/vmnTw3N\n TmhSVzKC1SwYgcB46WODyOtHnuUq4+6biK/bq0iZyQHw+2bjXAmtWCDuoQZfvgPBKFsJVXal094\n 6Q7ZYgljyEZrTmPux4A==",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-02-13_05,2026-02-13_01,2025-10-01_01",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n clxscore=1015 bulkscore=0 lowpriorityscore=0 spamscore=0 adultscore=0\n priorityscore=1501 suspectscore=0 impostorscore=0 malwarescore=0 phishscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602140002",
        "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 was an oversight on my part when I converted extract_component\nto use gimple_build_assign instead of force_gimple_operand_gsi.\nI had provided a special case for VCE of a SSA_NAME but I missed\nthat the same issue would be caused with invariants too and invariants\nwould show up with VCE; I assumed they would be folded.\nThis changes the check to include invariants too.\n\nBootstrapped and tested on x86_64-linux-gnu.\n\n\tPR tree-optimization/124086\n\ngcc/ChangeLog:\n\n\t* tree-complex.cc (extract_component): Extend the check\n\tfor ssa names for VCE to include invariants.\n\ngcc/testsuite/ChangeLog:\n\n\t* c-c++-common/torture/pr124086-1.c: New test.\n\t* g++.dg/torture/pr124086-1.C: New test.\n\nSigned-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>\n---\n gcc/testsuite/c-c++-common/torture/pr124086-1.c | 15 +++++++++++++++\n gcc/testsuite/g++.dg/torture/pr124086-1.C       | 14 ++++++++++++++\n gcc/tree-complex.cc                             | 12 ++++++++----\n 3 files changed, 37 insertions(+), 4 deletions(-)\n create mode 100644 gcc/testsuite/c-c++-common/torture/pr124086-1.c\n create mode 100644 gcc/testsuite/g++.dg/torture/pr124086-1.C",
    "diff": "diff --git a/gcc/testsuite/c-c++-common/torture/pr124086-1.c b/gcc/testsuite/c-c++-common/torture/pr124086-1.c\nnew file mode 100644\nindex 00000000000..6bca0431e4c\n--- /dev/null\n+++ b/gcc/testsuite/c-c++-common/torture/pr124086-1.c\n@@ -0,0 +1,15 @@\n+/* { dg-do compile } */\n+/* { dg-options \"\" } */\n+/* PR tree-optimization/124086 */\n+\n+\n+typedef __attribute__((__vector_size__(2*sizeof(long double)))) int V;\n+int j;\n+\n+void\n+foo()\n+{\n+  V v = (V){0, -0xd};\n+  _Complex long double t =  *(_Complex long double *)&v;\n+  j = __real__ t;\n+}\ndiff --git a/gcc/testsuite/g++.dg/torture/pr124086-1.C b/gcc/testsuite/g++.dg/torture/pr124086-1.C\nnew file mode 100644\nindex 00000000000..f01bd35ce3c\n--- /dev/null\n+++ b/gcc/testsuite/g++.dg/torture/pr124086-1.C\n@@ -0,0 +1,14 @@\n+// { dg-do compile { target lp64 } }\n+\n+// PR tree-optimization/124086\n+\n+int j;\n+int *v;\n+void\n+foo()\n+{\n+  int t;\n+  v = &t;\n+  auto t1 = __builtin_bit_cast(_Complex int, v);\n+  j = __real__ t1;\n+}\ndiff --git a/gcc/tree-complex.cc b/gcc/tree-complex.cc\nindex 90401925f26..0937cb442bf 100644\n--- a/gcc/tree-complex.cc\n+++ b/gcc/tree-complex.cc\n@@ -664,14 +664,18 @@ extract_component (gimple_stmt_iterator *gsi, tree t, bool imagpart_p,\n       }\n \n     case VIEW_CONVERT_EXPR:\n-      /* Getting the real/imag parts of a VCE of a ssa-name requires\n-\t to place the complex into a ssa name before getting the\n-\t 2 parts.\n+      /* Getting the real/imag parts of a VCE of a ssa-name\n+         (or gimple invariant) requires to place the complex\n+\t into a ssa name before getting the 2 parts.\n \t As `IMAGPART_EXPR<VIEW_CONVERT_EXPR<a_BN>>` is an invalid\n \t gimple. This will only show up when gimplifying it.\n \t Note this creates an extra copy.  The call to\n \t force_gimple_operand_gsi would create one too.  */\n-      if (TREE_CODE (TREE_OPERAND (t, 0)) == SSA_NAME)\n+      tree expr;\n+      expr = TREE_OPERAND (t, 0);\n+      if (TREE_CODE (expr) == SSA_NAME\n+\t  || (is_gimple_min_invariant (expr)\n+\t      && TREE_CODE (expr) != STRING_CST))\n \t{\n \t  gcc_assert (gimple_p);\n \t  tree new_cplx = make_ssa_name (TREE_TYPE (t));\n",
    "prefixes": []
}