summaryrefslogtreecommitdiffstats
path: root/gcc/fortran/intrinsic.c
Commit message (Collapse)AuthorAgeFilesLines
...
* * gfortran.h (gfc_default_*_kind): Remove prototypes, add externtobi2004-08-271-10/+10
| | | | | | | | | | | | | | | variable declaration of same name. * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c, intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c, resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c: Replace all calls to gfc_default_*_kind with variable accesses. * trans-types.c: Same as above. (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove static qualifier. Replace all occurences. (gfc_default_*_kind): Remove functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86662 138bc75d-0d04-0410-961f-82ee72b054a4
* * check.c (gfc_check_atan2): New function.tobi2004-08-261-1/+1
| | | | | | | | * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2 * intrinsic.h (gfc_check_atan2): Add prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86628 138bc75d-0d04-0410-961f-82ee72b054a4
* * check.c (gfc_check_reduction): Rename to ...tobi2004-08-221-6/+10
| | | | | | | | | | | | | | | (check_reduction): ... this. Make static. Don't check type of first argument. (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions. * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and SUM to use new check functions. (check_specific): Change logic to call new functions. * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum): Add prototypes. (gfc_check_reduction): Remove prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86377 138bc75d-0d04-0410-961f-82ee72b054a4
* fortran/tobi2004-08-191-21/+52
| | | | | | | | | | | | | | | | | | | | | | PR fortran/16946 * check.c (gfc_check_reduction): New function. (gfc_check_minval_maxval): Removed. (gfc_check_product): Removed. (gfc_check_sum): Removed. * intrinsic.h: Add/remove declarations for these. * gfortran.h: Add field f3red to union gfc_check_f. * intrinsic.c (add_sym_3red): New function. (add_functions): Register maxval, minval, product, and sum intrinsics through add_sym_3red. (check_specific): Handle f3red union field. * iresolve.c: Whitespace change. testsuite/ PR fortran/16946 * gfortran.dg/reduction.f90: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86255 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-08-11 Paul Brook <paul@codeourcery.com>pbrook2004-08-111-0/+2
| | | | | | | | | | | | PR fortran/16917 * intrinsic.c (add_functions): Add dfloat as an alias for dble. 2004-08-11 Steven G. Kargl <kargls@comcast.net> * gfortran.dg/dfloat_1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85805 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>pbrook2004-08-061-4/+51
| | | | | | | | | | | | | | | | | | * intrinsic.c (add_subroutines): Add getenv and get_environment_variable. (add_sym_5s): New function. * intrinsic.h (gfc_resolve_get_environment_variable): Add prototype. * iresolve.c (gfc_resolve_get_environment_variable): New function. libgfortran/ * intrinsics/env.c: New file. * Makefile.am: Add env.c to build. * Makefile.in: Regenerate. testsuite/ * gfortran.dg/getenv_1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85656 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-08-06 Steven G. Kargl <kargls@comcast.net>pbrook2004-08-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * arith.c: Add #define for model numbers. Remove global GMP variables. (natural_logarithm,common_logarithm,exponential,sine, cosine,arctangent,hypercos,hypersine ): Remove. (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions. (arctangent2,gfc_arith_init_1,gfc_arith_done_1 gfc_check_real_range, gfc_constant_result, gfc_range_check, gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times, gfc_arith_divide,complex_reciprocal,complex_pow_ui, gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real, gfc_convert_complex,gfc_int2real,gfc_int2complex, gfc_real2int,gfc_real2real,gfc_real2complex, gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP to MPFR, use new functions. * arith.h: Remove extern global variables. (natural_logarithm,common_logarithm,exponential, sine, cosine, arctangent,hypercos,hypersine): Remove prototypes. (arctangent2): Update prototype from GMP to MPFR. (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes. * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR. * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR. * gfortran.h (GFC_REAL_BITS): Remove. (arith): Add ARITH_NAN. Include mpfr.h. Define GFC_RND_MODE. Rename GCC_GFORTRAN_H GFC_GFC_H. (gfc_expr): Convert GMP to MPFR. * module.c: Add arith.h, correct type in comment. (mio_gmp_real): Convert GMP to MPFR. (mio_expr): Use gfc_set_model_kind(). * primary.c: Update copyright date with 2004. (match_real_constant,match_const_complex_part): Convert GMP to MPFR. * simplify.c: Remove global GMP variables (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag, gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint, gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan, gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx, gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh, gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon, gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor, gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int, gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log, gfc_simplify_log10,simplify_min_max,gfc_simplify_mod, gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint, gfc_simplify_rrspacing,gfc_simplify_scale, gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin, gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt, gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny, gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR. Use new functions. * trans-const.c (gfc_conv_mpfr_to_tree): Rename from gfc_conv_mpf_to_tree. Convert it to use MPFR (gfc_conv_constant_to_tree): Use it. * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree(). * trans-intrinsic.c: Add arith.h, remove gmp.h (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85652 138bc75d-0d04-0410-961f-82ee72b054a4
* * intrinsic.c (add_sym_4s): New function.pbrook2004-07-081-18/+46
| | | | | | | (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84304 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/15280pbrook2004-07-041-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/15665 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and GFC_ISYM_COMMAND_ARGUMENT_COUNT. * intrinsic.c (add_functions): Identify iargc. Add command_argument_count. (add_subroutines): Resolve getarg. Add get_command and get_command_argument. * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command, gfc_resolve_get_command_argument): Add prototypes. * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command, gfc_resolve_get_command_argument): New functions. * trans-decl.c (gfor_fndecl_iargc): New variable. (gfc_build_intrinsic_function_decls): Set it. * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function. (gfc_conv_intrinsic_function): Use it. * trans.h (gfor_fndecl_iargc): Declare. libgfortran/ * libgfortran.h (gfc_strlen_type): Define. * intrinsics/args.c (getarg): Rename ... (getarg_i4): ... to this. (getarg_i8, get_command_argument_i4, get_command_argument_i8, get_command_i4, get_command_i8): New functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84087 138bc75d-0d04-0410-961f-82ee72b054a4
* fortran/tobi2004-06-141-15/+49
| | | | | | | | | | | | | | | | | | | | | 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de> Andrew Vaught <andyv@firstinter.net> PR fortran/14928 * gfortran.h (gfc_check_f): Add new field f3ml. * check.c (gfc_check_minloc_maxloc): Take argument list instead of individual arguments, reorder if necessary. * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype. * intrinsic.c (add_sym_3ml): New function. (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC. (check_specific): Catch special case MINLOC, MAXLOC. testsuite/ PR fortran/14928 * gfortran.fortran-torture/compile/mloc.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83111 138bc75d-0d04-0410-961f-82ee72b054a4
* * intrinsic.c (add_sym_2s): Use correct function types.pbrook2004-06-131-4/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83071 138bc75d-0d04-0410-961f-82ee72b054a4
* * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_randpbrook2004-06-121-0/+76
| | | | | | | | | | | | | | | | | | | | | | gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions. * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME, GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND. * trans-intrinsic.c: Use symbols. * intrinsic.c (add_sym_2s): New function. * intrinsic.c: Add etime, dtime, irand, rand, second, srand. * intrinsic.h: Function prototypes. * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub gfc_resolve_srand): New functions. libgfortran * Makefile.am: Add rand.c and etime.c * Makefile.in: Regenerated. * aclocal.in: Regenerated. * cpu_time.c (second_sub, second): New functions. * rand.c (irand, rand, srand): New file. * etime.c (etime_sub, etime): New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83034 138bc75d-0d04-0410-961f-82ee72b054a4
* * intrinsic.c (sort_actual): Keep track of type of missingtobi2004-06-051-1/+7
| | | | | | | arguments. (Missing from previous commit.) git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82645 138bc75d-0d04-0410-961f-82ee72b054a4
* * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.pbrook2004-05-221-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82139 138bc75d-0d04-0410-961f-82ee72b054a4
* * check.c (gfc_check_system_clock): New function.pbrook2004-05-221-2/+29
| | | | | | | | | | | | | | | * intrinsic.c (add_sym_3s): New function. (add_subroutines): Use it. * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock): Add prototypes. * iresolve.c (gfc_resolve_system_clock): New function. libgfortran/ * intrinsics/system_clock: New file. * Makefile.am: Add intrinsics/system_clock.c. * Makefile.in: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82131 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/15205tobi2004-05-141-1/+1
| | | | | | | | | | * iresolve.c (gfc_resolve_nearest): Add new function. * intrinsic.h: ... declare it here. * intrinsic.c (add_functions): ... add it as resolving function for NEAREST. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81843 138bc75d-0d04-0410-961f-82ee72b054a4
* * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,tobi2004-05-141-13/+14
| | | | | | | | | | | | | | | | | | decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c, expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c, intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h, matchexp.c, misc.c, module.c, options.c, parse.c, parse.h, primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c, trans-array.c, trans-array.h, trans-common.c, trans-const.c, trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c, trans-types.h, trans.c, trans.h: Update copyright years and boilerplate. * data.c: Likewise, also removed two whitespace-only lines. * gfortranspec.c, lang.opt: Update copyright years. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81839 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge tree-ssa-20020619-branch into mainline.dnovillo2004-05-131-0/+2560
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81764 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud