From f32ceb79186bcdce4ebec1d23f93a07a4aab6757 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 17 Dec 2012 00:16:47 +0000 Subject: PR ld/14962 * ldexp.h (struct ldexp_control): Add "assign_name". * ldexp.c (fold_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. --- ld/ldexp.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ld/ldexp.h') 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; -- cgit v1.2.1