[Mono-bugs] [Bug 343557] New: Compiler crash, seems like flow analysis.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Nov 21 23:41:36 EST 2007


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

           Summary: Compiler crash, seems like flow analysis.
           Product: Mono: Compilers
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: miguel at novell.com
         QAContact: mono-bugs at ximian.com
          Found By: ---


The following program crashes the compiler:

using System.Collections;

class X {
        static void Main (string [] install)
        {
                ArrayList order = new ArrayList ();
                Hashtable states = new Hashtable ();

                try {
                        if (install != null){
                                foreach (string inst in order){
                                        Hashtable state = states [inst];
                                }
                        }
                } catch {
                }               
        }
}


a.cs(12,51): error CS0266: Cannot implicitly convert type `object' to
`System.Collections.Hashtable'. An explicit conversion exists (are you missing
a cast?)
Exception caught by the compiler while compiling:
   Block that caused the problem begin at: a.cs(4,21):
                     Block being compiled: [a.cs(11,63):,a.cs(13,33):]
System.InvalidOperationException: Operation is not valid due to the current
state of the object
Internal compiler error at a.cs(4,21):: exception caught while emitting
MethodBuilder [X::Main]

Unhandled Exception: System.InvalidOperationException: Operation is not valid
due to the current state of the object
  at Mono.CSharp.FlowBranchingException.AddSibling (Mono.CSharp.UsageVector
sibling) [0x00000] 
  at Mono.CSharp.FlowBranching.CreateSibling (Mono.CSharp.Block block,
SiblingType type) [0x00000] 
  at Mono.CSharp.FlowBranching.CreateSibling () [0x00000] 
  at Mono.CSharp.If.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.Block.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.Try.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.Block.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.Block.Resolve (Mono.CSharp.EmitContext ec) [0x00000] 
  at Mono.CSharp.EmitContext.ResolveTopBlock (Mono.CSharp.EmitContext
anonymous_method_host, Mono.CSharp.ToplevelBlock block, Mono.CSharp.Parameters
ip, IMethodData md, System.Boolean& unreachable) [0x00000]


-- 
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