I'm getting an Internal Compiler Error from the move_alloc call in this code:
module test implicit none type :: derived end type derived type(derived), allocatable :: all_derived(:) contains subroutine test_sub class(derived), allocatable :: temp(:) integer :: current_size, new_size current_size = size(all_derived) new_size = current_size + 1 allocate(temp(new_size)) call move_alloc(from=temp, to=all_derived) end subroutine test_sub end module test
Commenting out the move_alloc gets rid of the ICE. I'm pretty sure its because I'm moving the allocation from a polymorphic (class) to a normal (type) allocation, and indeed making temp non-polymorphic also gets rid of the ICE. I'm pretty sure I shouldn't be doing that sort of move (it was a typo, temp wasn't meant to be polymorphic, anyway), but the compiler should probably give a better error message than just an ICE.
I'm using version 13.0.0.089 on Windows 7 x64:
Compiling with Intel(R) Visual Fortran Compiler XE 13.0.0.089 [Intel(R) 64]... test.f90 C:UsersbmenadueGoogle DriveCodetesttest.f90(21): catastrophic error: **Internal compiler error: internal abort** Please report this error 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. 1>compilation aborted for C:UsersbmenadueGoogle DriveCodetesttest.f90 (code 1)