gcc/libgomp/testsuite/libgomp.fortran
Jakub Jelinek 92d28cbb59 re PR fortran/60928 (gfortran issue with allocatable components and OpenMP)
PR fortran/60928
	* omp-low.c (lower_rec_input_clauses) <case OMP_CLAUSE_LASTPRIVATE>:
	Set lastprivate_firstprivate even if omp_private_outer_ref
	langhook returns true.
	<case OMP_CLAUSE_REDUCTION>: When calling omp_clause_default_ctor
	langhook, call unshare_expr on new_var and call
	build_outer_var_ref to get the last argument.
gcc/c-family/
	* c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
	(omp_pragmas): ... back here.
gcc/fortran/
	* f95-lang.c (gfc_init_builtin_functions): Handle -fopenmp-simd
	like -fopenmp.
	* openmp.c (resolve_omp_clauses): Remove allocatable components
	diagnostics.  Add associate-name and intent(in) pointer
	diagnostics for various clauses, diagnose procedure pointers in
	reduction clause.
	* parse.c (match_word_omp_simd): New function.
	(matchs, matcho): New macros.
	(decode_omp_directive): Change match macros to either matchs
	or matcho.  Handle -fopenmp-simd.
	(next_free, next_fixed): Handle -fopenmp-simd like -fopenmp.
	* scanner.c (skip_free_comments, skip_fixed_comments, include_line):
	Likewise.
	* trans-array.c (get_full_array_size): Rename to...
	(gfc_full_array_size): ... this.  No longer static.
	(duplicate_allocatable): Adjust caller.  Add NO_MEMCPY argument
	and handle it.
	(gfc_duplicate_allocatable, gfc_copy_allocatable_data): Adjust
	duplicate_allocatable callers.
	(gfc_duplicate_allocatable_nocopy): New function.
	(structure_alloc_comps): Adjust g*_full_array_size and
	duplicate_allocatable caller.
	* trans-array.h (gfc_full_array_size,
	gfc_duplicate_allocatable_nocopy): New prototypes.
	* trans-common.c (create_common): Call gfc_finish_decl_attrs.
	* trans-decl.c (gfc_finish_decl_attrs): New function.
	(gfc_finish_var_decl, create_function_arglist,
	gfc_get_fake_result_decl): Call it.
	(gfc_allocate_lang_decl): If DECL_LANG_SPECIFIC is already allocated,
	don't allocate it again.
	(gfc_get_symbol_decl): Set GFC_DECL_ASSOCIATE_VAR_P on
	associate-names.
	* trans.h (gfc_finish_decl_attrs): New prototype.
	(struct lang_decl): Add scalar_allocatable and scalar_pointer
	bitfields.
	(GFC_DECL_SCALAR_ALLOCATABLE, GFC_DECL_SCALAR_POINTER,
	GFC_DECL_GET_SCALAR_ALLOCATABLE, GFC_DECL_GET_SCALAR_POINTER,
	GFC_DECL_ASSOCIATE_VAR_P): Define.
	(GFC_POINTER_TYPE_P): Remove.
	* trans-openmp.c (gfc_omp_privatize_by_reference): Don't check
	GFC_POINTER_TYPE_P, instead test GFC_DECL_GET_SCALAR_ALLOCATABLE,
	GFC_DECL_GET_SCALAR_POINTER or GFC_DECL_CRAY_POINTEE on decl.
	(gfc_omp_predetermined_sharing): Associate-names are predetermined.
	(enum walk_alloc_comps): New.
	(gfc_has_alloc_comps, gfc_omp_unshare_expr_r, gfc_omp_unshare_expr,
	gfc_walk_alloc_comps): New functions.
	(gfc_omp_private_outer_ref): Return true for scalar allocatables or
	decls with allocatable components.
	(gfc_omp_clause_default_ctor, gfc_omp_clause_copy_ctor,
	gfc_omp_clause_assign_op, gfc_omp_clause_dtor): Fix up handling of
	allocatables, handle also OMP_CLAUSE_REDUCTION, handle scalar
	allocatables and decls with allocatable components.
	(gfc_trans_omp_array_reduction_or_udr): Don't handle allocatable
	arrays here.
	(gfc_trans_omp_reduction_list): Call
	gfc_trans_omp_array_reduction_or_udr even for allocatable scalars.
	(gfc_trans_omp_do_simd): If -fno-openmp, just expand it as OMP_SIMD.
	(gfc_trans_omp_parallel_do_simd): Likewise.
	* trans-types.c (gfc_sym_type): Don't set GFC_POINTER_TYPE_P.
	(gfc_get_derived_type): Call gfc_finish_decl_attrs.
