summaryrefslogtreecommitdiff
path: root/gcc/fortran/dependency.c
diff options
context:
space:
mode:
authormikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-10 23:38:54 +0000
committermikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-10 23:38:54 +0000
commit1274527bc25e9d8b4d0a2eba008d9a65235dc7d4 (patch)
treeb44ce4567a0486b93326f709e0f8118283d0f9f1 /gcc/fortran/dependency.c
parent3058a4cee34b0a419dac24f1615be6bc9a955dfc (diff)
downloadgcc-1274527bc25e9d8b4d0a2eba008d9a65235dc7d4.tar.gz
2010-09-11 Mikael Morin <mikael@gcc.gnu.org>
* gfortran.h (gfc_expr): Remove inline_noncopying_intrinsic attribute. * dependency.c (gfc_check_dependency): Don't depend on expr's inline_noncopying_intrinsic_attribute. * dependency.c (gfc_check_argument_var_dependency, gfc_check_argument_dependency): Ditto. Recursively check dependency as NOT_ELEMENTAL in the non-copying (=transpose) case. * trans-intrinsic.c (gfc_conv_intrinsic_function): Ditto. * resolve.c (find_noncopying_intrinsics): Remove. (resolve_function, resolve_call): Remove call to find_noncopying_intrinsics. * trans-array.c (gfc_conv_array_transpose): Remove. (gfc_walk_subexpr): Make non-static. Move prototype... * trans-array.h (gfc_walk_subexpr): ... here. * trans-intrinsic.c (gfc_conv_intrinsic_function): Update transpose handling. (walk_inline_intrinsic_transpose, walk_inline_intrinsic_function, gfc_inline_intrinsic_function_p): New. (gfc_is_intrinsic_libcall): Return early in inline intrinsic case. Remove transpose from the libcall list. (gfc_walk_intrinsic_function): Special case inline intrinsic. * trans.h (gfc_inline_intrinsic_function_p): New prototype. 2010-09-11 Mikael Morin <mikael@gcc.gnu.org> * gfortran.dg/inline_transpose_1.f90: Update temporary's locations and counts. Check that transpose is not called. * gfortran.dg/transpose_2.f90: Update error message. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164205 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/dependency.c')
-rw-r--r--gcc/fortran/dependency.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/gcc/fortran/dependency.c b/gcc/fortran/dependency.c
index ab14e33df64..ee66d216ab5 100644
--- a/gcc/fortran/dependency.c
+++ b/gcc/fortran/dependency.c
@@ -627,11 +627,15 @@ gfc_check_argument_var_dependency (gfc_expr *var, sym_intent intent,
return gfc_check_dependency (var, expr, 1);
case EXPR_FUNCTION:
- if (intent != INTENT_IN && expr->inline_noncopying_intrinsic
- && (arg = gfc_get_noncopying_intrinsic_argument (expr))
- && gfc_check_argument_var_dependency (var, intent, arg, elemental))
- return 1;
- if (elemental)
+ if (intent != INTENT_IN)
+ {
+ arg = gfc_get_noncopying_intrinsic_argument (expr);
+ if (arg != NULL)
+ return gfc_check_argument_var_dependency (var, intent, arg,
+ NOT_ELEMENTAL);
+ }
+
+ if (elemental != NOT_ELEMENTAL)
{
if ((expr->value.function.esym
&& expr->value.function.esym->attr.elemental)
@@ -683,12 +687,11 @@ gfc_check_argument_dependency (gfc_expr *other, sym_intent intent,
return gfc_check_argument_var_dependency (other, intent, expr, elemental);
case EXPR_FUNCTION:
- if (other->inline_noncopying_intrinsic)
- {
- other = gfc_get_noncopying_intrinsic_argument (other);
- return gfc_check_argument_dependency (other, INTENT_IN, expr,
- elemental);
- }
+ other = gfc_get_noncopying_intrinsic_argument (other);
+ if (other != NULL)
+ return gfc_check_argument_dependency (other, INTENT_IN, expr,
+ NOT_ELEMENTAL);
+
return 0;
default:
@@ -962,8 +965,9 @@ gfc_check_dependency (gfc_expr *expr1, gfc_expr *expr2, bool identical)
return 1;
case EXPR_FUNCTION:
- if (expr2->inline_noncopying_intrinsic)
+ if (gfc_get_noncopying_intrinsic_argument (expr2) != NULL)
identical = 1;
+
/* Remember possible differences between elemental and
transformational functions. All functions inside a FORALL
will be pure. */