$ cat /tmp/bug.c
#include <stdio.h>

int main() {
   unsigned long a;
   unsigned long *p;
   p = (unsigned long *)&p;
   a = ++(*p);
   if (a-1 != (unsigned long)&p)
     printf("Bug!\n");
   return 0;
}
$ gcc -W -Wall /tmp/bug.c
$ a.out
$ cilly /tmp/bug.c
gcc -D_GNUCC -E -DCIL=1 /tmp/bug.c -o /tmp/cil-p36K_9aZ.i
/usr/local/distrib/cil/obj/x86_LINUX/cilly.asm.exe --out 
/tmp/cil-o_yr5NAo.cil.c /tmp/cil-p36K_9aZ.i
gcc -D_GNUCC -E /tmp/cil-o_yr5NAo.cil.c -o /tmp/cil-0IXXNK2N.cil.i
gcc -D_GNUCC -c -o /tmp/cil-oV7HSipE.o /tmp/cil-0IXXNK2N.cil.i
gcc -D_GNUCC -o a.out /tmp/cil-oV7HSipE.o
$ a.out
Bug!
$

-- 
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagn...@cs.unipr.it

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users

Reply via email to