https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119484
Bug ID: 119484
Summary: [14/15 Regression] v2: tail call vs IPA-VRP return
value range with constant value
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Keywords: missed-optimization, tail-call
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Blocks: 119376
Target Milestone: ---
This is similar to PR 118430 and I think it is one of reduced testcases from PR
119376 after all of the current fixes are applied.
Take:
```
void x();
[[gnu::noinline]]
static int f(int)
{
x();
return 0;
}
int g(int);
int h(int t)
{
if (t == 1)
[[clang::musttail]]
return f(t);
return 0;
}
```
This fails on the trunk because we decide to always return 0.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119376
[Bug 119376] [15 Regression] musttail does not get dropped after inlining?