/*
 * Copyright (c) 2018-2025, High Performance Computing Architecture and System
 * research laboratory at University of North Carolina at Charlotte (HPCAS@UNCC)
 * and Lawrence Livermore National Security, LLC.
 *
 * SPDX-License-Identifier: (BSD-3-Clause)
 */

//For testing purpose, there are several extra empty lines.
//The final version should only contain necessary information.
//This is not a C/C++ code, so there's no required writing style.
//Only two kinds of special lines will be recognized.
//One is starting with "omp", which is the input.
//The other one is starting with "PASS: ", which is the result for validation.

!$omp target teams distribute simd if(target:3456) device(ancestor:5) private (x, n[1:5]) firstprivate (foo(x), y) in_reduction (test_identifier : x11, y, z) is_device_ptr(m,n,j) defaultmap(alloc:pointer) nowait depend(iterator(int bba=4:120:2), in:m, n) allocate (omp_default_mem_alloc : m, n[1:5]) uses_allocators(omp_default_mem_alloc(1234567),omp_const_mem_alloc(234))
PASS: !$omp target teams distribute simd if (target: 3456) device (ancestor : 5) private (x, n[1:5]) firstprivate (foo(x), y) in_reduction (test_identifier : x11, y, z) is_device_ptr (m, n, j) defaultmap (alloc: pointer) nowait depend (iterator ( int bba=4:120:2 ), in : m, n) allocate (omp_default_mem_alloc: m, n[1:5]) uses_allocators (omp_default_mem_alloc(1234567),omp_const_mem_alloc(234) )

!$omp target teams distribute simd if(target:3456) device(ancestor:5) private (x, n[1:5]) firstprivate (foo(x), y) in_reduction (test_identifier : x11, y, z) is_device_ptr(m,n,j) defaultmap(alloc:pointer) nowait depend(iterator(int bba=4:120:2,char huj = 2:677), inout:m, n) allocate (omp_default_mem_alloc : m, n[1:5]) uses_allocators(omp_default_mem_alloc(1234567),omp_const_mem_alloc(234))
PASS: !$omp target teams distribute simd if (target: 3456) device (ancestor : 5) private (x, n[1:5]) firstprivate (foo(x), y) in_reduction (test_identifier : x11, y, z) is_device_ptr (m, n, j) defaultmap (alloc: pointer) nowait depend (iterator ( int bba=4:120:2, char huj=2:677 ), inout : m, n) allocate (omp_default_mem_alloc: m, n[1:5]) uses_allocators (omp_default_mem_alloc(1234567),omp_const_mem_alloc(234) )

!$omp target teams distribute simd dist_schedule(static,2) if(simd:a) safelen(4) simdlen(4) lastprivate(conditional:a,b,c) linear(a,b,c:2) aligned(*a,&b,c:2) reduction(task,max:a,b,c) nontemporal(a) collapse(a) order(concurrent)
PASS: !$omp target teams distribute simd dist_schedule (static, 2) if (simd: a) safelen (4) simdlen (4) lastprivate (conditional: a, b, c) linear (a, b, c:2) aligned (*a, &b, c:2) reduction (task, max : a, b, c) nontemporal (a) collapse (a) order (concurrent)

!$omp target teams distribute simd if(target:3456) device(ancestor:5) private (x, n[1:5]) firstprivate (foo(x), y) in_reduction (test_identifier : x11, y, z) is_device_ptr(m,n,j) defaultmap(alloc:pointer) nowait depend(iterator(int bba=4:120:2,char huj = 2:677), inout:m, n) allocate (omp_default_mem_alloc : m, n[1:5]) uses_allocators(omp_default_mem_alloc(1234567),omp_const_mem_alloc(234))  dist_schedule(static,2) if(simd:a) safelen(4) simdlen(4) lastprivate(conditional:a,b,c) linear(a,b,c:2) aligned(*a,&b,c:2) reduction(task,max:a,b,c) nontemporal(a) collapse(a) order(concurrent)
PASS: !$omp target teams distribute simd if (target: 3456) device (ancestor : 5) private (x, n[1:5]) firstprivate (foo(x), y) in_reduction (test_identifier : x11, y, z) is_device_ptr (m, n, j) defaultmap (alloc: pointer) nowait depend (iterator ( int bba=4:120:2, char huj=2:677 ), inout : m, n) allocate (omp_default_mem_alloc: m, n[1:5]) uses_allocators (omp_default_mem_alloc(1234567),omp_const_mem_alloc(234) ) dist_schedule (static, 2) if (simd: a) safelen (4) simdlen (4) lastprivate (conditional: a, b, c) linear (a, b, c:2) aligned (*a, &b, c:2) reduction (task, max : a, b, c) nontemporal (a) collapse (a) order (concurrent)

!$omp target teams distribute simd
PASS: !$omp target teams distribute simd 

!$omp end target teams distribute simd
PASS: !$omp end target teams distribute simd 
