Hi,
Here are a few test tweaks. In 921202-1.c, if STACK_SIZE is used then
VLEN will blow the stack with 64bit longs. e.g. if STACK_SIZE == 512K
then 3 arrays of 32767 longs means at a minimum 767K of stack will be
used at -O0. In pr51447.c, the rbx global register is clobbering the rbx
of main's caller, which can cause test case crashes on return.
2014-12-12 Ryan Mansfield <rmansfi...@qnx.com>
* gcc.c-torture/execute/921202-1.c: Adjust VLEN.
* gcc.c-torture/execute/pr51447.c: Restore rbx for x86-64.
* gcc.dg/cpp/trad/include.c: Exclude QNX targets.
OK?
Regards,
Ryan Mansfield
Index: gcc/testsuite/gcc.c-torture/execute/921202-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/921202-1.c (revision 218685)
+++ gcc/testsuite/gcc.c-torture/execute/921202-1.c (working copy)
@@ -2,7 +2,7 @@
#ifndef STACK_SIZE
#define VLEN 2055
#else
-#define VLEN ((STACK_SIZE/16) - 1)
+#define VLEN ((STACK_SIZE/32) - 1)
#endif
main ()
{
Index: gcc/testsuite/gcc.c-torture/execute/pr51447.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/pr51447.c (revision 218685)
+++ gcc/testsuite/gcc.c-torture/execute/pr51447.c (working copy)
@@ -14,6 +14,10 @@
main (void)
{
__label__ nonlocal_lab;
+#ifdef __x86_64__
+ void *rbx __asm ("rbx");
+ void *saved_rbx = rbx;
+#endif
__attribute__((noinline, noclone)) void
bar (void *func)
{
@@ -21,9 +25,15 @@
goto nonlocal_lab;
}
bar (&&nonlocal_lab);
+#ifdef __x86_64__
+ rbx = saved_rbx;
+#endif
return 1;
nonlocal_lab:
if (ptr != &&nonlocal_lab)
abort ();
+#ifdef __x86_64__
+ rbx = saved_rbx;
+#endif
return 0;
}
Index: gcc/testsuite/gcc.dg/cpp/trad/include.c
===================================================================
--- gcc/testsuite/gcc.dg/cpp/trad/include.c (revision 218685)
+++ gcc/testsuite/gcc.dg/cpp/trad/include.c (working copy)
@@ -1,11 +1,11 @@
/* Copyright (c) 2002 Free Software Foundation Inc. */
-/* Test that macros are not expanded in the <> quotes of #inlcude. */
+/* Test that macros are not expanded in the <> quotes of #include. */
/* vxWorksCommon.h uses the "#" operator to construct the name of an
include file, thus making the file incompatible with -traditional-cpp.
Newlib uses ## when including stdlib.h as of 2007-09-07. */
-/* { dg-do preprocess { target { { ! vxworks_kernel } && { ! newlib } } } } */
+/* { dg-do preprocess { target { { ! vxworks_kernel } && { ! newlib } && { ! *-*-qnx* }} } } */
#define __STDC__ 1 /* Stop complaints about non-ISO compilers. */
#define stdlib 1