mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-04-06 14:21:43 +08:00
Silence asan warnings in resolve_symbol_value
The ".quad with division (fwdref)" gas test fails with asan warning negation of -9223372036854775808 cannot be represented in type 'long int' Fix this and another similar case. * symbols.c (resolve_symbol_value): Cast "left" to valueT before negating.
This commit is contained in:
parent
d7a3c9e650
commit
1897dad5d7
@ -1596,7 +1596,7 @@ resolve_symbol_value (symbolS *symp)
|
||||
final_seg = absolute_section;
|
||||
|
||||
if (op == O_uminus)
|
||||
left = -left;
|
||||
left = -(valueT) left;
|
||||
else if (op == O_logical_not)
|
||||
left = !left;
|
||||
else
|
||||
@ -1730,7 +1730,7 @@ resolve_symbol_value (symbolS *symp)
|
||||
break;
|
||||
if (right == -1)
|
||||
{
|
||||
left = -left;
|
||||
left = -(valueT) left;
|
||||
break;
|
||||
}
|
||||
left /= right;
|
||||
|
Loading…
x
Reference in New Issue
Block a user