OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [char_length_14.f90] - Diff between revs 302 and 384

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 302 Rev 384
! { dg-do run }
! { dg-do run }
! PR35937, in which letting the length of 'c' to kind = 8 would
! PR35937, in which letting the length of 'c' to kind = 8 would
! screw up the interface and would cause an ICE. Note that this is
! screw up the interface and would cause an ICE. Note that this is
! actually the example of comment #4.
! actually the example of comment #4.
!
!
! Contributed by Thomas Koenig 
! Contributed by Thomas Koenig 
!
!
program main
program main
  implicit none
  implicit none
  if (f5 ('1') .ne. "a") call abort
  if (f5 ('1') .ne. "a") call abort
  if (len (f5 ('1')) .ne. 1) call abort
  if (len (f5 ('1')) .ne. 1) call abort
  if (f5 ('4') .ne. "abcd") call abort
  if (f5 ('4') .ne. "abcd") call abort
  if (len (f5 ('4')) .ne. 4) call abort
  if (len (f5 ('4')) .ne. 4) call abort
contains
contains
  function f5 (c)
  function f5 (c)
    character(len=1_8) :: c
    character(len=1_8) :: c
    character(len=scan('123456789', c)) :: f5
    character(len=scan('123456789', c)) :: f5
    integer :: i
    integer :: i
    do i = 1, len (f5)
    do i = 1, len (f5)
       f5(i:i) = char (i+96)
       f5(i:i) = char (i+96)
    end do
    end do
  end function f5
  end function f5
end program main
end program main
 
 

powered by: WebSVN 2.1.0

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