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

Subversion Repositories openrisc

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

Go to most recent revision | 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
! Check that trailing trims are also removed from assignment of
4
! expressions involving concatenations of strings .
5
program main
6
  character(2) :: a,b,c
7
  character(8) :: d
8
  a = 'a '
9
  b = 'b '
10
  c = 'c '
11
  d = a // b // a // trim(c)   ! This should be optimized away.
12
  if (d /= 'a b a c ') call abort
13
  d = a // trim(b) // c // a   ! This shouldn't.
14
  if (d /= 'a bc a  ') call abort
15
  d = a // b // a // trim(trim(c)) ! This should also be optimized away.
16
  if (d /= 'a b a c ') call abort
17
end
18
! { dg-final { scan-tree-dump-times "string_len_trim" 1 "original" } }
19
! { 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.