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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
 
3
! PR fortran/37099
4
! Check for correct results when comparing array-section-substrings.
5
 
6
! This is the test from comment #1 of the PR.
7
! Contributed by Dominique d'Humieres 
8
 
9
integer, parameter :: n = 10
10
integer, parameter :: ilst(n) = (/(i,i=1,n)/)
11
character(*), parameter :: c0lst(n) = (/(char(96+i),i=1,n)/)
12
character(*), parameter :: c1lst(n) = (/(char(96+i)//'b',i=1,n)/)
13
logical :: tmp(n)
14
i = 5
15
print *, ilst(:) == i
16
print *, c0lst(:)(1:1) == char(96+i)
17
tmp = c1lst(:)(1:1) == char(96+i)
18
print *, tmp
19
print *, c1lst(:)(1:1) == 'e'
20
if (any(tmp .neqv. (c0lst(:)(1:1) == char(96+i)))) call abort()
21
end

powered by: WebSVN 2.1.0

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