[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/24996] New: Ternary if operator evaluated incorrectly
From: |
andrey.vihrov at gmail dot com |
Subject: |
[Bug gold/24996] New: Ternary if operator evaluated incorrectly |
Date: |
Thu, 12 Sep 2019 19:32:50 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=24996
Bug ID: 24996
Summary: Ternary if operator evaluated incorrectly
Product: binutils
Version: 2.32
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gold
Assignee: ccoutant at gmail dot com
Reporter: andrey.vihrov at gmail dot com
CC: ian at airs dot com
Target Milestone: ---
Consider the following linker script:
ASSERT(2 == (3 ? 2 : 1), "Should return 2")
ASSERT(1 == (0 ? 2 : 1), "Should return 1")
ASSERT(3 != (3 ? 2 : 1), "Should not return 3")
When passed to ld.gold, all three assertions fail. ld.bfd is fine.
It appears that in gold the ternary if operator always returns the first
operand.
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug gold/24996] New: Ternary if operator evaluated incorrectly,
andrey.vihrov at gmail dot com <=