This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/37533] New: ICE with parallel for loop
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Sep 2008 21:51:23 -0000
- Subject: [Bug c++/37533] New: ICE with parallel for loop
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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