[Dune] gcc 4.4 problem

Carsten Gräser graeser at math.fu-berlin.de
Mon Nov 16 10:29:09 CET 2009


Dear all,
since using gcc 4.4.1 I have a strange problem with UGGrid.
For 2 intersection iterators faceA and faceB the following
conditional (checking if the normals are not parallel) always
evaluates to true even if the product is 1.

if (faceA->unitOuterNormal(FieldVector<ctype,dim-1>(0)) *
    faceB->unitOuterNormal(FieldVector<ctype,dim-1>(0)) < 0.95)

The strange thing is that this only happens with '-O3 -funroll-loops'.
Even more strange: If I sent the computed value (or bool) to std::cout
before or after the condition everything works correctly.

With gcc-4.3 or using ALUGrid there are no problems.

Seems to my like a compiler bug. However it is nearly impossible
to extract a test case. Did anyone of you have similar problems ?

Regards
Carsten

-- 
----------------------------------------------------------------------
Carsten Gräser           | phone: +49-30 / 838-75349
Freie Universität Berlin | fax  : +49-30 / 838-54977
Institut für Mathematik  | email: graeser at math.fu-berlin.de
Arnimallee 6             |
14195 Berlin, Germany    | URL  : http://page.mi.fu-berlin.de/graeser
----------------------------------------------------------------------




More information about the Dune mailing list