PR24996, Gold fix for ternary operator within linker scripts
authorMiguel Saldivar <saldivarcher@gmail.com>
Sun, 10 Nov 2019 08:04:25 +0000 (00:04 -0800)
committerAlan Modra <amodra@gmail.com>
Mon, 11 Nov 2019 00:26:44 +0000 (10:56 +1030)
PR 24996
* expression.cc (Trinary_expression::arg2_value): Use correct integer
expression when calling "eval_maybe_dot" method.
(Trinary_expression::arg3_value): Likewise.

gold/ChangeLog
gold/expression.cc

index c2acb20a74dbb38734f765cc70cabe0fc4f2069e..cc5da7d9642bd782889ca3024c1961cb5d36a332 100644 (file)
@@ -1,3 +1,10 @@
+2019-11-11  Miguel Saldivar  <saldivarcher@gmail.com>
+
+       PR 24996
+       * expression.cc (Trinary_expression::arg2_value): Use correct integer
+       expression when calling "eval_maybe_dot" method.
+       (Trinary_expression::arg3_value): Likewise.
+
 2019-09-28  Alan Modra  <amodra@gmail.com>
 
        PR 16794
index 2471e25a2affa7bc904d6105ca78b859909079a8..f4bdf2a096ce9ae1f02108defe78896551eedc15 100644 (file)
@@ -596,7 +596,7 @@ class Trinary_expression : public Expression
             Output_section** section_pointer,
             uint64_t* alignment_pointer) const
   {
-    return this->arg1_->eval_maybe_dot(eei->symtab, eei->layout,
+    return this->arg2_->eval_maybe_dot(eei->symtab, eei->layout,
                                       eei->check_assertions,
                                       eei->is_dot_available,
                                       eei->dot_value,
@@ -615,7 +615,7 @@ class Trinary_expression : public Expression
             Output_section** section_pointer,
             uint64_t* alignment_pointer) const
   {
-    return this->arg1_->eval_maybe_dot(eei->symtab, eei->layout,
+    return this->arg3_->eval_maybe_dot(eei->symtab, eei->layout,
                                       eei->check_assertions,
                                       eei->is_dot_available,
                                       eei->dot_value,