The warning for the following testcase contains a wrong line number
on mainline (compile with "-fopenmp -O -Wall"):

================================
int i;

void foo()
{
#pragma omp parallel
  {
    int j;
    i = j;
  }
}
================================

bug.c: In function 'foo.omp_fn.0':
bug.c:8: warning: 'j' is used uninitialized in this function
bug.c:8: note: 'j' was declared here

The variable 'j' is in fact declared in line 7, and not 8.

The regression appeared between 2007-08-15 and 2007-09-14.
The bug is triggered with the C and C++ frontend.


-- 
           Summary: [4.3 regression] Wrong line number for uninitialized
                    variable
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          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=34694

Reply via email to