[Bug c++/37533] New: ICE with parallel for loop
reichelt at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Sep 15 21:52:00 GMT 2008
The following code snippet triggers an ICE since GCC 4.2.0 when compiled
with "-O2 -fopenmp":
======================================
template<int> void foo()
{
#pragma omp parallel for
for (int i=""; i<4; ++i) ;
}
void bar()
{
foo<0>();
}
======================================
bug.cc: In function 'void _Z3fooILi0EEvv.omp_fn.0(void*)':
bug.cc:4: internal compiler error: in fold_convert, at fold-const.c:2528
Please submit a full bug report, [etc.]
Without "-fopenmp" the code is rejected:
bug.cc: In function 'void foo() [with int <anonymous> = 0]':
bug.cc:9: instantiated from here
bug.cc:4: error: invalid conversion from 'const char*' to 'int'
--
Summary: ICE with parallel for loop
Product: gcc
Version: 4.4.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=37533
More information about the Gcc-bugs
mailing list