public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix spec-options.c test case
@ 2016-05-01  7:53 Bernd Edlinger
  2016-05-02  8:31 ` Dominik Vogt
  2016-05-02 10:26 ` Bernd Schmidt
  0 siblings, 2 replies; 9+ messages in thread
From: Bernd Edlinger @ 2016-05-01  7:53 UTC (permalink / raw)
  To: gcc-patches; +Cc: Bernd Schmidt, Oleg Endo, Andreas Krebbel, Dominik Vogt

[-- Attachment #1: Type: text/plain, Size: 665 bytes --]

Hi,

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.


Boot-strapped and reg-tested on x86_64-linux-gnu,
OK for trunk?


Thanks
Bernd.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch-spec-options.diff --]
[-- Type: text/x-patch; name="patch-spec-options.diff", Size: 804 bytes --]

2016-05-01  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	* gcc.dg/spec-options.c: Run always and add dg-shouldfail if target
	is not sh*-superh-elf.

Index: gcc/testsuite/gcc.dg/spec-options.c
===================================================================
--- gcc/testsuite/gcc.dg/spec-options.c	(Revision 235675)
+++ gcc/testsuite/gcc.dg/spec-options.c	(Arbeitskopie)
@@ -1,8 +1,8 @@
 /* Check that -mfoo is accepted if defined in a user spec
    and that it is not passed on the command line.  */
 /* Must be processed in EXTRA_SPECS to run.  */
-/* { dg-do compile } */
-/* { dg-do run { target sh*-*-* } } */
+/* { dg-do run } */
+/* { dg-shouldfail "" { ! sh*-superh-elf } } */
 /* { dg-options "-B${srcdir}/gcc.dg --specs=foo.specs -tfoo" } */
 
 extern void abort(void);

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-05-03  1:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-01  7:53 [PATCH] Fix spec-options.c test case Bernd Edlinger
2016-05-02  8:31 ` Dominik Vogt
2016-05-02 10:26 ` Bernd Schmidt
2016-05-02 13:43   ` Bernd Edlinger
2016-05-02 14:13     ` Bernd Schmidt
2016-05-02 21:28       ` Oleg Endo
2016-05-03  0:05         ` Bernd Edlinger
2016-05-03  1:30           ` [gcc] " Kaz Kojima
2016-05-03  1:19         ` Kaz Kojima

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).