Public bug reported:

I have a new laptop with Ubuntu 16.06 (xenial) installed onto a new
partition, plus nvidia-cuda-toolkit 7.5.18-0ubuntu1 from multiverse.

$ echo '#include <stdio.h>' > dummy.cpp
$ g++ -c -O2 dummy.cpp
$ cp dummy.cpp dummy.cu
$ nvcc -c -O2 dummy.cu
/usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, 
size_t)’:
/usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope
   return (char *) memcpy (__dest, __src, __n) + __n;
                                          ^

nvcc can compile it at -O0 and -O1, and it is a conforming translation
unit (modulo the addition of at least one definition after the #include
statement; including such a definition does not affect the error).

** Affects: nvidia-cuda-toolkit (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1589751

Title:
  Simple file fails to compile with -O2 or -O3

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nvidia-cuda-toolkit/+bug/1589751/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to