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]

XFAIL weak symbol tests on Darwin


Although Darwin will probably get weak symbols at some point, for now
the testsuite should just shut up about it. Committed to the trunk.

(I note that other platforms, like AIX, also moan about weak symbols not
working - perhaps a more generic test is in order instead of hacking the
nine files every time? There is a proc check_weak_available in
target-supports.exp, although only ecos tests seem to use.)

Stan

2002-09-05 Stan Shebs <shebs@apple.com>

* gcc.dg/weak-1.c: xfail on Darwin.
* gcc.dg/weak-2.c: Ditto.
* gcc.dg/weak-3.c: Ditto.
* gcc.dg/weak-4.c: Ditto.
* gcc.dg/weak-5.c: Ditto.
* gcc.dg/weak-6.c: Ditto.
* gcc.dg/weak-7.c: Ditto.
* gcc.dg/weak-8.c: Ditto.
* gcc.dg/weak-9.c: Ditto.

Index: weak-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/weak-1.c,v
retrieving revision 1.6
diff -p -r1.6 weak-1.c
*** weak-1.c 31 Mar 2002 06:45:26 -0000 1.6
--- weak-1.c 5 Sep 2002 16:36:11 -0000
***************
*** 2,10 ****
/* { dg-options "-fno-common" } */

/* COFF does not support weak, and dg doesn't support UNSUPPORTED. */
! /* { dg-do compile { xfail *-*-coff i?86-pc-cygwin h8300-*-hms } } */

/* { dg-final { global target_triplet } } */
/* { dg-final { if [string match h8300-*-hms $target_triplet ] {return} } } */
/* { dg-final { if [string match i?86-pc-cygwin $target_triplet ] {return} } } */
/* { dg-final { if [string match *-*-coff $target_triplet ] {return} } } */
--- 2,11 ----
/* { dg-options "-fno-common" } */

/* COFF does not support weak, and dg doesn't support UNSUPPORTED. */
! /* { dg-do compile { xfail *-*-coff i?86-pc-cygwin h8300-*-hms *-*-darwin* } } */

/* { dg-final { global target_triplet } } */
+ /* { dg-final { if [string match *-*-darwin* $target_triplet ] {return} } } */
/* { dg-final { if [string match h8300-*-hms $target_triplet ] {return} } } */
/* { dg-final { if [string match i?86-pc-cygwin $target_triplet ] {return} } } */
/* { dg-final { if [string match *-*-coff $target_triplet ] {return} } } */
Index: weak-2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/weak-2.c,v
retrieving revision 1.3
diff -p -r1.3 weak-2.c
*** weak-2.c 23 May 2002 10:19:33 -0000 1.3
--- weak-2.c 5 Sep 2002 16:36:11 -0000
***************
*** 2,10 ****
/* { dg-options "-fno-common" } */

/* COFF does not support weak, and dg doesn't support UNSUPPORTED. */
! /* { dg-do compile { xfail *-*-coff i?86-pc-cygwin h8300-*-hms } } */

/* { dg-final { global target_triplet } } */
/* { dg-final { if [string match h8300-*-hms $target_triplet ] {return} } } */
/* { dg-final { if [string match i?86-pc-cygwin $target_triplet ] {return} } } */
/* { dg-final { if [string match *-*-coff $target_triplet ] {return} } } */
--- 2,11 ----
/* { dg-options "-fno-common" } */

/* COFF does not support weak, and dg doesn't support UNSUPPORTED. */
! /* { dg-do compile { xfail *-*-coff i?86-pc-cygwin h8300-*-hms *-*-darwin* } } */

/* { dg-final { global target_triplet } } */
+ /* { dg-final { if [string match *-*-darwin* $target_triplet ] {return} } } */
/* { dg-final { if [string match h8300-*-hms $target_triplet ] {return} } } */
/* { dg-final { if [string match i?86-pc-cygwin $target_triplet ] {return} } } */
/* { dg-final { if [string match *-*-coff $target_triplet ] {return} } } */
*************** void * foo1b (void)
*** 30,36 ****
return (void *)ffoo1b;
}

! extern void * ffoo1c (void); /* { dg-warning "applying #pragma weak" "applying #pragma weak" { xfail *-*-coff i?86-pc-cygwin h8300-*-hms } } */
void * foo1c (void)
{
return (void *)ffoo1c;
--- 31,37 ----
return (void *)ffoo1b;
}

! extern void * ffoo1c (void); /* { dg-warning "applying #pragma weak" "applying #pragma weak" { xfail *-*-coff i?86-pc-cygwin h8300-*-hms *-*-darwin* } } */
void * foo1c (void)
{
return (void *)ffoo1c;
Index: weak-3.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/weak-3.c,v
retrieving revision 1.4
diff -p -r1.4 weak-3.c
*** weak-3.c 23 May 2002 10:19:33 -0000 1.4
--- weak-3.c 5 Sep 2002 16:36:11 -0000
***************
*** 2,11 ****
/* { dg-options "-fno-common" } */

/* COFF does not support weak, and dg doesn't support UNSUPPORTED. */
! /* { dg-do compile { xfail *-*-coff i?86-pc-cygwin h8300-*-hms } } */
/* { dg-excess-errors "COFF does not support weak symbols" { target *-*-coff i?86-pc-cygwin h8300-*-hms } } */

/* { dg-final { global target_triplet } } */
/* { dg-final { if [string match h8300-*-hms $target_triplet ] {return} } } */
/* { dg-final { if [string match i?86-pc-cygwin $target_triplet ] {return} } } */
/* { dg-final { if [string match *-*-coff $target_triplet ] {return} } } */
--- 2,13 ----
/* { dg-options "-fno-common" } */

/* COFF does not support weak, and dg doesn't support UNSUPPORTED. */
! /* { dg-do compile { xfail *-*-coff i?86-pc-cygwin h8300-*-hms *-*-darwin* } } */
/* { dg-excess-errors "COFF does not support weak symbols" { target *-*-coff i?86-pc-cygwin h8300-*-hms } } */
+ /* { dg-excess-errors "Darwin does not support weak symbols" { target *-*-darwin* } } */

/* { dg-final { global target_triplet } } */
+ /* { dg-final { if [string match *-*-darwin* $target_triplet ] {return} } } */
/* { dg-final { if [string match h8300-*-hms $target_triplet ] {return} } } */
/* { dg-final { if [string match i?86-pc-cygwin $target_triplet ] {return} } } */
/* { dg-final { if [string match *-*-coff $target_triplet ] {return} } } */
Index: weak-4.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/weak-4.c,v
retrieving revision 1.3
diff -p -r1.3 weak-4.c
*** weak-4.c 23 May 2002 10:19:34 -0000 1.3
--- weak-4.c 5 Sep 2002 16:36:11 -0000
***************
*** 2,10 ****
/* { dg-options "-fno-common" } */

/* COFF does not support weak, and dg doesn't support UNSUPPORTED. */
! /* { dg-do compile { xfail *-*-coff i?86-pc-cygwin h8300-*-hms } } */

/* { dg-final { global target_triplet } } */
/* { dg-final { if [string match h8300-*-hms $target_triplet ] {return} } } */
/* { dg-final { if [string match i?86-pc-cygwin $target_triplet ] {return} } } */
/* { dg-final { if [string match *-*-coff $target_triplet ] {return} } } */
--- 2,11 ----
/* { dg-options "-fno-common" } */

/* COFF does not support weak, and dg doesn't support UNSUPPORTED. */
! /* { dg-do compile { xfail *-*-coff i?86-pc-cygwin h8300-*-hms *-*-darwin* } } */

/* { dg-final { global target_triplet } } */
+ /* { dg-final { if [string match *-*-darwin* $target_triplet ] {return} } } */
/* { dg-final { if [string match h8300-*-hms $target_triplet ] {return} } } */
/* { dg-final { if [string match i?86-pc-cygwin $target_triplet ] {return} } } */
/* { dg-final { if [string match *-*-coff $target_triplet ] {return} } } */
*************** void * foo1b (void)
*** 38,44 ****
}


! extern int vfoo1c; /* { dg-warning "applying #pragma weak" "applying #pragma weak" { xfail *-*-coff i?86-pc-cygwin h8300-*-hms } } */
void * foo1c (void)
{
return (void *)&vfoo1c;
--- 39,45 ----
}


