public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/48623] New: gcc 4.6.0 generates no code for a function with __attribute__((always_inline))
@ 2011-04-15 14:23 richard at nod dot at
  2011-04-15 14:17 ` [Bug c/48623] " richard at nod dot at
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: richard at nod dot at @ 2011-04-15 14:23 UTC (permalink / raw)
  To: gcc-bugs

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: unassigned@gcc.gnu.org
        ReportedBy: richard@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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-04-15 22:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-15 14:23 [Bug c/48623] New: gcc 4.6.0 generates no code for a function with __attribute__((always_inline)) richard at nod dot at
2011-04-15 14:17 ` [Bug c/48623] " richard at nod dot at
2011-04-15 14:47 ` rguenth at gcc dot gnu.org
2011-04-15 14:53 ` rguenth at gcc dot gnu.org
2011-04-15 17:35 ` richard at nod dot at
2011-04-15 17:38 ` richard at nod dot at
2011-04-15 17:39 ` richard at nod dot at
2011-04-15 20:13 ` rguenth at gcc dot gnu.org
2011-04-15 20:26 ` richard at nod dot at
2011-04-15 20:27 ` richard at nod dot at
2011-04-15 22:04 ` matz at gcc dot gnu.org
2011-04-15 22:28 ` richard at nod dot at

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).