This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/42484] ICE with -fopenmp
- From: "janus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Dec 2009 20:36:48 -0000
- Subject: [Bug fortran/42484] ICE with -fopenmp
- References: <bug-42484-16146@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from janus at gcc dot gnu dot org 2009-12-25 20:36 -------
Sorry. Of course the code is *not* valid. Section 1.2.2 of the OpenMP 3.0
specification says: "The point of exit cannot be a branch out of the structured
block."
Also, an analogous example in C is correctly rejected:
void sub ()
{
int nRead;
#pragma omp critical
if (nRead<3) return;
}
In function ?sub?:
error: invalid branch to/from an OpenMP structured block
So, I guess it is a problem of the Fortran front-end, which should detect this
situation and reject the code.
--
janus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |fortran
Keywords|ice-on-valid-code |ice-on-invalid-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42484