PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / simpleif_2.f90
blob09c0d380416db97745c83bb16f6130701f977f75
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.
7 module 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
15 end module read