gcc/libgomp/testsuite/libgomp.fortran
Nicolas Koenig 2b4c906561 re PR fortran/25829 ([F03] Asynchronous IO support)
2018-08-21  Nicolas Koenig  <koenigni@gcc.gnu.org>
	Thomas Koenig <tkoenig@gcc.gnu.org>

	PR fortran/25829
	* gfortran.texi: Add description of asynchronous I/O.
	* trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
	as volatile.
	* trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
	st_wait_async and change argument spec from ".X" to ".w".
	(gfc_trans_wait): Pass ID argument via reference.

2018-08-21  Nicolas Koenig  <koenigni@gcc.gnu.org>
	Thomas Koenig <tkoenig@gcc.gnu.org>

	PR fortran/25829
	* gfortran.dg/f2003_inquire_1.f03: Add write statement.
	* gfortran.dg/f2003_io_1.f03: Add wait statement.

2018-08-21  Nicolas Koenig  <koenigni@gcc.gnu.org>
	Thomas Koenig <tkoenig@gcc.gnu.org>

	PR fortran/25829
	* Makefile.am: Add async.c to gfor_io_src.
	Add async.h to gfor_io_headers.
	* Makefile.in: Regenerated.
	* gfortran.map: Add _gfortran_st_wait_async.
	* io/async.c: New file.
	* io/async.h: New file.
	* io/close.c: Include async.h.
	(st_close): Call async_wait for an asynchronous unit.
	* io/file_pos.c (st_backspace): Likewise.
	(st_endfile): Likewise.
	(st_rewind): Likewise.
	(st_flush): Likewise.
	* io/inquire.c: Add handling for asynchronous PENDING
	and ID arguments.
	* io/io.h (st_parameter_dt): Add async bit.
	(st_parameter_wait): Correct.
	(gfc_unit): Add au pointer.
	(st_wait_async): Add prototype.
	(transfer_array_inner): Likewise.
	(st_write_done_worker): Likewise.
	* io/open.c: Include async.h.
	(new_unit): Initialize asynchronous unit.
	* io/transfer.c (async_opt): New struct.
	(wrap_scalar_transfer): New function.
	(transfer_integer): Call wrap_scalar_transfer to do the work.
	(transfer_real): Likewise.
	(transfer_real_write): Likewise.
	(transfer_character): Likewise.
	(transfer_character_wide): Likewise.
	(transfer_complex): Likewise.
	(transfer_array_inner): New function.
	(transfer_array): Call transfer_array_inner.
	(transfer_derived): Call wrap_scalar_transfer.
	(data_transfer_init): Check for asynchronous I/O.
	Perform a wait operation on any pending asynchronous I/O
	if the data transfer is synchronous. Copy PDT and enqueue
	thread for data transfer.
	(st_read_done_worker): New function.
	(st_read_done): Enqueue transfer or call st_read_done_worker.
	(st_write_done_worker): New function.
	(st_write_done): Enqueue transfer or call st_read_done_worker.
	(st_wait): Document as no-op for compatibility reasons.
	(st_wait_async): New function.
	* io/unit.c (insert_unit): Use macros LOCK, UNLOCK and TRYLOCK;
	add NOTE where necessary.
	(get_gfc_unit): Likewise.
	(init_units): Likewise.
	(close_unit_1): Likewise. Call async_close if asynchronous.
	(close_unit): Use macros LOCK and UNLOCK.
	(finish_last_advance_record): Likewise.
	(newunit_alloc): Likewise.
	* io/unix.c (find_file): Likewise.
	(flush_all_units_1): Likewise.
	(flush_all_units): Likewise.
	* libgfortran.h (generate_error_common): Add prototype.
	* runtime/error.c: Include io.h and async.h.
	(generate_error_common): New function.

2018-08-21  Nicolas Koenig  <koenigni@gcc.gnu.org>
	Thomas Koenig <tkoenig@gcc.gnu.org>

	PR fortran/25829
	* testsuite/libgomp.fortran/async_io_1.f90: New test.
	* testsuite/libgomp.fortran/async_io_2.f90: New test.
	* testsuite/libgomp.fortran/async_io_3.f90: New test.
	* testsuite/libgomp.fortran/async_io_4.f90: New test.
	* testsuite/libgomp.fortran/async_io_5.f90: New test.
	* testsuite/libgomp.fortran/async_io_6.f90: New test.
	* testsuite/libgomp.fortran/async_io_7.f90: New test.


Co-Authored-By: Thomas Koenig <tkoenig@gcc.gnu.org>

