[Bug fortran/27980] [4.1 only] Wrong allocation for zero-sized function result

fxcoudert at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Jun 19 22:42:00 GMT 2006



------- Comment #4 from fxcoudert at gcc dot gnu dot org  2006-06-19 22:29 -------
Was fixed on mainline by

r114677 | tkoenig | 2006-06-15 12:30:09 +0200 (Thu, 15 Jun 2006) | 23 lines

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.


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
      Known to fail|                            |4.1.2
      Known to work|                            |4.2.0
            Summary|Wrong allocation for zero-  |[4.1 only] Wrong allocation
                   |sized function result       |for zero-sized function
                   |                            |result
   Target Milestone|---                         |4.1.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27980



More information about the Gcc-bugs mailing list