- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have the following piece of code:
When compiling with GCC, this gives me the expected resulting output:
However, with ICC (7.0), i get:
Looking at the assembly code generated by ICC, i notice that ebx is first moved to eax, and eax is incremented. Nothing is done further, so the contents of eax gets lost. Is this a bug in ICC ?
thanks,
Remko
I have the following piece of code:
register int* glob asm("bx"); int main() { glob = (int*) malloc(2*sizeof(int)); printf("%p ",glob); glob += 1; printf("%p ",glob); return 0; }
When compiling with GCC, this gives me the expected resulting output:
0x8049608 0x804960c
However, with ICC (7.0), i get:
0x804b848 0x804b848
Looking at the assembly code generated by ICC, i notice that ebx is first moved to eax, and eax is incremented. Nothing is done further, so the contents of eax gets lost. Is this a bug in ICC ?
thanks,
Remko
Link Copied
0 Replies
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