diff options
author | Alan Modra <amodra@bigpond.net.au> | 2012-12-17 00:16:47 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2012-12-17 00:16:47 +0000 |
commit | f32ceb79186bcdce4ebec1d23f93a07a4aab6757 (patch) | |
tree | a31da0f0dda6e571ed226d607bc988a8c23bb700 /ld/ldexp.h | |
parent | 096928d1633f9604751d0b6ae0cfc9d3474cbe41 (diff) | |
download | binutils-redhat-f32ceb79186bcdce4ebec1d23f93a07a4aab6757.tar.gz |
PR ld/14962
* ldexp.h (struct ldexp_control): Add "assign_name".
* ldexp.c (fold_name <NAME>): Compare and clear assign_name on match.
(exp_fold_tree_1): Remove existing code testing for self assignment.
Instead set and test expld.assign_name.
* ldlang.c (scan_for_self_assignment): Delete.
(print_assignment): Instead set and test expld.assign_name.
Diffstat (limited to 'ld/ldexp.h')
-rw-r--r-- | ld/ldexp.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ld/ldexp.h b/ld/ldexp.h index 187016c4f8..2c726e72de 100644 --- a/ld/ldexp.h +++ b/ld/ldexp.h @@ -139,6 +139,11 @@ struct ldexp_control { /* Principally used for diagnostics. */ bfd_boolean assigning_to_dot; + /* If evaluating an assignment, the destination. Cleared if an + etree_name NAME matches this, to signal a self-assignment. + Note that an etree_name DEFINED does not clear this field, nor + does the false branch of a trinary expression. */ + const char *assign_name; /* Working results. */ etree_value_type result; |