summaryrefslogtreecommitdiffstats
path: root/gcc/fortran
Commit message (Collapse)AuthorAgeFilesLines
...
* 2012-10-21 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig2012-10-215-16/+61
| | | | | | | | | | | | | | | | | | | PR fortran/54465 * lang.opt (Wextra): Add. * invoke.texi: Document that -Wc-binding-type, -Wconversion and -Wline-truncation are implied by -Wall. Document that -Wcompare-reals is implied by -Wextra. Document -Wextra. * options.c (set_Wextra): New function. (gfc_handle_option): Handle -Wextra. 2012-10-21 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/54465 * gfortran.dg/wextra_1.f: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192649 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-10-19 Janus Weil <janus@gcc.gnu.org>janus2012-10-192-0/+7
| | | | | | | | | | | | | PR fortran/54224 * trans-expr.c (conv_function_val): Set TREE_USED. 2012-10-19 Janus Weil <janus@gcc.gnu.org> PR fortran/54224 * gfortran.dg/warn_unused_function.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192620 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-10-18 Tobias Burnus <burnus@net-b.de>burnus2012-10-182-15/+67
| | | | | | | | | | | | | | | | | | | | PR fortran/54884 * resolve.c (specification_expr): Change to bool. (resolve_formal_arglist, resolve_symbol): Set specification_expr to true before resolving the array spec. (resolve_variable, resolve_charlen, resolve_fl_variable): Properly reset specification_expr. (resolve_function): Set public_use when used in a specification expr. 2012-10-18 Tobias Burnus <burnus@net-b.de> PR fortran/54884 * gfortran.dg/public_private_module_7.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192571 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-10-16 Tobias Burnus <burnus@net-b.de>burnus2012-10-164-43/+338
| | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/50981 PR fortran/54618 * trans.h (gfc_conv_derived_to_class, gfc_conv_class_to_class): Update prototype. * trans-stmt.c (trans_associate_var,gfc_trans_allocate): Update calls to those functions. * trans-expr.c (gfc_conv_derived_to_class, * gfc_conv_class_to_class, gfc_conv_expr_present): Handle absent polymorphic arguments. (class_scalar_coarray_to_class): New function. (gfc_conv_procedure_call): Update calls. 2012-10-16 Tobias Burnus <burnus@net-b.de> PR fortran/50981 PR fortran/54618 * gfortran.dg/class_optional_1.f90: New. * gfortran.dg/class_optional_2.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192495 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-10-12 Janus Weil <janus@gcc.gnu.org>janus2012-10-122-0/+19
| | | | | | | | | | | | | | PR fortran/40453 * interface.c (check_dummy_characteristics): Recursively check dummy procedures. 2012-10-12 Janus Weil <janus@gcc.gnu.org> PR fortran/40453 * gfortran.dg/dummy_procedure_9.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192391 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-10-11 Janus Weil <janus@gcc.gnu.org>janus2012-10-112-5/+13
| | | | | | | | | | | | | | PR fortran/54784 * trans-stmt.c (gfc_trans_allocate): Correctly determine the reference to the _data component for polymorphic allocation with SOURCE. 2012-10-11 Janus Weil <janus@gcc.gnu.org> PR fortran/54784 * gfortran.dg/class_allocate_13.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192374 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-10-06 Janus Weil <janus@gcc.gnu.org>janus2012-10-062-1/+8
| | | | | | | | | | | | | | PR fortran/54832 * resolve.c (resolve_fl_derived0): Correctly copy the 'class_ok' attribute for proc-ptr components with RESULT variable. 2012-10-06 Janus Weil <janus@gcc.gnu.org> PR fortran/54832 * gfortran.dg/typebound_operator_17.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192160 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-10-06 Janus Weil <janus@gcc.gnu.org>janus2012-10-062-17/+30
| | | | | | | | | | | | | | | | | | PR fortran/45521 * interface.c (generic_correspondence): Implement additional distinguishability criteria of F08. (compare_actual_formal): Reject data object as actual argument for procedure formal argument. 2012-10-06 Janus Weil <janus@gcc.gnu.org> PR fortran/45521 * gfortran.dg/generic_25.f90: New. * gfortran.dg/generic_26.f90: New. * gfortran.dg/generic_27.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192157 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-10-04 Tobias Burnus <burnus@net-b.de>burnus2012-10-0410-26/+64
| | | | | | | | | | | | | | | | | | | | | | | | * expr.c (scalarize_intrinsic_call): Plug memory leak. * frontend-passes.c (gcc_assert): Extend assert. * interface.c (gfc_compare_derived_types): Fix comparison. (gfc_check_operator_interface): Move up to make this error message reachable. (get_sym_storage_size): Remove always-true checks. * io.c (format_lex): Add comment. (gfc_free_wait): Free memory. * match.c (gfc_match_select_type): Ditto. * matchexpr.c (match_level_3): Ditto. * primary.c (match_string_constant): Ditto. (match_actual_arg): Check return value. * resolve.c (gfc_resolve_substring_charlen, resolve_typebound_generic_call, resolve_typebound_function, resolve_typebound_subroutine): Free memory. * trans-types.c (gfc_get_derived_type): Remove always-true * check. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192094 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-10-02 Janus Weil <janus@gcc.gnu.org>janus2012-10-022-1/+7
| | | | | | | | | | | | | PR fortran/54778 * interface.c (matching_typebound_op): Check for 'class_ok' attribute. 2012-10-02 Janus Weil <janus@gcc.gnu.org> PR fortran/54778 * gfortran.dg/class_53.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192005 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-30 Janus Weil <janus@gcc.gnu.org>janus2012-09-303-21/+36
| | | | | | | | | | | | | | | | | PR fortran/54667 * intrinsic.texi (C_F_POINTER): Fix description. * resolve.c (gfc_iso_c_sub_interface): Add a check for FPTR argument of C_F_POINTER. Modify two error messages. Cleanup. 2012-09-30 Janus Weil <janus@gcc.gnu.org> PR fortran/54667 * gfortran.dg/c_funloc_tests_6.f90: Modified error message. * gfortran.dg/c_f_pointer_shape_test.f90: Ditto. * gfortran.dg/c_f_pointer_tests_5.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191870 138bc75d-0d04-0410-961f-82ee72b054a4
* Add missing PR to the ChangeLogburnus2012-09-241-0/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191677 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-24 Tobias Burnus <burnus@net-b.de>burnus2012-09-242-1/+7
| | | | | | | | | | PR fortran/54618 * trans-expr.c (gfc_conv_procedure_call): Fix INTENT(OUT) handling for allocatable BT_CLASS. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191676 138bc75d-0d04-0410-961f-82ee72b054a4
* Finish conversion of uses of double_int to the new API.crowl2012-09-243-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some old functionality required new interfaces, and these have been added to double-int.[hc]: double_int::from_pair - static constructor function wide_mul_with_sign - double-wide multiply instruction sub_with_overflow - subtraction with overlow testing neg_with_overflow - negation with overlow testing divmod_with_overflow - div and mod with overlow testing This patch corrects the bootstrap problem on HPPA, via the addition of sub_with_overflow. (The overflow properties of negation and addition are different from subtraction.) The prior two generations of the interface have been removed. Some of these old interfaces are still used as static implementation in double-int.c. The changed compiler appears 0.321% faster with 80% confidence of being faster. Tested on x86_64, HPPA, and SPARC. However, there are changes to the avr config files, and I have not tested those. Index: gcc/java/ChangeLog 2012-09-24 Lawrence Crowl <crowl@google.com> * decl.c (java_init_decl_processing): Change to new double_int API. * jcf-parse.c (get_constant): Likewise. * boehm.c (mark_reference_fields): Likewise. (get_boehm_type_descriptor): Likewise. Index: gcc/ChangeLog 2012-09-24 Lawrence Crowl <crowl@google.com> * double-int.h (double_int::from_pair): New. (double_int::wide_mul_with_sign): New. (double_int::sub_with_overflow): New. (double_int::neg_with_overflow): New. (double_int::divmod_with_overflow): New. (shwi_to_double_int): Remove. (uhwi_to_double_int): Remove. (double_int_to_shwi): Remove. (double_int_to_uhwi): Remove. (double_int_fits_in_uhwi_p): Remove. (double_int_fits_in_shwi_p): Remove. (double_int_fits_in_hwi_p): Remove. (double_int_mul): Remove. (double_int_mul_with_sign): Remove. (double_int_add): Remove. (double_int_sub): Remove. (double_int_neg): Remove. (double_int_div): Remove. (double_int_sdiv): Remove. (double_int_udiv): Remove. (double_int_mod): Remove. (double_int_smod): Remove. (double_int_umod): Remove. (double_int_divmod): Remove. (double_int_sdivmod): Remove. (double_int_udivmod): Remove. (double_int_multiple_of): Remove. (double_int_setbit): Remove. (double_int_ctz): Remove. (double_int_not): Remove. (double_int_ior): Remove. (double_int_and): Remove. (double_int_and_not): Remove. (double_int_xor): Remove. (double_int_lshift): Remove. (double_int_rshift): Remove. (double_int_lrotate): Remove. (double_int_rrotate): Remove. (double_int_negative_p): Remove. (double_int_cmp): Remove. (double_int_scmp): Remove. (double_int_ucmp): Remove. (double_int_max): Remove. (double_int_smax): Remove. (double_int_umax): Remove. (double_int_min): Remove. (double_int_smin): Remove. (double_int_umin): Remove. (double_int_ext): Remove. (double_int_sext): Remove. (double_int_zext): Remove. (double_int_mask): Remove. (double_int_max_value): Remove. (double_int_min_value): Remove. (double_int_zero_p): Remove. (double_int_one_p): Remove. (double_int_minus_one_p): Remove. (double_int_equal_p): Remove. (double_int_popcount): Remove. (extern add_double_with_sign): Remove. (#define add_double): Remove. (extern neg_double): Remove. (extern mul_double_with_sign): Remove. (extern mul_double_wide_with_sign): Remove. (#define mul_double): Remove. (extern lshift_double): Remove. (extern div_and_round_double): Remove. * double-int.c (add_double_with_sign): Make static. (#defined add_double): Localized from header. (neg_double): Make static. (mul_double_with_sign): Make static. (mul_double_wide_with_sign): Make static. (#defined mul_double): Localized from header. (lshift_double): Make static. (div_and_round_double): Make static. (double_int::wide_mul_with_sign): New. (double_int::sub_with_overflow): New. (double_int::neg_with_overflow): New. (double_int::divmod_with_overflow): New. * emit-rtl.c (init_emit_once): Change to new double_int API. * explow.c (plus_constant): Likewise. * expmed.c (choose_multiplier): Likewise. * fold-const.c (#define OVERFLOW_SUM_SIGN): Remove. (int_const_binop_1): Change to new double_int API. (fold_div_compare): Likewise. (maybe_canonicalize_comparison): Likewise. (pointer_may_wrap_p): Likewise. (fold_negate_const): Likewise. (fold_abs_const): Likewise. * simplify-rtx.c (simplify_const_unary_operation): Likewise. (simplify_const_binary_operation): Likewise. * tree-chrec.c (tree_fold_binomial): Likewise. * tree-vrp.c (extract_range_from_binary_expr_1): Likewise. * config/sparc/sparc.c (sparc_fold_builtin): Likewise. * config/avr/avr.c (avr_double_int_push_digit): Likewise. (avr_map): Likewise. (avr_map_decompose): Likewise. (avr_out_insert_bits): Likewise. Index: gcc/cp/ChangeLog 2012-09-24 Lawrence Crowl <crowl@google.com> * init.c (build_new_1): Change to new double_int API. * decl.c (build_enumerator): Likewise. * typeck2.c (process_init_constructor_array): Likewise. * mangle.c (write_array_type): Likewise. Index: gcc/fortran/ChangeLog 2012-09-24 Lawrence Crowl <crowl@google.com> * trans-expr.c (gfc_conv_cst_int_power): Change to new double_int API. * target-memory.c (gfc_interpret_logical): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191675 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-23 Tobias Burnus <burnus@net-b.de>burnus2012-09-236-12/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | * parse.c (parse_derived): Don't set attr.alloc_comp for pointer components with allocatable subcomps. PR fortran/54599 * resolve.c (resolve_fl_namelist): Remove superfluous NULL check. * simplify.c (simplify_min_max): Remove unreachable code. * trans-array.c (gfc_trans_create_temp_array): Change a condition into an assert. PR fortran/54618 * trans-expr.c (gfc_trans_class_init_assign): Guard re-setting of the _data by gfc_conv_expr_present. (gfc_conv_procedure_call): Fix INTENT(OUT) handling for allocatable BT_CLASS. 2012-09-23 Tobias Burnus <burnus@net-b.de> PR fortran/54618 * gfortran.dg/class_array_14.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191649 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-22 Thomas König <tkoenig@gcc.gnu.org>tkoenig2012-09-222-21/+18
| | | | | | | | | | PR fortran/54599 * dependency.c (gfc_dep_compare_expr): Clarify logic, remove dead code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191640 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-20 Tobias Burnus <burnus@net-b.de>burnus2012-09-202-2/+9
| | | | | | | | | PR fortran/54599 * cpp.c (print_line): Properly handle extern C. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191590 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-20 Martin Jambor <mjambor@suse.cz>jamborm2012-09-202-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * function.c (push_cfun): Check old current_function_decl matches old cfun, set new current_function_decl to the decl of the new cfun. (push_struct_function): Likewise. (pop_cfun): Likewise. (allocate_struct_function): Move call to invoke_set_current_function_hook to the end of the function. * cfgexpand.c (estimated_stack_frame_size): Do not set and restore current_function_decl. * cgraph.c (cgraph_release_function_body): Likewise. * cgraphunit.c (cgraph_process_new_functions): Likewise. (cgraph_add_new_function): Likewise. (cgraph_analyze_function): Likewise. (assemble_thunk): Set cfun to NULL at the end. (expand_function): Move call to set_cfun downwards. * gimple-low.c (record_vars_into): Only check current_function_decl before possibly doing push_cfun. * gimplify.c (gimplify_function_tree): Do not set and restore current_function_decl. * ipa-inline-analysis.c (compute_inline_parameters): Likewise. (inline_analyze_function): Likewise. * ipa-prop.c (ipa_analyze_node): Likewise. * ipa-pure-const.c (analyze_function): Likewise. * lto-streamer-in.c (lto_input_function_body): Do not set current_function_decl. * lto-streamer-out.c (output_function): Do not set and restore current_function_decl. * omp-low.c (finalize_task_copyfn): Likewise. (expand_omp_taskreg): Likewise. (create_task_copyfn): Likewise, move push_cfun up quite a bit. * passes.c (dump_passes): Do not set and restore current_function_decl. (do_per_function): Likewise. (do_per_function_toporder): Likewise. * trans-mem.c (ipa_tm_scan_irr_function): Likewise. (ipa_tm_transform_transaction): Likewise. (ipa_tm_transform_clone): Likewise. (ipa_tm_execute): Likewise. * tree-emutls.c (lower_emutls_function_body): Likewise. * tree-inline.c (initialize_cfun): Do not call pop_cfun. (tree_function_versioning): Do not call push_cfun, do not set and restore current_function_decl. Remove assert checking consistency of cfun and current_function_decl. * tree-profile.c (tree_profiling): Do not set and restore current_function_decl. * tree-sra.c (convert_callers_for_node): Do not set current_function_decl. (convert_callers): Do not restore current_function_decl. (modify_function): Do not set current_function_decl. * tree-ssa-structalias.c (ipa_pta_execute): Do not set and restore current_function_decl. fortran/ * trans-decl.c (gfc_get_extern_function_decl): Push NULL cfun. Do not set and restore current_function_decl. (gfc_init_coarray_decl): Do not set and restore current_function_decl. lto/ * lto.c (lto_materialize_function): Call push_struct_function and pop_cfun. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191577 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-17 Tobias Burnus <burnus@net-b.de>burnus2012-09-172-2/+10
| | | | | | | | | | | | | | | PR fortran/54608 * simplify.c (gfc_simplify_scan, gfc_simplify_verify): Fix handling of BACK=variable. 2012-09-17 Tobias Burnus <burnus@net-b.de> PR fortran/54608 * gfortran.dg/scan_2.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191403 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-17 Janus Weil <janus@gcc.gnu.org>janus2012-09-173-5/+20
| | | | | | | | | | | | | | | | PR fortran/54285 * expr.c (gfc_check_pointer_assign): Correctly handle procedure pointers as function results. * primary.c (gfc_match_varspec): Allow to call a PPC with proc-ptr result. 2012-09-17 Janus Weil <janus@gcc.gnu.org> PR fortran/54285 * gfortran.dg/proc_ptr_result_7.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191383 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-17 Tobias Burnus <burnus@net-b.de>burnus2012-09-172-2/+14
| | | | | | | | | | | | | | | PR fortran/54603 * trans-expr.c (gfc_trans_subcomponent_assign): Handle proc-pointer components. 2012-09-17 Tobias Burnus <burnus@net-b.de> PR fortran/54603 * gfortran.dg/structure_constructor_11.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191382 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-17 Tobias Burnus <burnus@net-b.de>burnus2012-09-175-7/+19
| | | | | | | | | | | | * error.c (error_print): Move increment out of the assert. * interface.c (gfc_compare_derived_types): Add assert. (get_expr_storage_size): Remove always-true logical condition. * resolve.c (resolve_allocate_expr): Fix looping logic. * target-memory.c (gfc_target_expr_size): Add assert. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191381 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-16 Janus Weil <janus@gcc.gnu.org>janus2012-09-162-1/+7
| | | | | | | | | PR fortran/54594 * resolve.c (get_checked_tb_operator_target): Add a reference to the relevant quote from the F08 standard. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191366 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-16 Janus Weil <janus@gcc.gnu.org>janus2012-09-162-4/+13
| | | | | | | | | | | | | PR fortran/54594 * interface.c (compare_type_rank): Handle CLASS arrays. 2012-09-16 Janus Weil <janus@gcc.gnu.org> PR fortran/54594 * gfortran.dg/typebound_generic_14.f03: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191365 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-16 Janus Weil <janus@gcc.gnu.org>janus2012-09-162-0/+15
| | | | | | | | | | | | | | PR fortran/54387 * expr.c (gfc_check_pointer_assign): Check for result of embracing function. 2012-09-16 Janus Weil <janus@gcc.gnu.org> PR fortran/54387 * gfortran.dg/proc_ptr_38.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191364 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-16 Tobias Burnus <burnus@net-b.de>burnus2012-09-163-2/+9
| | | | | | | | | | | * trans-decl.c (gfc_generate_function_code): Fix gfc_option.coarray check. * trans-stmt.c (compute_inner_temp_size): Fix handling of gfc_option.rtcheck. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191358 138bc75d-0d04-0410-961f-82ee72b054a4
* fortran/mikael2012-09-162-1/+5
| | | | | | | | | | | * symbol.c (gfc_undo_symbols): Correctly undo namelists. testsuite/ * gfortran.dg/namelist_75.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191357 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-15 Tobias Burnus <burnus@net-b.de>burnus2012-09-152-0/+5
| | | | | | | | * trans-io.c (gfc_trans_transfer): Add an assert. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191346 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-15 Tobias Burnus <burnus@net-b.de>burnus2012-09-158-55/+82
| | | | | | | | | | | | | | | | | | | * arith.c (arith_power): Call gfc_free_expr in case of error. * array.c (gfc_match_array_constructor): Initialize variable. (gfc_resolve_character_array_constructor): Remove superfluous check. (gfc_array_dimen_size): Add assert. * check.c (numeric_check): Fix implicit typing. * class.c (gfc_build_class_symbol): Add assert. (finalize_component): Free memory. * dump-parse-tree.c (show_namespace): Add assert. * trans-io.c (transfer_namelist_element, transfer_expr): Avoid memory leakage. (gfc_trans_transfer): Add assert. * trans.c (gfc_trans_runtime_check): Call va_end git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191344 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-15 Tobias Burnus <burnus@net-b.de>burnus2012-09-156-24/+52
| | | | | | | | | | | | | | | | | | | * match.c (lock_unlock_statement, sync_statement): Fix potential double freeing. (sync_statement): Remove unreachable code. * simplify.c (gfc_simplify_bessel_n2): Avoid double freeing. (gfc_simplify_repeat): Remove bogus code. * target-memory.h (gfc_target_encode_expr): Update prototype. * target-memory.c (gfc_target_encode_expr, encode_array, encode_derived): Return unsigned HOST_WIDE_INT. (gfc_target_interpret_expr): Add assert. (gfc_merge_initializers): Fix "== 0" check for mpz_t. * symbol.c (gfc_get_typebound_proc): Add assert. (gfc_merge_initializers): Remove unreachable check. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191343 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-13 Tobias Burnus <burnus@net-b.de>burnus2012-09-132-6/+15
| | | | | | | | | | | | | | | | | PR fortran/54556 * resolve.c (resolve_formal_arglist): Allow VALUE arguments with implicit_pure. (gfc_impure_variable): Don't check gfc_pure such that the function also works for gfc_implicit_pure procedures. 2012-09-13 Tobias Burnus <burnus@net-b.de> PR fortran/54556 * gfortran.dg/implicit_pure_3.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191259 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-12 Tobias Burnus <burnus@net-b.de>burnus2012-09-122-4/+16
| | | | | | | | | | | | | | | | | | | PR fortran/54225 PR fortran/53306 * array.c (match_subscript, gfc_match_array_ref): Fix diagnostic of coarray's '*'. 2012-09-12 Tobias Burnus <burnus@net-b.de> PR fortran/54225 PR fortran/53306 * gfortran.dg/coarray_10.f90: Update dg-error. * gfortran.dg/coarray_28.f90: New. * gfortran.dg/array_section_3.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191213 138bc75d-0d04-0410-961f-82ee72b054a4
* Remove unnecessary VEC function overloads.dnovillo2012-09-111-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several VEC member functions that accept an element 'T' used to have two overloads: one taking 'T', the second taking 'T *'. This used to be needed because of the interface dichotomy between vectors of objects and vectors of pointers. In the past, vectors of pointers would use pass-by-value semantics, but vectors of objects would use pass-by-reference semantics. This is no longer necessary, but the distinction had remained. The main side-effect of this change is some code reduction in code that manipulates vectors of objects. For instance, - struct iterator_use *iuse; - - iuse = VEC_safe_push (iterator_use, heap, iterator_uses, NULL); - iuse->iterator = iterator; - iuse->ptr = ptr; + struct iterator_use iuse = {iterator, ptr}; + VEC_safe_push (iterator_use, heap, iterator_uses, iuse); Compile time performance was not affected. Tested on x86_64 and ppc64. Also built all-gcc on all targets using VEC routines: arm, bfin, c6x, epiphany, ia64, mips, sh, spu, and vms. 2012-09-10 Diego Novillo <dnovillo@google.com> * vec.h (vec_t::quick_push): Remove overload that accepts 'T *'. Update all users. (vec_t::safe_push): Likewise. (vec_t::quick_insert): Likewise. (vec_t::lower_bound): Likewise. (vec_t::safe_insert): Likewise. (vec_t::replace): Change second argument to 'T &'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191165 138bc75d-0d04-0410-961f-82ee72b054a4
* fortran/mikael2012-09-072-0/+9
| | | | | | | | | | | | | | PR fortran/54208 * simplify.c (simplify_bound_dim): Resolve array spec before proceeding with simplification. testsuite/ PR fortran/54208 * gfortran.dg/bound_simplification_3.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191083 138bc75d-0d04-0410-961f-82ee72b054a4
* PR rtl-optimization/54455jakub2012-09-061-1/+1
| | | | | | | | | | * sel-sched-ir.c (maybe_tidy_empty_bb): Give up if previous fallthru bb ends up with asm goto referencing bb's label. * gcc.dg/54455.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191013 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-06 Tobias Burnusburnus2012-09-062-4/+9
| | | | | | | | | | | | | | | PR fortran/54463 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Fix matmul call to BLAS if the default-kind has been promoted. 2012-09-06 Tobias Burnus PR fortran/54463 * gfortran.dg/promotion_2.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191012 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-05 Tobias Burnus <burnus@net-b.de>burnus2012-09-052-4/+11
| | | | | | | | | PR fortran/54462 * symbol.c (gfc_undo_symbols): Avoid NULL pointer dereference. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190989 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-04 Janus Weil <janus@gcc.gnu.org>janus2012-09-042-2/+9
| | | | | | | | | | | | | | | | PR fortran/54435 PR fortran/54443 * match.c (gfc_match_select_type): Make sure to only access CLASS_DATA for BT_CLASS. 2012-09-04 Janus Weil <janus@gcc.gnu.org> PR fortran/54243 PR fortran/54244 * gfortran.dg/select_type_29.f03: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190910 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-03 Tobias Burnus <burnus@net-b.de>burnus2012-09-032-1/+7
| | | | | | | | | | PR fortran/54467 * class.c (gfc_find_derived_vtab): Fix disabling of _final by continuing to generate normal type-bound procedures. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190892 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-03 Tobias Burnus <burnus@net-b.de>burnus2012-09-032-1/+9
| | | | | | | | | * class.c (gfc_find_derived_vtab): Disable ABI-breaking generation of the "_final" subroutine for now. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190872 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-03 Tobias Burnus <burnus@net-b.de>burnus2012-09-032-2/+6
| | | | | | | | * class.c (finalize_component): Fixes to the comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190870 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-03 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>burnus2012-09-036-13/+778
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tobias Burnus <burnus@net-b.de> PR fortran/37336 * gfortran.h (symbol_attribute): Add artificial. * module.c (mio_symbol_attribute): Handle attr.artificial * class.c (gfc_build_class_symbol): Defer creation of the vtab if the DT has finalizers, mark generated symbols as attr.artificial. (has_finalizer_component, finalize_component, finalization_scalarizer, generate_finalization_wrapper): New static functions. (gfc_find_derived_vtab): Add _final component and call generate_finalization_wrapper. * dump-parse-tree.c (show_f2k_derived): Use resolved proc_tree->n.sym rather than unresolved proc_sym. (show_attr): Handle attr.artificial. * resolve.c (gfc_resolve_finalizers): Ensure that the vtab * exists. (resolve_fl_derived): Resolve finalizers before generating the vtab. (resolve_symbol): Also allow assumed-rank arrays with CONTIGUOUS; skip artificial symbols. (resolve_fl_derived0): Skip artificial symbols. 2012-09-03 Tobias Burnus <burnus@net-b.de> PR fortran/51632 * gfortran.dg/coarray_class_1.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190869 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-09-02 Tobias Burnus <burnus@net-b.de>burnus2012-09-022-0/+41
| | | | | | | | | | PR fortran/54426 * symbol.c (find_common_symtree): New function. (gfc_undo_symbols): Use it; free common_head if needed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190853 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-08-28 Tobias Burnus <burnus@net-b.de>burnus2012-08-282-2/+9
| | | | | | | | | | | PR fortran/54389 * trans-decl.c (gfc_get_extern_function_decl, build_function_decl): Don't mark impure elemental functions as DECL_PURE_P and honour implicit_pure. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190757 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-08-28 Tobias Burnus <burnus@net-b.de>burnus2012-08-282-0/+6
| | | | | | | | | PR fortran/54382 * error.c (show_locus): Avoid out of bound access. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190752 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-08-28 Tobias Burnus <burnus@net-b.de>burnus2012-08-283-3/+18
| | | | | | | | | | | | | PR fortran/54384 * decl.c (match_data_constant): Add missing gfc_free_expr. (top_val_list): Remove always-true condition. * data.c (get_array_index, create_character_initializer): Free temporary expressions. (gfc_assign_data_value): Free expression when aborting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190751 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-08-28 Tobias Burnus <burnus@net-b.de>burnus2012-08-282-0/+6
| | | | | | | | | PR fortran/54384 * symbol.c (gfc_copy_formal_args): Set also sym->formal_ns. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190738 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-08-27 Tobias Burnus <burnus@net-b.de>burnus2012-08-273-1/+14
| | | | | | | | | | | PR fortran/54384 * resolve.c (gfc_resolve_character_operator): Free temporary variables. * trans-expr.c (gfc_conv_statement_function): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190731 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-08-27 Tobias Burnus <burnus@net-b.de>burnus2012-08-273-2/+10
| | | | | | | | | | | | PR fortran/54384 * dependency.c (check_section_vs_section): Use gfc_free_expr instead of free. * trans-intrinsic.c (conv_generic_with_optional_char_arg): Use gfc_free_symbol instead of free. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190728 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-08-27 Tobias Burnus <burnus@net-b.de>burnus2012-08-272-0/+11
| | | | | | | | | | PR fortran/54384 * trans-expr.c (gfc_trans_arrayfunc_assign): Free se.ss and loop. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190713 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud