This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

LTO Error: operand type mismatch for `div'


I was trying to build my program with LTO, and got this error (which I don't get without LTO):

{standard input}: Assembler messages:
{standard input}:4742: Error: operand type mismatch for `div'
lto-wrapper.exe: fatal error: C:\msys64\mingw64\bin\g++.exe returned 1 exit status


The error corresponds to this:

/APP
 # 196 "asm/x86_64-gcc.c" 1
        divq      $-8446744073709551616
 # 0 "" 2
/NO_APP


Which is part of openssl, and compiled from this function:


BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d)
{
    BN_ULONG ret, waste;

 asm("divq      %4":"=a"(ret), "=d"(waste)
 :     "a"(l), "d"(h), "g"(d)
 :     "cc");

    return ret;
}


So how did the number $-8446744073709551616 get there?
What can I do to find the problem?

The compiler used is gcc 5.3.0 (x86_64-w64-mingw32), binutils 2.26.20160125.


Regards
Domani Hannes


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]