! extern int vfoo1c; /* { dg-warning "applying #pragma weak" "applying #pragma weak" { xfail *-*-coff i?86-pc-cygwin h8300-*-hms *-*-darwin* } } */
void * foo1c (void)
{
return (void *)&vfoo1c;
*************** void * foo1f (void)
*** 70,76 ****
#pragma weak vfoo1f


! extern int vfoo1g; /* { dg-warning "applying #pragma weak" "applying #pragma weak" { xfail *-*-coff i?86-pc-cygwin h8300-*-hms } } */
void * foo1g (void)
{
return (void *)&vfoo1g;
--- 71,77 ----
#pragma weak vfoo1f


! extern int vfoo1g; /* { dg-warning "applying #pragma weak" "applying #pragma weak" { xfail *-*-coff i?86-pc-cygwin h8300-*-hms *-*-darwin* } } */
void * foo1g (void)
{
return (void *)&vfoo1g;
Index: weak-5.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/weak-5.c,v
retrieving revision 1.6
diff -p -r1.6 weak-5.c
*** weak-5.c 23 May 2002 10:19:34 -0000 1.6
--- weak-5.c 5 Sep 2002 16:36:11 -0000
***************
*** 2,11 ****
/* { dg-options "-fno-common" } */

/* COFF does not support weak, and dg doesn't support UNSUPPORTED. */
! /* { dg-do compile { xfail *-*-coff i?86-pc-cygwin h8300-*-hms } } */
/* { dg-excess-errors "COFF does not support weak symbols" { target *-*-coff i?86-pc-cygwin h8300-*-hms } } */

/* { dg-final { global target_triplet } } */
/* { dg-final { if [string match h8300-*-hms $target_triplet ] {return} } } */
/* { dg-final { if [string match i?86-pc-cygwin $target_triplet ] {return} } } */
/* { dg-final { if [string match *-*-coff $target_triplet ] {return} } } */
--- 2,13 ----
/* { dg-options "-fno-common" } */

/* COFF does not support weak, and dg doesn't support UNSUPPORTED. */
! /* { dg-do compile { xfail *-*-coff i?86-pc-cygwin h8300-*-hms *-*-darwin* } } */
/* { dg-excess-errors "COFF does not support weak symbols" { target *-*-coff i?86-pc-cygwin h8300-*-hms } } */
+ /* { dg-excess-errors "Darwin does not support weak symbols" { target *-*-darwin* } } */

/* { dg-final { global target_triplet } } */
+ /* { dg-final { if [string match *-*-darwin* $target_triplet ] {return} } } */
/* { dg-final { if [string match h8300-*-hms $target_triplet ] {return} } } */
/* { dg-final { if [string match i?86-pc-cygwin $target_triplet ] {return} } } */
/* { dg-final { if [string match *-*-coff $target_triplet ] {return} } } */
Index: weak-6.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/weak-6.c,v
retrieving revision 1.2
diff -p -r1.2 weak-6.c
*** weak-6.c 19 May 2002 01:20:53 -0000 1.2
--- weak-6.c 5 Sep 2002 16:36:11 -0000
***************
*** 1,6 ****
/* { dg-do compile } */

extern void * foo (void);
! void * foo (void) { return (void *)foo; } /* { dg-error "precede" "" { xfail *-*-coff i?86-pc-cygwin h8300-*-hms } } */

#pragma weak foo
--- 1,6 ----
/* { dg-do compile } */

extern void * foo (void);
! void * foo (void) { return (void *)foo; } /* { dg-error "precede" "" { xfail *-*-coff i?86-pc-cygwin h8300-*-hms *-*-darwin* } } */

#pragma weak foo
Index: weak-7.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/weak-7.c,v
retrieving revision 1.2
diff -p -r1.2 weak-7.c
*** weak-7.c 17 May 2002 03:54:11 -0000 1.2
--- weak-7.c 5 Sep 2002 16:36:11 -0000
***************
*** 1,5 ****
--- 1,6 ----
/* { dg-do compile } */
/* { dg-excess-errors "COFF does not support weak symbols" { target *-*-coff i?86-pc-cygwin h8300-*-hms } } */
+ /* { dg-excess-errors "Darwin does not support weak symbols" { target *-*-darwin* } } */

extern void * foo (void);
void * foo (void) { return (void *)foo; } /* { dg-error "precede" } */
Index: weak-8.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/weak-8.c,v
retrieving revision 1.1
diff -p -r1.1 weak-8.c
*** weak-8.c 23 May 2002 18:11:04 -0000 1.1
--- weak-8.c 5 Sep 2002 16:36:11 -0000
***************
*** 1,7 ****
/* { dg-do assemble } */

/* COFF does not support weak, and dg doesn't support UNSUPPORTED. */
! /* { dg-do assemble { xfail *-*-coff i?86-pc-cygwin h8300-*-hms } } */

__attribute__ ((weak)) int i;

--- 1,7 ----
/* { dg-do assemble } */

/* COFF does not support weak, and dg doesn't support UNSUPPORTED. */
! /* { dg-do assemble { xfail *-*-coff i?86-pc-cygwin h8300-*-hms *-*-darwin* } } */

__attribute__ ((weak)) int i;

Index: weak-9.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/weak-9.c,v
retrieving revision 1.1
diff -p -r1.1 weak-9.c
*** weak-9.c 26 May 2002 03:38:37 -0000 1.1
--- weak-9.c 5 Sep 2002 16:36:11 -0000
***************
*** 2,13 ****
/* { dg-options "-fno-common" } */

/* COFF does not support weak, and dg doesn't support UNSUPPORTED. */
! /* { dg-do compile { xfail *-*-coff i?86-pc-cygwin h8300-*-hms } } */

/* { dg-final { global target_triplet } } */
/* { dg-final { if [string match h8300-*-hms $target_triplet ] {return} } } */
! /* { dg-final { if [string match i?86-pc-cygwin $target_triplet ] {return} } } *
! /
/* { dg-final { if [string match *-*-coff $target_triplet ] {return} } } */
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?f1" } } */
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?f2" } } */
--- 2,13 ----
/* { dg-options "-fno-common" } */

/* COFF does not support weak, and dg doesn't support UNSUPPORTED. */
! /* { dg-do compile { xfail *-*-coff i?86-pc-cygwin h8300-*-hms *-*-darwin* } } */

/* { dg-final { global target_triplet } } */
+ /* { dg-final { if [string match *-*-darwin* $target_triplet ] {return} } } */
/* { dg-final { if [string match h8300-*-hms $target_triplet ] {return} } } */
! /* { dg-final { if [string match i?86-pc-cygwin $target_triplet ] {return} } } */
/* { dg-final { if [string match *-*-coff $target_triplet ] {return} } } */
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?f1" } } */
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?f2" } } */



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