X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Ffortran%2FChangeLog;h=2fa33a1a0b87b917674560aee807c352fe5a4312;hb=fafa1b4027cf6f2b496b75e0a4c083f1c2fd1561;hp=74e74afe32c8a31e71c1d9bf6b99f2639d8e3443;hpb=dd4aa760b5b0e62792de1b1815e129f82e73bf98;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 74e74afe32c..2fa33a1a0b8 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,975 @@ +2005-12-16 Richard Guenther + + * trans-array.c (gfc_conv_descriptor_data_addr): Use + build_fold_addr_expr where appropriate. + (gfc_trans_allocate_array_storage): Likewise. + (gfc_trans_array_constructor_value): Likewise. + (gfc_conv_array_data): Likewise. + (gfc_conv_expr_descriptor): Likewise. + (gfc_conv_array_parameter): Likewise. + * trans-expr.c (gfc_conv_variable): Likewise. + (gfc_conv_function_val): Likewise. + (gfc_conv_function_call): Likewise. + (gfc_conv_expr_reference): Likewise. + * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Likewise. + (gfc_conv_intrinsic_fdate): Likewise. + (gfc_conv_intrinsic_ttynam): Likewise. + (gfc_conv_intrinsic_si_kind): Likewise. + (gfc_conv_intrinsic_trim): Likewise. + * trans-io.c (set_parameter_ref): Likewise. + (gfc_convert_array_to_string): Likewise. + (gfc_trans_open): Likewise. + (gfc_trans_close): Likewise. + (build_filepos): Likewise. + (gfc_trans_inquire): Likewise. + (nml_get_addr_expr): Likewise. + (transfer_namelist_element): Likewise. + (build_dt): Likewise. + (gfc_trans_dt_end): Likewise. + (transfer_array_component): Likewise. + (transfer_expr): Likewise. + (transfer_array_desc): Likewise. + (gfc_trans_transfer): Likewise. + * trans-stmt.c (gfc_trans_allocate): Likewise. + (gfc_trans_deallocate): Likewise. + +2005-12-16 Kazu Hirata + + * dependency.c, resolve.c, trans-array.c: Fix comment typos. + * gfortran.texi: Fix typos. + +2005-12-14 Erik Edelmann + + PR fortran/18197 + * resolve.c (resolve_formal_arglist): Remove code to set + the type of a function symbol from it's result symbol. + +2005-12-13 Richard Guenther + + * trans-expr.c (gfc_conv_substring): Use fold_build2 and + build_int_cst. + +2005-12-13 Richard Sandiford + + * Make-lang.in (fortran/trans-resolve.o): Depend on + fortran/dependency.h. + * gfortran.h (gfc_expr): Add an "inline_noncopying_intrinsic" flag. + * dependency.h (gfc_get_noncopying_intrinsic_argument): Declare. + (gfc_check_fncall_dependency): Change prototype. + * dependency.c (gfc_get_noncopying_intrinsic_argument): New function. + (gfc_check_argument_var_dependency): New function, split from + gfc_check_fncall_dependency. + (gfc_check_argument_dependency): New function. + (gfc_check_fncall_dependency): Replace the expression parameter with + separate symbol and argument list parameters. Generalize the function + to handle dependencies for any type of expression, not just variables. + Accept a further argument giving the intent of the expression being + tested. Ignore intent(in) arguments if that expression is also + intent(in). + * resolve.c: Include dependency.h. + (find_noncopying_intrinsics): New function. + (resolve_function, resolve_call): Call it on success. + * trans-array.h (gfc_conv_array_transpose): Declare. + (gfc_check_fncall_dependency): Remove prototype. + * trans-array.c (gfc_conv_array_transpose): New function. + * trans-intrinsic.c (gfc_conv_intrinsic_function): Don't use the + libcall handling if the expression is to be evaluated inline. + Add a case for handling inline transpose()s. + * trans-expr.c (gfc_trans_arrayfunc_assign): Adjust for the new + interface provided by gfc_check_fncall_dependency. + +2005-12-12 Steven G. Kargl + + PR fortran/25078 + * match.c (gfc_match_equivalence): Count number of objects. + +2005-12-11 Aldy Hernandez + + * lang.opt: Add RejectNegative to ffixed-form and ffree-form. + +2005-12-10 Francois-Xavier Coudert + + PR fortran/25068 + * io.c (resolve_tag): Add correct diagnostic for F2003 feature. + +2005-12-10 Thomas Koenig + + PR fortran/23815 + * io.c (top level): Add convert to io_tag. + (resolve_tag): convert is GFC_STD_GNU. + (match_open_element): Add convert. + (gfc_free_open): Likewise. + (gfc_resolve_open): Likewise. + (gfc_free_inquire): Likewise. + (match_inquire_element): Likewise. + * dump-parse-tree.c (gfc_show_code_node): Add + convet for open and inquire. + gfortran.h: Add convert to gfc_open and gfc_inquire. + * trans-io.c (gfc_trans_open): Add convert. + (gfc_trans_inquire): Likewise. + * ioparm.def: Add convert to open and inquire. + * gfortran.texi: Document CONVERT. + +2005-12-09 Roger Sayle + + PR fortran/22527 + * f95-lang.c (gfc_truthvalue_conversion): Use a zero of the correct + integer type when building an inequality. + +2005-12-09 Richard Guenther + + * f95-lang.c (build_builtin_fntypes): Use correct + return types, as indicated by comments. + +2005-12-08 Erik Edelmann + + PR fortran/25292 + * check.c (gfc_check_associated): Allow function results + as actual arguments to ASSOCIATED. Moved a misplaced + comment. + +2005-12-07 Rafael Ávila de Espíndola + + * Make-lang.in (fortran.all.build, fortran.install-normal): Remove. + +2005-12-07 Rafael Ávila de Espíndola + + * Make-lang.in: Remove all dependencies on s-gtype, except for + gt-fortran-trans.h. + +2005-12-03 Francois-Xavier Coudert + + PR fortran/25106 + * parse.c (next_free): Use new prototype for gfc_match_st_label. + Correctly emit hard error if a label is zero. + * match.c (gfc_match_st_label): Never allow zero as a valid + label. + (gfc_match, gfc_match_do, gfc_match_goto): Use new prototype for + gfc_match_st_label. + * primary.c (): Use new prototype for gfc_match_st_label. + * io.c (): Likewise. + * match.h: Likewise. + +2005-12-02 Richard Guenther + + * trans.h (build1_v): Use build1, not build to build the + void typed tree. + +2005-12-01 Erik Schnetter + + * decl.c (gfc_match_old_kind_spec): Improve handling of old style + COMPLEX*N + +2005-12-01 Paul Thomas + + PR fortran/24789 + * trans-decl.c (gfc_get_symbol_decl): Move the expression for + unit size of automatic character length, dummy pointer array + elements down a few lines from the version that fixed PR15809. + +2005-11-30 Bernhard Fischer + + PR fortran/21302 + * lang.opt: New options -ffree-line-length- and -ffree-line-length-none. + * gfortran.h: Add free_line_length and add description of + free_line_length and fixed_line_length. + * options.c (gfc_init_options, gfc_handle_option): Initialize + and set free_line_length and fixed_line_length. + * scanner.c (load_line): Set free_line_length to 132 and + fixed_line_length to 72 or user requested values. + * scanner.c: Typo in comment. + * invoke.texi: Document -ffree-line-length- and + -ffree-line-length-none + +2005-11-30 Paul Thomas + + PR fortran/15809 + * trans-decl.c (gfc_get_symbol_decl): In the case of automatic + character length, dummy pointer arrays, build an expression for + unit size of the array elements, to be picked up and used in the + descriptor dtype. + * trans-io.c (gfc_trans_transfer): Modify the detection of + components of derived type arrays to use the gfc_expr references + instead of the array descriptor dtype. This allows the latter + to contain expressions. + +2005-11-30 Erik Edelmann + + PR fortran/15809 + * trans-array.c (gfc_trans_deferred_array): Allow PARM_DECLs past + in addition to VAR_DECLs. + +2005-11-29 Jakub Jelinek + + * io.c (gfc_resolve_open): RESOLVE_TAG access field as well. + +2005-11-27 Bernhard Fischer + + * gfortran.h: remove superfluous whitespace and use GNU + comment-style for the documentation of backend_decl. + +2005-11-27 Steven G. Kargl + + PR fortran/24917 + * primary.c (match_boz_constant): Implement postfix BOZ constants; + (match_string_constant): Peek for b, o, z, and x + +2005-11-27 Francois-Xavier Coudert + + PR fortran/23912 + * iresolve.c (gfc_resolve_dim, gfc_resolve_mod, + gfc_resolve_modulo): When arguments have different kinds, fold + the lower one to the largest kind. + * check.c (gfc_check_a_p): Arguments of different kinds is not + a hard error, but an extension. + * simplify.c (gfc_simplify_dim, gfc_simplify_mod, + gfc_simplify_modulo): When arguments have different kinds, fold + the lower one to the largest kind. + +2005-11-21 Jakub Jelinek + + PR fortran/14943 + PR fortran/21647 + * Make-lang.in (fortran/trans-io.o): Depend on fortran/ioparm.def. + * dump-parse-tree.c (gfc_show_code_node): Dump c->block for + EXEC_{READ,WRITE,IOLENGTH} nodes. + * io.c (terminate_io, match_io, gfc_match_inquire): Put data + transfer commands into EXEC_{READ,WRITE,IOLENGTH}'s code->block. + * resolve.c (resolve_blocks): Handle EXEC_{READ,WRITE,IOLENGTH}. + * trans-io.c (ioparm_unit, ioparm_err, ioparm_end, ioparm_eor, + ioparm_list_format, ioparm_library_return, ioparm_iostat, + ioparm_exist, ioparm_opened, ioparm_number, ioparm_named, + ioparm_rec, ioparm_nextrec, ioparm_size, ioparm_recl_in, + ioparm_recl_out, ioparm_iolength, ioparm_file, ioparm_file_len, + ioparm_status, ioparm_status_len, ioparm_access, ioparm_access_len, + ioparm_form, ioparm_form_len, ioparm_blank, ioparm_blank_len, + ioparm_position, ioparm_position_len, ioparm_action, + ioparm_action_len, ioparm_delim, ioparm_delim_len, ioparm_pad, + ioparm_pad_len, ioparm_format, ioparm_format_len, ioparm_advance, + ioparm_advance_len, ioparm_name, ioparm_name_len, + ioparm_internal_unit, ioparm_internal_unit_len, + ioparm_internal_unit_desc, ioparm_sequential, ioparm_sequential_len, + ioparm_direct, ioparm_direct_len, ioparm_formatted, + ioparm_formatted_len, ioparm_unformatted, ioparm_unformatted_len, + ioparm_read, ioparm_read_len, ioparm_write, ioparm_write_len, + ioparm_readwrite, ioparm_readwrite_len, ioparm_namelist_name, + ioparm_namelist_name_len, ioparm_namelist_read_mode, ioparm_iomsg, + ioparm_iomsg_len, ioparm_var): Remove. + (enum ioparam_type, enum iofield_type, enum iofield, + enum iocall): New enums. + (gfc_st_parameter_field, gfc_st_parameter): New typedefs. + (st_parameter, st_parameter_field, iocall): New variables. + (ADD_FIELD, ADD_STRING): Remove. + (dt_parm, dt_post_end_block): New variables. + (gfc_build_st_parameter): New function. + (gfc_build_io_library_fndecls): Use it. Initialize iocall + array rather than ioparm_*, add extra first arguments to + the function types. + (set_parameter_const): New function. + (set_parameter_value): Add type argument, return a bitmask. + Changed to set a field in automatic structure variable rather + than set a field in a global _gfortran_ioparm variable. + (set_parameter_ref): Likewise. If requested var has different + size than what field should point to, call with a temporary and + then copy into the user variable. Add postblock argument. + (set_string): Remove var_len argument, add type argument, return + a bitmask. Changed to set fields in automatic structure variable + rather than set a field in a global _gfortran_ioparm variable. + (set_internal_unit): Remove iunit, iunit_len, iunit_desc arguments, + add var argument. Return a bitmask. Changed to set fields in + automatic structure variable rather than set a field in a global + _gfortran_ioparm variable. + (set_flag): Removed. + (io_result): Add var argument. Changed to read common.flags field + from automatic structure variable and bitwise AND it with 3. + (set_error_locus): Add var argument. Changed to set fields in + automatic structure variable rather than set a field in a global + _gfortran_{filename,line} variables. + (gfc_trans_open): Use gfc_start_block rather than gfc_init_block. + Create a temporary st_parameter_* structure. Adjust callers of + all above mentioned functions. Pass address of the temporary + variable as first argument to the generated function call. + Use iocall array rather than ioparm_* separate variables. + (gfc_trans_close, build_filepos, gfc_trans_inquire): Likewise. + (build_dt): Likewise. Change first argument to tree from tree *. + Don't dereference code->ext.dt if last_dt == INQUIRE. Emit + IOLENGTH argument setup here. Set dt_parm/dt_post_end_block + variables and gfc_trans_code the nested data transfer commands + in code->block. + (gfc_trans_iolength): Just set last_dt and call build_dt immediately. + (transfer_namelist_element): Pass address of dt_parm variable + to generated functions. Use iocall array rather than ioparm_* + separate variables. + (gfc_trans_backspace, gfc_trans_endfile, gfc_trans_rewind, + gfc_trans_flush, gfc_trans_read, gfc_trans_write): Use iocall array + rather than ioparm_* separate variables. + (gfc_trans_dt_end): Likewise. Pass address of dt_parm variable + as first argument to generated function. Adjust io_result caller. + Prepend dt_post_end_block before io_result code. + (transfer_expr): Use iocall array rather than ioparm_* separate + variables. Pass address of dt_parm variables as first argument + to generated functions. + * ioparm.def: New file. + +2005-11-21 Paul Thomas + + PR fortran/24223 + * resolve.c (resolve_contained_fntype) Error if an internal + function is assumed character length. + + PR fortran/24705 + * trans-decl.c (gfc_create_module_variable) Skip ICE in + when backend decl has been built and the symbol is marked + as being in an equivalence statement. + +2005-11-20 Toon Moene + + * invoke.texi: Remove superfluous @item. + +2005-11-19 Janne Blomqvist + + PR fortran/24862 + * trans-io.c (gfc_trans_transfer): Handle arrays of derived type. + +2005-11-17 Francois-Xavier Coudert + + PR fortran/20811 + * scanner.c (gfc_open_included_file): Add an extra include_cwd + argument. Only include files in the current working directory if + its value is true. + * gfortran.h: Change prototype for gfc_open_included_file. + (load_file): Don't search for include files in the current working + directory. + * options.c (gfc_post_options): Add the directory of the source file + to the list of paths for included files. + * module.c (gfc_use_module): Look for module files in the current + directory. + +2005-11-16 Alan Modra + + PR fortran/24096 + * trans-types.c (gfc_init_kinds): Use one less for max_exponent + of IBM extended double format. + +2005-11-13 Francois-Xavier Coudert + + * intrinsic.c (add_functions): Add COMPLEX, FTELL, FGETC, FGET, + FPUTC, FPUT, AND, XOR and OR intrinsic functions. + (add_subroutines): Add FGETC, FGET, FPUTC, FPUT and FTELL intrinsic + subroutines. + * gfortran.h: Add GFC_ISYM_AND, GFC_ISYM_COMPLEX, GFC_ISYM_FGET, + GFC_ISYM_FGETC, GFC_ISYM_FPUT, GFC_ISYM_FPUTC, GFC_ISYM_FTELL, + GFC_ISYM_OR, GFC_ISYM_XOR. + * iresolve.c (gfc_resolve_and, gfc_resolve_complex, + gfc_resolve_or, gfc_resolve_fgetc, gfc_resolve_fget, + gfc_resolve_fputc, gfc_resolve_fput, gfc_resolve_ftell, + gfc_resolve_xor, gfc_resolve_fgetc_sub, gfc_resolve_fget_sub, + gfc_resolve_fputc_sub, gfc_resolve_fput_sub, gfc_resolve_ftell_sub): + New functions. + * check.c (gfc_check_complex, gfc_check_fgetputc_sub, + gfc_check_fgetputc, gfc_check_fgetput_sub, gfc_check_fgetput, + gfc_check_ftell, gfc_check_ftell_sub, gfc_check_and): New functions. + * simplify.c (gfc_simplify_and, gfc_simplify_complex, gfc_simplify_or, + gfc_simplify_xor): New functions. + * trans-intrinsic.c (gfc_conv_intrinsic_function): Add cases for + GFC_ISYM_AND, GFC_ISYM_COMPLEX, GFC_ISYM_FGET, GFC_ISYM_FGETC, + GFC_ISYM_FPUT, GFC_ISYM_FPUTC, GFC_ISYM_FTELL, GFC_ISYM_OR and + GFC_ISYM_XOR. + * intrinsic.h: Add prototypes for all functions added to iresolve.c, + simplify.c and check.c. + +2005-11-10 Paul Thomas + Steven G. Kargl + + PR fortran/15976 + * resolve.c (resolve_symbol): Disallow automatic arrays in module scope. + +2005-11-10 Paul Thomas + + PR fortran/24655 + PR fortran/24755 + * match.c (recursive_stmt_fcn): Add checks that symtree exists + for the expression to weed out inline intrinsic functions and + parameters. + + PR fortran/24409 + * module.c (mio_symtree_ref): Correct the patch of 0923 so that + a symbol is not substituted for by a the symbol for the module + itself and to prevent the promotion of a formal argument. + +2005-11-10 Tobias Schl"uter + + PR fortran/24643 + * primary.c (match_varspec): Check for implicitly typed CHARACTER + variables before matching substrings. + +2005-11-09 Steven G. Kargl + + * trans-intrinsic.c: Typo in comment. + +2005-11-09 Erik Edelmann + + PR fortran/22607 + * trans-decl.c(build_function_decl): Don't set + DECL_IS_PURE (fndecl) = 1 for return-by-reference + functions. + +2005-11-08 Tobias Schl"uter + + * dump-parse-tree.c: Fix comment typo, add a few blank lines. + +2005-11-07 Steven G. Kargl + + * error.c: Use flag_fatal_error. + * invoke.texi: Remove -Werror from list of options. + +2005-11-06 Paul Thomas + + PR fortran/24534 + * resolve.c (resolve_symbol): Exclude case of PRIVATE declared + within derived type from error associated with PRIVATE type + components within derived type. + + PR fortran/20838 + PR fortran/20840 + * gfortran.h: Add prototype for gfc_has_vector_index. + * io.c (gfc_resolve_dt): Error if internal unit has a vector index. + * expr.c (gfc_has_vector_index): New function to check if any of + the array references of an expression have vector inidices. + (gfc_check_pointer_assign): Error if internal unit has a vector index. + + PR fortran/17737 + * data.c (gfc_assign_data_value): Remove gcc_assert that caused the ICE + and replace by a standard dependent warning/error if overwriting an + existing initialization. + * decl.c (gfc_data_variable): Remove old error for already initialized + variable and the unused error check for common block variables. Add + error for hots associated variable and standard dependent error for + common block variables, outside of blockdata. + * symbol.c (check_conflict): Add constraints for DATA statement. + +2005-11-06 Janne Blomqvist + + PR fortran/24174 + PR fortran/24305 + * fortran/trans-io.c (gfc_build_io_library_fndecls): Add kind + argument to transfer_array. + (transfer_array_desc): Add kind argument. + +2005-11-06 Francois-Xavier Coudert + + * intrinsic.c (add_functions): Add ctime and fdate intrinsics. + (add_subroutines): Likewise. + * intrinsic.h: Prototypes for gfc_check_ctime, + gfc_check_ctime_sub, gfc_check_fdate_sub, gfc_resolve_ctime, + gfc_resolve_fdate, gfc_resolve_ctime_sub, gfc_resolve_fdate_sub. + * gfortran.h: Add GFC_ISYM_CTIME and GFC_ISYM_FDATE. + * iresolve.c (gfc_resolve_ctime, gfc_resolve_fdate, + gfc_resolve_ctime_sub, gfc_resolve_fdate_sub): New functions. + * trans-decl.c (gfc_build_intrinsic_function_decls): Add + gfor_fndecl_fdate and gfor_fndecl_ctime. + * check.c (gfc_check_ctime, gfc_check_ctime_sub, + gfc_check_fdate_sub): New functions. + * trans-intrinsic.c (gfc_conv_intrinsic_ctime, + gfc_conv_intrinsic_fdate): New functions. + (gfc_conv_intrinsic_function): Add cases for GFC_ISYM_CTIME + and GFC_ISYM_FDATE. + * intrinsic.texi: Documentation for the new CTIME and FDATE + intrinsics. + * trans.h: Declarations for gfor_fndecl_ctime and gfor_fndecl_fdate. + +2005-11-05 Kazu Hirata + + * decl.c, trans-decl.c: Fix comment typos. + * gfortran.texi: Fix a typo. + +2005-11-05 Francois-Xavier Coudert + + * intrinsic.c (add_functions): Add function version of TTYNAM. + * intrinsic.h: Add prototypes for gfc_check_ttynam and + gfc_resolve_ttynam. + * gfortran.h: Add case for GFC_ISYM_TTYNAM. + * iresolve.c (gfc_resolve_ttynam): New function. + * trans-decl.c (gfc_build_intrinsic_function_decls): Add a tree + for function call to library ttynam. + * check.c (gfc_check_ttynam): New function. + * trans-intrinsic.c (gfc_conv_intrinsic_ttynam): New function. + (): Call gfc_conv_intrinsic_ttynam. + * trans.h: Add prototype for gfor_fndecl_ttynam. + +2005-11-04 Steven G. Kargl + + PR fortran/24636 + * match.c (gfc_match_stopcode): Set stop_code = -1. + +2005-11-04 Francois-Xavier Coudert + + PR fortran/18452 + * lang-specs.h: Pass -lang-fortran to the preprocessor. + +2005-11-02 Andrew Pinski + + PR fortran/18157 + * trans-array.c (gfc_conv_resolve_dependencies): Use the correct + type for the temporary array. + * trans-expr.c (gfc_trans_assignment): Pass lss + instead of lss_section + to gfc_conv_resolve_dependencies to get the + correct type. + +2005-11-02 Tobias Schl"uter + + * decl.c (gfc_match_entry): Function entries don't need an argument + list if there's no RESULT clause. + +2005-11-01 Tobias Schl"uter + + PR fortran/24008 + * decl.c (gfc_match_entry): Function entries need an argument list. + +2005-11-01 Erik Edelmann + + PR 24245 + * trans.c (gfc_generate_code): Move code to create a main + program symbol from here ... + * parse.c (main_program_symbol): ... to this new + function, setting the locus from gfc_current_locus + instead of ns->code->loc. + (gfc_parse_file): Call main_program_symbol for main programs. + +2005-11-01 Tobias Schl"uter + + PR fortran/24404 + * resolve.c (resolve_symbol): Output symbol names in more error + messages, clarify error message. + +2005-11-01 Tobias Schl"uter + + * dump-parse-tree.c (show_symtree): Revert change unintentionally + committed in r106246. + +2005-11-01 Paul Thomas + + PR fortran/21565 + * symbol.c (check_conflict): An object cannot be in a namelist and in + block data. + + PR fortran/18737 + * resolve.c (resolve_symbol): Set the error flag to + gfc_set_default_type, in the case of an external symbol, so that + an error message is emitted if IMPLICIT NONE is set. + + PR fortran/14994 + * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SECNDS to enum. + * check.c (gfc_check_secnds): New function. + * intrinsic.c (add_functions): Add call to secnds. + * iresolve.c (gfc_resolve_secnds): New function. + * trans-intrinsic (gfc_conv_intrinsic_function): Add call to + secnds via case GFC_ISYM_SECNDS. + * intrinsic.texi: Add documentation for secnds. + +2005-10-31 Andreas Schwab + + * Make-lang.in (GFORTRAN_TARGET_INSTALL_NAME): Define. + (GFORTRAN_CROSS_NAME): Remove. + (fortran.install-common): Correctly install a cross compiler. + (fortran.uninstall): Use GFORTRAN_TARGET_INSTALL_NAME instead of + GFORTRAN_CROSS_NAME. + +2005-10-30 Erik Edelmann + + * gfortran.texi: Update contributors. + +2005-10-30 Erik Edelmann + + PR fortran/18883 + * trans-decl.c (gfc_finish_var_decl): Add decl to the + current function, rather than the parent. Make + assertion accept fake result variables. + * trans-expr.c (gfc_conv_variable): If the character + length of an ENTRY isn't set, get the length from + the master function instead. + +2005-10-30 Thomas Koenig + + * gfortran.texi: Remove reservations about I/O usability. Document + that array intrinsics mostly work. + +2005-10-30 Tobias Schl"uter + + * gfortran.texi: Move license stuff to back. Add information + on ENUM and ENUMERATOR. + * invoke.texi: Document -fshort-enums. + +2005-10-30 Gaurav Gautam + Tobias Schl"uter + + * arith.c (gfc_enum_initializer): New function. + (gfc_check_integer_range): Made extern. + * decl.c (enumerator_history): New typedef. + (last_initializer, enum_history, max_enum): New variables. + (create_enum_history, gfc_free_enum_history): New functions. + (add_init_expr_to_sym): Call create_enum_history if parsing ENUM. + (variable_decl): Modified to parse enumerator definition. + (match_attr_spec): Add PARAMETER attribute to ENUMERATORs. + (gfc_match_data_decl): Issues error, if match_type_spec do not + return desired return values. + (set_enum_kind, gfc_match_enum, gfc_match_enumerator_def): New + functions. + (gfc_match_end): Deal with END ENUM. + * gfortran.h (gfc_statement): ST_ENUM, ST_ENUMERATOR, ST_END_ENUM + added. + (symbol_attribute): Bit field for enumerator added. + (gfc_options): Add fshort_enums. + (gfc_enum_initializer, gfc_check_integer_range): Add prototypes. + * options.c: Include target.h + (gfc_init_options): Initialize fshort_enums. + (gfc_handle_option): Deal with fshort_enums. + * parse.c (decode_statement): Match ENUM and ENUMERATOR statement. + (gfc_ascii_statement): Deal with the enumerator statements. + (parse_enum): New function to parse enum construct. + (parse_spec): Added case ST_ENUM. + * parse.h (gfc_compile_state): COMP_ENUM added. + (gfc_match_enum, gfc_match_enumerator_def, gfc_free_enum_history): + Prototype added. + * symbol.c (gfc_copy_attr): Copy enumeration attribute. + * lang.opt (fshort-enums): Option added. + +2005-10-30 Francois-Xavier Coudert + + * check.c (gfc_check_malloc, gfc_check_free): New functions. + * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_MALLOC. + * intrinsic.c (add_functions): Add symbols for MALLOC function. + (add_subroutines): Add symbol for FREE subroutine. + * intrinsic.h: Prototypes for gfc_check_malloc, gfc_check_free, + gfc_resolve_malloc and gfc_resolve_free. + * intrinsic.texi: Add doc for FREE and MALLOC intrinsics. + * iresolve.c (gfc_resolve_malloc, gfc_resolve_free): New + functions. + * trans-intrinsic.c (gfc_conv_intrinsic_function): Add case for + GFC_ISYM_MALLOC. + +2005-10-30 Steven Bosscher + + * gfortran.texi: Update contributors. + +2005-10-29 Steven Bosscher + + * interface.c: Fix previous checkin (an incomplete patch + was commited for me). + +2005-10-29 Joseph S. Myers + + * intrinsic.texi: Remove empty @cindex line. + +2005-10-28 Francois-Xavier Coudert + + * check.c (gfc_check_alarm_sub, gfc_check_signal, + gfc_check_signal_sub): New functions. + * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIGNAL. + * intrinsic.c (add_functions): Add signal intrinsic. + (add_subroutines): Add signal and alarm intrinsics. + * intrinsic.texi: Document the new intrinsics. + * iresolve.c (gfc_resolve_signal, gfc_resolve_alarm_sub, + gfc_resolve_signal_sub): New functions. + * trans-intrinsic.c (gfc_conv_intrinsic_function): Add case + for GFC_ISYM_SIGNAL. + * intrinsic.h: Add prototypes for gfc_check_alarm_sub, + gfc_check_signal, gfc_check_signal_sub, gfc_resolve_signal, + gfc_resolve_alarm_sub, gfc_resolve_signal_sub. + +2005-10-28 Steven Bosscher + + PR fortran/24545 + * interface.c (gfc_match_end_interface): Fix typo in + INTERFACE_USER_OP case. + +2005-10-26 Francois-Xavier Coudert + + PR fortran/15586 + * resolve.c (resolve_symbol): Remove the use of whynot, so that + error messages are not built from pieces. + +2005-10-26 Paul Thomas + + PR fortran/24158 + * decl.c (gfc_match_data_decl): Correct broken bit of code + that prevents undefined derived types from being used as + components of another derived type. + * resolve.c (resolve_symbol): Add backstop error when derived + type variables arrive here with a type that has no components. + +2005-10-25 Jakub Jelinek + + * trans.h (gfc_conv_cray_pointee): Remove. + * trans-expr.c (gfc_conv_variable): Revert 2005-10-24 change. + * trans-array.c (gfc_conv_array_parameter): Likewise. + * trans-decl.c (gfc_conv_cray_pointee): Remove. + (gfc_finish_cray_pointee): New function. + (gfc_finish_var_decl): Use it. Don't return early for Cray + pointees. + (gfc_create_module_variable): Revert 2005-10-24 change. + * decl.c (cray_pointer_decl): Update comment. + * gfortran.texi: Don't mention Cray pointees aren't visible in the + debugger. + + * symbol.c (check_conflict): Add conflict between cray_pointee + and in_common resp. in_equivalence. + * resolve.c (resolve_equivalence): Revert 2005-10-24 change. + + * module.c (ab_attribute): Add AB_CRAY_POINTER and AB_CRAY_POINTEE. + (attr_bits): Likewise. + (mio_symbol_attribute): Save and restore cray_pointe{r,e} attributes. + (mio_symbol): For cray_pointee write/read cp_pointer reference. + +2005-10-25 Feng Wang + + PR fortran/22290 + * trans-decl.c (gfc_add_assign_aux_vars): New function. Add two + auxiliary variables. + (gfc_get_symbol_decl): Use it when a variable, including dummy + argument, is assigned a label. + (gfc_trans_assign_aux_var): New function. Set initial value of + the auxiliary variable explicitly. + (gfc_trans_deferred_vars): Use it. + * trans-stmt.c (gfc_conv_label_variable): Handle dummy argument. + +2005-10-24 Asher Langton + + PR fortran/17031 + PR fortran/22282 + * check.c (gfc_check_loc): New function. + * decl.c (variable_decl): New variables cp_as and sym. Added a + check for variables that have already been declared as Cray + Pointers, so we can get the necessary attributes without adding + a new symbol. + (attr_decl1): Added code to catch pointee symbols and "fix" + their array specs. + (cray_pointer_decl): New method. + (gfc_match_pointer): Added Cray pointer parsing code. + (gfc_mod_pointee_as): New method. + * expr.c (gfc_check_assign): Added a check to catch vector-type + assignments to pointees with an unspecified final dimension. + * gfortran.h: (GFC_ISYM_LOC): New. + (symbol_attribute): Added cray_pointer and cray_pointee bits. + (gfc_array_spec): Added cray_pointee and cp_was_assumed bools. + (gfc_symbol): Added gfc_symbol *cp_pointer. + (gfc_option): Added flag_cray_pointer. + (gfc_add_cray_pointee): Declare. + (gfc_add_cray_pointer ): Declare. + (gfc_mod_pointee_as): Declare. + * intrinsic.c (add_functions): Add code for loc() intrinsic. + * intrinsic.h (gfc_check_loc): Declare. + (gfc_resolve_loc): Declare. + * iresolve.c (gfc_resolve_loc): New. + * lang.opt: Added fcray-pointer flag. + * options.c (gfc_init_options): Initialized. + gfc_match_option.flag_cray_pointer. + (gfc_handle_option): Deal with -fcray-pointer. + * parse.c:(resolve_equivalence): Added code prohibiting Cray + pointees in equivalence statements. + * resolve.c (resolve_array_ref): Added code to prevent bounds + checking for Cray Pointee arrays. + (resolve_equivalence): Prohibited pointees in equivalence + statements. + * symbol.c (check_conflict): Added Cray pointer/pointee + attribute checking. + (gfc_add_cray_pointer): New. + (gfc_add_cray_pointee): New. + (gfc_copy_attr): New code for Cray pointers and pointees. + * trans-array.c (gfc_trans_auto_array_allocation): Added code to + prevent space from being allocated for pointees. + (gfc_conv_array_parameter): Added code to catch pointees and + correctly set their base address. + * trans-decl.c (gfc_finish_var_decl): Added code to prevent + pointee declarations from making it to the back end. + (gfc_create_module_variable): Same. + * trans-expr.c (gfc_conv_variable): Added code to detect and + translate pointees. + (gfc_conv_cray_pointee): New. + * trans-intrinsic.c (gfc_conv_intrinsic_loc): New. + (gfc_conv_intrinsic_function): Added entry point for loc + translation. + * trans.h (gfc_conv_cray_pointee): Declare. + + * gfortran.texi: Added section on Cray pointers, removed Cray + pointers from list of proposed extensions. + * intrinsic.texi: Added documentation for loc intrinsic. + * invoke.texi: Documented -fcray-pointer flag. + +2005-10-24 Asher Langton + + * decl.c (gfc_match_save): Changed duplicate SAVE errors to + warnings in the absence of strict standard conformance + * symbol.c (gfc_add_save): Same. + +2005-10-24 Francois-Xavier Coudert + + PR fortran/15586 + * arith.c (gfc_arith_error): Change message to include locus. + (check_result, eval_intrinsic, gfc_int2int, gfc_real2real, + gfc_real2complex, gfc_complex2real, gfc_complex2complex): Use + the new gfc_arith_error. + (arith_error): Rewrite full error messages instead of building + them from pieces. + * check.c (must_be): Removed. + (type_check, numeric_check, int_or_real_check, real_or_complex_check, + kind_check, double_check, logical_array_check, array_check, + scalar_check, same_type_check, rank_check, kind_value_check, + variable_check, gfc_check_allocated, gfc_check_associated, + gfc_check_cmplx, gfc_check_dcmplx, gfc_check_dot_product, + gfc_check_index, gfc_check_kind, gfc_check_matmul, gfc_check_null, + gfc_check_pack, gfc_check_precision, gfc_check_present, + gfc_check_spread): Rewrite full error messages instead of + building them from pieces. + * decl.c (gfc_match_entry): Rewrite full error messages instead + of building them from pieces. + * parse.c (gfc_state_name): Remove. + * parse.h: Remove prototype for gfc_state_name. + +2005-10-23 Andrew Pinski + + PR fortran/23635 + * check.c (gfc_check_ichar_iachar): Move the code around so + that the check on the length is after check for + references. + +2005-10-23 Asher Langton + + * decl.c (match_type_spec): Add a BYTE type as an extension. + +2005-10-23 Paul Thomas + + PR fortran/18022 + * trans-expr.c (gfc_trans_arrayfunc_assign): Return NULL + if there is a component ref during an array ref to force + use of temporary in assignment. + + PR fortran/24311 + PR fortran/24384 + * fortran/iresolve.c (check_charlen_present): New function to + add a charlen to the typespec, in the case of constant + expressions. + (gfc_resolve_merge, gfc_resolve_spread): Call.the above. + (gfc_resolve_spread): Make calls to library functions that + handle the case of the spread intrinsic with a scalar source. + +2005-10-22 Erik Edelmann + + PR fortran/24426 + * decl.c (variable_decl): Don't assign default initializers to + pointers. + +2005-10-21 Jakub Jelinek + + * interface.c (compare_actual_formal): Issue error when attempting + to pass an assumed-size array as assumed-shape array argument. + +2005-10-20 Erik Edelmann + + PR fortran/21625 + * resolve.c (expr_to_initialize): New function. + (resolve_allocate_expr): Take current statement as new + argument. Add default initializers to variables of + derived types, if they need it. + (resolve_code): Provide current statement as argument to + resolve_allocate_expr(). + +2005-10-19 Paul Thomas + + PR fortran/24440 + * resolve.c (resolve_symbol): Correct error in check for + assumed size array with default initializer by testing + for arrayspec before dereferencing it. + +2005-10-17 Paul Thomas + + PR fortran/23446 + * gfortran.h: Primitive for gfc_is_formal_arg. + * resolve.c(gfc_is_formal_arg): New function to signal across + several function calls that formal argument lists are being + processed. + (resolve_formal_arglist): Set/reset the flag for gfc_is_formal_arg. + *expr.c(check_restricted): Add check, via gfc_is_formal_arg, if + symbol is part of an formal argument declaration. + + PR fortran/21459 + * decl.c (add_init_expr_to_sym): Make a new character + length for each variable, when the expression is NULL + and link to cl_list. + + PR fortran/20866 + * match.c (recursive_stmt_fcn): New function that tests if + a statement function resurses through itself or other other + statement functions. + (gfc_match_st_function): Call recursive_stmt_fcn to check + if this is recursive and to raise error if so. + + PR fortran/20849 + PR fortran/20853 + * resolve.c (resolve_symbol): Errors for assumed size arrays + with default initializer and for external objects with an + initializer. + + PR fortran/20837 + * decl.c (match_attr_spec): Prevent PUBLIC from being used + outside a module. + +2005-10-16 Erik Edelmann + + PR 22273 + * expr.c (check_inquiry): Add "len" to inquiry_function. + +2005-10-14 Jakub Jelinek + + * primary.c (match_boz_constant): Add missing break after gfc_error. + +2005-10-12 Paul Thomas + + PR fortran/24092 + * trans-types.c (gfc_get_derived_type): Insert code to obtain backend + declaration for derived types, building if necessary. Return the + derived type if the fields have been built by this process. Otherwise, + continue as before but using the already obtained backend_decls for the + derived type components. Change the gcc_assert to act on the field. + +2005-10-12 Paul Thomas + + PR fortran/18082 + * decl.c (variable_decl): Make a new copy of the character + length for each variable, when the expression is not a + constant. + +2005-10-12 Francois-Xavier Coudert + + * gfortran.h: Add bitmasks for different FPE traps. Add fpe + member to options_t. + * invoke.texi: Document the new -ffpe-trap option. + * lang.opt: Add -ffpe-trap option. + * options.c (gfc_init_options): Initialize the FPE option. + (gfc_handle_fpe_trap_option): New function to parse the argument + of the -ffpe-trap option. + (gfc_handle_option): Add case for -ffpe-trap. + * trans-decl.c: Declare a tree for the set_fpe library function. + (gfc_build_builtin_function_decls): Build this tree. + (gfc_generate_function_code): Generate a call to set_fpe at + the beginning of the main program. + * trans.h: New tree for the set_fpe library function. + +2005-10-12 Paul Thomas + + PR fortran/20847 + PR fortran/20856 + * symbol.c (check_conflict): Prevent common variables and + function results from having the SAVE attribute,as required + by the standard. + +2005-10-12 Paul Thomas + + PR fortran/24207 + * resolve.c (resolve_symbol): Exclude use and host associated + symbols from the test for private objects in a public namelist. + 2005-10-12 Jakub Jelinek * trans-common.c (build_field): Fix comment typo. @@ -20,7 +992,7 @@ 2005-10-07 Erik Edelmann - PR 18568 + PR 18568 * resolve.c (find_array_spec): Search through the list of components in the symbol of the type instead of the symbol of the variable. @@ -166,8 +1138,8 @@ 2005-09-21 Erik Edelmann PR fortran/19929 - * trans-stmt.c (gfc_trans_deallocate): Check if the - object to be deallocated is an array by looking at + * trans-stmt.c (gfc_trans_deallocate): Check if the + object to be deallocated is an array by looking at expr->rank instead of expr->symtree->n.sym->attr.dimension. 2005-09-20 Tobias Schl"uter @@ -262,7 +1234,7 @@ to store the character (array) and the character length for an internal unit. * fortran/trans-io (build_dt): Use the new function set_internal_unit. - + 2005-09-14 Paul Thomas PR fortran/19358 @@ -718,7 +1690,7 @@ 2005-08-07 Janne Blomqvist - PR fortran/22390 + PR fortran/22390 * dump-parse-tree.c (gfc_show_code_node): Add case for FLUSH. * gfortran.h: Add enums for FLUSH. * io.c (gfc_free_filepos,match_file_element,match_filepos): Modify @@ -895,7 +1867,7 @@ Don't clear maskindexes here. 2005-07-08 Daniel Berlin - + * trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN is removed. @@ -1126,7 +2098,7 @@ (gfc_return_by_reference): Always look at sym, never at sym->result. 2005-06-11 Steven G. Kargl - + PR fortran/17792 PR fortran/21375 * trans-array.c (gfc_array_deallocate): pstat is new argument @@ -1156,7 +2128,7 @@ PR fortran/19195 * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment, - remove FIXME comment. + remove FIXME comment. 2005-06-04 Tobias Schl"uter @@ -1274,7 +2246,7 @@ 2005-05-29 Janne Blomqvist Steven G. Kargl - + fortran/PR20846 * io.c (gfc_match_inquire): Implement constraints on UNIT and FILE usage. @@ -1317,7 +2289,7 @@ 2005-05-18 Thomas Koenig PR libfortran/21127 - * fortran/iresolve.c (gfc_resolve_reshape): Add + * fortran/iresolve.c (gfc_resolve_reshape): Add gfc_type_letter (BT_COMPLEX) for complex to to resolved function name. @@ -1380,11 +2352,11 @@ Jerry DeLisle PR fortran/17432 - * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to + * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to resolve ICE on assign of format label. * trans-io.c (set_string): add fold-convert to properly handle assigned format label in write. - + 2005-05-13 Paul Brook * trans-stmt.c (gfc_trans_forall_1): Fix comment typo. @@ -1416,7 +2388,7 @@ * options.c (gfc-init_options): Set default calling convention to -fno-f2c. Mark -fsecond-underscore unset. (gfc_post_options): Set -fsecond-underscore if not explicitly set - by user. + by user. (handle_options): Set gfc_option.flag_f2c according to requested calling convention. * trans-decl.c (gfc_get_extern_function_decl): Use special f2c @@ -1496,7 +2468,7 @@ * gfortran.h (gfc_namespace): Add seen_implicit_none field, Tobias forgot this in previous commit. - + 2005-04-29 Paul Brook * trans-expr.c (gfc_conv_expr_present): Fix broken assert. Update @@ -1583,11 +2555,11 @@ declaration for st_set_nml_var and st_set_nml_var_dim. Remove declarations of old namelist functions. (build_dt): Simplified call to transfer_namelist_element. - (nml_get_addr_expr): Generates address expression for start of + (nml_get_addr_expr): Generates address expression for start of object data. New function. - (nml_full_name): Qualified name for derived type components. New + (nml_full_name): Qualified name for derived type components. New function. - (transfer_namelist_element): Modified for calls to new functions + (transfer_namelist_element): Modified for calls to new functions and improved derived type handling. 2005-04-17 Richard Guenther @@ -1673,7 +2645,7 @@ 2005-04-06 Steven G. Kargl - * invoke.texi: Remove documentation of -std=f90 + * invoke.texi: Remove documentation of -std=f90 2005-04-06 Tobias Schl"uter @@ -1721,7 +2693,7 @@ * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double, flag_default_integer, flag_default_real * invoke.texi: Update documentation - * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8 + * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8 fdefault-integer-8, and fdefault-real-8 definitions. * options.c (gfc_init_options): Set option defaults (gfc_handle_option): Handle command line options. @@ -2169,7 +3141,7 @@ 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_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. @@ -2320,7 +3292,7 @@ unsigned issue. Use build_int_cst instead of converting integer_zero_node. Remove unnecessary conversion. - * trans-types.c (gfc_get_character_type_len): : Use + * trans-types.c (gfc_get_character_type_len): Use gfc_charlen_type_node as basic type for the range field. * trans-intrinsic.c (build_fixbound_expr,