summaryrefslogtreecommitdiff
path: root/gcc/fortran/expr.c
diff options
context:
space:
mode:
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-03 13:21:50 +0000
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-03 13:21:50 +0000
commitbc70e8cf3925c8ed80f807d896bded25071d4f89 (patch)
tree38b87eb240d110d5069eecd3848c7bb6a0d57705 /gcc/fortran/expr.c
parent4f12c67a32575785925eca79a8cc362753535426 (diff)
downloadgcc-bc70e8cf3925c8ed80f807d896bded25071d4f89.tar.gz
2012-06-03 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
Tobias Burnus <burnus@net-b.de> PR fortran/48831 * gfortran.h (gfc_check_init_expr): Add prototype declaration of function. * check.c (kind_check): Change if condition to use to gfc_check_init_expr. * expr.c (check_init_expr): Remove forward declaration and static keyword. Change name in gfc_check_init_expr. 2012-06-03 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com> PR fortran/48831 * gfortran.dg/parameter_array_element_2.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188152 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r--gcc/fortran/expr.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index bde62d58741..4765afa367f 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -1943,12 +1943,6 @@ et0 (gfc_expr *e)
}
-/* Check an intrinsic arithmetic operation to see if it is consistent
- with some type of expression. */
-
-static gfc_try check_init_expr (gfc_expr *);
-
-
/* Scalarize an expression for an elemental intrinsic call. */
static gfc_try
@@ -1994,7 +1988,7 @@ scalarize_intrinsic_call (gfc_expr *e)
for (; a; a = a->next)
{
/* Check that this is OK for an initialization expression. */
- if (a->expr && check_init_expr (a->expr) == FAILURE)
+ if (a->expr && gfc_check_init_expr (a->expr) == FAILURE)
goto cleanup;
rank[n] = 0;
@@ -2231,7 +2225,7 @@ check_init_expr_arguments (gfc_expr *e)
gfc_actual_arglist *ap;
for (ap = e->value.function.actual; ap; ap = ap->next)
- if (check_init_expr (ap->expr) == FAILURE)
+ if (gfc_check_init_expr (ap->expr) == FAILURE)
return MATCH_ERROR;
return MATCH_YES;
@@ -2319,7 +2313,7 @@ check_inquiry (gfc_expr *e, int not_restricted)
&ap->expr->where);
return MATCH_ERROR;
}
- else if (not_restricted && check_init_expr (ap->expr) == FAILURE)
+ else if (not_restricted && gfc_check_init_expr (ap->expr) == FAILURE)
return MATCH_ERROR;
if (not_restricted == 0
@@ -2437,8 +2431,8 @@ check_conversion (gfc_expr *e)
intrinsics in the context of initialization expressions. If
FAILURE is returned an error message has been generated. */
-static gfc_try
-check_init_expr (gfc_expr *e)
+gfc_try
+gfc_check_init_expr (gfc_expr *e)
{
match m;
gfc_try t;
@@ -2449,7 +2443,7 @@ check_init_expr (gfc_expr *e)
switch (e->expr_type)
{
case EXPR_OP:
- t = check_intrinsic_op (e, check_init_expr);
+ t = check_intrinsic_op (e, gfc_check_init_expr);
if (t == SUCCESS)
t = gfc_simplify_expr (e, 0);
@@ -2573,11 +2567,11 @@ check_init_expr (gfc_expr *e)
break;
case EXPR_SUBSTRING:
- t = check_init_expr (e->ref->u.ss.start);
+ t = gfc_check_init_expr (e->ref->u.ss.start);
if (t == FAILURE)
break;
- t = check_init_expr (e->ref->u.ss.end);
+ t = gfc_check_init_expr (e->ref->u.ss.end);
if (t == SUCCESS)
t = gfc_simplify_expr (e, 0);
@@ -2592,14 +2586,14 @@ check_init_expr (gfc_expr *e)
if (t == FAILURE)
break;
- t = gfc_check_constructor (e, check_init_expr);
+ t = gfc_check_constructor (e, gfc_check_init_expr);
if (t == FAILURE)
break;
break;
case EXPR_ARRAY:
- t = gfc_check_constructor (e, check_init_expr);
+ t = gfc_check_constructor (e, gfc_check_init_expr);
if (t == FAILURE)
break;
@@ -2629,7 +2623,7 @@ gfc_reduce_init_expr (gfc_expr *expr)
gfc_init_expr_flag = true;
t = gfc_resolve_expr (expr);
if (t == SUCCESS)
- t = check_init_expr (expr);
+ t = gfc_check_init_expr (expr);
gfc_init_expr_flag = false;
if (t == FAILURE)