This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: A gcc-cris bug?
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Tal Agmon <tal dot agmon at nsc dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 6 Oct 2004 13:05:21 +0200
- Subject: Re: A gcc-cris bug?
- References: <OFD0D8FF9B.79CBA202-ONC1256F25.0034722E-C1256F25.00388B12@nsc.com>
- Reply-to: Richard Guenther <richard dot guenther at gmail dot com>
On Wed, 6 Oct 2004 12:15:27 +0200, Tal Agmon <tal.agmon@nsc.com> wrote:
> 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
no, it clearly should be
foo is: 0, i is: 1
Richard.