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 middle-end/58257] New: [4.8/4.9 Regression] Bogus warning with OpenMP collapsed loops


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

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