From f1095c6610125311faab780336a8a05d6e4fd6df Mon Sep 17 00:00:00 2001 From: mikael Date: Fri, 31 Oct 2008 15:56:21 +0000 Subject: 2008-10-31 Mikael Morin PR fortran/35840 * expr.c (gfc_reduce_init_expr): New function, containing checking code from gfc_match_init_expr, so that checking can be deferred. (gfc_match_init_expr): Use gfc_reduce_init_expr. * io.c (check_io_constraints): Use gfc_reduce_init_expr instead of checking that the expression is a constant. * match.h (gfc_reduce_init_expr): Prototype added. 2008-10-31 Mikael Morin PR fortran/35840 * gfortran.dg/write_check4.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141497 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/fortran/io.c') diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index fb5ef3e4d46..cb89eddbe16 100644 --- a/gcc/fortran/io.c +++ b/gcc/fortran/io.c @@ -2973,7 +2973,7 @@ if (condition) \ { static const char * asynchronous[] = { "YES", "NO", NULL }; - if (dt->asynchronous->expr_type != EXPR_CONSTANT) + if (gfc_reduce_init_expr (dt->asynchronous) != SUCCESS) { gfc_error ("ASYNCHRONOUS= specifier at %L must be an initialization " "expression", &dt->asynchronous->where); -- cgit v1.2.1