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.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to