Marek Polacek <pola...@redhat.com> writes:

>> The errors are
>> 
>> /opt/gcc/work/gcc/testsuite/c-c++-common/pr50459.c:8:1: error: constructor 
>> priorities are not supported
>> /opt/gcc/work/gcc/testsuite/c-c++-common/pr50459.c:9:1: error: destructor 
>> priorities are not supported
>
> Ah.  The following untested patch should skip that test on Darwin.
>
> Ok?
>
> 2014-05-11  Marek Polacek  <pola...@redhat.com>
>
>       * c-c++-common/pr50459.c: Skip test on Darwin.
>
> diff --git gcc/testsuite/c-c++-common/pr50459.c 
> gcc/testsuite/c-c++-common/pr50459.c
> index f837b63..1216fd6 100644
> --- gcc/testsuite/c-c++-common/pr50459.c
> +++ gcc/testsuite/c-c++-common/pr50459.c
> @@ -1,6 +1,7 @@
>  /* PR c/50459 */
>  /* { dg-do compile } */
>  /* { dg-options "-Wall -Wextra" } */
> +/* { dg-skip-if "Darwin does not support cdtor priorities" { *-*-darwin* } } 
> */

No, that's wrong: avoid hardcoding target lists if at all possible.
Besides, it's wrong since it doesn't cover the Solaris (and other
non-gld linker) case.  Use the init_priority effective-target keyword
instead.  Also, please check if you can use dg-xfail-if instead: if
anything changes, the test turns into an XPASS instead of the change
going unnoticed with dg-skip-if.

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to