From-SVN: r263750
2018-08-21 18:48:59 +00:00
..
appendix-a
examples-4
affinity1.f90
affinity2.f90
aligned1.f03
alloc-comp-1.f90
alloc-comp-2.f90
alloc-comp-3.f90
allocatable1.f90
allocatable2.f90
allocatable3.f90
allocatable4.f90
allocatable5.f90
allocatable6.f90
allocatable7.f90
allocatable8.f90
allocatable9.f90
allocatable10.f90
allocatable11.f90
allocatable12.f90
associate1.f90
associate2.f90
associate3.f90
async_io_1.f90 re PR fortran/25829 ([F03] Asynchronous IO support) 2018-08-21 18:48:59 +00:00
async_io_2.f90 re PR fortran/25829 ([F03] Asynchronous IO support) 2018-08-21 18:48:59 +00:00
async_io_3.f90 re PR fortran/25829 ([F03] Asynchronous IO support) 2018-08-21 18:48:59 +00:00
async_io_4.f90 re PR fortran/25829 ([F03] Asynchronous IO support) 2018-08-21 18:48:59 +00:00
async_io_5.f90 re PR fortran/25829 ([F03] Asynchronous IO support) 2018-08-21 18:48:59 +00:00
async_io_6.f90 re PR fortran/25829 ([F03] Asynchronous IO support) 2018-08-21 18:48:59 +00:00
async_io_7.f90 re PR fortran/25829 ([F03] Asynchronous IO support) 2018-08-21 18:48:59 +00:00
cancel-do-1.f90
cancel-do-2.f90
cancel-parallel-1.f90
cancel-parallel-3.f90
cancel-sections-1.f90
cancel-taskgroup-2.f90
character1.f90
character2.f90
collapse1.f90
collapse2.f90 re PR fortran/85841 ([F2018] reject deleted features) 2018-05-21 22:48:59 +02:00
collapse3.f90
collapse4.f90
condinc1.f
condinc1.inc
condinc2.f
condinc3.f90
condinc4.f90
crayptr1.f90
crayptr2.f90
crayptr3.f90
declare-simd-1.f90
declare-simd-2.f90
declare-simd-3.f90
declare-simd-4.f90
declare-target-1.f90
declare-target-2.f90
depend-1.f90
depend-2.f90
depend-3.f90
do1.f90
do2.f90
do_concurrent_5.f90
doacross1.f90
doacross2.f90
doacross3.f90
fortran.exp
jacobi.f
lastprivate1.f90
lastprivate2.f90
lib1.f90
lib2.f
lib3.f
lib4.f90
lock-1.f90
lock-2.f90
nested1.f90
nestedfn1.f90
nestedfn2.f90
nestedfn3.f90
nestedfn4.f90
nestedfn5.f90
omp_atomic1.f90
omp_atomic2.f90 re PR fortran/85841 ([F2018] reject deleted features) 2018-05-21 22:48:59 +02:00
omp_atomic3.f90
omp_atomic4.f90
omp_atomic5.f90
omp_cond1.f
omp_cond2.f
omp_cond3.F90
omp_cond4.F90
omp_hello.f
omp_orphan.f
omp_parse1.f90 re PR fortran/85841 ([F2018] reject deleted features) 2018-05-21 22:48:59 +02:00
omp_parse2.f90
omp_parse3.f90 re PR fortran/85841 ([F2018] reject deleted features) 2018-05-21 22:48:59 +02:00
omp_parse4.f90
omp_reduction.f
omp_workshare1.f
omp_workshare2.f
openmp_version-1.f
openmp_version-2.f90
parloops-exit-first-loop-alt-2.f95
parloops-exit-first-loop-alt.f95
pointer1.f90
pointer2.f90
pr25162.f
pr25219.f90
pr27395-1.f90
pr27395-2.f90
pr27416-1.f90
pr27916-1.f90
pr27916-2.f90
pr28390.f
pr29629.f90
pr32359.f90
pr32550.f90
pr33880.f90
pr34020.f90
pr35130.f90
pr42162.f90
pr46753.f90
pr48894.f90
pr49792-1.f90
pr49792-2.f90
pr63938-1.f90
pr63938-2.f90
pr65597.f90
pr66199-1.f90
pr66199-2.f90
pr66680.f90
pr71014.f90
pr71734-1.f90
pr71734-2.f90
pr81304.f90
pr81841.f90
pr84418-1.f90
pr84418-2.f90
procptr1.f90
recursion1.f90
reduction1.f90
reduction2.f90
reduction3.f90
reduction4.f90
reduction5.f90
reduction6.f90
reference1.f90
reference2.f90
retval1.f90
retval2.f90
sharing1.f90
sharing2.f90
simd1.f90
simd2.f90
simd3.f90
simd4.f90
simd5.f90
simd6.f90
simd7.f90
stack.f90
strassen.f90
tabs1.f90
tabs2.f
target1.f90
target2.f90
target3.f90
target4.f90
target5.f90
target6.f90
target7.f90
target8.f90
task1.f90
task2.f90 re PR fortran/85841 ([F2018] reject deleted features) 2018-05-21 22:48:59 +02:00
task3.f90
task4.f90
taskgroup1.f90
taskloop1.f90
taskloop2.f90
taskloop3.f90
taskloop4.f90
threadprivate1.f90
threadprivate2.f90
threadprivate3.f90
threadprivate4.f90
udr1.f90
udr2.f90
udr3.f90
udr4.f90
udr5.f90
udr6.f90
udr7.f90
udr8.f90
udr9.f90
udr10.f90
udr11.f90
udr12.f90
udr13.f90
udr14.f90
udr15.f90
use_intrinsic_1.f90
vla1.f90 re PR fortran/85841 ([F2018] reject deleted features) 2018-05-21 22:48:59 +02:00
vla2.f90 re PR fortran/85841 ([F2018] reject deleted features) 2018-05-21 22:48:59 +02:00
vla3.f90 re PR fortran/85841 ([F2018] reject deleted features) 2018-05-21 22:48:59 +02:00
vla4.f90 re PR fortran/85841 ([F2018] reject deleted features) 2018-05-21 22:48:59 +02:00
vla5.f90 re PR fortran/85841 ([F2018] reject deleted features) 2018-05-21 22:48:59 +02:00
vla6.f90 re PR fortran/85841 ([F2018] reject deleted features) 2018-05-21 22:48:59 +02:00
vla7.f90
vla8.f90 re PR fortran/85841 ([F2018] reject deleted features) 2018-05-21 22:48:59 +02:00
workshare1.f90
workshare2.f90