1! { dg-do compile }
2! Test fix for regression caused by
3! 2006-06-23  Steven G. Kargl  <kargls@comcast.net>
4!    PR fortran/27981
5!    * match.c (gfc_match_if):  Handle errors in assignment in simple if.
6!
7module read
8  integer i, j, k
9  contains
10    subroutine a
11      integer, parameter :: n = 2
12      if (i .eq. 0) read(j,*) k
13      if (i .eq. 0) n = j    ! { dg-error "Named constant 'n' in variable definition context" }
14    end subroutine a
15end module read
16