https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85088
Bug ID: 85088 Summary: improve diagnostic for bad INTENT declaration ('Invalid character in name at') Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: janus at gcc dot gnu.org Target Milestone: --- Simple example with three invalid variable declarations: subroutine s(x, y, z) integer, intent(int) :: x integer, intent :: y integer, inten :: z end Basically all gfortran versions I tried yield this output: intent.f90:2:11: integer, intent(int) :: x 1 Error: Invalid character in name at (1) intent.f90:3:11: integer, intent :: y 1 Error: Invalid character in name at (1) intent.f90:4:11: integer, inten :: z 1 Error: Invalid character in name at (1) The first problem here is that the marker (1) is placed wrongly, or at least not very exactly. Furthermore also the error message could be improved, in particular in the first case, where one has a valid INTENT keyword, but with an invalid argument.