T.G.I.F.
MODULE iso_varying_internal_compiler_error IMPLICIT NONE TYPE, PUBLIC :: varying_string CHARACTER(:), ALLOCATABLE, PUBLIC :: chars END TYPE varying_string INTERFACE len MODULE PROCEDURE len_ END INTERFACE len CONTAINS ELEMENTAL FUNCTION len_(string) RESULT(length) TYPE(varying_string), INTENT(IN) :: string INTEGER :: length !*************************************************************************** IF (ALLOCATED(string%chars)) THEN length = LEN(string%chars) ELSE length = 0 END IF END FUNCTION len_ SUBROUTINE get_unit(iomsg) CHARACTER(*), INTENT(INOUT), OPTIONAL :: iomsg !--------------------------------------------------------------------------- CHARACTER(:), ALLOCATABLE :: local_iomsg !*************************************************************************** IF (PRESENT(iomsg)) THEN ALLOCATE(CHARACTER(LEN(iomsg)) :: local_iomsg) ELSE ALLOCATE(CHARACTER(1) :: local_iomsg) END IF END SUBROUTINE get_unit END MODULE iso_varying_internal_compiler_error
>ifort /check:all /warn:all /standard-semantics "2016-03-18 optional_length.f90" Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 16.0 Build 20160204 Copyright (C) 1985-2016 Intel Corporation. All rights reserved. 2016-03-18 optional_length.f90(30): catastrophic error: **Internal compiler error: internal abort** Please report this e rror along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error. compilation aborted for 2016-03-18 optional_length.f90 (code 1)
To the fridge!