This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/14236] dynamically-sized arrays break alloca()


------- Additional Comments From jsm at polyomino dot org dot uk  2004-02-21 10:56 -------
Subject: Re:  New: dynamically-sized arrays break
 alloca()

On Sat, 21 Feb 2004, aoliva at gcc dot gnu dot org wrote:

> If the same block contains a dynamically-sized array and alloca() calls, we
> release the memory allocated for both at the end of the block.  Oops.  This
> occurs in GCC 3.3.3, 3.4 CVS, mainline CVS and tree-ssa CVS (oh, and GCC 2.96 as
> well, but you don't want to know about that :-)

So where's the bug in this?  It looks just like what the documentation
says:

# (If you use both variable-length arrays and
# @code{alloca} in the same function, deallocation of a variable-length array
# will also deallocate anything more recently allocated with @code{alloca}.)



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14236


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]