[Mono-bugs] [Bug 60669][Wis] Changed - stackalloc with non-const argument causes exception

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 23 Jun 2004 19:50:30 -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 bmaurer@users.sf.net.

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

--- shadow/60669	2004-06-23 18:37:12.000000000 -0400
+++ shadow/60669.tmp.19555	2004-06-23 19:50:30.000000000 -0400
@@ -1,23 +1,23 @@
 Bug#: 60669
 Product: Mono: Compilers
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Wishlist
 Component: C#
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: jackson@ximian.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
-Summary: regression, mcs can no longer build Mono.PEToolkit
+Summary: stackalloc with non-const argument causes exception
 
 As of today I can't build Mono.PEToolkit anymore. To test just cd
 mcs/class/Mono.PEToolkit and run make. petoolkit is not part of the default
 build but I imagine this is a serious bug as its not just an extraneous
 error, mcs throws an exception. I Built petoolkit successfully last week.
 Attached is a stack trace.
@@ -39,6 +39,15 @@
         in StatementExpression.Resolve (Mono.CSharp.EmitContext)
         in Block.Resolve (Mono.CSharp.EmitContext)
         in If.Resolve (Mono.CSharp.EmitContext)
         in Block.Resolve (Mono.CSharp.EmitContext)
         in EmitContext.EmitTopBlock (Mono.CSharp.Block,
 Mono.CSharp.InternalParameters, Mono.CSharp.Location)
+
+------- Additional Comments From bmaurer@users.sf.net  2004-06-23 19:50 -------
+unsafe class T {
+	static int Main () {
+		int len = 10;
+		int* x = stackalloc int [len];
+		return x [0];
+	}
+}