aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
AgeCommit message (Collapse)AuthorFilesLines
2008-11-29* trans-array.c (gfc_conv_array_parameter): Guard union access.Eric Botcazou2-1/+6
From-SVN: r142283
2008-11-29re PR fortran/38289 ("procedure( ), pointer" rejected)Janus Weil3-1/+12
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
2008-11-25module.c (gfc_dump_module): Report error on unlink only if errno != ENOENT.H.J. Lu2-1/+6
2008-11-25 H.J. Lu <hongjiu.lu@intel.com> * module.c (gfc_dump_module): Report error on unlink only if errno != ENOENT. From-SVN: r142192
2008-11-25re PR fortran/36463 (gfc_get_default_type(): Bad symbol)Mikael Morin2-2/+17
2008-11-25 Mikael Morin <mikael.morin@tele2.fr> PR fortran/36463 * expr.c (replace_symbol): Don't replace the symtree if the expresion is an intrinsic function. Don't create non-existent symtrees. Use symbol's name instead of symtree's, different in case of module procedure dummy arguments. 2008-11-25 Mikael Morin <mikael.morin@tele2.fr> PR fortran/36463 * gfortran.dg/proc_decl_20.f90: New test. From-SVN: r142191
2008-11-25re PR fortran/38248 (Ignored temporary module files manipulation errors)Jan Kratochvil2-3/+16
2008-11-25 Jan Kratochvil <jan.kratochvil@redhat.com> PR fortran/38248 * module.c (gfc_dump_module): Check rename/unlink syscalls errors. From-SVN: r142190
2008-11-25re PR fortran/37319 (gfortran.dg/function_kinds_5.f90 fails)Eric Botcazou2-2/+9
PR fortran/37319 * parse.c (match_deferred_characteristics): Make sure 'name' is initialized before reading it. From-SVN: r142188
2008-11-25re PR fortran/37803 (Call mpfr_check_range after setting emin/emax)Jerry DeLisle3-0/+8
2008-11-24 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/37803 * arith.c (gfc_check_real_range): Add mpfr_check_range. * simplify.c (gfc_simplify_nearest): Add mpfr_check_range. From-SVN: r142187
2008-11-24re PR fortran/38184 (invariant RESHAPE not expanded if SOURCE is empty)Mikael Morin2-3/+6
2008-11-24 Mikael Morin <mikael.morin@tele2.fr> PR fortran/38184 * simplify.c (is_constant_array_expr): Return true instead of false if the array constructor is empty. 2008-11-24 Mikael Morin <mikael.morin@tele2.fr> PR fortran/38184 * gfortran.dg/reshape_empty_1.f03: New test. From-SVN: r142168
2008-11-24re PR fortran/37779 (Missing RECURSIVE not detected)Daniel Kraft2-3/+46
2008-11-24 Daniel Kraft <d@domob.eu> PR fortran/37779 * resolve.c (resolve_procedure_expression): New method. (resolve_variable): Call it. (resolve_actual_arglist): Call gfc_resolve_expr for procedure arguments. 2008-11-24 Daniel Kraft <d@domob.eu> PR fortran/37779 * gfortran.dg/c_funloc_tests.f03: Added missing `RECURSIVE'. * gfortran.dg/c_funloc_tests_2.f03: Ditto. * gfortran.dg/recursive_check_4.f03: New test. * gfortran.dg/recursive_check_5.f03: New test. From-SVN: r142158
2008-11-24re PR fortran/34820 (internal compiler error: in ↵Paul Thomas4-37/+118
gfc_conv_descriptor_data_get, at fortran/trans-array.c:147) 2008-11-24 Paul Thomas <pault@gcc.gnu.org> PR fortran/34820 * trans-expr.c (gfc_conv_function_call): Remove all code to deallocate intent out derived types with allocatable components. (gfc_trans_assignment_1): An assignment from a scalar to an array of derived types with allocatable components, requires a deep copy to each array element and deallocation of the converted rhs expression afterwards. * trans-array.c : Minor whitespace. * trans-decl.c (init_intent_out_dt): Add code to deallocate allocatable components of derived types with intent out. (generate_local_decl): If these types are unused, set them referenced anyway but allow the uninitialized warning. PR fortran/34143 * trans-expr.c (gfc_trans_subcomponent_assign): If a conversion expression has a null data pointer argument, nullify the allocatable component. PR fortran/32795 * trans-expr.c (gfc_trans_subcomponent_assign): Only nullify the data pointer if the source is not a variable. 2008-11-24 Paul Thomas <pault@gcc.gnu.org> PR fortran/34820 * gfortran.dg/alloc_comp_constructor_6.f90 : New test. * gfortran.dg/alloc_comp_basics_1.f90 : Reduce expected refs to 'builtin_free' from 24 to 18. PR fortran/34143 * gfortran.dg/alloc_comp_constructor_5.f90 : New test. PR fortran/32795 * gfortran.dg/alloc_comp_constructor_4.f90 : New test. From-SVN: r142148
2008-11-23re PR fortran/37735 (Allocatable components in vectors of derived types ↵Paul Thomas2-4/+12
cause ICE on assignment) 2008-11-23 Paul Thomas <pault@gcc.gnu.org> PR fortran/37735 * trans-array.c (structure_alloc_comps): Do not duplicate the descriptor if this is a descriptorless array! 2008-11-23 Paul Thomas <pault@gcc.gnu.org> PR fortran/37735 * gfortran.dg/alloc_comp_assign_7.f90: New test. From-SVN: r142142
2008-11-22re PR fortran/38160 (C Binding: Kind parameter checking too strict and too late)Tobias Burnus6-47/+29
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
2008-11-22re PR libfortran/37839 (st_parameter_dt has unwanted padding, is out of sync ↵Jakub Jelinek4-11/+25
with compiler) PR libfortran/37839 * trans-io.c (gfc_build_io_library_fndecls): Decrease pad size back to 16 pointers plus 32 integers. Don't use max integer kind alignment, only gfc_intio_kind's alignment. (gfc_trans_inquire): Only set flags2 if mask2 is non-zero. * ioparm.def: Fix order, bitmasks and types of inquire round, sign and pending fields. Move u in dt before id. * io.c (gfc_free_inquire): Free decimal and size exprs. (match_inquire_element): Match size instead of matching blank twice. (gfc_resolve_inquire): Resolve size. * gfortran.dg/f2003_inquire_1.f03: New test. * gfortran.dg/f2003_io_1.f03: Remove xfail. * gfortran.dg/f2003_io_4.f03: Likewise. * gfortran.dg/f2003_io_5.f03: Likewise. * gfortran.dg/f2003_io_6.f03: Likewise. * gfortran.dg/f2003_io_7.f03: Likewise. * io/io.h (IOPARM_INQUIRE_HAS_ROUND, IOPARM_INQUIRE_HAS_SIGN, IOPARM_INQUIRE_HAS_PENDING): Adjust values. (st_parameter_inquire): Reorder and fix types of round, sign and pending fields. (st_parameter_43, st_parameter_44): Removed. (st_parameter_dt): Put back struct definition directly to u.p declaration. Change type of u.p.size_used from gfc_offset to GFC_IO_INT. Decrease back size of u.pad to 16 pointers and 32 ints. Put id, pos, asynchronous, blank, decimal, delim, pad, round and sign fields after the union. * io/inquire.c (inquire_via_unit, inquire_via_filename): Only read flags2 if it is defined. * io/transfer.c (read_sf, read_block_form, write_block): Cast additions to size_used to GFC_IO_INT instead of gfc_offset. (data_transfer_init): Clear whole u.p struct. Adjust for moving id, pos, asynchronous, blank, decimal, delim, pad, round and sign fields from u.p directly into st_parameter_dt. (finalize_transfer): Don't cast size_used to GFC_IO_INT. * io/file_pos.c (st_endfile): Clear whole u.p struct. From-SVN: r142111
2008-11-20re PR middle-end/29215 (extra store for memcpy)Jakub Jelinek2-2/+9
PR middle-end/29215 * builtins.c (SLOW_UNALIGNED_ACCESS): Define if not defined. (fold_builtin_memory_op): Handle even the case where just one of src and dest is an address of a var decl component, using TYPE_REF_CAN_ALIAS_ALL pointers. Remove is_gimple_min_invariant and readonly_data_expr src check. * tree-ssa-sccvn.c (DFS): Use clear_and_done_ssa_iter to shut up warnings. * trans-array.c (trans_array_constructor_value, gfc_build_constant_array_constructor): Fill in TREE_PURPOSE. * gfortran.dg/array_memcpy_3.f90: Adjust pattern to match even memcpy optimized into ref-all store. * gcc.dg/pr29215.c: New test. From-SVN: r142061
2008-11-20trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use gfc_index_one_node.Jakub Jelinek2-7/+10
* trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use gfc_index_one_node. (gfc_conv_intrinsic_size): Use gfc_index_{zero,one}_node. From-SVN: r142046
2008-11-20re PR fortran/38181 (calls to SIZE not optimized out of loops)Jakub Jelinek2-5/+37
PR fortran/38181 * trans-intrinsic.c (gfc_conv_intrinsic_size): Inline 2 argument size if the second argument is not optional and one argument size for rank 1 arrays. * gfortran.dg/array_section_2.f90: Adjust pattern to match the inlined size0 instead of a size0 call. From-SVN: r142037
2008-11-19re PR fortran/38171 (equivalence and nested modules broken)Paul Thomas1-1/+1
2008-11-19 Paul Thomas <pault@gcc.gnu.org> PR fortran/38171 * ChangeLog: Correct PR number. From-SVN: r141991
2008-11-19re PR fortran/38119 (character ICE in gfc_trans_create_temp_array)Paul Thomas2-2/+10
2008-11-19 Paul Thomas <pault@gcc.gnu.org> PR fortran/38119 * module.c (load_equiv): Regression fix; check that equivalence members come from the same module only. 2008-11-19 Paul Thomas <pault@gcc.gnu.org> * gfortran.dg/module_equivalence_6.f90: New test. From-SVN: r141990
2008-11-16re PR fortran/35681 (wrong result for vector subscripted array expression in ↵Mikael Morin6-22/+123
MVBITS) 2008-11-16 Mikael Morin <mikael.morin@tele2.fr> PR fortran/35681 * dependency.c (gfc_check_argument_var_dependency): Add elemental check flag. Issue a warning if we find a dependency but don't generate a temporary. Add the case of an elemental function call as actual argument to an elemental procedure. Add the case of an operator expression as actual argument to an elemental procedure. (gfc_check_argument_dependency): Add elemental check flag. Update calls to gfc_check_argument_var_dependency. (gfc_check_fncall_dependency): Add elemental check flag. Update call to gfc_check_argument_dependency. * trans-stmt.c (gfc_trans_call): Make call to gfc_conv_elemental_dependency unconditional, but with a flag whether we should check dependencies between variables. (gfc_conv_elemental_dependency): Add elemental check flag. Update call to gfc_check_fncall_dependency. * trans-expr.c (gfc_trans_arrayfunc_assign): Update call to gfc_check_fncall_dependency. * resolve.c (find_noncopying_intrinsics): Update call to gfc_check_fncall_dependency. * dependency.h (enum gfc_dep_check): New enum. (gfc_check_fncall_dependency): Update prototype. 2008-11-16 Mikael Morin <mikael.morin@tele2.fr> PR fortran/35681 * gfortran.dg/elemental_dependency_1.f90: New test. From-SVN: r141931
2008-11-16re PR fortran/37992 (ICE while resolving charlen for rejected statements)Mikael Morin4-10/+38
2008-11-16 Mikael Morin <mikael.morin@tele2.fr> PR fortran/37992 * gfortran.h (gfc_namespace): Added member old_cl_list, backup of cl_list. (gfc_free_charlen): Added prototype. * symbol.c (gfc_free_charlen): New function. (gfc_free_namespace): Use gfc_free_charlen. * parse.c (next_statement): Backup gfc_current_ns->cl_list. (reject_statement): Restore gfc_current_ns->cl_list. Free cl_list's elements before dropping them. 2008-11-16 Mikael Morin <mikael.morin@tele2.fr> PR fortran/37992 * gfotran.dg/charlen_free_1.f90: New test. From-SVN: r141927
2008-11-16re PR fortran/38095 (character ICE)Tobias Burnus2-4/+10
2008-11-16 Tobias Burnus <burnus@net-b.de> PR fortran/38095 * trans-expr.c (gfc_map_intrinsic_function): Fix pointer access. 2008-11-16 Tobias Burnus <burnus@net-b.de> PR fortran/38095 * gfortran.dg/char_length_13.f90: New test. From-SVN: r141917
2008-11-16re PR fortran/38119 (character ICE in gfc_trans_create_temp_array)Paul Thomas2-12/+13
2008-11-16 Paul Thomas <pault@gcc.gnu.org> PR fortran/38119 * trans-array.c (gfc_trans_create_temp_array): Set the loop->from to zero and the renormalisation of loop->to for all dimensions. 2008-11-16 Paul Thomas <pault@gcc.gnu.org> PR fortran/38119 * gfortran.dg/array_temporaries_3.f90: New test. From-SVN: r141915
2008-11-16re PR fortran/37926 (Program gives wrong output (connected to char len))Paul Thomas2-1/+9
2008-11-16 Paul Thomas <pault@gcc.gnu.org> PR fortran/37926 * trans-expr.c (gfc_free_interface_mapping): Null sym->formal (gfc_add_interface_mapping): Copy the pointer to the formal arglist, rather than using copy_formal_args. From-SVN: r141914
2008-11-15re PR fortran/37926 (Program gives wrong output (connected to char len))Paul Thomas2-0/+16
2008-11-15 Paul Thomas <pault@gcc.gnu.org> PR fortran/37926 * trans-expr.c (gfc_add_interface_mapping): Transfer the formal arglist and the always_explicit attribute if the dummy arg is a procedure. 2008-11-15 Paul Thomas <pault@gcc.gnu.org> PR fortran/37926 * gfortran.dg/dummy_procedure_3.f90: New test. From-SVN: r141890
2008-11-15re PR fortran/37988 (Edit descriptor checking (compile time) for "<Holerith>T)")Jerry DeLisle2-8/+35
2008-11-14 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/37988 * io.c (enum format_token): For readability replace FMT_POS with FMT_T, FMT_TL, and FMT_TR. (format_lex): Use new enumerators. (check_format): Add check for missing positive integer. From-SVN: r141879
2008-11-14re PR fortran/38033 (Bounds of a pointer/allocatable array not stabilized)Paul Thomas2-4/+19
2008-10-14 Paul Thomas <pault@gcc.gnu.org> PR fortran/38033 * trans-array.c (gfc_trans_create_temp_array): Stabilize the 'to' expression. (gfc_conv_loop_setup): Use the end expression for the loop 'to' if it is available. 2008-10-14 Paul Thomas <pault@gcc.gnu.org> PR fortran/38033 * gfortran.dg/array_section_2.f90: New test. From-SVN: r141861
2008-11-12re PR target/35366 (gfortran.dg/equiv_7.f90 fails with -m64 -Os on ↵Jakub Jelinek3-16/+59
powerpc-apple-darwin9) PR target/35366 PR fortran/33759 * fold-const.c (native_encode_string): New function. (native_encode_expr): Use it for STRING_CST. * trans-const.c (gfc_conv_constant_to_tree): Warn when converting an integer outside of LOGICAL's range to LOGICAL. * trans-intrinsic.c (gfc_conv_intrinsic_function, gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer): Use INTEGER_TYPE instead of BOOLEAN_TYPE for TRANSFER as argument of another TRANSFER. * gfortran.dg/hollerith.f90: Don't assume a 32-bit value stored into logical variable will be preserved. * gfortran.dg/transfer_simplify_4.f90: Remove undefined cases. Run at all optimization levels. Add a couple of new tests. * gfortran.dg/hollerith5.f90: New test. * gfortran.dg/hollerith_legacy.f90: Add dg-warning. From-SVN: r141790
2008-11-12re PR fortran/38065 (private/public confusion with a contained function)Tobias Burnus2-6/+13
2008-11-12 Tobias Burnus <burnus@net-b.de> PR fortran/38065 * resolve.c (resolve_fntype): Fix private derived type checking. 2008-11-12 Tobias Burnus <burnus@net-b.de> PR fortran/38065 * gfortran.dg/private_type_11.f90: New test. * gfortran.dg/private_type_12.f90: New test. From-SVN: r141780
2008-11-09re PR fortran/37836 (ICE in gfc_trans_auto_array_allocation)Paul Thomas4-55/+141
2008-11-09 Paul Thomas <pault@gcc.gnu.org> PR fortran/37836 * intrinsic.c (add_functions): Reference gfc_simplify._minval and gfc_simplify_maxval. * intrinsic.h : Add prototypes for gfc_simplify._minval and gfc_simplify_maxval. * simplify.c (min_max_choose): New function extracted from simplify_min_max. (simplify_min_max): Call it. (simplify_minval_maxval, gfc_simplify_minval, gfc_simplify_maxval): New functions. 2008-11-09 Paul Thomas <pault@gcc.gnu.org> PR fortran/37836 * gfortran.dg/minmaxval_1.f90: New test. From-SVN: r141717
2008-11-04re PR fortran/37597 (internal procedure fails to access host-associated ↵Paul Thomas2-1/+8
module procedure) 2008-11-04 Paul Thomas <pault@gcc.gnu.org> PR fortran/37597 * parse.c (gfc_fixup_sibling_symbols ): Fixup contained, even when symbol not found. 2008-11-04 Paul Thomas <pault@gcc.gnu.org> PR fortran/37597 * gfortran.dg/host_assoc_call_5.f90: New test. From-SVN: r141588
2008-11-03re PR fortran/37821 (gfortran is ignoring #includes with the syntax <file.h>)Tobias Burnus7-22/+50
2008-11-03 Tobias Burnus <burnus@net-b.de> PR fortran/37821 * cpp.c (gfc_cpp_add_include_path): Use BRACKET. * scanner.c (add_path_to_list): Argument to add at head. (gfc_add_include_path): Add new argument. (gfc_add_intrinsic_modules_path) Update call. (load_file): Print filename/line in the error message. * gfortran.h (gfc_add_include_path): Update prototype. * options.c (gfc_post_options,gfc_handle_module_path_options, gfc_handle_option): Update call. * lang-spec.h (F951_OPTIONS): Don't insert include path twice. * arith.c (arith_error): Add -fno-range-error to the message. 2008-11-03 Tobias Burnus <burnus@net-b.de> PR fortran/37821 * gfortran.dg/include_4.f90: New. * gfortran.dg/include_5.f90: New. * gfortran.dg/include_4.inc: New. From-SVN: r141544
2008-11-03re PR fortran/37445 (Host-associated proc not found if same-name generic is ↵Paul Thomas2-10/+38
use-associated) 2008-11-03 Paul Thomas <pault@gcc.gnu.org> PR fortran/37445 * resolve.c (resolve_actual_arglist ): Correct comparison of FL_VARIABLE with e->expr_type. (resolve_call): Check that host association is correct. (resolve_actual_arglist ): Remove return is old_sym is use associated. Only reparse expression if old and new symbols have different types. PR fortran/PR35769 * resolve.c (gfc_resolve_assign_in_forall): Change error to a warning. 2008-11-03 Paul Thomas <pault@gcc.gnu.org> PR fortran/37445 * gfortran.dg/host_assoc_call_3.f90: New test. * gfortran.dg/host_assoc_call_4.f90: New test. * gfortran.dg/host_assoc_function_4.f90: New test. From-SVN: r141543
2008-11-01re PR fortran/36426 (Endless loop in gfc_apply_interface_mapping_to_expr)Janus Weil3-3/+15
2008-11-01 Janus Weil <janus@gcc.gnu.org> PR fortran/36426 * expr.c (replace_symbol): Replace all symbols which lie in the formal namespace of the interface and copy their attributes. * resolve.c (resolve_symbol): Add charlen to namespace. 2008-11-01 Janus Weil <janus@gcc.gnu.org> PR fortran/36426 * gfortran.dg/proc_decl_19.f90: New. From-SVN: r141522
2008-11-01re PR fortran/19925 (Implied do-loop in an initialization expression is broken)Steven G. Kargl7-17/+61
2008-11-01 Steven G. Kargl <kargls@comcast.net> PR fortran/19925 * trans-array.c (gfc_trans_array_constructor_value): Fix comment. (gfc_conv_array_initializer): Convert internal_error() to gfc_error_now. * array.c: Remove GFC_MAX_AC_EXPAND macro. (gfc_expand_constructor): Use gfc_option.flag_max_array_constructor. * gfortran.h (gfc_option): Add flag_max_array_constructor member. * lang.opt: Add -fmax-array-constructor option. * expr.c (gfc_match_init_expr): Fix error message to mention new option. * invoke.texi: Document new option. * options.c (gfc_init_options): Set default value for new option. (gfc_handle_option): Deal with commandline. From-SVN: r141518
2008-11-01re PR fortran/35681 (wrong result for vector subscripted array expression in ↵Daniel Kraft12-55/+204
MVBITS) 2008-11-01 Daniel Kraft <d@domob.eu> PR fortran/35681 * gfortran.h (struct gfc_code): New field `resolved_isym'. * trans.h (gfc_build_memcpy_call): Made public. * trans-array.h (gfc_trans_create_temp_array): New argument `initial'. * intrinsic.c (gfc_intrinsic_sub_interface): Set resolved_isym. * iresolve.c (create_formal_for_intents): New helper method. (gfc_resolve_mvbits): Put dummy formal arglist on resolved_sym. * resolve.c (resolve_call): Initialize resolved_isym to NULL. * trans-array.c (gfc_trans_allocate_array_storage): New argument `initial' to allow initializing the allocated storage to some initial value copied from another array. (gfc_trans_create_temp_array): Allow initialization of the temporary with a copy of some other array by using the new extension. (gfc_trans_array_constructor): Pass NULL_TREE for initial argument. (gfc_conv_loop_setup): Ditto. * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Ditto. * trans-expr.c (gfc_conv_function_call): Ditto. (gfc_build_memcpy_call): Made public. * trans-stmt.c (gfc_conv_elemental_dependencies): Initialize created temporary for INTENT(INOUT) arguments to the value of the mirrored array and clean up the temporary as very last intructions in the created block. * trans.c (gfc_trans_code): For EXEC_CALL, see if we have a MVBITS call and enable elemental dependency checking if we have. 2008-11-01 Daniel Kraft <d@domob.eu> PR fortran/35681 * gfortran.dg/mvbits_4.f90: New test. From-SVN: r141516
2008-11-01re PR fortran/36322 (ICE with PROCEDURE using a complicated interface)Janus Weil7-4/+63
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
2008-11-01re PR fortran/37159 (RANDOM_SEED: GET= check array size at compile time ↵Dennis Wassel2-1/+20
and respect -fdefault-integer-*) 2008-11-01 Dennis Wassel <dennis.wassel@gmail.com> PR fortran/37159 * fortran/check.c (gfc_check_random_seed): Check PUT size at compile time. 2008-11-01 Dennis Wassel <dennis.wassel@gmail.com> PR fortran/37159 * intrinsics/random.c: Added comment to adapt check.c, should kiss_size change. Few cosmetic changes to existing comments. 2008-11-01 Dennis Wassel <dennis.wassel@gmail.com> PR fortran/37159 * gfortran.dg/random_seed_1.f90: New testcase. From-SVN: r141511
2008-10-31re PR fortran/35840 (ICE for character expression in I/O specifier)Mikael Morin4-21/+47
2008-10-31 Mikael Morin <mikael.morin@tele2.fr> PR fortran/35840 * expr.c (gfc_reduce_init_expr): New function, containing checking code from gfc_match_init_expr, so that checking can be deferred. (gfc_match_init_expr): Use gfc_reduce_init_expr. * io.c (check_io_constraints): Use gfc_reduce_init_expr instead of checking that the expression is a constant. * match.h (gfc_reduce_init_expr): Prototype added. 2008-10-31 Mikael Morin <mikael.morin@tele2.fr> PR fortran/35840 * gfortran.dg/write_check4.f90: New test. From-SVN: r141497
2008-10-31[multiple changes]Mikael Morin2-15/+64
2008-10-31 Mikael Morin <mikael.morin@tele2.fr> PR fortran/35820 * resolve.c (gfc_count_forall_iterators): New function. (gfc_resolve_forall): Use gfc_count_forall_iterators to evaluate the needed memory amount to allocate. Don't forget to free allocated memory. Add an assertion to check for memory leaks. 2008-10-16 Mikael Morin <mikael.morin@tele2.fr> PR fortran/35820 * gfortran.dg/nested_forall_1.f: New test. From-SVN: r141496
2008-10-31re PR fortran/37930 (gfortran error and ICE at automatic type conversion ↵Steven G. Kargl4-13/+29
with transfer intrinsic) 2008-10-30 Steven G. Kargl <kargls@comcast.net> PR fortran/37930 * fortran/arith.c (gfc_mpfr_to_mpz): Test for NaN and Inf values. Remove stale comment and kludge code for MPFR 2.0.1 and older. (gfc_real2int): Error on conversion of NaN or Inf. (gfc_complex2int): Ditto. * fortran/arith.h: Update mpfr_to_mpz prototype. * fortran/simplify.c (gfc_simplify_ceiling, gfc_simplify_floor, gfc_simplify_ifix, gfc_simplify_idint, simplify_nint): Update function calls to include locus. From-SVN: r141488
2008-10-30re PR fortran/37903 (wrong-code for complicated vector subscripts)Mikael Morin2-36/+43
2008-10-30 Mikael Morin <mikael.morin@tele2.fr> PR fortran/37903 * trans-array.c (gfc_trans_create_temp_array): If n is less than the temporary dimension, assert that loop->from is zero (reverts to earlier versions). If there is at least one null loop->to[n], it is a callee allocated array so set the size to NULL and break. (gfc_trans_constant_array_constructor): Set the offset to zero. (gfc_trans_array_constructor): Remove loop shifting around the temporary creation. (gfc_conv_loop_setup): Prefer zero-based descriptors if possible. Calculate the translation from loop variables to array indices if an array constructor. 2008-10-30 Mikael Morin <mikael.morin@tele2.fr> PR fortran/37749 * trans-array.c (gfc_trans_create_temp_array): If size is NULL use the array bounds for loop->to. 2008-10-30 Mikael Morin <mikael.morin@tele2.fr> PR fortran/37903 * gfortran.dg/vector_subscript_4.f90: New test. 2008-10-30 Mikael Morin <mikael.morin@tele2.fr> PR fortran/37749 * gfortran.dg/vector_subscript__5.f90: New test. From-SVN: r141467
2008-10-28intrinsic.texi: Update OpenMP section for OMPv3.Tobias Burnus2-5/+10
2008-10-28 Tobias Burnus <burnus@net-b.de> * intrinsic.texi: Update OpenMP section for OMPv3. From-SVN: r141408
2008-10-24dg-extract-results.sh: New file.Jakub Jelinek2-0/+14
contrib/ * dg-extract-results.sh: New file. gcc/ * Makefile.in (lang_checks_parallelized, check_gcc_parallelize, check_p_tool, check_p_vars, check_p_subno, check_p_comma, check_p_subwork, check_p_numbers, check_p_subdir, check_p_subdirs): New variables. (check-subtargets, check-%-subtargets, check-parallel-%): New targets. (check-%): For test targets listed in lang_checks_parallelized if -j is used and RUNTESTFLAGS doesn't specify tests to execute, run the testing in multiple make goals, possibly parallel, and afterwards run dg-extract-results.sh to merge the sum and log files. gcc/cp/ * Make-lang.in (check-c++-subtargets): New alias for check-g++-subtargets. (lang_checks_parallelized): Add check-g++. (check_g++_parallelize): New variable. gcc/fortran/ * Make-lang.in (check-f95-subtargets, check-fortran-subtargets): New aliases for check-gfortran-subtargets. (lang_checks_parallelized): Add check-gfortran. (check_gfortran_parallelize): New variable. gcc/ada/ * gcc-interface/Make-lang.in (check-ada-subtargets): Depend on check-acats-subtargets and check-gnat-subtargets. (check_acats_targets): New variable. (check-acats-subtargets, check-acats%): New targets. (check-acats): If -j is used and CHAPTERS is empty, run the testing in multiple make goals, possibly parallel, and afterwards run dg-extract-results.sh to merge the sum and log files. gcc/java/ * Make-lang.in (check-java-subtargets): New target. libstdc++-v3/ * testsuite/Makefile.am (AUTOMAKE_OPTIONS): Remove dejagnu. (RUNTESTDEFAULTFLAGS, EXPECT, check_DEJAGNU_normal_targets): New variables. (%/site.exp, check-DEJAGNU%): New targets. (check-am): Run $(MAKE) check-DEJAGNU. * testsuite/Makefile.in: Regenerated. From-SVN: r141337
2008-10-19re PR fortran/37723 (wrong result for left-right hand side array overlap and ↵Paul Thomas2-0/+14
(possibly) negative strides) 2008-10-19 Paul Thomas <pault@gcc.gnu.org> PR fortran/37723 * dependency.c (gfc_dep_resolver ): If we find equal array element references, go on to the next reference. 2008-10-19 Paul Thomas <pault@gcc.gnu.org> PR fortran/37723 * gfortran.dg/dependency_22.f90: New test. From-SVN: r141221
2008-10-16resolve.c (resolve_elemental_actual): Handle calls to intrinsic subroutines ↵Daniel Kraft2-2/+15
correctly. 2008-10-16 Daniel Kraft <d@domob.eu> * resolve.c (resolve_elemental_actual): Handle calls to intrinsic subroutines correctly. 2008-10-16 Daniel Kraft <d@domob.eu> * gfortran.dg/elemental_intrinsic_1.f03: New test. From-SVN: r141175
2008-10-13configure.ac (MPFR check): Bump minimum version to 2.3.0 and recommended ↵Kaveh R. Ghazi2-28/+4
version to 2.3.2. * configure.ac (MPFR check): Bump minimum version to 2.3.0 and recommended version to 2.3.2. * configure: Regenerate. gcc: * builtins.c: Remove MPFR_VERSION_NUM(2,3,0) conditionals. * doc/install.texi: Bump recommended MPFR to 2.3.2. fortran: * simplify.c: Remove MPFR_VERSION_NUM(2,3,0) conditionals. From-SVN: r141085
2008-10-12re PR fortran/37688 (Relax "Symbol is used before it is typed" checking)Daniel Kraft2-4/+29
2008-10-12 Daniel Kraft <d@domob.eu> PR fortran/37688 * expr.c (gfc_expr_check_typed): Extend permission of untyped expressions to both top-level variable and basic arithmetic expressions. 2008-10-12 Daniel Kraft <d@domob.eu> PR fortran/37688 * gfortran.dg/used_before_typed_6.f90: New test. From-SVN: r141074
2008-10-12re PR fortran/37787 (right-left hand side overlap not recognized with ↵Paul Thomas2-1/+13
EQUIVALENCEd array assignment) 2008-10-12 Paul Thomas <pault@gcc.gnu.org> PR fortran/37787 * dependency.c (gfc_are_equivalenced_arrays): Look in symbol namespace rather than current namespace, if it is available. 2008-10-12 Paul Thomas <pault@gcc.gnu.org> PR fortran/37787 * gfortran.dg/module_equivalence_5.f90: New test. From-SVN: r141073
2008-10-12re PR fortran/37792 (ICE in gfc_conv_array_initializer; works with ↵Steven G. Kargl2-0/+10
-fno-range-check) 2008-10-12 Steven G. Kargl <kargls@comcast.net> PR fortran/37792 * fortran/resolve.c (resolve_fl_variable): Simplify the initializer if there is one. 2008-10-12 Steven G. Kargl <kargls@comcast.net> PR fortran/37792 * gfortran.dg/arithmetic_overflow_1.f90: New test. From-SVN: r141072
2008-10-11re PR fortran/37794 (Fortran module overloading regression)Paul Thomas2-7/+5
2008-10-11 Paul Thomas <pault@gcc.gnu.org> PR fortran/37794 * module.c (check_for_ambiguous): Remove redundant code. 2008-10-11 Paul Thomas <pault@gcc.gnu.org> PR fortran/37794 * gfortran.dg/used_types_24.f90: New test. From-SVN: r141057