Skip to content

COR092 missing-end-label ​

error enabled by default

The end statement of a named construct does not repeat the construct name.

Why ​

When a construct has a name (outer: do), the standard requires its end statement to repeat it (end do outer); compilers reject the code otherwise. Reported here so the error shows up with the other findings, before a build.

Reported ​

fortran
outer: do i = 1, n
end do

Preferred ​

fortran
outer: do i = 1, n
end do outer

Suppressing ​

For one occurrence, with the reason on the same line (or alone on the line before the statement):

fortran
! fobis: ignore[COR092] <why this occurrence is fine>

For the whole project, ignore = COR092 in the fobos [lint] section.

Equivalent ​

Fortitude rule C143 (see Lint Rules).