Hi!
On Thu, 23 Mar 2017 16:46:19 +0100, Tom de Vries <Tom_deVries@mentor.com> wrote:
I've run the gcc testsuite for target nvptx-none and ran into "test for
excess errors" FAILs due to:
...
sorry, unimplemented: target cannot support alloca.
...
This patch marks those testcases as requiring alloca.
I observed that this test case:
--- gcc/testsuite/gcc.dg/torture/pr71881.c (revision 246278)
+++ gcc/testsuite/gcc.dg/torture/pr71881.c (working copy)
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-require-effective-target alloca } */
/* { dg-additional-options "-g" } */
... as well as this test case:
--- gcc/testsuite/gcc.c-torture/compile/pr79413.c (revision 246278)
+++ gcc/testsuite/gcc.c-torture/compile/pr79413.c (working copy)
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
/* PR c/79413 */
... previously did PASS for anything but "-O0" (that is, any "alloca"
usage got optimized away). Now changed as follows:
[-FAIL:-]{+UNSUPPORTED:+} gcc.c-torture/compile/pr79413.c -O0 [-(test for excess errors)-]
[-PASS:-]{+UNSUPPORTED:+} gcc.c-torture/compile/pr79413.c -O1 [-(test for excess errors)-]
[-PASS:-]{+UNSUPPORTED:+} gcc.c-torture/compile/pr79413.c -O2 [-(test for excess errors)-]
[-PASS:-]{+UNSUPPORTED:+} gcc.c-torture/compile/pr79413.c -O3 -g [-(test for excess errors)-]
[-PASS:-]{+UNSUPPORTED:+} gcc.c-torture/compile/pr79413.c -Os [-(test for excess errors)-]
[-FAIL:-]{+UNSUPPORTED:+} gcc.dg/torture/pr71881.c -O0 [-(test for excess errors)-]
[-PASS:-]{+UNSUPPORTED:+} gcc.dg/torture/pr71881.c -O1 [-(test for excess errors)-]
[-PASS:-]{+UNSUPPORTED:+} gcc.dg/torture/pr71881.c -O2 [-(test for excess errors)-]
[-PASS:-]{+UNSUPPORTED:+} gcc.dg/torture/pr71881.c -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions [-(test for excess errors)-]
[-PASS:-]{+UNSUPPORTED:+} gcc.dg/torture/pr71881.c -O3 -g [-(test for excess errors)-]
[-PASS:-]{+UNSUPPORTED:+} gcc.dg/torture/pr71881.c -Os [-(test for excess errors)-]
Would it be useful to XFAIL these for "-O0" only (along with a comment),
so that we continue testing that any "alloca" usage gets optimized away?
(Just an idea.)