[Mono-bugs] [Bug 58524][Wis] New - ldc.i4.M1 won't compile!

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 14 May 2004 15: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 s001@hotbox.ru.

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

--- shadow/58524	2004-05-14 15:51:42.000000000 -0400
+++ shadow/58524.tmp.10009	2004-05-14 15:51:42.000000000 -0400
@@ -0,0 +1,94 @@
+Bug#: 58524
+Product: Mono: Compilers
+Version: unspecified
+OS: GNU/Linux [Other]
+OS Details: x86 linux 2.6.5
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: IL assembler
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: s001@hotbox.ru               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: ldc.i4.M1 won't compile!
+
+Description of Problem:
+ mono 1 beta: ilasm refuse to compile "ldc.i4.M1"
+
+Steps to reproduce the problem:
+  use this example:
+----------------------------------------------
+.assembly extern RTS {}
+.assembly 'Hello' {}
+
+.namespace Hello
+{
+.class public sealed Hello
+  {
+
+.method	public specialname rtspecialname static void .cctor() il managed
+    {
+	ret
+	.locals()
+    }
+
+.method	public static void '.CPmain'(string[]) il managed
+    {
+.entrypoint
+	ldarg.0
+	stsfld	string[] [RTS]ProgArgs::argList
+.line	15	'Hello.cp'
+.line	15:7	'Hello.cp'
+	call	void  Hello.Hello::'Test'()
+	ret
+	.locals()
+    } 
+
+.method assembly static void  'Test'() il managed
+    {
+.line	7	'Hello.cp'
+.line	11	'Hello.cp'
+	ldloc.0
+	ldc.i4.2
+	ldc.i4.M1
+	xor
+	and
+	stloc.0
+	ret
+	.locals init (int32	'xAttr')
+    }
+  }
+}
+----------------------------------------------
+
+Actual Results:
+
+Assembling 'Hello.il' , no listing file, to exe --> 'Hello.exe'
+syntax error, got token `COMP_NAME', expecting ID SQSTRING OPEN_BRACE 
+CLOSE_BRACE INSTR_NONE INSTR_I INSTR_I8 INSTR_R INSTR_BRTARGET 
+INSTR_METHOD INSTR_FIELD INSTR_TYPE INSTR_STRING INSTR_SIG INSTR_TOK 
+INSTR_SWITCH INSTR_LOCAL INSTR_PARAM D_CUSTOM D_DATA D_EMITBYTE 
+D_ENTRYPOINT D_EXPORT D_LANGUAGE D_LINE D_LOCALS D_MAXSTACK D_OVERRIDE 
+D_PARAM D_PERMISSION D_PERMISSIONSET D_TRY D_VTENTRY D_ZEROINIT
+Error at: line (33) column (0)
+Mono.ILASM.yyParser.yyException: irrecoverable syntax error
+in <0x00d10> Mono.ILASM.ILParser:yyparse (Mono.ILASM.yyParser.yyInput)
+in <0x000cd> Mono.ILASM.ILParser:yyparse 
+(Mono.ILASM.yyParser.yyInput,object)
+in <0x00248> DriverMain:ProcessFile (string)
+
+Error while compiling.
+
+
+Expected Results:
+  Successfull compile. (MS ilasm compiles with no error)
+
+How often does this happen? 
+ Always.
+
+Additional Information:
+ My guess: perhaps should treat .M1 just as .m1?