public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/32365] New: OpenMP: Better error message for specification statement in executable section
@ 2007-06-16 8:52 burnus at gcc dot gnu dot org
2007-06-20 16:23 ` [Bug fortran/32365] " jakub at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-06-16 8:52 UTC (permalink / raw)
To: gcc-bugs
subroutine test
use omp_lib
implicit none
integer, parameter :: NT = 4
integer :: a
save
a = 1
!$omp threadprivate(a)
end subroutine test
gfortran:
Error: Unexpected !$OMP THREADPRIVATE statement at (1)
Intel:
Error: A specification statement cannot appear in the executable section.
sunf95:
ERROR: Compiler directive THREADPRIVATE must appear before the first executable
statement.
--
Summary: OpenMP: Better error message for specification statement
in executable section
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: diagnostic, openmp
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32365
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/32365] OpenMP: Better error message for specification statement in executable section
2007-06-16 8:52 [Bug fortran/32365] New: OpenMP: Better error message for specification statement in executable section burnus at gcc dot gnu dot org
@ 2007-06-20 16:23 ` jakub at gcc dot gnu dot org
2007-06-20 16:39 ` [Bug fortran/32365] " burnus at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-06-20 16:23 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/32365] Better error message for specification statement in executable section
2007-06-16 8:52 [Bug fortran/32365] New: OpenMP: Better error message for specification statement in executable section burnus at gcc dot gnu dot org
2007-06-20 16:23 ` [Bug fortran/32365] " jakub at gcc dot gnu dot org
@ 2007-06-20 16:39 ` burnus at gcc dot gnu dot org
2007-07-03 10:26 ` fxcoudert at gcc dot gnu dot org
2009-12-11 21:44 ` dfranke at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-06-20 16:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from burnus at gcc dot gnu dot org 2007-06-20 16:39 -------
> There is nothing special about ST_OMP_THREADPRIVATE here, the Fortran parser
> as whole behaves this way.
Sorry for missing that.
> 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
I wonder why this is not caught in parse.c's verify_st_order; the error message
there is much nicer:
gfc_error ("%s statement at %C cannot follow %s statement at %L",
gfc_ascii_statement (st),
gfc_ascii_statement (p->last_statement), &p->where);
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|openmp |
Summary|OpenMP: Better error message|Better error message for
|for specification statement |specification statement in
|in executable section |executable section
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32365
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/32365] Better error message for specification statement in executable section
2007-06-16 8:52 [Bug fortran/32365] New: OpenMP: Better error message for specification statement in executable section burnus at gcc dot gnu dot org
2007-06-20 16:23 ` [Bug fortran/32365] " jakub at gcc dot gnu dot org
2007-06-20 16:39 ` [Bug fortran/32365] " burnus at gcc dot gnu dot org
@ 2007-07-03 10:26 ` fxcoudert at gcc dot gnu dot org
2009-12-11 21:44 ` dfranke at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-07-03 10:26 UTC (permalink / raw)
To: gcc-bugs
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-07-03 10:26:21
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32365
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/32365] Better error message for specification statement in executable section
2007-06-16 8:52 [Bug fortran/32365] New: OpenMP: Better error message for specification statement in executable section burnus at gcc dot gnu dot org
` (2 preceding siblings ...)
2007-07-03 10:26 ` fxcoudert at gcc dot gnu dot org
@ 2009-12-11 21:44 ` dfranke at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2009-12-11 21:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from dfranke at gcc dot gnu dot org 2009-12-11 21:44 -------
(In reply to comment #2)
> I wonder why this is not caught in parse.c's verify_st_order; the error
> message there is much nicer
Because it seems that verify_st_order is not called for every accepted
statement. In the testcase of comment #1, this function is called just twice.
Not at least three times as one would expect.
--
dfranke at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dfranke at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32365
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-12-11 21:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-16 8:52 [Bug fortran/32365] New: OpenMP: Better error message for specification statement in executable section burnus at gcc dot gnu dot org
2007-06-20 16:23 ` [Bug fortran/32365] " jakub at gcc dot gnu dot org
2007-06-20 16:39 ` [Bug fortran/32365] " burnus at gcc dot gnu dot org
2007-07-03 10:26 ` fxcoudert at gcc dot gnu dot org
2009-12-11 21:44 ` dfranke at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).