This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/48623] gcc 4.6.0 generates no code for a function with __attribute__((always_inline))


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]