question of inline assembly
I'm on Solaris 10 x86 on an AMD64 system.
The following code:
== 1.c ==
int main()
{
int i;
for(i=0;i<5;++i)
__asm ("pause");
}
cannot pass -fast compiler option. Actually, it cannot pass optimization level > 2, i.e., it passes -O2, but cannot pass -O3/4/5.
$ cc -fast -o 1 1.c
"1.c", [main]:ube: error: SIGNAL: Segmentation Fault
cc: ube failed for 1.c
$ cc -O3 -o 1 1.c
"1.c", [main]:ube: error: SIGNAL: Segmentation Fault
cc: ube failed for 1.c
$ cc -O2 -o 1 1.c
$
For a workaround, I can put it in an .il file, then cc successfully compiles and links.
It's a new problem in Sun Studio 12. Version 11 doesn't have this problem. I don't have a SPARC, so I don't know if this problem exists on SPARC edition.

