2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / entry_10.f90
blob2f526e200562265e74103328e83183ded5898221
1 ! { dg-do run }
2 ! Test fix for PR31474, in which the use of ENTRYs as module
3 ! procedures in a generic interface would cause an internal error.
5 ! Contributed by Michael Richmond <michael.a.richmond@nasa.gov>
7 module a
8 interface b
9 module procedure c, d
10 end interface
11 contains
12 real function d (i)
13 real c, i
14 integer j
15 d = 1.0
16 return
17 entry c (j)
18 d = 2.0
19 end function
20 real function e (i)
21 real f, i
22 integer j
23 e = 3.0
24 return
25 entry f (j)
26 e = 4.0
27 end function
28 end module
30 use a
31 if (b (1.0) .ne. 1.0) STOP 1
32 if (b (1 ) .ne. 2.0) STOP 2
33 if (e (1.0) .ne. 3.0) STOP 3
34 if (f (1 ) .ne. 4.0) STOP 4
35 end