Message ID | 20110614155332.GE17079@tyan-ft48-01.lab.bos.redhat.com |
---|---|
State | New |
Headers | show |
On Jun 14, 2011, at 8:53 AM, Jakub Jelinek wrote: > On Tue, Jun 14, 2011 at 04:52:18PM +0200, Eric Botcazou wrote: >>> Well, Steve has a patch for non_strict_align effective_target >>> in http://gcc.gnu.org/ml/gcc-patches/2011-06/msg00673.html >>> (with s/strict_align/non_strict_align/g ), I was hoping it would be >>> reviewed and I'd just adjust the testcase to use it as well. >> >> Would it be applied to the 4.6 branch as well? If no, I think you should apply >> your patch to trunk and 4.6 branch and let Steve adjust it on trunk later. > > I'd say it should be applied there as well. > > Here is what I've just bootstrapped/regtested, Steve's patch with that > s/strict_align/non_strict_align/g plus a smallish change on top of that. > > Mike, is this ok for trunk/4.6? Ok. > 2011-06-14 Jakub Jelinek <jakub@redhat.com> > > PR tree-optimization/48377 > * gcc.dg/vect/pr48377.c: Add dg-require-effective-target > non_strict_align. > > 2011-06-14 Steve Ellcey <sje@cup.hp.com> > > PR middle-end/49191 > * lib/target-supports.exp (check_effective_target_non_strict_align): > New. > * gcc.dg/memcpy-3.c: Add dg-require-effective-target non_strict_align.
--- gcc/testsuite/lib/target-supports.exp (revision 174336) +++ gcc/testsuite/lib/target-supports.exp (working copy) @@ -3901,3 +3901,11 @@ return 1 } +proc check_effective_target_non_strict_align {} { + return [check_no_compiler_messages non_strict_align assembly { + char *y; + typedef char __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))) c; + c *z; + void foo(void) { z = (c *) y; } + } "-Wcast-align"] +} --- gcc/testsuite/gcc.dg/memcpy-3.c (revision 174336) +++ gcc/testsuite/gcc.dg/memcpy-3.c (working copy) @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O -fdump-tree-optimized" } */ +/* { dg-require-effective-target non_strict_align } */ int get_int(const void *p) { --- gcc/testsuite/gcc.dg/vect/pr48377.c.jj 2011-05-02 18:39:10.000000000 +0200 +++ gcc/testsuite/gcc.dg/vect/pr48377.c 2011-06-03 13:19:53.000000000 +0200 @@ -1,4 +1,5 @@ /* PR tree-optimization/48377 */ +/* { dg-require-effective-target non_strict_align } */ typedef unsigned int U __attribute__((__aligned__ (1), __may_alias__));