2 ! This tests the fix for PR25089 in which it was noted that a
3 ! NAMELIST member that is an internal(or module) procedure gave
4 ! no error if the NAMELIST declaration appeared before the
5 ! procedure declaration. Not mentioned in the PR is that any
6 ! reference to the NAMELIST object would cause a segfault.
8 ! Based on the contribution from Joost VanderVondele
12 ! This is the original PR
14 NAMELIST /NML1
/ G2
! { dg-error "PROCEDURE attribute conflicts" }
20 ! This has always been picked up - namelist after function
22 NAMELIST /NML2
/ G1
! { dg-error "PROCEDURE attribute conflicts" }
29 ! This has the additional wrinkle of a reference to the object.
31 NAMELIST /NML3
/ F2
! { dg-error "PROCEDURE attribute conflicts" }
33 f2
= 1 ! { dg-error "is not a VALUE" }
41 ! { dg-final { cleanup-modules "M1" } }