This is the mail archive of the gcc-bugs@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]

[Bug fortran/29952] Flag to give runtime information " array temporary was created for argument"



------- Comment #5 from tkoenig at gcc dot gnu dot org  2008-07-24 09:27 -------
Subject: Bug 29952

Author: tkoenig
Date: Thu Jul 24 09:26:43 2008
New Revision: 138112

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138112
Log:
2008-07-24  Thomas Koenig  <tkoenig@gcc.gnu.org>

        PR fortran/29952
        * gfortran.h:  Add "warn_array_temp" to gfc_option_t.
        * lang.opt:  Add -Warray-temporaries.
        * invoke.texi:  Document -Warray-temporaries
        * trans-array.h (gfc_trans_create_temp_array):  Add argument of
        type *locus.
        (gfc_conv_loop_setup):  Likewise.
        * trans-array.c (gfc_trans_create_temp_array):  If
        -Warray-temporaries is given and locus is present, warn about
        creation of array temporaries.
        (gfc_trans_array_constructor_subarray):  Add locus to call
        of gfc_conv_loop_setup.
        (gfc_trans_array_constructor):  Add where argument.  Pass where
        argument to call of gfc_trans_create_temp_array.
        (gfc_add_loop_ss_code):  Add where argument.  Pass where argument
        to recursive call of gfc_add_loop_ss_code and to call of
        gfc_trans_array_constructor.
        (gfc_conv_loop_setup):  Add where argument.  Pass where argument
        to calls to gfc_add_loop_ss_code and to gfc_trans_create_temp_array.
        (gfc_conv_expr_descriptor):  Pass location to call of
        gfc_conv_loop_setup.
        (gfc_conv_array_parameter):  If -Warray-temporaries is given,
        warn about creation of temporary arrays.
        * trans-expr.c (gfc_conv_subref_array_arg):  Add where argument
        to call to gfc_conv_loop_setup.
        (gfc_conv_function_call):  Add where argument to call to
        gfc_trans_creat_temp_array.
        (gfc_trans_subarray_assign):  Likewise.
        (gfc_trans_assignment_1):  Add where argument to call to
        gfc_conv_loop_setup.
        * trans-stmt.c (gfc_conv_elemental_dependencies):  Add where
        argument to call to gfc_trans_create_temp_array.
        (gfc_trans_call):  Add where argument to call to gfc_conv_loop_setup.
        (generate_loop_for_temp_to_lhs):  Likewise.
        (generate_loop_for_rhs_to_temp):  Likewise.
        (compute_inner_temp_size):  Likewise.
        (gfc_trans-pointer_assign_need_temp):  Likewise.
        (gfc_evaluate_where_mask):  Likewise.
        (gfc_trans_where_assign):  Likewise.
        (gfc_trans_where_3):  Likewise.
        * trans-io.c (transfer_srray_component):  Add where argument
        to function. Add where argument to call to gfc_conv_loop_setup.
        (transfer_expr):  Add where argument to call to
        transfer_array_component.
        (gfc_trans_transfer):  Add where expression to call to
        gfc_conv_loop_setup.
        * trans-intrinsic.c (gfc_conv_intrinsic_anyall):  Add
        where argument to call to gfc_conv_loop_setup.
        (gfc_conv_intrinsic_count):  Likewise.
        (gfc_conv_intrinsic_arith):  Likewise.
        (gfc_conv_intrinsic_dot_product):  Likewise.
        (gfc_conv_intrinsic_minmaxloc):  Likewise.
        (gfc_conv_intrinsic_minmaxval):  Likewise.
        (gfc_conv_intrinsic_array_transfer):  Warn about
        creation of temporary array.
        Add where argument to call to gfc_trans_create_temp_array.
        * options.c (gfc_init_options):  Initialize gfc_option.warn_array_temp.
        (gfc_handle_option):  Set gfc_option.warn_array_temp.

2008-07-24  Thomas Koenig  <tkoenig@gcc.gnu.org>

        PR fortran/29952
        * gfortran.dg/array_temporaries_1.f90: New test case.


Added:
    trunk/gcc/testsuite/gfortran.dg/array_temporaries_1.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/invoke.texi
    trunk/gcc/fortran/lang.opt
    trunk/gcc/fortran/options.c
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/fortran/trans-array.h
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/fortran/trans-intrinsic.c
    trunk/gcc/fortran/trans-io.c
    trunk/gcc/fortran/trans-stmt.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]