Andrea Arcangeli wrote:
> Here what I get with gcc-2.8.1:
>
> andrea@dragon:~$ gcc -O2 -ffloat-store p.c
As I said, it only works so long as you don't enable optimisation.
> Your same program with egcc_2.90.28 output 24 as with gcc-2.7.2. This is
> sure a bug of gcc-2.8.1.
With no optimisation, I get 24 on all of 2.7.2.3, 2.8.0, 2.8.1, either
with or without -ffloat-store.
With optimisation but without -ffloat-store, I get 64 on all three.
With both optimisation and -ffloat-store, I get 24 on 2.7.2.3 and 64
on 2.8.*.
So, this seems to support the hypothesis that -ffloat-store is broken
on 2.8.*.
Unfortunately, it's not that uncommon for things to break when
optimisation is enabled.
Compilers which are still reliable when optimising are a fairly recent
phenomenon. It used to be taken for granted that the price of enabling
optimisation was a substantial increase in the probability that the
compiler would generate bad code.
--
Glynn Clements <[EMAIL PROTECTED]>