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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! { dg-options "-fdump-tree-original" }
3
! PR 34145 - the length of the string should be simplified to one,
4
! no library call for string comparison is necessary.
5
program main
6
  character (len=5) :: c
7
  integer(kind=8) :: i
8
  i = 3
9
  c(i:i) = 'a'
10
  c(i+1:i+1) = 'b'
11
  if (c(i:i) /= 'a') call abort ()
12
  if (c(i+1:i+1) /= 'b') call abort ()
13
end program main
14
! { dg-final { scan-tree-dump-times "gfortran_compare_string" 0 "original" } }
15
! { 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.