From eac33acc64dff662c59c194ebb19d67ca6790272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Schl=C3=BCter?= Date: Tue, 8 Feb 2005 14:41:08 +0100 Subject: expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for EXPR_SUBSTRING. fortran/ * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for EXPR_SUBSTRING. (gfc_is_constant_expr): Check 'ref' to determine if substring reference is constant. (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'. (check_init_expr, check_restricted): Check 'ref' instead of 'op1' and 'op2'. * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'. testsuite/ * gfortran.dg/substr_1.f90: New test. From-SVN: r94735 --- gcc/fortran/module.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gcc/fortran/module.c') diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index 3670a3a..12d52c4 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -2483,8 +2483,7 @@ mio_expr (gfc_expr ** ep) case EXPR_SUBSTRING: e->value.character.string = (char *) mio_allocated_string (e->value.character.string); - mio_expr (&e->op1); - mio_expr (&e->op2); + mio_ref_list (&e->ref); break; case EXPR_STRUCTURE: -- cgit v1.1