http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51024
Bug #: 51024
Summary: OpenMP: ICE with type(c_ptr) in private()
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, openmp
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: [email protected]
ReportedBy: [email protected]
Reported at
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/5513dcf7bb4b9abc
The following program segfaults at
omp_add_variable (flags=10, decl=<optimized out>, ctx=<optimized out>) at
gcc/gimplify.c:5544
5544 if (TREE_CODE (t) != INTEGER_CST)
The dump looks OK:
test ()
{
void * alloc_fftinout;
#pragma omp parallel default(none) private(alloc_fftinout)
{
{
(void) 0;
}
}
}
Test case - compiled with "-fopenmp":
program test
use, intrinsic :: iso_c_binding
implicit none
type(C_PTR) :: alloc_fftinout
!$OMP PARALLEL default(none) &
!$OMP& private(alloc_fftinout)
!$OMP END PARALLEL
end program