------- Comment #1 from jakub at gcc dot gnu dot org  2007-06-20 16:23 -------
There is nothing special about ST_OMP_THREADPRIVATE here, the Fortran parser
as whole behaves this way.
You get the same if you write say
subroutine test
  integer :: i
  i = 1
  common /myi/ i
end subroutine test
etc.  Handling just ST_OMP_THREADPRIVATE specially would be IMHO a mistake,
what perhaps could be done is e.g. adding something like
case_decl:
  gfc_error ("%s statement can't appear after the first executable statement at
%C", gfc_ascii_statement (st));
  reject_statement ();
  break;
into parse_executable before default: return st; in there.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32365

Reply via email to