OSDN Git Service

* trans.c (trans_code): Set backend locus early.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / entry_10.f90
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.
4 !
5 ! Contributed by Michael Richmond <michael.a.richmond@nasa.gov>
6 !
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
29
30   use a
31   if (b (1.0) .ne. 1.0) call abort ()
32   if (b (1  ) .ne. 2.0) call abort ()
33   if (e (1.0) .ne. 3.0) call abort ()
34   if (f (1  ) .ne. 4.0) call abort ()
35 end
36 ! { dg-final { cleanup-modules "a" } }