Hi Steve, Am 12.12.22 um 00:52 schrieb Steve Kargl via Gcc-patches: > On Sun, Dec 11, 2022 at 11:33:43PM +0100, Harald Anlauf via Fortran wrote: >> Dear all, >> >> the attached patch improves checking of array specs in two ways: >> - bad assumed size array spec >> - a bad first array element spec may already trigger an error, >> leading to a more consistent behavior >> >> Regtested on x86_64-pc-linux-gnu. OK for mainline? >> > > OK with minor nit. > >> + /* F2018:R821: "assumed-implied-spec is [ lower-bound : ] *". */ >> + if (gfc_match (" : * ") == MATCH_YES) >> + { >> + gfc_error ("A lower bound must precede colon in " >> + "assumed size array specification at %C"); > > "assumed size" should likely be "assumed-size" good point, I've fixed that. I was a bit unhappy with the previously submitted patch, as it tried to match ':' twice and gave an unfortunate locus in the error message. I now chose to combine the adjacent matches and to remember a more suitable locus for use with the emitted error, see attached updated patch. Committed as r13-4623-gcf5327b89ab610. Thanks, Harald >> + return AS_UNKNOWN; >> + } >> + > >