From cd8002350ee8486af2e113cdd16271f6b409986f Mon Sep 17 00:00:00 2001 From: Senthil Kumar Selvaraj Date: Mon, 22 Aug 2016 06:12:32 +0000 Subject: [PATCH] Skip tests that assume 4 byte alignment for avr gcc/testsuite * gcc.dg/ipa/propalign-1.c: Skip for targets with !natural_alignment_32 and !natural_alignment_64. * gcc.dg/ipa/propalign-2.c: Likewise. * gcc.dg/ipa/propalign-3.c: Likewise. * gcc.dg/ipa/propalign-4.c: Likewise. * gcc.dg/ipa/propalign-5.c: Likewise. * lib/target-supports.exp (check_effective_target_natural_alignment_32): Add avr-*-*. From-SVN: r239647 --- gcc/testsuite/ChangeLog | 11 +++++++++++ gcc/testsuite/gcc.dg/ipa/propalign-1.c | 1 + gcc/testsuite/gcc.dg/ipa/propalign-2.c | 1 + gcc/testsuite/gcc.dg/ipa/propalign-3.c | 1 + gcc/testsuite/gcc.dg/ipa/propalign-4.c | 2 ++ gcc/testsuite/gcc.dg/ipa/propalign-5.c | 2 ++ gcc/testsuite/lib/target-supports.exp | 3 ++- 7 files changed, 20 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6201e0cf82d..b308ee86e88 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2016-08-22 Senthil Kumar Selvaraj + + * gcc.dg/ipa/propalign-1.c: Skip for targets with !natural_alignment_32 + and !natural_alignment_64. + * gcc.dg/ipa/propalign-2.c: Likewise. + * gcc.dg/ipa/propalign-3.c: Likewise. + * gcc.dg/ipa/propalign-4.c: Likewise. + * gcc.dg/ipa/propalign-5.c: Likewise. + * lib/target-supports.exp + (check_effective_target_natural_alignment_32): Add avr-*-*. + 2016-08-20 Kugan Vivekanandarajah PR tree-optimization/61839 diff --git a/gcc/testsuite/gcc.dg/ipa/propalign-1.c b/gcc/testsuite/gcc.dg/ipa/propalign-1.c index fe12682cec7..f34552c8620 100644 --- a/gcc/testsuite/gcc.dg/ipa/propalign-1.c +++ b/gcc/testsuite/gcc.dg/ipa/propalign-1.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fno-early-inlining -fdump-ipa-cp -fdump-tree-optimized" } */ +/* { dg-skip-if "No alignment restrictions" { { ! natural_alignment_32 } && { ! natural_alignment_64 } } } */ #include diff --git a/gcc/testsuite/gcc.dg/ipa/propalign-2.c b/gcc/testsuite/gcc.dg/ipa/propalign-2.c index ee2c71da21f..67b149ae977 100644 --- a/gcc/testsuite/gcc.dg/ipa/propalign-2.c +++ b/gcc/testsuite/gcc.dg/ipa/propalign-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fno-early-inlining -fdump-ipa-cp -fdump-tree-optimized" } */ +/* { dg-skip-if "No alignment restrictions" { { ! natural_alignment_32 } && { ! natural_alignment_64 } } } */ #include diff --git a/gcc/testsuite/gcc.dg/ipa/propalign-3.c b/gcc/testsuite/gcc.dg/ipa/propalign-3.c index a7b3fe2b611..d3bc2c4b2e8 100644 --- a/gcc/testsuite/gcc.dg/ipa/propalign-3.c +++ b/gcc/testsuite/gcc.dg/ipa/propalign-3.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fno-ipa-cp-alignment -fno-early-inlining -fdump-ipa-cp -fdump-tree-optimized" } */ +/* { dg-skip-if "No alignment restrictions" { { ! natural_alignment_32 } && { ! natural_alignment_64 } } } */ #include diff --git a/gcc/testsuite/gcc.dg/ipa/propalign-4.c b/gcc/testsuite/gcc.dg/ipa/propalign-4.c index 4b2b5977525..b6808131c88 100644 --- a/gcc/testsuite/gcc.dg/ipa/propalign-4.c +++ b/gcc/testsuite/gcc.dg/ipa/propalign-4.c @@ -1,5 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-ipa-cp" } */ +/* { dg-skip-if "No alignment restrictions" { { ! natural_alignment_32 } && { ! natural_alignment_64 } } } */ + int n; static void diff --git a/gcc/testsuite/gcc.dg/ipa/propalign-5.c b/gcc/testsuite/gcc.dg/ipa/propalign-5.c index 87021bc7526..f2cf60020e3 100644 --- a/gcc/testsuite/gcc.dg/ipa/propalign-5.c +++ b/gcc/testsuite/gcc.dg/ipa/propalign-5.c @@ -1,5 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-ipa-cp" } */ +/* { dg-skip-if "No alignment restrictions" { { ! natural_alignment_32 } && { ! natural_alignment_64 } } } */ + int n; static void diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index b264686324a..533d3a668d8 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -5350,7 +5350,8 @@ proc check_effective_target_natural_alignment_32 { } { } else { # FIXME: 32bit powerpc: guaranteed only if MASK_ALIGN_NATURAL/POWER. set et_natural_alignment_32_saved 1 - if { ([istarget *-*-darwin*] && [is-effective-target lp64]) } { + if { ([istarget *-*-darwin*] && [is-effective-target lp64]) + || [istarget avr-*-*] } { set et_natural_alignment_32_saved 0 } } -- 2.30.2