aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/duplicate_type_3.f90
blob: 802029db0ca8fae8edee07defbed17f9635863da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
! { dg-do compile }
!
! PR 39996: Double typing of function results not detected
!
! Contributed by Janus Weil <janus@gcc.gnu.org>

  interface
    real function A ()
    end function
  end interface
  real :: A  ! { dg-error "already has basic type of" }

  real :: B
  interface
    real function B ()  ! { dg-error "already has basic type of" }
    end function  ! { dg-error "Expecting END INTERFACE statement" }
  end interface

  interface
    function C ()
      real :: C
    end function
  end interface
  real :: C  ! { dg-error "already has basic type of" }

  real :: D
  interface
    function D ()
      real :: D  ! { dg-error "already has basic type of" }
    end function
  end interface

  interface
    function E () result (s)
      real ::s
    end function
  end interface
  real :: E  ! { dg-error "already has basic type of" }

  real :: F
  interface
    function F () result (s)
      real ::s  ! { dg-error "already has basic type of" }
    end function F
  end interface

end