[Bug target/107841] Incorrect generation of the function's epilogue code when there is a _builtin_alloca call.

2023-07-13 Thread pkoning at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107841

pkoning at gcc dot gnu.org changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #4 from pkoning at gcc dot gnu.org ---
Fixed by the patch from Mikael Petterson.

[Bug target/107841] Incorrect generation of the function's epilogue code when there is a _builtin_alloca call.

2023-07-13 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107841

--- Comment #3 from CVS Commits  ---
The master branch has been updated by Paul Koning :

https://gcc.gnu.org/g:8f1a26ee259f72e42405b9c5f2b161042ec4014b

commit r14-2509-g8f1a26ee259f72e42405b9c5f2b161042ec4014b
Author: Mikael Pettersson 
Date:   Thu Jul 13 16:06:39 2023 -0400

pdp11: Fix epilogue generation [PR107841]

gcc/

PR target/107841
* config/pdp11/pdp11.cc (pdp11_expand_epilogue): Also
deallocate alloca-only frame.

gcc/testsuite/

PR target/107841
* gcc.target/pdp11/pr107841.c: New test.

[Bug target/107841] Incorrect generation of the function's epilogue code when there is a _builtin_alloca call.

2023-07-13 Thread pkoning at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107841

pkoning at gcc dot gnu.org changed:

   What|Removed |Added

   Last reconfirmed||2023-07-13
 Status|UNCONFIRMED |ASSIGNED
 CC||pkoning at gcc dot gnu.org
 Ever confirmed|0   |1

[Bug target/107841] Incorrect generation of the function's epilogue code when there is a _builtin_alloca call.

2022-11-24 Thread avo2000 at mail dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107841

--- Comment #2 from Alexander  ---
Source code:

void qq(int a) {
char *s = alloca(128);
sprintf(s,"qq %d",3);
}

Generated code:

040c <_qq>:
 40c:   1166mov r5, -(sp)
 40e:   1185mov sp, r5
 410:   65c6 ff80   add $-200, sp
 414:   1180mov sp, r0
 416:   15e6 0003   mov $3, -(sp)
 41a:   15e6 1868   mov $14150, -(sp)
 41e:   1026mov r0, -(sp)
 420:   09f7 0326   jsr pc, 74a <_sprintf>
 424:   65c6 0006   add $6, sp
 428:   1585mov (sp)+, r5
 42a:   0087rts pc


The command "mov r5,sp" should be at the address 424

[Bug target/107841] Incorrect generation of the function's epilogue code when there is a _builtin_alloca call.

2022-11-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107841

--- Comment #1 from Andrew Pinski  ---
Patches are submitted to gcc-patches@ after reading
https://gcc.gnu.org/contribute.html