Commit Graph

63 Commits

Author SHA1 Message Date
Tobias Schlüter d8955e4baf * intrinsics/rename.c: Add missing #includes.
From-SVN: r98961
2005-04-29 02:46:36 +02:00
Thomas Koenig da8f3dcc5b 05-04-22 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/20074
        PR libfortran/20436
        PR libfortran/21108
        * gfortran.dg/nested_reshape.f90: new test
        * gfortran.dg/reshape-alloc.f90: new test
        * gfortran.dg/reshape.f90: new test

2005-04-22  Thomas Koenig  <Thomas.Koenig@online.de>

        PR libfortran/20074
        PR libfortran/20436
        PR libfortran/21108
        * m4/reshape.m4 (reshape_`'rtype_kind):  rs, rex:  New
        variables, to be used in calculation of return array sizes.
        Populate return array descriptor if ret->data is NULL.
        Fix condition for early return (it used to test something
        undefined if order was used).
        Remove duplicate check wether pad is used.
        * intrinsics/reshape_generic.c (reshape_generic): Likewise.
        Fix a few places where the wrong variables were set.
        * generated/reshape_i4.c: Regenerated.
        * generated/reshape_i8.c: Regenerated.

From-SVN: r98585
2005-04-22 20:02:44 +00:00
Thomas Koenig 5f9bfaf2bc 005-04-17 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/21075
        * m4/reshape.m4 (reshape_`'rtype_kind):  Change dimension
        of auxiliary arrays from GFC_MAX_DIMENSIONS - 1 to
        GFC_MAX_DIMENSIONS.
        * intrinsics/reshape_generic.c (reshape_generic):  Likewise.
        * generated/reshape_i4.c:  Regenerated.
        * generated/reshape_i8.c:  Regenerated.

2005-04-17  Thomas Koenig  <Thomas.Koenig@online.de>

        PR libfortran/21075
        * gfortran.dg/reshape_rank7.f90: New test.

From-SVN: r98288
2005-04-17 20:26:57 +00:00
Thomas Koenig 8e6d7b8a35 re PR libfortran/18495 ([4.0 only] Intrinisc function SPREAD is broken)
2005-04-15  Thomas Koenig  <Thomas.Koenig@online.de>

        PR libfortran/18495
        * intrinsics/spread_generic.c (spread):  Remove const from
        return array descriptor.
        New variables: rrank (rank of return array),  rs (for
        calculating the size of the return array), srank (rank
        of the source array).
        Generate runtime error if the dim= argument is larger than
        the rank of the return array.
        Generate runtime error if the needed rank of the return
        array is larger than 7.
        If ret->data is null, populate the return array descriptor
        and initialize the variables for the actual operation.
        Otherwise, set ret->dim[0].stride to one if it is zero.
        Change second, independent use of variable dim to srank.

2005-04-15  Thomas Koenig  <Thomas.Koenig@online.de>

        PR libfortran/18495
        * gfortran.fortran-torture/execute/intrinsic_spread.f90:
        Test callee-allocated version of return array with a write
        statement.
        Test spread with a temporary with another write statement.

From-SVN: r98208
2005-04-15 20:06:17 +00:00
François-Xavier Coudert f77b6ca3da Makefile.am: Added new files.
* Makefile.am: Added new files.
        * Makefile.in: Regenerate.
        * aclocal.m4: Regenerate.
        * configure.ac: add checks for signal.h headers file, as well as
        following functions: chdir, strerror, getlogin, gethostname, kill,
        link, symlink, perror, sleep, time.
        * configure: Regenerate.
        * intrinsics/chdir.c, intrinsics/gerror.c, intrinsics/getlog.c,
        intrinsics/hostnm.c, intrinsics/ierrno.c, intrinsics/kill.c,
        intrinsics/link.c, intrinsics/perror.c, intrinsics/rename.c,
        intrinsics/sleep.c, intrinsics/symlnk.c, intrinsics/time.c: Newly
        implementend g77 intrinsics.

        * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
        gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
        gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
        gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
        gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
        gfc_check_perror): new functions to check newly implemented
        g77 intrinsics.
        * gfortran.h: adding symbols for new intrinsics.
        * intrinsic.c (add_functions): adding new intrinsics.
        (add_subroutines): adding new intrinsics.
        * intrinsic.h: prototype for all checking and resolving
        functions.
        * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
        gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
        gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
        gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
        gfc_resolve_kill_sub, gfc_resolve_link_sub,
        gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
        gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
        gfc_resolve_perror): new functions to resolve intrinsics.
        * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
        for new symbols.

        * g77_intrinsics_funcs.f: New test.
        * g77_intrinsics_sub.f: New test.

From-SVN: r96893
2005-03-22 22:08:22 +00:00
Eric Botcazou 7442146939 re PR libfortran/19302 (intrinsic_nearest.f90 fails)
PR libfortran/19302
	* intrinsics/c99_functions.c (nextafterf): Special-case infinite
	numbers.

From-SVN: r95353
2005-02-21 21:39:33 +00:00
Steven G. Kargl 5920b5d2e8 re PR libfortran/20085 (iargc returns wrong count for number of program arguments)
PR 20085
* intrinsic/args.c (iargc): Off by 1.

From-SVN: r95302
2005-02-20 15:24:02 +00:00
Steven G. Kargl d3f9c1b9bc * intrinsic/date_and_time.c: Fix conformance problems.
From-SVN: r95284
2005-02-19 18:06:00 +00:00
James A. Morrison 587579571d re PR fortran/19294 (intrinsic_transpose.f90 runtime crash)
2005-01-23  James A. Morrison  <phython@gcc.gnu.org>
	Paul Brook  <paul@codesourcery.com>

	PR fortran/19294
	* iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
	transpose_c8 for complex types.
libgfortran/
	* Makefile.am: Add transpose_c4.c and transpose_c8.c.
	* intrinsics/cshift0.c: Use separate optimized loops for complex types.
	* m4/transpose.m4: Include type letter in function name.
	* Makefile.in: Regenerate.
	* generated/transpose_*.c: Regenerate.

Co-Authored-By: Paul Brook <paul@codesourcery.com>

From-SVN: r94116
2005-01-23 17:01:00 +00:00
Toon Moene 57dea9f62e re PR libfortran/19280 (Inconsistent licensing of libgfortran)
2005-01-12  Toon Moene  <toon@moene.indiv.nluug.nl>

	PR libfortran/19280
	c99_protos.h: License changed to GPL+exception.
	libgfortran.h: Ditto.
	intrinsics/abort.c: Ditto.
	intrinsics/args.c: Ditto.
	intrinsics/associated.c: Ditto.
	intrinsics/bessel.c: Ditto.
	intrinsics/c99_functions.c: Ditto.
	intrinsics/cpu_time.c: Ditto.
	intrinsics/cshift0.c: Ditto.
	intrinsics/date_and_time.c: Ditto.
	intrinsics/env.c: Ditto.
	intrinsics/eoshift0.c: Ditto.
	intrinsics/eoshift2.c: Ditto.
	intrinsics/erf.c: Ditto.
	intrinsics/etime.c: Ditto.
	intrinsics/exit.c: Ditto.
	intrinsics/flush.c: Ditto.
	intrinsics/fnum.c: Ditto.
	intrinsics/getXid.c: Ditto.
	intrinsics/getcwd.c: Ditto.
	intrinsics/ishftc.c: Ditto.
	intrinsics/mvbits.c: Ditto.
	intrinsics/pack_generic.c: Ditto.
	intrinsics/rand.c: Ditto.
	intrinsics/random.c: Ditto.
	intrinsics/reshape_generic.c: Ditto.
	intrinsics/reshape_packed.c: Ditto.
	intrinsics/size.c: Ditto.
	intrinsics/spread_generic.c: Ditto.
	intrinsics/stat.c: Ditto.
	intrinsics/string_intrinsics.c: Ditto.
	intrinsics/system.c: Ditto.
	intrinsics/system_clock.c: Ditto.
	intrinsics/transpose_generic.c: Ditto.
	intrinsics/umask.c: Ditto.
	intrinsics/unlink.c: Ditto.
	intrinsics/unpack_generic.c: Ditto.
	io/backspace.c: Ditto.
	io/close.c: Ditto.
	io/endfile.c: Ditto.
	io/format.c: Ditto.
	io/inquire.c: Ditto.
	io/io.h: Ditto.
	io/list_read.c: Ditto.
	io/lock.c: Ditto.
	io/open.c: Ditto.
	io/read.c: Ditto.
	io/rewind.c: Ditto.
	io/transfer.c: Ditto.
	io/unit.c: Ditto.
	io/unix.c: Ditto.
	io/write.c: Ditto.
	m4/all.m4: Ditto.
	m4/any.m4: Ditto.
	m4/cexp.m4: Ditto.
	m4/chyp.m4: Ditto.
	m4/count.m4: Ditto.
	m4/cshift1.m4: Ditto.
	m4/ctrig.m4: Ditto.
	m4/dotprod.m4: Ditto.
	m4/dotprodc.m4: Ditto.
	m4/dotprodl.m4: Ditto.
	m4/eoshift1.m4: Ditto.
	m4/eoshift3.m4: Ditto.
	m4/exponent.m4: Ditto.
	m4/fraction.m4: Ditto.
	m4/head.m4: Ditto.
	m4/iforeach.m4: Ditto.
	m4/ifunction.m4: Ditto.
	m4/in_pack.m4: Ditto.
	m4/in_unpack.m4: Ditto.
	m4/iparm.m4: Ditto.
	m4/matmul.m4: Ditto.
	m4/matmull.m4: Ditto.
	m4/maxloc0.m4: Ditto.
	m4/maxloc1.m4: Ditto.
	m4/maxval.m4: Ditto.
	m4/minloc0.m4: Ditto.
	m4/minloc1.m4: Ditto.
	m4/minval.m4: Ditto.
	m4/mtype.m4: Ditto.
	m4/nearest.m4: Ditto.
	m4/pow.m4: Ditto.
	m4/product.m4: Ditto.
	m4/reshape.m4: Ditto.
	m4/set_exponent.m4: Ditto.
	m4/shape.m4: Ditto.
	m4/specific.m4: Ditto.
	m4/specific2.m4: Ditto.
	m4/sum.m4: Ditto.
	m4/transpose.m4: Ditto.
	m4/types.m4: Ditto.
	runtime/environ.c: Ditto.
	runtime/error.c: Ditto.
	runtime/in_pack_generic.c: Ditto.
	runtime/in_unpack_generic.c: Ditto.
	runtime/main.c: Ditto.
	runtime/memory.c: Ditto.
	runtime/normalize.c: Ditto.
	runtime/pause.c: Ditto.
	runtime/select.c: Ditto.
	runtime/stop.c: Ditto.
	runtime/string.c: Ditto.
	generated/_abs_c4.f90: Regenerated.
	generated/_abs_c8.f90: Regenerated.
	generated/_abs_i4.f90: Regenerated.
	generated/_abs_i8.f90: Regenerated.
	generated/_abs_r4.f90: Regenerated.
	generated/_abs_r8.f90: Regenerated.
	generated/_acos_r4.f90: Regenerated.
	generated/_acos_r8.f90: Regenerated.
	generated/_aint_r4.f90: Regenerated.
	generated/_aint_r8.f90: Regenerated.
	generated/_anint_r4.f90: Regenerated.
	generated/_anint_r8.f90: Regenerated.
	generated/_asin_r4.f90: Regenerated.
	generated/_asin_r8.f90: Regenerated.
	generated/_atan2_r4.f90: Regenerated.
	generated/_atan2_r8.f90: Regenerated.
	generated/_atan_r4.f90: Regenerated.
	generated/_atan_r8.f90: Regenerated.
	generated/_conjg_c4.f90: Regenerated.
	generated/_conjg_c8.f90: Regenerated.
	generated/_cos_c4.f90: Regenerated.
	generated/_cos_c8.f90: Regenerated.
	generated/_cos_r4.f90: Regenerated.
	generated/_cos_r8.f90: Regenerated.
	generated/_cosh_r4.f90: Regenerated.
	generated/_cosh_r8.f90: Regenerated.
	generated/_dim_i4.f90: Regenerated.
	generated/_dim_i8.f90: Regenerated.
	generated/_dim_r4.f90: Regenerated.
	generated/_dim_r8.f90: Regenerated.
	generated/_exp_c4.f90: Regenerated.
	generated/_exp_c8.f90: Regenerated.
	generated/_exp_r4.f90: Regenerated.
	generated/_exp_r8.f90: Regenerated.
	generated/_log10_r4.f90: Regenerated.
	generated/_log10_r8.f90: Regenerated.
	generated/_log_c4.f90: Regenerated.
	generated/_log_c8.f90: Regenerated.
	generated/_log_r4.f90: Regenerated.
	generated/_log_r8.f90: Regenerated.
	generated/_mod_i4.f90: Regenerated.
	generated/_mod_i8.f90: Regenerated.
	generated/_mod_r4.f90: Regenerated.
	generated/_mod_r8.f90: Regenerated.
	generated/_sign_i4.f90: Regenerated.
	generated/_sign_i8.f90: Regenerated.
	generated/_sign_r4.f90: Regenerated.
	generated/_sign_r8.f90: Regenerated.
	generated/_sin_c4.f90: Regenerated.
	generated/_sin_c8.f90: Regenerated.
	generated/_sin_r4.f90: Regenerated.
	generated/_sin_r8.f90: Regenerated.
	generated/_sinh_r4.f90: Regenerated.
	generated/_sinh_r8.f90: Regenerated.
	generated/_sqrt_c4.f90: Regenerated.
	generated/_sqrt_c8.f90: Regenerated.
	generated/_sqrt_r4.f90: Regenerated.
	generated/_sqrt_r8.f90: Regenerated.
	generated/_tan_r4.f90: Regenerated.
	generated/_tan_r8.f90: Regenerated.
	generated/_tanh_r4.f90: Regenerated.
	generated/_tanh_r8.f90: Regenerated.
	generated/all_l4.c: Regenerated.
	generated/all_l8.c: Regenerated.
	generated/any_l4.c: Regenerated.
	generated/any_l8.c: Regenerated.
	generated/count_4_l4.c: Regenerated.
	generated/count_4_l8.c: Regenerated.
	generated/count_8_l4.c: Regenerated.
	generated/count_8_l8.c: Regenerated.
	generated/cshift1_4.c: Regenerated.
	generated/cshift1_8.c: Regenerated.
	generated/dotprod_c4.c: Regenerated.
	generated/dotprod_c8.c: Regenerated.
	generated/dotprod_i4.c: Regenerated.
	generated/dotprod_i8.c: Regenerated.
	generated/dotprod_l4.c: Regenerated.
	generated/dotprod_l8.c: Regenerated.
	generated/dotprod_r4.c: Regenerated.
	generated/dotprod_r8.c: Regenerated.
	generated/eoshift1_4.c: Regenerated.
	generated/eoshift1_8.c: Regenerated.
	generated/eoshift3_4.c: Regenerated.
	generated/eoshift3_8.c: Regenerated.
	generated/exp_c4.c: Regenerated.
	generated/exp_c8.c: Regenerated.
	generated/exponent_r4.c: Regenerated.
	generated/exponent_r8.c: Regenerated.
	generated/fraction_r4.c: Regenerated.
	generated/fraction_r8.c: Regenerated.
	generated/hyp_c4.c: Regenerated.
	generated/hyp_c8.c: Regenerated.
	generated/in_pack_i4.c: Regenerated.
	generated/in_pack_i8.c: Regenerated.
	generated/in_unpack_i4.c: Regenerated.
	generated/in_unpack_i8.c: Regenerated.
	generated/matmul_c4.c: Regenerated.
	generated/matmul_c8.c: Regenerated.
	generated/matmul_i4.c: Regenerated.
	generated/matmul_i8.c: Regenerated.
	generated/matmul_l4.c: Regenerated.
	generated/matmul_l8.c: Regenerated.
	generated/matmul_r4.c: Regenerated.
	generated/matmul_r8.c: Regenerated.
	generated/maxloc0_4_i4.c: Regenerated.
	generated/maxloc0_4_i8.c: Regenerated.
	generated/maxloc0_4_r4.c: Regenerated.
	generated/maxloc0_4_r8.c: Regenerated.
	generated/maxloc0_8_i4.c: Regenerated.
	generated/maxloc0_8_i8.c: Regenerated.
	generated/maxloc0_8_r4.c: Regenerated.
	generated/maxloc0_8_r8.c: Regenerated.
	generated/maxloc1_4_i4.c: Regenerated.
	generated/maxloc1_4_i8.c: Regenerated.
	generated/maxloc1_4_r4.c: Regenerated.
	generated/maxloc1_4_r8.c: Regenerated.
	generated/maxloc1_8_i4.c: Regenerated.
	generated/maxloc1_8_i8.c: Regenerated.
	generated/maxloc1_8_r4.c: Regenerated.
	generated/maxloc1_8_r8.c: Regenerated.
	generated/maxval_i4.c: Regenerated.
	generated/maxval_i8.c: Regenerated.
	generated/maxval_r4.c: Regenerated.
	generated/maxval_r8.c: Regenerated.
	generated/minloc0_4_i4.c: Regenerated.
	generated/minloc0_4_i8.c: Regenerated.
	generated/minloc0_4_r4.c: Regenerated.
	generated/minloc0_4_r8.c: Regenerated.
	generated/minloc0_8_i4.c: Regenerated.
	generated/minloc0_8_i8.c: Regenerated.
	generated/minloc0_8_r4.c: Regenerated.
	generated/minloc0_8_r8.c: Regenerated.
	generated/minloc1_4_i4.c: Regenerated.
	generated/minloc1_4_i8.c: Regenerated.
	generated/minloc1_4_r4.c: Regenerated.
	generated/minloc1_4_r8.c: Regenerated.
	generated/minloc1_8_i4.c: Regenerated.
	generated/minloc1_8_i8.c: Regenerated.
	generated/minloc1_8_r4.c: Regenerated.
	generated/minloc1_8_r8.c: Regenerated.
	generated/minval_i4.c: Regenerated.
	generated/minval_i8.c: Regenerated.
	generated/minval_r4.c: Regenerated.
	generated/minval_r8.c: Regenerated.
	generated/nearest_r4.c: Regenerated.
	generated/nearest_r8.c: Regenerated.
	generated/pow_c4_i4.c: Regenerated.
	generated/pow_c4_i8.c: Regenerated.
	generated/pow_c8_i4.c: Regenerated.
	generated/pow_c8_i8.c: Regenerated.
	generated/pow_i4_i4.c: Regenerated.
	generated/pow_i4_i8.c: Regenerated.
	generated/pow_i8_i4.c: Regenerated.
	generated/pow_i8_i8.c: Regenerated.
	generated/pow_r4_i4.c: Regenerated.
	generated/pow_r4_i8.c: Regenerated.
	generated/pow_r8_i4.c: Regenerated.
	generated/pow_r8_i8.c: Regenerated.
	generated/product_c4.c: Regenerated.
	generated/product_c8.c: Regenerated.
	generated/product_i4.c: Regenerated.
	generated/product_i8.c: Regenerated.
	generated/product_r4.c: Regenerated.
	generated/product_r8.c: Regenerated.
	generated/reshape_i4.c: Regenerated.
	generated/reshape_i8.c: Regenerated.
	generated/set_exponent_r4.c: Regenerated.
	generated/set_exponent_r8.c: Regenerated.
	generated/shape_i4.c: Regenerated.
	generated/shape_i8.c: Regenerated.
	generated/sum_c4.c: Regenerated.
	generated/sum_c8.c: Regenerated.
	generated/sum_i4.c: Regenerated.
	generated/sum_i8.c: Regenerated.
	generated/sum_r4.c: Regenerated.
	generated/sum_r8.c: Regenerated.
	generated/transpose_i4.c: Regenerated.
	generated/transpose_i8.c: Regenerated.
	generated/trig_c4.c: Regenerated.
	generated/trig_c8.c: Regenerated.

From-SVN: r93235
2005-01-12 21:27:33 +00:00
Tobias Schlüter 56746a0745 trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to logicalshift.
gcc/fortran/
* trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
logicalshift.  Call fold.  Remove 0-bit shift shortcut.
(gfc_conv_intrinsic_ishftc): Convert first argument to at least
4 bytes bits.  Convert 2nd and 3rd argument to 4 bytes.  Convert
result if width(arg 1) < 4 bytes.  Call fold.

libgfortran/
* libgfortran/libgfortran.h (GFC_UINTEGER_1, GFC_UINTEGER_2):
Define.
* intrinsics/ishftc.c: Update copyright years.
(ishftc8): Change 'shift' and 'size' to GFC_INTEGER_4.
* intrinsics/mvbits.c: Correcty non-ASCII character in my name.
Add implementations for GFC_INTEGER_1 and GFC_INTEGER_2.

gcc/testsuite/
* gfortran.dg/g77/f90-intrinsic-bit.f: New.

From-SVN: r92642
2004-12-27 17:43:25 +01:00
Steven G. Kargl 985791f6fe re PR libfortran/18966 (cshift etc. not implemented for kind=1 and kind=2 actual arguments)
PR libfortran/18966
        * gfortran.h: typedef GFC_INTEGER_1 and GFC_INTEGER_2
        * intrinsics/cshift0.c (cshift0_1,cshift0_2): New functions.
        * intrinsics/eoshift0.c (eoshift0_1,eoshift0_2): New functions.
        * intrinsics/eoshift2.c (eoshift2_1,eoshift2_2): New functions.

From-SVN: r92132
2004-12-14 10:43:36 +00:00
Richard Henderson 7f68c75fb3 iresolve.c (gfc_resolve_all, [...]): Use PREFIX.
gcc/fortran/
        * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
        gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
        gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
        gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
        gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
        gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
        gfc_resolve_unpack: Use PREFIX.
libgfortran/
        * intrinsics/cshift0.c, intrinsics/eoshift0.c, intrinsics/eoshift2.c,
        intrinsics/pack_generic.c, intrinsics/reshape_generic.c,
        intrinsics/spread_generic.c, intrinsics/transpose_generic.c,
        intrinsics/unpack_generic.c, m4/cshift1.m4, m4/dotprod.m4,
        m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4,
        m4/iforeach.m4, m4/ifunction.m4, m4/matmul.m4, m4/matmull.m4,
        m4/reshape.m4, m4/shape.m4, m4/transpose.m4: Use standard prefix
        instead of "__".
        * generated/*: Rebuild.

From-SVN: r92075
2004-12-12 18:47:58 -08:00
Richard Henderson 7d7b8bfe55 acinclude.m4 (LIBGFOR_CHECK_ATTRIBUTE_VISIBILITY): New.
* acinclude.m4 (LIBGFOR_CHECK_ATTRIBUTE_VISIBILITY): New.
        (LIBGFOR_CHECK_ATTRIBUTE_DLLEXPORT): New.
        (LIBGFOR_CHECK_ATTRIBUTE_ALIAS): New.
        * configure.ac: Use them.
        * configure, config.h.in, aclocal.m4: Rebuild.
        * libgfortran.h (prefix): Remove.
        (PREFIX, IPREFIX): New.
        (sym_rename, sym_rename1, sym_rename2): New.
        (internal_proto, export_proto, export_proto_np): New.
        (iexport_proto, iexport): New.
        (iexport_data_proto, iexport_data): New.
        * intrinsics/abort.c, intrinsics/args.c, intrinsics/associated.c,
        intrinsics/cpu_time.c, intrinsics/cshift0.c,
        intrinsics/date_and_time.c, intrinsics/env.c, intrinsics/eoshift0.c,
        intrinsics/eoshift2.c, intrinsics/etime.c, intrinsics/exit.c,
        intrinsics/flush.c, intrinsics/fnum.c, intrinsics/getXid.c,
        intrinsics/getcwd.c, intrinsics/ishftc.c, intrinsics/mvbits.c,
        intrinsics/pack_generic.c, intrinsics/rand.c, intrinsics/random.c,
        intrinsics/reshape_generic.c, intrinsics/size.c,
        intrinsics/spread_generic.c, intrinsics/stat.c,
        intrinsics/string_intrinsics.c, intrinsics/system.c,
        intrinsics/system_clock.c, intrinsics/transpose_generic.c,
        intrinsics/umask.c, intrinsics/unlink.c, intrinsics/unpack_generic.c,
        io/backspace.c, io/close.c, io/endfile.c, io/inquire.c, io/io.h,
        io/open.c, io/rewind.c, io/transfer.c, libgfortran.h, m4/cshift1.m4,
        m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4,
        m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/iforeach.m4,
        m4/ifunction.m4, m4/matmul.m4, m4/matmull.m4, m4/nearest.m4,
        m4/pow.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4,
        m4/transpose.m4, runtime/environ.c, runtime/error.c,
        runtime/in_pack_generic.c, runtime/in_unpack_generic.c,
        runtime/main.c, runtime/memory.c, runtime/pause.c, runtime/select.c,
        runtime/stop.c: Use them to mark symbols internal or external.
        * generated/*: Rebuild.

From-SVN: r92045
2004-12-12 00:59:05 -08:00
Eric Botcazou 6e4d9244f7 configure.ac: Check for ieeefp.h.
* configure.ac: Check for ieeefp.h.  Check for fabsf in libm.
	* configure: Regenerate.
	* config.h.in: Likewise.
	* c99_protos.h: New file.
	* libgfortran.h: Include c99_protos.h and conditionally ieeefp.h.
	* intrinsics/c99_functions.c (fabsf): New function.

From-SVN: r91832
2004-12-07 23:43:40 +00:00
Richard Henderson 07d3cebe24 cshift0.c, [...]: Use internal_malloc_size instead of internal_malloc.
* intrinsics/cshift0.c, intrinsics/eoshift0.c, intrinsics/eoshift2.c,
        intrinsics/pack_generic.c, intrinsics/string_intrinsics.c,
        intrinsics/transpose_generic.c, m4/ifunction.m4, m4/matmul.m4,
        m4/matmull.m4, m4/transpose.m4: Use internal_malloc_size instead
        of internal_malloc.
        * generated/*: Rebuild.

From-SVN: r91799
2004-12-06 16:24:44 -08:00
Richard Henderson f21edfd62d c99_functions.c, [...]: Whitespace fixes.
* intrinsics/c99_functions.c, intrinsics/eoshift0.c,
        intrinsics/eoshift2.c, intrinsics/exit.c, intrinsics/flush.c,
        intrinsics/ishftc.c, intrinsics/mvbits.c, intrinsics/pack_generic.c,
        intrinsics/random.c, intrinsics/reshape_generic.c, intrinsics/size.c,
        intrinsics/spread_generic.c, intrinsics/stat.c,
	intrinsics/string_intrinsics.c, intrinsics/system_clock.c,
        intrinsics/transpose_generic.c, intrinsics/unlink.c,
        intrinsics/unpack_generic.c, io/backspace.c, io/format.c,
        io/list_read.c, io/lock.c, io/open.c, io/transfer.c, io/unix.c,
        io/write.c, runtime/environ.c, runtime/error.c,
        runtime/in_pack_generic.c, runtime/in_unpack_generic.c, runtime/main.c,
        runtime/memory.c, runtime/pause.c, runtime/stop.c,
        runtime/string.c: Whitespace fixes.

From-SVN: r91794
2004-12-06 16:01:01 -08:00
Steven G. Kargl f177a08700 flush.c: New file.
2004-12-02  Steven G. Kargl  <kargls@comcast.net>
	Paul Brook  <paul@codesourcery.com>

libgfortran/
	* intrinsics/flush.c: New file.
	* intrinsics/fnum.c: ditto
	* intrinsics/stat.c: ditto
	* io/io.h (unit_to_fd): Add prototype.
	* io/unix.c (unit_to_fd): New function.
	* configure.ac: Add test for members of struct stat.  Check for
	sys/types.h and sys/stat.h
	* Makefile.am: Add intrinsics/{flush.c,fnum.c,stat.c}
	* configure.in: Regenerate.
	* config.h.in: Regenerate.
	* Makefile.in: Regenerate.
fortran/
	* check.c (gfc_check_flush, gfc_check_fnum): New functions.
	(gfc_check_fstat, gfc_check_fstat_sub): New functions.
	(gfc_check_stat, gfc_check_stat_sub): New functions.
	* gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
	* intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
	fstat, and stat to intrinsics symbol tables.
	* intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
	(gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
	* iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
	(gfc_resolve_stat, gfc_resolve_flush): New functions.
	(gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
	* trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.

From-SVN: r91611
2004-12-02 04:20:09 +00:00
Steven Bosscher 69d3c9a43e re PR libfortran/15960 (missing function 'finite' on HP-UX 11.11)
PR libfortran/15960
	* configure.ac: Check for finite in libm.
	* libgfortran.h: Define isfinite macro if not defined.
	* intrinsics/c99_functions.c: Use defined(fpclassify) instead of
	HAVE_FPCLASSIFY.
	* io/write.c (write_float): Use isfinite instead of finite.
	* configure, config.h.in: Rebuilt.

From-SVN: r91064
2004-11-23 02:02:38 +00:00
Eric Botcazou 3969c39f61 re PR libfortran/16135 (libfortran doesn't build, use of C99 types)
PR target/16135
	* acinclude.m4 (LIBGFOR_TARGET_ILP32): New check.
	* configure.ac: Include LIBGFOR_TARGET_ILP32.
	* configure: Regenerate.
	* config.h.in: Likewise.
	* libgfortran.h: Provide default definitions for C99 types
	on ILP32 targets that don't have them.

	PR target/17999
	* configure.ac: Check for snprintf.
	* configure: Regenerate.
	* config.h.in: Likewise.
	* intrinsics/date_and_time.c (date_and_time): Do not
	use snprinf if it is not available.
	* io/write.c (output_float): Likewise.

From-SVN: r90964
2004-11-20 13:15:17 +00:00
Steven G. Kargl d8fe26b2cd check.c (gfc_check_getcwd_sub): Fix seg fault.
* check.c (gfc_check_getcwd_sub): Fix seg fault.

	* check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
	gfc_check_unlink,gfc_check_unlink_sub): New functions
	* gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
	* intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
	exit to intrinsics symbol tables.
	* intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
	gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
	gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
	gfc_resolve_unlink_sub): Add and sort prototypes.
	* iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
	gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
	* trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols

libgfortran/
	* Makefile.am: Add intrinsics/{umask.c,unlink.c,exit.c}
	* Makefile.in: Regenerated
	* intrinsics/umask.c: New file
	* intrinsics/unlink.c: ditto
	* intrinsics/exit.c: ditto

From-SVN: r90949
2004-11-20 01:44:49 +00:00
Aaron W. LaFramboise 8cfe17f951 system.c ("libgfortran.h"): Move after system headers.
2004-10-30  Aaron W. LaFramboise <aaronavay62@aaronwl.com>

	*  intrinsics/system.c ("libgfortran.h"): Move after system headers.

From-SVN: r89891
2004-10-30 15:04:20 +00:00
Canqun Yang 7a003d8e2e check.c (gfc_check_rand): Allow missing optional argument.
2004-10-30  Canqun Yang  <canqun@nudt.edu.cn>

	* check.c (gfc_check_rand): Allow missing optional argument.
	(gfc_check_irand): Ditto.
	* intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
libgfortran/
	* intrinsics/rand.c (irand): Handle NULL argument.

From-SVN: r89886
2004-10-30 14:18:34 +00:00
Paul Brook 82e7998648 string_intrinsics.c (string_verify): Fix off by one error.
* intrinsics/string_intrinsics.c (string_verify): Fix off by one
	error.
testsuite/
	* gfortran.dg/intrinsic_verify_1.f90: New test.

From-SVN: r88704
2004-10-07 20:19:32 +00:00
Andrew Pinski 1ee3acfb08 mvbits.c: Commit the file.
2004-10-04  Andrew Pinski  <pinskia@physics.uc.edu>

        * intrinsics/mvbits.c: Commit the file.

From-SVN: r88541
2004-10-04 19:31:10 -07:00
Tobias Schlüter 5b1374e965 re PR fortran/17776 (no subroutine system)
fortran/
PR fortran/17776
* check.c (gfc_check_system_sub): New function.
* gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
* intrinsic.c (add_functions): Add 'system'.
(add_subroutines): Add 'system'.
* intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
Move prototypes to other suborutines.
(gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
Add prototype.
(gfc_resolve_system_clock): Fix formatting of prototype.
* iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
functions.
* trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
GFC_ISYM_SYSTEM.

libgfortran/
PR fortran/17776
* intrinsics/system.c: New file.
* Makefile.am: Add dependency for the new file.
* Makefile.in: Regenerate.

From-SVN: r88532
2004-10-04 23:30:32 +02:00
Tobias Schlüter 58c5b409e8 re PR fortran/17283 (UNPACK issues)
PR fortran/17283
fortran/
* iresolve.c (gfc_resolve_pack): Choose function depending if mask is
scalar.
libgfortran/
* intrinsics/pack_generic.c (__pack): Allocate memory for return array
if not done by caller.
(__pack_s): New function.
* runtime/memory.c (internal_malloc, internal_malloc64): Allow
allocating zero memory.
testsuite/
* gfortran.fortran-torture/execute/intrinsic_pack.f90: Add more tests.

From-SVN: r88526
2004-10-04 21:27:29 +02:00
Aaron W. LaFramboise 830219eec1 abort.c ("libgfortran.h"): Move.
2004-10-03  Aaron W. LaFramboise <aaronavay62@aaronwl.com>

	* intrinsics/abort.c ("libgfortran.h"): Move.
	* intrinsics/date_and_time.c ("libgfortran.h"): Same.
	* intrinsics/write.c ("libgfortran.h"): Same.

From-SVN: r88444
2004-10-03 12:04:15 +00:00
Tobias Schlüter bf4d99cf13 re PR libfortran/16137 (Fortran compiler unable to produce executables as libfortran depends on C99 math functions)
PR libfortran/16137
* config.h.in (HAVE_POWF): Undefine.
* configure.ac: Check for 'powf' in library.
* configure: Regenerate.
* intrinsics/c99_functions.c (powf): New function.

From-SVN: r88128
2004-09-26 16:52:04 +02:00
Tobias Schlüter 487c67b637 * intrinsics/etime.c (etime_): New function.
From-SVN: r88052
2004-09-24 18:49:10 +02:00
Steven G. Kargl c6847e25b9 libgfortran.h: define gfc_alloca()
2004-09-21  Steven G. Kargl  <kargls@comcast.net>

* libgfortran.h: define gfc_alloca()
* intrinsics/env.c (getenv, get_environment_variable_i4): Use it.

From-SVN: r87801
2004-09-21 14:38:34 +02:00
Steven G. Kargl a8c60d7fff check.c (gfc_check_getcwd_sub): New function.
2004-09-15  Steven G. Kargl  <kargls@comcast.net>

	* check.c (gfc_check_getcwd_sub): New function.
	* gfortran.h (GFC_ISYM_GETCWD): New symbol.
	* intrinsic.c (add_functions): Add function definition;
	Use symbol.
	* intrinsic.c (add_subroutines): Add subroutine definitions.
	* intrinsic.h: Add prototypes.
	* iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
	New functions.
	* trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
libgfortran/
	* intrinsics/getcwd.c: New file.
	* Makefile.am: Add getcwd.c.
	* Makefile.in: Regenerated.

From-SVN: r87552
2004-09-15 14:09:17 +00:00
Steven G. Kargl 3869a92c04 env.c (getenv, [...]): Remove trailing white space.
2004-09-15  Steven G. Kargl  <kargls@comcast.net>
	Paul Brook  <paul@codesourcery.com>

	* intrinsics/env.c (getenv, get_environmental_variable): Remove
	trailing white space.  Uase alloca.  Honour trim_name.

Co-Authored-By: Paul Brook <paul@codesourcery.com>

From-SVN: r87547
2004-09-15 12:59:22 +00:00
Richard Henderson 803a6ff52c cshift0.c (DEF_COPY_LOOP, [...]): New.
* intrinsics/cshift0.c (DEF_COPY_LOOP, copy_loop_int, copy_loop_long,
        copy_loop_double, copy_loop_ldouble): New.
        (__cshift0): Make shift type ssize_t.  Use % operator instead of
        div.  Use specialized versions of copy loop depending on the shape.

From-SVN: r87045
2004-09-03 12:03:43 -07:00
Tobias Schlüter d7177ab25e trans-decl.c, [...]: Replace all occurences of 'gfc_strlen_type_node' by 'gfc_charlen_type_node'.
fortran/
* trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
all occurences of 'gfc_strlen_type_node' by
'gfc_charlen_type_node'.
* trans-types.h: Same. Also update comment accordingly.

libgfortran/
* libgfortran.h: Replace 'gfc_strlen_type' by
'gfc_charlen_type'. Update comment accordingly.
* intrinsics/args.c, intrinsics/env.c, io/io.h, io/transfer.c:
Replace all occurences of 'gfc_strlen_type' by 'gfc_charlen_type'.

From-SVN: r86828
2004-08-31 16:06:48 +02:00
Richard Henderson 625be28635 Makefile.am (gfor_helper_src): Split selected_kind.f90.
* Makefile.am (gfor_helper_src): Split selected_kind.f90.
        (gfor_built_src): Add selected_int_kind.inc selected_real_kind.inc.
        (selected_int_kind.inc selected_real_kind.inc): New rules.
        * Makefile.in: Regenerate.
        * mk-sik-inc.sh, mk-srk-inc.sh: New files.
        * intrinsics/selected_int_kind.f90: Split from selected_kind.f90,
        include table of detected kinds.
        * intrinsics/selected_real_kind.f90: Similarly.

From-SVN: r86801
2004-08-30 14:34:37 -07:00
Steven G. Kargl 048c989961 bessel.c: New file.
2004-08-29  Steven G. Kargl  <kargls@comcast.net>
	Paul Brook  <paul@codesourcery.com>

	* intrinsics/bessel.c: New file.
	* intrinsics/erf.c: New file.
	* Makefie.am: Add intrinsics/bessel.c and intrinsics/erf.c.
	* configure.ac: Test for C99 Bessel and Error functions.
	* Makefile.in: Regenerate.
	* config.h.in: Regenerate.
	* configure: Regenerate.

From-SVN: r86728
2004-08-29 16:31:16 +00:00
Steven G. Kargl 4c0c6b9f2c gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
2004-08-29  Steven G. Kargl  <kargls@comcast.net>
	Paul Brook  <paul@codesourcery.com>

	* gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
	(gfc_check_f, gfc_simplify_f): Add f0.
	* intrinsic.c (do_check): Call f0.  Flatten.
	(add_sym_0): Fix prototype.  Set f0.
	(add_functions): Add getgid, getgid and getuid.
	(resolve_intrinsic): Remove obsolete comment.
	(do_simplify): Call f0.
	* intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
	gfc_resolve_getuid): Add prototypes.
	* iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
	gfc_resolve_getuid): New functions.
	* trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
	GFC_ISYM_GET?ID.
libgfortran/
	* Makefile.am: Add intrinsics/getXid.c.
	* configure.ac: Add tests for get{g,p,u}id.
	* config.h.in: Regenerate.
	* Makefile.in: Regenerate.
	* configure: Regenerate.

Co-Authored-By: Paul Brook <paul@codesourcery.com>

From-SVN: r86703
2004-08-28 23:43:41 +00:00
Bud Davis 02d735f6bd re PR libfortran/17164 (index function not working properly)
2004-08-24  Bud Davis  <bdavis9659@comcast.net>

        PR fortran/17164
        * runtime/string_intrinsics.c (string_index):check for
        substring longer than string.
        * gfortran.dg/pr17164.f90: New test.

From-SVN: r86527
2004-08-25 00:14:07 +00:00
Roger Sayle 067a5735c5 c99_functions.c (nextafterf): New implementation that works correctly with denormalized numbers.
* intrinsics/c99_functions.c (nextafterf): New implementation that
	works correctly with denormalized numbers.

From-SVN: r85724
2004-08-09 21:09:41 +00:00
Victor Leikehman 883c9d4d12 matmul.m4, [...]: Allocate space if return value has NULL in its data field.
2004-09-09  Victor Leikehman  <lei@il.ibm.com>

	* m4/matmul.m4, m4/matmull.m4, intrinsics/eoshift0.c,
	intrinsics/eoshift2.c, intrinsics/transpose_generic.c:
	Allocate space if return value has NULL in its data field.
	* generated/*.c: Regenerate.

From-SVN: r85717
2004-08-09 14:34:39 +00:00
Janne Blomqvist aa6fc63508 intrinsic.c (add_subroutines): Add getenv and get_environment_variable.
2004-08-06  Janne Blomqvist  <jblomqvi@cc.hut.fi>

	* 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.

From-SVN: r85656
2004-08-06 21:47:03 +00:00
Victor Leikehman 6c167c45b1 * libgfortran.h (array_t, size0) New declarations.
* m4/ifunction.m4, m4/transpose.m4, intrinsics/cshift0.c: Allocate
	space if return value descriptor has NULL in its data field,
	and initialize bounds and stride.
	* intrinsics/size.c (array_t, size0): Declarations moved to
	libgfortran.h.
	* generated/*.c: Regenerate.

From-SVN: r85558
2004-08-04 14:30:46 +00:00
Roger Sayle 453310d80b re PR libfortran/16137 (Fortran compiler unable to produce executables as libfortran depends on C99 math functions)
PR libgfortran/16137
	* configure.ac: Add tests for acosf, asinf, atan2f, atanf, ceilf,
	copysignf, cosf, coshf, expf, floorf, frexpf, hypotf, logf, log10f,
	scalbnf, sinf, sinhf, sqrtf, tanf and tanhf in libm.
	* config.h.in: Regenerate.
	* configure: Regenerate.

	* instrinsics/c99_functions.c (acosf, asinf, atan2f, atanf, ceilf,
	copysignf, cosf, coshf, expf, floorf, frexpf, hypotf, logf, log10f,
	nextafterf, scalbnf, sinf, sinhf, sqrtf, tanf, tanhf): New stub
	implementations for targets that don't support C99 float functions.

From-SVN: r85473
2004-08-03 13:28:26 +00:00
Janne Blomqvist b41b25345b re PR libfortran/15280 (Fortran9x commandline not accessable)
PR fortran/15280
	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.

Co-Authored-By: Paul Brook <paul@codesourcery.com>

From-SVN: r84087
2004-07-04 17:00:12 +00:00
Steve Kargl fd53dbe051 rand.c (rand): Wrap the irand() call from the previous commit in prefix.
* intrinsics/rand.c (rand): Wrap the irand() call from the previous
	commit in prefix.

Co-Authored-By: Steven Bosscher <stevenb@suse.de>

From-SVN: r83895
2004-06-30 08:21:54 +00:00
Tobias Schlüter beabab5904 Paul Brook <paul@codesourcery.com>
2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
Paul Brook  <paul@codesourcery.com>

* runtime/normalize.c (normalize_r4_i4, normalize_r8_i8): Fix
comments.
* intrinsics/rand.c (rand): Call irand() in call to normalize_r4_i4.

Co-Authored-By: Paul Brook <paul@codesourcery.com>

From-SVN: r83880
2004-06-30 00:52:58 +02:00
Steven G. Kargl 0bf68c6eab etime.c (etime_sub): Remove array rank check; Add check for sufficient space.
* etime.c (etime_sub): Remove array rank check;
	Add check for sufficient space.

From-SVN: r83456
2004-06-21 22:25:12 +00:00
Bud Davis bc20e36d16 re PR libfortran/15292 (libgfortran depends on c99 functionality round and roundf)
2004-06-14  Bud Davis  <bdavis9659@comcast.net>

        PR gfortran/15292
        * intrinsics/c99_functions.c: Use fpclassify if it exists.

From-SVN: r83116
2004-06-14 17:27:20 +00:00
Paul Brook a9e7b9d395 Makefile.am (gfor_helper_src): Add runtime/normalize.f90.
* Makefile.am (gfor_helper_src): Add runtime/normalize.f90.
	* configure.ac: Add checks for nextafter and nextafterf.
	* Makefile.in, config.h.in, configure: Regenerate.
	* libgfortran.h (normalize_r4_i4, normalize_r8_i8): Declare.
	* intrinsics/rand.c (rand): Use normalize_r4_i4.
	* intrinsics/random.c (random_r4): Use normalize_r4_i4.
	(random_r8): Use normalize_r8_i8.
	* runtime/normalize.c: New file.
testsuite/
	* gfortran.fortran-torture/execute/random_2.f90: New test.

From-SVN: r83070
2004-06-13 22:58:30 +00:00