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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [argument_checking_3.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 foo(a)
8
     character(len=1),dimension(:) :: a
9
  end subroutine foo
10
  subroutine bar(a)
11
     character(len=1),dimension(:,:) :: a
12
  end subroutine bar
13
  subroutine foobar(a)
14
     character(len=1),dimension(4) :: a
15
  end subroutine foobar
16
  subroutine arr(a)
17
     character(len=1),dimension(1,2,1,2) :: a
18
  end subroutine arr
19
end interface
20
  character(len=2) :: len2
21
  character(len=4) :: len4
22
  len2 = '12'
23
  len4 = '1234'
24
 
25
  call foo(len2) ! { dg-error "Rank mismatch in argument" }
26
  call foo("ca") ! { dg-error "Rank mismatch in argument" }
27
  call bar("ca") ! { dg-error "Rank mismatch in argument" }
28
  call foobar(len2) ! { dg-warning "contains too few elements" }
29
  call foobar(len4)
30
  call foobar("bar") ! { dg-warning "contains too few elements" }
31
  call foobar("bar33")
32
  call arr(len2) ! { dg-warning "contains too few elements" }
33
  call arr(len4)
34
  call arr("bar") ! { dg-warning "contains too few elements" }
35
  call arr("bar33")
36
end program test

powered by: WebSVN 2.1.0

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