4 ! simplify_transfer used to ICE on divide by zero for cases like this,
5 ! where the mold expression is a non-constant character expression.
7 ! Testcase contributed by Tobias Burnus <burnus@gcc.gnu.org >
9 character, pointer :: ptr(:)
12 ptr
= transfer('Sample#0'//achar(0),ptr
) ! Causes ICE
13 if (any (ptr
.ne
. ['S','a','m','p','l','e','#','0',achar(0)])) call abort
15 if (a
.ne
. 'Sample#2') call abort
19 a
= transfer('Sample#2',a
)