summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/error_stop_2.f08
blob: 8e3e71159800dd699b7c2fc3be8704df59a31e82 (plain)
1
2
3
4
5
6
7
8
9
10
11
! { dg-do compile }
! PR44371 STOP parsing rejects valid code.
  real, dimension(5,5,5) :: i
  character(1) c, y
  y = 'y'
  read(y,*) c
  if (c=='x') stop; if (c=='X') stop
  if (c=='x') stop size(i); if (c=='X') stop

  if (c=='y') stop size(i) if (c=='Y') stop ! { dg-error "Syntax error in STOP" }
  end