Re: [PATCH] Fortran: fix checking of MOLD= in ALLOCATE statements [PR51961]

2025-06-15 Thread Jerry D
On 6/15/25 1:22 PM, Harald Anlauf wrote: Am 15.06.25 um 21:25 schrieb Harald Anlauf: Dear all, the attached patch fixes a rejects-valid: in an ALLOCATE statement with MOLD= present, if the allocate-object has an explicit-shape-spec, the compatibility of ranks is not required by the standard.  (

Re: [PATCH, part1, v2] Fortran: various fixes for STAT/LSTAT/FSTAT intrinsics [PR82480]

2025-06-15 Thread Steve Kargl
Harald, I did a quick glance at the patch and did not see anything that jumped out as needing a change. OK to commit. Earlier today I came to the same conclusion that -1 on overflow is probably the right thing to do. Gfortran would need a way to supply the value of ERANGE (on all supported targ

[PATCH, part1, v2] Fortran: various fixes for STAT/LSTAT/FSTAT intrinsics [PR82480]

2025-06-15 Thread Harald Anlauf
Dear all, here's a modification that returns -1 for those components of stat that would overflow assignment to integer(kind=4), and does not return ERANGE as in v1 of this patch. There is no need to modify the existing testcasese stat_{1,2}.f90. Cheers, Harald Am 12.06.25 um 22:12 schrieb Hara

[PATCH] Fortran: fix checking of MOLD= in ALLOCATE statements [PR51961]

2025-06-15 Thread Harald Anlauf
Dear all, the attached patch fixes a rejects-valid: in an ALLOCATE statement with MOLD= present, if the allocate-object has an explicit-shape-spec, the compatibility of ranks is not required by the standard. (It is explicitly required only for SOURCE=). Since this could surprise users, we emit

Re: [PATCH] Fortran: fix checking of MOLD= in ALLOCATE statements [PR51961]

2025-06-15 Thread Harald Anlauf
Am 15.06.25 um 21:25 schrieb Harald Anlauf: Dear all, the attached patch fixes a rejects-valid: in an ALLOCATE statement with MOLD= present, if the allocate-object has an explicit-shape-spec, the compatibility of ranks is not required by the standard.  (It is explicitly required only for SOURCE=