This is the mail archive of the
mailing list for the GCC project.
Re: gcc miscompiles its sources (boehm-gc)
- To: gcc at gcc dot gnu dot org
- Subject: Re: gcc miscompiles its sources (boehm-gc)
- From: Martin Kahlert <martin dot kahlert at infineon dot com>
- Date: Thu, 18 Oct 2001 11:21:48 +0200
- References: <20011018103045.A2114@keksy.muc.infineon.com>
- Reply-To: martin dot kahlert at infineon dot com
Sorry to reply to my own message, but i finally found a small testcase
(i filed a gnats report, but i do not know whether it came through).
Here it is:
$ cat t.c
int *f(int start)
return Table.array + start;
int main(int argc, char *argv)
if ( argc == 2 )
next = f(atoi(argv));
next = f(0);
printf("next = %p, Table.array = %p, diff = %d\n",
next, Table.array, next-Table.array);
$ gcc -O -o t t.c
next = 0x8049710, Table.array = 0x8049710, diff = 2
seems to be wrong a bit.
The early bird catches the worm. If you want something else for
breakfast, get up later.