[Mono-bugs] [Bug 31673][Nor] Changed - shl opcode behaviour

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
3 Oct 2002 18:58:13 -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 miguel@ximian.com.

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

--- shadow/31673	Thu Oct  3 04:32:24 2002
+++ shadow/31673.tmp.511	Thu Oct  3 14:58:13 2002
@@ -1,14 +1,14 @@
 Bug#: 31673
 Product: Mono/MCS
 Version: unspecified
 OS: other
 OS Details: 
-Status: NEW   
+Status: NEEDINFO   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Normal
 Component: Misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: lupus@ximian.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -21,6 +21,27 @@
                         return a << b << c << 1;
                 }
 mcs generates different code than csc.
 csc ANDs the right operand with 0x1f (I guess because shl has undefined
 behaviour with larger operands and maybe somewhere the C# spec specifies
 predictable results).
+
+------- Additional Comments From miguel@ximian.com  2002-10-03 14:58 -------
+I can not find in the C# spec anything relevat to this.  And the CLI
+spec says that the result is implementation defined if there is an
+overflow in the shift.
+
+I ran this:
+		int j = 32;
+		int v = 1;
+		int r = v << j;
+
+in the .NET runtime with our code and their code, and the results are
+the same.  Ditto for the runtime.
+
+And I could not find anything on the C# spec that requires it.  Is
+there something that is breaking because of this missing code?
+
+Setting this as NEEDINFO in the meantime.
+
+Miguel.
+