Hi,
The pr44194-1.c test case scores a failure invariably for big-endian
Power64/Linux targets:
PASS: gcc.dg/pr44194-1.c (test for excess errors)
FAIL: gcc.dg/pr44194-1.c scan-rtl-dump dse1 "global deletions = (2|3)"
PASS: gcc.dg/pr44194-1.c scan-rtl-dump-not final "insn[: ][^\n]*set
\\(mem(?![^\n]*scratch)"
because IIUC the case only makes sense for targets where functions return
small structures in registers.
For historical reasons this is not the case for Power/Linux targets,
except from the newly-added 64-bit little-endian one (according to
LINUX64_DEFAULT_ABI_ELFv2 defined in rs6000/sysv4le.h and then
rs6000_return_in_memory) or where the `-mabi=elfv2' option has been used
(that, regrettably, looks undetectable to me; there's no preprocessor
macro defined one could use to tell the ABIs apart). The test case
already excludes 32-bit targets based on the implication none uses
registers for struct returns (that is not entirely correct, though fixing
it is beyond the scope of this change).
These observations are reflected in the change below, that disables the
test case for big-endian Power64/Linux targets while retaining it for
little-endian ones. As noted above there's no way to detect `-mabi=elfv2'
being in effect, so the check for relevance is hardwired to the target
triplet instead. This makes the failure go away in my power-linux-gnu
testing that includes a 64-bit big-endian multilib. I have no way to test
a 64-bit little-endian multilib, however I believe the change is obviously
correct in this respect.
This could get extended to cover other Power targets, as it seems to me
there are more that should be excluded, however I don't feel comfortable
enough with the intricacies of the Power configuration to dare changing
anything for targets I have no way to test.
OK to apply?
2014-08-04 Maciej W. Rozycki
gcc/testsuite/
* gcc.dg/pr44194-1.c: Also exclude powerpc*-*-linux*, but not
powerpc*le-*-linux*.
Maciej
gcc-test-ppc-pr44194.diff
Index: gcc-fsf-trunk-quilt/gcc/testsuite/gcc.dg/pr44194-1.c
===
--- gcc-fsf-trunk-quilt.orig/gcc/testsuite/gcc.dg/pr44194-1.c 2014-05-16
16:00:05.0 +0100
+++ gcc-fsf-trunk-quilt/gcc/testsuite/gcc.dg/pr44194-1.c2014-08-04
17:54:23.648935358 +0100
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { { { { { { i?86-*-* x86_64-*-* } && x32 } || lp64
} && { ! s390*-*-* } } && { ! hppa*64*-*-* } } && { ! alpha*-*-* } } } } */
+/* { dg-do compile { target { { { { { { { i?86-*-* x86_64-*-* } && x32 } ||
lp64 } && { ! s390*-*-* } } && { ! hppa*64*-*-* } } && { ! alpha*-*-* } } && {
{ ! powerpc*-*-linux* } || { powerpc*le-*-linux* } } } } } */
/* { dg-options "-O2 -fdump-rtl-dse1 -fdump-rtl-final" } */
/* Restrict to 64-bit targets since 32-bit targets usually return small