The following invalid code snippet causes an ICE when compiled with -fopenmp:
=================================== struct A #pragma omp parallel { template<int> void foo(); }; template void A::foo<0>(); =================================== bug.cc:2: error: '#pragma' is not allowed here bug.cc:7: error: invalid use of incomplete type 'struct A' bug.cc:1: error: forward declaration of 'struct A' bug.cc:7: internal compiler error: tree check: expected tree that contains 'decl common' structure, have 'error_mark' in do_decl_instantiation, at cp/pt.c:11209 Please submit a full bug report, [etc.] -- Summary: ICE with ill-placed #pragma omp parallel Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code, error-recovery, monitored, openmp Severity: normal Priority: P3 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=27315