This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFA: Testsuite: Fixes for PR44197.c


Hi Jan, Hi Guys,

  The gcc test gcc.c-torture/compile/pr44197.c has a couple of problems:
  It uses the visibility attribute without checking to see if the target
  supports it, and it assumes that there is no prefix appended to user
  symbols.  The patch below takes care of both of these problems and
  allows the test to compile successfully on an x86 target (which does
  not use a prefix), an ARM target (which does use a prefix), and also
  to be treated as unsupported on a MN10300 target, which does not
  support the visibility attribute.

  OK to apply ?

Cheers
  Nick

gcc/testsuite/ChangeLog
2010-10-07  Nick Clifton  <nickc@redhat.com>

	* gcc.c-torture/compile/pr44197.c: Require visibility support.
        Allow for a user label prefix.

Index: gcc/testsuite/gcc.c-torture/compile/pr44197.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr44197.c	(revision 165080)
+++ gcc/testsuite/gcc.c-torture/compile/pr44197.c	(working copy)
@@ -1,4 +1,14 @@
 /* { dg-require-alias "" } */
+/* { dg-require-visibility "" } */
+
+#ifndef __USER_LABEL_PREFIX__
+#define __USER_LABEL_PREFIX__ ""
+#endif
+
+#define xstr(s) str(s)
+#define str(s) #s
+#define PREFIX xstr(__USER_LABEL_PREFIX__)
+
 typedef unsigned short int __uint16_t;
 enum
 {
@@ -12,7 +22,7 @@
 extern const __ctype_mask_t *__C_ctype_b;
 extern
 __typeof (__C_ctype_b)
-     __C_ctype_b __asm__ ("" "__GI___C_ctype_b")
+     __C_ctype_b __asm__ (PREFIX "__GI___C_ctype_b")
   __attribute__ ((visibility ("hidden")));
      static const __ctype_mask_t __C_ctype_b_data[] = {
      };
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]