This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

analysis: alpha bootstrap failure on mainline


I just thought I'd report my progress trying to track down the
recent 3.4 bootstrap failures reported on alphaev6-unknown-linux-gnu
by both Toon Moene and Brad Lucier.  I can also confirm that bootstrap
is also failing on alphaev67-dec-osf5.1, but in a slightly different
location.

It transpires that both problems are caused by failures in preprocessing
arithmetic expressions in "#if" directives.  The different headers on the
two platforms results in the same incorrect behaviour but in different
source files.

A test case is:

#define FOO  1
#define BAR  3
#if FOO+BAR == 4
good
#else
bad
#endif

run through "cc1 -E".  Digging deeper it turns out that the bug isn't
actually in the preprocessor code at all, but somewhere else in the
compiler resulting in cppexp.o being miscompiled during bootstrap.
Removing this file and rebuilding with the host compiler, allows
stage3 to complete.

Unfortunately, "gdb 5.3" doesn't work well on Tru64 (gdb core dumps
upon reaching a breakpoint), so analysing the differences between a
miscompiled cppexp and a correctly compiled one is almost impossible.
Using printf, I've managed to deduce that both "cpp_num"s getting
passed to "num_equality_op" are invalid.


Given that working like this, its going to take me a while, I was
wondering whether gdb works on alpha/Linux in which case they'd be
able to find the culprit much faster, or alternatively could someone
with an alpha start the binary search to identify the patch that
introduced the failure.

[This bug may also be responsible for the failures on other targets].

That's all for now.

Roger
--
Roger Sayle,                         E-mail: roger@eyesopen.com
OpenEye Scientific Software,         WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road,     Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507.         Fax: (+1) 505-473-0833


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]