aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/intrinsic.texi
AgeCommit message (Collapse)AuthorFilesLines
2010-05-19re PR fortran/34505 (FLOAT/SNGL: Not accepted as actual argument; ↵Daniel Franke1-122/+9
diagnostics problems) gcc/fortran/: 2010-05-19 Daniel Franke <franke.daniel@gmail.com> PR fortran/34505 * intrinsic.h (gfc_check_float): New prototype. (gfc_check_sngl): New prototype. * check.c (gfc_check_float): New. (gfc_check_sngl): New. * intrinsic.c (add_functions): Moved DFLOAT from aliasing DBLE to be a specific for REAL. Added check routines for FLOAT, DFLOAT and SNGL. * intrinsic.texi: Removed individual nodes of FLOAT, DFLOAT and SNGL, added them to the list of specifics of REAL instead. gcc/testsuite/: 2010-05-19 Daniel Franke <franke.daniel@gmail.com> PR fortran/34505 * gfortran.dg/dfloat_1.f90: Add warnings for non-default kind arguments; add check for return value kind. * gfortran.dg/float_1.f90: Likewise. From-SVN: r159558
2010-04-14intrinsic.texi: Add the missing specific name of intrinsic procedure where ↵Steven G. Kargl1-60/+147
the specific name is... 2010-04-14 Steven G. Kargl <kargl@gcc.gnu.org> * fortran/intrinsic.texi: Add the missing specific name of intrinsic procedure where the specific name is identical to the generic name. Fix inconsistent or mismatch in the argument names in intrinsic procedure descriptions. Add the SCALAR allocatable description to ALLOCATED. From-SVN: r158352
2010-04-14re PR fortran/18918 (Eventually support Fortran 2008's coarrays [co-arrays])Tobias Burnus1-3/+187
2010-04-14 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * array.c (gfc_find_array_ref): Handle codimensions. (gfc_match_array_spec,gfc_match_array_ref): Use gfc_fatal_error. * check.c (is_coarray, dim_corank_check, gfc_check_lcobound, gfc_check_image_index, gfc_check_this_image, gfc_check_ucobound): New functions. * gfortran.h (gfc_isym_id): Add GFC_ISYM_IMAGE_INDEX, GFC_ISYM_LCOBOUND, GFC_ISYM_THIS_IMAGE, GFC_ISYM_UCOBOUND. * intrinsic.h (add_functions): Add this_image, image_index, lcobound and ucobound intrinsics. * intrinsic.c (gfc_check_lcobound,gfc_check_ucobound, gfc_check_image_index, gfc_check_this_image, gfc_simplify_image_index, gfc_simplify_lcobound, gfc_simplify_this_image, gfc_simplify_ucobound): New function prototypes. * intrinsic.texi (IMAGE_INDEX, LCOBOUND, THIS_IMAGE IMAGE_INDEX): Document new intrinsic functions. * match.c (gfc_match_critical, sync_statement): Make * -fcoarray=none error fatal. * simplify.c (simplify_bound_dim): Handle coarrays. (simplify_bound): Update simplify_bound_dim call. (gfc_simplify_num_images): Add -fcoarray=none check. (simplify_cobound, gfc_simplify_lcobound, gfc_simplify_ucobound, gfc_simplify_ucobound, gfc_simplify_ucobound): New functions. 2010-04-14 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * gfortran.dg/coarray_9.f90: Update dg-errors. * gfortran.dg/coarray_10.f90: New test. * gfortran.dg/coarray_11.f90: New test. From-SVN: r158292
2010-04-06re PR fortran/18918 (Eventually support Fortran 2008's coarrays [co-arrays])Tobias Burnus1-6/+37
2010-04-06 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * iso-fortran-env.def: Add the integer parameters * atomic_int_kind, atomic_logical_kind, iostat_inquire_internal_unit, stat_locked, stat_locked_other_image, stat_stopped_image and stat_unlocked of Fortran 2008. * intrinsic.texi (iso_fortran_env): Ditto. * libgfortran.h (libgfortran_stat_codes): New enum. * module.c (use_iso_fortran_env_module): Honour -std= when * loading constants from the intrinsic module. 2010-04-06 Tobias Burnus <burnus@net-b.de> PR fortran/18918 * gfortran.dg/iso_fortran_env_5.f90: New test. * gfortran.dg/iso_fortran_env_6.f90: New test. From-SVN: r158011
2010-04-06re PR fortran/39997 (Procedure(), pointer & implicit typing: rejects-valid ↵Tobias Burnus1-0/+44
/ accepts-invalid?) 2010-04-06 Tobias Burnus <burnus@net-b.de> PR fortran/39997 * intrinsic.c (add_functions): Add num_images. * decl.c (gfc_match_end): Handle END CRITICAL. * intrinsic.h (gfc_simplify_num_images): Add prototype. * dump-parse-tree.c (show_code_node): Dump CRITICAL, ERROR STOP, and SYNC. * gfortran.h (gfc_statement): Add enum items for those. (gfc_exec_op) Ditto. (gfc_isym_id): Add num_images. * trans-stmt.c (gfc_trans_stop): Handle ERROR STOP. (gfc_trans_sync,gfc_trans_critical): New functions. * trans-stmt.h (gfc_trans_stop,gfc_trans_sync, gfc_trans_critical): Add/update prototypes. * trans.c (gfc_trans_code): Handle CRITICAL, ERROR STOP, and SYNC statements. * trans.h (gfor_fndecl_error_stop_string) Add variable. * resolve.c (resolve_sync): Add function. (gfc_resolve_blocks): Handle CRITICAL. (resolve_code): Handle CRITICAL, ERROR STOP, (resolve_branch): Add CRITICAL constraint check. and SYNC statements. * st.c (gfc_free_statement): Add new statements. * trans-decl.c (gfor_fndecl_error_stop_string): Global variable. (gfc_build_builtin_function_decls): Initialize it. * match.c (gfc_match_if): Handle ERROR STOP and SYNC. (gfc_match_critical, gfc_match_error_stop, sync_statement, gfc_match_sync_all, gfc_match_sync_images, gfc_match_sync_memory): New functions. (match_exit_cycle): Handle CRITICAL constraint. (gfc_match_stopcode): Handle ERROR STOP. * match.h (gfc_match_critical, gfc_match_error_stop, gfc_match_sync_all, gfc_match_sync_images, gfc_match_sync_memory): Add prototype. * parse.c (decode_statement, gfc_ascii_statement, parse_executable): Handle new statements. (parse_critical_block): New function. * parse.h (gfc_compile_state): Add COMP_CRITICAL. * intrinsic.texi (num_images): Document new function. * simplify.c (gfc_simplify_num_images): Add function. 2010-04-06 Tobias Burnus <burnus@net-b.de> PR fortran/39997 * gfortran.dg/coarray_1.f90: New test. * gfortran.dg/coarray_2.f90: New test. * gfortran.dg/coarray_3.f90: New test. 2010-04-06 Tobias Burnus <burnus@net-b.de> PR fortran/39997 * runtime/stop.c (error_stop_string): New function. * gfortran.map (_gfortran_error_stop_string): Add. From-SVN: r158008
2010-04-01ioparm.def: Update copyright.Paul Thomas1-1/+1
2010-04-01 Paul Thomas <pault@gcc.gnu.org> * ioparm.def : Update copyright. * lang.opt : ditto * trans-array.c : ditto * trans-array.h : ditto * expr.c: ditto * trans-types.c: ditto * dependency.c : ditto * gfortran.h : ditto * options.c : ditto * trans-io.c : ditto * trans-intrinsic.c : ditto * libgfortran.h : ditto * invoke.texi : ditto * intrinsic.texi : ditto * trans.c : ditto * trans.h : ditto * intrinsic.c : ditto * interface.c : ditto * iresolve.c : ditto * trans-stmt.c : ditto * trans-stmt.h : ditto * parse,c : ditto * match.h : ditto * error.c : ditto From-SVN: r157923
2010-02-09re PR fortran/41507 (Documentation misleading on MAXLOC/MINLOC array type ↵Daniel Kraft1-8/+8
requirement) 2010-02-09 Daniel Kraft <d@domob.eu> PR fortran/41507 * intrinsic.texi (MAXVAL): Remove wrong claim that array argument can be CHARACTER type. (MINVAL), (MAXLOC), (MINLOC): Ditto. From-SVN: r156618
2010-01-04re PR fortran/41872 (wrong-code: Issues with allocatable scalars)Tobias Burnus1-2/+2
2009-01-04 Tobias Burnus <burnus@net-b.de> PR fortran/41872 * trans-expr.c (gfc_conv_procedure_call): Add indirect ref for functions returning allocatable scalars. * trans-stmt.c (gfc_trans_allocate): Emmit error when reallocating an allocatable scalar. * trans.c (gfc_allocate_with_status): Fix pseudocode syntax in comment. * trans-decl.c (gfc_trans_deferred_vars): Nullify local allocatable scalars. (gfc_generate_function_code): Nullify result variable for allocatable scalars. PR fortran/40849 * module.c (gfc_use_module): Fix warning string to allow for translation. PR fortran/42517 * invoke.texi (-fcheck=recursion): Mention that the checking is also disabled for -frecursive. * trans-decl.c (gfc_generate_function_code): Disable -fcheck=recursion when -frecursive is used. * intrinsic.texi (iso_c_binding): Improve wording. 2009-01-04 Tobias Burnus <burnus@net-b.de> PR fortran/41872 * gfortran.dg/allocatable_scalar_5.f90: New test. * gfortran.dg/allocatable_scalar_6.f90: New test. From-SVN: r155606
2009-12-06re PR fortran/40904 (Documentation: Description for COUNT is wrong)Daniel Franke1-7/+9
2009-12-06 Daniel Franke <franke.daniel@gmail.com> PR fortran/40904 * intrinsics.texi: Fixed description of COUNT. From-SVN: r155022
2009-11-20intrinsic.texi (C_F_PROCPOINTER): Remove obsolete comment.Janus Weil1-3/+0
2009-11-20 Janus Weil <janus@gcc.gnu.org> * intrinsic.texi (C_F_PROCPOINTER): Remove obsolete comment. From-SVN: r154370
2009-11-12intrinsic.texi (XOR): Refer also to .NEQV.Tobias Burnus1-2/+4
2009-11-12 Tobias Burnus <burnus@net-b.de> * intrinsic.texi (XOR): Refer also to .NEQV. (ISO_FORTRAN_ENV): State which parameters are F2008. From-SVN: r154117
2009-10-15intrinsic.texi: Explicitly state that ETIME and DTIME take REAL(4) arguments.Steven G. Kargl1-7/+7
2009-10-15 Steven G. Kargl <kargl@gcc.gnu.org> * intrinsic.texi: Explicitly state that ETIME and DTIME take REAL(4) arguments. Fix nearby typographically errors where /leq was used instead of \leq. From-SVN: r152854
2009-07-26re PR fortran/33197 (Fortran 2008: math functions)Tobias Burnus1-5/+13
2009-07-26 Tobias Burnus <burnus@net-b.de> PR fortran/33197 * intrinsic.c (make_generic): Remove assert as "atan" can be both ISYM_ATAN and ISYM_ATAN2. (add_functions): Add two-argument variant of ATAN. * intrinsic.h (gfc_check_atan_2): Add check for it. * intrinsic.texi (ATAN2): Correct and enhance description. (ATAN): Describe two-argument variant of ATAN. 2009-07-26 Tobias Burnus <burnus@net-b.de> PR fortran/33197 * gfortran.dg/atan2_1.f90: New test * gfortran.dg/atan2_2.f90: New test From-SVN: r150100
2009-07-25re PR fortran/33197 (Fortran 2008: math functions)Tobias Burnus1-22/+29
2009-07-25 Tobias Burnus <burnus@net-b.de> Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR fortran/33197 * intrinsic.c (add_functions): Support complex arguments for acos,acosh,asin,asinh,atan,atanh. * invoke.texi (ACOS,ACOSH,ASIN,ASINH,ATAN,ATANH): Support complex arguments. * simplify.c (gfc_simplify_acos,gfc_simplify_acosh, gfc_simplify_asin,gfc_simplify_asinh,gfc_simplify_atan, gfc_simplify_atanh,gfc_simplify_atan,gfc_simplify_asinh, gfc_simplify_acosh,gfc_simplify_atanh): Support complex arguments. 2009-07-25 Tobias Burnus <burnus@net-b.de> PR fortran/33197 * intrinsics/c99_functions.c (cacosf,cacos,cacosl,casinf, casin,casind,catanf,catan,catanl,cacoshf,cacosh,cacoshl, casinhf,casinh,casinhf,catanhf,catanh,catanhl): New functions. * c99_protos.h: Add prototypes for those. 2009-07-25 Tobias Burnus <burnus@net-b.de> PR fortran/33197 * gfortran.dg/complex_intrinsic_5.f90: New test. * gfortran.dg/complex_intrinsic_7.f90: New test. Co-Authored-By: Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> From-SVN: r150087
2009-07-11re PR fortran/33197 (Fortran 2008: math functions)Tobias Burnus1-16/+17
2009-07-09 Tobias Burnus <burnus@net-b.de> PR fortran/33197 * check.c (gfc_check_fn_rc2008): New function. * intrinsic.h (gfc_check_fn_rc2008): New prototype. * intrinsic.c (add_functions): Add complex tan, cosh, sinh, and tanh. 2009-07-09 Tobias Burnus <burnus@net-b.de> PR fortran/33197 * gfortran.dg/complex_intrinsic_3.f90: New test. * gfortran.dg/complex_intrinsic_4.f90: New test. From-SVN: r149503
2009-06-09trans-decl.c (gfc_generate_function_code): UseTobias Burnus1-0/+12
2009-06-09 Tobias Burnus <burnus@net-b.de> * trans-decl.c (gfc_generate_function_code): Use * gfc_option.rtcheck instead of flag_bounds_check. * intrinsic.texi (ISO_FORTRAN_ENV): Document INT{8,16,32,64} and REAL{32,64,128}. From-SVN: r148317
2009-06-03gfortran.texi: Add mixed-language programming...Tobias Burnus1-16/+18
2009-06-03 Tobias Burnus <burnus@net-b.de> * gfortran.texi: Add mixed-language programming, mention varying string lengths, some clean up of introduction parts. * intrinsic.texi (instrinsic modules): Create @menu for * subsections. (ISO_C_BINDING): Support ISOCBINDING_INT_FAST128_T. * libgfortran.h: Comment to rember to keep gfortran.texi in * sync. * iso-c-binding.def: Support ISOCBINDING_INT_FAST128_T. From-SVN: r148147
2009-05-17re PR fortran/36260 (Audit intrinsic.texi and check whether keyword= names ↵Francois-Xavier Coudert1-123/+143
match) PR fortran/36260 * intrinsic.c (add_functions, add_subroutines): Fix argument names and wrap long lines. * intrinsic.texi: Fix documentation and argument names of LOG_GAMMA, DATAN2, DBESJN, DTIME, ETIME, FSTAT, STAT, LSTAT, GET_COMMAND, IDATE, LTIME, MOVE_ALLOC, NINT, OR, PRODUCT, SUM, RAND, RANDOM_SEED, REAL, SELECTED_INT_KIND, SELECTED_REAL_KIND and XOR. From-SVN: r147633
2009-02-20Update Copyright years for files modified in 2008 and/or 2009.Jakub Jelinek1-1/+1
From-SVN: r144324
2009-02-18intrinsic.texi (MALLOC): Make example more portable.Tobias Burnus1-5/+2
2009-02-18 Tobias Burnus <burnus@net-b.de> * intrinsic.texi (MALLOC): Make example more portable. From-SVN: r144266
2009-01-20invoke.texi (RANGE): RANGE also takes INTEGER arguments.Tobias Burnus1-3/+4
2009-01-20 Tobias Burnus <burnus@net-b.de> * invoke.texi (RANGE): RANGE also takes INTEGER arguments. From-SVN: r143524
2008-12-21re PR fortran/37605 (Remarks on user manual for Gfortran)Arjen Markus1-33/+44
2008-12-21 Arjen Markus <arjen.markus@wldelft.nl> Daniel Kraft <d@domob.eu> PR fortran/37605 * gfortran.texi: Fixed some typos and some minor style improvements. * intrinsic.texi: Some clarifications and typo-fixes. * invoke.texi: Better documenation of the behaviour of the -fdefault-*-8 options and some other fixes. Co-Authored-By: Daniel Kraft <d@domob.eu> From-SVN: r142866
2008-10-28intrinsic.texi: Update OpenMP section for OMPv3.Tobias Burnus1-3/+4
2008-10-28 Tobias Burnus <burnus@net-b.de> * intrinsic.texi: Update OpenMP section for OMPv3. From-SVN: r141408
2008-10-02re PR fortran/37635 (Fortran 2008: Support LEADZ / TRAILZ)Steven Bosscher1-0/+82
testsuite * gfortran.fortran-torture/execute/intrinsic_leadz.f90: New test. * gfortran.fortran-torture/execute/intrinsic_trailz.f90: New test. fortran/ PR fortran/37635 * intrinsic.c (add_functions): Add LEADZ and TRAILZ as generics. * intrinsic.h (gfc_simplify_leadz, gfc_simplify_trailz): New protos. * gfortran.h <enum gfc_isym_id>: (GFC_ISYM_LEADZ, GFC_ISYM_TRAILZ): New. * f95-lang (gfc_init_builtin_functions): Add BUILT_IN_CLZ, BUILT_IN_CLZL, BUILT_IN_CLZLL, BUILT_IN_CTZ, BUILT_IN_CTZL, and BUILT_IN_CTZLL. * trans-intrinsic.c (gfc_conv_intrinsic_leadz, gfc_conv_intrinsic_trails): New code-generation functions for LEADZ and TRAILZ intrinsics. (gfc_conv_intrinsic_function): Use them * intrinsic.texi: Add documentation for LEADZ and TRAILZ. * simplify.c (gfc_simplify_leadz, gfc_simplify_trailz): New functions. From-SVN: r140837
2008-07-30re PR ada/15479 (Ada manual problems)Ralf Wildenhues1-4/+3
gcc/ada/ PR documentation/15479 * gnat-style.texi: Remove AdaCore copyright statement and GPL statement for GNAT. Add @copying stanza, use it. Update to GFDL 1.2. Do not list GFDL as Invariant Section, do not list title as Front-Cover Text. * gnat_rm.texi: Likewise. * gnat_ugn.texi: Likewise. gcc/ * doc/cpp.texi: Update to GFDL 1.2. * doc/gcc.texi: Do not list GPL as Invariant Section. * doc/gccint.texi: Likewise. Update copyright years. * doc/install.texi: Update copyright years. gcc/fortran/ * gfc-internals.texi: Update to GFDL 1.2. Do not list GPL as Invariant Section. * gfortran.texi: Likewise. * intrinsic.texi: Do not list GPL as Invariant Section. * invoke.texi: Likewise. Update copyright years. gcc/java/ * gcj.texi: Update copyright years. Do not list GPL as Invariant Section. libgomp/ * libgomp.texi: Update to GFDL 1.2. Update copyright years. Do not list GPL as Invariant Section. From-SVN: r138293
2008-06-15libgomp.texi (omp_test_lock): Fix typo.Ralf Wildenhues1-150/+110
libgomp/ * libgomp.texi (omp_test_lock): Fix typo. gcc/ * doc/sourcebuild.texi (Config Fragments): Remove obsolete FIXME note about gcc/config.guess. * doc/options.texi (Option file format): Remove non-ASCII bytes. * doc/cpp.texi: Expand TABs, drop indentation outside examples. * doc/cppopts.texi: Likewise. * doc/extend.texi: Likewise. * doc/gcc.texi: Likewise. * doc/gccint.texi: Likewise. * doc/gcov.texi: Likewise. * doc/gty.texi: Likewise. * doc/hostconfig.texi: Likewise. * doc/install.texi: Likewise. * doc/invoke.texi: Likewise. * doc/loop.texi: Likewise. * doc/makefile.texi: Likewise. * doc/md.texi: Likewise. * doc/passes.texi: Likewise. * doc/tm.texi: Likewise. * doc/tree-ssa.texi: Likewise. * doc/trouble.texi: Likewise. libiberty/ * libiberty.texi: Expand TABs, drop indentation outside examples. * obstacks.texi: Likewise. gcc/fortran/ * gfc-internals.texi: Expand TABs, drop indentation outside examples. * gfortran.texi: Likewise. * intrinsic.texi: Likewise. * invoke.texi: Likewise. gcc/java/ * gcj.texi: Expand TABs, remove whitespace from blank lines. gcc/ada/ * gnat_rm.texi (Implementation Defined Characteristics) (Standard Library Routines): Use @smallexample for indented text. Drop Indentation outside examples. * gnat_ugn.texi: Likewise. From-SVN: r136802
2008-06-07re PR fortran/36437 (Simplify argument to [c_]sizeof)Tobias Burnus1-0/+55
2008-06-04 Tobias Burnus <burnus@net-b.de> PR fortran/36437 * intrinsic.c (add_functions): Implement c_sizeof. * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Do not create unneeded variable in the scalar case. 2008-06-04 Tobias Burnus <burnus@net-b.de> PR fortran/36437 * gfortran.dg/c_sizeof_1.f90: New. * gfortran.dg/c_sizeof_2.f90: New. From-SVN: r136536
2008-06-06intrinsic.texi (BESSEL_J1): Fix BES(S)EL_J1 typo.Tobias Burnus1-1/+1
2008-06-06 Tobias Burnus <burnus@net-b.de> * intrinsic.texi (BESSEL_J1): Fix BES(S)EL_J1 typo. From-SVN: r136491
2008-06-01intrinsic.texi: Revert wrong commit.Jerry DeLisle1-39/+0
2008-05-31 Jerry DeLisle <jvdelisle@gcc.gnu.org> * intrinsic.texi: Revert wrong commit. From-SVN: r136249
2008-05-31arith.c (gfc_arith_init_1): Remove now unused r and c variables.Steven G. Kargl1-0/+39
2008-05-31 Steven G. Kargl <kargls@comcast.net> * arith.c (gfc_arith_init_1): Remove now unused r and c variables. Cleanup numerical inquiry function initialization. (gfc_arith_done_1): Replace multiple mpfr_clear() invocations with a single mpfr_clears(). (gfc_check_real_range): Re-arrange logic to eliminate multiple unnecessary branching and assignments. (gfc_arith_times): Use mpfr_clears() in preference to multiple mpfr_clear(). (gfc_arith_divide): Ditto. (complex_reciprocal): Eliminate now unused variables a, re, im. Cleanup the mpfr abuse. Use mpfr_clears() in preference to multiple mpfr_clear(). (complex_pow): Fix comment whitespace. Use mpfr_clears() in preference to multiple mpfr_clear(). * simplify.c (gfc_simplify_and): Remove blank line. (gfc_simplify_atan2): Move error checking earlier to eliminate a now unnecessay gfc_free_expr(). (gfc_simplify_bessel_j0): Remove unnecessary gfc_set_model_kind(). (gfc_simplify_bessel_j1): Ditto. (gfc_simplify_bessel_jn): Ditto. (gfc_simplify_bessel_y0): Ditto. (gfc_simplify_bessel_y1): Ditto. (gfc_simplify_bessel_yn): Ditto. (only_convert_cmplx_boz): Eliminate unnecessary duplicate code, and combine nested if statement rational expressions. (gfc_simplify_cos): Use mpfr_clears() in preference to multiple mpfr_clear(). (gfc_simplify_exp): Ditto. (gfc_simplify_fraction): Move gfc_set_model_kind() to after the special case of 0. Use mpfr_clears() in preference to multiple mpfr_clear(). (gfc_simplify_gamma): Eliminate unnecessary gfc_set_model_kind(). (gfc_simplify_lgamma): Ditto. (gfc_simplify_log10): Ditto. (gfc_simplify_log): Move gfc_set_model_kind () inside switch statement. Use mpfr_clears() in preference to multiple mpfr_clear(). (gfc_simplify_mod): Eliminate now unused variables quot, iquot, and term. Simplify the mpfr magic. (gfc_simplify_modulo): Ditto. (gfc_simplify_nearest): Eliminate unnecessary gfc_set_model_kind(). (gfc_simplify_scale): Use mpfr_clears() in preference to multiple mpfr_clear(). (gfc_simplify_sin): Ditto (gfc_simplify_sqrt): Ditto (gfc_simplify_set_exponent): Move gfc_set_model_kind() to after the special case of 0. Use mpfr_clears() in preference to multiple mpfr_clear(). From-SVN: r136239
2008-05-18intrinsic.c (char_conversions, ncharconv): New static variables.Francois-Xavier Coudert1-51/+75
* intrinsic.c (char_conversions, ncharconv): New static variables. (find_char_conv): New function. (add_functions): Add simplification functions for ADJUSTL and ADJUSTR. Don't check the kind of their argument. Add checking for LGE, LLE, LGT and LLT. (add_subroutines): Fix argument type for SLEEP. Fix argument name for SYSTEM. (add_char_conversions): New function. (gfc_intrinsic_init_1): Call add_char_conversions. (gfc_intrinsic_done_1): Free char_conversions. (check_arglist): Use kind == 0 as a signal that we don't want the kind value to be checked. (do_simplify): Also simplify character functions. (gfc_convert_chartype): New function * trans-array.c (gfc_trans_array_ctor_element): Don't force the use of default character type. (gfc_trans_array_constructor_value): Likewise. (get_array_ctor_var_strlen): Use integer kind to build an integer instead of a character kind! (gfc_build_constant_array_constructor): Don't force the use of default character type. (gfc_conv_loop_setup): Likewise. * trans-expr.c (gfc_conv_string_tmp): Don't force the use of default character type. Allocate enough memory for wide strings. (gfc_conv_concat_op): Make sure operand kind are the same. (string_to_single_character): Remove gfc_ prefix. Reindent. Don't force the use of default character type. (gfc_conv_scalar_char_value): Likewise. (gfc_build_compare_string): Call string_to_single_character. (fill_with_spaces): New function (gfc_trans_string_copy): Add kind arguments. Use them to deal with wide character kinds. (gfc_conv_statement_function): Whitespace fix. Call gfc_trans_string_copy with new kind arguments. (gfc_conv_substring_expr): Call gfc_build_wide_string_const instead of using gfc_widechar_to_char. (gfc_conv_string_parameter): Don't force the use of default character type. (gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy. * intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant, gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes. * decl.c (gfc_set_constant_character_len): Don't assert the existence of a single character kind. * trans-array.h (gfc_trans_string_copy): New prototype. * gfortran.h (gfc_check_character_range, gfc_convert_chartype): New prototypes. * error.c (print_wide_char_into_buffer): New function lifting code from gfc_print_wide_char. Fix order to output '\x??' instead of 'x\??'. (gfc_print_wide_char): Call print_wide_char_into_buffer. (show_locus): Call print_wide_char_into_buffer with buffer local to this function. * trans-const.c (gfc_build_wide_string_const): New function. (gfc_conv_string_init): Deal with wide characters strings constructors. (gfc_conv_constant_to_tree): Call gfc_build_wide_string_const. * trans-stmt.c (gfc_trans_label_assign): Likewise. (gfc_trans_character_select): Deal with wide strings. * expr.c (gfc_check_assign): Allow conversion between character kinds on assignment. * trans-const.h (gfc_build_wide_string_const): New prototype. * trans-types.c (gfc_get_character_type_len_for_eltype, gfc_get_character_type_len): Create too variants of the old gfc_get_character_type_len, one getting kind argument and the other one directly taking a type tree. * trans.h (gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4, gfor_fndecl_convert_char4_to_char1): New prototypes. * trans-types.h (gfc_get_character_type_len_for_eltype): New prototype. * resolve.c (resolve_operator): Exit early when kind mismatches are detected, because that makes us issue an error message later. (validate_case_label_expr): Fix wording of error message. * iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New functions. (gfc_resolve_pack): Call _char4 variants of library function when dealing with wide characters. (gfc_resolve_reshape): Likewise. (gfc_resolve_spread): Likewise. (gfc_resolve_transpose): Likewise. (gfc_resolve_unpack): Likewise. * target-memory.c (size_character): Take character kind bit size correctly into account (not that it changes anything for now, but it's more generic). (gfc_encode_character): Added gfc_ prefix. Encoding each character of a string by calling native_encode_expr for the corresponding unsigned integer. (gfc_target_encode_expr): Add gfc_ prefix to encode_character. * trans-decl.c (gfc_build_intrinsic_function_decls): Build gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4 and gfor_fndecl_convert_char4_to_char1. * target-memory.h (gfc_encode_character): New prototype. * arith.c (gfc_check_character_range): New function. (eval_intrinsic): Allow non-default character kinds. * check.c (gfc_check_access_func): Only allow default character kind arguments. (gfc_check_chdir): Likewise. (gfc_check_chdir_sub): Likewise. (gfc_check_chmod): Likewise. (gfc_check_chmod_sub): Likewise. (gfc_check_lge_lgt_lle_llt): New function. (gfc_check_link): Likewise. (gfc_check_link_sub): Likewise. (gfc_check_symlnk): Likewise. (gfc_check_symlnk_sub): Likewise. (gfc_check_rename): Likewise. (gfc_check_rename_sub): Likewise. (gfc_check_fgetputc_sub): Likewise. (gfc_check_fgetput_sub): Likewise. (gfc_check_stat): Likewise. (gfc_check_stat_sub): Likewise. (gfc_check_date_and_time): Likewise. (gfc_check_ctime_sub): Likewise. (gfc_check_fdate_sub): Likewise. (gfc_check_gerror): Likewise. (gfc_check_getcwd_sub): Likewise. (gfc_check_getarg): Likewise. (gfc_check_getlog): Likewise. (gfc_check_hostnm): Likewise. (gfc_check_hostnm_sub): Likewise. (gfc_check_ttynam_sub): Likewise. (gfc_check_perror): Likewise. (gfc_check_unlink): Likewise. (gfc_check_unlink_sub): Likewise. (gfc_check_system_sub): Likewise. * primary.c (got_delim): Perform correct character range checking for all kinds. * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate calls to library functions convert_char4_to_char1 and convert_char1_to_char4 for character conversions. (gfc_conv_intrinsic_char): Allow all character kings. (gfc_conv_intrinsic_strcmp): Fix whitespace. (gfc_conv_intrinsic_repeat): Take care of all character kinds. * intrinsic.texi: For all GNU intrinsics accepting character arguments, mention that they're restricted to the default kind. * simplify.c (simplify_achar_char): New function. (gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char. gfc_simplify_ichar): Don't error out for wide characters. (gfc_convert_char_constant): New function. * gfortran.dg/achar_3.f90: Adjust error messages. * gfortran.dg/achar_5.f90: New test. * gfortran.dg/achar_6.F90: New test. * gfortran.dg/widechar_1.f90: New test. * gfortran.dg/widechar_2.f90: New test. * gfortran.dg/widechar_3.f90: New test. * gfortran.dg/widechar_4.f90: New test. * gfortran.dg/widechar_intrinsics_1.f90: New test. * gfortran.dg/widechar_intrinsics_2.f90: New test. * gfortran.dg/widechar_intrinsics_3.f90: New test. * gfortran.dg/widechar_intrinsics_4.f90: New test. * gfortran.dg/widechar_intrinsics_5.f90: New test. * gfortran.dg/widechar_select_1.f90: New test. * gfortran.dg/widechar_select_2.f90: New test. From-SVN: r135515
2008-05-18intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT and ↵Tobias Burnus1-101/+117
GET_ENVIRONMENT_VARIABLE... 2008-05-16 Tobias Burnus <burnus@net-b.de> * intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT and GET_ENVIRONMENT_VARIABLE; fix keyword= name for GETENV, GETLOG, GMTIME, HOSTNM, IRAND, ITIME, KILL. Move LOG_GAMMA after LOG10. From-SVN: r135482
2008-05-17intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).Tobias Burnus1-352/+365
2008-05-16 Tobias Burnus <burnus@net-b.de> * intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT). * intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED, CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND. From-SVN: r135471
2008-05-16intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95...Tobias Burnus1-165/+171
2008-05-16 Tobias Burnus <burnus@net-b.de * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95; add missing KIND argument to ACHAR and NINT; and state that the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR, ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY. From-SVN: r135427
2008-05-16[multiple changes]Steven G. Kargl1-12/+21
2008-05-15 Steven G. Kargl <kargls@comcast.net> * simplify.c (gfc_simplify_dble, gfc_simplify_float, simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug possible memory leaks. (gfc_simplify_reshape): Plug possible memory leaks and dereferencing of NULL pointers. 2008-05-15 Steven G. Kargl <kargls@comcast.net> PR fortran/36239 * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand rolled integer conversion with gfc_int2int, gfc_real2int, and gfc_complex2int. (gfc_simplify_intconv): Renamed to simplify_intconv. 2008-05-15 Steven G. Kargl, <kargl@comcast.net> * gfortran.dg/and_or_xor.f90: New test * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or, gfc_simplify_xor): Don't range check logical results. From-SVN: r135408
2008-05-15Documented new types C_INT128_T, C_INT_LEASE128_T and C_INT_FAST128_T.Sa Liu1-3/+11
From-SVN: r135343
2008-04-30intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.François-Xavier Coudert1-0/+43
* intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic. * intrinsic.h (gfc_check_selected_char_kind, gfc_simplify_selected_char_kind): New prototypes. * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND. * trans.h (gfor_fndecl_sc_kind): New function decl. * trans-decl.c (gfor_fndecl_sc_kind): Build new decl. * arith.c (gfc_compare_with_Cstring): New function. * arith.h (gfc_compare_with_Cstring): New prototype. * check.c (gfc_check_selected_char_kind): New function. * primary.c (match_string_constant, match_kind_param): Mark symbols used as literal constant kind param as referenced. * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function. (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind. * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic. * simplify.c (gfc_simplify_selected_char_kind): New function. * intrinsics/selected_char_kind.c: New file. * Makefile.am: Add intrinsics/selected_char_kind.c. * Makefile.in: Regenerate. * gfortran.dg/selected_char_kind_1.f90: New test. * gfortran.dg/selected_char_kind_2.f90: New test. * gfortran.dg/selected_char_kind_3.f90: New test. From-SVN: r134839
2008-03-03re PR fortran/33197 (Fortran 2008: math functions)François-Xavier Coudert1-106/+195
PR fortran/33197 gcc/fortran/ * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH, ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N}, ERFC_SCALED, LOG_GAMMA and HYPOT. * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot, gfc_resolve_hypot): New prototypes. * mathbuiltins.def: Add HYPOT builtin. Make complex versions of ACOSH, ASINH and ATANH available. * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values. * lang.opt: Add -std=f2008 option. * libgfortran.h: Define GFC_STD_F2008. * lang-specs.h: Add .f08 and .F08 file suffixes. * iresolve.c (gfc_resolve_hypot): New function. * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008. * check.c (gfc_check_hypot): New function. * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin. * options.c (set_default_std_flags): Allow Fortran 2008 by default. (form_from_filename): Add .f08 suffix. (gfc_handle_option): Handle -std=f2008 option. * simplify.c (gfc_simplify_hypot): New function. * gfortran.texi: Document Fortran 2008 status and file extensions. * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics, as well as HYPOT and ERFC_SCALED. Update documentation of ERF, ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH. * invoke.texi: Document the new -std=f2008 option. libgomp/ * testsuite/libgomp.fortran/fortran.exp: Add .f08 and .F08 file suffixes. gcc/testsuite/ * gfortran.dg/gomp/gomp.exp: Add .f08 and .F08 file suffixes. * gfortran.dg/dg.exp: Likewise. * gfortran.dg/vect/vect.exp: Likewise. * gfortran.fortran-torture/execute/execute.exp: Likewise. * gfortran.fortran-torture/compile/compile.exp: Likewise. * gfortran.dg/gamma_1.f90: Also check log_gamma. * gfortran.dg/invalid_contains_1.f90: Remove warning about empty CONTAINS. * gfortran.dg/gamma_2.f90: Add a few error messages. * gfortran.dg/invalid_contains_2.f90: Remove warning about empty CONTAINS. * gfortran.dg/gamma_3.f90: Adjust error message. * gfortran.dg/gamma_4.f90: Test for log_gamma instead of lgamma. * gfortran.dg/bind_c_usage_9.f03: Adjust error messages. * gfortran.dg/bessel_1.f90: New test. * gfortran.dg/recursive_check_3.f90: Remove warnings. * gfortran.dg/besxy.f90: Also check for new F2008 intrinsics. * gfortran.dg/derived_function_interface_1.f90: Remove warning. * gfortran.dg/contains_empty_1.f03: New test. * gfortran.dg/erfc_scaled_1.f90: New test. * gfortran.dg/hypot_1.f90: New test. * gfortran.dg/contains_empty_2.f03: New test. libgfortran/ * intrinsics/erfc_scaled_inc.c: New file. * intrinsics/erfc_scaled.c: New file. * gfortran.map (GFORTRAN_1.0): Add _gfortran_erfc_scaled_r*. * Makefile.am: Add intrinsics/erfc_scaled.c. * config.h.in: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. From-SVN: r132846
2008-02-24arith.c: Update copyright years.Tobias Schlüter1-1/+1
* arith.c: Update copyright years. * arith.h: Likewise. * array.c: Likewise. * bbt.c: Likewise. * check.c: Likewise. * data.c: Likewise. * data.h: Likewise. * decl.c: Likewise. * dependency.c: Likewise. * dependency.h: Likewise. * dump-parse-tree.c: Likewise. * error.c: Likewise. * expr.c: Likewise. * gfc-internals.texi: Likewise. * gfortran.h: Likewise. * gfortran.texi: Likewise. * gfortranspec.c: Likewise. * interface.c: Likewise. * intrinsic.c: Likewise. * intrinsic.h: Likewise. * intrinsic.texi: Likewise. * invoke.texi: Likewise. * io.c: Likewise. * iresolve.c: Likewise. * iso-c-binding.def: Likewise. * iso-fortran-env.def: Likewise. * lang-specs.h: Likewise. * lang.opt: Likewise. * libgfortran.h: Likewise. * match.c: Likewise. * match.h: Likewise. * matchexp.c: Likewise. * misc.c: Likewise. * module.c: Likewise. * openmp.c: Likewise. * options.c: Likewise. * parse.c: Likewise. * parse.h: Likewise. * primary.c: Likewise. * resolve.c: Likewise. * scanner.c: Likewise. * simplify.c: Likewise. * st.c: Likewise. * symbol.c: Likewise. * target-memory.c: Likewise. * target-memory.h: Likewise. * trans-array.h: Likewise. * trans-const.h: Likewise. * trans-stmt.h: Likewise. * trans-types.c: Likewise. * trans-types.h: Likewise. * types.def: Likewise. From-SVN: r132600
2008-02-22gfc-internals.texi: Fix typos and markup nits.Ralf Wildenhues1-12/+12
gcc-fortran/: * gfc-internals.texi: Fix typos and markup nits. * gfortran.texi: Likewise. * intrinsic.texi: Likewise. From-SVN: r132539
2008-02-15intrinsic.texi: Rename INDEX node to avoid clashing with index.html on ↵Francois-Xavier Coudert1-5/+5
case-insensitive systems. * intrinsic.texi: Rename INDEX node to avoid clashing with index.html on case-insensitive systems. From-SVN: r132355
2007-12-25re PR fortran/34533 (DTIME returns total process time and not since last ↵Daniel Franke1-1/+22
invocation) gcc/fortran: 2007-12-25 Daniel Franke <franke.daniel@gmail.com> PR fortran/34533 * intrinsic.h (gfc_check_etime): Renamed to ... (gfc_check_dtime_etime): ... this. (gfc_check_etime_sub): Renamed to ... (gfc_check_dtime_etime_sub): ... this. (gfc_resolve_dtime_sub): New prototype. * check.c (gfc_check_etime): Renamed to ... (gfc_check_dtime_etime): ... this. (gfc_check_etime_sub): Renamed to ... (gfc_check_dtime_etime_sub): ... this. * iresolve.c (gfc_resolve_dtime_sub): New implementation. * intrinsic.c (add_functions): Removed alias from ETIME to DTIME, added stand-alone intrinsic DTIME. (add_subroutines): Adjusted check and resolve function names for DTIME and ETIME. * trans-intrinsic.c (gfc_conv_intrinsic_function): Added DTIME to known functions in switch. * intrinsic.texi (DTIME): Added paragraph about thread-safety, fixed return value section. (CPU_TIME): Clarified intent and added implementation notes. libgfortran: 2007-12-25 Daniel Franke <franke.daniel@gmail.com> PR fortran/34533 * intrinsics/cpu_time.c: Moved code commonly usable for CPU_TIME, DTIME and ETIME to ... * intrinsics/time_1.h: ... here. * intrinsics/dtime.c: New file. * intrinsics/etime.c: Newly implemented using the common time-aquisition function from time_1.h. * gfortran.map (_gfortran_dtime, _gfortran_dtime_sub): New. * Makefile.am: Added new file. * Makefile.in: Regenerated. * configure: Regenerated. From-SVN: r131168
2007-12-17intrinsic.c (add_functions): Undo change; mark float and sngl as STD_F77.Tobias Burnus1-2/+2
2007-12-17 Tobias Burnus <burnus@net-b.de> * intrinsic.c (add_functions): Undo change; mark float and sngl as STD_F77. * intrinsic.texi (FLOAT, SNGL): Change standard to F77 and later. * gfortran.texi (BOZ): Make note about FLOAT etc. clearer. 2007-12-17 Tobias Burnus <burnus@net-b.de> * gfortran.dg/initialization_16.f90: Update as FLOAT/SNGL are part of Fortran 77/95/2003. From-SVN: r131007
2007-11-02* intrinsic.texi (ALLOCATED): Fix typo.Francois-Xavier Coudert1-1/+1
From-SVN: r129857
2007-09-20re PR fortran/33325 (Document intrinsic Fortran modules)Tobias Burnus1-0/+147
2007-09-20 Tobias Burnus <burnus@net-b.de> PR fortran/33325 * intrinsic.text: Add documentation of the intrinsic modules. * gfortran.texi: Link to intrinsic-modules section and to the GOMP manual. From-SVN: r128619
2007-09-10re PR fortran/31547 (Document when CPP is called and document the ↵Tobias Burnus1-2/+2
f95-cpp-input option) 2007-09-10 Tobias Burnus <burnus@net-b.de> PR fortran/31547 * gfortran.texi: Document when CPP is called. * intrinsic.texi (IOR): Fix typos. From-SVN: r128331
2007-08-31* intrinsic.texi (LGAMMA): Remove empty @cindex line.Joseph Myers1-1/+0
From-SVN: r127964
2007-08-29re PR libfortran/32989 (GETARG intrinsic)Francois-Xavier Coudert1-9/+10
PR fortran/32989 * iresolve.c (gfc_resolve_getarg): Handle non-default integer kinds. * check.c (gfc_check_getarg): New function * intrinsic.h: Add prototype for gfc_check_getarg. * intrinsic.c (add_subroutines): Add reference to gfc_check_getarg. * intrinsic.texi (GETARG): Adjust documentation. * gfortran.fortran-torture/execute/getarg_1.f90: Add check for non-default integer kind arguments. From-SVN: r127905
2007-08-29re PR fortran/33105 (F2003: Support is_iostat_end & is_iostat_eor intrinsics)François-Xavier Coudert1-0/+92
PR fortran/33105 * intrinsic.c (add_functions): Add IS_IOSTAT_END and IS_IOSTAT_EOR intrinsics. * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_IOSTAT_END and GFC_ISYM_IS_IOSTAT_EOR. * trans-intrinsic.c (gfc_conv_has_intvalue): New function. (gfc_conv_intrinsic_function): Call gfc_conv_has_intvalue for GFC_ISYM_IS_IOSTAT_END and GFC_ISYM_IS_IOSTAT_EOR. * intrinsic.texi: Add IS_IOSTAT_END and IS_IOSTAT_EOR. * gfortran.dg/is_iostat_end_eor_1.f90: New test. From-SVN: r127903
2007-08-26re PR fortran/32980 (Vendor extension: Intrinsic functions (D)GAMMA, LGAMMA ↵Tobias Burnus1-0/+115
(ALGAMA/DLGAMA)) 2007-08-26 Tobias Burnus <burnus@net-b.de> PR fortran/32980 * intrinsic.h (gfc_simplify_gamma,gfc_simplify_lgamma, gfc_resolve_gamma,gfc_resolve_lgamma): New function declations. * mathbuiltins.def: Define GAMMA and LGAMMA. * intrinsic.c (add_functions): Add GAMMA, DGAMMA, LGAMMA, ALGAMA and DLGAMA. * simplify.c (gfc_simplify_gamma,gfc_simplify_lgamma): New functions. * iresolve.c (gfc_resolve_gamma,gfc_resolve_lgamma): New functions. * intrinsic.texi: Add documentation for GAMMA and LGAMMA. 2007-08-26 Tobias Burnus <burnus@net-b.de> PR fortran/32980 * gfortran.dg/gamma_1.f90: New. * gfortran.dg/gamma_2.f90: New. * gfortran.dg/gamma_3.f90: New. From-SVN: r127809