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

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [allocate_zerosize_1.f90] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do run }
2
program main
3
  implicit none
4
  real, allocatable :: a(:), b(:,:)
5
  integer :: n,m
6
  character (len=2) :: one, two
7
 
8
  one = ' 1'
9
  two = ' 2'
10
 
11
  allocate (a(1:-1))
12
  if (size(a) /= 0) call abort
13
  deallocate (a)
14
 
15
  allocate (b(1:-1,0:10))
16
  if (size(b) /= 0) call abort
17
  deallocate (b)
18
 
19
  ! Use variables for array bounds.  The internal reads
20
  ! are there to hide fact that these are actually constant.
21
 
22
  read (unit=one, fmt='(I2)') n
23
  allocate (a(n:-1))
24
  if (size(a) /= 0) call abort
25
  deallocate (a)
26
 
27
  read (unit=two, fmt='(I2)') m
28
  allocate (b(1:3, m:0))
29
  if (size(b) /= 0) call abort
30
  deallocate (b)
31
end program main

powered by: WebSVN 2.1.0

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