Zero sized array constructors for derived types used to work, didn't they? They syntax for them appears to be in the compiler docs.
PROGRAM WhereDidZeroSizedArrayConstructorsGo IMPLICIT NONE TYPE :: my_type END TYPE my_type TYPE(my_type), ALLOCATABLE :: array(:) array = [ my_type :: ] PRINT *, SIZE(array) END PROGRAM WhereDidZeroSizedArrayConstructorsGo
>ifort /check:all /warn:all /standard-semantics ArrayConstructors.f90 Intel(R) Visual Fortran Compiler XE for applications running on IA-32, Version 220.127.116.11 Build 20121008 Copyright (C) 1985-2012 Intel Corporation. All rights reserved. ArrayConstructors.f90(8): error #5082: Syntax error, found '::' when expecting one of: , (/ : ] array = [ my_type :: ] --------------------^ ArrayConstructors.f90(8): error #6478: A type-name must not be used as a variable. [MY_TYPE] array = [ my_type :: ] ------------^ compilation aborted for ArrayConstructors.f90 (code 1)
Or am I imagining things? I would have sworn that they were in active use in our code base, but now I can't find any examples.
Yours in deluded confusion,