Bug 60936 - consecutive XOR assignment operator occurs bug
Summary: consecutive XOR assignment operator occurs bug
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: 5.4 (2017-06)
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Marek Safar
Depends on:
Reported: 2017-12-01 05:27 UTC by Yu Tzu Wu
Modified: 2017-12-21 14:52 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

test swap (305 bytes, text/plain)
2017-12-01 05:27 UTC, Yu Tzu Wu

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Yu Tzu Wu 2017-12-01 05:27:12 UTC
Created attachment 25879 [details]
test swap

OS: Windows7 and Ubuntu Linux

Code snippet from test.cs:

int a = 1;
int b = 3;
a ^= b ^= a ^= b;
Console.WriteLine("a={0}, b={1}", a, b);

Expected output:
a=3, b=1

Actual output: 
a=0, b=1
Comment 1 Marek Safar 2017-12-21 14:52:06 UTC
I get same "a=0, b=1" results when running .net on Windows