get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2216965,
    "url": "http://patchwork.ozlabs.org/api/patches/2216965/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/CAGkQGiKteFPCdnu8tsHZYs7_+J-p2M=5DdZBu8ZxSjZO+30Y6g@mail.gmail.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": "<CAGkQGiKteFPCdnu8tsHZYs7_+J-p2M=5DdZBu8ZxSjZO+30Y6g@mail.gmail.com>",
    "list_archive_url": null,
    "date": "2026-03-27T13:09:33",
    "name": "[fortran] PR102619 - [13/14/15/16 Regression] ICE in gfc_conv_descriptor_dtype, at fortran/trans-array.c:215 since r9-6493-g0e3088806577e805",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "c0669fc8ef3467ed3bacbbc1a49bdf35effbbec9",
    "submitter": {
        "id": 4392,
        "url": "http://patchwork.ozlabs.org/api/people/4392/?format=api",
        "name": "Paul Richard Thomas",
        "email": "paul.richard.thomas@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/CAGkQGiKteFPCdnu8tsHZYs7_+J-p2M=5DdZBu8ZxSjZO+30Y6g@mail.gmail.com/mbox/",
    "series": [
        {
            "id": 497767,
            "url": "http://patchwork.ozlabs.org/api/series/497767/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=497767",
            "date": "2026-03-27T13:09:33",
            "name": "[fortran] PR102619 - [13/14/15/16 Regression] ICE in gfc_conv_descriptor_dtype, at fortran/trans-array.c:215 since r9-6493-g0e3088806577e805",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/497767/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2216965/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216965/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=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=OKnAFx7Z;\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=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=OKnAFx7Z",
            "sourceware.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "sourceware.org; spf=pass smtp.mailfrom=gmail.com",
            "server2.sourceware.org;\n arc=pass smtp.remote-ip=74.125.82.52"
        ],
        "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 4fj1Gn3J82z1y1x\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 28 Mar 2026 00:10:41 +1100 (AEDT)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 8AF364BA2E18\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 13:10:37 +0000 (GMT)",
            "from mail-dl1-f52.google.com (mail-dl1-f52.google.com\n [74.125.82.52])\n by sourceware.org (Postfix) with ESMTPS id D7AED4BA2E0E\n for <gcc-patches@gcc.gnu.org>; Fri, 27 Mar 2026 13:09:47 +0000 (GMT)",
            "by mail-dl1-f52.google.com with SMTP id\n a92af1059eb24-127380532eeso224741c88.1\n for <gcc-patches@gcc.gnu.org>; Fri, 27 Mar 2026 06:09:47 -0700 (PDT)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 8AF364BA2E18",
            "OpenDKIM Filter v2.11.0 sourceware.org D7AED4BA2E0E"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org D7AED4BA2E0E",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org D7AED4BA2E0E",
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1774616988; cv=pass;\n b=bx8JdKzCljIALaBEAgF8C3QUjjA5cQ31r9O5OGU0mZJ5ohkuvkB3a4c6ihxHaNikNgdNqIPSfKu6BE2BhsHspOMNzjMDxwkFPHQ+4XWdDpWBBZL8ZDqwXTaujUZ/ALa+aoy879yil+qF9l03O+fFHx1FLwa+VZaBKkLqQOmt9yk=",
            "i=1; a=rsa-sha256; t=1774616987; cv=none;\n d=google.com; s=arc-20240605;\n b=EcN/uy6tRBXoPOxiZHAO39V2plUUXCT6BP5pDkhxDgXkkPHk4F3U7gpG4ybNpUNLp6\n JCvf4t372X0Ix/PBGci+xAK33x9AiJE1bR23gU72EjI4wCZb7No3ZF7GvdcTsrh7LqVS\n qJAZnvKujGBLO1zQ9ITAgP3tJzJxZNnH2HLssm5qoMN6sgpVP1AVdMRuseeU+dHu/b4A\n rpSCMbMrzHoWBCxsp9zwrSkh2C8RWulADLdub3GZrWv+/mA7VuQN/zR60RwrMFNKiLeq\n pPCwVAkor3bxETzOawH19aG6KtK9NULhMM/bicPbDTLxLS87CyyzUhTm5sdIy1Aag5sq\n 2mnA=="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=sourceware.org; s=key;\n t=1774616988; c=relaxed/simple;\n bh=sIXJfwG4HWGvXClq2GEQm+cWQcDcJkv6HkEeN6k0wxM=;\n h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To;\n b=DUNaOBj3wS89MQUIv5SjCt+RxGEpLIN6KbqOIEoS360CeBmEyAayaeukN9g4PDlvrVe+/KT8q17r/G53ezSp/IN26lCHKEeOzcM1AeOncLoENU39/+z09FScMoJZcSddgCH6UUvQQ4LI5zOevu3qtktD7ZgUnp6MOl0qXdV01mk=",
            "i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n s=arc-20240605;\n h=cc:to:subject:message-id:date:from:mime-version:dkim-signature;\n bh=sIXJfwG4HWGvXClq2GEQm+cWQcDcJkv6HkEeN6k0wxM=;\n fh=Rk8Dh1D8cwqP+0JfbgTcYf9G5YEvYK9BZ55LIfhrdUw=;\n b=iefJEpWZv3skIh4L4d2urdQqshpCuvYsp6TFK7uGtb+ferlpAJ+brl26xdhby00n6c\n /ILbBRSS6tn6YQaEPwKn1f5BCrnkjmWVzrpyQn4hi01I1p4zZrQyqdm3vd8BWwhN5KNQ\n 5GLOLWET/uXlqHVtJJdRIDDn38E+fKC+V3yR0N+WOYAqbi/XD4n1UzU2IIhVjG3l3TGJ\n qArVvhW7uAm0x8CRNbvsdMNXLVnsNhxjqxPfhhvsgj2DNLXuFgogAVQ7Tl9JG3fxGgiy\n m4AXSSyyy7iJ22MXIMY/vrW66KhmeMyiaFizkVxh1yw7vfs2BML1iOKFsfspIqy5l41I\n cxEA==; darn=gcc.gnu.org"
        ],
        "ARC-Authentication-Results": [
            "i=2; server2.sourceware.org",
            "i=1; mx.google.com; arc=none"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1774616987; x=1775221787; darn=gcc.gnu.org;\n h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject\n :date:message-id:reply-to;\n bh=sIXJfwG4HWGvXClq2GEQm+cWQcDcJkv6HkEeN6k0wxM=;\n b=OKnAFx7ZAwLSozygAyo10AyYooYWox33lu5wOEyq7Ge+Vohi2/WP+3yWRMBbljVO2o\n Vqjg6xH7FQXhskhQpvn2FExcmVHEcqGhn/4k5Q4MQxYbqmCahxa+9MxIGCdojkAfful1\n EU5lJVtKOty0BJxwx2lx1Varpby36Sx9X5C5jBYpLFnBYLjolGf/hLskNEwOtJaNbXlL\n 1vv/+C1M8BerBNAfDAOLqNVMi7uQgEg2y9EQ8oBP4AY3ezsvN+9P8+LH176zrq1efqRg\n nd3FAb+7K6eY3XD7DVRG+fv1PUVaNC/KFoOubAs7+3LoZBOGD9TsdLVBKvuOzkjhPSNF\n RcNQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774616987; x=1775221787;\n h=cc:to:subject:message-id:date:from:mime-version:x-gm-gg\n :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n bh=sIXJfwG4HWGvXClq2GEQm+cWQcDcJkv6HkEeN6k0wxM=;\n b=BLLvY7zWyi7qaMwXaZo1/+rhv8zOVCdDbccWKl6YmZ+AO+hYl62J8SRbNhU7Q8oDoA\n wndklHRzFj4NOBhSJRSYgoVihNkL6X6Dbxwsj09Nr9COZ6KeICLKuZnHkNdWvvQxJOWB\n kJrQqtemsFhg1AQn/cLKcaKJX8q5GpGzabpxgX8Cz/X83QUyJ6PHD2BeVG09Tnz32XBU\n NR13i/bgsmqmn6suTWpm1sp4g/TFnAV0AkMUVHJF7z+NA5WO1iTcvH9WDGwCs9WopUKg\n dsOhnmrrTeJCAAAZy7j0KgAPDOc1Fe5uRtSRNfIby+8gjzaavCpH75b85AcYC0Jh/3VM\n hEnA==",
        "X-Forwarded-Encrypted": "i=1;\n AJvYcCVRohKmzR2v+EbQ5KfHf2BUBIR5cYIVSDhQLoeLuyMghjLYjXouYAjhXS9Hn/Hi/G3udQmolNzvvP0KNQ==@gcc.gnu.org",
        "X-Gm-Message-State": "AOJu0Yxm7nkkCLPkgvk1Diwx/88OlSV8aXz5pRKC1VkQ93k2xcPEulq3\n l5fyQNG2KUIOqUfpCKqMnvz12XUTfhgRP0g2m7ps7e/jrvJT4CBm74iaITEPowBY01KvEZleUAv\n nsoHYTe3gAEgTcbga4Azfq8xLkxtCv68=",
        "X-Gm-Gg": "ATEYQzxIzy5sA09i+wE7X/ZlXqNzAMLOxNpkx8T4bZ91zcf5Zlf6GOEg1e0YJxhrFtV\n 1jOjIfx+YFti29FIbLaXVaVKYMrZyqwGNN77S97i6yNEyizoDgUQvlyTrF0u603TFLeh0zNc5mt\n Z6n0ZuZO+QmF9FCmYh7di+fQsia91a/XAQ7FcMbR+UdqeMefwBjQ4H0nzwyvX5Irb7uzi3yX51O\n ra0peY8HQJ8do3HpnLYIXIA24EKmTaAA1QXf9p5XOp+ESI5/YqDXpFTyozHRSfouRUPMh8YLvJJ\n ExR6JzOJzeGRGWhbzDOYvJPn9RGI8ikOvrHucywtiA==",
        "X-Received": "by 2002:a05:7022:b8a:b0:11f:3483:bba6 with SMTP id\n a92af1059eb24-12ab2877032mr1430216c88.13.1774616986639; Fri, 27 Mar 2026\n 06:09:46 -0700 (PDT)",
        "MIME-Version": "1.0",
        "From": "Paul Richard Thomas <paul.richard.thomas@gmail.com>",
        "Date": "Fri, 27 Mar 2026 13:09:33 +0000",
        "X-Gm-Features": "AQROBzCBsTQgjHWHX1bfFsgHyZpF0CcJdXZkiOeyVrq7tLpts0DumgNHzVOYKHU",
        "Message-ID": "\n <CAGkQGiKteFPCdnu8tsHZYs7_+J-p2M=5DdZBu8ZxSjZO+30Y6g@mail.gmail.com>",
        "Subject": "[Patch, fortran] PR102619 - [13/14/15/16 Regression] ICE in\n gfc_conv_descriptor_dtype,\n at fortran/trans-array.c:215 since r9-6493-g0e3088806577e805",
        "To": "\"fortran@gcc.gnu.org\" <fortran@gcc.gnu.org>,\n gcc-patches <gcc-patches@gcc.gnu.org>",
        "Cc": "Harald Anlauf <anlauf@gmx.de>, Mikael Morin <morin-mikael@orange.fr>",
        "Content-Type": "multipart/mixed; boundary=\"0000000000001a7592064e013785\"",
        "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": "Hello All,\n\nAs pointed out by Mikael in the PR, this bug was due to interface\nmapping not using a descriptor type for an assumed rank formal of a\nnon-intrinsic function. The attached patch remedies this.\n\nBootstrap with FC43/x86_64. OK for mainline and backporting?\n\nCheers\n\nPaul",
    "diff": "diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc\nindex a67248f7afa..d5254be007d 100644\n--- a/gcc/fortran/trans-expr.cc\n+++ b/gcc/fortran/trans-expr.cc\n@@ -4906,13 +4906,15 @@ gfc_get_interface_mapping_charlen (gfc_interface_mapping * mapping,\n \n /* A subroutine of gfc_add_interface_mapping.  Return a descriptorless\n    array variable that can be used as the actual argument for dummy\n-   argument SYM.  Add any initialization code to BLOCK.  PACKED is as\n-   for gfc_get_nodesc_array_type and DATA points to the first element\n-   in the passed array.  */\n+   argument SYM, except in the case of assumed rank dummies of\n+   non-intrinsic functions where the descriptor must be passed. Add any\n+   initialization code to BLOCK. PACKED is as for gfc_get_nodesc_array_type\n+   and DATA points to the first element in the passed array.  */\n \n static tree\n gfc_get_interface_mapping_array (stmtblock_t * block, gfc_symbol * sym,\n-\t\t\t\t gfc_packed packed, tree data, tree len)\n+\t\t\t\t gfc_packed packed, tree data, tree len,\n+\t\t\t\t bool assumed_rank_formal)\n {\n   tree type;\n   tree var;\n@@ -4921,7 +4923,11 @@ gfc_get_interface_mapping_array (stmtblock_t * block, gfc_symbol * sym,\n     type = gfc_get_character_type_len (sym->ts.kind, len);\n   else\n     type = gfc_typenode_for_spec (&sym->ts);\n-  type = gfc_get_nodesc_array_type (type, sym->as, packed,\n+\n+  if (assumed_rank_formal)\n+    type = TREE_TYPE (data);\n+  else\n+    type = gfc_get_nodesc_array_type (type, sym->as, packed,\n \t\t\t\t    !sym->attr.target && !sym->attr.pointer\n \t\t\t\t    && !sym->attr.proc_pointer);\n \n@@ -5094,15 +5100,27 @@ gfc_add_interface_mapping (gfc_interface_mapping * mapping,\n   else if (POINTER_TYPE_P (TREE_TYPE (se->expr))\n \t   && GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (TREE_TYPE (se->expr))))\n     {\n+      bool assumed_rank_formal = false;\n+\n       /* Get the actual argument's descriptor.  */\n       desc = build_fold_indirect_ref_loc (input_location,\n \t\t\t\t      se->expr);\n \n       /* Create the replacement variable.  */\n-      tmp = gfc_conv_descriptor_data_get (desc);\n+      if (sym->as && sym->as->type == AS_ASSUMED_RANK\n+\t  && !(sym->ns && sym->ns->proc_name\n+\t       && sym->ns->proc_name->attr.proc == PROC_INTRINSIC))\n+\t{\n+\t  assumed_rank_formal = true;\n+\t  tmp = desc;\n+\t}\n+      else\n+\ttmp = gfc_conv_descriptor_data_get (desc);\n+\n       value = gfc_get_interface_mapping_array (&se->pre, sym,\n \t\t\t\t\t       PACKED_NO, tmp,\n-\t\t\t\t\t       se->string_length);\n+\t\t\t\t\t       se->string_length,\n+\t\t\t\t\t       assumed_rank_formal);\n \n       /* Use DESC to work out the upper bounds, strides and offset.  */\n       gfc_set_interface_mapping_bounds (&se->pre, TREE_TYPE (value), desc);\n@@ -5111,7 +5129,8 @@ gfc_add_interface_mapping (gfc_interface_mapping * mapping,\n     /* Otherwise we have a packed array.  */\n     value = gfc_get_interface_mapping_array (&se->pre, sym,\n \t\t\t\t\t     PACKED_FULL, se->expr,\n-\t\t\t\t\t     se->string_length);\n+\t\t\t\t\t     se->string_length,\n+\t\t\t\t\t     false);\n \n   new_sym->backend_decl = value;\n }\ndiff --git a/gcc/testsuite/gfortran.dg/pr102619.f90 b/gcc/testsuite/gfortran.dg/pr102619.f90\nnew file mode 100644\nindex 00000000000..ce4d0a0d7be\n--- /dev/null\n+++ b/gcc/testsuite/gfortran.dg/pr102619.f90\n@@ -0,0 +1,23 @@\n+! { dg-do run }\n+!\n+! Test the fix for PR102619.\n+!\n+! Contributed by Gerhard Steinmetz  <gscfq@t-online.de>\n+!\n+program p\n+  implicit none\n+  real :: w(2,3)\n+  real, allocatable :: y(:)\n+  y = h(w)                        ! Caused an ICE\n+  if (size (y) /= product (shape (w))) stop 1\n+  if (any (int (y) /= [1,2,3,4,5,6])) stop 2\n+  deallocate (y)\n+contains\n+  function h(x) result (g)\n+    real :: x(..)\n+    real :: g(product(shape(x)))\n+    integer :: i\n+    if (any (shape (x) /= shape (w))) stop 3\n+    g = [(real(i),i=1,size(g))]\n+  end\n+end\n",
    "prefixes": [
        "fortran"
    ]
}