aboutsummaryrefslogtreecommitdiff
path: root/gcc/bitmap.cc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2024-05-03 09:44:30 +0200
committerJakub Jelinek <jakub@redhat.com>2024-05-03 09:44:30 +0200
commit7117e1f6bf6de25c1ff26c4d7abcc79b407ca221 (patch)
tree2b0d42c1b012fc3cd3897f4258987b53d8ab28a6 /gcc/bitmap.cc
parent87e35da16df74cd1c4729a55d94e7bc592487f48 (diff)
downloadgcc-7117e1f6bf6de25c1ff26c4d7abcc79b407ca221.zip
gcc-7117e1f6bf6de25c1ff26c4d7abcc79b407ca221.tar.gz
gcc-7117e1f6bf6de25c1ff26c4d7abcc79b407ca221.tar.bz2
tree-inline: Add __builtin_stack_{save,restore} pair about inline calls with calls to alloca [PR113596]
The following patch adds save_NNN = __builtin_stack_save (); ... __builtin_stack_restore (save_NNN); pair around inline calls which call alloca (alloca calls because of VLA vars are ignored in that decision). The patch doesn't change anything on whether we try to inline such calls or not, it just fixes the behavior when we inline them despite those checks. The stack save/restore restores the behavior that alloca acquired regions are freed at the end of the containing call. 2024-05-03 Jakub Jelinek <jakub@redhat.com> PR middle-end/113596 * tree-inline.cc (expand_call_inline): Emit __builtin_stack_save and __builtin_stack_restore calls around inlined functions which call alloca. * gcc.dg/pr113596.c: New test. * gcc.dg/tree-ssa/pr113596.c: New test.
Diffstat (limited to 'gcc/bitmap.cc')
0 files changed, 0 insertions, 0 deletions