[Mono-bugs] [Bug 48063][Nor] New - msc miscompiles array of value type initializer

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 31 Aug 2003 13:24:39 -0400 (EDT)


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 vargaz@freemail.hu.

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

--- shadow/48063	2003-08-31 13:24:39.000000000 -0400
+++ shadow/48063.tmp.16936	2003-08-31 13:24:39.000000000 -0400
@@ -0,0 +1,49 @@
+Bug#: 48063
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: vargaz@freemail.hu               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: msc miscompiles array of value type initializer
+
+mcs miscompiles the constructor in the following code:
+
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+using System;
+using System.Runtime.CompilerServices;
+
+public enum PropertyTabScope {
+                Static,
+                Global,
+                Document,
+                Component
+        }
+
+public class PropertyTabAttribute
+{
+        public PropertyTabAttribute (PropertyTabScope tabScope)
+                {
+                        PropertyTabScope[] scopeArray = {tabScope};
+                }
+
+        public static void Main (String[] args) {
+                new PropertyTabAttribute (PropertyTabScope.Static);
+        }
+}
+
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+This code is from System.ComponentModel.PropertyTabAttribute.
+
+When running this with mono, it aborts with an Invalid IL code .. error.
+PEVerify.exe also reports the code as invalid.