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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc3/] [gcc/] [testsuite/] [gfortran.dg/] [size_optional_dim_1.f90] - Blame information for rev 581

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

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
! PR 30865 - passing a subroutine optional argument to size(dim=...)
3
! used to segfault.
4
program main
5
  implicit none
6
  integer :: a(2,3)
7
  integer :: ires
8
 
9
  call checkv (ires, a)
10
  if (ires /= 6) call abort
11
  call checkv (ires, a, 1)
12
  if (ires /= 2) call abort
13
contains
14
  subroutine checkv(ires,a1,opt1)
15
    integer, intent(out) :: ires
16
    integer :: a1(:,:)
17
    integer, optional :: opt1
18
 
19
    ires = size (a1, dim=opt1)
20
  end subroutine checkv
21
end program main

powered by: WebSVN 2.1.0

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