diff options
author | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-10-02 07:17:01 +0000 |
---|---|---|
committer | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-10-02 07:17:01 +0000 |
commit | 67a51c8e3d9eb46daa0c5b5adc058e4b6d08e8fd (patch) | |
tree | 26f64a0d0161584dc4242168347be17a7d00656a /gcc/fortran/parse.h | |
parent | a3026e61894b8b805e871f77235b68eaa275e897 (diff) | |
download | gcc-67a51c8e3d9eb46daa0c5b5adc058e4b6d08e8fd.tar.gz |
2007-10-02 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31154
PR fortran/31229
PR fortran/33334
* decl.c : Declare gfc_function_kind_locs and
gfc_function_type_locus.
(gfc_match_kind_spec): Add second argument kind_expr_only.
Store locus before trying to match the expression. If the
current state corresponds to a function declaration and there
is no match to the expression, read to the parenthesis, return
kind = -1, dump the expression and return.
(gfc_match_type_spec): Renamed from match_type_spec and all
references changed. If an interface or an external function,
store the locus, set kind = -1 and return. Otherwise, if kind
is already = -1, use gfc_find_symbol to try to find a use
associated or imported type.
match.h : Prototype for gfc_match_type_spec.
* parse.c (match_deferred_characteristics): New function.
(parse_spec): If in a function, statement is USE or IMPORT
or DERIVED_DECL and the function kind=-1, call
match_deferred_characteristics. If kind=-1 at the end of the
specification expressions, this is an error.
* parse.h : Declare external gfc_function_kind_locs and
gfc_function_type_locus.
2007-10-02 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31154
PR fortran/31229
PR fortran/33334
* gfortran.dg/function_kinds_1.f90: New test.
* gfortran.dg/function_kinds_2.f90: New test.
* gfortran.dg/derived_function_interface_1.f90: Correct illegal
use association into interfaces.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128948 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/parse.h')
-rw-r--r-- | gcc/fortran/parse.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/fortran/parse.h b/gcc/fortran/parse.h index 92806ba49a5..307d59a0ff8 100644 --- a/gcc/fortran/parse.h +++ b/gcc/fortran/parse.h @@ -66,5 +66,7 @@ const char *gfc_ascii_statement (gfc_statement); match gfc_match_enum (void); match gfc_match_enumerator_def (void); void gfc_free_enum_history (void); +extern locus gfc_function_kind_locus; +extern locus gfc_function_type_locus; #endif /* GFC_PARSE_H */ |