http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57456
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> --- There is a similar problem for: character(len=:), allocatable :: str(:) allocate (character(len=5) :: str(5)) end * * * To solve this properly, one should put all the logic into gfc_trans_allocate - and avoid duplicating it in gfc_array_init_size (which is called from gfc_array_allocate, which is called from the mentioned gfc_trans_allocate). Note: Also the evaluation of the type-spec length should be done only once for allocate (character(len = f()) :: str(5), str2, str3, str4(10))