[Mono-bugs] [Bug 508334] New: gmcs miscompiles __arglist when it should report an error

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri May 29 14:35:49 EDT 2009


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


           Summary: gmcs miscompiles __arglist when it should report an
                    error
    Classification: Mono
           Product: Mono: Compilers
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: rkumpera at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


For example:
using System;

class Program
{
    static void Main ()
    {
        Console.WriteLine (__arglist (1,2,3));
    }
}


gmcs produces:

method private static  hidebysig default void Main ()  cil managed 
{
    .entrypoint
    .maxstack 8
    IL_0000:  ldc.i4.1 
    IL_0001:  ldc.i4.2 
    IL_0002:  ldc.i4.3 
    IL_0003:  box [mscorlib]System.RuntimeArgumentHandle
    IL_0008:  call void class [mscorlib]System.Console::WriteLine(object)
    IL_000d:  ret
}

While csc produces:

Microsoft (R) Visual C# 2008 Compiler version 3.5.30729.1
for Microsoft (R) .NET Framework version 3.5
Copyright (C) Microsoft Corporation. All rights reserved.

repro.cs(8,3): error CS1502: The best overloaded method match for
'System.Console.WriteLine(bool)' has some invalid arguments
repro.cs(8,22): error CS1503: Argument '1': cannot convert from '__arglist' to
'bool'

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