[PATCH] Fortran: reject module variable as character length in PARAMETER [PR104349]

2023-04-03 Thread Harald Anlauf via Fortran
Dear all, the attached patch fixes an ICE-on-invalid for a PARAMETER expression where the character length was a MODULE variable. The ICE seemed strange, as we were catching related erroneous code for declarations in programs or subroutines. Removing a seemingly bogus check of restricted express

Re: [PATCH 3/3] Fortran: Fix mpz and mpfr memory leaks

2023-04-03 Thread Harald Anlauf via Fortran
Hi Bernhard, there is neither context nor a related PR with a testcase showing that this patch fixes issues seen there. On 4/2/23 17:05, Bernhard Reutner-Fischer via Gcc-patches wrote: From: Bernhard Reutner-Fischer Cc: fortran@gcc.gnu.org gcc/fortran/ChangeLog: * array.cc (gfc_ref_

Re: [PATCH 3/3] Fortran: Fix mpz and mpfr memory leaks

2023-04-03 Thread Bernhard Reutner-Fischer via Fortran
On 3 April 2023 21:50:49 CEST, Harald Anlauf wrote: >Hi Bernhard, > >there is neither context nor a related PR with a testcase showing >that this patch fixes issues seen there. Yes, i forgot to mention the PR: PR fortran/68800 I did not construct individual test cases but it should be obvious t

Re: [PATCH] Fortran: reject module variable as character length in PARAMETER [PR104349]

2023-04-03 Thread Paul Richard Thomas via Fortran
Hi Harald, OK for mainline. It is sufficiently small that, if there is any fallout in the next weeks, it can easily be reverted without great impact. Thanks for the patch. Paul On Mon, 3 Apr 2023 at 20:46, Harald Anlauf via Fortran wrote: > Dear all, > > the attached patch fixes an ICE-on-in