A gcc-cris bug?
Tal Agmon
Tal.Agmon@nsc.com
Wed Oct 6 11:37:00 GMT 2004
Hi,
Can someone please check the following test on gcc-3.4.2, target=cris,
using -O3?
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.
The source code is:
------------------------------------------------------
#include <stdio.h>
int foo=100;
int f ()
{
foo = 0;
}
void main ()
{
int i;
for (i = 0; i < foo; i++)
{
f ();
}
printf("foo is: %d, i is: %d\n",foo,i);
}
------------------------------------------------------
The output should be:
foo is: 0, i is: 0
Regards,
Tal Agmon
Software Engineer phone: +49-8141-35-1396
CompactRISC Development Tools fax: fax: +49-8141-35-11-1396
National Semiconductor GmbH mailto:Tal.Agmon@nsc.com
Livry-Gargan Str. 10 internet:
http://www.national.com
82256 Fuerstenfeldbruck, Germany
More information about the Gcc
mailing list