summaryrefslogtreecommitdiffstats
path: root/gcc/fortran
Commit message (Collapse)AuthorAgeFilesLines
...
* * tree.h (get_pending_sizes): Remove prototype.ebotcazou2011-05-052-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (put_pending_size): Likewise. (put_pending_sizes): Likewise. * stor-layout.c (pending_sizes): Delete. (get_pending_sizes): Likewise. (put_pending_size): Likewise. (put_pending_sizes): Likewise. (variable_size): Do not call put_pending_size and tidy up. * function.h (struct function): Remove dont_save_pending_sizes_p. * lto-streamer-in.c (input_function): Do not stream it. * lto-streamer-out.c (output_function): Likewise. * tree-inline.c (initialize_cfun): Do not copy it. * c-decl.c (store_parm_decls): Do not set it. * omp-low.c (create_task_copyfn): Likewise. * tree-optimize.c (tree_rest_of_compilation): Likewise. cp/ * decl.c (start_preparsed_function): Likewise. fortran/ * trans-decl.c (trans_function_start): Likewise. ada/ * gcc-interface/utils.c (begin_subprog_body): Do not call get_pending_sizes. (end_subprog_body): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173424 138bc75d-0d04-0410-961f-82ee72b054a4
* remove gfc_chainon_listfroydnj2011-05-043-16/+5
| | | | | | | | * trans.h (gfc_chainon_list): Delete. * trans.c (gfc_chainon_list): Delete. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173386 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/burnus2011-05-043-2/+14
| | | | | | | | | | | | | | | | | | | | | 2011-05-04 Tobias Burnus <burnus@net-b.de> PR fortran/48864 * doc/invoke.texi (Ofast): Document that it enables Fortran's -fno-protect-parens. gcc/fortran 2011-05-04 Tobias Burnus <burnus@net-b.de> PR fortran/48864 * invoke.texi (fno-protect-parens): Document that -Ofast implies -fno-protect-parens. * options.c (gfc_init_options, gfc_post_options): Make -Ofast imply -fno-protect-parens. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173385 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/froydnj2011-05-044-34/+39
| | | | | | | | | | | | | | | | | | | * tree.h (build_function_type_array): Declare. (build_varargs_function_type_array): Declare. (build_function_type_vec, build_varargs_function_type_vec): Define. * tree.c (build_function_type_array_1): New function. (build_function_type_array): New function. (build_varargs_function_type_array): New function. gcc/fortran/ * trans-decl.c (build_library_function_decl_1): Call build_function_type_vec. Adjust argument list building accordingly. * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise. * trans-types.c (gfc_get_function_type): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173375 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-04 Richard Guenther <rguenther@suse.de>rguenth2011-05-049-30/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * trans-array.c (gfc_trans_array_constructor_value): Use size_int for bounds of range types. (gfc_trans_array_constructor_value): Use size_type_node for memcpy argument. * trans-common.c (build_field): Use gfc_charlen_type_node for lengths. * trans-openmp.c (gfc_trans_omp_clauses): Do not pass NULL as type to build_int_cst. * trans-const.c (gfc_build_string_const): Use size_int for bounds of range types. (gfc_build_wide_string_const): Likewise. * trans-stmt.c (gfc_trans_label_assign): Use gfc_charlen_type_node for lengths. (gfc_trans_character_select): Likewise. (gfc_trans_character_select): Do not pass NULL as type to build_int_cst. (gfc_trans_character_select): Use size_int for bounds of range types. * trans-io.c (gfc_build_io_library_fndecls): Likewise. (add_case): Do not pass NULL as type to build_int_cst. (transfer_expr): Likewise. (transfer_array_desc): Likewise. * trans-decl.c (gfc_add_assign_aux_vars): Use gfc_charlen_type_node for lengths. (gfc_trans_assign_aux_var): Likewise. (create_main_function): Use size_int for bounds of range types. * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): Do not pass NULL as type to build_int_cst. (gfc_conv_intrinsic_spacing): Likewise. (gfc_conv_intrinsic_rrspacing): Likewise. (gfc_conv_intrinsic_len): Use gfc_charlen_type_node for lengths. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173374 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-04 Richard Guenther <rguenther@suse.de>rguenth2011-05-042-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tree.h (int_const_binop): Remove notrunc argument. * fold-const.c (int_const_binop): Remove notrunc argument. Always create integer constants that are properly truncated. (extract_muldiv_1): Expand one notrunc int_const_binop caller. (const_binop): Remove zero notrunc argument to int_const_binop. (size_binop_loc): Likewise. (fold_div_compare): Likewise. (maybe_canonicalize_comparison_1): Likewise. (fold_comparison): Likewise. (fold_binary_loc): Likewise. (multiple_of_p): Likewise. * expr.c (store_constructor): Likewise. * gimple-fold.c (maybe_fold_offset_to_array_ref): Likewise. (maybe_fold_stmt_addition): Likewise. * ipa-prop.c (ipa_modify_call_arguments): Likewise. * stor-layout.c (layout_type): Likewise. * tree-data-ref.c (tree_fold_divides_p): Likewise. * tree-sra.c (build_ref_for_offset): Likewise. (build_user_friendly_ref_for_offset): Likewise. * tree-ssa-address.c (maybe_fold_tmr): Likewise. * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Likewise. * tree-ssa-loop-niter.c (inverse): Likewise. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Likewise. * tree-ssa.c (maybe_rewrite_mem_ref_base): Likewise. * tree-switch-conversion.c (check_range): Likewise. (build_constructors): Likewise. * tree-vect-generic.c (expand_vector_piecewise): Likewise. * tree-vrp.c (set_and_canonicalize_value_range): Likewise. (extract_range_from_assert): Likewise. (vrp_int_const_binop): Likewise. (extract_range_from_binary_expr): Likewise. (extract_range_from_unary_expr): Likewise. (check_array_ref): Likewise. (find_case_label_range): Likewise. (simplify_div_or_mod_using_ranges): Likewise. * tree-cfg.c (group_case_labels_stmt): Use double-ints for comparing case labels for merging. ada/ * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to int_const_binop. (pos_to_constructor): Likewise. fortran/ * trans-types.c (gfc_get_array_type_bounds): Remove zero notrunc argument to int_const_binop. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173356 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-03 Tobias Burnus <burnus@net-b.de>burnus2011-05-032-12/+204
| | | | | | | | | | | | | | | PR fortran/18918 * trans-intrinsic.c (trans_this_image): Implement version with coarray argument. 2011-05-03 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * gfortran.dg/coarray/this_image_1.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173342 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-02 Steven G. Kargl <kargl@gcc.gnu.org>kargl2011-05-037-7/+86
| | | | | | | | | | | | | | | | PR fortran/48720 * gfortran.texi: Document the 'Q' exponent-letter extension. * invoke.texi: Document -Wreal-q-constant. * lang.opt: Add -Wreal-q-constant option. * gfortran.h: Add warn_real_q_constant to option struct. * primary.c (match_real_constant): Use it. Accept 'Q' as exponent-letter for REAL(16) real-literal-constant with a fallback to REAL(10) or error if REAL(10) is not available. * options.c (gfc_init_options, set_Wall) Set it. (gfc_handle_option): Handle new option. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173285 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig2011-04-302-0/+11
| | | | | | | | | | * dump-prase-tree.c (show_code_node): Set the current namespace to the BLOCK before displaying it; restore afterwards. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173223 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-30 Tobias Burnus <burnus@net-b.de>burnus2011-04-301-1/+1
| | | | | | | | | | | PR fortran/48821 * gfortran.dg/import9.f90: New, proper test. * gfortran.dg/interface_37.f90: Remove bogus test (bogus copy of interface_36.f90). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173221 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-30 Tobias Burnus <burnus@net-b.de>burnus2011-04-302-1/+7
| | | | | | | | | | | | | | | PR fortran/48800 * decl.c (gfc_match_import): Don't try to find the symbol if already found. 2011-04-30 Tobias Burnus <burnus@net-b.de> PR fortran/48800 * gfortran.dg/interface_37.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173219 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-30 Paul Thomas <pault@gcc.gnu.org>pault2011-04-302-6/+46
| | | | | | | | | | | | | | | PR fortran/48746 * trans-expr.c (fcncall_realloc_result): Set the bounds and the offset so that the lbounds are one. (gfc_trans_arrayfunc_assign): Add rank to arguments of above. 2011-04-30 Paul Thomas <pault@gcc.gnu.org> PR fortran/48746 * gfortran.dg/realloc_on_assign_7.f03: Test bounds. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173213 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-29 Paul Thomas <pault@gcc.gnu.org>pault2011-04-292-6/+18
| | | | | | | | | | | | | | | | | | | | | PR fortran/48462 * trans-expr.c (arrayfunc_assign_needs_temporary): Deal with automatic reallocation when the lhs is a target. PR fortran/48746 * trans-expr.c (fcncall_realloc_result): Make sure that the result dtype field is set before the function call. 2011-04-29 Paul Thomas <pault@gcc.gnu.org> PR fortran/48462 * gfortran.dg/realloc_on_assign_7.f03: Modify to test for lhs being a target. PR fortran/48746 * gfortran.dg/realloc_on_assign_7.f03: Add subroutine pr48746. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173185 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-29 Tobias Burnus <burnus@net-b.de>burnus2011-04-292-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/48810 * resolve.c (resolve_typebound_generic_call): Don't check access flags of the specific function. PR fortran/48800 * resolve.c (resolve_formal_arglist): Don't change AS_DEFERRED to AS_ASSUMED_SHAPE for function results. (resolve_fl_var_and_proc): Print also for function results with AS_DEFERRED an error, if they are not a pointer or allocatable. (resolve_types): Make sure arguments of procedures in interface blocks are resolved. 2011-04-29 Tobias Burnus <burnus@net-b.de> PR fortran/48810 * gfortran.dg/typebound_proc_22.f90: New. PR fortran/48800 * gfortran.dg/interface_36.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173175 138bc75d-0d04-0410-961f-82ee72b054a4
* ada/matz2011-04-292-0/+5
| | | | | | | | | | | * gcc-interface/misc.c (gnat_handle_option): Set warn_maybe_uninitialized. fortran/ * options.c (options.c): Set warn_maybe_uninitialized. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173154 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-28 Tobias Burnus <burnus@net-b.de>burnus2011-04-284-10/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/48112 * resolve.c (resolve_fl_var_and_proc): Print diagnostic of function results only once. (resolve_symbol): Always resolve function results. PR fortran/48279 * expr.c (gfc_check_vardef_context): Fix handling of generic EXPR_FUNCTION. * interface.c (check_interface0): Reject internal functions in generic interfaces, unless -std=gnu. 2011-04-28 Tobias Burnus <burnus@net-b.de> PR fortran/48112 PR fortran/48279 * gfortran.dg/interface_35.f90: New. * gfortran.dg/erfc_scaled_1.f90: Don't compile with -pedantic. * gfortran.dg/func_result_6.f90: Add dg-warning. * gfortran.dg/bessel_1.f90: Ditto. * gfortran.dg/hypot_1.f90: Ditto. * gfortran.dg/proc_ptr_comp_20.f90: Ditto. * gfortran.dg/proc_ptr_comp_21.f90: Ditto. * gfortran.dg/interface_assignment_4.f90: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173059 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-27 Tobias Burnus <burnus@net-b.de>burnus2011-04-272-1/+7
| | | | | | | | | | | | | | | PR fortran/48788 * resolve.c (resolve_global_procedure): Error recovery - avoid segfault for (non)character-returning functions. 2011-04-27 Tobias Burnus <burnus@net-b.de> PR fortran/48788 * gfortran.dg/whole_file_34.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173048 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-26 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig2011-04-263-2/+12
| | | | | | | | | | | * decl.c (gfc_match_end): Check that the block name starts with "block@". * parse.c (gfc_build_block_ns): Make block names unique by numbering them. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172990 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-26 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig2011-04-262-5/+43
| | | | | | | | | | | | * frontend-passes.c (inserted_block): New variable. (changed_statement): Likewise. (create_var): Encase statement to be operated on in a BLOCK. Adjust code insertion for BLOCK. (cfe_code): Set inserted_block and changed_statement to NULL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172983 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-23 Tobias Burnus <burnus@net-b.de>burnus2011-04-233-1/+26
| | | | | | | | | | | | | | | | PR fortran/18918 * module.c (mio_array_spec): Set as->cotype on reading. * resolve.c (resolve_allocate_expr): Fix allocating coarray components. 2011-04-23 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * gfortran.dg/coarray_19.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172897 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-21 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig2011-04-212-111/+119
| | | | | | | | | | | | | | | | | PR fortran/48405 * frontend_passes (cfe_register_funcs): Remove workaround for DO loops. (gfc_code_walker): Make sure the pointer to the current statement doen't change when other statements are inserted. 2011-04-21 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/48405 * gfortran.dg/function_optimize_6.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172838 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-21 Tobias Burnus <burnus@net-b.de>burnus2011-04-212-1/+13
| | | | | | | | | | | | | | PR fortran/18918 * array.c (gfc_match_array_spec): Fix maximal rank(+corank) check. 2011-04-21 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * gfortran.dg/coarray_18.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172812 138bc75d-0d04-0410-961f-82ee72b054a4
* remove useless if-before-free testsmeyering2011-04-205-9/+12
| | | | | | | | | | | Change "if (E) free (E);" to "free (E);" everywhere except in the libgo/, intl/, zlib/ and classpath/ directories. Also transform equivalent variants like "if (E != NULL) free (E);" and allow an extra cast on the argument to free. Otherwise, the tested and freed "E" expressions must be identical, modulo white space. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172785 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-19 Tobias Burnus <burnus@net-b.de>burnus2011-04-202-0/+8
| | | | | | | | | | | PR fortran/48588 PR fortran/48692 * module.c (fix_mio_expr): Commit created symbol. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172782 138bc75d-0d04-0410-961f-82ee72b054a4
* Use XCNEWVAR instead of xcallocjb2011-04-192-2/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172730 138bc75d-0d04-0410-961f-82ee72b054a4
* Use XDELETEVEC instead of freejb2011-04-192-3/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172729 138bc75d-0d04-0410-961f-82ee72b054a4
* Replace gfc_getmem with XCNEW, XCNEWVEC or xcallocjb2011-04-1913-49/+47
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172728 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-19 Tobias Burnus <burnus@net-b.de>burnus2011-04-192-10/+54
| | | | | | | | | | | | | | | | PR fortran/48588 * parse.c (resolve_all_program_units): Skip modules. (translate_all_program_units): Handle modules. (gfc_parse_file): Defer code generation for modules. 2011-04-19 Tobias Burnus <burnus@net-b.de> PR fortran/48588 * gfortran.dg/whole_file_33.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172718 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-19 Martin Jambor <mjambor@suse.cz>jamborm2011-04-192-1/+6
| | | | | | | | | | | gcc/fotrean/ * trans-decl.c (gfc_generate_function_code): Call cgraph_create_node instead of cgraph_get_create_node. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172715 138bc75d-0d04-0410-961f-82ee72b054a4
* remove now-unused definition of gfc_freemeyering2011-04-183-11/+6
| | | | | | | * misc.c (gfc_free): Remove function. * gfortran.h (gfc_free): Remove its prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172667 138bc75d-0d04-0410-961f-82ee72b054a4
* convert each use of gfc_free (p) to free (p)meyering2011-04-1835-212/+301
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do that by running this command: perl -pi -e 's/\bgfc_free ?\(/free (/' \ $(git grep -El '\bgfc_free ?\(') which also corrects the few uses that lacked a space between the function name and the open parenthesis. Manually undo the change to the function definition itself and its prototype. They'll be removed next. * array.c (gfc_free_array_spec, gfc_set_array_spec): s/gfc_free/free/ * constructor.c (node_free): Likewise. * cpp.c (dump_queued_macros): Likewise. * data.c (gfc_assign_data_value): Likewise. * decl.c (free_variable, free_value, gfc_free_data): Likewise. (gfc_free_data_all, match_old_style_init): Likewise. (gfc_set_constant_character_len, gfc_free_enum_history, NUM_DECL): Likewise. (gfc_match_modproc): Likewise. * dependency.c (check_section_vs_section): Likewise. * error.c (gfc_pop_error, gfc_free_error): Likewise. * expr.c (free_expr0, gfc_free_expr, gfc_free_actual_arglist): Likewise. (gfc_free_ref_list, gfc_replace_expr, gfc_copy_ref): Likewise. (find_substring_ref, gfc_simplify_expr, gfc_check_assign_symbol): Likewise. * frontend-passes.c (gfc_run_passes, cfe_expr_0): Likewise. (strip_function_call, optimize_comparison): Likewise. * interface.c (gfc_free_interface, arginfo, check_interface0): Likewise. (CHECK_OS_COMPARISON, gfc_extend_assign, gfc_free_formal_arglist): Likewise. * intrinsic.c (gfc_intrinsic_done_1, gfc_convert_type_warn): Likewise. (gfc_convert_chartype): Likewise. * io.c (gfc_free_open, compare_to_allowed_values, gfc_free_close): Likewise. (gfc_free_filepos, gfc_free_dt, gfc_free_inquire): Likewise. * match.c (gfc_free_iterator, gfc_match_associate): Likewise. (gfc_free_alloc_list, gfc_free_namelist, gfc_free_equiv_until): Likewise. (free_case, gfc_free_forall_iterator): Likewise. * misc.c: Likewise. * module.c (free_pi_tree, resolve_fixups, free_rename): Likewise. (free_true_name, peek_atom, mio_allocated_wide_string): Likewise. (mio_pool_string, mio_internal_string, mio_gmp_integer): Likewise. (mio_gmp_real, mio_expr, mio_typebound_proc): Likewise. (mio_full_typebound_tree, skip_list, load_equiv): Likewise. (free_written_common, gfc_use_module, gfc_free_use_stmts): Likewise. * openmp.c (gfc_free_omp_clauses): Likewise. * options.c (gfc_post_options): Likewise. * parse.c (select_type_pop, parse_omp_structured_block): Likewise. * primary.c (gfc_free_structure_ctor_component): Likewise. * resolve.c (resolve_structure_cons, check_host_association): Likewise. (gfc_resolve_forall, resolve_equivalence): Likewise. * scanner.c (gfc_scanner_done_1, gfc_release_include_path): Likewise. (gfc_define_undef_line, preprocessor_line, include_line): Likewise. (load_file, gfc_read_orig_filename): Likewise. * simplify.c (simplify_transformation_to_array): Likewise. (gfc_simplify_ibits, simplify_shift, gfc_simplify_ishftc, STRING): Likewise. (gfc_simplify_compiler_options): Likewise. * st.c (gfc_free_statement, gfc_free_statements): Likewise. (gfc_free_association_list): Likewise. * symbol.c (free_components, gfc_free_st_label, free_st_labels): Likewise. (gfc_delete_symtree, gfc_free_symbol, gfc_undo_symbols): Likewise. (free_old_symbol, gfc_commit_symbols, free_tb_tree): Likewise. (free_common_tree, free_uop_tree, free_sym_tree): Likewise. (gfc_free_dt_list, gfc_free_equiv_infos, gfc_free_equiv_lists): Likewise. (gfc_free_finalizer, gfc_free_charlen, free_entry_list): Likewise. (gfc_free_namespace): Likewise. * trans-array.c (gfc_free_ss, gfc_trans_array_bound_check): Likewise. (gfc_conv_array_ref, gfc_conv_ss_startstride): Likewise. (gfc_trans_dummy_array_bias, gfc_conv_array_parameter): Likewise. * trans-common.c (get_init_field, create_common): Likewise. * trans-const.c (gfc_build_wide_string_const): Likewise. (gfc_conv_string_init): Likewise. * trans-decl.c (gfc_generate_function_code): Likewise. * trans-expr.c (gfc_conv_substring, gfc_free_interface_mapping): Likewise. (SCALAR_POINTER, gfc_conv_statement_function): Likewise. (gfc_trans_subarray_assign): Likewise. * trans-intrinsic.c (conv_generic_with_optional_char_arg): Likewise. * trans-io.c (gfc_trans_io_runtime_check, set_string): Likewise. (transfer_namelist_element, transfer_array_component): Likewise. * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise. * trans-stmt.c (cleanup_forall_symtrees, gfc_trans_forall_1): Likewise. * trans.c (trans_runtime_error_vararg, gfc_restore_backend_locus): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172666 138bc75d-0d04-0410-961f-82ee72b054a4
* gfortran: remove cpp definition of free, ...meyering2011-04-182-1/+7
| | | | | | | | in preparation for the s/gfc_free/free/ transformation. * gfortran.h (free): Remove macro definition that would otherwise prevent direct use of the function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172665 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-18 Tobias Burnus <burnus@net-b.de>burnus2011-04-184-13/+33
| | | | | | | | | | | | | | | | | | | | PR fortran/18918 * array.c (gfc_match_array_ref): Check for too many * codimensions. * check.c (gfc_check_image_index): Check number of elements in SUB argument. * simplify.c (gfc_simplify_image_index): Remove unreachable * checks. 2011-04-18 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * gfortran.dg/coarray_17.f90: New. * gfortran.dg/coarray_10.f90: Update dg-error. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172658 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-18 Tobias Burnus <burnus@net-b.de>burnus2011-04-188-38/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/18918 * iresolve.c (gfc_resolve_image_index): Set ts.type. * simplify.c (gfc_simplify_image_index): Don't abort if the * bounds are not known at compile time and handle -fcoarray=lib. * trans-intrinsics.c (gfc_conv_intrinsic_function): Handle IMAGE_INDEX. (conv_intrinsic_cobound): Fix comment typo. (trans_this_image): New function. * trans-array.c (gfc_unlikely): Move to trans.c. * trans.c (gfc_unlikely): Function moved from trans-array.c. (gfc_trans_runtime_check): Use it. * trans-io.c (gfc_trans_io_runtime_check): Ditto. * trans.h (gfc_unlikely): Add prototype. 2011-04-18 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * gfortran.dg/coarray_16.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172637 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-18 Paul Thomas <pault@gcc.gnu.org>pault2011-04-182-40/+33
| | | | | | | | | | | | | | | | | PR fortran/48462 * trans-expr.c (fcncall_realloc_result): Renamed version of realloc_lhs_bounds_for_intrinsic_call that does not touch the descriptor bounds anymore but makes a temporary descriptor to hold the result. (gfc_trans_arrayfunc_assign): Modify the reference to above renamed function. 2011-04-18 Paul Thomas <pault@gcc.gnu.org> PR fortran/48462 * gfortran.dg/realloc_on_assign_7.f03: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172636 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-17 Tobias Burnus <burnus@net-b.de>burnus2011-04-172-18/+6
| | | | | | | | | | PR fortran/48624 * trans-decl.c (gfc_get_extern_function_decl): Fix decl for external procedures with proc arguments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172604 138bc75d-0d04-0410-961f-82ee72b054a4
* * trans-array.c (toplevel): Include gimple.h.matz2011-04-157-14/+88
| | | | | | | | | | | | | | | (gfc_trans_allocate_array_storage): Check flag_stack_arrays, properly expand variable length arrays. (gfc_trans_auto_array_allocation): If flag_stack_arrays create variable length decls and associate them with their scope. * gfortran.h (gfc_option_t): Add flag_stack_arrays member. * options.c (gfc_init_options): Handle -fstack_arrays option. * lang.opt (fstack-arrays): Add option. * invoke.texi (Code Gen Options): Document it. * Make-lang.in (trans-array.o): Depend on GIMPLE_H. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172524 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-15 Tobias Burnus <burnus@net-b.de>burnus2011-04-152-4/+6
| | | | | | | | | | | | | | PR fortran/18918 * trans-intrinsic.c (conv_intrinsic_cobound): Remove unused code which is also causing an ICE. 2011-04-15 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * gfortran.dg/coarray_15.f90: Change to dg-do run. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172522 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/ada/froydnj2011-04-142-3/+7
| | | | | | | | | | | | | | | | | | | | | * gcc-interface/utils.c (gnat_poplevel): Use block_chainon. gcc/ * function.h (block_chainon): Declare. * function.c (block_chainon): Define. gcc/cp/ * decl.c (poplevel): Use block_chainon. gcc/fortran// * f95-lang.c (poplevel): Use BLOCK_CHAIN and block_chainon. gcc/java/ * decl.c (poplevel): Use BLOCK_CHAIN and block_chainon. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172418 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/ada/froydnj2011-04-132-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. * gcc-interface/misc.c (gnat_init_ts): New function. (LANG_HOOKS_INIT_TS): Define. gcc/ * c-decl.c (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. * print-tree.c (print_node): Likewise. * tree-inline.c (copy_tree_r): Likewise. * c-lang.c (LANG_HOOKS_INIT_TS): Define. * lto-streamer-in.c (lto_input_tree_pointers): Check for TS_TYPED instead of TS_COMMON. * lto-streamer-out.c (lto_output_tree_pointers): Likewise. * tree.c (initialize_tree_contains_struct): Handle TS_TYPED. (copy_node_stat): Zero TREE_CHAIN only if necessary. (MARK_TS_BASE, MARK_TS_TYPED, MARK_TS_COMMON): Move these... (MARK_TS_DECL_COMMON, MARK_TS_DECL_COMMON, MARK_TS_DECL_WRTL): ...and these... (MARK_TS_DECL_WITH_VIS, MARK_TS_DECL_NON_COMMON): ...and these... * tree.h: ...here. (TREE_CHAIN): Check for a TS_COMMON structure. (TREE_TYPE): Check for a TS_TYPED structure. gcc/c-family/ * c-common.h (c_common_init_ts): Declare. * c-common.c (c_common_init_ts): Define. gcc/cp/ * cp-lang.c (cp_init_ts): Call cp_common_init_ts. Move tree_contains_struct initialization to... * cp-objcp-common.c (cp_common_init_ts): ...here. Use MARK_* macros. * cp-objcp-common.h (cp_common_init_ts): Declare. * cp-tree.h (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. gcc/fortran/ * f95-lang.c (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. gcc/go/ * go-lang.c (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. gcc/java/ * java-tree.h (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. gcc/lto/ * lto-tree.h (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. * lto.c (lto_fixup_common): Likewise. gcc/objc/ * objc-lang.c (objc_init_ts): Move code for this function... * objc-act.c (objc_common_init_ts): ...here. Define. * objc-act.h (objc_common_init_ts): Declare. gcc/objcp/ * objcp-lang.c (objcxx_init_ts): Call objc_common_init_ts and cp_common_init_ts. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172359 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-12 Paul Thomas <pault@gcc.gnu.org>pault2011-04-122-0/+17
| | | | | | | | | | | | | | | PR fortran/48360 PR fortran/48456 * trans-array.c (get_std_lbound): For derived type variables return array valued component lbound. 2011-04-12 Paul Thomas <pault@gcc.gnu.org> PR fortran/48360 PR fortran/48456 * gfortran.dg/realloc_on_assign_6.f03: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172339 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-12 Martin Jambor <mjambor@suse.cz>jamborm2011-04-122-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cgraph.h (cgraph_node): Remove function declaration. (cgraph_create_node): Declare. (cgraph_get_create_node): Likewise. * cgraph.c (cgraph_create_node): Renamed to cgraph_create_node_1. Updated all callers. (cgraph_node): Renamed to cgraph_create_node, assert that a node for the decl does not already exist. Call cgraph_get_create_node instead of cgraph_node. (cgraph_get_create_node): New function. (cgraph_same_body_alias): Update comment. (cgraph_set_call_stmt): Call cgraph_get_node instead of cgraph_node, assert it does not return NULL. (cgraph_update_edges_for_call_stmt): Likewise. (cgraph_clone_edge): Likewise. (cgraph_create_virtual_clone): Likewise. (cgraph_update_edges_for_call_stmt_node): Call cgraph_get_create_node instead of cgraph_node. (cgraph_add_new_function): Call cgraph_create_node or cgraph_get_create_node instead of cgraph_node. * cgraphbuild.c (record_reference): Call cgraph_get_create_node instead of cgraph_node. (record_eh_tables): Likewise. (mark_address): Likewise. (mark_load): Likewise. (build_cgraph_edges): Call cgraph_get_create_node instead of cgraph_node. (rebuild_cgraph_edges): Likewise. * cgraphunit.c (cgraph_finalize_function): Call cgraph_get_create_node instead of cgraph_node. (cgraph_copy_node_for_versioning): Call cgraph_create_node instead of cgraph_node. * lto-symtab.c (lto_symtab_merge_cgraph_nodes_1): Call cgraph_create_node instead of cgraph_node. * c-decl.c (finish_function): Call cgraph_get_create_node instead of cgraph_node. * lto-cgraph.c (input_node): Likewise. * lto-streamer-in.c (input_function): Likewise. * varasm.c (mark_decl_referenced): Likewise. (assemble_alias): Likewise. gcc/c-family/ * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead of cgraph_node. gcc/cp/ * cp/class.c (cp_fold_obj_type_ref): Call cgraph_get_create_node instead of cgraph_node. * cp/decl2.c (cxx_callgraph_analyze_expr): Likewise. (cp_write_global_declarations): Likewise. * cp/optimize.c (maybe_clone_body): Likewise. * cp/semantics.c (maybe_add_lambda_conv_op): Likewise. * cp/mangle.c (mangle_decl): Likewise. * cp/method.c (make_alias_for_thunk): Likewise. (use_thunk): Likewise. gcc/ada/ * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node instead of cgraph_node. gcc/fortran/ * trans-decl.c (gfc_generate_function_code): Call cgraph_get_create_node instead of cgraph_node. gcc/objc/ * objc-act.c (mark_referenced_methods): Call cgraph_get_create_node instead of cgraph_node. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172307 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-11 Tobias Burnus <burnus@net-b.de>burnus2011-04-115-23/+107
| | | | | | | | | | | | | | | | | | PR fortran/18918 * simplify.c (simplify_bound_dim): Exit for ucobound's last dimension unless -fcoarray=single. * trans-array (gfc_conv_descriptor_size_1): Renamed from gfc_conv_descriptor_size, made static, has now from_dim and to_dim arguments. (gfc_conv_descriptor_size): Call gfc_conv_descriptor_size. (gfc_conv_descriptor_cosize): New function. * trans-array.h (gfc_conv_descriptor_cosize): New prototype. * trans-intrinsic.c (conv_intrinsic_cobound): Add input_location and handle last codim of ucobound for when -fcoarray is not "single". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172262 138bc75d-0d04-0410-961f-82ee72b054a4
* Remove doubled up words.mrs2011-04-107-9/+9
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172247 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-08 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig2011-04-086-5/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/48448 * gfortran.h (gfc_option_t): Add warn_function_elimination and flag_frontend_optimize. * lang.opt (Wfunction-elimination): Add. (ffrontend-optimize): Add. * invoke.texi: Add documentation for -Wfunction-elimination and -ffrontend-optimize. Add -faggressive-function-elimination to list of code generation options. * frontend-passes.c (gfc_run_passes): Run optimizations if flag_frontend_optimize is set. (warn_function_elimination): New function. (cfe_expr_0): Call it if requested to do so. * options.c (gfc_init_options): Initiate warn_function_elimination and flag_frontend_optimize. (gfc_post_options): Set flag_frontend_optimize if not specified by user, depending on the optimization level. (gfc_handle_option): Handle -Wfunction-elimination and -ffrontend-optimize. 2011-04-08 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/48448 * gfortran.dg/function_optimize_5.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172215 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-06 Tobias Burnus <burnus@net-b.de>burnus2011-04-062-1/+7
| | | | | | | | | | PR fortran/18918 * trans-intrinsic.c (gfc_conv_intrinsic_function): Fix call for this_image. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172060 138bc75d-0d04-0410-961f-82ee72b054a4
* * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Usefroydnj2011-04-052-17/+26
| | | | | | | | build_function_type_list instead of build_function_type. Correct argument order for func_frexp and func_scalbn. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171987 138bc75d-0d04-0410-961f-82ee72b054a4
* The parameters for functions from the frexp family were the wrong waybaldrick2011-04-052-3/+6
| | | | | | | round. Swap them. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171971 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-04-04 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig2011-04-041-0/+7
| | | | | | | | | | | * frontend-passes: (optimize_lexical_comparison): New function. (optimize_expr): Call it. (optimize_comparison): Also handle lexical comparison functions. Return false instad of -2 for unequal comparison. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171954 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-04-04 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig2011-04-041-7/+72
| | | | | | | | | | | | | | | * frontend-passes: (optimize_lexical_comparison): New function. (optimize_expr): Call it. (optimize_comparison): Also handle lexical comparison functions. Return false instad of -2 for unequal comparison. 2010-04-04 Thomas Koenig <tkoenig@gcc.gnu.org> * gfortran.dg/character_comparison_8.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171953 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud