[Mono-bugs] [Bug 76084][Maj] Changed - GMCS producing broken
executable
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed Sep 14 13:05:07 EDT 2005
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by kiess at h3c.de.
http://bugzilla.ximian.com/show_bug.cgi?id=76084
--- shadow/76084 2005-09-13 10:06:41.000000000 -0400
+++ shadow/76084.tmp.29147 2005-09-14 13:05:07.000000000 -0400
@@ -38,6 +38,63 @@
Additional Information:
------- Additional Comments From rook at roo.k.pl 2005-09-13 10:05 -------
Created an attachment (id=15733)
Test case
+
+------- Additional Comments From kiess at h3c.de 2005-09-14 13:05 -------
+A shorter testcase:
+
+public interface SomeInterface
+{
+ bool Valid { get; }
+}
+
+public struct SomeStruct : SomeInterface
+{
+ public bool Valid {
+ get {
+ return false;
+ }
+ }
+}
+
+public class Test
+{
+ public static void Fun<T>(T t) where T:SomeInterface {
+ bool a = t.Valid;
+ }
+
+ static void Main()
+ {
+ Fun(new SomeStruct());
+ }
+}
+
+
+The program compiles fine.
+When running on mono 1.1.19 it fails with "Trace/breakpoint trap".
+When running on mono svn head, it fails with:
+** ERROR **: Invalid IL code at IL0001 in Test:Fun (SomeStruct):
+IL_0001: callvirt 0x06000001
+
+
+aborting...
+
+However the assembly seems to be ok:
+ // method line 4
+ .method public static hidebysig
+ default void Fun<(class SomeInterface) T> (!!T t) cil managed
+ {
+ // Method begins at RVA 0x20f8
+ // Code size 8 (0x8)
+ .maxstack 2
+ .locals init (
+ bool V_0)
+ IL_0000: ldarg.0
+ IL_0001: callvirt instance bool class SomeInterface::get_Valid()
+ IL_0006: stloc.0
+ IL_0007: ret
+ } // end of method Test::default void Fun<(class SomeInterface) T>
+(!!T t)
+
More information about the mono-bugs
mailing list