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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [func_result_1.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! From PR 19673 : We didn't dereference the result from POINTER
3
! functions with a RESULT clause
4
program ret_ptr
5
  if (foo(99) /= bar(99)) call abort ()
6
contains
7
  function foo (arg) result(ptr)
8
    integer :: arg
9
    integer, pointer :: ptr
10
    allocate (ptr)
11
    ptr = arg
12
  end function foo
13
  function bar (arg)
14
    integer :: arg
15
    integer, pointer :: bar
16
    allocate (bar)
17
    bar = arg
18
  end function bar
19
end  program ret_ptr

powered by: WebSVN 2.1.0

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