{"id":2219836,"url":"http://patchwork.ozlabs.org/api/patches/2219836/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/patch/c6f67213-d93f-4614-a8b5-cf109c7063f9@gmail.com/","project":{"id":17,"url":"http://patchwork.ozlabs.org/api/projects/17/?format=json","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":"<c6f67213-d93f-4614-a8b5-cf109c7063f9@gmail.com>","list_archive_url":null,"date":"2026-04-04T17:32:41","name":"Fix Bug 79524 - [Regression] valgrind error for gcc/testsuite/gfortran.dg/fimplicit_none_2.f90","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"4af834fd0ebb7b5d8ae41edc43a8abc3046fcc92","submitter":{"id":78264,"url":"http://patchwork.ozlabs.org/api/people/78264/?format=json","name":"Jerry D","email":"jvdelisle2@gmail.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/gcc/patch/c6f67213-d93f-4614-a8b5-cf109c7063f9@gmail.com/mbox/","series":[{"id":498743,"url":"http://patchwork.ozlabs.org/api/series/498743/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/list/?series=498743","date":"2026-04-04T17:32:41","name":"Fix Bug 79524 - [Regression] valgrind error for gcc/testsuite/gfortran.dg/fimplicit_none_2.f90","version":1,"mbox":"http://patchwork.ozlabs.org/series/498743/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2219836/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2219836/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=P0tR6cEr;\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=P0tR6cEr","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.210.170"],"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 4fp2kH1zjSz1yG2\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 05 Apr 2026 03:33:25 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 2AEAC4BA23E6\n\tfor <incoming@patchwork.ozlabs.org>; Sat,  4 Apr 2026 17:33:18 +0000 (GMT)","from mail-pf1-f170.google.com (mail-pf1-f170.google.com\n [209.85.210.170])\n by sourceware.org (Postfix) with ESMTPS id DE57A4BA2E23\n for <gcc-patches@gcc.gnu.org>; Sat,  4 Apr 2026 17:32:44 +0000 (GMT)","by mail-pf1-f170.google.com with SMTP id\n d2e1a72fcca58-82a655cfab5so2343916b3a.1\n for <gcc-patches@gcc.gnu.org>; Sat, 04 Apr 2026 10:32:44 -0700 (PDT)","from [10.168.168.66] ([50.37.179.80])\n by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-82cf9b3ccc8sm11924487b3a.19.2026.04.04.10.32.42\n (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n Sat, 04 Apr 2026 10:32:42 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 2AEAC4BA23E6","OpenDKIM Filter v2.11.0 sourceware.org DE57A4BA2E23"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org DE57A4BA2E23","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org DE57A4BA2E23","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775323965; cv=none;\n b=DUYB5ENslwqaRif6VxpEiiYuNGVBBHIXaAQv+hzWQam0SDZHL5yi+ACWd6wYarkPWpGJCgMH5R2yhLRMoqAHcIuSf2Eq1OwwY0YHT79ufBTevOb4yrMubMO8gKeb0Ot5/2QtlTWNw1CjARtOAv5U8A/2+4/Cd1xCzfwgeNpafmk=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1775323965; c=relaxed/simple;\n bh=E4X0LnzuXub8TN/OG2aTzvEAmA48IsZ71bKiZWbL8fA=;\n h=DKIM-Signature:Message-ID:Date:MIME-Version:To:From:Subject;\n b=sfdrjCc7NGhGPDlsLvGJH0ctrCNxfSgOIqVFFMfPAPSI5h1MABzOKaa6eJa5Tzg6hLnAmoOcwgNH0IbZDgUbtdZWMBpVezoEWvubbQYPy6xs+uMVnaqGrTSlHEwfawt7/Bt6TgQqx+MhqcbkDMdhJlcl0KbuNwB4Z4EIOwpWaTc=","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=1775323963; x=1775928763; 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=GlEtOp8XwZLx54tezrdw1BMF4qcV2t7bOxzCUjMhSF0=;\n b=P0tR6cErSww8+UjgabrW11Tf7L8aeYF0aZ7ha0saLtJWGhurMEcBXANdn7qtQRRDDv\n AyQO8sStO0yyus4tkCDARZx5xg6/B7mQdCaVjqEZth2MX9EIqGtMxI3cKfUNOcaAw8eb\n M1rajal7DNEGtNp5bsXHNvP291mAz+nM5UVpDl04XEXOLklm0D3UuEr7Ye7HjI6OcXfv\n gvALRYAoq4oYrzeZvjBjia+HO7QHPLzMGzT0KI4dHDrCKKAMtkQ/rNwoQy4s0NuVRIYn\n N2tN2Wvg7zQezrYNa1e2z3lpt9SddjMMXz1oP/flCXQBiUr2cgLb1r8RWxURlAppTZGI\n U/5g==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775323963; x=1775928763;\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=GlEtOp8XwZLx54tezrdw1BMF4qcV2t7bOxzCUjMhSF0=;\n b=JsBiOa5NewDj+kLeOevG8Pdda2SAJ2E6Jhl7R8UtyHhaM9XXt5BU2jQzcf1CeSdcUJ\n ScvM/WRZ6thjRHAfuPn6bTcIj/q1hBcpHQa69WyxmJsMrLBmosZ5Q+1Lwc40749nzZQ6\n dEzrC6n3PKv09sRTusw/bJGxbU+zzovf+EL5OpaFOZTNAqu8dpUD4mTSDasr9ICzP56h\n 6SXzaa/QZY24NDZ10Ni57bTu1fKfRUn7cYeWTGwocheICCZuDaF9ymPcNllS2Sc4KTnJ\n XEyYkZVs1Z+3XDbSw1w48c2mbuO3Y+YeNki0AzcZgR0rL2wK9hQmBWTE4tYB96fRlrtR\n 9+zw==","X-Forwarded-Encrypted":"i=1;\n AJvYcCXYIaD8ixDyAFt9UVF/ztWubqtGmEyM/vqveRU9jFLs0sBLANFrIzXJZx7GgX0WwOWV3Ss8nSnDqPQUQg==@gcc.gnu.org","X-Gm-Message-State":"AOJu0YxTd7KHDd6X0FrCFputRE/S7ha4JF9df57GbkDBBnUd2+IwOUMQ\n YiPsxow9hnrWXlF5EWE6HCxqJgeVnmGxQnsKMJaqkrNju8MO2wyysQ97","X-Gm-Gg":"AeBDietboM3EMZG6KqOaJAPr6Y6+5ICCnJh9zql7CX8lqs4GE03u5W3D7+hmDaxg/8c\n n5UZ7yMRWRf9p4mIhrVQB/d7rGJYaENhrs52vsE+aO4imLs2cCvFBNZ5IOpUHrxvC/XYSUrfBqR\n 809X59OkuP14BhnISQYC/YtdjearOk0NVbV3AWbcryz8NkwbkoNu9dZLHiqFa99RYfSqHuCIukH\n LMZkfiFVBseJ1/B1f48GkoT9djo1xks1Cr4RbLoc0t5pUdJeANdX6RrMbYeCBXMENFx+vAgJkR+\n dm9sLvbzvoZXuQtmSiLsoSGAGFKvX93ir+lRlgM7cE3Ld8sTADu1DS405p406+lfrxtye5zKM9F\n ly45TtM3lSg6y3s+idbgiM+wPlSDN9ktaWbByBL9hjZWdpy+lIm47XELLH9x1azOXgTc+5T5AxK\n 8vlVY8HNDycsin62oPapKy5h3cobN3Ho5Ig+k1YQ==","X-Received":"by 2002:a05:6a00:a24:b0:82c:6b46:271d with SMTP id\n d2e1a72fcca58-82d0dbcec32mr6931954b3a.48.1775323963526;\n Sat, 04 Apr 2026 10:32:43 -0700 (PDT)","Content-Type":"multipart/mixed; boundary=\"------------8EFE9GpqO0ASe1gwi0LMOWna\"","Message-ID":"<c6f67213-d93f-4614-a8b5-cf109c7063f9@gmail.com>","Date":"Sat, 4 Apr 2026 10:32:41 -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":"Christopher Albert <albert@tugraz.at>, Harald Anlauf <anlauf@gmx.de>","From":"Jerry D <jvdelisle2@gmail.com>","Subject":"[PATCH] Fix Bug 79524 - [Regression] valgrind error for\n gcc/testsuite/gfortran.dg/fimplicit_none_2.f90","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":"Hi all,\n\nAs stated in the PR, I was able to verify the valgrind error and after applying \nthe patch, confirmed the errors go away.\n\nRegression tested on X86_64.\n\nI plan to commit this in the next day or so unless additional comments.\n\nRegards,\n\nJerry\n\n---\n\nfortran: Clean up charlens after rejected parameter arrays\n  [PR79524]\n\nWhen a parameter array declaration such as\ncharacter(*), parameter :: z(2) = [character(n) :: 'x', 'y']\nis rejected, declaration-local charlen nodes from that statement can remain on\ncl_list and later be resolved again.  The charlen's length expression still\nreferences the symbol 'n' whose symtree was already freed by gfc_undo_symbols,\ncausing a heap-use-after-free in resolve_charlen.\n\nClean up those statement-local charlens at the rejection point in decl.cc,\nafter clearing the surviving owners in that path.\n\n\tPR fortran/79524\n\ngcc/fortran/ChangeLog:\n\n\tPR fortran/79524\n\t* decl.cc (discard_pending_charlens): New helper.\n\t(add_init_expr_to_sym): Drop statement-local charlens when\n\trejecting variable-length parameter arrays.\n\t(variable_decl, do_parm, enumerator_decl): Save the current\n\tnamespace charlen list before parsing declarations with\n\tinitializers.\n\t(match_procedure_decl): Adjust call to add_init_expr_to_sym.\n\ngcc/testsuite/ChangeLog:\n\n\tPR fortran/79524\n\t* gfortran.dg/pr79524.f90: New test.\n\nSigned-off-by: Christopher Albert <albert@tugraz.at>","diff":"From 3f500986c7fa6e8a437689a532ec8b5da65a530b Mon Sep 17 00:00:00 2001\nFrom: Christopher Albert <albert@tugraz.at>\nDate: Fri, 3 Apr 2026 12:45:57 +0200\nSubject: [PATCH] fortran: Clean up charlens after rejected parameter arrays\n [PR79524]\n\nWhen a parameter array declaration such as\ncharacter(*), parameter :: z(2) = [character(n) :: 'x', 'y']\nis rejected, declaration-local charlen nodes from that statement can remain on\ncl_list and later be resolved again.  The charlen's length expression still\nreferences the symbol 'n' whose symtree was already freed by gfc_undo_symbols,\ncausing a heap-use-after-free in resolve_charlen.\n\nClean up those statement-local charlens at the rejection point in decl.cc,\nafter clearing the surviving owners in that path.\n\n\tPR fortran/79524\n\ngcc/fortran/ChangeLog:\n\n\tPR fortran/79524\n\t* decl.cc (discard_pending_charlens): New helper.\n\t(add_init_expr_to_sym): Drop statement-local charlens when\n\trejecting variable-length parameter arrays.\n\t(variable_decl, do_parm, enumerator_decl): Save the current\n\tnamespace charlen list before parsing declarations with\n\tinitializers.\n\t(match_procedure_decl): Adjust call to add_init_expr_to_sym.\n\ngcc/testsuite/ChangeLog:\n\n\tPR fortran/79524\n\t* gfortran.dg/pr79524.f90: New test.\n\nSigned-off-by: Christopher Albert <albert@tugraz.at>\n---\n gcc/fortran/decl.cc                   | 54 ++++++++++++++++++++++++---\n gcc/testsuite/gfortran.dg/pr79524.f90 |  9 +++++\n 2 files changed, 58 insertions(+), 5 deletions(-)\n create mode 100644 gcc/testsuite/gfortran.dg/pr79524.f90\n\ndiff --git a/gcc/fortran/decl.cc b/gcc/fortran/decl.cc\nindex f585800d9c9..6e48909c43a 100644\n--- a/gcc/fortran/decl.cc\n+++ b/gcc/fortran/decl.cc\n@@ -131,6 +131,27 @@ discard_pending_charlen (gfc_charlen *cl)\n   free (cl);\n }\n \n+/* Drop the charlen nodes created while matching a declaration that is about\n+   to be rejected.  Callers must clear any surviving owners before using this\n+   helper, so only the statement-local nodes remain on the namespace list.  */\n+\n+static void\n+discard_pending_charlens (gfc_charlen *saved_cl)\n+{\n+  if (!gfc_current_ns)\n+    return;\n+\n+  while (gfc_current_ns->cl_list != saved_cl)\n+    {\n+      gfc_charlen *cl = gfc_current_ns->cl_list;\n+\n+      gcc_assert (cl);\n+      gfc_current_ns->cl_list = cl->next;\n+      gfc_free_expr (cl->length);\n+      free (cl);\n+    }\n+}\n+\n /********************* DATA statement subroutines *********************/\n \n static bool in_match_data = false;\n@@ -2107,7 +2128,8 @@ fix_initializer_charlen (gfc_typespec *ts, gfc_expr *init)\n    expression to a symbol.  */\n \n static bool\n-add_init_expr_to_sym (const char *name, gfc_expr **initp, locus *var_locus)\n+add_init_expr_to_sym (const char *name, gfc_expr **initp, locus *var_locus,\n+\t\t      gfc_charlen *saved_cl_list)\n {\n   symbol_attribute attr;\n   gfc_symbol *sym;\n@@ -2195,6 +2217,16 @@ add_init_expr_to_sym (const char *name, gfc_expr **initp, locus *var_locus)\n \t\t\t\t\t \"at %L \"\n \t\t\t\t\t \"with variable length elements\",\n \t\t\t\t\t &sym->declared_at);\n+\n+\t\t\t      /* This rejection path can leave several\n+\t\t\t\t declaration-local charlens on cl_list,\n+\t\t\t\t including the replacement symbol charlen and\n+\t\t\t\t the array-constructor typespec charlen.\n+\t\t\t\t Clear the surviving owners first, then drop\n+\t\t\t\t only the nodes created by this declaration.  */\n+\t\t\t      sym->ts.u.cl = NULL;\n+\t\t\t      init->ts.u.cl = NULL;\n+\t\t\t      discard_pending_charlens (saved_cl_list);\n \t\t\t      return false;\n \t\t\t    }\n \t\t\t  clen = mpz_get_si (length->value.integer);\n@@ -2725,6 +2757,7 @@ variable_decl (int elem)\n   gfc_array_spec *as;\n   gfc_array_spec *cp_as; /* Extra copy for Cray Pointees.  */\n   gfc_charlen *cl;\n+  gfc_charlen *saved_cl_list;\n   bool cl_deferred;\n   locus var_locus;\n   match m;\n@@ -2735,6 +2768,7 @@ variable_decl (int elem)\n   initializer = NULL;\n   as = NULL;\n   cp_as = NULL;\n+  saved_cl_list = gfc_current_ns->cl_list;\n \n   /* When we get here, we've just matched a list of attributes and\n      maybe a type and a double colon.  The next thing we expect to see\n@@ -3284,7 +3318,8 @@ variable_decl (int elem)\n      NULL here, because we sometimes also need to check if a\n      declaration *must* have an initialization expression.  */\n   if (!gfc_comp_struct (gfc_current_state ()))\n-    t = add_init_expr_to_sym (name, &initializer, &var_locus);\n+    t = add_init_expr_to_sym (name, &initializer, &var_locus,\n+\t\t\t      saved_cl_list);\n   else\n     {\n       if (current_ts.type == BT_DERIVED\n@@ -7882,7 +7917,9 @@ match_procedure_decl (void)\n \t  if (m != MATCH_YES)\n \t    goto cleanup;\n \n-\t  if (!add_init_expr_to_sym (sym->name, &initializer, &gfc_current_locus))\n+\t  if (!add_init_expr_to_sym (sym->name, &initializer,\n+\t\t\t\t     &gfc_current_locus,\n+\t\t\t\t     gfc_current_ns->cl_list))\n \t    goto cleanup;\n \n \t}\n@@ -10167,9 +10204,12 @@ do_parm (void)\n {\n   gfc_symbol *sym;\n   gfc_expr *init;\n+  gfc_charlen *saved_cl_list;\n   match m;\n   bool t;\n \n+  saved_cl_list = gfc_current_ns->cl_list;\n+\n   m = gfc_match_symbol (&sym, 0);\n   if (m == MATCH_NO)\n     gfc_error (\"Expected variable name at %C in PARAMETER statement\");\n@@ -10210,7 +10250,8 @@ do_parm (void)\n       goto cleanup;\n     }\n \n-  t = add_init_expr_to_sym (sym->name, &init, &gfc_current_locus);\n+  t = add_init_expr_to_sym (sym->name, &init, &gfc_current_locus,\n+\t\t\t    saved_cl_list);\n   return (t) ? MATCH_YES : MATCH_ERROR;\n \n cleanup:\n@@ -11630,6 +11671,7 @@ enumerator_decl (void)\n   char name[GFC_MAX_SYMBOL_LEN + 1];\n   gfc_expr *initializer;\n   gfc_array_spec *as = NULL;\n+  gfc_charlen *saved_cl_list;\n   gfc_symbol *sym;\n   locus var_locus;\n   match m;\n@@ -11637,6 +11679,7 @@ enumerator_decl (void)\n   locus old_locus;\n \n   initializer = NULL;\n+  saved_cl_list = gfc_current_ns->cl_list;\n   old_locus = gfc_current_locus;\n \n   /* When we get here, we've just matched a list of attributes and\n@@ -11693,7 +11736,8 @@ enumerator_decl (void)\n      to be parsed.  add_init_expr_to_sym() zeros initializer, so we\n      use last_initializer below.  */\n   last_initializer = initializer;\n-  t = add_init_expr_to_sym (name, &initializer, &var_locus);\n+  t = add_init_expr_to_sym (name, &initializer, &var_locus,\n+\t\t\t    saved_cl_list);\n \n   /* Maintain enumerator history.  */\n   gfc_find_symbol (name, NULL, 0, &sym);\ndiff --git a/gcc/testsuite/gfortran.dg/pr79524.f90 b/gcc/testsuite/gfortran.dg/pr79524.f90\nnew file mode 100644\nindex 00000000000..0b2bfe092ad\n--- /dev/null\n+++ b/gcc/testsuite/gfortran.dg/pr79524.f90\n@@ -0,0 +1,9 @@\n+! { dg-do compile }\n+! { dg-set-target-env-var MALLOC_PERTURB_ \"165\" }\n+! PR fortran/79524\n+! Reject parameter arrays with variable-length CHARACTER elements without\n+! leaving the temporary charlen from the failed declaration on cl_list.\n+program p\n+  character(*), parameter :: z(2) = [character(n) :: 'x', 'y'] ! { dg-error \"Cannot initialize parameter array\" }\n+  character(*), parameter :: w(2) = [character(n+1) :: 'a', 'b'] ! { dg-error \"Cannot initialize parameter array\" }\n+end\n-- \n2.53.0\n\n","prefixes":[]}