aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r--gcc/fortran/trans-expr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index dda08bb..2258ce6 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -526,13 +526,14 @@ gfc_conv_cst_int_power (gfc_se * se, tree lhs, tree rhs)
memset (vartmp, 0, sizeof (vartmp));
vartmp[1] = lhs;
-
- se->expr = gfc_conv_powi (se, n, vartmp);
if (sgn == -1)
{
tmp = gfc_build_const (type, integer_one_node);
- se->expr = build (RDIV_EXPR, type, tmp, se->expr);
+ vartmp[1] = build (RDIV_EXPR, type, tmp, vartmp[1]);
}
+
+ se->expr = gfc_conv_powi (se, n, vartmp);
+
return 1;
}