[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Isolated bug
From: |
Rob Landley |
Subject: |
Re: [Tinycc-devel] Isolated bug |
Date: |
Mon, 14 May 2007 01:04:39 -0400 |
User-agent: |
KMail/1.9.1 |
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