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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
!
3
! PR fortran/44556
4
!
5
! Contributed by Jonathan Hogg and Steve Kargl.
6
!
7
program oh_my
8
   implicit none
9
   type a
10
      integer, allocatable :: b(:), d(:)
11
      character(len=80) :: err
12
      character(len=80), allocatable :: str(:)
13
      integer :: src
14
   end type a
15
 
16
   integer j
17
   type(a) :: c
18
   c%err = 'ok'
19
   allocate(c%d(1))
20
   allocate(c%b(2), errmsg=c%err, stat=c%d(1)) ! OK
21
   deallocate(c%b, errmsg=c%err, stat=c%d(1))  ! OK
22
   allocate(c%b(2), errmsg=c%err, stat=c%b(1)) ! { dg-error "the same ALLOCATE statement" }
23
   deallocate(c%b, errmsg=c%err, stat=c%b(1))  ! { dg-error "the same DEALLOCATE statement" }
24
   allocate(c%str(2), errmsg=c%str(1), stat=j) ! { dg-error "the same ALLOCATE statement" }
25
   deallocate(c%str, errmsg=c%str(1), stat=j)  ! { dg-error "the same DEALLOCATE statement" }
26
end program oh_my

powered by: WebSVN 2.1.0

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