This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libgomp/59983] By using -fopenmp local-variable contains wrong value


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]