diff options
author | tkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-01-05 17:15:17 +0000 |
---|---|---|
committer | tkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-01-05 17:15:17 +0000 |
commit | a03c61f80aa5b63832a3bf40e329f6d4e331fea5 (patch) | |
tree | 8c4081077c27175971eec83c26efa6ad349c7dde /gcc/fortran/dependency.c | |
parent | e60de63c235af7510193e4d075aff13992281c43 (diff) | |
download | gcc-a03c61f80aa5b63832a3bf40e329f6d4e331fea5.tar.gz |
2015-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/47674
* dependency.c: Update copyright years.
(gfc_discard_nops): Add prototype.
* dependency.c (discard_nops): Rename to gfc_discard_nops,
make non-static.
(gfc_discard_nops): Use gfc_discard_nops.
(gfc_dep_difference): Likewise.
* frontend-passes.c Update copyright years.
(realloc_strings): New function. Add prototype.
(gfc_run_passes): Call realloc_strings.
(realloc_string_callback): New function.
(create_var): Add prototype. Handle case of a
scalar character variable.
(optimize_trim): Do not handle allocatable variables.
2015-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/47674
* gfortran.dg/realloc_on_assign_25.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219193 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/dependency.c')
-rw-r--r-- | gcc/fortran/dependency.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/gcc/fortran/dependency.c b/gcc/fortran/dependency.c index 1bb5f33dfb1..c5825b8f819 100644 --- a/gcc/fortran/dependency.c +++ b/gcc/fortran/dependency.c @@ -243,8 +243,8 @@ gfc_dep_compare_functions (gfc_expr *e1, gfc_expr *e2, bool impure_ok) /* Helper function to look through parens, unary plus and widening integer conversions. */ -static gfc_expr* -discard_nops (gfc_expr *e) +gfc_expr * +gfc_discard_nops (gfc_expr *e) { gfc_actual_arglist *arglist; @@ -297,8 +297,8 @@ gfc_dep_compare_expr (gfc_expr *e1, gfc_expr *e2) if (e1 == NULL && e2 == NULL) return 0; - e1 = discard_nops (e1); - e2 = discard_nops (e2); + e1 = gfc_discard_nops (e1); + e2 = gfc_discard_nops (e2); if (e1->expr_type == EXPR_OP && e1->value.op.op == INTRINSIC_PLUS) { @@ -515,8 +515,8 @@ gfc_dep_difference (gfc_expr *e1, gfc_expr *e2, mpz_t *result) if (e1->ts.type != BT_INTEGER || e2->ts.type != BT_INTEGER) return false; - e1 = discard_nops (e1); - e2 = discard_nops (e2); + e1 = gfc_discard_nops (e1); + e2 = gfc_discard_nops (e2); /* Inizialize tentatively, clear if we don't return anything. */ mpz_init (*result); @@ -531,8 +531,8 @@ gfc_dep_difference (gfc_expr *e1, gfc_expr *e2, mpz_t *result) if (e1->expr_type == EXPR_OP && e1->value.op.op == INTRINSIC_PLUS) { - e1_op1 = discard_nops (e1->value.op.op1); - e1_op2 = discard_nops (e1->value.op.op2); + e1_op1 = gfc_discard_nops (e1->value.op.op1); + e1_op2 = gfc_discard_nops (e1->value.op.op2); /* Case 2: (X + c1) - X = c1. */ if (e1_op2->expr_type == EXPR_CONSTANT @@ -552,8 +552,8 @@ gfc_dep_difference (gfc_expr *e1, gfc_expr *e2, mpz_t *result) if (e2->expr_type == EXPR_OP && e2->value.op.op == INTRINSIC_PLUS) { - e2_op1 = discard_nops (e2->value.op.op1); - e2_op2 = discard_nops (e2->value.op.op2); + e2_op1 = gfc_discard_nops (e2->value.op.op1); + e2_op2 = gfc_discard_nops (e2->value.op.op2); if (e1_op2->expr_type == EXPR_CONSTANT) { @@ -597,8 +597,8 @@ gfc_dep_difference (gfc_expr *e1, gfc_expr *e2, mpz_t *result) if (e2->expr_type == EXPR_OP && e2->value.op.op == INTRINSIC_MINUS) { - e2_op1 = discard_nops (e2->value.op.op1); - e2_op2 = discard_nops (e2->value.op.op2); + e2_op1 = gfc_discard_nops (e2->value.op.op1); + e2_op2 = gfc_discard_nops (e2->value.op.op2); if (e1_op2->expr_type == EXPR_CONSTANT) { @@ -627,8 +627,8 @@ gfc_dep_difference (gfc_expr *e1, gfc_expr *e2, mpz_t *result) if (e1->expr_type == EXPR_OP && e1->value.op.op == INTRINSIC_MINUS) { - e1_op1 = discard_nops (e1->value.op.op1); - e1_op2 = discard_nops (e1->value.op.op2); + e1_op1 = gfc_discard_nops (e1->value.op.op1); + e1_op2 = gfc_discard_nops (e1->value.op.op2); if (e1_op2->expr_type == EXPR_CONSTANT) { @@ -642,8 +642,8 @@ gfc_dep_difference (gfc_expr *e1, gfc_expr *e2, mpz_t *result) if (e2->expr_type == EXPR_OP && e2->value.op.op == INTRINSIC_PLUS) { - e2_op1 = discard_nops (e2->value.op.op1); - e2_op2 = discard_nops (e2->value.op.op2); + e2_op1 = gfc_discard_nops (e2->value.op.op1); + e2_op2 = gfc_discard_nops (e2->value.op.op2); /* Case 11: (X - c1) - (X + c2) = -( c1 + c2). */ if (e2_op2->expr_type == EXPR_CONSTANT @@ -668,8 +668,8 @@ gfc_dep_difference (gfc_expr *e1, gfc_expr *e2, mpz_t *result) if (e2->expr_type == EXPR_OP && e2->value.op.op == INTRINSIC_MINUS) { - e2_op1 = discard_nops (e2->value.op.op1); - e2_op2 = discard_nops (e2->value.op.op2); + e2_op1 = gfc_discard_nops (e2->value.op.op1); + e2_op2 = gfc_discard_nops (e2->value.op.op2); /* Case 13: (X - c1) - (X - c2) = c2 - c1. */ if (e2_op2->expr_type == EXPR_CONSTANT @@ -685,8 +685,8 @@ gfc_dep_difference (gfc_expr *e1, gfc_expr *e2, mpz_t *result) { if (e2->expr_type == EXPR_OP && e2->value.op.op == INTRINSIC_MINUS) { - e2_op1 = discard_nops (e2->value.op.op1); - e2_op2 = discard_nops (e2->value.op.op2); + e2_op1 = gfc_discard_nops (e2->value.op.op1); + e2_op2 = gfc_discard_nops (e2->value.op.op2); /* Case 14: (c1 - X) - (c2 - X) == c1 - c2. */ if (gfc_dep_compare_expr (e1_op2, e2_op2) == 0) @@ -702,8 +702,8 @@ gfc_dep_difference (gfc_expr *e1, gfc_expr *e2, mpz_t *result) if (e2->expr_type == EXPR_OP && e2->value.op.op == INTRINSIC_PLUS) { - e2_op1 = discard_nops (e2->value.op.op1); - e2_op2 = discard_nops (e2->value.op.op2); + e2_op1 = gfc_discard_nops (e2->value.op.op1); + e2_op2 = gfc_discard_nops (e2->value.op.op2); /* Case 15: X - (X + c2) = -c2. */ if (e2_op2->expr_type == EXPR_CONSTANT @@ -723,8 +723,8 @@ gfc_dep_difference (gfc_expr *e1, gfc_expr *e2, mpz_t *result) if (e2->expr_type == EXPR_OP && e2->value.op.op == INTRINSIC_MINUS) { - e2_op1 = discard_nops (e2->value.op.op1); - e2_op2 = discard_nops (e2->value.op.op2); + e2_op1 = gfc_discard_nops (e2->value.op.op1); + e2_op2 = gfc_discard_nops (e2->value.op.op2); /* Case 17: X - (X - c2) = c2. */ if (e2_op2->expr_type == EXPR_CONSTANT |