diff options
author | Alan Modra <amodra@gmail.com> | 2010-09-29 06:48:30 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2010-09-29 06:48:30 +0000 |
commit | 1e0f6894c8c433b30be3220ca476118fc2f34eff (patch) | |
tree | 54c08b62b5a0e7532b6356322190f96a3fdfc933 /gas/expr.c | |
parent | f794089cb82b66bf0c3a91fd00d36b608b0b36a1 (diff) | |
download | gdb-1e0f6894c8c433b30be3220ca476118fc2f34eff.zip gdb-1e0f6894c8c433b30be3220ca476118fc2f34eff.tar.gz gdb-1e0f6894c8c433b30be3220ca476118fc2f34eff.tar.bz2 |
* expr.c (expr): Correct returned segment value.
Diffstat (limited to 'gas/expr.c')
-rw-r--r-- | gas/expr.c | 27 |
1 files changed, 19 insertions, 8 deletions
@@ -1969,16 +1969,27 @@ expr (int rankarg, /* Larger # is higher rank. */ if (retval != rightseg) { - if (! SEG_NORMAL (retval)) - { - if (retval != undefined_section || SEG_NORMAL (rightseg)) - retval = rightseg; - } - else if (SEG_NORMAL (rightseg) + if (retval == undefined_section) + ; + else if (rightseg == undefined_section) + retval = rightseg; + else if (retval == expr_section) + ; + else if (rightseg == expr_section) + retval = rightseg; + else if (retval == reg_section) + ; + else if (rightseg == reg_section) + retval = rightseg; + else if (rightseg == absolute_section) + ; + else if (retval == absolute_section) + retval = rightseg; #ifdef DIFF_EXPR_OK - && op_left != O_subtract + else if (op_left == O_subtract) + ; #endif - ) + else as_bad (_("operation combines symbols in different segments")); } |