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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [transfer_resolve_1.f90] - Rev 313

Go to most recent revision | 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

Go to most recent revision | 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.