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/24612] New: [gomp] Bogus "is used uninitialized" warning


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


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