PR target/83368
[official-gcc.git] / gcc / testsuite / gfortran.dg / entry_12.f90
blob15e874e2b0563fa653f9bc9a0148e82da95295e9
1 ! { dg-do run }
2 ! Tests the fix for pr31609, where module procedure entries found
3 ! themselves in the wrong namespace. This test checks that all
4 ! combinations of generic and specific calls work correctly.
6 ! Contributed by Paul Thomas <pault@gcc.gnu.org> as comment #8 to the pr.
8 MODULE ksbin1_aux_mod
9 interface foo
10 module procedure j
11 end interface
12 interface bar
13 module procedure k
14 end interface
15 interface foobar
16 module procedure j, k
17 end interface
18 CONTAINS
19 FUNCTION j ()
20 j = 1
21 return
22 ENTRY k (i)
23 k = 2
24 END FUNCTION j
25 END MODULE ksbin1_aux_mod
27 use ksbin1_aux_mod
28 if (any ((/foo (), bar (99), foobar (), foobar (99), j (), k (99)/) .ne. &
29 (/1, 2, 1, 2, 1, 2/))) Call abort ()
30 end