Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2221533/?format=api
{ "id": 2221533, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2221533/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/7b38e455-33bc-4bff-8810-b7f7290700b0@gmail.com/", "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": "<7b38e455-33bc-4bff-8810-b7f7290700b0@gmail.com>", "date": "2026-04-09T16:30:05", "name": "[fortran] Followup on PR103367", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "cf4082746defdbe10ac4d6e9c8fb7d74d969c325", "submitter": { "id": 78264, "url": "http://patchwork.ozlabs.org/api/1.1/people/78264/?format=api", "name": "Jerry D", "email": "jvdelisle2@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/7b38e455-33bc-4bff-8810-b7f7290700b0@gmail.com/mbox/", "series": [ { "id": 499327, "url": "http://patchwork.ozlabs.org/api/1.1/series/499327/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=499327", "date": "2026-04-09T16:30:05", "name": "[fortran] Followup on PR103367", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/499327/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2221533/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2221533/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 (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=hNmGQwGA;\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=hNmGQwGA", "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=none smtp.remote-ip=209.85.216.53" ], "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 4fs55b4sHPz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 02:30:42 +1000 (AEST)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id F3F314BA2E1F\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 9 Apr 2026 16:30:39 +0000 (GMT)", "from mail-pj1-f53.google.com (mail-pj1-f53.google.com\n [209.85.216.53])\n by sourceware.org (Postfix) with ESMTPS id 90E974BA2E1E\n for <gcc-patches@gcc.gnu.org>; Thu, 9 Apr 2026 16:30:08 +0000 (GMT)", "by mail-pj1-f53.google.com with SMTP id\n 98e67ed59e1d1-3590042fa8eso993505a91.1\n for <gcc-patches@gcc.gnu.org>; Thu, 09 Apr 2026 09:30:08 -0700 (PDT)", "from [10.168.168.23] ([50.37.179.80])\n by smtp.gmail.com with ESMTPSA id\n 98e67ed59e1d1-35e411ff4d5sm237623a91.4.2026.04.09.09.30.05\n (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n Thu, 09 Apr 2026 09:30:06 -0700 (PDT)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org F3F314BA2E1F", "OpenDKIM Filter v2.11.0 sourceware.org 90E974BA2E1E" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 90E974BA2E1E", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 90E974BA2E1E", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775752208; cv=none;\n b=aYInGdpDutzDa2LkA4h+vct0CPWCWtnmE8DzpGeu33R5RoCa2lNbtWZq1PnuHbYNIxkHDKIvN9J1Rnk/Ym0I4xoWhAoN6PjDMjjWjm6zTwt2jQyRVNXkh6fGmLpNDB8PlHaFA0IwzcYYMvw+I2JwxgjRRfLCYvh2jtuK/wCQKuk=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1775752208; c=relaxed/simple;\n bh=qHzEyS/scA8JpO3LnOqKtlfxsN7d66ffvs9w1B11Hiw=;\n h=DKIM-Signature:Message-ID:Date:MIME-Version:To:From:Subject;\n b=e5G/WieZOE4dA+fJLg6oQ2Rn3vZ/oG5EAPuoOE+yYAOCqwsdsHzZ3PIU7vqR8mioUKwEpKPVeY9nsyznw+0UwyJCd6ad34KV+C643zRK9XpbaRehQ5ms/3+HcZ5YfGb9m31nTyQ5wZgTjpE6zsIMnN8bUZn/sUBLcPGjS4tykds=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1775752207; x=1776357007; darn=gcc.gnu.org;\n h=autocrypt:subject:from:cc:to:content-language:user-agent\n :mime-version:date:message-id:from:to:cc:subject:date:message-id\n :reply-to; bh=R+Z0FP7dZ242bUoD241N3CA87m6URPZdK0/ByrSWeD0=;\n b=hNmGQwGAEo85SKB4RCbtWCeCRGvf7YnCNiDSsVY6TyLDqUtPE4B/EAz2+c9pUW88xJ\n fDrC9geYG8NunWFoRW1AxmFRr5ryMG+brji/3Dwn8eVuV36ZKK7+grcrLzD1LkNAK6EQ\n 3UGieA4dO40KmMhNpyxav10wqY362VhKhHsd6I9BDaiEb+JHwvCo8vPiHgpMZ7u8lxUi\n U9cgy9osTFFMExRA0/m3KPisAX7CNwigEIOvPDx+coAWHujfkpYJE6TnbAJ5HTfadhAm\n 0G4BS9wFMW0rH9DfD2KMUe+gt95hgfnrf48nSYmhlSvX2zlPsVlGI5dUov5x9UbX8LkX\n V+yA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775752207; x=1776357007;\n h=autocrypt:subject:from:cc:to:content-language:user-agent\n :mime-version:date:message-id:x-gm-gg:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=R+Z0FP7dZ242bUoD241N3CA87m6URPZdK0/ByrSWeD0=;\n b=SM7aQpbs1noj9twFLEIVUItYY9UghcWpewzJAPUN2jJVfrHr4CUqWHbKwccc4nqmwh\n YvaCAcWHP0kXXz00AQsDvQpmtTCSMKwhY3ESnJU9GPunbVVV2kvsEqzU89dg7Sy4A/Ad\n jzvQqspRlpYjXwLIrYPLWsKW5aBgR7Ymalaq9XnkEn3prjkKjdBhPeYCBrV3u4A7HoYz\n MbaDSetWgN3uOASQTxxZs2ix7zY2jbaHSb30f5Nl326BGEHbhjbFlzu/M1t1RFCAw79S\n gXAySyYefMfxXgMmcIdfyTpgT1ChWX1WqZqf0NdFH5RkKCXrYy3+C6MczqvDrQ09BNg5\n 5BCw==", "X-Forwarded-Encrypted": "i=1;\n AJvYcCXZfgdzOG+QznJS96NglI2av59tMZrJEgU9cmu5+BGW92+9VM3g2OZAYo2+jdnPiAC/JBVg86oAsHXHVA==@gcc.gnu.org", "X-Gm-Message-State": "AOJu0YzOibt7Jx3VeByrsEN3RZ7j517zhATlksoWdv3Z+3WdE9EccLL0\n bFYrPRVRGjSOfhXnXFpFfew9gmV78+gwtOhCFhYdaufwrKHd9C9SspO8", "X-Gm-Gg": "AeBDievSAA3S78W8/YK8SnGzoNd/N2lAVh2O/+vvi7ZKzVPJMS4hDnKvdr9ce4CDbGg\n w5gDJPasdpWw43ETABbO+oexyTp54eb4y38xQJ7X7l6HFDETdljOnBWM3FcAeEtU9ggkYIu3FBO\n YJPn2K2rXv4hiAA+ag7SiVcKAuUKCzIq5d2HsIwlEZ1bn7iRfxqAuaQ7o1/ROUsIly8nfD4zfYH\n qYwJVgrr5+9ZopFLOIpvFblLXUqBG1EusSaInGisK3tcaW8rGKP5ojrlJ2c+sICfKac2JLmG1ze\n +ELGGG+pMz7tKl2FuECv9/ikGW4nk7VjOuZ8Wm0IFRwqaA8ixzskLSwgNkDKRbggN0HxhIhR3uL\n DpdbbibMaKcGnBLUAR1doLF5uXsMOio/hbfPSDqIqG/1M6ispobO3F3nmpak6ZF5vwNDYNSs1d5\n gRB1PrrRUX117NIBIh4zztayjs3fc=", "X-Received": "by 2002:a17:90b:3e43:b0:35d:a4c0:a0ac with SMTP id\n 98e67ed59e1d1-35de6813794mr26630267a91.3.1775752207132;\n Thu, 09 Apr 2026 09:30:07 -0700 (PDT)", "Content-Type": "multipart/mixed; boundary=\"------------rdT0lM9JL4Oe4Z1JxlpGS6wH\"", "Message-ID": "<7b38e455-33bc-4bff-8810-b7f7290700b0@gmail.com>", "Date": "Thu, 9 Apr 2026 09:30:05 -0700", "MIME-Version": "1.0", "User-Agent": "Mozilla Thunderbird", "Content-Language": "en-US", "To": "gfortran <fortran@gcc.gnu.org>, gcc-patches <gcc-patches@gcc.gnu.org>", "Cc": "Harald Anlauf <anlauf@gmx.de>,\n Paul Richard Thomas <paul.richard.thomas@gmail.com>,\n Christopher Albert <albert@tugraz.at>", "From": "Jerry D <jvdelisle2@gmail.com>", "Subject": "[PATCH, fortran] Followup on PR103367", "Autocrypt": "addr=jvdelisle2@gmail.com; keydata=\n xjMEY5TlkxYJKwYBBAHaRw8BAQdAyrkRDhmJhSTTlV/50gJLlvliU6/Lm5C9ViKV8T9y1GnN\n HkplcnJ5IEQgPGp2ZGVsaXNsZTJAZ21haWwuY29tPsKJBBMWCAAxFiEEOFR0TS0390uh8dRV\n uWXAJaWpwWoFAmOU5ZMCGwMECwkIBwUVCAkKCwUWAgMBAAAKCRC5ZcAlpanBalsJAP4wdCiH\n 2Of9oZv1QWgZ/AVdbWFM3Fv47/WZQHOXfoZ9HgD6AkXrKeJ+6usST7PEaDJjptaViT1fLiYY\n V/6XaOKSsgLOOARjlOWTEgorBgEEAZdVAQUBAQdAdA7PczYnl07vnOT9oP/wvvMDd4HP09Zl\n g3LzwXQJWT8DAQgHwngEGBYIACAWIQQ4VHRNLTf3S6Hx1FW5ZcAlpanBagUCY5TlkwIbDAAK\n CRC5ZcAlpanBasF/AQCa5WjlsVpLsEiggZyT18MOJNAdeRd7wkGDUrwedHrvawD/cE1H+/Ms\n L1ZwvQiLfGdx8crigQqWTQyos4kH8Wx82wc=", "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": "I plan to commit the attached patch shortly to close this out.\n\nRegression tests OK\n\nThanks for comments all.\n\nRegards\n\nJerry\n\n---\n\nfortran: Diagnose invalid array initializer after parameter\n substitution [PR103367]\n\nKeep the trunk fallback from r16-8509, but turn it into a real\nconstant-expression error instead of silently returning an empty\nconstructor. This avoids the ICE from PR103367 without regressing\nthe more specific diagnostics discussed in the Bugzilla follow-up.\n\n\tPR fortran/103367\n\ngcc/fortran/ChangeLog:\n\n\t* trans-array.cc (gfc_conv_array_initializer): Emit an error for\n\tinvalid residual initializer expressions before returning a safe\n\tempty constructor.\n\ngcc/testsuite/ChangeLog:\n\n\t* gfortran.dg/pr103367.f90: Expect a constant-expression error and\n\tprune the legacy-extension warning.\n\nSigned-off-by: Christopher Albert <albert@tugraz.at>", "diff": "From 7e53117e487fac5a1d4f209b40070921ae8a0416 Mon Sep 17 00:00:00 2001\nFrom: Christopher Albert <albert@tugraz.at>\nDate: Wed, 8 Apr 2026 22:37:11 +0200\nSubject: [PATCH] fortran: Diagnose invalid array initializer after parameter\n substitution [PR103367]\n\nKeep the trunk fallback from r16-8509, but turn it into a real\nconstant-expression error instead of silently returning an empty\nconstructor. This avoids the ICE from PR103367 without regressing\nthe more specific diagnostics discussed in the Bugzilla follow-up.\n\n\tPR fortran/103367\n\ngcc/fortran/ChangeLog:\n\n\t* trans-array.cc (gfc_conv_array_initializer): Emit an error for\n\tinvalid residual initializer expressions before returning a safe\n\tempty constructor.\n\ngcc/testsuite/ChangeLog:\n\n\t* gfortran.dg/pr103367.f90: Expect a constant-expression error and\n\tprune the legacy-extension warning.\n\nSigned-off-by: Christopher Albert <albert@tugraz.at>\n---\n gcc/fortran/trans-array.cc | 10 +++++++---\n gcc/testsuite/gfortran.dg/pr103367.f90 | 7 ++++---\n 2 files changed, 11 insertions(+), 6 deletions(-)\n\ndiff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc\nindex ed299c8b21b..b57c18aba00 100644\n--- a/gcc/fortran/trans-array.cc\n+++ b/gcc/fortran/trans-array.cc\n@@ -7099,13 +7099,17 @@ gfc_conv_array_initializer (tree type, gfc_expr * expr)\n expr = expr->symtree->n.sym->value;\n \n /* After parameter substitution the expression should be a constant, array\n- constructor, structure constructor, or NULL. Anything else means the\n- frontend already diagnosed an error; return a zero-filled array. */\n+ constructor, structure constructor, or NULL. Anything else is invalid\n+ and must not ICE later in lowering. */\n if (expr->expr_type != EXPR_CONSTANT\n && expr->expr_type != EXPR_STRUCTURE\n && expr->expr_type != EXPR_ARRAY\n && expr->expr_type != EXPR_NULL)\n- return build_constructor (type, NULL);\n+ {\n+ gfc_error (\"Array initializer at %L does not reduce to a constant \"\n+\t\t \"expression\", &expr->where);\n+ return build_constructor (type, NULL);\n+ }\n \n switch (expr->expr_type)\n {\ndiff --git a/gcc/testsuite/gfortran.dg/pr103367.f90 b/gcc/testsuite/gfortran.dg/pr103367.f90\nindex c4c860c65ff..e7c89b41a7c 100644\n--- a/gcc/testsuite/gfortran.dg/pr103367.f90\n+++ b/gcc/testsuite/gfortran.dg/pr103367.f90\n@@ -1,14 +1,15 @@\n ! { dg-do compile }\n !\n ! PR fortran/103367\n-! An undefined variable in a parameter array initializer reached\n-! gfc_conv_array_initializer and hit gcc_unreachable().\n+! Invalid initialization expressions must not ICE if they survive\n+! semantic checking and reach array initializer lowering.\n \n program p\n type t\n integer :: a(1,2) = 3\n end type\n type(t), parameter :: x(1) = t(4)\n- integer :: y(1,2) = (x(b)%a) ! { dg-warning \"Legacy Extension\" }\n+ integer :: y(1,2) = (x(b)%a) ! { dg-error \"does not reduce to a constant expression\" }\n print *, y\n end\n+! { dg-prune-output \"Legacy Extension: REAL array index\" }\n-- \n2.53.0\n\n", "prefixes": [ "fortran" ] }