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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [achar_4.f90] - Blame information for rev 551

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
! Tests the fix for PR31257, in which achar caused an ICE because it had no
3
! charlen.
4
!
5
! The code comes from http://www.star.le.ac.uk/~cgp/fortran.html (by Clive Page)
6
! Reported by Thomas Koenig 
7
!
8
  if (any (Up ("AbCdEfGhIjKlM") .ne. (/"ABCDEFGHIJKLM"/))) call abort ()
9
contains
10
  Character (len=20) Function Up (string)
11
    Character(len=*) string
12
    Up =                                                                &
13
     transfer(merge(achar(iachar(transfer(string,"x",len(string)))-     &
14
     (ichar('a')-ichar('A')) ),                                         &
15
     transfer(string,"x",len(string)) ,                                 &
16
     transfer(string,"x",len(string)) >= "a" .and.                      &
17
     transfer(string,"x",len(string)) <= "z"), repeat("x", len(string)))
18
    return
19
  end function Up
20
end

powered by: WebSVN 2.1.0

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