summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/ia64-visibility-2.c15
-rw-r--r--gcc/varasm.c3
4 files changed, 25 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 99e8404ce34..5993d719694 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2002-08-01 Jakub Jelinek <jakub@redhat.com>
+
+ * varasm.c (assemble_visibility): Strip name encoding.
+
2002-08-01 Ian Dall <ian@sibyl.beware.dropbear.id.au>
* config/ns32k/ns32k.h (TARGET_IEEE_COMPARE): Correct earlier patch.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 5c71ec58b0a..e886217df36 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2002-08-01 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/ia64-visibility-2.c: New test.
+
2002-08-01 Benjamin Kosnik <bkoz@redhat.com>
* g++.old-deja/g++.abi/ptrflags.C (expect): Change
diff --git a/gcc/testsuite/gcc.dg/ia64-visibility-2.c b/gcc/testsuite/gcc.dg/ia64-visibility-2.c
new file mode 100644
index 00000000000..895ef6d918b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ia64-visibility-2.c
@@ -0,0 +1,15 @@
+/* Test visibility attribute. */
+/* { dg-do link { target ia64*-*-linux* } } */
+/* { dg-options "-O2 -fpic" } */
+
+int foo (int x);
+int bar (int x) __asm__ ("foo") __attribute__ ((visibility ("hidden")));
+int bar (int x)
+{
+ return x;
+}
+
+int main ()
+{
+ return 0;
+}
diff --git a/gcc/varasm.c b/gcc/varasm.c
index ce6f7318320..d22cb112af3 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -4618,7 +4618,8 @@ assemble_visibility (decl, visibility_type)
{
const char *name;
- name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
+ name = (* targetm.strip_name_encoding)
+ (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)));
#ifdef HAVE_GAS_HIDDEN
fprintf (asm_out_file, "\t.%s\t%s\n", visibility_type, name);
OpenPOWER on IntegriCloud