URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [char_result_8.f90] - Rev 694
Compare with Previous | Blame | View Log
! Related to PR 15326. Compare functions that return string pointers with! functions that return strings.! { dg-do run }program mainimplicit nonecharacter (len = 30), target :: stringcall test (f1 (), 30)call test (f2 (50), 50)call test (f3 (), 30)call test (f4 (70), 70)call indirect (100)containsfunction f1 ()character (len = 30) :: f1f1 = ''end function f1function f2 (i)integer :: icharacter (len = i) :: f2f2 = ''end function f2function f3 ()character (len = 30), pointer :: f3f3 => stringend function f3function f4 (i)integer :: icharacter (len = i), pointer :: f4f4 => stringend function f4subroutine indirect (i)integer :: icall test (f1 (), 30)call test (f2 (i), i)call test (f3 (), 30)call test (f4 (i), i)end subroutine indirectsubroutine test (string, length)character (len = *) :: stringinteger, intent (in) :: lengthif (len (string) .ne. length) call abortend subroutine testend program main
