public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/63354] New: -pg -mprofile-kernel creates unused stack frames on leaf functions on ppc64le
@ 2014-09-24  6:52 anton at samba dot org
  2014-09-24 14:31 ` [Bug target/63354] gcc " segher at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: anton at samba dot org @ 2014-09-24  6:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63354

            Bug ID: 63354
           Summary: -pg -mprofile-kernel creates unused stack frames on
                    leaf functions on ppc64le
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: anton at samba dot org

The following testcase:

int foo(void)
{
    return 1;
}

compiled with:

gcc -O2 -pg -mprofile-kernel -S foo.c

produces an unused stack frame:

foo:
    mflr 0
    std 0,16(1)
    bl _mcount
    mflr 0
    li 3,1
    std 0,16(1)
    stdu 1,-32(1)
    addi 1,1,32
    ori 2,2,0
    ld 0,16(1)
    mtlr 0
    blr

Note that older gcc versions allowed -mprofile-kernel to used on its own. While
there are issues with that (eg ignoring attribute no_instrument_function), it
does show the expected behaviour:

gcc -O2 -mprofile-kernel -S foo.c

foo:
    mflr 0
    std 0,16(1)
    bl _mcount
    li 3,1
    blr

So it seems to be something to do with -pg.


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

end of thread, other threads:[~2015-03-10  2:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-24  6:52 [Bug target/63354] New: -pg -mprofile-kernel creates unused stack frames on leaf functions on ppc64le anton at samba dot org
2014-09-24 14:31 ` [Bug target/63354] gcc " segher at gcc dot gnu.org
2014-09-25  1:45 ` anton at samba dot org
2015-03-10  2:36 ` msebor at gcc dot gnu.org

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).