public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch testsuite committed] Skip gcc.dg/torture/pr37868.c on sh
@ 2011-04-19 22:31 Kaz Kojima
  2011-04-20  8:55 ` Mike Stump
  0 siblings, 1 reply; 4+ messages in thread
From: Kaz Kojima @ 2011-04-19 22:31 UTC (permalink / raw)
  To: gcc-patches

Hi,

gcc.dg/torture/pr37868.c fails on SH because of unaligned accesses.
The patch below skips the test as is done for sparc targets.
It's tested with bootstrap and regtest on i686-pc-linux-gnu.
Applied on trunk.

Regards,
	kaz
--
2011-04-19  Kaz Kojima  <kkojima@gcc.gnu.org>

	PR testsuite/48676
	* gcc.dg/torture/pr37868.c: Skip on sh*-*-*.

diff -up ORIG/trunk/gcc/testsuite/gcc.dg/torture/pr37868.c trunk/gcc/testsuite/gcc.dg/torture/pr37868.c
--- ORIG/trunk/gcc/testsuite/gcc.dg/torture/pr37868.c	2009-11-25 09:25:00.000000000 +0900
+++ trunk/gcc/testsuite/gcc.dg/torture/pr37868.c	2011-04-19 14:02:12.000000000 +0900
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-fno-strict-aliasing" } */
-/* { dg-skip-if "unaligned access" { sparc*-*-* } "*" "" } */
+/* { dg-skip-if "unaligned access" { sparc*-*-* sh*-*-* } "*" "" } */
 
 extern void abort (void);
 #if (__SIZEOF_INT__ <= 2)

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

* Re: [patch testsuite committed] Skip gcc.dg/torture/pr37868.c on sh
  2011-04-19 22:31 [patch testsuite committed] Skip gcc.dg/torture/pr37868.c on sh Kaz Kojima
@ 2011-04-20  8:55 ` Mike Stump
  2011-04-20 13:24   ` Kaz Kojima
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Stump @ 2011-04-20  8:55 UTC (permalink / raw)
  To: Kaz Kojima; +Cc: gcc-patches

On Apr 19, 2011, at 2:59 PM, Kaz Kojima wrote:
> gcc.dg/torture/pr37868.c fails on SH because of unaligned accesses.
> The patch below skips the test as is done for sparc targets.

I'd pre-approve hoisting these up into the lib/.exp files and checking a generic target requirement...  :-)

> -/* { dg-skip-if "unaligned access" { sparc*-*-* } "*" "" } */
> +/* { dg-skip-if "unaligned access" { sparc*-*-* sh*-*-* } "*" "" } */

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

* Re: [patch testsuite committed] Skip gcc.dg/torture/pr37868.c on sh
  2011-04-20  8:55 ` Mike Stump
@ 2011-04-20 13:24   ` Kaz Kojima
  2011-04-21  0:51     ` Mike Stump
  0 siblings, 1 reply; 4+ messages in thread
From: Kaz Kojima @ 2011-04-20 13:24 UTC (permalink / raw)
  To: mikestump; +Cc: gcc-patches

Mike Stump <mikestump@comcast.net> wrote:
> I'd pre-approve hoisting these up into the lib/.exp files and checking a generic target requirement...  :-)
> 
>> -/* { dg-skip-if "unaligned access" { sparc*-*-* } "*" "" } */
>> +/* { dg-skip-if "unaligned access" { sparc*-*-* sh*-*-* } "*" "" } */

I've thought the same thing when reading the recent HP's comment
about changes of testcases for avr, but gave up after grepping
STRICT_ALIGNMENT in gcc/config/*/*.h.  It seems that it isn't that
easy to write something like check_effective_target_unaligned_access
for lib/target-supports.exp with my poor knowledge for the various
targets.

Regards,
	kaz

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

* Re: [patch testsuite committed] Skip gcc.dg/torture/pr37868.c on sh
  2011-04-20 13:24   ` Kaz Kojima
@ 2011-04-21  0:51     ` Mike Stump
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Stump @ 2011-04-21  0:51 UTC (permalink / raw)
  To: Kaz Kojima; +Cc: gcc-patches

On Apr 20, 2011, at 5:22 AM, Kaz Kojima wrote:
> Mike Stump <mikestump@comcast.net> wrote:
>> I'd pre-approve hoisting these up into the lib/.exp files and checking a generic target requirement...  :-)
>> 
>>> -/* { dg-skip-if "unaligned access" { sparc*-*-* } "*" "" } */
>>> +/* { dg-skip-if "unaligned access" { sparc*-*-* sh*-*-* } "*" "" } */
> 
> I've thought the same thing when reading the recent HP's comment
> about changes of testcases for avr, but gave up after grepping
> STRICT_ALIGNMENT in gcc/config/*/*.h.

Oh, I had even less work in mind.  If the test makes non-portable assumptions about alignment, just tag it as unportable due to alignment, and then for sparc and sh, just set that flag.  As others find other testcases for other machines that suffer the same general problem, they eventually would find and switch to the more maintainable form.  As someone did a new port, and saw the testcase fail, they would glance at it, see the non-portable due to alignment, say, yeah, that applies to me a well, and then just add their port to the list.  Once they did this, then presto, all the testcases would suddenly turn off, which is what they want to happen.

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

end of thread, other threads:[~2011-04-20 23:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-19 22:31 [patch testsuite committed] Skip gcc.dg/torture/pr37868.c on sh Kaz Kojima
2011-04-20  8:55 ` Mike Stump
2011-04-20 13:24   ` Kaz Kojima
2011-04-21  0:51     ` Mike Stump

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).