2015-10-23 Julian Brown James Norris gcc/c-family/ * c-pragma.c (oacc_pragmas): Add host_data pragma definition. * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_HOST_DATA. (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE. gcc/c/ * c-parser.c (c_parser_omp_clause_name): Add handling of use_device clause. (c_parser_oacc_clause_use_device): New function. (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_USE_DEVICE. (OACC_HOST_DATA_CLAUSE_MASK): New definition. (c_parser_oacc_host_data): New function. (c_parser_omp_construct): Handle PRAGMA_OACC_HOST_DATA. * c-tree.h: Add definition for c_finish_oacc_host_data. * c-typeck.c (c_finish_oacc_host_data): New function. gcc/cp/ * cp-tree.h (finish_oacc_host_data): New function. * parser.c (cp_parser_omp_clause_name): Add handling of use_device clause. (cp_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_USE_DEVICE. (OACC_HOST_DATA_CLAUSE_MASK): New definition. (cp_parser_oacc_host_data): New function. (cp_parser_omp_construct): Handle PRAGMA_OACC_HOST_DATA. (cp_parser_pragma): Handle PRAGMA_OACC_HOST_DATA. * semantics.c (finish_omp_clauses): Hnadle OMP_CLAUSE_USE_DEVICE. (finish_oacc_host_data): New function. gcc/ * gimplify.c (enum gimplify_omp_var_data): Add GOVD_USE_DEVICE. (enum omp_region_type): Add ORT_HOST_DATA. (gimplify_scan_omp_clauses): Adjust handling of OMP_CLAUSE_USE_DEVICE. (gimpify_host_data, gimplify_host_data_1): New functions. (gimplify_expr): Handle OACC_HOST_DATA. * omp-builtins.def (BUILT_IN_GOACC_DEVICEPTR): New builtin. gcc/testsuite/ * c-c++-common/goacc/host_data-1.c: New test. * c-c++-common/goacc/host_data-2.c: Likewise. * c-c++-common/goacc/host_data-3.c: Likewise. * c-c++-common/goacc/host_data-4.c: Likewise. libgomp/ * libgomp.map (GOACC_2.0): Add GOACC_deviceptr. * oacc-mem.c (GOACC_deviceptr): New function. * testsuite/libgomp.oacc-c-c++-common/host_data-1.c: New test. * testsuite/libgomp.oacc-c-c++-common/host_data-2.c: Likewise.