1! { dg-do compile }
2! Tests fix for PR25058 in which references to dummy
3! parameters before the entry would be missed.
4!
5! Contributed by Joost VandeVondele  <jv244@cam.ac.uk>
6!
7MODULE M1
8CONTAINS
9FUNCTION F1(I) RESULT(RF1)
10 INTEGER :: I,K,RE1,RF1
11 RE1=K ! { dg-error "before the ENTRY statement" }
12 RETURN
13 ENTRY E1(K) RESULT(RE1)
14 RE1=-I
15 RETURN
16END FUNCTION F1
17END  MODULE M1
18END
19