[llvm-bugs] [Bug 26389] [x86-64] clang generate wrong instruction for cygwin

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Feb 3 07:47:45 PST 2016


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

swigger <swigger at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #2 from swigger <swigger at gmail.com> ---
(In reply to comment #1)
> Windows doesn't support executables or DLLs larger than 2GB, so cout must be
> coming from another DLL.
> 
> In that case, data imported from another DLL must be annotated as dllimport.
> This is not required for functions as import libraries generally provide
> thunks to make sure things work out.

NO!

The source code shipped with cygwin does not write a dllimport with cout.

Proof:
$ cat a.cpp
#include <iostream>

$ gcc -E a.cpp | grep cout
  extern ostream cout;
  extern wostream wcout;

$ uname -a
CYGWIN_NT-6.1 home-PC 2.2.1(0.289/5/3) 2015-08-20 11:42 x86_64 Cygwin

Neither cygwin nor msys2 likes dllimport since this will cause many problems
for building gnu world sources. A more posix likes way would be the best, but 
needs help from the compiler.


I am talking the target x86_64-pc-cygwin not x64_64-pc-windows.
Assume extern data is in 2G range is not a bug on windows natively,
but it *IS* a *BUG* on cygwin/msys2.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160203/7b16b912/attachment-0001.html>


More information about the llvm-bugs mailing list