1. 25 Apr, 2009 1 commit
    • re PR fortran/39688 (IMPORT of derived type fails) · bc2a4733
      2009-04-25  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/39688
      	* decl.c (gfc_match_import): Use 'sym->name' instead of 'name'.
      	They differ if the symbol has been use-renamed.
      
      
      2009-04-25  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/39688
      	* gfortran.dg/import7.f90: New.
      
      From-SVN: r146762
      Janus Weil committed
  2. 24 Apr, 2009 2 commits
    • combine.c (record_value_for_reg): Change 0 to VOIDmode, twice. · 32e8bb8e
      gcc/:
      	* combine.c (record_value_for_reg): Change 0 to VOIDmode, twice.
      	(record_dead_and_set_regs): Likewise.
      	* df.h (struct df_mw_hardreg): Change flags field to int.
      	(struct df_base_ref): Likewise.
      	(struct df): Change changeable_flags field to int.
      	* df-scan.c (df_defs_record): Change clobber_flags to int.
      	* dwarf2.h (enum dwarf_tag): Make lo_user and hi_user values enum
      	constants rather than #define macros.
      	(enum dwarf_attribute, enum dwarf_location_atom): Likewise.
      	(enum dwarf_type, enum dwarf_endianity_encoding): Likewise.
      	(enum dwarf_calling_convention): Likewise.
      	(enum dwarf_line_number_x_ops): Likewise.
      	(enum dwarf_call_frame_info): Likewise.
      	(enum dwarf_source_language): Likewise.
      	* dwarf2out.c (int_loc_descriptor): Add cast to enum type.
      	(add_calling_convention_attribute): Likewise.
      	* fold-const.c (fold_undefer_overflow_warnings): Add cast to enum
      	type.
      	(combine_comparisons): Change compcode to int.  Add cast to enum
      	type.
      	* genrecog.c (maybe_both_true_2): Change c to int.
      	(write_switch): Likewise.  Add cast to enum type.
      	* gimplify.c (gimplify_omp_for): Handle return values from
      	gimplify_expr using MIN rather than bitwise or.
      	(gimplify_expr): Add cast to enum type.
      	* ipa-prop.c (update_jump_functions_after_inlining): Change
      	IPA_BOTTOM to IPA_JF_UNKNOWN.
      	* ira.c (setup_class_subset_and_memory_move_costs): Change mode to
      	int.  Add casts to enum type.
      	(setup_cover_and_important_classes): Change cl to int.  Add casts
      	to enum type.
      	(setup_class_translate): Change cl and mode to int.
      	(ira_init_once): Change mode to int.
      	(free_register_move_costs): Likewise.
      	(setup_prohibited_mode_move_regs): Add casts to enum type.
      	* langhooks.c (add_builtin_function_common): Rework assertion that
      	value fits bitfield.
      	* mcf.c (add_fixup_edge): Change type parameter to edge_type.
      	* omega.c (omega_do_elimination): Avoid math on enum types.
      	* optabs.c (expand_vec_shift_expr): Remove casts to int.
      	* opts.c (set_debug_level): Change 2 to enum constant.  Use new
      	int local to handle integral_argment value.
      	* regmove.c (try_auto_increment): Change PUT_MODE to
      	PUT_REG_NOTE_KIND.
      	* reload.c (push_secondary_reload): Add casts to enum type.
      	(secondary_reload_class, find_valid_class): Likewise.
      	* reload1.c (emit_input_reload_insns): Likewise.
      	* rtl.h (NOTE_VAR_LOCATION_STATUS): Likewise.
      	* sel-sched.c (init_hard_regs_data): Change cur_mode to int.
      	* sel-sched-ir.c (hash_with_unspec_callback): Change 0 to enum
      	constant.
      	* tree.c (build_common_builtin_nodes): Add casts to enum type.
      	* tree-complex.c (complex_lattice_t): Typedef to int rather than
      	enum type.
      	(expand_complex_libcall): Add casts to enum type.
      	* tree-into-ssa.c (get_ssa_name_ann): Change 0 to enum constant.
      	* tree-vect-loop.c (vect_model_reduction_cost): Compare reduc_code
      	with ERROR_MARK, not NUM_TREE_CODES.
      	(vect_create_epilog_for_reduction): Likewise.
      	(vectorizable_reduction): Don't initialize epiloc_reduc_code.
      	When not using it, set it to ERROR_MARK rather than
      	NUM_TREE_CODES.
      	* tree-vect-patterns.c (vect_pattern_recog_1): Change vec_mode to
      	enum machine_mode.
      	* tree-vect-stmts.c (new_stmt_vec_info): Change 0 to
      	vect_unused_in_loop.  Change 0 to loop_vect.
      	* tree-vectorizer.c (vect_set_verbosity_level): Add casts to enum
      	type.
      	* var-tracking.c (get_init_value): Change return type to enum
      	var_init_status.
      	* vec.h (DEF_VEC_FUNC_P) [iterate]: Cast 0 to type T.
      	* config/arm/arm.c (fp_model_for_fpu): Change to array to enum
      	arm_fp_model.
      	(arm_override_options): Add casts to enum type.
      	(arm_emit_tls_decoration): Likewise.
      	* config/i386/i386.c (ix86_function_specific_restore): Add casts
      	to enum type.
      	* config/i386/i386-c.c (ix86_pragma_target_parse): Likewise.
      	* config/ia64/ia64.c (ia64_expand_compare): Change magic to int.
      	* config/rs6000/rs6000.c (rs6000_override_options): Add casts to
      	enum type.
      	* config/s390/s390.c (code_for_builtin_64): Change to array of
      	enum insn_code.
      	(code_for_builtin_31): Likewise.
      	(s390_expand_builtin): Change code_for_builtin to enum insn_code
      	const *.
      	* config/sparc/sparc.c (sparc_override_options): Change value
      	field in struct code_model to enum cmodel.  In initializer change
      	0 to NULL and add cast to enum type.
      
      	* c-typeck.c (build_modify_expr): Add lhs_origtype parameter.
      	Change all callers.  Issue a -Wc++-compat warning using
      	lhs_origtype if necessary.
      	(convert_for_assignment): Issue -Wc++-compat warnings about
      	invalid conversions to enum type on assignment.
      	* c-common.h (build_modify_expr): Update declaration.
      
      gcc/cp/:
      	* call.c (build_temp): Change 0 to enum constant.
      	* cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
      	type.
      	* cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
      	* decl2.c (constrain_visibility): Likewise.
      	* parser.c (cp_lexer_get_preprocessor_token): Likewise.
      	(cp_parser_flags): Typedef to int rather than enum type.
      	(cp_parser_expression_stack_entry): Change prec field to enum
      	cp_parser_prec.
      
      	* typeck.c (build_modify_expr): Add lhs_origtype parameter.
      	Change all callers.
      
      gcc/fortran/:
      	* gfortran.h (enum gfc_symbol_type): New named enum type, broken
      	out of struct gfc_symbol.
      	(struct gfc_symbol): Use enum gfc_symbol_type.
      	(enum gfc_array_ref_dimen_type): New named enum type, broken out
      	of struct gfc_array_ref).
      	(struct gfc_array_ref): Use enum gfc_array_ref_dimen_type.
      	(mod_pointee_as): Update declaration.
      	* decl.c (add_global_entry): Change type to enum gfc_symbol_type.
      	(gfc_mod_pointee_as): Change return type to "match".
      	* module.c (mio_array_ref): Add cast to enum type.
      	(mio_symbol): Likewise.
      	* resolve.c (resolve_global_procedure): Change type to enum
      	gfc_symbol_type.
      	* trans-io.c (gfc_build_st_parameter): Change type to unsigned
      	int.
      
      gcc/java/:
      	* jcf-parse.c (handle_constant): Add cast to enum type.
      
      gcc/objc/:
      	* objc-act.c (get_super_receiver): Update calls to
      	build_modify_expr to pass new argument.
      
      gcc/testsuite/:
      	* gcc.dg/Wcxx-compat-4.c: New testcase.
      
      From-SVN: r146735
      Ian Lance Taylor committed
    • gfortran.h (gfc_get_typebound_proc): Removed as macro, now a function. · e34ccb4c
      2009-04-24  Daniel Kraft  <d@domob.eu>
      
      	* gfortran.h (gfc_get_typebound_proc): Removed as macro, now a function.
      	(struct gfc_symtree): Moved `typebound' member inside union.
      	(struct gfc_namespace): Add `tb_sym_root' as new symtree to sort out
      	type-bound procedures there.
      	(gfc_get_tbp_symtree): New procedure.
      	* symbol.c (tentative_tbp_list): New global.
      	(gfc_get_namespace): NULL new `tb_sym_root' member.
      	(gfc_new_symtree): Removed initialization of `typebound' member.
      	(gfc_undo_symbols): Process list of tentative tbp's.
      	(gfc_commit_symbols): Ditto.
      	(free_tb_tree): New method.
      	(gfc_free_namespace): Call it.
      	(gfc_get_typebound_proc): New method.
      	(gfc_get_tbp_symtree): New method.
      	(gfc_find_typebound_proc): Adapt to structural changes of gfc_symtree
      	and gfc_namespace with regards to tbp's.
      	* dump-parse-tree.c (show_typebound): Ditto.
      	* primary.c (gfc_match_varspec): Ditto.  Don't reference tbp-symbol
      	as it isn't a symbol any longer.
      	* module.c (mio_typebound_symtree): Adapt to changes.
      	(mio_typebound_proc): Ditto, create symtrees using `gfc_get_tbp_symtree'
      	rather than `gfc_get_sym_tree'.
      	(mio_f2k_derived): Ditto.
      	* decl.c (match_procedure_in_type): Ditto.
      	(gfc_match_generic): Ditto.  Don't reference tbp-symbol.
      	* resolve.c (check_typebound_override): Adapt to changes.
      	(resolve_typebound_generic): Ditto.
      	(resolve_typebound_procedures): Ditto.
      	(ensure_not_abstract_walker): Ditto.
      	(ensure_not_abstract): Ditto.
      	(resolve_typebound_procedure): Ditto, ignore erraneous symbols (for
      	instance, through removed tentative ones).
      	* gfc-internals.texi (Type-bound procedures): Document changes.
      
      2009-04-24  Daniel Kraft  <d@domob.eu>
      
      	* gfortran.dg/typebound_generic_1.f03: Change so that no error is
      	expected on already erraneous symbol (renamed to fresh one).
      
      From-SVN: r146733
      Daniel Kraft committed
  3. 22 Apr, 2009 1 commit
    • re PR fortran/39735 (procedure pointer assignments: return value is not checked) · c73b6478
      2009-04-22  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/39735
      	* decl.c (add_hidden_procptr_result): Bugfix for procptr results.
      	(match_procedure_decl): Set if_source.
      	* expr.c (gfc_check_pointer_assign): Bugfix: Return after error.
      	And: Check interface also for IFSRC_UNKNOWN (return type may be known).
      	* gfortran.h (typedef enum ifsrc): Remove IFSRC_USAGE,
      	add documentation. Rename copy_formal_args and copy_formal_args_intr.
      	* interface.c (gfc_compare_interfaces): Check for return types,
      	handle IFSRC_UNKNOWN.
      	(compare_intr_interfaces,compare_actual_formal_intr): Obsolete, removed.
      	(gfc_procedure_use): Modified handling of intrinsics.
      	* intrinsic.c (add_functions): Bugfix for "dim".
      	* resolve.c (resolve_intrinsic): New function to resolve intrinsics,
      	which copies the interface from isym to sym.
      	(resolve_procedure_expression,resolve_function): Use new function
      	'resolve_intrinsic'.
      	(resolve_symbol): Add function attribute for externals with return type
      	and use new function 'resolve_intrinsic'.
      	* symbol.c (ifsrc_types): Remove string for IFSRC_USAGE.
      	(copy_formal_args): Renamed to gfc_copy_formal_args.
      	(copy_formal_args_intr): Renamed to gfc_copy_formal_args_intr.
      	* trans-const.c (gfc_conv_const_charlen): Handle cl==NULL.
      
      
      2009-04-22  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/39735
      	* gfortran.dg/assumed_charlen_function_5.f90: Modified.
      	* gfortran.dg/external_initializer.f90: Modified.
      	* gfortran.dg/interface_26.f90: Modified.
      	* gfortran.dg/intrinsic_subroutine.f90: Modified.
      	* gfortran.dg/proc_ptr_3.f90: Modified.
      	* gfortran.dg/proc_ptr_15.f90: New.
      	* gfortran.dg/proc_ptr_result_1.f90: Modified.
      
      From-SVN: r146554
      Janus Weil committed
  4. 09 Apr, 2009 1 commit
    • re PR fortran/36704 (Procedure pointer as function result) · 3070bab4
      2009-04-09  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/36704
      	* decl.c (add_hidden_procptr_result): New function for handling
      	procedure pointer return values by adding a hidden result variable.
      	(variable_decl,match_procedure_decl,gfc_match_function_decl,
      	gfc_match_subroutine,gfc_match_end,attr_decl1): Handle procedure pointer
      	return values.
      	* parse.c (parse_interface): Add EXTERNAL attribute only after
      	FUNCTION/SUBROUTINE declaration is complete.
      	* primary.c (replace_hidden_procptr_result): New function for replacing
      	function symbol by hidden result variable.
      	(gfc_match_rvalue,match_variable): Replace symbol by hidden result
      	variable.
      	* resolve.c (resolve_contained_fntype,resolve_function,resolve_variable,
      	resolve_symbol): Allow for procedure pointer function results.
      	(resolve_fl_procedure): Conflict detection moved here from
      	'check_conflict'.
      	* symbol.c (gfc_check_function_type): Allow for procedure pointer
      	function results.
      	(check_conflict): Move some conflict detection to resolution stage.
      	* trans-types.c (gfc_sym_type,gfc_get_function_type): Handle hidden
      	result variables.
      
      
      2009-04-09  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/36704
      	* gfortran.dg/external_procedures_1.f90: Modified.
      	* gfortran.dg/proc_ptr_result_1.f90: New.
      	* gfortran.dg/proc_ptr_result_2.f90: New.
      	* gfortran.dg/proc_ptr_result_3.f90: New.
      
      From-SVN: r145815
      Janus Weil committed
  5. 06 Apr, 2009 1 commit
  6. 30 Mar, 2009 1 commit
    • re PR fortran/22571 (Reject derived types for dummy arguments declared in the… · 71a7778c
      re PR fortran/22571 (Reject derived types for dummy arguments declared in the subroutine unless they are SEQUENCE)
      
      2009-03-30  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/22571
      	PR fortran/26227
      	PR fortran/24886
      	* symbol.c : Add gfc_global_ns_list.
      	* decl.c (add_global_entry): Set the namespace ('ns') field.
      	* gfortran.h : Add the resolved field to gfc_namespace. Add the
      	namespace ('ns') field to gfc_gsymbol.  Add flag_whole_file to
      	gfc_option_t.  Add the prototype for gfc_free_dt_list.
      	* lang.opt : Add the whole-file option.
      	* invoke.texi : Document the whole-file option.
      	* resolve.c (resolve_global_procedure): If the fwhole-file
      	option is set, reorder gsymbols to ensure that translation is
      	in the right order.  Resolve the gsymbol's namespace if that
      	has not occurred and then check interfaces.
      	(resolve_function): Move call to resolve_global_procedure.
      	(resolve_call): The same.
      	(resolve_codes): Store the current labels_obstack.
      	(gfc_resolve) : Return if the namespace is already resolved.
      	trans-decl.c (gfc_get_extern_function_decl): If the whole_file
      	option is selected, use the backend_decl of a gsymbol, if it is
      	available.
      	parse.c (add_global_procedure, add_global_program): If the flag
      	whole-file is set, add the namespace to the gsymbol.
      	(gfc_parse_file): On -fwhole-file, put procedure namespaces on
      	the global namespace list.  Rearrange to do resolution of all
      	the procedures in a file, followed by their translation.
      	* options.c (gfc_init_options): Add -fwhole-file.
      	(gfc_handle_option): The same.
      
      2009-03-30  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/22571
      	* gfortran.dg/whole_file_1.f90: New test.
      	PR fortran/26227
      	* gfortran.dg/whole_file_2.f90: New test.
      	* gfortran.dg/whole_file_3.f90: New test.
      	PR fortran/24886
      	* gfortran.dg/whole_file_4.f90: New test.
      
      From-SVN: r145314
      Paul Thomas committed
  7. 29 Mar, 2009 1 commit
    • re PR fortran/37423 (Fortran 2003: DEFERRED bindings not yet implemented) · b0e5fa94
      2009-03-29  Daniel Kraft  <d@domob.eu>
      
      	PR fortran/37423
      	* gfortran.h (struct gfc_typebound_proc): Added new flag `deferred' and
      	added a comment explaining DEFERRED binding handling.
      	* decl.c (match_binding_attributes): Really match DEFERRED attribute.
      	(match_procedure_in_type): Really match PROCEDURE(interface) syntax
      	and do some validity checks for DEFERRED and this construct.
      	* module.c (binding_overriding): New string constant for DEFERRED.
      	(mio_typebound_proc): Module-IO DEFERRED flag.
      	* resolve.c (check_typebound_override): Ensure that a non-DEFERRED
      	binding is not overridden by a DEFERRED one.
      	(resolve_typebound_procedure): Allow abstract interfaces as targets
      	for DEFERRED bindings.
      	(ensure_not_abstract_walker), (ensure_not_abstract): New methods.
      	(resolve_fl_derived): Use new `ensure_not_abstract' method for
      	non-ABSTRACT types extending ABSTRACT ones to ensure each DEFERRED
      	binding is overridden.
      	(check_typebound_baseobject): New method.
      	(resolve_compcall), (resolve_typebound_call): Check base-object of
      	the type-bound procedure call.
      	* gfc-internals.texi (Type-bound procedures): Document a little bit
      	about internal handling of DEFERRED bindings.
      
      2009-03-29  Daniel Kraft  <d@domob.eu>
      
      	PR fortran/37423
      	* gfortran.dg/typebound_proc_4.f03: Remove not-implemented check for
      	DEFERRED bindings.
      	* gfortran.dg/typebound_proc_9.f03: New test.
      	* gfortran.dg/typebound_proc_10.f03: New test.
      	* gfortran.dg/typebound_proc_11.f03: New test.
      	* gfortran.dg/abstract_type_5.f03: New test.
      
      From-SVN: r145248
      Daniel Kraft committed
  8. 02 Dec, 2008 1 commit
    • re PR fortran/36704 (Procedure pointer as function result) · 726d8566
      2008-12-02  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/36704
      	PR fortran/38290
      	* decl.c (match_result): Result may be a standard variable or a
      	procedure pointer.
      	* expr.c (gfc_check_pointer_assign): Additional checks for procedure
      	pointer assignments.
      	* primary.c (gfc_match_rvalue): Bugfix for procedure pointer
      	assignments.
      	* resolve.c (resolve_function): Check for attr.subroutine.
      	* symbol.c (check_conflict): Addtional checks for RESULT statements.
      	* trans-types.c (gfc_sym_type,gfc_get_function_type): Support procedure
      	pointers as function result.
      
      
      2008-12-02  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/36704
      	PR fortran/38290
      	* gfortran.dg/entry_7.f90: Modified.
      	* gfortran.dg/proc_ptr_2.f90: Extended.
      	* gfortran.dg/proc_ptr_3.f90: Modified.
      	* gfortran.dg/proc_ptr_11.f90: New.
      	* gfortran.dg/proc_ptr_12.f90: New.
      	* gfortran.dg/result_1.f90: New.
      
      From-SVN: r142351
      Janus Weil committed
  9. 29 Nov, 2008 1 commit
    • re PR fortran/38289 ("procedure( ), pointer" rejected) · f4256439
      2008-11-29  Janus Weil  <janus@gcc.gnu.org>
      	    Mikael Morin <mikael@gcc.gnu.org>
      
      	PR fortran/38289
      	PR fortran/38290
      	* decl.c (match_procedure_decl): Handle whitespaces.
      	* resolve.c (resolve_specific_s0): Bugfix in check for intrinsic
      	interface.
      
      
      2008-11-29  Janus Weil  <janus@gcc.gnu.org>
      	    Tobias Burnus <burnus@gcc.gnu.org>
      
      	PR fortran/38289
      	PR fortran/38290
      	* gfortran.dg/proc_decl_1.f90: Extended test case.
      
      Co-Authored-By: Mikael Morin <mikael@gcc.gnu.org>
      Co-Authored-By: Tobias Burnus <burnus@gcc.gnu.org>
      
      From-SVN: r142276
      Janus Weil committed
  10. 22 Nov, 2008 1 commit
    • re PR fortran/38160 (C Binding: Kind parameter checking too strict and too late) · 2ec855f1
      2008-11-22  Tobias Burnus  <burnus@net-b.de>
      
              PR fortran/38160
              * trans-types.c (gfc_validate_c_kind): Remove function.
              * decl.c (gfc_match_kind_spec): Add C kind parameter check.
                (verify_bind_c_derived_type): Remove gfc_validate_c_kind call.
                (verify_c_interop_param): Update call.
              * gfortran.h (verify_bind_c_derived_type): Update prototype.
                (gfc_validate_c_kind): Remove.
              * symbol.c (verify_bind_c_derived_type): Update verify_c_interop
              * call.
              * resolve.c (gfc_iso_c_func_interface): Ditto.
      
      2008-11-22  Tobias Burnus  <burnus@net-b.de>
      
              PR fortran/38160
              * gfortran.dg/bind_c_usage_18.f90: New test.
              * gfortran.dg/c_kind_tests_2.f03: Update dg-messages.
              * gfortran.dg/interop_params.f03: Ditto.
      
      From-SVN: r142124
      Tobias Burnus committed
  11. 01 Nov, 2008 1 commit
    • re PR fortran/36322 (ICE with PROCEDURE using a complicated interface) · c6acea9d
      2008-11-01  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/36322
      	PR fortran/36463
      	* gfortran.h: New function gfc_expr_replace_symbols.
      	* decl.c (match_procedure_decl): Increase reference count for interface.
      	* expr.c: New functions replace_symbol and gfc_expr_replace_symbols.
      	* resolve.c (resolve_symbol): Correctly copy array spec and char len
      	of PROCEDURE declarations from their interface.
      	* symbol.c (gfc_get_default_type): Enhanced error message.
      	(copy_formal_args): Call copy_formal_args recursively for arguments.
      	* trans-expr.c (gfc_conv_function_call): Bugfix.
      
      
      2008-11-01  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/36322
      	PR fortran/36463
      	* gfortran.dg/proc_decl_17.f90: New.
      	* gfortran.dg/proc_decl_18.f90: New.
      
      From-SVN: r141515
      Janus Weil committed
  12. 21 Sep, 2008 2 commits
    • re PR fortran/37583 (ICE "insert_bbt(): Duplicate key" for self-calling ENTRY subprogram) · ecd3b73c
      2008-09-21  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/37583
      	* decl.c (scalarize_intrinsic_call): Both subroutines and
      	functions can give a true for get_proc_mame's last argument so
      	remove the &&gfc_current_ns->proc_name->attr.function.
      	resolve.c (resolve_actual_arglist): Add check for recursion by
      	reference to procedure as actual argument.
      
      2008-09-21  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/37583
      	* gfortran.dg/entry_18.f90: New test.
      
      From-SVN: r140532
      Paul Thomas committed
    • decl.c (match_procedure_in_type): Changed misleading error message for not yet… · 74a9b897
      decl.c (match_procedure_in_type): Changed misleading error message for not yet implemented PROCEDURE(interface)...
      
      2008-09-21  Daniel Kraft  <d@domob.eu>
      
      	* decl.c (match_procedure_in_type): Changed misleading error message
      	for not yet implemented PROCEDURE(interface) syntax.
      
      2008-09-21  Daniel Kraft  <d@domob.eu>
      
      	* gfortran.dg/typebound_proc_4.f03: Changed expected error for not
      	yet implemented PROCEDURE(interface).
      
      From-SVN: r140528
      Daniel Kraft committed
  13. 02 Sep, 2008 1 commit
    • gfortran.h (struct gfc_namespace): New member `implicit_loc'. · 52f49934
      2008-09-02  Daniel Kraft  <d@domob.eu>
      
      	* gfortran.h (struct gfc_namespace): New member `implicit_loc'.
      	(gfc_add_abstract): New method.
      	* decl.c (gfc_get_type_attr_spec): Match ABSTRACT attribute.
      	(gfc_match_derived_decl): Copy abstract attribute in derived symbol.
      	* dump-parse-tree.c (show_attr): Show ABSTRACT attribute as `ABSTRACT'
      	only to allow for ABSTRACT types.
      	* parse.c (parse_interface): Use new gfc_add_abstract.
      	* primary.c (gfc_match_structure_constructor): Check that no ABSTRACT
      	type is constructed.
      	* resolve.c (resolve_typespec_used): New method.
      	(resolve_fl_derived): Check type in respect to ABSTRACT attribute and
      	check that no component is of an ABSTRACT type.
      	(resolve_symbol): Check that no symbol is of an ABSTRACT type.
      	(resolve_types): Check IMPLICIT declarations for ABSTRACT types.
      	* symbol.c (gfc_merge_new_implicit): Remember loci of IMPLICIT's.
      	(gfc_add_abstract): New method.
      
      2008-09-02  Daniel Kraft  <d@domob.eu>
      
      	* gfortran.dg/abstract_type_1.f90: New test.
      	* gfortran.dg/abstract_type_2.f03: New test.
      	* gfortran.dg/abstract_type_3.f03: New test.
      	* gfortran.dg/abstract_type_4.f03: New test.
      
      From-SVN: r139885
      Daniel Kraft committed
  14. 31 Aug, 2008 1 commit
    • gfortran.h (enum gfc_statement): New entry `ST_GENERIC'. · e157f736
      2008-08-31  Daniel Kraft  <d@domob.eu>
      
      	* gfortran.h (enum gfc_statement): New entry `ST_GENERIC'.
      	(struct gfc_tbp_generic): New type.
      	(struct gfc_typebound_proc): Removed `target' and added union with
      	`specific' and `generic' members; new members `overridden',
      	`subroutine', `function' and `is_generic'.
      	(struct gfc_expr): New members `derived' and `name' in compcall union
      	member and changed type of `tbp' to gfc_typebound_proc.
      	(gfc_compare_interfaces), (gfc_compare_actual_formal): Made public.
      	* match.h (gfc_typebound_default_access): New global.
      	(gfc_match_generic): New method.
      	* decl.c (gfc_match_generic): New method.
      	(match_binding_attributes): New argument `generic' and handle it.
      	(match_procedure_in_type): Mark matched binding as non-generic.
      	* interface.c (gfc_compare_interfaces): Made public.
      	(gfc_compare_actual_formal): Ditto.
      	(check_interface_1), (compare_parameter): Use new public names.
      	(gfc_procedure_use), (gfc_search_interface): Ditto.
      	* match.c (match_typebound_call): Set base-symbol referenced.
      	* module.c (binding_generic): New global array.
      	(current_f2k_derived): New global.
      	(mio_typebound_proc): Handle IO of GENERIC bindings.
      	(mio_f2k_derived): Record current f2k-namespace in current_f2k_derived.
      	* parse.c (decode_statement): Handle GENERIC statement.
      	(gfc_ascii_statement): Ditto.
      	(typebound_default_access), (set_typebound_default_access): Removed.
      	(gfc_typebound_default_access): New global.
      	(parse_derived_contains): New default-access implementation and handle
      	GENERIC statements encountered.
      	* primary.c (gfc_match_varspec): Adapted to new gfc_typebound_proc
      	structure and removed check for SUBROUTINE/FUNCTION from here.
      	* resolve.c (extract_compcall_passed_object): New method.
      	(update_compcall_arglist): Use it.
      	(resolve_typebound_static): Adapted to new gfc_typebound_proc structure.
      	(resolve_typebound_generic_call): New method.
      	(resolve_typebound_call): Check target is a SUBROUTINE and handle calls
      	to GENERIC bindings.
      	(resolve_compcall): Ditto (check for target being FUNCTION).
      	(check_typebound_override): Handle GENERIC bindings.
      	(check_generic_tbp_ambiguity), (resolve_typebound_generic): New methods.
      	(resolve_typebound_procedure): Handle GENERIC bindings and set new
      	attributes subroutine, function and overridden in gfc_typebound_proc.
      	(resolve_fl_derived): Ensure extended type is resolved before the
      	extending one is.
      	* st.c (gfc_free_statement): Fix bug with free'ing EXEC_COMPCALL's.
      	* symbol.c (gfc_find_typebound_proc): Adapt for GENERIC changes.
      
      2008-08-31  Daniel Kraft  <d@domob.eu>
      
      	* gfortran.dg/typebound_generic_1.f03: New test.
      	* gfortran.dg/typebound_generic_2.f03: New test.
      	* gfortran.dg/typebound_generic_3.f03: New test.
      
      From-SVN: r139822
      Daniel Kraft committed
  15. 28 Aug, 2008 1 commit
    • gfortran.h (enum expr_t): New value `EXPR_COMPCALL'. · 8e1f752a
      2008-08-28  Daniel Kraft  <d@domob.eu>
      
      	* gfortran.h (enum expr_t): New value `EXPR_COMPCALL'.
      	(gfc_get_typebound_proc): New macro.
      	(struct gfc_expr): New union-member `compcall' for EXPR_COMPCALL.
      	(enum gfc_exec_op): New value `EXEC_COMPCALL'.
      	(gfc_find_typebound_proc): New argument.
      	(gfc_copy_ref), (gfc_match_varspec): Made public.
      	* decl.c (match_procedure_in_type): Use gfc_get_typebound_proc.
      	* expr.c (free_expr0), (gfc_copy_expr): Handle EXPR_COMPCALL.
      	(gfc_copy_ref): Made public and use new name.
      	(simplify_const_ref): Use new name of gfc_copy_ref.
      	(simplify_parameter_variable): Ditto.
      	(gfc_simplify_expr): gcc_unreachable for EXPR_COMPCALL.
      	* match.c (match_typebound_call): New method.
      	(gfc_match_call): Allow for CALL's to typebound procedures.
      	* module.c (binding_passing), (binding_overriding): New variables.
      	(expr_types): Add EXPR_COMPCALL.
      	(mio_expr): gcc_unreachable for EXPR_COMPCALL.
      	(mio_typebound_proc), (mio_typebound_symtree): New methods.
      	(mio_f2k_derived): Handle type-bound procedures.
      	* primary.c (gfc_match_varspec): Made public and parse trailing
      	references to type-bound procedures; new argument `sub_flag'.
      	(gfc_match_rvalue): New name and argument of gfc_match_varspec.
      	(match_variable): Ditto.
      	* resolve.c (update_arglist_pass): New method.
      	(update_compcall_arglist), (resolve_typebound_static): New methods.
      	(resolve_typebound_call), (resolve_compcall): New methods.
      	(gfc_resolve_expr): Handle EXPR_COMPCALL.
      	(resolve_code): Handle EXEC_COMPCALL.
      	(resolve_fl_derived): New argument to gfc_find_typebound_proc.
      	(resolve_typebound_procedure): Ditto and removed not-implemented error.
      	* st.c (gfc_free_statement): Handle EXEC_COMPCALL.
      	* symbol.c (gfc_find_typebound_proc): New argument `noaccess' and
      	implement access-checking.
      	* trans-expr.c (gfc_apply_interface_mapping_to_expr): gcc_unreachable
      	on EXPR_COMPCALL.
      	* trans-intrinsic.c (gfc_conv_intrinsic_bound): Add missing break.
      	* trans-openmp.c (gfc_trans_omp_array_reduction): Add missing
      	intialization of ref->type.
      
      2008-08-28  Daniel Kraft  <d@domob.eu>
      
      	* gfortran.dg/typebound_call_1.f03: New test.
      	* gfortran.dg/typebound_call_2.f03: New test.
      	* gfortran.dg/typebound_call_3.f03: New test.
      	* gfortran.dg/typebound_call_4.f03: New test.
      	* gfortran.dg/typebound_call_5.f03: New test.
      	* gfortran.dg/typebound_call_6.f03: New test.
      	* gfortran.dg/typebound_proc_1.f08: Don't expect not-implemented error.
      	* gfortran.dg/typebound_proc_2.f90: Ditto.
      	* gfortran.dg/typebound_proc_5.f03: Ditto.
      	* gfortran.dg/typebound_proc_6.f03: Ditto.
      	* gfortran.dg/typebound_proc_7.f03: Ditto.
      	* gfortran.dg/typebound_proc_8.f03: Ditto.
      
      From-SVN: r139724
      Daniel Kraft committed
  16. 24 Aug, 2008 2 commits
    • re PR fortran/37201 (ICE in in gfc_conv_string_parameter) · 8327f9c2
      2008-08-24  Tobias Burnus  <burnus@net-b.de>
      
              PR fortran/37201
              * decl.c (verify_bind_c_sym): Reject array/string returning
              functions.
      
      2008-08-24  Tobias Burnus  <burnus@net-b.de>
      
              PR fortran/37201
              * gfortran.dg/bind_c_18.f90: New.
      
      From-SVN: r139545
      Tobias Burnus committed
    • gfortran.h (gfc_typebound_proc): New struct. · 30b608eb
      2008-08-24  Daniel Kraft  <d@domob.eu>
      
      	* gfortran.h (gfc_typebound_proc):  New struct.
      	(gfc_symtree):  New member typebound.
      	(gfc_find_typebound_proc):  Prototype for new method.
      	(gfc_get_derived_super_type):  Prototype for new method.
      	* parse.h (gfc_compile_state):  New state COMP_DERIVED_CONTAINS.
      	* decl.c (gfc_match_procedure):  Handle PROCEDURE inside derived-type
      	CONTAINS section.
      	(gfc_match_end):  Handle new context COMP_DERIVED_CONTAINS.
      	(gfc_match_private):  Ditto.
      	(match_binding_attributes), (match_procedure_in_type):  New methods.
      	(gfc_match_final_decl):  Rewrote to make use of new
      	COMP_DERIVED_CONTAINS parser state.
      	* parse.c (typebound_default_access):  New global helper variable.
      	(set_typebound_default_access):  New callback method.
      	(parse_derived_contains):  New method.
      	(parse_derived):  Extracted handling of CONTAINS to new parser state
      	and parse_derived_contains.
      	* resolve.c (resolve_bindings_derived), (resolve_bindings_result):  New.
      	(check_typebound_override), (resolve_typebound_procedure):  New methods.
      	(resolve_typebound_procedures):  New method.
      	(resolve_fl_derived):  Call new resolving method for typebound procs.
      	* symbol.c (gfc_new_symtree):  Initialize new member typebound to NULL.
      	(gfc_find_typebound_proc):  New method.
      	(gfc_get_derived_super_type):  New method.
      
      2008-08-24  Daniel Kraft  <d@domob.eu>
      
      	* gfortran.dg/finalize_5.f03:  Adapted expected error message to changes
      	to handling of CONTAINS in derived-type declarations.
      	* gfortran.dg/typebound_proc_1.f08:  New test.
      	* gfortran.dg/typebound_proc_2.f90:  New test.
      	* gfortran.dg/typebound_proc_3.f03:  New test.
      	* gfortran.dg/typebound_proc_4.f03:  New test.
      	* gfortran.dg/typebound_proc_5.f03:  New test.
      	* gfortran.dg/typebound_proc_6.f03:  New test.
      
      From-SVN: r139534
      Daniel Kraft committed
  17. 23 Aug, 2008 1 commit
    • gfortran.h (gfc_component): Add field "symbol_attribute attr"... · d4b7d0f0
      2008-08-23  Janus Weil  <janus@gcc.gnu.org>
      
      	* gfortran.h (gfc_component): Add field "symbol_attribute attr", remove
      	fields "pointer", "allocatable", "dimension", "access".
      	Remove functions "gfc_set_component_attr" and "gfc_get_component_attr".
      	* interface.c (gfc_compare_derived_types): Ditto.
      	* trans-array.c (gfc_array_allocate,structure_alloc_comps): Ditto.
      	* trans-expr.c (gfc_conv_component_ref,gfc_trans_subcomponent_assign,
      	gfc_conv_structure): Ditto.
      	* symbol.c (gfc_find_component,free_components,gfc_set_component_attr,
      	gfc_get_component_attr,verify_bind_c_derived_type,
      	generate_isocbinding_symbol): Ditto.
      	* decl.c (build_struct): Ditto.
      	* dump-parse-tree.c (show_components): Ditto.
      	* trans-stmt.c (gfc_trans_deallocate): Ditto.
      	* expr.c (gfc_check_assign,gfc_check_pointer_assign,
      	gfc_default_initializer): Ditto.
      	* module.c (mio_component): Ditto.
      	* trans-types.c (copy_dt_decls_ifequal,gfc_get_derived_type): Ditto.
      	* resolve.c (has_default_initializer,resolve_structure_cons,
      	gfc_iso_c_func_interface,find_array_spec,resolve_ref,
      	resolve_deallocate_expr,resolve_allocate_expr,resolve_fl_derived,
      	resolve_equivalence_derived): Ditto.
      	* trans-io.c (transfer_expr): Ditto.
      	* parse.c (parse_derived): Ditto.
      	* dependency.c (gfc_check_dependency): Ditto.
      	* primary.c (gfc_variable_attr): Ditto.
      
      From-SVN: r139524
      Janus Weil committed
  18. 22 Aug, 2008 2 commits
    • gfortran.h (in_prefix): Removed from this header. · 3df684e2
      2008-08-22  Daniel Kraft  <d@domob.eu>
      
      	* gfortran.h (in_prefix): Removed from this header.
      	* match.h (gfc_matching_prefix): Moved and renamed from `in_prefix'.
      	* decl.c (in_prefix): Removed from here.
      	(gfc_match_prefix): Use new name of `gfc_matching_prefix'.
      	* symbol.c (gfc_check_symbol_typed): Ditto.
      	* expr.c (check_typed_ns): New helper variable.
      	(expr_check_typed_help): New helper method.
      	(gfc_expr_check_typed): Rewrote to use gfc_traverse_expr to do the
      	work, fixing a minor problem.
      	* match.c (gfc_matching_prefix): New variable.
      
      From-SVN: r139435
      Daniel Kraft committed
    • re PR fortran/32095 (Accepts invalid character(len(a)),dimension(1) :: a) · f37e928c
      2008-08-22  Daniel Kraft  <d@domob.eu>
      
      	PR fortran/32095
      	PR fortran/34228
      	* gfortran.h (in_prefix): New global.
      	(gfc_check_symbol_typed), (gfc_check_expr_typed): New methods.
      	* array.c (match_array_element_spec): Check that bounds-expressions
      	don't have symbols not-yet-typed in them.
      	* decl.c (var_element): Check that variable used is already typed.
      	(char_len_param_value): Check that expression does not contain
      	not-yet-typed symbols.
      	(in_prefix): New global.
      	(gfc_match_prefix): Record using `in_prefix' if we're at the moment
      	parsing a prefix or not.
      	* expr.c (gfc_expr_check_typed): New method.
      	* parse.c (verify_st_order): New argument to disable error output.
      	(check_function_result_typed): New helper method.
      	(parse_spec): Check that the function-result declaration, if given in
      	a prefix, contains no not-yet-typed symbols when the IMPLICIT rules are
      	parsed.
      	* symbol.c (gfc_check_symbol_typed): Check that a symbol already has
      	a type associated to it, otherwise use the IMPLICIT rules or signal
      	an error.
      
      2008-08-22  Daniel Kraft  <d@domob.eu>
      
      	PR fortran/32095
      	PR fortran/34228
      	* gfortran.dg/used_before_typed_1.f90: New test.
      	* gfortran.dg/used_before_typed_2.f90: New test.
      	* gfortran.dg/used_before_typed_3.f90: New test.
      	* gfortran.dg/array_constructor_26.f03: Add -std=gnu to not enable
      	legacy-behaviour for the new check.
      	* gfortran.dg/array_constructor_27.f03: Ditto.
      	* gfortran.dg/blockdata_4.f90: Ditto.
      	* gfortran.dg/bound_2.f90: Reordered declarations to satisfy the check.
      	* gfortran.dg/result_in_spec_1.f90: Ditto.
      	* gfortran.dg/argument_checking_7.f90: Adapted expected error messages.
      
      From-SVN: r139425
      Daniel Kraft committed
  19. 08 Aug, 2008 2 commits
    • re PR fortran/37011 (F2003, type extension: multiple inheritence not rejected) · 63a3341a
      2008-08-09  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/37011
      	* symbol.c (gfc_add_extension): New function.
      	* decl.c (gfc_get_type_attr_spec): Call it.
      	(gfc_match_derived_decl): Set symbol extension attribute from
      	attr.extension.
      	* gfortran.h : Add prototype for gfc_add_extension.
      
      From-SVN: r138891
      Paul Thomas committed
    • gfortran.h (gfc_finalizer): Replaced member `procedure' by two new members… · f6fad28e
      gfortran.h (gfc_finalizer): Replaced member `procedure' by two new members `proc_sym' and `proc_tree' to...
      
      2008-08-08  Daniel Kraft  <d@domob.eu>
      
      	* gfortran.h (gfc_finalizer):  Replaced member `procedure' by two
      	new members `proc_sym' and `proc_tree' to store the symtree after
      	resolution.
      	(gfc_find_sym_in_symtree):  Made public.
      	* decl.c (gfc_match_final_decl):  Adapted for new member name.
      	* interface.c (gfc_find_sym_in_symtree):  Made public.
      	(gfc_extend_expr), (gfc_extend_assign):  Changed call accordingly.
      	* module.c (mio_finalizer), (mio_f2k_derived), (mio_full_f2k_derived):
      	New methods for module-file IO of f2k_derived.
      	(mio_symbol):  Do IO of f2k_derived namespace.
      	* resolve.c (gfc_resolve_finalizers):  Adapted for new member name and
      	finding the symtree for the symbol here.
      	* symbol.c (gfc_free_finalizer):  Adapted for new members.
      
      2008-08-08  Daniel Kraft  <d@domob.eu>
      
      	* gfortran.dg/finalize_9.f03:  New test.
      	* gfortran.dg/module_md5_1.f90:  Adapted MD5-sum for changed module
      	file format.
      
      From-SVN: r138884
      Daniel Kraft committed
  20. 29 Jul, 2008 2 commits
    • trans-expr.c (conv_parent_component_references): New function to build missing parent references. · 7d1f1e61
      2008-07-29  Paul Thomas  <pault@gcc.gnu.org>
      
      fortran/	
      	* trans-expr.c (conv_parent_component_references): New function
      	to build missing parent references.
      	(gfc_conv_variable): Call it
      	* symbol.c (gfc_add_component): Check that component name in a
      	derived type extension does not appear in parent.
      	(gfc_find_component): For a derived type extension, check if
      	the component appears in the parent derived type by calling
      	self. Separate errors for private components and private types.
      	* decl.c (match_data_constant): Add extra arg to call to
      	gfc_match_structure_constructor.
      	(check_extended_derived_type): New function to check that a
      	parent derived type exists and that it is OK for exension.
      	(gfc_get_type_attr_spec): Add extra argument 'name' and return
      	it if extends is specified.
      	(gfc_match_derived_decl): Match derived type extension and
      	build a first component of the parent derived type if OK. Add
      	the f2k namespace if not present.
      	* gfortran.h : Add the extension attribute.
      	* module.c : Handle attribute 'extension'.
      	* match.h : Modify prototypes for gfc_get_type_attr_spec and
      	gfc_match_structure_constructor.
      	* primary.c (build_actual_constructor): New function extracted
      	from gfc_match_structure_constructor and modified to call self
      	iteratively to build derived type extensions, when f2k named
      	components are used.
      	(gfc_match_structure_constructor): Do not throw error for too
      	many components if a parent type is being handled. Use
      	gfc_find_component to generate errors for non-existent or
      	private components.  Iteratively call self for derived type
      	extensions so that parent constructor is built.  If extension
      	and components left over, throw error.
      	(gfc_match_rvalue): Add extra arg to call to
      	gfc_match_structure_constructor.
      	* trans-array.c (gfc_conv_resolve_dependencies): If lhs and rhs
      	are the same symbol, aliassing does not matter.
      testsuite/
      	* gfortran.dg/extends_1.f03: New test.
      	* gfortran.dg/extends_2.f03: New test.
      	* gfortran.dg/extends_3.f03: New test.
      	* gfortran.dg/extends_4.f03: New test.
      	* gfortran.dg/extends_5.f03: New test.
      	* gfortran.dg/extends_6.f03: New test.
      	* gfortran.dg/private_type_6.f90: Modify error message.
      	* gfortran.dg/structure_constructor_7.f03: Modify error message.
      	* gfortran.dg/structure_constructor_8.f03: Modify error message.
      
      From-SVN: r138275
      Paul Thomas committed
    • gfortran.h (try): Remove macro. · 17b1d2a0
      	* gfortran.h (try): Remove macro.  Replace try with gfc_try
      	throughout.
      	* array.c: Likewise.
      	* check.c: Likewise.
      	* cpp.c: Likewise.
      	* cpp.h: Likewise.
      	* data.c: Likewise.
      	* data.h: Likewise.
      	* decl.c: Likewise.
      	* error.c: Likewise.
      	* expr.c: Likewise.
      	* interface.c: Likewise.
      	* intrinsic.c: Likewise.
      	* intrinsic.h: Likewise.
      	* io.c: Likewise.
      	* match.h: Likewise.
      	* parse.c: Likewise.
      	* parse.h: Likewise.
      	* resolve.c: Likewise.
      	* scanner.c: Likewise.
      	* simplify.c: Likewise.
      	* symbol.c: Likewise.
      	* trans-openmp.c: Likewise.
      	* trans-types.c: Likewise.
      
      From-SVN: r138226
      Kaveh R. Ghazi committed
  21. 24 Jul, 2008 1 commit
    • re PR fortran/33141 (Intrinsic procedures: Improve warning/error with -std=*) · c3005b0f
      2008-07-24  Daniel Kraft  <d@domob.eu>
      
      	PR fortran/33141
      	* lang.opt (Wnonstd-intrinsics):  Removed option.
      	(Wintrinsics-std), (Wintrinsic-shadow):  New options.
      	* invoke.texi (Option Summary):  Removed -Wnonstd-intrinsics
      	from the list and added -Wintrinsics-std and -Wintrinsic-shadow.
      	(Error and Warning Options):  Documented the new options and removed
      	the documentation for -Wnonstd-intrinsics.
      	* gfortran.h (gfc_option_t):  New members warn_intrinsic_shadow and
      	warn_intrinsics_std, removed warn_nonstd_intrinsics.
      	(gfc_is_intrinsic):  Renamed from gfc_intrinsic_name.
      	(gfc_warn_intrinsic_shadow), (gfc_check_intrinsic_standard):  New.
      	* decl.c (match_procedure_decl):  Replaced gfc_intrinsic_name by
      	the new name gfc_is_intrinsic.
      	(warn_intrinsic_shadow):  New helper method.
      	(gfc_match_function_decl), (gfc_match_subroutine):  Call the new method
      	warn_intrinsic_shadow to check the just-parsed procedure.
      	* expr.c (check_init_expr):  Call new gfc_is_intrinsic to check whether
      	the function called is really an intrinsic in the selected standard.
      	* intrinsic.c (gfc_is_intrinsic):  Renamed from gfc_intrinsic_name and
      	extended to take into account the selected standard settings when trying
      	to find out whether a symbol is an intrinsic or not.
      	(gfc_check_intrinsic_standard):  Made public and extended.
      	(gfc_intrinsic_func_interface), (gfc_intrinsic_sub_interface):  Removed
      	the calls to check_intrinsic_standard, this check now happens inside
      	gfc_is_intrinsic.
      	(gfc_warn_intrinsic_shadow):  New method defined.
      	* options.c (gfc_init_options):  Initialize new warning flags to false
      	and removed intialization of Wnonstd-intrinsics flag.
      	(gfc_post_options):  Removed logic for Wnonstd-intrinsics flag.
      	(set_Wall):  Set new warning flags and removed Wnonstd-intrinsics flag.
      	(gfc_handle_option):  Handle the new flags and removed handling of the
      	old Wnonstd-intrinsics flag.
      	* primary.c (gfc_match_rvalue):  Replaced call to gfc_intrinsic_name by
      	the new name gfc_is_intrinsic.
      	* resolve.c (resolve_actual_arglist):  Ditto.
      	(resolve_generic_f), (resolve_unknown_f):  Ditto.
      	(is_external_proc):  Ditto.
      	(resolve_generic_s), (resolve_unknown_s):  Ditto.
      	(resolve_symbol):  Ditto and ensure for symbols declared INTRINSIC that
      	they are really available in the selected standard setting.
      
      2008-07-24  Daniel Kraft  <d@domob.eu>
      
      	PR fortran/33141
      	* gfortran.dg/intrinsic_shadow_1.f03:  New test for -Wintrinsic-shadow.
      	* gfortran.dg/intrinsic_shadow_2.f03:  Ditto.
      	* gfortran.dg/intrinsic_shadow_3.f03:  Ditto.
      	* gfortran.dg/intrinsic_std_1.f90:  New test for -Wintrinsics-std.
      	* gfortran.dg/intrinsic_std_2.f90:  Ditto.
      	* gfortran.dg/intrinsic_std_3.f90:  Ditto.
      	* gfortran.dg/intrinsic_std_4.f90:  Ditto.
      	* gfortran.dg/warn_std_1.f90:  Removed option -Wnonstd-intrinsics.
      	* gfortran.dg/warn_std_2.f90:  Replaced -Wnonstd-intrinsics by
      	-Wintrinsics-std and adapted expected errors/warnings.
      	* gfortran.dg/warn_std_3.f90:  Ditto.
      	* gfortran.dg/c_sizeof_2.f90:  Adapted expected error/warning message.
      	* gfortran.dg/gamma_2.f90:  Ditto.
      	* gfortran.dg/selected_char_kind_3.f90:  Ditto.
      	* gfortran.dg/fmt_g0_2.f08:  Call with -fall-intrinsics to allow abort.
      
      From-SVN: r138122
      Daniel Kraft committed
  22. 21 Jul, 2008 1 commit
    • fmt_g0_3.f08: Fix typo in expected error message. · df2fba9e
      gcc/testsuite/
      
      	* gfortran.dg/fmt_g0_3.f08: Fix typo in expected error message.
      
      gcc/fortran/
      
      	* expr.c (gfc_check_pointer_assign): Fix typo in string.
      	* io.c (check_format): Fix typo in string.  Fix comment typos.
      	* parse.c (gfc_global_used): Likewise.
      	* resolve.c (resolve_allocate_expr): Likewise.
      	* symbol.c (gfc_set_default_type): Likewise.
      	* arith.c: Fix typos in comments.
      	* array.c: Likewise.
      	* data.c: Likewise.
      	* decl.c: Likewise.
      	* dependency.c: Likewise.
      	* f95-lang.c: Likewise.
      	* gfortran.h: Likewise.
      	* matchexp.c: Likewise.
      	* module.c: Likewise.
      	* primary.c: Likewise.
      	* scanner.c: Likewise.
      	* trans-array.c: Likewise.
      	* trans-common.c: Likewise.
      	* trans-decl.c: Likewise.
      	* trans-expr.c: Likewise.
      	* trans-intrinsic.c: Likewise.
      	* trans-types.c: Likewise.
      	* trans.c: Likewise.
      	* trans.h: Likewise.
      
      From-SVN: r138040
      Ralf Wildenhues committed
  23. 19 Jul, 2008 2 commits
    • gfortran.h (new): Remove macro. · 7b901ac4
      	* gfortran.h (new): Remove macro.
      	* array.c (gfc_append_constructor, match_array_list,
      	gfc_match_array_constructor): Likewise.
      	* bbt.c (insert, gfc_insert_bbt): Likewise.
      	* decl.c (var_element, top_var_list, top_val_list, gfc_match_data,
      	get_proc_name): Likewise.
      	* expr.c (gfc_copy_actual_arglist): Likewise.
      	* interface.c (compare_actual_formal, check_new_interface,
      	gfc_add_interface): Likewise.
      	* intrinsic.c gfc_convert_type_warn, gfc_convert_chartype):
      	Likewise.
      	* io.c (match_io_iterator, match_io_list): Likewise.
      	* match.c (match_forall_header): Likewise.
      	* matchexp.c (build_node): Likewise.
      	* module.c (gfc_match_use): Likewise.
      	* scanner.c (load_file): Likewise.
      	* st.c (gfc_append_code): Likewise.
      	* symbol.c (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
      	gfc_commit_symbols): Likewise.
      	* trans-common.c (build_field): Likewise.
      	* trans-decl.c (gfc_finish_var_decl): Likewise.
      	* trans-expr.c (gfc_free_interface_mapping,
      	gfc_get_interface_mapping_charlen, gfc_add_interface_mapping,
      	gfc_finish_interface_mapping,
      	gfc_apply_interface_mapping_to_expr): Likewise.
      	* trans.h (gfc_interface_sym_mapping): Likewise.
      
      From-SVN: r137982
      Kaveh R. Ghazi committed
    • gfortran.h (operator): Remove macro. · a1ee985f
      	* gfortran.h (operator): Remove macro.
      	(gfc_namespace, gfc_expr): Avoid C++ keywords.
      	* arith.c (eval_intrinsic, eval_intrinsic_f2, eval_intrinsic_f3):
      	Likewise.
      	* decl.c (access_attr_decl): Likewise.
      	* dependency.c (gfc_dep_compare_expr): Likewise.
      	* dump-parse-tree.c (show_expr, show_uop, show_namespace):
      	Likewise.
      	* expr.c (gfc_copy_expr, gfc_type_convert_binary,
      	simplify_intrinsic_op, check_intrinsic_op): Likewise.
      	* interface.c (fold_unary, gfc_match_generic_spec,
      	gfc_match_interface, gfc_match_end_interface,
      	check_operator_interface, check_uop_interfaces,
      	gfc_check_interfaces, gfc_extend_expr, gfc_extend_assign,
      	gfc_add_interface, gfc_current_interface_head,
      	gfc_set_current_interface_head): Likewise.
      	* iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
      	Likewise.
      	* matchexp.c (gfc_get_parentheses, build_node): Likewise.
      	* module.c (gfc_use_rename, gfc_match_use, find_use_name_n,
      	number_use_names, mio_expr, load_operator_interfaces, read_module,
      	write_operator, write_module): Likewise.
      	* openmp.c (resolve_omp_atomic): Likewise.
      	* resolve.c (resolve_operator, gfc_resolve_character_operator,
      	gfc_resolve_uops): Likewise.
      	* symbol.c (free_uop_tree, gfc_free_namespace): Likewise.
      	* trans-expr.c (gfc_conv_expr_op): Likewise.
      	* trans-openmp.c (gfc_trans_omp_atomic): Likewise.
      
      From-SVN: r137981
      Kaveh R. Ghazi committed
  24. 02 Jul, 2008 1 commit
    • re PR fortran/32580 (iso_c_binding c_f_procpointer / procedure pointers) · 8fb74da4
      2008-07-02  Janus Weil  <janus@gcc.gnu.org>
      	    Tobias Burnus  <burnus@net-b.de>
      	    Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/32580
      	* gfortran.h (struct gfc_symbol): New member "proc_pointer".
      	* check.c (gfc_check_associated,gfc_check_null): Implement
      	procedure pointers.
      	* decl.c (match_procedure_decl): Ditto.
      	* expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol): Ditto.
      	* interface.c (compare_actual_formal): Ditto.
      	* match.h: Ditto.
      	* match.c (gfc_match_pointer_assignment): Ditto.
      	* parse.c (parse_interface): Ditto.
      	* primary.c (gfc_match_rvalue,match_variable): Ditto.
      	* resolve.c (resolve_fl_procedure): Ditto.
      	* symbol.c (check_conflict,gfc_add_external,gfc_add_pointer,
      	gfc_copy_attr,gen_fptr_param,build_formal_args): Ditto.
      	* trans-decl.c (get_proc_pointer_decl,gfc_get_extern_function_decl,
      	create_function_arglist): Ditto.
      	* trans-expr.c (gfc_conv_variable,gfc_conv_function_val,
      	gfc_conv_function_call,gfc_trans_pointer_assignment): Ditto.
      
      
      2008-07-02  Janus Weil  <janus@gcc.gnu.org>
      	    Tobias Burnus  <burnus@net-b.de>
      
      	PR fortran/32580
      	* gfortran.dg/c_f_pointer_tests_3.f90: Updated.
      	* gfortran.dg/proc_decl_1.f90: Updated.
      	* gfortran.dg/proc_ptr_1.f90: New.
      	* gfortran.dg/proc_ptr_2.f90: New.
      	* gfortran.dg/proc_ptr_3.f90: New.
      	* gfortran.dg/proc_ptr_4.f90: New.
      	* gfortran.dg/proc_ptr_5.f90: New.
      	* gfortran.dg/proc_ptr_6.f90: New.
      	* gfortran.dg/proc_ptr_7.f90: New.
      	* gfortran.dg/proc_ptr_8.f90: New.
      
      Co-Authored-By: Paul Thomas <pault@gcc.gnu.org>
      Co-Authored-By: Tobias Burnus <burnus@net-b.de>
      
      From-SVN: r137386
      Janus Weil committed
  25. 20 Jun, 2008 1 commit
    • arith.c (hollerith2representation): Fix for -Wc++-compat. · ece3f663
      	* arith.c (hollerith2representation): Fix for -Wc++-compat.
      	* array.c (gfc_get_constructor): Likewise.
      	* decl.c (gfc_get_data_variable, gfc_get_data_value, gfc_get_data,
      	create_enum_history, gfc_match_final_decl): Likewise.
      	* error.c (error_char): Likewise.
      	* expr.c (gfc_get_expr, gfc_copy_expr): Likewise.
      	* gfortran.h (gfc_get_charlen, gfc_get_array_spec,
      	gfc_get_component, gfc_get_formal_arglist, gfc_get_actual_arglist,
      	gfc_get_namelist, gfc_get_omp_clauses, gfc_get_interface,
      	gfc_get_common_head, gfc_get_dt_list, gfc_get_array_ref,
      	gfc_get_ref, gfc_get_equiv, gfc_get_case, gfc_get_iterator,
      	gfc_get_alloc, gfc_get_wide_string): Likewise.
      	* interface.c (count_types_test): Likewise.
      	* intrinsic.c (add_char_conversions, gfc_intrinsic_init_1):
      	Likewise.
      	* io.c (gfc_match_open, gfc_match_close, match_filepos, match_io,
      	gfc_match_inquire, gfc_match_wait): Likewise.
      	* match.c (gfc_match, match_forall_iterator): Likewise.
      	* module.c (gfc_get_pointer_info, gfc_get_use_rename, add_fixup,
      	add_true_name, parse_string, write_atom, quote_string,
      	mio_symtree_ref, mio_gmp_real, write_common_0): Likewise.
      	* options.c (gfc_post_options): Likewise.
      	* primary.c (match_integer_constant, match_hollerith_constant,
      	match_boz_constant, match_real_constant,
      	gfc_get_structure_ctor_component, gfc_match_structure_constructor): Likewise.
      	* scanner.c (gfc_widechar_to_char, add_path_to_list,
      	add_file_change, load_line, get_file, preprocessor_line,
      	load_file, unescape_filename, gfc_read_orig_filename): Likewise.
      	* simplify.c (gfc_simplify_ibits, gfc_simplify_ishft,
      	gfc_simplify_ishftc): Likewise.
      	* symbol.c (gfc_get_st_label, gfc_get_namespace, gfc_new_symtree,
      	gfc_get_uop, gfc_new_symbol, save_symbol_data, gfc_get_gsymbol):
      	Likewise.
      	* target-memory.c (gfc_target_interpret_expr): Likewise.
      	* trans-const.c (gfc_build_wide_string_const): Likewise.
      	* trans-expr.c (gfc_add_interface_mapping): Likewise.
      	* trans-intrinsic.c (gfc_conv_intrinsic_conversion,
      	gfc_conv_intrinsic_int, gfc_conv_intrinsic_lib_function,
      	gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_ctime,
      	gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
      	gfc_conv_intrinsic_minmax, gfc_conv_intrinsic_minmax_char,
      	gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_index_scan_verify,
      	gfc_conv_intrinsic_merge, gfc_conv_intrinsic_trim): Likewise.
      	* trans.c (gfc_get_backend_locus): Likewise.
      	* trans.h (gfc_get_ss): Likewise.
      
      From-SVN: r136982
      Kaveh R. Ghazi committed
  26. 18 Jun, 2008 1 commit
    • PR fortran/36517, fortran/36492 · d2848082
      2008-06-18  Daniel Kraft  <d@domob.eu>
      
      	PR fortran/36517, fortran/36492
      	* gfortran.dg/array_constructor_25.f03:  New test.
      	* gfortran.dg/array_constructor_26.f03:  New test.
      	* gfortran.dg/array_constructor_27.f03:  New test.
      	* gfortran.dg/array_constructor_28.f03:  New test.
      	* gfortran.dg/array_constructor_29.f03:  New test.
      	* gfortran.dg/array_constructor_30.f03:  New test.
      	* gfortran.dg/array_constructor_type_19.f03:  New test.
      	* gfortran.dg/array_constructor_type_20.f03:  New test.
      	* gfortran.dg/array_constructor_type_21.f03:  New test.
      
      2008-06-18  Daniel Kraft  <d@domob.eu>
      
      	PR fortran/36517, fortran/36492
      	* array.c (gfc_resolve_character_array_constructor):  Call
      	gfc_set_constant_character_len with changed length-chec argument.
      	* decl.c (gfc_set_constant_character_len):  Changed array argument to
      	be a generic length-checking argument that can be used for correct
      	checking with typespec and in special cases where the should-be length
      	is different from the target length.
      	(build_struct):  Call gfc_set_constant_character_len with changed length
      	checking argument and introduced additional checks for exceptional
      	conditions on invalid code.
      	(add_init_expr_to_sym), (do_parm):  Call gfc_set_constant_character_len
      	with changed argument.
      	* match.h (gfc_set_constant_character_len):  Changed third argument to
      	int for the should-be length rather than bool.
      
      From-SVN: r136894
      Daniel Kraft committed
  27. 13 Jun, 2008 1 commit
  28. 08 Jun, 2008 1 commit
  29. 02 Jun, 2008 2 commits
    • re PR fortran/36361 (attribute declaration outside of INTERFACE body) · e62532af
      2008-06-02  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/36361
      	* symbol.c (gfc_add_allocatable,gfc_add_dimension,
      	gfc_add_explicit_interface): Added checks.
      	* decl.c (attr_decl1): Added missing "var_locus".
      	* parse.c (parse_interface): Checking for errors.
      
      
      2008-06-02  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/36361
      	* gfortran.dg/interface_24.f90: New.
      
      From-SVN: r136296
      Janus Weil committed
    • gfortran.h: New statement-type ST_FINAL for FINAL declarations. · 34523524
      2008-06-02  Daniel Kraft  <d@domob.eu>
      
              * gfortran.h:  New statement-type ST_FINAL for FINAL declarations.
              (struct gfc_symbol):  New member f2k_derived.
              (struct gfc_namespace):  New member finalizers, for use in the above
              mentioned f2k_derived namespace.
              (struct gfc_finalizer):  New type defined for finalizers linked list.
              * match.h (gfc_match_final_decl):  New function header.
              * decl.c (gfc_match_derived_decl):  Create f2k_derived namespace
              on constructed symbol node.
              (gfc_match_final_decl):  New function to match a FINAL declaration line.
              * parse.c (decode_statement):  match-call for keyword FINAL.
              (parse_derived):  Parse CONTAINS section and accept FINAL statements.
              * resolve.c (gfc_resolve_finalizers):  New function to resolve
              (that is in this case, check) a list of finalizer procedures.
              (resolve_fl_derived):  Call gfc_resolve_finalizers here.
              * symbol.c (gfc_get_namespace):  Initialize new finalizers to NULL.
              (gfc_free_namespace):  Free finalizers list.
              (gfc_new_symbol):  Initialize new f2k_derived to NULL.
              (gfc_free_symbol):  Free f2k_derived namespace.
              (gfc_free_finalizer):  New function to free a single gfc_finalizer node.
              (gfc_free_finalizer_list):  New function to free a linked list of
              gfc_finalizer nodes.
      
      2008-06-02  Daniel Kraft  <d@domob.eu>
      
              * finalize_1.f08:  New test.
              * finalize_2.f03:  New test.
              * finalize_3.f03:  New test.
              * finalize_4.f03:  New test.
              * finalize_5.f03:  New test.
              * finalize_6.f90:  New test.
              * finalize_7.f03:  New test.
              * finalize_8.f03:  New test.
      
      From-SVN: r136293
      Daniel Kraft committed
  30. 18 May, 2008 1 commit
    • intrinsic.c (char_conversions, ncharconv): New static variables. · d393bbd7
      	* intrinsic.c (char_conversions, ncharconv): New static variables.
      	(find_char_conv): New function.
      	(add_functions): Add simplification functions for ADJUSTL and
      	ADJUSTR. Don't check the kind of their argument. Add checking for
      	LGE, LLE, LGT and LLT.
      	(add_subroutines): Fix argument type for SLEEP. Fix argument name
      	for SYSTEM.
      	(add_char_conversions): New function.
      	(gfc_intrinsic_init_1): Call add_char_conversions.
      	(gfc_intrinsic_done_1): Free char_conversions.
      	(check_arglist): Use kind == 0 as a signal that we don't want
      	the kind value to be checked.
      	(do_simplify): Also simplify character functions.
      	(gfc_convert_chartype): New function
      	* trans-array.c (gfc_trans_array_ctor_element): Don't force the
      	use of default character type.
      	(gfc_trans_array_constructor_value): Likewise.
      	(get_array_ctor_var_strlen): Use integer kind to build an integer
      	instead of a character kind!
      	(gfc_build_constant_array_constructor): Don't force the use of
      	default character type.
      	(gfc_conv_loop_setup): Likewise.
      	* trans-expr.c (gfc_conv_string_tmp): Don't force the use of
      	default character type. Allocate enough memory for wide strings.
      	(gfc_conv_concat_op): Make sure operand kind are the same.
      	(string_to_single_character): Remove gfc_ prefix. Reindent.
      	Don't force the use of default character type.
      	(gfc_conv_scalar_char_value): Likewise.
      	(gfc_build_compare_string): Call string_to_single_character.
      	(fill_with_spaces): New function
      	(gfc_trans_string_copy): Add kind arguments. Use them to deal
      	with wide character kinds.
      	(gfc_conv_statement_function): Whitespace fix. Call
      	gfc_trans_string_copy with new kind arguments.
      	(gfc_conv_substring_expr): Call gfc_build_wide_string_const
      	instead of using gfc_widechar_to_char.
      	(gfc_conv_string_parameter): Don't force the use of default
      	character type.
      	(gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
      	* intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
      	gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
      	* decl.c (gfc_set_constant_character_len): Don't assert the
      	existence of a single character kind.
      	* trans-array.h (gfc_trans_string_copy): New prototype.
      	* gfortran.h (gfc_check_character_range, gfc_convert_chartype):
      	New prototypes.
      	* error.c (print_wide_char_into_buffer): New function lifting
      	code from gfc_print_wide_char. Fix order to output '\x??' instead
      	of 'x\??'.
      	(gfc_print_wide_char): Call print_wide_char_into_buffer.
      	(show_locus): Call print_wide_char_into_buffer with buffer local
      	to this function.
      	* trans-const.c (gfc_build_wide_string_const): New function.
      	(gfc_conv_string_init): Deal with wide characters strings
      	constructors.
      	(gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
      	* trans-stmt.c (gfc_trans_label_assign): Likewise.
      	(gfc_trans_character_select): Deal with wide strings.
      	* expr.c (gfc_check_assign): Allow conversion between character
      	kinds on assignment.
      	* trans-const.h (gfc_build_wide_string_const): New prototype.
      	* trans-types.c (gfc_get_character_type_len_for_eltype,
      	gfc_get_character_type_len): Create too variants of the old
      	gfc_get_character_type_len, one getting kind argument and the
      	other one directly taking a type tree.
      	* trans.h (gfor_fndecl_select_string_char4,
      	gfor_fndecl_convert_char1_to_char4,
      	gfor_fndecl_convert_char4_to_char1): New prototypes.
      	* trans-types.h (gfc_get_character_type_len_for_eltype): New
      	prototype.
      	* resolve.c (resolve_operator): Exit early when kind mismatches
      	are detected, because that makes us issue an error message later.
      	(validate_case_label_expr): Fix wording of error message.
      	* iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
      	functions.
      	(gfc_resolve_pack): Call _char4 variants of library function
      	when dealing with wide characters.
      	(gfc_resolve_reshape): Likewise.
      	(gfc_resolve_spread): Likewise.
      	(gfc_resolve_transpose): Likewise.
      	(gfc_resolve_unpack): Likewise.
      	* target-memory.c (size_character): Take character kind bit size
      	correctly into account (not that it changes anything for now, but
      	it's more generic).
      	(gfc_encode_character): Added gfc_ prefix. Encoding each
      	character of a string by calling native_encode_expr for the
      	corresponding unsigned integer.
      	(gfc_target_encode_expr): Add gfc_ prefix to encode_character.
      	* trans-decl.c (gfc_build_intrinsic_function_decls): Build
      	gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
      	and gfor_fndecl_convert_char4_to_char1.
      	* target-memory.h (gfc_encode_character): New prototype.
      	* arith.c (gfc_check_character_range): New function.
      	(eval_intrinsic): Allow non-default character kinds.
      	* check.c (gfc_check_access_func): Only allow default
      	character kind arguments.
      	(gfc_check_chdir): Likewise.
      	(gfc_check_chdir_sub): Likewise.
      	(gfc_check_chmod): Likewise.
      	(gfc_check_chmod_sub): Likewise.
      	(gfc_check_lge_lgt_lle_llt): New function.
      	(gfc_check_link): Likewise.
      	(gfc_check_link_sub): Likewise.
      	(gfc_check_symlnk): Likewise.
      	(gfc_check_symlnk_sub): Likewise.
      	(gfc_check_rename): Likewise.
      	(gfc_check_rename_sub): Likewise.
      	(gfc_check_fgetputc_sub): Likewise.
      	(gfc_check_fgetput_sub): Likewise.
      	(gfc_check_stat): Likewise.
      	(gfc_check_stat_sub): Likewise.
      	(gfc_check_date_and_time): Likewise.
      	(gfc_check_ctime_sub): Likewise.
      	(gfc_check_fdate_sub): Likewise.
      	(gfc_check_gerror): Likewise.
      	(gfc_check_getcwd_sub): Likewise.
      	(gfc_check_getarg): Likewise.
      	(gfc_check_getlog): Likewise.
      	(gfc_check_hostnm): Likewise.
      	(gfc_check_hostnm_sub): Likewise.
      	(gfc_check_ttynam_sub): Likewise.
      	(gfc_check_perror): Likewise.
      	(gfc_check_unlink): Likewise.
      	(gfc_check_unlink_sub): Likewise.
      	(gfc_check_system_sub): Likewise.
      	* primary.c (got_delim): Perform correct character range checking
      	for all kinds.
      	* trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
      	calls to library functions convert_char4_to_char1 and
      	convert_char1_to_char4 for character conversions.
      	(gfc_conv_intrinsic_char): Allow all character kings.
      	(gfc_conv_intrinsic_strcmp): Fix whitespace.
      	(gfc_conv_intrinsic_repeat): Take care of all character kinds.
      	* intrinsic.texi: For all GNU intrinsics accepting character
      	arguments, mention that they're restricted to the default kind.
      	* simplify.c (simplify_achar_char): New function.
      	(gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
      	gfc_simplify_ichar): Don't error out for wide characters.
      	(gfc_convert_char_constant): New function.
      
      	* gfortran.dg/achar_3.f90: Adjust error messages.
      	* gfortran.dg/achar_5.f90: New test.
      	* gfortran.dg/achar_6.F90: New test.
      	* gfortran.dg/widechar_1.f90: New test.
      	* gfortran.dg/widechar_2.f90: New test.
      	* gfortran.dg/widechar_3.f90: New test.
      	* gfortran.dg/widechar_4.f90: New test.
      	* gfortran.dg/widechar_intrinsics_1.f90: New test.
      	* gfortran.dg/widechar_intrinsics_2.f90: New test.
      	* gfortran.dg/widechar_intrinsics_3.f90: New test.
      	* gfortran.dg/widechar_intrinsics_4.f90: New test.
      	* gfortran.dg/widechar_intrinsics_5.f90: New test.
      	* gfortran.dg/widechar_select_1.f90: New test.
      	* gfortran.dg/widechar_select_2.f90: New test.
      
      From-SVN: r135515
      Francois-Xavier Coudert committed
  31. 16 May, 2008 1 commit
    • re PR fortran/34325 (Wrong error message for syntax error) · acb388a0
      2008-05-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
      
          PR fortran/34325
          * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
          * expr.c (gfc_specification_expr): Supplement the error message with the
          type that was found.
          * resolve.c (gfc_resolve_index): Likewise.
          * match.c (gfc_match_parens): Clarify error message with "at or before".
          (gfc_match_do): Check for matching pairs of parenthesis.
      
      From-SVN: r135428
      Jerry DeLisle committed
  32. 06 May, 2008 1 commit
    • arith.c: (gfc_arith_concat... · 00660189
      	* arith.c: (gfc_arith_concat, gfc_compare_string,
      	gfc_compare_with_Cstring, hollerith2representation,
      	gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
      	gfc_hollerith2character, gfc_hollerith2logical): Use wide
      	characters for character constants.
      	* data.c (create_character_intializer): Likewise.
      	* decl.c (gfc_set_constant_character_len): Likewise.
      	* dump-parse-tree.c (show_char_const): Correctly dump wide
      	character strings.
      	error.c (print_wide_char): Rename into gfc_print_wide_char.
      	(show_locus): Adapt to new prototype of gfc_print_wide_char.
      	expr.c (free_expr0): Representation is now disjunct from
      	character string value, so we always free it.
      	(gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
      	to wide character strings.
      	* gfortran.h (gfc_expr): Make value.character.string a wide string.
      	(gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
      	gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
      	(gfc_get_wide_string): New macro.
      	(gfc_print_wide_char): New prototype.
      	* io.c (format_string): Make a wide string.
      	(next_char, gfc_match_format, compare_to_allowed_values, 
      	gfc_match_open): Deal with wide strings.
      	* module.c (mio_expr): Convert between wide strings and ASCII ones.
      	* primary.c (match_hollerith_constant, match_charkind_name): 
      	Handle wide strings.
      	* resolve.c (build_default_init_expr): Likewise.
      	* scanner.c (gfc_wide_toupper, gfc_wide_memset,
      	gfc_char_to_widechar): New functions.
      	(wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
      	Changes in prototypes.
      	(gfc_define_undef_line, load_line, preprocessor_line,
      	include_line, load_file, gfc_read_orig_filename): Handle wide
      	strings.
      	* simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
      	gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
      	gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
      	gfc_simplify_repeat): Handle wide strings.
      	(wide_strspn, wide_strcspn): New helper functions.
      	(gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
      	Handle wide strings.
      	* symbol.c (generate_isocbinding_symbol): Likewise.
      	* target-memory.c (size_character, gfc_target_expr_size,
      	encode_character, gfc_target_encode_expr, gfc_interpret_character,
      	gfc_target_interpret_expr): Handle wide strings.
      	* trans-const.c (gfc_conv_string_init): Lower wide strings to
      	narrow ones.
      	(gfc_conv_constant_to_tree): Likewise.
      	* trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
      	* trans-io.c (gfc_new_nml_name_expr): Likewise.
      	* trans-stmt.c (gfc_trans_label_assign): Likewise.
      
      From-SVN: r135006
      Francois-Xavier Coudert committed