summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2002-08-01 21:59:36 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2002-08-01 21:59:36 +0000
commitcaf98cc4a04743825331d4e92d07be505d32c366 (patch)
treed9f8e42c6177dd9266ebae3c11145b4b1a5ccde7 /gcc
parentb2dd7dbf0fc517fe93c99335ea192dfe4386266c (diff)
downloadgcc-caf98cc4a04743825331d4e92d07be505d32c366.tar.gz
* varasm.c (assemble_visibility): Strip name encoding.
* gcc.dg/ia64-visibility-2.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55953 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-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);