summaryrefslogtreecommitdiff
path: root/libgomp
AgeCommit message (Collapse)Author
2016-11-23Remove build dependence on HSA run-timejamborm
2016-11-23 Martin Liska <mliska@suse.cz> Martin Jambor <mjambor@suse.cz> gcc/ * doc/install.texi: Remove entry about --with-hsa-kmt-lib. libgomp/ * plugin/hsa.h: New file. * plugin/hsa_ext_finalize.h: New file. * plugin/configfrag.ac: Remove hsa-kmt-lib test. Added checks for header file unistd.h, and functions secure_getenv, __secure_getenv, getuid, geteuid, getgid and getegid. * plugin/Makefrag.am (libgomp_plugin_hsa_la_CPPFLAGS): Added -D_GNU_SOURCE. * plugin/plugin-hsa.c: Include config.h, inttypes.h and stdbool.h. Handle various cases of secure_getenv presence, add an implementation when we can test effective UID and GID. (struct hsa_runtime_fn_info): New structure. (hsa_runtime_fn_info hsa_fns): New variable. (hsa_runtime_lib): Likewise. (support_cpu_devices): Likewise. (init_enviroment_variables): Load newly introduced ENV variables. (hsa_warn): Call hsa run-time functions via hsa_fns structure. (hsa_fatal): Likewise. (DLSYM_FN): New macro. (init_hsa_runtime_functions): New function. (suitable_hsa_agent_p): Call hsa run-time functions via hsa_fns structure. Depending on environment, also allow CPU devices. (init_hsa_context): Call hsa run-time functions via hsa_fns structure. (get_kernarg_memory_region): Likewise. (GOMP_OFFLOAD_init_device): Likewise. (destroy_hsa_program): Likewise. (init_basic_kernel_info): New function. (GOMP_OFFLOAD_load_image): Use it. (create_and_finalize_hsa_program): Call hsa run-time functions via hsa_fns structure. (create_single_kernel_dispatch): Likewise. (release_kernel_dispatch): Likewise. (init_single_kernel): Likewise. (parse_target_attributes): Allow up multiple HSA grid dimensions. (get_group_size): New function. (run_kernel): Likewise. (GOMP_OFFLOAD_run): Outline most functionality to run_kernel. (GOMP_OFFLOAD_fini_device): Call hsa run-time functions via hsa_fns structure. * testsuite/lib/libgomp.exp: Remove hsa_kmt_lib support. * testsuite/libgomp-test-support.exp.in: Likewise. * Makefile.in: Regenerated. * aclocal.m4: Likewise. * config.h.in: Likewise. * configure: Likewise. * testsuite/Makefile.in: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@242749 138bc75d-0d04-0410-961f-82ee72b054a4
2016-11-15libgomp testsuite: add missing map clausesamonakov
* testsuite/libgomp.fortran/examples-4/device-1.f90 (e_57_1): Add mapping clauses to target constructs. * testsuite/libgomp.fortran/examples-4/device-3.f90 (e_57_3): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@242436 138bc75d-0d04-0410-961f-82ee72b054a4
2016-11-15<toplevel>doko
2016-11-15 Matthias Klose <doko@ubuntu.com> * config-ml.in: Remove references to GCJ. * configure.ac: Likewise. * configure: Regenerate. config/ 2016-11-15 Matthias Klose <doko@ubuntu.com> multi.m4: Don't set GCJ. gcc/ 2016-11-15 Matthias Klose <doko@ubuntu.com> * doc/install.texi: Remove references to gcj/libjava. * doc/invoke.texi: Likewise. */ (where necessary) 2016-11-15 Matthias Klose <doko@ubuntu.com> * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@242433 138bc75d-0d04-0410-961f-82ee72b054a4
2016-11-10gcc/fortran/jakub
* cpp.c (cpp_define_builtins): Define _OPENMP to 201511 instead of 201307. * gfortran.texi: Mention partial OpenMP 4.5 support. * intrinsic.texi: Update for OpenMP 4.5. gcc/testsuite/ * gfortran.dg/openmp-define-3.f90: Expect 201511 instead of 201307. libgomp/ * omp_lib.f90.in (openmp_version): Change to 201511 from 201307. * omp_lib.h.in (openmp_version): Likewise. * testsuite/libgomp.fortran/openmp_version-1.f: Expect 201511 instead of 201307. * testsuite/libgomp.fortran/openmp_version-2.f90: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@242044 138bc75d-0d04-0410-961f-82ee72b054a4
2016-11-10gcc/jakub
* omp-low.c (lower_omp_target): Fix up argument to is_reference. (expand_omp_ordered_sink): Handle TREE_PURPOSE of deps being TRUNC_DIV_EXPR. * gimplify.c (gimplify_scan_omp_clauses): Likewise. Set ctx->target_map_scalars_firstprivate on OMP_TARGET even for Fortran. Remove omp_no_lastprivate callers. Propagate lastprivate on combined teams distribute parallel for simd even to distribute and teams construct. For OMP_CLAUSE_DEPEND add missing break at the end of OMP_CLAUSE_DEPEND_SINK case. (omp_notice_variable): Use lang_hooks.decls.omp_scalar_p. (omp_no_lastprivate): Removed. (gimplify_adjust_omp_clauses): Remove omp_no_lastprivate callers. (gimplify_omp_for): Likewise. (computable_teams_clause): Fail for automatic vars from current function not yet seen in bind expr. * langhooks.c (lhd_omp_scalar_p): New function. * langhooks.h (struct lang_hooks_for_decls): Add omp_scalar_p. * varpool.c (varpool_node::get_create): Set node->offloading even for DECL_EXTERNAL decls. * langhooks-def.h (lhd_omp_scalar_p): New prototype. (LANG_HOOKS_OMP_SCALAR_P): Define. (LANG_HOOKS_DECLS): Use it. gcc/fortran/ * openmp.c (gfc_free_omp_clauses): Free critical_name, grainsize, hint, num_tasks, priority and if_exprs. (gfc_match_omp_to_link, gfc_match_omp_depend_sink): New functions. (enum omp_mask1, enum omp_mask2): New enums. Change all OMP_CLAUSE_* defines into enum values, and change their values from ((uint64_t) 1 << bit) to just bit. (omp_mask, omp_inv_mask): New classes. Add ctors and operators. (gfc_match_omp_clauses): Change mask argument from uint64_t to const omp_mask. Assert OMP_MASK1_LAST and OMP_MASK2_LAST are at most 64. Move delete clause handling to where it alphabetically belongs. Parse defaultmap, grainsize, hint, is_device_ptr, nogroup, nowait, num_tasks, priority, simd, threads and use_device_ptr clauses. Parse if clause modifier. Parse map clause always modifier, and release and delete kinds. Parse ordered clause with argument. Parse schedule clause modifiers. Differentiate device clause parsing based on openacc flag. Guard link clause parsing with openacc flag. Add support for parsing linear clause modifiers. Parse depend(source) and depend(sink: ...). Use gfc_match_omp_to_link for to and link clauses in declare target construct. (match_acc): Change mask type from uint64_t to const omp_mask. (OMP_SINGLE_CLAUSES, OMP_ORDERED_CLAUSES, OMP_DECLARE_TARGET_CLAUSES, OMP_TASKLOOP_CLAUSES, OMP_TARGET_ENTER_DATA_CLAUSES, OMP_TARGET_EXIT_DATA_CLAUSES): Define. (OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES, OACC_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES, OACC_DECLARE_CLAUSES, OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES, OACC_WAIT_CLAUSES, OACC_ROUTINE_CLAUSES, OMP_PARALLEL_CLAUSES, OMP_DECLARE_SIMD_CLAUSES, OMP_SECTIONS_CLAUSES, OMP_TEAMS_CLAUSES, OMP_DISTRIBUTE_CLAUSES): Replace first or only OMP_CLAUSE_* value in bitset with omp_mask (OMP_CLAUSE_*). (OMP_DO_CLAUSES): Likewise. Add OMP_CLAUSE_LINEAR. (OMP_SIMD_CLAUSES): Replace first or only OMP_CLAUSE_* value in bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_SIMDLEN. (OACC_UPDATE_CLAUSES): Replace first or only OMP_CLAUSE_* value in bitset with omp_mask (OMP_CLAUSE_*). Replace OMP_CLAUSE_OACC_DEVICE with OMP_CLAUSE_DEVICE. (OMP_TASK_CLAUSES): Replace first or only OMP_CLAUSE_* value in bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_PRIORITY. (OMP_TARGET_CLAUSES): Replace first or only OMP_CLAUSE_* value in bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_DEPEND, OMP_CLAUSE_NOWAIT, OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE, OMP_CLAUSE_DEFAULTMAP and OMP_CLAUSE_IS_DEVICE_PTR. (OMP_TARGET_DATA_CLAUSES): Replace first or only OMP_CLAUSE_* value in bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_USE_DEVICE_PTR. (OMP_TARGET_UPDATE_CLAUSES): Replace first or only OMP_CLAUSE_* value in bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_DEPEND and OMP_CLAUSE_NOWAIT. (match_omp): Change mask argument from unsigned int to const omp_mask. (gfc_match_omp_critical): Parse optional clauses and use omp_clauses union member instead of omp_name. (gfc_match_omp_end_critical): New function. (gfc_match_omp_distribute_parallel_do): Remove ordered and linear clauses from the mask. (gfc_match_omp_distribute_parallel_do_simd): Use & ~(omp_mask (OMP_CLAUSE_*)) instead of & ~OMP_CLAUSE_*. (gfc_match_omp_target_teams_distribute_parallel_do_simd): Likewise. (gfc_match_omp_teams_distribute_parallel_do_simd): Likewise. (gfc_match_omp_do_simd): Likewise. Don't remove ordered clause from the mask. (gfc_match_omp_parallel_do_simd): Likewise. (gfc_match_omp_target_teams_distribute_parallel_do): Likewise. (gfc_match_omp_teams_distribute_parallel_do): Likewise. (gfc_match_omp_declare_simd): If not using the form with (proc-name), require space before first clause. Make (proc-name) optional. If not present, set proc_name to NULL. (gfc_match_omp_declare_target): Rewritten for OpenMP 4.5. (gfc_match_omp_single): Use OMP_SINGLE_CLAUSES. (gfc_match_omp_task, gfc_match_omp_taskwait, gfc_match_omp_taskyield): Move around to where they belong alphabetically. (gfc_match_omp_target_enter_data, gfc_match_omp_target_exit_data, gfc_match_omp_target_parallel, gfc_match_omp_target_parallel_do, gfc_match_omp_target_parallel_do_simd, gfc_match_omp_target_simd, gfc_match_omp_taskloop, gfc_match_omp_taskloop_simd): New functions. (gfc_match_omp_ordered): Parse clauses. (gfc_match_omp_ordered_depend): New function. (gfc_match_omp_cancel, gfc_match_omp_end_single): Use omp_mask (OMP_CLAUSE_*) instead of OMP_CLAUSE_*. (resolve_oacc_scalar_int_expr): Renamed to ... (resolve_scalar_int_expr): ... this. Fix up formatting. (resolve_oacc_positive_int_expr): Renamed to ... (resolve_positive_int_expr): ... this. Fix up formatting. (resolve_nonnegative_int_expr): New function. (resolve_omp_clauses): Adjust callers, use the above functions even for OpenMP clauses, add handling of new OpenMP 4.5 clauses. Require orderedc >= collapse if specified. Handle depend(sink:) and depend(source) restrictions. Disallow linear clause when orderedc is non-zero. Diagnose linear clause modifiers when not in declare simd. Only check for integer type if ref modifier is not used. Remove diagnostics for required VALUE attribute. Diagnose VALUE attribute with ref or uval modifiers. Allow non-constant linear-step, if it is a dummy argument alone and is mentioned in uniform clause. Diagnose map kinds not allowed for various constructs. Diagnose target {enter ,exit ,}data without any map clauses. Add dummy OMP_LIST_IS_DEVICE_PTR and OMP_LIST_USE_DEVICE_PTR cases. (gfc_resolve_omp_do_blocks): Set omp_current_do_collapse to orderedc if non-zero. (gfc_resolve_omp_parallel_blocks): Handle new OpenMP 4.5 constructs, replace underscores with spaces in a few construct names. (resolve_omp_do): Set collapse to orderedc if non-zero. Handle new OpenMP 4.5 constructs. (resolve_oacc_loop_blocks): Call resolve_positive_int_expr instead of resolve_oacc_positive_int_expr. (gfc_resolve_omp_directive): Handle new OpenMP 4.5 constructs. (gfc_resolve_omp_declare_simd): Allow ods->proc_name to be NULL. * trans-openmp.c (gfc_omp_scalar_p): New function. (doacross_steps): New variable. (gfc_trans_omp_clauses): Handle new OpenMP 4.5 clauses and new clause modifiers. (gfc_trans_omp_critical): Adjust EXEC_OMP_CRITICAL handling. (gfc_trans_omp_do): Handle doacross loops. Clear sched_simd flag. Handle EXEC_OMP_TASKLOOP. (gfc_trans_omp_ordered): Translate omp clauses, allow NULL code->block. (GFC_OMP_SPLIT_TASKLOOP, GFC_OMP_MASK_TASKLOOP): New enum constants. (gfc_split_omp_clauses): Copy orderedc together with ordered. Change firstprivate and lastprivate handling for OpenMP 4.5. Handle EXEC_OMP_TARGET_SIMD, EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD} and EXEC_OMP_TASKLOOP{,_SIMD}. Add handling for new OpenMP 4.5 clauses and clause modifiers and handle if clause without/with modifiers. (gfc_trans_omp_teams): Add omp_clauses argument, add it to other teams clauses. Don't wrap into OMP_TEAMS if -fopenmp-simd. (gfc_trans_omp_target): For -fopenmp, translate num_teams and thread_limit clauses on combined target teams early and pass to gfc_trans_omp_teams. Set OMP_TARGET_COMBINED if needed. Handle EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD} and EXEC_OMP_TARGET_SIMD. (gfc_trans_omp_taskloop, gfc_trans_omp_target_enter_data, gfc_trans_omp_target_exit_data): New functions. (gfc_trans_omp_directive): Handle EXEC_OMP_TARGET_{ENTER,EXIT}_DATA EXEC_OMP_TASKLOOP{,_SIMD}, EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD} and EXEC_OMP_TARGET_SIMD. Adjust gfc_trans_omp_teams caller. * symbol.c (check_conflict): Handle omp_declare_target_link. (gfc_add_omp_declare_target_link): New function. (gfc_copy_attr): Copy omp_declare_target_link. * dump-parse-tree.c (show_omp_namelist): Handle OMP_DEPEND_SINK_FIRST depend_op. Print linear clause modifiers. (show_omp_clauses): Adjust for OpenMP 4.5 clause changes. (show_omp_node): Print clauses for EXEC_OMP_ORDERED. Allow NULL c->block for EXEC_OMP_ORDERED. Formatting fixes. Adjust handling of EXEC_OMP_CRITICAL, handle new OpenMP 4.5 constructs and some forgotten OpenMP 4.0 constructs. (show_code_node): Handle new OpenMP 4.5 constructs and some forgotten OpenMP 4.0 constructs. * gfortran.h (symbol_attribute): Add omp_declare_target_link bitfield. (struct gfc_omp_namelist): Add u.common and u.linear_op fields. (struct gfc_common_head): Change omp_declare_target into bitfield. Add omp_declare_target_link bitfield. (gfc_add_omp_declare_target_link): New prototype. (enum gfc_statement): Add ST_OMP_TARGET_PARALLEL, ST_OMP_END_TARGET_PARALLEL, ST_OMP_TARGET_PARALLEL_DO, ST_OMP_END_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD, ST_OMP_END_TARGET_PARALLEL_DO_SIMD, ST_OMP_TARGET_ENTER_DATA, ST_OMP_TARGET_EXIT_DATA, ST_OMP_TARGET_SIMD, ST_OMP_END_TARGET_SIMD, ST_OMP_TASKLOOP, ST_OMP_END_TASKLOOP, ST_OMP_TASKLOOP_SIMD, ST_OMP_END_TASKLOOP_SIMD and ST_OMP_ORDERED_DEPEND. (enum gfc_omp_depend_op): Add OMP_DEPEND_SINK_FIRST and OMP_DEPEND_SINK. (enum gfc_omp_linear_op): New. (struct gfc_omp_clauses): Add critical_name, depend_source, orderedc, defaultmap, nogroup, sched_simd, sched_monotonic, sched_nonmonotonic, simd, threads, grainsize, hint, num_tasks, priority and if_exprs fields. (enum gfc_exec_op): Add EXEC_OMP_END_CRITICAL, EXEC_OMP_TARGET_ENTER_DATA, EXEC_OMP_TARGET_EXIT_DATA, EXEC_OMP_TARGET_PARALLEL, EXEC_OMP_TARGET_PARALLEL_DO, EXEC_OMP_TARGET_PARALLEL_DO_SIMD, EXEC_OMP_TARGET_SIMD, EXEC_OMP_TASKLOOP, EXEC_OMP_TASKLOOP_SIMD. (enum gfc_omp_map_op): Add OMP_MAP_RELEASE, OMP_MAP_ALWAYS_TO, OMP_MAP_ALWAYS_FROM and OMP_MAP_ALWAYS_TOFROM. (OMP_LIST_IS_DEVICE_PTR, OMP_LIST_USE_DEVICE_PTR): New. (enum gfc_omp_if_kind): New. * module.c (enum ab_attribute): Add AB_OMP_DECLARE_TARGET_LINK. (attr_bits): Add AB_OMP_DECLARE_TARGET_LINK entry. (mio_symbol_attribute): Save and restore omp_declare_target_link bit. * trans.h (gfc_omp_scalar_p): New prototype. * frontend-passes.c (gfc_code_walker): Handle new OpenMP 4.5 expressions. * trans.c (trans_code): Handle new OpenMP 4.5 constructs. * resolve.c (gfc_resolve_blocks): Likewise. (gfc_resolve_code): Likewise. * f95-lang.c (LANG_HOOKS_OMP_SCALAR_P): Redefine to gfc_omp_scalar_p. (gfc_attribute_table): Add "omp declare target link". * st.c (gfc_free_statement): Handle EXEC_OMP_END_CRITICAL like EXEC_OMP_CRITICAL before, free clauses for EXEC_OMP_CRITICAL and new OpenMP 4.5 constructs. Free omp clauses even for EXEC_OMP_ORDERED. * match.c (match_exit_cycle): Rename collapse variable to count, set it to orderedc if non-zero, instead of collapse. * trans-decl.c (add_attributes_to_decl): Add "omp declare target link" instead of "omp declare target" for omp_declare_target_link. * trans-common.c (build_common_decl): Likewise. * match.h (gfc_match_omp_target_enter_data, gfc_match_omp_target_exit_data, gfc_match_omp_target_parallel, gfc_match_omp_target_parallel_do, gfc_match_omp_target_parallel_do_simd, gfc_match_omp_target_simd, gfc_match_omp_taskloop, gfc_match_omp_taskloop_simd, gfc_match_omp_end_critical, gfc_match_omp_ordered_depend): New prototypes. * parse.c (decode_omp_directive): Use gfc_match_omp_end_critical instead of gfc_match_omp_critical for !$omp end critical. Handle new OpenMP 4.5 constructs. If ordered directive has depend clause as the first of the clauses, use gfc_match_omp_ordered_depend and ST_OMP_ORDERED_DEPEND instead of gfc_match_omp_ordered and ST_OMP_ORDERED. (case_executable): Add ST_OMP_TARGET_ENTER_DATA, ST_OMP_TARGET_EXIT_DATA and ST_OMP_ORDERED_DEPEND cases. (case_exec_markers): Add ST_OMP_TARGET_PARALLEL, ST_OMP_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD, ST_OMP_TARGET_SIMD, ST_OMP_TASKLOOP and ST_OMP_TASKLOOP_SIMD cases. (gfc_ascii_statement): Handle new OpenMP 4.5 constructs. (parse_omp_do): Handle ST_OMP_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD, ST_OMP_TASKLOOP and ST_OMP_TASKLOOP_SIMD. (parse_omp_structured_block): Handle EXEC_OMP_END_CRITICAL instead of EXEC_OMP_CRITICAL, adjust for EXEC_OMP_CRITICAL having omp clauses now. (parse_executable): Handle ST_OMP_TARGET_PARALLEL, ST_OMP_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD, ST_OMP_TASKLOOP and ST_OMP_TASKLOOP_SIMD. gcc/testsuite/ * gfortran.dg/gomp/pr77516.f90: Add dg-warning. * gfortran.dg/gomp/target1.f90: Remove ordered clause where it is no longer allowed and corresponding ordered construct. * gfortran.dg/gomp/linear-1.f90: New test. * gfortran.dg/gomp/declare-simd-2.f90: New test. * gfortran.dg/gomp/declare-target-1.f90: New test. * gfortran.dg/gomp/declare-target-2.f90: New test. libgomp/ * testsuite/libgomp.fortran/examples-4/declare_target-1.f90 (fib_wrapper): Add map(from: x) clause. * testsuite/libgomp.fortran/examples-4/declare_target-2.f90 (e_53_2): Likewise. * testsuite/libgomp.fortran/examples-4/declare_target-4.f90 (accum): Add map(tmp) clause. * testsuite/libgomp.fortran/examples-4/declare_target-5.f90 (accum): Add map(tofrom: tmp) clause. * testsuite/libgomp.fortran/examples-4/target_data-3.f90 (gramSchmidt): Likewise. * testsuite/libgomp.fortran/examples-4/teams-2.f90 (dotprod): Add map(tofrom: sum) clause. * testsuite/libgomp.fortran/nestedfn5.f90 (foo): Add twice map (alloc: a, l) clause. Add defaultmap(tofrom: scalar) clause. * testsuite/libgomp.fortran/pr66199-2.f90: Adjust for linear clause only allowed on the loop iterator. * testsuite/libgomp.fortran/target4.f90 (foo): Add map(t) clause. * testsuite/libgomp.fortran/taskloop2.f90: New test. * testsuite/libgomp.fortran/taskloop4.f90: New test. * testsuite/libgomp.fortran/doacross1.f90: New test. * testsuite/libgomp.fortran/doacross3.f90: New test. * testsuite/libgomp.fortran/taskloop1.f90: New test. * testsuite/libgomp.fortran/taskloop3.f90: New test. * testsuite/libgomp.fortran/doacross2.f90: New test. * testsuite/libgomp.c/doacross-1.c (main): Add missing #pragma omp atomic read. * testsuite/libgomp.c/doacross-2.c (main): Likewise. * testsuite/libgomp.c/doacross-3.c (main): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@242037 138bc75d-0d04-0410-961f-82ee72b054a4
2016-11-02 gcc/cesar
* config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Set to zero. libgomp/ * plugin/plugin-nvptx.c (nvptx_exec): Interrogate board attributes to determine default geometry. * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Set gang dimension. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241803 138bc75d-0d04-0410-961f-82ee72b054a4
2016-11-01 * hashtab.h: Use standard GPLv3 with runtime exceptionjakub
boilerplate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241746 138bc75d-0d04-0410-961f-82ee72b054a4
2016-10-27 * oacc-init.c (goacc_new_thread): Use sizeof of the appropriatealdyh
size when allocating new thread. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241627 138bc75d-0d04-0410-961f-82ee72b054a4
2016-09-14 * typeck.c (cp_build_unary_op): Diagnose incrementing booleanmpolacek
expressions. Tweak an error message. * c-c++-common/gomp/atomic-12.c: Use -Wno-deprecated. * c-c++-common/gomp/atomic-13.c: Likewise. * c-c++-common/gomp/atomic-14.c: Likewise. * g++.dg/cpp1y/lambda-init11.C: Remove invalid code. * g++.dg/cpp1z/bool-increment1.C: New test. * c-c++-common/pr60439.c: Add dg-warning. * g++.dg/expr/bitfield4.C: Likewise. * g++.dg/expr/bitfield5.C: Likewise. * g++.dg/expr/bitfield6.C: Likewise. * g++.dg/expr/bool1.C: Likewise. * g++.dg/expr/bool3.C: Likewise. * g++.dg/expr/lval3.C: Likewise. * g++.dg/expr/lval4.C: Likewise. * g++.old-deja/g++.jason/bool5.C: Likewise. * g++.dg/expr/bitfield3.C: Adjust dg-error. * g++.dg/other/error18.C: Likewise. * g++.dg/gomp/atomic-14.C: Likewise. libgomp/ * testsuite/libgomp.c++/atomic-3.C: Use -Wno-deprecated. libstdc++-v3/ * testsuite/23_containers/vector/debug/insert6_neg.cc: Use -Wno-deprecated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240141 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-19 PR fortran/71014jakub
* resolve.c (gfc_resolve): For ns->construct_entities don't save, clear and restore omp state around the resolving. * testsuite/libgomp.fortran/pr71014.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239620 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-182016-08-18 Chung-Lin Tang <cltang@codesourcery.com>cltang
PR middle-end/70895 gcc/ * gimplify.c (omp_add_variable): Adjust/add variable mapping on enclosing parallel construct for reduction variables on OpenACC loop directives. gcc/testsuite/ * gfortran.dg/goacc/loop-tree-1.f90: Add gimple scan-tree-dump test. * c-c++-common/goacc/reduction-1.c: Likewise. * c-c++-common/goacc/reduction-2.c: Likewise. * c-c++-common/goacc/reduction-3.c: Likewise. * c-c++-common/goacc/reduction-4.c: Likewise. libgomp/ * testsuite/libgomp.oacc-fortran/reduction-7.f90: Add explicit firstprivate clauses. * testsuite/libgomp.oacc-fortran/reduction-6.f90: Remove explicit copy clauses. * testsuite/libgomp.oacc-c-c++-common/reduction-7.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-flt.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/collapse-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-wv-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/collapse-4.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-v-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-dbl.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239576 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-142016-08-14 Chung-Lin Tang <cltang@codesourcery.com>cltang
PR fortran/70598 gcc/fortran/ * openmp.c (resolve_omp_clauses): Adjust use_device clause handling to only allow pointers and arrays. gcc/testsuite/ * gfortran.dg/goacc/host_data-tree.f95: Adjust to use pointers in use_device clause. * gfortran.dg/goacc/uninit-use-device-clause.f95: Likewise. * gfortran.dg/goacc/list.f95: Adjust to catch "neither a POINTER nor an array" error messages. libgomp/ * testsuite/libgomp.oacc-fortran/host_data-1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239457 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-08 PR c++/58706jakub
* parser.c: Include tree-iterator.h. (cp_parser_omp_for_loop_init): Move lambda DECL_EXPRs from init to FOR_BLOCK. (cp_parser_omp_for_loop): Handle non-STATEMENT_LIST FOR_BLOCK entries. * testsuite/libgomp.c++/pr58706.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239251 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-04C++ OpenACC routine directive testing: templated, and "auto", trailing ↵tschwinge
return type syntax libgomp/ * testsuite/libgomp.oacc-c++/routine-1-auto.C: New file. * testsuite/libgomp.oacc-c++/routine-1-template-auto.C: Likewise. * testsuite/libgomp.oacc-c++/routine-1-template-trailing-return-type.C: Likewise. * testsuite/libgomp.oacc-c++/routine-1-template.C: Likewise. * testsuite/libgomp.oacc-c++/routine-1-trailing-return-type.C: Likewise. * testsuite/libgomp.oacc-c-c++-common/routine-1.c: Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239126 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-04Make libgomp.oacc-c-c++-common/crash-1.c a "link" test, and don't hardcode -O0tschwinge
libgomp/ * testsuite/libgomp.oacc-c-c++-common/crash-1.c: Make it a "link" test, and don't hardcode -O0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239125 138bc75d-0d04-0410-961f-82ee72b054a4
2016-08-03 gcc/nathan
* config/nvptx/nvptx.c (nvptx_declare_function_name): Round frame size to DImode boundary. (nvptx_propagate): Likewise. libgomp/ * testsuite/libgomp.oacc-c-c++-common/crash-1.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239086 138bc75d-0d04-0410-961f-82ee72b054a4
2016-07-15Fix up ChangeLog entry.jakub
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238378 138bc75d-0d04-0410-961f-82ee72b054a4
2016-07-15 gcc/c/cesar
* c-parser.c (c_parser_oacc_declare): Don't scan for GOMP_MAP_POINTER. * c-typeck.c (handle_omp_array_sections): Mark data clauses with GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having zero-length subarrays. gcc/cp/ * parser.c (cp_parser_oacc_declare): Don't scan for GOMP_MAP_POINTER. * semantics.c (handle_omp_array_sections): Mark data clauses with GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having zero-length subarrays. gcc/ * omp-low.c (lower_omp_target): Mark data clauses with GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having zero-length subarrays. libgomp/ * testsuite/libgomp.oacc-c-c++-common/zero_length_subarrays.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238376 138bc75d-0d04-0410-961f-82ee72b054a4
2016-07-03Add 2 tests for PR middle-end/71734hjl
simd3.f90 and simd4.f90 fail only with -msse2. But they are compiled with -mavx on AVX machines. Add 2 tests to compile simd3.f90 and simd4.f90 with -msse2 on AVX machines. PR middle-end/71734 * testsuite/libgomp.fortran/pr71734-1.f90: New test. * testsuite/libgomp.fortran/pr71734-2.f90: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237950 138bc75d-0d04-0410-961f-82ee72b054a4
2016-07-01 PR fortran/71717jakub
* trans-openmp.c (gfc_omp_privatize_by_reference): Return false for GFC_DECL_ASSOCIATE_VAR_P with POINTER_TYPE. * testsuite/libgomp.fortran/associate3.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237916 138bc75d-0d04-0410-961f-82ee72b054a4
2016-06-17 * semantics.c (handle_omp_array_sections_1): Don't ICE whenjakub
processing_template_decl when checking for bitfields and unions. Look through REFERENCE_REF_P as base of COMPONENT_REF. (finish_omp_clauses): Look through REFERENCE_REF_P even for array sections with COMPONENT_REF bases. * testsuite/libgomp.c++/target-21.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237554 138bc75d-0d04-0410-961f-82ee72b054a4
2016-06-16 * gimplify.c (gimplify_scan_omp_clauses): Handle COMPONENT_REFsjakub
with base of reference to struct. * parser.c (cp_parser_omp_var_list_no_open): Call convert_from_reference before cp_parser_postfix_dot_deref_expression. * semantics.c (finish_omp_clauses): Don't ICE when processing_template_decl when checking for bitfields and unions. Look through REFERENCE_REF_P as base of COMPONENT_REF. * testsuite/libgomp.c++/target-20.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237538 138bc75d-0d04-0410-961f-82ee72b054a4
2016-06-10[PR middle-end/71373] Handle more OMP_CLAUSE_* in nested function decompositiontschwinge
gcc/ * gimplify.c (gimplify_adjust_omp_clauses): Discard OMP_CLAUSE_TILE. * omp-low.c (scan_sharing_clauses): Don't expect OMP_CLAUSE_TILE. gcc/testsuite/ * c-c++-common/goacc/combined-directives.c: XFAIL tree scanning for OpenACC tile clauses. * gfortran.dg/goacc/combined-directives.f90: Likewise. gcc/ PR middle-end/71373 * tree-nested.c (convert_nonlocal_omp_clauses) (convert_local_omp_clauses): Handle OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT, OMP_CLAUSE_INDEPENDENT, OMP_CLAUSE_AUTO, OMP_CLAUSE__CACHE_, OMP_CLAUSE_TILE. gcc/testsuite/ PR middle-end/71373 * gcc.dg/goacc/nested-function-1.c: New file. * gcc.dg/goacc/nested-function-2.c: Likewise. * gcc.dg/goacc/pr71373.c: Likewise. * gfortran.dg/goacc/cray-2.f95: Likewise. * gfortran.dg/goacc/loop-1-2.f95: Likewise. * gfortran.dg/goacc/loop-3-2.f95: Likewise. * gfortran.dg/goacc/cray.f95: Update. * gfortran.dg/goacc/loop-1.f95: Likewise. * gfortran.dg/goacc/loop-3.f95: Likewise. * gfortran.dg/goacc/subroutines.f90: Update, and rename to... * gfortran.dg/goacc/nested-function-1.f90: ... this new file. libgomp/testsuite/ PR middle-end/71373 * libgomp.oacc-c/nested-function-1.c: New file. * libgomp.oacc-c/nested-function-2.c: Likewise. * libgomp.oacc-fortran/nested-function-1.f90: Likewise. * libgomp.oacc-fortran/nested-function-2.f90: Likewise. * libgomp.oacc-fortran/nested-function-3.f90: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237291 138bc75d-0d04-0410-961f-82ee72b054a4
2016-06-10[PR c/71381] C/C++ OpenACC cache directive rejects valid syntaxtschwinge
gcc/c/ PR c/71381 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>: Loosen checking. gcc/cp/ PR c/71381 * parser.c (cp_parser_omp_var_list_no_open) <OMP_CLAUSE__CACHE_>: Loosen checking. gcc/fortran/ PR c/71381 * openmp.c (gfc_match_oacc_cache): Add comment. gcc/testsuite/ PR c/71381 * c-c++-common/goacc/cache-1.c: Update. Move invalid usage tests to... * c-c++-common/goacc/cache-2.c: ... this new file. * gfortran.dg/goacc/cache-1.f95: Move invalid usage tests to... * gfortran.dg/goacc/cache-2.f95: ... this new file. * gfortran.dg/goacc/coarray.f95: Update OpenACC cache directive usage. * gfortran.dg/goacc/cray.f95: Likewise. * gfortran.dg/goacc/loop-1.f95: Likewise. libgomp/ PR c/71381 * testsuite/libgomp.oacc-c-c++-common/cache-1.c: #include "../../../gcc/testsuite/c-c++-common/goacc/cache-1.c". * testsuite/libgomp.oacc-fortran/cache-1.f95: New file. gcc/ * omp-low.c (scan_sharing_clauses): Don't expect OMP_CLAUSE__CACHE_. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237290 138bc75d-0d04-0410-961f-82ee72b054a4
2016-06-08Add ChangeLog entry missed in last commit:cltang
2016-06-03 Chung-Lin Tang <cltang@codesourcery.com> libgomp/ * testsuite/libgomp.oacc-fortran/reduction-8.f90: New testcase. * testsuite/libgomp.oacc-c-c++-common/reduction-8.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237209 138bc75d-0d04-0410-961f-82ee72b054a4
2016-06-032016-06-03 Chung-Lin Tang <cltang@codesourcery.com>cltang
c/ * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction arguments as addressable when async clause exists. cp/ * semantics.c (finish_omp_clauses): Mark OpenACC reduction arguments as addressable when async clause exists. fortran/ * trans-openmp.c (gfc_trans_omp_reduction_list): Add mark_addressable bool parameter, set reduction clause DECLs as addressable when true. (gfc_trans_omp_clauses): Pass clauses->async to gfc_trans_omp_reduction_list, add comment describing OpenACC situation. libgomp/ * testsuite/libgomp.oacc-fortran/reduction-8.f90: New testcase. * testsuite/libgomp.oacc-c-c++-common/reduction-8.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237070 138bc75d-0d04-0410-961f-82ee72b054a4
2016-06-01 PR c/70688cesar
* pr70688.c: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237011 138bc75d-0d04-0410-961f-82ee72b054a4
2016-05-26 * c-parser.c (c_parser_omp_clause_schedule): Warn ifjakub
OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive. * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_SCHEDULE>: Warn if OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive. * openmp.c (resolve_omp_clauses): Warn if chunk_size is known not to be positive. * c-c++-common/gomp/schedule-1.c: New test. * gfortran.dg/gomp/schedule-1.f90: New test. * testsuite/libgomp.c/doacross-1.c (main): Use schedule(static) instead of invalid schedule(static, 0). * testsuite/libgomp.c/doacross-2.c (main): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236793 138bc75d-0d04-0410-961f-82ee72b054a4
2016-05-262016-05-26 Chung-Lin Tang <cltang@codesourcery.com>cltang
libgomp/ * oacc-plugin.h (GOMP_PLUGIN_async_unmap_vars): Add int parameter. * oacc-plugin.c (GOMP_PLUGIN_async_unmap_vars): Add 'int async' parameter, use to set async stream around call to gomp_unmap_vars, call gomp_unmap_vars() with 'do_copyfrom' set to true. * plugin/plugin-nvptx.c (struct ptx_event): Add 'int val' field. (event_gc): Adjust event handling loop, collect PTX_EVT_ASYNC_CLEANUP events and call GOMP_PLUGIN_async_unmap_vars() for each of them. (event_add): Add int parameter, initialize 'val' field when adding new ptx_event struct. (nvptx_evec): Adjust event_add() call arguments. (nvptx_host2dev): Likewise. (nvptx_dev2host): Likewise. (nvptx_wait_async): Likewise. (nvptx_wait_all_async): Likewise. (GOMP_OFFLOAD_openacc_register_async_cleanup): Add async parameter, pass to event_add() call. * oacc-host.c (host_openacc_register_async_cleanup): Add 'int async' parameter. * oacc-mem.c (gomp_acc_remove_pointer): Adjust async case to call openacc.register_async_cleanup_func() hook. * oacc-parallel.c (GOACC_parallel_keyed): Likewise. * target.c (gomp_copy_from_async): Delete function. (gomp_map_vars): Remove async_refcount. (gomp_unmap_vars): Likewise. (gomp_load_image_to_device): Likewise. (omp_target_associate_ptr): Likewise. * libgomp.h (struct splay_tree_key_s): Remove async_refcount. (acc_dispatch_t.register_async_cleanup_func): Add int parameter. (gomp_copy_from_async): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236772 138bc75d-0d04-0410-961f-82ee72b054a4
2016-05-26libgomp/cltang
2016-05-26 Chung-Lin Tang <cltang@codesourcery.com> * target.c (gomp_device_copy): New function. (gomp_copy_host2dev): Likewise. (gomp_copy_dev2host): Likewise. (gomp_free_device_memory): Likewise. (gomp_map_vars_existing): Adjust to call gomp_copy_host2dev. (gomp_map_pointer): Likewise. (gomp_map_vars): Adjust to call gomp_copy_host2dev, handle NULL value from alloc_func plugin hook. (gomp_unmap_tgt): Adjust to call gomp_free_device_memory. (gomp_copy_from_async): Adjust to call gomp_copy_dev2host. (gomp_unmap_vars): Likewise. (gomp_update): Adjust to call gomp_copy_dev2host and gomp_copy_host2dev functions. (gomp_unload_image_from_device): Handle false value from unload_image_func plugin hook. (gomp_init_device): Handle false value from init_device_func plugin hook. (gomp_exit_data): Adjust to call gomp_copy_dev2host. (omp_target_free): Adjust to call gomp_free_device_memory. (omp_target_memcpy): Handle return values from host2dev_func, dev2host_func, and dev2dev_func plugin hooks. (omp_target_memcpy_rect_worker): Likewise. (gomp_target_fini): Handle false value from fini_device_func plugin hook. * libgomp.h (struct gomp_device_descr): Adjust return type of init_device_func, fini_device_func, unload_image_func, free_func, dev2host_func,host2dev_func, and dev2dev_func plugin hooks to 'bool'. * oacc-init.c (acc_shutdown_1): Handle false value from fini_device_func plugin hook. * oacc-host.c (host_init_device): Change return type to bool. (host_fini_device): Likewise. (host_unload_image): Likewise. (host_free): Likewise. (host_dev2host): Likewise. (host_host2dev): Likewise. * oacc-mem.c (acc_free): Handle plugin hook fatal error case. (acc_memcpy_to_device): Likewise. (acc_memcpy_from_device): Likewise. (delete_copyout): Add libfnname parameter, handle free_func hook fatal error case. (acc_delete): Adjust delete_copyout call. (acc_copyout): Likewise. (update_dev_host): Move gomp_mutex_unlock to after host2dev/dev2host hook calls. * plugin/plugin-hsa.c (hsa_warn): Adjust 'hsa_error' local variable to 'hsa_error_msg', for clarity. (hsa_fatal): Likewise. (hsa_error): New function. (init_hsa_context): Change return type to bool, adjust to return false on error. (GOMP_OFFLOAD_get_num_devices): Adjust to handle init_hsa_context return value. (GOMP_OFFLOAD_init_device): Change return type to bool, adjust to return false on error. (get_agent_info): Adjust to return NULL on error. (destroy_hsa_program): Change return type to bool, adjust to return false on error. (GOMP_OFFLOAD_load_image): Adjust to return -1 on error. (destroy_module): Change return type to bool, adjust to return false on error. (GOMP_OFFLOAD_unload_image): Likewise. (GOMP_OFFLOAD_fini_device): Likewise. (GOMP_OFFLOAD_alloc): Change to return NULL when called. (GOMP_OFFLOAD_free): Change to return false when called. (GOMP_OFFLOAD_dev2host): Likewise. (GOMP_OFFLOAD_host2dev): Likewise. (GOMP_OFFLOAD_dev2dev): Likewise. * plugin/plugin-nvptx.c (CUDA_CALL_ERET): New convenience macro. (CUDA_CALL): Likewise. (CUDA_CALL_ASSERT): Likewise. (map_init): Change return type to bool, use CUDA_CALL* macros. (map_fini): Likewise. (init_streams_for_device): Change return type to bool, adjust call to map_init. (fini_streams_for_device): Change return type to bool, adjust call to map_fini. (select_stream_for_async): Release stream_lock before calls to GOMP_PLUGIN_fatal, adjust call to map_init. (nvptx_init): Use CUDA_CALL* macros. (nvptx_attach_host_thread_to_device): Change return type to bool, use CUDA_CALL* macros. (nvptx_open_device): Use CUDA_CALL* macros. (nvptx_close_device): Change return type to bool, use CUDA_CALL* macros. (nvptx_get_num_devices): Use CUDA_CALL* macros. (link_ptx): Change return type to bool, use CUDA_CALL* macros. (nvptx_exec): Use CUDA_CALL* macros. (nvptx_alloc): Use CUDA_CALL* macros. (nvptx_free): Change return type to bool, use CUDA_CALL* macros. (nvptx_host2dev): Likewise. (nvptx_dev2host): Likewise. (nvptx_wait): Use CUDA_CALL* macros. (nvptx_wait_async): Likewise. (nvptx_wait_all): Likewise. (nvptx_wait_all_async): Likewise. (nvptx_set_cuda_stream): Adjust order of stream_lock acquire, use CUDA_CALL* macros, adjust call to map_fini. (GOMP_OFFLOAD_init_device): Change return type to bool, adjust code accordingly. (GOMP_OFFLOAD_fini_device): Likewise. (GOMP_OFFLOAD_load_image): Adjust calls to nvptx_attach_host_thread_to_device/link_ptx to handle errors, use CUDA_CALL* macros. (GOMP_OFFLOAD_unload_image): Change return type to bool, adjust return code. (GOMP_OFFLOAD_alloc): Adjust calls to code to handle error return. (GOMP_OFFLOAD_free): Change return type to bool, adjust calls to handle error return. (GOMP_OFFLOAD_dev2host): Likewise. (GOMP_OFFLOAD_host2dev): Likewise. (GOMP_OFFLOAD_openacc_register_async_cleanup): Use CUDA_CALL* macros. (GOMP_OFFLOAD_openacc_create_thread_data): Likewise. liboffloadmic/ 2016-05-26 Chung-Lin Tang <cltang@codesourcery.com> * plugin/libgomp-plugin-intelmic.cpp (offload): Change return type to bool, adjust return code. (GOMP_OFFLOAD_init_device): Likewise. (GOMP_OFFLOAD_fini_device): Likewise. (get_target_table): Likewise. (offload_image): Likwise. (GOMP_OFFLOAD_load_image): Adjust call to offload_image(), change to return -1 on error. (GOMP_OFFLOAD_unload_image): Change return type to bool, adjust return code. (GOMP_OFFLOAD_alloc): Likewise. (GOMP_OFFLOAD_free): Likewise. (GOMP_OFFLOAD_host2dev): Likewise. (GOMP_OFFLOAD_dev2host): Likewise. (GOMP_OFFLOAD_dev2dev): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236768 138bc75d-0d04-0410-961f-82ee72b054a4
2016-05-24 gcc/c/cesar
* c-parser.c (c_parser_oacc_declare): Add support for GOMP_MAP_FIRSTPRIVATE_POINTER. * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp argument with enum c_omp_region_type ort. (handle_omp_array_sections): Likewise. Update call to handle_omp_array_sections_1. (c_finish_omp_clauses): Add specific errors and warning messages for OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update call to handle_omp_array_sections. gcc/cp/ * parser.c (cp_parser_oacc_declare): Add support for GOMP_MAP_FIRSTPRIVATE_POINTER. * semantics.c (handle_omp_array_sections_1): Replace bool is_omp argument with enum c_omp_region_type ort. Don't privatize OpenACC non-static members. (handle_omp_array_sections): Replace bool is_omp argument with enum c_omp_region_type ort. Update call to handle_omp_array_sections_1. (finish_omp_clauses): Add specific errors and warning messages for OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update call to handle_omp_array_sections. gcc/ * gimplify.c (omp_notice_variable): Use zero-length arrays for data pointers inside OACC_DATA regions. (gimplify_scan_omp_clauses): Prune firstprivate clause associated with OACC_DATA, OACC_ENTER_DATA and OACC_EXIT data regions. (gimplify_adjust_omp_clauses): Fix typo in comment. gcc/testsuite/ * c-c++-common/goacc/data-clause-duplicate-1.c: Adjust test. * c-c++-common/goacc/deviceptr-1.c: Likewise. * c-c++-common/goacc/kernels-alias-3.c: Likewise. * c-c++-common/goacc/kernels-alias-4.c: Likewise. * c-c++-common/goacc/kernels-alias-5.c: Likewise. * c-c++-common/goacc/kernels-alias-8.c: Likewise. * c-c++-common/goacc/kernels-alias-ipa-pta-3.c: Likewise. * c-c++-common/goacc/pcopy.c: Likewise. * c-c++-common/goacc/pcopyin.c: Likewise. * c-c++-common/goacc/pcopyout.c: Likewise. * c-c++-common/goacc/pcreate.c: Likewise. * c-c++-common/goacc/pr70688.c: New test. * c-c++-common/goacc/present-1.c: Adjust test. * c-c++-common/goacc/reduction-5.c: Likewise. * g++.dg/goacc/data-1.C: New test. libgomp/ * oacc-mem.c (acc_malloc): Update handling of shared-memory targets. (acc_free): Likewise. (acc_memcpy_to_device): Likewise. (acc_memcpy_from_device): Likewise. (acc_deviceptr): Likewise. (acc_hostptr): Likewise. (acc_is_present): Likewise. (acc_map_data): Likewise. (acc_unmap_data): Likewise. (present_create_copy): Likewise. (delete_copyout): Likewise. (update_dev_host): Likewise. * testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Remove xfail. * testsuite/libgomp.oacc-c-c++-common/data-2-lib.c: New test. * testsuite/libgomp.oacc-c-c++-common/data-2.c: Adjust test. * testsuite/libgomp.oacc-c-c++-common/data-3.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/enter_exit-lib.c: New test. * testsuite/libgomp.oacc-c-c++-common/lib-13.c: Adjust test so that it only runs on nvptx targets. * testsuite/libgomp.oacc-c-c++-common/lib-14.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-15.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-17.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-21.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-22.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-24.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-28.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-29.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-43.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-52.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236678 138bc75d-0d04-0410-961f-82ee72b054a4
2016-05-23[hsa] Avoid segfault in hsa switch expansionjamborm
2016-05-23 Martin Jambor <mjambor@suse.cz> * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Create an empty default block if a PHI node in the original one would be resized. libgomp/ * testsuite/libgomp.hsa.c/switch-sbr-2.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236585 138bc75d-0d04-0410-961f-82ee72b054a4
2016-05-172016-05-17 Chung-Lin Tang <cltang@codesourcery.com>cltang
libgomp/ * oacc-init.c (acc_init): Remove !cached_base_dev condition on call to gomp_init_targets_once. (acc_set_device_type): Remove !cached_base_dev condition on call to gomp_init_targets_once, move call to before acc_device_lock acquire, to avoid deadlock. (acc_get_device_num): Remove !cached_base_dev condition on call to gomp_init_targets_once. (acc_set_device_num): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236310 138bc75d-0d04-0410-961f-82ee72b054a4
2016-05-16[hsa] Increase hsa symbol alignment to natural onejamborm
2016-05-16 Martin Jambor <mjambor@suse.cz> * hsa-gen.c (fillup_for_decl): Increase alignment to natural one. (get_symbol_for_decl): Sorry if a global symbol in under-aligned. libgomp/ * testsuite/libgomp.hsa.c/complex-align-2.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236295 138bc75d-0d04-0410-961f-82ee72b054a4
2016-05-02 gcc/nathan
* omp-low.c (struct oacc_loop): Add 'inner' field. (new_oacc_loop_raw): Initialize it to zero. (oacc_loop_fixed_partitions): Initialize it. (oacc_loop_auto_partitions): Partition outermost loop to outermost available partitioning. gcc/testsuite/ * c-c++-common/goacc/loop-auto-1.c: Adjust expected warnings. libgomp/ * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Adjust expected partitioning. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235756 138bc75d-0d04-0410-961f-82ee72b054a4
2016-04-29 gcc/c-family/cesar
PR middle-end/70626 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument. * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate reduction clauses in acc parallel loops. gcc/c/ PR middle-end/70626 * c-parser.c (c_parser_oacc_loop): Don't augment mask with OACC_LOOP_CLAUSE_MASK. (c_parser_oacc_kernels_parallel): Update call to c_oacc_split_loop_clauses. gcc/cp/ PR middle-end/70626 * parser.c (cp_parser_oacc_loop): Don't augment mask with OACC_LOOP_CLAUSE_MASK. (cp_parser_oacc_kernels_parallel): Update call to c_oacc_split_loop_clauses. gcc/fortran/ PR middle-end/70626 * trans-openmp.c (gfc_trans_oacc_combined_directive): Duplicate the reduction clause in both parallel and loop directives. gcc/testsuite/ PR middle-end/70626 * c-c++-common/goacc/combined-reduction.c: New test. * gfortran.dg/goacc/reduction-2.f95: Add check for kernels reductions. libgomp/ PR middle-end/70626 * testsuite/libgomp.oacc-c++/template-reduction.C: Adjust test. * testsuite/libgomp.oacc-c-c++-common/combined-reduction.c: New test. * testsuite/libgomp.oacc-fortran/combined-reduction.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235651 138bc75d-0d04-0410-961f-82ee72b054a4
2016-04-21libgomp nvptx plugin: make cuMemFreeHost error non-fatalamonakov
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235339 138bc75d-0d04-0410-961f-82ee72b054a4
2016-04-20 PR middle-end/70680jakub
* gimplify.c (gimplify_omp_for): Call omp_notice_variable for implicitly linear or lastprivate iterator on the outer context. * testsuite/libgomp.c/pr70680-1.c: New test. * testsuite/libgomp.c/pr70680-2.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235232 138bc75d-0d04-0410-961f-82ee72b054a4
2016-04-14 libgomp/cesar
* testsuite/libgomp.oacc-fortran/non-scalar-data.f90: Don't pass parameter variables to subroutines. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234992 138bc75d-0d04-0410-961f-82ee72b054a4
2016-04-14 PR middle-end/70643cesar
gcc/ * omp-low.c (lower_oacc_reductions): Check for TREE_CONSTANT when building a mem ref for the incoming reduction variable. libgomp/ * testsuite/libgomp.oacc-fortran/pr70643.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234973 138bc75d-0d04-0410-961f-82ee72b054a4
2016-04-13 libgomp/cesar
PR testsuite/68242 * testsuite/libgomp.oacc-c-c++-common/reduction-1.c: Adjust test. * testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234957 138bc75d-0d04-0410-961f-82ee72b054a4
2016-04-12libgomp external ABI prototypes maintenancetschwinge
libgomp/ * libgomp_g.h: Rename GOACC_parallel_keyd prototype to GOACC_parallel_keyed, restore GOACC_parallel prototype, new GOACC_declare prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234901 138bc75d-0d04-0410-961f-82ee72b054a4
2016-04-12Merge libgomp.oacc-c-c++-common/loop-reduction-*.c into ↵tschwinge
libgomp.oacc-c-c++-common/reduction-7.c libgomp/ * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gang-np-1.c: Merge this file, and... * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gv-np-1.c: ... this file, and... * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gw-np-1.c: ... this file, and... * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-1.c: ... this file, and... * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-2.c: ... this file, and... * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-3.c: ... this file, and... * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-4.c: ... this file, and... * testsuite/libgomp.oacc-c-c++-common/loop-reduction-vector-p-1.c: ... this file, and... * testsuite/libgomp.oacc-c-c++-common/loop-reduction-vector-p-2.c: ... this file, and... * testsuite/libgomp.oacc-c-c++-common/loop-reduction-worker-p-1.c: ... this file, and... * testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-1.c: ... this file, and... * testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-2.c: ... this file, and... * testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-3.c: ... this file into... * testsuite/libgomp.oacc-c-c++-common/reduction-7.c: ... this file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234899 138bc75d-0d04-0410-961f-82ee72b054a4
2016-04-12Improve libgomp.oacc-c-c++-common/par-loop-comb-reduction-2.ctschwinge
libgomp/ * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-2.c: Make failure observable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234897 138bc75d-0d04-0410-961f-82ee72b054a4
2016-04-12 * omp-low.c (lower_omp_target): Use GOMP_MAP_FIRSTPRIVATE_INTjakub
regardless whether there are depend clauses or not. * libgomp.h (struct gomp_target_task): Remove firstprivate_copies field. * target.c (gomp_target_fallback_firstprivate, gomp_target_unshare_firstprivate): Removed. (GOMP_target_ext): Copy firstprivate vars into gomp_allocaed memory before waiting for dependencies. (gomp_target_task_fn): Don't copy firstprivate vars here. * task.c (GOMP_PLUGIN_target_task_completion): Don't free firstprivate_copies here. (gomp_create_target_task): Don't initialize firstprivate_copies field. * testsuite/libgomp.c/target-25.c (main): Use map (to:) instead of explicit/implicit firstprivate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234894 138bc75d-0d04-0410-961f-82ee72b054a4
2016-04-08 gcc/cesar
PR lto/70289 PR ipa/70348 PR tree-optimization/70373 PR middle-end/70533 PR middle-end/70534 PR middle-end/70535 * gimplify.c (gimplify_adjust_omp_clauses): Add or adjust data clauses for acc parallel reductions as necessary. Error on those that are private. * omp-low.c (scan_sharing_clauses): Don't install variables which are used in acc parallel reductions. (lower_rec_input_clauses): Remove dead code. (lower_oacc_reductions): Add support for reference reductions. (lower_reduction_clauses): Remove dead code. (lower_omp_target): Don't remap variables appearing in acc parallel reductions. * tree.h (OMP_CLAUSE_MAP_IN_REDUCTION): New macro. gcc/testsuite/ * c-c++-common/goacc/reduction-5.c: New test. * c-c++-common/goacc/reduction-promotions.c: New test. * gfortran.dg/goacc/reduction-3.f95: New test. * gfortran.dg/goacc/reduction-promotions.f90: New test. libgomp/ * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gang-np-1.c: New test. * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gw-np-1.c: New test. * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-1.c: New test. * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-2.c: New test. * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-3.c: New test. * testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-4.c: New test. * testsuite/libgomp.oacc-c-c++-common/loop-reduction-vector-p-1.c: New test. * testsuite/libgomp.oacc-c-c++-common/loop-reduction-vector-p-2.c: New test. * testsuite/libgomp.oacc-c-c++-common/loop-reduction-worker-p-1.c: New test. * testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-1.c: New test. * testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-2.c: New test. * testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-3.c: New test. * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-1.c: New test. * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-2.c: New test. * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-3.c: New test. * testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-4.c: New test. * testsuite/libgomp.oacc-c-c++-common/par-reduction-1.c: Add test coverage. * testsuite/libgomp.oacc-c-c++-common/par-reduction-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/parallel-reduction.c: New test. * testsuite/libgomp.oacc-c-c++-common/pr70289.c: New test. * testsuite/libgomp.oacc-c-c++-common/pr70373.c: New test. * testsuite/libgomp.oacc-c-c++-common/reduction-1.c: Add test coverage. * testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-3.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-4.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-6.c: New test. * testsuite/libgomp.oacc-c-c++-common/reduction.h: New test. * testsuite/libgomp.oacc-fortran/parallel-reduction.f90: New test. * testsuite/libgomp.oacc-fortran/pr70289.f90: New test. * testsuite/libgomp.oacc-fortran/reduction-1.f90: Add test coverage. * testsuite/libgomp.oacc-fortran/reduction-2.f90: Likewise. * testsuite/libgomp.oacc-fortran/reduction-3.f90: Likewise. * testsuite/libgomp.oacc-fortran/reduction-4.f90: Likewise. * testsuite/libgomp.oacc-fortran/reduction-5.f90: Likewise. * testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise. * testsuite/libgomp.oacc-fortran/reduction-7.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234840 138bc75d-0d04-0410-961f-82ee72b054a4
2016-03-30Update OpenACC test casestschwinge
gcc/testsuite/ * c-c++-common/goacc/combined-directives.c: Clean up dg-* directives. * c-c++-common/goacc/loop-clauses.c: Likewise. * g++.dg/goacc/template.C: Likewise. * gfortran.dg/goacc/combined-directives.f90: Likewise. * gfortran.dg/goacc/loop-1.f95: Likewise. * gfortran.dg/goacc/loop-5.f95: Likewise. * gfortran.dg/goacc/loop-6.f95: Likewise. * gfortran.dg/goacc/loop-tree-1.f90: Likewise. * c-c++-common/goacc-gomp/nesting-1.c: Update. * c-c++-common/goacc-gomp/nesting-fail-1.c: Likewise. * c-c++-common/goacc/clauses-fail.c: Likewise. * c-c++-common/goacc/parallel-1.c: Likewise. * c-c++-common/goacc/reduction-1.c: Likewise. * c-c++-common/goacc/reduction-2.c: Likewise. * c-c++-common/goacc/reduction-3.c: Likewise. * c-c++-common/goacc/reduction-4.c: Likewise. * c-c++-common/goacc/routine-3.c: Likewise. * c-c++-common/goacc/routine-4.c: Likewise. * c-c++-common/goacc/routine-5.c: Likewise. * c-c++-common/goacc/tile.c: Likewise. * g++.dg/goacc/template.C: Likewise. * gfortran.dg/goacc/combined-directives.f90: Likewise. * c-c++-common/goacc/nesting-1.c: Move dg-error test cases into... * c-c++-common/goacc/nesting-fail-1.c: ... this file. Update. * c-c++-common/goacc/kernels-1.c: Update. Incorporate... * c-c++-common/goacc/kernels-empty.c: ... this file, and... * c-c++-common/goacc/kernels-eternal.c: ... this file, and... * c-c++-common/goacc/kernels-noreturn.c: ... this file. * c-c++-common/goacc/host_data-1.c: New file. Incorporate... * c-c++-common/goacc/use_device-1.c: ... this file. * c-c++-common/goacc/host_data-2.c: New file. Incorporate... * c-c++-common/goacc/host_data-5.c: ... this file, and... * c-c++-common/goacc/host_data-6.c: ... this file. * c-c++-common/goacc/loop-2-kernels.c: New file. * c-c++-common/goacc/loop-2-parallel.c: Likewise. * c-c++-common/goacc/loop-3.c: Likewise. * g++.dg/goacc/reference.C: Likewise. * g++.dg/goacc/routine-1.C: Likewise. * g++.dg/goacc/routine-2.C: Likewise. libgomp/ * testsuite/libgomp.oacc-c-c++-common/clauses-1.c: Update. * testsuite/libgomp.oacc-c-c++-common/deviceptr-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/if-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/vector-loop.c: Likewise. * testsuite/libgomp.oacc-fortran/asyncwait-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/asyncwait-2.f90: Likewise. * testsuite/libgomp.oacc-fortran/asyncwait-3.f90: Likewise. * testsuite/libgomp.oacc-fortran/declare-1.f90: Likewise. * testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Likewise. XFAIL. * testsuite/libgomp.oacc-c-c++-common/firstprivate-1.c: Update. Incorporate... * testsuite/libgomp.oacc-c-c++-common/firstprivate-2.c: ... this file. * testsuite/libgomp.oacc-c++/template-reduction.C: New file. * testsuite/libgomp.oacc-c-c++-common/gang-static-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/gang-static-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-loop-clauses.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/private-variables.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/reduction-7.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/routine-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/routine-4.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/routine-wv-2.c: Likewise. * testsuite/libgomp.oacc-fortran/clauses-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/default-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/firstprivate-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/gang-static-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/if-1.f90: Likewise. * testsuite/libgomp.oacc-fortran/implicit-firstprivate-ref.f90: Likewise. * testsuite/libgomp.oacc-fortran/pr68813.f90: Likewise. * testsuite/libgomp.oacc-fortran/private-variables.f90: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-1.c: Merge this file... * testsuite/libgomp.oacc-c-c++-common/parallel-1.c: ..., and this file into... * testsuite/libgomp.oacc-c-c++-common/data-clauses.h: ... this new file. Update. * testsuite/libgomp.oacc-c-c++-common/data-clauses-kernels.c: New file. * testsuite/libgomp.oacc-c-c++-common/data-clauses-parallel.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-2.c: Rename to... * testsuite/libgomp.oacc-c-c++-common/data-clauses-kernels-ipa-pta.c: ... this new file. Update. * testsuite/libgomp.oacc-c-c++-common/parallel-2.c: Rename to... * testsuite/libgomp.oacc-c-c++-common/data-clauses-parallel-ipa-pta.c: ... this new file. Update. * testsuite/libgomp.oacc-c-c++-common/mode-transitions.c: New file. Incorporate... * testsuite/libgomp.oacc-c-c++-common/worker-single-1a.c: ... this file, and... * testsuite/libgomp.oacc-c-c++-common/worker-single-4.c: ... this file, and... * testsuite/libgomp.oacc-c-c++-common/worker-single-6.c: ... this file. * testsuite/libgomp.oacc-c-c++-common/update-1-2.c: Remove file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234575 138bc75d-0d04-0410-961f-82ee72b054a4
2016-03-29Avoid ERROR in libgomp.oacc-c++/c++.exp in non-C++ configurationstschwinge
libgomp/ * testsuite/libgomp.oacc-c++/c++.exp [!lang_test_file_found]: Call set-torture-options. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234519 138bc75d-0d04-0410-961f-82ee72b054a4
2016-03-24Also test -O0 for OpenACC C, C++ offloading test casestschwinge
libgomp/ * testsuite/libgomp.oacc-c++/c++.exp: Set up torture testing, use gcc-dg-runtest. * testsuite/libgomp.oacc-c/c.exp: Likewise. * testsuite/libgomp.oacc-c-c++-common/acc-on-device-2.c: Specify -fno-builtin-acc_on_device instead of -O0. * testsuite/libgomp.oacc-c-c++-common/acc-on-device.c: Skip for -O0. * testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-g-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-g-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-gwv-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-g-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-v-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-w-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-v-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-w-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-wv-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/routine-g-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/routine-gwv-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/routine-v-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/routine-w-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/routine-wv-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-alias-ipa-pta-2.c: Don't specify -O2. * testsuite/libgomp.oacc-c-c++-common/kernels-alias-ipa-pta-3.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/kernels-alias-ipa-pta.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234471 138bc75d-0d04-0410-961f-82ee72b054a4
2016-03-24Properly assign to packet header (PR hsa/70394)marxin
* plugin/plugin-hsa.c (packet_store_release): New function that is taken from the HSA runtime manual. (GOMP_OFFLOAD_run): Use the function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234454 138bc75d-0d04-0410-961f-82ee72b054a4