This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/48623] gcc 4.6.0 generates no code for a function with __attribute__((always_inline))
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 15 Apr 2011 14:52:57 +0000
- Subject: [Bug c/48623] gcc 4.6.0 generates no code for a function with __attribute__((always_inline))
- Auto-submitted: auto-generated
- References: <bug-48623-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48623
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-04-15 14:52:04 UTC ---
Instead using
static inline struct thread_info *current_thread_info(void)
{
struct thread_info *ti;
void *p;
asm volatile ("" : "=r" (p) : "0" (&ti));
ti = (struct thread_info *) (((unsigned long) p) & ~mask);
return ti;
}
might confuse GCC enough and is still architecture independent.