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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! PR35937, in which letting the length of 'c' to kind = 8 would
3
! screw up the interface and would cause an ICE. Note that this is
4
! actually the example of comment #4.
5
!
6
! Contributed by Thomas Koenig 
7
!
8
program main
9
  implicit none
10
  if (f5 ('1') .ne. "a") call abort
11
  if (len (f5 ('1')) .ne. 1) call abort
12
  if (f5 ('4') .ne. "abcd") call abort
13
  if (len (f5 ('4')) .ne. 4) call abort
14
contains
15
  function f5 (c)
16
    character(len=1_8) :: c
17
    character(len=scan('123456789', c)) :: f5
18
    integer :: i
19
    do i = 1, len (f5)
20
       f5(i:i) = char (i+96)
21
    end do
22
  end function f5
23
end program main

powered by: WebSVN 2.1.0

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