This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] (Partial) Implementation of simplificaiton of CSHIFT
- From: Dominique d'HumiÃres <dominiq at lps dot ens dot fr>
- To: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Cc: fortran at gcc dot gnu dot org, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 21 Nov 2015 21:22:40 +0100
- Subject: Re: [PATCH] (Partial) Implementation of simplificaiton of CSHIFT
- Authentication-results: sourceware.org; auth=none
âdmâ is actually not used, the building problem is fixed by the patch (I did not rearrange the nested âifâs)
--- ../_clean/gcc/fortran/simplify.c 2015-11-21 20:59:57.000000000 +0100
+++ gcc/fortran/simplify.c 2015-11-21 21:06:30.000000000 +0100
@@ -1792,7 +1792,6 @@ gfc_expr *
gfc_simplify_cshift (gfc_expr *array, gfc_expr *shift, gfc_expr *dim)
{
gfc_expr *a, *result;
- int dm;
/* DIM is only useful for rank > 1, but deal with it here as one can
set DIM = 1 for rank = 1. */
@@ -1800,10 +1799,7 @@ gfc_simplify_cshift (gfc_expr *array, gf
{
if (!gfc_is_constant_expr (dim))
return NULL;
- dm = mpz_get_si (dim->value.integer);
}
- else
- dm = 1;
/* Copy array into 'a', simplify it, and then test for a constant array.
An unexpected expr_type causes an ICE. */
Dominique