This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32365] OpenMP: Better error message for specification statement in executable section
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Jun 2007 16:23:45 -0000
- Subject: [Bug fortran/32365] OpenMP: Better error message for specification statement in executable section
- References: <bug-32365-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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