[eigen] Bug in Mercury version ?

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


I've tried the following test case with today's Mercury version of Eigen
(taken from the documentation, except braces around 1,2,3,4 are missing
 in the documentation.)

#include <iostream>
#include <Eigen/Core>
// import most common Eigen types 

// first column of mat2x2 contains garbage if the following line is commented out
//#define THIS_WORKS
int main() {
  int data[4] = {1, 2, 3, 4};
    std::cout << data[0] << '|' << data[1] << '|' 
              << data[2] << '|' << data[3] << std::endl;
  Matrix2i mat2x2(data);
  std::cout << mat2x2 << std::endl;

If THIS_WORKS is undefined, I get an output where the first column
of mat2x2 contains garbage.

Am I missing something?

(I'm using gcc-4.3.3 on a Gentoo Linux AMD64 machine)
compiler options:
-O3 -mtune=native -msse2 

Compiling without these options gives a running binary.
Is this an Eigen or a g++ bug?

(The same problem occurs with gcc-4.4.0)

Thanks for any hints,

Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany

Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/