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" > + return AS_UNKNOWN; > + } > + -- Steve