summaryrefslogtreecommitdiff
path: root/gcc/config/darwin.c
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-29 00:47:28 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-29 00:47:28 +0000
commitb359164b3dd56462a568fbad6d72e0e99d7a5f6d (patch)
tree3a3f6245a7abb1c5fdf4196fd76d75067eaa9e74 /gcc/config/darwin.c
parentdb668175017394910e7c221482f9272e4cbc0d63 (diff)
downloadgcc-b359164b3dd56462a568fbad6d72e0e99d7a5f6d.tar.gz
PR libfortran/24991
* config/darwin.c (machopic_indirection_name, machopic_output_indirection): Follow transparent alias chain. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107639 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/darwin.c')
-rw-r--r--gcc/config/darwin.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index bd5d5a8c75b..98c7d30cd72 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -316,6 +316,21 @@ machopic_indirection_name (rtx sym_ref, bool stub_p)
const char *suffix;
const char *prefix = user_label_prefix;
const char *quote = "";
+ tree id;
+
+ id = maybe_get_identifier (name);
+ if (id)
+ {
+ tree id_orig = id;
+
+ while (IDENTIFIER_TRANSPARENT_ALIAS (id))
+ id = TREE_CHAIN (id);
+ if (id != id_orig)
+ {
+ name = IDENTIFIER_POINTER (id);
+ namelen = strlen (name);
+ }
+ }
if (name[0] == '*')
{
@@ -861,6 +876,18 @@ machopic_output_indirection (void **slot, void *data)
{
char *sym;
char *stub;
+ tree id;
+
+ id = maybe_get_identifier (sym_name);
+ if (id)
+ {
+ tree id_orig = id;
+
+ while (IDENTIFIER_TRANSPARENT_ALIAS (id))
+ id = TREE_CHAIN (id);
+ if (id != id_orig)
+ sym_name = IDENTIFIER_POINTER (id);
+ }
sym = alloca (strlen (sym_name) + 2);
if (sym_name[0] == '*' || sym_name[0] == '&')