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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |hjl.tools at gmail dot 
com

--- Comment #43 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Steven Sun from comment #41)
> The following reproduction will also trigger this issue.
> 
> runtime segfault when compiled with `-march=znver2 -O0`
> 
> ```
> void ext(long a, long b, long c, long d, long e, long f, long g) {}
> __attribute__((preserve_none)) void tail(long a, long b) {}
> __attribute__((preserve_none)) void caller(long a, long b, long c, long d,
>                                            long e, long f, long g) {
>     __attribute__((aligned(32))) long x[4]; // for stack alignment
>     ext(a, b, c, d, e, f, g);
>     __attribute__((musttail)) return tail(a + b, b + c);
> }
> int main() { caller(1, 2, 3, 4, 5, 6, 7); }
> ```

Thanks.  It is very helpful.

Reply via email to