gcc/testsuite/
	* gfortran.dg/gomp/allocatable_components_1.f90: Remove dg-error
	directives.
	* gfortran.dg/gomp/associate1.f90: New test.
	* gfortran.dg/gomp/intentin1.f90: New test.
	* gfortran.dg/gomp/openmp-simd-1.f90: New test.
	* gfortran.dg/gomp/openmp-simd-2.f90: New test.
	* gfortran.dg/gomp/openmp-simd-3.f90: New test.
	* gfortran.dg/gomp/proc_ptr_2.f90: New test.
libgomp/
	* testsuite/libgomp.fortran/allocatable9.f90: New test.
	* testsuite/libgomp.fortran/allocatable10.f90: New test.
	* testsuite/libgomp.fortran/allocatable11.f90: New test.
	* testsuite/libgomp.fortran/allocatable12.f90: New test.
	* testsuite/libgomp.fortran/alloc-comp-1.f90: New test.
	* testsuite/libgomp.fortran/alloc-comp-2.f90: New test.
	* testsuite/libgomp.fortran/alloc-comp-3.f90: New test.
	* testsuite/libgomp.fortran/associate1.f90: New test.
	* testsuite/libgomp.fortran/associate2.f90: New test.
	* testsuite/libgomp.fortran/procptr1.f90: New test.

