Commit Graph

1680 Commits

Author SHA1 Message Date
Janne Blomqvist 4135a21f4d PR 78534 Regression on 32-bit targets
By switching from int to size_t in order to handle larger values,
r256322 introduced a bug that manifested itself on 32-bit
targets. Fixed by using the correct type to store the result of a
next_array_record call.

Regtested on x86_64-pc-linux-gnu and i686-pc-linux-gnu, committed to
trunk as obvious.

libgfortran/ChangeLog:

2018-01-08  Janne Blomqvist  <jb@gcc.gnu.org>

	PR 78534, bugfix for r256322
	* io/transfer.c (next_record_w): Use correct type for return value
	of next_array_record.

From-SVN: r256337
2018-01-08 14:12:05 +02:00
Thomas Koenig fa3c4d47b9 libgfortran.h (GFC_DTYPE_COPY): New macro.
2018-01-07  Thomas Koenig  <tkoenig@gcc.gnu.org>

	* libgfortran.h (GFC_DTYPE_COPY): New macro.
	(GFC_DTYPE_COPY_SETRANK): New macro.
	(GFC_DTYPE_IS_UNSET): New macro.
	* intrinsics/cshift0.c (cshift0): Use new macros.
	* intrinsics/eoshift0.c (eoshift0): Likewise.
	* intrinsics/eoshift2.c (eoshift2): Likewise.
	* intrinsics/move_alloc.c (move_alloc): Likewise.
	* intrinsics/reshape_generic.c (reshape_internal): Likewise.
	* intrinsics/spread_generic.c (spread_internal): Likewise.
	* intrinsics/spread_generic.c (spread_scalar): Likewise.
	* intrinsics/spread_generic.c (spread_char_scalar): Likewise.
	* intrinsics/spread_generic.c (spread_char4_scalar): Likewise.
	* intrinsics/unpack_generic.c (unpack0): Likewise.
	* intrinsics/unpack_generic.c (unpack0_char): Likewise.
	* intrinsics/unpack_generic.c (unpack0_char4): Likewise.
	* m4/cshift1.m4 (cshift1): Likewise.
	* m4/eoshift1.m4 (eoshift1): Likewise.
	* m4/eoshift3.m4 (eoshift3): Likewise.
	* m4/iforeach-s.m4: Likewise.
	* m4/iforeach.m4: Likewise.
	* m4/ifunction-s.m4: Likewise.
	* m4/ifunction-s2.m4: Likewise.
	* m4/ifunction.m4: Likewise.
	* m4/ifunction_logical.m4: Likewise.
	* m4/reshape.m4: Likewise.
	* m4/spread.m4: 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/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/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/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_16_s1.c : Regenerated.
	* generated/maxloc0_16_s4.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_4_s1.c : Regenerated.
	* generated/maxloc0_4_s4.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/maxloc0_8_s1.c : Regenerated.
	* generated/maxloc0_8_s4.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_16_s1.c : Regenerated.
	* generated/maxloc1_16_s4.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_4_s1.c : Regenerated.
	* generated/maxloc1_4_s4.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/maxloc1_8_s1.c : Regenerated.
	* generated/maxloc1_8_s4.c : Regenerated.
	* generated/maxval1_s1.c : Regenerated.
	* generated/maxval1_s4.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_16_s1.c : Regenerated.
	* generated/minloc0_16_s4.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_4_s1.c : Regenerated.
	* generated/minloc0_4_s4.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/minloc0_8_s1.c : Regenerated.
	* generated/minloc0_8_s4.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_16_s1.c : Regenerated.
	* generated/minloc1_16_s4.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_4_s1.c : Regenerated.
	* generated/minloc1_4_s4.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/minloc1_8_s1.c : Regenerated.
	* generated/minloc1_8_s4.c : Regenerated.
	* generated/minval1_s1.c : Regenerated.
	* generated/minval1_s4.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/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/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.

From-SVN: r256323
2018-01-07 14:11:11 +00:00
Janne Blomqvist ea99ec5bd6 PR 78534, 83704 Handle large formatted I/O
In order to handle large characters when doing formatted I/O, use
size_t and ptrdiff_t for lengths.  Compared to the previous patch,
based on discussions on IRC use size_t for sizes that don't need to be
negative rather than ptrdiff_t everywhere.

Regtested on x86_64-pc-linux-gnu, approved as part of the PR 78534
approval, committed to trunk.

libgfortran/ChangeLog:

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

	PR fortran/78534
	PR fortran/83704
	* io/fbuf.c (fbuf_init): Use size_t instead of int for length.
	(fbuf_debug): Convert debug output to unsigned long.
	(fbuf_reset): Use ptrdiff_t for return value.
	(fbuf_alloc): Use size_t for length argument.
	(fbuf_flush): Handle large buffers.
	(fbuf_flush_list): Likewise.
	(fbuf_seek): Use ptrdiff_t for offset and return value.
	(fbuf_read): Use size_t for length argument.
	(fbuf_getc_refill): Use size_t to match fbuf_read.
	* io/fbuf.h (struct fbuf): Use size_t for lengths.
	(fbuf_init): Use size_t instead of int for length.
	(fbuf_reset): Use ptrdiff_t for return value.
	(fbuf_alloc): Use size_t for length argument.
	(fbuf_seek): Use ptrdiff_t for offset and return value.
	(fbuf_read): Use size_t for length argument.
	* io/io.h (read_block_form): Likewise.
	(read_block_form4): Likewise.
	(write_block): Likewise.
	(read_a): Likewise.
	(read_a_char4): Likewise.
	(read_x): Likewise.
	(write_a): Likewise.
	(write_a_char4): Likewise.
	* io/list_read.c (list_formatted_read_scalar): Use size_t to
	handle large buffers.
	* io/read.c (read_l): Likewise.
	(read_utf8): Likewise.
	(read_utf8_char1): Likewise.
	(read_default_char1): Likewise.
	(read_utf8_char4): Likewise.
	(read_default_char4): Likewise.
	(read_a): Likewise.
	(read_a_char4): Likewise.
	(eat_leading_spaces): Likewise.
	(next_char): Likewise.
	(read_decimal): Likewise.
	(read_radix): Likewise.
	(read_f): Likewise.
	(read_x): Likewise.
	* io/transfer.c (read_sf_internal): Likewise.
	(read_sf): Likewise.
	(read_block_form): Likewise.
	(read_block_form4): Likewise.
	(write_block): Likewise.
	(formatted_transfer_scalar_write): Likewise.
	(next_record_w): Likewise.
	* io/unix.c (mem_alloc_r): Likewise.
	(mem_alloc_r4): Likewise.
	(mem_alloc_w): Likewise.
	(mem_alloc_w4): Likewise.
	(mem_read): Likewise.
	(mem_read4): Likewise.
	(mem_write): Likewise.
	(mem_write4): Likewise.
	(open_internal): Likewise.
	(open_internal4): Likewise.
	* io/unix.h (open_internal): Likewise.
	(open_internal4): Likewise.
	(mem_alloc_w): Likewise.
	(mem_alloc_r): Likewise.
	(mem_alloc_w4): Likewise.
	(mem_alloc_r4): Likewise.
	* io/write.c (write_check_cc): Likewise.
	(write_cc): Likewise.
	(write_a): Likewise.
	(write_a_char4): Likewise.

From-SVN: r256322
2018-01-07 12:17:52 +02:00
Janne Blomqvist dd8b1ebf35 Remove unused variable
2018-01-06  Janne Blomqvist  <jb@gcc.gnu.org>

        * io/write.c (namelist_write): Remove unused variable "i".

From-SVN: r256314
2018-01-06 21:16:55 +02:00
Dominique d'Humieres d9bb51cdd3 PR 83704 Use size_t in write_character
For printing long characters, we need to use size_t instead of int in
the argument to write_character.

Regtested on x86_64-pc-linux-gnu, approved in the PR, committed to
trunk.

libgfortran/ChangeLog:

2018-01-06  Dominique d'Humieres  <dominiq@lps.ens.fr>
	    Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/83704
	* io/write.c (write_character): Use size_t instead of int for
	length.

Co-Authored-By: Janne Blomqvist <jb@gcc.gnu.org>

From-SVN: r256313
2018-01-06 21:09:52 +02:00
Janne Blomqvist b081a37642 PR 78534 libgfortran ChangeLog
The libgfortran/ChangeLog entry was accidentally not included in
r256284.

From-SVN: r256311
2018-01-06 12:42:57 +02:00
Janne Blomqvist f622221ab4 PR 78534 Change character length from int to size_t
In order to handle large character lengths on (L)LP64 targets, switch
the GFortran character length from an int to a size_t.

This is an ABI change, as procedures with character arguments take
hidden arguments with the character length.

I also changed the _size member in vtables from int to size_t, as
there were some cases where character lengths and sizes were
apparently mixed up and caused regressions otherwise. Although I
haven't tested, this might enable very large derived types as well.

Also, as there are some places in the frontend were negative character
lengths are used as special flag values, in the frontend the character
length is handled as a signed variable of the same size as a size_t,
although in the runtime library it really is size_t.

I haven't changed the character length variables for the co-array
intrinsics, as this is something that may need to be synchronized with
OpenCoarrays.

This is v5 of the patch. v4 was applied but caused breakage on big
endian targets. These have been fixed and tested, thanks to access to
the GCC compile farm.

Overview of v4 of the patch: v3 was applied but had to reverted due to
breaking bootstrap. The fix is in resolve.c:resolve_charlen, where
it's necessary to check that an expression is constant before using
mpz_sgn.

Overview of v3 of the patch: All the issues pointed out by FX's review
of v2 have been fixed. In particular, there are now new functions
gfc_mpz_get_hwi and gfc_mpz_set_hwi, similar to the GMP functions
mpz_get_si and mpz_set_si, except that they get/set a HOST_WIDE_INT
instead of a long value. Similarly, gfc_get_int_expr now takes a
HOST_WIDE_INT instead of a long, gfc_extract_long is replaced by
gfc_extract_hwi. Also, the preliminary work to handle
gfc_charlen_type_node being unsigned has been removed.

Regtested on x86_64-pc-linux-gnu, i686-pc-linux-gnu and
powerpc64-unknown-linux-gnu. Also regtested all three targets by
modifying gfortran-dg.exp to also test with "-g -flto", no new
failures observed.

