This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/32177] New: g++ crashes on some valid OpenMP code


This is with gcc version 4.3.0 20070528 (experimental) and gcc-4.1.1 (redhat
FC5 version). I suspect it is also true for all intermediate versions...
The attached program when compiled with g++ and the flags -fopenmp gives the
following diagnostic and aborts compilation:

futuna-> /usr/local/gcc-4.3/bin/g++ -fopenmp BugOMP1.C
BugOMP1.C: In function ?void f()?:
BugOMP1.C:14: internal compiler error: in lower_stmt, at gimple-low.c:282
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

There is an obvious workaround in this case: remove the A().s() call from the
loop. This is related to the destructor in class A (suppress it and the problem
disappears). The problem is that lower_stmt is presented with a
WITH_CLEANUP_EXPR node which it is not prepared to handle. I suspect that with
-fopenmp g++ does not create a valid gimple code in this case...

I tried the dubious "make lower_stmt do nothing with this code" and, of course,
something else fails afterwards.


-- 
           Summary: g++ crashes on some valid OpenMP code
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: theodore dot papadopoulo at sophia dot inria dot fr
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32177


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]