http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48623
Summary: gcc 4.6.0 generates no code for a function with __attribute__((always_inline)) Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: rich...@nod.at gcc 4.6.0 builds a non-functional User Mode Linux kernel. It seems to optimize away the function sub_preempt_count() used in kernel/softirq.c:__local_bh_enable(). Thus, the preempt counter gets out of balance and the kernel crashes. A standalone test case is attached. Just compile it with: gcc testcase.c -Os -g -c -o testcase.o Using objdump you can see that no code was generated for sub_preempt_count(). gcc 4.3, 4.4 and 4.5 generate code. Without __attribute__((always_inline)) 4.6.0 produces code... Thanks, //richard