This is mostly encountered for bounds of automatic arrays. The following is invalid, but accepted by most compilers:
subroutine foo(x,n) implicit none real :: x(n) integer :: n It is also accepted by gfortran (unless -std=f2008 etc. is used). However, currently gfortran (since 4.4 / since PR 32095 / PR 34228) unconditionally rejects code of the kind: subroutine foo(x,n) implicit none real :: x(n+1) ! expression: "variable + constant" integer :: n with the message "Symbol '%s' is used before it is typed at %L". While this is useful to prevent circular usage (cf. PR 32095) simple EXPR_OP as above, esp. those which only involve +-*/ could be allowed. (They occure in real-world code.) -- Summary: Relax "Symbol is used before it is typed" checking Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37688