summaryrefslogtreecommitdiffstats
path: root/libgfortran
Commit message (Collapse)AuthorAgeFilesLines
...
* Fortran frontend changelog:jb2007-07-272-7/+12
| | | | | | | | | | | | | | | | | | | 2007-07-27 Janne Blomqvist <jb@gcc.gnu.org> * trans-io.c (gfc_build_io_library_fndecls): Change to use gfc_array_index_type for array descriptor triplets instead of gfc_int4_type_node. libgfortran ChangeLog: 2007-07-27 Janne Blomqvist <jb@gcc.gnu.org> * io/transfer.c (st_set_nml_var_dim): Use index_type instead of GFC_INTEGER_4 for array descriptor triplets. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126992 138bc75d-0d04-0410-961f-82ee72b054a4
* * io/unix.c (stream_ttyname): Mark argument as potentialy unused.fxcoudert2007-07-272-1/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126983 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/32035fxcoudert2007-07-272-8/+14
| | | | | | | | | | | | | | | * trans-stmt.c (gfc_trans_character_select): Replace the mechanism with labels by a SWITCH_EXPR. * trans-decl.c (gfc_build_builtin_function_decls): Change return type for select_string. * runtime/select.c (select_string): Adjust prototype and function so that the return value is an integer, not a pointer. * gfortran.dg/select_char_1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126978 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/fortran/burnus2007-07-242-0/+5
| | | | | | | | | | | | | | | 2007-07-24 Tobias Burnus <burnus@net-b.de> * ChangeLog: Correct entry. libgfortran/ 2007-07-24 Tobias Burnus <burnus@net-b.de> * libgfortran.h: Add bounds_check to compile_options_t. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126877 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig2007-07-243-14/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/30814 * trans-decl.c (generate_function_code): Add argument for flag_bounds_check to the array for set_options. * invoke.texi: Mention that some checks require -fbounds-check to be set during compilation of the main program. 2007-07-24 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/30814 * libgfortran.h: Add bounds_check to compile_options_t. * runtime/compile_options.c (set_options): Add handling of compile_options.bounds_check. * intrinsics/pack_generic.c (pack_internal): Also determine the number of elements if compile_options.bounds_check is true. Raise runtime error if a different array shape is detected. 2007-07-24 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/30814 * gfortran.dg/pack_bounds_1.f90: New test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126866 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>burnus2007-07-234-22/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tobias Burnus <burnus@net-b.de> PR fortran/32600 * trans-expr.c (gfc_conv_function_call): Handle c_funloc. * trans-types.c: Add pfunc_type_node. (gfc_init_types,gfc_typenode_for_spec): Use it. * resolve.c (gfc_iso_c_func_interface): Fix whitespace and improve error message. 2007-07-23 Christopher D. Rickett <crickett@lanl.gov> PR fortran/32600 * intrinsics/iso_c_binding.c (c_funloc): Remove. * intrinsics/iso_c_binding.h: Remove c_funloc. * gfortran.map: Ditto. 2007-07-23 Christopher D. Rickett <crickett@lanl.gov> PR fortran/32600 * gfortran.dg/c_funloc_tests_5.f03: New. * gfortran.dg/c_funloc_tests_5.f04: New. * gfortran.dg/c_funloc_tests_4_driver.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126835 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-07-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2007-07-232-4/+7
| | | | | | | * io/read.c (convert_real): Generate error only on EINVAL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126834 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-07-21 Christopher D. Rickett <crickett@lanl.gov>kargl2007-07-215-1/+259
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/32627 * resolve.c (set_name_and_label): Set kind number for character version of c_f_pointer. (gfc_iso_c_sub_interface): Set the kind of the SHAPE formal arg to that of the actual SHAPE arg. * symbol.c (gen_shape_param): Initialize kind for SHAPE arg. 2007-07-21 Christopher D. Rickett <crickett@lanl.gov> PR fortran/32627 * libgfortran/intrinsics/iso_c_generated_procs.c: Add c_f_pointer for character/string arguments. * libgfortran/intrinsic/iso_c_binding.c (c_f_pointer_u0): Allow the optional SHAPE arg to be any valid integer kind. * libgfortran/gfortran.map: Add c_f_pointer_s0. * libgfortran/mk-kinds-h.sh: Save smallest integer kind as default character kind. * libgfortran/intrinsics/iso_c_generated_procs.c: Add versions of c_f_pointer for complex and logical types. * libgfortran/gfortran.map: Add c_f_pointer versions for logical and complex types. 2007-07-21 Christopher D. Rickett <crickett@lanl.gov> PR fortran/32627 * gfortran.dg/pr32627_driver.c: Driver for pr32627. * gfortran.dg/pr32627.f03: New test case. * gfortran.dg/c_f_pointer_logical.f03: New test case. * gfortran.dg/c_f_pointer_logical_driver.c: Driver for c_f_pointer_logical. * gfortran.dg/c_f_pointer_complex_driver.c: Driver for c_f_pointer_complex. * gfortran.dg/c_f_pointer_complex.f03: New test case. * gfortran.dg/c_f_pointer_shape_tests_2_driver.c: Driver for c_f_pointer_shape_tests_2. * gfortran.dg/c_f_pointer_shape_tests_2.f03: New test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126817 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-07-19 Christopher D. Rickett <crickett@lanl.gov>burnus2007-07-194-19/+7
| | | | | | | | | | | | | | | | | PR fortran/32600 * trans-expr.c (gfc_conv_function_call): Inline C_LOC. 2007-07-19 Christopher D. Rickett <crickett@lanl.gov> PR fortran/32600 * libgfortran/intrinsics/iso_c_binding.c: Remove C_LOC. * libgfortran/intrinsics/iso_c_binding.h: Ditto. * libgfortran/gfortran.map: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126744 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2007-07-155-20/+52
| | | | | | | | | | | | | | | | | | Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR fortran/32611 * runtime/compile_options.c (set_std): Remove. (set_options): New function. (init_compile_options): Add initialization for -fsign-zero option. * gfortran.map (GFORTRAN_1.0): Rename _gfortran_set_std into _gfortran_set_options. * libgfortran.h (compile_options_t): Add sign_zero field. * io/write.c (output_float): Use the sign bit of the value to determine if a negative sign should be emitted for zero values. Do not emit the negative sign for zero if -fno-sign-zero was set during compile. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126654 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-07-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2007-07-153-8/+17
| | | | | | | | | | | PR libgfortran/32752 * io/unix.c (unix_stream): Move buffer pointer adjacent to small_buffer. * io/transfer.c (formatted_transfer_scalar): If stream I/O, set bytes_used to zero. Fix off by one error in calculation of pos and skips. Eliminate duplicate pending_spaces check. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126652 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/32357fxcoudert2007-07-142-4/+10
| | | | | | | | | | | | | * iresolve.c (gfc_resolve_mvbits): Convert FROMPOS, LEN and TOPOS to C int. * intrinsics/mvbits.c: Change prototype so that FROMPOS, LEN and TOPOS arguments are C int. * gfortran.dg/mvbits_2.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126646 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-07-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2007-07-102-6/+41
| | | | | | | | | | | | | PR libgfortran/32702 * io/unix.c (unix_stream): Restore buffer pointer and small_buffer. (fd_alloc): If the number of bytes needed is greater than the default BUFFER_SIZE, allocate a new buffer large enough. Free the old buffer if necessary. (fd_sfree): Restore use of buffer pointer. (fd_close): Likewise. (fd_open): Likewise. (init_error_stream): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126510 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-07-09 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig2007-07-0915-14/+43
| | | | | | | | | | | | | | | | | | | | | | | | PR libfortran/32336 * m4/matmul.m4: When the dimension of b is incorrect, raise a runtime error instead of a failed assertion. * generated/matmul_i1.c: Regenerated. * generated/matmul_i2.c: Regenerated. * generated/matmul_i4.c: Regenerated. * generated/matmul_i8.c: Regenerated. * generated/matmul_i16.c: Regenerated. * generated/matmul_r4.c: Regenerated. * generated/matmul_r8.c: Regenerated. * generated/matmul_r10.c: Regenerated. * generated/matmul_r16.c: Regenerated. 2007-07-09 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/32336 * gfortran.dg/matmul_5.f90: New test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126498 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-07-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2007-07-092-0/+8
| | | | | | | | | PR libgfortran/32678 * io/transfer.c (formatted_transfer_scalar): Don't allow pending_spaces to go negative. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126473 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-07-08 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig2007-07-082-0/+15
| | | | | | | | | | | | | | | PR libfortran/32217 * intrinsics/unpack_generic.c: If the destination array is empty, return early. 2007-07-08 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/32217 * gfortran.dg/unpack_zerosize_1.f90: New test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126469 138bc75d-0d04-0410-961f-82ee72b054a4
* Regenerate aclocal.m4 in boehm-gc, libffi, libgfortran, libgomp,hjl2007-07-052-6378/+6
| | | | | | | libjava, libmudflap, libobjc, libssp and zlib. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126373 138bc75d-0d04-0410-961f-82ee72b054a4
* * configure.ac: SUBST CFLAGS.dje2007-07-043-1/+8
| | | | | | | * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126324 138bc75d-0d04-0410-961f-82ee72b054a4
* Fortran frontend:jb2007-07-033-47/+39
| | | | | | | | | | | | | | | | | | | | | | | 2007-07-03 Janne Blomqvist <jb@gcc.gnu.org> * trans-decl.c (gfc_build_builtin_function_decls): Mark internal_realloc as a malloc function. libgfortran: 2007-07-03 Janne Blomqvist <jb@gcc.gnu.org> * libgfortran.h: Mark internal_malloc_size as a malloc function. * runtime/memory.c (internal_realloc_size): Remove. (internal_realloc): Call realloc directly instead of internal_realloc_size. (allocate_size): Remove. (allocate): Call malloc directly instead of allocate_size, mark as malloc function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126264 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-07-02 Steven G. Kargl <kargl@gcc.gnu.org>kargl2007-07-022-4/+31
| | | | | | | | | | | | | | Restore collateral damage from ISO C Binding merge. 2007-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/32456 * io/unit.c (filename_from_unit): Don't use find_unit, instead search for unit directly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126238 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-07-02 Steven G. Kargl <kargl@gcc.gnu.org>kargl2007-07-022-18/+36
| | | | | | | | * Makefile.in: Regenerated with automake 1.9.6. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126232 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-07-02 Steven G. Kargl <kargl@gcc.gnu.org>kargl2007-07-022-3/+4
| | | | | | | | * Makefile.in: Remove extraneous kill.lo rule. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126220 138bc75d-0d04-0410-961f-82ee72b054a4
* Forgot to delete these during yesterdays commit.jb2007-07-025-320/+5
| | | | | | | | | | | 2007-07-02 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/32239 * generated/pow_r*_i4.c: Removed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126215 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-07-01 Christopher D. Rickett <crickett@lanl.gov>kargl2007-07-029-23/+636
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * interface.c (gfc_compare_derived_types): Special case for comparing derived types across namespaces. (gfc_compare_types): Deal with BT_VOID. (compare_parameter): Use BT_VOID to accept ISO C Binding pointers. * trans-expr.c (gfc_conv_function_call): Remove setting parm_kind to SCALAR (gfc_conv_initializer): Deal with ISO C Binding NULL_PTR and NULL_FUNPTR. (gfc_conv_expr): Convert expressions for ISO C Binding derived types. * symbol.c (gfc_set_default_type): BIND(C) variables should not be implicitly declared. (check_conflict): Add BIND(C) and check for conflicts. (gfc_add_explicit_interface): Whitespace. (gfc_add_is_bind_c): New function. (gfc_copy_attr): Use it. (gfc_new_symbol): Initialize ISO C Binding objects. (get_iso_c_binding_dt): New function. (verify_bind_c_derived_type): Ditto. (gen_special_c_interop_ptr): Ditto. (add_formal_arg): Ditto. (gen_cptr_param): Ditto. (gen_fptr_param): Ditto. (gen_shape_param): Ditto. (add_proc_interface): Ditto. (build_formal_args): Ditto. (generate_isocbinding_symbol): Ditto. (get_iso_c_sym): Ditto. * decl.c (num_idents_on_line, has_name_equals): New variables. (verify_c_interop_param): New function. (build_sym): Finish binding labels and deal with COMMON blocks. (add_init_expr_to_sym): Check if the initialized expression is an iso_c_binding named constants (variable_decl): Set ISO C Binding type_spec components. (gfc_match_kind_spec): Check match for C interoperable kind. (match_char_spec): Fix comment. Chnage gfc_match_small_int to gfc_match_small_int_expr. Check for C interoperable kind. (match_type_spec): Clear the current binding label. (match_attr_spec): Add DECL_IS_BIND_C. If BIND(C) is found, use it to set attributes. (set_binding_label): New function. (set_com_block_bind_c): Ditto. (verify_c_interop): Ditto. (verify_com_block_vars_c_interop): Ditto. (verify_bind_c_sym): Ditto. (set_verify_bind_c_sym): Ditto. (set_verify_bind_c_com_block): Ditto. (get_bind_c_idents): Ditto. (gfc_match_bind_c_stmt): Ditto. (gfc_match_data_decl): Use num_idents_on_line. (match_result): Deal with right paren in BIND(C). (gfc_match_suffix): New function. (gfc_match_function_decl): Use it. Code is re-arranged to deal with ISO C Binding result clauses. (gfc_match_subroutine): Deal with BIND(C). (gfc_match_bind_c): New function. (gfc_get_type_attr_spec): New function. Code is re-arranged in and taken from gfc_match_derived_decl. (gfc_match_derived_decl): Add check for BIND(C). * trans-common.c: Forward declare gfc_get_common. (gfc_sym_mangled_common_id): Change arg from 'const char *name' to 'gfc_common_head *com'. Check for ISO C Binding of the common block. (build_common_decl): 'com->name' to 'com in SET_DECL_ASSEMBLER_NAME. * gfortran.h: Add GFC_MAX_BINDING_LABEL_LEN (bt): Add BT_VOID (sym_flavor): Add FL_VOID. (iso_fortran_env_symbol, iso_c_binding_symbol, intmod_id): New enum (CInteropKind_t): New struct. (c_interop_kinds_table): Use it. Declare an array of structs. (symbol_attribute): Add is_bind_c, is_c_interop, and is_iso_c bitfields. (gfc_typespec): Add is_c_interop; is_iso_c, and f90_type members. (gfc_symbol): Add from_intmod, intmod_sym_id, binding_label, and common_block members. (gfc_common_head): Add binding_label and is_bind_c members. (gfc_gsymbol): Add sym_name, mod_name, and binding_label members. Add prototypes for get_c_kind, gfc_validate_c_kind, gfc_check_any_c_kind, gfc_add_is_bind_c, gfc_add_value, verify_c_interop, verify_c_interop_param, verify_bind_c_sym, verify_bind_c_derived_type, verify_com_block_vars_c_interop, generate_isocbinding_symbol, get_iso_c_sym, gfc_iso_c_sub_interface * iso-c-binding.def: New file. This file contains the definitions of the types provided by the Fortran 2003 ISO_C_BINDING intrinsic module. * trans-const.c (gfc_conv_constant_to_tree): Deal with C_NULL_PTR or C_NULL_FUNPTR expressions. * expr.c (gfc_copy_expr): Add BT_VOID case. For BT_CHARACTER, the ISO C Binding requires a minimum string length of 1 for '\0'. * module.c (intmod_sym): New struct. (pointer_info): Add binding_label member. (write_atom): Set len to 0 for NULL pointers. Check for NULL p and *p. (ab_attribute): Add AB_IS_BIND_C, AB_IS_C_INTEROP and AB_IS_ISO_C. (attr_bits): Add "IS_BIND_C", "IS_C_INTEROP", and "IS_ISO_C". (mio_symbol_attribute): Deal with ISO C Binding attributes. (bt_types): Add "VOID". (mio_typespec): Deal with ISO C Binding components. (mio_namespace_ref): Add intmod variable. (mio_symbol): Check for symbols from an intrinsic module. (load_commons): Check for BIND(C) common block. (read_module): Read binding_label and use it. (write_common): Add label. Write BIND(C) info. (write_blank_common): Blank commons are not BIND(C). Explicitly set is_bind_c=0. (write_symbol): Deal with binding_label. (sort_iso_c_rename_list): New function. (import_iso_c_binding_module): Ditto. (create_int_parameter): Add to args. (use_iso_fortran_env_module): Adjust to deal with iso_c_binding intrinsic module. * trans-types.c (c_interop_kinds_table): new array of structs. (gfc_validate_c_kind): New function. (gfc_check_any_c_kind): Ditto. (get_real_kind_from_node): Ditto. (get_int_kind_from_node): Ditto. (get_int_kind_from_width): Ditto. (get_int_kind_from_minimal_width): Ditto. (init_c_interop_kinds): Ditto. (gfc_init_kinds): call init_c_interop_kinds. (gfc_typenode_for_spec): Adjust for BT_VOID and ISO C Binding pointers. Adjust handling of BT_DERIVED. (gfc_sym_type): Whitespace. (gfc_get_derived_type): Account for iso_c_binding derived types * resolve.c (is_scalar_expr_ptr): New function. (gfc_iso_c_func_interface): Ditto. (resolve_function): Use gfc_iso_c_func_interface. (set_name_and_label): New function. (gfc_iso_c_sub_interface): Ditto. (resolve_specific_s0): Use gfc_iso_c_sub_interface. (resolve_bind_c_comms): New function. (resolve_bind_c_derived_types): Ditto. (gfc_verify_binding_labels): Ditto. (resolve_fl_procedure): Check for ISO C interoperability. (resolve_symbol): Check C interoperability. (resolve_types): Walk the namespace. Check COMMON blocks. * trans-decl.c (gfc_sym_mangled_identifier): Prevent the mangling of identifiers that have an assigned binding label. (gfc_sym_mangled_function_id): Use the binding label rather than the mangled name. (gfc_finish_var_decl): Put variables that are BIND(C) into a common segment of the object file, because this is what C would do. (gfc_create_module_variable): Conver to proper types (set_tree_decl_type_code): New function. (generate_local_decl): Check dummy variables and derived types for ISO C Binding attributes. * match.c (gfc_match_small_int_expr): New function. (gfc_match_name_C): Ditto. (match_common_name): Deal with ISO C Binding in COMMON blocks * trans-io.c (transfer_expr): Deal with C_NULL_PTR or C_NULL_FUNPTR expressions * match.h: Add prototypes for gfc_match_small_int_expr, gfc_match_name_C, match_common_name, set_com_block_bind_c, set_binding_label, set_verify_bind_c_sym, set_verify_bind_c_com_block, get_bind_c_idents, gfc_match_bind_c_stmt, gfc_match_suffix, gfc_match_bind_c, gfc_get_type_attr_spec * parse.c (decode_statement): Use gfc_match_bind_c_stmt (parse_derived): Init *derived_sym = NULL, and gfc_current_block later for valiadation. * primary.c (got_delim): Set ISO C Binding components of ts. (match_logical_constant): Ditto. (match_complex_constant): Ditto. (match_complex_constant): Ditto. (gfc_match_rvalue): Check for existence of at least one arg for C_LOC, C_FUNLOC, and C_ASSOCIATED. * misc.c (gfc_clear_ts): Clear ISO C Bindoing components in ts. (get_c_kind): New function. 2007-07-01 Christopher D. Rickett <crickett@lanl.gov> * Makefile.in: Add support for iso_c_generated_procs.c and iso_c_binding.c. * Makefile.am: Ditto. * intrinsics/iso_c_generated_procs.c: New file containing helper functions. * intrinsics/iso_c_binding.c: Ditto. * intrinsics/iso_c_binding.h: New file * gfortran.map: Include the __iso_c_binding_c_* functions. * libgfortran.h: define GFC_NUM_RANK_BITS. 2007-06-23 Christopher D. Rickett <crickett@lanl.gov> * bind_c_array_params.f03: New files for Fortran 2003 ISO C Binding. * bind_c_coms.f90: Ditto. * bind_c_coms_driver.c: Ditto. * bind_c_dts.f90: Ditto. * bind_c_dts_2.f03: Ditto. * bind_c_dts_2_driver.c: Ditto. * bind_c_dts_3.f03: Ditto. * bind_c_dts_4.f03: Ditto. * bind_c_dts_driver.c: Ditto. * bind_c_implicit_vars.f03: Ditto. * bind_c_procs.f03: Ditto. * bind_c_usage_2.f03: Ditto. * bind_c_usage_3.f03: Ditto. * bind_c_usage_5.f03: Ditto. * bind_c_usage_6.f03: Ditto. * bind_c_usage_7.f03: Ditto. * bind_c_vars.f90: Ditto. * bind_c_vars_driver.c: Ditto. * binding_c_table_15_1.f03: Ditto. * binding_label_tests.f03: Ditto. * binding_label_tests_10.f03: Ditto. * binding_label_tests_10_main.f03: Ditto. * binding_label_tests_11.f03: Ditto. * binding_label_tests_11_main.f03: Ditto. * binding_label_tests_12.f03: Ditto. * binding_label_tests_13.f03: Ditto. * binding_label_tests_13_main.f03: Ditto. * binding_label_tests_14.f03: Ditto. * binding_label_tests_2.f03: Ditto. * binding_label_tests_3.f03: Ditto. * binding_label_tests_4.f03: Ditto. * binding_label_tests_5.f03: Ditto. * binding_label_tests_6.f03: Ditto. * binding_label_tests_7.f03: Ditto. * binding_label_tests_8.f03: Ditto. * binding_label_tests_9.f03: Ditto. * c_assoc.f90: Ditto. * c_assoc_2.f03: Ditto. * c_f_pointer_shape_test.f90: Ditto. * c_f_pointer_tests.f90: Ditto. * c_f_tests_driver.c: Ditto. * c_funloc_tests.f03: Ditto. * c_funloc_tests_2.f03: Ditto. * c_funloc_tests_3.f03: Ditto. * c_funloc_tests_3_funcs.c: Ditto. * c_kind_params.f90: Ditto. * c_kind_tests_2.f03: Ditto. * c_kinds.c: Ditto. * c_loc_driver.c: Ditto. * c_loc_test.f90: Ditto. * c_loc_tests_2.f03: Ditto. * c_loc_tests_2_funcs.c: Ditto. * c_loc_tests_3.f03: Ditto. * c_loc_tests_4.f03: Ditto. * c_loc_tests_5.f03: Ditto. * c_loc_tests_6.f03: Ditto. * c_loc_tests_7.f03: Ditto. * c_loc_tests_8.f03: Ditto. * c_ptr_tests.f03: Ditto. * c_ptr_tests_10.f03: Ditto. * c_ptr_tests_5.f03: Ditto. * c_ptr_tests_7.f03: Ditto. * c_ptr_tests_7_driver.c: Ditto. * c_ptr_tests_8.f03: Ditto. * c_ptr_tests_8_funcs.c: Ditto. * c_ptr_tests_9.f03: Ditto. * c_ptr_tests_driver.c: Ditto. * c_size_t_driver.c: Ditto. * c_size_t_test.f03: Ditto. * com_block_driver.f90: Ditto. * global_vars_c_init.f90: Ditto. * global_vars_c_init_driver.c: Ditto. * global_vars_f90_init.f90: Ditto. * global_vars_f90_init_driver.c: Ditto. * interop_params.f03: Ditto. * iso_c_binding_only.f03: Ditto. * iso_c_binding_rename_1.f03: Ditto. * iso_c_binding_rename_1_driver.c: Ditto. * iso_c_binding_rename_2.f03: Ditto. * iso_c_binding_rename_2_driver.c: Ditto. * kind_tests_2.f03: Ditto. * kind_tests_3.f03: Ditto. * module_md5_1.f90: Ditto. * only_clause_main.c: Ditto. * print_c_kinds.f90: Ditto. * test_bind_c_parens.f03: Ditto. * test_c_assoc.c: Ditto. * test_com_block.f90: Ditto. * test_common_binding_labels.f03: Ditto. * test_common_binding_labels_2.f03: Ditto. * test_common_binding_labels_2_main.f03: Ditto. * test_common_binding_labels_3.f03: Ditto. * test_common_binding_labels_3_main.f03: Ditto. * test_only_clause.f90: Ditto. * use_iso_c_binding.f90: Ditto. * value_5.f90: Ditto. * value_test.f90: Ditto. * value_tests_f03.f90: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126185 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/fortran:jb2007-07-014-54/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/32239 * trans-expr.c (gfc_conv_power_op): Use builtin_powi for real**int4 powers. * f95-lang.c (gfc_init_builtin_functions): Add builtin_powi to the builtins table. libgfortran: 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/32239 * Makefile.am: Don't generate real**int4 pow functions. * gfortran.map: Remove real**int4 pow symbols. * Makefile.in: Regenerated. testsuite 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/32239 * gfortran.fortran-torture/execute/intrinsic_fraction_exponent.f90 (test_4): Use proper test for floating point equality. (test_8): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126175 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-07-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2007-07-012-16/+9
| | | | | | | | | PR libgfortran/32554 * io/write.c (output_float): Set edigits to a fixed size, avoiding variation in field width calculation and eliminate buffer overrun. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126173 138bc75d-0d04-0410-961f-82ee72b054a4
* fortran frontend:jb2007-07-013-70/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org> * trans.h: Remove decls for 64-bit allocation functions. * trans-array.c (gfc_grow_array): Always pick the standard realloc function decl. (gfc_array_allocate): Likewise. * trans-decl.c: Remove trees for 64-bit allocation functions. (gfc_build_builtin_function_decls): Don't build fndecls for 64-bit allocations functions, use index_int_type for normal allocation functions. libgfortran changelog: 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org> * runtime/memory.c (internal_realloc): Use index_type for size argument instead of GFC_INTEGER_4. (allocate_array): Likewise. (allocate): Likewise, add ifdef around unnecessary check. (internal_reallo64): Remove. (allocate_array64): Remove. (allocate64): Remove. * gfortran.map: Remove symbols for 64-bit allocation functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126166 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2007-06-292-4/+26
| | | | | | | | | PR libgfortran/32456 * io/unit.c (filename_from_unit): Don't use find_unit, instead search for unit directly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126119 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libfortran/32495nemet2007-06-252-7/+15
| | | | | | | | * runtime/backtrace.c (local_strcasestr): Rename from strcasestr. (show_backtrace): Rename strcasestr to local_strcasestr. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125998 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-06-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2007-06-244-0/+67
| | | | | | | | | | | | | | PR libgfortran/32456 * runtime/error.c (show_locus): Update to emit the unit number and file name involved with the error. Use new function filename_from_unit. * libgfortran.h (filename_from_unit): Declare new function. * io/unit.c (init_units): Set the unit file name for stdin, stdout, and stderr for use later in error reporting. (filename_from_unit): Add this new function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125989 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-06-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2007-06-242-7/+18
| | | | | | | | | PR libgfortran/32446 * io/write.c (output_float): Calculate ndigits correctly for large numbered formats that must pad zeros before the decimal point. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125985 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libfortran/32345ro2007-06-152-1/+11
| | | | | | | | | * runtime/backtrace.c (show_backtrace): Only use snprintf if available. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125739 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-06-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2007-06-102-3/+14
| | | | | | | | | | PR libgfortran/32235 * io/transfer.c (st_read): Remove test for end of file condition. (next_record_r): Add test for end of file condition. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125606 138bc75d-0d04-0410-961f-82ee72b054a4
* boehm-gc:bonzini2007-06-022-42/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-06-02 Paolo Bonzini <bonzini@gnu.org> * configure: Regenerate. libffi: 2007-06-02 Paolo Bonzini <bonzini@gnu.org> * configure: Regenerate. libgfortran: 2007-06-02 Paolo Bonzini <bonzini@gnu.org> * configure: Regenerate. libgomp: 2007-06-02 Paolo Bonzini <bonzini@gnu.org> * configure: Regenerate. libjava: 2007-06-02 Paolo Bonzini <bonzini@gnu.org> * configure: Regenerate. libmudflap: 2007-06-02 Paolo Bonzini <bonzini@gnu.org> * configure: Regenerate. libobjc: 2007-06-02 Paolo Bonzini <bonzini@gnu.org> * configure: Regenerate. libssp: 2007-06-02 Paolo Bonzini <bonzini@gnu.org> * configure: Regenerate. libstdc++-v3: 2007-06-02 Paolo Bonzini <bonzini@gnu.org> * configure: Regenerate. zlib: 2007-06-02 Paolo Bonzini <bonzini@gnu.org> * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125278 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-05-28 Tobias Burnus <burnus@net-b.de>burnus2007-05-282-5/+27
| | | | | | | | | | PR fortran/32124 * runtime/memory.c (allocate_size): Use ERROR_ALLOCATION. (allocate,allocate64): Use stat variable if present. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125133 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-05-27 Janne Blomqvist <jb@gcc.gnu.org>jb2007-05-267-41/+97
| | | | | | | | | | | | | | | | | | | | * runtime/string.c (compare0): Use gfc_charlen_type instead of int. (fstrlen): Likewise. (find_option): Likewise. (fstrcpy): Use gfc_charlen_type instead of int, return length. (cf_strcpy): Likewise. * libgfortran.h: Change string prototypes to use gfc_charlen_type. * io/open.c (new_unit): Use snprintf if available. * io/list_read.c (nml_touch_nodes): Use memcpy instead of strcpy/strcat. (nml_read_obj): Likewise. * io/transfer.c (st_set_nml_var): Likewise. * io/write.c (output_float): Use snprintf if available. (nml_write_obj) Use memcpy instead of strcpy/strcat. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125100 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-05-26 Janne Blomqvist <jb@gcc.gnu.org>jb2007-05-262-46/+69
| | | | | | | | | | | | | | | | | | | | | | | | * io/unix.c (unix_stream): Rearrange struct members, remove small_buffer. (int_stream): New struct. (fd_alloc): Always use existing buffer, never reallocate. (fd_sfree): Remove check for buffer != small_buffer. (fd_close): Likewise. (mem_alloc_r_at): Change to use int_stream. (mem_alloc_w_at): Likewise. (mem_read): Likewise. (mem_write): Likewise. (mem_set): Likewise. (mem_truncate): Likewise. (mem_close): Likewise. (mem_sfree): Likewise. (empty_internal_buffer): Likewise. (open_internal): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125099 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-05-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2007-05-252-17/+15
| | | | | | | | * io/transfer.c (unformatted_read): Use size from front end eliminating use of size_from_real_kind. (unformatted_write): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125064 138bc75d-0d04-0410-961f-82ee72b054a4
* * ltmain.sh: Update from ToT Libtool.sje2007-05-244-1933/+17265
| | | | | | | | | | | | | | | * libtool.m4: Update from ToT Libtool. * ltsugar.m4: New. Update from ToT Libtool. * ltversion.m4: New. Update from ToT Libtool. * ltoptions.m4: New. Update from ToT Libtool. * ltconfig: Remove. * ltcf-c.sh: Remove. * ltcf-cxx.sh: Remove. * ltcf-gcj.sh: Remove. * Regenerate all subdirs git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125032 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-05-22 Tobias Burnus <burnus@net-b.de>burnus2007-05-222-1/+5
| | | | | | | | * libgfortran.h: Mark stop_numeric as noreturn. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124962 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-05-22 Tobias Burnus <burnus@net-b.de>burnus2007-05-223-0/+11
| | | | | | | | | | PR libgfortran/31295 * intrinsics/eoshift0.c (eoshift0): Silence uninitialized warning. * intrinsics/eoshift2.c (eoshift2): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124948 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-05-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2007-05-192-15/+33
| | | | | | | | | PR libfortran/31964 * intrinsics/ishftc.c (ishftc4, ishftc8, ishftc16): Fix mask to handle shift of bit-size number of bits. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124846 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-05-14 Tobias Burnus <burnus@net-b.de>burnus2007-05-172-2/+19
| | | | | | | | | PR fortran/31917 * runtime/environ.c (mark_range): Fix setting default convert unit. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124787 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-05-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2007-05-162-0/+8
| | | | | | | | | PR libfortran/31922 * intrinsics/string_intrinsics.c (string_trim): Set result to null if string length is zero. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124754 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-05-15 Tobias Burnus <burnus@net-b.de>burnus2007-05-152-9/+18
| | | | | | | | | | PR libfortran/31915 * io/transfer.c (unformatted_read): Use proper size for real(10). (unformatted_write): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124741 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/30723fxcoudert2007-05-146-50/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * trans.h (gfor_fndecl_internal_malloc, gfor_fndecl_internal_malloc64, gfor_fndecl_internal_free): Remove prototypes. (gfor_fndecl_os_error, gfc_call_free, gfc_call_malloc): Add prototypes. * trans.c (gfc_call_malloc, gfc_call_free): New functions. * f95-lang.c (gfc_init_builtin_functions): Add __builtin_free and __builtin_malloc builtins. * trans-decl.c (gfor_fndecl_internal_malloc, gfor_fndecl_internal_malloc64, gfor_fndecl_internal_free): Remove. (gfor_fndecl_os_error): Add. (gfc_build_builtin_function_decls): Don't create internal_malloc, internal_malloc64 and internal_free library function declaration. Create os_error library call function declaration. * trans-array.c (gfc_trans_allocate_array_storage, gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias, gfc_conv_array_parameter, gfc_duplicate_allocatable): Use gfc_call_malloc and gfc_call_free instead of building calls to internal_malloc and internal_free. * trans-expr.c (gfc_conv_string_tmp): Likewise. * trans-stmt.c (gfc_do_allocate, gfc_trans_assign_need_temp, gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1, gfc_trans_where_2: Likewise. * trans-intrinsic.c (gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_trim): Likewise. * runtime/memory.c (internal_malloc, internal_malloc64, internal_free): Remove. * runtime/error.c (os_error): Export function. * intrinsics/move_alloc.c: Include stdlib.h. (move_alloc): Call free instead of internal_free. (move_alloc_c): Wrap long lines. * libgfortran.h (os_error): Export prototype. (internal_free): Remove prototype. * gfortran.map (GFORTRAN_1.0): Remove _gfortran_internal_free, _gfortran_internal_malloc and _gfortran_internal_malloc64. Add _gfortran_os_error. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124721 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-05-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2007-05-102-2/+7
| | | | | | | | PR libfortran/31880 * io/unix.c (fd_alloc_r_at): Fix calculation of physical offset. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124588 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libfortran/31607fxcoudert2007-05-074-3/+15
| | | | | | | | | * intrinsics/system.c (system_sub): Call flush_all_units. * io/io.h (flush_all_units): Move prototype to libgfortran.h. * libgfortran.h (flush_all_units): Add prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124510 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-05-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2007-05-066-10/+50
| | | | | | | | | | | | | | | | | PR libfortran/31201 * runtime/error.c (runtime_error_at): New function. (generate_error): Export this function. * gfortran.map: Add _gfortran_generate_error and _gfortran_runtime_error_at. * libgfortran.h: Add comment to reference error codes in front end. (library_start): Locate prototype with library_end macro and add a new comment. Add prototype for runtime_error_at. Export prototype for generate_error. * io/lock.c (library_start): Fix check for error condition. * io/transfer.c (data_transfer_init): Add library check. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124479 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix typo in PR numbers 22539 <> 22359.dfranke2007-05-041-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124441 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud