2 ! { dg-options "-O -fdump-tree-original" }
3 ! Check that trailing trims are also removed from assignment of
4 ! expressions involving concatenations of strings .
11 d
= a
// b
// a
// trim(c
) ! This should be optimized away.
12 if (d
/= 'a b a c ') STOP 1
13 d
= a
// trim(b
) // c
// a
! This shouldn't.
14 if (d
/= 'a bc a ') STOP 2
15 d
= a
// b
// a
// trim(trim(c
)) ! This should also be optimized away.
16 if (d
/= 'a b a c ') STOP 3
18 ! { dg-final { scan-tree-dump-times "string_len_trim" 1 "original" } }