* tree-loop-distribution.c (struct partition): New field recording
[official-gcc.git] / gcc / testsuite / gfortran.dg / trim_optimize_5.f90
blob63f12584a076f581b89346d1b4c5f9c7e1c13bcd
1 ! { dg-do run }
2 ! { dg-options "-O -fdump-tree-original" }
3 ! PR 47065 - replace trim with substring expressions even with references.
4 program main
5 implicit none
6 type t
7 character(len=2) :: x
8 end type t
9 type(t) :: a
10 character(len=3) :: b
11 character(len=10) :: line
12 a%x = 'a'
13 write(unit=line,fmt='(A,A)') trim(a%x),"X"
14 if (line /= 'aX ') call abort
15 b = 'ab'
16 write (unit=line,fmt='(A,A)') trim(b),"Y"
17 if (line /= 'abY ') call abort
18 end program main
19 ! { dg-final { scan-tree-dump-times "string_len_trim" 2 "original" } }