This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH,testsuite] Xfail gcc.dg/tree-ssa/stdarg-2.c f15 scans


Hi,

after checking in the 'postpone expanding va_arg till pass_stdarg' patch series, some scans related to function f15 in gcc.dg/tree-ssa/stdarg-2.c have started failing.

[ The committed patch series contained a modification of stdarg-2.c, but that seems to be not complete and not correct. ]

F.i., for s390 we find at https://gcc.gnu.org/ml/gcc-testresults/2015-05/msg00507.html:
...
FAIL: gcc.dg/tree-ssa/stdarg-2.c scan-tree-dump stdarg "f15: va_list escapes 0, needs to save 1 GPR units and 2 FPR units"
...

Furthermore, at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64950#c11 it was noted that:
...
Unfortunately, the gcc.dg/tree-ssa/stdarg-2.c part of the patch is wrong: the test now FAILs on i686-unknown-linux-gnu, i686-apple-darwin, and i386-pc-solaris with -m64: both dumps (i.e. -m32 and -m64) contain

m32/stdarg-2.c.084t.stdarg:f15: va_list escapes 1, needs to save all GPR units and all FPR units. m64/stdarg-2.c.084t.stdarg:f15: va_list escapes 1, needs to save all GPR units and all FPR units.
...

I've filed two PRs:
- PR66010 '[6 Regression] Missed optimization after inlining va_list parameter'
  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66010
- PR66013 'Missed optimization after inlining va_list parameter, -m32 case'
  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66013
to track these errors.

AFAIU now from the investigations in those PRs, we can expect all f15 scans that check for the presence of 'va_list escapes 0' to fail.

I'd like to commit two patches.
- The first patch undoes the modification of stdarg-2.c as committed in the
  original patch series (omitted).
- The second patch adds appropriate xfails (attached).

OK for trunk?

Thanks,
- Tom
[PATCH 2/2] Xfail gcc.dg/tree-ssa/stdarg-2.c f15 scans

2015-05-05  Tom de Vries  <tom@codesourcery.com>

	* gcc.dg/tree-ssa/stdarg-2.c: Xfail f15 scans which test for presence of
	'va_list escapes 0'.
---
 gcc/testsuite/gcc.dg/tree-ssa/stdarg-2.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/stdarg-2.c b/gcc/testsuite/gcc.dg/tree-ssa/stdarg-2.c
index fe39da3..f09b5de 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/stdarg-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/stdarg-2.c
@@ -288,10 +288,18 @@ f15 (int i, ...)
   f15_1 (ap);
   va_end (ap);
 }
-/* { dg-final { scan-tree-dump "f15: va_list escapes 0, needs to save \[148\] GPR units and \[1-9\]\[0-9\]* FPR units" "stdarg" { target { { i?86-*-* x86_64-*-* } && { ! { ia32 || llp64 } } } } } } */
-/* { dg-final { scan-tree-dump "f15: va_list escapes 0, needs to save \[148\] GPR units and \[1-9\]\[0-9\]* FPR units" "stdarg" { target { powerpc*-*-linux* && { powerpc_fprs && ilp32 } } } } } */
+
+/* Following three dg-finals are marked as xfail due to PR66010/PR66013.  */
+/* Was: { target { { i?86-*-* x86_64-*-* } && { ! { ia32 || llp64 } } } }.  */
+/* { dg-final { scan-tree-dump "f15: va_list escapes 0, needs to save \[148\] GPR units and \[1-9\]\[0-9\]* FPR units" "stdarg" { xfail *-*-* } } } */
+/* Was: { target { powerpc*-*-linux* && { powerpc_fprs && ilp32 } } }.  */
+/* { dg-final { scan-tree-dump "f15: va_list escapes 0, needs to save \[148\] GPR units and \[1-9\]\[0-9\]* FPR units" "stdarg" { xfail *-*-* } } } */
+/* Was: { target s390*-*-linux* }.  */
+/* { dg-final { scan-tree-dump "f15: va_list escapes 0, needs to save 1 GPR units and 2 FPR units" "stdarg" { xfail *-*-* } } } */
+
+/* We may be able to improve upon this after fixing PR66010/PR66013.  */
 /* { dg-final { scan-tree-dump "f15: va_list escapes 1, needs to save all GPR units and all FPR units" "stdarg" { target alpha*-*-linux* } } } */
-/* { dg-final { scan-tree-dump "f15: va_list escapes 0, needs to save 1 GPR units and 2 FPR units" "stdarg" { target s390*-*-linux* } } } */
+
 /* { dg-final { scan-tree-dump-not "f15: va_list escapes 0, needs to save 0 GPR units" "stdarg" { target { { i?86-*-* x86_64-*-* } && ia32 } } } } */
 /* { dg-final { scan-tree-dump-not "f15: va_list escapes 0, needs to save 0 GPR units" "stdarg" { target ia64-*-* } } } */
 /* { dg-final { scan-tree-dump-not "f15: va_list escapes 0, needs to save 0 GPR units" "stdarg" { target { powerpc*-*-* && lp64 } } } } */
-- 
1.9.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]