I've checked in this patch to tidy up some test cases observed to fail
on nios2-elf; mostly tree-ssa tests that assume some non-default branch
costs in the back end, plus a couple that pass -fPIC without requiring
an effective target that supports that option.
-Sandra
2014-08-21 Sandra Loosemore <san...@codesourcery.com>
gcc/testsuite/
* lib/target-supports.exp
(check_effective_target_logical_op_short_circuit): Add nios2.
* gcc.dg/tree-ssa/reassoc-33.c: Skip for nios2.
* gcc.dg/tree-ssa/reassoc-34.c: Likewise.
* gcc.dg/tree-ssa/reassoc-35.c: Likewise.
* gcc.dg/tree-ssa/reassoc-36.c: Likewise.
* gcc.dg/tree-ssa/interposition.c: Require fpic effective target
for test using -fPIC.
* gcc.dg/lto/pr61526_0.c: Likewise.
Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp (revision 214241)
+++ gcc/testsuite/lib/target-supports.exp (working copy)
@@ -5970,6 +5970,7 @@ proc check_effective_target_logical_op_s
|| [istarget mmix-*-*]
|| [istarget s390*-*-*]
|| [istarget powerpc*-*-*]
+ || [istarget nios2*-*-*]
|| [check_effective_target_arm_cortex_m] } {
return 1
}
Index: gcc/testsuite/gcc.dg/tree-ssa/reassoc-33.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/reassoc-33.c (revision 214241)
+++ gcc/testsuite/gcc.dg/tree-ssa/reassoc-33.c (working copy)
@@ -1,4 +1,4 @@
-/* { dg-do run { target { ! "m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-*"} } } */
+/* { dg-do run { target { ! "m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-* nios2*-*-*"} } } */
/* { dg-options "-O2 -fno-inline -fdump-tree-reassoc1-details" } */
/* { dg-additional-options "-mbranch-cost=2" { target mips*-*-* avr-*-* s390*-*-* i?86-*-* x86_64-*-* } } */
Index: gcc/testsuite/gcc.dg/tree-ssa/reassoc-34.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/reassoc-34.c (revision 214241)
+++ gcc/testsuite/gcc.dg/tree-ssa/reassoc-34.c (working copy)
@@ -1,4 +1,4 @@
-/* { dg-do run { target { ! "m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-*"} } } */
+/* { dg-do run { target { ! "m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-* nios2*-*-*"} } } */
/* { dg-options "-O2 -fno-inline -fdump-tree-reassoc1-details" } */
/* { dg-additional-options "-mbranch-cost=2" { target mips*-*-* avr-*-* s390*-*-* i?86-*-* x86_64-*-* } } */
Index: gcc/testsuite/gcc.dg/tree-ssa/reassoc-35.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/reassoc-35.c (revision 214241)
+++ gcc/testsuite/gcc.dg/tree-ssa/reassoc-35.c (working copy)
@@ -1,4 +1,4 @@
-/* { dg-do run { target { ! "m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-*"} } } */
+/* { dg-do run { target { ! "m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-* nios2*-*-*"} } } */
/* { dg-options "-O2 -fno-inline -fdump-tree-reassoc1-details" } */
/* { dg-additional-options "-mbranch-cost=2" { target mips*-*-* avr-*-* s390*-*-* i?86-*-* x86_64-*-* } } */
Index: gcc/testsuite/gcc.dg/tree-ssa/reassoc-36.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/reassoc-36.c (revision 214241)
+++ gcc/testsuite/gcc.dg/tree-ssa/reassoc-36.c (working copy)
@@ -1,4 +1,4 @@
-/* { dg-do run { target { ! "m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-*"} } } */
+/* { dg-do run { target { ! "m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-* nios2*-*-*"} } } */
/* { dg-options "-O2 -fno-inline -fdump-tree-reassoc1-details" } */
/* { dg-additional-options "-mbranch-cost=2" { target mips*-*-* avr-*-* s390*-*-* i?86-*-* x86_64-*-* } } */
Index: gcc/testsuite/gcc.dg/tree-ssa/interposition.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/interposition.c (revision 214241)
+++ gcc/testsuite/gcc.dg/tree-ssa/interposition.c (working copy)
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-require-effective-target fpic } */
/* { dg-options "-O1 -fno-semantic-interposition -fdump-tree-optimized -fPIC" } */
int t(void)
{
Index: gcc/testsuite/gcc.dg/lto/pr61526_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/pr61526_0.c (revision 214241)
+++ gcc/testsuite/gcc.dg/lto/pr61526_0.c (working copy)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target fpic } */
/* { dg-lto-do link } */
/* { dg-lto-options { { -fPIC -flto -flto-partition=1to1 } } } */
/* { dg-extra-ld-options { -shared } } */