[Mono-bugs] [Bug 387712] New: Reflector does like foreach IL from gmcs HEAD

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed May 7 08:25:49 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=387712


           Summary: Reflector does like foreach IL from gmcs HEAD
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: andyhume32 at yahoo.co.uk
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Is it a Reflector or Mono bug?

Reflector 5.1.1.0 reports:
[[
[Please describe what might have caused this error.]

Translation failure in 'ForEach.Main() : Void' in 'ForEach, Version=0.0.00,
Culture=neutral, PublicKeyToken=null'.

System.InvalidOperationException


InnerException:

Invalid branch after duplicate at offset 0036.

System.InvalidOperationException

   at ឺ.᜔()
   at ឺ.ᜉ(Int32 A_0)
   at ឺ.ᜋ(Int32 A_0)
   at ឺ.ᜂ(Int32 A_0, Int32 A_1)
   at ឺ.ᜀ(IExceptionHandler A_0)
   at ឺ.ᜂ(Int32 A_0, Int32 A_1)
   at ឺ.ᜀ(IMethodDeclaration A_0, IMethodBody A_1)
   at ឤ.ᜀ(IMethodDeclaration A_0)
   at ឥ.ᜁ(IMethodDeclaration A_0)
   at ᝎ.ᜀ(Boolean A_0, Boolean A_1, Boolean A_2)
..
]]

Source is:
[[
using System;
using System.Collections;

class ForEach
{
        static void Main()
        {
                ArrayList list = new ArrayList ();
                foreach(object item in list) {
                        Console.WriteLine(item);
                }
        }
}
]]

The IL generated by gmcs has changed between 1.9 and head, a pop+br pair of
instructions has been replaced by a endfinally (thus two endfinallys).


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list