This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
LTO Error: operand type mismatch for `div'
- From: Hannes Domani <ssbssa at yahoo dot de>
- To: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Sat, 19 Mar 2016 00:10:38 +0000 (UTC)
- Subject: LTO Error: operand type mismatch for `div'
- Authentication-results: sourceware.org; auth=none
- References: <2092106639 dot 1990620 dot 1458346238035 dot JavaMail dot yahoo dot ref at mail dot yahoo dot com>
- Reply-to: Hannes Domani <ssbssa at yahoo dot de>
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