PR middle-end/65958
commit6ad0a0bc2db129994d44470b070e91d9584f0132
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 4 Dec 2015 11:57:15 +0000 (4 11:57 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 4 Dec 2015 11:57:15 +0000 (4 11:57 +0000)
treed944ebe798474d59975ae0092d6818956e8aeba8
parent6a979f7343cd3d573484c65cdf16907261f2991a
PR middle-end/65958
* gimplify.c (struct gimplify_ctx): Turn boolean fields into 1-bit
fields, add keep_stack and reorder them.
(gimplify_bind_expr): Save gimplify_ctxp->keep_stack on entry then
set it to false.  Do not insert a stack save/restore pair if it has
been set to true by the gimplification of the statements.
Restore it to the saved value on exit if it is still false.
(gimplify_vla_decl): Do not set gimplify_ctxp->save_stack here.
(gimplify_call_expr) <BUILT_IN_ALLOCA[_WITH_ALIGN]>: New case.  Set
either save_stack or keep_stack depending on CALL_ALLOCA_FOR_VAR_P.
* doc/extend.texi (Variable Length): Document new behavior.
* doc/generic.texi (Blocks): Document new handling of VLAs.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231260 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/doc/extend.texi
gcc/doc/generic.texi
gcc/gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vla-24.c [new file with mode: 0644]