[Mono-bugs] [Bug 566130] New: linq statement is crazy, but it is valid

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Dec 18 15:59:13 EST 2009


http://bugzilla.novell.com/show_bug.cgi?id=566130

http://bugzilla.novell.com/show_bug.cgi?id=566130#c0


           Summary: linq statement is crazy, but it is valid
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.4.x
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: jrwren at xmtp.net
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Description of Problem:
CSC compiles it, gmcs does not


// where the contents of codemash.rss is a dump from
http://www.codemash.org/rss
List<RssItem> getRss()
        {
            DateTime junk;
            return (from item in
XDocument.Load("codemash.rss").Descendants("item")
                    let updated = new
System.Text.StringBuilder(item.Element("updated").Value).Replace('T',' ',
10,1).Replace('-',' ',19,1)
                    let parsed = DateTime.TryParse(updated.ToString(), out
junk)
                select new RssItem { 
                    title=item.Element("title").Value,
                    link=item.Element("link").Value,
                    description = item.Element("description").Value,
                    updated = parsed? junk : DateTime.Now,
            }).ToList();
        }


Steps to reproduce the problem:
1. try to compile
2. 


Actual Results:
/Developer/MonoTouch/usr/bin/smcs /noconfig
"/out:/Users/jrwren/MobiMash/Dev/iPhone/MobiMash/bin/iPhoneSimulator/Debug/MobiMash.exe"
"/r:System.dll" "/r:System.Xml.dll" "/r:System.Core.dll" "/r:monotouch.dll"
"/r:System.Xml.Linq.dll" /nologo /warn:4 /debug:+ /debug:full /optimize-
/codepage:utf8 "/define:DEBUG"  /t:exe
"/Users/jrwren/MobiMash/Dev/iPhone/MobiMash/Main.cs"
"/Users/jrwren/MobiMash/Dev/iPhone/MobiMash/AppDelegate.cs"
"/Users/jrwren/MobiMash/Dev/iPhone/MobiMash/TabBarController.cs"
"/Users/jrwren/MobiMash/Dev/iPhone/MobiMash/SessionTableViewController.cs"
"/Users/jrwren/MobiMash/Dev/iPhone/MobiMash/Session.cs"
"/Users/jrwren/MobiMash/Dev/iPhone/MobiMash/Speaker.cs"
"/Users/jrwren/MobiMash/Dev/iPhone/MobiMash/TableViewDelegate.cs"
"/Users/jrwren/MobiMash/Dev/iPhone/MobiMash/StringExt.cs"
"/Users/jrwren/MobiMash/Dev/iPhone/MobiMash/HomeUIViewController.cs"
"/Users/jrwren/MobiMash/Dev/iPhone/MobiMash/TableViewDataSource.cs"
"/Users/jrwren/MobiMash/Dev/iPhone/MobiMash/SpeakersTableViewController.cs" 
Internal compiler error at
/Users/jrwren/MobiMash/Dev/iPhone/MobiMash/HomeUIViewController.cs(62,31)::
exception caught while emitting MethodBuilder [HomeUIViewController::getRss]


Unhandled Exception: System.ArgumentOutOfRangeException: Argument is out of
range.
  at Mono.CSharp.MyBitVector.SetRange (Int32 offset, Int32 length) [0x00000] in
<filename unknown>:0 
  at Mono.CSharp.VariableInfo.SetAssigned (Mono.CSharp.MyBitVector vector)
[0x00000] in <filename unknown>:0 
  at Mono.CSharp.FlowBranching+UsageVector.SetAssigned
(Mono.CSharp.VariableInfo var) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.FlowBranching.SetAssigned (Mono.CSharp.VariableInfo vi)
[0x00000] in <filename unknown>:0 
  at Mono.CSharp.VariableInfo.SetAssigned (Mono.CSharp.ResolveContext ec)
[0x00000] in <filename unknown>:0 
  at Mono.CSharp.LocalVariableReference.DoResolveLValue
(Mono.CSharp.ResolveContext ec, Mono.CSharp.Expression right_side) [0x00000] in
<filename unknown>:0 
  at Mono.CSharp.Expression.ResolveLValue (Mono.CSharp.ResolveContext ec,
Mono.CSharp.Expression right_side) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.SimpleName.DoSimpleNameResolve (Mono.CSharp.ResolveContext ec,
Mono.CSharp.Expression right_side, Boolean intermediate) [0x00000] in <filename
unknown>:0 
  at Mono.CSharp.SimpleName.SimpleNameResolve (Mono.CSharp.ResolveContext ec,
Mono.CSharp.Expression right_side, Boolean intermediate) [0x00000] in <filename
unknown>:0 
  at Mono.CSharp.SimpleName.DoResolveLValue (Mono.CSharp.ResolveContext ec,
Mono.CSharp.Expression right_side) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Expression.ResolveLValue (Mono.CSharp.ResolveContext ec,
Mono.CSharp.Expression right_side) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Argument.Resolve (Mono.CSharp.ResolveContext ec) [0x00000] in
<filename unknown>:0 
  at Mono.CSharp.Arguments.Resolve (Mono.CSharp.ResolveContext ec,
System.Boolean& dynamic) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.DoResolve (Mono.CSharp.ResolveContext ec) [0x00000]
in <filename unknown>:0 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec,
ResolveFlags flags) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec) [0x00000]
in <filename unknown>:0 
  at Mono.CSharp.AnonymousTypeParameter.DoResolve (Mono.CSharp.ResolveContext
ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec,
ResolveFlags flags) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec) [0x00000]
in <filename unknown>:0 
  at Mono.CSharp.NewAnonymousType.DoResolve (Mono.CSharp.ResolveContext ec)
[0x00000] in <filename unknown>:0 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec,
ResolveFlags flags) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec) [0x00000]
in <filename unknown>:0 
  at Mono.CSharp.Return.DoResolve (Mono.CSharp.BlockContext ec) [0x00000] in
<filename unknown>:0 
  at Mono.CSharp.ContextualReturn.DoResolve (Mono.CSharp.BlockContext ec)
[0x00000] in <filename unknown>:0 
  at Mono.CSharp.ExitStatement.Resolve (Mono.CSharp.BlockContext ec) [0x00000]
in <filename unknown>:0 
  at Mono.CSharp.Block.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in
<filename unknown>:0 
  at Mono.CSharp.ToplevelBlock.Resolve (Mono.CSharp.FlowBranching parent,
Mono.CSharp.BlockContext rc, Mono.CSharp.ParametersCompiled ip, IMethodData md)
[0x00000] in <filename unknown>:0 


Expected Results:

successful compile

How often does this happen? 

every time.

Additional Information:

-- 
Configure bugmail: http://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