2 ! { dg-options "-Wsurprising" }
3 ! PR 37221 - also warn about too-long MOLD for TRANSFER if not simplifying.
4 ! Test case based on contribution by Tobias Burnus.
6 character(len
=10) :: str
8 str
= transfer(65+66*2**8+67*2**16+68*2**24,str
) ! { dg-warning "has partly undefined result" }
10 i
= 65+66*2**8+67*2**16+68*2**24
11 str
= transfer(i
,str
) ! { dg-warning "has partly undefined result" }
13 str
= transfer(i
,str(1:4))