OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [trim_optimize_5.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { 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" } }
20
! { dg-final { cleanup-tree-dump "original" } }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.