On Friday, September 02, 2011 12:54:54 Benjamin Monate wrote:
> Could you provide a small test case to reproduce the issue you have
> fixed?
Sure. Here it is (also, attached):
union X {
int a;
short b;
};
int main()
{
union X u,v;
v = (union X) u;
}
The error message was:
$ bin/cilly test.c
gcc -D_GNUCC -E -DCIL=1 test.c -o /tmp/cil-sBa8xbE3.i
/home/pavel/work/ldv/ldv-tools/dscv/rcv/cil/obj/x86_LINUX/cilly.asm.exe
--out /tmp/cil-qlaJgfXv.cil.c /tmp/cil-sBa8xbE3.i
test.c:9: Error: Cannot find matching union field in cast
test.c:9: Warning: Body of function main falls-through. Adding a return
statement
Error: Cabs2cil had some errors
Fatal error: exception Errormsg.Error
After the patch, the error is gone, and the generated code contains the
original assignment.
--
Pavel Shved
ISPRAS
(Instutute for System Programming
of Russian Academy of Sciences)
Operating Systems section
email: sh...@ispras.ru
union X {
int a;
short b;
};
int main()
{
union X u,v;
v = (union X) u;
}
------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users