Skip to content

#138 g++-4.0 and g++-4.1 get an ice when compiling dune with optimizatio

Metadata

Property Value
Reported by Markus Blatt (markus@dr-blatt.de)
Reported at Jul 5, 2006 17:45
Type Bug Report
Version Git (pre2.4) [autotools]
Operating System Unspecified / All
Last edited by Oliver Sander (oliver.sander@tu-dresden.de)
Last edited at Jan 8, 2007 08:01
Closed by Oliver Sander (oliver.sander@tu-dresden.de)
Closed at Jan 8, 2007 08:03
Closed in version Unknown
Resolution Deferred
Comment

Description

Due too a bug (submitted by olliver bows) in g++4.0 and 4.1 (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27826 ) dune-dd cannot be compiled with optimization. As the compiler crashes with an ICE:

In member function 'int Dune::SingleTypeSizeCache::countLeafEntities() const [with int codim = 1, GridImp = Dune::ALU3dGrid<3, 3, tetra>]': /home/mblatt/dune/dune-autobuild/build/dune-grid/dune/grid/common/sizecache.hh:183: internal compiler error: in copy_to_mode_reg, at explow.c:577 Please submit a full bug report, with preprocessed source if appropriate. See URL:http://gcc.gnu.org/bugs.html for instructions. For Debian GNU/Linux specific bug reporting instructions, see URL:file:///usr/share/doc/gcc-4.1/README.Bugs. Preprocessed source stored into /tmp/ccy8lawD.out file, please attach this to your bugreport.

The guys from gcc say that this a problem in bitfield comparison: In GeometryType there is a bitfield "BasicType basicType_:16 such that the class only 4 bytes big. Unfortunately g++ crashes when comparing the basicTypes.

Currently I see no way around this bug without sacrificing 4 bytes of space (by using the BasicType enum instead of a bitfield).

This bug should be fixed in version 4.2, therefore I would suppose to leave the code as is and issue an error or a warning in the autoconf test when g++-4.0 or g++-4.1 is used to compile dune.

Cooked down example attached. the problem ist operator== where the bitfields get compared!

Attachments