aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2008-01-26 09:31:30 +0000
committerDanny Smith <dannysmith@gcc.gnu.org>2008-01-26 09:31:30 +0000
commit763a27ee730f23883d6ab6feacb9b22992a8d16c (patch)
tree5756030d9aa7b91f6a9e3740f35f40f2ec92e01d /gcc
parent8fa07a56dfd1e9a357e5ee498d55097d76695628 (diff)
downloadgcc-763a27ee730f23883d6ab6feacb9b22992a8d16c.zip
gcc-763a27ee730f23883d6ab6feacb9b22992a8d16c.tar.gz
gcc-763a27ee730f23883d6ab6feacb9b22992a8d16c.tar.bz2
re PR target/34970 (name mangling broken for __attributte__((fastcall)))
PR target/34970 gcc * config/i386/cygming.h (ASM_OUTPUT_LABELREF): Define. testsuite * gcc.target/i386/fastcall-1.c: Scan for correct label. Use -std=gnu89 switch. From-SVN: r131859
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/i386/cygming.h13
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.target/i386/fastcall-1.c4
4 files changed, 27 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 32c53ea..d05641d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-26 Danny Smith <dannysmith@users.sourceforge.net>
+
+ PR target/34970
+ * config/i386/cygming.h (ASM_OUTPUT_LABELREF): Define.
+
2008-01-25 Joseph Myers <joseph@codesourcery.com>
PR other/31955
diff --git a/gcc/config/i386/cygming.h b/gcc/config/i386/cygming.h
index ee2631b..3b18af5 100644
--- a/gcc/config/i386/cygming.h
+++ b/gcc/config/i386/cygming.h
@@ -1,7 +1,7 @@
/* Operating system specific defines to be used when targeting GCC for
hosting on Windows32, using a Unix style C library and tools.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005, 2007
+ 2004, 2005, 2007, 2008
Free Software Foundation, Inc.
This file is part of GCC.
@@ -197,6 +197,17 @@ do { \
ASM_OUTPUT_LABEL ((STREAM), (NAME)); \
} while (0)
+/* Output a reference to a label. Fastcall function symbols
+ keep their '@' prefix, while other symbols are prefixed
+ with USER_LABEL_PREFIX. */
+#undef ASM_OUTPUT_LABELREF
+#define ASM_OUTPUT_LABELREF(STREAM, NAME) \
+do { \
+ if ((NAME)[0] != FASTCALL_PREFIX) \
+ fputs (USER_LABEL_PREFIX, (STREAM)); \
+ fputs ((NAME), (STREAM)); \
+} while (0)
+
/* Emit code to check the stack when allocating more than 4000
bytes in one go. */
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 4bb6a97..a09d877 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2008-01-26 Danny Smith <dannysmith@users.sourceforge.net>
+
+ PR target/34970
+ * gcc.target/i386/fastcall-1.c: Scan for correct label.
+ Use -std=gnu89 switch.
+
2008-01-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/34876
diff --git a/gcc/testsuite/gcc.target/i386/fastcall-1.c b/gcc/testsuite/gcc.target/i386/fastcall-1.c
index ba1d667..9d70123 100644
--- a/gcc/testsuite/gcc.target/i386/fastcall-1.c
+++ b/gcc/testsuite/gcc.target/i386/fastcall-1.c
@@ -1,4 +1,5 @@
/* { dg-do compile { target i?86-*-mingw32* i?86-*-cygwin* } } */
+/* { dg-options "-std=gnu89" } */
void
__attribute__ ((fastcall))
@@ -15,3 +16,6 @@ f3() { }
void
__attribute__ ((fastcall))
f4(int x, int y, int z) { }
+
+/* Scan for global label with correct prefix and suffix. */
+/* { dg-final { scan-assembler "\.globl\[ \t\]@f4@12" } } */