the new intel c++ compiler for mac os x crash on every switch() statement in 64-bit mode.
The only solution is to use -fno-jump-tables but this is only workaround.
> so maybe this is expected behavior
Not sure that I understand you here.
Do you mean that using switch() statesmen is not supported by Intel Compilers and the software using this should crash ? I am sure no, but what then.
It does work well on Windows and also in 32-bit mode on Mac OS X 10.6 too but in 64-bit mote the program compiled with Intel Compiler will crash on every switch() statement.
So this should be a bug somewhere.
and knowledge base article for resolution:
Current status, this problem with the 11.1 compiler is a result of a bug in the linker that comes with Xcode 3.2.2, 3.2.3, 3.2.4.
The work arounds are:
1) Use Xcode 3.2.1 with 11.1 compiler.
2) Use 11.1 compiler with the option -use-asm with Xcode 3.2.2, 3.2.3, 3.2.4.
It should fix most cases but there are some cases when even generating object file through external assembler L* symbols still may appear in object file. Those cases are usually constant string literals placed in cstring section
3) Use Intel Composer XE.
We are not planning to work around this linker bug in the 11.1 compiler due to the complexity of the workaround which might reduce the stability of the 11.1 product.