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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
!
3
! PR 47349: missing warning: Actual argument contains too few elements
4
!
5
! Contributed by Janus Weil 
6
 
7
 implicit none
8
 type t
9
    integer :: j(3)
10
 end type t
11
 
12
 type(t) :: tt
13
 integer :: i(3) = (/ 1,2,3 /)
14
 
15
 tt%j = i
16
 
17
 call sub1 (i)     ! { dg-warning "Actual argument contains too few elements" }
18
 call sub1 (tt%j)  ! { dg-warning "Actual argument contains too few elements" }
19
 call sub2 (i)     ! { dg-error "Rank mismatch in argument" }
20
 call sub2 (tt%j)  ! { dg-error "Rank mismatch in argument" }
21
 
22
contains
23
 
24
  subroutine sub1(i)
25
    integer, dimension(1:3,1:3) :: i
26
    print *,"sub1:",i
27
  end subroutine
28
 
29
  subroutine sub2(i)
30
    integer, dimension(:,:) :: i
31
    print *,"sub2:",i
32
  end subroutine
33
 
34
end

powered by: WebSVN 2.1.0

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