<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/56632>56632</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            OpenMP Target Missing support for non-trivial reduction types on GPUs
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          martagarciamartinez
      </td>
    </tr>
</table>

<pre>
    While building Kokkos with TESTS and EXAMPLES ON on V100 I found this error:

==============================================
[ 29%] Building CXX object core/unit_test/CMakeFiles/KokkosCore_UnitTest_OpenMPTarget.dir/openmptarget/TestOpenMPTarget_Reducers_d.cpp.o
clang-15: /home/yeluo/.jacamar-ci/builds/a5MjzozQ/001/intel-dga/automatedtests/yeluo/test_llvm/llvm-project/clang/lib/CodeGen/CGExprAgg.cpp:2067: void clang::CodeGen::CodeGenFunction::EmitAggregateCopy(clang::CodeGen::LValue, clang::CodeGen::LValue, clang::QualType, clang::CodeGen::AggValueSlot::Overlap_t, bool): Assertion `(Record->hasTrivialCopyConstructor() || Record->hasTrivialCopyAssignment() || Record->hasTrivialMoveConstructor() || Record->hasTrivialMoveAssignment() || Record->hasAttr<TrivialABIAttr>() || Record->isUnion()) && "Trying to aggregate-copy a type without a trivial copy/move " "constructor or assignment operator"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
==============================================

Based on a discussion with Johannes during his LLVM Office Hours, it seems that the problem is that 
LLVM does not support non trivial copy-constructors in device reductions => LLVM Team would need to find someone who could implement support for non trivial GPU reductions.

I have files and reproducer. Please feel free to contact me.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzNVUtz2zgM_jXyBWONLEeyffDBcZxsduNN2rjZ3DwUCUlMKFFDUm6TX78gFbeebbOvU2eoB0mA-AB8IAotXpZ_1FIhFL1UQrYV_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