https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114984
--- Comment #1 from Martin Storsjö <martin at martin dot st> --- The suggestion in https://sourceware.org/pipermail/cygwin/2007-February/154845.html was that for dllimported symbols, the string passed in asm("") should be entirely literal, i.e. no implicit "__imp_" prepended. While I can agree that this would be reasonable, it would differ even more from what Clang already does (which is self consistent). So I believe the most consistent and straightforward fix would be to make GCC prepend "__imp_" before the string from asm(""), for dllimport symbols, instead of "__imp__".