[Mono-bugs] [Bug 26469][Wis] New - Invalid code generated with pass-by-ref enums

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
19 Jun 2002 11:40:20 -0000


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 lupus@ximian.com.

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

--- shadow/26469	Wed Jun 19 07:40:20 2002
+++ shadow/26469.tmp.15633	Wed Jun 19 07:40:20 2002
@@ -0,0 +1,32 @@
+Bug#: 26469
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: lupus@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Invalid code generated with pass-by-ref enums
+
+The following program extracted from the regex code:
+class T {
+        enum OpCode : ushort { False }
+        enum OpFlags : ushort { None }
+        static void DecodeOp (ushort word, out OpCode op, out OpFlags flags) {
+                op = (OpCode)(word & 0x00ff);
+                flags = (OpFlags)(word & 0xff00);
+        }
+        static void Main() {
+        }
+}
+generates invalid code with both the ms and mono runtime.
+mcs uses stobj with some invalid type or something like that instead of
+using simply stind.u2.