[Mono-bugs] [Bug 379822] GMCS optimizes "var && false" to "var" instead of "false"

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Apr 15 13:27:39 EDT 2008


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

User harinath at hurrynot.org added comment
https://bugzilla.novell.com/show_bug.cgi?id=379822#c1


Raja Harinath <harinath at hurrynot.org> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
                 CC|                                                |harinath at hurrynot.org




--- Comment #1 from Raja Harinath <harinath at hurrynot.org>  2008-04-15 11:27:38 MST ---
Sorry, but for some reason, I find this bug hilarious :-)

I can confirm it with 'mcs' too.  It's got to to with constant folding, I
think.

Here's the generated IL

        IL_0000:  ldc.i4.1 
        IL_0001:  stloc.0 
        IL_0002:  ldloc.0 
        IL_0003:  call void class [mscorlib]System.Console::WriteLine(bool)
        IL_0008:  ret 

IL_0002 is wrong, of course.


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