[Mono-bugs] [Bug 40856][Nor] New - mini bug with deadce and method calls

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Mon, 7 Apr 2003 06:51:42 -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 lupus@ximian.com.

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

--- shadow/40856	Mon Apr  7 06:51:42 2003
+++ shadow/40856.tmp.3490	Mon Apr  7 06:51:42 2003
@@ -0,0 +1,41 @@
+Bug#: 40856
+Product: Mono/Runtime
+Version: unspecified
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: lupus@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mini bug with deadce and method calls
+
+The following test is compiled wrong with mini when the deadce optimization
+is enabled:
+class testObject {
+  public virtual int dothis(int iter) {
+    return iter;
+  }
+    public static void object_test(int INDEX) {
+      int y;
+      testObject obj = new testObject();
+
+      for (int x=0;x<INDEX;x++) {
+         y = obj.dothis(10);
+      }
+    }
+
+    static void Main () {
+	    object_test (5000000);
+    }
+}
+
+Inside the loop the call and the assignment to y is removed, but a push of
+the argument of the function is left and if the number of iterations is
+large, you get a stack overflow.