[Mono-dev] mcs bug
Marek Safar
marek.safar at seznam.cz
Sun Aug 6 06:09:39 EDT 2006
Hello Jeroen,
Yes, it is mcs/gmcs bug. Please, fill a bug report on bugzilla.ximian.com
Thanks,
Marek
> I ran into a bug in mcs. The program below obviously should print 42,
> but it prints 0, because mcs reuses loc.0 for two different things
> within the same expression.
>
> Regards,
> Jeroen
>
> using System;
>
> class Repro
> {
> private int[] stack = new int[1];
> private int cc;
> public int fc;
> private int sp;
>
> public static void Main()
> {
> Repro r = new Repro();
> r.foo();
> Console.WriteLine(r.stack[0]);
> }
>
> public void foo()
> {
> fc = cc = bar();
> fc = stack[sp++] = cc;
> }
>
> private int bar()
> {
> return 42;
> }
> }
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
More information about the Mono-devel-list
mailing list