diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2010-09-23 19:37:48 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2010-09-23 19:37:48 +0000 |
commit | 962b8a0e7e609d75dcb3e9b28bc381a4976695a9 (patch) | |
tree | f8f7c145a1029518e56592b7e60f7b1e09fcfabe /gcc/fortran | |
parent | 5109c83f9a7fbf224ff7c6a9b0c054dbe86da8f2 (diff) | |
download | gcc-962b8a0e7e609d75dcb3e9b28bc381a4976695a9.zip gcc-962b8a0e7e609d75dcb3e9b28bc381a4976695a9.tar.gz gcc-962b8a0e7e609d75dcb3e9b28bc381a4976695a9.tar.bz2 |
re PR fortran/45744 (ICE with -O1 in gfc_conv_expr_op, at fortran/trans-expr.c:1366)
2010-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45744
* frontend-passes.c (optimize_binop_array_assignment):
Only re-use lhs as intermediate storage if kind and type
parameters match.
2010-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45744
* gfortran.dg/dependency_36.f90: New test.
From-SVN: r164570
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/fortran/frontend-passes.c | 9 |
2 files changed, 16 insertions, 4 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index d57a449..02ab36d 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,9 +1,16 @@ +2010-09-23 Thomas Koenig <tkoenig@gcc.gnu.org> + + PR fortran/45744 + * frontend-passes.c (optimize_binop_array_assignment): + Only re-use lhs as intermediate storage if kind and type + parameters match. + 2010-09-23 Mikael Morin <mikael@gcc.gnu.org> PR fortran/45745 PR fortran/45648 - * trans-array.c (gfc_conv_expr_descriptor): Handle - ss->type == GFC_SS_INTRINSIC (for {l,u}bound intrinsics) case. + * trans-array.c (gfc_conv_expr_descriptor): Handle + ss->type == GFC_SS_INTRINSIC (for {l,u}bound intrinsics) case. 2010-09-23 Tobias Burnus <burnus@net-b.de> diff --git a/gcc/fortran/frontend-passes.c b/gcc/fortran/frontend-passes.c index b456f47..aefee62 100644 --- a/gcc/fortran/frontend-passes.c +++ b/gcc/fortran/frontend-passes.c @@ -122,8 +122,13 @@ optimize_binop_array_assignment (gfc_code *c, gfc_expr **rhs, bool seen_op) else if (seen_op && e->expr_type == EXPR_FUNCTION && e->rank > 0 && ! (e->value.function.esym && (e->value.function.esym->attr.elemental - || e->value.function.esym->attr.allocatable)) - && ! (e->value.function.isym && e->value.function.isym->elemental)) + || e->value.function.esym->attr.allocatable + || e->value.function.esym->ts.type != c->expr1->ts.type + || e->value.function.esym->ts.kind != c->expr1->ts.kind)) + && ! (e->value.function.isym + && (e->value.function.isym->elemental + || e->ts.type != c->expr1->ts.type + || e->ts.kind != c->expr1->ts.kind))) { gfc_code *n; |