The following code will not compile with versions 8.61 or 8.66 when /ISO is used.
This is a short demonstration, extracted from a larger code where /ISO is required to ensure that SIZE returns a default integer (in line with the Fortran standard) rather than a 64 bit integer.
module mmm
type y_t
integer :: n
end type y_t
type x_t
integer :: m
type (y_t), pointer :: y(:) => null()
end type x_t
contains
subroutine create
type(x_t), pointer :: x(:)
allocate(x(1))
allocate(x(1)%y(1))
end subroutine create
end module mmm
The compiler error is:
*** '@' found after Alloc where a comma was expected. *** Unexpected '@' in expression.
This compiles correctly with an older version of the compiler (7.2).
If I make a small change to the code it doesn't compile with or without using /ISO, with a different error message:
*** Alloc@1 is an array, so must have bounds specified in the ALLOCATE statement *** '<NUL>' found where ')' was expected
module mmm
type y_t
integer :: n
end type y_t
type x_t
integer :: m
type (y_t), pointer :: y(:) => null()
end type x_t
contains
subroutine create
type(x_t), pointer :: x(:)
allocate(x(1))
x(1)%m = 1
allocate(x(1)%y(x(1)%m))
end subroutine create
end module mmm