This is with gcc version 4.3.0 20070416 (experimental). The attached program when compiled with g++ and the flags -fopenmp gives the following diagnostic and aborts compilation:
-> /usr/local/gcc-4.3/bin/g++ -fopenmp BugOMP.C BugOMP.C: In constructor R<M>::R(): BugOMP.C:18: error: invalid use of incomplete type struct R<M>::R()::B BugOMP.C:9: error: declaration of struct R<M>::R()::B But I do not see why R<M>::B would be an incomplete type in this program (some bad interaction with the template system ?). -- Summary: g++ does not accept some OpenMP code Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: theodore dot papadopoulo at sophia dot inria dot fr GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31598