This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/30421] New: incorrect warning when using firstprivate and lastprivate clauses
- From: "kuba at et dot pl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Jan 2007 02:42:54 -0000
- Subject: [Bug c/30421] New: incorrect warning when using firstprivate and lastprivate clauses
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Compiling the following code with "gcc -fopenmp -Wuninitialized -O",
I get a warning: 'i' may be used uninitialized in this function
--
int main() {
int a = 0;
int i;
#pragma omp parallel for firstprivate(a) lastprivate(a)
for(i = 0; i < 10; i++) {
a += i;
}
return a;
}
--
Summary: incorrect warning when using firstprivate and
lastprivate clauses
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kuba at et dot pl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30421