OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [allocatable_scalar_7.f90] - Blame information for rev 437

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
!
3
! PR fortran/41872
4
!
5
! Allocatable scalars with SAVE
6
!
7
program test
8
  implicit none
9
  call sub (0)
10
  call sub (1)
11
  call sub (2)
12
contains
13
  subroutine sub (no)
14
    integer, intent(in) :: no
15
    integer, allocatable, save :: a
16
    if (no == 0) then
17
      if (allocated (a)) call abort ()
18
      allocate (a)
19
    else if (no == 1) then
20
      if (.not. allocated (a)) call abort ()
21
      deallocate (a)
22
    else
23
      if (allocated (a)) call abort ()
24
    end if
25
  end subroutine sub
26
end program test

powered by: WebSVN 2.1.0

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