diff options
author | tkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-06-15 10:30:09 +0000 |
---|---|---|
committer | tkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-06-15 10:30:09 +0000 |
commit | 97944d89766ea6c406471e88b8e660b749001775 (patch) | |
tree | 06d0b13a15e2aaf26aced996353a9955adcfce96 /gcc/fortran/trans-expr.c | |
parent | 4db29121a6f5c43125cca8986e1cfbb682a23409 (diff) | |
download | ppe42-gcc-97944d89766ea6c406471e88b8e660b749001775.tar.gz ppe42-gcc-97944d89766ea6c406471e88b8e660b749001775.zip |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114677 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r-- | gcc/fortran/trans-expr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 44143d168e2..c99372acc14 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; |