This is the mail archive of the gcc-patches@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] |
:ADDPATCH fortran: Hello world, this fixes PR 27980, where we passed on negative lengths for functions returning arrays. Regression-tested on i686-pc-linux-gnu. OK? Thomas 2006-06-13 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 wether 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-13 Thomas Koenig <Thomas.Koenig@online.de> * gfortran.dg/allocate_zerosize_2.f90: New test case.
Attachment:
allocate_zerosize_2.f90
Description: Text document
Attachment:
PR27980.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |