OSDN Git Service

PR target/35944
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / entry_7.f90
1 ! { dg-do compile }
2 ! Check that PR20877 and PR25047 are fixed by the patch for
3 ! PR24558. Both modules would emit the error:
4 ! insert_bbt(): Duplicate key found!
5 ! because of the prior references to a module function entry.
6 !
7 ! Contributed by Joost VandeVondele  <jv244@cam.ac.uk>
8 !
9 MODULE TT
10 CONTAINS
11   FUNCTION K(I) RESULT(J)
12     ENTRY J() ! { dg-error "conflicts with PROCEDURE attribute" }
13   END FUNCTION K
14
15   integer function foo ()
16     character*4 bar ! { dg-error "type CHARACTER" }
17     foo = 21
18     return
19   entry bar ()
20     bar = "abcd"
21   end function
22 END MODULE TT
23
24
25 ! { dg-final { cleanup-modules "TT" } }