summaryrefslogtreecommitdiffstats
path: root/gcc/fortran/primary.c
Commit message (Collapse)AuthorAgeFilesLines
...
* 2007-11-18 Tobias Burnus <burnus@net-b.de>burnus2007-11-181-2/+1
| | | | | | | | | | | | | | | | | PR fortran/34137 * primary.c (match_variable): Reject non-result entry symbols. * resolve.c (resolve_contained_fntype): Do not check entry * master functions. 2007-11-18 Tobias Burnus <burnus@net-b.de> PR fortran/34137 * gfortran.dg/entry_14.f90: New. * gfortran.dg/entry_15.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130270 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-10-02 Paul Thomas <pault@gcc.gnu.org>pault2007-10-021-7/+6
| | | | | | | | | | | | | | | PR fortran/33566 * primary.c (gfc_match_rvalue): Make all expressions with array references to structure parameters into variable expressions. 2007-10-02 Paul Thomas <pault@gcc.gnu.org> PR fortran/33566 * gfortran.dg/derived_comp_array_ref_5.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128951 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-09-22 Paul Thomas <pault@gcc.gnu.org>pault2007-09-221-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | PR fortran/33337 PR fortran/33376 * trans-decl.c (gfc_create_module_variable): Output derived type parameters. * arith.c (gfc_parentheses): Return the argument if it is a constant expression. * primary.c (gfc_match_rvalue): Remove the clearing of the module name and the use_assoc attribute for derived type parameter expressions. 2007-09-22 Paul Thomas <pault@gcc.gnu.org> PR fortran/33337 * gfortran.dg/derived_comp_array_ref_3.f90: New test. PR fortran/33376 * gfortran.dg/derived_comp_array_ref_4.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128672 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-09-05 Paul Thomas <pault@gcc.gnu.org>pault2007-09-051-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/31564 * primary.c (gfc_match_rvalue): Make expressions that refer to derived type parameters that have array references into variable expressions. Remove references to use association from the symbol. PR fortran/33241 * decl.c (add_init_expr_to_sym): Provide assumed character length parameters with the length of the initialization expression, if a constant, or that of the first element of an array. 2007-09-05 Paul Thomas <pault@gcc.gnu.org> PR fortran/31564 * gfortran.dg/derived_comp_array_ref_2.f90: New test. PR fortran/33241 * gfortran.dg/char_length_10.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128130 138bc75d-0d04-0410-961f-82ee72b054a4
* * primary.c (match_logical_constant_string): New function to matchsayle2007-08-191-7/+36
| | | | | | | | | a ".true." or a ".false.". (match_logical_constant): Use it instead of gfc_match_strings. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127620 138bc75d-0d04-0410-961f-82ee72b054a4
* * arith.c: Change copyright header to refer to version 3 of the GNU General nickc2007-08-011-4/+3
| | | | | | | | | | | | | | | | | | Public License and to point readers at the COPYING3 file and the FSF's license web page. * openmp.c, interface.c, intrinsic.c, trans-array.c, trans-expr.c, symbol.c, iso-fortran-env.def, intrinsic.h, decl.c, trans-array.h, matchexp.c, dump-parse-tree.c, trans-common.c, array.c, Make-lang.in, trans-openmp.c, gfortran.h, error.c, iso-c-binding.def, lang.opt, data.c, trans-const.c, trans-stmt.c, expr.c, trans-const.h, trans-stmt.h, module.c, trans.c, scanner.c, trans-types.c, trans.h, gfortranspec.c, trans-types.h, lang-specs.h, io.c, bbt.c, resolve.c, f95-lang.c, st.c, iresolve.c, match.c, trans-decl.c, trans-io.c, target-memory.c, match.h, target-memory.h, parse.c, arith.h, check.c, dependency.c, parse.h, types.def, convert.c, dependency.h, primary.c, trans-intrinsic.c, options.c, misc.c, simplify.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127129 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-07-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2007-07-271-0/+3
| | | | | | | | | | | Daniel Franke <franke.daniel@gmail.com> PR fortran/32760 * primary.c (match_variable): Do not call gfc_add_flavor if symbol has attribute of ACCESS_PUBLIC or ACCESS_PRIVATE already marked. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126981 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-07-01 Christopher D. Rickett <crickett@lanl.gov>kargl2007-07-021-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * interface.c (gfc_compare_derived_types): Special case for comparing derived types across namespaces. (gfc_compare_types): Deal with BT_VOID. (compare_parameter): Use BT_VOID to accept ISO C Binding pointers. * trans-expr.c (gfc_conv_function_call): Remove setting parm_kind to SCALAR (gfc_conv_initializer): Deal with ISO C Binding NULL_PTR and NULL_FUNPTR. (gfc_conv_expr): Convert expressions for ISO C Binding derived types. * symbol.c (gfc_set_default_type): BIND(C) variables should not be implicitly declared. (check_conflict): Add BIND(C) and check for conflicts. (gfc_add_explicit_interface): Whitespace. (gfc_add_is_bind_c): New function. (gfc_copy_attr): Use it. (gfc_new_symbol): Initialize ISO C Binding objects. (get_iso_c_binding_dt): New function. (verify_bind_c_derived_type): Ditto. (gen_special_c_interop_ptr): Ditto. (add_formal_arg): Ditto. (gen_cptr_param): Ditto. (gen_fptr_param): Ditto. (gen_shape_param): Ditto. (add_proc_interface): Ditto. (build_formal_args): Ditto. (generate_isocbinding_symbol): Ditto. (get_iso_c_sym): Ditto. * decl.c (num_idents_on_line, has_name_equals): New variables. (verify_c_interop_param): New function. (build_sym): Finish binding labels and deal with COMMON blocks. (add_init_expr_to_sym): Check if the initialized expression is an iso_c_binding named constants (variable_decl): Set ISO C Binding type_spec components. (gfc_match_kind_spec): Check match for C interoperable kind. (match_char_spec): Fix comment. Chnage gfc_match_small_int to gfc_match_small_int_expr. Check for C interoperable kind. (match_type_spec): Clear the current binding label. (match_attr_spec): Add DECL_IS_BIND_C. If BIND(C) is found, use it to set attributes. (set_binding_label): New function. (set_com_block_bind_c): Ditto. (verify_c_interop): Ditto. (verify_com_block_vars_c_interop): Ditto. (verify_bind_c_sym): Ditto. (set_verify_bind_c_sym): Ditto. (set_verify_bind_c_com_block): Ditto. (get_bind_c_idents): Ditto. (gfc_match_bind_c_stmt): Ditto. (gfc_match_data_decl): Use num_idents_on_line. (match_result): Deal with right paren in BIND(C). (gfc_match_suffix): New function. (gfc_match_function_decl): Use it. Code is re-arranged to deal with ISO C Binding result clauses. (gfc_match_subroutine): Deal with BIND(C). (gfc_match_bind_c): New function. (gfc_get_type_attr_spec): New function. Code is re-arranged in and taken from gfc_match_derived_decl. (gfc_match_derived_decl): Add check for BIND(C). * trans-common.c: Forward declare gfc_get_common. (gfc_sym_mangled_common_id): Change arg from 'const char *name' to 'gfc_common_head *com'. Check for ISO C Binding of the common block. (build_common_decl): 'com->name' to 'com in SET_DECL_ASSEMBLER_NAME. * gfortran.h: Add GFC_MAX_BINDING_LABEL_LEN (bt): Add BT_VOID (sym_flavor): Add FL_VOID. (iso_fortran_env_symbol, iso_c_binding_symbol, intmod_id): New enum (CInteropKind_t): New struct. (c_interop_kinds_table): Use it. Declare an array of structs. (symbol_attribute): Add is_bind_c, is_c_interop, and is_iso_c bitfields. (gfc_typespec): Add is_c_interop; is_iso_c, and f90_type members. (gfc_symbol): Add from_intmod, intmod_sym_id, binding_label, and common_block members. (gfc_common_head): Add binding_label and is_bind_c members. (gfc_gsymbol): Add sym_name, mod_name, and binding_label members. Add prototypes for get_c_kind, gfc_validate_c_kind, gfc_check_any_c_kind, gfc_add_is_bind_c, gfc_add_value, verify_c_interop, verify_c_interop_param, verify_bind_c_sym, verify_bind_c_derived_type, verify_com_block_vars_c_interop, generate_isocbinding_symbol, get_iso_c_sym, gfc_iso_c_sub_interface * iso-c-binding.def: New file. This file contains the definitions of the types provided by the Fortran 2003 ISO_C_BINDING intrinsic module. * trans-const.c (gfc_conv_constant_to_tree): Deal with C_NULL_PTR or C_NULL_FUNPTR expressions. * expr.c (gfc_copy_expr): Add BT_VOID case. For BT_CHARACTER, the ISO C Binding requires a minimum string length of 1 for '\0'. * module.c (intmod_sym): New struct. (pointer_info): Add binding_label member. (write_atom): Set len to 0 for NULL pointers. Check for NULL p and *p. (ab_attribute): Add AB_IS_BIND_C, AB_IS_C_INTEROP and AB_IS_ISO_C. (attr_bits): Add "IS_BIND_C", "IS_C_INTEROP", and "IS_ISO_C". (mio_symbol_attribute): Deal with ISO C Binding attributes. (bt_types): Add "VOID". (mio_typespec): Deal with ISO C Binding components. (mio_namespace_ref): Add intmod variable. (mio_symbol): Check for symbols from an intrinsic module. (load_commons): Check for BIND(C) common block. (read_module): Read binding_label and use it. (write_common): Add label. Write BIND(C) info. (write_blank_common): Blank commons are not BIND(C). Explicitly set is_bind_c=0. (write_symbol): Deal with binding_label. (sort_iso_c_rename_list): New function. (import_iso_c_binding_module): Ditto. (create_int_parameter): Add to args. (use_iso_fortran_env_module): Adjust to deal with iso_c_binding intrinsic module. * trans-types.c (c_interop_kinds_table): new array of structs. (gfc_validate_c_kind): New function. (gfc_check_any_c_kind): Ditto. (get_real_kind_from_node): Ditto. (get_int_kind_from_node): Ditto. (get_int_kind_from_width): Ditto. (get_int_kind_from_minimal_width): Ditto. (init_c_interop_kinds): Ditto. (gfc_init_kinds): call init_c_interop_kinds. (gfc_typenode_for_spec): Adjust for BT_VOID and ISO C Binding pointers. Adjust handling of BT_DERIVED. (gfc_sym_type): Whitespace. (gfc_get_derived_type): Account for iso_c_binding derived types * resolve.c (is_scalar_expr_ptr): New function. (gfc_iso_c_func_interface): Ditto. (resolve_function): Use gfc_iso_c_func_interface. (set_name_and_label): New function. (gfc_iso_c_sub_interface): Ditto. (resolve_specific_s0): Use gfc_iso_c_sub_interface. (resolve_bind_c_comms): New function. (resolve_bind_c_derived_types): Ditto. (gfc_verify_binding_labels): Ditto. (resolve_fl_procedure): Check for ISO C interoperability. (resolve_symbol): Check C interoperability. (resolve_types): Walk the namespace. Check COMMON blocks. * trans-decl.c (gfc_sym_mangled_identifier): Prevent the mangling of identifiers that have an assigned binding label. (gfc_sym_mangled_function_id): Use the binding label rather than the mangled name. (gfc_finish_var_decl): Put variables that are BIND(C) into a common segment of the object file, because this is what C would do. (gfc_create_module_variable): Conver to proper types (set_tree_decl_type_code): New function. (generate_local_decl): Check dummy variables and derived types for ISO C Binding attributes. * match.c (gfc_match_small_int_expr): New function. (gfc_match_name_C): Ditto. (match_common_name): Deal with ISO C Binding in COMMON blocks * trans-io.c (transfer_expr): Deal with C_NULL_PTR or C_NULL_FUNPTR expressions * match.h: Add prototypes for gfc_match_small_int_expr, gfc_match_name_C, match_common_name, set_com_block_bind_c, set_binding_label, set_verify_bind_c_sym, set_verify_bind_c_com_block, get_bind_c_idents, gfc_match_bind_c_stmt, gfc_match_suffix, gfc_match_bind_c, gfc_get_type_attr_spec * parse.c (decode_statement): Use gfc_match_bind_c_stmt (parse_derived): Init *derived_sym = NULL, and gfc_current_block later for valiadation. * primary.c (got_delim): Set ISO C Binding components of ts. (match_logical_constant): Ditto. (match_complex_constant): Ditto. (match_complex_constant): Ditto. (gfc_match_rvalue): Check for existence of at least one arg for C_LOC, C_FUNLOC, and C_ASSOCIATED. * misc.c (gfc_clear_ts): Clear ISO C Bindoing components in ts. (get_c_kind): New function. 2007-07-01 Christopher D. Rickett <crickett@lanl.gov> * Makefile.in: Add support for iso_c_generated_procs.c and iso_c_binding.c. * Makefile.am: Ditto. * intrinsics/iso_c_generated_procs.c: New file containing helper functions. * intrinsics/iso_c_binding.c: Ditto. * intrinsics/iso_c_binding.h: New file * gfortran.map: Include the __iso_c_binding_c_* functions. * libgfortran.h: define GFC_NUM_RANK_BITS. 2007-06-23 Christopher D. Rickett <crickett@lanl.gov> * bind_c_array_params.f03: New files for Fortran 2003 ISO C Binding. * bind_c_coms.f90: Ditto. * bind_c_coms_driver.c: Ditto. * bind_c_dts.f90: Ditto. * bind_c_dts_2.f03: Ditto. * bind_c_dts_2_driver.c: Ditto. * bind_c_dts_3.f03: Ditto. * bind_c_dts_4.f03: Ditto. * bind_c_dts_driver.c: Ditto. * bind_c_implicit_vars.f03: Ditto. * bind_c_procs.f03: Ditto. * bind_c_usage_2.f03: Ditto. * bind_c_usage_3.f03: Ditto. * bind_c_usage_5.f03: Ditto. * bind_c_usage_6.f03: Ditto. * bind_c_usage_7.f03: Ditto. * bind_c_vars.f90: Ditto. * bind_c_vars_driver.c: Ditto. * binding_c_table_15_1.f03: Ditto. * binding_label_tests.f03: Ditto. * binding_label_tests_10.f03: Ditto. * binding_label_tests_10_main.f03: Ditto. * binding_label_tests_11.f03: Ditto. * binding_label_tests_11_main.f03: Ditto. * binding_label_tests_12.f03: Ditto. * binding_label_tests_13.f03: Ditto. * binding_label_tests_13_main.f03: Ditto. * binding_label_tests_14.f03: Ditto. * binding_label_tests_2.f03: Ditto. * binding_label_tests_3.f03: Ditto. * binding_label_tests_4.f03: Ditto. * binding_label_tests_5.f03: Ditto. * binding_label_tests_6.f03: Ditto. * binding_label_tests_7.f03: Ditto. * binding_label_tests_8.f03: Ditto. * binding_label_tests_9.f03: Ditto. * c_assoc.f90: Ditto. * c_assoc_2.f03: Ditto. * c_f_pointer_shape_test.f90: Ditto. * c_f_pointer_tests.f90: Ditto. * c_f_tests_driver.c: Ditto. * c_funloc_tests.f03: Ditto. * c_funloc_tests_2.f03: Ditto. * c_funloc_tests_3.f03: Ditto. * c_funloc_tests_3_funcs.c: Ditto. * c_kind_params.f90: Ditto. * c_kind_tests_2.f03: Ditto. * c_kinds.c: Ditto. * c_loc_driver.c: Ditto. * c_loc_test.f90: Ditto. * c_loc_tests_2.f03: Ditto. * c_loc_tests_2_funcs.c: Ditto. * c_loc_tests_3.f03: Ditto. * c_loc_tests_4.f03: Ditto. * c_loc_tests_5.f03: Ditto. * c_loc_tests_6.f03: Ditto. * c_loc_tests_7.f03: Ditto. * c_loc_tests_8.f03: Ditto. * c_ptr_tests.f03: Ditto. * c_ptr_tests_10.f03: Ditto. * c_ptr_tests_5.f03: Ditto. * c_ptr_tests_7.f03: Ditto. * c_ptr_tests_7_driver.c: Ditto. * c_ptr_tests_8.f03: Ditto. * c_ptr_tests_8_funcs.c: Ditto. * c_ptr_tests_9.f03: Ditto. * c_ptr_tests_driver.c: Ditto. * c_size_t_driver.c: Ditto. * c_size_t_test.f03: Ditto. * com_block_driver.f90: Ditto. * global_vars_c_init.f90: Ditto. * global_vars_c_init_driver.c: Ditto. * global_vars_f90_init.f90: Ditto. * global_vars_f90_init_driver.c: Ditto. * interop_params.f03: Ditto. * iso_c_binding_only.f03: Ditto. * iso_c_binding_rename_1.f03: Ditto. * iso_c_binding_rename_1_driver.c: Ditto. * iso_c_binding_rename_2.f03: Ditto. * iso_c_binding_rename_2_driver.c: Ditto. * kind_tests_2.f03: Ditto. * kind_tests_3.f03: Ditto. * module_md5_1.f90: Ditto. * only_clause_main.c: Ditto. * print_c_kinds.f90: Ditto. * test_bind_c_parens.f03: Ditto. * test_c_assoc.c: Ditto. * test_com_block.f90: Ditto. * test_common_binding_labels.f03: Ditto. * test_common_binding_labels_2.f03: Ditto. * test_common_binding_labels_2_main.f03: Ditto. * test_common_binding_labels_3.f03: Ditto. * test_common_binding_labels_3_main.f03: Ditto. * test_only_clause.f90: Ditto. * use_iso_c_binding.f90: Ditto. * value_5.f90: Ditto. * value_test.f90: Ditto. * value_tests_f03.f90: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126185 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-06-24 Tobias Burnus <burnus@net-de>burnus2007-06-241-0/+14
| | | | | | | | | | | | | | | | | | | | PR fortran/32460 * interface.c (gfc_compare_derived_types): Add access check. * symbol.c (gfc_find_component): Ditto. (gfc_set_component_attr,gfc_get_component_attr) Copy access state. * dump-parse-tree.c (gfc_show_components): Dump access state. * gfortran.h (struct gfc_component): Add gfc_access. * module.c (mio_component): Add access state. * (gfc_match_structure_constructor): Check for private access state. 2007-06-24 Tobias Burnus <burnus@net-de> PR fortran/32460 * gfortran.dg/private_type_6.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125984 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-06-07 Steven G. Kargl <kargl@gcc.gnu.org>jvdelisle2007-06-081-32/+2
| | | | | | | | | | | | | | Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/32223 * match.c (gfc_match_special_char): New function. Match special char. Add handling '\0'. * match.h: Add prototype. * io.c (next_char): Use it. * primary.c (next_string_char): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125557 138bc75d-0d04-0410-961f-82ee72b054a4
* * gfortran.h (gfc_expr): Remove from_H, add "representation"brooks2007-05-281-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct. * primary.c (match_hollerith_constant): Store the representation of the Hollerith in representation, not in value.character. * arith.c: Add dependency on target-memory.h. (eval_intrinsic): Remove check for from_H. (hollerith2representation): New function. (gfc_hollerith2int): Determine value of the new constant. (gfc_hollerith2real): Likewise. (gfc_hollerith2complex): Likewise. (gfc_hollerith2logical): Likewise. (gfc_hollerith2character): Point both representation.string and value.character.string at the value string. * data.c (create_character_initializer): For BT_HOLLERITH rvalues, get the value from the representation rather than value.character. * expr.c (free_expr0): Update handling of BT_HOLLERITH values and values with representation.string. (gfc_copy_expr): Likewise. * intrinsic.c (do_simplify): Remove special treatement of variables resulting from Hollerith constants. * dump-parse-trees.c (gfc_show_expr): Update handling of Holleriths. * trans-const.c (gfc_conv_constant_to_tree): Replace from_H check with check for representation.string; get Hollerith representation from representation.string, not value.character. * trans-expr.c (is_zero_initializer_p): Replace from_H check with check for representation.string. * trans-stmt.c (gfc_trans_integer_select): Use gfc_conv_mpz_to_tree for case values, so as to avoid picking up the memory representation if the case is given by a transfer expression. * target-memory.c (gfc_target_encode_expr): Use the known memory representation rather than the value, if it exists. (gfc_target_interpret_expr): Store the memory representation of the interpreted expression as well as its value. (interpret_integer): Move to gfc_interpret_integer, make non-static. (interpret_float): Move to gfc_interpret_float, make non-static. (interpret_complex): Move to gfc_interpret_complex, make non-static. (interpret_logical): Move to gfc_interpret_logical, make non-static. (interpret_character): Move to gfc_interpret_character, make non-static. (interpret_derived): Move to gfc_interpret_derived, make non-static. * target-memory.h: Add prototypes for newly-exported gfc_interpret_* functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125135 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-05-11 Paul Thomas <pault@gcc.gnu.org>pault2007-05-111-8/+7
| | | | | | | | | | | | | | | | | | | | PR fortran/30876 * trans-expr.c (gfc_conv_function_call): Reduce indirection for direct assignments of recursive array valued functions. * primary.c (gfc_match_rvalue): Correct error for recursive function calls such that directly recursive calls of scalar function without an explicit result are disallowed. 2007-05-11 Paul Thomas <pault@gcc.gnu.org> PR fortran/30876 * gfortran.dg/recursive_reference_1.f90: Put error at correct line. * gfortran.dg/recursive_reference_2.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124616 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-04-23 Tobias Burnus <burnus@net-b.de>burnus2007-04-231-1/+2
| | | | | | | | | * primary.c (match_integer_constant): Mention -fno-range-check in the error message. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124060 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-04-15 Paul Thomas <pault@gcc.gnu.org>pault2007-04-151-0/+38
| | | | | | | | | | | | | | | | | | | | PR fortran/31204 * primary.c (check_for_implicit_index): New function to check that a host associated variable is not an undeclared implied do loop index. (gfc_match_rvalue, match_variable): Use it and reset the implied_index attribute. * gfortran.h : Add the implied_index field to symbol_attribute. * match.c (gfc_match_iterator): Mark the iterator variable with the new attribute. * decl.c (build_sym): Reset the new attribute. 2007-04-15 Paul Thomas <pault@gcc.gnu.org> PR fortran/31204 * gfortran.dg/array_constructor_16.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123849 138bc75d-0d04-0410-961f-82ee72b054a4
* +2007-04-14 Bernhard Fischeraldot2007-04-141-1/+2
| | | | | | | | | | * primary.c: Commentary typo fix; Add question about redundant (?) set. * ChangeLog: Fix formatting of previous ChangeLog entry which did not obey "'name" <name@there.tdl>' convention. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123821 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-04-13 Tobias Burnus <burnus@net-b.de>burnus2007-04-131-1/+2
| | | | | | | | | | | | | | | PR fortran/31559 * primary.c (match_variable): External functions are no variables. 2007-04-13 Tobias Burnus <burnus@net-b.de> PR fortran/31559 * gfortran.dg/func_assign.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123793 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/31266tobi2007-04-121-1/+8
| | | | | | | | | | | | | fortran/ * primary.c (gfc_variable_attr): Don't copy string length if it doesn't make sense. * resolve.c (resolve_code): Clarify error message. testsuite/ * gfortran.dg/char_assign_1.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123759 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-02-28 Tobias Burnus <burnus@net-b.de>burnus2007-02-281-2/+8
| | | | | | | | | | | | | | | | PR fortran/30968 * primary.c (next_string_char): Correct reading a character after the delimiter. (match_string_constant): Print warning message only once. 2007-02-28 Tobias Burnus <burnus@net-b.de> PR fortran/30968 * gfortran.dg/continuation_7.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122401 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>kargl2007-02-151-1/+4
| | | | | | | | | * primary.c (match_logical_constant): Return MATCH_ERROR on invalid kind. * gfortran.dg/logical_2.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121974 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-01-26 Steven Bosscher <stevenb.gcc@gmail.com>kargl2007-01-261-0/+3
| | | | | | | | | | | | | Steven G. Kargl <kargl@gcc.gnu,org> * testsuite/gfortran.dg/backslash_3.f: New test. * fortran/io.c (next_char): Deal with backslash escaped characters. Issue warnings in non -std=gnu cases. * fortran/primary.c (next_string_char): Issue warnings in non git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121218 138bc75d-0d04-0410-961f-82ee72b054a4
* * openmp.c, matchexp.c, module.c, scanner.c, resolve.c, st.c,kargl2007-01-201-86/+80
| | | | | | | | | parse.c, primary.c, options.c, misc.c, simplify.c: Next installment in the massive whitespace patch. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121012 138bc75d-0d04-0410-961f-82ee72b054a4
* 2006-12-31 Paul Thomas <pault@gcc.gnu.org>pault2006-12-311-4/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/23060 * intrinsic.c (compare_actual_formal ): Distinguish argument list functions from keywords. * intrinsic.c (sort_actual): If formal is NULL, the presence of an argument list function actual is an error. * trans-expr.c (conv_arglist_function) : New function to implement argument list functions %VAL, %REF and %LOC. (gfc_conv_function_call): Call it. * resolve.c (resolve_actual_arglist): Add arg ptype and check argument list functions. (resolve_function, resolve_call): Set value of ptype before calls to resolve_actual_arglist. * primary.c (match_arg_list_function): New function. (gfc_match_actual_arglist): Call it before trying for a keyword argument. 2006-12-31 Paul Thomas <pault@gcc.gnu.org> PR fortran/23060 * gfortran.dg/c_by_val.c: Called by c_by_val_1.f. * gfortran.dg/c_by_val_1.f: New test. * gfortran.dg/c_by_val_2.f: New test. * gfortran.dg/c_by_val_3.f: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120295 138bc75d-0d04-0410-961f-82ee72b054a4
* fortran/burnus2006-12-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-12-10 Tobias Burnus <burnus@net-b.de> PR fortran/23994 * interface.c (compare_actual_formal): PROTECTED is incompatible with intent(out). * symbol.c (check_conflict): Check for PROTECTED conflicts. (gfc_add_protected): New function. (gfc_copy_attr): Copy PROTECTED attribute. * decl.c (match_attr_spec): Add PROTECTED support. (gfc_match_protected): New function. * dump-parse-tree.c (gfc_show_attr): Add PROTECTED support. * gfortran.h (gfc_symbol): Add protected flag. Add gfc_add_protected prototype. * expr.c (gfc_check_pointer_assign): Add PROTECTED support. * module.c (ab_attribute, attr_bits, mio_symbol_attribute, mio_symbol_attribute): Add PROTECTED support. * resolve.c (resolve_equivalence): Add PROTECTED support. * match.c (gfc_match_assignment,)gfc_match_pointer_assignment: Check PROTECTED attribute. * match.h: Add gfc_match_protected prototype. * parse.c (decode_statement): Match PROTECTED statement. * primary.c (match_variable): Add PROTECTED support. testsuite/ 2006-12-10 Tobias Burnus <burnus@net-b.de> PR fortran/23994 * gfortran.dg/protected_1.f90: New test. * gfortran.dg/protected_2.f90: New test. * gfortran.dg/protected_3.f90: New test. * gfortran.dg/protected_4.f90: New test. * gfortran.dg/protected_5.f90: New test. * gfortran.dg/protected_6.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119709 138bc75d-0d04-0410-961f-82ee72b054a4
* fortran/burnus2006-11-201-1/+2
| | | | | | | | | | | | | | | | | | 2006-11-17 Tobias Burnus <burnus@net-b.de> PR fortran/27546 * primary.c (gfc_match_rvalue): Added IMPORT support. testsuite/ 2006-11-17 Tobias Burnus <burnus@net-b.de> PR fortran/27546 * gfortran.dg/import.f90: Extended test. * gfortran.dg/import2.f90: Extended test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119028 138bc75d-0d04-0410-961f-82ee72b054a4
* * lang.opt: Remove non-working -qkind= option.brooks2006-11-091-10/+0
| | | | | | | | | | | * gfortran.h (gfc_option_t): Remove q_kind member. * options.c (gfc_init_options): Remove q_kind initialization. (gfc_handle_option): Remove -qkind= option handling. * primary.c: (match_real_constant): Remove 'Q' exponent. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118614 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/29067fxcoudert2006-10-311-0/+1
| | | | | | | | | | | | | | | * decl.c (gfc_set_constant_character_len): NULL-terminate the character constant string. * data.c (create_character_intializer): Likewise. * expr.c (gfc_simplify_expr): NULL-terminate the substring character constant. * primary.c (match_hollerith_constant): NULL-terminate the character constant string. * gfortran.dg/pr29067.f: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118338 138bc75d-0d04-0410-961f-82ee72b054a4
* 2006-10-16 Tobias Burnus <burnus@net-b.de>burnus2006-10-181-1/+1
| | | | | | | | | | * primary.c: Revert 'significand'-to-'significant' comment change. * invoke.texi (Warning Options): Minor cleanup for -Wimplicit-interface. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117858 138bc75d-0d04-0410-961f-82ee72b054a4
* 2006-10-16 Tobias Burnus <burnus@net-b.de>burnus2006-10-161-1/+1
| | | | | | | | | | | | * trans-stmt.c: Fix a typo * invoke.texi: Fix typos * resolve.c: Fix a comment typo * trans-decl.c: Fix a comment typo * primary.c: Fix a comment typo git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117781 138bc75d-0d04-0410-961f-82ee72b054a4
* 2006-10-05 Erik Edelmann <edelmann@gcc.gnu.org>pault2006-10-081-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Paul Thomas <pault@gcc.gnu.org> PR fortran/20541 * interface.c (gfc_compare_derived_types): Add comparison of the allocatable field. * intrinsic.c (add_subroutines): Add MOVE_ALLOC. * trans-expr.c (gfc_conv_aliased_arg, gfc_trans_subarray_assign, gfc_trans_subcomponent_assign, gfc_conv_string_parameter, gfc_trans_scalar_assign): Add extra arguments l_is_temp and r_is_var to references to latter function. (gfc_conv_function_call): Add enum for types of argument and an associated variable parm_kind. Deallocate components of INTENT(OUT) and non-variable arrays. (gfc_trans_subcomponent_assign): Add block to assign arrays to allocatable components. (gfc_trans_scalar_assign): Add block to handle assignments of derived types with allocatable components, using the above new arguments to control allocation/deallocation of memory and the copying of allocated arrays. * trans-array.c (gfc_array_allocate): Remove old identification of pointer and replace with that of an allocatable array. Add nullify of structures with allocatable components. (gfc_conv_array_initializer): Treat EXPR_NULL. (gfc_conv_array_parameter): Deallocate allocatable components of non-variable structures. (gfc_trans_dealloc_allocated): Use second argument of library deallocate to inhibit, without error, freeing NULL pointers. (get_full_array_size): New function to return the size of a full array. (gfc_duplicate_allocatable): New function to allocate and copy allocated data. (structure_alloc_comps): New recursive function to deallocate, nullify or copy allocatable components. (gfc_nullify_alloc_comp, gfc_deallocate_alloc_comp, gfc_copy_alloc_comp): New interface functions to call previous. (gfc_trans_deferred_array): Add the code to nullify allocatable components, when entering scope, and to deallocate them on leaving. Do not call gfc_trans_static_array_pointer and return for structures with allocatable components and default initializers. * symbol.c (gfc_set_component_attr): Set allocatable field. (gfc_get_component_attr): Set the allocatable attribute. * intrinsic.h : Prototype for gfc_check_move_alloc. * decl.c (build_struct): Apply TR15581 constraints for allocatable components. (variable_decl): Default initializer is always NULL for allocatable components. (match_attr_spec): Allow, or not, allocatable components, according to the standard in force. * trans-array.h : Prototypes for gfc_nullify_alloc_comp, gfc_deallocate_alloc_comp, gfc_copy_alloc_comp and gfc_duplicate_allocatable. * gfortran.texi : Add mention of TR15581 extensions. * gfortran.h : Add attribute alloc_comp, add gfc_components field allocatable and add the prototype for gfc_expr_to_initialize. * trans-stmt.c (generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp, gfc_trans_where_assign, gfc_trans_where_3): Add extra arguments to calls to gfc_trans_scalar_assign and set appropriately. (gfc_trans_allocate): Nullify allocatable components. (gfc_trans_deallocate): Deallocate to ultimate allocatable components but stop at ultimate pointer components. * module.c (mio_symbol_attribute, mio_symbol_attribute, mio_component): Add module support for allocatable components. * trans-types.c (gfc_get_derived_type): Treat allocatable components. * trans.h : Add two boolean arguments to gfc_trans_scalar_assign. * resolve.c (resolve_structure_cons): Check conformance of constructor element and the component. (resolve_allocate_expr): Add expression to nullify the constructor expression for allocatable components. (resolve_transfer): Inhibit I/O of derived types with allocatable components. (resolve_fl_derived): Skip check of bounds of allocatable components. * trans-decl.c (gfc_get_symbol_decl): Add derived types with allocatable components to deferred variable. (gfc_trans_deferred_vars): Make calls for derived types with allocatable components to gfc_trans_deferred_array. (gfc_generate_function_code): Nullify allocatable component function result on entry. * parse.c (parse_derived): Set symbol attr.allocatable if allocatable components are present. * check.c (gfc_check_allocated): Enforce attr.allocatable for intrinsic arguments. (gfc_check_move_alloc): Check arguments of move_alloc. * primary.c (gfc_variable_attr): Set allocatable attribute. * intrinsic.texi : Add index entry and section for for move_alloc. PR fortran/29115 * resolve.c (resolve_structure_cons): It is an error if the pointer component elements of a derived type constructor are not pointer or target. PR fortran/29211 * trans-stmt.c (generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp): Provide a string length for the temporary by copying that of the other side of the scalar assignment. 2006-10-05 Paul Thomas <pault@gcc.gnu.org> Erik Edelmann <edelmann@gcc.gnu.org> PR libgfortran/20541 * Makefile.in : Add move_alloc. * intrinsics/move_alloc.c: New function. * Makefile.am : Add move_alloc. 2006-10-05 Erik Edelmann <edelmann@gcc.gnu.org> Paul Thomas <pault@gcc.gnu.org> PR fortran/20541 * gfortran.dg/alloc_comp_basics_1.f90: New test. * gfortran.dg/alloc_comp_basics_2.f90: New test. * gfortran.dg/alloc_comp_assign_1.f90: New test. * gfortran.dg/alloc_comp_assign_2.f90: New test. * gfortran.dg/alloc_comp_assign_3.f90: New test. * gfortran.dg/alloc_comp_assign_4.f90: New test. * gfortran.dg/alloc_comp_constraint_1.f90: New test. * gfortran.dg/alloc_comp_constraint_2.f90: New test. * gfortran.dg/alloc_comp_constraint_3.f90: New test. * gfortran.dg/alloc_comp_constructor_1.f90: New test. * gfortran.dg/alloc_comp_constructor_2.f90: New test. * gfortran.dg/alloc_comp_initializer_1.f90: New test. * gfortran.dg/alloc_comp_std.f90: New test. * gfortran.dg/move_alloc.f90: New test. PR fortran/29115 * gfortran.dg/derived_constructor_comps_2.f90: New test. PR fortran/29211 * gfortran.dg/forall_char_dependencies_1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117558 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/29210fxcoudert2006-10-021-0/+4
| | | | | | | | | | | * primary.c (match_sym_complex_part): Named constants as real or imaginary part of complex a named constant are only allowed in Fortran 2003. * gfortran.dg/complex_parameter_1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117368 138bc75d-0d04-0410-961f-82ee72b054a4
* 2006-09-18 Paul Thomas <pault@gcc.gnu.org>pault2006-09-181-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | PR fortran/28526 * primary.c (match_variable): If the compiler is in a module specification block, an interface block or a contains section, reset host_flag to force the changed symbols mechanism. PR fortran/29101 * trans-stmt.c (gfc_trans_character_select): Add the post block for the expression to the main block, after the call to select_string and the last label. 2006-09-18 Paul Thomas <pault@gcc.gnu.org> PR fortran/28526 * gfortran.dg/keyword_symbol_1.f90: New test. * gfortran.dg/spread_shape_1.f90: Add missing warning with pedantic compilation option. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117034 138bc75d-0d04-0410-961f-82ee72b054a4
* 2006-08-29 Steven G. Kargl <kargls@comcast.net>kargl2006-08-291-6/+10
| | | | | | | | | | | | | | | | | | | | | | PR fortran/28866 * match.c: Wrap copyright. (gfc_match_assignment): Return MATCH_NO for failed lvalue. Remove gotos. Move error handling of FL_PARAMETER to ... * gfc_match_if: Deal with MATCH_NO from above. * primary.c: Wrap copyright. (match_variable): ... here. Improve error messages. 2006-08-29 Steven G. Kargl <kargls@comcast.net> PR fortran/28866 * gfortran.dg/simpleif_2.f90: New test. * gfortran.dg/pr19936_1.f90: Adjust dg-error message. * gfortran.dg/enum_5.f90: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116570 138bc75d-0d04-0410-961f-82ee72b054a4
* 2006-08-20 Paul Thomas <pault@gcc.gnu.org>pault2006-08-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/28601 PR fortran/28630 * gfortran.h : Eliminate gfc_dt_list structure and reference to it in gfc_namespace. * resolve.c (resolve_fl_derived): Remove the building of the list of derived types for the current namespace. * symbol.c (find_renamed_type): New function to find renamed derived types by symbol name rather than symtree name. (gfc_use_derived): Search parent namespace for identical derived type and use it, even if local version is complete, except in interface bodies. Ensure that renamed derived types are found by call to find_renamed_type. Recurse for derived type components. (gfc_free_dt_list): Remove. (gfc_free_namespace): Remove call to previous. * trans-types.c (copy_dt_decls_ifequal): Remove. (gfc_get_derived_type): Remove all the paraphenalia for association of derived types, including calls to previous. * match.c (gfc_match_allocate): Call gfc_use_derived to associate any derived types that are being allocated. PR fortran/20886 * resolve.c (resolve_actual_arglist): The passing of a generic procedure name as an actual argument is an error. PR fortran/28735 * resolve.c (resolve_variable): Check for a symtree before resolving references. PR fortran/28762 * primary.c (match_variable): Return MATCH_NO if the symbol is that of the program. PR fortran/28425 * trans-expr.c (gfc_trans_subcomponent_assign): Translate derived type component expressions other than another derived type constructor. PR fortran/28496 * expr.c (find_array_section): Correct errors in the handling of a missing start value for the index triplet in an array reference. PR fortran/18111 * trans-decl.c (gfc_build_dummy_array_decl): Before resetting reference to backend_decl, set it DECL_ARTIFICIAL. (gfc_get_symbol_decl): Likewise for original dummy decl, when a copy is made of an array. (create_function_arglist): Likewise for the _entry paramter in entry_masters. (build_entry_thunks): Likewise for dummies in entry thunks. PR fortran/28600 * trans-decl.c (gfc_get_symbol_decl): Ensure that the DECL_CONTEXT of the length of a character dummy is the same as that of the symbol declaration. PR fortran/28771 * decl.c (add_init_expr_to_sym): Remove setting of charlen for an initializer of an assumed charlen variable. PR fortran/28660 * trans-decl.c (generate_expr_decls): New function. (generate_dependency_declarations): New function. (generate_local_decl): Call previous if not either a dummy or a declaration in an entry master. 2006-08-20 Paul Thomas <pault@gcc.gnu.org> PR fortran/28630 * gfortran.dg/used_types_2.f90: New test. PR fortran/28601 * gfortran.dg/used_types_3.f90: New test. PR fortran/20886 * gfortran.dg/generic_actual_arg.f90: New test. PR fortran/28735 * gfortran.dg/module_private_array_refs_1.f90: New test. PR fortran/28762 * gfortran.dg/program_name_1.f90: New test. PR fortran/28425 * gfortran.dg/derived_constructor_comps_1.f90: New test. PR fortran/28496 * gfortran.dg/array_initializer_2.f90: New test. PR fortran/18111 * gfortran.dg/unused_artificial_dummies_1.f90: New test. PR fortran/28600 * gfortran.dg/assumed_charlen_function_4.f90: New test. PR fortran/28771 * gfortran.dg/assumed_charlen_in_main.f90: New test. PR fortran/28660 * gfortran.dg/dependent_decls_1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116268 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/24748langton2006-06-221-1/+15
| | | | | | | | | | | | * primary.c (gfc_match_rvalue): Don't call match_substring for implicit non-character types. PR fortran/24748 * gfortran.dg/implicit_8.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114901 138bc75d-0d04-0410-961f-82ee72b054a4
* * options.c, primary.c, resolve.c, trans-common.c: Fix typoskazu2006-05-291-1/+1
| | | | | | | in error messages. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114183 138bc75d-0d04-0410-961f-82ee72b054a4
* 2006-05-21 Paul Thomas <pault@gcc.gnu.org>pault2006-05-211-0/+15
| | | | | | | | | | | | | | | | PR fortran/27613 * primary.c (gfc_match_rvalue): Test if symbol represents a direct recursive function reference. Error if array valued, go to function0 otherwise. 2006-05-21 Paul Thomas <pault@gcc.gnu.org> PR fortran/27613 * gfortran.dg/recursive_reference_1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113951 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/18540tobi2006-01-181-5/+3
| | | | | | | | | | | | | | | | | | | | | PR fortran/18937 * gfortran.h (BBT_HEADER): Move definition up. (gfc_st_label): Add BBT_HEADER, remove 'prev' and 'next'. * io.c (format_asterisk): Adapt initializer. * resolve.c (resolve_branch): Allow FORTRAN 66 cross-block GOTOs as extension. * symbol.c (compare_st_labels): New function. (gfc_free_st_label, free_st_labels, gfc_get_st_label): Convert to using balanced binary tree. * decl.c (match_char_length, gfc_match_old_kind_spec): Do away with 'cnt'. (warn_unused_label): Adapt to binary tree. * match.c (gfc_match_small_literal_int): Only set cnt if non-NULL. * primary.c (match_kind_param): Do away with cnt. Also converted the ChangeLog to use latin1 characters. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109914 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-12-10 Steven G. Kargl <kargls@comcast.net>kargl2005-12-161-1/+3
| | | | | | | | | | | | | | | | | PR fortran/25106 PR fortran/25055 * match.c (gfc_match_small_literal_int): Add cnt argument; (gfc_match_st_label,gfc_match_stopcode): Account for cnt argument. * match.h (gfc_match_small_literal_int): Update prototype. * decl.c (match_char_length,gfc_match_old_kind_spec): Account for cnt. * parse.c (next_free): Ditto. * primary.c (match_kind_param): Ditto. gfortran.dg/label_1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108692 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/25106fxcoudert2005-12-031-1/+1
| | | | | | | | | | | | | | | * parse.c (next_free): Use new prototype for gfc_match_st_label. Correctly emit hard error if a label is zero. * match.c (gfc_match_st_label): Never allow zero as a valid label. (gfc_match, gfc_match_do, gfc_match_goto): Use new prototype for gfc_match_st_label. * primary.c (): Use new prototype for gfc_match_st_label. * io.c (): Likewise. * match.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107999 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/24917kargl2005-11-271-34/+52
| | | | | | | | | | | * primary.c (match_boz_constant): Implement postfix BOZ constants; (match_string_constant): Peek for b, o, z, and x * gfortran.dg/boz_6.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107568 138bc75d-0d04-0410-961f-82ee72b054a4
* fortran/tobi2005-11-101-0/+9
| | | | | | | | | | | | | PR fortran/24643 * primary.c (match_varspec): Check for implicitly typed CHARACTER variables before matching substrings. testsuite/ PR fortran/24643 * gfortran.dg/implicit_6.f90, gfortran.dg/implicit_7.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106753 138bc75d-0d04-0410-961f-82ee72b054a4
* * primary.c (match_boz_constant): Add missing break after gfc_error.jakub2005-10-141-0/+6
| | | | | | | * gfortran.dg/boz_5.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@105420 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/23663jakub2005-09-201-4/+20
| | | | | | | | | | * primary.c (match_actual_arg): Handle ENTRY the same way as FUNCTION. * gfortran.fortran-torture/execute/entry_11.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104453 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/15586fxcoudert2005-09-171-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * arith.c (gfc_arith_error): Add translation support for error messages. * array.c (gfc_match_array_ref): Likewise. (gfc_match_array_spec): Likewise. * check.c (must_be): Add msgid convention to third argument. (same_type_check): Add translation support for error message. (rank_check): Likewise. (kind_value_check): Likewise. (gfc_check_associated): Correct typo. (gfc_check_reshape): Add translation support for error message. (gfc_check_spread): Likewise. * error.c (error_printf): Add nocmsgid convention to argument. (gfc_warning, gfc_notify_std, gfc_warning_now, gfc_warning_check) (gfc_error, gfc_error_now): Likewise. (gfc_status): Add cmsgid convention to argument. * expr.c (gfc_extract_int): Add translation support for error messages. (gfc_check_conformance): Add msgid convention to argument. (gfc_check_pointer_assign): Correct tabbing. * gfortran.h: Include intl.h header. Remove prototype for gfc_article. * gfortranspec.c: Include intl.h header. (lang_specific_driver): Add translation support for --version. * io.c (check_format): Add translation support for error message. (format_item_1): Likewise. (data_desc): Likewise. * matchexp.c: Likewise. * misc.c (gfc_article): Remove function. * module.c (bad_module): Use msgid convention. Add translation support for error messages. (require_atom): Add translation support for error messages. * parse.c (gfc_ascii_statement): Likewise. (gfc_state_name): Likewise. * primary.c (match_boz_constant): Reorganise error messages for translations. * resolve.c (resolve_entries): Likewise. (resolve_operator): Add translation support for error messages. (gfc_resolve_expr): Use msgid convention. Reorganise error messages for translations. (resolve_symbol): Add translation support for error messages. * symbol.c (gfc_add_procedure): Remove use of gfc_article function. * trans-const.c (gfc_build_string_const): Use msgid convention. * exgettext: Add a new nocmsgid convention for arguments that should be marked as no-c-format. * gcc.pot: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104372 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-09-09 Paul Thomas <pault@gcc.gnu.org>pault2005-09-091-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/18878 * module.c (find_use_name_n): Based on original find_use_name. Either counts number of use names for a given real name or returns use name n. (find_use_name, number_use_names): Interfaces to the function find_use_name_n. (read_module): Add the logic and calls to these functions, so that mutiple reuses of the same real name are loaded. 2005-09-09 Paul Thomas <pault@gcc.gnu.org> PR fortran/22304 PR fortran/23270 PR fortran/18870 PR fortran/16511 PR fortran/17917 * gfortran.h: Move definition of BLANK_COMMON_NAME from trans- common.c so that it is accessible to module.c. Add common_head field to gfc_symbol structure. Add field for the equivalence name AND new attr field, in_equivalence. * match.c (gfc_match_common, gfc_match_equivalence): In loops that flag common block equivalences, emit an error if the common blocks are different, using sym->common_head as the common block identifier. Ensure that symbols that are equivalence associated with a common block are marked as being in_common. * module.c (write_blank_common): New. (write_common): Use unmangled common block name. (load_equiv): New function ported from g95. (read_module): Call load_equiv. (write_equiv): New function ported from g95. Correct string referencing for gfc functions. Give module equivalences a unique name. (write_module): Call write_equiv and write_blank_common. * primary.c (match_variable) Old gfc_match_variable, made static and third argument provided to indicate if parent namespace to be visited or not. (gfc_match_variable) New. Interface to match_variable. (gfc_match_equiv_variable) New. Interface to match_variable. * trans-common.c (finish_equivalences): Provide the call to create_common with a gfc_common_header so that module equivalences are made external, rather than local. (find_equivalences): Ensure that all members in common block equivalences are marked as used. This prevents the subsequent call to this function from making local unions. * trans-decl.c (gfc_generate_function_code): Move the call to gfc_generate_contained_functions to after the call to gfc_trans_common so the use-associated, contained common blocks produce the correct references. (gfc_create_module_variable): Return for equivalenced symbols with existing backend declaration. 2005-09-09 Paul Thomas <pault@gcc.gnu.org> PR fortran/18878 * gfortran.dg/module_double_reuse.f90: New. 2005-09-09 Paul Thomas <pault@gcc.gnu.org> PR fortran/23270 PR fortran/22304 PR fortran/18870 PR fortran/17917 PR fortran/16511 * gfortran.dg/common_equivalence_1.f: New. * gfortran.dg/common_equivalence_2.f: New. * gfortran.dg/common_equivalence_3.f: New. * gfortran.dg/contained_equivalence_1.f90: New. * gfortran.dg/module_blank_common.f90: New. * gfortran.dg/module_commons_1.f90: New. * gfortran.dg/module_equivalence_1.f90: New. * gfortran.dg/nested_modules_1.f90: New. * gfortran.dg/g77/19990905-0.f: Remove XFAIL, rearrange equivalences and add comment to connect the test with the PR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104060 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-08-27 Erik Edelmann <erik.edelmann@iki.fi>tobi2005-08-271-1/+1
| | | | | | | | | | | | * trans-array.c (gfc_trans_deferred_array): Fix comments. 2005-08-27 Erik Schnetter <schnetter@aei.mpg.de> * primary.c (match_charkind_name): Fix typo in comment leading to function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103558 138bc75d-0d04-0410-961f-82ee72b054a4
* * primary.c (match_hollerith_constant): Fix typo.fxcoudert2005-08-061-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102814 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/18833jakub2005-08-061-8/+22
| | | | | | | | | | | | | | | | | | | PR fortran/20850 * primary.c (match_varspec): If equiv_flag, don't look at sym's attributes, call gfc_match_array_ref up to twice and don't do any substring or component processing. * resolve.c (resolve_equivalence): Transform REF_ARRAY into REF_SUBSTRING or nothing if needed. Check that substrings don't have zero length. * gfortran.dg/equiv_1.f90: New test. * gfortran.dg/equiv_2.f90: New test. * gfortran.fortran-torture/execute/equiv_2.f90: New test. * gfortran.fortran-torture/execute/equiv_3.f90: New test. * gfortran.fortran-torture/execute/equiv_4.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102801 138bc75d-0d04-0410-961f-82ee72b054a4
* * gfortran.h (MAX_ERROR_MESSAGE): Remove.jakub2005-07-141-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | (gfc_error_buf): Add allocated and index fields. Change message field from array to a pointer. * error.c (use_warning_buffer, error_ptr, warning_ptr): Remove. (cur_error_buffer): New variable. (error_char): Use cur_error_buffer->{message,index} instead of {warning,error}_{buffer.message,ptr}. Reallocate message buffer if too small. (gfc_warning, gfc_notify_std, gfc_error, gfc_error_now): Setup cur_error_buffer and its index rather than {warning,error}_ptr and use_warning_buffer. (gfc_warning_check, gfc_error_check): Don't print anything if message is NULL. (gfc_push_error): Allocate saved message with xstrdup. (gfc_pop_error): Free saved message with gfc_free. (gfc_free_error): New function. * primary.c (match_complex_constant): Call gfc_free_error if gfc_pop_error will not be called. * match.c (gfc_match_st_function): Likewise. * gfortran.dg/g77/cpp6.f: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102015 138bc75d-0d04-0410-961f-82ee72b054a4
* * primary.c (gfc_match_rvalue): Handle ENTRY the same wayjakub2005-07-081-4/+17
| | | | | | | | | as FUNCTION. * gfortran.fortran-torture/execute/entry_10.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101758 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud