------- Comment #6 from gael dot guennebaud at gmail dot com 2010-06-11 14:05
-------
Created an attachment (id=20893)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20893&action=view)
A new test case preprocessed with gcc 4.3.4 for -fno-guess-branch-probability
Hi,
here is a new test case showing a very similar issue when compiling with -O2
only. To be crystal clear, when compiling this example with -O2 only, then the
program returns the error:
Test cwiseops(Matrix<float, 1, 1>()) failed in
"/home/gael/Coding/eigen2/test/cwiseop.cpp" (80)
test_ei_isApprox(m4.setConstant(s1), m3)
and valgrind report a "Use of uninitialised value of size 8".
On the other hand, when compiling with "-O2 -fno-guess-branch-probability",
then the program terminates fine, and valgrind report no error.
Since the -fguess-branch-probability optimization seems to be related to
-fprofile-arcs, I believe both examples exhibits the same bug.
I hope that helps.
Also, this example (as the previous one) works fine with gcc 3.4, 4.0.1, 4.1,
4.2, 4.4, 4.5, Intel's ICC, and various versions of MSVC.
--
gael dot guennebaud at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #19210|0 |1
is obsolete| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42255