diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2017-07-24 09:50:28 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2017-07-24 09:50:28 +0000 |
commit | 213c3b7b7cb5f58193cb4ea81cd7313427fcf431 (patch) | |
tree | e15395f5809949b974874bb19800fb407b473453 /gcc/fortran | |
parent | ffe64f24cc285d2c65708305304dc07529e57ba5 (diff) | |
download | gcc-213c3b7b7cb5f58193cb4ea81cd7313427fcf431.zip gcc-213c3b7b7cb5f58193cb4ea81cd7313427fcf431.tar.gz gcc-213c3b7b7cb5f58193cb4ea81cd7313427fcf431.tar.bz2 |
re PR fortran/66102 (dependency mishandling with reallocation on assignment)
2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
Mikael Morin <mikael@gcc.gnu.org>
PR fortran/66102
* fortran/trans-array.c (gfc_conv_resolve_dependencies):
Break if dependency has been found.
2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
Mikael Morin <mikael@gcc.gnu.org>
PR fortran/66102
* gfortran.dg/realloc_on_assign_28.f90: New test.
Co-Authored-By: Mikael Morin <mikael@gcc.gnu.org>
From-SVN: r250471
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/fortran/trans-array.c | 5 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 048a835..96b445a 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2017-07-24 Thomas Koenig <tkoenig@gcc.gnu.org> + Mikael Morin <mikael@gcc.gnu.org> + + PR fortran/66102 + * fortran/trans-array.c (gfc_conv_resolve_dependencies): + Break if dependency has been found. + 2017-07-23 Alexander Monakov <amonakov@ispras.ru> * interface.c (pair_cmp): Fix gfc_symbol comparison. Adjust comment. diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 47e8c09..9efb531 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -4577,7 +4577,10 @@ gfc_conv_resolve_dependencies (gfc_loopinfo * loop, gfc_ss * dest, && gfc_check_dependency (dest_expr, ss_expr, false)) ss_info->data.scalar.needs_temporary = 1; - continue; + if (nDepend) + break; + else + continue; } if (dest_expr->symtree->n.sym != ss_expr->symtree->n.sym) |