Skip to content
Snippets Groups Projects
  1. Jan 02, 2020
    • Jerry DeLisle's avatar
      PR 90374 d0.d, e0.d, es0.d, en0.d, g0.d and ew.d edit descriptors. · 2b70275e
      Jerry DeLisle authored
              PR libfortran/90274
              * io/format.c (parse_format_list): Implement the E0 exponent
              width to provide smallest possible width for exponent fields.
              Refactor code for correct parsing and better readability of the
              code.
              * io/io.h (write_real_w0): Change interface to pass in pointer
              to fnode.
              * io/transfer.c: Update all calls to write_real_w0 to use the
              new interface.
              * io/write.c ((write_real_w0): Use the new interface with fnode
              to access both the decimal precision and exponent widths used in
              build_float_string.
              * io/write_float.def (build_float_string): Use the passed in
              exponent width to calculate the used width in the case of E0.
      
      From-SVN: r279828
      2b70275e
  2. Jan 01, 2020
  3. Dec 01, 2019
  4. Nov 28, 2019
    • Jerry DeLisle's avatar
      re PR libfortran/90374 (Fortran 2018: Support d0.d, e0.d, es0.d, en0.d, g0.d... · 68c28e37
      Jerry DeLisle authored
      re PR libfortran/90374 (Fortran 2018: Support d0.d, e0.d, es0.d, en0.d, g0.d and ew.d e0 edit descriptors for output)
      
      	PR fortran/90374
      	* io.c (check_format): Allow zero width expoenent with e0.
      
      	* io/format.c (parse_format_list): Relax format checking to allow
      	e0 exponent specifier.
      
      	* gfortran.dg/fmt_zero_width.f90: Update test.
      
      From-SVN: r278817
      68c28e37
  5. Nov 24, 2019
    • Jerry DeLisle's avatar
      re PR libfortran/92100 (Formatted stream IO irreproducible read with binary data in file) · 73af0c7b
      Jerry DeLisle authored
      2019-11-24  Jerry DeLisle  <jvdelisle@gcc.ngu.org>
      
      	PR fortran/92100
      	io/transfer.c (data_transfer_init_worker): Use fbuf_reset
      	instead of fbuf_flush before the seek. Note that fbuf_reset
      	calls fbuf_flush and adjusts fbuf pointers.
      
      From-SVN: r278660
      73af0c7b
    • Thomas Koenig's avatar
      Fix EOF handling for arrays. · 859174c8
      Thomas Koenig authored
      
      2019-11-23  Thomas Koenig  <tkoenig@gcc.gnu.org>
      	Harald Anlauf <anlauf@gmx.de>
      
      	PR fortran/92569
      	* io/transfer.c (transfer_array_inner):  If position is
      	at AFTER_ENDFILE in current unit, return from data loop.
      
      2019-11-23  Thomas Koenig  <tkoenig@gcc.gnu.org>
      	Harald Anlauf <anlauf@gmx.de>
      
      	PR fortran/92569
      	* gfortran.dg/eof_6.f90: New test.
      
      
      Co-Authored-By: default avatarHarald Anlauf <anlauf@gmx.de>
      
      From-SVN: r278659
      859174c8
  6. Nov 18, 2019
  7. Nov 13, 2019
    • Tobias Burnus's avatar
      PR fortran/92470 Fixes for CFI_address · 46927ade
      Tobias Burnus authored
              libgfortran/
              PR fortran/92470
              * runtime/ISO_Fortran_binding.c (CFI_establish): Set lower_bound to 0
              also for CFI_attribute_other.
      
              gcc/testsuite/
              PR fortran/92470
              * gfortran.dg/ISO_Fortran_binding_1.c (establish_c): Add assert for
              lower_bound == 0.
      
      From-SVN: r278128
      46927ade
  8. Nov 12, 2019
    • Tobias Burnus's avatar
      PR fortran/92470 Fixes for CFI_address · fde7112d
      Tobias Burnus authored
              libgfortran/
              PR fortran/92470
              * runtime/ISO_Fortran_binding.c (CFI_address): Handle non-zero
              lower_bound; update error message.
              (CFI_allocate): Fix comment typo.
              (CFI_establish): Fix identation, fix typos, don't check values of 'dv'
              argument.
      
              gcc/testsuite/
              PR fortran/92470
              * gfortran.dg/ISO_Fortran_binding_17.c: New.
              * gfortran.dg/ISO_Fortran_binding_17.f90: New.
              * gfortran.dg/ISO_Fortran_binding_1.c (elemental_mult_c, allocate_c,
              section_c, select_part_c): Update for CFI_{address} changes;
              add asserts.
      
      From-SVN: r278101
      fde7112d
  9. Nov 11, 2019
    • José Rui Faustino de Sousa's avatar
      PR fortran/92142 - CFI_setpointer corrupts descriptor · 3f246567
      José Rui Faustino de Sousa authored
      2019-11-11  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
      
              libgfortran/
              PR fortran/92142
              * runtime/ISO_Fortran_binding.c (CFI_setpointer): Don't
              override descriptor attribute; with -fcheck, check that
              it is a pointer.
      
              gcc/testsuite/
              PR fortran/92142
              * gcc/testsuite/gfortran.dg/ISO_Fortran_binding_16.c: New.
              * gcc/testsuite/gfortran.dg/ISO_Fortran_binding_16.f90: New.
              * gcc/testsuite/gfortran.dg/ISO_Fortran_binding_10.c: Correct
              upper bounds for case 0.
      
      From-SVN: r278048
      3f246567
  10. Nov 07, 2019
    • Jerry DeLisle's avatar
      re PR libfortran/90374 (Fortran 2018: Support d0.d, e0.d, es0.d, en0.d, g0.d... · 67732fbc
      Jerry DeLisle authored
      re PR libfortran/90374 (Fortran 2018: Support d0.d, e0.d, es0.d, en0.d, g0.d and ew.d e0 edit descriptors for output)
      
      2019-11-06  Jerry DeLisle  <jvdelisle@gcc.ngu.org>
      
      	PR fortran/90374
      	* io.c (check_format): Allow zero width for D, E, EN, and ES
      	specifiers as default and when -std=F2018 is given. Retain
      	existing errors when using the -fdec family of flags.
      
      	* libgfortran/io/format.c (parse_format_list): Relax format checking for
      	zero width as default and when -std=f2018.
      	io/format.h (format_token): Move definition to io.h.
      	io/io.h (format_token): Add definition here to allow access to
      	this definition at higher levels. Rename the declaration of
      	write_real_g0 to write_real_w0 and add a new format_token
      	argument, allowing higher level functions to pass in the
      	token for handling of g0 vs the other zero width specifiers.
      	io/transfer.c (formatted_transfer_scalar_write): Add checks for
      	zero width and call write_real_w0 to handle it.
      	io/write.c (write_real_g0): Remove.
      	(write_real_w0): Add new, same as previous write_real_g0 except
      	check format token to handle the g0 case.
      
      	* gfortran.dg/fmt_error_10.f: Modify for new constraints.
      	* gfortran.dg/fmt_error_7.f: Add dg-options "-std=f95".
      	* gfortran.dg/fmt_error_9.f: Modify for new constraints.
      	* gfortran.dg/fmt_zero_width.f90: New test.
      
      From-SVN: r277905
      67732fbc
  11. Oct 31, 2019
    • Tobias Burnus's avatar
      Fortran] PR92284 – gfc_desc_to_cfi_desc fixes · fc5a9708
      Tobias Burnus authored
              gcc/fortran/
              PR fortran/92284.
              * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Free CFI descriptor
              at the end; partial revised revert of Rev. 277502.
      
              libgfortran/
              PR fortran/92284.
              * runtime/ISO_Fortran_binding.c (gfc_desc_to_cfi_desc):
      
              gcc/testsuite/
              PR fortran/92284.
              * gfortran.dg/bind-c-intent-out.f90: Update expected dump;
              extend comment.
              * gfortran.dg/bind_c_array_params_3.f90: New.
              * gfortran.dg/bind_c_array_params_3_aux.c: New.
      
      From-SVN: r277663
      fc5a9708
  12. Oct 19, 2019
  13. Oct 08, 2019
  14. Oct 05, 2019
    • Paul Thomas's avatar
      re PR fortran/91926 (assumed rank optional) · 980f185c
      Paul Thomas authored
      2019-10-05  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/91926
      	* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Correct the
      	assignment of the attribute field to account correctly for an
      	assumed shape dummy. Assign separately to the gfc and cfi
      	descriptors since the atribute can be different. Add btanch to
      	correctly handle missing optional dummies.
      
      2019-10-05  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/91926
      	* gfortran.dg/ISO_Fortran_binding_13.f90 : New test.
      	* gfortran.dg/ISO_Fortran_binding_13.c : Additional source.
      	* gfortran.dg/ISO_Fortran_binding_14.f90 : New test.
      
      2019-10-05  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/91926
      	* runtime/ISO_Fortran_binding.c (cfi_desc_to_gfc_desc): Do not
      	modify the bounds and offset for CFI_other.
      
      From-SVN: r276624
      980f185c
  15. Oct 02, 2019
  16. Sep 28, 2019
  17. Sep 27, 2019
    • Maciej W. Rozycki's avatar
      Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update · e9085da5
      Maciej W. Rozycki authored
      A change made with r275564 ("[ARM/FDPIC v6 02/24] [ARM] FDPIC: Handle 
      arm*-*-uclinuxfdpiceabi in configure scripts") to libtool.m4 has not 
      regenerated all the `configure' scripts affected.  Fix it.
      
      	gcc/
      	* configure: Regenerate.
      
      	libatomic/
      	* configure: Regenerate.
      
      	libbacktrace/
      	* configure: Regenerate.
      
      	libcc1/
      	* configure: Regenerate.
      
      	libffi/
      	* configure: Regenerate.
      
      	libgfortran/
      	* configure: Regenerate.
      
      	libgomp/
      	* configure: Regenerate.
      
      	libhsail-rt/
      	* configure: Regenerate.
      
      	libitm/
      	* configure: Regenerate.
      
      	libobjc/
      	* configure: Regenerate.
      
      	liboffloadmic/
      	* configure: Regenerate.
      
      	libphobos/
      	* configure: Regenerate.
      
      	libquadmath/
      	* configure: Regenerate.
      
      	libsanitizer/
      	* configure: Regenerate.
      
      	libssp/
      	* configure: Regenerate.
      
      	libstdc++-v3/
      	* configure: Regenerate.
      
      	libvtv/
      	* configure: Regenerate.
      
      	lto-plugin/
      	* configure: Regenerate.
      
      	zlib/
      	* configure: Regenerate.
      
      From-SVN: r276213
      e9085da5
  18. Sep 05, 2019
    • Janne Blomqvist's avatar
      Improve PRNG jumping when using threads · 0eaee4ab
      Janne Blomqvist authored
      Currently, when a new thread needs to use the RANDOM_NUMBER intrinsic,
      the per-thread PRNG state is initialized by copying the master state
      and then jumping forwards N*2**128 entries in the stream so that the
      PRNG streams for different threads don't alias each other, where N is
      the number of threads that have so far initialized the PRNG.
      
      With this patch the master state itself is jumped forwards once each
      time a new thread initializes the PRNG, thus obviating the need to
      jump through all the N-1 previous streams. Effectively turning an O(N)
      algorithm into an O(1) one.
      
      Regtested on x86_64-pc-linux-gnu.
      
      libgfortran/ChangeLog:
      
      2019-09-05  Janne Blomqvist  <jb@gcc.gnu.org>
      
      	* intrinsics/random.c (master_init): Replace with
      	master_state.init.
      	(njumps): Remove variable.
      	(master_state): Make instance of struct prng_state.
      	(init_rand_state): When jumping, update the master_state once
      	instead of keeping track of how many jumps need to be done.
      	(SZU64): Modify to handle new master_state.
      	(SZ): Likewise.
      	(random_seed_i4): Likewise.
      	(random_seed_i8): Likewise.
      
      From-SVN: r275397
      0eaee4ab
  19. Aug 17, 2019
    • Janne Blomqvist's avatar
      PR fortran/68401 Improve allocation error message · d74a8b05
      Janne Blomqvist authored
      Improve the error message that is printed when a memory allocation
      fails, by including the location, and the size of the allocation that
      failed.
      
      Regtested on x86_64-pc-linux-gnu.
      
      gcc/fortran/ChangeLog:
      
      2019-08-17  Janne Blomqvist  <jb@gcc.gnu.org>
      
      	PR fortran/68401
      	* trans-decl.c (gfc_build_builtin_function_decls): Replace
      	os_error with os_error_at decl.
      	* trans.c (trans_runtime_error_vararg): Modify so the error
      	function decl is passed directly.
      	(gfc_trans_runtime_error): Pass correct error function decl.
      	(gfc_trans_runtime_check): Likewise.
      	(trans_os_error_at): New function.
      	(gfc_call_malloc): Use trans_os_error_at.
      	(gfc_allocate_using_malloc): Likewise.
      	(gfc_call_realloc): Likewise.
      	* trans.h (gfor_fndecl_os_error): Replace with gfor_fndecl_os_error_at.
      
      libgfortran/ChangeLog:
      
      2019-08-17  Janne Blomqvist  <jb@gcc.gnu.org>
      
      	PR fortran/68401
      	* gfortran.map: Add GFORTRAN_10 node, add _gfortran_os_error_at
      	symbol.
      	* libgfortran.h (os_error_at): New prototype.
      	* runtime/error.c (os_error_at): New function.
      
      From-SVN: r274599
      d74a8b05
  20. Aug 13, 2019
    • Janne Blomqvist's avatar
      PR fortran/91414 Bugfix for previous commit · f77d2759
      Janne Blomqvist authored
      Correctly fill master_seed from os_seed.
      
      From-SVN: r274365
      f77d2759
    • Janne Blomqvist's avatar
      PR fortran/91414: Improved PRNG · 0e99e093
      Janne Blomqvist authored
      Update the PRNG from xorshift1024* to xoshiro256** by the same
      author. For details see
      
      http://prng.di.unimi.it/
      
      and the paper at
      
      https://arxiv.org/abs/1805.01407
      
      Also the seeding is slightly improved, by reading only 8 bytes from
      the operating system and using the simple splitmix64 PRNG to fill in
      the rest of the PRNG state (as recommended by the xoshiro author),
      instead of reading the entire state from the OS.
      
      Regtested on x86_64-pc-linux-gnu, Ok for trunk?
      
      gcc/fortran/ChangeLog:
      
      2019-08-13  Janne Blomqvist  <jb@gcc.gnu.org>
      
      	PR fortran/91414
      	* check.c (gfc_check_random_seed): Reduce seed_size.
      	* intrinsic.texi (RANDOM_NUMBER): Update to match new PRNG.
      
      gcc/testsuite/ChangeLog:
      
      2019-08-13  Janne Blomqvist  <jb@gcc.gnu.org>
      
      	PR fortran/91414
      	* gfortran.dg/random_seed_1.f90: Update to match new seed size.
      
      libgfortran/ChangeLog:
      
      2019-08-13  Janne Blomqvist  <jb@gcc.gnu.org>
      
      	PR fortran/91414
      	* intrinsics/random.c (prng_state): Update state struct.
      	(master_state): Update to match new size.
      	(get_rand_state): Update to match new PRNG.
      	(rotl): New function.
      	(xorshift1024star): Replace with prng_next.
      	(prng_next): New function.
      	(jump): Update for new PRNG.
      	(lcg_parkmiller): Replace with splitmix64.
      	(splitmix64): New function.
      	(getosrandom): Fix return value, simplify.
      	(init_rand_state): Use getosrandom only to get 8 bytes, splitmix64
      	to fill rest of state.
      	(random_r4): Update to new function and struct names.
      	(random_r8): Likewise.
      	(random_r10): Likewise.
      	(random_r16): Likewise.
      	(arandom_r4): Liekwise.
      	(arandom_r8): Likewise.
      	(arandom_r10): Likwewise.
      	(arandom_r16): Likewise.
      	(xor_keys): Reduce size to match new PRNG.
      	(random_seed_i4): Update to new function and struct names, remove
      	special handling of variable p used in previous PRNG.
      	(random_seed_i8): Likewise.
      
      From-SVN: r274361
      0e99e093
  21. Aug 07, 2019
    • Janne Blomqvist's avatar
      PR 53796 Make inquire(file=, recl=) conform to F2018 · 4047bab9
      Janne Blomqvist authored
      In my original patch to fix PR 53796 I forgot to fix the behavior for
      unconnected units when inquiring via filename. This patch fixes that.
      
      Regtested on x86_64-pc-linux-gnu, committed as obvious.
      
      libgfortran/ChangeLog:
      
      2019-08-07  Janne Blomqvist  <jb@gcc.gnu.org>
      
      	PR fortran/53796
      	* io/inquire.c (inquire_via_filename): Set recl to -1 for
      	unconnected units.
      
      gcc/testsuite/ChangeLog:
      
      2019-08-07  Janne Blomqvist  <jb@gcc.gnu.org>
      
      	PR fortran/53796
      	* gfortran.dg/inquire_recl_f2018.f90: Test for unconnected unit
      	with inquire via filename.
      
      From-SVN: r274160
      4047bab9
  22. Jul 21, 2019
    • Thomas Koenig's avatar
      re PR libfortran/91030 (Poor performance of I/O -fconvert=big-endian) · c37b0163
      Thomas Koenig authored
      2019-07-21  Thomas König  <tkoenig@gcc.gnu.org>
      
      	PR libfortran/91030
      	* gfortran.texi (GFORTRAN_FORMATTED_BUFFER_SIZE): Document
      	(GFORTRAN_UNFORMATTED_BUFFER_SIZE): Likewise.
      
      2019-07-21  Thomas König  <tkoenig@gcc.gnu.org>
      
      	PR libfortran/91030
      	* io/unix.c (BUFFER_SIZE): Delete.
      	(BUFFER_FORMATTED_SIZE_DEFAULT): New variable.
      	(BUFFER_UNFORMATTED_SIZE_DEFAULT): New variable.
      	(unix_stream): Add buffer_size.
      	(buf_read): Use s->buffer_size instead of BUFFER_SIZE.
      	(buf_write): Likewise.
      	(buf_init): Add argument unformatted.  Handle block sizes
      	for unformatted vs. formatted, using defaults if provided.
      	(fd_to_stream): Add argument unformatted in call to buf_init.
      	* libgfortran.h (options_t): Add buffer_size_formatted and
      	buffer_size_unformatted.
      	* runtime/environ.c (variable_table): Add
      	GFORTRAN_UNFORMATTED_BUFFER_SIZE and
      	GFORTRAN_FORMATTED_BUFFER_SIZE.
      
      From-SVN: r273643
      c37b0163
  23. Jun 25, 2019
  24. Jun 20, 2019
  25. Jun 14, 2019
    • Janne Blomqvist's avatar
      Use __builtin_mul_overflow in xmallocarray · 84d38abb
      Janne Blomqvist authored
      As GCC now provides builtins for doing integer overflow checking, lets
      use it when checking for overflow in xmallocarray.
      
      Regtested on x86_64-pc-linux-gnu.
      
      libgfortran/ChangeLog:
      
      2019-06-14  Janne Blomqvist  <jb@gcc.gnu.org>
      
      	* runtime/memory.c (SIZE_MAX):Remove macro definition.
      	(xmallocarray): Use __builtin_mul_overflow.
      
      From-SVN: r272295
      84d38abb
  26. May 22, 2019
    • Janne Blomqvist's avatar
      fortran/89100: Default widths with -fdec-format-defaults · 88a8126a
      Janne Blomqvist authored
      gcc/fortran ChangeLog:
      
      2019-05-22  Jeff Law  <law@redhat.com>
                  Mark Eggleston  <mark.eggleston@codethink.com>
      
              PR fortran/89100
              * gfortran.texi: Add Default widths for F, G and I format
              descriptors to Extensions section.
              * invoke.texi: Add -fdec-format-defaults
              * io.c (check_format): Use default widths for i, f and g when
              flag_dec_format_defaults is enabled.
              * lang.opt: Add new option.
              * options.c (set_dec_flags): Add SET_BITFLAG for
              flag_dec_format_defaults.
      
      
      gcc/testsuite ChangeLog:
      
      2019-05-22  Mark Eggleston  <mark.eggleston@codethink.com>
      
              PR fortran/89100
              * gfortran.dg/fmt_f_default_field_width_1.f90: New test.
              * gfortran.dg/fmt_f_default_field_width_2.f90: New test.
              * gfortran.dg/fmt_f_default_field_width_3.f90: New test.
              * gfortran.dg/fmt_g_default_field_width_1.f90: New test.
              * gfortran.dg/fmt_g_default_field_width_2.f90: New test.
              * gfortran.dg/fmt_g_default_field_width_3.f90: New test.
              * gfortran.dg/fmt_i_default_field_width_1.f90: New test.
              * gfortran.dg/fmt_i_default_field_width_2.f90: New test.
              * gfortran.dg/fmt_i_default_field_width_3.f90: New test.
      
      
      libgfortran ChangeLog:
      
      2019-05-22  Jeff Law  <law@redhat.com>
      
              PR fortran/89100
              * io/format.c (parse_format_list): set default width when the
              IOPARM_DT_DEC_EXT flag is set for i, f and g.
              * io/io.h: add default_width_for_integer, default_width_for_float
              and default_precision_for_float.
              * io/write.c (write_boz): extra parameter giving length of data
              corresponding to the type's kind.
              (write_b): pass data length as extra parameter in calls to
              write_boz.
              (write_o): pass data length as extra parameter in calls to
              write_boz.
              (write_z): pass data length as extra parameter in calls to
              write_boz.
              (size_from_kind): also set size is default width is set.
              * io/write_float.def (build_float_string): new paramter inserted
              before result parameter. If default width use values passed
              instead of the values in fnode.
              (FORMAT_FLOAT): macro modified to check for default width and
              calls to build_float_string to pass in default width.
              (get_float_string): set width and precision to defaults when
              needed.
      
      From-SVN: r271511
      88a8126a
  27. May 19, 2019
    • Janne Blomqvist's avatar
      libfortran/90038 Reap dead children when wait=.false. · ef536b41
      Janne Blomqvist authored
      When using posix_spawn or fork to launch a child process, the parent
      needs to wait for the child, otherwise the dead child is left as a
      zombie process. For this purpose one can install a signal handler for
      SIGCHLD.
      
      2019-05-19  Janne Blomqvist  <jb@gcc.gnu.org>
      
      	PR libfortran/90038
      	* intrinsics/execute_command_line (sigchld_handler): New function.
              (execute_command_line): Install handler for SIGCHLD.
              * configure.ac: Check for presence of sigaction and waitpid.
              * config.h.in: Regenerated.
              * configure: Regenerated.
      
      Regtested on x86_64-pc-linux-gnu.
      
      From-SVN: r271384
      ef536b41
  28. May 17, 2019
  29. May 15, 2019
    • Janne Blomqvist's avatar
      Allow opening file on multiple units · 0c15ebf1
      Janne Blomqvist authored
      As of Fortran 2018 it's allowed to open the same file on multiple
      units.
      
      libgfortran/ChangeLog:
      
      2019-05-15  Janne Blomqvist  <jb@gcc.gnu.org>
      
      	PR fortran/90461
              * io/open.c (new_unit): Don't check if the file is already open
      	for F2018.
      
      testsuite/ChangeLog:
      
      2019-05-15  Janne Blomqvist  <jb@gcc.gnu.org>
      
      	PR fortran/90461
              * gfortran.dg/open_errors_2.f90: Add -std=f2008, adjust line number.
      	* gfortran.dg/open_errors_3.f90: New test.
      
      From-SVN: r271260
      0c15ebf1
  30. May 02, 2019
  31. Apr 14, 2019
    • Paul Thomas's avatar
      re PR fortran/89843 (CFI_section delivers incorrect result descriptor) · 0d78e4aa
      Paul Thomas authored
      2019-04-14  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/89843
      	* trans-decl.c (gfc_get_symbol_decl): Assumed shape and assumed
      	rank dummies of bind C procs require deferred initialization.
      	(convert_CFI_desc): New procedure to convert incoming CFI
      	descriptors to gfc types and back again.
      	(gfc_trans_deferred_vars): Call it.
      	* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Null the CFI
      	descriptor pointer. Free the descriptor in all cases.
      
      	PR fortran/89846
      	* expr.c (is_CFI_desc): New function.
      	(is_subref_array): Tidy up by referencing the symbol directly.
      	* gfortran.h : Prototype for is_CFI_desc.
      	* trans_array.c (get_CFI_desc): New function.
      	(gfc_get_array_span, gfc_conv_scalarized_array_ref,
      	gfc_conv_array_ref): Use it.
      	* trans.c (get_array_span): Extract the span from descriptors
      	that are indirect references.
      
      	PR fortran/90022
      	* trans-decl.c (gfc_get_symbol_decl): Make sure that the se
      	expression is a pointer type before converting it to the symbol
      	backend_decl type.
      	* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Eliminate
      	temporary creation for intent(in).
      
      2019-04-14  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/89843
      	* gfortran.dg/ISO_Fortran_binding_4.f90: Modify the value of x
      	in ctg. Test the conversion of the descriptor types in the main
      	program.
      	* gfortran.dg/ISO_Fortran_binding_10.f90: New test.
      	* gfortran.dg/ISO_Fortran_binding_10.c: Called by it.
      
      	PR fortran/89846
      	* gfortran.dg/ISO_Fortran_binding_11.f90: New test.
      	* gfortran.dg/ISO_Fortran_binding_11.c: Called by it.
      
      	PR fortran/90022
      	* gfortran.dg/ISO_Fortran_binding_1.c: Correct the indexing for
      	the computation of 'ans'. Also, change the expected results for
      	CFI_is_contiguous to comply with standard.
      	* gfortran.dg/ISO_Fortran_binding_1.f90: Correct the expected
      	results for CFI_is_contiguous to comply with standard.
      	* gfortran.dg/ISO_Fortran_binding_9.f90: New test.
      	* gfortran.dg/ISO_Fortran_binding_9.c: Called by it.
      
      2019-04-14  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/89843
      	* runtime/ISO_Fortran_binding.c (cfi_desc_to_gfc_desc): Only
      	return immediately if the source pointer is null. Bring
      	forward the extraction of the gfc type. Extract the kind so
      	that the element size can be correctly computed for sections
      	and components of derived type arrays. Remove the free of the
      	CFI descriptor since this is now done in trans-expr.c.
      	(gfc_desc_to_cfi_desc): Only allocate the CFI descriptor if it
      	is not null.
      	(CFI_section): Normalise the difference between the upper and
      	lower bounds by the stride to correctly calculate the extents
      	of the section.
      
      	PR fortran/89846
      	* runtime/ISO_Fortran_binding.c (cfi_desc_to_gfc_desc): Use
      	the stride measure for the gfc span if it is not a multiple
      	of the element length. Otherwise use the element length.
      
      	PR fortran/90022
      	* runtime/ISO_Fortran_binding.c (CFI_is_contiguous) : Return
      	1 for true and 0 otherwise to comply with the standard. Correct
      	the contiguity check for rank 3 and greater by using the stride
      	measure of the lower dimension rather than the element length.
      
      From-SVN: r270353
      0d78e4aa
  32. Mar 25, 2019
  33. Mar 05, 2019
    • Jakub Jelinek's avatar
      re PR libfortran/89593 (warning "passing argument 3 of... · 934e9926
      Jakub Jelinek authored
      re PR libfortran/89593 (warning "passing argument 3 of ‘_gfortran_caf_{get,send}_by_ref’ from incompatible pointer type" when building libgfortran)
      
      	PR libgfortran/89593
      	* caf/single.c (_gfortran_caf_sendget_by_ref): Cast &temp to
      	gfc_descriptor_t * to avoid warning.
      
      From-SVN: r269405
      934e9926
  34. Feb 26, 2019
Loading