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