http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58257
Bug ID: 58257
Summary: [4.8/4.9 Regression] Bogus warning with OpenMP
collapsed loops
Product: gcc
Version: 4.8.1
Status: UNCONFIRMED
Keywords: openmp
Severity: normal
Priority: P3
Component: middle-end
Assignee: jakub at gcc dot gnu.org
Reporter: jakub at gcc dot gnu.org
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -Wall" } */
int
foo (int n)
{
int a[10][10];
int x, y;
#pragma omp parallel for collapse(2)
for (x = 0; x < n; x++)/* { dg-bogus "may be used uninitialized in this
function" } */
for (y = 0; y < n; y++)
a[x][y] = x + y * y;
return a[0][0];
}
yields:
rh999674.c: In function ‘<built-in>’:
rh999674.c:10:3: warning: ‘.count.6’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
rh999674.c:10:3: note: ‘.count.6’ was declared here
rh999674.c:10:3: warning: ‘.count.7’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
rh999674.c:10:3: note: ‘.count.7’ was declared here