aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/decl.c
AgeCommit message (Collapse)AuthorFilesLines
2005-04-29[multiple changes]Jakub Jelinek1-2/+3
2005-04-29 Jakub Jelinek <jakub@redhat.com> PR fortran/13082 PR fortran/18824 * trans-expr.c (gfc_conv_variable): Handle return values in functions with alternate entry points. * resolve.c (resolve_entries): Remove unnecessary string termination after snprintf. Set result of entry master. If all entries have the same type, set entry master's type to that common type, otherwise set mixed_entry_master attribute. * trans-types.c (gfc_get_mixed_entry_union): New function. (gfc_get_function_type): Use it for mixed_entry_master functions. * gfortran.h (symbol_attribute): Add mixed_entry_master bit. * decl.c (gfc_match_entry): Set entry->result properly for function ENTRY. * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over __entry argument. (build_entry_thunks): Handle return values in entry thunks. Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not shared between multiple contexts. (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from current_function_decl instead of sym->backend_decl. Skip over entry master's entry id argument. For mixed_entry_master entries or their results, return a COMPONENT_REF of the fake result. (gfc_trans_deferred_vars): Don't warn about missing return value if at least one entry point uses RESULT. (gfc_generate_function_code): For entry master returning CHARACTER, copy ts.cl->backend_decl to all entry result syms. * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return values optional just because they are in entry master. * gfortran.dg/entry_4.f90: New test. * gfortran.fortran-torture/execute/entry_1.f90: New test. * gfortran.fortran-torture/execute/entry_2.f90: New test. * gfortran.fortran-torture/execute/entry_3.f90: New test. * gfortran.fortran-torture/execute/entry_4.f90: New test. * gfortran.fortran-torture/execute/entry_5.f90: New test. * gfortran.fortran-torture/execute/entry_6.f90: New test. * gfortran.fortran-torture/execute/entry_7.f90: New test. 2005-04-29 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de> * gfortran.fortran-torture/execute/entry_8.f90: New test. From-SVN: r98993
2005-04-05re PR fortran/15959 (ICE and assertion failure in trans-decl.c with ↵Feng Wang1-0/+53
character initialization) 2005-04-05 Feng Wang <fengwang@nudt.edu.cn> PR fortran/15959 PR fortran/20713 * array.c (resolve_character_array_constructor): New function. Set constant character array's character length. (gfc_resolve_array_constructor): Use it. * decl.c (add_init_expr_to_sym): Set symbol and initializer character length. (gfc_set_constant_character_len): New function. Set constant character expression according the given length. * match.h (gfc_set_constant_character_len): Add prototype. 2005-04-05 Feng Wang <fengwang@nudt.edu.cn> * gfortran.dg/pr15959.f90: New test. * gfortran.dg/string_pad_trunc.f90: New test. From-SVN: r97613
2005-04-01decl.c, [...]: Fix comment typos.Kazu Hirata1-2/+2
* decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c, trans.h: Fix comment typos. From-SVN: r97364
2005-03-12Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.Kaveh R. Ghazi1-1/+1
* Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error. * decl.c, trans.c: Don't use C++ style comments. * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access, ifsrc): Give names to enums and use ENUM_BITFIELD. (gfc_access): Remove trailing comma. From-SVN: r96323
2005-02-24* decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).Volker Reichelt1-1/+1
From-SVN: r95518
2005-02-07gfortran.h (gfc_add_dimension, [...]): Add argument.Tobias Schlüter1-33/+40
* gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data, gfc_add_in_namelist, gfc_add_sequence, gfc_add_function, gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry, gfc_add_procedure): Add argument. * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name, gfc_match_null, match_type_spec, match_attr_spec, gfc_match_formal_arglist, match_result, gfc_match_function_decl): Update callers to match. (gfc_match_entry) : Likewise, fix comment typo. (gfc_match_subroutine, attr_decl1, gfc_add_dimension, access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc, gfc_match_derived_decl): Update callers. * interface.c (gfc_match_interface): Likewise. * match.c (gfc_match_label, gfc_add_flavor, gfc_match_call, gfc_match_common, gfc_match_block_data, gfc_match_namelist, gfc_match_module, gfc_match_st_function): Likewise. * parse.c (parse_derived, parse_interface, parse_contained), primary.c (gfc_match_rvalue, gfc_match_variable): Likewise. * resolve.c (resolve_formal_arglist, resolve_entries): Update callers. * symbol.c (check_conflict, check_used): Add new 'name' argument, use when printing error message. (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data, gfc_add_in_namelist, gfc_add_sequence, gfc_add_function, gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry, gfc_add_procedure): Add new 'name' argument. Pass along to check_conflict and check_used. (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic, gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental, gfc_add_pure, gfc_add_recursive, gfc_add_intent, gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new argument in calls to any of the modified functions. From-SVN: r94718
2005-01-18arith.c, [...]: Update copyright.Kazu Hirata1-1/+1
* arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c, match.c, matchexp.c, misc.c, module.c, options.c, parse.c, scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c, trans-io.c, trans-stmt.c, trans.c: Update copyright. From-SVN: r93830
2005-01-03arith.c: Add system.h; remove string.hSteven G. Kargl1-1/+1
* arith.c: Add system.h; remove string.h * decl.c: Ditto * matchexp.c: Ditto * parse.c: Ditto * resolve.c: Ditto * st.c: Ditto * check.c: Remove stdlib.h and stdarg.h * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h * f95-lang.c: Add system.h; remove stdio.h * interface.c: Add system.h; remove stdlib.h and string.h * intrinsic.c: Remove stdarg.h, stdio.h, and string.h * io.c: Remove string.h * simplify.c: Ditto * match.c: Remove stdarg.h and string.h * misc.c: Update copyright; add system.h; remove stdlib.h, string.h, and sys/stat.h * module.c: Add system.h; remove string.h, stdio.h, errno.h, unistd.h, and time.h * option.c: Remove string.h and stdlib.h * primary.c: Ditto * scanner.c: Update copyright; add system.h; remove stdlib.h, stdio.h, string.h, and strings.h * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h * trans-array.c: Remove stdio.h and gmp.h * trans-const.c: Ditto * trans-expr.c: Ditto * trans-io.c: Ditto * trans-stmt.c: Ditto * trans.c: Ditto * trans-intrinsic.c: Remove stdio.h and string.h From-SVN: r92866
2004-12-08* decl.c (gfc_match_end): Use locus of END when eos is an error.Tobias Schlüter1-2/+2
From-SVN: r91899
2004-11-08arith.c, [...]: Fix comment formatting.Kazu Hirata1-2/+2
* arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h, gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c, module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c, trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c, trans.h: Fix comment formatting. From-SVN: r90266
2004-09-25* decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.Tobias Schlüter1-2/+3
From-SVN: r88104
2004-09-16array.c, [...]: Fix comment typos.Kazu Hirata1-1/+1
* array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c, interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h, resolve.c, scanner.c, trans-array.c, trans-array.h, trans-common.c, trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c, trans.h: Fix comment typos. Follow spelling conventions. From-SVN: r87605
2004-09-14data.c, [...]: Fix comment typos.Kazu Hirata1-1/+1
* data.c, decl.c, f95-lang.c, gfortran.h, match.c, trans-array.c, trans-common.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix comment typos. Follow spelling conventions. From-SVN: r87492
2004-08-29re PR fortran/13910 (Cannot initialize variables with declation as allowed ↵Tobias Schlüter1-0/+417
by g77) fortran/ PR fortran/13910 * decl.c (free_variable, free_value, gfc_free_data, var_list, var_element, top_var_list, match_data_constant, top_val_list, gfc_match_data): Move here from match.c. (match_old_style_init): New function. (variable_decl): Match old-style initialization. * expr.c (gfc_get_variable_expr): New function. * gfortran.h (gfc_get_variable_expr): Add prototype. * gfortran.texi: Start documentation for supported extensions. * match.c: Remove the functions moved to decl.c. * match.h (gfc_match_data): Move prototype to under decl.c. * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct comments. testsuite/ PR fortran/13910 * gfortran.dg/oldstyle_1.f90: New test. From-SVN: r86729
2004-08-27gfortran.h (gfc_default_*_kind): Remove prototypes, add extern variable ↵Tobias Schlüter1-8/+8
declaration of same name. * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern variable declaration of same name. * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c, intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c, resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c: Replace all calls to gfc_default_*_kind with variable accesses. * trans-types.c: Same as above. (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove static qualifier. Replace all occurences. (gfc_default_*_kind): Remove functions. From-SVN: r86662
2004-08-25arith.c (gfc_validate_kind): Add may_fail argument; abort if false and we ↵Richard Henderson1-4/+4
don't validate the kind. * arith.c (gfc_validate_kind): Add may_fail argument; abort if false and we don't validate the kind. (gfc_check_integer_range, gfc_check_real_range): Update to match. * check.c (kind_check): Likewise. * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise. (match_char_spec, match_logical_spec): Likewise. * gfortran.h (gfc_validate_kind): Likewise. * options.c (gfc_handle_option): Likewise. * primary.c (match_integer_constant, match_real_constant, match_string_constant, match_logical_constant, match_const_complex_part): Likewise. * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits, gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr, gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc, gfc_simplify_maxexponent, gfc_simplify_minexponent, gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision, gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing, gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan, gfc_simplify_tiny): Likewise. * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod, gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval, prepare_arg_info): Likewise. From-SVN: r86608
2004-08-17re PR fortran/13082 (Function entries and entries with alternate returns not ↵Paul Brook1-29/+49
implemented) 2004-08-17 Paul Brook <paul@codesourcery.com> Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de> PR fortran/13082 * decl.c (get_proc_name): Update mystery comment. (gfc_match_entry): Check for errors earlier. Add entry point to list. * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes. * gfortran.h (symbol_attribute): Add entry_master. Document entry. (struct gfc_entry_list): Define. (gfc_get_entry_list): Define. (struct gfc_namespace): Add refs and entries. (enum gfc_exec_op): Add EXEC_ENTRY. (struct gfc_code): Add ext.entry. * module.c (ab_attribute, attr_bits): Remove AB_ENTRY. (mio_symbol_attribute): Don't save/reture addr->entry. (mio_namespace_ref): Refcount namespaces. * parse.c (accept_statement): Handle ST_ENTRY. (gfc_fixup_sibling_symbols): Mark symbol as referenced. (parse_contained): Fixup sibling references to entry points after parsing the procedure body. * resolve.c (resolve_contained_fntype): New function. (merge_argument_lists, resolve_entries): New functions. (resolve_contained_functions): Use them. (resolve_code): Handle EXEC_ENTRY. (gfc_resolve): Call resolve_entries. * st.c (gfc_free_statement): Handle EXEC_ENTRY. * symbol.c (gfc_get_namespace): Refcount namespaces. (gfc_free_namespace): Ditto. * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as optional when multiple entry points are present. * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check. (gfc_get_extern_function_decl): Add assertion. Fix coment. (create_function_arglist, trans_function_start, build_entry_thunks): New functions. (gfc_build_function_decl): Rename ... (build_function_decl): ... to this. (gfc_create_function_decl): New function. (gfc_generate_contained_functions): Use it. (gfc_trans_entry_master_switch): New function. (gfc_generate_function_code): Use new functions. * trans-stmt.c (gfc_trans_entry): New function. * trans-stmt.h (gfc_trans_entry): Add prototype. * trans-types.c (gfc_get_function_type): Add entry point argument. * trans.c (gfc_trans_code): Handle EXEC_ENTRY. (gfc_generate_module_code): Call gfc_create_function_decl. * trans.h (gfc_build_function_decl): Remove. (gfc_create_function_decl): Add prototype. testsuite/ * gfortran.dg/entry_1.f90: New test. Co-Authored-By: Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de> From-SVN: r86128
2004-07-11re PR fortran/16336 (ICE with common block in module)Tobias Schlüter1-8/+1
PR fortran/16336 * decl.c (gfc_match_save): Use-associated common block doesn't collide. * gfortran.h (gfc_common_head): Add new field 'name'. Fix typo in comment after #endif. * match.c (gfc_get_common): Add new argument from_common, mangle name if flag is set, fill in new field in structure gfc_common_head. (match_common): Set new arg in call to gfc_get_common, use-associated common block doesn't collide. * match.h (gfc_get_common): Adapt prototype. * module.c (load_commons): Set new arg in call to gfc_get_common. * symbol.c (free_common_tree): New function. (gfc_free_namespace): Call new function. * trans-common.c (several functions): Remove argument 'name', use name from gfc_common_head instead. From-SVN: r84476
2004-07-03decl.c (gfc_match_implicit_range): Don't use typespec.Paul Brook1-29/+44
* decl.c (gfc_match_implicit_range): Don't use typespec. (gfc_match_implicit): Handle character selectors. * gfortran.h (gfc_set_implicit): Remove prototype. (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update. * parse.c (accept_statement): Don't call gfc_set_implicit. * symbol.c (new_ts): Remove. (gfc_set_implicit_none): Use same loop bounds as other functions. (gfc_set_implicit): Remove. (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags. (gfc_merge_new_implicit): Combine with gfc_set_implicit. testsuite/ * gfortran.fortran-torture/compile/implicit_1.f90: New test. From-SVN: r84063
2004-06-30re PR fortran/16161 ([gfortran] IMPLICIT CHARACTER not implemented)Tobias Schlüter1-8/+215
fortran/ PR fortran/16161 * decl.c (gfc_match_type_spec): Rename second argument to 'implicit_flag', reverse meaning. Don't match_char_spec if 'implicit_flag' is set. Rename to ... (match_type_spec): ... this. (gfc_match_implicit_none, match_implicit_range): Move here from match.c. (gfc_match_implicit): Move here from match.c, try to match_char_len if match_implicit_range doesn't succeed for CHARACTER implicits. Call renamed fucntion match_type_spec. (gfc_match_data_decl, match_prefix): Call renamed function match_type_spec. * match.c (gfc_match_implicit_none, match_implicit_range, gfc_match_implicit): Move to decl.c. * match.h (gfc_match_implicit_none, gfc_match_implicit): Move protoypes to section 'decl.c'. (gfc_match_type_spec): Remove prototype. testsuite/ PR fortran/16161 * gfortran.fortran-torture/compile/implicit.f90: Add test for implicit character. From-SVN: r83907
2004-06-30decl.c, [...]: Add 2004 to copyright years.Tobias Schlüter1-1/+1
* decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to copyright years. Co-Authored-By: Andrew Vaught <andyv@firstinter.net> From-SVN: r83878
2004-06-29Revert previous accidental commit.Tobias Schlüter1-215/+8
From-SVN: r83875
2004-06-29dump-parse-tree.c (show_common): New function.Tobias Schlüter1-8/+215
* dump-parse-tree.c (show_common): New function. (gfc_show_namespace): Show commons. From-SVN: r83874
2004-06-29Andrew Vaught <andyv@firstinter.net>Tobias Schlüter1-3/+13
2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de> Andrew Vaught <andyv@firstinter.net> PR fortran/13249 PR fortran/15481 * declc (gfc_match_save): Adapt to new common structures, don't allow saving USE-associated common. * dump-parse-tree (gfc_show_attr): (saved_)common are not symbol attributes any longer. (gfc_show_symbol): Don't show old-style commons any longer. (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new interface. * gfortran.h (symbol_attribute): Remove common and saved_common attributes. (gfc_symbol): Remove common_head element. (gfc_common_head): New struct. (gfc_get_common_head): New macro. (gfc_symtree): Add field 'common' to union. (gfc_namespace): Add field 'common_root'; change type of field 'blank_common' to blank_common. (gfc_add_data): New prototype. (gfc_traverse_symtree): Expect a symtree as first argument instead of namespace. * match.c (gfc_get_common): New function. (match_common_name): Change to take char * as argument, adapt, fix bug with empty name. (gfc_match_common): Adapt to new data structures. Disallow redeclaration of USE-associated COMMON-block. Fix bug with empty common. (var_element): Adapt to new common structures. * match.h (gfc_get_common): Declare. * module.c: Add 2004 to copyright years, add commons to module file layout description. (ab_attribute, attr_bits, mio_symbol_attributes): Remove code for removed attributes. (mio_symbol): Adapt to new way of storing common relations. (load_commons): New function. (read_module): Skip common list on first pass, load_commons at second. (write_commons): New function. (write_module): Call write_commons(). * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove functions related to removed attributes. (gfc_add_data): New function. (gfc_clear_attr): Don't set removed attributes. (gfc_copy_attr): Don't copy removed attributes. (traverse_symtree): Remove. (gfc_traverse_symtree): Don't traverse symbol tree of the passed namespace, but require a symtree to be passed instead. Unify with traverse_symtree. (gfc_traverse_ns): Call gfc_traverse_symtree according to new interface. (save_symbol): Remove setting of removed attribute. * trans-common.c (gfc_sym_mangled_common_id): Change to take 'char *' argument instead of 'gfc_symbol'. (build_common_decl, new_segment, translate_common): Adapt to new data structures, add new argument name. (create_common): Adapt to new data structures, add new argument name. Fix typo in intialization of derived types. (finish_equivalences): Add second argument in call to create_common. (named_common): take 'gfc_symtree' instead of 'gfc_symbol'. (gfc_trans_common): Adapt to new data structures. * trans-decl.c (gfc_create_module_variables): Also output symbols from commons. Co-Authored-By: Andrew Vaught <andyv@firstinter.net> From-SVN: r83871
2004-06-26Andrew Vaught <andyv@firstinter.net>Tobias Schlüter1-10/+31
2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de> Andrew Vaught <andyv@firstinter.net> * decl.c (contained_procedure): New function. (match_end): Verify correctness of END STATEMENT in all cases. Also fix two typos in Kenner's ChangeLog From-SVN: r83710
2004-06-26Andrew Vaught <andyv@firstinter.net>Tobias Schlüter1-0/+9
2004-06-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de> Andrew Vaught <andyv@firstinter.net> PR fortran/15190 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c (decode_statement): Enforce required space in free-form. Co-Authored-By: Andrew Vaught <andyv@firstinter.net> From-SVN: r83708
2004-06-12re PR fortran/14957 (testsuite issues)Tobias Schlüter1-1/+6
fortran/ PR fortran/14957 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for contained procedure. testsuite/ PR fortran/14957 * gfortran.fortran-torture/execute/stack_varsize.f90: Correct syntax errors in end statements of contained subroutines. From-SVN: r83031
2004-05-27gfortran.h (gfc_current_locus, [...]): Remove.Tobias Schlüter1-15/+15
* gfortran.h (gfc_current_locus, gfc_set_locus): Remove. (gfc_current_locus): Declare new global variable. * scanner.c (gfc_current_locus, gfc_set_locus): Remove. (gfc_current_locus1): Rename ... (gfc_current_locus): ... to this. (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char, skip_fixed_comments, skip_free_comments, gfc_next_char_literal, gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use gfc_current_locus instead of gfc_current_locus1, gfc_set_locus() and gfc_current_locus(), respectively. * array.c (match_subscript, gfc_match_array_ref, match_array_list, match_array_cons_element, gfc_match_array_constructor): Read/modify gfc_current_locus instead of calling gfc_set_locus() and gfc_current_locus(). * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec, match_attr_spec, gfc_match_function_decl, gfc_match_end, attr_decl1, gfc_match_save): Likewise. * error.c (error_print, gfc_internal_error): Likewise. * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise. * interface.c (gfc_add_interface): Likewise. * io.c (gfc_match_format, match_dt_format, match_dt_element, match_io_iterator, match_io): Likewise. * match.c (gfc_match_space, gfc_match_eos, gfc_match_small_literal_int, gfc_match_st_label, gfc_match_strings, gfc_match_name, gfc_match_iterator, gfc_match_char, gfc_match, gfc_match_assignment, gfc_match_pointer_assignment, gfc_match_if, gfc_match_do, gfc_match_nullify, gfc_match_call, match_implicit_range, gfc_match_implicit, gfc_match_data, match_case_selector, gfc_match_case, match_forall_iterator): Likewise. * matchexp.c (gfc_match_defined_op_name, next_operator, match_level_1, match_mult_operand, match_ext_mult_operand, match_add_operand, match_ext_add_operand, match_level_2, match_level_3, match_level_4, match_and_operand, match_or_operand, match_equiv_operand, match_level_5, gfc_match_expr): Likewise. * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise. * parse.c (match_word, decode_statement, next_free, next_fixed, add_statement, verify_st_order, parse_if_block, gfc_parse_file): Likewise. * primary.c (match_digits, match_integer_constant, match_boz_constant, match_real_constant, match_substring, next_string_char, match_charkind_name, match_string_constant, match_logical_constant, match_const_complex_part, match_complex_constant, match_actual_arg, match_keyword_arg, gfc_match_actual_arglist, gfc_match_structure_constructor, gfc_match_rvalue, gfc_match_variable): Likewise. * st.c (gfc_get_code): Likewise. * symbol.c (check_conflict, check_used, check_done, duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent, gfc_add_access, gfc_add_explicit_interface, gfc_add_type, gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise. From-SVN: r82320
2004-05-18re PR fortran/13930 (derived type with intent(in) attribute not accepted)Paul Brook1-62/+6
PR fortran/13930 * decl.c (add_init_expr_to_sym): Remove incorrect check. (default_initializer): Move to expr.c. (variable_decl): Don't assign default initializer to variables. * expr.c (gfc_default_initializer): Move to here. * gfortran.h (gfc_default_initializer): Add prototype. * resolve.c (resolve_symbol): Check for illegal initializers. Assign default initializer. testsuite/ * gfortran.fortran-torture/execute/der_init_4.f90: New test. From-SVN: r81966
2004-05-15re PR fortran/13742 (Not Implemented: initial values for COMMON or EQUIVALENCE)Tobias Schlüter1-0/+9
PR fortran/13742 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is not initialized in a disallowed fashion. * match.c (gfc_match_common): Likewise. (var_element): Verify that variable is not in the blank COMMON, if it is in a common. From-SVN: r81899
2004-05-15* decl.c (add_init_expr_to_sym): Check for variable size arrays.Victor Leikehman1-1/+15
From-SVN: r81894
2004-05-14decl.c (variable_decl): Always apply default initializer.Victor Leikehman1-4/+5
fortran/ * decl.c (variable_decl): Always apply default initializer. libgfortran/ * gfortran.fortran-torture/execute/def_init_3.f90: New test. From-SVN: r81865
2004-05-14Make-lang.in, [...]: Update copyright years and boilerplate.Tobias Schlüter1-12/+12
* Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c, decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c, expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c, intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h, matchexp.c, misc.c, module.c, options.c, parse.c, parse.h, primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c, trans-array.c, trans-array.h, trans-common.c, trans-const.c, trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c, trans-types.h, trans.c, trans.h: Update copyright years and boilerplate. * data.c: Likewise, also removed two whitespace-only lines. * gfortranspec.c, lang.opt: Update copyright years. From-SVN: r81839
2004-05-13Merge tree-ssa-20020619-branch into mainline.Diego Novillo1-0/+2649
From-SVN: r81764