aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-expr.c
diff options
context:
space:
mode:
authorThomas Koenig <Thomas.Koenig@online.de>2006-06-15 10:30:09 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2006-06-15 10:30:09 +0000
commitda4340a1ac90357925a7606b39e94fef133ecd13 (patch)
tree06d0b13a15e2aaf26aced996353a9955adcfce96 /gcc/fortran/trans-expr.c
parente4ec6e1983e27559fdb37d9a458ba0c6b19e3fe8 (diff)
downloadgcc-da4340a1ac90357925a7606b39e94fef133ecd13.zip
gcc-da4340a1ac90357925a7606b39e94fef133ecd13.tar.gz
gcc-da4340a1ac90357925a7606b39e94fef133ecd13.tar.bz2
trans-array.h (gfc_trans_create_temp_array): Add bool argument.
2006-06-15 Thomas Koenig <Thomas.Koenig@online.de> * trans-array.h (gfc_trans_create_temp_array): Add bool argument. * trans-arrray.c (gfc_trans_create_temp_array): Add extra argument "function" to show if we are translating a function. If we are translating a function, perform checks whether the size along any argument is negative. In that case, allocate size 0. (gfc_trans_allocate_storage): Add function argument (as false) to gfc_trans_create_temp_array call. * trans-expr.c (gfc_conv_function_call): Add function argument (as true) to gfc_trans_create_temp_array call. * trans-stmt.c (gfc_conv_elemental_dependencies): Add function argument (as false) to gfc_trans_create_temp_array call. * trans-intrinsic.c: Likewise. 2006-06-15 Thomas Koenig <Thomas.Koenig@online.de> * gfortran.dg/allocate_zerosize_2.f90: New test case. From-SVN: r114677
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r--gcc/fortran/trans-expr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 44143d1..c99372a 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -2042,7 +2042,8 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym,
mustn't be deallocated. */
callee_alloc = sym->attr.allocatable || sym->attr.pointer;
gfc_trans_create_temp_array (&se->pre, &se->post, se->loop, info, tmp,
- false, !sym->attr.pointer, callee_alloc);
+ false, !sym->attr.pointer, callee_alloc,
+ true);
/* Pass the temporary as the first argument. */
tmp = info->descriptor;