Hi again,

I see this bug is not yet closed. Very well.

While the original problem had disappeared in late gcc4.1
series and not come back, the “-fwhole-program --combine”
option combination is broken in early gcc4.4 series again.
Luckily, the mksh-38.1-1 in the sid archive did not yet
suffer from it (probably because it seems to have been
built with gcc4.3), but the problem appeared in Ubuntu.

https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/352475

The interesting thing is that it’s very hard to get a reduced
testcase, but I did manage to reproduce it with preprocessed
versions of the original source and much less CFLAGS (-O2 seems
to be instrumental, -std=gnu99 is sometimes needed to exhibit
the problem too).

@doko: maybe one should suggest to the gcc developers that
they run “sh /path/to/mksh/Build.sh -r -combine” every once
in a while to check if similar bugs pop up again?

FWIW, the gcc-snapshot packages in both Debian sid and Ubuntu
are free of that bug, but I think they’re from what will become
gcc4.5 and I don't know about gcc 4.4.1.

Right while writing this, it comes to my attention that gcc4.4
on Fedora 11 seems to pass compiling mksh with -combine too.
│gcc-Version 4.4.0 20090427 (Red Hat 4.4.0-3) (GCC)
I don’t know how much patched that one is.

Maybe someone will pick this up? While I do not use gcc4 on
MirBSD, I think whole-programme optimisations are interesting
and GNU/Linux users may benefit from it. (I also do appreciate
the testing with a *lot* of compilers – if the bugs I discover
in the compilers are fixed then ☺)


bye,
//mirabilos
-- 
In traditional syntax ' is ignored, but in c99 everything between two ' is
handled as character constant.  Therefore you cannot use ' in a preproces-
sing file in c99 mode.  -- Ragge
No faith left in ISO C99, undefined behaviour, and C compiler authors.



--
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to