- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
BUG: ICL ignore disabled optimization and continue to use "dead code elimination"
Here is a sample code to reproduce this bug:
#pragma optimize("", off)
int f1(int x)
{
return x + 5;
_asm _emit 0x01;
_asm _emit 0x02;
}
#pragma optimize("", on)
(different intel-specified pragmas to disable optimizationNOT HELPING TOO!)
Even if I use /Od switch (to disable ALL optimization and this pragma), ICL killing my code after return, using "dead-code elimination". But I DISABLED ALL OPTIMIZATION. MSVC compiles this code (with disabled optimization) correctly (my tags 01h and 02h are placed after return x+ 5;)
This bug exist in ICL v9.x, v10.x and the latest beta of v11 (v11.1.038 Build 20090624)
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
This has been a while. the "#pragma optimize("", off)" is supported and working now. But the original code will not work as you'd expect.
If you change the code to below, it should work. Please try the 12.1 compiler with it. You can download it from our eval center.
I used "icl /O2 /c /FA t.cpp".
This has been a while. the "#pragma optimize("", off)" is supported and working now. But the original code will not work as you'd expect.
If you change the code to below, it should work. Please try the 12.1 compiler with it. You can download it from our eval center.
#pragma optimize("", off)
int f1(int x)
{
if (1)
return x + 5;
_asm _emit 0x01;
_asm _emit 0x02;
}
#pragma optimize("", on)
I used "icl /O2 /c /FA t.cpp".
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page