[Mono-bugs] [Bug 328136] New: To strong optimization produces wrong code for some if clauses
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Sep 25 07:43:42 EDT 2007
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: rharinath at novell.com
ReportedBy: slomo at circular-chaos.org
QAContact: mono-bugs at ximian.com
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.
More information about the mono-bugs
mailing list