Please, try the small example attached. You will see in action the issues related to strict aliasing with current PETSc state. The example is perhpas a bit artificial, but you know, bad things can always happen, and worse if that happens with optimization, as it is much hard to debug.
- Use a optimized build for $PETSC_ARCH with a recent GCC (I used 4.1.1 in my Fedora 6 box) - First, build the example disabling strict aliasing. Run it, and you will get the expected output. $ make SA_FLAG=-fno-strict-aliasing $ main v->refct: 1 - Next, build the example enabling strict aliasing. Run it, and you will get unexpected output $ make SA_FLAG=-fstrict-aliasing $ main v->refct: 11 I realy thing we have to take this seriously. That the reason I'm trying to solve this at home. I'm near to finishing it. After that, I would ask you to create a clone in your server, in order to push it and you test it. -- Lisandro Dalc?n --------------- Centro Internacional de M?todos Computacionales en Ingenier?a (CIMEC) Instituto de Desarrollo Tecnol?gico para la Industria Qu?mica (INTEC) Consejo Nacional de Investigaciones Cient?ficas y T?cnicas (CONICET) PTLC - G?emes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594
