https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66113
Bug ID: 66113 Summary: Variable n cannot appear in the expression with nested blocks Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: tkoenig at gcc dot gnu.org Target Milestone: --- ig25@linux-fd1f:~/Krempel/Block> cat block.f90 program main integer :: n n = 3 block block block real, dimension(n) :: a end block end block end block end program main ig25@linux-fd1f:~/Krempel/Block> gfortran block.f90 block.f90:7:24: real, dimension(n) :: a 1 Error: Variable »n« cannot appear in the expression at (1) This is bogus. Any solution should include the case of an arbitrary number of nested blocks.