aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
AgeCommit message (Collapse)AuthorFilesLines
2006-02-10re PR fortran/20858 (NULL doesn't get its argument type (kind))Steven G. Kargl4-19/+31
2006-02-05 Steven G. Kargl <kargls@comcast.net> PR fortran/20858 *decl.c (variable_decl): Improve error message. Remove initialization typespec. Wrap long line. *expr.c (gfc_check_pointer_assign): Permit checking of type, kind type, and rank. *simplify.c (gfc_simplify_null): Ensure type, kind type, and rank are set. gfortran.dg/null_1.f90: New test. From-SVN: r110845
2006-02-10re PR fortran/14771 (frontend doesn't record parentheses)Tobias Schlüter4-0/+17
fortran/ PR fortran/14771 * arith.c (eval_intrinsic): Accept INTRINSIC_PARENTHESES. * expr.c (check_intrinsic_op): Likewise. * module.c (mio_expr): Likewise. testsuite/ PR fortran/14771 * gfortran.dg/parens_4.f90: New. * gfortran.dg/parens_5.f90: New. From-SVN: r110840
2006-02-10dump-parse-tree.c: Update copyright years.Tobias Schlüter4-4/+9
* dump-parse-tree.c: Update copyright years. * matchexp.c: Likewise. * module.c: Likewise. From-SVN: r110820
2006-02-10re PR fortran/14771 (frontend doesn't record parentheses)Tobias Schlüter9-3/+54
fortran/ 2006-02-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de> PR fortran/14771 * gfortran.h (gfc_intrinsic_op): Add INTRINSIC_PARENTHESES. * dump-parse-tree (gfc_show_expr): Handle INTRINSIC_PARENTHESES. * expr.c (simplify_intrinsic_op): Treat INTRINSIC_PARENTHESES as if it were INTRINSIC_UPLUS. * resolve.c (resolve_operator): Handle INTRINSIC_PARENTHESES. * match.c (intrinsic_operators): Add INTRINSIC_PARENTHESES. * matchexp.c (match_primary): Record parentheses surrounding numeric expressions. * module.c (intrinsics): Add INTRINSIC_PARENTHESES for module dumping. * trans-expr.c (gfc_conv_expr_op): Handle INTRINSIC_PARENTHESES. testsuite/ 2006-02-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de> Paul Thomas <pault@gcc.gnu.org> PR fortran/14771 * gfortran.dg/parens_1.f90: New. * gfortran.dg/parens_2.f90: New. * gfortran.dg/parens_3.f90: New. From-SVN: r110819
2006-02-09re PR fortran/26038 (ICE on allocation of assumed length CHARACTER dummy.)Paul Thomas4-11/+41
2006-02-09 Paul Thomas <pault@gcc.gnu.org> PR fortran/26038 * trans-stmt.c (gfc_trans_allocate): Provide assumed character length scalar with missing backend_decl for the hidden dummy charlen. PR fortran/25059 * interface.c (gfc_extend_assign): Remove detection of non-PURE subroutine in assignment interface, with gfc_error, and put it in * resolve.c (resolve_code). PR fortran/25070 * interface.c (gfc_procedure_use): Flag rank checking for non- elemental, contained or interface procedures in call to (compare_actual_formal), where ranks are checked for assumed shape arrays.. 2006-02-09 Paul Thomas <pault@gcc.gnu.org> PR fortran/26038 * gfortran.dg/allocate_char_star_scalar_1.f90: New test. PR fortran/25059 * gfortran.dg/impure_assignment_1.f90: New test. PR fortran/25070 * gfortran.dg/assumed_shape_ranks_1.f90: New test. From-SVN: r110816
2006-02-08re PR libfortran/25425 ([4.1 only] F95 and F2003 differ on list-directed ↵François-Xavier Coudert2-5/+15
output for 0.0) PR libfortran/25425 * trans-decl.c (gfc_generate_function_code): Add new argument, pedantic, to set_std call. * libgfortran.h: Add pedantic field to compile_options struct. * io/write.c (calculate_G_format): Depending on the standard, choose E or F format for list-directed output of 0.0. * runtime/error.c (notify_std): Make warning and error dependent on pedanticity. * runtime/compile_options.c (set_std): Use new pedantic argument. From-SVN: r110769
2006-02-06re PR fortran/23815 (Add -byteswapio flag)Thomas Koenig7-7/+193
2005-02-06 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/23815 * gfortran.texi: Document the GFORTRAN_CONVERT_UNIT environment variable. * invoke.texi: Mention the "Runtime" chapter. Document the -fconvert= option. * gfortran.h: Add options_convert. * lang.opt: Add fconvert=little-endian, fconvert=big-endian, fconvert=native and fconvert=swap. * trans-decl.c (top level): Add gfor_fndecl_set_convert. (gfc_build_builtin_function_decls): Set gfor_fndecl_set_convert. (gfc_generate_function_code): If -fconvert was specified, and this is the main program, add a call to set_convert(). * options.c: Handle the -fconvert options. 2005-02-06 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/23815 * runtime/environ.c (init_unformatted): Add GFORTRAN_CONVERT_UNIT environment variable. (top level): Add defines, type and static variables for GFORTRAN_CONVERT_UNIT handling. (search_unit): New function. (match_word): New function. (match_integer): New function. (next_token): New function. (push_token): New function. (mark_single): New function. (mark_range): New funciton. (do_parse): New function. (init_unformatted): New function. (get_unformatted_convert): New function. * runtime/compile_options.c: Add set_convert(). * libgfortran.h: Add convert to compile_options_t. * io/open.c (st_open): Call get_unformatted_convert to get unit default; if CONVERT_NONE is returned, check for the presence of a CONVERT specifier and use it. As default, use compile_options.convert. * io/io.h (top level): Add CONVERT_NONE to unit_convert, to signal "nothing has been set". (top level): Add prototype for get_unformatted_convert. 2005-02-06 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/23815 * unf_io_convert_4.f90: New test. From-SVN: r110664
2006-02-06ChangeLog: Use the final approved ChangeLog entry text for the previous commit.Roger Sayle1-3/+3
* ChangeLog: Use the final approved ChangeLog entry text for the previous commit. From-SVN: r110661
2006-02-06trans-stmt.c (gfc_evaluate_where_mask): Allow the NMASK argument to be NULL ↵Roger Sayle2-27/+61
to indicate that the not mask isn't required. * trans-stmt.c (gfc_evaluate_where_mask): Allow the NMASK argument to be NULL to indicate that the not mask isn't required. (gfc_trans_where_2): Remove PMASK argument. Avoid calculating the pending mask for the last clause of a WHERE chain. Update recursive call. (gfc_trans_forall_1): Update call to gfc_trans_where_2. (gfc_trans_where): Likewise. From-SVN: r110659
2006-02-06backport: trans-decl.c (create_function_arglist): Handle dummy functions.Jakub Jelinek6-131/+452
Backport from gomp-20050608-branch * trans-decl.c (create_function_arglist): Handle dummy functions. * trans-decl.c (gfc_get_symbol_decl): Revert explicit setting of TYPE_SIZE_UNIT. (gfc_trans_vla_type_sizes): Also "gimplify" GFC_TYPE_ARRAY_DATAPTR_TYPE for GFC_DESCRIPTOR_TYPE_P types. * trans-array.c (gfc_trans_deferred_array): Call gfc_trans_vla_type_sizes. * trans-decl.c (saved_function_decls, saved_parent_function_decls): Remove unnecessary initialization. (create_function_arglist): Make sure __result has complete type. (gfc_get_fake_result_decl): Change current_fake_result_decl into a tree chain. For entry master, create a separate variable for each result name. For BT_CHARACTER results, call gfc_finish_var_decl on length even if it has been already created, but not pushdecl'ed. (gfc_trans_vla_type_sizes): For function/entry result, adjust result value type, not the FUNCTION_TYPE. (gfc_generate_function_code): Adjust for current_fake_result_decl changes. (gfc_trans_deferred_vars): Likewise. Call gfc_trans_vla_type_sizes even on result if it is assumed-length character. * trans-decl.c (gfc_trans_dummy_character): Add SYM argument. Call gfc_trans_vla_type_sizes. (gfc_trans_auto_character_variable): Call gfc_trans_vla_type_sizes. (gfc_trans_vla_one_sizepos, gfc_trans_vla_type_sizes_1, gfc_trans_vla_type_sizes): New functions. (gfc_trans_deferred_vars): Adjust gfc_trans_dummy_character callers. Call gfc_trans_vla_type_sizes on assumed-length character parameters. * trans-array.c (gfc_trans_array_bounds, gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias): Call gfc_trans_vla_type_sizes. * trans.h (gfc_trans_vla_type_sizes): New prototype. * trans-decl.c (gfc_build_qualified_array): For non-assumed-size arrays without constant size, create also an index var for GFC_TYPE_ARRAY_SIZE (type). If the type is incomplete, complete it as 0..size-1. (gfc_create_string_length): Don't call gfc_defer_symbol_init if just creating DECL_ARGUMENTS. (gfc_get_symbol_decl): Call gfc_finish_var_decl and gfc_defer_symbol_init even if ts.cl->backend_decl is already set to a VAR_DECL that doesn't have DECL_CONTEXT yet. (create_function_arglist): Rework, so that hidden length arguments for CHARACTER parameters are created together with the parameters. Resolve ts.cl->backend_decl for CHARACTER parameters. If the argument is a non-constant length array or CHARACTER, ensure PARM_DECL has different type than its DECL_ARG_TYPE. (generate_local_decl): Call gfc_get_symbol_decl even for non-referenced non-constant length CHARACTER parameters after optionally issuing warnings. * trans-array.c (gfc_trans_array_bounds): Set last stride to GFC_TYPE_ARRAY_SIZE (type) to initialize it as well. (gfc_trans_dummy_array_bias): Initialize GFC_TYPE_ARRAY_SIZE (type) variable as well. * trans-expr.c (gfc_conv_expr_val): Fix comment typo. * trans-stmt.c (gfc_trans_simple_do): Fix comment. From-SVN: r110653
2006-02-05dependency.c (gfc_check_dependency): Remove unused vars and nvars arguments.Roger Sayle6-31/+223
* dependency.c (gfc_check_dependency): Remove unused vars and nvars arguments. Replace with an "identical" argument. A full array reference to the same symbol is a dependency if identical is true. * dependency.h (gfc_check_dependency): Update prototype. * trans-array.h (gfc_check_dependency): Delete duplicate prototype. * trans-stmt.c: #include dependency.h for gfc_check_dependency. (gfc_trans_forall_1): Update calls to gfc_check_dependency. (gfc_trans_where_2): Likewise. Remove unneeded variables. (gfc_trans_where_3): New function for simple non-dependent WHEREs. (gfc_trans_where): Call gfc_trans_where_3 to translate simple F90-style WHERE statements without internal dependencies. * Make-lang.in (trans-stmt.o): Depend upon dependency.h. From-SVN: r110625
2006-02-05re PR fortran/26041 ([4.1]: FORTRAN compiler won't compile the valid code)H.J. Lu2-13/+51
2006-02-05 H.J. Lu <hongjiu.lu@intel.com> PR fortran/26041 PR fortran/26064 * resolve.c (resolve_types): New function. (resolve_codes): Likewise. (gfc_resolve): Use them. From-SVN: r110619
2006-02-05trans-stmt.c (gfc_evaluate_where_mask): Use LOGICAL*1 for WHERE masks ↵Roger Sayle2-4/+13
instead of LOGICAL*4. * trans-stmt.c (gfc_evaluate_where_mask): Use LOGICAL*1 for WHERE masks instead of LOGICAL*4. From-SVN: r110617
2006-02-05* resolve.c (resolve_symbol): Initialize constructor_expr to NULL.Jakub Jelinek2-0/+5
From-SVN: r110611
2006-02-04re PR fortran/25075 ([4.1 only] array size mismatch in DOT_PRODUCT)Thomas Koenig2-12/+96
2006-02-04 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/25075 check.c (identical_dimen_shape): New function. (check_dot_product): Use identical_dimen_shape() to check sizes for dot_product. (gfc_check_matmul): Likewise. (gfc_check_merge): Check conformance between tsource and fsource and between tsource and mask. (gfc_check_pack): Check conformance between array and mask. 2006-02-04 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/25075 intrinsic_argument_conformance_1.f90: New test. From-SVN: r110596
2006-02-03Add the PR fortran number to the previous commit.Steven G. Kargl1-0/+1
From-SVN: r110561
2006-02-03[multiple changes]Steven G. Kargl2-5/+32
2006-02-03 Steven G. Kargl <kargls@comcast.net> Paul Thomas <pault@gcc.gnu.org> * resolve.c (resolve_symbol): Default initialization of derived type component reguires the SAVE attribute. 2006-02-03 Steven G. Kargl <kargls@comcast.net> * gfortran.dg/char_result_11.f90: Add SAVE. * gfortran.dg/der_pointer_4.f90: Ditto. * gfortran.dg/default_initialization.f90: New test. From-SVN: r110554
2006-02-02re PR fortran/24958 (ICE on invalid nullify)Steven G. Kargl2-4/+17
2006-02-02 Steven G. Kargl <kargls@comcast> PR fortran/24958 match.c (gfc_match_nullify): Free the list from head not tail. PR fortran/25072 * match.c (match_forall_header): Fix internal error caused by bogus gfc_epxr pointers. gfortran.dg/nullify_2.f90: New test. From-SVN: r110517
2006-01-31re PR fortran/26039 (ICE with maxval)Thomas Koenig3-2/+32
2006-01-31 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/26039 expr.c (gfc_check_conformance): Reorder error message to avoid plural. check.c(gfc_check_minloc_maxloc): Call gfc_check_conformance for checking arguments array and mask. (check_reduction): Likewise. 2006-01-31 Thomas Koenig <Thomas.Koenig@online.de> PR fortran/26039 maxval_maxloc_conformance_1.f90: New test. From-SVN: r110453
2006-01-31tree-vrp.c: Use XNEW/XCNEW allocation wrappers.Marcin Dalecki1-2/+2
2006-01-31 Marcin Dalecki <martin@dalecki.de> * tree-vrp.c: Use XNEW/XCNEW allocation wrappers. * regrename.c: Ditto. * tree-ssa-loop-im.c: Ditto. * tree-dump.c: Ditto. * tree-complex.c: Ditto. * genrecog.c: Ditto. * tree-ssa-threadupdate.c: Ditto. * tracer.c: Ditto. * java/class.c: Ditto. * java/jcf-parse.c: Ditto. * java/resource.c: Ditto. * java/except.c: Ditto. * java/jvspec.c: Ditto. * java/jcf-write.c: Ditto. * java/jcf-path.c: Ditto. * java/gjavah.c: Ditto. * java/zextract.c: Ditto. * java/jcf-io.c: Ditto. * java/jcf.h: Ditto. * java/buffer.c: Ditto. * java/lang.c: Ditto. * java/parse-scan.y: Ditto. * java/lex.c: Ditto. * java/lex.h: Ditto. * cfgloopmanip.c: Ditto. * postreload-gcse.c: Ditto. * tree-ssa-loop-manip.c: Ditto. * postreload.c: Ditto. * tree-ssa-loop-ch.c: Ditto. * loop.c: Ditto. * ipa-cp.c: Ditto. * cppspec.c: Ditto. * diagnostic.c: Ditto. * final.c: Ditto. * genoutput.c: Ditto. * gcc.c: Ditto. * cfghooks.c: Ditto. * cfgloopanal.c: Ditto. * objc/objc-act.c: Ditto. * gcov.c: Ditto. * genextract.c: Ditto. * genautomata.c: Ditto. * pretty-print.c: Ditto. * genemit.c: Ditto. * cgraphunit.c: Ditto. * flow.c: Ditto. * df-scan.c: Ditto. * haifa-sched.c: Ditto. * dominance.c: Ditto. * dbxout.c: Ditto. * tree-ssa-loop-ivopts.c: Ditto. * df-core.c: Ditto. * mode-switching.c: Ditto. * modulo-sched.c: Ditto. * graph.c: Ditto. * ipa-pure-const.c: Ditto. * cse.c: Ditto. * fix-header.c: Ditto. * web.c: Ditto. * tree-stdarg.c: Ditto. * ipa-utils.c: Ditto. * loop-init.c: Ditto. * ipa-inline.c: Ditto. * cfganal.c: Ditto. * global.c: Ditto. * alloc-pool.c: Ditto. * dwarf2out.c: Ditto. * opts.c: Ditto. * genattrtab.c: Ditto. * tree-ssa-loop-ivcanon.c: Ditto. * predict.c: Ditto. * timevar.c: Ditto. * lcm.c: Ditto. * fortran/gfortranspec.c: Ditto. * regmove.c: Ditto. * local-alloc.c: Ditto. * langhooks.c: Ditto. * function.c: Ditto. * tree-vectorizer.c: Ditto. * gcse.c: Ditto. * ipa-type-escape.c: Ditto. * alias.c: Ditto. * tree-if-conv.c: Ditto. * profile.c: Ditto. * ipa.c: Ditto. * tree-data-ref.c: Ditto. * loop-unroll.c: Ditto. * treelang/treetree.c: Ditto. * calls.c: Ditto. * bt-load.c: Ditto. * ggc-common.c: Ditto. * except.c: Ditto. * coverage.c: Ditto. * cselib.c: Ditto. * tree-cfgcleanup.c: Ditto. * tree-ssa-pre.c: Ditto. * cfgcleanup.c: Ditto. * loop-invariant.c: Ditto. * loop-iv.c: Ditto. * ipa-prop.c: Ditto. * print-tree.c: Ditto. * conflict.c: Ditto. * ggc-page.c: Ditto. * sched-deps.c: Ditto. * regclass.c: Ditto. * tree-object-size.c: Ditto. * combine.c: Ditto. * bb-reorder.c: Ditto. * resource.c: Ditto. * var-tracking.c: Ditto. * cfgloop.c: Ditto. * df-problems.c: Ditto. * reg-stack.c: Ditto. * tlink.c: Ditto. * gccspec.c: Ditto. * sched-rgn.c: Ditto. * tree-ssa-structalias.c: Ditto. * tree-ssa-reassoc.c: Ditto. * config/darwin-c.c: Ditto. * config/darwin.c: Ditto. * config/arm/arm.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * reload1.c: Ditto. From-SVN: r110446
2006-01-30re PR fortran/24266 (ICE when writing to array of strings that is an ↵Erik Edelmann2-1/+7
elements of a user defined type) fortran/ 2005-01-30 Erik Edelmann <eedelman@gcc.gnu.org> PR fortran/24266 * trans-io.c (set_internal_unit): Check the rank of the expression node itself instead of its symbol. testsuite/ 2005-01-30 Erik Edelmann <eedelman@gcc.gnu.org> PR fortran/24266 * gfortran.dg/arrayio_derived_2.f90: New. From-SVN: r110412
2006-01-29re PR fortran/18578 (intent(inout) violation is not detected)Paul Thomas2-0/+19
2006-01-29 Paul Thomas <pault@gcc.gnu.org> PR fortran/18578 PR fortran/18579 PR fortran/20857 PR fortran/20885 * interface.c (compare_actual_formal): Error for INTENT(OUT or INOUT) if actual argument is not a variable. 2006-01-29 Paul Thomas <pault@gcc.gnu.org> PR fortran/18578 PR fortran/18579 PR fortran/20857 PR fortran/20885 * gfortran.dg/intent_out_1.f90: New test. From-SVN: r110376
2006-01-29[multiple changes]Paul Thomas4-1/+44
2006-01-28 Paul Thomas <pault@gcc.gnu.org> PR fortran/17911 * expr.c (gfc_check_assign, gfc_check_pointer_assign): Emit error if the lvalue is a use associated procedure. PR fortran/20895 PR fortran/25030 * expr.c (gfc_check_pointer_assign): Emit error if lvalue and rvalue character lengths are not the same. Use gfc_dep_compare_expr for the comparison. * gfortran.h: Add prototype for gfc_dep_compare_expr. * dependency.h: Remove prototype for gfc_dep_compare_expr. 2006-01-29 Paul Thomas <pault@gcc.gnu.org> PR fortran/17911 * gfortran.dg/procedure_lvalue.f90: New test. PR fortran/20895 PR fortran/25030 * gfortran.dg/char_pointer_assign_2.f90: New test. * gfortran.dg/char_result_1.f90: Correct unequal charlen pointer assignment to be consistent with standard. * gfortran.dg/char_result_2.f90: The same. * gfortran.dg/char_result_8.f90: The same. From-SVN: r110365
2006-01-27re PR fortran/25964 (NIST regression on fm311.f)Paul Thomas2-0/+7
2005-01-27 Paul Thomas <pault@gcc.gnu.org> PR fortran/25964 * resolve.c (resolve_function): Add GFC_ISYM_LOC to the list of generic_ids exempted from assumed size checking. 2005-01-27 Paul Thomas <pault@gcc.gnu.org> PR fortran/25964 * gfortran.dg/assumed_size_refs_3.f90: New test. From-SVN: r110307
2006-01-27re PR fortran/25324 (Wrong DW_TAG_compile_unit generated when compiling ↵Jakub Jelinek7-14/+220
preprocessed fortran code) PR fortran/25324 * Make-lang.in (fortran/scanner.o): Depend on toplev.h. * lang.opt (fpreprocessed): New option. * scanner.c: Include toplev.h. (gfc_src_file, gfc_src_preprocessor_lines): New variables. (preprocessor_line): Unescape filename if there were any backslashes. (load_file): If initial and gfc_src_file is not NULL, use it rather than opening the file. If gfc_src_preprocessor_lines has non-NULL elements, pass it to preprocessor_line. (unescape_filename, gfc_read_orig_filename): New functions. * gfortran.h (gfc_option_t): Add flag_preprocessed. (gfc_read_orig_filename): New prototype. * options.c (gfc_init_options): Clear flag_preprocessed. (gfc_post_options): If flag_preprocessed, call gfc_read_orig_filename. (gfc_handle_option): Handle OPT_fpreprocessed. * lang-specs.h: Pass -fpreprocessed to f951 if preprocessing sources. From-SVN: r110304
2006-01-27symbol.c (free_old_symbol): Fix confusing comment, and add code to free ↵Erik Edelmann2-2/+13
old_symbol->formal. fortran/ 2005-01-27 Erik Edelmann <eedelman@gcc.gnu.org> * symbol.c (free_old_symbol): Fix confusing comment, and add code to free old_symbol->formal. From-SVN: r110301
2006-01-26re PR fortran/25964 (NIST regression on fm311.f)Paul Thomas3-20/+134
2005-01-26 Paul Thomas <pault@gcc.gnu.org> PR fortran/25964 * resolve.c (resolve_function): Exclude statement functions from global reference checking. PR fortran/25084 PR fortran/20852 PR fortran/25085 PR fortran/25086 * resolve.c (resolve_function): Declare a gfc_symbol to replace the references through the symtree to the symbol associated with the function expresion. Give error on reference to an assumed character length function is defined in an interface or an external function that is not a dummy argument. (resolve_symbol): Give error if an assumed character length function is array-valued, pointer-valued, pure or recursive. Emit warning that character(*) value functions are obsolescent in F95. PR fortran/25416 * trans-expr.c (gfc_conv_function_call): The above patch to resolve.c prevents any assumed character length function call from getting here except intrinsics such as SPREAD. In this case, ensure that no segfault occurs from referencing non-existent charlen->length-> expr_type and provide a backend_decl for the charlen from the charlen of the first actual argument. Cure temp name confusion. * trans-expr.c (gfc_get_interface_mapping_array): Change name of temporary from "parm" to "ifm" to avoid clash with temp coming from trans-array.c. 2005-01-26 Paul Thomas <pault@gcc.gnu.org> PR fortran/25964 * gfortran.dg/global_references_2.f90: New test. PR fortran/25084 PR fortran/20852 PR fortran/25085 PR fortran/25086 * gfortran.dg/assumed_charlen_function_1.f90: New test. * gfortran.dg/assumed_charlen_function_3.f90: New test. PR fortran/25416 * gfortran.dg/assumed_charlen_function_2.f90: New test. From-SVN: r110269
2006-01-26Fix previous ChangeLog entry from r109914Tobias Schlüter1-0/+3
From-SVN: r110233
2006-01-25re PR fortran/25716 (FAIL: gfortran.dg/char_result_11.f90 -O (test for ↵Erik Edelmann5-17/+84
excess errors)) fortran/ 2005-01-25 Erik Edelmann <eedelman@gcc.gnu.org> PR fortran/25716 * symbol.c (free_old_symbol): New function. (gfc_commit_symbols): Use it. (gfc_commit_symbol): New function. (gfc_use_derived): Use it. * gfortran.h: Add prototype for gfc_commit_symbol. * intrinsic.c (gfc_find_function): Search in 'conversion' if not found in 'functions'. (gfc_convert_type_warn): Add a symtree to the new expression node, and commit the new symtree->n.sym. * resolve.c (gfc_resolve_index): Make sure typespec is properly initialized. testsuite/ 2005-01-25 Erik Edelmann <eedelman@gcc.gnu.org> PR fortran/25716 * gfortran.dg/char_result_11.f90: Make it sensitive to PR 25716 on 32-bit systems too. From-SVN: r110225
2006-01-23re PR fortran/25901 (overloaded function is rejected)Paul Thomas4-6/+26
2005-01-23 Paul Thomas <pault@gcc.gnu.org> PR fortran/25901 * decl.c (get_proc_name): Replace subroutine and function attributes in "already defined" test by the formal arglist pointer being non-NULL. Fix regression in testing of admissability of attributes. * symbol.c (gfc_add_attribute): If the current_attr has non-zero intent, do not do the check for a dummy being used. * decl.c (attr_decl1): Add current_attr.intent as the third argument in the call to gfc_add_attribute. * gfortran.h: Add the third argument to the prototype for gfc_add_attribute. 2005-01-23 Paul Thomas <pault@gcc.gnu.org> PR fortran/25901 * gfortran.dg/internal references_2.f90: New test. Fix regression in testing of admissability of attributes. * gfortran.dg/intent_used_1.f90: New test. From-SVN: r110106
2006-01-21gcov.c (print_version), [...]): Update copyright notice dates.Joseph Myers2-1/+6
* gcov.c (print_version), gcov-dump.c (print_version), mips-tdump.c (main), mips-tfile.c (main): Update copyright notice dates. fortran: * gfortranspec.c (lang_specific_driver): Update copyright notice date. java: * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version): Update copyright notice dates. treelang: * spec.c (lang_specific_driver): Update copyright notice date. From-SVN: r110069
2006-01-21PR25024, PR20881, PR23308, PR25538 and PR25710 - Procedure referencesPaul Thomas7-22/+424
2005-01-21 Paul Thomas <pault@gcc.gnu.org> PR fortran/25124 PR fortran/25625 * decl.c (get_proc_name): If there is an existing symbol in the encompassing namespace, call errors if it is a procedure of the same name or the kind field is set, indicating a type declaration. PR fortran/20881 PR fortran/23308 PR fortran/25538 PR fortran/25710 * decl.c (add_global_entry): New function to check for existing global symbol with this name and to create new one if none exists. (gfc_match_entry): Call add_global_entry before matching argument lists for subroutine and function entries. * gfortran.h: Prototype for existing function, global_used. * resolve.c (resolve_global_procedure): New function to check global symbols for procedures. (resolve_call, resolve_function): Calls to this new function for non-contained and non-module procedures. * match.c (match_common): Add check for existing global symbol, creat one if none exists and emit error if there is a clash. * parse.c (global_used): Remove static and use the gsymbol name rather than the new_block name, so that the function can be called from resolve.c. (parse_block_data, parse_module, add_global_procedure): Improve checks for existing gsymbols. Emit error if already defined or if references were to another type. Set defined flag. PR fortran/PR24276 * trans-expr.c (gfc_conv_aliased_arg): New function called by gfc_conv_function_call that coverts an expression for an aliased component reference to a derived type array into a temporary array of the same type as the component. The temporary is passed as an actual argument for the procedure call and is copied back to the derived type after the call. (is_aliased_array): New function that detects an array reference that is followed by a component reference. (gfc_conv_function_call): Detect an aliased actual argument with is_aliased_array and convert it to a temporary and back again using gfc_conv_aliased_arg. 2005-01-21 Paul Thomas <pault@gcc.gnu.org> PR fortran/25124 PR fortran/25625 * gfortran.dg/internal_references_1.f90: New test. PR fortran/20881 PR fortran/23308 PR fortran/25538 PR fortran/25710 * gfortran.dg/global_references_1.f90: New test. * gfortran.dg/g77/19990905-1.f: Restore the error that there is a clash between the common block name and the name of a subroutine reference. PR fortran/PR24276 * gfortran.dg/aliasing_dummy_1.f90: New test. From-SVN: r110063
2006-01-19gfortranspec.c: Update copyright years.Tobias Schlüter9-9/+25
* gfortranspec.c: Update copyright years. * trans.c: Likewise. * trans-array.c: Likewise. * trans-array.h: Likewise. * trans-decl.c: Likewise. * trans-stmt.c: Likewise. * trans-stmt.h: Likewise. * trans-types.c: Likewise. From-SVN: r109951
2006-01-18Fix name butchered in my previous check-in.Tobias Schlüter1-1/+1
From-SVN: r109917
2006-01-18re PR fortran/18540 (Jumping into blocks gives error rather than warning)Tobias Schlüter8-87/+110
PR fortran/18540 PR fortran/18937 * gfortran.h (BBT_HEADER): Move definition up. (gfc_st_label): Add BBT_HEADER, remove 'prev' and 'next'. * io.c (format_asterisk): Adapt initializer. * resolve.c (resolve_branch): Allow FORTRAN 66 cross-block GOTOs as extension. * symbol.c (compare_st_labels): New function. (gfc_free_st_label, free_st_labels, gfc_get_st_label): Convert to using balanced binary tree. * decl.c (match_char_length, gfc_match_old_kind_spec): Do away with 'cnt'. (warn_unused_label): Adapt to binary tree. * match.c (gfc_match_small_literal_int): Only set cnt if non-NULL. * primary.c (match_kind_param): Do away with cnt. Also converted the ChangeLog to use latin1 characters. From-SVN: r109914
2006-01-18re PR fortran/20869 (EXTERNAL and INTRINSIC cannot be used together)Paul Thomas5-12/+63
2006-01-18 Paul Thomas <pault@gcc.gnu.org> PR fortran/20869 PR fortran/20875 PR fortran/25024 * symbol.c (check_conflict): Add pointer valued elemental functions and internal procedures with the external attribute to the list of conflicts. (gfc_add_attribute): New catch-all function to perform the checking of symbol attributes for attribute declaration statements. * decl.c (attr_decl1): Call gfc_add_attribute for each of - (gfc_match_external, gfc_match_intent, gfc_match_intrinsic, gfc_match_pointer, gfc_match_dimension, gfc_match_target): Remove spurious calls to checks in symbol.c. Set the attribute directly and use the call to attr_decl() for checking. * gfortran.h: Add prototype for gfc_add_attribute. PR fortran/25785 * resolve.c (resolve_function): Exclude PRESENT from assumed size argument checking. Replace strcmp's with comparisons with generic codes. 2006-01-18 Paul Thomas <pault@gcc.gnu.org> Steven G. Kargl <kargls@comcast.net> PR fortran/20869 * gfortran.dg/intrinsic_external_1.f90: New test. PR fortran/20875. * gfortran.dg/elemental_pointer_1.f90: New test. PR fortran/25024 * gfortran.dg/external_procedures_1.f90: New test. PR fortran/25785 gfortran.dg/assumed_present.f90: New test. Co-Authored-By: Steven G. Kargl <kargls@comcast.net> From-SVN: r109899
2006-01-17Fix up recent entries by espindola.Ben Elliston1-2/+2
From-SVN: r109804
2006-01-16jvspec.c (lang_specific_spec_functions): removeRafael Espindola2-2/+4
* gcc/java/jvspec.c (lang_specific_spec_functions): remove * gcc/cppspec.c (lang_specific_spec_functions): remove * gcc/gcc.c (lookup_spec_function): use static_spec_functions directelly * gcc/gcc.h (lang_specific_spec_functions): remove * gcc/gccspec.c (lang_specific_spec_functions): remove * gcc/cp/g++spec.c (lang_specific_spec_functions): remove * gcc/fortran/gfortranspec.c (lang_specific_spec_functions): remove * gcc/treelang/spec.c (lang_specific_spec_functions): remove From-SVN: r109761
2006-01-16trans-stmt.c (gfc_trans_if_1): Use fold_buildN and build_int_cst.Richard Guenther3-32/+52
2006-01-16 Richard Guenther <rguenther@suse.de> * trans-stmt.c (gfc_trans_if_1): Use fold_buildN and build_int_cst. (gfc_trans_arithmetic_if): Likewise. (gfc_trans_simple_do): Likewise. (gfc_trans_do): Likewise. (gfc_trans_do_while): Likewise. (gfc_trans_logical_select): Likewise. (gfc_trans_forall_loop): Likewise. (generate_loop_for_temp_to_lhs): Likewise. (generate_loop_for_rhs_to_temp): Likewise. (gfc_trans_allocate): Likewise. * trans.c (gfc_add_expr_to_block): Do not fold expr again. From-SVN: r109756
2006-01-16trans-expr.c (gfc_conv_function_call): Use fold_build2.Richard Guenther4-4/+11
2006-01-16 Richard Guenther <rguenther@suse.de> * trans-expr.c (gfc_conv_function_call): Use fold_build2. * trans-stmt.c (gfc_trans_goto): Likewise. Use build_int_cst. * trans.c (gfc_trans_runtime_check): Don't fold the condition again. From-SVN: r109745
2006-01-13[multiple changes]Steven G. Kargl2-9/+20
2006-01-13 Steven G. Kargl <kargls@comcast.net> PR fortran/25756 * symbol.c (gfc_free_st_label): Give variable meaningful name. Remove unneeded parenthesis. Fix-up the head of the list (2 lines gleaned from g95). 2006-01-13 Bernhard Fischer <rep.nop@aon.at> PR fortran/25756 * gfortran.dg/label_3.f90: New test. From-SVN: r109674
2006-01-13trans.c (gfc_add_expr_to_block): Do not fold tcc_statement nodes.Diego Novillo2-1/+7
* trans.c (gfc_add_expr_to_block): Do not fold tcc_statement nodes. From-SVN: r109665
2006-01-11* parse.c (next_fixed): Remove superfluous string concatenation.Tobias Schlüter2-1/+5
From-SVN: r109599
2006-01-11re PR fortran/25486 (fortran fixed-form literal character constant not padded.)Bernhard Fischer2-3/+11
gcc/fortran: 2006-01-11 Bernhard Fischer <rep.nop@aon.at> PR fortran/25486 * scanner.c (load_line): use maxlen to determine the line-length used for padding lines in fixed form. gcc/testsuite: 2006-01-10 Bernhard Fischer <rep.nop@aon.at> PR fortran/25486 * gfortran.dg/literal_character_constant_1_x.F: New test. * gfortran.dg/literal_character_constant_1_y.F: Ditto. * gfortran.dg/literal_character_constant_1_z.F: Ditto. * gfortran.dg/literal_character_constant_1.inc: Helper for new tests. From-SVN: r109591
2006-01-11[multiple changes]Paul Thomas2-1/+11
2005-01-11 Paul Thomas <pault@gcc.gnu.org> PR fortran/25730 * trans-types.c (copy_dt_decls_ifequal): Copy backend decl for character lengths. 2006-01-11 Paul Thomas <pault@gcc.gnu.org> PR fortran/25730 * gfortran.dg/used_types_1.f90: New test. From-SVN: r109573
2006-01-09trans-stmt.c (gfc_trans_pointer_assign_need_temp): Use fold_convert to avoid ↵Andrew Pinski2-1/+8
type mismatch. 2006-01-09 Andrew Pinski <pinskia@physics.uc.edu> fortran/24936 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Use fold_convert to avoid type mismatch. 2006-01-09 Andrew Pinski <pinskia@physics.uc.edu> fortran/24936 * gfortran.dg/forall_3.f90: New test. From-SVN: r109508
2006-01-09re PR fortran/21977 (nested function returning array)Andrew Pinski2-4/+9
2006-01-09 Andrew Pinski <pinskia@physics.uc.edu> PR fortran/21977 * gfortran.dg/nesting_2.f90: New test. * gfortran.dg/nesting_3.f90: New test. 2006-01-09 Andrew Pinski <pinskia@physics.uc.edu> PR fortran/21977 * trans-decl.c (gfc_generate_function_code): Move the NULLing of current_fake_result_decl down to below generate_local_vars. From-SVN: r109503
2006-01-09Add 2006 copyright year.Feng Wang4-5/+5
From-SVN: r109490
2006-01-09fortran ChangeLog entry:Feng Wang4-15/+94
2006-01-09 Feng Wang <fengwang@nudt.edu.cn> PR fortran/12456 * trans-expr.c (gfc_to_single_character): New function that converts string to single character if its length is 1. (gfc_build_compare_string):New function that compare string and handle single character specially. (gfc_conv_expr_op): Use gfc_build_compare_string. (gfc_trans_string_copy): Use gfc_to_single_character. * trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Use gfc_build_compare_string. * trans.h (gfc_build_compare_string): Add prototype. testsuite ChangeLog entry: 2006-01-09 Feng Wang <fengwang@nudt.edu.cn> PR fortran/12456 * gfortran.dg/single_char_string.f90: New test. From-SVN: r109489
2006-01-09simplify.c (gfc_simplify_char): Use UCHAR_MAX instead of literal constant.Feng Wang2-3/+10
fortran/ 2006-01-09 Feng Wang <fengwang@nudt.edu.cn> * simplify.c (gfc_simplify_char): Use UCHAR_MAX instead of literal constant. (gfc_simplify_ichar): Get the result from unsinged char and in the range 0 to UCHAR_MAX instead of CHAR_MIN to CHAR_MAX. Testsuite ChangeLog entry: 2006-01-09 Feng Wang <fengwang@nudt.edu.cn> * gfortran.dg/intrinsic_i_char.f90: New test. From-SVN: r109488