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

--- Comment #21 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
No problem, here's a testcase where the call is eliminated (just needs an extra
function in between). At the same time, static 'w' correctly calls 'weak' (but
is not eliminated, even though 'w' itself not called in the end):

static void dummy(){}

void weak() __attribute__((weak,alias("dummy")));

__attribute__((noinline))
static void w()
{
    weak();
}

void foo()
{
    w();
}

Reply via email to