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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [achar_4.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 "-fbounds-check" }
3
! Tests the fix for PR31257, in which achar caused an ICE because it had no
4
! charlen.
5
!
6
! The code comes from http://www.star.le.ac.uk/~cgp/fortran.html (by Clive Page)
7
! Reported by Thomas Koenig 
8
!
9
  if (any (Up ("AbCdEfGhIjKlM") .ne. (/"ABCDEFGHIJKLM"/))) call abort ()
10
contains
11
  Character (len=20) Function Up (string)
12
    Character(len=*) string
13
    Up =                                                                &
14
     transfer(merge(achar(iachar(transfer(string,"x",len(string)))-     &
15
     (ichar('a')-ichar('A')) ),                                         &
16
     transfer(string,"x",len(string)) ,                                 &
17
     transfer(string,"x",len(string)) >= "a" .and.                      &
18
     transfer(string,"x",len(string)) <= "z"), repeat("x", len(string)))
19
    return
20
  end function Up
21
end

powered by: WebSVN 2.1.0

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