<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - ptxas fatal : Unresolved extern function '__cxa_begin_catch'"
   href="https://llvm.org/bugs/show_bug.cgi?id=30593">30593</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ptxas fatal   : Unresolved extern function '__cxa_begin_catch'
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>CUDA
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>crtrott@sandia.gov
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=17395" name="attach_17395" title="Reproducer cya_begin_catch_error">attachment 17395</a> <a href="attachment.cgi?id=17395&action=edit" title="Reproducer cya_begin_catch_error">[details]</a></span>
Reproducer cya_begin_catch_error

I am getting this error for a particular situation in our Kokkos library.
Unfortunately I wasn't able to replicate it without the whole library. But I
tracked it down to a situation that with a meaningless if condition added it
breaks, without the condition it compiles. 

This is the code:
#include<Kokkos_Core.hpp>

template< class Space >
struct NestedView {

  Kokkos::View<int*,Space> member ;

public:

  KOKKOS_INLINE_FUNCTION
  NestedView() : member()
    {}

  KOKKOS_INLINE_FUNCTION
  ~NestedView()
  {
    #ifdef BUG
    if(member.dimension_0() != 0) {
    }
    #endif
  }
};

Kokkos::View<NestedView<Kokkos::Cuda>*,Kokkos::CudaUVMSpace> foo() {
  return Kokkos::View<NestedView<Kokkos::Cuda>*,Kokkos::CudaUVMSpace>("A",10);
}

I attach a tar file with it. To build you need to clone Kokkos
(github.com/kokkos/kokkos) and checkout the clang-cuda branch. In the little
build line KOKKOS_PATH refers to the root path of your Kokkos clone. 

This is btw, the last issue we got with our non-experimental code in Kokkos.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>