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 c/30421] New: incorrect warning when using firstprivate and lastprivate clauses


Compiling the following code with "gcc -fopenmp -Wuninitialized -O",
I get a warning:  'i' may be used uninitialized in this function
--
int main() {
        int a = 0;
        int i;

#pragma omp parallel for firstprivate(a) lastprivate(a)
        for(i = 0; i < 10; i++) {
                a += i;
        }

        return a;
}


-- 
           Summary: incorrect warning when using firstprivate and
                    lastprivate clauses
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kuba at et dot pl


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


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