[Bug middle-end/24612] New: [gomp] Bogus "is used uninitialized" warning

reichelt at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Nov 1 11:04:00 GMT 2005


Compiling the following code with "-fopenmp -O -Wall" yields a bogus warning
(happens with C and C++):

======================================
void foo()
{
    int i;
#pragma omp threadprivate(i)

#pragma omp parallel sections
    {
#pragma omp section
        {
            i = 0;
            ++i;
        }
    }
}
======================================

bug.c: In function 'foo':
bug.c:11: warning: 'i' is used uninitialized in this function


-- 
           Summary: [gomp] Bogus "is used uninitialized" warning
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: diagnostic, openmp
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24612



More information about the Gcc-bugs mailing list