URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [trim_optimize_1.f90] - Rev 801
Go to most recent revision | Compare with Previous | Blame | View Log
! { dg-do run }
! { dg-options "-O -fdump-tree-original" }
! PR 40628 - optimize unnecessary TRIMs on assignment
program main
character(len=3) :: a
character(len=4) :: b,c
b = 'abcd'
a = trim(b)
c = trim(trim(a))
if (a /= 'abc') call abort
if (c /= 'abc') call abort
end program main
! { dg-final { scan-tree-dump-times "memmove" 2 "original" } }
! { dg-final { scan-tree-dump-times "string_trim" 0 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
Go to most recent revision | Compare with Previous | Blame | View Log