[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/11845] New: MAX operator looks buggy, returning always the lhs v
From: |
pocmatos at gmail dot com |
Subject: |
[Bug ld/11845] New: MAX operator looks buggy, returning always the lhs value |
Date: |
27 Jul 2010 16:14:58 -0000 |
I have tried this in 2.18 but by looking at 2.20, it seems the problem is still
there. (the results are in a port of binutils, but where ld is actually
unchanged)
The code in ldexp.c is something like:
305 etree_value_type lhs = expld.result;
...
378 case MAX_K:
if (lhs.value > expld.result.value)
expld.result.value = lhs.value;
381 break;
Nothing between 305 and 378 actually seems to change lhs. Moreover, the
following two expressions evaluate differently and they shouldn't.
. += MAX(0x1000, ABSOLUTE(.)) - ABSOLUTE(.);
. += ABSOLUTE(.) > 0x1000 ? 0x0 : 0x1000 - ABSOLUTE(.);
Let me know if I can provide further information.
--
Summary: MAX operator looks buggy, returning always the lhs value
Product: binutils
Version: 2.18
Status: NEW
Severity: normal
Priority: P2
Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: pocmatos at gmail dot com
CC: bug-binutils at gnu dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=11845
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug ld/11845] New: MAX operator looks buggy, returning always the lhs value,
pocmatos at gmail dot com <=