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

--- Comment #14 from Vincenzo Romano <vincenzo.romano at gmail dot com> ---
For sure, with current RV64 trunk version, this code

    typedef struct {
      unsigned long one;
      unsigned long two;
    } twin;

    twin function(twin t) { return (twin){0, 0}; }



still generates useless stack resizing:

    function:
      addi sp,sp,-32
      li a0,0
      li a1,0
      addi sp,sp,32
      jr ra

Instead, clang-trunc does it right.

https://godbolt.org/z/KdjfzE9rx
  • [Bug middle-end/108016] RISC... vincenzo.romano at gmail dot com via Gcc-bugs

Reply via email to