From 8234e5e0e205db40a4b09067a875a50f111d6ef6 Mon Sep 17 00:00:00 2001 From: "Steven G. Kargl" Date: Sun, 23 Aug 2009 03:19:55 +0000 Subject: allocate_alloc_opt_4.f90: New test. 2009-08-22 Steven K. kargl * gfortran.dg/allocate_alloc_opt_4.f90: New test. * gfortran.dg/allocate_alloc_opt_5.f90: New test. * gfortran.dg/allocate_alloc_opt_6.f90: New test. 2009-08-22 Steven K. kargl * fortran/decl.c (match_char_spec): Rename to gfc_match_char_spec, and remove static. * fortran/gfortran.h: Add *expr3 entity to gfc_code. Add prototype for gfc_match_char_spec. * fortran/trans-stmt.c (gfc_trans_allocate): Translate the SOURCE= tag. * fortran/match.c (match_intrinsic_typespec): New function to match F2003 intrinsic-type-spec. (conformable_arrays): New function. Check SOURCE= and allocation-object are conformable. (gfc_match_allocate): Use new functions. Match SOURCE= tag. From-SVN: r151023 --- gcc/fortran/decl.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gcc/fortran/decl.c') diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index e4813b8..1533af5 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -2104,11 +2104,12 @@ no_match: return m; } + /* Match the various kind/length specifications in a CHARACTER declaration. We don't return MATCH_NO. */ -static match -match_char_spec (gfc_typespec *ts) +match +gfc_match_char_spec (gfc_typespec *ts) { int kind, seen_length, is_iso_c; gfc_charlen *cl; @@ -2324,7 +2325,7 @@ gfc_match_type_spec (gfc_typespec *ts, int implicit_flag) { ts->type = BT_CHARACTER; if (implicit_flag == 0) - return match_char_spec (ts); + return gfc_match_char_spec (ts); else return MATCH_YES; } @@ -2636,7 +2637,7 @@ gfc_match_implicit (void) /* Last chance -- check (). */ if (ts.type == BT_CHARACTER) - m = match_char_spec (&ts); + m = gfc_match_char_spec (&ts); else { m = gfc_match_kind_spec (&ts, false); -- cgit v1.1