This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33435] New: internal compiler error with templates and openmp
- From: "E dot Kuemmerle at fz-juelich dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Sep 2007 12:48:47 -0000
- Subject: [Bug c++/33435] New: internal compiler error with templates and openmp
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I get the error message
bug.cpp:16: internal compiler error: in create_tmp_var, at gimplify.c:487
when compiling the following code with
g++ -fopenmp -DTVMET_OPTIMIZE -c bug.cpp
where bug.cpp contains:
#include <tvmet/Vector.h> // Tiny Vector Matrix library using
Expression Templates
#include <tvmet/VectorFunctions.h> // http://tvmet.sourceforge.net/
using namespace tvmet;
int main() {
Vector<int,3> a[10];
int i;
#pragma omp parallel
{
#pragma omp for schedule(dynamic)
for (i=0; i<10; ++i) {
// do something
}
#pragma omp master
{
a[0] = a[1];
}
#pragma omp for schedule(dynamic)
for (i=0; i<10; ++i) {
// do something
}
}
}
The problem is definitely related to openmp because the following code compiles
without any error:
#include <tvmet/Vector.h> // Tiny Vector Matrix library using
Expression Templates
#include <tvmet/VectorFunctions.h> // http://tvmet.sourceforge.net/
using namespace tvmet;
int main() {
Vector<int,3> a[10];
int i;
#pragma omp parallel for schedule(dynamic)
for (i=0; i<10; ++i) {
// do something
}
a[0] = a[1];
#pragma omp parallel for schedule(dynamic)
for (i=0; i<10; ++i) {
// do something
}
}
--
Summary: internal compiler error with templates and openmp
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: E dot Kuemmerle at fz-juelich dot de
GCC build triplet: x86_64-linux-gnu
GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33435