This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/66089] [6 Regression] elemental dependency mishandling when derived types are involved
- From: "mikael at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 05 Feb 2016 21:41:49 +0000
- Subject: [Bug fortran/66089] [6 Regression] elemental dependency mishandling when derived types are involved
- Auto-submitted: auto-generated
- References: <bug-66089-4 at http dot gcc dot gnu dot org/bugzilla/>
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