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

Subversion Repositories openrisc

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

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 fortran/30940
4
program test
5
implicit none
6
interface
7
  subroutine foobar(x)
8
     integer,dimension(4) :: x
9
  end subroutine foobar
10
  subroutine arr(y)
11
     integer,dimension(1,2,1,2) :: y
12
  end subroutine arr
13
end interface
14
 
15
integer a(3), b(5)
16
call foobar(a) ! { dg-warning "contains too few elements" }
17
call foobar(b)
18
call foobar(b(1:3)) ! { dg-warning "contains too few elements" }
19
call foobar(b(1:5))
20
call foobar(b(1:5:2)) ! { dg-warning "contains too few elements" }
21
call foobar(b(2))
22
call foobar(b(3)) ! { dg-warning "Actual argument contains too few elements" }
23
call foobar(reshape(a(1:3),[2,1])) ! { dg-warning "contains too few elements" }
24
call foobar(reshape(b(2:5),[2,2]))
25
 
26
call arr(a) ! { dg-warning "contains too few elements" }
27
call arr(b)
28
call arr(b(1:3)) ! { dg-warning "contains too few elements" }
29
call arr(b(1:5))
30
call arr(b(1:5:2)) ! { dg-warning "contains too few elements" }
31
call arr(b(2))
32
call arr(b(3)) ! { dg-warning "contains too few elements" }
33
call arr(reshape(a(1:3),[2,1])) ! { dg-warning "contains too few elements" }
34
call arr(reshape(b(2:5),[2,2]))
35
end program test

powered by: WebSVN 2.1.0

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