Re: [patch testsuite committed] Skip gcc.dg/torture/pr37868.c on sh

2011-04-20 Thread Kaz Kojima
Mike Stump mikest...@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


Re: [patch testsuite committed] Skip gcc.dg/torture/pr37868.c on sh

2011-04-20 Thread Mike Stump
On Apr 20, 2011, at 5:22 AM, Kaz Kojima wrote:
 Mike Stump mikest...@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.


Re: [patch testsuite committed] Skip gcc.dg/torture/pr37868.c on sh

2011-04-19 Thread Mike Stump
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*-*-* } *  } */