frontend:

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

	PR fortran/78534
	PR fortran/66310
	* array.c (got_charlen): Use gfc_charlen_int_kind.
	* class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
	hardcoded kind.
	(find_intrinsic_vtab): Likewise.
	* decl.c (match_char_length): Use gfc_charlen_int_kind.
	(add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
	(gfc_match_implicit): Use gfc_charlen_int_kind.
	* dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
	(show_expr): Use HOST_WIDE_INT_PRINT_DEC.
	* expr.c (gfc_get_character_expr): Length parameter of type
	gfc_charlen_t.
	(gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
	(gfc_extract_hwi): New function.
	(simplify_const_ref): Make string_len of type gfc_charlen_t.
	(gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
	* frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
	* gfortran.h (gfc_mpz_get_hwi): New prototype.
	(gfc_mpz_set_hwi): Likewise.
	(gfc_charlen_t): New typedef.
	(gfc_expr): Use gfc_charlen_t for character lengths.
	(gfc_size_kind): New extern variable.
	(gfc_extract_hwi): New prototype.
	(gfc_get_character_expr): Use gfc_charlen_t for character length.
	(gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
	* gfortran.texi: Update description of hidden string length argument.
	* iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
	(gfc_resolve_char_achar): Likewise.
	(gfc_resolve_repeat): Pass string length directly without
	temporary, use gfc_charlen_int_kind.
	(gfc_resolve_transfer): Use gfc_charlen_int_kind.
	* match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
	* misc.c (gfc_mpz_get_hwi): New function.
	(gfc_mpz_set_hwi): New function.
	* module.c (atom_int): Change type from int to HOST_WIDE_INT.
	(parse_integer): Don't complain about large integers.
	(write_atom): Use HOST_WIDE_INT for integers.
	(mio_integer): Handle integer type mismatch.
	(mio_hwi): New function.
	(mio_intrinsic_op): Use HOST_WIDE_INT.
	(mio_array_ref): Likewise.
	(mio_expr): Likewise.
	* primary.c (match_substring): Use gfc_charlen_int_kind.
	* resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
	(resolve_character_operator): Likewise.
	(resolve_assoc_var): Likewise.
	(resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
	(resolve_charlen): Use mpz_sgn to determine sign.
	* simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
	instead of long.
	* symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
	* target-memory.c (size_character): Length argument of type
	gfc_charlen_t.
	(gfc_encode_character): Likewise.
	(gfc_interpret_character): Use gfc_charlen_t.
	* target-memory.h (gfc_encode_character): Modify prototype.
	* trans-array.c (gfc_trans_array_ctor_element): Use existing type.
	(get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
	(trans_array_constructor): Use existing type.
	(get_array_charlen): Likewise.
	* trans-const.c (gfc_conv_mpz_to_tree_type): New function.
	* trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
	* trans-decl.c (gfc_trans_deferred_vars): Use existing type.
	(add_argument_checking): Likewise.
	* trans-expr.c (gfc_class_len_or_zero_get): Build const of type
	gfc_charlen_type_node.
	(gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
	4, fold_convert to correct type.
	(gfc_conv_class_to_class): Build const of type size_type_node for
	size.
	(gfc_copy_class_to_class): Likewise.
	(gfc_conv_string_length): Use same type in expression.
	(gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
	(gfc_conv_string_tmp): Make sure len is of the right type.
	(gfc_conv_concat_op): Use same type in expression.
	(gfc_conv_procedure_call): Likewise.
	(fill_with_spaces): Comment out memset() block due to spurious
	-Wstringop-overflow warnings.
	(gfc_trans_string_copy): Use gfc_charlen_type_node.
	(alloc_scalar_allocatable_for_subcomponent_assignment):
	fold_convert to right type.
	(gfc_trans_subcomponent_assign): Likewise.
	(trans_class_vptr_len_assignment): Build const of correct type.
	(gfc_trans_pointer_assignment): Likewise.
	(alloc_scalar_allocatable_for_assignment): fold_convert to right
	type in expr.
	(trans_class_assignment): Build const of correct type.
	* trans-intrinsic.c (gfc_conv_associated): Likewise.
	(gfc_conv_intrinsic_repeat): Do calculation in sizetype.
	* trans-io.c (gfc_build_io_library_fndecls): Use
	gfc_charlen_type_node for character lengths.
	(set_string): Convert to right type in assignment.
	* trans-stmt.c (gfc_trans_label_assign): Build const of
	gfc_charlen_type_node.
	(trans_associate_var): Likewise.
	(gfc_trans_character_select): Likewise.
	(gfc_trans_allocate): Likewise, don't typecast strlen result.
	(gfc_trans_deallocate): Don't typecast strlen result.
	* trans-types.c (gfc_size_kind): New variable.
	(gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
	from size_type_node.
	* trans-types.h: Fix comment.

testsuite:

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

	PR fortran/78534
	PR fortran/66310
	* gfortran.dg/char_cast_1.f90: Update scan pattern.
	* gfortran.dg/dependency_49.f90: Likewise.
	* gfortran.dg/repeat_4.f90: Use integers of kind C_SIZE_T.
	* gfortran.dg/repeat_7.f90: New test for PR 66310.
	* gfortran.dg/scan_2.f90: Handle potential cast in assignment.
	* gfortran.dg/string_1.f90: Limit to ilp32 targets.
	* gfortran.dg/string_1_lp64.f90: New test.
	* gfortran.dg/string_3.f90: Limit to ilp32 targets.
	* gfortran.dg/string_3_lp64.f90: New test.

libgfortran:

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

	PR fortran/78534
	* intrinsics/args.c (getarg_i4): Use gfc_charlen_type.
	(get_command_argument_i4): Likewise.
	(get_command_i4): Likewise.
	* intrinsics/chmod.c (chmod_internal): Likewise.
	* intrinsics/env.c (get_environment_variable_i4): Likewise.
	* intrinsics/extends_type_of.c (struct vtype): Use size_t for size
	member.
	* intrinsics/gerror.c (gerror): Use gfc_charlen_type.
	* intrinsics/getlog.c (getlog): Likewise.
	* intrinsics/hostnm.c (hostnm_0): Likewise.
	* intrinsics/string_intrinsics_inc.c (string_len_trim): Rework to
	work if gfc_charlen_type is unsigned.
	(string_scan): Likewise.
	* io/transfer.c (transfer_character): Modify prototype.
	(transfer_character_write): Likewise.
	(transfer_character_wide): Likewise.
	(transfer_character_wide_write): Likewise.
	(transfer_array): Typecast to avoid signed-unsigned comparison.
	* io/unit.c (is_trim_ok): Use gfc_charlen_type.
	* io/write.c (namelist_write): Likewise.
	* libgfortran.h (gfc_charlen_type): Change typedef to size_t.

From-SVN: r256284
2018-01-05 21:01:12 +02:00
Jakub Jelinek 85ec4feb11 Update copyright years.
From-SVN: r256169
2018-01-03 11:03:58 +01:00
Janne Blomqvist 2412750e79 PR libgfortran/83649 Chunk large reads and writes
It turns out that Linux never reads or writes more than 2147479552
bytes in a single syscall. For writes this is not a problem as
libgfortran already contains a loop around write() to handle short
writes. But for reads we cannot do this, since then read will hang if
we have a short read when reading from the terminal.  Also, there are
reports that macOS fails I/O's larger than 2 GB.  Thus, to work around
these issues do large reads/writes in chunks.

The testcase from the PR

program largewr
  integer(kind=1) :: a(2_8**31+1)
  a = 0
  a(size(a, kind=8)) = 1
  open(10, file="largewr.dat", access="stream", form="unformatted")
  write (10) a
  close(10)
  a(size(a, kind=8)) = 2
  open(10, file="largewr.dat", access="stream", form="unformatted")
  read (10) a
  if (a(size(a, kind=8)) == 1) then
    print *, "All is well"
  else
    print *, "Oh no"
  end if
end program largewr

fails on trunk but works with the patch.

Regtested on x86_64-pc-linux-gnu, committed to trunk.

libgfortran/ChangeLog:

2018-01-02  Janne Blomqvist  <jb@gcc.gnu.org>

	PR libgfortran/83649
	* io/unix.c (MAX_CHUNK): New define.
	(raw_read): For reads larger than MAX_CHUNK, loop.
	(raw_write): Write no more than MAX_CHUNK bytes per iteration.

From-SVN: r256074
2018-01-02 15:25:10 +02:00
Jerry DeLisle 46031d7002 re PR libfortran/83613 (Executing gfortran.dg/inquire_internal.f90 hangs on darwin after r255621)
2017-12-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR libgfortran/83613
        * io/unit.c (init_units): Don't forget to unlock the unit locks
        after being inserted.

From-SVN: r256035
2017-12-29 22:36:25 +00:00
Jerry DeLisle a97de3ccdc re PR fortran/83560 (list-directed formatting of INTEGER is missing plus on output when output open with SIGN='PLUS')
2017-12-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR libgfortran/83560
        * io/write.c (write_integer): Modify to use write_decimal.
        For namelist mode, suppress leading blanks and emit them as
        trailing blanks. Change parameter from len to kind for better
        readability. (nml_write_obj): Fix comment style.

From-SVN: r256034
2017-12-29 19:25:31 +00:00
Jerry DeLisle 1eaa31d840 re PR libfortran/81937 (stack-buffer-overflow on memcpy in libgfortran/io/unix.c on character(kind=4))
2017-12-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR libgfortran/81937
        * io/list_read.c (next_char_internal): Don't attempt to read
        from the internal unit stream if no bytes are left. Decrement
        bytes_left in the right place.

From-SVN: r255750
2017-12-16 19:50:42 +00:00
Jerry DeLisle 606778c6f5 re PR libfortran/78549 (Very slow formatted internal file output)
2017-12-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR libgfortran/78549
        * io/inquire.c (inquire_via_unit): Adjust test for existence for
        pre-connected internal units.
        * io/transfer.c (finalize_transfer): When done with a transfer
        to internal units, free the format buffer and close the stream.
        (st_read_done): Delete freeing the stream, now handled using
        sclose in finalize_transfer. (st_write_done): Likewise.
        * io/unit.c (get_unit): Return NULL for special reserved unit
        numbers, signifying not accessible to the user.
        (init_units): Insert the two special internal units into the
        unit treap. This makes these unit structures available without
        further allocations for later use by internal unit I/O. These
        units are automatically deleted by normal program termination.
        * io/unix.c (mem_close): Add a guard check to protect from double free.

From-SVN: r255621
2017-12-14 02:30:49 +00:00
Thomas Koenig 0ac7425470 re PR fortran/36313 ([F03] {MIN,MAX}{LOC,VAL} should accept character arguments)
2017-12-03  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/36313
	* check.c (gfc_check_minval_maxval): Use
	int_orLreal_or_char_check_f2003 for array argument.
	* iresolve.c (gfc_resolve_maxval): Insert number in
	function name for character arguments.
	(gfc_resolve_minval): Likewise.
	* trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc):
	Fix comment.
	(gfc_conv_intrinsic_minmaxval): Resort arguments and call library
	function if dealing with a character function.

2017-12-03  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/36313
	* Makefile.am: Add new files for character-valued
	maxval and minval.
	* Makefile.in: Regenerated.
	* gfortran.map: Add new functions.
	* m4/iforeach-s2.m4: New file.
	* m4/ifunction-s2.m4: New file.
	* m4/iparm.m4: Add intitval for minval and maxval.
	* m4/maxval0s.m4: New file.
	* m4/maxval1s.m4: New file.
	* m4/minval0s.m4: New file.
	* m4/minval1s.m4: New file.
        * generated/maxval0_s1.c: New file.
        * generated/maxval0_s4.c: New file.
        * generated/maxval1_s1.c: New file.
        * generated/maxval1_s4.c: New file.
        * generated/minval0_s1.c: New file.
        * generated/minval0_s4.c: New file.
        * generated/minval1_s1.c: New file.
        * generated/minval1_s4.c: New file.

2017-12-03  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/36313
	* gfortran.dg/maxval_char_1.f90: New test.
	* gfortran.dg/maxval_char_2.f90: New test.
	* gfortran.dg/maxval_char_3.f90: New test.
	* gfortran.dg/maxval_char_4.f90: New test.
	* gfortran.dg/minval_char_1.f90: New test.
	* gfortran.dg/minval_char_2.f90: New test.
	* gfortran.dg/minval_char_3.f90: New test.
	* gfortran.dg/minval_char_4.f90: New test.

From-SVN: r255367
2017-12-03 20:14:05 +00:00
Jerry DeLisle af5ad1e2e5 Fix typo in ChangeLog.
From-SVN: r255366
2017-12-03 16:49:37 +00:00
Jerry DeLisle c4508d0ad7 re PR fortran/83191 (Writing a namelist with repeated complex numbers)
2017-12-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
            Dominique d'Humieres  <dominiq@lps.ens.fr>

        PR libgfortran/83191
        * io/transfer.c (list_formatted_read_scalar): Do not set
        namelist_mode bit here. (namelist_read): Likewise.
        (data_transfer_init): Clear the mode bit here.
        (finalize_transfer): Do set the mode bit just before any calls
        to namelist_read or namelist_write. It can now be referred to
        in complex_write.
        ^ io/write.c (write_complex): Suppress the leading blanks when
        namelist_mode bit is not set to 1.

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

Co-Authored-By: Dominique d'Humieres <dominiq@lps.ens.fr>

From-SVN: r255365
2017-12-03 16:47:12 +00:00
Jerry DeLisle 7c73128157 Fix spelling error in log.
From-SVN: r255363
2017-12-03 04:42:09 +00:00
Jerry DeLisle 7b39e3c24f re PR fortran/83225 (runtime error in transfer.c)
2017-12-02  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/83225
	* io/io.h (is_internal_unit): Use the unit_is_internal bit.
	* io/transfer.c (data_transfer_init): Set the bit to true for
	internal umits. Use that bit for checks for internal unit
	initializations.
	* io/unit.c (insert_unit): As a precaution, set the
	internal_unit_kind to zero when a unit structure is first created.

From-SVN: r255362
2017-12-03 03:26:09 +00:00
Janne Blomqvist 8801187868 fix merge conflict in libgfortran/ChangeLog
From-SVN: r255227
2017-11-29 11:01:49 +02:00
Jerry DeLisle b7c44c8fd2 re PR libfortran/83168 (FAIL: gfortran.dg/fmt_f0_2.f90 with a sanitized libgfortran)
2017-11-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/83168
	* io/write.c (select_string): Bump size by one to avoid
	overrun.

From-SVN: r255225
2017-11-29 03:07:43 +00:00
Janne Blomqvist 67c24a8bd6 PR 53796 Improve INQUIRE(RECL=...) handling
The current F2018 draft (N2137) specifies behavior of the RECL=
specifier in the INQUIRE statement, where it previously was left as
undefined. Namely:

- If the unit is not connected, RECL= should be given the value -1.
- If the unit is connected with stream access, RECL= should be given
  the value -2.

Further, as PR 53796 describes, the handling of RECL= is poor in other
ways as well. When the recl is set to the maximum possible
(GFC_INTEGER_8_HUGE / LLONG_MAX), which it does by default except for
preconnected units, and when INQUIRE(RECL=) is used with a 4 byte
integer, the value is truncated and the 4 byte value is thus
-1. Fixing this to generate an error is a lot of work, as currently
the truncation is done by the frontend, the library sees only an 8
byte value with no indication that the frontend is going to copy it to
a 4 byte one. Instead, this patch does a bit twiddling trick such that
the truncated 4 byte value is GFC_INTEGER_4_HUGE while still being
0.99999999 * GFC_INTEGER_8_HUGE which is large enough for all
practical purposes.

Finally, the patch removes GFORTRAN_DEFAULT_RECL which was used only
for preconnected units, and instead uses the same approach as describe
above.

Regtested on x86_64-pc-linux-gnu, Ok for trunk.

gcc/fortran/ChangeLog:

2017-11-28  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/53796
	* gfortran.texi: Remove mentions of GFORTRAN_DEFAULT_RECL.

libgfortran/ChangeLog:

2017-11-28  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/53796
	* io/inquire.c (inquire_via_unit): Set recl to -1 for unconnected
	units.
	* io/io.h (default_recl): New variable.
	* io/open.c (new_unit): Set recl to default_recl for sequential,
	-2 for stream access.
	* io/transfer.c (read_block_form): Test against default_recl
	instead of DEFAULT_RECL.
	(write_block): Likewise.
	* io/unit.c (init_units): Calculate max_offset, default_recl.
	* libgfortran.h (DEFAULT_RECL): Remove.
	* runtime/environ.c: Remove GFORTRAN_DEFAULT_RECL.

gcc/testsuite/ChangeLog:

2017-11-28  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/53796
	* gfortran.dg/inquire_recl_f2018.f90: New test.

From-SVN: r255215
2017-11-28 21:28:50 +02:00
Janne Blomqvist 4dae9c641b Whitespace fix for libgfortran/ChangeLog
From-SVN: r255137
2017-11-24 11:57:52 +02:00
Janne Blomqvist 97e1c8786b PR 36313 Replace int with gfc_charlen_type, take 3
Still some prototypes that didn't match the implementation.

2017-11-24  Janne Blomqvist  <jb@gcc.gnu.org>
        PR fortran/36313
        * m4/maxloc2s.m4: Replace int with gfc_charlen_type, take 3.
        * m4/minloc2s.m4: Likewise.
        * generated/maxloc2_16_s1.c: Regenerated.
        * generated/maxloc2_16_s4.c: Regenerated.
        * generated/maxloc2_4_s1.c: Regenerated.
        * generated/maxloc2_4_s4.c: Regenerated.
        * generated/maxloc2_8_s1.c: Regenerated.
        * generated/maxloc2_8_s4.c: Regenerated.
        * generated/minloc2_16_s1.c: Regenerated.
        * generated/minloc2_16_s4.c: Regenerated.
        * generated/minloc2_4_s1.c: Regenerated.
        * generated/minloc2_4_s4.c: Regenerated.
        * generated/minloc2_8_s1.c: Regenerated.
        * generated/minloc2_8_s4.c: Regenerated.

From-SVN: r255135
2017-11-24 10:51:15 +02:00
Thomas Koenig 207180e159 re PR fortran/36313 ([F03] {MIN,MAX}{LOC,VAL} should accept character arguments)
2017-11-23  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/36313
	* m4/maxloc2s.m4: Replace int for character length by
	gfc_charlen_type.
	* m4/minloc2s.m4: Likewise.
	* generated./maxloc2_16_s1.c: Regenerated.
	* generated./maxloc2_16_s4.c: Regenerated.
	* generated./maxloc2_4_s1.c: Regenerated.
	* generated./maxloc2_4_s4.c: Regenerated.
	* generated./maxloc2_8_s1.c: Regenerated.
	* generated./maxloc2_8_s4.c: Regenerated.
	* generated./minloc2_16_s1.c: Regenerated.
	* generated./minloc2_16_s4.c: Regenerated.
	* generated./minloc2_4_s1.c: Regenerated.
	* generated./minloc2_4_s4.c: Regenerated.
	* generated./minloc2_8_s1.c: Regenerated.
	* generated./minloc2_8_s4.c: Regenerated.

From-SVN: r255109
2017-11-23 17:52:05 +00:00
Janne Blomqvist a97ae55991 Make shift argument to eoshift0 and eoshift2 be of type index_type
Test case that requires 4 GB RAM that exercises eoshift0:

program main
  implicit none
  integer(1) :: line(2_8**31+10)
  line = 42
  line = eoshift(line, 2_8**31+7)
  print *, line(1:4)
  print *, line((ubound(line, 1, kind=8)-4):ubound(line, 1, kind=8))
end program main

Before patch:
❯ ./a.out
    0    0    0    0
    42   42   42   42   42

With patch:
❯ ./a.out
   42   42   42    0
   0    0    0    0    0

Regtested on x86_64-pc-linux-gnu.

libgfortran/ChangeLog:

2017-11-22  Janne Blomqvist  <jb@gcc.gnu.org>

        * intrinsics/eoshift0.c (eoshift0): Make shift an index_type.
        * intrinsics/eoshift2.c (eoshift2): Make shift an index_type.

From-SVN: r255077
2017-11-22 22:42:39 +02:00
Janne Blomqvist 5675291ddb PR 83097 Use __BYTE_ORDER__ predefined macro instead of runtime check
By using the __BYTE_ORDER__ predefined macro we don't need the
determine_endianness function anymore.

Regtested on x86_64-pc-linux-gnu.

libgfortran/ChangeLog:

2017-11-22  Janne Blomqvist  <jb@gcc.gnu.org>

        PR libfortran/83097
	* io/inquire.c (inquire_via_unit): Use __BYTE_ORDER__ predefined
	macro.
	* io/open.c (st_open): Likewise.
	* io/transfer.c (data_transfer_init): Likewise.
	* io/write.c (btoa_big): Likewise.
	(otoa_big): Likewise.
	(ztoa_big): Likewise.
	* libgfortran.h (big_endian): Remove variable.
	(GFOR_POINTER_TO_L1): Use __BYTE_ORDER__ macro.
	* runtime/main.c (determine_endianness): Remove function.
	(init): Remove call to determine_endianness.
	* runtime/minimal.c: Remove setting big_endian variable.

From-SVN: r255072
2017-11-22 21:19:13 +02:00
Thomas Koenig ddc9995b13 re PR fortran/36313 ([F03] {MIN,MAX}{LOC,VAL} should accept character arguments)
2017-11-22  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/36313
	* Makefile.am: Add i_maxloc0s_c, i_maxloc1s_c, i_maxloc2s_c,
	i_minloc0s_c, i_minloc1s_c and i_minloc2s_c.
	* Makefile.in: Regenerated.
        * generated/maxloc0_16_s1.c: New file.
        * generated/maxloc0_16_s4.c: New file.
        * generated/maxloc0_4_s1.c: New file.
        * generated/maxloc0_4_s4.c: New file.
        * generated/maxloc0_8_s1.c: New file.
        * generated/maxloc0_8_s4.c: New file.
        * generated/maxloc1_16_s1.c: New file.
        * generated/maxloc1_16_s4.c: New file.
        * generated/maxloc1_4_s1.c: New file.
        * generated/maxloc1_4_s4.c: New file.
        * generated/maxloc1_8_s1.c: New file.
        * generated/maxloc1_8_s4.c: New file.
        * generated/maxloc2_16_s1.c: New file.
        * generated/maxloc2_16_s4.c: New file.
        * generated/maxloc2_4_s1.c: New file.
        * generated/maxloc2_4_s4.c: New file.
        * generated/maxloc2_8_s1.c: New file.
        * generated/maxloc2_8_s4.c: New file.
        * generated/minloc0_16_s1.c: New file.
        * generated/minloc0_16_s4.c: New file.
        * generated/minloc0_4_s1.c: New file.
        * generated/minloc0_4_s4.c: New file.
        * generated/minloc0_8_s1.c: New file.
        * generated/minloc0_8_s4.c: New file.
        * generated/minloc1_16_s1.c: New file.
        * generated/minloc1_16_s4.c: New file.
        * generated/minloc1_4_s1.c: New file.
        * generated/minloc1_4_s4.c: New file.
        * generated/minloc1_8_s1.c: New file.
        * generated/minloc1_8_s4.c: New file.
        * generated/minloc2_16_s1.c: New file.
        * generated/minloc2_16_s4.c: New file.
        * generated/minloc2_4_s1.c: New file.
        * generated/minloc2_4_s4.c: New file.
        * generated/minloc2_8_s1.c: New file.
        * generated/minloc2_8_s4.c: New file.
        * m4/iforeach-s.m4: New file.
        * m4/ifunction-s.m4: New file.
        * m4/maxloc0s.m4: New file.
        * m4/maxloc1s.m4: New file.
        * m4/maxloc2s.m4: New file.
        * m4/minloc0s.m4: New file.
        * m4/minloc1s.m4: New file.
        * m4/minloc2s.m4: New file.
	* gfortran.map: Add new functions.
	* libgfortran.h: Add gfc_array_s1 and gfc_array_s4.

2017-11-22  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/36313
	* check.c (int_or_real_or_char_check_f2003): New function.
	* iresolve.c (gfc_resolve_maxloc): Add number "2" for
	character arguments and rank-zero return value.
	(gfc_resolve_minloc): Likewise.
	* trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Handle case of
	character arguments and rank-zero return value by removing
	unneeded arguments and calling the library function.

2017-11-22  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/36313
	* gfortran.dg/maxloc_string_1.f90: New test.
	* gfortran.dg/minloc_string_1.f90: New test.

From-SVN: r255070
2017-11-22 18:08:07 +00:00
Janne Blomqvist 9cf7bfd919 PR 83070 Fix -Wsign-compare warning
2017-11-22  Janne Blomqvist  <jb@gcc.gnu.org>

        PR libfortran/83070
        * intrinsics/eoshift0.c (eoshift0): Fix -Wsign-compare warning by
        making a_ex and r_ex index_type instead of size_t.

From-SVN: r255045
2017-11-22 10:51:21 +02:00
Jerry DeLisle 8c09856788 re PR libfortran/78549 (Very slow formatted internal file output)
2017-11-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/78549
	* io/io.h (newunit_free): Add declaration. Clean some whitespace.
	* io/transfer.c (st_read_done, st_write_done): Call newunit_free.
	* io/unit.c (newunit_free): Change type from static void to void.

From-SVN: r254982
2017-11-21 02:17:11 +00:00
Janne Blomqvist 2563a16d3c PR 44292 Handle large record lengths
Now that the ABI supports large record lengths, there's a few places
in libgfortran where we need to use larger types. For internal units
which by definition are in-memory, it's enought to use ptrdiff_t, for
external units gfc_offset.

Regtested on x86_64-pc-linux-gnu?

libgfortran/ChangeLog:

2017-11-19  Janne Blomqvist  <jb@gcc.gnu.org>

        PR fortran/44292
	* io/transfer.c (skip_record): Use gfc_offset to handle large
	records.
	(next_record_r): Likewise.
	(sset): Likewise.
	(next_record_w): Use gfc_offset/ptrdiff_t appropriately.

From-SVN: r254918
2017-11-19 00:05:13 +02:00
Janne Blomqvist a7037861a7 PR 83036 Make NEXTREC specifier for INQUIRE work for large record numbers
This is accomplished by making the NEXTREC specifier be a 8 byte
integer where supported.

I wasn't able to come up with a testcase that does not create a large
file that could be added to the testsuite, but here's one which
creates a 2 GB file:

program nextrec
  implicit none
  integer(8) :: ii, n
  open(10, file="foo.dat", recl=1, access="direct", form="unformatted", &
       status="replace")
  do ii = 1, huge(1) + 2_8
     write(10, rec=ii) 'a'
  end do
  inquire(10, nextrec=n)
  if (n /= huge(1) + 3_8) then
     call abort()
  end if
  close(10, status="delete")
end program nextrec

Regtested on x86_64-pc-linux-gnu.

gcc/fortran/ChangeLog:

2017-11-18  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/83036
	* ioparm.def (IOPARM): Make nextrec a pintio.

libgfortran/ChangeLog:

2017-11-18  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/83036
	* io/io.h: Make nextrec a GFC_IO_INT*.
---
 gcc/fortran/ioparm.def | 2 +-
 libgfortran/io/io.h    | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/gcc/fortran/ioparm.def b/gcc/fortran/ioparm.def
index 5fc04bc..59cc7cd 100644
--- a/gcc/fortran/ioparm.def
+++ b/gcc/fortran/ioparm.def
@@ -62,7 +62,7 @@ IOPARM (inquire, exist,		1 << 7,  pint4)
 IOPARM (inquire, opened,	1 << 8,  pint4)
 IOPARM (inquire, number,	1 << 9,  pint4)
 IOPARM (inquire, named,		1 << 10, pint4)
-IOPARM (inquire, nextrec,	1 << 11, pint4)
+IOPARM (inquire, nextrec,	1 << 11, pintio)
 IOPARM (inquire, recl_out,	1 << 12, pintio)
 IOPARM (inquire, strm_pos_out,	1 << 13, pintio)
 IOPARM (inquire, file,		1 << 14, char1)
diff --git a/libgfortran/io/io.h b/libgfortran/io/io.h
index 3330bce..d29b112 100644
--- a/libgfortran/io/io.h
+++ b/libgfortran/io/io.h
@@ -388,8 +388,7 @@ typedef struct
 {
   st_parameter_common common;
   GFC_INTEGER_4 *exist, *opened, *number, *named;
-  GFC_INTEGER_4 *nextrec;
-  GFC_IO_INT  *recl_out, *strm_pos_out;
+  GFC_IO_INT *nextrec, *recl_out, *strm_pos_out;
   CHARACTER1 (file);
   CHARACTER2 (access);
   CHARACTER1 (form);
-- 
2.7.4

From-SVN: r254916
2017-11-18 18:56:21 +02:00
Janne Blomqvist 831cf09d60 PR 44292 Enable large record lengths in OPEN and INQUIRE statements
This is a straightforward change that we can do now that the ABI has
been bumped (again!).

Regtested on x86_64-pc-linux-gnu.

gcc/fortran/ChangeLog:

2017-11-18  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/44292
	* ioparm.def (IOPARM): Make recl_in intio, and recl_out pintio.

libgfortran/ChangeLog:

2017-11-18  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/44292
	* io/io.h: Make recl_in a GC_IO_INT and recl_out a type
	GFC_IO_INT*.

gcc/testsuite/ChangeLog:

2017-11-18  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/44292
	* gfortran.dg/large_recl.f90: New test.

From-SVN: r254915
2017-11-18 18:13:20 +02:00
Igor Tsimbalist 26724ef992 Enable building libgfortran with Intel CET
libgfortran/
	* acinclude.m4: Add enable.m4, cet.m4.
	* Makefile.in: Regenerate.
	* configure: Likewise.
	* configure.ac: Set CET_FLAGS. Update AM_FCFLAGS,
	AM_CFLAGS, CFLAGS.

From-SVN: r254902
2017-11-17 23:44:59 +01:00
Jerry DeLisle 730de5a59e re PR libfortran/81938 (valgrind error message and heap-buffer-overflow on address sanitized libgfortran.so)
2017-10-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
	    Rimvydas (RJ)

	PR libgfortran/81938
	io/format.c (free_format_data): Don't try to free vlist
	descriptors past the end of the fnode array.

From-SVN: r254163
2017-10-27 17:50:22 +00:00
Thomas Koenig 3934b625ee re PR libfortran/82233 (execute_command_line causes program to stop when command fails (or does not exist))
2017-10-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/82233
	* intrinsics/execute_command_line.c (execute_command_line):
	No call to runtime_error if cmdstat is present.

2017-10-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/82233
	* gfortran.dg/execute_command_line_3.f90: New test.

From-SVN: r253593
2017-10-10 16:49:32 +00:00
Dominique d'Humieres 02fdb1306c +2017-09-24 Dominique d'Humieres <dominiq@lps.ens.fr>
PR libgfortran/79612
	* runtime/bounds.c: Use GFC_ASSERT.

From-SVN: r253124
2017-09-24 15:47:11 +02:00
Paul Thomas ff3598bc73 re PR fortran/34640 (ICE when assigning item of a derived-component to a pointer)
2017-09-10  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/34640
	PR fortran/40737
	PR fortran/55763
	PR fortran/57019
	PR fortran/57116

	* expr.c (is_subref_array): Add class pointer array dummies
	to the list of expressions that return true.
	* trans-array.c: Add SPAN_FIELD and update indices for
	subsequent fields.
	(gfc_conv_descriptor_span, gfc_conv_descriptor_span_get,
	gfc_conv_descriptor_span_set, is_pointer_array,
	get_array_span): New functions.
	(gfc_get_descriptor_offsets_for_info): New function to preserve
	API for access to descriptor fields for trans-types.c.
	(gfc_conv_scalarized_array_ref): If the expression is a subref
	array, make sure that info->descriptor is a descriptor type.
	Otherwise, if info->descriptor is a pointer array, set 'decl'
	and fix it if it is a component reference.
	(build_array_ref): Simplify handling of class array refs by
	passing the vptr to gfc_build_array_ref rather than generating
	the pointer arithmetic in this function.
	(gfc_conv_array_ref): As in gfc_conv_scalarized_array_ref, set
	'decl'.
	(gfc_array_allocate): Set the span field if this is a pointer
	array. Use the expr3 element size if it is available, so that
	the dynamic type element size is used.
	(gfc_conv_expr_descriptor): Set the span field for pointer
	assignments.
	* trans-array.h: Prototypes for gfc_conv_descriptor_span_get
	gfc_conv_descriptor_span_set and
	gfc_get_descriptor_offsets_for_info added.
	trans-decl.c (gfc_get_symbol_decl): If a non-class pointer
	array, mark the declaration as a GFC_DECL_PTR_ARRAY_P. Remove
	the setting of GFC_DECL_SPAN.
	(gfc_trans_deferred_vars): Set the span field to zero in thge
	originating scope.
	* trans-expr.c (gfc_conv_procedure_call): Do not use copy-in/
	copy-out to pass subref expressions to a pointer dummy.
	(gfc_trans_pointer_assignment): Remove code for setting of
	GFC_DECL_SPAN. Set the 'span' field for non-class pointers to
	class function results. Likewise for rank remap. In the case
	that the target is not a whole array, use the target array ref
	for remap and, since the 'start' indices are missing, set the
	lbounds to one, as required by the standard.
	* trans-intrinsic.c (conv_expr_ref_to_caf_ref): Pick up the
	'token' offset from the field decl in the descriptor.
	(conv_isocbinding_subroutine): Set the 'span' field.
	* trans-io.c (gfc_trans_transfer): Always scalarize pointer
	array io.
	* trans-stmt.c (trans_associate_var): Set the 'span' field.
	* trans-types.c (gfc_get_array_descriptor_base): Add the 'span'
	field to the array descriptor.
	(gfc_get_derived_type): Pointer array components are marked as
	GFC_DECL_PTR_ARRAY_P.
	(gfc_get_array_descr_info): Replaced API breaking code for
	descriptor offset calling gfc_get_descriptor_offsets_for_info.
	* trans.c (get_array_span): New function.
	(gfc_build_array_ref): Simplify by calling get_array_span and
	obtain 'span' if 'decl' or 'vptr' present.
	* trans.h : Rename DECL_LANG_FLAG_6, GFC_DECL_SUBREF_ARRAY_P,
	as GFC_DECL_PTR_ARRAY_P.


2017-09-10  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/34640
	* gfortran.dg/associate_24.f90: New test.
	* gfortran.dg/assumed_type_2.f90: Adjust some of the tree dump
	checks.
	* gfortran.dg/no_arg_check_2.f90: Likewise.
	* gfortran.dg/pointer_array_1.f90: New test.
	* gfortran.dg/pointer_array_2.f90: New test.
	* gfortran.dg/pointer_array_7.f90: New test.
	* gfortran.dg/pointer_array_8.f90: New test.
	* gfortran.dg/pointer_array_component_1.f90: New test.
	* gfortran.dg/pointer_array_component_2.f90: New test.
	* gfortran.dg/goacc/kernels-alias-4.f95: Bump up both tree scan
	counts by 1.

	PR fortran/40737
	* gfortran.dg/pointer_array_3.f90: New test.

	PR fortran/57116
	* gfortran.dg/pointer_array_4.f90: New test.

	PR fortran/55763
	* gfortran.dg/pointer_array_5.f90: New test.

	PR fortran/57019
	* gfortran.dg/pointer_array_6.f90: New test.

2017-09-10  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/34640
	* libgfortran/libgfortran.h: Add span field to descriptor.
	* libgfortran/libtool-version : Bump up version number to 5:0:0.

From-SVN: r251949
2017-09-10 17:02:53 +00:00
Jerry DeLisle bf498b0758 re PR fortran/78387 (OpenMP segfault/stack size exceeded writing to internal file)
2017-08-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/78387
	* io/list_read.c (nml_read_obj): Remove use of stash.
	* io/transfer.c (st_read_done, st_write_done): Likewise.
	* io/unit.c (stash_internal_unit): Delete function.
	(get_unit): Remove use of stash.
	(init_units): Likewise.
	(close_units): Likewise.
	* io/write.c (nml_write_obj): Likewise:

From-SVN: r251374
2017-08-28 03:42:47 +00:00
Thomas Koenig cfdf6ff61b re PR fortran/81581 (runtime checks for DIM argument of intrinsic SUM missing)
2017-07-31  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/81581
	* m4/ifuntion.m4 (name`'rtype_qual`_'atype_code): Perform check
	for dim.
	(`m'name`'rtype_qual`_'atype_code): Likewise. Change type of rank
	and tim to index_type.
	(`s'name`'rtype_qual`_'atype_code): Perform check for dim.
	* generated/iall_i16.c: Regenerated.
	* generated/iall_i1.c: Regenerated.
	* generated/iall_i2.c: Regenerated.
	* generated/iall_i4.c: Regenerated.
	* generated/iall_i8.c: Regenerated.
	* generated/iany_i16.c: Regenerated.
	* generated/iany_i1.c: Regenerated.
	* generated/iany_i2.c: Regenerated.
	* generated/iany_i4.c: Regenerated.
	* generated/iany_i8.c: Regenerated.
	* generated/iparity_i16.c: Regenerated.
	* generated/iparity_i1.c: Regenerated.
	* generated/iparity_i2.c: Regenerated.
	* generated/iparity_i4.c: Regenerated.
	* generated/iparity_i8.c: Regenerated.
	* generated/maxloc1_16_i16.c: Regenerated.
	* generated/maxloc1_16_i1.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_i16.c: Regenerated.
	* generated/maxloc1_4_i1.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_i16.c: Regenerated.
	* generated/maxloc1_8_i1.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_i16.c: Regenerated.
	* generated/maxval_i1.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/minloc1_16_i16.c: Regenerated.
	* generated/minloc1_16_i1.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_i16.c: Regenerated.
	* generated/minloc1_4_i1.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_i16.c: Regenerated.
	* generated/minloc1_8_i1.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_i16.c: Regenerated.
	* generated/minval_i1.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/parity_l16.c: Regenerated.
	* generated/parity_l1.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_i16.c: Regenerated.
	* generated/product_i1.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_i16.c: Regenerated.
	* generated/sum_i1.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.

2017-07-31  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/81581
	* gfortran.dg/dim_sum_1.f90: New test case.
	* gfortran.dg/dim_sum_2.f90: New test case.
	* gfortran.dg/dim_sum_3.f90: New test case.

From-SVN: r250735
2017-07-31 09:34:36 +00:00
Thomas Koenig e678ce869e ChangeLog: Fix typo in date and ommitted PR number.
2017-07-24  Thomas Koenig  <tkoenig@gcc.gnu.org>

	* ChangeLog: Fix typo in date and ommitted PR number.

From-SVN: r250474
2017-07-24 10:48:57 +00:00
Thomas Koenig ff9a87509d unix.c (buf_write): Return early if there is nothing to write.
2017-07-24  Thomas Koenig  <tkoenig@gcc.gnu.org>

	* io/unix.c (buf_write):  Return early if there is
	nothing to write.

From-SVN: r250473
2017-07-24 10:42:23 +00:00
Thomas Koenig ba71a2a62c eoshift2.c (eoshift2): Use memcpy for innermost copy where possible.
2017-06-09  Thomas Koenig  <tkoenig@gcc.gnu.org>

	* intrinsics/eoshift2.c (eoshift2):  Use memcpy
	for innermost copy where possible.
	* m4/eoshift1.m4 (eoshift1): Likewise.
	* m4/eoshift3.m4 (eoshift3): Likewise.
	* 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.

2017-06-09  Thomas Koenig  <tkoenig@gcc.gnu.org>

	* gfortran.dg/eoshift_4.f90:  New test.
	* gfortran.dg/eoshift_5.f90:  New test.
	* gfortran.dg/eoshift_6.f90:  New test.

From-SVN: r250085
2017-07-09 19:09:33 +00:00
Thomas Koenig b677e2f67f eoshift0.c: For contiguous arrays, use block algorithm.
2017-07-02  Thomas Koenig  <tkoenig@gcc.gnu.org>

	* intrinsics/eoshift0.c:  For contiguous arrays, use
	block algorithm.  Use memcpy where possible.

2017-07-02  Thomas Koenig  <tkoenig@gcc.gnu.org>

	* gfortran/eoshift_3.f90:  New test.

From-SVN: r249882
2017-07-02 12:34:52 +00:00
Jim Wilson b971fa7f33 Fix for SPEC CPU2017 621.wrf_s failure, add missing locking code.
libgfortran/
	PR libfortran/81195
	* io/unit.c (get_unit): Call __gthread_mutex_lock before newunit_stack
	and newunit_tos references.  Call __gthread_mutex_unlock afterward.

From-SVN: r249667
2017-06-26 14:40:47 -07:00
Thomas Koenig e56e3fda60 re PR fortran/52473 (CSHIFT slow - inline it?)
2017-06-24  Thomas Koenig  <tkoenig@gcc.gnu.org>

        PR fortran/52473
	* Makefile.am:  Add i_cshift1a_c.  Add rules to generate files
	from cshift1a.m4.
	* Makefile.in: Regenerated.
	* m4/cshift1a.m4: New file.
	* m4/cshift.m4 (cshift1): Split up inner loop by removing
	condition. Use memcpy where possible.  Call helper functions
	based on dtype.
	* libgfortran.h: Add prototypes for cshift1_16_c10,
	cshift1_16_c16, cshift1_16_c4, cshift1_16_c8, cshift1_16_i1,
	cshift1_16_i16, cshift1_16_i2, cshift1_16_i4, cshift1_16_i8,
	cshift1_16_r10, cshift1_16_r16, cshift1_16_r4, cshift1_16_r8,
	cshift1_4_c10, cshift1_4_c16, cshift1_4_c4, cshift1_4_c8,
	cshift1_4_i1, cshift1_4_i16, cshift1_4_i2, cshift1_4_i4,
	cshift1_4_i8, cshift1_4_r10, cshift1_4_r16, cshift1_4_r4,
	cshift1_4_r8, cshift1_8_c10, cshift1_8_c16, cshift1_8_c4,
	cshift1_8_c8, cshift1_8_i1, cshift1_8_i16, cshift1_8_i2,
	cshift1_8_i4, cshift1_8_i8, cshift1_8_r10, cshift1_8_r16,
	cshift1_8_r4 and cshift1_8_r8.
	* generated/cshift1_16_c10.c: New file, generated from cshift1a.m4.
	* generated/cshift1_16_c16.c: New file, generated from cshift1a.m4.
	* generated/cshift1_16_c4.c: New file, generated from cshift1a.m4.
	* generated/cshift1_16_c8.c: New file, generated from cshift1a.m4.
	* generated/cshift1_16_i1.c: New file, generated from cshift1a.m4.
	* generated/cshift1_16_i16.c: New file, generated from cshift1a.m4.
	* generated/cshift1_16_i2.c: New file, generated from cshift1a.m4.
	* generated/cshift1_16_i4.c: New file, generated from cshift1a.m4.
	* generated/cshift1_16_i8.c: New file, generated from cshift1a.m4.
	* generated/cshift1_16_r10.c: New file, generated from cshift1a.m4.
	* generated/cshift1_16_r16.c: New file, generated from cshift1a.m4.
	* generated/cshift1_16_r4.c: New file, generated from cshift1a.m4.
	* generated/cshift1_16_r8.c: New file, generated from cshift1a.m4.
	* generated/cshift1_4_c10.c: New file, generated from cshift1a.m4.
	* generated/cshift1_4_c16.c: New file, generated from cshift1a.m4.
	* generated/cshift1_4_c4.c: New file, generated from cshift1a.m4.
	* generated/cshift1_4_c8.c: New file, generated from cshift1a.m4.
	* generated/cshift1_4_i1.c: New file, generated from cshift1a.m4.
	* generated/cshift1_4_i16.c: New file, generated from cshift1a.m4.
	* generated/cshift1_4_i2.c: New file, generated from cshift1a.m4.
	* generated/cshift1_4_i4.c: New file, generated from cshift1a.m4.
	* generated/cshift1_4_i8.c: New file, generated from cshift1a.m4.
	* generated/cshift1_4_r10.c: New file, generated from cshift1a.m4.
	* generated/cshift1_4_r16.c: New file, generated from cshift1a.m4.
	* generated/cshift1_4_r4.c: New file, generated from cshift1a.m4.
	* generated/cshift1_4_r8.c: New file, generated from cshift1a.m4.
	* generated/cshift1_8_c10.c: New file, generated from cshift1a.m4.
	* generated/cshift1_8_c16.c: New file, generated from cshift1a.m4.
	* generated/cshift1_8_c4.c: New file, generated from cshift1a.m4.
	* generated/cshift1_8_c8.c: New file, generated from cshift1a.m4.
	* generated/cshift1_8_i1.c: New file, generated from cshift1a.m4.
	* generated/cshift1_8_i16.c: New file, generated from cshift1a.m4.
	* generated/cshift1_8_i2.c: New file, generated from cshift1a.m4.
	* generated/cshift1_8_i4.c: New file, generated from cshift1a.m4.
	* generated/cshift1_8_i8.c: New file, generated from cshift1a.m4.
	* generated/cshift1_8_r10.c: New file, generated from cshift1a.m4.
	* generated/cshift1_8_r16.c: New file, generated from cshift1a.m4.
	* generated/cshift1_8_r4.c: New file, generated from cshift1a.m4.
	* generated/cshift1_8_r8.c: New file, generated from cshift1a.m4.

2017-06-24  Thomas Koenig  <tkoenig@gcc.gnu.org>

        PR fortran/52473
	* gfortran.dg/cshift_2.f90:  New test.

From-SVN: r249620
2017-06-24 07:07:56 +00:00
Thomas Koenig 5dace4bf90 re PR fortran/52473 (CSHIFT slow - inline it?)
2017-06-18  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/52473
	* m4/cshift0.m4:  For arrays that are contiguous up to
	shift, implement blocked algorighm for cshift.
	* 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.

2017-06-18  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/52473
	* gfortran.dg/cshift_1.f90:  New test.

From-SVN: r249350
2017-06-18 18:04:19 +00:00
Thomas Koenig bbf9741600 re PR fortran/80975 (matmul for zero-length arrays)
2017-06-06  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/80975
	* m4/matmul_internal.m4:  Move zeroing before early return.
	* 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_r10.c: Regenerated.
	* generated/matmul_r16.c: Regenerated.
	* generated/matmul_r4.c: Regenerated.
	* generated/matmul_r8.c: Regenerated.
	* generated/matmulavx128_c10.c: Regenerated.
	* generated/matmulavx128_c16.c: Regenerated.
	* generated/matmulavx128_c4.c: Regenerated.
	* generated/matmulavx128_c8.c: Regenerated.
	* generated/matmulavx128_i1.c: Regenerated.
	* generated/matmulavx128_i16.c: Regenerated.
	* generated/matmulavx128_i2.c: Regenerated.
	* generated/matmulavx128_i4.c: Regenerated.
	* generated/matmulavx128_i8.c: Regenerated.
	* generated/matmulavx128_r10.c: Regenerated.
	* generated/matmulavx128_r16.c: Regenerated.
	* generated/matmulavx128_r4.c: Regenerated.
	* generated/matmulavx128_r8.c: Regenerated.

2017-06-06  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/80975
	* gfortran.dg/matmul_16.f90: New test.
	* gfortran.dg/inline_matmul_18.f90: New test.

From-SVN: r248932
2017-06-06 19:18:37 +00:00
Jerry DeLisle fd262197d7 re PR fortran/53029 (missed optimization in internal read (without implied-do-loop))
2017-05-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/53029
	* list_read.c (list_formatted_read_scala): Set the err return
	value to the common.flags error values.

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

From-SVN: r248577
2017-05-29 19:17:57 +00:00
Rainer Orth 9698e1bb33 Fix libgfortran FMA3/FMA4 tests
* acinclude.m4 (LIBGFOR_CHECK_FMA3): Use test from
	check_effective_target_fma in gcc.target/i386/i386.exp.
	(LIBGFOR_CHECK_FMA4): Use test from check_effective_target_fma4.
	* configure: Regenerate.

From-SVN: r248547
2017-05-28 19:12:45 +00:00
Thomas Koenig 5596d26a5c re PR fortran/80889 (Bootstrap broken on all targets due to rev 248472)
2017-05-26  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR boostrap/80889
	* acinclude.m4: Also set HAVE_AVX128 on the false
	branch of LIBGFOR_CHECK_AVX128.
	* configure:  Regenerated.

From-SVN: r248519
2017-05-26 17:16:35 +00:00
Thomas Koenig 1d5cf7fcf2 re PR libfortran/78379 (Processor-specific versions for matmul)
2017-05-25  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/78379
	* Makefile.am: Add generated/matmulavx128_*.c files.
	Handle them for compiling and setting the right flags.
	* acinclude.m4: Add tests for FMA3, FMA4 and AVX128.
	* configure.ac: Call them.
	* Makefile.in: Regenerated.
	* config.h.in: Regenerated.
	* configure: Regenerated.
	* m4/matmul.m4:  Handle AMD chips by calling 128-bit AVX
	versions which use FMA3 or FMA4.
	* m4/matmulavx128.m4: New file.
        * 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_r10.c: Regenerated.
        * generated/matmul_r16.c: Regenerated.
        * generated/matmul_r4.c: Regenerated.
        * generated/matmul_r8.c: Regenerated.
        * generated/matmulavx128_c10.c: New file.
        * generated/matmulavx128_c16.c: New file.
        * generated/matmulavx128_c4.c: New file.
        * generated/matmulavx128_c8.c: New file.
        * generated/matmulavx128_i1.c: New file.
        * generated/matmulavx128_i16.c: New file.
        * generated/matmulavx128_i2.c: New file.
        * generated/matmulavx128_i4.c: New file.
        * generated/matmulavx128_i8.c: New file.
        * generated/matmulavx128_r10.c: New file.
        * generated/matmulavx128_r16.c: New file.
        * generated/matmulavx128_r4.c: New file.
        * generated/matmulavx128_r8.c: New file.

From-SVN: r248472
2017-05-25 21:51:27 +00:00
Jerry DeLisle 51cd6b78ee [multiple changes]
2017-05-19  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/80333
	* trans-io.c (nml_get_addr_expr): If we are dealing with class
	type data set tmp tree to get that address.
	(transfer_namelist_element): Set the array spec to point to the
	the class data.

2017-05-19  Paul Thomas  <pault@gcc.gnu.org>
	    Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/80333
	* list_read.c (nml_read_obj): Compute pointer into class/type
	arrays from the nl->dim information. Update it for each iteration
	of the loop for the given object.

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

	PR libgfortran/80333
	* gfortran.dg/dtio_30.f03: New test.

From-SVN: r248293
2017-05-19 15:48:35 +00:00
Jerry DeLisle 7f72e40263 re PR fortran/80741 ([Regression 7/8] DTIO wrong code causes incorrect behaviour of namelist READ)
2017-05-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/80741
	* transfer.c (finalize_transfer): Reset last_char to 'empty'.
	* file_pos.c (formatted_backspace): Likewise.
	(st_endfile): Likewise.
	(st_rewind): Likewise.
	(st_flush): Likewise.

	PR fortran/80741
	* trans-io.c (transfer_namelist_element): Change check from
	NULL_TREE to null_pointer_node.

From-SVN: r248170
2017-05-17 20:33:20 +00:00
Jerry DeLisle a5768d38a6 re PR libfortran/80727 (Crash of runtime gfortran library during integer transformation)
2017-05-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/80727
	* transfer.c (read_sf_internal): Remove bogus code to detect EOR.
	(read_block_form): For internal units, generate EOR if no more
	bytes left in unit and we are trying to read with ADVANCE='NO'.

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

From-SVN: r248080
2017-05-15 23:48:39 +00:00
Thomas Koenig 6ce6a84ac6 re PR fortran/80765 (178.galgel in SPEC CPU 2000 fails to run)
2017-05-15  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/80765
        * m4/matmul_internal.m4: Set bystride to correct value in
	vector-matrix multiplicatin for later calculation of buffer
	size.
        * 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_r10.c: Regenerated.
        * generated/matmul_r16.c: Regenerated.
        * generated/matmul_r4.c: Regenerated.
        * generated/matmul_r8.c: Regenerated.

From-SVN: r248074
2017-05-15 20:06:06 +00:00
Thomas Schwinge 9ef6dfbaf2 Typo fixes for "Don't assume __secure_getenv is available"
libgfortran/
	* runtime/environ.c (weak_secure_getenv): Fix "__secure_gettime"
	vs. "__secure_getenv" typo.
	(secure_getenv): Fix "HAVE__SECURE_GETENV"
	vs. "HAVE___SECURE_GETENV" typo.

From-SVN: r247952
2017-05-12 09:56:41 +02:00
Janne Blomqvist d86e68e207 Don't assume __secure_getenv is available
Glibc 2.17 made __secure_getenv an officially supported function, and
renamed it secure_getenv. The libgfortran configure has checked for
both of these, per
https://sourceware.org/glibc/wiki/Tips_and_Tricks/secure_getenv.

Unfortunately, while the dynamical library (libc.so) retains the
__secure_getenv symbol for backwards compatibility, the static library
(libc.a) does not. This means that a libgfortran.a compiled against an
older glibc will not work if one tries to link against a newer
libc.a. This creates problems for providing gfortran binary
distributions that work on as many target systems as possible.

Thus, retain the support for __secure_getenv but call it only via a
weak reference.

Regtested on x86_64-pc-linux-gnu.

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

	* libgfortran.h: HAVE_SECURE_GETENV: Don't check
	HAVE___SECURE_GETENV.
	* environ/runtime.c (secure_getenv): Use __secure_getenv via a
        weak reference.

From-SVN: r247927
2017-05-11 23:04:53 +03:00
Thomas Koenig 8e5f30dca0 re PR target/80687 (VLA usage in libgfortran; nvptx target: "sorry, unimplemented: target cannot support alloca")
2017-05-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

        PR fortran/80687
        PR fortran/80696
        * m4/matmul_internal.m4:  'matmul_name`:  Always
        use malloc/free to allocate t1.
        * 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_r10.c: Regenerated.
        * generated/matmul_r16.c: Regenerated.
        * generated/matmul_r4.c: Regenerated.
        * generated/matmul_r8.c: Regenerated.

From-SVN: r247839
2017-05-10 15:45:52 +00:00
Thomas Koenig fd9910392b re PR libfortran/80602 (Reduce stack usage for blocked matmul)
2017-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/80602
	* m4/matmul_internal.m4:  'matmul_name`:  Change
	t1 to a VLA of the required size.
        * 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_r10.c: Regenerated.
        * generated/matmul_r16.c: Regenerated.
        * generated/matmul_r4.c: Regenerated.
        * generated/matmul_r8.c: Regenerated.

2017-05-08  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/80602
	* gfortran.dg/matmul_15.f90:  New test case.

From-SVN: r247753
2017-05-08 17:56:13 +00:00
Jerry DeLisle f29876bba0 close.c: Fix white space in pointer declarations and comment formats where applicable.
2017-04-11  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	* close.c: Fix white space in pointer declarations and comment
	formats where applicable.
	* fbuf.c: Likewise.
	* fbuf.h: Likewise.
	* format.c: Likewise.
	* inquire.c: Likewise.
	* intrinsics.c: Likewise.
	* list_read.c: Likewise.
	* lock.c: Likewise.
	* open.c: Likewise.
	* read.c: Likewise.
	* transfer.c: Likewise.
	* unit.c: Likewise.
	* unix.c: Likewise.
	* unix.h: Likewise.
	* write.c: Likewise.

From-SVN: r246842
2017-04-11 14:51:25 +00:00
Jerry DeLisle fdc54f39c1 re PR fortran/78670 ([F03] Incorrect file position with namelist read under DTIO)
2017-03-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/78670
	* io/list_read.c (nml_get_obj_data): Delete code which calls the
	child read procedure. (nml_read_obj): Insert the code which
	calls the child procedure. Don't need to touch nodes if using
	dtio since parent will not be traversing the components.

	PR libgfortran/78670
	* gfortran.dg/dtio_25.f90: Use 'a1' format when trying to read
	a character of length 1. Update test for success.
	* gfortran.dg/dtio_28.f03: New test.
	* gfortran.dg/dtio_4.f90: Update to open test file with status =
	'scratch' to delete the file when done.

From-SVN: r246576
2017-03-29 21:37:45 +00:00
Janus Weil cf47453061 re PR fortran/78661 ([OOP] Namelist output missing object designator under DTIO)
2017-03-28  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/78661
	* trans-io.c (transfer_namelist_element): Perform a polymorphic call
	to a DTIO procedure if necessary.

2017-03-28  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/78661
	* gfortran.dg/dtio_25.f90: Modified test case.
	* gfortran.dg/dtio_27.f90: New test case.

2017-03-28  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/78661
	* io/write.c (nml_write_obj): Build a class container only if necessary.

From-SVN: r246546
2017-03-28 19:01:05 +02:00
Dominique d'Humieres b674927312 list_read.c: Insert /* Fall through.
2017-03-27  Dominique d'Humieres  <dominiq@lps.ens.fr>

	* io/list_read.c: Insert /* Fall through. */ in the macro
	CASE_SEPARATORS in order to silence warnings.

From-SVN: r246507
2017-03-27 20:51:58 +02:00
Jerry DeLisle 1f10d710e3 re PR fortran/78881 ([F03] reading from string with DTIO procedure does not work properly)
2017-03-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/78881
	* io/io.h (st_parameter_dt): Rename unused component last_char to
	child_saved_iostat. Move comment to gfc_unit.
	* io/list_read.c (list_formatted_read_scalar): After call to
	child READ procedure, save the returned iostat value for later
	check. (finish_list_read): Only finish READ if child_saved_iostat
	was OK.
	* io/transfer.c (read_sf_internal): If there is a saved character
	in last character, seek back one. Add a new check for EOR
	condition. (read_sf): If there is a saved character
	in last character, seek back one. (formatted_transfer_scalar_read):
	Initialize last character before invoking child procedure.
	(data_transfer_init): If child dtio, set advance
	status to nonadvancing. Move update of size and check for EOR
	condition to before child dtio return.

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

From-SVN: r246478
2017-03-25 18:48:01 +00:00
Thomas Koenig dba937c321 re PR libfortran/79956 (many new -Wmaybe-uninitialized warnings with bootstrap-O3)
2017-03-17  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/79956
	* m4/reshape.m4 (reshape_'rtype_ccode`):  Correct use
	of GFC_ASSERT.
	* 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.

From-SVN: r246248
2017-03-17 21:27:08 +00:00
NightStrike add5b95a4a Don't use Win32 functions on CYGWIN.
This was a workaround for a cygwin bug which was fixed 4 years ago,
and cygwin hasn't supported affected versions for a long time.

2017-03-15  NightStrike  <nightstrike@gmail.com>
	    Janne Blomqvist  <jb@gcc.gnu.org>

	* intrinsics/random.c (getosrandom): Remove check for __CYGWIN__
	preprocessor flag.
	* intrinsics/system_clock.c: Likewise.
	(system_clock_4): Likewise.
	(system_clock_8): Likewise.
	* intrinsics/time_1.h: Don't include windows.h if __CYGWIN__ is
	defined.

Co-Authored-By: Janne Blomqvist <jb@gcc.gnu.org>

From-SVN: r246162
2017-03-15 15:46:35 +02:00
Thomas Koenig 20305b5047 re PR libfortran/79956 (many new -Wmaybe-uninitialized warnings with bootstrap-O3)
2017-03-15  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/79956
	* libgfortran.h (GFC_ASSERT):  New macro.
	* m4/reshape.m4 (reshape_'rtype_ccode`):  Use GFC_ASSERT
	to specify that sdim > 0 and rdim > 0.
	* intrinsic/reshape_generic.c (reshape_internal):  Likweise.
	* 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.

From-SVN: r246153
2017-03-15 07:45:39 +00:00
Jerry DeLisle c08de9db47 re PR fortran/78854 ([F03] DTIO namelist output not working on internal unit)
2017-03-11  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/78854
	* io/list_read.c (nml_get_obj_data): Stash internal unit for
	later use by child procedures.
	* io/write.c (nml_write_obj): Likewise.
	* io/tranfer.c (data_transfer_init): Minor whitespace.
	* io/unit.c (set_internal_uit): Look for the stashed internal
	unit and use it if found.

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

From-SVN: r246070
2017-03-11 14:49:57 +00:00
Thomas Koenig 80dd631fce re PR libfortran/79956 (many new -Wmaybe-uninitialized warnings with bootstrap-O3)
2017-03-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/79956
	* m4/iforeach.m4:  Change exit condition from loop for
	increasing dimension to >=.  Fix type in comment.
	* m4/ifunction.m4:  Likewise.
	* m4/ifunction_logical.m4: 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/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/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/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/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/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.

From-SVN: r246053
2017-03-10 19:42:46 +00:00
Andre Vehreschild ef78bc3c0b check.c (positive_check): Add new function checking constant for being greater then zero.
gcc/fortran/ChangeLog:

2017-03-05  Andre Vehreschild  <vehre@gcc.gnu.org>
            Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>

	* check.c (positive_check): Add new function checking constant for
	being greater then zero.
	(gfc_check_image_status): Add checking of image_status arguments.
	(gfc_check_failed_or_stopped_images): Same but for failed_- and
	stopped_images function.
	* dump-parse-tree.c (show_code_node): Added output of FAIL IMAGE.
	* gfortran.h (enum gfc_statement): Added FAIL_IMAGE_ST.
	(enum gfc_isym_id): Added new intrinsic symbols.
	(enum gfc_exec_op): Added EXEC_FAIL_IMAGE.
	* gfortran.texi: Added description for the new API functions. Updated
	coverage of gfortran of TS18508.
	* intrinsic.c (add_functions): Added symbols to resolve new intrinsic
	functions. 
	* intrinsic.h: Added prototypes.
	* iresolve.c (gfc_resolve_failed_images): Resolve the failed_images
	intrinsic.
	(gfc_resolve_image_status): Same for image_status.
	(gfc_resolve_stopped_images): Same for stopped_images.
	* libgfortran.h: Added prototypes.
	* match.c (gfc_match_if): Added matching of FAIL IMAGE statement.
	(gfc_match_fail_image): Match a FAIL IMAGE statement.
	* match.h: Added prototype.
	* parse.c (decode_statement): Added matching for FAIL IMAGE.
	(next_statement): Same.
	(gfc_ascii_statement): Same.
	* resolve.c: Same.
	* simplify.c (gfc_simplify_failed_or_stopped_images): For COARRAY=
	single a constant result can be returne.d
	(gfc_simplify_image_status): For COARRAY=single the result is constant.
	* st.c (gfc_free_statement): Added FAIL_IMAGE handling.
	* trans-decl.c (gfc_build_builtin_function_decls): Added decls of the
	new intrinsics.
	* trans-expr.c (gfc_conv_procedure_call): This is first time all
	arguments of a function are optional, which is now handled here
	correctly.
	* trans-intrinsic.c (conv_intrinsic_image_status): Translate
	image_status.
	(gfc_conv_intrinsic_function): Add support for image_status.
	(gfc_is_intrinsic_libcall): Add support for the remaining new
	intrinsics.
	* trans-stmt.c (gfc_trans_fail_image): Trans a fail image.
	* trans-stmt.h: Add the prototype for the above.
	* trans.c (trans_code): Dispatch for fail_image.
	* trans.h: Add the trees for the new intrinsics.

libgfortran/ChangeLog:

2017-03-05  Andre Vehreschild  <vehre@gcc.gnu.org>
            Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>

	* caf/libcaf.h: Added prototypes and stat codes for failed and stopped
	images.
	* caf/single.c (void _gfortran_caf_fail_image): Add the routine.
	(int _gfortran_caf_image_status): Same.
	(_gfortran_caf_failed_images): Same.
	(_gfortran_caf_stopped_images): Same.


gcc/testsuite/ChangeLog:

2017-03-05  Andre Vehreschild  <vehre@gcc.gnu.org>
            Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>

	* gfortran.dg/coarray/fail_image_1.f08: New test.
	* gfortran.dg/coarray/fail_image_2.f08: New test.
	* gfortran.dg/coarray/failed_images_1.f08: New test.
	* gfortran.dg/coarray/failed_images_2.f08: New test.
	* gfortran.dg/coarray/image_status_1.f08: New test.
	* gfortran.dg/coarray/image_status_2.f08: New test.
	* gfortran.dg/coarray/stopped_images_1.f08: New test.
	* gfortran.dg/coarray/stopped_images_2.f08: New test.
	* gfortran.dg/coarray_fail_st.f90: New test.
	* gfortran.dg/coarray_failed_images_1.f08: New test.
	* gfortran.dg/coarray_image_status_1.f08: New test.
	* gfortran.dg/coarray_stopped_images_1.f08: New test.

From-SVN: r245900
2017-03-05 12:35:47 +01:00
Thomas Koenig f03e92172a matmul.m4 (matmul_'rtype_code`): Avoid race condition on storing function pointer.
2017-03-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
	    Jakub Jelinek  <jakub@redhat.com>

	* m4/matmul.m4 (matmul_'rtype_code`):  Avoid
	race condition on storing function pointer.
        * 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_r10.c: Regenerated.
        * generated/matmul_r16.c: Regenerated.
        * generated/matmul_r4.c: Regenerated.
        * generated/matmul_r8.c: Regenerated.


Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r245839
2017-03-02 12:54:27 +00:00
Thomas Koenig 6d03bdcc81 re PR libfortran/78379 (Processor-specific versions for matmul)
2017-03-02  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/78379
	* m4/matmul.m4: (matmul_'rtype_code`_avx2): Also generate for
	reals.  Add fma to target options.
	(matmul_'rtype_code`):  Call AVX2 only if FMA is available.
        * 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_r10.c: Regenerated.
        * generated/matmul_r16.c: Regenerated.
        * generated/matmul_r4.c: Regenerated.
        * generated/matmul_r8.c: Regenerated.

From-SVN: r245836
2017-03-02 11:04:01 +00:00
Janne Blomqvist 9449b70019 Don't try to use rand_s on CYGWIN
CYGWIN seems to include _mingw.h and thus __MINGW64_VERSION_MAJOR is
defined even though rand_s is not available. Thus add an extra check
for __CYGWIN__.

2017-02-27  Janne Blomqvist  <jb@gcc.gnu.org>

	* intrinsics/random.c (getosrandom): Don't try to use rand_s on
	CYGWIN.

From-SVN: r245755
2017-02-27 13:13:49 +02:00
Paul Thomas dc42a736c9 re PR fortran/79382 (DTIO ICE)
2017-02-16  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/79382
	* decl.c (access_attr_decl): Test for presence of generic DTIO
	interface and emit error if not present.

2017-02-16  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/79382
	* io/transfer.c (check_dtio_proc): New function.
	(formatted_transfer_scalar_read): Use it.
	(formatted_transfer_scalar_write): ditto.

2017-02-16  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/79382
	* gfortran.dg/dtio_10.f90 : Change test of error message.
	* gfortran.dg/dtio_23.f90 : New test.
	* gfortran.dg/dtio_24.f90 : New test.

From-SVN: r245596
2017-02-20 10:52:50 +00:00
Steven G. Kargl 0751254a75 re PR fortran/79305 (real128 - undefined reference to cexpl)
2017-01-31  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/79305
	* c99_protos.h: Spell HAVE_EXPL correctly.
	* intrinsics/c99_functions.c: Ditto.

From-SVN: r245068
2017-01-31 18:50:31 +00:00
Uros Bizjak 7b32a8f61f re PR target/78478 (Compile Error for i386-rtems)
PR target/78478
	* config/ax_check_define.m4: New file.

libgfortran/ChangeLog:

	PR target/78478
	* acinclude.m4: Include ../config/ax_check_define.m4
	* configure.ac: Check if _SOFT_FLOAT is defined.
	* configure.host (i?86 | x86_64): Use fpu-generic when
	have_soft_float is set.
	* configure: Regenerate.

From-SVN: r244651
2017-01-19 22:00:53 +01:00
Jakub Jelinek 9db0a8c2bf re PR target/79127 (Error: invalid register for .seh_savexmm in matmul_i4.c)
PR target/79127
	* acinclude.m4 (LIBGFOR_CHECK_AVX512F): Ensure the test clobbers
	some zmm16+ registers to verify they are handled by unwind info
	properly if needed.
	* configure: Regenerated.

From-SVN: r244636
2017-01-19 16:41:15 +01:00
Jakub Jelinek 3c36aa6ba2 re PR other/79046 (g++ -print-file-name=plugin uses full version number in path)
PR other/79046
	* configure: Regenerated.
config/
	* acx.m4 (GCC_BASE_VER): New m4 function.
	(ACX_TOOL_DIRS): Require GCC_BASE_VER, for
	--with-gcc-major-version-only use just major number from BASE-VER.
gcc/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
	version from BASE-VER file.
	(CFLAGS-gcc.o): Add -DBASEVER=$(BASEVER_s).
	(gcc.o): Depend on $(BASEVER).
	* common.opt (dumpfullversion): New option.
	* gcc.c (driver_handle_option): Handle OPT_dumpfullversion.
	* doc/invoke.texi: Document -dumpfullversion.
	* doc/install.texi: Document --with-gcc-major-version-only.
	* configure: Regenerated.
libatomic/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libgomp/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libgcc/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
	version from BASE-VER file.
	* configure: Regenerated.
libssp/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
liboffloadmic/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* aclocal.m4: Include ../config/acx.m4.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libquadmath/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libmpx/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libada/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
	version from BASE-VER file.
	* configure: Regenerated.
lto-plugin/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libitm/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
fixincludes/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
libcilkrts/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* aclocal.m4: Include ../config/acx.m4.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libcc1/
	* configure.ac: Add GCC_BASE_VER.  For --with-gcc-major-version-only
	use just major number from BASE-VER.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libobjc/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.in (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
libstdc++-v3/
	* configure.ac: Add GCC_BASE_VER.
	* fragment.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* po/Makefile.in: Regenerated.
	* libsupc++/Makefile.in: Regenerated.
	* testsuite/Makefile.in: Regenerated.
	* src/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
	* include/Makefile.in: Regenerated.
	* doc/Makefile.in: Regenerated.
	* python/Makefile.in: Regenerated.
	* src/c++11/Makefile.in: Regenerated.
	* src/c++98/Makefile.in: Regenerated.
	* src/filesystem/Makefile.in: Regenerated.
libvtv/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* testsuite/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
libsanitizer/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* libbacktrace/Makefile.in: Regenerated.
	* interception/Makefile.in: Regenerated.
	* asan/Makefile.in: Regenerated.
	* ubsan/Makefile.in: Regenerated.
	* configure: Regenerated.
	* sanitizer_common/Makefile.in: Regenerated.
	* lsan/Makefile.in: Regenerated.
	* Makefile.in: Regenerated.
	* tsan/Makefile.in: Regenerated.
libgfortran/
	* configure.ac: Add GCC_BASE_VER.
	* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
	get version from BASE-VER file.
	* configure: Regenerated.
	* Makefile.in: Regenerated.

From-SVN: r244521
2017-01-17 10:38:48 +01:00
Janne Blomqvist c1e9bbcc49 Revert r244448
From-SVN: r244454
2017-01-13 21:53:16 +02:00
Janne Blomqvist a6ab4e077b PR 78534 Change character length from int to size_t
In order to handle large character lengths on (L)LP64 targets, switch
the GFortran character length from an int to a size_t.

This is an ABI change, as procedures with character arguments take
hidden arguments with the character length.

I also changed the _size member in vtables from int to size_t, as
there were some cases where character lengths and sizes were
apparently mixed up and caused regressions otherwise. Although I
haven't tested, this might enable very large derived types as well.

Also, as there are some places in the frontend were negative character
lengths are used as special flag values, in the frontend the character
length is handled as a signed variable of the same size as a size_t,
although in the runtime library it really is size_t.

I haven't changed the character length variables for the co-array
intrinsics, as this is something that may need to be synchronized with
OpenCoarrays.

This is v4 of the patch. v3 was applied but had to reverted due to
breaking bootstrap. The fix is in resolve.c:resolve_charlen, where
it's necessary to check that an expression is constant before using
mpz_sgn.

Overview of v3 of the patch: All the issues pointed out by FX's review
of v2 have been fixed. In particular, there are now new functions
gfc_mpz_get_hwi and gfc_mpz_set_hwi, similar to the GMP functions
mpz_get_si and mpz_set_si, except that they get/set a HOST_WIDE_INT
instead of a long value. Similarly, gfc_get_int_expr now takes a
HOST_WIDE_INT instead of a long, gfc_extract_long is replaced by
gfc_extract_hwi. Also, the preliminary work to handle
gfc_charlen_type_node being unsigned has been removed.

Regtested on x86_64-pc-linux-gnu and i686-pc-linux-gnu.

frontend:

2017-01-13  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/78534
	PR fortran/66310
	* class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
	hardcoded kind.
	(find_intrinsic_vtab): Likewise.
	* expr.c (gfc_get_character_expr): Length parameter of type
	gfc_charlen_t.
	(gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
	(gfc_extract_hwi): New function.
	(simplify_const_ref): Make string_len of type gfc_charlen_t.
	(gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
	* gfortran.h (gfc_mpz_get_hwi): New prototype.
	(gfc_mpz_set_hwi): Likewise.
	(gfc_charlen_t): New typedef.
	(gfc_expr): Use gfc_charlen_t for character lengths.
	(gfc_size_kind): New extern variable.
	(gfc_extract_hwi): New prototype.
	(gfc_get_character_expr): Use gfc_charlen_t for character length.
	(gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
	* iresolve.c (gfc_resolve_repeat): Pass string length directly without
	temporary, use gfc_charlen_int_kind.
	* match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
	* misc.c (gfc_mpz_get_hwi): New function.
	(gfc_mpz_set_hwi): New function.
	* module.c (atom_int): Change type from int to HOST_WIDE_INT.
	(parse_integer): Don't complain about large integers.
	(write_atom): Use HOST_WIDE_INT for integers.
	(mio_integer): Handle integer type mismatch.
	(mio_hwi): New function.
	(mio_intrinsic_op): Use HOST_WIDE_INT.
	(mio_array_ref): Likewise.
	(mio_expr): Likewise.
	* resolve.c (resolve_select_type): Use HOST_WIDE_INT for charlen,
	use snprintf.
	(resolve_substring_charlen): Use gfc_charlen_int_kind.
	(resolve_charlen): Use mpz_sgn to determine sign.
	* simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
	instead of long.
	* target-memory.c (size_character): Length argument of type
	gfc_charlen_t.
	(gfc_encode_character): Likewise.
	(gfc_interpret_character): Use gfc_charlen_t.
	* target-memory.h (gfc_encode_character): Modify prototype.
	* trans-array.c (get_array_ctor_var_strlen): Use
	gfc_conv_mpz_to_tree_type.
	* trans-const.c (gfc_conv_mpz_to_tree_type): New function.
	* trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
	* trans-expr.c (gfc_class_len_or_zero_get): Build const of type
	gfc_charlen_type_node.
	(gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
	4, fold_convert to correct type.
	(gfc_conv_class_to_class): Build const of type size_type_node for
	size.
	(gfc_copy_class_to_class): Likewise.
	(gfc_conv_string_length): Use same type in expression.
	(gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
	(gfc_conv_string_tmp): Make sure len is of the right type.
	(gfc_conv_concat_op): Use same type in expression.
	(gfc_conv_procedure_call): Likewise.
	(alloc_scalar_allocatable_for_subcomponent_assignment):
	fold_convert to right type.
	(gfc_trans_subcomponent_assign): Likewise.
	(trans_class_vptr_len_assignment): Build const of correct type.
	(gfc_trans_pointer_assignment): Likewise.
	(alloc_scalar_allocatable_for_assignment): fold_convert to right
	type in expr.
	(trans_class_assignment): Build const of correct type.
	* trans-intrinsic.c (gfc_conv_associated): Likewise.
	(gfc_conv_intrinsic_repeat): Do calculation in sizetype.
	* trans-io.c (gfc_build_io_library_fndecls): Use
	gfc_charlen_type_node for character lengths.
	* trans-stmt.c (gfc_trans_label_assign): Build const of
	gfc_charlen_type_node.
	(gfc_trans_character_select): Likewise.
	(gfc_trans_allocate): Likewise, don't typecast strlen result.
	(gfc_trans_deallocate): Don't typecast strlen result.
	* trans-types.c (gfc_size_kind): New variable.
	(gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
	from size_type_node.

testsuite:

2017-01-13  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/78534
	PR fortran/66310
	* gfortran.dg/repeat_4.f90: Use integers of kind C_SIZE_T.
	* gfortran.dg/repeat_7.f90: New test for PR 66310.
	* gfortran.dg/scan_2.f90: Handle potential cast in assignment.
	* gfortran.dg/string_1.f90: Limit to ilp32 targets.
	* gfortran.dg/string_1_lp64.f90: New test.
	* gfortran.dg/string_3.f90: Limit to ilp32 targets.
	* gfortran.dg/string_3_lp64.f90: New test.

libgfortran:

2017-01-13  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/78534
	* intrinsics/args.c (getarg_i4): Use gfc_charlen_type.
	(get_command_argument_i4): Likewise.
	(get_command_i4): Likewise.
	* intrinsics/chmod.c (chmod_internal): Likewise.
	* intrinsics/env.c (get_environment_variable_i4): Likewise.
	* intrinsics/extends_type_of.c (struct vtype): Use size_t for size
	member.
	* intrinsics/gerror.c (gerror): Use gfc_charlen_type.
	* intrinsics/getlog.c (getlog): Likewise.
	* intrinsics/hostnm.c (hostnm_0): Likewise.
	* intrinsics/string_intrinsics_inc.c (string_len_trim): Rework to
	work if gfc_charlen_type is unsigned.
	(string_scan): Likewise.
	* io/transfer.c (transfer_character): Modify prototype.
	(transfer_character_write): Likewise.
	(transfer_character_wide): Likewise.
	(transfer_character_wide_write): Likewise.
	(transfer_array): Typecast to avoid signed-unsigned comparison.
	* io/unit.c (is_trim_ok): Use gfc_charlen_type.
	* io/write.c (namelist_write): Likewise.
	* libgfortran.h (gfc_charlen_type): Change typedef to size_t.

From-SVN: r244448
2017-01-13 19:05:48 +02:00
Andre Vehreschild 4ccff88b71 re PR fortran/70696 ([Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray)
gcc/testsuite/ChangeLog:

2017-01-13  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/70696
	* gfortran.dg/coarray/event_3.f08: New test.

gcc/fortran/ChangeLog:

2017-01-13  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/70696
	* trans-expr.c (gfc_get_tree_for_caf_expr): Ensure the backend_decl
	is valid before accessing it.

libgfortran/ChangeLog:

2017-01-13  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/70696
	* caf/single.c (_gfortran_caf_register): Allocate enough memory for
	the event counter.

From-SVN: r244407
2017-01-13 11:22:21 +01:00
Andre Vehreschild de91486c74 re PR fortran/78781 ([Coarray] ICE in gfc_deallocate_scalar_with_status, at fortran/trans.c:1588)
gcc/fortran/ChangeLog:

2017-01-07  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/78781
	PR fortran/78935
	* expr.c (gfc_check_pointer_assign): Return the same error message for
	rewritten coarray pointer assignments like for plain ones.
	* gfortran.h: Change prototype.
	* primary.c (caf_variable_attr): Set attributes used ones only only
	ones.  Add setting of pointer_comp attribute.
	(gfc_caf_attr): Add setting of pointer_comp attribute.
	* trans-array.c (gfc_array_allocate): Add flag that the component to
	allocate is not an ultimate coarray component.  Add allocation of
	pointer arrays.
	(structure_alloc_comps): Extend nullify to treat pointer components in
	coarrays correctly.  Restructure nullify to remove redundant code.
	(gfc_nullify_alloc_comp): Allow setting caf_mode flags.
	* trans-array.h: Change prototype of gfc_nullify_alloc_comp ().
	* trans-decl.c (generate_coarray_sym_init): Call nullify_alloc_comp for
	derived type coarrays with pointer components.
	* trans-expr.c (gfc_trans_structure_assign): Also treat pointer
	components.
	(trans_caf_token_assign): Handle assignment of token of scalar pointer
	components.
	(gfc_trans_pointer_assignment): Call above routine.
	* trans-intrinsic.c (conv_expr_ref_to_caf_ref): Add treating pointer
	components.
	(gfc_conv_intrinsic_caf_get): Likewise.
	(conv_caf_send): Likewise.
	* trans-stmt.c (gfc_trans_allocate): After allocating a derived type in
	a coarray pre-register the tokens.
	(gfc_trans_deallocate): Simply determining the coarray type (scalar or
	array) and deregistering it correctly.
	* trans-types.c (gfc_typenode_for_spec): Replace in_coarray flag by the
	actual codim to allow lookup of array types in the cache.
	(gfc_build_array_type): Likewise.
	(gfc_get_array_descriptor_base): Likewise.
	(gfc_get_array_type_bounds): Likewise.
	(gfc_get_derived_type): Likewise.
	* trans-types.h: Likewise.
	* trans.c (gfc_deallocate_with_status): Enable deregistering of all kind
	of coarray components.
	(gfc_deallocate_scalar_with_status): Use free() in fcoarray_single mode
	instead of caf_deregister.

libgfortran/ChangeLog:

2017-01-07  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/78781
	PR fortran/78935
	* caf/single.c (send_by_ref): Fix addressing of non-allocatable scalar
	destination components.

gcc/testsuite/ChangeLog:

2017-01-07  Andre Vehreschild  <vehre@gcc.gnu.org>

	* gfortran.dg/coarray/ptr_comp_1.f08: New test.
	* gfortran.dg/coarray/ptr_comp_2.f08: New test.
	* gfortran.dg/coarray/ptr_comp_3.f08: New test.
	* gfortran.dg/coarray/ptr_comp_4.f08: New test.
	* gfortran.dg/coarray_ptr_comp_1.f08: New test.
	* gfortran.dg/coarray_ptr_comp_2.f08: New test.
	* gfortran.dg/coarray_ptr_comp_3.f08: New test.

From-SVN: r244196
2017-01-07 18:26:58 +01:00
Janne Blomqvist 84aff3c2d4 PR 78534 Revert r244011
r244011 caused regressions on 32-bit hosts.

From-SVN: r244027
2017-01-03 20:01:30 +02:00
Janne Blomqvist 994e4aca2c PR 78534 Change character length from int to size_t
In order to handle large character lengths on (L)LP64 targets, switch
the GFortran character length from an int to a size_t.

This is an ABI change, as procedures with character arguments take
hidden arguments with the character length.

I also changed the _size member in vtables from int to size_t, as
there were some cases where character lengths and sizes were
apparently mixed up and caused regressions otherwise. Although I
haven't tested, this might enable very large derived types as well.

Also, as there are some places in the frontend were negative character
lengths are used as special flag values, in the frontend the character
length is handled as a signed variable of the same size as a size_t,
although in the runtime library it really is size_t.

I haven't changed the character length variables for the co-array
intrinsics, as this is something that may need to be synchronized with
OpenCoarrays.

This is v3 of the patch. All the issues pointed out by FX's review of
v2 have been fixed. In particular, there are now new functions
gfc_mpz_get_hwi and gfc_mpz_set_hwi, similar to the GMP functions
mpz_get_si and mpz_set_si, except that they get/set a HOST_WIDE_INT
instead of a long value. Similarly, gfc_get_int_expr now takes a
HOST_WIDE_INT instead of a long, gfc_extract_long is replaced by
gfc_extract_hwi. Also, the preliminary work to handle
gfc_charlen_type_node being unsigned has been removed.

Regtested on x86_64-pc-linux-gnu.

frontend:

2017-01-03  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/78534
	PR fortran/66310
	* class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
	hardcoded kind.
	(find_intrinsic_vtab): Likewise.
	* expr.c (gfc_get_character_expr): Length parameter of type
	gfc_charlen_t.
	(gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
	(gfc_extract_hwi): New function.
	(simplify_const_ref): Make string_len of type gfc_charlen_t.
	(gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
	* gfortran.h (gfc_mpz_get_hwi): New prototype.
	(gfc_mpz_set_hwi): Likewise.
	(gfc_charlen_t): New typedef.
	(gfc_expr): Use gfc_charlen_t for character lengths.
	(gfc_size_kind): New extern variable.
	(gfc_extract_hwi): New prototype.
	(gfc_get_character_expr): Use gfc_charlen_t for character length.
	(gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
	* iresolve.c (gfc_resolve_repeat): Pass string length directly without
	temporary, use gfc_charlen_int_kind.
	* match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
	* misc.c (gfc_mpz_get_hwi): New function.
	(gfc_mpz_set_hwi): New function.
	* module.c (atom_int): Change type from int to HOST_WIDE_INT.
	(parse_integer): Don't complain about large integers.
	(write_atom): Use HOST_WIDE_INT for integers.
	(mio_integer): Handle integer type mismatch.
	(mio_hwi): New function.
	(mio_intrinsic_op): Use HOST_WIDE_INT.
	(mio_array_ref): Likewise.
	(mio_expr): Likewise.
	* resolve.c (resolve_select_type): Use HOST_WIDE_INT for charlen,
	use snprintf.
	(resolve_charlen): Use mpz_sgn to determine sign.
	* simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
	instead of long.
	* target-memory.c (size_character): Length argument of type
	gfc_charlen_t.
	(gfc_encode_character): Likewise.
	(gfc_interpret_character): Use gfc_charlen_t.
	* target-memory.h (gfc_encode_character): Modify prototype.
	* trans-array.c (get_array_ctor_var_strlen): Use
	gfc_conv_mpz_to_tree_type.
	* trans-const.c (gfc_conv_mpz_to_tree_type): New function.
	* trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
	* trans-expr.c (gfc_class_len_or_zero_get): Build const of type
	gfc_charlen_type_node.
	(gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
	4, fold_convert to correct type.
	(gfc_conv_class_to_class): Build const of type size_type_node for
	size.
	(gfc_copy_class_to_class): Likewise.
	(gfc_conv_string_length): Use same type in expression.
	(gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
	(gfc_conv_string_tmp): Make sure len is of the right type.
	(gfc_conv_concat_op): Use same type in expression.
	(gfc_conv_procedure_call): Likewise.
	(alloc_scalar_allocatable_for_subcomponent_assignment):
	fold_convert to right type.
	(gfc_trans_subcomponent_assign): Likewise.
	(trans_class_vptr_len_assignment): Build const of correct type.
	(gfc_trans_pointer_assignment): Likewise.
	(alloc_scalar_allocatable_for_assignment): fold_convert to right
	type in expr.
	(trans_class_assignment): Build const of correct type.
	* trans-intrinsic.c (gfc_conv_associated): Likewise.
	(gfc_conv_intrinsic_repeat): Do calculation in sizetype.
	* trans-io.c (gfc_build_io_library_fndecls): Use
	gfc_charlen_type_node for character lengths.
	* trans-stmt.c (gfc_trans_label_assign): Build const of
	gfc_charlen_type_node.
	(gfc_trans_character_select): Likewise.
	(gfc_trans_allocate): Likewise, don't typecast strlen result.
	(gfc_trans_deallocate): Don't typecast strlen result.
	* trans-types.c (gfc_size_kind): New variable.
	(gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
	from size_type_node.

testsuite:

2017-01-03  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/78534
	PR fortran/66310
	* gfortran.dg/dependency_49.f90: Change scan-tree-dump-times
          due to gfc_trans_string_copy change to avoid
          -Wstringop-overflow.
	* gfortran.dg/repeat_4.f90: Use integers of kind C_SIZE_T.
	* gfortran.dg/repeat_7.f90: New test for PR 66310.
	* gfortran.dg/scan_2.f90: Handle potential cast in assignment.
	* gfortran.dg/string_1.f90: Limit to ilp32 targets.
	* gfortran.dg/string_1_lp64.f90: New test.
	* gfortran.dg/string_3.f90: Limit to ilp32 targets.
	* gfortran.dg/string_3_lp64.f90: New test.
	* gfortran.dg/transfer_intrinsic_1.f90: Change
          scan-tree-dump-times due to gfc_trans_string_copy change to
          avoid -Wstringop-overflow.

libgfortran:

2017-01-03  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/78534
	* intrinsics/args.c (getarg_i4): Use gfc_charlen_type.
	(get_command_argument_i4): Likewise.
	(get_command_i4): Likewise.
	* intrinsics/chmod.c (chmod_internal): Likewise.
	* intrinsics/env.c (get_environment_variable_i4): Likewise.
	* intrinsics/extends_type_of.c (struct vtype): Use size_t for size
	member.
	* intrinsics/gerror.c (gerror): Use gfc_charlen_type.
	* intrinsics/getlog.c (getlog): Likewise.
	* intrinsics/hostnm.c (hostnm_0): Likewise.
	* intrinsics/string_intrinsics_inc.c (string_len_trim): Rework to
	work if gfc_charlen_type is unsigned.
	(string_scan): Likewise.
	* io/transfer.c (transfer_character): Modify prototype.
	(transfer_character_write): Likewise.
	(transfer_character_wide): Likewise.
	(transfer_character_wide_write): Likewise.
	(transfer_array): Typecast to avoid signed-unsigned comparison.
	* io/unit.c (is_trim_ok): Use gfc_charlen_type.
	* io/write.c (namelist_write): Likewise.
	* libgfortran.h (gfc_charlen_type): Change typedef to size_t.

From-SVN: r244011
2017-01-03 09:04:01 +02:00
Jakub Jelinek cbe34bb5ed Update copyright years.
From-SVN: r243994
2017-01-01 13:07:43 +01:00
Francois-Xavier Coudert e034421f43 random.c: Do not include <sys/types.h> header.
* intrinsics/random.c: Do not include <sys/types.h> header.
	* m4/maxloc0.m4: Do not include <limits.h> header.
	* m4/maxloc1.m4: Do not include <limits.h> header.
	* m4/minloc0.m4: Do not include <limits.h> header.
	* m4/minloc1.m4: Do not include <limits.h> header.
	* m4/norm2.m4: Do not include <math.h> header.
	* m4/parity.m4: Do not include <math.h> header.
	* runtime/minimal.c: Remove <limits.h> and <errno.h> headers.
	* generated/maxloc0_16_i1.c: Regenerate.
	* generated/maxloc0_16_i16.c: Regenerate.
	* generated/maxloc0_16_i2.c: Regenerate.
	* generated/maxloc0_16_i4.c: Regenerate.
	* generated/maxloc0_16_i8.c: Regenerate.
	* generated/maxloc0_16_r10.c: Regenerate.
	* generated/maxloc0_16_r16.c: Regenerate.
	* generated/maxloc0_16_r4.c: Regenerate.
	* generated/maxloc0_16_r8.c: Regenerate.
	* generated/maxloc0_4_i1.c: Regenerate.
	* generated/maxloc0_4_i16.c: Regenerate.
	* generated/maxloc0_4_i2.c: Regenerate.
	* generated/maxloc0_4_i4.c: Regenerate.
	* generated/maxloc0_4_i8.c: Regenerate.
	* generated/maxloc0_4_r10.c: Regenerate.
	* generated/maxloc0_4_r16.c: Regenerate.
	* generated/maxloc0_4_r4.c: Regenerate.
	* generated/maxloc0_4_r8.c: Regenerate.
	* generated/maxloc0_8_i1.c: Regenerate.
	* generated/maxloc0_8_i16.c: Regenerate.
	* generated/maxloc0_8_i2.c: Regenerate.
	* generated/maxloc0_8_i4.c: Regenerate.
	* generated/maxloc0_8_i8.c: Regenerate.
	* generated/maxloc0_8_r10.c: Regenerate.
	* generated/maxloc0_8_r16.c: Regenerate.
	* generated/maxloc0_8_r4.c: Regenerate.
	* generated/maxloc0_8_r8.c: Regenerate.
	* generated/maxloc1_16_i1.c: Regenerate.
	* generated/maxloc1_16_i16.c: Regenerate.
	* generated/maxloc1_16_i2.c: Regenerate.
	* generated/maxloc1_16_i4.c: Regenerate.
	* generated/maxloc1_16_i8.c: Regenerate.
	* generated/maxloc1_16_r10.c: Regenerate.
	* generated/maxloc1_16_r16.c: Regenerate.
	* generated/maxloc1_16_r4.c: Regenerate.
	* generated/maxloc1_16_r8.c: Regenerate.
	* generated/maxloc1_4_i1.c: Regenerate.
	* generated/maxloc1_4_i16.c: Regenerate.
	* generated/maxloc1_4_i2.c: Regenerate.
	* generated/maxloc1_4_i4.c: Regenerate.
	* generated/maxloc1_4_i8.c: Regenerate.
	* generated/maxloc1_4_r10.c: Regenerate.
	* generated/maxloc1_4_r16.c: Regenerate.
	* generated/maxloc1_4_r4.c: Regenerate.
	* generated/maxloc1_4_r8.c: Regenerate.
	* generated/maxloc1_8_i1.c: Regenerate.
	* generated/maxloc1_8_i16.c: Regenerate.
	* generated/maxloc1_8_i2.c: Regenerate.
	* generated/maxloc1_8_i4.c: Regenerate.
	* generated/maxloc1_8_i8.c: Regenerate.
	* generated/maxloc1_8_r10.c: Regenerate.
	* generated/maxloc1_8_r16.c: Regenerate.
	* generated/maxloc1_8_r4.c: Regenerate.
	* generated/maxloc1_8_r8.c: Regenerate.
	* generated/minloc0_16_i1.c: Regenerate.
	* generated/minloc0_16_i16.c: Regenerate.
	* generated/minloc0_16_i2.c: Regenerate.
	* generated/minloc0_16_i4.c: Regenerate.
	* generated/minloc0_16_i8.c: Regenerate.
	* generated/minloc0_16_r10.c: Regenerate.
	* generated/minloc0_16_r16.c: Regenerate.
	* generated/minloc0_16_r4.c: Regenerate.
	* generated/minloc0_16_r8.c: Regenerate.
	* generated/minloc0_4_i1.c: Regenerate.
	* generated/minloc0_4_i16.c: Regenerate.
	* generated/minloc0_4_i2.c: Regenerate.
	* generated/minloc0_4_i4.c: Regenerate.
	* generated/minloc0_4_i8.c: Regenerate.
	* generated/minloc0_4_r10.c: Regenerate.
	* generated/minloc0_4_r16.c: Regenerate.
	* generated/minloc0_4_r4.c: Regenerate.
	* generated/minloc0_4_r8.c: Regenerate.
	* generated/minloc0_8_i1.c: Regenerate.
	* generated/minloc0_8_i16.c: Regenerate.
	* generated/minloc0_8_i2.c: Regenerate.
	* generated/minloc0_8_i4.c: Regenerate.
	* generated/minloc0_8_i8.c: Regenerate.
	* generated/minloc0_8_r10.c: Regenerate.
	* generated/minloc0_8_r16.c: Regenerate.
	* generated/minloc0_8_r4.c: Regenerate.
	* generated/minloc0_8_r8.c: Regenerate.
	* generated/minloc1_16_i1.c: Regenerate.
	* generated/minloc1_16_i16.c: Regenerate.
	* generated/minloc1_16_i2.c: Regenerate.
	* generated/minloc1_16_i4.c: Regenerate.
	* generated/minloc1_16_i8.c: Regenerate.
	* generated/minloc1_16_r10.c: Regenerate.
	* generated/minloc1_16_r16.c: Regenerate.
	* generated/minloc1_16_r4.c: Regenerate.
	* generated/minloc1_16_r8.c: Regenerate.
	* generated/minloc1_4_i1.c: Regenerate.
	* generated/minloc1_4_i16.c: Regenerate.
	* generated/minloc1_4_i2.c: Regenerate.
	* generated/minloc1_4_i4.c: Regenerate.
	* generated/minloc1_4_i8.c: Regenerate.
	* generated/minloc1_4_r10.c: Regenerate.
	* generated/minloc1_4_r16.c: Regenerate.
	* generated/minloc1_4_r4.c: Regenerate.
	* generated/minloc1_4_r8.c: Regenerate.
	* generated/minloc1_8_i1.c: Regenerate.
	* generated/minloc1_8_i16.c: Regenerate.
	* generated/minloc1_8_i2.c: Regenerate.
	* generated/minloc1_8_i4.c: Regenerate.
	* generated/minloc1_8_i8.c: Regenerate.
	* generated/minloc1_8_r10.c: Regenerate.
	* generated/minloc1_8_r16.c: Regenerate.
	* generated/minloc1_8_r4.c: Regenerate.
	* generated/minloc1_8_r8.c: Regenerate.
	* generated/norm2_r10.c: Regenerate.
	* generated/norm2_r16.c: Regenerate.
	* generated/norm2_r4.c: Regenerate.
	* generated/norm2_r8.c: Regenerate.
	* generated/parity_l1.c: Regenerate.
	* generated/parity_l16.c: Regenerate.
	* generated/parity_l2.c: Regenerate.
	* generated/parity_l4.c: Regenerate.
	* generated/parity_l8.c: Regenerate.

From-SVN: r243847
2016-12-21 10:56:16 +00:00
Francois-Xavier Coudert 887d9b8b6d libgfortran.h: Include <stdlib.h> header.
* libgfortran.h: Include <stdlib.h> header.
	* intrinsics/access.c: Do not include <stdlib.h> header.
	* intrinsics/chdir.c: Do not include <stdlib.h> header.
	* intrinsics/chmod.c: Do not include <stdlib.h> header.
	* intrinsics/date_and_time.c: Do not include <stdlib.h> header.
	* intrinsics/env.c: Do not include <stdlib.h> header.
	* intrinsics/execute_command_line.c: Do not include <stdlib.h> header.
	* intrinsics/exit.c: Do not include <stdlib.h> header.
	* intrinsics/getcwd.c: Do not include <stdlib.h> header.
	* intrinsics/getlog.c: Do not include <stdlib.h> header.
	* intrinsics/link.c: Do not include <stdlib.h> header.
	* intrinsics/move_alloc.c: Do not include <stdlib.h> header.
	* intrinsics/perror.c: Do not include <stdlib.h> header.
	* intrinsics/random.c: Do not include <stdlib.h> header.
	* intrinsics/rename.c: Do not include <stdlib.h> header.
	* intrinsics/reshape_generic.c: Do not include <stdlib.h> header.
	* intrinsics/stat.c: Do not include <stdlib.h> header.
	* intrinsics/symlnk.c: Do not include <stdlib.h> header.
	* intrinsics/system.c: Do not include <stdlib.h> header.
	* intrinsics/unlink.c: Do not include <stdlib.h> header.
	* io/fbuf.c: Do not include <stdlib.h> header.
	* io/format.c: Do not include <stdlib.h> header.
	* io/intrinsics.c: Do not include <stdlib.h> header.
	* io/list_read.c: Do not include <stdlib.h> header.
	* io/lock.c: Do not include <stdlib.h> header.
	* io/open.c: Do not include <stdlib.h> header.
	* io/read.c: Do not include <stdlib.h> header.
	* io/transfer.c: Do not include <stdlib.h> header.
	* io/unit.c: Do not include <stdlib.h> header.
	* io/unix.c: Do not include <stdlib.h> header.
	* io/write.c: Do not include <stdlib.h> header.
	* m4/all.m4: Do not include <stdlib.h> header.
	* m4/any.m4: Do not include <stdlib.h> header.
	* m4/bessel.m4: Do not include <stdlib.h> header.
	* m4/count.m4: Do not include <stdlib.h> header.
	* m4/cshift0.m4: Do not include <stdlib.h> header.
	* m4/cshift1.m4: Do not include <stdlib.h> header.
	* m4/eoshift1.m4: Do not include <stdlib.h> header.
	* m4/eoshift3.m4: Do not include <stdlib.h> header.
	* m4/iall.m4: Do not include <stdlib.h> header.
	* m4/iany.m4: Do not include <stdlib.h> header.
	* m4/in_pack.m4: Do not include <stdlib.h> header.
	* m4/in_unpack.m4: Do not include <stdlib.h> header.
	* m4/iparity.m4: Do not include <stdlib.h> header.
	* m4/matmul.m4: Do not include <stdlib.h> header.
	* m4/matmull.m4: Do not include <stdlib.h> header.
	* m4/maxloc0.m4: Do not include <stdlib.h> header.
	* m4/maxloc1.m4: Do not include <stdlib.h> header.
	* m4/maxval.m4: Do not include <stdlib.h> header.
	* m4/minloc0.m4: Do not include <stdlib.h> header.
	* m4/minloc1.m4: Do not include <stdlib.h> header.
	* m4/minval.m4: Do not include <stdlib.h> header.
	* m4/norm2.m4: Do not include <stdlib.h> header.
	* m4/pack.m4: Do not include <stdlib.h> header.
	* m4/parity.m4: Do not include <stdlib.h> header.
	* m4/product.m4: Do not include <stdlib.h> header.
	* m4/reshape.m4: Do not include <stdlib.h> header.
	* m4/shape.m4: Do not include <stdlib.h> header.
	* m4/spread.m4: Do not include <stdlib.h> header.
	* m4/sum.m4: Do not include <stdlib.h> header.
	* m4/unpack.m4: Do not include <stdlib.h> header.
	* runtime/environ.c: Do not include <stdlib.h> header.
	* runtime/error.c: Do not include <stdlib.h> header.
	* runtime/memory.c: Do not include <stdlib.h> header.
	* runtime/minimal.c: Do not include <stdlib.h> header.
	* runtime/string.c: Do not include <stdlib.h> header.
	* generated/all_l1.c: Regenerate.
	* generated/all_l16.c: Regenerate.
	* generated/all_l2.c: Regenerate.
	* generated/all_l4.c: Regenerate.
	* generated/all_l8.c: Regenerate.
	* generated/any_l1.c: Regenerate.
	* generated/any_l16.c: Regenerate.
	* generated/any_l2.c: Regenerate.
	* generated/any_l4.c: Regenerate.
	* generated/any_l8.c: Regenerate.
	* generated/bessel_r10.c: Regenerate.
	* generated/bessel_r16.c: Regenerate.
	* generated/bessel_r4.c: Regenerate.
	* generated/bessel_r8.c: Regenerate.
	* generated/count_16_l.c: Regenerate.
	* generated/count_1_l.c: Regenerate.
	* generated/count_2_l.c: Regenerate.
	* generated/count_4_l.c: Regenerate.
	* generated/count_8_l.c: Regenerate.
	* generated/cshift0_c10.c: Regenerate.
	* generated/cshift0_c16.c: Regenerate.
	* generated/cshift0_c4.c: Regenerate.
	* generated/cshift0_c8.c: Regenerate.
	* generated/cshift0_i1.c: Regenerate.
	* generated/cshift0_i16.c: Regenerate.
	* generated/cshift0_i2.c: Regenerate.
	* generated/cshift0_i4.c: Regenerate.
	* generated/cshift0_i8.c: Regenerate.
	* generated/cshift0_r10.c: Regenerate.
	* generated/cshift0_r16.c: Regenerate.
	* generated/cshift0_r4.c: Regenerate.
	* generated/cshift0_r8.c: Regenerate.
	* generated/cshift1_16.c: Regenerate.
	* generated/cshift1_4.c: Regenerate.
	* generated/cshift1_8.c: Regenerate.
	* generated/eoshift1_16.c: Regenerate.
	* generated/eoshift1_4.c: Regenerate.
	* generated/eoshift1_8.c: Regenerate.
	* generated/eoshift3_16.c: Regenerate.
	* generated/eoshift3_4.c: Regenerate.
	* generated/eoshift3_8.c: Regenerate.
	* generated/iall_i1.c: Regenerate.
	* generated/iall_i16.c: Regenerate.
	* generated/iall_i2.c: Regenerate.
	* generated/iall_i4.c: Regenerate.
	* generated/iall_i8.c: Regenerate.
	* generated/iany_i1.c: Regenerate.
	* generated/iany_i16.c: Regenerate.
	* generated/iany_i2.c: Regenerate.
	* generated/iany_i4.c: Regenerate.
	* generated/iany_i8.c: Regenerate.
	* generated/in_pack_c10.c: Regenerate.
	* generated/in_pack_c16.c: Regenerate.
	* generated/in_pack_c4.c: Regenerate.
	* generated/in_pack_c8.c: Regenerate.
	* generated/in_pack_i1.c: Regenerate.
	* generated/in_pack_i16.c: Regenerate.
	* generated/in_pack_i2.c: Regenerate.
	* generated/in_pack_i4.c: Regenerate.
	* generated/in_pack_i8.c: Regenerate.
	* generated/in_pack_r10.c: Regenerate.
	* generated/in_pack_r16.c: Regenerate.
	* generated/in_pack_r4.c: Regenerate.
	* generated/in_pack_r8.c: Regenerate.
	* generated/in_unpack_c10.c: Regenerate.
	* generated/in_unpack_c16.c: Regenerate.
	* generated/in_unpack_c4.c: Regenerate.
	* generated/in_unpack_c8.c: Regenerate.
	* generated/in_unpack_i1.c: Regenerate.
	* generated/in_unpack_i16.c: Regenerate.
	* generated/in_unpack_i2.c: Regenerate.
	* generated/in_unpack_i4.c: Regenerate.
	* generated/in_unpack_i8.c: Regenerate.
	* generated/in_unpack_r10.c: Regenerate.
	* generated/in_unpack_r16.c: Regenerate.
	* generated/in_unpack_r4.c: Regenerate.
	* generated/in_unpack_r8.c: Regenerate.
	* generated/iparity_i1.c: Regenerate.
	* generated/iparity_i16.c: Regenerate.
	* generated/iparity_i2.c: Regenerate.
	* generated/iparity_i4.c: Regenerate.
	* generated/iparity_i8.c: Regenerate.
	* generated/matmul_c10.c: Regenerate.
	* generated/matmul_c16.c: Regenerate.
	* generated/matmul_c4.c: Regenerate.
	* generated/matmul_c8.c: Regenerate.
	* generated/matmul_i1.c: Regenerate.
	* generated/matmul_i16.c: Regenerate.
	* generated/matmul_i2.c: Regenerate.
	* generated/matmul_i4.c: Regenerate.
	* generated/matmul_i8.c: Regenerate.
	* generated/matmul_l16.c: Regenerate.
	* generated/matmul_l4.c: Regenerate.
	* generated/matmul_l8.c: Regenerate.
	* generated/matmul_r10.c: Regenerate.
	* generated/matmul_r16.c: Regenerate.
	* generated/matmul_r4.c: Regenerate.
	* generated/matmul_r8.c: Regenerate.
	* generated/maxloc0_16_i1.c: Regenerate.
	* generated/maxloc0_16_i16.c: Regenerate.
	* generated/maxloc0_16_i2.c: Regenerate.
	* generated/maxloc0_16_i4.c: Regenerate.
	* generated/maxloc0_16_i8.c: Regenerate.
	* generated/maxloc0_16_r10.c: Regenerate.
	* generated/maxloc0_16_r16.c: Regenerate.
	* generated/maxloc0_16_r4.c: Regenerate.
	* generated/maxloc0_16_r8.c: Regenerate.
	* generated/maxloc0_4_i1.c: Regenerate.
	* generated/maxloc0_4_i16.c: Regenerate.
	* generated/maxloc0_4_i2.c: Regenerate.
	* generated/maxloc0_4_i4.c: Regenerate.
	* generated/maxloc0_4_i8.c: Regenerate.
	* generated/maxloc0_4_r10.c: Regenerate.
	* generated/maxloc0_4_r16.c: Regenerate.
	* generated/maxloc0_4_r4.c: Regenerate.
	* generated/maxloc0_4_r8.c: Regenerate.
	* generated/maxloc0_8_i1.c: Regenerate.
	* generated/maxloc0_8_i16.c: Regenerate.
	* generated/maxloc0_8_i2.c: Regenerate.
	* generated/maxloc0_8_i4.c: Regenerate.
	* generated/maxloc0_8_i8.c: Regenerate.
	* generated/maxloc0_8_r10.c: Regenerate.
	* generated/maxloc0_8_r16.c: Regenerate.
	* generated/maxloc0_8_r4.c: Regenerate.
	* generated/maxloc0_8_r8.c: Regenerate.
	* generated/maxloc1_16_i1.c: Regenerate.
	* generated/maxloc1_16_i16.c: Regenerate.
	* generated/maxloc1_16_i2.c: Regenerate.
	* generated/maxloc1_16_i4.c: Regenerate.
	* generated/maxloc1_16_i8.c: Regenerate.
	* generated/maxloc1_16_r10.c: Regenerate.
	* generated/maxloc1_16_r16.c: Regenerate.
	* generated/maxloc1_16_r4.c: Regenerate.
	* generated/maxloc1_16_r8.c: Regenerate.
	* generated/maxloc1_4_i1.c: Regenerate.
	* generated/maxloc1_4_i16.c: Regenerate.
	* generated/maxloc1_4_i2.c: Regenerate.
	* generated/maxloc1_4_i4.c: Regenerate.
	* generated/maxloc1_4_i8.c: Regenerate.
	* generated/maxloc1_4_r10.c: Regenerate.
	* generated/maxloc1_4_r16.c: Regenerate.
	* generated/maxloc1_4_r4.c: Regenerate.
	* generated/maxloc1_4_r8.c: Regenerate.
	* generated/maxloc1_8_i1.c: Regenerate.
	* generated/maxloc1_8_i16.c: Regenerate.
	* generated/maxloc1_8_i2.c: Regenerate.
	* generated/maxloc1_8_i4.c: Regenerate.
	* generated/maxloc1_8_i8.c: Regenerate.
	* generated/maxloc1_8_r10.c: Regenerate.
	* generated/maxloc1_8_r16.c: Regenerate.
	* generated/maxloc1_8_r4.c: Regenerate.
	* generated/maxloc1_8_r8.c: Regenerate.
	* generated/maxval_i1.c: Regenerate.
	* generated/maxval_i16.c: Regenerate.
	* generated/maxval_i2.c: Regenerate.
	* generated/maxval_i4.c: Regenerate.
	* generated/maxval_i8.c: Regenerate.
	* generated/maxval_r10.c: Regenerate.
	* generated/maxval_r16.c: Regenerate.
	* generated/maxval_r4.c: Regenerate.
	* generated/maxval_r8.c: Regenerate.
	* generated/minloc0_16_i1.c: Regenerate.
	* generated/minloc0_16_i16.c: Regenerate.
	* generated/minloc0_16_i2.c: Regenerate.
	* generated/minloc0_16_i4.c: Regenerate.
	* generated/minloc0_16_i8.c: Regenerate.
	* generated/minloc0_16_r10.c: Regenerate.
	* generated/minloc0_16_r16.c: Regenerate.
	* generated/minloc0_16_r4.c: Regenerate.
	* generated/minloc0_16_r8.c: Regenerate.
	* generated/minloc0_4_i1.c: Regenerate.
	* generated/minloc0_4_i16.c: Regenerate.
	* generated/minloc0_4_i2.c: Regenerate.
	* generated/minloc0_4_i4.c: Regenerate.
	* generated/minloc0_4_i8.c: Regenerate.
	* generated/minloc0_4_r10.c: Regenerate.
	* generated/minloc0_4_r16.c: Regenerate.
	* generated/minloc0_4_r4.c: Regenerate.
	* generated/minloc0_4_r8.c: Regenerate.
	* generated/minloc0_8_i1.c: Regenerate.
	* generated/minloc0_8_i16.c: Regenerate.
	* generated/minloc0_8_i2.c: Regenerate.
	* generated/minloc0_8_i4.c: Regenerate.
	* generated/minloc0_8_i8.c: Regenerate.
	* generated/minloc0_8_r10.c: Regenerate.
	* generated/minloc0_8_r16.c: Regenerate.
	* generated/minloc0_8_r4.c: Regenerate.
	* generated/minloc0_8_r8.c: Regenerate.
	* generated/minloc1_16_i1.c: Regenerate.
	* generated/minloc1_16_i16.c: Regenerate.
	* generated/minloc1_16_i2.c: Regenerate.
	* generated/minloc1_16_i4.c: Regenerate.
	* generated/minloc1_16_i8.c: Regenerate.
	* generated/minloc1_16_r10.c: Regenerate.
	* generated/minloc1_16_r16.c: Regenerate.
	* generated/minloc1_16_r4.c: Regenerate.
	* generated/minloc1_16_r8.c: Regenerate.
	* generated/minloc1_4_i1.c: Regenerate.
	* generated/minloc1_4_i16.c: Regenerate.
	* generated/minloc1_4_i2.c: Regenerate.
	* generated/minloc1_4_i4.c: Regenerate.
	* generated/minloc1_4_i8.c: Regenerate.
	* generated/minloc1_4_r10.c: Regenerate.
	* generated/minloc1_4_r16.c: Regenerate.
	* generated/minloc1_4_r4.c: Regenerate.
	* generated/minloc1_4_r8.c: Regenerate.
	* generated/minloc1_8_i1.c: Regenerate.
	* generated/minloc1_8_i16.c: Regenerate.
	* generated/minloc1_8_i2.c: Regenerate.
	* generated/minloc1_8_i4.c: Regenerate.
	* generated/minloc1_8_i8.c: Regenerate.
	* generated/minloc1_8_r10.c: Regenerate.
	* generated/minloc1_8_r16.c: Regenerate.
	* generated/minloc1_8_r4.c: Regenerate.
	* generated/minloc1_8_r8.c: Regenerate.
	* generated/minval_i1.c: Regenerate.
	* generated/minval_i16.c: Regenerate.
	* generated/minval_i2.c: Regenerate.
	* generated/minval_i4.c: Regenerate.
	* generated/minval_i8.c: Regenerate.
	* generated/minval_r10.c: Regenerate.
	* generated/minval_r16.c: Regenerate.
	* generated/minval_r4.c: Regenerate.
	* generated/minval_r8.c: Regenerate.
	* generated/norm2_r10.c: Regenerate.
	* generated/norm2_r16.c: Regenerate.
	* generated/norm2_r4.c: Regenerate.
	* generated/norm2_r8.c: Regenerate.
	* generated/pack_c10.c: Regenerate.
	* generated/pack_c16.c: Regenerate.
	* generated/pack_c4.c: Regenerate.
	* generated/pack_c8.c: Regenerate.
	* generated/pack_i1.c: Regenerate.
	* generated/pack_i16.c: Regenerate.
	* generated/pack_i2.c: Regenerate.
	* generated/pack_i4.c: Regenerate.
	* generated/pack_i8.c: Regenerate.
	* generated/pack_r10.c: Regenerate.
	* generated/pack_r16.c: Regenerate.
	* generated/pack_r4.c: Regenerate.
	* generated/pack_r8.c: Regenerate.
	* generated/parity_l1.c: Regenerate.
	* generated/parity_l16.c: Regenerate.
	* generated/parity_l2.c: Regenerate.
	* generated/parity_l4.c: Regenerate.
	* generated/parity_l8.c: Regenerate.
	* generated/product_c10.c: Regenerate.
	* generated/product_c16.c: Regenerate.
	* generated/product_c4.c: Regenerate.
	* generated/product_c8.c: Regenerate.
	* generated/product_i1.c: Regenerate.
	* generated/product_i16.c: Regenerate.
	* generated/product_i2.c: Regenerate.
	* generated/product_i4.c: Regenerate.
	* generated/product_i8.c: Regenerate.
	* generated/product_r10.c: Regenerate.
	* generated/product_r16.c: Regenerate.
	* generated/product_r4.c: Regenerate.
	* generated/product_r8.c: Regenerate.
	* generated/reshape_c10.c: Regenerate.
	* generated/reshape_c16.c: Regenerate.
	* generated/reshape_c4.c: Regenerate.
	* generated/reshape_c8.c: Regenerate.
	* generated/reshape_i16.c: Regenerate.
	* generated/reshape_i4.c: Regenerate.
	* generated/reshape_i8.c: Regenerate.
	* generated/reshape_r10.c: Regenerate.
	* generated/reshape_r16.c: Regenerate.
	* generated/reshape_r4.c: Regenerate.
	* generated/reshape_r8.c: Regenerate.
	* generated/shape_i1.c: Regenerate.
	* generated/shape_i16.c: Regenerate.
	* generated/shape_i2.c: Regenerate.
	* generated/shape_i4.c: Regenerate.
	* generated/shape_i8.c: Regenerate.
	* generated/spread_c10.c: Regenerate.
	* generated/spread_c16.c: Regenerate.
	* generated/spread_c4.c: Regenerate.
	* generated/spread_c8.c: Regenerate.
	* generated/spread_i1.c: Regenerate.
	* generated/spread_i16.c: Regenerate.
	* generated/spread_i2.c: Regenerate.
	* generated/spread_i4.c: Regenerate.
	* generated/spread_i8.c: Regenerate.
	* generated/spread_r10.c: Regenerate.
	* generated/spread_r16.c: Regenerate.
	* generated/spread_r4.c: Regenerate.
	* generated/spread_r8.c: Regenerate.
	* generated/sum_c10.c: Regenerate.
	* generated/sum_c16.c: Regenerate.
	* generated/sum_c4.c: Regenerate.
	* generated/sum_c8.c: Regenerate.
	* generated/sum_i1.c: Regenerate.
	* generated/sum_i16.c: Regenerate.
	* generated/sum_i2.c: Regenerate.
	* generated/sum_i4.c: Regenerate.
	* generated/sum_i8.c: Regenerate.
	* generated/sum_r10.c: Regenerate.
	* generated/sum_r16.c: Regenerate.
	* generated/sum_r4.c: Regenerate.
	* generated/sum_r8.c: Regenerate.
	* generated/unpack_c10.c: Regenerate.
	* generated/unpack_c16.c: Regenerate.
	* generated/unpack_c4.c: Regenerate.
	* generated/unpack_c8.c: Regenerate.
	* generated/unpack_i1.c: Regenerate.
	* generated/unpack_i16.c: Regenerate.
	* generated/unpack_i2.c: Regenerate.
	* generated/unpack_i4.c: Regenerate.
	* generated/unpack_i8.c: Regenerate.
	* generated/unpack_r10.c: Regenerate.
	* generated/unpack_r16.c: Regenerate.
	* generated/unpack_r4.c: Regenerate.
	* generated/unpack_r8.c: Regenerate.

From-SVN: r243846
2016-12-21 10:41:57 +00:00
Francois-Xavier Coudert 981c0cd1bc abort.c: Remove unused headers.
* intrinsics/abort.c: Remove unused headers.
	* intrinsics/access.c: Remove unused headers.
	* intrinsics/chdir.c: Remove unused headers.
	* intrinsics/chmod.c: Remove unused headers.
	* intrinsics/cshift0.c: Remove unused headers.
	* intrinsics/ctime.c: Remove unused headers.
	* intrinsics/eoshift0.c: Remove unused headers.
	* intrinsics/eoshift2.c: Remove unused headers.
	* intrinsics/extends_type_of.c: Remove unused headers.
	* intrinsics/link.c: Remove unused headers.
	* intrinsics/pack_generic.c: Remove unused headers.
	* intrinsics/perror.c: Remove unused headers.
	* intrinsics/rename.c: Remove unused headers.
	* intrinsics/reshape_generic.c: Remove unused headers.
	* intrinsics/sleep.c: Remove unused headers.
	* intrinsics/spread_generic.c: Remove unused headers.
	* intrinsics/stat.c: Remove unused headers.
	* intrinsics/string_intrinsics.c: Remove unused headers.
	* intrinsics/symlnk.c: Remove unused headers.
	* intrinsics/system.c: Remove unused headers.
	* intrinsics/umask.c: Remove unused headers.
	* intrinsics/unlink.c: Remove unused headers.
	* intrinsics/unpack_generic.c: Remove unused headers.
	* io/read.c: Remove unused headers.
	* io/transfer.c: Remove unused headers.
	* io/unix.c: Remove unused headers.
	* io/write.c: Remove unused headers.
	* m4/all.m4: Remove unused headers.
	* m4/any.m4: Remove unused headers.
	* m4/bessel.m4: Remove unused headers.
	* m4/count.m4: Remove unused headers.
	* m4/cshift0.m4: Remove unused headers.
	* m4/cshift1.m4: Remove unused headers.
	* m4/eoshift1.m4: Remove unused headers.
	* m4/eoshift3.m4: Remove unused headers.
	* m4/iall.m4: Remove unused headers.
	* m4/iany.m4: Remove unused headers.
	* m4/in_pack.m4: Remove unused headers.
	* m4/in_unpack.m4: Remove unused headers.
	* m4/iparity.m4: Remove unused headers.
	* m4/maxloc0.m4: Remove unused headers.
	* m4/maxloc1.m4: Remove unused headers.
	* m4/maxval.m4: Remove unused headers.
	* m4/minloc0.m4: Remove unused headers.
	* m4/minloc1.m4: Remove unused headers.
	* m4/minval.m4: Remove unused headers.
	* m4/norm2.m4: Remove unused headers.
	* m4/pack.m4: Remove unused headers.
	* m4/parity.m4: Remove unused headers.
	* m4/product.m4: Remove unused headers.
	* m4/reshape.m4: Remove unused headers.
	* m4/shape.m4: Remove unused headers.
	* m4/spread.m4: Remove unused headers.
	* m4/sum.m4: Remove unused headers.
	* m4/unpack.m4: Remove unused headers.
	* runtime/backtrace.c: Remove unused headers.
	* runtime/convert_char.c: Remove unused headers.
	* runtime/in_pack_generic.c: Remove unused headers.
	* runtime/in_unpack_generic.c: Remove unused headers.
	* runtime/main.c: Remove unused headers.
	* runtime/stop.c: Remove unused headers.
	* generated/all_l1.c: Regenerate.
	* generated/all_l16.c: Regenerate.
	* generated/all_l2.c: Regenerate.
	* generated/all_l4.c: Regenerate.
	* generated/all_l8.c: Regenerate.
	* generated/any_l1.c: Regenerate.
	* generated/any_l16.c: Regenerate.
	* generated/any_l2.c: Regenerate.
	* generated/any_l4.c: Regenerate.
	* generated/any_l8.c: Regenerate.
	* generated/bessel_r10.c: Regenerate.
	* generated/bessel_r16.c: Regenerate.
	* generated/bessel_r4.c: Regenerate.
	* generated/bessel_r8.c: Regenerate.
	* generated/count_16_l.c: Regenerate.
	* generated/count_1_l.c: Regenerate.
	* generated/count_2_l.c: Regenerate.
	* generated/count_4_l.c: Regenerate.
	* generated/count_8_l.c: Regenerate.
	* generated/cshift0_c10.c: Regenerate.
	* generated/cshift0_c16.c: Regenerate.
	* generated/cshift0_c4.c: Regenerate.
	* generated/cshift0_c8.c: Regenerate.
	* generated/cshift0_i1.c: Regenerate.
	* generated/cshift0_i16.c: Regenerate.
	* generated/cshift0_i2.c: Regenerate.
	* generated/cshift0_i4.c: Regenerate.
	* generated/cshift0_i8.c: Regenerate.
	* generated/cshift0_r10.c: Regenerate.
	* generated/cshift0_r16.c: Regenerate.
	* generated/cshift0_r4.c: Regenerate.
	* generated/cshift0_r8.c: Regenerate.
	* generated/cshift1_16.c: Regenerate.
	* generated/cshift1_4.c: Regenerate.
	* generated/cshift1_8.c: Regenerate.
	* generated/eoshift1_16.c: Regenerate.
	* generated/eoshift1_4.c: Regenerate.
	* generated/eoshift1_8.c: Regenerate.
	* generated/eoshift3_16.c: Regenerate.
	* generated/eoshift3_4.c: Regenerate.
	* generated/eoshift3_8.c: Regenerate.
	* generated/iall_i1.c: Regenerate.
	* generated/iall_i16.c: Regenerate.
	* generated/iall_i2.c: Regenerate.
	* generated/iall_i4.c: Regenerate.
	* generated/iall_i8.c: Regenerate.
	* generated/iany_i1.c: Regenerate.
	* generated/iany_i16.c: Regenerate.
	* generated/iany_i2.c: Regenerate.
	* generated/iany_i4.c: Regenerate.
	* generated/iany_i8.c: Regenerate.
	* generated/in_pack_c10.c: Regenerate.
	* generated/in_pack_c16.c: Regenerate.
	* generated/in_pack_c4.c: Regenerate.
	* generated/in_pack_c8.c: Regenerate.
	* generated/in_pack_i1.c: Regenerate.
	* generated/in_pack_i16.c: Regenerate.
	* generated/in_pack_i2.c: Regenerate.
	* generated/in_pack_i4.c: Regenerate.
	* generated/in_pack_i8.c: Regenerate.
	* generated/in_pack_r10.c: Regenerate.
	* generated/in_pack_r16.c: Regenerate.
	* generated/in_pack_r4.c: Regenerate.
	* generated/in_pack_r8.c: Regenerate.
	* generated/in_unpack_c10.c: Regenerate.
	* generated/in_unpack_c16.c: Regenerate.
	* generated/in_unpack_c4.c: Regenerate.
	* generated/in_unpack_c8.c: Regenerate.
	* generated/in_unpack_i1.c: Regenerate.
	* generated/in_unpack_i16.c: Regenerate.
	* generated/in_unpack_i2.c: Regenerate.
	* generated/in_unpack_i4.c: Regenerate.
	* generated/in_unpack_i8.c: Regenerate.
	* generated/in_unpack_r10.c: Regenerate.
	* generated/in_unpack_r16.c: Regenerate.
	* generated/in_unpack_r4.c: Regenerate.
	* generated/in_unpack_r8.c: Regenerate.
	* generated/iparity_i1.c: Regenerate.
	* generated/iparity_i16.c: Regenerate.
	* generated/iparity_i2.c: Regenerate.
	* generated/iparity_i4.c: Regenerate.
	* generated/iparity_i8.c: Regenerate.
	* generated/maxloc0_16_i1.c: Regenerate.
	* generated/maxloc0_16_i16.c: Regenerate.
	* generated/maxloc0_16_i2.c: Regenerate.
	* generated/maxloc0_16_i4.c: Regenerate.
	* generated/maxloc0_16_i8.c: Regenerate.
	* generated/maxloc0_16_r10.c: Regenerate.
	* generated/maxloc0_16_r16.c: Regenerate.
	* generated/maxloc0_16_r4.c: Regenerate.
	* generated/maxloc0_16_r8.c: Regenerate.
	* generated/maxloc0_4_i1.c: Regenerate.
	* generated/maxloc0_4_i16.c: Regenerate.
	* generated/maxloc0_4_i2.c: Regenerate.
	* generated/maxloc0_4_i4.c: Regenerate.
	* generated/maxloc0_4_i8.c: Regenerate.
	* generated/maxloc0_4_r10.c: Regenerate.
	* generated/maxloc0_4_r16.c: Regenerate.
	* generated/maxloc0_4_r4.c: Regenerate.
	* generated/maxloc0_4_r8.c: Regenerate.
	* generated/maxloc0_8_i1.c: Regenerate.
	* generated/maxloc0_8_i16.c: Regenerate.
	* generated/maxloc0_8_i2.c: Regenerate.
	* generated/maxloc0_8_i4.c: Regenerate.
	* generated/maxloc0_8_i8.c: Regenerate.
	* generated/maxloc0_8_r10.c: Regenerate.
	* generated/maxloc0_8_r16.c: Regenerate.
	* generated/maxloc0_8_r4.c: Regenerate.
	* generated/maxloc0_8_r8.c: Regenerate.
	* generated/maxloc1_16_i1.c: Regenerate.
	* generated/maxloc1_16_i16.c: Regenerate.
	* generated/maxloc1_16_i2.c: Regenerate.
	* generated/maxloc1_16_i4.c: Regenerate.
	* generated/maxloc1_16_i8.c: Regenerate.
	* generated/maxloc1_16_r10.c: Regenerate.
	* generated/maxloc1_16_r16.c: Regenerate.
	* generated/maxloc1_16_r4.c: Regenerate.
	* generated/maxloc1_16_r8.c: Regenerate.
	* generated/maxloc1_4_i1.c: Regenerate.
	* generated/maxloc1_4_i16.c: Regenerate.
	* generated/maxloc1_4_i2.c: Regenerate.
	* generated/maxloc1_4_i4.c: Regenerate.
	* generated/maxloc1_4_i8.c: Regenerate.
	* generated/maxloc1_4_r10.c: Regenerate.
	* generated/maxloc1_4_r16.c: Regenerate.
	* generated/maxloc1_4_r4.c: Regenerate.
	* generated/maxloc1_4_r8.c: Regenerate.
	* generated/maxloc1_8_i1.c: Regenerate.
	* generated/maxloc1_8_i16.c: Regenerate.
	* generated/maxloc1_8_i2.c: Regenerate.
	* generated/maxloc1_8_i4.c: Regenerate.
	* generated/maxloc1_8_i8.c: Regenerate.
	* generated/maxloc1_8_r10.c: Regenerate.
	* generated/maxloc1_8_r16.c: Regenerate.
	* generated/maxloc1_8_r4.c: Regenerate.
	* generated/maxloc1_8_r8.c: Regenerate.
	* generated/maxval_i1.c: Regenerate.
	* generated/maxval_i16.c: Regenerate.
	* generated/maxval_i2.c: Regenerate.
	* generated/maxval_i4.c: Regenerate.
	* generated/maxval_i8.c: Regenerate.
	* generated/maxval_r10.c: Regenerate.
	* generated/maxval_r16.c: Regenerate.
	* generated/maxval_r4.c: Regenerate.
	* generated/maxval_r8.c: Regenerate.
	* generated/minloc0_16_i1.c: Regenerate.
	* generated/minloc0_16_i16.c: Regenerate.
	* generated/minloc0_16_i2.c: Regenerate.
	* generated/minloc0_16_i4.c: Regenerate.
	* generated/minloc0_16_i8.c: Regenerate.
	* generated/minloc0_16_r10.c: Regenerate.
	* generated/minloc0_16_r16.c: Regenerate.
	* generated/minloc0_16_r4.c: Regenerate.
	* generated/minloc0_16_r8.c: Regenerate.
	* generated/minloc0_4_i1.c: Regenerate.
	* generated/minloc0_4_i16.c: Regenerate.
	* generated/minloc0_4_i2.c: Regenerate.
	* generated/minloc0_4_i4.c: Regenerate.
	* generated/minloc0_4_i8.c: Regenerate.
	* generated/minloc0_4_r10.c: Regenerate.
	* generated/minloc0_4_r16.c: Regenerate.
	* generated/minloc0_4_r4.c: Regenerate.
	* generated/minloc0_4_r8.c: Regenerate.
	* generated/minloc0_8_i1.c: Regenerate.
	* generated/minloc0_8_i16.c: Regenerate.
	* generated/minloc0_8_i2.c: Regenerate.
	* generated/minloc0_8_i4.c: Regenerate.
	* generated/minloc0_8_i8.c: Regenerate.
	* generated/minloc0_8_r10.c: Regenerate.
	* generated/minloc0_8_r16.c: Regenerate.
	* generated/minloc0_8_r4.c: Regenerate.
	* generated/minloc0_8_r8.c: Regenerate.
	* generated/minloc1_16_i1.c: Regenerate.
	* generated/minloc1_16_i16.c: Regenerate.
	* generated/minloc1_16_i2.c: Regenerate.
	* generated/minloc1_16_i4.c: Regenerate.
	* generated/minloc1_16_i8.c: Regenerate.
	* generated/minloc1_16_r10.c: Regenerate.
	* generated/minloc1_16_r16.c: Regenerate.
	* generated/minloc1_16_r4.c: Regenerate.
	* generated/minloc1_16_r8.c: Regenerate.
	* generated/minloc1_4_i1.c: Regenerate.
	* generated/minloc1_4_i16.c: Regenerate.
	* generated/minloc1_4_i2.c: Regenerate.
	* generated/minloc1_4_i4.c: Regenerate.
	* generated/minloc1_4_i8.c: Regenerate.
	* generated/minloc1_4_r10.c: Regenerate.
	* generated/minloc1_4_r16.c: Regenerate.
	* generated/minloc1_4_r4.c: Regenerate.
	* generated/minloc1_4_r8.c: Regenerate.
	* generated/minloc1_8_i1.c: Regenerate.
	* generated/minloc1_8_i16.c: Regenerate.
	* generated/minloc1_8_i2.c: Regenerate.
	* generated/minloc1_8_i4.c: Regenerate.
	* generated/minloc1_8_i8.c: Regenerate.
	* generated/minloc1_8_r10.c: Regenerate.
	* generated/minloc1_8_r16.c: Regenerate.
	* generated/minloc1_8_r4.c: Regenerate.
	* generated/minloc1_8_r8.c: Regenerate.
	* generated/minval_i1.c: Regenerate.
	* generated/minval_i16.c: Regenerate.
	* generated/minval_i2.c: Regenerate.
	* generated/minval_i4.c: Regenerate.
	* generated/minval_i8.c: Regenerate.
	* generated/minval_r10.c: Regenerate.
	* generated/minval_r16.c: Regenerate.
	* generated/minval_r4.c: Regenerate.
	* generated/minval_r8.c: Regenerate.
	* generated/norm2_r10.c: Regenerate.
	* generated/norm2_r16.c: Regenerate.
	* generated/norm2_r4.c: Regenerate.
	* generated/norm2_r8.c: Regenerate.
	* generated/pack_c10.c: Regenerate.
	* generated/pack_c16.c: Regenerate.
	* generated/pack_c4.c: Regenerate.
	* generated/pack_c8.c: Regenerate.
	* generated/pack_i1.c: Regenerate.
	* generated/pack_i16.c: Regenerate.
	* generated/pack_i2.c: Regenerate.
	* generated/pack_i4.c: Regenerate.
	* generated/pack_i8.c: Regenerate.
	* generated/pack_r10.c: Regenerate.
	* generated/pack_r16.c: Regenerate.
	* generated/pack_r4.c: Regenerate.
	* generated/pack_r8.c: Regenerate.
	* generated/parity_l1.c: Regenerate.
	* generated/parity_l16.c: Regenerate.
	* generated/parity_l2.c: Regenerate.
	* generated/parity_l4.c: Regenerate.
	* generated/parity_l8.c: Regenerate.
	* generated/product_c10.c: Regenerate.
	* generated/product_c16.c: Regenerate.
	* generated/product_c4.c: Regenerate.
	* generated/product_c8.c: Regenerate.
	* generated/product_i1.c: Regenerate.
	* generated/product_i16.c: Regenerate.
	* generated/product_i2.c: Regenerate.
	* generated/product_i4.c: Regenerate.
	* generated/product_i8.c: Regenerate.
	* generated/product_r10.c: Regenerate.
	* generated/product_r16.c: Regenerate.
	* generated/product_r4.c: Regenerate.
	* generated/product_r8.c: Regenerate.
	* generated/reshape_c10.c: Regenerate.
	* generated/reshape_c16.c: Regenerate.
	* generated/reshape_c4.c: Regenerate.
	* generated/reshape_c8.c: Regenerate.
	* generated/reshape_i16.c: Regenerate.
	* generated/reshape_i4.c: Regenerate.
	* generated/reshape_i8.c: Regenerate.
	* generated/reshape_r10.c: Regenerate.
	* generated/reshape_r16.c: Regenerate.
	* generated/reshape_r4.c: Regenerate.
	* generated/reshape_r8.c: Regenerate.
	* generated/shape_i1.c: Regenerate.
	* generated/shape_i16.c: Regenerate.
	* generated/shape_i2.c: Regenerate.
	* generated/shape_i4.c: Regenerate.
	* generated/shape_i8.c: Regenerate.
	* generated/spread_c10.c: Regenerate.
	* generated/spread_c16.c: Regenerate.
	* generated/spread_c4.c: Regenerate.
	* generated/spread_c8.c: Regenerate.
	* generated/spread_i1.c: Regenerate.
	* generated/spread_i16.c: Regenerate.
	* generated/spread_i2.c: Regenerate.
	* generated/spread_i4.c: Regenerate.
	* generated/spread_i8.c: Regenerate.
	* generated/spread_r10.c: Regenerate.
	* generated/spread_r16.c: Regenerate.
	* generated/spread_r4.c: Regenerate.
	* generated/spread_r8.c: Regenerate.
	* generated/sum_c10.c: Regenerate.
	* generated/sum_c16.c: Regenerate.
	* generated/sum_c4.c: Regenerate.
	* generated/sum_c8.c: Regenerate.
	* generated/sum_i1.c: Regenerate.
	* generated/sum_i16.c: Regenerate.
	* generated/sum_i2.c: Regenerate.
	* generated/sum_i4.c: Regenerate.
	* generated/sum_i8.c: Regenerate.
	* generated/sum_r10.c: Regenerate.
	* generated/sum_r16.c: Regenerate.
	* generated/sum_r4.c: Regenerate.
	* generated/sum_r8.c: Regenerate.
	* generated/unpack_c10.c: Regenerate.
	* generated/unpack_c16.c: Regenerate.
	* generated/unpack_c4.c: Regenerate.
	* generated/unpack_c8.c: Regenerate.
	* generated/unpack_i1.c: Regenerate.
	* generated/unpack_i16.c: Regenerate.
	* generated/unpack_i2.c: Regenerate.
	* generated/unpack_i4.c: Regenerate.
	* generated/unpack_i8.c: Regenerate.
	* generated/unpack_r10.c: Regenerate.
	* generated/unpack_r16.c: Regenerate.
	* generated/unpack_r4.c: Regenerate.
	* generated/unpack_r8.c: Regenerate.

From-SVN: r243844
2016-12-21 10:26:14 +00:00
Francois-Xavier Coudert 71d9113f9b re PR libfortran/70311 (libgfortran build dies on "implicit declaration of function strncasecmp")
PR libfortran/70311
	* intrinsics/selected_char_kind.c: Include <strings.h> header.
	* runtime/environ.c: Include <strings.h> header.
	* runtime/string.c: Include <strings.h> header.

From-SVN: r243843
2016-12-21 09:49:40 +00:00
Francois-Xavier Coudert f7db9ebf2b iresolve.c (gfc_resolve_ftell): Call "ftell" instead of "ftell2".
* iresolve.c (gfc_resolve_ftell): Call "ftell" instead of "ftell2".

	* gfortran.map: Remove _gfortran_ftell2.
	* io/intrinsics.c (ftell): Remove.
	(ftell2): Rename to ftell.

From-SVN: r243841
2016-12-21 09:35:57 +00:00
Francois-Xavier Coudert 815ee97417 gfortran.map: Move all _gfortran_* __iso_c_binding_* symbols to GFORTRAN_7.
* gfortran.map: Move all _gfortran_* __iso_c_binding_* symbols
	to GFORTRAN_7. Rename F2C_1.0 to GFORTRAN_F2C_7. Move all C99
	compatibility symbols to GFORTRAN_C99_7.

From-SVN: r243839
2016-12-21 09:15:39 +00:00
Francois-Xavier Coudert 75b07bb45a trans-decl.c (create_main_function): Remove unused elements to the set_options call.
* trans-decl.c (create_main_function): Remove unused elements to
	the set_options call.

	* runtime/compile_options.c (set_options): Remove unused elements.

From-SVN: r243814
2016-12-19 22:29:43 +00:00
Janne Blomqvist 4daecdb623 Remove unused functions, take 2.
2016-12-19  Janne Blomqvist  <jb@gcc.gnu.org>

      * Actually remove files that should have been removed by r243799.
This line, and those below, will be ignored--

M    libgfortran/ChangeLog
D    libgfortran/generated/exponent_r10.c
D    libgfortran/generated/exponent_r16.c
D    libgfortran/generated/exponent_r4.c
D    libgfortran/generated/exponent_r8.c
D    libgfortran/generated/fraction_r10.c
D    libgfortran/generated/fraction_r16.c
D    libgfortran/generated/fraction_r4.c
D    libgfortran/generated/fraction_r8.c
D    libgfortran/generated/nearest_r10.c
D    libgfortran/generated/nearest_r16.c
D    libgfortran/generated/nearest_r4.c
D    libgfortran/generated/nearest_r8.c
D    libgfortran/generated/rrspacing_r10.c
D    libgfortran/generated/rrspacing_r16.c
D    libgfortran/generated/rrspacing_r4.c
D    libgfortran/generated/rrspacing_r8.c
D    libgfortran/generated/set_exponent_r10.c
D    libgfortran/generated/set_exponent_r16.c
D    libgfortran/generated/set_exponent_r4.c
D    libgfortran/generated/set_exponent_r8.c
D    libgfortran/generated/spacing_r10.c
D    libgfortran/generated/spacing_r16.c
D    libgfortran/generated/spacing_r4.c
D    libgfortran/generated/spacing_r8.c
D    libgfortran/generated/transpose_c10.c
D    libgfortran/generated/transpose_c16.c
D    libgfortran/generated/transpose_c4.c
D    libgfortran/generated/transpose_c8.c
D    libgfortran/generated/transpose_i16.c
D    libgfortran/generated/transpose_i4.c
D    libgfortran/generated/transpose_i8.c
D    libgfortran/generated/transpose_r10.c
D    libgfortran/generated/transpose_r16.c
D    libgfortran/generated/transpose_r4.c
D    libgfortran/generated/transpose_r8.c
D    libgfortran/intrinsics/malloc.c
D    libgfortran/intrinsics/transpose_generic.c
D    libgfortran/m4/exponent.m4
D    libgfortran/m4/fraction.m4
D    libgfortran/m4/nearest.m4
D    libgfortran/m4/rrspacing.m4
D    libgfortran/m4/set_exponent.m4
D    libgfortran/m4/spacing.m4
D    libgfortran/m4/transpose.m4

From-SVN: r243804
2016-12-19 18:20:09 +02:00
Francois-Xavier Coudert 03506f8cc3 trans.h: Remove gfor_fndecl_stop_numeric_f08.
* trans.h: Remove gfor_fndecl_stop_numeric_f08.
	* trans-decl.c: Remove gfor_fndecl_stop_numeric_f08.
	* trans-stmt.c (gfc_trans_stop): Use gfor_fndecl_stop_numeric
	instead of gfor_fndecl_stop_numeric_f08.

	* gfortran.map: Remove _gfortran_stop_numeric_f08.
	* runtime/stop.c: Rename stop_numeric_f08 into stop_numeric.

From-SVN: r243803
2016-12-19 16:09:12 +00:00
François-Xavier Coudert c52b53d629 * Makefile.in: Regenerate.
From-SVN: r243802
2016-12-19 16:04:19 +00:00
Francois-Xavier Coudert adc905cd6c Makefile.am: Remove ISO_C_BINDING runtime functions.
* Makefile.am: Remove ISO_C_BINDING runtime functions.
	* Makefile.in: Regenerate.
	* gfortran.map: Remove all __iso_c_binding_c_f_pointer_* symbols.
	* intrinsics/iso_c_binding.h: Remove.
	* intrinsics/iso_c_binding.c: Remove.
	* intrinsics/iso_c_generated_procs.c: Remove.

From-SVN: r243801
2016-12-19 16:03:53 +00:00
Francois-Xavier Coudert bed192f40a Makefile.am: Remove intrinsics/bit_intrinsics.c.
* Makefile.am: Remove intrinsics/bit_intrinsics.c.
	* Makefile.in: Regenerate.
	* gfortran.map: Remove _gfortran_clz128 and _gfortran_ctz128.
	* intrinsics/bit_intrinsics.c: Remove.

From-SVN: r243800
2016-12-19 16:00:42 +00:00
Janne Blomqvist 7e294024ad Remove unused libgfortran functions
Now that the libgfortran ABI major version has been bumped, we can
remove functions for which the frontend nowadays generates inline
code.

This removes the malloc, free, exponent, fraction, nearest, rrspacing,
spacing, set_exponent and transpose intrinsics. Also the unused
store_exe_path function is removed.

2016-12-19  Janne Blomqvist  <jb@gcc.gnu.org>

	* Makefile.am: Remove exponent, fraction, nearest, rrspacing,
	set_exponent, spacing, transpose, malloc, transpose_generic.
	* Makefile.in: Regenerate.
	* generated/exponent_r10.c: Remove.
	* generated/exponent_r16.c: Remove.
	* generated/exponent_r4.c: Remove.
	* generated/exponent_r8.c: Remove.
	* generated/fraction_r10.c: Remove.
	* generated/fraction_r16.c: Remove.
	* generated/fraction_r4.c: Remove.
	* generated/fraction_r8.c: Remove.
	* generated/nearest_r10.c: Remove.
	* generated/nearest_r16.c: Remove.
	* generated/nearest_r4.c: Remove.
	* generated/nearest_r8.c: Remove.
	* generated/rrspacing_r10.c: Remove.
	* generated/rrspacing_r16.c: Remove.
	* generated/rrspacing_r4.c: Remove.
	* generated/rrspacing_r8.c: Remove.
	* generated/set_exponent_r10.c: Remove.
	* generated/set_exponent_r16.c: Remove.
	* generated/set_exponent_r4.c: Remove.
	* generated/set_exponent_r8.c: Remove.
	* generated/spacing_r10.c: Remove.
	* generated/spacing_r16.c: Remove.
	* generated/spacing_r4.c: Remove.
	* generated/spacing_r8.c: Remove.
	* generated/transpose_c10.c: Remove.
	* generated/transpose_c16.c: Remove.
	* generated/transpose_c4.c: Remove.
	* generated/transpose_c8.c: Remove.
	* generated/transpose_i16.c: Remove.
	* generated/transpose_i4.c: Remove.
	* generated/transpose_i8.c: Remove.
	* generated/transpose_r10.c: Remove.
	* generated/transpose_r16.c: Remove.
	* generated/transpose_r4.c: Remove.
	* generated/transpose_r8.c: Remove.
	* gfortran.map: Remove exponent, fraction, nearest, rrspacing,
	set_exponent, spacing, transpose, malloc, free, transpose_generic,
	store_exe_path.
	* intrinsics/malloc.c: Remove.
	* intrinsics/transpose_generic.c: Remove.
	* libgfortran.h (store_exe_path): Remove.
	* m4/exponent.m4: Remove.
	* m4/fraction.m4: Remove.
	* m4/nearest.m4: Remove.
	* m4/rrspacing.m4: Remove.
	* m4/set_exponent.m4: Remove.
	* m4/spacing.m4: Remove.
	* m4/transpose.m4: Remove.
	* runtime/main.c (store_exe_path): Remove.

From-SVN: r243799
2016-12-19 17:32:17 +02:00
Francois-Xavier Coudert dc31c238bd chmod.c (chmod_internal): Fix case where mode_t is different from unsigned int.
* intrinsics/chmod.c (chmod_internal): Fix case where mode_t is
	different from unsigned int.

From-SVN: r243796
2016-12-19 13:41:32 +00:00
Dominique d'Humieres 1feb2bedae re PR fortran/78545 (Possible correction to online LTIME documentation)
2016-12-18  Dominique d'Humieres  <dominiq@lps.ens.fr>

	PR fortran/78545
	* intrinsic.texi: Fix documentation for GMTIME and LTIME.

	* intrinsics/date_and_time.c: Fix comments for GMTIME and LTIME.

From-SVN: r243785
2016-12-18 19:03:36 +01:00