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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
!
3
! PR fortran/47421
4
!
5
! Don't auto-deallocatable scalar character allocatables.
6
!
7
implicit none
8
character(len=5), allocatable :: str
9
allocate(str)
10
str = '1bcde'
11
if(str /= '1bcde') call abort()
12
call sub(str,len(str))
13
if(str /= '1bcde') call abort()
14
call subOUT(str,len(str))
15
if (len(str) /= 5) call abort()
16
if(allocated(str)) call abort()
17
contains
18
  subroutine sub(x,n)
19
     integer :: n
20
     character(len=n), allocatable :: x
21
     if(len(x) /= 5) call abort()
22
     if(x /= '1bcde') call abort()
23
  end subroutine sub
24
  subroutine subOUT(x,n)
25
     integer :: n
26
     character(len=n), allocatable,intent(out) :: x
27
     if(allocated(x)) call abort()
28
     if(len(x) /= 5) call abort()
29
  end subroutine subOUT
30
end

powered by: WebSVN 2.1.0

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