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/66089] [6 Regression] elemental dependency mishandling when derived types are involved


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66089

--- Comment #13 from Mikael Morin <mikael at gcc dot gnu.org> ---
Author: mikael
Date: Fri Feb  5 21:41:15 2016
New Revision: 233188

URL: https://gcc.gnu.org/viewcvs?rev=233188&root=gcc&view=rev
Log:
Fix fortran scalar elemental dependency mishandling

        PR fortran/66089
gcc/fortran/
        * trans-expr.c (expr_is_variable, gfc_expr_is_variable): Rename
        the former to the latter and make it non-static.  Update callers.
        * gfortran.h (gfc_expr_is_variable): New declaration.
        (struct gfc_ss_info): Add field needs_temporary.
        * trans-array.c (gfc_scalar_elemental_arg_saved_as_argument):
        Tighten the condition on aggregate expressions with a check
        that the expression is a variable and doesn't need a temporary.
        (gfc_conv_resolve_dependency): Add intermediary reference variable.
        Set the needs_temporary field.
gcc/testsuite/
        * gfortran.dg/elemental_dependency_6.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/elemental_dependency_6.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/fortran/trans.h
    trunk/gcc/testsuite/ChangeLog

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