This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/71974] New: Warning: uninitialized variable with OpenMP nested loops
- From: "register at rgug dot ch" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 22 Jul 2016 17:25:13 +0000
- Subject: [Bug c++/71974] New: Warning: uninitialized variable with OpenMP nested loops
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71974
Bug ID: 71974
Summary: Warning: uninitialized variable with OpenMP nested
loops
Product: gcc
Version: 4.8.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: register at rgug dot ch
Target Milestone: ---
I used the collapse clause of OpenMP to work with a doubly nested loop as
follows:
unsigned int iMax(10);
#pragma omp parallel for schedule(dynamic,1) shared(iMax) private(i, j)
collapse(2)
for( i = 1; i < 4; i++ )
{
for( j = 0; j <= iMax - i; j++ )
{
}
}
The above code, which seems to work, create the following warning:
warning: ‘i’ is used uninitialized in this function [-Wuninitialized]
Is it normal?