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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
!
3
! Check handling of errmsg.
4
!
5
implicit none
6
integer, allocatable :: a[:], b(:)[:], c, d(:)
7
integer :: stat
8
character(len=300) :: str
9
 
10
allocate(a[*], b(1)[*], c, d(2), stat=stat)
11
 
12
str = repeat('X', len(str))
13
allocate(a[*], stat=stat, errmsg=str)
14
!print *, stat, trim(str)
15
if (stat == 0 .or. str /= "Attempt to allocate an allocated object") &
16
  call abort ()
17
 
18
str = repeat('Y', len(str))
19
allocate(b(2)[*], stat=stat, errmsg=str)
20
!print *, stat, trim(str)
21
if (stat == 0 .or. str /= "Attempt to allocate an allocated object") &
22
  call abort ()
23
 
24
str = repeat('Q', len(str))
25
allocate(c, stat=stat, errmsg=str)
26
!print *, stat, trim(str)
27
if (stat == 0 .or. str /= "Attempt to allocate an allocated object") &
28
  call abort ()
29
 
30
str = repeat('P', len(str))
31
allocate(d(3), stat=stat, errmsg=str)
32
!print *, stat, trim(str)
33
if (stat == 0 .or. str /= "Attempt to allocate an allocated object") &
34
  call abort ()
35
 
36
end

powered by: WebSVN 2.1.0

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