This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix spec-options.c test case
- From: Dominik Vogt <vogt at linux dot vnet dot ibm dot com>
- To: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Bernd Schmidt <bschmidt at redhat dot com>, Oleg Endo <oleg dot endo at t-online dot de>, Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- Date: Mon, 2 May 2016 09:30:47 +0100
- Subject: Re: [PATCH] Fix spec-options.c test case
- Authentication-results: sourceware.org; auth=none
- References: <AM4PR07MB1571BF44DAAEA78762C2F494E4780 at AM4PR07MB1571 dot eurprd07 dot prod dot outlook dot com>
- Reply-to: vogt at linux dot vnet dot ibm dot com
On Sun, May 01, 2016 at 07:52:40AM +0000, Bernd Edlinger wrote:
> I took a closer look at this test case, and I found, except that
> it triggers a dejagnu bug, it is also wrong. I have tested with
> a cross-compiler for target=sh-elf and found that the test case
> actually FAILs because the foo.specs uses "cppruntime" which
> is only referenced in gcc/config/sh/superh.h, but sh/superh.h
> is only included for target sh*-superh-elf, see gcc/config.gcc.
>
> This means that it can only pass for target=sh-superh-elf.
>
> The attached patch fixes the testcase and makes it run always,
> so that it does no longer triggers the dejagnu bug.
Looks like a viable solution. I'd add a comment about the bug
though.
> -/* { dg-do compile } */
> -/* { dg-do run { target sh*-*-* } } */
> +/* { dg-do run } */
> +/* { dg-shouldfail "" { ! sh*-superh-elf } } */
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt
IBM Germany