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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #2)
> Well, you'd need to know during tailc pass that the target returns char *
> the same as size_t, which isn't guaranteed.
> Especially e.g. int and unsigned could be returned differently (e.g. sign
> vs. zero extended to 64-bits).

Yes and no, looking into a few examples of this, the tree level marking of a
function is still a hint saying if the return is the same then we should do it.

you can see it with this example:
```
typedef unsigned char utype;
typedef signed char stype;

utype f1(void);
stype g1(void)
{
  return (stype)f1();
}
```
Which we get the correct behavior on mips of not doing a tail call even if the
function was marked as a tail call. where signed char and unsigned char are
returned differently (one is returned zero extended while the other is retuned
signed extended).

So in this case the MODE stays the same like it is checked in
process_assignment  is all that is needed I think. (well MODE stays the same
and the precision is the same)

Reply via email to