public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/107503] New: tail call missed with struct wrapper
@ 2022-11-01 19:50 pinskia at gcc dot gnu.org
  2022-11-01 19:53 ` [Bug tree-optimization/107503] " pinskia at gcc dot gnu.org
  2022-11-05 10:48 ` rguenth at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-01 19:50 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107503
           Summary: tail call missed with struct wrapper
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Take:
int *g();
f h()
{
    return {g()};
}

f should tail call to g but currently does not.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug tree-optimization/107503] tail call missed with struct wrapper
  2022-11-01 19:50 [Bug tree-optimization/107503] New: tail call missed with struct wrapper pinskia at gcc dot gnu.org
@ 2022-11-01 19:53 ` pinskia at gcc dot gnu.org
  2022-11-05 10:48 ` rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-01 19:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Real testcase:
```
struct f
{
    int *a;
};

int *g();
struct f h()
{
    return {g()};
}
```

Sorry I forgot the definition of f before. it was a copy and paste mistake.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug tree-optimization/107503] tail call missed with struct wrapper
  2022-11-01 19:50 [Bug tree-optimization/107503] New: tail call missed with struct wrapper pinskia at gcc dot gnu.org
  2022-11-01 19:53 ` [Bug tree-optimization/107503] " pinskia at gcc dot gnu.org
@ 2022-11-05 10:48 ` rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-11-05 10:48 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-11-05
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Probably target dependent (requires single member aggregate to be returned with
the same ABI as the element type).

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-05 10:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-01 19:50 [Bug tree-optimization/107503] New: tail call missed with struct wrapper pinskia at gcc dot gnu.org
2022-11-01 19:53 ` [Bug tree-optimization/107503] " pinskia at gcc dot gnu.org
2022-11-05 10:48 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).