aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2000-02-10 18:43:55 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2000-02-10 17:43:55 +0000
commit44affdae265bcadbdf427891e0fd5b19482c2527 (patch)
tree02119dfa6dac153abf42977119e842424bfe64f0 /gcc/function.c
parent715bdd81177d2e691d07c19c1a4e48d63474ed81 (diff)
downloadgcc-44affdae265bcadbdf427891e0fd5b19482c2527.zip
gcc-44affdae265bcadbdf427891e0fd5b19482c2527.tar.gz
gcc-44affdae265bcadbdf427891e0fd5b19482c2527.tar.bz2
function.c (assign_temp): Change zero-sized arrays to size 1.
* function.c (assign_temp): Change zero-sized arrays to size 1. * integrate.c (expand_inline_function): Do not update stack_alignment_needed * i386.c (compute_frame_size): Remove #ifdef PREFERRED_FRAME_BOUNDARY, add some sanity checking, remove optimization for function with zero frame size. From-SVN: r31898
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 9f96031..1170742 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -837,6 +837,11 @@ assign_temp (type, keep, memory_required, dont_promote)
HOST_WIDE_INT size = int_size_in_bytes (type);
rtx tmp;
+ /* Zero sized arrays are GNU C extension. Set size to 1 to avoid
+ problems with allocating the stack space. */
+ if (size == 0)
+ size = 1;
+
/* Unfortunately, we don't yet know how to allocate variable-sized
temporaries. However, sometimes we have a fixed upper limit on
the size (which is stored in TYPE_ARRAY_MAX_SIZE) and can use that