compiler: Use backend interface for stack allocation.
commitd5d1c295d3217e4c1d9395f2feb6a5b11f738210
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Apr 2015 20:44:03 +0000 (30 20:44 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Apr 2015 20:44:03 +0000 (30 20:44 +0000)
treeea4d7673e4669f048a90928ef154e42a4227260d
parentc3578bfd5b381e1f808a7e2a2c2cc7343ea1203b
compiler: Use backend interface for stack allocation.

Stack allocation was being done by making a temporary variable and
taking its address.  This does not work when allocating in a loop
because every allocated variable will refer to the same address.
The backend now provides a way to safely allocate in a loop.

* go-gcc.cc (Gcc_backend::stack_allocation_expression): New
method.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222657 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/go/ChangeLog
gcc/go/go-gcc.cc
gcc/go/gofrontend/backend.h
gcc/go/gofrontend/expressions.cc
gcc/go/gofrontend/expressions.h