Dear all, the simplification of the TRANSFER intrinsic produces a redundant representation of the result, one in expr->value and another in expr->representation.string. This is done to ensure a safe "round-trip" for nested TRANSFER. In a subsequent use of this result we either need to make sure that both parts stay consistent, or drop the latter part. The simplifications of IBCLR and IBSET do a gfc_copy_expr of their argument x and modify only the former part. Depending on context, either value.integer or representation.string (if non-NULL) are used later, leading to surprising results. A conservative approach to fix this PR is to simply drop the unneeded representation.string in the simplification of the intrinsics IBCLR and IBSET, see attached patch. (A quick glance did not turn up other intrinsics affected the same way.) Regtested on x86_64-pc-linux-gnu. OK for mainline? Thanks, Harald