summaryrefslogtreecommitdiff
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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 765c04f57c5..d363e6d3d5a 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -4407,10 +4407,10 @@ is_zero_initializer_p (gfc_expr * expr)
return expr->value.logical == 0;
case BT_COMPLEX:
- return mpfr_zero_p (expr->value.complex.r)
- && MPFR_SIGN (expr->value.complex.r) >= 0
- && mpfr_zero_p (expr->value.complex.i)
- && MPFR_SIGN (expr->value.complex.i) >= 0;
+ return mpfr_zero_p (mpc_realref (expr->value.complex))
+ && MPFR_SIGN (mpc_realref (expr->value.complex)) >= 0
+ && mpfr_zero_p (mpc_imagref (expr->value.complex))
+ && MPFR_SIGN (mpc_imagref (expr->value.complex)) >= 0;
default:
break;