The following valid code snippet is rejected when compiled with -fopenmp: ============================================= template<int> void foo() { #pragma omp for for (int i=0; i<10; i++) ;
#pragma omp for for (int i=0; i<10; i++) ; } void bar() { foo<0>(); } ============================================= bug.cc: In function 'void foo() [with int <anonymous> = 0]': bug.cc:12: instantiated from here bug.cc:7: error: redeclaration of 'int i' bug.cc:4: error: 'int i' previously declared here -- Summary: [gomp] Bogus error message about redeclared variables Product: gcc Version: unknown Status: UNCONFIRMED Keywords: rejects-valid, openmp Severity: normal Priority: P2 Component: c++ 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=24512