URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [func_result_1.f90] - Rev 165
Go to most recent revision | Compare with Previous | Blame | View Log
! { dg-do run }
! From PR 19673 : We didn't dereference the the result from POINTER
! functions with a RESULT clause
program ret_ptr
if (foo(99) /= bar(99)) call abort ()
contains
function foo (arg) result(ptr)
integer :: arg
integer, pointer :: ptr
allocate (ptr)
ptr = arg
end function foo
function bar (arg)
integer :: arg
integer, pointer :: bar
allocate (bar)
bar = arg
end function bar
end program ret_ptr
Go to most recent revision | Compare with Previous | Blame | View Log