On *-apple-darwin* the following tests introduced at revision 139100: Revision 139100 - (view) (download) - [select for diffs] Added Thu Aug 14 16:05:36 2008 UTC (7 days, 23 hours ago) by espindola File length: 239 byte(s) 2008-08-14 Rafael Avila de Espindola <espindola@google.com> * gcc.dg/visibility-14.c: New test. * gcc.dg/visibility-15.c: New test. * gcc.dg/visibility-16.c: New test. * gcc.dg/visibility-17.c: New test. * gcc.dg/visibility-18.c: New test. * gcc.dg/visibility-19.c: New test. fail since at least revision 139117 (see http://gcc.gnu.org/ml/gcc-testresults/2008-08/msg01430.html): FAIL: gcc.dg/visibility-14.c scan-hidden private_extern[ \\t_]*_?foo FAIL: gcc.dg/visibility-15.c scan-hidden private_extern[ \\t_]*_?foo FAIL: gcc.dg/visibility-16.c scan-hidden private_extern[ \\t_]*_?foo FAIL: gcc.dg/visibility-17.c scan-hidden private_extern[ \\t_]*_?foo FAIL: gcc.dg/visibility-18.c scan-hidden private_extern[ \\t_]*_?foo FAIL: gcc.dg/visibility-19.c scan-hidden private_extern[ \\t_]*_?foo
Subject: Re: New: FAIL: gcc.dg/visibility-1[4-9].c This is a duplicate of 37170 2008/8/22 dominiq at lps dot ens dot fr <gcc-bugzilla@gcc.gnu.org>: > On *-apple-darwin* the following tests introduced at revision 139100: > > Revision 139100 - (view) (download) - [select for diffs] > Added Thu Aug 14 16:05:36 2008 UTC (7 days, 23 hours ago) by espindola > File length: 239 byte(s) > 2008-08-14 Rafael Avila de Espindola <espindola@google.com> > > * gcc.dg/visibility-14.c: New test. > * gcc.dg/visibility-15.c: New test. > * gcc.dg/visibility-16.c: New test. > * gcc.dg/visibility-17.c: New test. > * gcc.dg/visibility-18.c: New test. > * gcc.dg/visibility-19.c: New test. > > fail since at least revision 139117 (see > http://gcc.gnu.org/ml/gcc-testresults/2008-08/msg01430.html): > > FAIL: gcc.dg/visibility-14.c scan-hidden private_extern[ \\t_]*_?foo > FAIL: gcc.dg/visibility-15.c scan-hidden private_extern[ \\t_]*_?foo > FAIL: gcc.dg/visibility-16.c scan-hidden private_extern[ \\t_]*_?foo > FAIL: gcc.dg/visibility-17.c scan-hidden private_extern[ \\t_]*_?foo > FAIL: gcc.dg/visibility-18.c scan-hidden private_extern[ \\t_]*_?foo > FAIL: gcc.dg/visibility-19.c scan-hidden private_extern[ \\t_]*_?foo > > > -- > Summary: FAIL: gcc.dg/visibility-1[4-9].c > Product: gcc > Version: 4.4.0 > Status: UNCONFIRMED > Severity: normal > Priority: P3 > Component: testsuite > AssignedTo: unassigned at gcc dot gnu dot org > ReportedBy: dominiq at lps dot ens dot fr > GCC build triplet: *-apple-darwin* > GCC host triplet: *-apple-darwin* > GCC target triplet: *-apple-darwin* > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37202 > > ------- You are receiving this mail because: ------- > You are on the CC list for the bug, or are watching someone who is. >
> This is a duplicate of 37170 I don't think so. Although I am bootstraping with the patch for 37170 and cannot conclude yet, my previous attempt fixed the weak tests, but not the visibility ones.
These tests have also failed on AVR recently. Known fail on revision 139139. And no, this is not a duplicate of 37170, as the patch for that bug fixes those test cases, but does not fix these.
For darwin, the testcase should not be run as darwin does not require private_extern for hidden extern functions. As for avr, the issue is most likely not using elfos.h or defining ASM_OUTPUT_EXTERNAL as default_elf_asm_output_external.
This is also failing on hppa-unknown-linux-gnu. It uses the define in elfos.h. assemble_external is not called. It looks like output_operand is wrong: output_operand (rtx x, int code ATTRIBUTE_UNUSED) { if (x && GET_CODE (x) == SUBREG) x = alter_subreg (&x); /* X must not be a pseudo reg. */ gcc_assert (!x || !REG_P (x) || REGNO (x) < FIRST_PSEUDO_REGISTER); PRINT_OPERAND (asm_out_file, x, code); if (x && MEM_P (x) && GET_CODE (XEXP (x, 0)) == SYMBOL_REF) { tree t; x = XEXP (x, 0); t = SYMBOL_REF_DECL (x); if (t) assemble_external (t); } } Breakpoint 4, output_operand (x=0x40146480, code=72) at ../../gcc/gcc/final.c:3365 3365 if (x && GET_CODE (x) == SUBREG) (gdb) p debug_rtx (x) (symbol_ref:SI ("foo") [flags 0x42] <var_decl 0x400e70b0 foo>)
> This is also failing on hppa-unknown-linux-gnu. It uses the define in > elfos.h. assemble_external is not called. It looks like output_operand > is wrong: That rings a bell. I believe H-P's proposed patch fixes this. See http://gcc.gnu.org/ml/gcc-patches/2008-09/msg00195.html
On Darwin the patch refered to in comment #6 fixes the weak issues but not the visibility failures.
Subject: Re: FAIL: gcc.dg/visibility-1[4-9].c Sent from my iPhone On Sep 21, 2008, at 12:11 PM, "dominiq at lps dot ens dot fr" <gcc-bugzilla@gcc.gnu.org > wrote: > > > ------- Comment #7 from dominiq at lps dot ens dot fr 2008-09-21 > 19:11 ------- > On Darwin the patch refered to in comment #6 fixes the weak issues > but not the > visibility failures. As mentioned so many times. These testcases should be disabled for Darwin. > > > > -- > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37202 > > ------- You are receiving this mail because: ------- > You are on the CC list for the bug, or are watching someone who is.
> As mentioned so many times. These testcases should be disabled for Darwin. Then who is supposed to do it?
Dominique, Just post a proposed patch to gcc-patches that disables these tests and cc the original author of the tests and one of the current Darwin maintainers such as Mike Stump.
Could somebody check if the following changes are OK? diff -u ../_gcc_clean/gcc/testsuite/gcc.dg/visibility-14.c gcc/testsuite/gcc.dg/visibility-14.c --- ../_gcc_clean/gcc/testsuite/gcc.dg/visibility-14.c 2008-08-19 18:11:26.000000000 +0200 +++ gcc/testsuite/gcc.dg/visibility-14.c 2008-11-05 14:17:04.000000000 +0100 @@ -1,7 +1,7 @@ /* Test that called external functions are marked. */ /* { dg-do compile } */ /* { dg-require-visibility "" } */ -/* { dg-final { scan-hidden "foo" } } */ +/* { dg-final { scan-hidden "foo" { target !*-apple-darwin* } } } */ extern void foo(void) __attribute__ ((visibility ("hidden"))); int f () { diff -u ../_gcc_clean/gcc/testsuite/gcc.dg/visibility-15.c gcc/testsuite/gcc.dg/visibility-15.c --- ../_gcc_clean/gcc/testsuite/gcc.dg/visibility-15.c 2008-08-19 18:11:25.000000000 +0200 +++ gcc/testsuite/gcc.dg/visibility-15.c 2008-11-05 14:20:25.000000000 +0100 @@ -1,7 +1,7 @@ /* Test that accessed external functions are marked. */ /* { dg-do compile } */ /* { dg-require-visibility "" } */ -/* { dg-final { scan-hidden "foo" } } */ +/* { dg-final { scan-hidden "foo" { target !*-apple-darwin* } } } */ extern void foo(void) __attribute__ ((visibility ("hidden"))); typedef void (*foo_t)(void); diff -u ../_gcc_clean/gcc/testsuite/gcc.dg/visibility-16.c gcc/testsuite/gcc.dg/visibility-16.c --- ../_gcc_clean/gcc/testsuite/gcc.dg/visibility-16.c 2008-08-19 18:11:26.000000000 +0200 +++ gcc/testsuite/gcc.dg/visibility-16.c 2008-11-05 14:20:42.000000000 +0100 @@ -1,7 +1,7 @@ /* Test that accessed external variables are marked. */ /* { dg-do compile } */ /* { dg-require-visibility "" } */ -/* { dg-final { scan-hidden "foo" } } */ +/* { dg-final { scan-hidden "foo" { target !*-apple-darwin* } } } */ extern int foo __attribute__ ((visibility ("hidden"))); int f () { diff -u ../_gcc_clean/gcc/testsuite/gcc.dg/visibility-17.c gcc/testsuite/gcc.dg/visibility-17.c --- ../_gcc_clean/gcc/testsuite/gcc.dg/visibility-17.c 2008-08-19 18:11:25.000000000 +0200 +++ gcc/testsuite/gcc.dg/visibility-17.c 2008-11-05 14:20:59.000000000 +0100 @@ -1,7 +1,7 @@ /* Test that external variable whose address is taken are marked. */ /* { dg-do compile } */ /* { dg-require-visibility "" } */ -/* { dg-final { scan-hidden "foo" } } */ +/* { dg-final { scan-hidden "foo" { target !*-apple-darwin* } } } */ extern int foo __attribute__ ((visibility ("hidden"))); int *f () { diff -u ../_gcc_clean/gcc/testsuite/gcc.dg/visibility-18.c gcc/testsuite/gcc.dg/visibility-18.c --- ../_gcc_clean/gcc/testsuite/gcc.dg/visibility-18.c 2008-08-19 18:11:27.000000000 +0200 +++ gcc/testsuite/gcc.dg/visibility-18.c 2008-11-05 14:21:11.000000000 +0100 @@ -1,7 +1,7 @@ /* Test that external variable whose address is taken are marked. */ /* { dg-do compile } */ /* { dg-require-visibility "" } */ -/* { dg-final { scan-hidden "foo" } } */ +/* { dg-final { scan-hidden "foo" { target !*-apple-darwin* } } } */ extern int foo __attribute__ ((visibility ("hidden"))); int *test = &foo; diff -u ../_gcc_clean/gcc/testsuite/gcc.dg/visibility-19.c gcc/testsuite/gcc.dg/visibility-19.c --- ../_gcc_clean/gcc/testsuite/gcc.dg/visibility-19.c 2008-08-19 18:11:25.000000000 +0200 +++ gcc/testsuite/gcc.dg/visibility-19.c 2008-11-05 14:21:27.000000000 +0100 @@ -1,7 +1,7 @@ /* Test that accessed external functions are marked. */ /* { dg-do compile } */ /* { dg-require-visibility "" } */ -/* { dg-final { scan-hidden "foo" } } */ +/* { dg-final { scan-hidden "foo" { target !*-apple-darwin* } } } */ extern void foo(void) __attribute__ ((visibility ("hidden"))); typedef void (*foo_t)(void);
Posted patch to gcc-patches mailing list... http://gcc.gnu.org/ml/gcc-patches/2008-11/msg00428.html
The darwin patch is fine.
Subject: Bug 37202 Author: janis Date: Wed Nov 12 17:47:13 2008 New Revision: 141794 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141794 Log: 2008-11-12 Jack Howarth <howarth@bromo.med.uc.edu> PR testsuite/37202 * gcc.dg/visibility-14.c: Skip on *-*-darwin*. * gcc.dg/visibility-15.c: Same. * gcc.dg/visibility-16.c: Same. * gcc.dg/visibility-17.c: Same. * gcc.dg/visibility-18.c: Same. * gcc.dg/visibility-19.c: Same. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/visibility-14.c trunk/gcc/testsuite/gcc.dg/visibility-15.c trunk/gcc/testsuite/gcc.dg/visibility-16.c trunk/gcc/testsuite/gcc.dg/visibility-17.c trunk/gcc/testsuite/gcc.dg/visibility-18.c trunk/gcc/testsuite/gcc.dg/visibility-19.c
Fixed.