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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
!
3
! This tests the fix for PR36325, which corrected for the fact that a
4
! specific or generic INTERFACE statement implies the EXTERNAL attibute.
5
!
6
! Contributed by Janus Weil 
7
 
8
module a
9
  interface
10
    subroutine foo
11
    end subroutine
12
  end interface
13
  external foo  ! { dg-error "Duplicate EXTERNAL attribute" }
14
end module
15
 
16
module b
17
  interface
18
    function sin (x)
19
      real :: sin, x
20
    end function
21
  end interface
22
  intrinsic sin  ! { dg-error "EXTERNAL attribute conflicts with INTRINSIC attribute" }
23
end module
24
 
25
! argument checking was not done for external procedures with explicit interface
26
program c
27
  interface
28
    subroutine bar(x)
29
      real :: x
30
    end subroutine
31
  end interface
32
  call bar()  ! { dg-error "Missing actual argument" }
33
end program
34
 
35
! { dg-final { cleanup-modules "a b" } }

powered by: WebSVN 2.1.0

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