[Mono-bugs] [Bug 372483] Conversion instruction called twice for compound operator/ assignment

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Mar 19 16:13:47 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=372483

User sleibman at interactivesupercomputing.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=372483#c2





--- Comment #2 from Steve Leibman <sleibman at interactivesupercomputing.com>  2008-03-19 14:13:46 MST ---


Sure, I agree. It could be considered two separate bugs: both a compiler bug
and a runtime bug. 

If you make this distinction, the compiler bug is new in 1.9, but the runtime
bug is in both 1.9 and 1.2.6 (and likely -- though not confirmed -- earlier
releases as well).

Since the compiler bug did not exist in 1.2.6, I can only confirm this by
compiling the following code, and then manually inserting an extra
conv.ovf.i.un:

using System;
using SizeType = System.UInt64;
public class broken_cast
{
    public static void Main()
    {
      SizeType m = 1;
      SizeType i = 1;
      SizeType[] n = new SizeType[2] {7, 8};
      m = m * n[i];
    }
}

On the other hand, it isn't clear that the runtime should really have to go out
of its way to check the input type, and maybe it is okay to just ensure that
the compiler is well behaved. I'll leave that question up to you -- not sure
what the spec says.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list