-
- Downloads
re PR fortran/34429 (Fails: character(len=use_associated_const) function foo())
2008-01-17 Paul Thomas <pault@gcc.gnu.org> PR fortran/34429 PR fortran/34431 PR fortran/34471 * decl.c : Remove gfc_function_kind_locus and gfc_function_type_locus. Add gfc_matching_function. (match_char_length): If matching a function and the length does not match, return MATCH_YES and try again later. (gfc_match_kind_spec): The same. (match_char_kind): The same. (gfc_match_type_spec): The same for numeric and derived types. (match_prefix): Rename as gfc_match_prefix. (gfc_match_function_decl): Except for function valued character lengths, defer applying kind, type and charlen info until the end of specification block. gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS. parse.c (decode_specification_statement): New function. (decode_statement): Call it when a function has kind = -1. Set and reset gfc_matching function, as function statement is being matched. (match_deferred_characteristics): Simplify with a single call to gfc_match_prefix. Do appropriate error handling. In any case, make sure that kind = -1 is reset or corrected. (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS. Throw an error if kind = -1 after last specification statement. parse.h : Prototype for gfc_match_prefix. 2008-01-17 Paul Thomas <pault@gcc.gnu.org> PR fortran/34429 * gfortran.dg/function_charlen_1.f90: New test. PR fortran/34431 * gfortran.dg/function_types_1.f90: New test. * gfortran.dg/function_types_2.f90: New test. PR fortran/34471 * gfortran.dg/function_kinds_4.f90: New test. * gfortran.dg/function_kinds_5.f90: New test. * gfortran.dg/defined_operators_1.f90: Errors now at function declarations. * gfortran.dg/private_type_4.f90: The same. * gfortran.dg/interface_15.f90: The same. * gfortran.dg/elemental_args_check_2.f90: The same. * gfortran.dg/auto_internal_assumed.f90: The same. From-SVN: r131592
Showing
- gcc/fortran/ChangeLog 28 additions, 0 deletionsgcc/fortran/ChangeLog
- gcc/fortran/decl.c 79 additions, 34 deletionsgcc/fortran/decl.c
- gcc/fortran/gfortran.h 1 addition, 1 deletiongcc/fortran/gfortran.h
- gcc/fortran/misc.c 1 addition, 1 deletiongcc/fortran/misc.c
- gcc/fortran/parse.c 202 additions, 28 deletionsgcc/fortran/parse.c
- gcc/fortran/parse.h 2 additions, 3 deletionsgcc/fortran/parse.h
- gcc/testsuite/ChangeLog 20 additions, 0 deletionsgcc/testsuite/ChangeLog
- gcc/testsuite/gfortran.dg/auto_internal_assumed.f90 2 additions, 2 deletionsgcc/testsuite/gfortran.dg/auto_internal_assumed.f90
- gcc/testsuite/gfortran.dg/defined_operators_1.f90 8 additions, 8 deletionsgcc/testsuite/gfortran.dg/defined_operators_1.f90
- gcc/testsuite/gfortran.dg/elemental_args_check_2.f90 2 additions, 2 deletionsgcc/testsuite/gfortran.dg/elemental_args_check_2.f90
- gcc/testsuite/gfortran.dg/function_charlen_1.f90 23 additions, 0 deletionsgcc/testsuite/gfortran.dg/function_charlen_1.f90
- gcc/testsuite/gfortran.dg/function_kinds_4.f90 56 additions, 0 deletionsgcc/testsuite/gfortran.dg/function_kinds_4.f90
- gcc/testsuite/gfortran.dg/function_kinds_5.f90 10 additions, 0 deletionsgcc/testsuite/gfortran.dg/function_kinds_5.f90
- gcc/testsuite/gfortran.dg/function_types_1.f90 12 additions, 0 deletionsgcc/testsuite/gfortran.dg/function_types_1.f90
- gcc/testsuite/gfortran.dg/function_types_2.f90 104 additions, 0 deletionsgcc/testsuite/gfortran.dg/function_types_2.f90
- gcc/testsuite/gfortran.dg/interface_15.f90 2 additions, 2 deletionsgcc/testsuite/gfortran.dg/interface_15.f90
- gcc/testsuite/gfortran.dg/private_type_4.f90 2 additions, 2 deletionsgcc/testsuite/gfortran.dg/private_type_4.f90
Loading
Please register or sign in to comment