* [PATCH] Fix gcc.dg/visibility-1{4,6}.c failures on s390-linux
@ 2008-10-30 12:54 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2008-10-30 12:54 UTC (permalink / raw)
To: Andreas.Krebbel; +Cc: gcc-patches
Hi!
These fail because foo is output through s390_output_pool_entry, not
using expand_expr* nor output_operand, and so assemble_external isn't
called on the referenced symbols, which means .hidden foo isn't emitted,
eventhough the hidden symbol is referenced.
Ok for trunk if it passes bootstrap/regtest?
2008-10-30 Jakub Jelinek <jakub@redhat.com>
* config/s390/s390.c (s390_mark_symbol_ref_as_used): New function.
(s390_output_pool_entry): Call it through for_each_rtx.
--- gcc/config/s390/s390.c.jj 2008-10-14 12:49:25.000000000 +0200
+++ gcc/config/s390/s390.c 2008-10-30 11:50:59.000000000 +0100
@@ -6664,6 +6664,24 @@ s390_chunkify_cancel (struct constant_po
}
}
+/* Helper rtx-iteration-function for s390_output_pool_entry. Marks
+ SYMBOL_REFs as referenced through use of assemble_external. */
+
+static int
+s390_mark_symbol_ref_as_used (rtx *x, void *dummy ATTRIBUTE_UNUSED)
+{
+ /* If we have a used symbol, we may have to emit assembly
+ annotations corresponding to whether the symbol is external, weak
+ or has non-default visibility. */
+ if (GET_CODE (*x) == SYMBOL_REF)
+ {
+ tree t = SYMBOL_REF_DECL (*x);
+ if (t)
+ assemble_external (t);
+ return -1;
+ }
+ return 0;
+}
/* Output the constant pool entry EXP in mode MODE with alignment ALIGN. */
@@ -6684,6 +6702,7 @@ s390_output_pool_entry (rtx exp, enum ma
case MODE_INT:
assemble_integer (exp, GET_MODE_SIZE (mode), align, 1);
+ for_each_rtx (&exp, s390_mark_symbol_ref_as_used, NULL);
break;
default:
Jakub
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-10-30 11:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-30 12:54 [PATCH] Fix gcc.dg/visibility-1{4,6}.c failures on s390-linux Jakub Jelinek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).