On Saturday 12 May 2007 8:47 pm, Daniel Glöckner wrote:
> On Sat, May 12, 2007 at 06:46:55PM -0400, Rob Landley wrote:
> > I added it to http://landley.net/code/tinycc/bugs and may take a stab at
> > tracking it down over the weekend if somebody doesn't beat me to it. :)
>
> You are collecting bugs?
>
> Here is a short one:
>
> On Mon, Apr 11, 2005 at 12:29:11AM +0200, Daniel Glöckner wrote:
> > int f(int *x)
> > {
> > asm("xorl %0,%0":"=r"(*x));
> > }
I'm collecting short programs that _demonstrate_ a bug, either via a build
break or via output when you run 'em that differs from gcc.
I'd also like to collect fixes, eventually. :)
Perhaps this, maybe?
#include <stdio.h>
int f(int *x)
{
asm("xorl %0,%0":"=r"(*x));
return *x;
}
int main(int argc, char *argv[])
{
int a;
printf("%d\n",f(&a));
return 0;
}
Rob
_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel