This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgomp/59983] By using -fopenmp local-variable contains wrong value
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 29 Jan 2014 13:51:21 +0000
- Subject: [Bug libgomp/59983] By using -fopenmp local-variable contains wrong value
- Auto-submitted: auto-generated
- References: <bug-59983-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59983
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This is just wrong testcase. Without lastprivate(i) clause the original value
of i after the parallel is undefined.
See e.g. OpenMP 3.1, in 2.5.1, page 40:
"Unless the variable is specified lastprivate on the loop construct, its value
after the loop is unspecified."
Same wording in OpenMP 4.0, in 2.6, page 51.