/*
 * 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 parallel do 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 parallel do 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 parallel do 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 parallel do 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 parallel do simd num_teams (4) thread_limit (4+5) private (a[foo(x, goo(x, y)):100], b[1:30], c) firstprivate (foo(x), y) shared (a, b, c[1:10]) allocate (user_defined_test : m, n[1:5]) reduction (tasktest : x11, y, z) default (none) num_threads (3*5+4/(7+10)) lastprivate(conditional:a,b,c) linear(a,b,c:2) ordered(a) collapse(a) schedule(monotonic,simd:runtime,2) nowait shared (a, b, c[1:10]) copyin (a[foo(goo(x)):20],a,y) default (shared) if (parallel : b) proc_bind (master) dist_schedule(static)
PASS: !$omp target teams distribute parallel do simd num_teams(4) thread_limit(4+5) private(a[foo(x,goo(x,y)) : 100], b[1 : 30], c) firstprivate(foo(x), y) shared(a, b, c[1 : 10]) allocate (user_defined_test: m, n[1 : 5]) reduction(tasktest : x11, y, z) default (none) num_threads(3*5+4/(7+10)) lastprivate (conditional: a, b, c) linear (a, b, c:2) ordered(a) collapse(a) schedule(monotonic,simd:runtime, 2) nowait copyin(a[foo(goo(x)) : 20], a, y) if (parallel: b) proc_bind (master) dist_schedule (static)

!$omp target teams distribute parallel do 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))  num_teams (4) thread_limit (4+5) private (a[foo(x, goo(x, y)):100], b[1:30], c) firstprivate (foo(x), y) shared (a, b, c[1:10]) allocate (user_defined_test : m, n[1:5]) reduction (tasktest : x11, y, z) default (none) num_threads (3*5+4/(7+10)) lastprivate(conditional:a,b,c) linear(a,b,c:2) ordered(a) collapse(a) schedule(monotonic,simd:runtime,2) nowait shared (a, b, c[1:10]) copyin (a[foo(goo(x)):20],a,y) default (shared) if (parallel : b) proc_bind (master) dist_schedule(static)
PASS: !$omp target teams distribute parallel do simd if (target: 3456) device (ancestor : 5) private(x, n[1 : 5], a[foo(x,goo(x,y)) : 100], b[1 : 30], c) 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)) num_teams(4) thread_limit(4+5) shared(a, b, c[1 : 10]) allocate (user_defined_test: m, n[1 : 5]) reduction(tasktest : x11, y, z) default (none) num_threads(3*5+4/(7+10)) lastprivate (conditional: a, b, c) linear (a, b, c:2) ordered(a) collapse(a) schedule(monotonic,simd:runtime, 2) copyin(a[foo(goo(x)) : 20], a, y) if (parallel: b) proc_bind (master) dist_schedule (static)

!$omp target teams distribute parallel do 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))  num_teams (4) thread_limit (4+5) private (a[foo(x, goo(x, y)):100], b[1:30], c) firstprivate (foo(x), y) shared (a, b, c[1:10]) allocate (user_defined_test : m, n[1:5]) reduction (tasktest : x11, y, z) default (none) num_threads (3*5+4/(7+10)) lastprivate(conditional:a,b,c) linear(a,b,c:2) ordered(a) collapse(a) schedule(monotonic,simd:runtime,2) nowait shared (a, b, c[1:10]) copyin (a[foo(goo(x)):20],a,y) default (shared) if (parallel : b) proc_bind (master) dist_schedule(static) if (simd: a) safelen(4) aligned(*a,&b,c:2) nontemporal(a) collapse(a)
PASS: !$omp target teams distribute parallel do simd if (target: 3456) device (ancestor : 5) private(x, n[1 : 5], a[foo(x,goo(x,y)) : 100], b[1 : 30], c) 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)) num_teams(4) thread_limit(4+5) shared(a, b, c[1 : 10]) allocate (user_defined_test: m, n[1 : 5]) reduction(tasktest : x11, y, z) default (none) num_threads(3*5+4/(7+10)) lastprivate (conditional: a, b, c) linear (a, b, c:2) ordered(a) collapse(a) schedule(monotonic,simd:runtime, 2) copyin(a[foo(goo(x)) : 20], a, y) if (parallel: b) proc_bind (master) dist_schedule (static) if (simd: a) safelen(4) aligned (*a, &b, c:2) nontemporal(a)
