[Dune] gcc 4.4 problem
Oliver Sander
sander at mi.fu-berlin.de
Mon Nov 30 16:20:28 CET 2009
I can.
sander at haile:~/dune/dune-grid/dune/grid/test$ g++-4.4 --version
g++-4.4 (Debian 4.4.2-3) 4.4.2
make test-ug
[...]
../../../dune/grid/uggrid/uggridentity.hh:52: warning: dereferencing
pointer â<anonymous>â does break strict-aliasing rules
../../../dune/grid/uggrid/uggridindexsets.hh:281: note: initialized from
here
[repeat ad nauseam]
--
Oliver
Carsten Gräser schrieb:
> Dear all,
> the problem does not occur if I compile with '-O3 -fno-strict-aliasing.'
> Adding '-Wstrict-aliasing' shows many warnings that the strict aliasing
> rule is broken. Most of them in the EntityPointer base class.
>
> While trying to reduce the problem I found out that my gcc-4.4.1 even
> complains about this for test-ug and test-alu2dsimplex in dune-grid
> with '-O3 -Wstrict-aliasing'. The same holds true for -O3 -Wall.
>
> Can anyone reproduce this ?
>
> Regards
> Carsten
>
> Carsten Gräser schrieb:
>
>> 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
>>
>>
>
>
>
--
************************************************************************
* Oliver Sander ** email: sander at mi.fu-berlin.de *
* Freie Universität Berlin ** phone: + 49 (30) 838 75348 *
* Institut für Mathematik ** URL : page.mi.fu-berlin.de/~sander *
* Arnimallee 6 ** -------------------------------------*
* 14195 Berlin, Germany ** Member of MATHEON (www.matheon.de) *
************************************************************************
More information about the Dune
mailing list