aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/simplify.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index bf8702f..ea1177f 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,5 +1,11 @@
2019-10-02 Steven G. Kargl <kargl@gcc.gnu.org>
+ PR fortran/91784
+ * simplify.c (gfc_convert_constant): Simplify expression if the
+ expression type is EXPR_OP.
+
+2019-10-02 Steven G. Kargl <kargl@gcc.gnu.org>
+
PR fortran/91785
* primary.c (gfc_match_varspec): Ensure an inquiry parameter has
it locus set.
diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c
index 3d2fc0d..32ebcc0 100644
--- a/gcc/fortran/simplify.c
+++ b/gcc/fortran/simplify.c
@@ -8508,10 +8508,10 @@ gfc_convert_constant (gfc_expr *e, bt type, int kind)
{
if (c->expr->expr_type == EXPR_ARRAY)
tmp = gfc_convert_constant (c->expr, type, kind);
- else if (c->expr->expr_type == EXPR_OP
- && c->expr->value.op.op == INTRINSIC_PARENTHESES)
+ else if (c->expr->expr_type == EXPR_OP)
{
- gfc_simplify_expr (c->expr, 1);
+ if (!gfc_simplify_expr (c->expr, 1))
+ return &gfc_bad_expr;
tmp = f (c->expr, kind);
}
else