Commit Graph

141 Commits

Author SHA1 Message Date
Janus Weil f0f67c96c3 re PR libfortran/36044 (user-requested backtrace)
2012-12-20  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/36044
	* gfortran.h (gfc_isym_id): Add GFC_ISYM_BACKTRACE.
	* intrinsic.c (add_subroutines): Add "backtrace".
	* intrinsic.texi (BACKTRACE): Document BACKTRACE intrinsic.


2012-12-20  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/36044
	* gfortran.map: Add _gfortran_backtrace.
	* libgfortran.h: Rename 'show_backtrace' and export.
	* runtime/backtrace.c (show_backtrace): Rename to 'backtrace'.
	Don't show message. Close file descriptor. Export.
	* runtime/compile_options.c (backtrace_handler): Renamed
	'show_backtrace'. Move message outside.
	* runtime/error.c (sys_abort): Ditto.

From-SVN: r194648
2012-12-20 19:15:13 +01:00
Janne Blomqvist 227e441f2b Fix usage of secure_getenv with glibc 2.17.
See http://sourceware.org/glibc/wiki/Tips_and_Tricks/secure_getenv

2012-10-06  Janne Blomqvist  <jb@gcc.gnu.org>

	* configure.ac: Check for presence of secure_getenv.
	* libgfortran.h: Use HAVE_SECURE_GETENV.
	* Makefile.in: Regenerated.
	* aclocal.m4: Regenerated.
	* config.h.in: Regenerated.
	* configure: Regenerated.

From-SVN: r192169
2012-10-06 23:56:05 +03:00
Janne Blomqvist 80b91c0b39 PR 52428 Range checking when reading integer values.
gcc/fortran ChangeLog:

2012-05-14  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/52428
	* gfortran.texi: Update _gfortran_set_options documentation.
	* invoke.texi: Remove runtime behavior description of
	-fno-range-check.
	* trans-decl.c (create_main_function): Don't pass the range-check
	setting to the library.


libgfortran ChangeLog:

2012-05-14  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/52428
	* io/io.h (max_value): Rename to si_max, remove second argument.
	* io/list_read.c (convert_integer): Use unsigned types when
	parsing the digits, set max value depending on the sign.
	* io/read.c (max_value): Rename to si_max, remove second argument,
	simplify.
	(read_decimal): Set max value depending on sign, always check
	overflow.
	(read_radix): Calculate max unsigned value directly.
	* libgfortran.h (struct compile_options_t): Remove range_check
	field.
	* runtime/compile_options.c (set_options): Skip handling
	options[7].
	(init_compile_options): Don't set removed field.


gcc/testsuite ChangeLog:

2012-05-14  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/52428
	* gfortran.dg/int_range_io_1.f90: New test.

From-SVN: r187478
2012-05-14 22:39:23 +03:00
Janne Blomqvist 68ee9c0807 Fix handling of temporary files.
2012-05-05  Janne Blomqvist  <jb@gcc.gnu.org>

        * gfortran.texi (GFORTRAN_TMPDIR): Rename to TMPDIR, explain
        algorithm for choosing temp directory.


2012-05-05  Janne Blomqvist  <jb@gcc.gnu.org>

        * config.h.in: Regenerated.
        * configure: Regenerated.
        * configure.ac: Add checks for getegid and __secure_getenv.
        * io/unix.c (P_tmpdir): Fallback definition for macro.
        (tempfile_open): New function.
        (tempfile): Use secure_getenv, call tempfile_open to try each
        directory in turn.
        * libgfortran.h (DEFAULT_TMPDIR): Remove macro.
        (secure_getenv): New macro/prototype.
        * runtime/environ.c (secure_getenv): New function.
        (variable_table): Rename GFORTRAN_TMPDIR to TMPDIR.
        * runtime/main.c (find_addr2line): Use secure_getenv.

From-SVN: r187190
2012-05-05 09:30:51 +03:00
Thomas Koenig 79617d7e2e re PR libfortran/38199 (missed optimization: I/O performance)
2012-04-15  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/38199
	PR libfortran/50673
	* intrinsics/string_intriniscs_inc.c (string_len_trim):
	Remove prototypes for string_len_trim and move to...
	* libgfortran.h (string_len_trim): ... here and
	(string_len_trim_char4): ...here.
	* io/unit.c: For non-array internal arrays where we do reading,
	adjust the record length to the last non-blank character.
	* io/unix.c:  Fix typo.

From-SVN: r186466
2012-04-15 11:52:44 +00:00
Tristan Gingold 62755fd571 libgfortran.h: Include complex.h before math.h
2012-04-04  Tristan Gingold  <gingold@adacore.com>

        * libgfortran.h: Include complex.h before math.h

From-SVN: r186131
2012-04-04 07:46:53 +00:00
Janne Blomqvist 1a0fd3d33a Combined get_mem and internal_malloc_size.
2012-03-26  Janne Blomqvist  <jb@gcc.gnu.org>

	* runtime/memory.c (get_mem): Rename to xmalloc, check for zero
	size.
	(internal_malloc_size): Remove.
	* libgfortran.h (get_mem): Rename to xmalloc.
	(internal_malloc_size): Remove prototype.
	* Makefile.am (i_iall_c): Fix dependency.
	(i_iany_c): Likewise.
	(i_iparity_c): Likewise.
	(i_norm2_c): Likewise.
	(i_parity_c): Likewise.
	* Makefile.in: Regenerated.
	* m4/parity.m4: Fix typo in comment.
	* generated/all_l1.c: Regenerated.
	* generated/all_l16.c: Regenerated.
	* generated/all_l2.c: Regenerated.
	* generated/all_l4.c: Regenerated.
	* generated/all_l8.c: Regenerated.
	* generated/any_l1.c: Regenerated.
	* generated/any_l16.c: Regenerated.
	* generated/any_l2.c: Regenerated.
	* generated/any_l4.c: Regenerated.
	* generated/any_l8.c: Regenerated.
	* generated/bessel_r10.c: Regenerated.
	* generated/bessel_r16.c: Regenerated.
	* generated/bessel_r4.c: Regenerated.
	* generated/bessel_r8.c: Regenerated.
	* generated/count_16_l.c: Regenerated.
	* generated/count_1_l.c: Regenerated.
	* generated/count_2_l.c: Regenerated.
	* generated/count_4_l.c: Regenerated.
	* generated/count_8_l.c: Regenerated.
	* generated/cshift1_16.c: Regenerated.
	* generated/cshift1_4.c: Regenerated.
	* generated/cshift1_8.c: Regenerated.
	* generated/eoshift1_16.c: Regenerated.
	* generated/eoshift1_4.c: Regenerated.
	* generated/eoshift1_8.c: Regenerated.
	* generated/eoshift3_16.c: Regenerated.
	* generated/eoshift3_4.c: Regenerated.
	* generated/eoshift3_8.c: Regenerated.
	* generated/iall_i1.c: Regenerated.
	* generated/iall_i16.c: Regenerated.
	* generated/iall_i2.c: Regenerated.
	* generated/iall_i4.c: Regenerated.
	* generated/iall_i8.c: Regenerated.
	* generated/iany_i1.c: Regenerated.
	* generated/iany_i16.c: Regenerated.
	* generated/iany_i2.c: Regenerated.
	* generated/iany_i4.c: Regenerated.
	* generated/iany_i8.c: Regenerated.
	* generated/in_pack_c10.c: Regenerated.
	* generated/in_pack_c16.c: Regenerated.
	* generated/in_pack_c4.c: Regenerated.
	* generated/in_pack_c8.c: Regenerated.
	* generated/in_pack_i1.c: Regenerated.
	* generated/in_pack_i16.c: Regenerated.
	* generated/in_pack_i2.c: Regenerated.
	* generated/in_pack_i4.c: Regenerated.
	* generated/in_pack_i8.c: Regenerated.
	* generated/in_pack_r10.c: Regenerated.
	* generated/in_pack_r16.c: Regenerated.
	* generated/in_pack_r4.c: Regenerated.
	* generated/in_pack_r8.c: Regenerated.
	* generated/iparity_i1.c: Regenerated.
	* generated/iparity_i16.c: Regenerated.
	* generated/iparity_i2.c: Regenerated.
	* generated/iparity_i4.c: Regenerated.
	* generated/iparity_i8.c: Regenerated.
	* generated/matmul_c10.c: Regenerated.
	* generated/matmul_c16.c: Regenerated.
	* generated/matmul_c4.c: Regenerated.
	* generated/matmul_c8.c: Regenerated.
	* generated/matmul_i1.c: Regenerated.
	* generated/matmul_i16.c: Regenerated.
	* generated/matmul_i2.c: Regenerated.
	* generated/matmul_i4.c: Regenerated.
	* generated/matmul_i8.c: Regenerated.
	* generated/matmul_l16.c: Regenerated.
	* generated/matmul_l4.c: Regenerated.
	* generated/matmul_l8.c: Regenerated.
	* generated/matmul_r10.c: Regenerated.
	* generated/matmul_r16.c: Regenerated.
	* generated/matmul_r4.c: Regenerated.
	* generated/matmul_r8.c: Regenerated.
	* generated/maxloc0_16_i1.c: Regenerated.
	* generated/maxloc0_16_i16.c: Regenerated.
	* generated/maxloc0_16_i2.c: Regenerated.
	* generated/maxloc0_16_i4.c: Regenerated.
	* generated/maxloc0_16_i8.c: Regenerated.
	* generated/maxloc0_16_r10.c: Regenerated.
	* generated/maxloc0_16_r16.c: Regenerated.
	* generated/maxloc0_16_r4.c: Regenerated.
	* generated/maxloc0_16_r8.c: Regenerated.
	* generated/maxloc0_4_i1.c: Regenerated.
	* generated/maxloc0_4_i16.c: Regenerated.
	* generated/maxloc0_4_i2.c: Regenerated.
	* generated/maxloc0_4_i4.c: Regenerated.
	* generated/maxloc0_4_i8.c: Regenerated.
	* generated/maxloc0_4_r10.c: Regenerated.
	* generated/maxloc0_4_r16.c: Regenerated.
	* generated/maxloc0_4_r4.c: Regenerated.
	* generated/maxloc0_4_r8.c: Regenerated.
	* generated/maxloc0_8_i1.c: Regenerated.
	* generated/maxloc0_8_i16.c: Regenerated.
	* generated/maxloc0_8_i2.c: Regenerated.
	* generated/maxloc0_8_i4.c: Regenerated.
	* generated/maxloc0_8_i8.c: Regenerated.
	* generated/maxloc0_8_r10.c: Regenerated.
	* generated/maxloc0_8_r16.c: Regenerated.
	* generated/maxloc0_8_r4.c: Regenerated.
	* generated/maxloc0_8_r8.c: Regenerated.
	* generated/maxloc1_16_i1.c: Regenerated.
	* generated/maxloc1_16_i16.c: Regenerated.
	* generated/maxloc1_16_i2.c: Regenerated.
	* generated/maxloc1_16_i4.c: Regenerated.
	* generated/maxloc1_16_i8.c: Regenerated.
	* generated/maxloc1_16_r10.c: Regenerated.
	* generated/maxloc1_16_r16.c: Regenerated.
	* generated/maxloc1_16_r4.c: Regenerated.
	* generated/maxloc1_16_r8.c: Regenerated.
	* generated/maxloc1_4_i1.c: Regenerated.
	* generated/maxloc1_4_i16.c: Regenerated.
	* generated/maxloc1_4_i2.c: Regenerated.
	* generated/maxloc1_4_i4.c: Regenerated.
	* generated/maxloc1_4_i8.c: Regenerated.
	* generated/maxloc1_4_r10.c: Regenerated.
	* generated/maxloc1_4_r16.c: Regenerated.
	* generated/maxloc1_4_r4.c: Regenerated.
	* generated/maxloc1_4_r8.c: Regenerated.
	* generated/maxloc1_8_i1.c: Regenerated.
	* generated/maxloc1_8_i16.c: Regenerated.
	* generated/maxloc1_8_i2.c: Regenerated.
	* generated/maxloc1_8_i4.c: Regenerated.
	* generated/maxloc1_8_i8.c: Regenerated.
	* generated/maxloc1_8_r10.c: Regenerated.
	* generated/maxloc1_8_r16.c: Regenerated.
	* generated/maxloc1_8_r4.c: Regenerated.
	* generated/maxloc1_8_r8.c: Regenerated.
	* generated/maxval_i1.c: Regenerated.
	* generated/maxval_i16.c: Regenerated.
	* generated/maxval_i2.c: Regenerated.
	* generated/maxval_i4.c: Regenerated.
	* generated/maxval_i8.c: Regenerated.
	* generated/maxval_r10.c: Regenerated.
	* generated/maxval_r16.c: Regenerated.
	* generated/maxval_r4.c: Regenerated.
	* generated/maxval_r8.c: Regenerated.
	* generated/minloc0_16_i1.c: Regenerated.
	* generated/minloc0_16_i16.c: Regenerated.
	* generated/minloc0_16_i2.c: Regenerated.
	* generated/minloc0_16_i4.c: Regenerated.
	* generated/minloc0_16_i8.c: Regenerated.
	* generated/minloc0_16_r10.c: Regenerated.
	* generated/minloc0_16_r16.c: Regenerated.
	* generated/minloc0_16_r4.c: Regenerated.
	* generated/minloc0_16_r8.c: Regenerated.
	* generated/minloc0_4_i1.c: Regenerated.
	* generated/minloc0_4_i16.c: Regenerated.
	* generated/minloc0_4_i2.c: Regenerated.
	* generated/minloc0_4_i4.c: Regenerated.
	* generated/minloc0_4_i8.c: Regenerated.
	* generated/minloc0_4_r10.c: Regenerated.
	* generated/minloc0_4_r16.c: Regenerated.
	* generated/minloc0_4_r4.c: Regenerated.
	* generated/minloc0_4_r8.c: Regenerated.
	* generated/minloc0_8_i1.c: Regenerated.
	* generated/minloc0_8_i16.c: Regenerated.
	* generated/minloc0_8_i2.c: Regenerated.
	* generated/minloc0_8_i4.c: Regenerated.
	* generated/minloc0_8_i8.c: Regenerated.
	* generated/minloc0_8_r10.c: Regenerated.
	* generated/minloc0_8_r16.c: Regenerated.
	* generated/minloc0_8_r4.c: Regenerated.
	* generated/minloc0_8_r8.c: Regenerated.
	* generated/minloc1_16_i1.c: Regenerated.
	* generated/minloc1_16_i16.c: Regenerated.
	* generated/minloc1_16_i2.c: Regenerated.
	* generated/minloc1_16_i4.c: Regenerated.
	* generated/minloc1_16_i8.c: Regenerated.
	* generated/minloc1_16_r10.c: Regenerated.
	* generated/minloc1_16_r16.c: Regenerated.
	* generated/minloc1_16_r4.c: Regenerated.
	* generated/minloc1_16_r8.c: Regenerated.
	* generated/minloc1_4_i1.c: Regenerated.
	* generated/minloc1_4_i16.c: Regenerated.
	* generated/minloc1_4_i2.c: Regenerated.
	* generated/minloc1_4_i4.c: Regenerated.
	* generated/minloc1_4_i8.c: Regenerated.
	* generated/minloc1_4_r10.c: Regenerated.
	* generated/minloc1_4_r16.c: Regenerated.
	* generated/minloc1_4_r4.c: Regenerated.
	* generated/minloc1_4_r8.c: Regenerated.
	* generated/minloc1_8_i1.c: Regenerated.
	* generated/minloc1_8_i16.c: Regenerated.
	* generated/minloc1_8_i2.c: Regenerated.
	* generated/minloc1_8_i4.c: Regenerated.
	* generated/minloc1_8_i8.c: Regenerated.
	* generated/minloc1_8_r10.c: Regenerated.
	* generated/minloc1_8_r16.c: Regenerated.
	* generated/minloc1_8_r4.c: Regenerated.
	* generated/minloc1_8_r8.c: Regenerated.
	* generated/minval_i1.c: Regenerated.
	* generated/minval_i16.c: Regenerated.
	* generated/minval_i2.c: Regenerated.
	* generated/minval_i4.c: Regenerated.
	* generated/minval_i8.c: Regenerated.
	* generated/minval_r10.c: Regenerated.
	* generated/minval_r16.c: Regenerated.
	* generated/minval_r4.c: Regenerated.
	* generated/minval_r8.c: Regenerated.
	* generated/norm2_r10.c: Regenerated.
	* generated/norm2_r16.c: Regenerated.
	* generated/norm2_r4.c: Regenerated.
	* generated/norm2_r8.c: Regenerated.
	* generated/pack_c10.c: Regenerated.
	* generated/pack_c16.c: Regenerated.
	* generated/pack_c4.c: Regenerated.
	* generated/pack_c8.c: Regenerated.
	* generated/pack_i1.c: Regenerated.
	* generated/pack_i16.c: Regenerated.
	* generated/pack_i2.c: Regenerated.
	* generated/pack_i4.c: Regenerated.
	* generated/pack_i8.c: Regenerated.
	* generated/pack_r10.c: Regenerated.
	* generated/pack_r16.c: Regenerated.
	* generated/pack_r4.c: Regenerated.
	* generated/pack_r8.c: Regenerated.
	* generated/parity_l1.c: Regenerated.
	* generated/parity_l16.c: Regenerated.
	* generated/parity_l2.c: Regenerated.
	* generated/parity_l4.c: Regenerated.
	* generated/parity_l8.c: Regenerated.
	* generated/product_c10.c: Regenerated.
	* generated/product_c16.c: Regenerated.
	* generated/product_c4.c: Regenerated.
	* generated/product_c8.c: Regenerated.
	* generated/product_i1.c: Regenerated.
	* generated/product_i16.c: Regenerated.
	* generated/product_i2.c: Regenerated.
	* generated/product_i4.c: Regenerated.
	* generated/product_i8.c: Regenerated.
	* generated/product_r10.c: Regenerated.
	* generated/product_r16.c: Regenerated.
	* generated/product_r4.c: Regenerated.
	* generated/product_r8.c: Regenerated.
	* generated/reshape_c10.c: Regenerated.
	* generated/reshape_c16.c: Regenerated.
	* generated/reshape_c4.c: Regenerated.
	* generated/reshape_c8.c: Regenerated.
	* generated/reshape_i16.c: Regenerated.
	* generated/reshape_i4.c: Regenerated.
	* generated/reshape_i8.c: Regenerated.
	* generated/reshape_r10.c: Regenerated.
	* generated/reshape_r16.c: Regenerated.
	* generated/reshape_r4.c: Regenerated.
	* generated/reshape_r8.c: Regenerated.
	* generated/shape_i16.c: Regenerated.
	* generated/shape_i4.c: Regenerated.
	* generated/shape_i8.c: Regenerated.
	* generated/spread_c10.c: Regenerated.
	* generated/spread_c16.c: Regenerated.
	* generated/spread_c4.c: Regenerated.
	* generated/spread_c8.c: Regenerated.
	* generated/spread_i1.c: Regenerated.
	* generated/spread_i16.c: Regenerated.
	* generated/spread_i2.c: Regenerated.
	* generated/spread_i4.c: Regenerated.
	* generated/spread_i8.c: Regenerated.
	* generated/spread_r10.c: Regenerated.
	* generated/spread_r16.c: Regenerated.
	* generated/spread_r4.c: Regenerated.
	* generated/spread_r8.c: Regenerated.
	* generated/sum_c10.c: Regenerated.
	* generated/sum_c16.c: Regenerated.
	* generated/sum_c4.c: Regenerated.
	* generated/sum_c8.c: Regenerated.
	* generated/sum_i1.c: Regenerated.
	* generated/sum_i16.c: Regenerated.
	* generated/sum_i2.c: Regenerated.
	* generated/sum_i4.c: Regenerated.
	* generated/sum_i8.c: Regenerated.
	* generated/sum_r10.c: Regenerated.
	* generated/sum_r16.c: Regenerated.
	* generated/sum_r4.c: Regenerated.
	* generated/sum_r8.c: Regenerated.
	* generated/transpose_c10.c: Regenerated.
	* generated/transpose_c16.c: Regenerated.
	* generated/transpose_c4.c: Regenerated.
	* generated/transpose_c8.c: Regenerated.
	* generated/transpose_i16.c: Regenerated.
	* generated/transpose_i4.c: Regenerated.
	* generated/transpose_i8.c: Regenerated.
	* generated/transpose_r10.c: Regenerated.
	* generated/transpose_r16.c: Regenerated.
	* generated/transpose_r4.c: Regenerated.
	* generated/transpose_r8.c: Regenerated.
	* generated/unpack_c10.c: Regenerated.
	* generated/unpack_c16.c: Regenerated.
	* generated/unpack_c4.c: Regenerated.
	* generated/unpack_c8.c: Regenerated.
	* generated/unpack_i1.c: Regenerated.
	* generated/unpack_i16.c: Regenerated.
	* generated/unpack_i2.c: Regenerated.
	* generated/unpack_i4.c: Regenerated.
	* generated/unpack_i8.c: Regenerated.
	* generated/unpack_r10.c: Regenerated.
	* generated/unpack_r16.c: Regenerated.
	* generated/unpack_r4.c: Regenerated.
	* generated/unpack_r8.c: Regenerated.
	* intrinsics/cshift0.c: Use xmalloc.
	* intrinsics/ctime.c: Likewise.
	* intrinsics/date_and_time.c: Likewise.
	* intrinsics/eoshift0.c: Likewise.
	* intrinsics/eoshift2.c: Likewise.
	* intrinsics/getlog.c: Likewise.
	* intrinsics/pack_generic.c: Likewise.
	* intrinsics/reshape_generic.c: Likewise.
	* intrinsics/spread_generic.c: Likewise.
	* intrinsics/string_intrinsics_inc.c: Likewise.
	* intrinsics/transpose_generic.c: Likewise.
	* intrinsics/unpack_generic.c: Likewise.
	* io/fbuf.c: Likewise.
	* io/format.c: Likewise.
	* io/intrinsics.c: Likewise.
	* io/list_read.c: Likewise.
	* io/open.c: Likewise.
	* io/transfer.c: Likewise.
	* io/unit.c: Likewise.
	* io/unix.c: Likewise.
	* io/write.c: Likewise.
	* m4/bessel.m4: Likewise.
	* m4/cshift1.m4: Likewise.
	* m4/eoshift1.m4: Likewise.
	* m4/eoshift3.m4: Likewise.
	* m4/iforeach.m4: Likewise.
	* m4/ifunction.m4: Likewise.
	* m4/ifunction_logical.m4: Likewise.
	* m4/in_pack.m4: Likewise.
	* m4/matmul.m4: Likewise.
	* m4/matmull.m4: Likewise.
	* m4/pack.m4: Likewise.
	* m4/reshape.m4: Likewise.
	* m4/shape.m4: Likewise.
	* m4/spread.m4: Likewise.
	* m4/transpose.m4: Likewise.
	* m4/unpack.m4: Likewise.
	* runtime/convert_char.c: Likewise.
	* runtime/environ.c: Likewise.
	* runtime/in_pack_generic.c: Likewise.

