From 894460a754c74f27c9dff3d4ff0d8b1c45d1f8d6 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Fri, 7 Jun 2013 17:05:47 +0200 Subject: re PR fortran/57549 (Bogus error with array constructor with derived-type typespec) 2013-06-07 Tobias Burnus PR fortran/57549 * array.c (gfc_match_array_constructor): Call gfc_match_type_spec instead of gfc_match_decl_type_spec. * match.c (gfc_match_type_spec): Renamed from match_type_spec. (gfc_match_type_is, gfc_match_allocate): Update call. * match.h (gfc_match_type_spec): Add prototype. 2013-06-07 Tobias Burnus PR fortran/57549 * gfortran.dg/array_constructor_48.f90: New. * gfortran.dg/array_constructor_type_14.f03: Correct test case. * gfortran.dg/array_constructor_type_15.f03: Ditto. From-SVN: r199820 --- gcc/fortran/array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/fortran/array.c') diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c index c2ac1ec..c6b8eb9 100644 --- a/gcc/fortran/array.c +++ b/gcc/fortran/array.c @@ -1073,7 +1073,7 @@ gfc_match_array_constructor (gfc_expr **result) /* Try to match an optional "type-spec ::" */ gfc_clear_ts (&ts); gfc_new_undo_checkpoint (changed_syms); - if (gfc_match_decl_type_spec (&ts, 0) == MATCH_YES) + if (gfc_match_type_spec (&ts) == MATCH_YES) { seen_ts = (gfc_match (" ::") == MATCH_YES); -- cgit v1.1