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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
!
3
! PR fortran/31559
4
! Do not allow assigning to external functions
5
!
6
! Contributed by Steve Kargl 
7
!
8
module mod
9
  implicit none
10
contains
11
  integer function bar()
12
    bar = 4
13
  end function bar
14
 
15
  subroutine a()
16
   implicit none
17
   real :: fun
18
   external fun
19
   interface
20
     function funget(a)
21
       integer :: a
22
     end function
23
     subroutine sub()
24
     end subroutine sub
25
   end interface
26
   sub = 'a'  ! { dg-error "is not a variable" }
27
   fun = 4.4  ! { dg-error "is not a variable" }
28
   funget = 4 ! { dg-error "is not a variable" }
29
   bar = 5    ! { dg-error "is not a variable" }
30
  end subroutine a
31
end module mod
32
 
33
end
34
 
35
! { dg-final { cleanup-modules "mod" } }

powered by: WebSVN 2.1.0

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