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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #4)
> #c0 compiles for me without errors on x86_64-linux on the trunk.

Yes without defining TAIL_CALLER, at -O2 it does compile.

With `-DTAIL_CALLER= -O2 ` I get:
```
./cc1 t1.c -quiet -O2 -fno-checking -DTAIL_CALLER=
In function ‘func_306’,
    inlined from ‘func_307’ at t1.c:41030:35,
    inlined from ‘func_310’ at t1.c:41104:37:
t1.c:41023:35: error: cannot tail-call: memory reference or volatile after call
41023 |   if (1) [[gnu::musttail]] return func_308(tmp_0);
      |                                   ^~~~~~~~~~~~~~~
In function ‘func_109’,
    inlined from ‘func_120.constprop’ at t1.c:36130:37:
t1.c:35798:37: error: cannot tail-call: other reasons
35798 |     if (1) [[gnu::musttail]] return func_296(local_0);
      |                                     ^~~~~~~~~~~~~~~~~

...
```

For his we have:
```
  D.324664 = func_308 (D.324662);
  _132 = VIEW_CONVERT_EXPR<long unsigned int>(D.324664);
  MEM[(struct anyref *)&D.324652] = _132;
```
in t1.c.227t.tailc dump.

Reply via email to