自前ビルドしたC#コンパイラでコンパイルするとうまく動かないコードがある。
(tmp2.csを挿入)
うまく動かない場合はすべてにおいてFalseとなる。
value(-64) < -1 => False
value(-64) < -0x20 => False
value(-64) < -0x80 => False
本来次のような結果になるはず。
value(-64) < -1 => True
value(-64) < -0x20 => True
value(-64) < -0x80 => False
これは何が起きているのだろうか?
問題のないコンパイラ
csc.exe
Microsoft (R) Visual C# Compiler Version 4.0.30319.17929
for Microsoft (R) .NET Framework 4.5
Copyright (C) Microsoft Corporation. All rights reserved.
Mac OS X版3.0.6 (公式配布物)
Mono JIT compiler version 3.0.6 (master/20e40c4 Wed Feb 27 10:15:23 EST 2013)
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: altstack
Notification: kqueue
Architecture: x86
Disabled: none
Misc: softdebug
LLVM: yes(3.1svn-mono)
GC: Included Boehm (with typed GC)
ideon.com (mono-2.8)
See http://ideone.com/SU6Ma0
問題が起きるコンパイラ
FreeBSD ports lang/mono (Mono 3.0.3) on FreeBSD 9.1-STABLE
Mono JIT compiler version 3.0.3 (tarball Fri Apr 19 16:54:49 JST 2013)
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notification: kqueue
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC and Parallel Mark)
自前ビルド版3.0.6 on FreeBSD 9.1-STABLE
Mono JIT compiler version 3.0.6 (mono-3.0.6/20e40c4 2013年 4月19日 金曜日 20時21分40秒 JST)
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: normal
Notification: kqueue
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC and Parallel Mark)
自前ビルド版3.0.6 on Mac OS X 10.7.5
Mono JIT compiler version 3.0.6 (mono-3.0.6/20e40c4 2013年 4月19日 金曜日 20時57分05秒 JST)
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: altstack
Notification: kqueue
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC)
自前ビルド版3.0.10 on FreeBSD 9.1-STABLE
Mono JIT compiler version 3.0.10 (master/1c94cd3 2013年 4月19日 金曜日 19時24分22秒 JST)
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: normal
Notification: kqueue
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC and Parallel Mark)