Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Gaiger_Chen
New Contributor I
73 Views

simple inline asm makes the compiler hanging..

Hi

I would like use icc to complie the sample assembly, but the compile time last almost forever
with mcpcom costing one cpu core resource 100%:


#define ASM __asm
#define ENDLINE ;

int main(void)
{
int a, b;

a = 10;

ASM
{
MOV EAX, a ENDLINE
MOV b, EAX ENDLINE
}/*ASM*/

return 0;
}/*main*/


As you watch, I replace ; as ENDLINE , that is make the compile does not complete.
when I use l instead ; , that is normal;
but the code has be compiled normally by VC 8 (VS 2005).

Is there is some restriction by #define replacing on icc ?

thank you.

My environment:
OS :windows 7 (win 6.1 ) with SP1
Intel c++ complier XE 12.0
IDE : VS 2005

cpu : intel i5 2400
board : H61 (it is cheap enough to its performance for me)
0 Kudos
4 Replies
Om_S_Intel
Employee
73 Views

The Intel C++ compiler behaviour ss different in this case. It seems a bug to me.

I have submitted a report to Intel C++ compiler development team. I will update this thread when I have more information on this.

Om
Om_S_Intel
Employee
73 Views

The issue is fixed in latest Intel C++ Composer XE 2011. The composer is available from "Intel Regiatration and Download Center".
Om_S_Intel
Employee
73 Views

ILevi1
Valued Contributor I
73 Views

While this is a bug, it should be noted that ; is not required in __asm block as an end-of-statement marker.

Rationale:
Assembler (even inline) is not C.
Reply