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

            Bug ID: 69770
           Summary: [ARM] -mlong-calls does not affect calls to
                    __gnu_mcount_nc generated by -pg
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cbaylis at gcc dot gnu.org
  Target Milestone: ---

When compiling with -mlong-calls and -pg, calls to the __gnu_mcount_nc function
are not generated as long calls.

    extern void g(void);
    int f() { g(); return 0; }

compiles to:

        push    {r4, lr}
        push    {lr}
        bl      __gnu_mcount_nc    ;// not a long call
        ldr     r3, .L2
        blx     r3                 ;// a long call to g()
        mov     r0, #0
        pop     {r4, pc}

Reply via email to