-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Description
| Bugzilla Link | 4022 |
| Resolution | INVALID |
| Resolved on | Mar 06, 2010 13:59 |
| Version | unspecified |
| OS | other |
| Reporter | LLVM Bugzilla Contributor |
Extended Description
It seems that clang handles __inline incorrectly and generates incorrect assembly. The following test case demonstrates the problem. The output of clang and gcc when compiling this can also be found further down.
As a matter of fact I ran across a similar problem also today, but I couldn't narrow it down to a proper test case. It was related to having a static variable at file scope and accessing it from inline assembly. For some reason at a later time the linker said it couldn't resolve the symbol (the static variable at file scope). Is it possible that it is related to whatever is causing the __inline problem?
Test Case:
__inline int
vm_page_bits(int base, int size)
{
int i = 5;
return (i);
}
void
vm_page_clear_dirty(int m, int base, int size)
{
m &= ~vm_page_bits(base, size);
}