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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [array_alloc_1.f90] - Diff between revs 154 and 816

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 154 Rev 816
! PR 21104.  Make sure that either f() or its caller will allocate
! PR 21104.  Make sure that either f() or its caller will allocate
! the array data.  We've decided to make the caller allocate it.
! the array data.  We've decided to make the caller allocate it.
! { dg-do run }
! { dg-do run }
program main
program main
  implicit none
  implicit none
  call test (f ())
  call test (f ())
contains
contains
  subroutine test (x)
  subroutine test (x)
    integer, dimension (10) :: x
    integer, dimension (10) :: x
    integer :: i
    integer :: i
    do i = 1, 10
    do i = 1, 10
      if (x (i) .ne. i * 100) call abort
      if (x (i) .ne. i * 100) call abort
    end do
    end do
  end subroutine test
  end subroutine test
  function f ()
  function f ()
    integer, dimension (10) :: f
    integer, dimension (10) :: f
    integer :: i
    integer :: i
    forall (i = 1:10) f (i) = i * 100
    forall (i = 1:10) f (i) = i * 100
  end function f
  end function f
end program main
end program main
 
 

powered by: WebSVN 2.1.0

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