From-SVN: r185806
2012-03-26 18:16:05 +03:00
Janne Blomqvist f4471acbe3 Use calloc instead of malloc and memset.
2012-03-25  Janne Blomqvist  <jb@gcc.gnu.org>

	* runtime/memory.c (xcalloc): New function.
	* libgfortran.h (xcalloc): New prototype.
	* io/list_read.c (push_char): Use xcalloc instead of get_mem and
	memset.
	(l_push_char): Likewise.
	* io/unit.c (insert_unit): Likewise.
	(get_internal_unit): Likewise.
	* io/unix.c (open_internal): Likewise.
	(open_internal4): Likewise.
	(fd_to_stream): Likewise.

From-SVN: r185773
2012-03-25 08:48:49 +03:00
Tobias Burnus 21d1335b2a libgfortran.h (descriptor_dimension, [...]): Rename _lbound to lower_bound and data to base_addr.
2012-03-10  Tobias Burnus  <burnus@net-b.de>

        * libgfortran.h (descriptor_dimension, GFC_DIMENSION_LBOUND,
        GFC_DIMENSION_EXTENT, GFC_DIMENSION_SET, GFC_DESCRIPTOR_DATA,
        GFC_ARRAY_DESCRIPTOR): Rename _lbound to lower_bound and
        data to base_addr.
        * intrinsics/cshift0.c (size0, cshift0): Handle data to
        base_addr rename.
        * intrinsics/date_and_time.c (date_and_time, secnds, itime_i4,
        itime_i8, gmtime_i4, gmtime_i8, ltime_i4, ltime_i8): Ditto.
        * intrinsics/dtime.c (dtime_sub): Ditto.
        * intrinsics/eoshift0.c (eoshift0): Ditto.
        * intrinsics/eoshift2.c (eoshift2): Ditto.
        * intrinsics/etime.c (etime_sub): Ditto.
        * intrinsics/iso_c_binding.c (c_f_pointer_u0): Ditto.
        * intrinsics/move_alloc.c (move_alloc): Ditto.
        * intrinsics/pack_generic.c (pack_internal, pack,
        pack_s_internal): Ditto.
        * intrinsics/random.c (arandom_r4, arandom_r8, arandom_r10,
        arandom_r16, random_seed_i4, random_seed_i8): Ditto.
        * intrinsics/reshape_generic.c (reshape_internal): Ditto.
        * intrinsics/spread_generic.c (spread_internal,
        spread_internal_scalar, spread, spread_scalar): Ditto.
        * intrinsics/stat.c (stat_i4_sub_0, stat_i8_sub_0, fstat_i4_sub,
        fstat_i8_sub): Ditto.
        * intrinsics/transpose_generic.c (transpose_internal): Ditto.
        * intrinsics/unpack_generic.c (unpack_bounds, unpack_internal,
        unpack1, unpack0, unpack0_char4): Ditto.
        * m4/bessel.m4 (bessel_jn_r'rtype_kind`,
        * bessel_yn_r'rtype_kind`):
        Ditto.
        * m4/cshift0.m4 (cshift0_'rtype_code`): Ditto.
        * m4/cshift1.m4 (cshift1): Ditto.
        * m4/eoshift1.m4 (eoshift1): Ditto.
        * m4/eoshift3.m4 (eoshift3): Ditto.
        * m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Ditto.
        * m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Ditto.
        * m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code):
        * Ditto.
        * m4/in_pack.m4 (internal_pack_'rtype_ccode`): Ditto.
        * m4/in_unpack.m4 (internal_unpack_'rtype_ccode`): Ditto.
        * m4/matmul.m4 (matmul_'rtype_code`): Ditto.
        * m4/matmull.m4 (matmul_'rtype_code`): Ditto.
        * m4/pack.m4 (pack_'rtype_code`): Ditto.
        * m4/reshape.m4 (reshape_'rtype_ccode`): Ditto.
        * m4/shape.m4 (shape_'rtype_kind`): Ditto.
        * m4/spread.m4 (spread_'rtype_code`): Ditto.
        * m4/transpose.m4 (transpose_'rtype_code`): Ditto.
        * m4/unpack.m4 (unpack0_'rtype_code`, unpack1_'rtype_code`):
        * Ditto.
        * runtime/bounds.c (count_0): Ditto.
        * runtime/in_pack_generic.c (internal_pack): Ditto.
        * runtime/in_unpack_generic.c (internal_unpack): Ditto.
        * generated/cshift0_r4.c: Regenerated.
        * generated/unpack_r8.c: Regenerated.
        * generated/cshift0_c10.c: Regenerated.
        * generated/in_unpack_i1.c: Regenerated.
        * generated/eoshift1_16.c: Regenerated.
        * generated/iany_i16.c: Regenerated.
        * generated/reshape_i4.c: Regenerated.
        * generated/parity_l16.c: Regenerated.
        * generated/in_unpack_r16.c: Regenerated.
        * generated/iparity_i1.c: Regenerated.
        * generated/minloc0_16_r10.c: Regenerated.
        * generated/minloc1_16_i8.c: Regenerated.
        * generated/bessel_r8.c: Regenerated.
        * generated/maxloc0_4_i8.c: Regenerated.
        * generated/maxloc1_8_i1.c: Regenerated.
        * generated/sum_c10.c: Regenerated.
        * generated/maxloc0_8_r10.c: Regenerated.
        * generated/unpack_r16.c: Regenerated.
        * generated/maxloc1_16_i1.c: Regenerated.
        * generated/minloc1_4_i1.c: Regenerated.
        * generated/unpack_i4.c: Regenerated.
        * generated/in_pack_i1.c: Regenerated.
        * generated/cshift0_i1.c: Regenerated.
        * generated/minloc0_16_i4.c: Regenerated.
        * generated/minloc1_8_r8.c: Regenerated.
        * generated/maxval_r8.c: Regenerated.
        * generated/unpack_i2.c: Regenerated.
        * generated/matmul_r16.c: Regenerated.
        * generated/maxloc0_16_r8.c: Regenerated.
        * generated/maxloc1_8_i16.c: Regenerated.
        * generated/maxloc0_4_r4.c: Regenerated.
        * generated/pack_c10.c: Regenerated.
        * generated/in_unpack_c8.c: Regenerated.
        * generated/maxloc1_8_i8.c: Regenerated.
        * generated/in_pack_c16.c: Regenerated.
        * generated/parity_l1.c: Regenerated.
        * generated/in_pack_i2.c: Regenerated.
        * generated/maxloc0_4_r8.c: Regenerated.
        * generated/pack_r4.c: Regenerated.
        * generated/matmul_r8.c: Regenerated.
        * generated/pack_i1.c: Regenerated.
        * generated/minloc0_16_r16.c: Regenerated.
        * generated/cshift0_c8.c: Regenerated.
        * generated/minloc1_4_i16.c: Regenerated.
        * generated/minloc0_4_r4.c: Regenerated.
        * generated/product_i2.c: Regenerated.
        * generated/maxval_r10.c: Regenerated.
        * generated/minloc0_16_r8.c: Regenerated.
        * generated/in_pack_i8.c: Regenerated.
        * generated/all_l8.c: Regenerated.
        * generated/minloc0_8_i16.c: Regenerated.
        * generated/minloc1_8_i2.c: Regenerated.
        * generated/matmul_l8.c: Regenerated.
        * generated/spread_r10.c: Regenerated.
        * generated/product_c4.c: Regenerated.
        * generated/reshape_r16.c: Regenerated.
        * generated/cshift0_i16.c: Regenerated.
        * generated/minloc1_8_r10.c: Regenerated.
        * generated/iparity_i8.c: Regenerated.
        * generated/minloc0_16_i8.c: Regenerated.
        * generated/minloc1_8_i1.c: Regenerated.
        * generated/maxloc0_16_r10.c: Regenerated.
        * generated/maxloc1_8_i4.c: Regenerated.
        * generated/maxloc0_16_i8.c: Regenerated.
        * generated/maxloc1_16_i16.c: Regenerated.
        * generated/reshape_i8.c: Regenerated.
        * generated/all_l16.c: Regenerated.
        * generated/cshift1_8.c: Regenerated.
        * generated/matmul_c10.c: Regenerated.
        * generated/pack_r16.c: Regenerated.
        * generated/transpose_r10.c: Regenerated.
        * generated/maxloc1_16_i2.c: Regenerated.
        * generated/minloc1_4_r4.c: Regenerated.
        * generated/reshape_r8.c: Regenerated.
        * generated/product_r10.c: Regenerated.
        * generated/spread_c10.c: Regenerated.
        * generated/reshape_r4.c: Regenerated.
        * generated/in_unpack_i4.c: Regenerated.
        * generated/minval_r4.c: Regenerated.
        * generated/minloc1_16_r16.c: Regenerated.
        * generated/norm2_r8.c: Regenerated.
        * generated/iany_i2.c: Regenerated.
        * generated/eoshift3_8.c: Regenerated.
        * generated/maxloc1_16_r8.c: Regenerated.
        * generated/maxloc0_16_r16.c: Regenerated.
        * generated/cshift0_i8.c: Regenerated.
        * generated/all_l1.c: Regenerated.
        * generated/minloc1_16_r10.c: Regenerated.
        * generated/spread_i16.c: Regenerated.
        * generated/minloc1_8_r16.c: Regenerated.
        * generated/spread_r16.c: Regenerated.
        * generated/matmul_c8.c: Regenerated.
        * generated/pack_r10.c: Regenerated.
        * generated/reshape_r10.c: Regenerated.
        * generated/sum_r10.c: Regenerated.
        * generated/count_8_l.c: Regenerated.
        * generated/minloc1_16_i16.c: Regenerated.
        * generated/maxloc0_16_i2.c: Regenerated.
        * generated/count_1_l.c: Regenerated.
        * generated/unpack_c16.c: Regenerated.
        * generated/any_l8.c: Regenerated.
        * generated/minloc1_16_i1.c: Regenerated.
        * generated/sum_r4.c: Regenerated.
        * generated/in_unpack_r8.c: Regenerated.
        * generated/product_r8.c: Regenerated.
        * generated/in_unpack_r4.c: Regenerated.
        * generated/unpack_i1.c: Regenerated.
        * generated/cshift0_r8.c: Regenerated.
        * generated/spread_i2.c: Regenerated.
        * generated/minloc1_4_r10.c: Regenerated.
        * generated/minloc1_16_i2.c: Regenerated.
        * generated/minloc0_16_i2.c: Regenerated.
        * generated/eoshift3_16.c: Regenerated.
        * generated/maxloc0_8_i4.c: Regenerated.
        * generated/maxloc1_16_r10.c: Regenerated.
        * generated/maxloc1_4_i16.c: Regenerated.
        * generated/maxloc1_4_r8.c: Regenerated.
        * generated/parity_l2.c: Regenerated.
        * generated/maxloc0_16_i16.c: Regenerated.
        * generated/product_r4.c: Regenerated.
        * generated/in_unpack_r10.c: Regenerated.
        * generated/maxloc1_8_i2.c: Regenerated.
        * generated/iparity_i2.c: Regenerated.
        * generated/maxloc1_8_r4.c: Regenerated.
        * generated/maxloc1_8_r8.c: Regenerated.
        * generated/iall_i4.c: Regenerated.
        * generated/maxloc0_4_i16.c: Regenerated.
        * generated/cshift0_i4.c: Regenerated.
        * generated/in_unpack_c10.c: Regenerated.
        * generated/unpack_c8.c: Regenerated.
        * generated/transpose_c8.c: Regenerated.
        * generated/in_unpack_c16.c: Regenerated.
        * generated/product_c16.c: Regenerated.
        * generated/minval_r8.c: Regenerated.
        * generated/minloc0_4_i1.c: Regenerated.
        * generated/minloc0_8_r16.c: Regenerated.
        * generated/in_unpack_i16.c: Regenerated.
        * generated/reshape_c16.c: Regenerated.
        * generated/pack_i4.c: Regenerated.
        * generated/minval_r10.c: Regenerated.
        * generated/maxloc0_4_r10.c: Regenerated.
        * generated/unpack_i8.c: Regenerated.
        * generated/minloc1_16_r8.c: Regenerated.
        * generated/pack_c16.c: Regenerated.
        * generated/maxval_r4.c: Regenerated.
        * generated/spread_r8.c: Regenerated.
        * generated/minloc0_16_r4.c: Regenerated.
        * generated/maxval_i4.c: Regenerated.
        * generated/matmul_r4.c: Regenerated.
        * generated/product_c8.c: Regenerated.
        * generated/maxloc1_4_i4.c: Regenerated.
        * generated/any_l4.c: Regenerated.
        * generated/cshift0_r16.c: Regenerated.
        * generated/maxloc1_16_r4.c: Regenerated.
        * generated/in_pack_r10.c: Regenerated.
        * generated/iall_i1.c: Regenerated.
        * generated/product_i1.c: Regenerated.
        * generated/maxloc0_4_i1.c: Regenerated.
        * generated/maxloc0_8_r16.c: Regenerated.
        * generated/minloc1_8_i16.c: Regenerated.
        * generated/reshape_c10.c: Regenerated.
        * generated/matmul_l4.c: Regenerated.
        * generated/cshift0_c16.c: Regenerated.
        * generated/spread_r4.c: Regenerated.
        * generated/sum_r16.c: Regenerated.
        * generated/in_unpack_c4.c: Regenerated.
        * generated/maxval_i8.c: Regenerated.
        * generated/maxloc0_8_r8.c: Regenerated.
        * generated/unpack_i16.c: Regenerated.
        * generated/norm2_r4.c: Regenerated.
        * generated/maxloc1_4_r16.c: Regenerated.
        * generated/in_pack_r4.c: Regenerated.
        * generated/sum_c8.c: Regenerated.
        * generated/parity_l8.c: Regenerated.
        * generated/minval_i2.c: Regenerated.
        * generated/transpose_c10.c: Regenerated.
        * generated/cshift0_r10.c: Regenerated.
        * generated/cshift0_i2.c: Regenerated.
        * generated/spread_c4.c: Regenerated.
        * generated/maxval_r16.c: Regenerated.
        * generated/unpack_c10.c: Regenerated.
        * generated/bessel_r4.c: Regenerated.
        * generated/minloc0_8_i1.c: Regenerated.
        * generated/product_c10.c: Regenerated.
        * generated/minloc1_4_i4.c: Regenerated.
        * generated/minloc1_4_i2.c: Regenerated.
        * generated/transpose_c4.c: Regenerated.
        * generated/in_pack_c8.c: Regenerated.
        * generated/minval_i8.c: Regenerated.
        * generated/maxloc1_4_i2.c: Regenerated.
        * generated/maxloc1_4_i1.c: Regenerated.
        * generated/iall_i8.c: Regenerated.
        * generated/iany_i8.c: Regenerated.
        * generated/sum_c16.c: Regenerated.
        * generated/spread_i8.c: Regenerated.
        * generated/sum_i8.c: Regenerated.
        * generated/pack_i2.c: Regenerated.
        * generated/unpack_r10.c: Regenerated.
        * generated/minloc0_4_i4.c: Regenerated.
        * generated/iany_i4.c: Regenerated.
        * generated/maxloc0_4_i4.c: Regenerated.
        * generated/in_pack_r8.c: Regenerated.
        * generated/spread_i1.c: Regenerated.
        * generated/maxval_i16.c: Regenerated.
        * generated/pack_c8.c: Regenerated.
        * generated/iparity_i16.c: Regenerated.
        * generated/matmul_c16.c: Regenerated.
        * generated/eoshift1_8.c: Regenerated.
        * generated/any_l16.c: Regenerated.
        * generated/maxloc1_4_i8.c: Regenerated.
        * generated/minloc0_8_r4.c: Regenerated.
        * generated/transpose_c16.c: Regenerated.
        * generated/reshape_c4.c: Regenerated.
        * generated/minloc0_8_r8.c: Regenerated.
        * generated/count_16_l.c: Regenerated.
        * generated/minloc0_16_i1.c: Regenerated.
        * generated/minloc1_16_r4.c: Regenerated.
        * generated/maxloc0_8_i1.c: Regenerated.
        * generated/matmul_i1.c: Regenerated.
        * generated/sum_i2.c: Regenerated.
        * generated/cshift1_4.c: Regenerated.
        * generated/minloc0_4_i2.c: Regenerated.
        * generated/bessel_r10.c: Regenerated.
        * generated/matmul_c4.c: Regenerated.
        * generated/parity_l4.c: Regenerated.
        * generated/in_unpack_i2.c: Regenerated.
        * generated/product_i16.c: Regenerated.
        * generated/maxloc0_16_i4.c: Regenerated.
        * generated/minloc0_4_r10.c: Regenerated.
        * generated/transpose_i16.c: Regenerated.
        * generated/matmul_l16.c: Regenerated.
        * generated/any_l1.c: Regenerated.
        * generated/minval_r16.c: Regenerated.
        * generated/shape_i16.c: Regenerated.
        * generated/in_pack_c4.c: Regenerated.
        * generated/minloc1_8_r4.c: Regenerated.
        * generated/iany_i1.c: Regenerated.
        * generated/matmul_i16.c: Regenerated.
        * generated/maxloc0_16_r4.c: Regenerated.
        * generated/spread_c8.c: Regenerated.
        * generated/product_i8.c: Regenerated.
        * generated/minloc1_8_i4.c: Regenerated.
        * generated/product_i4.c: Regenerated.
        * generated/minval_i16.c: Regenerated.
        * generated/pack_r8.c: Regenerated.
        * generated/matmul_r10.c: Regenerated.
        * generated/shape_i8.c: Regenerated.
        * generated/eoshift1_4.c: Regenerated.
        * generated/minloc1_16_i4.c: Regenerated.
        * generated/transpose_r16.c: Regenerated.
        * generated/spread_c16.c: Regenerated.
        * generated/maxloc0_8_i16.c: Regenerated.
        * generated/minval_i1.c: Regenerated.
        * generated/sum_i4.c: Regenerated.
        * generated/in_pack_r16.c: Regenerated.
        * generated/iall_i16.c: Regenerated.
        * generated/minloc0_8_r10.c: Regenerated.
        * generated/maxloc0_8_i8.c: Regenerated.
        * generated/transpose_i4.c: Regenerated.
        * generated/maxloc0_4_i2.c: Regenerated.
        * generated/iall_i2.c: Regenerated.
        * generated/maxloc0_8_r4.c: Regenerated.
        * generated/minloc0_4_r16.c: Regenerated.
        * generated/minloc1_4_r8.c: Regenerated.
        * generated/minloc0_4_i8.c: Regenerated.
        * generated/minval_i4.c: Regenerated.
        * generated/minloc1_8_i8.c: Regenerated.
        * generated/in_pack_i16.c: Regenerated.
        * generated/spread_i4.c: Regenerated.
        * generated/cshift0_c4.c: Regenerated.
        * generated/minloc0_4_i16.c: Regenerated.
        * generated/sum_r8.c: Regenerated.
        * generated/minloc0_16_i16.c: Regenerated.
        * generated/sum_i1.c: Regenerated.
        * generated/all_l2.c: Regenerated.
        * generated/sum_c4.c: Regenerated.
        * generated/shape_i4.c: Regenerated.
        * generated/maxval_i1.c: Regenerated.
        * generated/norm2_r10.c: Regenerated.
        * generated/unpack_c4.c: Regenerated.
        * generated/maxloc0_16_i1.c: Regenerated.
        * generated/all_l4.c: Regenerated.
        * generated/maxloc1_16_i8.c: Regenerated.
        * generated/sum_i16.c: Regenerated.
        * generated/maxloc1_8_r16.c: Regenerated.
        * generated/minloc1_4_r16.c: Regenerated.
        * generated/maxloc1_16_r16.c: Regenerated.
        * generated/transpose_i8.c: Regenerated.
        * generated/minloc0_8_i2.c: Regenerated.
        * generated/product_r16.c: Regenerated.
        * generated/in_pack_c10.c: Regenerated.
        * generated/maxloc0_4_r16.c: Regenerated.
        * generated/pack_c4.c: Regenerated.
        * generated/bessel_r16.c: Regenerated.
        * generated/norm2_r16.c: Regenerated.
        * generated/in_unpack_i8.c: Regenerated.
        * generated/maxloc1_16_i4.c: Regenerated.
        * generated/minloc1_4_i8.c: Regenerated.
        * generated/eoshift3_4.c: Regenerated.
        * generated/maxloc1_8_r10.c: Regenerated.
        * generated/matmul_i8.c: Regenerated.
        * generated/matmul_i4.c: Regenerated.
        * generated/reshape_i16.c: Regenerated.
        * generated/matmul_i2.c: Regenerated.
        * generated/transpose_r8.c: Regenerated.
        * generated/transpose_r4.c: Regenerated.
        * generated/cshift1_16.c: Regenerated.
        * generated/maxloc1_4_r10.c: Regenerated.
        * generated/iparity_i4.c: Regenerated.
        * generated/in_pack_i4.c: Regenerated.
        * generated/maxloc0_8_i2.c: Regenerated.
        * generated/unpack_r4.c: Regenerated.
        * generated/count_4_l.c: Regenerated.
        * generated/maxloc1_4_r4.c: Regenerated.
        * generated/minloc0_8_i8.c: Regenerated.
        * generated/any_l2.c: Regenerated.
        * generated/minloc0_8_i4.c: Regenerated.
        * generated/pack_i8.c: Regenerated.
        * generated/count_2_l.c: Regenerated.
        * generated/reshape_c8.c: Regenerated.
        * generated/maxval_i2.c: Regenerated.
        * generated/minloc0_4_r8.c: Regenerated.

From-SVN: r185177
2012-03-10 18:22:31 +01:00
Thomas Koenig e7898e54f4 re PR libfortran/50192 (Wrong character comparision with wide strings)
2011-08-29  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/50192
	* intrinsics/string_intrinsics.c (memcmp_char4):  New function.
	* intrinsics/string_intrinsics_inc.c:  New macro MEMCMP, either
	set to memcmp or memcmp_char4.
	(compare_string):  Use MEMCMP, with correct size for it.
	* libgfortran.h:  Add prototype for memcmp_char4.

2011-08-29  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/50192
	* gfortran.dg/widechar_compare_1.f90:  New test.

From-SVN: r178173
2011-08-29 09:05:11 +00:00
Janne Blomqvist 155732f56d PR 48931 Use async-signal-safe execve instead of execvp
From-SVN: r174415
2011-05-29 23:13:52 +03:00
Janne Blomqvist de8bd1420e PR 48915 Abort handling
From-SVN: r173750
2011-05-14 11:44:09 +03:00
Janne Blomqvist 1028b2bded Error printing thread safety, remove GFORTRAN_USE_STDERR
From-SVN: r173749
2011-05-14 10:55:51 +03:00
Janne Blomqvist d30fe1c5cd Replace sprintf with snprintf
From-SVN: r172590
2011-04-16 20:43:03 +03:00
Janne Blomqvist 44720bef9d Cleanup memsize types
From-SVN: r172340
2011-04-12 22:27:49 +03:00
Janne Blomqvist 723553bdc1 PR 46267 strerror thread safety
From-SVN: r169110
2011-01-22 00:42:17 +02:00
Francois-Xavier Coudert 1ec601bf9f re PR fortran/32049 (Support on x86_64 also kind=16)
/
2010-11-13  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
            Tobias Burnus  <burnus@net-b.de>

        PR fortran/32049
        * Makefile.def: Add libquadmath; build it with language=fortran.
        * configure.ac: Add libquadmath.
        * Makefile.tpl: Handle multiple libs in check-[+language+].
        * Makefile.in: Regenerate.
        * configure: Regenerate.

libquadmath/
2010-11-13  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
            Tobias Burnus  <burnus@net-b.de>

        PR fortran/32049
        Initial implementation and checkin.

gcc/fortran/
2010-11-13  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
            Tobias Burnus  <burnus@net-b.de>

        PR fortran/32049
        * gfortranspec.c (find_spec_file): New function.
        (lang_specific_driver): Try to find .spec file and use it.
        * trans-io.c (iocall): Define
        * IOCALL_X_REAL128/COMPLEX128(,write).
        (gfc_build_io_library_fndecls): Build decl for __float128 I/O.
        (transfer_expr): Call __float128 I/O functions.
        * trans-types.c (gfc_init_kinds): Allow kind-16 belonging
        to __float128.

gcc/testsuite/
2010-11-13  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
            Tobias Burnus  <burnus@net-b.de>

        PR fortran/32049
        * gfortran.dg/quad_1.f90: New.
        * lib/gcc-defs.exp (gcc-set-multilib-library-path): Use also
        compiler arguments.
        * lib/gfortran.exp (gfortran_link_flags): Add libquadmath to
        library search path; call gcc-set-multilib-library-path with
        arguments such that libgfortran.spec is found.
        (gfortran_init): Add path for libgfortran.spec to
GFORTRAN_UNDER_TEST.

libgomp/
2010-11-13  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
            Tobias Burnus  <burnus@net-b.de>

        PR fortran/32049
        * configure.ac: 
        * configure: Regenerate.

libgfortran/
2010-11-13  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
            Tobias Burnus  <burnus@net-b.de>

        PR fortran/32049
        * Makefile.am: Add missing pow_r16_i4.c, add transfer128.c,
        link libquadmath, if used.
        * acinclude.m4 (LIBGFOR_CHECK_FLOAT128): Add.
        * configure.ac: Use it, touch spec file.
        * gfortran.map: Add pow_r16_i4 and
        transfer_(real,complex)128(,write) functions.
        * intrinsics/cshift0.c (cshift0): Handle __float128 type.
        * intrinsics/erfc_scaled_inc.c: Ditto.
        * intrinsics/pack_generic.c (pack): Ditto
        * intrinsics/spread_generic.c (spread): Ditto.
        * intrinsics/unpack_generic.c (unpack1): Ditto.
        * io/read.c (convert_real): Ditto.
        * io/transfer.c: Update comments.
        * io/transfer128.c: New file.
        * io/write_float.def (write_float): Handle __float128 type.
        * libgfortran.h: #include quadmath_weak.h, define __builtin_infq
        and nanq.
        * m4/mtype.m4: Handle __float128 type.
        * runtime/in_pack_generic.c (internal_pack): Ditto.
        * runtime/in_unpack_generic.c (internal_unpack): Ditto.
        * kinds-override.h: New file.
        * libgfortran.spec.in: Ditto.
        * generated/pow_r16_i4.c: Generated.
        * Makefile.in: Regenerate.
        * configure: Regenerate.
        * config.h: Regenerate.
        * bessel_r10.c: Regenerate.
        * bessel_r16.c: Regenerate.
        * bessel_r4.c: Regenerate.
        * bessel_r8.c: Regenerate.
        * exponent_r16.c: Regenerate.
        * fraction_r16.c: Regenerate.
        * nearest_r16.c: Regenerate.
        * norm2_r10.c: Regenerate.
        * norm2_r16.c: Regenerate.
        * norm2_r4.c: Regenerate.
        * norm2_r8.c: Regenerate.
        * rrspacing_r16.c: Regenerate.
        * set_exponent_r16.c: Regenerate.
        * spacing_r16.c: Regenerate.


Co-Authored-By: Tobias Burnus <burnus@net-b.de>

From-SVN: r166825
2010-11-16 22:23:19 +01:00
Jerry DeLisle fc5f5bb770 re PR fortran/43899 (Wrong unused-variable warning with NAMELISTs)
2010-11-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/43899
	* runtime/error.c (generate_warning): New function to generate a run
	time warning message. Fix some whitespace.
	* libgfortran.h: Add prototype for new function.
	* io/list_read.c (nml_read_obj): Use new function to warn when a
	character namelist object is truncated.  Only warn if compiled
	with -fbounds-check.

From-SVN: r166252
2010-11-03 15:22:25 +00:00
Jerry DeLisle a11930ba8d io.h: Remove definition of the BT enumerator.
2010-10-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	* io/io.h: Remove definition of the BT enumerator.
	* libgfortran.h: Replace GFC_DTYPE enumerator with BT.
	* intrinsics/iso_c_generated_procs.c: Likewise
	* intrinsics/date_and_time.c: Likewise.
	* intrinsics/iso_c_binding.c: Likewise.
	* io/list_read.c: Likewise.
	* io/transfer.c: Likewise.
	* io/write.c: Likewise.

2010-10-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	* gfortran.h: Remove definition of bt enumerator.
	* libgfortran.h: Add bt enumerator type alighned with defintion.
	Remove the dtype enumerator, no longer used.
	previously given in libgfortran/io.h
	* trans-types.c: Use new bt enumerator.
	* trans-io.c: Likewise.

From-SVN: r165675
2010-10-19 01:28:50 +00:00
Francois-Xavier Coudert b1012ca4be acinclude.m4 (LIBGFOR_CHECK_FOR_BROKEN_ISFINITE, [...]): Remove.
* acinclude.m4 (LIBGFOR_CHECK_FOR_BROKEN_ISFINITE,
	LIBGFOR_CHECK_FOR_BROKEN_ISNAN,
	LIBGFOR_CHECK_FOR_BROKEN_FPCLASSIFY): Remove.
	* configure.ac: Remove above checks.
	* libgfortran.h: Define isnan, isinf, isfinite, isnormal and
	signbit in terms of the respective built-ins.
	* io/write_float.def (WRITE_FLOAT): Use signbit() instead of
	__builtin_signbit().
	* intrinsics/c99_functions.c (tgamma): Use isnan() instead of
	__builtin_isnan().
	* config.h.in: Regenerate.
	* configure: Regenerate.

From-SVN: r164119
2010-09-09 18:47:11 +00:00
Jerry DeLisle 6d1b0f922a re PR fortran/43851 (Add _gfortran_error_stop_numeric)
2010-05-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>

	PR fortran/43851
	* runtime/stop.c (error_stop_numeric): New function and updated comment.
	Add declaration for stop_numeric and remove declaration for stop_string.
	(stop_string): Use for blank STOP.
	(stop_numeric): Remove use of special -1 stop code.
	* runtime/pause.c (do_pause): Use stop_string for blank stop.
	(pause_numeric): Remove use of special -1 pause code.
	* gfortran.map: Add new symbol to run-time library.
	* libgfortran.h: Move declaration for stop_string to here to make
	function visible for do_pause. Remove declaration for stop_numeric.

2010-05-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>

	PR fortran/43851
	* trans-stmt.c (gfc_trans_stop): Add generation of call to
	gfortran_error_stop_numeric. Fix up some whitespace. Use stop_string for
	blank STOP, handling a null expression. (gfc_trans_pause): Use
	pause_string for blank PAUSE.
	* trans.h: Add external function declaration for error_stop_numeric.
	* trans-decl.c (gfc_build_builtin_function_decls): Add the building of
	the declaration for the library call. Adjust whitespaces.
	* match.c (gfc_match_stopcode): Remove use of the actual stop code to
	signal no stop code. Match the expression following the stop and pass
	that to the translators. Remove the old use of digit matching.  Add
	checks that the stop_code expression is INTEGER or CHARACTER, constant,
	and if CHARACTER, default character KIND.

2010-05-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>

	PR fortran/43851
	* gfortran.dg/label_1.f90: Update test.

From-SVN: r159609
2010-05-20 04:44:11 +00:00
Janne Blomqvist bb408e876c Remove free_mem
From-SVN: r159160
2010-05-07 18:55:59 +03:00
Paul Thomas a1ff2ab8e4 transfer.c: Update copyright.
2010-04-01  Paul Thomas  <pault@gcc.gnu.org>

	* io/transfer.c : Update copyright.
	* io/unix.c : ditto
	* io/read.c : ditto
	* io/io.h : ditto
	* io/unix.h : ditto
	* io/inquire.c : ditto
	* io/format.c : ditto
	* io/list_read.c : ditto
	* runtime/error.c : ditto
	* libgfortran.h : ditto
	* intrinsics/date_and_time.c: ditto
	* intrinsics/args.c : ditto

From-SVN: r157924
2010-04-01 18:22:00 +00:00
Kai Tietz b2ef02df53 format.c (parse_format_list): Add to ERROR, WARNING, SILENT enumerators NOTIFICATION_ prefix.
2010-03-12  Kai Tietz  <kai.tietz@onevision.com>

        PR/42950
        * io/format.c (parse_format_list): Add to ERROR, WARNING,
        SILENT enumerators NOTIFICATION_ prefix.
        * runtime/error.c (notification_std): Likewise.
        * libgfortran.h (notification): Likewise.
        (GFC_LARGEST_BUF): Check for HAVE_GFC_INTEGER_16.

From-SVN: r157407
2010-03-12 15:43:55 +01:00
Kai Tietz 196c8bc8a3 libgfortran.h (_POSIX): Define if __MINGW32__ is defined.
2010-03-08  Kai TIetz  <kai.tietz@onevision.com>

        PR/42950
        * libgfortran.h (_POSIX): Define if __MINGW32__ is defined.
        (gfc_printf): Define to gnu_printf for __MINGW32__ case,
        otherwise to __printf__.
        (gfc_strtof,gfc_strtod,gfc_strtold): Define for mingw case
        to POSIX compatible converter functions.
        (runtime_error): Use instead gfc_printf as formatter
        attribute name.
        (runtime_error_at): Likewise.
        (runtime_warning_at): Likewise.
        (st_printf): Likewise.
        * intrinsics/date_and_time.c (localtime_r): Undefine
        possible defined macro.
        (gmtime_r): Likewise.
        * io/read.c (convert_real): Use gfc_strtof, gfc_strtod,
        and gfc_strtold.

From-SVN: r157271
2010-03-08 09:01:55 +01:00
Janne Blomqvist a4384badd7 PR libfortran/40812 Large file support for MinGW
From-SVN: r154984
2009-12-04 18:28:44 +02:00
Jerry DeLisle 486024b158 re PR libfortran/41711 ([F08] BOZ edit-descr does not support reading large kind reals)
2009-10-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/41711
	* libgfortran.h: Define larger sizes for BOZ conversion	buffers.
	* io/write.c (extract_uint): Include case where size is 10 if integer
	is large enough. (write_int): Rename to	write_boz. (write_boz): Factor
	out extract_uint and delete the	conversion function.
	(btoa_big): New binary conversion function.
	(otoa_big): New octal conversion function.
	(ztoa_big): New	hexidecimal conversion function.
	(write_b): Modify to use new function.
	(write_o): Likewise.
	(write_z): Likewise.

From-SVN: r153724
2009-10-29 19:20:18 +00:00
Thomas Koenig 8c39b98796 re PR libfortran/34670 (bounds checking for array intrinsics)
2009-08-25  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/34670
	* runtime/bounds.c (count_0):  New function.
	* intrinsics/unpack_generic (unpack_bounds):  New function.
	(unpack_internal):  Remove zero stride checks.
	(unpack1):  Use unpack_bounds.
	(unpack1_char):  Likeweise.
	(unpack1_char4):  Likewise
	(unpack0):  Likewise.
	(unpack0_char):  Likewise.
	(unpack0_char4):  Likewise.

2009-08-25  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/34670
	* gfortran.dg/unpack_bounds_1.f90:  New test.
	* gfortran.dg/unpack_bounds_2.f90:  New test.
	* gfortran.dg/unpack_bounds_3.f90:  New test.

From-SVN: r151085
2009-08-25 17:05:10 +00:00
Francois-Xavier Coudert 0a940ddd90 re PR libfortran/40549 (Building libgfortran as a DLL)
PR libfortran/40549
	* Makefile.in (LTLDFLAGS): Add -no-undefined.
	* Makefile.am: Regenerate.
	* libgfortran.h: Remove unused block of code.

From-SVN: r150590
2009-08-09 11:02:08 +00:00
Jakub Jelinek 80927a562e re PR fortran/40643 (maxloc/minloc: Wrong result for NaN at position 1)
PR fortran/40643
	PR fortran/31067
	* trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
	gfc_conv_intrinsic_minmaxval): Handle Infinities and NaNs properly,
	optimize.
	* trans-array.c (gfc_trans_scalarized_loop_end): No longer static.
	* trans-array.h (gfc_trans_scalarized_loop_end): New prototype.

	* libgfortran.h (GFC_REAL_4_INFINITY, GFC_REAL_8_INFINITY,
	GFC_REAL_10_INFINITY, GFC_REAL_16_INFINITY, GFC_REAL_4_QUIET_NAN,
	GFC_REAL_8_QUIET_NAN, GFC_REAL_10_QUIET_NAN, GFC_REAL_16_QUIET_NAN):
	Define.
	* m4/iparm.m4 (atype_inf, atype_nan): Define.
	* m4/ifunction.m4: Formatting.
	* m4/iforeach.m4: Likewise.
	(START_FOREACH_FUNCTION): Initialize dest to all 1s, not all 0s.
	(START_FOREACH_BLOCK, FINISH_FOREACH_FUNCTION,
	FINISH_MASKED_FOREACH_FUNCTION): Run foreach block inside a loop
	until count[0] == extent[0].
	* m4/minval.m4: Formatting.  Handle NaNs and infinities.  Optimize.
	* m4/maxval.m4: Likewise.
	* m4/minloc0.m4: Likewise.
	* m4/maxloc0.m4: Likewise.
	* m4/minloc1.m4: Likewise.
	* m4/maxloc1.m4: Likewise.
	* generated/maxloc0_16_i16.c: Regenerated.
	* generated/maxloc0_16_i1.c: Likewise.
	* generated/maxloc0_16_i2.c: Likewise.
	* generated/maxloc0_16_i4.c: Likewise.
	* generated/maxloc0_16_i8.c: Likewise.
	* generated/maxloc0_16_r10.c: Likewise.
	* generated/maxloc0_16_r16.c: Likewise.
	* generated/maxloc0_16_r4.c: Likewise.
	* generated/maxloc0_16_r8.c: Likewise.
	* generated/maxloc0_4_i16.c: Likewise.
	* generated/maxloc0_4_i1.c: Likewise.
	* generated/maxloc0_4_i2.c: Likewise.
	* generated/maxloc0_4_i4.c: Likewise.
	* generated/maxloc0_4_i8.c: Likewise.
	* generated/maxloc0_4_r10.c: Likewise.
	* generated/maxloc0_4_r16.c: Likewise.
	* generated/maxloc0_4_r4.c: Likewise.
	* generated/maxloc0_4_r8.c: Likewise.
	* generated/maxloc0_8_i16.c: Likewise.
	* generated/maxloc0_8_i1.c: Likewise.
	* generated/maxloc0_8_i2.c: Likewise.
	* generated/maxloc0_8_i4.c: Likewise.
	* generated/maxloc0_8_i8.c: Likewise.
	* generated/maxloc0_8_r10.c: Likewise.
	* generated/maxloc0_8_r16.c: Likewise.
	* generated/maxloc0_8_r4.c: Likewise.
	* generated/maxloc0_8_r8.c: Likewise.
	* generated/maxloc1_16_i16.c: Likewise.
	* generated/maxloc1_16_i1.c: Likewise.
	* generated/maxloc1_16_i2.c: Likewise.
	* generated/maxloc1_16_i4.c: Likewise.
	* generated/maxloc1_16_i8.c: Likewise.
	* generated/maxloc1_16_r10.c: Likewise.
	* generated/maxloc1_16_r16.c: Likewise.
	* generated/maxloc1_16_r4.c: Likewise.
	* generated/maxloc1_16_r8.c: Likewise.
	* generated/maxloc1_4_i16.c: Likewise.
	* generated/maxloc1_4_i1.c: Likewise.
	* generated/maxloc1_4_i2.c: Likewise.
	* generated/maxloc1_4_i4.c: Likewise.
	* generated/maxloc1_4_i8.c: Likewise.
	* generated/maxloc1_4_r10.c: Likewise.
	* generated/maxloc1_4_r16.c: Likewise.
	* generated/maxloc1_4_r4.c: Likewise.
	* generated/maxloc1_4_r8.c: Likewise.
	* generated/maxloc1_8_i16.c: Likewise.
	* generated/maxloc1_8_i1.c: Likewise.
	* generated/maxloc1_8_i2.c: Likewise.
	* generated/maxloc1_8_i4.c: Likewise.
	* generated/maxloc1_8_i8.c: Likewise.
	* generated/maxloc1_8_r10.c: Likewise.
	* generated/maxloc1_8_r16.c: Likewise.
	* generated/maxloc1_8_r4.c: Likewise.
	* generated/maxloc1_8_r8.c: Likewise.
	* generated/maxval_i16.c: Likewise.
	* generated/maxval_i1.c: Likewise.
	* generated/maxval_i2.c: Likewise.
	* generated/maxval_i4.c: Likewise.
	* generated/maxval_i8.c: Likewise.
	* generated/maxval_r10.c: Likewise.
	* generated/maxval_r16.c: Likewise.
	* generated/maxval_r4.c: Likewise.
	* generated/maxval_r8.c: Likewise.
	* generated/minloc0_16_i16.c: Likewise.
	* generated/minloc0_16_i1.c: Likewise.
	* generated/minloc0_16_i2.c: Likewise.
	* generated/minloc0_16_i4.c: Likewise.
	* generated/minloc0_16_i8.c: Likewise.
	* generated/minloc0_16_r10.c: Likewise.
	* generated/minloc0_16_r16.c: Likewise.
	* generated/minloc0_16_r4.c: Likewise.
	* generated/minloc0_16_r8.c: Likewise.
	* generated/minloc0_4_i16.c: Likewise.
	* generated/minloc0_4_i1.c: Likewise.
	* generated/minloc0_4_i2.c: Likewise.
	* generated/minloc0_4_i4.c: Likewise.
	* generated/minloc0_4_i8.c: Likewise.
	* generated/minloc0_4_r10.c: Likewise.
	* generated/minloc0_4_r16.c: Likewise.
	* generated/minloc0_4_r4.c: Likewise.
	* generated/minloc0_4_r8.c: Likewise.
	* generated/minloc0_8_i16.c: Likewise.
	* generated/minloc0_8_i1.c: Likewise.
	* generated/minloc0_8_i2.c: Likewise.
	* generated/minloc0_8_i4.c: Likewise.
	* generated/minloc0_8_i8.c: Likewise.
	* generated/minloc0_8_r10.c: Likewise.
	* generated/minloc0_8_r16.c: Likewise.
	* generated/minloc0_8_r4.c: Likewise.
	* generated/minloc0_8_r8.c: Likewise.
	* generated/minloc1_16_i16.c: Likewise.
	* generated/minloc1_16_i1.c: Likewise.
	* generated/minloc1_16_i2.c: Likewise.
	* generated/minloc1_16_i4.c: Likewise.
	* generated/minloc1_16_i8.c: Likewise.
	* generated/minloc1_16_r10.c: Likewise.
	* generated/minloc1_16_r16.c: Likewise.
	* generated/minloc1_16_r4.c: Likewise.
	* generated/minloc1_16_r8.c: Likewise.
	* generated/minloc1_4_i16.c: Likewise.
	* generated/minloc1_4_i1.c: Likewise.
	* generated/minloc1_4_i2.c: Likewise.
	* generated/minloc1_4_i4.c: Likewise.
	* generated/minloc1_4_i8.c: Likewise.
	* generated/minloc1_4_r10.c: Likewise.
	* generated/minloc1_4_r16.c: Likewise.
	* generated/minloc1_4_r4.c: Likewise.
	* generated/minloc1_4_r8.c: Likewise.
	* generated/minloc1_8_i16.c: Likewise.
	* generated/minloc1_8_i1.c: Likewise.
	* generated/minloc1_8_i2.c: Likewise.
	* generated/minloc1_8_i4.c: Likewise.
	* generated/minloc1_8_i8.c: Likewise.
	* generated/minloc1_8_r10.c: Likewise.
	* generated/minloc1_8_r16.c: Likewise.
	* generated/minloc1_8_r4.c: Likewise.
	* generated/minloc1_8_r8.c: Likewise.
	* generated/minval_i16.c: Likewise.
	* generated/minval_i1.c: Likewise.
	* generated/minval_i2.c: Likewise.
	* generated/minval_i4.c: Likewise.
	* generated/minval_i8.c: Likewise.
	* generated/minval_r10.c: Likewise.
	* generated/minval_r16.c: Likewise.
	* generated/minval_r4.c: Likewise.
	* generated/minval_r8.c: Likewise.
	* generated/product_c10.c: Likewise.
	* generated/product_c16.c: Likewise.
	* generated/product_c4.c: Likewise.
	* generated/product_c8.c: Likewise.
	* generated/product_i16.c: Likewise.
	* generated/product_i1.c: Likewise.
	* generated/product_i2.c: Likewise.
	* generated/product_i4.c: Likewise.
	* generated/product_i8.c: Likewise.
	* generated/product_r10.c: Likewise.
	* generated/product_r16.c: Likewise.
	* generated/product_r4.c: Likewise.
	* generated/product_r8.c: Likewise.
	* generated/sum_c10.c: Likewise.
	* generated/sum_c16.c: Likewise.
	* generated/sum_c4.c: Likewise.
	* generated/sum_c8.c: Likewise.
	* generated/sum_i16.c: Likewise.
	* generated/sum_i1.c: Likewise.
	* generated/sum_i2.c: Likewise.
	* generated/sum_i4.c: Likewise.
	* generated/sum_i8.c: Likewise.
	* generated/sum_r10.c: Likewise.
	* generated/sum_r16.c: Likewise.
	* generated/sum_r4.c: Likewise.
	* generated/sum_r8.c: Likewise.

	* gfortran.dg/maxlocval_2.f90: New test.
	* gfortran.dg/maxlocval_3.f90: New test.
	* gfortran.dg/maxlocval_4.f90: New test.
	* gfortran.dg/minlocval_1.f90: New test.
	* gfortran.dg/minlocval_2.f90: New test.
	* gfortran.dg/minlocval_3.f90: New test.
	* gfortran.dg/minlocval_4.f90: New test.

From-SVN: r150041
2009-07-24 09:57:13 +02:00
Thomas Koenig 16bff92192 [multiple changes]
2009-07-19  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/34670
	PR libfortran/36874
	* Makefile.am:  Add bounds.c
	* libgfortran.h (bounds_equal_extents):  Add prototype.
	(bounds_iforeach_return):  Likewise.
	(bounds_ifunction_return):  Likewise.
	(bounds_reduced_extents):  Likewise.
	* runtime/bounds.c:  New file.
	(bounds_iforeach_return):  New function; correct typo in
	error message.
	(bounds_ifunction_return):  New function.
	(bounds_equal_extents):  New function.
	(bounds_reduced_extents):  Likewise.
	* intrinsics/cshift0.c (cshift0):  Use new functions
	for bounds checking.
	* intrinsics/eoshift0.c (eoshift0):  Likewise.
	* intrinsics/eoshift2.c (eoshift2):  Likewise.
	* m4/iforeach.m4:  Likewise.
	* m4/eoshift1.m4:  Likewise.
	* m4/eoshift3.m4:  Likewise.
	* m4/cshift1.m4:  Likewise.
	* m4/ifunction.m4:  Likewise.
	* Makefile.in:  Regenerated.
	* generated/cshift1_16.c: Regenerated.
	* generated/cshift1_4.c: Regenerated.
	* generated/cshift1_8.c: Regenerated.
	* generated/eoshift1_16.c: Regenerated.
	* generated/eoshift1_4.c: Regenerated.
	* generated/eoshift1_8.c: Regenerated.
	* generated/eoshift3_16.c: Regenerated.
	* generated/eoshift3_4.c: Regenerated.
	* generated/eoshift3_8.c: Regenerated.
	* generated/maxloc0_16_i1.c: Regenerated.
	* generated/maxloc0_16_i16.c: Regenerated.
	* generated/maxloc0_16_i2.c: Regenerated.
	* generated/maxloc0_16_i4.c: Regenerated.
	* generated/maxloc0_16_i8.c: Regenerated.
	* generated/maxloc0_16_r10.c: Regenerated.
	* generated/maxloc0_16_r16.c: Regenerated.
	* generated/maxloc0_16_r4.c: Regenerated.
	* generated/maxloc0_16_r8.c: Regenerated.
	* generated/maxloc0_4_i1.c: Regenerated.
	* generated/maxloc0_4_i16.c: Regenerated.
	* generated/maxloc0_4_i2.c: Regenerated.
	* generated/maxloc0_4_i4.c: Regenerated.
	* generated/maxloc0_4_i8.c: Regenerated.
	* generated/maxloc0_4_r10.c: Regenerated.
	* generated/maxloc0_4_r16.c: Regenerated.
	* generated/maxloc0_4_r4.c: Regenerated.
	* generated/maxloc0_4_r8.c: Regenerated.
	* generated/maxloc0_8_i1.c: Regenerated.
	* generated/maxloc0_8_i16.c: Regenerated.
	* generated/maxloc0_8_i2.c: Regenerated.
	* generated/maxloc0_8_i4.c: Regenerated.
	* generated/maxloc0_8_i8.c: Regenerated.
	* generated/maxloc0_8_r10.c: Regenerated.
	* generated/maxloc0_8_r16.c: Regenerated.
	* generated/maxloc0_8_r4.c: Regenerated.
	* generated/maxloc0_8_r8.c: Regenerated.
	* generated/maxloc1_16_i1.c: Regenerated.
	* generated/maxloc1_16_i16.c: Regenerated.
	* generated/maxloc1_16_i2.c: Regenerated.
	* generated/maxloc1_16_i4.c: Regenerated.
	* generated/maxloc1_16_i8.c: Regenerated.
	* generated/maxloc1_16_r10.c: Regenerated.
	* generated/maxloc1_16_r16.c: Regenerated.
	* generated/maxloc1_16_r4.c: Regenerated.
	* generated/maxloc1_16_r8.c: Regenerated.
	* generated/maxloc1_4_i1.c: Regenerated.
	* generated/maxloc1_4_i16.c: Regenerated.
	* generated/maxloc1_4_i2.c: Regenerated.
	* generated/maxloc1_4_i4.c: Regenerated.
	* generated/maxloc1_4_i8.c: Regenerated.
	* generated/maxloc1_4_r10.c: Regenerated.
	* generated/maxloc1_4_r16.c: Regenerated.
	* generated/maxloc1_4_r4.c: Regenerated.
	* generated/maxloc1_4_r8.c: Regenerated.
	* generated/maxloc1_8_i1.c: Regenerated.
	* generated/maxloc1_8_i16.c: Regenerated.
	* generated/maxloc1_8_i2.c: Regenerated.
	* generated/maxloc1_8_i4.c: Regenerated.
	* generated/maxloc1_8_i8.c: Regenerated.
	* generated/maxloc1_8_r10.c: Regenerated.
	* generated/maxloc1_8_r16.c: Regenerated.
	* generated/maxloc1_8_r4.c: Regenerated.
	* generated/maxloc1_8_r8.c: Regenerated.
	* generated/maxval_i1.c: Regenerated.
	* generated/maxval_i16.c: Regenerated.
	* generated/maxval_i2.c: Regenerated.
	* generated/maxval_i4.c: Regenerated.
	* generated/maxval_i8.c: Regenerated.
	* generated/maxval_r10.c: Regenerated.
	* generated/maxval_r16.c: Regenerated.
	* generated/maxval_r4.c: Regenerated.
	* generated/maxval_r8.c: Regenerated.
	* generated/minloc0_16_i1.c: Regenerated.
	* generated/minloc0_16_i16.c: Regenerated.
	* generated/minloc0_16_i2.c: Regenerated.
	* generated/minloc0_16_i4.c: Regenerated.
	* generated/minloc0_16_i8.c: Regenerated.
	* generated/minloc0_16_r10.c: Regenerated.
	* generated/minloc0_16_r16.c: Regenerated.
	* generated/minloc0_16_r4.c: Regenerated.
	* generated/minloc0_16_r8.c: Regenerated.
	* generated/minloc0_4_i1.c: Regenerated.
	* generated/minloc0_4_i16.c: Regenerated.
	* generated/minloc0_4_i2.c: Regenerated.
	* generated/minloc0_4_i4.c: Regenerated.
	* generated/minloc0_4_i8.c: Regenerated.
	* generated/minloc0_4_r10.c: Regenerated.
	* generated/minloc0_4_r16.c: Regenerated.
	* generated/minloc0_4_r4.c: Regenerated.
	* generated/minloc0_4_r8.c: Regenerated.
	* generated/minloc0_8_i1.c: Regenerated.
	* generated/minloc0_8_i16.c: Regenerated.
	* generated/minloc0_8_i2.c: Regenerated.
	* generated/minloc0_8_i4.c: Regenerated.
	* generated/minloc0_8_i8.c: Regenerated.
	* generated/minloc0_8_r10.c: Regenerated.
	* generated/minloc0_8_r16.c: Regenerated.
	* generated/minloc0_8_r4.c: Regenerated.
	* generated/minloc0_8_r8.c: Regenerated.
	* generated/minloc1_16_i1.c: Regenerated.
	* generated/minloc1_16_i16.c: Regenerated.
	* generated/minloc1_16_i2.c: Regenerated.
	* generated/minloc1_16_i4.c: Regenerated.
	* generated/minloc1_16_i8.c: Regenerated.
	* generated/minloc1_16_r10.c: Regenerated.
	* generated/minloc1_16_r16.c: Regenerated.
	* generated/minloc1_16_r4.c: Regenerated.
	* generated/minloc1_16_r8.c: Regenerated.
	* generated/minloc1_4_i1.c: Regenerated.
	* generated/minloc1_4_i16.c: Regenerated.
	* generated/minloc1_4_i2.c: Regenerated.
	* generated/minloc1_4_i4.c: Regenerated.
	* generated/minloc1_4_i8.c: Regenerated.
	* generated/minloc1_4_r10.c: Regenerated.
	* generated/minloc1_4_r16.c: Regenerated.
	* generated/minloc1_4_r4.c: Regenerated.
	* generated/minloc1_4_r8.c: Regenerated.
	* generated/minloc1_8_i1.c: Regenerated.
	* generated/minloc1_8_i16.c: Regenerated.
	* generated/minloc1_8_i2.c: Regenerated.
	* generated/minloc1_8_i4.c: Regenerated.
	* generated/minloc1_8_i8.c: Regenerated.
	* generated/minloc1_8_r10.c: Regenerated.
	* generated/minloc1_8_r16.c: Regenerated.
	* generated/minloc1_8_r4.c: Regenerated.
	* generated/minloc1_8_r8.c: Regenerated.
	* generated/minval_i1.c: Regenerated.
	* generated/minval_i16.c: Regenerated.
	* generated/minval_i2.c: Regenerated.
	* generated/minval_i4.c: Regenerated.
	* generated/minval_i8.c: Regenerated.
	* generated/minval_r10.c: Regenerated.
	* generated/minval_r16.c: Regenerated.
	* generated/minval_r4.c: Regenerated.
	* generated/minval_r8.c: Regenerated.
	* generated/product_c10.c: Regenerated.
	* generated/product_c16.c: Regenerated.
	* generated/product_c4.c: Regenerated.
	* generated/product_c8.c: Regenerated.
	* generated/product_i1.c: Regenerated.
	* generated/product_i16.c: Regenerated.
	* generated/product_i2.c: Regenerated.
	* generated/product_i4.c: Regenerated.
	* generated/product_i8.c: Regenerated.
	* generated/product_r10.c: Regenerated.
	* generated/product_r16.c: Regenerated.
	* generated/product_r4.c: Regenerated.
	* generated/product_r8.c: Regenerated.
	* generated/sum_c10.c: Regenerated.
	* generated/sum_c16.c: Regenerated.
	* generated/sum_c4.c: Regenerated.
	* generated/sum_c8.c: Regenerated.
	* generated/sum_i1.c: Regenerated.
	* generated/sum_i16.c: Regenerated.
	* generated/sum_i2.c: Regenerated.
	* generated/sum_i4.c: Regenerated.
	* generated/sum_i8.c: Regenerated.
	* generated/sum_r10.c: Regenerated.
	* generated/sum_r16.c: Regenerated.
	* generated/sum_r4.c: Regenerated.
	* generated/sum_r8.c: Regenerated.

2009-07-19   Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/34670
	PR libfortran/36874
	* gfortran.dg/cshift_bounds_1.f90:  New test.
	* gfortran.dg/cshift_bounds_2.f90:  New test.
	* gfortran.dg/cshift_bounds_3.f90:  New test.
	* gfortran.dg/cshift_bounds_4.f90:  New test.
	* gfortran.dg/eoshift_bounds_1.f90:  New test.
	* gfortran.dg/maxloc_bounds_4.f90:  Correct typo in error message.
	* gfortran.dg/maxloc_bounds_5.f90:  Correct typo in error message.
	* gfortran.dg/maxloc_bounds_7.f90:  Correct typo in error message.

From-SVN: r149792
2009-07-19 15:07:21 +00:00
Thomas Koenig dfb55fdcdb re PR fortran/37577 ([meta-bug] change internal array descriptor format for better syntax, C interop TR, rank 15)
2009-06-21  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/37577
	Port from fortran-dev
	* runtime/in_pack_generic (internal_pack):  Remove unnecessary
	test for stride == 0.
	* runtime/in_unpack_generic.c (internal_unpack):  Likewise.
	* intrinsics/iso_c_binding.c (c_f_pointer_u0):  Take care
	of stride in "shape" argument.  Use array access macros for
	accessing array descriptors.
	* libgfortran.h (struct descriptor_dimension):  Change stride
	to _stride, lbound to _lbound and ubound to _ubound.
	(GFC_DIMENSION_LBOUND):  Use new name(s) in struct
	descriptor_dimension.
	(GFC_DIMENSION_UBOUND):  Likewise.
	(GFC_DIMENSION_STRIDE):  Likewise.
	(GFC_DIMENSION_EXTENT):  Likewise.
	(GFC_DIMENSION_SET):  Likewise.
	(GFC_DESCRIPTOR_LBOUND):  Likewise.
	(GFC_DESCRIPTOR_UBOUND):  Likewise.
	(GFC_DESCRIPTOR_EXTENT):  Likewise.
	(GFC_DESCRIPTOR_STRIDE):  Likewise.
	* io/transfer.c (transfer_array):  Use array access macros.
	Use byte-sized strides.
	* intrinsics/eoshift0.c (eoshift0):  Use array access
	macros everywhere.
	* m4/in_pack.m4 (internal_pack_'rtype_ccode`):  Use
	array access macros for accessing array descriptors.
	* m4/in_unpack.m4 (internal_unpack_'rtype_ccode`):
	Likewise.
	* m4/matmull.m4 (matmul_'rtype_code`):  Likewise.
	* m4/matmul.m4 (matmul_'rtype_code`):  Likewise.
	* m4/unpack.m4 (unpack0_'rtype_code`):  Likewise.
	(unpack1_'rtype_code`):  Likewise.
	* m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code): Likewise.
	* m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Use array access
	macros everywhere.
		* intrinsics/dtime.c (dtime_sub):  Use array access macros
	for accessing array descriptors.
	* intrinsics/cshift0 (cshift0):  Likewise.
	* intrinsics/etime.c:  Likewise.  Remove redundant calculation
	of rdim.
	* m4/cshift0.m4 (cshift0_'rtype_code`):  Use array access macros
	for accessing array descriptors.
	* m4/pack.m4 (pack_'rtype_code`):  Likewise.
	* m4/spread.m4 (spread_'rtype_code`):  Likewise.
	(spread_scalar_'rtype_code`):  Likewise.
	* m4/transpose.m4 (transpose_'rtype_code`):  Likewise.
	* m4/iforeach.m4 (name`'rtype_qual`_'atype_code):  Likewise.
	* m4/eoshift1.m4 (eoshift1):  Likewise.  Remove size argument,
	calculate within function.
	(eoshift1_'atype_kind`):  Remove size argument from call
	to eoshift1.
	(eoshift1_'atype_kind`_char):  Likewise.
	(eoshift1_'atype_kind`_char4):  Likewise.
	* m4/eoshift3.m4 (eoshift3):  Remove size argument, calculate
	within function. Use array access macros for accessing array
	descriptors.
	(eoshift3_'atype_kind`):  Remove size argument from call
	to eoshift1.
	(eoshift3_'atype_kind`_char):  Likewise.
	(eoshift3_'atype_kind`_char4):  Likewise.
	* m4/shape.m4 (shape_'rtype_kind`):  Use array access macros
	for accessing array descriptors.
	* m4/cshift1.m4 (cshift1): Remove size argument, calculate
	within function. Use array access macros for accessing array
	descriptors.
	(cshift1_'atype_kind`):  Remove size argument from call to
	cshift1.
	(cshift1_'atype_kind`_char):  Remove size argument from call to
	cshift1.
	(cshift1_'atype_kind`_char4):  Remove size argument from call to
	cshift1.
	* m4/reshape.m4 (reshape_'rtype_ccode`):  Use array access macros
	for accessing array descriptors.
	* m4/ifunction.m4 (name`'rtype_qual`_'atype_code):  Likewise.
	* intrinsics/pack_generic.c (pack_internal):  Use array access
	macros for accessing array descriptors.
	(pack_s_internal):  Likewise.
	* intrinsics/transpose_generic.c (transpose_internal):  Remove
	size argument, calculate from array descriptor. Use array
	access macros for accessing array descriptors.
	(transpose):  Remove size argument from call.
	(transpoe_char):  Likewise.
	(transpose_char4):  Likewise.
	* intrinsics/move_alloc.c (move_alloc):  Use array access macros
	for accessing array descriptors.
	* intrinsics/spread_generic.c (spread_internal):  Remove size
	argument, calculate from array descriptor.  Use array access
	macros for accessing array descriptors.
	(spread_internal_scalar):  Likewise.
	(spread):  Remove size argument from call to spread_internal.
	(spread_char):  Mark argument source_length as unused.
	Remove size argument from call to spread_internal.
	(spread_char4):  Likewise.
	(spread_char_scalar):  Likewise.
	(spread_char4_scalar):  Likewise.
	* intrinsics/unpack_generic.c (unpack_internal):  Use array access
	macros for accessing array descriptors.
	* intrinsics/eoshift2.c (eoshift2):  Remove size argument, calculate
	from array descriptor instead.  Use array access macros for
	accessing array descriptors.
	(eoshift2_##N):  Remove size argument from call to eoshift2.
	(eoshift2_##N_##char):  Likewise.
	(eoshift2_##N_##char4):  Likewise.
	* intrinsics/reshape_generic.c (reshape_internal):  Use array
	access macross for accessing array descriptors.
	* libgfortran.h:  Introduce new macros GFC_DIMENSION_LBOUND,
	GFC_DIMENSION_UBOUND,GFC_DIMENSION_STRIDE, GFC_DIMENSION_EXTENT,
	GFC_DIMENSION_SET, GFC_DESCRIPTOR_LBOUND, GFC_DESCRIPTOR_UBOUND,
	GFC_DESCRIPTOR_EXTENT, GFC_DESCRIPTOR_EXTENT_BYTES,
	GFC_DESCRIPTOR_STRIDE, GFC_DESCRIPTOR_STRIDE_BYTES
	* runtime/in_pack_generic.c (internal_pack):  Use new macros
	for array descriptor access.
	* runtime/in_unpack_generic.c (internal_unpack):  Likewise.
	* intrinsics/dtime.c (dtime_sub):  Likewise.
	* intrinsics/cshift0 (cshift0):  Remove argument size,
	calculate directly from the array descriptor.  Use new macros
	for array descriptor access.
	* cshift0_##N:  Remove shift argument in call to cshift0.
	* cshift0_##N_char:  Mark array_length as unused.  Remove
	array_length in call to cshift0.
	* cshift0_##N_char4:  Likewise.
	* intrisics/etime.c:  Use new macros for array descriptor access.
	* intrinsics/stat.c (stat_i4_sub_0):  Likewise.
	(stat_i8_sub_0):  Likewise.
	(fstat_i4_sub):  Likewise.
	(fstat_i8_sub):  Likewise.
	* intrinsics/date_and_time.c (date_and_time):  Likewise.
	(secnds):  Likewise.
	(itime_i4):  Likewise.
	(itime_i8):  Likewise.
	(idate_i4):  Likewise.
	(idate_i8):  Likewise.
	(gmtime_i4):  Likewise.
	(gmtime_i8):  Likewise.
	(ltime_i4):  Likewise.
	(litme_i8):  Likewise.
	* intrinsics/associated.c (associated):  Likewise.
	* intrinsics/eoshift0.c (eoshift0):  Likewise.
	* intriniscs/size.c (size0):  Likewise.
	* intrinsics/random.c (arandom_r4):  Likewise.
	(arandom_r8):  Likewise.
	(arandom_r10):  Likewise.
	(arandom_r16):  Likewise.
	(random_seed_i4):  Likewise.
	(random_seed_i8):  Likewise.
	* io/list_read.c (nml_parse_qualifier):  Likewise.
	(nml_touch_nodes):  Likewise.
	(nml_read_obj):  Likewise.
	(get_name):  Likewise.
	* io/transfer.c (transfer_array):  Likewise.
	(init_loop_spec):  Likewise.
	(st_set_nml_var_dim):  Likewise.
	* io/write.c (nml_write_obj):  Likewise.
	(obj_loop):  Likewise.
	* generated/all_l1.c: Regenerated.
	* generated/all_l16.c: Regenerated.
	* generated/all_l2.c: Regenerated.
	* generated/all_l4.c: Regenerated.
	* generated/all_l8.c: Regenerated.
	* generated/any_l1.c: Regenerated.
	* generated/any_l16.c: Regenerated.
	* generated/any_l2.c: Regenerated.
	* generated/any_l4.c: Regenerated.
	* generated/any_l8.c: Regenerated.
	* generated/count_16_l.c: Regenerated.
	* generated/count_1_l.c: Regenerated.
	* generated/count_2_l.c: Regenerated.
	* generated/count_4_l.c: Regenerated.
	* generated/count_8_l.c: Regenerated.
	* generated/cshift0_c10.c: Regenerated.
	* generated/cshift0_c16.c: Regenerated.
	* generated/cshift0_c4.c: Regenerated.
	* generated/cshift0_c8.c: Regenerated.
	* generated/cshift0_i1.c: Regenerated.
	* generated/cshift0_i16.c: Regenerated.
	* generated/cshift0_i2.c: Regenerated.
	* generated/cshift0_i4.c: Regenerated.
	* generated/cshift0_i8.c: Regenerated.
	* generated/cshift0_r10.c: Regenerated.
	* generated/cshift0_r16.c: Regenerated.
	* generated/cshift0_r4.c: Regenerated.
	* generated/cshift0_r8.c: Regenerated.
	* generated/cshift1_16.c: Regenerated.
	* generated/cshift1_4.c: Regenerated.
	* generated/cshift1_8.c: Regenerated.
	* generated/eoshift1_16.c: Regenerated.
	* generated/eoshift1_4.c: Regenerated.
	* generated/eoshift1_8.c: Regenerated.
	* generated/eoshift3_16.c: Regenerated.
	* generated/eoshift3_4.c: Regenerated.
	* generated/eoshift3_8.c: Regenerated.
	* generated/in_pack_c10.c: Regenerated.
	* generated/in_pack_c16.c: Regenerated.
	* generated/in_pack_c4.c: Regenerated.
	* generated/in_pack_c8.c: Regenerated.
	* generated/in_pack_i1.c: Regenerated.
	* generated/in_pack_i16.c: Regenerated.
	* generated/in_pack_i2.c: Regenerated.
	* generated/in_pack_i4.c: Regenerated.
	* generated/in_pack_i8.c: Regenerated.
	* generated/in_pack_r10.c: Regenerated.
	* generated/in_pack_r16.c: Regenerated.
	* generated/in_pack_r4.c: Regenerated.
	* generated/in_pack_r8.c: Regenerated.
	* generated/in_unpack_c10.c: Regenerated.
	* generated/in_unpack_c16.c: Regenerated.
	* generated/in_unpack_c4.c: Regenerated.
	* generated/in_unpack_c8.c: Regenerated.
	* generated/in_unpack_i1.c: Regenerated.
	* generated/in_unpack_i16.c: Regenerated.
	* generated/in_unpack_i2.c: Regenerated.
	* generated/in_unpack_i4.c: Regenerated.
	* generated/in_unpack_i8.c: Regenerated.
	* generated/in_unpack_r10.c: Regenerated.
	* generated/in_unpack_r16.c: Regenerated.
	* generated/in_unpack_r4.c: Regenerated.
	* generated/in_unpack_r8.c: Regenerated.
	* generated/matmul_c10.c: Regenerated.
	* generated/matmul_c16.c: Regenerated.
	* generated/matmul_c4.c: Regenerated.
	* generated/matmul_c8.c: Regenerated.
	* generated/matmul_i1.c: Regenerated.
	* generated/matmul_i16.c: Regenerated.
	* generated/matmul_i2.c: Regenerated.
	* generated/matmul_i4.c: Regenerated.
	* generated/matmul_i8.c: Regenerated.
	* generated/matmul_l16.c: Regenerated.
	* generated/matmul_l4.c: Regenerated.
	* generated/matmul_l8.c: Regenerated.
	* generated/matmul_r10.c: Regenerated.
	* generated/matmul_r16.c: Regenerated.
	* generated/matmul_r4.c: Regenerated.
	* generated/matmul_r8.c: Regenerated.
	* generated/maxloc0_16_i1.c: Regenerated.
	* generated/maxloc0_16_i16.c: Regenerated.
	* generated/maxloc0_16_i2.c: Regenerated.
	* generated/maxloc0_16_i4.c: Regenerated.
	* generated/maxloc0_16_i8.c: Regenerated.
	* generated/maxloc0_16_r10.c: Regenerated.
	* generated/maxloc0_16_r16.c: Regenerated.
	* generated/maxloc0_16_r4.c: Regenerated.
	* generated/maxloc0_16_r8.c: Regenerated.
	* generated/maxloc0_4_i1.c: Regenerated.
	* generated/maxloc0_4_i16.c: Regenerated.
	* generated/maxloc0_4_i2.c: Regenerated.
	* generated/maxloc0_4_i4.c: Regenerated.
	* generated/maxloc0_4_i8.c: Regenerated.
	* generated/maxloc0_4_r10.c: Regenerated.
	* generated/maxloc0_4_r16.c: Regenerated.
	* generated/maxloc0_4_r4.c: Regenerated.
	* generated/maxloc0_4_r8.c: Regenerated.
	* generated/maxloc0_8_i1.c: Regenerated.
	* generated/maxloc0_8_i16.c: Regenerated.
	* generated/maxloc0_8_i2.c: Regenerated.
	* generated/maxloc0_8_i4.c: Regenerated.
	* generated/maxloc0_8_i8.c: Regenerated.
	* generated/maxloc0_8_r10.c: Regenerated.
	* generated/maxloc0_8_r16.c: Regenerated.
	* generated/maxloc0_8_r4.c: Regenerated.
	* generated/maxloc0_8_r8.c: Regenerated.
	* generated/maxloc1_16_i1.c: Regenerated.
	* generated/maxloc1_16_i16.c: Regenerated.
	* generated/maxloc1_16_i2.c: Regenerated.
	* generated/maxloc1_16_i4.c: Regenerated.
	* generated/maxloc1_16_i8.c: Regenerated.
	* generated/maxloc1_16_r10.c: Regenerated.
	* generated/maxloc1_16_r16.c: Regenerated.
	* generated/maxloc1_16_r4.c: Regenerated.
	* generated/maxloc1_16_r8.c: Regenerated.
	* generated/maxloc1_4_i1.c: Regenerated.
	* generated/maxloc1_4_i16.c: Regenerated.
	* generated/maxloc1_4_i2.c: Regenerated.
	* generated/maxloc1_4_i4.c: Regenerated.
	* generated/maxloc1_4_i8.c: Regenerated.
	* generated/maxloc1_4_r10.c: Regenerated.
	* generated/maxloc1_4_r16.c: Regenerated.
	* generated/maxloc1_4_r4.c: Regenerated.
	* generated/maxloc1_4_r8.c: Regenerated.
	* generated/maxloc1_8_i1.c: Regenerated.
	* generated/maxloc1_8_i16.c: Regenerated.
	* generated/maxloc1_8_i2.c: Regenerated.
	* generated/maxloc1_8_i4.c: Regenerated.
	* generated/maxloc1_8_i8.c: Regenerated.
	* generated/maxloc1_8_r10.c: Regenerated.
	* generated/maxloc1_8_r16.c: Regenerated.
	* generated/maxloc1_8_r4.c: Regenerated.
	* generated/maxloc1_8_r8.c: Regenerated.
	* generated/maxval_i1.c: Regenerated.
	* generated/maxval_i16.c: Regenerated.
	* generated/maxval_i2.c: Regenerated.
	* generated/maxval_i4.c: Regenerated.
	* generated/maxval_i8.c: Regenerated.
	* generated/maxval_r10.c: Regenerated.
	* generated/maxval_r16.c: Regenerated.
	* generated/maxval_r4.c: Regenerated.
	* generated/maxval_r8.c: Regenerated.
	* generated/minloc0_16_i1.c: Regenerated.
	* generated/minloc0_16_i16.c: Regenerated.
	* generated/minloc0_16_i2.c: Regenerated.
	* generated/minloc0_16_i4.c: Regenerated.
	* generated/minloc0_16_i8.c: Regenerated.
	* generated/minloc0_16_r10.c: Regenerated.
	* generated/minloc0_16_r16.c: Regenerated.
	* generated/minloc0_16_r4.c: Regenerated.
	* generated/minloc0_16_r8.c: Regenerated.
	* generated/minloc0_4_i1.c: Regenerated.
	* generated/minloc0_4_i16.c: Regenerated.
	* generated/minloc0_4_i2.c: Regenerated.
	* generated/minloc0_4_i4.c: Regenerated.
	* generated/minloc0_4_i8.c: Regenerated.
	* generated/minloc0_4_r10.c: Regenerated.
	* generated/minloc0_4_r16.c: Regenerated.
	* generated/minloc0_4_r4.c: Regenerated.
	* generated/minloc0_4_r8.c: Regenerated.
	* generated/minloc0_8_i1.c: Regenerated.
	* generated/minloc0_8_i16.c: Regenerated.
	* generated/minloc0_8_i2.c: Regenerated.
	* generated/minloc0_8_i4.c: Regenerated.
	* generated/minloc0_8_i8.c: Regenerated.
	* generated/minloc0_8_r10.c: Regenerated.
	* generated/minloc0_8_r16.c: Regenerated.
	* generated/minloc0_8_r4.c: Regenerated.
	* generated/minloc0_8_r8.c: Regenerated.
	* generated/minloc1_16_i1.c: Regenerated.
	* generated/minloc1_16_i16.c: Regenerated.
	* generated/minloc1_16_i2.c: Regenerated.
	* generated/minloc1_16_i4.c: Regenerated.
	* generated/minloc1_16_i8.c: Regenerated.
	* generated/minloc1_16_r10.c: Regenerated.
	* generated/minloc1_16_r16.c: Regenerated.
	* generated/minloc1_16_r4.c: Regenerated.
	* generated/minloc1_16_r8.c: Regenerated.
	* generated/minloc1_4_i1.c: Regenerated.
	* generated/minloc1_4_i16.c: Regenerated.
	* generated/minloc1_4_i2.c: Regenerated.
	* generated/minloc1_4_i4.c: Regenerated.
	* generated/minloc1_4_i8.c: Regenerated.
	* generated/minloc1_4_r10.c: Regenerated.
	* generated/minloc1_4_r16.c: Regenerated.
	* generated/minloc1_4_r4.c: Regenerated.
	* generated/minloc1_4_r8.c: Regenerated.
	* generated/minloc1_8_i1.c: Regenerated.
	* generated/minloc1_8_i16.c: Regenerated.
	* generated/minloc1_8_i2.c: Regenerated.
	* generated/minloc1_8_i4.c: Regenerated.
	* generated/minloc1_8_i8.c: Regenerated.
	* generated/minloc1_8_r10.c: Regenerated.
	* generated/minloc1_8_r16.c: Regenerated.
	* generated/minloc1_8_r4.c: Regenerated.
	* generated/minloc1_8_r8.c: Regenerated.
	* generated/minval_i1.c: Regenerated.
	* generated/minval_i16.c: Regenerated.
	* generated/minval_i2.c: Regenerated.
	* generated/minval_i4.c: Regenerated.
	* generated/minval_i8.c: Regenerated.
	* generated/minval_r10.c: Regenerated.
	* generated/minval_r16.c: Regenerated.
	* generated/minval_r4.c: Regenerated.
	* generated/minval_r8.c: Regenerated.
	* generated/pack_c10.c: Regenerated.
	* generated/pack_c16.c: Regenerated.
	* generated/pack_c4.c: Regenerated.
	* generated/pack_c8.c: Regenerated.
	* generated/pack_i1.c: Regenerated.
	* generated/pack_i16.c: Regenerated.
	* generated/pack_i2.c: Regenerated.
	* generated/pack_i4.c: Regenerated.
	* generated/pack_i8.c: Regenerated.
	* generated/pack_r10.c: Regenerated.
	* generated/pack_r16.c: Regenerated.
	* generated/pack_r4.c: Regenerated.
	* generated/pack_r8.c: Regenerated.
	* generated/product_c10.c: Regenerated.
	* generated/product_c16.c: Regenerated.
	* generated/product_c4.c: Regenerated.
	* generated/product_c8.c: Regenerated.
	* generated/product_i1.c: Regenerated.
	* generated/product_i16.c: Regenerated.
	* generated/product_i2.c: Regenerated.
	* generated/product_i4.c: Regenerated.
	* generated/product_i8.c: Regenerated.
	* generated/product_r10.c: Regenerated.
	* generated/product_r16.c: Regenerated.
	* generated/product_r4.c: Regenerated.
	* generated/product_r8.c: Regenerated.
	* generated/reshape_c10.c: Regenerated.
	* generated/reshape_c16.c: Regenerated.
	* generated/reshape_c4.c: Regenerated.
	* generated/reshape_c8.c: Regenerated.
	* generated/reshape_i16.c: Regenerated.
	* generated/reshape_i4.c: Regenerated.
	* generated/reshape_i8.c: Regenerated.
	* generated/reshape_r10.c: Regenerated.
	* generated/reshape_r16.c: Regenerated.
	* generated/reshape_r4.c: Regenerated.
	* generated/reshape_r8.c: Regenerated.
	* generated/shape_i16.c: Regenerated.
	* generated/shape_i4.c: Regenerated.
	* generated/shape_i8.c: Regenerated.
	* generated/spread_c10.c: Regenerated.
	* generated/spread_c16.c: Regenerated.
	* generated/spread_c4.c: Regenerated.
	* generated/spread_c8.c: Regenerated.
	* generated/spread_i1.c: Regenerated.
	* generated/spread_i16.c: Regenerated.
	* generated/spread_i2.c: Regenerated.
	* generated/spread_i4.c: Regenerated.
	* generated/spread_i8.c: Regenerated.
	* generated/spread_r10.c: Regenerated.
	* generated/spread_r16.c: Regenerated.
	* generated/spread_r4.c: Regenerated.
	* generated/spread_r8.c: Regenerated.
	* generated/sum_c10.c: Regenerated.
	* generated/sum_c16.c: Regenerated.
	* generated/sum_c4.c: Regenerated.
	* generated/sum_c8.c: Regenerated.
	* generated/sum_i1.c: Regenerated.
	* generated/sum_i16.c: Regenerated.
	* generated/sum_i2.c: Regenerated.
	* generated/sum_i4.c: Regenerated.
	* generated/sum_i8.c: Regenerated.
	* generated/sum_r10.c: Regenerated.
	* generated/sum_r16.c: Regenerated.
	* generated/sum_r4.c: Regenerated.
	* generated/sum_r8.c: Regenerated.
	* generated/transpose_c10.c: Regenerated.
	* generated/transpose_c16.c: Regenerated.
	* generated/transpose_c4.c: Regenerated.
	* generated/transpose_c8.c: Regenerated.
	* generated/transpose_i16.c: Regenerated.
	* generated/transpose_i4.c: Regenerated.
	* generated/transpose_i8.c: Regenerated.
	* generated/transpose_r10.c: Regenerated.
	* generated/transpose_r16.c: Regenerated.
	* generated/transpose_r4.c: Regenerated.
	* generated/transpose_r8.c: Regenerated.
	* generated/unpack_c10.c: Regenerated.
	* generated/unpack_c16.c: Regenerated.
	* generated/unpack_c4.c: Regenerated.
	* generated/unpack_c8.c: Regenerated.
	* generated/unpack_i1.c: Regenerated.
	* generated/unpack_i16.c: Regenerated.
	* generated/unpack_i2.c: Regenerated.
	* generated/unpack_i4.c: Regenerated.
	* generated/unpack_i8.c: Regenerated.
	* generated/unpack_r10.c: Regenerated.
	* generated/unpack_r16.c: Regenerated.
	* generated/unpack_r4.c: Regenerated.
	* generated/unpack_r8.c: Regenerated.

From-SVN: r148769
2009-06-21 19:24:55 +00:00
Francois-Xavier Coudert fa10ccb275 fmain.c (main): Don't PREFIX set_args.
* fmain.c (main): Don't PREFIX set_args.
        * libgfortran.h (set_args): Use iexport_proto.
        * runtime/main.c (set_args): Use iexport.

From-SVN: r148472
2009-06-14 16:52:49 +00:00
Jerry DeLisle dcfddbd49c re PR fortran/40008 (F2008: Add NEWUNIT= for OPEN statement)
2009-06-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/40008
	* libgfortran.h: Define IOPARM_OPEN_HAS_NEWUNIT.
	* io/open.c (st_open): Don't error on negative unit number if NEWUNIT
	was specified. If NEWUNIT is specified, call new function to get the
	unique unit number and assign it.
	* io/io.h (st_parameter_open): Add pointer to newunit.  Add prototype for
	next_available_newunit. Add prototype for new function,
	get_unique_unit_number.
	* io/unit.c: Declare next_available_newunit. Define the first newunit
	number. (init_units): Initialize next_available_unit.
	(get_unique_unit_number): New function. Fix whitespace and comments.
	* io/transfer.c (data_transfer_init): Update error message to not be
	specific to OPEN statements.

From-SVN: r148253
2009-06-07 19:00:47 +00:00
Janne Blomqvist c1df0e1ac5 Revert part of r147883 that breaks ABI
From-SVN: r147915
2009-05-27 18:22:34 +03:00
Tobias Burnus 092231a8d6 re PR fortran/39178 (Generate main() rather than using a main in libgfortran/fmain.c)
fortran/
2009-05-26  Tobias Burnus  <burnus@net-b.de>

        PR fortran/39178
        * gfortranspec.c (lang_specific_driver): Stop linking
        libgfortranbegin.
        * trans-decl.c (gfc_build_builtin_function_decls): Stop
        making MAIN__ publicly visible.
        (gfc_build_builtin_function_decls): Add
        gfor_fndecl_set_args.
        (create_main_function) New function.
        (gfc_generate_function_code): Use it.

libgfortran/
2009-05-26  Tobias Burnus  <burnus@net-b.de>

        PR fortran/39178
        * runtime/main.c (store_exe_path): Make static
        and multiple-times callable.
        (set_args): Call store_exe_path.
        * libgfortran.h: Remove store_exe_path prototype.
        * fmain.c (main): Remove store_exe_path call.

From-SVN: r147883
2009-05-26 23:19:57 +02:00
Jakub Jelinek 748086b7b2 Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception.
From-SVN: r145841
2009-04-09 17:00:19 +02:00
Janne Blomqvist f9bfed2243 string.c (compare0): Use gfc_charlen_type.
2009-04-08  Janne Blomqvist  <jb@gcc.gnu.org>

        * runtime/string.c (compare0): Use gfc_charlen_type.
        * runtime/error.c (gfc_itoa): Move to io/write.c
        (xtoa): Rename to gfc_xtoa.
        * runtime/backtrace.c (show_backtrace): Call gfc_xtoa.
        * intrinsics/cshift0.c (cshift0): Use index_type for shift arg.
        * intrinsics/date_and_time.c (date_and_time): Use index_type.
        (itime_i4): Likewise.
        (itime_i8): Likewise.
        (idate_i4): Likewise.
        (idate_i8): Likewise.
        (gmtime_i4): Likewise.
        (gmtime_i8): Likewise.
        (ltime_i4): Likewise.
        (ltime_i8): Likewise.
        * libgfortran.h (gfc_itoa): Remove prototype.
        (xtoa): Rename prototype to gfc_xtoa.
        * io/list_read.c (nml_read_obj): Use size_t for string length.
        * io/transfer.c (read_block_direct): Change nbytes arg from
        pointer to value.
        (unformatted_read): Minor cleanup, call read_block_directly properly.
        (skip_record): Use ssize_t.
        (next_record_w_unf): Avoid stell() call by calling sseek with SEEK_CUR.
        (iolength_transfer): Make sure to multiply before cast.
        * io/intrinsics.c (fgetc): Remove unnecessary variable.
        * io/format.c (format_hash): Use gfc_charlen_type.
        * io/write.c (itoa): Move from runtime/error.c:gfc_itoa, rename,
        make static.
        (write_i): Call with pointer to itoa.
        (write_z): Call with pointer to gfc_xtoa.
        (write_integer): Pointer to itoa.
        (nml_write_obj): Type cleanup, don't call strlen in loop.

From-SVN: r145758
2009-04-08 19:48:07 +03:00
Danny Smith 6a21bcbe16 nessage.txt
From-SVN: r142131
2008-11-23 07:02:22 +00:00
Tobias Burnus 9731c4a348 libgfortran.h (likely,unlikely): New makros.
2008-09-06  Tobias Burnus  <burnus@net-b.de>

	* libgfortran.h (likely,unlikely): New makros.
	(runtime_warning_at,__mingw_snprintf): Add __attribute__(format()).
	* m4/spread.m4 (spread_'rtype_code`): Use unlikely for bounds_check.
	* m4/iforeach.m4 (name`'rtype_qual`_'atype_code): Ditto.
	* m4/matmull.m4 (matmul_'rtype_code`): Ditto.
	* m4/ifunction_logical.m4 (name`'rtype_qual`_'atype_code): Ditto.
	* m4/ifunction.m4 (name`'rtype_qual`_'atype_code): Ditto.
	* m4/matmul.m4 (matmul_'rtype_code`): Ditto.

	* generated/minval_r8.c: Regenerated.
	* generated/spread_r10.c: Regenerated.
	* generated/minloc1_16_r16.c: Regenerated.
	* generated/maxloc1_4_r8.c: Regenerated.
	* generated/sum_i8.c: Regenerated.
	* generated/any_l16.c: Regenerated.
	* generated/spread_i8.c: Regenerated.
	* generated/maxval_i2.c: Regenerated.
	* generated/any_l2.c: Regenerated.
	* generated/product_r4.c: Regenerated.
	* generated/maxloc1_8_i4.c: Regenerated.
	* generated/maxloc0_4_r4.c: Regenerated.
	* generated/all_l1.c: Regenerated.
	* generated/matmul_r8.c: Regenerated.
	* generated/product_i2.c: Regenerated.
	* generated/minloc0_4_r16.c: Regenerated.
	* generated/minloc0_4_i1.c: Regenerated.
	* generated/maxloc0_4_r16.c: Regenerated.
	* generated/maxloc0_4_i2.c: Regenerated.
	* generated/minloc1_8_r16.c: Regenerated.
	* generated/maxloc1_8_r16.c: Regenerated.
	* generated/maxloc0_8_i8.c: Regenerated.
	* generated/sum_r16.c: Regenerated.
	* generated/sum_i1.c: Regenerated.
	* generated/minloc1_4_r8.c: Regenerated.
	* generated/maxloc1_16_r16.c: Regenerated.
	* generated/minloc1_16_i4.c: Regenerated.
	* generated/maxloc1_16_i4.c: Regenerated.
	* generated/minloc0_16_i8.c: Regenerated.
	* generated/spread_i1.c: Regenerated.
	* generated/maxloc0_16_i8.c: Regenerated.
	* generated/maxval_r16.c: Regenerated.
	* generated/product_c10.c: Regenerated.
	* generated/minloc1_8_i4.c: Regenerated.
	* generated/minloc0_16_i16.c: Regenerated.
	* generated/matmul_r16.c: Regenerated.
	* generated/minloc0_4_r4.c: Regenerated.
	* generated/all_l2.c: Regenerated.
	* generated/product_c4.c: Regenerated.
	* generated/sum_r4.c: Regenerated.
	* generated/minloc0_4_i2.c: Regenerated.
	* generated/spread_c10.c: Regenerated.
	* generated/maxloc0_8_i1.c: Regenerated.
	* generated/spread_r4.c: Regenerated.
	* generated/minloc0_8_i8.c: Regenerated.
	* generated/matmul_c8.c: Regenerated.
	* generated/all_l16.c: Regenerated.
	* generated/minloc1_16_r10.c: Regenerated.
	* generated/sum_i2.c: Regenerated.
	* generated/minloc0_16_i1.c: Regenerated.
	* generated/maxloc0_16_i1.c: Regenerated.
	* generated/maxloc1_8_r8.c: Regenerated.
	* generated/minval_i16.c: Regenerated.
	* generated/spread_i2.c: Regenerated.
	* generated/maxval_i4.c: Regenerated.
	* generated/minval_i8.c: Regenerated.
	* generated/any_l4.c: Regenerated.
	* generated/maxloc1_4_i8.c: Regenerated.
	* generated/maxloc0_16_i16.c: Regenerated.
	* generated/maxloc0_8_r4.c: Regenerated.
	* generated/minloc1_4_i16.c: Regenerated.
	* generated/maxloc1_4_i16.c: Regenerated.
	* generated/minloc0_4_r10.c: Regenerated.
	* generated/minloc0_8_i16.c: Regenerated.
	* generated/maxloc0_4_r10.c: Regenerated.
	* generated/maxloc0_8_i16.c: Regenerated.
	* generated/minloc1_8_r10.c: Regenerated.
	* generated/product_i4.c: Regenerated.
	* generated/minloc0_16_r4.c: Regenerated.
	* generated/sum_c16.c: Regenerated.
	* generated/maxloc1_8_r10.c: Regenerated.
	* generated/maxloc0_16_r4.c: Regenerated.
	* generated/minloc1_16_r8.c: Regenerated.
	* generated/minloc0_8_i1.c: Regenerated.
	* generated/maxloc0_4_i4.c: Regenerated.
	* generated/maxloc1_16_r8.c: Regenerated.
	* generated/maxloc0_8_i2.c: Regenerated.
	* generated/sum_r10.c: Regenerated.
	* generated/count_4_l.c: Regenerated.
	* generated/sum_c4.c: Regenerated.
	* generated/count_8_l.c: Regenerated.
	* generated/maxloc1_16_r10.c: Regenerated.
	* generated/matmul_i8.c: Regenerated.
	* generated/minloc0_16_i2.c: Regenerated.
	* generated/minloc1_8_r8.c: Regenerated.
	* generated/maxloc0_16_i2.c: Regenerated.
	* generated/spread_c4.c: Regenerated.
	* generated/matmul_c16.c: Regenerated.
	* generated/maxval_r10.c: Regenerated.
	* generated/minval_i1.c: Regenerated.
	* generated/maxloc1_4_i1.c: Regenerated.
	* generated/matmul_r10.c: Regenerated.
	* generated/minloc1_4_i8.c: Regenerated.
	* generated/minloc0_8_r4.c: Regenerated.
	* generated/matmul_l4.c: Regenerated.
	* generated/product_i16.c: Regenerated.
	* generated/minloc0_16_r16.c: Regenerated.
	* generated/all_l4.c: Regenerated.
	* generated/minloc0_4_i4.c: Regenerated.
	* generated/minloc0_8_i2.c: Regenerated.
	* generated/matmul_i1.c: Regenerated.
	* generated/minval_r4.c: Regenerated.
	* generated/maxloc1_4_r4.c: Regenerated.
	* generated/spread_i16.c: Regenerated.
	* generated/sum_i4.c: Regenerated.
	* generated/maxval_r8.c: Regenerated.
	* generated/spread_i4.c: Regenerated.
	* generated/minloc1_4_i1.c: Regenerated.
	* generated/minval_r16.c: Regenerated.
	* generated/minval_i2.c: Regenerated.
	* generated/maxloc1_4_i2.c: Regenerated.
	* generated/product_r8.c: Regenerated.
	* generated/maxloc1_8_i8.c: Regenerated.
	* generated/maxloc0_4_r8.c: Regenerated.
	* generated/maxloc0_16_r16.c: Regenerated.
	* generated/matmul_r4.c: Regenerated.
	* generated/sum_c10.c: Regenerated.
	* generated/minloc1_4_r16.c: Regenerated.
	* generated/maxloc1_4_r16.c: Regenerated.
	* generated/minloc0_8_r16.c: Regenerated.
	* generated/maxloc0_8_r16.c: Regenerated.
	* generated/count_1_l.c: Regenerated.
	* generated/maxloc0_8_i4.c: Regenerated.
	* generated/matmul_i2.c: Regenerated.
	* generated/minloc1_4_r4.c: Regenerated.
	* generated/matmul_c10.c: Regenerated.
	* generated/minloc0_16_i4.c: Regenerated.
	* generated/maxloc0_16_i4.c: Regenerated.
	* generated/minloc1_16_i8.c: Regenerated.
	* generated/maxloc1_16_i8.c: Regenerated.
	* generated/minloc1_4_i2.c: Regenerated.
	* generated/matmul_l16.c: Regenerated.
	* generated/maxloc1_8_i1.c: Regenerated.
	* generated/minloc0_16_r10.c: Regenerated.
	* generated/minloc1_8_i8.c: Regenerated.
	* generated/minloc0_4_r8.c: Regenerated.
	* generated/product_r16.c: Regenerated.
	* generated/product_c8.c: Regenerated.
	* generated/sum_r8.c: Regenerated.
	* generated/minloc0_8_i4.c: Regenerated.
	* generated/matmul_c4.c: Regenerated.
	* generated/minloc1_16_i16.c: Regenerated.
	* generated/spread_r8.c: Regenerated.
	* generated/maxloc1_8_r4.c: Regenerated.
	* generated/minloc1_16_i1.c: Regenerated.
	* generated/maxloc1_16_i1.c: Regenerated.
	* generated/spread_r16.c: Regenerated.
	* generated/minval_r10.c: Regenerated.
	* generated/count_16_l.c: Regenerated.
	* generated/minval_i4.c: Regenerated.
	* generated/minloc1_8_i1.c: Regenerated.
	* generated/maxloc1_4_i4.c: Regenerated.
	* generated/maxloc1_8_i2.c: Regenerated.
	* generated/maxval_i8.c: Regenerated.
	* generated/any_l8.c: Regenerated.
	* generated/maxloc0_16_r10.c: Regenerated.
	* generated/minloc0_4_i16.c: Regenerated.
	* generated/maxloc0_8_r8.c: Regenerated.
	* generated/maxloc0_4_i16.c: Regenerated.
	* generated/minloc1_4_r10.c: Regenerated.
	* generated/minloc1_8_i16.c: Regenerated.
	* generated/maxloc1_4_r10.c: Regenerated.
	* generated/maxloc1_8_i16.c: Regenerated.
	* generated/minloc0_8_r10.c: Regenerated.
	* generated/maxloc0_8_r10.c: Regenerated.
	* generated/minloc1_16_r4.c: Regenerated.
	* generated/maxloc1_16_r4.c: Regenerated.
	* generated/minloc0_16_r8.c: Regenerated.
	* generated/product_i8.c: Regenerated.
	* generated/maxloc0_16_r8.c: Regenerated.
	* generated/sum_i16.c: Regenerated.
	* generated/count_2_l.c: Regenerated.
	* generated/maxloc0_4_i8.c: Regenerated.
	* generated/maxloc1_16_i16.c: Regenerated.
	* generated/matmul_i4.c: Regenerated.
	* generated/minloc1_8_r4.c: Regenerated.
	* generated/sum_c8.c: Regenerated.
	* generated/minloc1_16_i2.c: Regenerated.
	* generated/maxloc1_16_i2.c: Regenerated.
	* generated/maxval_i16.c: Regenerated.
	* generated/spread_c8.c: Regenerated.
	* generated/matmul_i16.c: Regenerated.
	* generated/minloc1_4_i4.c: Regenerated.
	* generated/maxval_i1.c: Regenerated.
	* generated/minloc1_8_i2.c: Regenerated.
	* generated/any_l1.c: Regenerated.
	* generated/product_c16.c: Regenerated.
	* generated/minloc0_8_r8.c: Regenerated.
	* generated/matmul_l8.c: Regenerated.
	* generated/product_r10.c: Regenerated.
	* generated/product_i1.c: Regenerated.
	* generated/all_l8.c: Regenerated.
	* generated/maxloc0_4_i1.c: Regenerated.
	* generated/minloc0_4_i8.c: Regenerated.
	* generated/spread_c16.c: Regenerated.
	* generated/maxval_r4.c: Regenerated.

From-SVN: r140060
2008-09-06 16:53:26 +02:00
Thomas Koenig c2b00cdcaa re PR libfortran/36886 (misaligment for cshift of character)
2008-08-14  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/36886
	* Makefile.am:  Added $(i_cshift0_c).
	Added $(i_cshift0_c) to gfor_built_specific_src.
	Add rule to build from cshift0.m4.
	* Makefile.in:  Regenerated.
	* libgfortran.h:  Addedd prototypes for cshift0_i1,
	cshift0_i2, cshift0_i4, cshift0_i8, cshift0_i16,
	cshift0_r4, cshift0_r8, cshift0_r10, cshift0_r16,
	cshift0_c4, cshift0_c8, cshift0_c10, cshift0_c16.
	Define Macros GFC_UNALIGNED_C4 and GFC_UNALIGNED_C8.
	* intrinsics/cshift0.c:  Remove helper functions for
	the innter shift loop.
	(cshift0):  Call specific functions depending on type
	of array argument.  Only call specific functions for
	correct alignment for other types.
	* m4/cshift0.m4:  New file.
	* generated/cshift0_i1.c:  New file.
	* generated/cshift0_i2.c:  New file.
	* generated/cshift0_i4.c:  New file.
	* generated/cshift0_i8:.c  New file.
	* generated/cshift0_i16.c:  New file.
	* generated/cshift0_r4.c:  New file.
	* generated/cshift0_r8.c:  New file.
	* generated/cshift0_r10.c:  New file.
	* generated/cshift0_r16.c:  New file.
	* generated/cshift0_c4.c:  New file.
	* generated/cshift0_c8.c:  New file.
	* generated/cshift0_c10.c:  New file.
	* generated/cshift0_c16.c:  New file.

2008-08-14  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/36886
	* gfortran.dg/cshift_char_3.f90:  New test case.
	* gfortran.dg/cshift_nan_1.f90:  New test case.

From-SVN: r139111
2008-08-14 18:31:32 +00:00
Tobias Burnus 0d52899f78 re PR fortran/36132 (_gfortran_internal_pack on optional arguments)
2008-07-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/36132
        PR fortran/29952
        PR fortran/36909
        * trans.c (gfc_trans_runtime_check): Allow run-time warning
        * besides
        run-time error.
        * trans.h (gfc_trans_runtime_check): Update declaration.
        * trans-array.c
        * (gfc_trans_array_ctor_element,gfc_trans_array_bound_check,
        gfc_conv_array_ref,gfc_conv_ss_startstride,gfc_trans_dummy_array_bias):
        Updated gfc_trans_runtime_check calls.
        (gfc_conv_array_parameter): Implement flag_check_array_temporaries,
        fix packing/unpacking for nonpresent optional actuals to optional
        formals.
        * trans-array.h (gfc_conv_array_parameter): Update declaration.
        * trans-expr.c (gfc_conv_substring,gfc_trans_arrayfunc_assign,
        gfc_conv_function_call): Updated gfc_trans_runtime_check calls.
        (gfc_conv_function_call): Update gfc_conv_array_parameter calls.
        * trans-expr.c (gfc_trans_goto): Updated gfc_trans_runtime_check
        calls.
        * trans-io.c (set_string,gfc_conv_intrinsic_repeat): Ditto.
        (gfc_conv_intrinsic_transfer,gfc_conv_intrinsic_loc): Same for
        gfc_conv_array_parameter.
        * trans-intrinsics.c (gfc_conv_intrinsic_bound): Ditto.
        * trans-decl.c (gfc_build_builtin_function_decls): Add
        gfor_fndecl_runtime_warning_at.
        * lang.opt: New option fcheck-array-temporaries.
        * gfortran.h (gfc_options): New flag_check_array_temporaries.
        * options.c (gfc_init_options, gfc_handle_option): Handle flag.
        * invoke.texi: New option fcheck-array-temporaries.

2008-07-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/36132
        PR fortran/29952
        PR fortran/36909
        * runtime/error.c: New function runtime_error_at.
        * gfortran.map: Ditto.
        * libgfortran.h: Ditto.

2008-07-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/36132
        PR fortran/29952
        PR fortran/36909
        gfortran.dg/internal_pack_4.f90: New.
        gfortran.dg/internal_pack_5.f90: New.
        gfortran.dg/array_temporaries_2.f90: New.

From-SVN: r138186
2008-07-27 12:45:44 +02:00
Jerry DeLisle a9608b5743 re PR fortran/36515 (Integer read from stdin yields a value overflow for a valid integer.)
2008-06-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/36515
	* libgfortran.h (compile_options_t): Add int range_check to structure.
	* runtime/compile_options.c (set_options): Add range_check option.
	(init_compile_options): Likewise.
	*io/read.c (read_decimal): Change overflow checks to include
	range_check.

From-SVN: r136822
2008-06-15 20:02:58 +00:00
Jerry DeLisle cea93abbe2 re PR libfortran/35863 ([F2003] Implement ENCODING="UTF-8")
2008-06-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/35863
	* libgfortran.h: Change l8_to_l4_offset to big_endian and add endian_off.
	* runtime/main.c: Fix error in comment. Change l8_to_l4_offset to
	big_endian. (determine_endianness): Add endian_off and set its value
	according to big_endian.
	* gfortran.map: Add symbol for new _gfortran_transfer_character_wide.
	* io/io.h: Add prototype declarations for new functions.
	* io/list_read.c (list_formatted_read_scalar): Modify to handle kind=4.
	(list_formatted_read): Calculate stride based on kind for character type
	and use it when calling list_formatted_read_scalar.
	* io/inquire.c (inquire_via_unit): Change l8_to_l4_offset to big_endian.
	* io/open.c (st_open): Change l8_to_l4_offset to big_endian.
	* io/read.c (read_a_char4): New function to handle formatted read.
	* io/write.c: Define GFC_CHAR4(x) to improve readability of code.
	(write_a_char4): New function to handle formatted write.
	(write_character): Modify to accept the kind parameter and adjust for
	endianess of the machine. (list_formatted_write): Calculate the stride
	resulting from the kind and adjust the list_formatted_write_scalar call
	accordingly. (nml_write_obj): Adjust calls to write_character.
	(namelist_write): Likewise.
	* io/transfer.c (formatted_transfer_scaler): Rename 'len' argument to
	'kind' argument to better describe what it is. Add calls to new
	functions for kind == 4. (formatted_transfer): Modify to handle the case
	of type character and kind equals 4 to pass in the kind to the transfer
	routines. (transfer_character_wide): Add this new function.
	(transfer_array): Don't set kind to the character string length. Adjust
	strides bases on character kind.
	(unformatted_read): Adjust size based on kind for character types.
	(unformatted_write): Likewise. (data_transfer_init): Change
	l8_to_l4_offset to big_endian.

From-SVN: r136763
2008-06-13 20:28:08 +00:00
Francois-Xavier Coudert 4b267817ff libgfortran.h (gfc_char4_t): New type.
2008-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	* libgfortran.h (gfc_char4_t): New type.
	(GFC_SIZE_OF_CHAR_KIND): New macro.
	(compare_string): Adjust prototype.
	(compare_string_char4): New prototype.
	* gfortran.map (GFORTRAN_1.1): Add _gfortran_adjustl_char4,
	_gfortran_adjustr_char4, _gfortran_compare_string_char4,
	_gfortran_concat_string_char4, _gfortran_string_index_char4,
	_gfortran_string_len_trim_char4, _gfortran_string_minmax_char4,
	_gfortran_string_scan_char4, _gfortran_string_trim_char4 and
	_gfortran_string_verify_char4.
	* intrinsics/string_intrinsics_inc.c: New file from content of
	string_intrinsics.c with types replaced by macros.
	* intrinsics/string_intrinsics.c: Move content to
	string_intrinsics_inc.c.

From-SVN: r135313
2008-05-14 21:51:27 +00:00
Thomas Koenig c7d0f4d5fa re PR libfortran/32972 (performance of pack/unpack)
2008-04-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
	Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

	PR libfortran/32972
	PR libfortran/32512
	configure.ac:  Add test for uintptr_t.
	configure:  Regenerated.
	config.h.in:  Regenerated.
	* libgfortran.h: GFC_DTYPE_DERIVED_1:  New macro.
	GFC_DTYPE_DERIVED_2:  New macro.
	GFC_DTYPE_DERIVED_4:  New macro.
	GFC_DTYPE_DERIVED_8:  New macro.
	GFC_DTYPE_DERIVED_16:  New macro.
	GFC_UNALIGNED_2:  New macro.
	GFC_UNALIGNED_4:  New macro.
	GFC_UNALIGNED_8:  New macro.
	GFC_UNALIGNED_16:  New macro.
	intptr_t:  Define if we don't have it.
	uintptr_t:  Likewise.
	* runtime/backtrace.c (show_backtrace):  Use intptr_t.
	* intrinsics/signal.c (signal_sub):  Likewise.
	(signal_sub_int):  Likewise.
	(alarm_sub_int_i4):  Likewise.
	* intrinsics/spread_generic.c (spread):  Use the integer
	routines for handling derived types of sizes 1, 2, 4, 8 and 16
	if the alignment of all pointers is correct.
	(spread_scalar):  Likewise.
	* intrinsics/pack_generic.c (pack):  Likewise.
	Use GFD_DTYPE_TYPE_SIZE to avoid nested switch statements.
	* intrinsics/unpack_generic.c (unpack1):  Likewise.
	(unpack0):  Likewise.
	* runtime/in_pack_generic.c (internal_pack):  Likewise.
	* runtime/in_unpack_generic.c (internal_unpack):  Likewise.

2008-04-13  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/32972
	PR libfortran/32512
	* gfortran.dg/internal_pack_1.f90:  Add test for derived type.
	* gfortran.dg/intrinsic_spread_1.f90:  Likewise.
	* gfortran.dg/intrinsic_pack_1.f90:  Likewise.
	* gfortran.dg/intrinsic_unpack_1.f90:  Likewise.


Co-Authored-By: Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>

From-SVN: r134245
2008-04-13 20:15:58 +00:00
Jerry DeLisle 10256cbe95 PR fortran/25829 28655
2008-04-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/25829 28655
	* gfortran.map: Add new symbol, _gfortran_st_wait.
	* libgfortran.h (st_paramter_common): Add new I/O parameters.
	* open.c (st_option decimal_opt[], st_option encoding_opt[],
	st_option round_opt[], st_option sign_opt[], st_option async_opt[]): New
	parameter option arrays. (edit_modes): Add checks for new parameters.
	(new_unit): Likewise. (st_open): Likewise.
	* list_read.c (CASE_SEPERATORS): Add ';' as a valid separator.
	(eat_separator): Handle deimal comma. (read_logical): Fix whitespace.
	(parse_real): Handle decimal comma. (read_real): Handle decimal comma.
	* read.c (read_a): Use decimal status flag to allow comma in place of a
	decimal point. (read_f): Allow comma as acceptable character in float.
	According to decimal flag, substitute a period for a comma.
	(read_x): If decimal status flag is comma, disable the read_comma flag,
	not allowing comma as a delimiter, an extension otherwise.
	* io.h: (unit_decimal, unit_encoding, unit_round, unit_sign,
	unit_async): New enumerators. Add all new I/O parameters.
	* unix.c (unix_stream, int_stream): Add io_mode	asychronous I/O	control.
	(move_pos_offset, fd_alloc_w_at): Fix some whitespace.
	(fd_sfree): Use new enumerator. (fd_read): Likewise.
	(fd_write): Likewise. (fd_close): Fix whitespace.
	(fd_open): Use new enumertors. (tempfile, regular_file,
	open_external): Fix whitespace. (output_stream, error_stream): Set
	method. (stream_offset): Fix whitespace.
	* transfer.c: (st_option decimal_opt[], sign_opt[], blank_opt[]): New
	option arrays. 	(formatted_transfer_scalar): Set sf_read_comma flag
	based on new decimal_status flag. (data_transfer_init): Initialize new
	parameters. Add checks for decimal, sign, and blank. (st_wait): New stub.
	* format.c: (format_lex): Add format specifiers DP, DC, and D.
	(parse_format_list): Parse the new specifiers.
	* write.c (write_decimal): Use new sign enumerators to set the sign.
	(write_complex): Handle decimal comma and semi-colon separator.
	(nml_write_obj): Likewise.
	* write_float.def: Revise sign enumerators. (calculate_sign): Use new
	sign enumerators. (output_float): Likewise. Use new decimal_status flag
	to set the decimal character to a point or a comma.

From-SVN: r133943
2008-04-05 22:18:03 +00:00
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