public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/33435]  New: internal compiler error with templates and openmp
@ 2007-09-14 12:48 E dot Kuemmerle at fz-juelich dot de
  2007-09-18 19:16 ` [Bug c++/33435] " bangerth at dealii dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: E dot Kuemmerle at fz-juelich dot de @ 2007-09-14 12:48 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-06-18  7:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-14 12:48 [Bug c++/33435] New: internal compiler error with templates and openmp E dot Kuemmerle at fz-juelich dot de
2007-09-18 19:16 ` [Bug c++/33435] " bangerth at dealii dot org
2007-09-19  9:40 ` E dot Kuemmerle at fz-juelich dot de
2007-09-23 17:21 ` bangerth at dealii dot org
2008-03-12 14:46 ` E dot Kuemmerle at fz-juelich dot de
2008-06-16 15:04 ` bangerth at dealii dot org
2008-06-17 14:07 ` E dot Kuemmerle at fz-juelich dot de
2008-06-18  7:21 ` E dot Kuemmerle at fz-juelich dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).