Skip to content

not_tail_called interaction with LTO and merging of decls on LTO #133754

Open
@pinskia

Description

@pinskia

This is more of a semantic question rather than a bug report (though it might turn into a bug report due to what is thought about).

Anyways take these 2 TUs:

int f(void) __attribute__((not_tail_called));
int g1(void);
int h(void)
{
  return g1();
}
int g(void)
{
  return f();
}

and

int f(void);
int g(void);
int g1(void)
{
  return f();
}
int h1(void)
{
  return g();
}

When g gets inlined into h1, will f cause a tail call or not? Likewise for g1 inlined into h?

Metadata

Metadata

Assignees

No one assigned

    Labels

    LTOLink time optimization (regular/full LTO or ThinLTO)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions