Commit Graph

106 Commits

Author SHA1 Message Date
Thomas Koenig 75f2543f2e re PR libfortran/32972 (performance of pack/unpack)
2008-03-28  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/32972
	PR libfortran/32512
	* Makefile.am:  Add new variable, i_spread_c, containing
	pack_i1.c, pack_i2.c, pack_i4.c, pack_i8.c, spread_i16.c,
	spread_r4.c, spread_r8.c, spread_r10.c, spread_r16.c,
	spread_c4.c, spread_c8.c, spread_c10.c, spread_c16.c.
	* Makefile.in:  Regenerated.
	* libgfortran.h:  Add prototypes for spread_i1, spread_i2,
	spread_i4, spread_i8, spread_i16, spread_r4, spread_r8,
	spread_c4, spread_c8, spread_c10, spread_c16,
	spread_scalar_i1, spread_scalar_i2, spread_scalar_i4,
	spread_scalar_i8, spread_scalar_i16, spread_scalar_r4
	spread_scalar_r8, spread_scalar_c4, spread_scalar_c8,
	spread_scalar_c10 and spread_scalar_c16.
	Add macros to isolate both type and size information
	from array descriptors with a single mask operation.
	* intrinsics/spread_generic.c:  Add calls to specific
	spread functions.
	* m4/spread.m4:  New file.
	* generated/spread_i1.c:  New file.
	* generated/spread_i2.c:  New file.
	* generated/spread_i4.c:  New file.
	* generated/spread_i8.c:  New file.
	* generated/spread_i16.c:  New file.
	* generated/spread_r4.c:  New file.
	* generated/spread_r8.c:  New file.
	* generated/spread_r10.c:  New file.
	* generated/spread_r16.c:  New file.
	* generated/spread_c4.c:  New file.
	* generated/spread_c8.c:  New file.
	* generated/spread_c10.c:  New file.
	* generated/spread_c16.c:  New file.

2008-03-28  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/32972
	PR libfortran/32512
	* intrinsic_spread_1.f90:  New file.
	* intrinsic_spread_2.f90:  New file.
	* intrinsic_spread_3.f90:  New file.

From-SVN: r133702
2008-03-28 23:22:49 +00:00
Thomas Koenig 3478bba466 re PR libfortran/32972 (performance of pack/unpack)
2007-03-23  Thomas Koenig  <tkoenig@gcc.gnu.org

	PR libfortran/32972
	* Makefile.am:  Add new variable, i_unpack_c, containing
	unpack_i1.c, unpack_i2.c, unpack_i4.c, unpack_i8.c,
	unpack_i16.c, unpack_r4.c, unpack_r8.c, unpack_r10.c,
	unpack_r16.c, unpack_c4.c, unpack_c8.c, unpack_c10.c
	and unpack_c16.c
	Add i_unpack_c to gfor_built_src.
	Add rule to generate i_unpack_c from m4/unpack.m4.
	* Makefile.in:  Regenerated.
	* libgfortran.h: Add prototypes for unpack0_i1, unpack0_i2,
	unpack0_i4, unpack0_i8, unpack0_i16, unpack0_r4, unpack0_r8,
	unpack0_r10, unpack0_r16, unpack0_c4, unpack0_c8, unpack0_c10,
	unpack0_c16, unpack1_i1, unpack1_i2, unpack1_i4, unpack1_i8,
	unpack1_i16, unpack1_r4, unpack1_r8, unpack1_r10, unpack1_r16,
	unpack1_c4, unpack1_c8, unpack1_c10 and unpack1_c16.
	* intrinsics/pack_generic.c (unpack1):  Add calls to specific
	unpack1 functions.
	(unpack0):  Add calls to specific unpack0 functions.
	* m4/unpack.m4:  New file.
	* generated/unpack_i1.c:  New file.
	* generated/unpack_i2.c:  New file.
	* generated/unpack_i4.c:  New file.
	* generated/unpack_i8.c:  New file.
	* generated/unpack_i16.c:  New file.
	* generated/unpack_r4.c:  New file.
	* generated/unpack_r8.c:  New file.
	* generated/unpack_r10.c:  New file.
	* generated/unpack_r16.c:  New file.
	* generated/unpack_c4.c:  New file.
	* generated/unpack_c8.c:  New file.
	* generated/unpack_c10.c:  New file.
	* generated/unpack_c16.c:  New file.

2007-03-23  Thomas Koenig  <tkoenig@gcc.gnu.org

	PR libfortran/32972
	* gfortran.dg/intrinsic_unpack_1.f90:  New test case.
	* gfortran.dg/intrinsic_unpack_2.f90:  New test case.
	* gfortran.dg/intrinsic_unpack_3.f90:  New test case.

From-SVN: r133469
2008-03-23 22:19:19 +00:00
Thomas Koenig 3ef2513a1d re PR libfortran/32972 (performance of pack/unpack)
2008-03-21  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/32972
	* Makefile.am:  Add new variable, i_pack_c, containing
	pack_i1.c, pack_i2.c, pack_i4.c, pack_i8.c, pack_i16.c,
	pack_r4.c, pack_r8.c, pack_r10.c, pack_r16.c, pack_c4.c,
	pack_c8.c, pack_c10.c, pack_c16.c.
	Add m4/pack.m4 to m4_files.
	Add i_pack_c to gfor_built_src.
	Add rule to generate i_pack_c from m4/pack.m4.
	* Makefile.in:  Regenerated.
	* libgfortran.h: Add prototypes for pack_i1, pack_i2, pack_i4,
	pack_i8, pack_i16, pack_r4, pack_r8, pack_c4, pack_c8,
	pack_c10, pack_c16.
	* intrinsics/pack_generic.c:  Add calls to specific
	pack functions.
	* m4/pack.m4:  New file.
	* generated/pack_i1.c:  New file.
	* generated/pack_i2.c:  New file.
	* generated/pack_i4.c:  New file.
	* generated/pack_i8.c:  New file.
	* generated/pack_i16.c:  New file.
	* generated/pack_r4.c:  New file.
	* generated/pack_r8.c:  New file.
	* generated/pack_r10.c:  New file.
	* generated/pack_r16.c:  New file.
	* generated/pack_c4.c:  New file.
	* generated/pack_c8.c:  New file.
	* generated/pack_c10.c:  New file.
	* generated/pack_c16.c:  New file.

2008-03-21  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/32972
	* internal_pack_1.f90:  New test case.
	* internal_pack_2.f90:  New test case.
	* internal_pack_3.f90:  New test case.

From-SVN: r133427
2008-03-21 14:37:03 +00:00
Thomas Koenig 8e1d7686de re PR libfortran/32972 (performance of pack/unpack)
2008-03-19  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/32972
	* Makefile.am (in_pack_c): Add in_pack_i1.c, in_pack_i2.c,
	in_pack_r4.c, in_pack_r8.c, in_pack_r10.c and in_pack_r16.c.
	(in_unpack_c): Add in_unpack_i1.c, in_unpack_i2.c,
	in_unpack_r4.c, in_unpack_r8.c, in_unpack_r10.c and
	in_unpack_r16.c.
	* Makefile.in: Regenerate.
	* libgfortran.h:  Add prototypes for internal_pack_1,
	internal_pack_2, internal_pack_16, internal_pack_r4,
	internal_pack_r8, internal_pack_r10, internal_pack_r16,
	internal_pack_c10 and internal_pack_c16.  Add prototypes for
	internal_unpack_1, internal_unpack_2, internal_unpack_16,
	internal_unpack_r4, internal_unpack_r8, internal_unpack_r10,
	internal_unpack_r16, internal_unpack_c10 and
	internal_unpack_c16.
	* runtime/in_pack_generic.c (internal_pack): Use sizeof instead
	of hardwired sizes.
	Add calls to internal_pack_1, internal_pack_2,
	internal_pack_16, internal_pack_r4, internal_pack_r8,
	internal_pack_r10, internal_pack_r16, internal_pack_c10 and
	internal_pack_c16.
	* runtime/in_unpack_generic.c (internal_unpack):  Use sizeof
	instead of hardwired sizes.
	Add calls to internal_unpack_1, internal_unpack_2,
	internal_unpack_16, internal_unpack_r4, internal_unpack_r8,
	internal_unpack_r10, internal_unpack_r16, internal_unpack_c10
	and internal_unpack_c16.
	* generated/in_pack_r4.c:  New file.
	* generated/in_pack_i2.c:  New file.
	* generated/in_unpack_i1.c:  New file.
	* generated/in_pack_r10.c:  New file.
	* generated/in_unpack_r4.c:  New file.
	* generated/in_unpack_i2.c:  New file.
	* generated/in_unpack_r16.c:  New file.
	* generated/in_pack_r8.c:  New file.
	* generated/in_unpack_r10.c:  New file.
	* generated/in_unpack_r8.c:  New file.
	* generated/in_pack_r16.c:  New file.
	* generated/in_pack_i1.c:  New file.

2008-03-19  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/32972
	* gfortran.dg/internal_pack_1.f90:  New test case.
	* gfortran.dg/internal_pack_2.f90:  New test case.
	* gfortran.dg/internal_pack_3.f90:  New test case.

From-SVN: r133344
2008-03-19 15:42:55 +00:00
Ralf Wildenhues 38d24731e9 configure.ac: m4_include config/proginstall.m4.
2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

        * configure.ac: m4_include config/proginstall.m4.
        * configure: Regenerate.

config/
2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

        * proginstall.m4: New file, with fixed AC_PROG_INSTALL.

libjava/
2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

        * Makefile.am (install-data-local): Rewrite to be more efficient,
        using awk, and `install' with multiple files at once.  Do not gather
        more than 50 files in one go to avoid hitting command line limits.
        (install_data_local_split): New variable.
        * aclocal.m4: Regenerate.
        * configure: Likewise.
        * Makefile.in: Likewise.
        * gcj/Makefile.in: Likewise.
        * include/Makefile.in: Likewise.
        * testsuite/Makefile.in: Likewise.

boehm-gc/
2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

        * aclocal.m4: Regenerate.
        * configure: Likewise.
        * Makefile.in: Likewise.
        * include/Makefile.in: Likewise.

libffi/
2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

        * aclocal.m4: Regenerate.
        * configure: Likewise.
        * Makefile.in: Likewise.
        * include/Makefile.in: Likewise.
        * testsuite/Makefile.in: Likewise.

libgfortran/
2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

        * aclocal.m4: Regenerate.
        * configure: Likewise.
        * Makefile.in: Likewise.

libgomp/
2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

        * aclocal.m4: Regenerate.
        * configure: Likewise.
        * Makefile.in: Likewise.
        * testsuite/Makefile.in: Likewise.

libmudflap/
2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

        * aclocal.m4: Regenerate.
        * configure: Likewise.
        * Makefile.in: Likewise.
        * testsuite/Makefile.in: Likewise.

libssp/
2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

        * aclocal.m4: Regenerate.
        * configure: Likewise.
        * Makefile.in: Likewise.
libssp/
2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

        * aclocal.m4: Regenerate.
        * configure: Likewise.
        * Makefile.in: Likewise.

libstdc++-v3/
2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

        * aclocal.m4: Regenerate.
        * configure: Likewise.
        * Makefile.in: Likewise.
        * doc/Makefile.in: Likewise.
        * include/Makefile.in: Likewise.
        * libmath/Makefile.in: Likewise.
        * libsupc++/Makefile.in: Likewise.
        * po/Makefile.in: Likewise.
        * src/Makefile.in: Likewise.
        * testsuite/Makefile.in: Likewise.

zlib/
2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

        * aclocal.m4: Regenerate.
        * configure: Likewise.
        * Makefile.in: Likewise.

From-SVN: r133269
2008-03-16 08:19:08 +00:00
François-Xavier Coudert f489fba128 re PR fortran/33197 (Fortran 2008: math functions)
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-03-03 23:46:20 +00:00
Janne Blomqvist cc4947e65d re PR fortran/29549 (matmul slow for complex matrices)
2008-02-25  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/29549
        * Makefile.am: Add -fcx-fortran-rules to AM_CFLAGS for all of
        libgfortran.
        * Makefile.in: Regenerated.

From-SVN: r132638
2008-02-25 21:27:28 +02:00
Thomas Koenig 90469382c0 re PR libfortran/34671 (any(kind=1) and all(kind=1))
2008-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/34671
	* gfortran.am: Added _gfortran_all_l1, _gfortran_all_l2,
	_gfortran_any_l1, _gfortran_any_l2, -28,15 _gfortran_count_1_l,
	_gfortran_count_16_l, _gfortran_count_2_l, _gfortran_count_4_l and
	_gfortran_count_8_l Removed _gfortran_count_16_l16,
	_gfortran_count_16_l4, _gfortran_count_16_l8,
	_gfortran_count_4_l16, _gfortran_count_4_l4, _gfortran_count_4_l8,
	_gfortran_count_8_l16, _gfortran_count_8_l4 and
	_gfortran_count_8_l8.
	* Makefile.am: Added generated/any_l1.c and generated/any_l2.c to
	i_any_c.  Added generated/all_l1. and generated/all_l2.c to
	i_all_c.  Removed generated/count_4_l4.c, generated/count_8_l4.c,
	generated/count_16_l4.c, generated/count_4_l8.c,
	generated/count_8_l8.c, generated/count_16_l8.c,
	generated/count_4_l16.c, generated/count_8_l16.c, and
	generated/count_16_l16.c from i_count_c.  Added count_1_l.c,
	count_2_l.c, count_4_l.c, count_8_l.c and count_16_l.c to
	i_count_c.  I_M4_DEPS2 depends on ifunction_logical.m4, for
	any of the files generated from all.m4, any.m4 and count.m4.
	* Makefile.in:  Regenerated.
	* m4/ifunction_logical.m4:  New file.  Use
	GFC_LOGICAL_1 pointer for access to source arrays.
	* m4/any.m4:  Include ifunction_logical.m4 instead of
	ifunction.m4.  Don't check atype_name.
	* m4/all.m4:  Likewise.
	* m4/count.m4:  Likewise.
	* generated/any_l1.c:  New file.
	* generated/any_l2.c:  New file.
	* generated/all_l1.c:  New file.
	* generated/count_1_l.c:  New file.
	* generated/count_2_l.c:  New file.
	* generated/count_4_l.c:  New file.
	* generated/count_8_l.c:  New file.
	* generated/count_16_l.c:  New file.
	* generated/any_l4.c:  Regenerated.
	* generated/any_l8.c:  Regenerated.
	* generated/any_l16.c:  Regenerated.
	* generated/all_l4.c: Regenerated.
	* generated/all_l8.c: Regenerated.
	* generated/all_l16.c: Regenerated.
	* generated/count_4_l4.c:  Removed.
	* generated/count_4_l8.c:  Removed.
	* generated/count_4_l16.c:  Removed.
	* generated/count_8_l4.c:  Removed.
	* generated/count_8_l8.c:  Removed.
	* generated/count_8_l16.c:  Removed.
	* generated/count_16_l4.c:  Removed.
	* generated/count_16_l8.c:  Removed.
	* generated/count_16_l16.c:  Removed.

2008-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/34671
	* iresolve.c (gfc_resolve_all):  Call resolve_mask_arg.
	(gfc_resolve_any):  Likewise.
	(gfc_resolve_count):  Likewise.  Don't append kind of
	argument to function name.

2008-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
	
	PR libfortran/34671
	* gfortran.dg/anyallcount_1.f90:  New test.

From-SVN: r131553
2008-01-15 21:22:07 +00:00
Daniel Franke a1ba31ced9 re PR fortran/34533 (DTIME returns total process time and not since last 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-25 05:41:44 -05:00
Bernhard Fischer b808ac33a9 re PR libfortran/31546 (add --enable-intermodule)
PR fortran/31546
	* (configure.ac): Add --enable-intermodule for onestep build.
	* (Makefile.am): Handle onestep build.
	* (configure, Makefile.in): Regenerate.

From-SVN: r128654
2007-09-21 19:49:34 +00:00
Francois-Xavier Coudert 94f548c244 re PR fortran/31202 (Incorrect rounding generated for NINT)
PR fortran/31202

        * f95-lang.c (gfc_init_builtin_functions): Defin builtins for 
        lround{f,,l} and llround{f,,l}.
        * trans-intrinsic.c (build_fix_expr): Generate calls to the
        {l,}round{f,,l} functions.

        * intrinsics/c99_functions.c (roundl,lroundf,lround,lroundl,
        llroundf,llround,llroundl): New functions.
        * c99_protos.h (roundl,lroundf,lround,lroundl,llroundf,llround,
        llroundl): New prototypes.
        * configure.ac: Check for lroundf, lround, lroundl, llroundf,
        llround and llroundl.
        * configure: Regenerate.
        * Makefile.in: Regenerate.
        * config.h.in: Regenerate.

        * gfortran.dg/nint_2.f90: New test.

From-SVN: r127185
2007-08-03 21:26:10 +00:00
Steven G. Kargl f4e9e7fa00 Makefile.in: Regenerated with automake 1.9.6.
2007-07-02  Steven G. Kargl  <kargl@gcc.gnu.org>

        * Makefile.in:  Regenerated with automake 1.9.6.

From-SVN: r126232
2007-07-02 19:46:19 +00:00
Steven G. Kargl 0afff512bb Makefile.in: Remove extraneous kill.lo rule.
2007-07-02  Steven G. Kargl  <kargl@gcc.gnu.org>

        * Makefile.in:  Remove extraneous kill.lo rule.

From-SVN: r126220
2007-07-02 18:01:09 +00:00
Christopher D. Rickett a8b3b0b633 [multiple changes]
2007-07-01  Christopher D. Rickett  <crickett@lanl.gov>

	* interface.c (gfc_compare_derived_types): Special case for comparing
	derived types across namespaces.
	(gfc_compare_types): Deal with BT_VOID.
	(compare_parameter): Use BT_VOID to accept ISO C Binding pointers.
	* trans-expr.c (gfc_conv_function_call): Remove setting parm_kind
	to SCALAR
	(gfc_conv_initializer): Deal with ISO C Binding NULL_PTR and 
	NULL_FUNPTR.
	(gfc_conv_expr): Convert expressions for ISO C Binding derived types.
	* symbol.c (gfc_set_default_type): BIND(C) variables should not be
	implicitly declared.
	(check_conflict): Add BIND(C) and check for conflicts.
	(gfc_add_explicit_interface): Whitespace.	
	(gfc_add_is_bind_c): New function.  
	(gfc_copy_attr): Use it.
	(gfc_new_symbol): Initialize ISO C Binding objects.
	(get_iso_c_binding_dt):  New function.
	(verify_bind_c_derived_type): Ditto.
	(gen_special_c_interop_ptr): Ditto.
	(add_formal_arg): Ditto.
	(gen_cptr_param): Ditto.
	(gen_fptr_param): Ditto.
	(gen_shape_param): Ditto.
	(add_proc_interface): Ditto.
	(build_formal_args): Ditto.
	(generate_isocbinding_symbol):  Ditto.
	(get_iso_c_sym):  Ditto.
	* decl.c (num_idents_on_line, has_name_equals): New variables.
	(verify_c_interop_param): New function.
	(build_sym): Finish binding labels and deal with COMMON blocks.
	(add_init_expr_to_sym): Check if the initialized expression is
	an iso_c_binding named constants
	(variable_decl): Set ISO C Binding type_spec components.
	(gfc_match_kind_spec): Check match for C interoperable kind.
	(match_char_spec): Fix comment. Chnage gfc_match_small_int
	to gfc_match_small_int_expr.  Check for C interoperable kind.
	(match_type_spec): Clear the current binding label.
	(match_attr_spec): Add DECL_IS_BIND_C.  If BIND(C) is found, use it
	to set attributes.
	(set_binding_label): New function.
	(set_com_block_bind_c): Ditto.
	(verify_c_interop): Ditto.
	(verify_com_block_vars_c_interop): Ditto.
	(verify_bind_c_sym): Ditto.
	(set_verify_bind_c_sym): Ditto.
	(set_verify_bind_c_com_block): Ditto.
	(get_bind_c_idents): Ditto.
	(gfc_match_bind_c_stmt): Ditto.
	(gfc_match_data_decl): Use num_idents_on_line.
	(match_result): Deal with right paren in BIND(C).
	(gfc_match_suffix): New function.
	(gfc_match_function_decl): Use it.  Code is re-arranged to deal with
	ISO C Binding result clauses.
	(gfc_match_subroutine):  Deal with BIND(C).
 	(gfc_match_bind_c): New function.
	(gfc_get_type_attr_spec): New function.  Code is re-arranged in and
	taken from gfc_match_derived_decl.
	(gfc_match_derived_decl): Add check for BIND(C).
	* trans-common.c: Forward declare gfc_get_common.
	(gfc_sym_mangled_common_id): Change arg from 'const char *name' to
	'gfc_common_head *com'.  Check for ISO C Binding of the common block.
	(build_common_decl): 'com->name' to 'com in SET_DECL_ASSEMBLER_NAME.
	* gfortran.h: Add GFC_MAX_BINDING_LABEL_LEN
	(bt): Add BT_VOID
	(sym_flavor): Add FL_VOID.
 	(iso_fortran_env_symbol, iso_c_binding_symbol, intmod_id): New enum
	(CInteropKind_t): New struct.
	(c_interop_kinds_table): Use it.  Declare an array of structs.
	(symbol_attribute): Add is_bind_c, is_c_interop, and is_iso_c
	bitfields.
	(gfc_typespec): Add is_c_interop; is_iso_c, and f90_type members.
	(gfc_symbol): Add from_intmod, intmod_sym_id, binding_label, and
	common_block members.
	(gfc_common_head): Add binding_label and is_bind_c members.
	(gfc_gsymbol): Add sym_name, mod_name, and binding_label members.
	Add prototypes for get_c_kind, gfc_validate_c_kind, 
	gfc_check_any_c_kind, gfc_add_is_bind_c, gfc_add_value,
	verify_c_interop, verify_c_interop_param, verify_bind_c_sym,
	verify_bind_c_derived_type, verify_com_block_vars_c_interop,
	generate_isocbinding_symbol, get_iso_c_sym, gfc_iso_c_sub_interface
	* iso-c-binding.def: New file. This file contains the definitions
	of the types provided by the Fortran 2003 ISO_C_BINDING intrinsic
	module.
	* trans-const.c (gfc_conv_constant_to_tree): Deal with C_NULL_PTR
	 or C_NULL_FUNPTR expressions.
	* expr.c (gfc_copy_expr): Add BT_VOID case.  For BT_CHARACTER, the
	ISO C Binding requires a minimum string length of 1 for '\0'.  
	* module.c (intmod_sym): New struct.
	(pointer_info): Add binding_label member.
	(write_atom): Set len to 0 for NULL pointers. Check for NULL p and *p.
	(ab_attribute): Add AB_IS_BIND_C, AB_IS_C_INTEROP and AB_IS_ISO_C.
	(attr_bits): Add "IS_BIND_C", "IS_C_INTEROP", and "IS_ISO_C".
	(mio_symbol_attribute): Deal with ISO C Binding attributes.
	(bt_types): Add "VOID".
	(mio_typespec): Deal with ISO C Binding components.
	(mio_namespace_ref): Add intmod variable. 
	(mio_symbol): Check for symbols from an intrinsic module.
	(load_commons): Check for BIND(C) common block.
	(read_module): Read binding_label and use it.
	(write_common): Add label.  Write BIND(C) info.
	(write_blank_common): Blank commons are not BIND(C).  Explicitly
	set is_bind_c=0.
	(write_symbol): Deal with binding_label.
	(sort_iso_c_rename_list): New function.
	(import_iso_c_binding_module): Ditto.
	(create_int_parameter): Add to args.
	(use_iso_fortran_env_module): Adjust to deal with iso_c_binding
	intrinsic module.
	* trans-types.c (c_interop_kinds_table): new array of structs. 
	(gfc_validate_c_kind): New function.
	(gfc_check_any_c_kind): Ditto.
	(get_real_kind_from_node): Ditto.
	(get_int_kind_from_node): Ditto.
	(get_int_kind_from_width): Ditto.
	(get_int_kind_from_minimal_width): Ditto.
	(init_c_interop_kinds): Ditto.
	(gfc_init_kinds): call init_c_interop_kinds.
	(gfc_typenode_for_spec): Adjust for BT_VOID and ISO C Binding pointers.
	Adjust handling of BT_DERIVED.
	(gfc_sym_type): Whitespace.
	(gfc_get_derived_type):  Account for iso_c_binding derived types
	* resolve.c (is_scalar_expr_ptr): New function.
	(gfc_iso_c_func_interface): Ditto.
	(resolve_function): Use gfc_iso_c_func_interface. 
	(set_name_and_label): New function.
	(gfc_iso_c_sub_interface): Ditto.
	(resolve_specific_s0): Use gfc_iso_c_sub_interface.
	(resolve_bind_c_comms): New function.
	(resolve_bind_c_derived_types): Ditto.
	(gfc_verify_binding_labels): Ditto.
	(resolve_fl_procedure): Check for ISO C interoperability.
	(resolve_symbol): Check C interoperability.
	(resolve_types): Walk the namespace.  Check COMMON blocks.
	* trans-decl.c (gfc_sym_mangled_identifier):  Prevent the mangling
	of identifiers that have an assigned binding label.
	(gfc_sym_mangled_function_id): Use the binding label rather than
	the mangled name.
	(gfc_finish_var_decl): Put variables that are BIND(C) into a common
	segment of the object file, because this is what C would do.
	(gfc_create_module_variable): Conver to proper types
	(set_tree_decl_type_code): New function.
	(generate_local_decl): Check dummy variables and derived types for
	ISO C Binding attributes.
	* match.c (gfc_match_small_int_expr): New function.
	(gfc_match_name_C): Ditto.
	(match_common_name): Deal with ISO C Binding in COMMON blocks
	* trans-io.c (transfer_expr):  Deal with C_NULL_PTR or C_NULL_FUNPTR
	expressions
	* match.h: Add prototypes for gfc_match_small_int_expr,
	gfc_match_name_C, match_common_name, set_com_block_bind_c,
	set_binding_label, set_verify_bind_c_sym,
	set_verify_bind_c_com_block, get_bind_c_idents,
	gfc_match_bind_c_stmt, gfc_match_suffix, gfc_match_bind_c,
	gfc_get_type_attr_spec
	* parse.c (decode_statement): Use gfc_match_bind_c_stmt
	(parse_derived): Init *derived_sym = NULL, and gfc_current_block
	later for valiadation.
	* primary.c (got_delim): Set ISO C Binding components of ts.
	(match_logical_constant): Ditto.
	(match_complex_constant): Ditto.
	(match_complex_constant): Ditto.
	(gfc_match_rvalue): Check for existence of at least one arg for
	C_LOC, C_FUNLOC, and C_ASSOCIATED.
	* misc.c (gfc_clear_ts): Clear ISO C Bindoing components in ts.
	(get_c_kind): New function.

2007-07-01  Christopher D. Rickett  <crickett@lanl.gov>

	* Makefile.in: Add support for iso_c_generated_procs.c and
	iso_c_binding.c.
	* Makefile.am: Ditto.
	* intrinsics/iso_c_generated_procs.c: New file containing helper
	functions.
	* intrinsics/iso_c_binding.c: Ditto.
	* intrinsics/iso_c_binding.h: New file
	* gfortran.map: Include the __iso_c_binding_c_* functions.
	* libgfortran.h: define GFC_NUM_RANK_BITS.

2007-06-23  Christopher D. Rickett  <crickett@lanl.gov>

	* bind_c_array_params.f03: New files for Fortran 2003 ISO C Binding.
	* bind_c_coms.f90: Ditto.
	* bind_c_coms_driver.c: Ditto.
	* bind_c_dts.f90: Ditto.
	* bind_c_dts_2.f03: Ditto.
	* bind_c_dts_2_driver.c: Ditto.
	* bind_c_dts_3.f03: Ditto.
	* bind_c_dts_4.f03: Ditto.
	* bind_c_dts_driver.c: Ditto.
	* bind_c_implicit_vars.f03: Ditto.
	* bind_c_procs.f03: Ditto.
	* bind_c_usage_2.f03: Ditto.
	* bind_c_usage_3.f03: Ditto.
	* bind_c_usage_5.f03: Ditto.
	* bind_c_usage_6.f03: Ditto.
	* bind_c_usage_7.f03: Ditto.
	* bind_c_vars.f90: Ditto.
	* bind_c_vars_driver.c: Ditto.
	* binding_c_table_15_1.f03: Ditto.
	* binding_label_tests.f03: Ditto.
	* binding_label_tests_10.f03: Ditto.
	* binding_label_tests_10_main.f03: Ditto.
	* binding_label_tests_11.f03: Ditto.
	* binding_label_tests_11_main.f03: Ditto.
	* binding_label_tests_12.f03: Ditto.
	* binding_label_tests_13.f03: Ditto.
	* binding_label_tests_13_main.f03: Ditto.
	* binding_label_tests_14.f03: Ditto.
	* binding_label_tests_2.f03: Ditto.
	* binding_label_tests_3.f03: Ditto.
	* binding_label_tests_4.f03: Ditto.
	* binding_label_tests_5.f03: Ditto.
	* binding_label_tests_6.f03: Ditto.
	* binding_label_tests_7.f03: Ditto.
	* binding_label_tests_8.f03: Ditto.
	* binding_label_tests_9.f03: Ditto.
	* c_assoc.f90: Ditto.
	* c_assoc_2.f03: Ditto.
	* c_f_pointer_shape_test.f90: Ditto.
	* c_f_pointer_tests.f90: Ditto.
	* c_f_tests_driver.c: Ditto.
	* c_funloc_tests.f03: Ditto.
	* c_funloc_tests_2.f03: Ditto.
	* c_funloc_tests_3.f03: Ditto.
	* c_funloc_tests_3_funcs.c: Ditto.
	* c_kind_params.f90: Ditto.
	* c_kind_tests_2.f03: Ditto.
	* c_kinds.c: Ditto.
	* c_loc_driver.c: Ditto.
	* c_loc_test.f90: Ditto.
	* c_loc_tests_2.f03: Ditto.
	* c_loc_tests_2_funcs.c: Ditto.
	* c_loc_tests_3.f03: Ditto.
	* c_loc_tests_4.f03: Ditto.
	* c_loc_tests_5.f03: Ditto.
	* c_loc_tests_6.f03: Ditto.
	* c_loc_tests_7.f03: Ditto.
	* c_loc_tests_8.f03: Ditto.
	* c_ptr_tests.f03: Ditto.
	* c_ptr_tests_10.f03: Ditto.
	* c_ptr_tests_5.f03: Ditto.
	* c_ptr_tests_7.f03: Ditto.
	* c_ptr_tests_7_driver.c: Ditto.
	* c_ptr_tests_8.f03: Ditto.
	* c_ptr_tests_8_funcs.c: Ditto.
	* c_ptr_tests_9.f03: Ditto.
	* c_ptr_tests_driver.c: Ditto.
	* c_size_t_driver.c: Ditto.
	* c_size_t_test.f03: Ditto.
	* com_block_driver.f90: Ditto.
	* global_vars_c_init.f90: Ditto.
	* global_vars_c_init_driver.c: Ditto.
	* global_vars_f90_init.f90: Ditto.
	* global_vars_f90_init_driver.c: Ditto.
	* interop_params.f03: Ditto.
	* iso_c_binding_only.f03: Ditto.
	* iso_c_binding_rename_1.f03: Ditto.
	* iso_c_binding_rename_1_driver.c: Ditto.
	* iso_c_binding_rename_2.f03: Ditto.
	* iso_c_binding_rename_2_driver.c: Ditto.
	* kind_tests_2.f03: Ditto.
	* kind_tests_3.f03: Ditto.
	* module_md5_1.f90: Ditto.
	* only_clause_main.c: Ditto.
	* print_c_kinds.f90: Ditto.
	* test_bind_c_parens.f03: Ditto.
	* test_c_assoc.c: Ditto.
	* test_com_block.f90: Ditto.
	* test_common_binding_labels.f03: Ditto.
	* test_common_binding_labels_2.f03: Ditto.
	* test_common_binding_labels_2_main.f03: Ditto.
	* test_common_binding_labels_3.f03: Ditto.
	* test_common_binding_labels_3_main.f03: Ditto.
	* test_only_clause.f90: Ditto.
	* use_iso_c_binding.f90: Ditto.
	* value_5.f90: Ditto.
	* value_test.f90: Ditto.
	* value_tests_f03.f90: Ditto.

From-SVN: r126185
2007-07-02 02:47:21 +00:00
Janne Blomqvist 31c97dfe34 re PR fortran/32239 (optimize power in loops, use __builtin_powi instead of _gfortran_pow_r4_i4)
gcc/fortran:
	
2007-07-01  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/32239
	* trans-expr.c (gfc_conv_power_op): Use builtin_powi for
	real**int4 powers.
	* f95-lang.c (gfc_init_builtin_functions): Add builtin_powi to the
	builtins table.

	
libgfortran:
	
2007-07-01  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/32239
	* Makefile.am: Don't generate real**int4 pow functions.
	* gfortran.map: Remove real**int4 pow symbols.
	* Makefile.in: Regenerated.

testsuite

2007-07-01  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/32239
	* gfortran.fortran-torture/execute/intrinsic_fraction_exponent.f90
	(test_4): Use proper test for floating point equality.
	(test_8): Likewise.

From-SVN: r126175
2007-07-01 19:24:38 +03:00
Steve Ellcey 1cf3d07da6 ltmain.sh: Update from ToT Libtool.
* ltmain.sh: Update from ToT Libtool.
        * libtool.m4: Update from ToT Libtool.
        * ltsugar.m4: New. Update from ToT Libtool.
        * ltversion.m4: New. Update from ToT Libtool.
        * ltoptions.m4: New. Update from ToT Libtool.
        * ltconfig: Remove.
        * ltcf-c.sh: Remove.
        * ltcf-cxx.sh: Remove.
        * ltcf-gcj.sh: Remove.
	* Regenerate all subdirs

From-SVN: r125032
2007-05-24 16:37:27 +00:00
Janne Blomqvist 78511f8b0d configure: Regenerate using autoconf 2.59.
2007-04-25  Janne Blomqvist  <jb@gcc.gnu.org>

	* configure: Regenerate using autoconf 2.59.
	* Makefile.in: Likewise.  
	* config.h.in: Likewise.

From-SVN: r124142
2007-04-25 10:25:09 +03:00
Janne Blomqvist c0e7e2bf13 re PR libfortran/27740 (libgfortran should use versioned symbols)
2007-04-24  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/27740
	* configure.ac: New test to determine if symbol versioning is
	supported.
	* Makefile.am: Use result of above test to add appropriate linker
	flags.
	* gfortran.map: New file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
	* config.h.in: Regenerated.

From-SVN: r124098
2007-04-24 12:08:52 +03:00
Steve Ellcey 01a6a27a02 Makefile.am: Add -I ..
* Makefile.am: Add -I .. to ACLOCAL_AMFLAGS.  Add libgfortran_la_LINK.
        * Makefile.in: Regenerate.

From-SVN: r123827
2007-04-14 19:50:46 +00:00
Francois-Xavier Coudert 868d75dbdc gfortran.h (gfc_option_t): Add flag_backtrace field.
* gfortran.h (gfc_option_t): Add flag_backtrace field.
	* lang.opt: Add -fbacktrace option.
	* invoke.texi: Document the new option.
	* trans-decl.c (gfc_build_builtin_function_decls): Add new
	option to the call to set_std.
	* options.c (gfc_init_options, gfc_handle_option): Handle the
	new option.

	* runtime/backtrace.c: New file.
	* runtime/environ.c (variable_table): New GFORTRAN_ERROR_BACKTRACE
	environment variable.
	* runtime/compile_options.c (set_std): Add new argument.
	* runtime/main.c (store_exe_path, full_exe_path): New functions.
	* runtime/error.c (sys_exit): Add call to show_backtrace.
	* libgfortran.h (options_t): New backtrace field.
	(store_exe_path, full_exe_path, show_backtrace): New prototypes.
	* configure.ac: Add checks for execinfo.h, execvp, pipe, dup2,
	close, fdopen, strcasestr, getrlimit, backtrace, backtrace_symbols
	and getppid.
	* Makefile.am: Add runtime/backtrace.c.
	* fmain.c (main): Add call to store_exe_path.
	* Makefile.in: Renegerate.
	* config.h.in: Renegerate.
	* configure: Regenerate.

From-SVN: r122954
2007-03-15 12:39:47 +00:00
Brooks Moses e6e3b4b35e Makefile.am: Add dummy install-pdf target.
* Makefile.am: Add dummy install-pdf target.
* Makefile.in: Regenerate

From-SVN: r122446
2007-03-01 15:57:32 -08:00
Thomas Koenig 567c915b04 re PR libfortran/30533 ([4.1 only] minval, maxval missing for kind=1 and kind=2)
2007-02-19  Thomas Koenig  <Thomas.Koenig@online.de>

	PR libfortran/30533
	PR libfortran/30765
	* Makefile.am: Add $(srcdir) too all files in generated/.
	(i_maxloc0_c): Add maxloc0_4_i1.c, maxloc0_8_i1.c,
	maxloc0_16_i1.c, maxloc0_4_i2.c, maxloc0_8_i2.c and
	maxloc0_16_i2.c.
	(i_maxloc1_c): Add maxloc1_4_i1.c, maxloc1_8_i1.c,
	maxloc1_16_i1.c, maxloc1_4_i2.c, maxloc1_8_i2.c and
	maxloc1_16_i2.c.
	(i_maxval_c): Add maxval_i1.c and maxval_i2.c.
	(i_minloc0_c):  Add minloc0_4_i1.c, minloc0_8_i1.c,
	minloc0_16_i1.c, minloc0_4_i2.c, minloc0_8_i2.c and
	minloc0_16_i2.c.
	(i_minloc_1.c): Add minloc1_4_i1.c, minloc1_8_i1.c,
	minloc1_16_i1.c, minloc1_4_i2.c, minloc1_8_i2.c and
	minloc1_16_i2.c.
	(i_minval_c):  Add minval_i1.c and minval_i2.c.
	(i_sum_c):  Add sum_i1.c and sum_i2.c.
	(i_product_c):  Add product_i1.c and product_i2.c.
	(i_matmul_c):  Add matmul_i1.c and matmul_i2.c.
	(gfor_built_specific_src):  Remove $(srcdir) from target.
	(gfor_bulit_specific2_src):  Likewise.
	Makefile.in:  Regenerated.
	libgfortran.h:  Add GFC_INTEGER_1_HUGE and GFC_INTEGER_2_HUGE.
	Add gfc_array_i1 and gfc_array_i2.
	* generated/matmul_i1.c: New file.
	* generated/matmul_i2.c: New file.
	* generated/maxloc0_16_i1.c: New file.
	* generated/maxloc0_16_i2.c: New file.
	* generated/maxloc0_4_i1.c: New file.
	* generated/maxloc0_4_i2.c: New file.
	* generated/maxloc0_8_i1.c: New file.
	* generated/maxloc0_8_i2.c: New file.
	* generated/maxloc1_16_i1.c: New file.
	* generated/maxloc1_16_i2.c: New file.
	* generated/maxloc1_4_i1.c: New file.
	* generated/maxloc1_4_i2.c: New file.
	* generated/maxloc1_8_i1.c: New file.
	* generated/maxloc1_8_i2.c: New file.
	* generated/maxval_i1.c: New file.
	* generated/maxval_i2.c: New file.
	* generated/minloc0_16_i1.c: New file.
	* generated/minloc0_16_i2.c: New file.
	* generated/minloc0_4_i1.c: New file.
	* generated/minloc0_4_i2.c: New file.
	* generated/minloc0_8_i1.c: New file.
	* generated/minloc0_8_i2.c: New file.
	* generated/minloc1_16_i1.c: New file.
	* generated/minloc1_16_i2.c: New file.
	* generated/minloc1_4_i1.c: New file.
	* generated/minloc1_4_i2.c: New file.
	* generated/minloc1_8_i1.c: New file.
	* generated/minloc1_8_i2.c: New file.
	* generated/minval_i1.c: New file.
	* generated/minval_i2.c: New file.
	* generated/product_i1.c: New file.
	* generated/product_i2.c: New file.
	* generated/sum_i1.c: New file.
	* generated/sum_i2.c: New file.

2007-02-19  Thomas Koenig  <Thomas.Koenig@online.de>

	PR libfortran/30533
	* fortran/iresolve.c(gfc_resolve_maxloc):  Remove coercion of
	argument to default integer.
	(gfc_resolve_minloc):  Likewise.

2007-02-19  Thomas Koenig  <Thomas.Koenig@online.de>

	PR libfortran/30533
	* gfortran.dg/intrinsic_intkinds_1.f90:  New test.

From-SVN: r122137
2007-02-19 20:49:10 +00:00
Thomas Koenig 2ccef0dd3a Makefile.am: Use $(M4) instead of m4.
2007-02-10  Thomas Koenig  <Thomas.Koenig@online.de>

	* Makefile.am:  Use $(M4) instead of m4.
	* Makefile.in:  Regenerate.

From-SVN: r121801
2007-02-10 19:44:15 +00:00
Thomas Koenig 7e10187c3a Makefile.am: Remove $(srcdir) from assorted targets in maintainer mode.
2007-02-10  Thomas Koenig  <Thomas.Koenig@online.de>

	* Makefile.am: Remove $(srcdir) from assorted targets
	in maintainer mode.
	* Makefile.in: Regenerate.

From-SVN: r121795
2007-02-10 13:47:14 +00:00
Francois-Xavier Coudert e6472bcede gfortran.h (gfc_options_t): Add flag_allow_leading_underscore.
* gfortran.h (gfc_options_t): Add flag_allow_leading_underscore.
	* lang.opt: Add -fallow-leading-underscore.
	* match.c (gfc_match_name): Allow leading underscore in symbol
	name if -fallow-leading-underscore is used.
	* symbol.c (gfc_get_default_type): Add special case for symbol
	names beginning with an underscore.
	* trans-decl.c (gfc_get_extern_function_decl,
	gfc_build_intrinsic_function_decls): Add _gfortran prefix to
	library symbols selected_int_kind, selected_real_kind and 
	all specifics.
	* options.c (gfc_init_options, gfc_handle_option): Handle the
	new -fallow-leading-underscore option.

	* m4/misc_specifics.m4: Add _gfortran prefix to specific names.
	* m4/specific2.m4: Likewise.
	* m4/specific.m4: Likewise.
	* intrinsics/f2c_specifics.F90: Likewise.
	* intrinsics/selected_int_kind.f90: Add _gfortran prefix.
	* intrinsics/selected_real_kind.f90: Likewise.
	* intrinsics/dprod_r8.f90: Likewise.
	* Makefile.am: Add -fallow-leading-underscore to the
	gfor_specific_src files, as well as selected_real_kind.F90
	and selected_int_kind.F90
	* Makefile.in: Regenerate.
	* generated/_sqrt_c8.F90: Regenerate.
	* generated/_sign_r16.F90: Regenerate.
	* generated/_log_c16.F90: Regenerate.
	* generated/_sin_c10.F90: Regenerate.
	* generated/_tanh_r4.F90: Regenerate.
	* generated/_tanh_r8.F90: Regenerate.
	* generated/_log10_r10.F90: Regenerate.
	* generated/_aimag_c4.F90: Regenerate.
	* generated/_sign_r4.F90: Regenerate.
	* generated/_aimag_c8.F90: Regenerate.
	* generated/_sign_r8.F90: Regenerate.
	* generated/_mod_i4.F90: Regenerate.
	* generated/_cos_r16.F90: Regenerate.
	* generated/_aint_r10.F90: Regenerate.
	* generated/_mod_i8.F90: Regenerate.
	* generated/_abs_i16.F90: Regenerate.
	* generated/_sqrt_c10.F90: Regenerate.
	* generated/_atan2_r4.F90: Regenerate.
	* generated/_cos_c4.F90: Regenerate.
	* generated/_atan_r16.F90: Regenerate.
	* generated/_tanh_r10.F90: Regenerate.
	* generated/_atan2_r8.F90: Regenerate.
	* generated/_cos_c8.F90: Regenerate.
	* generated/_exp_r4.F90: Regenerate.
	* generated/_log_r10.F90: Regenerate.
	* generated/_exp_r8.F90: Regenerate.
	* generated/_abs_r4.F90: Regenerate.
	* generated/_abs_r8.F90: Regenerate.
	* generated/_sin_r16.F90: Regenerate.
	* generated/_tan_r4.F90: Regenerate.
	* generated/_tan_r8.F90: Regenerate.
	* generated/_sign_i4.F90: Regenerate.
	* generated/_sign_i8.F90: Regenerate.
	* generated/_exp_c16.F90: Regenerate.
	* generated/_sqrt_r16.F90: Regenerate.
	* generated/_conjg_c4.F90: Regenerate.
	* generated/_conjg_c8.F90: Regenerate.
	* generated/_dim_r16.F90: Regenerate.
	* generated/_mod_r10.F90: Regenerate.
	* generated/_abs_c10.F90: Regenerate.
	* generated/_conjg_c16.F90: Regenerate.
	* generated/_tan_r16.F90: Regenerate.
	* generated/_asinh_r10.F90: Regenerate.
	* generated/_abs_i4.F90: Regenerate.
	* generated/_abs_i8.F90: Regenerate.
	* generated/_acos_r10.F90: Regenerate.
	* generated/_exp_r10.F90: Regenerate.
	* generated/_acosh_r16.F90: Regenerate.
	* generated/_atan2_r16.F90: Regenerate.
	* generated/_cos_c16.F90: Regenerate.
	* generated/_mod_i16.F90: Regenerate.
	* generated/_asin_r4.F90: Regenerate.
	* generated/_anint_r16.F90: Regenerate.
	* generated/_asin_r8.F90: Regenerate.
	* generated/_aimag_c10.F90: Regenerate.
	* generated/_exp_c4.F90: Regenerate.
	* generated/_sinh_r10.F90: Regenerate.
	* generated/_exp_c8.F90: Regenerate.
	* generated/_log10_r4.F90: Regenerate.
	* generated/_log10_r8.F90: Regenerate.
	* generated/_abs_c4.F90: Regenerate.
	* generated/_abs_r16.F90: Regenerate.
	* generated/_abs_c8.F90: Regenerate.
	* generated/_asin_r10.F90: Regenerate.
	* generated/_sign_r10.F90: Regenerate.
	* generated/_atanh_r16.F90: Regenerate.
	* generated/_log_c10.F90: Regenerate.
	* generated/_cosh_r16.F90: Regenerate.
	* generated/_sin_c16.F90: Regenerate.
	* generated/_cos_r10.F90: Regenerate.
	* generated/_log10_r16.F90: Regenerate.
	* generated/_aint_r16.F90: Regenerate.
	* generated/_acos_r4.F90: Regenerate.
	* generated/_acos_r8.F90: Regenerate.
	* generated/_sqrt_c16.F90: Regenerate.
	* generated/_acosh_r4.F90: Regenerate.
	* generated/_atan_r10.F90: Regenerate.
	* generated/_acosh_r8.F90: Regenerate.
	* generated/_sign_i16.F90: Regenerate.
	* generated/_tanh_r16.F90: Regenerate.
	* generated/_log_r4.F90: Regenerate.
	* generated/_log_r8.F90: Regenerate.
	* generated/_sin_r4.F90: Regenerate.
	* generated/_sin_r8.F90: Regenerate.
	* generated/_log_r16.F90: Regenerate.
	* generated/_sin_r10.F90: Regenerate.
	* generated/_sqrt_r4.F90: Regenerate.
	* generated/_exp_c10.F90: Regenerate.
	* generated/_sqrt_r8.F90: Regenerate.
	* generated/_asinh_r4.F90: Regenerate.
	* generated/_sqrt_r10.F90: Regenerate.
	* generated/_asinh_r8.F90: Regenerate.
	* generated/_dim_r4.F90: Regenerate.
	* generated/_dim_r8.F90: Regenerate.
	* generated/_dim_r10.F90: Regenerate.
	* generated/_cosh_r4.F90: Regenerate.
	* generated/_conjg_c10.F90: Regenerate.
	* generated/_tan_r10.F90: Regenerate.
	* generated/_cosh_r8.F90: Regenerate.
	* generated/_mod_r16.F90: Regenerate.
	* generated/_abs_c16.F90: Regenerate.
	* generated/_cos_r4.F90: Regenerate.
	* generated/_asinh_r16.F90: Regenerate.
	* generated/_cos_r8.F90: Regenerate.
	* generated/_atanh_r4.F90: Regenerate.
	* generated/_atanh_r8.F90: Regenerate.
	* generated/_acos_r16.F90: Regenerate.
	* generated/_anint_r4.F90: Regenerate.
	* generated/_acosh_r10.F90: Regenerate.
	* generated/_anint_r8.F90: Regenerate.
	* generated/_exp_r16.F90: Regenerate.
	* generated/_mod_r4.F90: Regenerate.
	* generated/_cos_c10.F90: Regenerate.
	* generated/_atan2_r10.F90: Regenerate.
	* generated/_dim_i16.F90: Regenerate.
	* generated/_mod_r8.F90: Regenerate.
	* generated/_anint_r10.F90: Regenerate.
	* generated/_aint_r4.F90: Regenerate.
	* generated/_aint_r8.F90: Regenerate.
	* generated/_dim_i4.F90: Regenerate.
	* generated/_sinh_r4.F90: Regenerate.
	* generated/_log_c4.F90: Regenerate.
	* generated/_dim_i8.F90: Regenerate.
	* generated/_sinh_r8.F90: Regenerate.
	* generated/_log_c8.F90: Regenerate.
	* generated/_sin_c4.F90: Regenerate.
	* generated/_sin_c8.F90: Regenerate.
	* generated/misc_specifics.F90: Regenerate.
	* generated/_abs_r10.F90: Regenerate.
	* generated/_aimag_c16.F90: Regenerate.
	* generated/_atan_r4.F90: Regenerate.
	* generated/_sinh_r16.F90: Regenerate.
	* generated/_atan_r8.F90: Regenerate.
	* generated/_atanh_r10.F90: Regenerate.
	* generated/_cosh_r10.F90: Regenerate.
	* generated/_sqrt_c4.F90: Regenerate.
	* generated/_asin_r16.F90: Regenerate.

From-SVN: r121007
2007-01-20 18:33:20 +00:00
Tom Tromey 679c0f9a4c re PR libfortran/27107 (Make dependency on io/io.h broken)
PR libgfortran/27107:
	* aclocal.m4, configure, Makefile.in: Rebuilt.
	* configure.ac: Enable automake dependency tracking.  Update
	minimum automake version.

From-SVN: r120878
2007-01-17 22:14:48 +00:00
Francois-Xavier Coudert 0dce3ca161 re PR libfortran/27107 (Make dependency on io/io.h broken)
PR libfortran/27107
	* runtime/environ.c: Don't include io/io.h.
	* runtime/string.c: Don't include io/io.h.
	(compare0): Add cast to avoid warning.
	* runtime/error.c: Don't include io/io.h.
	(st_printf): Move to io/unix.c.
	* intrinsics/flush.c: Delete, contents moved to io/intrinsics.c.
	* intrinsics/fget.c: Likewise.
	* intrinsics/ftell.c: Likewise.
	* intrinsics/tty.c: Likewise.
	* libgfortran.h (DEFAULT_RECL, notification_std,
	get_unformatted_convert, IOPARM_*, st_parameter_common, unit_convert,
	DEFAULT_TEMPDIR): New declarations.
	* io/io.h (DEFAULT_RECL, notification_std, get_unformatted_convert,
	IOPARM_*, st_parameter_common, unit_convert, DEFAULT_TEMPDIR):
	Move to libgfortran.h.
	* io/unix.c: Add io/unix.h content.
	(st_printf): New function.
	* io/intrinsics.c: New file.
	* io/unix.h: Remove, contents moved into unix.c.
	* libtool-version: Update library version to 3.0.0.
	* configure.ac: Update library version to 0.3.
	* Makefile.am (intrinsics/fget.c, intrinsics/flush.c,
	intrinsics/ftell.c, intrinsics/tty.c, libgfortran.h): Remove targets.
	* Makefile.in: Regenerate.
	* configure: Regenerate.

From-SVN: r120869
2007-01-17 19:44:00 +00:00
Francois-Xavier Coudert 7afebb0232 Makefile.am: Remove intrinsics/erf.c and intrinsics/bessel.c.
* Makefile.am: Remove intrinsics/erf.c and intrinsics/bessel.c.
	* Makefile.in: Regenerate.
	* intrinsics/erf.c: Remove.
	* intrinsics/bessel.c: Remove.
	* c99_protos.h: Add prototypes for bessel and error functions.
	* intrinsics/c99_functions.c: Move content for intrinsics/erf.c
	and intrinsics/bessel.c here.

From-SVN: r119204
2006-11-25 17:22:53 +00:00
Francois-Xavier Coudert 9f9ef3032b configure: Regenerate.
* configure: Regenerate.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.

From-SVN: r118140
2006-10-29 11:34:53 +00:00
Steven G. Kargl cc6d3bde5a re PR fortran/15441 (RRSPACING broken for denormals)
2006-10-06  Steven G. Kargl  <kargl@gcc.gnu.org>
 
	* gfortran.h: Define GFC_MPFR_TOO_OLD via mpfr version info.
	* arith.c (arctangent, gfc_check_real_range): Use it.	
	* simplify.c (gfc_simplify_atan2, gfc_simplify_exponent,
	gfc_simplify_log, gfc_simplify_nearest): Use it.

	PR fortran/15441
	PR fortran/29312
	* iresolve.c (gfc_resolve_rrspacing): Give rrspacing library
	routine hidden precision argument.
	(gfc_resolve_spacing): Give spacing library routine hidden
	precision, emin - 1, and tiny(x) arguments.
	* simplify.c (gfc_simplify_nearest): Remove explicit subnormalization.
	(gfc_simplify_rrspacing): Implement formula from Fortran 95 standard.
	(gfc_simplify_spacing): Implement formula from Fortran 2003 standard.
	* trans-intrinsic.c (gfc_intrinsic_map_t) Declare rrspacing and
	spacing via LIBF_FUNCTION
	(prepare_arg_info, call_builtin_clz, gfc_conv_intrinsic_spacing,
	gfc_conv_intrinsic_rrspacing): Remove functions.
	(gfc_conv_intrinsic_function): Remove calls to
	gfc_conv_intrinsic_spacing and gfc_conv_intrinsic_rrspacing.
	* f95-lang.c (gfc_init_builtin_functions): Remove __builtin_clz,
	__builtin_clzl and __builtin_clzll


2006-10-06  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/15441
	PR fortran/29312
	* configure.ac: Add HAVE_LDEXPF, HAVE_LDEXP, and HAVE_LDEXPL
	* m4/spacing.m4: New file.  Use new HAVE_* defines.
	* m4/rrspacing.m4: Ditto.
	* Makefile.am: Handle new files.
	* configure: Regenerated.
	* Makefile.in: Ditto.
	* config.h.in: Ditto.
	* generated/spacing_r4.c: Generated.
	* generated/spacing_r8.c: Ditto.
	* generated/spacing_r10.c: Ditto.
	* generated/spacing_r16.c: Ditto.
	* generated/rrspacing_r4.c: Ditto.
	* generated/rrspacing_r8.c: Ditto.
	* generated/rrspacing_r10.c: Ditto.
	* generated/rrspacing_r16.c: Ditto.

From-SVN: r117584
2006-10-09 20:55:29 +00:00
François-Xavier Coudert ca0551f028 Makefile.am: Add intrinsics/move_alloc.c, ommited in Paul's previous commit.
* Makefile.am: Add intrinsics/move_alloc.c, ommited in Paul's
	previous commit.
	* Makefile.in: Regenerate.

From-SVN: r117561
2006-10-08 19:07:29 +00:00
Francois-Xavier Coudert 456d9b174d hyper.c: Remove file.
* intrinsics/hyper.c: Remove file.
	* intrinsics/c99_functions.c: Add fallback functions asinhf,
	acoshf and atanhf.
	* Makefile.am: Remove file intrinsics/hyper.c.
	* Makefile.in: Regenerate.

From-SVN: r117560
2006-10-08 18:39:18 +00:00
Paul Thomas 5046aff56b [multiple changes]
2006-10-05  Erik Edelmann <edelmann@gcc.gnu.org>
	    Paul Thomas <pault@gcc.gnu.org>

	PR fortran/20541
	* interface.c (gfc_compare_derived_types): Add comparison of
	the allocatable field.
	* intrinsic.c (add_subroutines): Add MOVE_ALLOC.
	* trans-expr.c (gfc_conv_aliased_arg, gfc_trans_subarray_assign,
	gfc_trans_subcomponent_assign, gfc_conv_string_parameter,
	gfc_trans_scalar_assign): Add extra arguments l_is_temp
	and r_is_var to references to latter function.
	(gfc_conv_function_call): Add enum for types of argument and
	an associated variable parm_kind. Deallocate components of
	INTENT(OUT) and non-variable arrays.
	(gfc_trans_subcomponent_assign): Add block to assign arrays
	to allocatable components.
	(gfc_trans_scalar_assign): Add block to handle assignments of
	derived types with allocatable components, using the above new
	arguments to control allocation/deallocation of memory and the
	copying of allocated arrays.
	* trans-array.c (gfc_array_allocate): Remove old identification 
	of pointer and replace with that of an allocatable array. Add
	nullify of structures with allocatable components. 
	(gfc_conv_array_initializer): Treat EXPR_NULL.
	(gfc_conv_array_parameter): Deallocate allocatable components
	of non-variable structures.
	(gfc_trans_dealloc_allocated): Use second argument of library
	deallocate to inhibit, without error, freeing NULL pointers.
	(get_full_array_size): New function to return the size of a
	full array.
	(gfc_duplicate_allocatable): New function to allocate and copy
	allocated data.
	(structure_alloc_comps): New recursive function to deallocate,
	nullify or copy allocatable components.
	(gfc_nullify_alloc_comp, gfc_deallocate_alloc_comp,
	gfc_copy_alloc_comp): New interface functions to call previous.
	(gfc_trans_deferred_array): Add the code to nullify allocatable
	components, when entering scope, and to deallocate them on
	leaving. Do not call gfc_trans_static_array_pointer and return
	for structures with allocatable components and default
	initializers.
	* symbol.c (gfc_set_component_attr): Set allocatable field.
	(gfc_get_component_attr): Set the allocatable attribute.
	* intrinsic.h : Prototype for gfc_check_move_alloc.
	* decl.c (build_struct): Apply TR15581 constraints for
	allocatable components.
	(variable_decl): Default initializer is always NULL for
	allocatable components.
	(match_attr_spec): Allow, or not, allocatable components,
	according to the standard in force.
	* trans-array.h : Prototypes for gfc_nullify_alloc_comp,
	gfc_deallocate_alloc_comp, gfc_copy_alloc_comp and
	gfc_duplicate_allocatable.
	* gfortran.texi : Add mention of TR15581 extensions.
	* gfortran.h : Add attribute alloc_comp, add
	gfc_components field allocatable and add the prototype
	for gfc_expr_to_initialize.
	* trans-stmt.c (generate_loop_for_temp_to_lhs,
	generate_loop_for_rhs_to_temp, gfc_trans_where_assign,
	gfc_trans_where_3): Add extra arguments to calls to
	gfc_trans_scalar_assign and set appropriately.
	(gfc_trans_allocate): Nullify allocatable components.
	(gfc_trans_deallocate): Deallocate to ultimate allocatable
	components but stop at ultimate pointer components.
	* module.c (mio_symbol_attribute, mio_symbol_attribute,
	mio_component): Add module support for allocatable
	components.
	* trans-types.c (gfc_get_derived_type): Treat allocatable
	components.
	* trans.h : Add two boolean arguments to
	gfc_trans_scalar_assign.
	* resolve.c (resolve_structure_cons): Check conformance of
	constructor element and the component.
	(resolve_allocate_expr): Add expression to nullify the
	constructor expression for allocatable components.
	(resolve_transfer): Inhibit I/O of derived types with
	allocatable components.
	(resolve_fl_derived): Skip check of bounds of allocatable
	components.
	* trans-decl.c (gfc_get_symbol_decl): Add derived types
	with allocatable components to deferred variable.
	(gfc_trans_deferred_vars): Make calls for derived types
	with allocatable components to gfc_trans_deferred_array.
	(gfc_generate_function_code): Nullify allocatable
	component function result on entry.
	* parse.c (parse_derived): Set symbol attr.allocatable if
	allocatable components are present.
	* check.c (gfc_check_allocated): Enforce attr.allocatable
	for intrinsic arguments.
	(gfc_check_move_alloc): Check arguments of move_alloc.
	* primary.c (gfc_variable_attr): Set allocatable attribute.
	* intrinsic.texi : Add index entry and section for
	for move_alloc.

	PR fortran/29115
	* resolve.c (resolve_structure_cons): It is an error if the
	pointer component elements of a derived type constructor are
	not pointer or target.


	PR fortran/29211
	* trans-stmt.c (generate_loop_for_temp_to_lhs,
	generate_loop_for_rhs_to_temp): Provide a string length for
	the temporary by copying that of the other side of the scalar
	assignment.


2006-10-05  Paul Thomas  <pault@gcc.gnu.org>
	    Erik Edelmann  <edelmann@gcc.gnu.org>

	PR libgfortran/20541
	* Makefile.in : Add move_alloc.
	* intrinsics/move_alloc.c: New function.
	* Makefile.am : Add move_alloc.



2006-10-05  Erik Edelmann  <edelmann@gcc.gnu.org>
	    Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/20541
	* gfortran.dg/alloc_comp_basics_1.f90: New test.
	* gfortran.dg/alloc_comp_basics_2.f90: New test.
	* gfortran.dg/alloc_comp_assign_1.f90: New test.
	* gfortran.dg/alloc_comp_assign_2.f90: New test.
	* gfortran.dg/alloc_comp_assign_3.f90: New test.
	* gfortran.dg/alloc_comp_assign_4.f90: New test.
	* gfortran.dg/alloc_comp_constraint_1.f90: New test.
	* gfortran.dg/alloc_comp_constraint_2.f90: New test.
	* gfortran.dg/alloc_comp_constraint_3.f90: New test.
	* gfortran.dg/alloc_comp_constructor_1.f90: New test.
	* gfortran.dg/alloc_comp_constructor_2.f90: New test.
	* gfortran.dg/alloc_comp_initializer_1.f90: New test.
	* gfortran.dg/alloc_comp_std.f90: New test.
	* gfortran.dg/move_alloc.f90: New test.

	PR fortran/29115
	* gfortran.dg/derived_constructor_comps_2.f90: New test.

	PR fortran/29211
	* gfortran.dg/forall_char_dependencies_1.f90: New test.

From-SVN: r117558
2006-10-08 16:21:55 +00:00
François-Xavier Coudert 0e7e7e6e82 re PR fortran/16580 ([4.1 only] gfortran ICE on test g77.f-torture/execute/intrinsic77.f)
PR fortran/16580
	PR fortran/29288

	* gcc/fortran/intrinsic.c (add_sym): Define the actual_ok when a
	gfc_intrinsic_sym structure is filled.
	(gfc_intrinsic_actual_ok): New function.
	(add_sym_0s, add_sym_1s, add_sym_2s, add_sym_3s, add_sym_4s,
	add_sym_5s): Intrinsic subroutines are not allowed as actual
	arguments, so we remove argument actual_ok.
	(add_functions): Correct the values for actual_ok of all intrinsics.
	(add_subroutines): Remove the actual_ok argument, which was never used.
	* gcc/fortran/intrinsic.h (gfc_intrinsic_actual_ok): New prototype.
	* gcc/fortran/gfortran.h (gfc_resolve_index_func): New prototype.
	* gcc/fortran/resolve.c (resolve_actual_arglist): Check whether
	an intrinsic used as an argument list is allowed there.
	* gcc/fortran/iresolve.c (gfc_resolve_index_func): New function.
	(gfc_resolve_len): Change intrinsic function name to agree with
	libgfortran.
	* gcc/fortran/trans-decl.c (gfc_get_extern_function_decl): Add
	new case, because some specific intrinsics take 3 arguments.
	* gcc/fortran/intrinsic.texi: DIMAG is a GNU extension.

	* libgfortran/Makefile.am: Add the new files to the build
	process, and rules to build them.
	* libgfortran/Makefile.in: Regenerate.
	* libgfortran/m4/misc_specifics.m4: New file.
	* libgfortran/m4/specific.m4: Add new special cases for function
	with complex argument and real result, like abs_c* and aimag_c*.
	* libgfortran/intrinsics/f2c_specifics.F90: Add specifics for
	AIMAG, ASINH, ACOSH and ATANH.
	* libgfortran/generated/_aimag_c4.F90: New file.
	* libgfortran/generated/_aimag_c8.F90: New file.
	* libgfortran/generated/_asinh_r10.F90: New file.
	* libgfortran/generated/_acosh_r16.F90: New file.
	* libgfortran/generated/_aimag_c10.F90: New file.
	* libgfortran/generated/_atanh_r16.F90: New file.
	* libgfortran/generated/_acosh_r4.F90: New file.
	* libgfortran/generated/_acosh_r8.F90: New file.
	* libgfortran/generated/_asinh_r4.F90: New file.
	* libgfortran/generated/_asinh_r8.F90: New file.
	* libgfortran/generated/_asinh_r16.F90: New file.
	* libgfortran/generated/_atanh_r4.F90: New file.
	* libgfortran/generated/_atanh_r8.F90: New file.
	* libgfortran/generated/_acosh_r10.F90: New file.
	* libgfortran/generated/misc_specifics.F90: New file.
	* libgfortran/generated/_aimag_c16.F90: New file.
	* libgfortran/generated/_atanh_r10.F90: New file.

	* gcc/testsuite/gfortran.fortran-torture/execute/specifics.f90:
	Add tests for using all possible intrinsics as actual arguments.
	* gcc/testsuite/gfortran.dg/specifics_1.f90: Add tests for using
	all possible intrinsics as actual arguments.
	* gcc/testsuite/gfortran.dg/specifics_2.f90: New file.
	* gcc/testsuite/gfortran.dg/specifics_3.f90: New file.

From-SVN: r117534
2006-10-07 13:34:16 +00:00
Steven G. Kargl 2c3c88ec20 Makefile.am: Use $(M4) instead of m4.
2006-10-05  Steven G. Kargl  <kargl@gcc.gnu.org>

	* Makefile.am: Use $(M4) instead of m4.
	* Makefile.in: Regenerated.

From-SVN: r117467
2006-10-05 21:21:53 +00:00
Francois-Xavier Coudert f3ed85f6eb Makefile.am: Install libgfortranbegin inside compiler libraries directory instead of system...
* Makefile.am: Install libgfortranbegin inside compiler libraries
	directory instead of system libraries directory.
	* Makefile.in: Regenerate.

From-SVN: r117273
2006-09-28 05:39:00 +00:00
Francois-Xavier Coudert 41e41397de Makefile.am: Remove dependency on gfortypes.h.
* Makefile.am: Remove dependency on gfortypes.h.
	* Makefile.in: Regenerate.

From-SVN: r117178
2006-09-24 08:55:52 +00:00
Thomas Koenig 73c9fbdf8c Makefile.in: Regenerate using automake 1.9.6.
2006-08-02  Thomas Koenig  <Thomas.Koenig@online.de>

        * Makefile.in:  Regenerate using automake 1.9.6.
        * aclocal.m4:  Revert to previous version.

From-SVN: r115881
2006-08-02 20:05:23 +00:00
Thomas Koenig cdc5524fc8 re PR libfortran/28452 (__gfortran_random_r10 not found)
2006-08-01  Thomas Koenig  <Thomas.Koenig@online.de>

	PR libfortran/28542
	* Makefile.am:  Remove normalize.c.
	* aclocal.m4:  Regenerate using aclocal 1.9.3.
	* Makefile.in:  Regenerate using automake 1.9.3.
	* libgfortran.h:  #include <float.h>.
	Define GFC_REAL_*_DIGITS and GFC_REAL_*_RADIX.
	Remove prototypes for normalize_r4_i4 and normalize_r8_i8.
	* intrinsics/random.c (top level): Add prototypes for
	random_r10, arandom_r10, random_r16 and arandom_r16.
	(rnumber_4):  New static function.
	(rnumber_8):  New static function.
	(rnumber_10): New static function.
	(rnumber_16): New static function.
	(top level):  Set to kiss_size to 12 if we have
	REAL(KIND=16), to 8 otherwise.
	Define KISS_DEFAULT_SEED_1, KISS_DEFAULT_SEED_2 and
	KISS_DEFAULT_SEED_3.
	(kiss_random_kernel):  Take argument to differentiate
	between different random number generators.
	(random_r4):  Add argument to call to kiss_random_kernel,
	use rnumber_*.
	(random_r8):  Likewise.
	(random_r10):  New function.
	(random_r16):  New function.
	(arandom_r4):  Add argument to call to kiss_random_kernel,
	use_rnumber_*.
	(arandom_r8):  Likewise.
	(arandom_r10):  New function.
	(arandom_r16):  New function.
	* intrinsics/rand.c (rand):  Use shift and mask.
	* runtime/normalize.c:  Remove.

2006-08-01  Thomas Koenig  <Thomas.Koenig@online.de>

	PR libfortran/28542
	* gfortran.dg/random_3.f90:  New test.

From-SVN: r115858
2006-08-01 17:15:04 +00:00
Francois-Xavier Coudert a119fc1ca8 intrinsic.c (add_functions): Add ACCESS, CHMOD, RSHIFT, LSHIFT.
* intrinsic.c (add_functions): Add ACCESS, CHMOD, RSHIFT, LSHIFT.
	(add_subroutines): Add LTIME, GMTIME and CHMOD.
	* intrinsic.h (gfc_check_access_func, gfc_check_chmod,
	gfc_check_chmod_sub, gfc_check_ltime_gmtime, gfc_simplify_rshift,
	gfc_simplify_lshift, gfc_resolve_access, gfc_resolve_chmod,
	gfc_resolve_rshift, gfc_resolve_lshift, gfc_resolve_chmod_sub,
	gfc_resolve_gmtime, gfc_resolve_ltime): Add prototypes.
	* gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_ACCESS,
	GFC_ISYM_CHMOD, GFC_ISYM_LSHIFT, GFC_ISYM_RSHIFT.
	* iresolve.c (gfc_resolve_access, gfc_resolve_chmod,
	gfc_resolve_rshift, gfc_resolve_lshift, gfc_resolve_chmod_sub,
	gfc_resolve_gmtime, gfc_resolve_ltime): New functions.
	* check.c (gfc_check_access_func, gfc_check_chmod,
	gfc_check_chmod_sub, gfc_check_ltime_gmtime): New functions.
	* trans-intrinsic.c (gfc_conv_intrinsic_rlshift): New function.
	(gfc_conv_intrinsic_function): Add cases for the new GFC_ISYM_*.

	* intrinsics/date_and_time.c: Add functions for GMTIME and LTIME.
	* intrinsics/access.c: New file.
	* intrinsics/chmod.c: New file.
	* configure.ac: Add checks for <sys/wait.h>, access, fork,execl
	and wait.
	* Makefile.am: Add new files intrinsics/access.c and
	intrinsics/chmod.c.
	* configure: Regenerate.
	* config.h.in: Regenerate.
	* Makefile.in: Regenerate.

	* gcc/testsuite/gfortran.dg/chmod_3.f90: New test.
	* gcc/testsuite/gfortran.dg/ltime_gmtime_1.f90: New test.
	* gcc/testsuite/gfortran.dg/ltime_gmtime_2.f90: New test.
	* gcc/testsuite/gfortran.dg/lrshift_1.f90: New test.
	* gcc/testsuite/gfortran.dg/chmod_1.f90: New test.
	* gcc/testsuite/gfortran.dg/chmod_2.f90: New test.

From-SVN: r115825
2006-07-30 20:48:00 +00:00
François-Xavier Coudert bf3fb7e43c intrinsic.c (add_functions): Add INT2, SHORT, INT8, LONG, LSTAT, MCLOCK and MCLOCK8 intrinsic functions.
* intrinsic.c (add_functions): Add INT2, SHORT, INT8, LONG,
	LSTAT, MCLOCK and MCLOCK8 intrinsic functions.
	(add_subroutines): Add LSTAT intrinsic subroutine.
	* gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_INT2,
	GFC_ISYM_INT8, GFC_ISYM_LONG, GFC_ISYM_LSTAT, GFC_ISYM_MCLOCK
	and GFC_ISYM_MCLOCK8.
	* iresolve.c (gfc_resolve_int2, gfc_resolve_int8,
	gfc_resolve_long, gfc_resolve_lstat, gfc_resolve_mclock,
	gfc_resolve_mclock8, gfc_resolve_lstat_sub): New functions.
	* check.c (gfc_check_intconv): New function.
	* trans-intrinsic.c (gfc_conv_intrinsic_function): Add cases for
	the added GFC_ISYM_*.
	* simplify.c (gfc_simplify_intconv, gfc_simplify_int2,
	gfc_simplify_int8, gfc_simplify_long): New functions.
	* intrinsic.h (gfc_check_intconv, gfc_simplify_int2,
	gfc_simplify_int8, gfc_simplify_long, gfc_resolve_int2,
	gfc_resolve_int8, gfc_resolve_long, gfc_resolve_lstat,
	gfc_resolve_mclock, gfc_resolve_mclock8, gfc_resolve_lstat_sub):
	Add prototypes.

	* gfortran.dg/mclock.f90: New test.
	* gfortran.dg/int_conv_1.f90: New test.
	* gfortran.dg/stat_1.f90: New test.
	* gfortran.dg/stat_2.f90: New test.

	* configure.ac: Check for function clock.
	* Makefile.am: Compile new file intrinsics/clock.c.
	* intrinsics/clock.c: New file.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* config.h.in: Regenerate.
	* intrinsics/stat.c: Rename the old stat_i?_sub functions to
	helper functions stat_i?_sub_0, and use them for both STAT and
	LSTAT.

From-SVN: r115754
2006-07-26 11:58:48 +00:00
Janne Blomqvist dae2efc470 re PR libfortran/27919 (dot_product should be removed from the library)
2006-07-19  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/27919
	* m4/dotprodc.m4: Remove.
	* m4/dotprodl.m4: Remove.
	* m4/dotprod.m4: Remove.
	* generated/dotprod_*.c: Remove.
	* Makefile.am: Remove any references to dot_product
	implementation.
	* Makefile.in: Regenerated.

From-SVN: r115593
2006-07-19 19:51:49 +03:00
Francois-Xavier Coudert 3e7cb1c7e7 re PR fortran/28094 (Modulo of real(kind=10) variables doesn't work)
PR fortran/28094

	* trans-intrinsic.c (gfc_conv_intrinsic_mod): Support cases where
	there is no integer kind equal to the resulting real kind.
	* intrinsic.c (add_functions): MODULO is not allowed as an actual
	argument.

	* Makefile.am: Add _mod_r10.F90 and _mod_r16.F90.
	* Makefile.in: Regenerate.
	* generated/_mod_r10.F90: New file.
	* generated/_mod_r16.F90: New file.

From-SVN: r114961
2006-06-24 08:27:32 +00:00
Francois-Xavier Coudert ecebfb8be1 re PR fortran/26769 (Implement transpose() and reshape() for real instead of using integer)
PR libfortran/26769

	* iresolve.c (gfc_resolve_reshape): Call reshape_r4 and
	reshape_r8 instead of reshape_4 and reshape_8.
	(gfc_resolve_transpose): Likewise for transpose.

	* Makefile.am: Add r4 and r8 versions of reshape and transpose.
	* Makefile.in: Regenerate.
	* generated/reshape_r4.c: New file.
	* generated/reshape_r8.c: New file.
	* generated/transpose_r4.c: New file.
	* generated/transpose_r8.c: New file.

From-SVN: r114880
2006-06-22 06:04:02 +00:00
Janne Blomqvist dd46a4ded1 configure.ac: Remove AC_FUNC_MMAP.
2006-05-26  Janne Blomqvist  <jb@gcc.gnu.org>

	* configure.ac: Remove AC_FUNC_MMAP.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
	* config.h.in: Regenerated.
	* aclocal.m4: Regenerated.

From-SVN: r114137
2006-05-26 22:12:08 +03:00
Carlos O'Donell f635a77220 Makefile.am: Add install-html target.
2006-05-24  Carlos O'Donell  <carlos@codesourcery.com>

	* Makefile.am: Add install-html target. Add install-html to .PHONY
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.

From-SVN: r114049
2006-05-24 18:37:53 +00:00
Jakub Jelinek 6d360fd8f2 re PR fortran/26769 (Implement transpose() and reshape() for real instead of using integer)
PR fortran/26769
	* iresolve.c (gfc_resolve_reshape): Use reshape_r16 for real(16).
	(gfc_resolve_transpose): Use transpose_r16 for real(16).

	* Makefile.am (i_transpose_c): Add generated/transpose_r16.c.
	(i_reshape_c): Add generated/reshape_r16.c.
	* Makefile.in: Regenerated.
	* generated/transpose_r16.c: Generated new file.
	* generated/redhape_r16.c: Generated new file.

From-SVN: r113169
2006-04-22 09:08:58 +02:00
Thomas Koenig 9a0fb43ea1 re PR fortran/26769 (Implement transpose() and reshape() for real instead of using integer)
2006-03-25  Thomas Koenig  <Thomas.Koenig@online.de>

	PR fortran/26769
	* iresolve.c (gfc_resolve_reshape):  Remove doubling of
	kind for complex. For real(kind=10), call reshape_r10.
	(gfc_resolve_transpose):  For real(kind=10), call
	transpose_r10.

2006-03-25  Thomas Koenig  <Thomas.Koenig@online.de>

	PR fortran/26769
	* Makefile.am:  Add transpose_r10.c and reshape_r10.c.
	* aclocal.m4:  Regenerate using aclocal 1.9.3.
	* Makefile.in:  Regenerate using automake 1.9.3.
	* m4/iparm.m4 (rtype_ccode):  If rtype_letter is `i',
	evaluate to rtype_kind, otherwise to rtype_code.
	* generated/transpose_r10.c:  Add.
	* generated/reshape_r10.c:  Add.

2006-03-25  Thomas Koenig  <Thomas.Koenig@online.de>

	PR fortran/26769
	* gfortran.dg/transpose_reshape_r10.f90:  New test case.

From-SVN: r112381
2006-03-25 21:15:48 +00:00
Janne Blomqvist 8c7ffa93a8 configure.ac: Remove check for sys/mman.h.
2006-01-07  Janne Blomqvist  <jb@gcc.gnu.org>

	* configure.ac: Remove check for sys/mman.h.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
	* config.h.in: Regenerated.
	* aclocal.m4: Regenerated.

From-SVN: r109455
2006-01-07 21:28:22 +02:00
Janne Blomqvist 74f04a6a44 Makefile.am: Enable loop unrolling for matmul.
2005-12-10  Janne Blomqvist  <jb@gcc.gnu.org>

	* Makefile.am: Enable loop unrolling for matmul.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
	* aclocal.m4: Regenerated.

From-SVN: r108359
2005-12-10 23:22:16 +02:00