https://bugs.llvm.org/show_bug.cgi?id=37013

            Bug ID: 37013
           Summary: clang -x cuda fails in some templates on >>>
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: CUDA
          Assignee: unassignedclangb...@nondot.org
          Reporter: a.hu...@hzdr.de
                CC: llvm-bugs@lists.llvm.org

Compiling C++11 template code with `>>>` fails in some cases as soon as `-x
cuda` is used.

Although `>>>` should be valid in C++11, they might be mismatched here with
CUDA kernel arguments.

Environment:
  clang version 7.0.0 (https://git.llvm.org/git/clang.git/
780143bbd516aa39d754e5cab50955321b71fba0) (https://git.llvm.org/git/llvm.git/
bef5f248b85fb47702bd94a11276728a4cb4689f)
  nvcc 8.0.44

It would be great if closing multiple nested template arguments in such manner
works with the CUDA frontend as well.

Reproducer: Issue first seen with Boost.mp11 (1.66.0) with minimal example:

  #include <boost/mp11.hpp>
  int main() {}

Compiled with

  clang++ -std=c++11 -x cuda main.cpp  --cuda-path=$CUDA_ROOT
-I$BOOST_ROOT/include

https://github.com/ComputationalRadiationPhysics/alpaka/issues/459

We could not boil it down to a non-mp11 code snippet yet, maybe it's related to
the heavy use of variadic template arguments in combination with `>>>` ?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to