[Mono-dev] mcs bug

Gert Driesen gert.driesen at telenet.be
Mon Aug 7 11:18:16 EDT 2006



> -----Original Message-----
> From: mono-devel-list-bounces at lists.ximian.com [mailto:mono-devel-list-
> bounces at lists.ximian.com] On Behalf Of Jeroen Frijters
> Sent: zondag 6 augustus 2006 12:55
> To: Marek Safar
> Cc: mono-devel-list at lists.ximian.com
> Subject: Re: [Mono-dev] mcs bug
> 
> Hi Marek,
> 
> I spent quite a bit of time crafting a small repro, which I don't mind
> doing, but I'm not about to waste my time wrestling with bugzilla.

Filed as bug #79026:

http://bugzilla.ximian.com/show_bug.cgi?id=79026

Gert

> > -----Original Message-----
> > From: Marek Safar [mailto:marek.safar at seznam.cz]
> > Sent: Sunday, August 06, 2006 12:10
> > To: Jeroen Frijters
> > Cc: mono-devel-list at lists.ximian.com
> > Subject: Re: [Mono-dev] mcs bug
> >
> > 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
> > >
> > >
> >
> >
> _______________________________________________
> 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