The following invalid code snippet triggers an ICE since GCC 4.2.0:
=================================================================
char x[] = 0;
#pragma omp threadprivate (x)
=================================================================
bug.cc:1: error: initializer fails to determine size of 'x'
bug.cc:2: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in finish_omp_threadprivate, at cp/semantics.c:3749
Please submit a full bug report, [etc.]
--
Summary: [4.3 regression] ICE with broken variable in #pragma omp
threadprivate
Product: gcc
Version: 4.3.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=34964