From-SVN: r211397
2014-06-10 08:05:22 +02:00
..
appendix-a re PR fortran/45045 (Named COMMON with different size: No warning with -fwhole-file) 2010-07-24 00:15:51 +02:00
alloc-comp-1.f90 re PR fortran/60928 (gfortran issue with allocatable components and OpenMP) 2014-06-10 08:05:22 +02:00
alloc-comp-2.f90 re PR fortran/60928 (gfortran issue with allocatable components and OpenMP) 2014-06-10 08:05:22 +02:00
alloc-comp-3.f90 re PR fortran/60928 (gfortran issue with allocatable components and OpenMP) 2014-06-10 08:05:22 +02:00
allocatable1.f90 c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. 2008-06-06 15:01:54 +02:00
allocatable2.f90 c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. 2008-06-06 15:01:54 +02:00
allocatable3.f90 c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. 2008-06-06 15:01:54 +02:00
allocatable4.f90 c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. 2008-06-06 15:01:54 +02:00
allocatable5.f90 re PR fortran/42866 (ICE for REDUCTION with ALLOCATABLE array as variable on SECTIONS) 2010-01-26 10:47:45 +01:00
allocatable6.f90 re PR fortran/46874 ([OpenMP] ICE in gfc_conv_descriptor_data_get, at fortran/trans-array.c:147) 2010-12-14 14:56:25 +01:00
allocatable7.f90 backport: re PR fortran/46752 (OpenMP - Seg fault for unallocated allocatable array in firstprivate clause) 2011-08-02 18:13:29 +02:00
allocatable8.f90 backport: re PR fortran/46752 (OpenMP - Seg fault for unallocated allocatable array in firstprivate clause) 2011-08-02 18:13:29 +02:00
allocatable9.f90 re PR fortran/60928 (gfortran issue with allocatable components and OpenMP) 2014-06-10 08:05:22 +02:00
allocatable10.f90 re PR fortran/60928 (gfortran issue with allocatable components and OpenMP) 2014-06-10 08:05:22 +02:00
allocatable11.f90 re PR fortran/60928 (gfortran issue with allocatable components and OpenMP) 2014-06-10 08:05:22 +02:00
allocatable12.f90 re PR fortran/60928 (gfortran issue with allocatable components and OpenMP) 2014-06-10 08:05:22 +02:00
associate1.f90 re PR fortran/60928 (gfortran issue with allocatable components and OpenMP) 2014-06-10 08:05:22 +02:00
associate2.f90 re PR fortran/60928 (gfortran issue with allocatable components and OpenMP) 2014-06-10 08:05:22 +02:00
cancel-do-1.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
cancel-do-2.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
cancel-parallel-1.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
cancel-parallel-3.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
cancel-sections-1.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
cancel-taskgroup-2.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
character1.f90
character2.f90
collapse1.f90 c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. 2008-06-06 15:01:54 +02:00
collapse2.f90 c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. 2008-06-06 15:01:54 +02:00
collapse3.f90 c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. 2008-06-06 15:01:54 +02:00
collapse4.f90 c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. 2008-06-06 15:01:54 +02:00
condinc1.f re PR fortran/29097 (!$ include 'omp_lib.h' does not work) 2006-09-26 20:06:55 +02:00
condinc1.inc re PR fortran/29097 (!$ include 'omp_lib.h' does not work) 2006-09-26 20:06:55 +02:00
condinc2.f re PR fortran/29097 (!$ include 'omp_lib.h' does not work) 2006-09-26 20:06:55 +02:00
condinc3.f90 re PR fortran/29097 (!$ include 'omp_lib.h' does not work) 2006-09-26 20:06:55 +02:00
condinc4.f90 re PR fortran/29097 (!$ include 'omp_lib.h' does not work) 2006-09-26 20:06:55 +02:00
crayptr1.f90
crayptr2.f90 re PR libgomp/59467 (copyprivate in the fortran testsuite) 2013-12-12 09:52:06 +01:00
crayptr3.f90 backport: re PR fortran/46752 (OpenMP - Seg fault for unallocated allocatable array in firstprivate clause) 2011-08-02 18:13:29 +02:00
declare-simd-1.f90 declare-simd-1.f90: Require vect_simd_clones effective target. 2014-05-27 11:14:53 +02:00
declare-simd-2.f90 declare-simd-1.f90: Require vect_simd_clones effective target. 2014-05-27 11:14:53 +02:00
declare-simd-3.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
depend-1.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
depend-2.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
do1.f90
do2.f90
fortran.exp libgomp: Prepare for testcases without -fopenmp. 2013-11-07 16:07:58 +01:00
jacobi.f
lastprivate1.f90 c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. 2008-06-06 15:01:54 +02:00
lastprivate2.f90 c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. 2008-06-06 15:01:54 +02:00
lib1.f90 lib-1.c (main): Add missing error check. 2013-10-11 12:43:15 +02:00
lib2.f lib-1.c (main): Add missing error check. 2013-10-11 12:43:15 +02:00
lib3.f lib-1.c (main): Add missing error check. 2013-10-11 12:43:15 +02:00
lib4.f90 c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. 2008-06-06 15:01:54 +02:00
lock-1.f90 c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. 2008-06-06 15:01:54 +02:00
lock-2.f90 c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. 2008-06-06 15:01:54 +02:00
nested1.f90 c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. 2008-06-06 15:01:54 +02:00
nestedfn1.f90
nestedfn2.f90
nestedfn3.f90 re PR middle-end/25261 ([gomp] Nested function calls in #pragma omp parallel blocks) 2006-09-26 20:10:58 +02:00
nestedfn4.f90 c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. 2008-06-06 15:01:54 +02:00
omp_atomic1.f90
omp_atomic2.f90
omp_atomic3.f90 backport: re PR fortran/46752 (OpenMP - Seg fault for unallocated allocatable array in firstprivate clause) 2011-08-02 18:13:29 +02:00
omp_atomic4.f90 backport: re PR fortran/46752 (OpenMP - Seg fault for unallocated allocatable array in firstprivate clause) 2011-08-02 18:13:29 +02:00
omp_atomic5.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
omp_cond1.f
omp_cond2.f
omp_cond3.F90
omp_cond4.F90
omp_hello.f
omp_orphan.f
omp_parse1.f90
omp_parse2.f90
omp_parse3.f90 re PR libgomp/33275 (Transient libgomp.fortran/omp_parse3.f90 -O0 failure) 2007-10-25 22:25:12 +02:00
omp_parse4.f90
omp_reduction.f
omp_workshare1.f
omp_workshare2.f
openmp_version-1.f _OPENMP pre-processor checks, openmp_version Fortran instrinsic checks. 2013-10-11 12:42:42 +02:00
openmp_version-2.f90 _OPENMP pre-processor checks, openmp_version Fortran instrinsic checks. 2013-10-11 12:42:42 +02:00
pointer1.f90 backport: re PR fortran/46752 (OpenMP - Seg fault for unallocated allocatable array in firstprivate clause) 2011-08-02 18:13:29 +02:00
pointer2.f90 backport: re PR fortran/46752 (OpenMP - Seg fault for unallocated allocatable array in firstprivate clause) 2011-08-02 18:13:29 +02:00
pr25162.f
pr25219.f90
pr27395-1.f90 re PR fortran/27395 (Problem with arrays in the OpenMP REDUCTION clause in Fortran) 2006-05-03 14:51:33 +02:00
pr27395-2.f90 re PR fortran/27395 (Problem with arrays in the OpenMP REDUCTION clause in Fortran) 2006-05-03 14:51:33 +02:00
pr27416-1.f90 re PR middle-end/27416 (ICE on invalid firstprivate/lastprivate) 2006-05-15 11:59:30 +02:00
pr27916-1.f90 re PR fortran/27916 (Problem with allocatable arrays inside OpenMP do loop) 2006-06-09 23:18:42 +02:00
pr27916-2.f90 re PR fortran/27916 (Problem with allocatable arrays inside OpenMP do loop) 2006-06-09 23:18:42 +02:00
pr28390.f re PR fortran/28390 (Broken !$omp parallel do lastprivate(iterationvar)) 2006-07-16 22:19:27 +02:00
pr29629.f90 re PR fortran/29629 (ICE on OpenMP-enabled program (gfc_conv_variable, at fortran/trans-expr.c:404)) 2006-10-29 11:27:39 +01:00
pr32359.f90 re PR fortran/32359 (incorrect error: Threadprivate isn't SAVEd (implicit save attribute undefined)) 2007-07-05 14:51:51 +02:00
pr32550.f90 crayptr2.f90: Remove forced static linkage for darwin... 2009-12-22 22:16:02 +00:00
pr33880.f90 re PR middle-end/33880 (ICE: in extract_omp_for_data, at omp-low.c:162) 2008-01-25 13:54:42 +01:00
pr34020.f90 re PR fortran/34020 (Bogus codegen for openmp atomics w/ indirects operands on IPF) 2007-11-10 08:51:55 +01:00
pr35130.f90 re PR middle-end/35130 (OpenMP: Private variable passed to subroutine) 2008-02-15 18:36:43 +01:00
pr42162.f90 re PR fortran/42162 (OpenMP: ICE: tree check in omp_add_variable, at gimplify.c:5282) 2009-11-25 21:28:56 +01:00
pr46753.f90 re PR fortran/46753 (ICE: OpenMP - in extract_omp_for_data, at omp-low.c:335) 2010-12-02 15:37:20 +01:00
pr48894.f90 re PR fortran/48894 (generic omp_get_ancestor_thread_num(l(i)) produces incorrect output) 2011-05-06 12:11:07 +02:00
pr49792-1.f90 re PR fortran/49792 (OpenMP workshare: Wrong result with array assignment) 2011-08-19 15:25:22 +02:00
pr49792-2.f90 re PR fortran/49792 (OpenMP workshare: Wrong result with array assignment) 2011-08-19 15:25:22 +02:00
procptr1.f90 re PR fortran/60928 (gfortran issue with allocatable components and OpenMP) 2014-06-10 08:05:22 +02:00
recursion1.f90 Make 's' atomic 2010-01-04 06:28:30 -08:00
reduction1.f90
reduction2.f90
reduction3.f90 reduction3.f90: Change -2147483648 to -huge(i)-1 to avoid overflow. 2006-09-08 20:57:55 +00:00
reduction4.f90 reduction3.f90: Change -2147483648 to -huge(i)-1 to avoid overflow. 2006-09-08 20:57:55 +00:00
reduction5.f90 a.22.8.f90: Add dg-final cleanup-modules line. 2007-03-21 20:43:14 +01:00
reduction6.f90
reference1.f90
reference2.f90
retval1.f90 re PR testsuite/59534 (FAIL: libgomp.fortran/retval1.f90 execution test due to denormals) 2013-12-17 16:17:00 +01:00
retval2.f90
sharing1.f90
sharing2.f90
simd1.f90 dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item. 2014-06-06 09:24:38 +02:00
simd2.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
simd3.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
simd4.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
stack.f90 openmp_stack.f90: Removed. 2007-09-28 15:22:18 +02:00
strassen.f90 Disable strassen.f90 test for aarch64 tiny memory. 2013-06-28 12:45:57 +00:00
tabs1.f90 c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. 2008-06-06 15:01:54 +02:00
tabs2.f c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. 2008-06-06 15:01:54 +02:00
task1.f90 c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. 2008-06-06 15:01:54 +02:00
task2.f90 c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. 2008-06-06 15:01:54 +02:00
task3.f90 re PR fortran/47886 (ICE: OpenMP !$omp task if(omp_get_num_threads() > 0)) 2011-02-27 13:05:36 +01:00
task4.f90 backport: re PR fortran/46752 (OpenMP - Seg fault for unallocated allocatable array in firstprivate clause) 2011-08-02 18:13:29 +02:00
taskgroup1.f90 tree.h (OMP_CLAUSE_LINEAR_STMT): Define. 2014-05-11 22:26:36 +02:00
threadprivate1.f90 a.22.8.f90: Add dg-final cleanup-modules line. 2007-03-21 20:43:14 +01:00
threadprivate2.f90 a.22.8.f90: Add dg-final cleanup-modules line. 2007-03-21 20:43:14 +01:00
threadprivate3.f90 a.22.8.f90: Add dg-final cleanup-modules line. 2007-03-21 20:43:14 +01:00
threadprivate4.f90 trans-decl.c (get_proc_pointer_decl): Set DECL_TLS_MODEL if threadprivate. 2011-08-26 16:55:05 +02:00
udr1.f90 dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item. 2014-06-06 09:24:38 +02:00
udr2.f90 dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item. 2014-06-06 09:24:38 +02:00
udr3.f90 dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item. 2014-06-06 09:24:38 +02:00
udr4.f90 dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item. 2014-06-06 09:24:38 +02:00
udr5.f90 dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item. 2014-06-06 09:24:38 +02:00
udr6.f90 dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item. 2014-06-06 09:24:38 +02:00
udr7.f90 dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item. 2014-06-06 09:24:38 +02:00
udr8.f90 dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item. 2014-06-06 09:24:38 +02:00
udr9.f90 dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item. 2014-06-06 09:24:38 +02:00
udr10.f90 dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item. 2014-06-06 09:24:38 +02:00
udr11.f90 dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item. 2014-06-06 09:24:38 +02:00
use_intrinsic_1.f90 use_intrinsic_1.f90: New; moved from gcc/testsuite/gfortran.dg/gomp/use_intrinsic_1.f90. 2012-12-19 16:02:50 +01:00
vla1.f90
vla2.f90
vla3.f90
vla4.f90 re PR c/53580 (Internal Segmentation fault in nested "omp parallel", "omp parallel for" and "omp parallel for reduction" Directives) 2012-06-07 08:36:55 +02:00
vla5.f90 re PR c/53580 (Internal Segmentation fault in nested "omp parallel", "omp parallel for" and "omp parallel for reduction" Directives) 2012-06-07 08:36:55 +02:00
vla6.f90
vla7.f90
vla8.f90 * testsuite/libgomp.fortran/vla8.f90: Use dg-timeout-factor 2.0. 2010-12-01 13:41:59 +00:00
workshare1.f90
workshare2.f90 re PR fortran/35423 (Implement OpenMP workshare) 2009-04-20 12:59:59 +02:00