OSDN Git Service

2010-04-24 Kai Tietz <kai.tietz@onevision.com>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / duplicate_type_3.f90
1 ! { dg-do compile }
2 !
3 ! PR 39996: Double typing of function results not detected
4 !
5 ! Contributed by Janus Weil <janus@gcc.gnu.org>
6
7   interface
8     real function A ()
9     end function
10   end interface
11   real :: A  ! { dg-error "already has basic type of" }
12
13   real :: B
14   interface
15     real function B ()  ! { dg-error "already has basic type of" }
16     end function  ! { dg-error "Expecting END INTERFACE statement" }
17   end interface
18
19   interface
20     function C ()
21       real :: C
22     end function
23   end interface
24   real :: C  ! { dg-error "already has basic type of" }
25
26   real :: D
27   interface
28     function D ()
29       real :: D  ! { dg-error "already has basic type of" }
30     end function
31   end interface
32
33   interface
34     function E () result (s)
35       real ::s
36     end function
37   end interface
38   real :: E  ! { dg-error "already has basic type of" }
39
40   real :: F
41   interface
42     function F () result (s)
43       real ::s  ! { dg-error "already has basic type of" }
44     end function F
45   end interface
46
47 end
48