The following testcase causes an ICE (segfault in build_new_method_call from cp/call.c) when compiled with -fopenmp:
========================= template<int> struct A #pragma omp parallel ; template<int> struct A { int foo(); }; int i = A<0>().foo(); ========================= The segfault happens in retrieve_specialization from cp/pt.c with a slightly modified testcase: ========================= template<int> struct A #pragma omp parallel ; template<int> struct A { static int foo(); }; int i = A<0>::foo(); ========================= Maybe related to PR 27315. -- Summary: ICE with misplaced #pragma omp parallel Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code, 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=27329