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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [transfer_resolve_1.f90] - Rev 694

Compare with Previous | Blame | View Log

! { dg-do run }
! PR40847 - an error in gfc_resolve_transfer caused the character length
! of 'mold' to be set incorrectly.
!
! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
!
program test_elemental

if (any (transfer_size((/0.,0./),(/'a','b'/)) .ne. [4 ,4])) call abort

contains

   elemental function transfer_size (source, mold)
     real, intent(in)         :: source
     character(*), intent(in) :: mold
     integer                  :: transfer_size
     transfer_size = SIZE(TRANSFER(source, (/mold/)))
     return
   end function transfer_size

end program test_elemental

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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