This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49575] OpenMP has a problem with -funroll-loops
- From: "sailorweb2 at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 29 Jun 2011 19:38:30 +0000
- Subject: [Bug c++/49575] OpenMP has a problem with -funroll-loops
- Auto-submitted: auto-generated
- References: <bug-49575-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49575
--- Comment #2 from Duncan <sailorweb2 at hotmail dot com> 2011-06-29 19:38:00 UTC ---
I am new to OpenMP so I do not know the details, but as far as I know, variable
k is defined as firstprivate, so each thread will have an independent local
copy. Why does it need defining constant or declaring it in the body of the
parallel region even though it is defined firstprivate? Won't firstprivate
automatically define a local copy of k in the body of the parallel region?