https://bugzilla.novell.com/show_bug.cgi?id=328136
Summary: To strong optimization produces wrong code for some if
clauses
Product: Mono: Compilers
Version: 1.2
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
QAContact: [EMAIL PROTECTED]
Found By: ---
Hi,
Quoting https://bugs.launchpad.net/ubuntu/+source/mono/+bug/144734:
My collegue Martin Zaworski found a misbehaviour, we have then tracked it down
to following:
if (foo++ && false) {
} else {
//foo isn't incremented
}
So, in an conditional statement, with &&false, the left hand side doesn't
run(or gets compiled), no side effects are
executed. Also no function() can be called inside there).
Works also with assignments, optimisation switches don't matter.
Microsoft csc.exe is void of that problem
Package: mono-mcs 1.2.4-6ubuntu4
Also affected is the current svn version (21/9/2007).
We have here now untrusted compiled binaries, unless it's verificable, that
this kind of source coding isn't used,
they have to be recompiled with a fixed version of the compiler.
Test code:
http://launchpadlibrarian.net/9501307/tt.cs
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs