A gcc-cris bug?
Hans-Peter Nilsson
hp@bitrange.com
Fri Oct 15 07:23:00 GMT 2004
On Wed, 6 Oct 2004, Tal Agmon wrote:
> Hi,
>
> Can someone please check the following test on gcc-3.4.2, target=cris,
> using -O3?
Although the original question is mostly moot (it's not a bug
specific to the CRIS port; it repeats on most targets), but it
deserves a reply. I checked not exactly gcc-3.4.2, but the 3.4
branch as of "Sat Oct 9 18:30:21 GMT 2004" (plus up to an hour,
I guess; I rsync:ed and there were problems which I fixed
locally).
> I believe it will expose a gcc bug.
> Currently it produces a bug on the crx architecture which is not an
> official part
> of gcc, I don't have the full cris toolchain but I created the compiler
> and I see
> a similar problem gets reproduced.
I feel honored that the CRIS port is used for port benchmarking! :-)
The problem is indeed reproduced; at least in this variant of
the test, necessary to fit the test-suite framework (for the
record):
-------------------------------------
int foo=100;
int f ()
{
foo = 0;
}
extern void x (int, int) __attribute__ ((__noinline__));
extern void x (int foo, int i)
{
if (foo != 0 || i != 1)
abort ();
exit (0);
}
int main ()
{
int i;
for (i = 0; i < foo; i++)
{
f ();
}
x (foo, i);
return 1;
}
-------------------------------------
The test also fails on most other cross targets with available
simulators: v850-unknown-elf/v850-sim,
h8300-hitachi-hms/h8300-sim, m32r-unknown-elf/m32r-sim,
mn10300-unknown-elf/mn10300-sim, frv-unknown-elf/frv-sim,
arm-unknown-elf/arm-sim, mips-unknown-elf/mips-sim,
powerpc-unknown-eabisim/powerpc-sim, sh-hms-sim/sh-hms-sim.
Strangely enough, it doesn't fail for mmix-knuth-mmixware.
Maybe I should check into why...
brgds, H-P
More information about the Gcc
mailing list