Re: [eigen] Problem with g++-4.4 -O2 and Eigen3 |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Subject: Re: [eigen] Problem with g++-4.4 -O2 and Eigen3
- From: hauke strasdat <strasdat@xxxxxxxxx>
- Date: Thu, 7 Apr 2011 17:52:41 +0100
- Cc: eigen@xxxxxxxxxxxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=jrp/BGWiDRVdjs9eRVJ7apX5V3Uh8MuTeWU76VlouSU=; b=TGKrZC6QNw4xmVjczrUEUqRXVFldEhRrc0n6JH0+Eyqk5jNSMlc3w/ORoImSCsqjzA 3/wIiZIr7DpDSL5r6Bw7hdJP0Vt6Qw8Z6EzAvDn94w5JbwizeAhueX/DgiyuzN6vdAbt rzZSFh8YkYIdh/+snoBkLUO9LgtIPHuhwwo4Q=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=mGlDCCjTfShmJnuDhMoqcVkaQ/Ip3UmgmqvXv6IAZLvWo25LXbDl1F88AAjsnRao2f NfPlUpKmoJZHo3ruGZRe8UmR8Gp7UaeccLiFzyBRrbQs/8pM0Sw25yAQBeg1mU6j8FoF ukwalov4nf/LgUxhtGjM9VFC5Of78E/irK+kg=
Hi Gael,
> (reverse foo.cpp and main.cpp). The effect is to change the order of
> the .o files at linking stage, and here that does the trick.
Thanks, and yes I can confirm it. Changing the order of linking
prevents the bug in the minimal test case.
However, this does not tell us yet, how we could prevent this kind of
bug in general in a larger project.
My conclusion for now is, that using *.lu().inverse() & friends with
g++-4.4 and O2/O3 is not safe.
Any further comments on this would be very much appreciated.
Btw., another way to prevent the bug is to add
"std::cerr << X << std::endl;" right after "X.lu().inverse();".
Very strange...
Hauke S.