public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [1/6] nvptx testsuite patches: alloca
  2014-10-21 14:13 [0/6] nvptx testsuite patches Bernd Schmidt
@ 2014-10-21 14:13 ` Bernd Schmidt
  2014-10-21 15:16   ` Jeff Law
  2014-10-21 14:19 ` [2/6] nvptx testsuite patches: typed assembly Bernd Schmidt
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 27+ messages in thread
From: Bernd Schmidt @ 2014-10-21 14:13 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 276 bytes --]

This deals with uses of alloca in the testsuite. Some tests require it 
outright, others only at -O0, and others require it implicitly by 
requiring an alignment for stack variables bigger than the target's 
STACK_BOUNDARY. For the latter I've added explicit xfails.


Bernd


[-- Attachment #2: ts-alloca.diff --]
[-- Type: text/x-patch, Size: 30205 bytes --]

	gcc/testsuite/
	* lib/target-supports.exp (check_effective_target_alloca): New function.
	* gcc.c-torture/execute/20010209-1.c: Require alloca.
	* gcc.c-torture/execute/20020314-1.c: Likewise.
	* gcc.c-torture/execute/20020412-1.c: Likewise.
	* gcc.c-torture/execute/20021113-1.c: Likewise.
	* gcc.c-torture/execute/20040223-1.c: Likewise.
	* gcc.c-torture/execute/20040308-1.c: Likewise.
	* gcc.c-torture/execute/20040811-1.c: Likewise.
	* gcc.c-torture/execute/20070824-1.c: Likewise.
	* gcc.c-torture/execute/20070919-1.c: Likewise.
	* gcc.c-torture/execute/built-in-setjmp.c: Likewise.
	* gcc.c-torture/execute/pr22061-1.c: Likewise.
	* gcc.c-torture/execute/pr22061-4.c: Likewise.
	* gcc.c-torture/execute/pr43220.c: Likewise.
	* gcc.c-torture/execute/vla-dealloc-1.c: Likewise.
	* gcc.dg/torture/stackalign/alloca-1.c: Likewise.
	* gcc.dg/torture/stackalign/vararg-1.c: Likewise.
	* gcc.dg/torture/stackalign/vararg-2.c: Likewise.
	* gcc.c-torture/compile/20000923-1.c: Likewise.
	* gcc.c-torture/compile/20030224-1.c: Likewise.
	* gcc.c-torture/compile/20071108-1.c: Likewise.
	* gcc.c-torture/compile/20071117-1.c: Likewise.
	* gcc.c-torture/compile/900313-1.c: Likewise.
	* gcc.c-torture/compile/pr17397.c: Likewise.
	* gcc.c-torture/compile/pr35006.c: Likewise.
	* gcc.c-torture/compile/pr42956.c: Likewise.
	* gcc.c-torture/compile/pr51354.c: Likewise.
	* gcc.c-torture/compile/pr55851.c: Likewise.
	* gcc.c-torture/compile/vla-const-1.c: Likewise.
	* gcc.c-torture/compile/vla-const-2.c: Likewise.
	* gcc.c-torture/compile/pr31507-1.c: Likewise.
	* gcc.c-torture/compile/pr52714.c: Likewise.
	* gcc.dg/20001012-2.c: Likewise.
	* gcc.dg/auto-type-1.c: Likewise.
	* gcc.dg/builtin-object-size-1.c: Likewise.
	* gcc.dg/builtin-object-size-2.c: Likewise.
	* gcc.dg/builtin-object-size-3.c: Likewise.
	* gcc.dg/builtin-object-size-4.c: Likewise.
	* gcc.dg/packed-vla.c: Likewise.
	* gcc.c-torture/compile/parms.c: Likewise.
	* gcc.c-torture/execute/920721-2.c: Skip -O0 unless alloca is available.
	* gcc.c-torture/execute/920929-1.c: Likewise.
	* gcc.c-torture/execute/921017-1.c: Likewise.
	* gcc.c-torture/execute/941202-1.c: Likewise.
	* gcc.c-torture/execute/align-nest.c: Likewise.
	* gcc.c-torture/execute/alloca-1.c: Likewise.
	* gcc.c-torture/execute/pr36321.c: Likewise.
	* gcc.c-torture/compile/20001221-1.c: Likewise.
	* gcc.c-torture/compile/20020807-1.c: Likewise.
	* gcc.c-torture/compile/20050801-2.c: Likewise.
	* gcc.c-torture/compile/920428-4.c: Likewise.
	* gcc.c-torture/compile/debugvlafunction-1.c.c: Likewise.
	* gcc.c-torture/compile/pr41469.c: Likewise.
	* gcc.dg/torture/pr48953.c: Likewise.
	* gcc.dg/torture/pr8081.c: Likewise.
	* gcc.dg/torture/stackalign/inline-1.c: Skip if nvptx-*-*.
	* gcc.dg/torture/stackalign/inline-2.c: Likewise.
	* gcc.dg/torture/stackalign/nested-1.c: Likewise.
	* gcc.dg/torture/stackalign/nested-2.c: Likewise.
	* gcc.dg/torture/stackalign/nested-3.c: Likewise.
	* gcc.dg/torture/stackalign/nested-4.c: Likewise.
	* gcc.dg/torture/stackalign/nested-1.c: Likewise.
	* gcc.dg/torture/stackalign/global-1.c: Likewise.
	* gcc.dg/torture/stackalign/pr16660-1.c: Likewise.
	* gcc.dg/torture/stackalign/pr16660-2.c: Likewise.
	* gcc.dg/torture/stackalign/pr16660-3.c: Likewise.
	* gcc.dg/torture/stackalign/ret-struct-1.c: Likewise.
	* gcc.dg/torture/stackalign/struct-1.c: Likewise.

------------------------------------------------------------------------
Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp.orig
+++ gcc/testsuite/lib/target-supports.exp
@@ -604,6 +606,15 @@ proc add_options_for_tls { flags } {
     return $flags
 }
 
+# Return 1 if alloca is supported, 0 otherwise.
+
+proc check_effective_target_alloca {} {
+    if { [istarget nvptx-*-*] } {
+	return 0
+    }
+    return 1
+}
+
 # Return 1 if thread local storage (TLS) is supported, 0 otherwise.
 
 proc check_effective_target_tls {} {
Index: gcc/testsuite/gcc.c-torture/execute/20010209-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20010209-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20010209-1.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 int b;
 int foo (void)
 {
Index: gcc/testsuite/gcc.c-torture/execute/20020314-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20020314-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20020314-1.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 void f(void * a, double y)
 {
 }
Index: gcc/testsuite/gcc.c-torture/execute/20020412-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20020412-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20020412-1.c
@@ -1,6 +1,7 @@
 /* PR c/3711
    This testcase ICEd on IA-32 at -O0 and was miscompiled otherwise,
    because std_expand_builtin_va_arg didn't handle variable size types.  */
+/* { dg-require-effective-target alloca } */
 
 #include <stdarg.h>
 
Index: gcc/testsuite/gcc.c-torture/execute/20021113-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20021113-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20021113-1.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target alloca } */
+
 /* This program tests a data flow bug that would cause constant propagation
    to propagate constants through function calls.  */
 
Index: gcc/testsuite/gcc.c-torture/execute/20040223-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20040223-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20040223-1.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 #include <string.h>
 #include <stdio.h>
 
Index: gcc/testsuite/gcc.c-torture/execute/20040308-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20040308-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20040308-1.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 /* This used to fail on SPARC with an unaligned memory access.  */
 
 void foo(int n)
Index: gcc/testsuite/gcc.c-torture/execute/20040811-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20040811-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20040811-1.c
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target int32plus } */
+/* { dg-require-effective-target alloca } */
 
 /* Ensure that we deallocate X when branching back before its
    declaration.  */
Index: gcc/testsuite/gcc.c-torture/execute/20070824-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20070824-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20070824-1.c
@@ -1,4 +1,5 @@
 /* PR tree-optimization/33136 */
+/* { dg-require-effective-target alloca } */
 
 extern void abort (void);
 
Index: gcc/testsuite/gcc.c-torture/execute/20070919-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20070919-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20070919-1.c
@@ -1,4 +1,5 @@
 /* PR c/33238 */
+/* { dg-require-effective-target alloca } */
 
 typedef __SIZE_TYPE__ size_t;
 int memcmp (const void *, const void *, size_t);
Index: gcc/testsuite/gcc.c-torture/execute/920721-2.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/920721-2.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/920721-2.c
@@ -1,2 +1,3 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 f(){}
 main(){int n=2;double x[n];f();exit(0);}
Index: gcc/testsuite/gcc.c-torture/execute/920929-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/920929-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/920929-1.c
@@ -1,3 +1,4 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 /* REPRODUCED:RUN:SIGNAL MACHINE:sparc OPTIONS: */
 f(int n)
 {
Index: gcc/testsuite/gcc.c-torture/execute/921017-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/921017-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/921017-1.c
@@ -1,3 +1,4 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 f(n)
 {
   int a[n];
Index: gcc/testsuite/gcc.c-torture/execute/941202-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/941202-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/941202-1.c
@@ -1,3 +1,4 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 g (x, y)
 {
   if (x != 3)
Index: gcc/testsuite/gcc.c-torture/execute/align-nest.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/align-nest.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/align-nest.c
@@ -1,3 +1,4 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 
 void foo(int n)
 {
Index: gcc/testsuite/gcc.c-torture/execute/alloca-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/alloca-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/alloca-1.c
@@ -1,3 +1,4 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 /* Verify that alloca storage is sufficiently aligned.  */
 /* ??? May fail if BIGGEST_ALIGNMENT > STACK_BOUNDARY.  Which, I guess
    can only happen on !STRICT_ALIGNMENT targets.  */
Index: gcc/testsuite/gcc.c-torture/execute/built-in-setjmp.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/built-in-setjmp.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/built-in-setjmp.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target alloca } */
+
 extern int strcmp(const char *, const char *);
 extern char *strcpy(char *, const char *);
 extern void abort(void);
Index: gcc/testsuite/gcc.c-torture/execute/pr22061-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/pr22061-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/pr22061-1.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 int N = 1;
 void foo() {} /* Necessary to trigger the original ICE.  */
 void bar (char a[2][N]) { a[1][0] = N; }
Index: gcc/testsuite/gcc.c-torture/execute/pr22061-4.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/pr22061-4.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/pr22061-4.c
@@ -1,3 +1,4 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 void
 bar (int N)
 {
Index: gcc/testsuite/gcc.c-torture/execute/pr36321.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/pr36321.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/pr36321.c
@@ -1,3 +1,4 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 extern void abort (void);
 
 extern __SIZE_TYPE__ strlen (const char *);
Index: gcc/testsuite/gcc.c-torture/execute/pr43220.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/pr43220.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/pr43220.c
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target int32plus } */
+/* { dg-require-effective-target alloca } */
 
 void *volatile p;
 
Index: gcc/testsuite/gcc.c-torture/execute/vla-dealloc-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/vla-dealloc-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/vla-dealloc-1.c
@@ -1,5 +1,6 @@
 /* VLAs should be deallocated on a jump to before their definition,
    including a jump to a label in an inner scope.  PR 19771.  */
+/* { dg-require-effective-target alloca } */
 
 #if (__SIZEOF_INT__ <= 2)
 #define LIMIT 10000
Index: gcc/testsuite/gcc.dg/torture/stackalign/alloca-1.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/alloca-1.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/alloca-1.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */
+/* { dg-require-effective-target alloca } */
 
 #include "check.h"
 
Index: gcc/testsuite/gcc.dg/torture/stackalign/vararg-1.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/vararg-1.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/vararg-1.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */
+/* { dg-require-effective-target alloca } */
 
 #include <stdarg.h>
 #include "check.h"
Index: gcc/testsuite/gcc.dg/torture/stackalign/vararg-2.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/vararg-2.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/vararg-2.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */
+/* { dg-require-effective-target alloca } */
 
 #include <stdarg.h>
 #include "check.h"
Index: gcc/testsuite/gcc.c-torture/compile/20000923-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/20000923-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/20000923-1.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 const int a = 3;
 const int b = 50;
 
Index: gcc/testsuite/gcc.c-torture/compile/20001221-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/20001221-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/20001221-1.c
@@ -1,3 +1,4 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 static void
 foo ()
 {
Index: gcc/testsuite/gcc.c-torture/compile/20020807-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/20020807-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/20020807-1.c
@@ -1,3 +1,4 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 int x;
 
 static int
Index: gcc/testsuite/gcc.c-torture/compile/20030224-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/20030224-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/20030224-1.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 void zzz (char *s1, char *s2, int len, int *q)
 {
   int z = 5;
Index: gcc/testsuite/gcc.c-torture/compile/20050801-2.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/20050801-2.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/20050801-2.c
@@ -1,3 +1,4 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 __inline int f(int i)
 {
   struct {
Index: gcc/testsuite/gcc.c-torture/compile/20071108-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/20071108-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/20071108-1.c
@@ -1,4 +1,5 @@
 /* PR tree-optimization/33680 */
+/* { dg-require-effective-target alloca } */
 
 int
 f (int dim, int *b, int *c)
Index: gcc/testsuite/gcc.c-torture/compile/20071117-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/20071117-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/20071117-1.c
@@ -1,4 +1,5 @@
 /* PR middle-end/34134 */
+/* { dg-require-effective-target alloca } */
 
 extern void bar (void *, int);
 
Index: gcc/testsuite/gcc.c-torture/compile/900313-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/900313-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/900313-1.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 main ()
 {
   char *a;
Index: gcc/testsuite/gcc.c-torture/compile/920428-4.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/920428-4.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/920428-4.c
@@ -1,1 +1,2 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 x(a){struct{int p[a],i;}l;l.i;}
Index: gcc/testsuite/gcc.c-torture/compile/debugvlafunction-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/debugvlafunction-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/debugvlafunction-1.c
@@ -1,3 +1,4 @@
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 extern void dynreplace_trampoline(void);
 extern void dynreplace_trampoline_endlabel(void);
 int dynreplace_add_trampoline(void)
Index: gcc/testsuite/gcc.c-torture/compile/pr17397.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr17397.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr17397.c
@@ -1,4 +1,5 @@
 /* ICE due to invalid GIMPLE created during strlen simplification.  */
+/* { dg-require-effective-target alloca } */
 
 extern unsigned long strlen (__const char *__s);
 extern void bar ();
Index: gcc/testsuite/gcc.c-torture/compile/pr35006.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr35006.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr35006.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 typedef unsigned long grub_uint64_t;
 typedef grub_uint64_t grub_size_t;
 grub_cmdline_get (unsigned max_len, int echo_char)
Index: gcc/testsuite/gcc.c-torture/compile/pr41469.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr41469.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr41469.c
@@ -1,4 +1,5 @@
 /* { dg-options "-fexceptions" } */
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 
 void
 af (void *a)
Index: gcc/testsuite/gcc.c-torture/compile/pr42956.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr42956.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr42956.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 typedef const int cint;
 typedef struct {
 } Bounds;
Index: gcc/testsuite/gcc.c-torture/compile/pr51354.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr51354.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr51354.c
@@ -1,4 +1,5 @@
 /* PR target/51354 */
+/* { dg-require-effective-target alloca } */
 
 extern void abort (void);
 
Index: gcc/testsuite/gcc.c-torture/compile/pr55851.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr55851.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr55851.c
@@ -1,4 +1,5 @@
 /* PR middle-end/55851 */
+/* { dg-require-effective-target alloca } */
 
 enum { A = 1UL, B = -1UL } var = A;
 void foo (char *);
Index: gcc/testsuite/gcc.c-torture/compile/vla-const-2.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/vla-const-2.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/vla-const-2.c
@@ -1,4 +1,5 @@
 /* Test TREE_CONSTANT VLA size: bug 27893.  */
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-require-effective-target alloca } */
 void g(void *);
 void f(void) { int b[1/0]; g(b); }
Index: gcc/testsuite/gcc.dg/pr31507-1.c
===================================================================
--- gcc/testsuite/gcc.dg/pr31507-1.c.orig
+++ gcc/testsuite/gcc.dg/pr31507-1.c
@@ -1,6 +1,7 @@
 /* PR target/31507 */
 /* { dg-do run } */
 /* { dg-options "-Os -fno-omit-frame-pointer" } */
+/* { dg-require-effective-target alloca } */
 
 extern void abort (void);
 
Index: gcc/testsuite/gcc.c-torture/compile/pr52714.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr52714.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr52714.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 
 int __re_compile_fastmap(unsigned char *p)
 {
Index: gcc/testsuite/gcc.c-torture/compile/vla-const-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/vla-const-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/vla-const-1.c
@@ -1,5 +1,6 @@
 /* Test TREE_CONSTANT VLA size: bug 27893.  */
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-require-effective-target alloca } */
 int a;
 void g(void *);
 void f(void) { int b[(__SIZE_TYPE__)&a]; g(b); }
Index: gcc/testsuite/gcc.dg/20001012-2.c
===================================================================
--- gcc/testsuite/gcc.dg/20001012-2.c.orig
+++ gcc/testsuite/gcc.dg/20001012-2.c
@@ -1,5 +1,6 @@
 /* { dg-do run { target fpic } } */
 /* { dg-options "-O2 -fpic" } */
+/* { dg-require-effective-target alloca } */
 
 extern void abort (void);
 extern void exit (int);
Index: gcc/testsuite/gcc.dg/auto-type-1.c
===================================================================
--- gcc/testsuite/gcc.dg/auto-type-1.c.orig
+++ gcc/testsuite/gcc.dg/auto-type-1.c
@@ -1,6 +1,7 @@
 /* Test __auto_type.  Test correct uses.  */
 /* { dg-do run } */
 /* { dg-options "" } */
+/* { dg-require-effective-target alloca } */
 
 extern void abort (void);
 extern void exit (int);
Index: gcc/testsuite/gcc.dg/builtin-object-size-1.c
===================================================================
--- gcc/testsuite/gcc.dg/builtin-object-size-1.c.orig
+++ gcc/testsuite/gcc.dg/builtin-object-size-1.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O2" } */
+/* { dg-require-effective-target alloca } */
 
 typedef __SIZE_TYPE__ size_t;
 extern void abort (void);
Index: gcc/testsuite/gcc.dg/builtin-object-size-2.c
===================================================================
--- gcc/testsuite/gcc.dg/builtin-object-size-2.c.orig
+++ gcc/testsuite/gcc.dg/builtin-object-size-2.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O2" } */
+/* { dg-require-effective-target alloca } */
 
 typedef __SIZE_TYPE__ size_t;
 extern void abort (void);
Index: gcc/testsuite/gcc.dg/builtin-object-size-3.c
===================================================================
--- gcc/testsuite/gcc.dg/builtin-object-size-3.c.orig
+++ gcc/testsuite/gcc.dg/builtin-object-size-3.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O2" } */
+/* { dg-require-effective-target alloca } */
 
 typedef __SIZE_TYPE__ size_t;
 extern void abort (void);
Index: gcc/testsuite/gcc.dg/builtin-object-size-4.c
===================================================================
--- gcc/testsuite/gcc.dg/builtin-object-size-4.c.orig
+++ gcc/testsuite/gcc.dg/builtin-object-size-4.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O2" } */
+/* { dg-require-effective-target alloca } */
 
 typedef __SIZE_TYPE__ size_t;
 extern void abort (void);
Index: gcc/testsuite/gcc.dg/packed-vla.c
===================================================================
--- gcc/testsuite/gcc.dg/packed-vla.c.orig
+++ gcc/testsuite/gcc.dg/packed-vla.c
@@ -1,6 +1,7 @@
 /* PR middle-end/27945 */
 /* { dg-do run } */
 /* { dg-options "" } */
+/* { dg-require-effective-target alloca } */
 
 extern int printf (const char *, ...);
 extern void abort ();
Index: gcc/testsuite/gcc.dg/torture/pr48953.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/pr48953.c.orig
+++ gcc/testsuite/gcc.dg/torture/pr48953.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-fno-tree-dce" } */
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 
 static inline int foo (int n, int k)
 {
Index: gcc/testsuite/gcc.dg/torture/pr8081.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/pr8081.c.orig
+++ gcc/testsuite/gcc.dg/torture/pr8081.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 
 extern void abort (void);
 int
Index: gcc/testsuite/gcc.dg/torture/stackalign/inline-1.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/inline-1.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/inline-1.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */
+/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } "*" "" } */
 
 #include "check.h"
 
Index: gcc/testsuite/gcc.dg/torture/stackalign/inline-2.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/inline-2.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/inline-2.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */
+/* { dg-require-effective-target alloca } */
 
 #include "check.h"
 
Index: gcc/testsuite/gcc.dg/torture/stackalign/nested-1.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/nested-1.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/nested-1.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */
+/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } "*" "" } */
 
 #include "check.h"
 
Index: gcc/testsuite/gcc.dg/torture/stackalign/nested-2.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/nested-2.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/nested-2.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */
+/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } "*" "" } */
 
 #include "check.h"
 
Index: gcc/testsuite/gcc.dg/torture/stackalign/nested-3.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/nested-3.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/nested-3.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */
+/* { dg-require-effective-target alloca } */
 
 #include "check.h"
 
Index: gcc/testsuite/gcc.dg/torture/stackalign/nested-4.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/nested-4.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/nested-4.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */
+/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } "*" "" } */
 
 #include "check.h"
 
Index: gcc/testsuite/gcc.dg/torture/stackalign/global-1.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/global-1.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/global-1.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */
+/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } "*" "" } */
 
 #include "check.h"
 
Index: gcc/testsuite/gcc.dg/torture/stackalign/pr16660-1.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/pr16660-1.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/pr16660-1.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */
+/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } "*" "" } */
 
 #include "check.h"
 
Index: gcc/testsuite/gcc.dg/torture/stackalign/pr16660-2.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/pr16660-2.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/pr16660-2.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } "*" "" } */
 
 #include "check.h"
 
Index: gcc/testsuite/gcc.dg/torture/stackalign/pr16660-3.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/pr16660-3.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/pr16660-3.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } "*" "" } */
 
 #include "check.h"
 
Index: gcc/testsuite/gcc.dg/torture/stackalign/ret-struct-1.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/ret-struct-1.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/ret-struct-1.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */
+/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } "*" "" } */
 
 #include "check.h"
 
Index: gcc/testsuite/gcc.dg/torture/stackalign/struct-1.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/struct-1.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/struct-1.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } "*" "" } */
+/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } "*" "" } */
 
 #include "check.h"
 
Index: gcc/testsuite/gcc.c-torture/compile/parms.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/parms.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/parms.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target alloca } */
 #define alloca __builtin_alloca
 
 x (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, x, y)

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [0/6] nvptx testsuite patches
@ 2014-10-21 14:13 Bernd Schmidt
  2014-10-21 14:13 ` [1/6] nvptx testsuite patches: alloca Bernd Schmidt
                   ` (7 more replies)
  0 siblings, 8 replies; 27+ messages in thread
From: Bernd Schmidt @ 2014-10-21 14:13 UTC (permalink / raw)
  To: GCC Patches

This series modifies a large number of tests in order to clean up 
testsuite results on nvptx. The goal here was never really to get an 
entirely clean run - the target is just too different from conventional 
ones - but to be able to test the compiler sufficiently to be sure that 
it's in good shape for use in offloading. Most of the patches here add 
annotations for use of features like alloca or indirect jumps that are 
unsupported on the target.

Examples of things that still cause failures are things like dots in 
identifiers, use of constructors (which is something I want to look 
into), certain constructs that trigger bugs in the ptxas tool, and lots 
of undefined C library functions.


Bernd

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [2/6] nvptx testsuite patches: typed assembly
  2014-10-21 14:13 [0/6] nvptx testsuite patches Bernd Schmidt
  2014-10-21 14:13 ` [1/6] nvptx testsuite patches: alloca Bernd Schmidt
@ 2014-10-21 14:19 ` Bernd Schmidt
  2014-10-21 15:22   ` Jeff Law
  2014-10-21 14:19 ` [3/6] nvptx testsuite patches: stdio Bernd Schmidt
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 27+ messages in thread
From: Bernd Schmidt @ 2014-10-21 14:19 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 339 bytes --]

Since everything in ptx assembly is typed, K&R C is problematic. There 
are a number of testcases that call functions with the wrong number of 
arguments, or arguments of the wrong type. I've added a new feature, 
untyped_assembly, which these tests now require. I've also used this for 
tests using builtin_apply/builtin_return.


Bernd


[-- Attachment #2: ts-untyped.diff --]
[-- Type: text/x-patch, Size: 22162 bytes --]

	gcc/testsuite/
	* lib/target-supports.exp
	(check_effective_target_untyped_assembly): New function.
	* gcc.c-torture/compile/20091215-1.c: Require untyped_assembly.
	* gcc.c-torture/compile/920917-1.c: Likewise.
	* gcc.c-torture/compile/930120-1.c: Likewise.
	* gcc.c-torture/compile/930411-1.c: Likewise.
	* gcc.c-torture/compile/930529-1.c: Likewise.
	* gcc.c-torture/compile/930623-1.c: Likewise.
	* gcc.c-torture/compile/950329-1.c: Likewise.
	* gcc.c-torture/compile/calls.c: Likewise.
	* gcc.c-torture/compile/pr37258.c: Likewise.
	* gcc.c-torture/compile/pr37327.c: Likewise.
	* gcc.c-torture/compile/pr38360.c: Likewise.
	* gcc.c-torture/compile/pr43635.c: Likewise.
	* gcc.c-torture/compile/pr47428.c: Likewise.
	* gcc.c-torture/compile/pr47967.c: Likewise.
	* gcc.c-torture/compile/pr49145.c: Likewise.
	* gcc.c-torture/compile/pr51694.c: Likewise.
	* gcc.c-torture/compile/pr53411.c: Likewise.
	* gcc.c-torture/execute/20001101.c: Likewise.
	* gcc.c-torture/execute/20051012-1.c: Likewise.
	* gcc.c-torture/execute/920501-1.c: Likewise.
	* gcc.c-torture/execute/921202-1.c: Likewise.
	* gcc.c-torture/execute/921208-2.c: Likewise.
	* gcc.c-torture/execute/call-trap-1.c: Likewise.
	* gcc.c-torture/compile/20010525-1.c: Likewise.
	* gcc.c-torture/compile/20021015-2.c: Likewise.
	* gcc.c-torture/compile/20031023-1.c: Likewise.
	* gcc.c-torture/compile/20031023-2.c: Likewise.
	* gcc.c-torture/compile/pr49206.c: Likewise.
	* gcc.c-torture/execute/pr47237.c: Likewise.
	* gcc.dg/torture/stackalign/builtin-apply-1.c: Likewise.
	* gcc.dg/torture/stackalign/builtin-apply-2.c: Likewise.
	* gcc.dg/torture/stackalign/builtin-apply-3.c: Likewise.
	* gcc.dg/torture/stackalign/builtin-apply-4.c: Likewise.
	* gcc.dg/torture/stackalign/builtin-return-1.c: Likewise.
	* gcc.dg/builtin-apply1.c: Likewise.
	* gcc.dg/builtin-apply2.c: Likewise.
	* gcc.dg/builtin-apply3.c: Likewise.
	* gcc.dg/builtin-apply4.c: Likewise.
	* gcc.dg/pr38338.c: Likewise.
	* gcc.dg/torture/pr41993.c: Likewise.
	* gcc.c-torture/compile/386.c: Likewise.
	* gcc.c-torture/compile/cmpsi386.c: Likewise.
	* gcc.c-torture/compile/consec.c: Likewise.
	* gcc.c-torture/compile/ex.c: Likewise.
	* gcc.c-torture/compile/pass.c: Likewise.
	* gcc.c-torture/compile/scal.c: Likewise.
	* gcc.c-torture/compile/uuarg.c: Likewise.
	* gcc.c-torture/compile/conv_tst.c: Likewise.

------------------------------------------------------------------------
Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp.orig
+++ gcc/testsuite/lib/target-supports.exp
@@ -604,6 +606,17 @@ proc add_options_for_tls { flags } {
     return $flags
 }
 
+# Return 1 if the assembler does not verify function types against
+# calls, 0 otherwise.  Such verification will typically show up problems
+# with K&R C function declarations.
+
+proc check_effective_target_untyped_assembly {} {
+    if { [istarget nvptx-*-*] } {
+	return 0
+    }
+    return 1
+}
+
 # Return 1 if alloca is supported, 0 otherwise.
 
 proc check_effective_target_alloca {} {
Index: gcc/testsuite/gcc.c-torture/compile/20091215-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/20091215-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/20091215-1.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target untyped_assembly } */
+
 void bar ();
 
 void
Index: gcc/testsuite/gcc.c-torture/compile/920917-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/920917-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/920917-1.c
@@ -1,2 +1,4 @@
+/* { dg-require-effective-target untyped_assembly } */
+
 inline f(x){switch(x){case 6:case 4:case 3:case 1:;}return x;}
 g(){f(sizeof("xxxxxx"));}
Index: gcc/testsuite/gcc.c-torture/compile/930120-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/930120-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/930120-1.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target untyped_assembly } */
 union {
   short I[2];
   long int L;
Index: gcc/testsuite/gcc.c-torture/compile/930411-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/930411-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/930411-1.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target untyped_assembly } */
+
 int heap;
 
 g(){}
Index: gcc/testsuite/gcc.c-torture/compile/930529-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/930529-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/930529-1.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target untyped_assembly } */
+
 struct r
 {
   int d1, d2;
Index: gcc/testsuite/gcc.c-torture/compile/930623-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/930623-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/930623-1.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target untyped_assembly } */
+
 g (a, b) {}
 
 f (xx)
Index: gcc/testsuite/gcc.c-torture/compile/950329-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/950329-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/950329-1.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target untyped_assembly } */
 f ()
 {
   int i;
Index: gcc/testsuite/gcc.c-torture/compile/calls.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/calls.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/calls.c
@@ -1,4 +1,6 @@
 /* { dg-require-effective-target ptr32plus } */
+/* { dg-require-effective-target untyped_assembly } */
+
 typedef void  *(*T)(void);
 f1 ()
 {
Index: gcc/testsuite/gcc.c-torture/compile/pr37258.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr37258.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr37258.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target untyped_assembly } */
 typedef signed char int8_t;
 typedef short int int16_t;
 typedef int int32_t;
Index: gcc/testsuite/gcc.c-torture/compile/pr37327.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr37327.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr37327.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target untyped_assembly } */
 typedef signed char int8_t;
 typedef short int int16_t;
 typedef int int32_t;
Index: gcc/testsuite/gcc.c-torture/compile/pr38360.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr38360.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr38360.c
@@ -1,4 +1,5 @@
 /* PR middle-end/38360 */
+/* { dg-require-effective-target untyped_assembly } */
 
 int
 main ()
Index: gcc/testsuite/gcc.c-torture/compile/pr43635.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr43635.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr43635.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target untyped_assembly } */
 extern void d (void);
 
 void (*foo (void)) (float)
Index: gcc/testsuite/gcc.c-torture/compile/pr47428.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr47428.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr47428.c
@@ -1,4 +1,5 @@
 /* PR tree-optimization/47428 */
+/* { dg-require-effective-target untyped_assembly } */
 
 struct S
 {
Index: gcc/testsuite/gcc.c-torture/compile/pr47967.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr47967.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr47967.c
@@ -1,4 +1,5 @@
 /* PR tree-optimization/47967 */
+/* { dg-require-effective-target untyped_assembly } */
 
 extern void abort (void);
 static void bar ();
Index: gcc/testsuite/gcc.c-torture/compile/pr49145.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr49145.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr49145.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target untyped_assembly } */
 static int
 func1 (int a, int b)
 {
Index: gcc/testsuite/gcc.c-torture/compile/pr51694.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr51694.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr51694.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target untyped_assembly } */
 void
 foo (x, fn)
   void (*fn) ();
Index: gcc/testsuite/gcc.c-torture/compile/pr53411.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr53411.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr53411.c
@@ -1,4 +1,5 @@
 /* PR middle-end/53411 */
+/* { dg-require-effective-target untyped_assembly } */
 
 int a, b, c, d, e, f, g, h;
 void fn1 (void);
Index: gcc/testsuite/gcc.c-torture/execute/20001101.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20001101.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20001101.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target untyped_assembly } */
 extern void abort(void);
 			 
 typedef struct
Index: gcc/testsuite/gcc.c-torture/execute/20051012-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20051012-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20051012-1.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target untyped_assembly } */
 extern void abort (void);
 
 struct type 
Index: gcc/testsuite/gcc.c-torture/execute/920501-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/920501-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/920501-1.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target untyped_assembly } */
 int s[2];
 x(){if(!s[0]){s[1+s[1]]=s[1];return 1;}}
 main(){s[0]=s[1]=0;if(x(0)!=1)abort();exit(0);}
Index: gcc/testsuite/gcc.c-torture/execute/921202-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/921202-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/921202-1.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target untyped_assembly } */
 #ifndef STACK_SIZE
 #define	VLEN	2055
 #else
Index: gcc/testsuite/gcc.c-torture/execute/921208-2.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/921208-2.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/921208-2.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target untyped_assembly } */
 #define STACK_REQUIREMENT (100000 * 4 + 1024)
 #if defined (STACK_SIZE) && STACK_SIZE < STACK_REQUIREMENT
 main () { exit (0); }
Index: gcc/testsuite/gcc.c-torture/execute/call-trap-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/call-trap-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/call-trap-1.c
@@ -2,6 +2,7 @@
    type does not appear until after the function designator and
    arguments have been evaluated.  PR 38483.  */
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-require-effective-target untyped_assembly } */
 
 extern void exit (int);
 extern void abort (void);
Index: gcc/testsuite/gcc.c-torture/compile/20010525-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/20010525-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/20010525-1.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target untyped_assembly } */
 static int kind_varread(char *str)
 {
   if (0 == memcmp("%_#",               str, 3))  return 2;
Index: gcc/testsuite/gcc.c-torture/compile/20021015-2.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/20021015-2.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/20021015-2.c
@@ -1,4 +1,5 @@
 /* PR target/8232.  */
+/* { dg-require-effective-target untyped_assembly } */
 
 int f (char *p, char *q, int i)
 {
Index: gcc/testsuite/gcc.c-torture/compile/20031023-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/20031023-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/20031023-1.c
@@ -1,3 +1,5 @@
+/* Declaration of the frame size doesn't work on ptx.  */
+/* { dg-require-effective-target untyped_assembly } */
 #ifndef ASIZE
 # define ASIZE 0x10000000000UL
 #endif
Index: gcc/testsuite/gcc.c-torture/compile/20031023-2.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/20031023-2.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/20031023-2.c
@@ -1,2 +1,4 @@
+/* Declaration of the frame size doesn't work on ptx.  */
+/* { dg-require-effective-target untyped_assembly } */
 #define ASIZE 0x1000000000UL
 #include "20031023-1.c"
Index: gcc/testsuite/gcc.c-torture/compile/20031023-3.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/20031023-3.c.orig
7+++ gcc/testsuite/gcc.c-torture/compile/20031023-3.c
@@ -1,2 +1,4 @@
+/* Declaration of the frame size doesn't work on ptx.  */
+/* { dg-require-effective-target untyped_assembly } */
 #define ASIZE 0x100000000UL
 #include "20031023-1.c"
Index: gcc/testsuite/gcc.c-torture/compile/pr49206.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr49206.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr49206.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target untyped_assembly } */
 struct S1
 {
   short f0;
Index: gcc/testsuite/gcc.c-torture/execute/pr47237.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/pr47237.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/pr47237.c
@@ -1,4 +1,5 @@
 /* { dg-xfail-if "can cause stack underflow" { nios2-*-* } "*" "" } */
+/* { dg-require-effective-target untyped_assembly } */
 #define INTEGER_ARG  5
 
 extern void abort(void);
Index: gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-1.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-1.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-1.c
@@ -1,5 +1,6 @@
 /* PR 11184 */
 /* Origin:  Dara Hazeghi <dhazeghi@yahoo.com> */
+/* { dg-require-effective-target untyped_assembly } */
 
 void *
 objc_msg_sendv (char * arg_frame, void (*foo)())
Index: gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-2.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-2.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-2.c
@@ -11,6 +11,7 @@
         do.  */
 /* { dg-skip-if "Variadic funcs use different argument passing from normal funcs" { arm_hf_eabi || { avr-*-* } } "*" "" } */
 /* { dg-skip-if "Variadic funcs have all args on stack. Normal funcs have args in registers." { nds32*-*-* } "*" "" } */
+/* { dg-require-effective-target untyped_assembly } */
    
 
 #define INTEGER_ARG  5
Index: gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-3.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-3.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-3.c
@@ -5,6 +5,7 @@
    to the right location by __builtin_apply after the direct call.  */
 
 /* { dg-do run } */
+/* { dg-require-effective-target untyped_assembly } */
 
 
 #define INTEGER_ARG  5
Index: gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-4.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-4.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-4.c
@@ -1,6 +1,7 @@
 /* PR tree-optimization/20076 */
 /* { dg-do run } */
 /* { dg-additional-options "-fgnu89-inline" } */
+/* { dg-require-effective-target untyped_assembly } */
 
 extern void abort (void);
 
Index: gcc/testsuite/gcc.dg/builtin-apply1.c
===================================================================
--- gcc/testsuite/gcc.dg/builtin-apply1.c.orig
+++ gcc/testsuite/gcc.dg/builtin-apply1.c
@@ -1,5 +1,6 @@
 /* PR 11184 */
 /* Origin:  Dara Hazeghi <dhazeghi@yahoo.com> */
+/* { dg-require-effective-target untyped_assembly } */
 
 void *
 objc_msg_sendv (char * arg_frame, void (*foo)())
Index: gcc/testsuite/gcc.dg/builtin-apply2.c
===================================================================
--- gcc/testsuite/gcc.dg/builtin-apply2.c.orig
+++ gcc/testsuite/gcc.dg/builtin-apply2.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-require-effective-target untyped_assembly } */
 /* { dg-skip-if "Variadic funcs have all args on stack. Normal funcs have args in registers." { "aarch64*-*-* avr-*-* nds32*-*-*" } { "*" } { "" } } */
 /* { dg-skip-if "Variadic funcs use Base AAPCS.  Normal funcs use VFP variant." { arm*-*-* && arm_hf_eabi } { "*" } { "" } } */
 
Index: gcc/testsuite/gcc.dg/builtin-apply3.c
===================================================================
--- gcc/testsuite/gcc.dg/builtin-apply3.c.orig
+++ gcc/testsuite/gcc.dg/builtin-apply3.c
@@ -5,6 +5,7 @@
    to the right location by __builtin_apply after the direct call.  */
 
 /* { dg-do run } */
+/* { dg-require-effective-target untyped_assembly } */
 
 
 #define INTEGER_ARG  5
Index: gcc/testsuite/gcc.dg/builtin-apply4.c
===================================================================
--- gcc/testsuite/gcc.dg/builtin-apply4.c.orig
+++ gcc/testsuite/gcc.dg/builtin-apply4.c
@@ -2,6 +2,7 @@
 /* { dg-options "-O2 -Wmissing-noreturn -fgnu89-inline" } */
 /* { dg-options "-O2 -mno-mmx" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
 /* { dg-do run } */
+/* { dg-require-effective-target untyped_assembly } */
 
 extern void abort (void);
 
Index: gcc/testsuite/gcc.dg/pr38338.c
===================================================================
--- gcc/testsuite/gcc.dg/pr38338.c.orig
+++ gcc/testsuite/gcc.dg/pr38338.c
@@ -1,6 +1,7 @@
 /* PR middle-end/38338 */
 /* { dg-options "-O0" } */
 /* { dg-options "-O0 -fPIC" { target fpic } } */
+/* { dg-require-effective-target untyped_assembly } */
 
 typedef void (*fnp) (void);
 
Index: gcc/testsuite/gcc.dg/torture/stackalign/builtin-return-1.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/builtin-return-1.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/builtin-return-1.c
@@ -1,6 +1,7 @@
 /* PR middle-end/11151 */
 /* Originator: Andrew Church <gcczilla@achurch.org> */
 /* { dg-do run } */
+/* { dg-require-effective-target untyped_assembly } */
 
 /* This used to fail on SPARC because the (undefined) return
    value of 'bar' was overwriting that of 'foo'.  */
Index: gcc/testsuite/gcc.dg/torture/pr41993.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/pr41993.c.orig
+++ gcc/testsuite/gcc.dg/torture/pr41993.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-mavx -mvzeroupper" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-require-effective-target untyped_assembly } */
 
 short retframe_short (void *rframe)
 {
Index: gcc/testsuite/gcc.c-torture/compile/386.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/386.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/386.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target untyped_assembly } */
 foo (a, p)
      int *p;
 {
Index: gcc/testsuite/gcc.c-torture/compile/cmpsi386.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/cmpsi386.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/cmpsi386.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target untyped_assembly } */
 foo (a, p)
      register int a;
      int *p;
Index: gcc/testsuite/gcc.c-torture/compile/consec.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/consec.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/consec.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target untyped_assembly } */
 int glob;
 
 conseq (a, b, c, d)
Index: gcc/testsuite/gcc.c-torture/compile/ex.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/ex.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/ex.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target untyped_assembly } */
+
 foo (a, b)
 {
   if ((a & (1 << b)) == 0)
Index: gcc/testsuite/gcc.c-torture/compile/pass.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pass.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pass.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target untyped_assembly } */
 int
 foo (a, b, c)
 {
Index: gcc/testsuite/gcc.c-torture/compile/scal.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/scal.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/scal.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target untyped_assembly } */
 int g1, g2;
 
 void
Index: gcc/testsuite/gcc.c-torture/compile/uuarg.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/uuarg.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/uuarg.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target untyped_assembly } */
 foo (a, b, c, d, e, f, g, h, i)
 {
   return foo () + i;
Index: gcc/testsuite/gcc.c-torture/compile/conv_tst.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/conv_tst.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/conv_tst.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target untyped_assembly } */
+
 #define ID_1 2400000000.0
 #define ID_2 1.7
 #define ID_3 -1.7

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [3/6] nvptx testsuite patches: stdio
  2014-10-21 14:13 [0/6] nvptx testsuite patches Bernd Schmidt
  2014-10-21 14:13 ` [1/6] nvptx testsuite patches: alloca Bernd Schmidt
  2014-10-21 14:19 ` [2/6] nvptx testsuite patches: typed assembly Bernd Schmidt
@ 2014-10-21 14:19 ` Bernd Schmidt
  2014-10-21 15:24   ` Jeff Law
  2014-10-21 19:28   ` Mike Stump
  2014-10-21 14:22 ` [4/6] nvptx testsuite patches: xfails and skips Bernd Schmidt
                   ` (4 subsequent siblings)
  7 siblings, 2 replies; 27+ messages in thread
From: Bernd Schmidt @ 2014-10-21 14:19 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 406 bytes --]

Some tests use stdio functions which are unavaiable with the cut-down 
newlib I'm using for ptx testing. I'm somewhat uncertain what to do with 
these; they are by no means the only unavailable library functions the 
testsuite tries to use (signal is another example). Here's a patch which 
deals with parts of the problem, but I wouldn't mind leaving this one 
out if it doesn't seem worthwhile.


Bernd


[-- Attachment #2: ts-stdio.diff --]
[-- Type: text/x-patch, Size: 5508 bytes --]

	gcc/testsuite/
	* lib/target-supports.exp (check_effective_target_stdio): New
	function.
	* gcc.c-torture/execute/gofast.c (fail): Don't fprintf on nvptx.
	* gcc.dg/torture/matrix-1.c: Require stdio.
	* gcc.dg/torture/matrix-2.c: Require stdio.
	* gcc.dg/torture/matrix-5.c: Require stdio.
	* gcc.dg/torture/matrix-6.c: Require stdio.
	* gcc.dg/torture/transpose-1.c: Require stdio.
	* gcc.dg/torture/transpose-2.c: Require stdio.
	* gcc.dg/torture/transpose-3.c: Require stdio.
	* gcc.dg/torture/transpose-4.c: Require stdio.
	* gcc.dg/torture/transpose-5.c: Require stdio.
	* gcc.dg/torture/transpose-6.c: Require stdio.

------------------------------------------------------------------------
Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp.orig
+++ gcc/testsuite/lib/target-supports.exp
@@ -604,6 +606,15 @@ proc add_options_for_tls { flags } {
     return $flags
 }
 
+# Return 1 if the C library on this target has stdio support, 0 otherwise.
+
+proc check_effective_target_stdio {} {
+    if { [istarget nvptx-*-*] } {
+	return 0
+    }
+    return 1
+}
+
 # Return 1 if the assembler does not verify function types against
 # calls, 0 otherwise.  Such verification will typically show up problems
 # with K&R C function declarations.
Index: gcc/testsuite/gcc.c-torture/execute/gofast.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/gofast.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/gofast.c
@@ -48,7 +48,9 @@ int
 fail (char *msg)
 {
   fail_count++;
+#ifndef __nvptx__
   fprintf (stderr, "Test failed: %s\n", msg);
+#endif
 }
 
 int
Index: gcc/testsuite/gcc.dg/torture/matrix-1.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/matrix-1.c.orig
+++ gcc/testsuite/gcc.dg/torture/matrix-1.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-fwhole-program" } */
+/* { dg-require-effective-target stdio } */
 
 #include <stdio.h>
 #include <stdlib.h>
Index: gcc/testsuite/gcc.dg/torture/matrix-2.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/matrix-2.c.orig
+++ gcc/testsuite/gcc.dg/torture/matrix-2.c
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-fwhole-program" } */
-
+/* { dg-require-effective-target stdio } */
 
 #include <stdio.h>
 #include <stdlib.h>
Index: gcc/testsuite/gcc.dg/torture/matrix-5.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/matrix-5.c.orig
+++ gcc/testsuite/gcc.dg/torture/matrix-5.c
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-fwhole-program" } */
-
+/* { dg-require-effective-target stdio } */
 
 #include <stdio.h>
 #include <stdlib.h>
Index: gcc/testsuite/gcc.dg/torture/matrix-6.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/matrix-6.c.orig
+++ gcc/testsuite/gcc.dg/torture/matrix-6.c
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-fwhole-program" } */
-
+/* { dg-require-effective-target stdio } */
 
 #include <stdio.h>
 #include <stdlib.h>
Index: gcc/testsuite/gcc.dg/torture/transpose-1.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/transpose-1.c.orig
+++ gcc/testsuite/gcc.dg/torture/transpose-1.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-fwhole-program" } */
+/* { dg-require-effective-target stdio } */
 
 #include <stdio.h>
 #include <stdlib.h>
Index: gcc/testsuite/gcc.dg/torture/transpose-2.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/transpose-2.c.orig
+++ gcc/testsuite/gcc.dg/torture/transpose-2.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-fwhole-program" } */
+/* { dg-require-effective-target stdio } */
 
 #include <stdio.h>
 #include <stdlib.h>
Index: gcc/testsuite/gcc.dg/torture/transpose-3.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/transpose-3.c.orig
+++ gcc/testsuite/gcc.dg/torture/transpose-3.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-fwhole-program" } */
+/* { dg-require-effective-target stdio } */
 
 #include <stdio.h>
 #include <stdlib.h>
Index: gcc/testsuite/gcc.dg/torture/transpose-4.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/transpose-4.c.orig
+++ gcc/testsuite/gcc.dg/torture/transpose-4.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-fwhole-program" } */
+/* { dg-require-effective-target stdio } */
 
 #include <stdio.h>
 #include <stdlib.h>
Index: gcc/testsuite/gcc.dg/torture/transpose-5.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/transpose-5.c.orig
+++ gcc/testsuite/gcc.dg/torture/transpose-5.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-fwhole-program" } */
+/* { dg-require-effective-target stdio } */
 
 #include <stdio.h>
 #include <stdlib.h>
Index: gcc/testsuite/gcc.dg/torture/transpose-6.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/transpose-6.c.orig
+++ gcc/testsuite/gcc.dg/torture/transpose-6.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-fwhole-program" } */
+/* { dg-require-effective-target stdio } */
 
 #include <stdio.h>
 #include <stdlib.h>

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [4/6] nvptx testsuite patches: xfails and skips
  2014-10-21 14:13 [0/6] nvptx testsuite patches Bernd Schmidt
                   ` (2 preceding siblings ...)
  2014-10-21 14:19 ` [3/6] nvptx testsuite patches: stdio Bernd Schmidt
@ 2014-10-21 14:22 ` Bernd Schmidt
  2014-10-21 15:30   ` Jeff Law
  2014-10-21 14:27 ` [5/6] nvptx testsuite patches: jumps and labels Bernd Schmidt
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 27+ messages in thread
From: Bernd Schmidt @ 2014-10-21 14:22 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 184 bytes --]

Some things don't fit into nice categories that apply to a larger set of 
tests, or which are somewhat random like ptxas tool failures. For these 
I've added xfails and skips.


Bernd

[-- Attachment #2: ts-xfails.diff --]
[-- Type: text/x-patch, Size: 14024 bytes --]


	gcc/testsuite/
	* lib/target-supports.exp (check_effective_target_trampolines,
	check_profiling_available, check_effective_target_lto,
	check_effective_target_vect_natural): False for nvptx-*-*.
	* gcc.c-torture/compile/limits-fndefn.c: Skip for nvptx-*-*.
	* gcc.c-torture/compile/pr34334.c: Likewise.
	* gcc.c-torture/compile/pr37056.c: Likewise.
	* gcc.c-torture/compile/pr39423-1.c: Likewise.
	* gcc.c-torture/compile/pr46534.c: Likewise.
	* gcc.c-torture/compile/pr49049.c: Likewise.
	* gcc.c-torture/compile/pr59417.c: Likewise.
	* gcc.c-torture/compile/20080721-1.c: Likewise.
	* gcc.c-torture/compile/920501-4.c: Likewise.
	* gcc.c-torture/compile/921011-1.c: Likewise.	
	* gcc.dg/20040813-1.c: Likewise.
	* gcc.dg/pr28755.c: Likewise.
	* gcc.dg/pr44194-1.c: Likewise.
	* gcc.c-torture/compile/pr42717.c: Xfail for nvptx-*-*.
	* gcc.c-torture/compile/pr61684.c: Likewise.
	* gcc.c-torture/compile/pr20601-1.c: Likewise.
	* gcc.c-torture/compile/pr59221.c: Likewise.
	* gcc.c-torture/compile/20060208-1.c: Likewise.
	* gcc.c-torture/execute/pr52129.c: Likewise.
	* gcc.c-torture/execute/20020310-1.c: Likewise.
	* gcc.c-torture/execute/20101011-1.c: Define DO_TEST to 0 for nvptx.
	* gcc.c-torture/execute20020312-2.c: Add case for for nvptx.
	* gcc.c-torture/compile/pr60655-1.c: Don't add -fdata-sections
	for nvptx-*-*.
	* gcc.dg/pr36400.c: Xfail scan-assembler test on nvptx-*-*.
	* gcc.dg/const-elim-2.c: Likewise.

------------------------------------------------------------------------
Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp.orig
+++ gcc/testsuite/lib/target-supports.exp
@@ -436,6 +436,7 @@ proc check_effective_target_trampolines
     }
     if { [istarget avr-*-*]
 	 || [istarget msp430-*-*]
+	 || [istarget nvptx-*-*]
 	 || [istarget hppa2.0w-hp-hpux11.23]
 	 || [istarget hppa64-hp-hpux11.23] } {
 	return 0;
@@ -532,6 +533,7 @@ proc check_profiling_available { test_wh
 	     || [istarget msp430-*-*]
 	     || [istarget nds32*-*-elf]
 	     || [istarget nios2-*-elf]
+	     || [istarget nvptx-*-*]
 	     || [istarget powerpc-*-eabi*]
 	     || [istarget powerpc-*-elf]
 	     || [istarget rx-*-*]	
@@ -4216,7 +4218,8 @@ proc check_effective_target_vect_natural
         verbose "check_effective_target_vect_natural_alignment: using cached result" 2
     } else {
         set et_vect_natural_alignment_saved 1
-        if { [check_effective_target_arm_eabi] } {
+        if { [check_effective_target_arm_eabi]
+	     || [istarget nvptx-*-*] } {
             set et_vect_natural_alignment_saved 0
         }
     }
@@ -5691,6 +5694,9 @@ proc check_effective_target_gld { } {
 
 proc check_effective_target_lto { } {
     global ENABLE_LTO
+    if { [istarget nvptx-*-*] } {
+	return 0;
+    }
     return [info exists ENABLE_LTO]
 }
 
Index: gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c
@@ -1,4 +1,5 @@
 /* { dg-skip-if "too complex for avr" { avr-*-* } { "*" } { "" } } */
+/* { dg-skip-if "ptxas times out" { nvptx-*-* } { "*" } { "" } } */
 /* { dg-timeout-factor 4.0 } */
 #define LIM1(x) x##0, x##1, x##2, x##3, x##4, x##5, x##6, x##7, x##8, x##9,
 #define LIM2(x) LIM1(x##0) LIM1(x##1) LIM1(x##2) LIM1(x##3) LIM1(x##4) \
Index: gcc/testsuite/gcc.c-torture/compile/pr60655-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr60655-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr60655-1.c
@@ -1,4 +1,4 @@
-/* { dg-options "-fdata-sections" { target { ! { { hppa*-*-hpux* } && { ! lp64 } } } } } */
+/* { dg-options "-fdata-sections" { target { { ! { { hppa*-*-hpux* } && { ! lp64 } } } && { ! nvptx-*-* } } } } */
 
 typedef unsigned char unit;
 typedef unit *unitptr;
Index: gcc/testsuite/gcc.c-torture/compile/pr34334.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr34334.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr34334.c
@@ -1,3 +1,4 @@
+/* { dg-skip-if "ptxas times out" { nvptx-*-* } { "*" } { "-O0" } } */
 __extension__ typedef __SIZE_TYPE__ size_t;
 __extension__ typedef long long int __quad_t;
 __extension__ typedef unsigned int __mode_t;
Index: gcc/testsuite/gcc.c-torture/compile/pr37056.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr37056.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr37056.c
@@ -1,3 +1,4 @@
+/* { dg-skip-if "ptxas times out" { nvptx-*-* } { "-O2" "-Os" } { "" } } */
 extern void abort (void);
 
 static union {
Index: gcc/testsuite/gcc.c-torture/compile/pr39423-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr39423-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr39423-1.c
@@ -1,4 +1,5 @@
 /* PR target/39423 */
+/* { dg-skip-if "ptxas times out" { nvptx-*-* } { "-O2" } { "" } } */
 
 int
 foo (const char *name, int nmlen, char *flags)
Index: gcc/testsuite/gcc.c-torture/compile/pr42717.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr42717.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr42717.c
@@ -1,3 +1,4 @@
+/* { dg-xfail-if "ptxas crashes" { nvptx-*-* } { "-O0" } { "" } } */
 static signed char
 foo (signed char si1, unsigned char si2)
 {
Index: gcc/testsuite/gcc.c-torture/compile/pr46534.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr46534.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr46534.c
@@ -1,4 +1,4 @@
-/* { dg-skip-if "too big" { avr-*-* pdp11-*-* } { "*" } { "" } } */
+/* { dg-skip-if "too big" { avr-*-* nvptx-*-* pdp11-*-* } { "*" } { "" } } */
 /* PR middle-end/46534 */
 
 extern int printf (const char *, ...);
Index: gcc/testsuite/gcc.c-torture/compile/pr49049.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr49049.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr49049.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "ptxas times out" { nvptx-*-* } { "-Os" } { "" } } */
+
 __extension__ typedef unsigned long long int uint64_t;
 
 static int
Index: gcc/testsuite/gcc.c-torture/compile/pr59417.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr59417.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr59417.c
@@ -1,4 +1,5 @@
 /* PR tree-optimization/59417 */
+/* { dg-skip-if "ptxas times out" { nvptx-*-* } { "-O1" "-O2" "-Os" } { "" } } */
 
 int a, b, d;
 short c;
Index: gcc/testsuite/gcc.c-torture/compile/pr61684.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr61684.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr61684.c
@@ -1,4 +1,5 @@
 /* PR tree-optimization/61684 */
+/* { dg-xfail-if "ptxas crashes" { nvptx-*-* } { "*" } { "-O0" "-O1" "-Os" } } */
 
 int a, c;
 static int *b = 0;
Index: gcc/testsuite/gcc.c-torture/execute/pr20601-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/pr20601-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/pr20601-1.c
@@ -1,4 +1,5 @@
 /* PR tree-optimization/20601 */
+/* { dg-xfail-if "ptxas crashes" { nvptx-*-* } { "-O1" } { "" } } */
 extern void abort (void);
 extern void exit (int);
 
Index: gcc/testsuite/gcc.c-torture/execute/pr59221.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/pr59221.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/pr59221.c
@@ -1,3 +1,4 @@
+/* { dg-xfail-if "ptxas crashes" { nvptx-*-* } { "*" } { "-O0" "-Os" } } */
 
 
 int a = 1, b, d;
Index: gcc/testsuite/gcc.c-torture/compile/20060208-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/20060208-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/20060208-1.c
@@ -1,4 +1,5 @@
 /* PR middle-end/26092 */
+/* { dg-skip-if "can't take address of malloc" { nvptx-*-* } { "*" } { "" } } */
 typedef __SIZE_TYPE__ size_t;
 extern void *malloc (size_t);
 
Index: gcc/testsuite/gcc.c-torture/compile/20080721-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/20080721-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/20080721-1.c
@@ -1,3 +1,4 @@
+/* { dg-skip-if "can't read function data" { nvptx-*-* } { "*" } { "" } } */
 void foo(void);
 void bar(void);
 
Index: gcc/testsuite/gcc.c-torture/compile/920501-4.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/920501-4.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/920501-4.c
@@ -1,4 +1,5 @@
 /* { dg-do assemble } */
+/* { dg-skip-if "ptxas times out" { nvptx-*-* } { "-O1" } { "" } } */
 
 foo ()
 {
Index: gcc/testsuite/gcc.c-torture/compile/921011-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/921011-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/921011-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "ptxas times out" { nvptx-*-* } { "-O1" } { "" } } */
+
 void
 fun (nb)
      int nb;
Index: gcc/testsuite/gcc.c-torture/execute/20101011-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20101011-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20101011-1.c
@@ -71,6 +71,9 @@ __aeabi_idiv0 (int return_value)
   /* Nios II requires both hardware support and user configuration to
      raise an exception on divide by zero.  */
 # define DO_TEST 0
+#elif defined (__nvptx__)
+/* There isn't even a signal function.  */
+# define DO_TEST 0
 #else
 # define DO_TEST 1
 #endif
Index: gcc/testsuite/gcc.c-torture/execute/pr52129.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/pr52129.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/pr52129.c
@@ -1,4 +1,5 @@
 /* PR target/52129 */
+/* { dg-xfail-if "ptxas crashes" { nvptx-*-* } { "-O1" } { "" } } */
 
 extern void abort (void);
 struct S { void *p; unsigned int q; };
Index: gcc/testsuite/gcc.dg/20020310-1.c
===================================================================
--- gcc/testsuite/gcc.dg/20020310-1.c.orig
+++ gcc/testsuite/gcc.dg/20020310-1.c
@@ -3,6 +3,7 @@
 /* { dg-do run } */
 /* { dg-options "-O2" } */
 /* { dg-options "-O2 -mtune=i586" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
+/* { dg-xfail-if "doesn't support self-referential initializers" { nvptx-*-* } } */
 
 struct A
 {
Index: gcc/testsuite/gcc.dg/20020312-2.c
===================================================================
--- gcc/testsuite/gcc.dg/20020312-2.c.orig
+++ gcc/testsuite/gcc.dg/20020312-2.c
@@ -104,6 +104,8 @@ extern void abort (void);
 /* No pic register.  */
 #elif defined(__MSP430__)
 /* No pic register.  */
+#elif defined (__nvptx__)
+/* No pic register.  */
 #else
 # error "Modify the test for your target."
 #endif
Index: gcc/testsuite/gcc.dg/20040813-1.c
===================================================================
--- gcc/testsuite/gcc.dg/20040813-1.c.orig
+++ gcc/testsuite/gcc.dg/20040813-1.c
@@ -2,7 +2,7 @@
 /* Contributed by Devang Patel  <dpatel@apple.com>  */
 
 /* { dg-do compile } */
-/* { dg-skip-if "No stabs" { aarch64*-*-* mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* tile*-*-* nios2-*-* *-*-vxworks* } { "*" } { "" } } */
+/* { dg-skip-if "No stabs" { aarch64*-*-* mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* tile*-*-* nios2-*-* *-*-vxworks* nvptx-*-* } { "*" } { "" } } */
 /* { dg-options "-gstabs" } */
 
 int
Index: gcc/testsuite/gcc.dg/pr28755.c
===================================================================
--- gcc/testsuite/gcc.dg/pr28755.c.orig
+++ gcc/testsuite/gcc.dg/pr28755.c
@@ -3,6 +3,7 @@
 /* { dg-require-effective-target ptr32plus } */
 /* { dg-options "-Os" } */
 /* { dg-final { scan-assembler-times "2112543726\|7deadbee" 2 } } */
+/* { dg-skip-if "integer output is different here" { nvptx-*-* } } */
 
 struct S
 {
Index: gcc/testsuite/gcc.dg/pr44194-1.c
===================================================================
--- gcc/testsuite/gcc.dg/pr44194-1.c.orig
+++ gcc/testsuite/gcc.dg/pr44194-1.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { { { { { { { i?86-*-* x86_64-*-* } && x32 } || lp64 } && { ! s390*-*-* } } && { ! hppa*64*-*-* } } && { ! alpha*-*-* } } && { { ! powerpc*-*-linux* } || powerpc_elfv2 } } } } */
+/* { dg-do compile { target { { { { { { { i?86-*-* x86_64-*-* } && x32 } || lp64 } && { ! s390*-*-* } } && { ! hppa*64*-*-* } } && { ! alpha*-*-* } } && { { ! powerpc*-*-linux* } || powerpc_elfv2 } && { ! nvptx-*-* } } } } */
 /* { dg-options "-O2 -fdump-rtl-dse1 -fdump-rtl-final" } */
 
 /* Restrict to 64-bit targets since 32-bit targets usually return small
Index: gcc/testsuite/gcc.dg/torture/pr36400.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/pr36400.c.orig
+++ gcc/testsuite/gcc.dg/torture/pr36400.c
@@ -14,4 +14,4 @@ void baz()
   barptr->some_string = "Everything OK";
 }
 
-/* { dg-final { scan-assembler "Everything OK" } } */
+/* { dg-final { scan-assembler "Everything OK" { xfail nvptx-*-* } } } */
Index: gcc/testsuite/gcc.dg/const-elim-2.c
===================================================================
--- gcc/testsuite/gcc.dg/const-elim-2.c.orig
+++ gcc/testsuite/gcc.dg/const-elim-2.c
@@ -1,7 +1,7 @@
 /* The string constant in this test case should be emitted exactly once.  */
 /* { dg-do compile } */
 /* { dg-options "-O2" } */
-/* { dg-final { scan-assembler-times "hi there" 1 } } */
+/* { dg-final { scan-assembler-times "hi there" 1 { xfail nvptx-*-* } } } */
 
 static inline int returns_23() { return 23; }
 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [5/6] nvptx testsuite patches: jumps and labels
  2014-10-21 14:13 [0/6] nvptx testsuite patches Bernd Schmidt
                   ` (3 preceding siblings ...)
  2014-10-21 14:22 ` [4/6] nvptx testsuite patches: xfails and skips Bernd Schmidt
@ 2014-10-21 14:27 ` Bernd Schmidt
  2014-10-21 15:31   ` Jeff Law
  2014-10-21 14:30 ` [6/7] Random tweaks Bernd Schmidt
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 27+ messages in thread
From: Bernd Schmidt @ 2014-10-21 14:27 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 324 bytes --]

This deals with tests requiring indirect jumps (including tests using 
setjmp), label values, and nonlocal goto.

A subset of these tests uses the NO_LABEL_VALUES macro, but it's not 
consistent across the testsuite. The feature test I wrote tests whether 
that is defined and returns false for label_values if so.


Bernd


[-- Attachment #2: ts-jumps-labels.diff --]
[-- Type: text/x-patch, Size: 34119 bytes --]

	gcc/testsuite/
	* lib/target-supports.exp (check_effective_target_indirect_jumps):
	New function.
	(check_effective_target_nonlocal_goto): New function.
	(check_effective_target_label_values): New function.
	* gcc.c-torture/execute/20071220-2.c: Require label_values.
	* gcc.c-torture/compile/labels-2.c: Likewise.
	* gcc.c-torture/compile/20000518-1.c: Likewise.
	* gcc.c-torture/compile/20021108-1.c: Likewise.
	* gcc.c-torture/compile/981006-1.c: Likewise.
	* gcc.c-torture/execute/20040302-1.c: Likewise.
	* gcc.dg/torture/pr33848.c: Likewise.

	* gcc.c-torture/compile/pr46107.c: Require indirect jumps and
	label values.
	* gcc.c-torture/compile/pr32919.c: Likewise.
	* gcc.c-torture/compile/pr17913.c: Likewise.
	* gcc.c-torture/compile/pr51495.c: Likewise.
	* gcc.c-torture/compile/pr25224.c: Likewise.
	* gcc.c-torture/compile/labels-3.c: Likewise.
	* gcc.c-torture/compile/pr27863.c: Likewise.
	* gcc.c-torture/compile/20050510-1.c: Likewise.
	* gcc.c-torture/compile/pr28489.c: Likewise.
	* gcc.c-torture/compile/pr29128.c: Likewise.
	* gcc.c-torture/compile/pr21356: Likewise.
	* gcc.c-torture/execute/20071210-1.c: Likewise.
	* gcc.c-torture/execute/200701220-1.c: Likewise.
	* gcc.c-torture/execute/pr51447.c: Likewise.
	* gcc.c-torture/execute/comp-goto-1.c: Likewise.
	* gcc.c-torture/execute/comp-goto-2.c: Likewise.
	* gcc.dg/20021029-1.c: Likewise.
	* gcc.dg/pr43379.c: Likewise.
	* gcc.dg/pr45259.c: Likewise.
	* gcc.dg/torture/pr53695.c: Likewise.
	* gcc.dg/torture/pr57584.c: Likewise.

	* gcc.c-torture/execute/980526-1.c: Skip if -O0 and neither label_values
	or indirect_jumps are available.
	* gcc.c-torture/compile/920415-1.c: Likewise.  Remove NO_LABEL_VALUES
	test.
	* gcc.c-torture/compile/920428-3.c: Likewise.
	* gcc.c-torture/compile/950613-1.c: Likewise.

	* gcc.c-torture/compile/pr30984.c: Require indirect jumps.
	* gcc.c-torture/compile/991213-3.c: Likewise.
	* gcc.c-torture/compile/920825-1.c: Likewise.
	* gcc.c-torture/compile/20011029-1.c: Likewise.
	* gcc.c-torture/compile/complex-6.c: Likewise.
	* gcc.c-torture/compile/pr27127.c: Likewise.
	* gcc.c-torture/compile/pr58164.c: Likewise.
	* gcc.c-torture/compile/20041214-1.c: Likewise.
	* gcc.c-torture/execute/built-in-setjmp.c: Likewise.
	* gcc.c-torture/execute/pr56982.c: Likewise.
	* gcc.c-torture/execute/pr60003.c: Likewise.
	* gcc.c-torture/execute/pr26983.c: Likewise.
	* gcc.dg/pr57287-2.c: Likewise.
	* gcc.dg/pr59920-1.c: Likewise.
	* gcc.dg/pr59920-2.c: Likewise.
	* gcc.dg/pr59920-3.c: Likewise.
	* gcc.dg/setjmp-3.c: Likewise.
	* gcc.dg/setjmp-4.c: Likewise.
	* gcc.dg/setjmp-5.c: Likewise.
	* gcc.dg/torture/pr48542.c: Likewise.
	* gcc.dg/torture/pr57147-2.c: Likewise.
	* gcc.dg/torture/pr59993.c: Likewise.

	* gcc.dg/torture/stackalign/non-local-goto-1.c: Require nonlocal_goto.
	* gcc.dg/torture/stackalign/non-local-goto-2.c: Likewise.
	* gcc.dg/torture/stackalign/non-local-goto-3.c: Likewise.
	* gcc.dg/torture/stackalign/non-local-goto-4.c: Likewise.
	* gcc.dg/torture/stackalign/non-local-goto-5.c: Likewise.
 	* gcc.dg/torture/stackalign/setjmp-1.c: Likewise.
 	* gcc.dg/torture/stackalign/setjmp-3.c: Likewise.
 	* gcc.dg/torture/stackalign/setjmp-4.c: Likewise.
	* gcc.dg/non-local-goto-1.c: Likewise.
	* gcc.dg/non-local-goto-2.c: Likewise.
	* gcc.dg/pr49994-1.c: Likewise.
	* gcc.dg/torture/pr57036-2.c: Likewise.

	* gcc.c-torture/compile/20040614-1.c: Require label_values.  Remove
	NO_LABEL_VALUES test.
	* gcc.c-torture/compile/920831-1.c: Likewise.
	* gcc.c-torture/compile/920502-1.c: Likewise.
	* gcc.c-torture/compile/920501-7.c: Likewise.
	* gcc.dg/pr52139.c: Likewise.

------------------------------------------------------------------------
Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp.orig
+++ gcc/testsuite/lib/target-supports.exp
@@ -604,7 +606,38 @@ proc add_options_for_tls { flags } {
     return 1
 }
 
+# Return 1 if indirect jumps are supported, 0 otherwise.
+
+proc check_effective_target_indirect_jumps {} {
+    if { [istarget nvptx-*-*] } {
+	return 0
+    }
+    return 1
+}
+
+# Return 1 if nonlocal goto is supported, 0 otherwise.
+
+proc check_effective_target_nonlocal_goto {} {
+    if { [istarget nvptx-*-*] } {
+	return 0
+    }
+    return 1
+}
+
+# Return 1 if taking label values is supported, 0 otherwise.
+
+proc check_effective_target_label_values {} {
+    if { [istarget nvptx-*-*] } {
+	return 0
+    }
+    return [check_no_compiler_messages label_values assembly {
+	#ifdef NO_LABEL_VALUES
+	#error NO
+	#endif
+    }]
+}
+
 # Return 1 if the assembler does not verify function types against
 # calls, 0 otherwise.  Such verification will typically show up problems
 # with K&R C function declarations.
 
Index: gcc/testsuite/gcc.c-torture/execute/20071220-2.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20071220-2.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20071220-2.c
@@ -1,4 +1,5 @@
 /* PR tree-optimization/29484 */
+/* { dg-require-effective-target label_values } */
 
 extern void abort (void);
 
Index: gcc/testsuite/gcc.c-torture/compile/pr46107.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr46107.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr46107.c
@@ -1,4 +1,6 @@
 /* PR tree-optimization/46107 */
+/* { dg-require-effective-target indirect_jumps } */
+/* { dg-require-effective-target label_values } */
 
 int foo (void) __attribute__ ((noreturn));
 
Index: gcc/testsuite/gcc.c-torture/compile/920415-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/920415-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/920415-1.c
@@ -1,7 +1,9 @@
+/* { dg-require-effective-target indirect_jumps } */
+/* { dg-require-effective-target label_values } */
+
 extern void abort (void);
 extern void exit (int);
 
-#ifndef NO_LABEL_VALUES
 f ()
 {
   __label__ l;
@@ -15,6 +17,3 @@ f ()
  l:
   exit (0);
 }
-#else
-int x;
-#endif
Index: gcc/testsuite/gcc.c-torture/compile/pr32919.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr32919.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr32919.c
@@ -1,3 +1,6 @@
+/* { dg-require-effective-target indirect_jumps } */
+/* { dg-require-effective-target label_values } */
+
 void _IO_vfprintf_internal ( char *f )
 {
   static const void *const step0_jumps[] = { &&do_form_unknown, &&do_flag_plus, &&do_form_float };
Index: gcc/testsuite/gcc.c-torture/compile/pr17913.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr17913.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr17913.c
@@ -1,4 +1,7 @@
 /* Test for computed jump into cond_expr: bug 17913.  */
+/* { dg-require-effective-target indirect_jumps } */
+/* { dg-require-effective-target label_values } */
+
 void f (void) 
 { 
   void *p = &&a;
Index: gcc/testsuite/gcc.c-torture/compile/pr30984.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr30984.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr30984.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target indirect_jumps } */
+
 int fs_exec(int ino)
 {
  void *src = 0;
Index: gcc/testsuite/gcc.c-torture/compile/pr51495.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr51495.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr51495.c
@@ -1,4 +1,6 @@
 /* PR rtl-optimization/51495 */
+/* { dg-require-effective-target indirect_jumps } */
+/* { dg-require-effective-target label_values } */
 
 void bar (void);
 
Index: gcc/testsuite/gcc.c-torture/compile/991213-3.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/991213-3.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/991213-3.c
@@ -1,2 +1,4 @@
+/* { dg-require-effective-target indirect_jumps } */
+
 int jump () { goto * (int (*) ()) 0xbabebec0; }
 
Index: gcc/testsuite/gcc.c-torture/compile/20040614-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/20040614-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/20040614-1.c
@@ -1,4 +1,5 @@
-#ifndef NO_LABEL_VALUES
+/* { dg-require-effective-target label_values } */
+
 void f(int r1, int *fp) 
 {     
   void *hlbl_tbl[] = { &&label1 }; 
@@ -14,7 +15,6 @@ void f(int r1, int *fp)
     goto label0; 
  label2: 
   ; 
-} 
-#else
+}
+
 int x;
-#endif
Index: gcc/testsuite/gcc.c-torture/compile/pr25224.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr25224.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr25224.c
@@ -1,4 +1,7 @@
 /* { dg-options "-funswitch-loops" } */
+/* { dg-require-effective-target indirect_jumps } */
+/* { dg-require-effective-target label_values } */
+
 static float rgam;
 extern void *jmp(void *);
 
Index: gcc/testsuite/gcc.c-torture/compile/920831-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/920831-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/920831-1.c
@@ -1,1 +1,3 @@
+/* { dg-require-effective-target indirect_jumps } */
+
 f(x){goto*(char)x;}
Index: gcc/testsuite/gcc.c-torture/compile/labels-3.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/labels-3.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/labels-3.c
@@ -1,4 +1,6 @@
 /* Verify that we can narrow the storage associated with label diffs.  */
+/* { dg-require-effective-target indirect_jumps } */
+/* { dg-require-effective-target label_values } */
 
 int foo (int a)
 {
Index: gcc/testsuite/gcc.c-torture/compile/920502-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/920502-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/920502-1.c
@@ -1,1 +1,3 @@
+/* { dg-require-effective-target indirect_jumps } */
+
 extern void*t[];x(i){goto*t[i];}
Index: gcc/testsuite/gcc.c-torture/compile/920428-3.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/920428-3.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/920428-3.c
@@ -1,5 +1,4 @@
-#ifndef NO_LABEL_VALUES
+/* { dg-require-effective-target label_values } */
+/* { dg-require-effective-target indirect_jumps } */
+
 x(a){static void*j[]={&&l1,&&l2};goto*j[a];l1:return 0;l2:return 1;}
-#else
-main(){ exit (0); }
-#endif
Index: gcc/testsuite/gcc.c-torture/compile/950613-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/950613-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/950613-1.c
@@ -1,4 +1,6 @@
-#ifndef NO_LABEL_VALUES
+/* { dg-require-effective-target label_values } */
+/* { dg-require-effective-target indirect_jumps } */
+
 f ()
 {
   long *sp;
@@ -26,6 +28,3 @@ f ()
     goto *pc++;
   }
 }
-#else
-int x;
-#endif
Index: gcc/testsuite/gcc.c-torture/compile/pr27863.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr27863.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr27863.c
@@ -1,4 +1,7 @@
 /* This test used to ICE on IA64.  */
+/* { dg-require-effective-target indirect_jumps } */
+/* { dg-require-effective-target label_values } */
+
 long stack[100];
 int main(int argc,char**argv,char **envp)
 {
Index: gcc/testsuite/gcc.c-torture/compile/920501-7.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/920501-7.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/920501-7.c
@@ -1,5 +1,3 @@
-#ifndef NO_LABEL_VALUES
+/* { dg-require-effective-target label_values } */
+
 x(){if(&&e-&&b<0)x();b:goto*&&b;e:;}
-#else
-int x;
-#endif
Index: gcc/testsuite/gcc.c-torture/compile/920826-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/920826-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/920826-1.c
@@ -1,1 +1,3 @@
+/* { dg-require-effective-target indirect_jumps } */
+
 f(int*x){goto*(char)*x;}
Index: gcc/testsuite/gcc.c-torture/compile/20050510-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/20050510-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/20050510-1.c
@@ -1,3 +1,6 @@
+/* { dg-require-effective-target indirect_jumps } */
+/* { dg-require-effective-target label_values } */
+
 void bar (int k)
 {
   void *label = (k) ? &&x : &&y;
Index: gcc/testsuite/gcc.c-torture/compile/pr28489.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr28489.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr28489.c
@@ -1,3 +1,6 @@
+/* { dg-require-effective-target indirect_jumps } */
+/* { dg-require-effective-target label_values } */
+
 typedef int c_int;
 union c_insn
 {
Index: gcc/testsuite/gcc.c-torture/compile/pr29128.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr29128.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr29128.c
@@ -1,3 +1,6 @@
+/* { dg-require-effective-target indirect_jumps } */
+/* { dg-require-effective-target label_values } */
+
 typedef unsigned long Eterm;
 process_main (void)
 {
Index: gcc/testsuite/gcc.c-torture/compile/pr21356.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr21356.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr21356.c
@@ -1,3 +1,6 @@
+/* { dg-require-effective-target indirect_jumps } */
+/* { dg-require-effective-target label_values } */
+
 int a;
 void* p;
 
Index: gcc/testsuite/gcc.c-torture/compile/labels-2.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/labels-2.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/labels-2.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target label_values } */
+
 struct bp { void *v, *b, *e; };
 f ()
 {
Index: gcc/testsuite/gcc.c-torture/compile/20011029-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/20011029-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/20011029-1.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target indirect_jumps } */
+
 void foo (void *) __attribute__ ((noreturn));
 
 void
Index: gcc/testsuite/gcc.c-torture/compile/complex-6.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/complex-6.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/complex-6.c
@@ -1,4 +1,5 @@
 /* PR tree-opt/35737 */
+/* { dg-require-effective-target indirect_jumps } */
 
 long buf[10];
 
Index: gcc/testsuite/gcc.c-torture/compile/pr21728.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr21728.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr21728.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target indirect_jumps } */
+
 int main (void)
 {
   __label__ l1;
Index: gcc/testsuite/gcc.c-torture/compile/20000518-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/20000518-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/20000518-1.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target label_values } */
+
 void callit1(void*);
 
 extern __inline__ void test()
Index: gcc/testsuite/gcc.c-torture/compile/20021108-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/20021108-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/20021108-1.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target label_values } */
+
 int
 main()
 {
Index: gcc/testsuite/gcc.c-torture/compile/981006-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/981006-1.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/981006-1.c
@@ -7,6 +7,7 @@
 /* For MIPS at least, pic is needed to trigger the problem. */
 /* { dg-options "-w -Wuninitialized -Werror -fpic" } */
 /* { dg-options "-w -Wuninitialized -Werror" { target { { rs6000-*-aix* powerpc*-*-aix* arm*-*-* fr30-*-* sh-*-hms h8300*-*-* cris-*-elf* mmix-*-* } || { ! fpic } } } } */
+/* { dg-require-effective-target label_values } */
 
 int foo (int a, int b)
 {
Index: gcc/testsuite/gcc.c-torture/compile/pr42559.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr42559.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr42559.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target label_values } */
+
 void jumpfunc(int copy, void *p)
 {
   void *l = &&jumplabel;
Index: gcc/testsuite/gcc.c-torture/compile/pr58164.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr58164.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/pr58164.c
@@ -1,4 +1,5 @@
 /* PR tree-optimization/58164 */
+/* { dg-require-effective-target indirect_jumps } */
 
 int
 foo (void)
Index: gcc/testsuite/gcc.c-torture/execute/20041214-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20041214-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20041214-1.c
@@ -1,3 +1,5 @@
+/* { dg-require-effective-target indirect_jumps } */
+
 typedef long unsigned int size_t;
 extern void abort (void);
 extern char *strcpy (char *, const char *);
Index: gcc/testsuite/gcc.c-torture/execute/20071210-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20071210-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20071210-1.c
@@ -1,4 +1,6 @@
 /* PR rtl-optimization/34302 */
+/* { dg-require-effective-target label_values } */
+/* { dg-require-effective-target indirect_jumps } */
 
 extern void abort (void);
 
Index: gcc/testsuite/gcc.c-torture/execute/20071220-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20071220-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20071220-1.c
@@ -1,4 +1,6 @@
 /* PR tree-optimization/29484 */
+/* { dg-require-effective-target label_values } */
+/* { dg-require-effective-target indirect_jumps } */
 
 extern void abort (void);
 
Index: gcc/testsuite/gcc.c-torture/execute/980526-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/980526-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/980526-1.c
@@ -1,3 +1,5 @@
+/* { dg-skip-if "requires indirect jumps" { ! indirect_jumps } { "-O0" } { "" } } */
+/* { dg-skip-if "requires label values" { ! label_values } { "-O0" } { "" } } */
 int expect_do1 = 1, expect_do2 = 2;
  
 static int doit(int x){
Index: gcc/testsuite/gcc.c-torture/execute/built-in-setjmp.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/built-in-setjmp.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/built-in-setjmp.c
@@ -1,5 +1,6 @@
+/* { dg-require-effective-target indirect_jumps } */
 /* { dg-require-effective-target alloca } */
 
 extern int strcmp(const char *, const char *);
 extern char *strcpy(char *, const char *);
 extern void abort(void);
Index: gcc/testsuite/gcc.c-torture/execute/pr51447.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/pr51447.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/pr51447.c
@@ -1,4 +1,6 @@
 /* PR rtl-optimization/51447 */
+/* { dg-require-effective-target label_values } */
+/* { dg-require-effective-target indirect_jumps } */
 
 extern void abort (void);
 
Index: gcc/testsuite/gcc.c-torture/execute/pr56982.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/pr56982.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/pr56982.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target indirect_jumps } */
 #include <setjmp.h>
 
 extern void abort (void);
Index: gcc/testsuite/gcc.c-torture/execute/pr60003.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/pr60003.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/pr60003.c
@@ -1,4 +1,5 @@
 /* PR tree-optimization/60003 */
+/* { dg-require-effective-target indirect_jumps } */
 
 extern void abort (void);
 
Index: gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-1.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-1.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-1.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-require-effective-target nonlocal_goto } */
 
 extern void abort (void);
 
Index: gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-2.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-2.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-2.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-require-effective-target nonlocal_goto } */
 
 extern void abort (void);
 
Index: gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-3.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-3.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-3.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-require-effective-target nonlocal_goto } */
 
 #ifndef NO_TRAMPOLINES
 extern void abort (void);
Index: gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-4.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-4.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-4.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-require-effective-target nonlocal_goto } */
 
 extern void abort (void);
 extern void exit (int);
Index: gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-5.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-5.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-5.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-require-effective-target nonlocal_goto } */
 
 extern void exit (int);
 #if !defined (NO_LABEL_VALUES) && !defined (NO_TRAMPOLINES)
Index: gcc/testsuite/gcc.dg/torture/stackalign/setjmp-1.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/setjmp-1.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/setjmp-1.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-require-effective-target indirect_jumps } */
 
 extern int strcmp(const char *, const char *);
 extern char *strcpy(char *, const char *);
Index: gcc/testsuite/gcc.dg/torture/stackalign/setjmp-3.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/setjmp-3.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/setjmp-3.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-require-effective-target indirect_jumps } */
 
 #include <setjmp.h>
 
Index: gcc/testsuite/gcc.dg/torture/stackalign/setjmp-4.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/stackalign/setjmp-4.c.orig
+++ gcc/testsuite/gcc.dg/torture/stackalign/setjmp-4.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-require-effective-target indirect_jumps } */
 
 #include <setjmp.h>
 
Index: gcc/testsuite/gcc.c-torture/execute/20040302-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20040302-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20040302-1.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target label_values } */
 int code[]={0,0,0,0,1};
 
 void foo(int x) {
Index: gcc/testsuite/gcc.dg/comp-goto-1.c
===================================================================
--- gcc/testsuite/gcc.dg/comp-goto-1.c.orig
+++ gcc/testsuite/gcc.dg/comp-goto-1.c
@@ -3,6 +3,8 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-options "" } */
+/* { dg-require-effective-target indirect_jumps } */
+/* { dg-require-effective-target label_values } */
 
 void
 f (void)
Index: gcc/testsuite/gcc.dg/comp-goto-2.c
===================================================================
--- gcc/testsuite/gcc.dg/comp-goto-2.c.orig
+++ gcc/testsuite/gcc.dg/comp-goto-2.c
@@ -3,6 +3,8 @@
 /* Origin: Joseph Myers <joseph@codesourcery.com> */
 /* { dg-do compile } */
 /* { dg-options "-pedantic" } */
+/* { dg-require-effective-target indirect_jumps } */
+/* { dg-require-effective-target label_values } */
 
 void
 f (void)
Index: gcc/testsuite/gcc.dg/pr26983.c
===================================================================
--- gcc/testsuite/gcc.dg/pr26983.c.orig
+++ gcc/testsuite/gcc.dg/pr26983.c
@@ -1,4 +1,5 @@
 /* { dg-do link } */
+/* { dg-require-effective-target indirect_jumps } */
 
 /* This used to cause a linker failure because GCC would output
    assembler code referencing labels that it had not output.  */
Index: gcc/testsuite/gcc.dg/20021029-1.c
===================================================================
--- gcc/testsuite/gcc.dg/20021029-1.c.orig
+++ gcc/testsuite/gcc.dg/20021029-1.c
@@ -4,6 +4,8 @@
 /* { dg-options "-O2 -fpic" } */
 /* { dg-options "-O2 -fpic -mpt-fixed" { target sh64*-*-* } } */
 /* { dg-final { scan-assembler-not ".data.rel.ro.local" } } */
+/* { dg-require-effective-target label_values } */
+/* { dg-require-effective-target indirect_jumps } */
 
 int foo (int a)
 {
Index: gcc/testsuite/gcc.dg/non-local-goto-1.c
===================================================================
--- gcc/testsuite/gcc.dg/non-local-goto-1.c.orig
+++ gcc/testsuite/gcc.dg/non-local-goto-1.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O2" } */
+/* { dg-require-effective-target nonlocal_goto } */
 
 extern void abort (void);
 
Index: gcc/testsuite/gcc.dg/non-local-goto-2.c
===================================================================
--- gcc/testsuite/gcc.dg/non-local-goto-2.c.orig
+++ gcc/testsuite/gcc.dg/non-local-goto-2.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O2" } */
+/* { dg-require-effective-target nonlocal_goto } */
 
 extern void abort (void);
 
Index: gcc/testsuite/gcc.dg/pr43379.c
===================================================================
--- gcc/testsuite/gcc.dg/pr43379.c.orig
+++ gcc/testsuite/gcc.dg/pr43379.c
@@ -1,5 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftracer -w" } */
+/* { dg-require-effective-target label_values } */
+/* { dg-require-effective-target indirect_jumps } */
 
 void *foo(int i, int *p)
 {
Index: gcc/testsuite/gcc.dg/pr45259.c
===================================================================
--- gcc/testsuite/gcc.dg/pr45259.c.orig
+++ gcc/testsuite/gcc.dg/pr45259.c
@@ -2,6 +2,8 @@
 /* { dg-do compile } */
 /* { dg-options "-g -O2 -w -fpic" { target fpic } } */
 /* { dg-options "-g -O2 -w" { target { ! fpic } } } */
+/* { dg-require-effective-target indirect_jumps } */
+/* { dg-require-effective-target label_values } */
 
 struct S { void (*bar) (long); };
 struct T { struct S *t; };
Index: gcc/testsuite/gcc.dg/pr49994-1.c
===================================================================
--- gcc/testsuite/gcc.dg/pr49994-1.c.orig
+++ gcc/testsuite/gcc.dg/pr49994-1.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-Os -fsched2-use-superblocks -g" } */
+/* { dg-require-effective-target nonlocal_goto } */
 
 void x (int a)
 {
Index: gcc/testsuite/gcc.dg/pr52139.c
===================================================================
--- gcc/testsuite/gcc.dg/pr52139.c.orig
+++ gcc/testsuite/gcc.dg/pr52139.c
@@ -2,6 +2,7 @@
 /* { dg-do compile } */
 /* { dg-options "-O -fno-tree-dominator-opts -fno-tree-fre" } */
 /* { dg-additional-options "-fpic" { target fpic } } */
+/* { dg-require-effective-target label_values } */
 
 void *p;
 
Index: gcc/testsuite/gcc.dg/pr57287-2.c
===================================================================
--- gcc/testsuite/gcc.dg/pr57287-2.c.orig
+++ gcc/testsuite/gcc.dg/pr57287-2.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -Wall" } */
+/* { dg-require-effective-target indirect_jumps } */
 
 #include <setjmp.h>
 
Index: gcc/testsuite/gcc.dg/pr57287.c
===================================================================
--- gcc/testsuite/gcc.dg/pr57287.c.orig
+++ gcc/testsuite/gcc.dg/pr57287.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -Wall" } */
+/* { dg-require-effective-target indirect_jumps } */
 
 #include <setjmp.h>
 
Index: gcc/testsuite/gcc.dg/pr59920-1.c
===================================================================
--- gcc/testsuite/gcc.dg/pr59920-1.c.orig
+++ gcc/testsuite/gcc.dg/pr59920-1.c
@@ -1,6 +1,7 @@
 /* PR tree-optimization/59920 */
 /* { dg-do compile } */
 /* { dg-options "-O0" } */
+/* { dg-require-effective-target indirect_jumps } */
 
 #include <setjmp.h>
 
Index: gcc/testsuite/gcc.dg/pr59920-2.c
===================================================================
--- gcc/testsuite/gcc.dg/pr59920-2.c.orig
+++ gcc/testsuite/gcc.dg/pr59920-2.c
@@ -1,6 +1,8 @@
 /* PR tree-optimization/59920 */
 /* { dg-do compile } */
 /* { dg-options "-O0" } */
+/* { dg-require-effective-target label_values } */
+/* { dg-require-effective-target indirect_jumps } */
 
 void *bar (void **);
 void *baz (int, void **);
Index: gcc/testsuite/gcc.dg/pr59920-3.c
===================================================================
--- gcc/testsuite/gcc.dg/pr59920-3.c.orig
+++ gcc/testsuite/gcc.dg/pr59920-3.c
@@ -1,6 +1,7 @@
 /* PR tree-optimization/59920 */
 /* { dg-do compile } */
 /* { dg-options "-O0" } */
+/* { dg-require-effective-target nonlocal_goto } */
 
 void *bar (void **);
 void *baz (int, void **);
Index: gcc/testsuite/gcc.dg/setjmp-3.c
===================================================================
--- gcc/testsuite/gcc.dg/setjmp-3.c.orig
+++ gcc/testsuite/gcc.dg/setjmp-3.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O" } */
+/* { dg-require-effective-target indirect_jumps } */
 
 #include <setjmp.h>
 
Index: gcc/testsuite/gcc.dg/setjmp-4.c
===================================================================
--- gcc/testsuite/gcc.dg/setjmp-4.c.orig
+++ gcc/testsuite/gcc.dg/setjmp-4.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O" } */
+/* { dg-require-effective-target indirect_jumps } */
 
 #include <setjmp.h>
 
Index: gcc/testsuite/gcc.dg/setjmp-5.c
===================================================================
--- gcc/testsuite/gcc.dg/setjmp-5.c.orig
+++ gcc/testsuite/gcc.dg/setjmp-5.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -Wall" } */
+/* { dg-require-effective-target indirect_jumps } */
 
 #include <setjmp.h>
 
Index: gcc/testsuite/gcc.dg/torture/pr33848.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/pr33848.c.orig
+++ gcc/testsuite/gcc.dg/torture/pr33848.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target label_values } */
 /* &&foo should be hoisted, but on most targets, excess register pressure
    forces it to be rematerialized before "data != &&foo".  On targets that
    have a "branch if registers are equal" instruction, this leads to the
Index: gcc/testsuite/gcc.dg/torture/pr48542.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/pr48542.c.orig
+++ gcc/testsuite/gcc.dg/torture/pr48542.c
@@ -1,4 +1,6 @@
 /* { dg-do run } */
+/* { dg-require-effective-target indirect_jumps } */
+
 /* The return-address was clobbered.  */
 #include <stdlib.h>
 #include <setjmp.h>
Index: gcc/testsuite/gcc.dg/torture/pr53695.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/pr53695.c.orig
+++ gcc/testsuite/gcc.dg/torture/pr53695.c
@@ -1,5 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-ftracer" } */
+/* { dg-require-effective-target indirect_jumps } */
+/* { dg-require-effective-target label_values } */
 
 void
 foo (const void **p)
Index: gcc/testsuite/gcc.dg/torture/pr57036-2.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/pr57036-2.c.orig
+++ gcc/testsuite/gcc.dg/torture/pr57036-2.c
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target nonlocal_goto } */
 
 int j_;
 int jpgDecode_convert (unsigned i)
Index: gcc/testsuite/gcc.dg/torture/pr57147-2.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/pr57147-2.c.orig
+++ gcc/testsuite/gcc.dg/torture/pr57147-2.c
@@ -1,6 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-fdump-tree-optimized" } */
 /* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */
+/* { dg-require-effective-target indirect_jumps } */
 
 struct __jmp_buf_tag {};
 typedef struct __jmp_buf_tag jmp_buf[1];
Index: gcc/testsuite/gcc.dg/torture/pr57584.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/pr57584.c.orig
+++ gcc/testsuite/gcc.dg/torture/pr57584.c
@@ -1,5 +1,7 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target int32plus } */
+/* { dg-require-effective-target label_values } */
+/* { dg-require-effective-target indirect_jumps } */
 
 typedef int int32_t;
 typedef unsigned char uint8_t;
Index: gcc/testsuite/gcc.dg/torture/pr59993.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/pr59993.c.orig
+++ gcc/testsuite/gcc.dg/torture/pr59993.c
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-require-effective-target indirect_jumps } */
 
 #include <setjmp.h>
 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [6/7] Random tweaks
  2014-10-21 14:13 [0/6] nvptx testsuite patches Bernd Schmidt
                   ` (4 preceding siblings ...)
  2014-10-21 14:27 ` [5/6] nvptx testsuite patches: jumps and labels Bernd Schmidt
@ 2014-10-21 14:30 ` Bernd Schmidt
  2014-10-21 15:33   ` Jeff Law
  2014-10-21 14:34 ` [7/7] nvptx testsuite patches: Return addresses Bernd Schmidt
  2014-10-21 14:48 ` [0/6] nvptx testsuite patches Jeff Law
  7 siblings, 1 reply; 27+ messages in thread
From: Bernd Schmidt @ 2014-10-21 14:30 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 577 bytes --]

This tweaks a few tests so that we don't have to skip them.  This is 
mostly concerned with declaring main properly, or changing other 
declarations where the test does not seem to rely on the type mismatches.

I've also included one example of changing a function name to not be 
"call", ptxas seems to have a bug that makes it not allow this function 
name. If that doesn't seem too awful I'll have a few more tests to fix 
up in this way.

There'll be a 7th patch, not because I can't count, but because I didn't 
follow a consistent naming scheme for the patches.


Bernd


[-- Attachment #2: ts-tweaks.diff --]
[-- Type: text/x-patch, Size: 2790 bytes --]

	* gcc.c-torture/compile/920625-2.c: Add return type to
	freeReturnStruct.
	* gcc.c-torture/execute/20091229-1.c: Declare main properly.
	* gcc.c-torture/execute/pr61375.c: Likewise.
	* gcc.c-torture/execute/20111208-1.c: Use __SIZE_TYPE__ for size_t.
	* gcc.dg/pr30904.c: Remove extern from declaration of t.
	* gcc.c-torture/compile/callind.c (bar): Renamed from call.

Index: gcc/testsuite/gcc.c-torture/compile/920625-2.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/920625-2.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/920625-2.c
@@ -100,4 +100,4 @@ copyQueryResult(Widget w, Boolean copy,
   freeReturnStruct();
 }
 
-freeReturnStruct(){}
+void freeReturnStruct(){}
Index: gcc/testsuite/gcc.c-torture/execute/20091229-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20091229-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20091229-1.c
@@ -1,2 +1,2 @@
 long long foo(long long v) { return v / -0x080000000LL; }
-void main() { if (foo(0x080000000LL) != -1) abort(); exit (0); }
+int main(int argc, char **argv) { if (foo(0x080000000LL) != -1) abort(); exit (0); }
Index: gcc/testsuite/gcc.c-torture/execute/20111208-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20111208-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20111208-1.c
@@ -1,7 +1,7 @@
 /* PR tree-optimization/51315 */
 /* Reported by Jurij Smakov <jurij@wooyd.org> */
 
-typedef unsigned int size_t;
+typedef __SIZE_TYPE__ size_t;
 
 extern void *memcpy (void *__restrict __dest,
        __const void *__restrict __src, size_t __n)
Index: gcc/testsuite/gcc.c-torture/execute/pr61375.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/pr61375.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/pr61375.c
@@ -19,7 +19,7 @@ uint128_central_bitsi_ior (unsigned __in
 }
 
 int
-main(int argc)
+main(int argc, char **argv)
 {
   __int128 in = 1;
 #ifdef __SIZEOF_INT128__
Index: gcc/testsuite/gcc.dg/pr30904.c
===================================================================
--- gcc/testsuite/gcc.dg/pr30904.c.orig
+++ gcc/testsuite/gcc.dg/pr30904.c
@@ -1,7 +1,7 @@
 /* { dg-do link } */
 /* { dg-options "-O2 -fdump-tree-optimized" } */
 
-extern int t;
+int t;
 extern void link_error(void);
 int main (void)
 {
Index: gcc/testsuite/gcc.c-torture/compile/callind.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/callind.c.orig
+++ gcc/testsuite/gcc.c-torture/compile/callind.c
@@ -1,8 +1,8 @@
-call (foo, a)
+bar (foo, a)
      int (**foo) ();
 {
 
-  (foo)[1] = call;
+  (foo)[1] = bar;
 
   foo[a] (1);
 }

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [7/7] nvptx testsuite patches: Return addresses
  2014-10-21 14:13 [0/6] nvptx testsuite patches Bernd Schmidt
                   ` (5 preceding siblings ...)
  2014-10-21 14:30 ` [6/7] Random tweaks Bernd Schmidt
@ 2014-10-21 14:34 ` Bernd Schmidt
  2014-10-21 15:34   ` Jeff Law
  2014-10-21 14:48 ` [0/6] nvptx testsuite patches Jeff Law
  7 siblings, 1 reply; 27+ messages in thread
From: Bernd Schmidt @ 2014-10-21 14:34 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 79 bytes --]

This tests for availability of return addresses in a number of tests.


Bernd


[-- Attachment #2: r422426.diff --]
[-- Type: text/x-patch, Size: 3829 bytes --]

	gcc/testsuite/
	* lib/target-supports.exp (check_effective_target_return_address):
	New function.
	* gcc.c-torture/execute/20010122-1.c: Require return_address.
	* gcc.c-torture/execute/20030323-1.c: Likewise.
	* gcc.c-torture/execute/20030811-1.c: Likewise.
	* gcc.c-torture/execute/eeprof-1.c: Likewise.
	* gcc.c-torture/execute/frame-address.c: Likewise.
	* gcc.c-torture/execute/pr17377.c: Likewise.

------------------------------------------------------------------------
Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp.orig
+++ gcc/testsuite/lib/target-supports.exp
@@ -604,7 +606,17 @@ proc add_options_for_tls { flags } {
     return 1
 }
 
+# Return 1 if builtin_return_address and builtin_frame_address are
+# supported, 0 otherwise.
+
+proc check_effective_target_return_address {} {
+    if { [istarget nvptx-*-*] } {
+	return 0
+    }
+    return 1
+}
+
 # Return 1 if the assembler does not verify function types against
 # calls, 0 otherwise.  Such verification will typically show up problems
 # with K&R C function declarations.
 
Index: gcc/testsuite/gcc.c-torture/execute/20010122-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20010122-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20010122-1.c
@@ -1,4 +1,5 @@
 /* { dg-skip-if "requires frame pointers" { *-*-* } "-fomit-frame-pointer" "" } */
+/* { dg-require-effective-target return_address } */
 
 extern void exit (int);
 extern void abort (void);
Index: gcc/testsuite/gcc.c-torture/execute/20030323-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20030323-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20030323-1.c
@@ -1,4 +1,5 @@
 /* PR opt/10116 */
+/* { dg-require-effective-target return_address } */
 /* Removed tablejump while label still in use; this is really a link test.  */
 
 void *NSReturnAddress(int offset)
Index: gcc/testsuite/gcc.c-torture/execute/20030811-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/20030811-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/20030811-1.c
@@ -1,4 +1,5 @@
 /* Origin: PR target/11535 from H. J. Lu <hjl@lucon.org> */
+/* { dg-require-effective-target return_address } */
 
 void vararg (int i, ...)
 {
Index: gcc/testsuite/gcc.c-torture/execute/eeprof-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/eeprof-1.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/eeprof-1.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target return_address } */
 /* { dg-options "-finstrument-functions" } */
 /* { dg-xfail-if "" { powerpc-ibm-aix* } "*" "" } */
 
Index: gcc/testsuite/gcc.c-torture/execute/frame-address.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/frame-address.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/frame-address.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target return_address } */
 int check_fa_work (const char *, const char *) __attribute__((noinline));
 int check_fa_mid (const char *) __attribute__((noinline));
 int check_fa (char *) __attribute__((noinline));
Index: gcc/testsuite/gcc.c-torture/execute/pr17377.c
===================================================================
--- gcc/testsuite/gcc.c-torture/execute/pr17377.c.orig
+++ gcc/testsuite/gcc.c-torture/execute/pr17377.c
@@ -1,6 +1,7 @@
 /* PR target/17377
    Bug in code emitted by "return" pattern on CRIS: missing pop of
    forced return address on stack.  */
+/* { dg-require-effective-target return_address } */
 int calls = 0;
 
 void *f (int) __attribute__ ((__noinline__));

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [0/6] nvptx testsuite patches
  2014-10-21 14:13 [0/6] nvptx testsuite patches Bernd Schmidt
                   ` (6 preceding siblings ...)
  2014-10-21 14:34 ` [7/7] nvptx testsuite patches: Return addresses Bernd Schmidt
@ 2014-10-21 14:48 ` Jeff Law
  7 siblings, 0 replies; 27+ messages in thread
From: Jeff Law @ 2014-10-21 14:48 UTC (permalink / raw)
  To: Bernd Schmidt, GCC Patches

On 10/21/14 14:10, Bernd Schmidt wrote:
> This series modifies a large number of tests in order to clean up
> testsuite results on nvptx. The goal here was never really to get an
> entirely clean run - the target is just too different from conventional
> ones - but to be able to test the compiler sufficiently to be sure that
> it's in good shape for use in offloading. Most of the patches here add
> annotations for use of features like alloca or indirect jumps that are
> unsupported on the target.
>
> Examples of things that still cause failures are things like dots in
> identifiers, use of constructors (which is something I want to look
> into), certain constructs that trigger bugs in the ptxas tool, and lots
> of undefined C library functions.
Yea. When I first looked at PTX, my thought was to use the existing 
testsuite, to the extent possible, to shake out the initial code 
generation issues.  There's just some things that would require heroic 
effort to make work and they aren't really a priority for PTX.

So I've got not problem conceptually with the direction this work is taking.

jeff

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [1/6] nvptx testsuite patches: alloca
  2014-10-21 14:13 ` [1/6] nvptx testsuite patches: alloca Bernd Schmidt
@ 2014-10-21 15:16   ` Jeff Law
  0 siblings, 0 replies; 27+ messages in thread
From: Jeff Law @ 2014-10-21 15:16 UTC (permalink / raw)
  To: Bernd Schmidt, GCC Patches

On 10/21/14 14:12, Bernd Schmidt wrote:
> This deals with uses of alloca in the testsuite. Some tests require it
> outright, others only at -O0, and others require it implicitly by
> requiring an alignment for stack variables bigger than the target's
> STACK_BOUNDARY. For the latter I've added explicit xfails.
OK.
Jeff

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [2/6] nvptx testsuite patches: typed assembly
  2014-10-21 14:19 ` [2/6] nvptx testsuite patches: typed assembly Bernd Schmidt
@ 2014-10-21 15:22   ` Jeff Law
  2014-10-21 15:33     ` Bernd Schmidt
  0 siblings, 1 reply; 27+ messages in thread
From: Jeff Law @ 2014-10-21 15:22 UTC (permalink / raw)
  To: Bernd Schmidt, GCC Patches

On 10/21/14 14:15, Bernd Schmidt wrote:
> Since everything in ptx assembly is typed, K&R C is problematic. There
> are a number of testcases that call functions with the wrong number of
> arguments, or arguments of the wrong type. I've added a new feature,
> untyped_assembly, which these tests now require. I've also used this for
> tests using builtin_apply/builtin_return.
I'd kind of prefer to see the tests fixed, but I can live with this.

FWIW, the PA (32-bit SOM) is very sensitive to this stuff as well, 
though the linker will detect and correct most of these problems.  The 
PTX model doesn't give you the option to correct this stuff during the 
link phase

jeff



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [3/6] nvptx testsuite patches: stdio
  2014-10-21 14:19 ` [3/6] nvptx testsuite patches: stdio Bernd Schmidt
@ 2014-10-21 15:24   ` Jeff Law
  2014-10-21 19:28   ` Mike Stump
  1 sibling, 0 replies; 27+ messages in thread
From: Jeff Law @ 2014-10-21 15:24 UTC (permalink / raw)
  To: Bernd Schmidt, GCC Patches

On 10/21/14 14:17, Bernd Schmidt wrote:
> Some tests use stdio functions which are unavaiable with the cut-down
> newlib I'm using for ptx testing. I'm somewhat uncertain what to do with
> these; they are by no means the only unavailable library functions the
> testsuite tries to use (signal is another example). Here's a patch which
> deals with parts of the problem, but I wouldn't mind leaving this one
> out if it doesn't seem worthwhile.
Tests probably shouldn't be using stdio anyway, except perhaps for the 
wrapper used when we run remotes and such to print the PASS/FAIL message.

One could argue a better direction would be to change calls into stdio 
to instead call some other function defined in the same .c file.  That 
"other function" would be marked as noinline.  That would help minimize 
the possibility of compromising the test.

Jeff

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [4/6] nvptx testsuite patches: xfails and skips
  2014-10-21 14:22 ` [4/6] nvptx testsuite patches: xfails and skips Bernd Schmidt
@ 2014-10-21 15:30   ` Jeff Law
  2014-10-21 15:32     ` Bernd Schmidt
  0 siblings, 1 reply; 27+ messages in thread
From: Jeff Law @ 2014-10-21 15:30 UTC (permalink / raw)
  To: Bernd Schmidt, GCC Patches

On 10/21/14 14:19, Bernd Schmidt wrote:
> Some things don't fit into nice categories that apply to a larger set of
> tests, or which are somewhat random like ptxas tool failures. For these
> I've added xfails and skips.
>
>
> Bernd
>
> ts-xfails.diff
>
>
> 	gcc/testsuite/
> 	* lib/target-supports.exp (check_effective_target_trampolines,
> 	check_profiling_available, check_effective_target_lto,
> 	check_effective_target_vect_natural): False for nvptx-*-*.
> 	* gcc.c-torture/compile/limits-fndefn.c: Skip for nvptx-*-*.
> 	* gcc.c-torture/compile/pr34334.c: Likewise.
> 	* gcc.c-torture/compile/pr37056.c: Likewise.
> 	* gcc.c-torture/compile/pr39423-1.c: Likewise.
> 	* gcc.c-torture/compile/pr46534.c: Likewise.
> 	* gcc.c-torture/compile/pr49049.c: Likewise.
> 	* gcc.c-torture/compile/pr59417.c: Likewise.
> 	* gcc.c-torture/compile/20080721-1.c: Likewise.
> 	* gcc.c-torture/compile/920501-4.c: Likewise.
> 	* gcc.c-torture/compile/921011-1.c: Likewise.	
> 	* gcc.dg/20040813-1.c: Likewise.
> 	* gcc.dg/pr28755.c: Likewise.
> 	* gcc.dg/pr44194-1.c: Likewise.
> 	* gcc.c-torture/compile/pr42717.c: Xfail for nvptx-*-*.
> 	* gcc.c-torture/compile/pr61684.c: Likewise.
> 	* gcc.c-torture/compile/pr20601-1.c: Likewise.
> 	* gcc.c-torture/compile/pr59221.c: Likewise.
> 	* gcc.c-torture/compile/20060208-1.c: Likewise.
> 	* gcc.c-torture/execute/pr52129.c: Likewise.
> 	* gcc.c-torture/execute/20020310-1.c: Likewise.
> 	* gcc.c-torture/execute/20101011-1.c: Define DO_TEST to 0 for nvptx.
> 	* gcc.c-torture/execute20020312-2.c: Add case for for nvptx.
> 	* gcc.c-torture/compile/pr60655-1.c: Don't add -fdata-sections
> 	for nvptx-*-*.
> 	* gcc.dg/pr36400.c: Xfail scan-assembler test on nvptx-*-*.
> 	* gcc.dg/const-elim-2.c: Likewise.
More ptx tooling failures than I'd expect.  I'll leave it up to you 
whether or not to push on NVidia to fix some of those failures.  The 
timeouts seem particularly troublesome.

I think this is fine.

jeff


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [5/6] nvptx testsuite patches: jumps and labels
  2014-10-21 14:27 ` [5/6] nvptx testsuite patches: jumps and labels Bernd Schmidt
@ 2014-10-21 15:31   ` Jeff Law
  0 siblings, 0 replies; 27+ messages in thread
From: Jeff Law @ 2014-10-21 15:31 UTC (permalink / raw)
  To: Bernd Schmidt, GCC Patches

On 10/21/14 14:23, Bernd Schmidt wrote:
> This deals with tests requiring indirect jumps (including tests using
> setjmp), label values, and nonlocal goto.
>
> A subset of these tests uses the NO_LABEL_VALUES macro, but it's not
> consistent across the testsuite. The feature test I wrote tests whether
> that is defined and returns false for label_values if so.
>
>
> Bernd
>
>
> ts-jumps-labels.diff
>
>
> 	gcc/testsuite/
> 	* lib/target-supports.exp (check_effective_target_indirect_jumps):
> 	New function.
> 	(check_effective_target_nonlocal_goto): New function.
> 	(check_effective_target_label_values): New function.
> 	* gcc.c-torture/execute/20071220-2.c: Require label_values.
> 	* gcc.c-torture/compile/labels-2.c: Likewise.
> 	* gcc.c-torture/compile/20000518-1.c: Likewise.
> 	* gcc.c-torture/compile/20021108-1.c: Likewise.
> 	* gcc.c-torture/compile/981006-1.c: Likewise.
> 	* gcc.c-torture/execute/20040302-1.c: Likewise.
> 	* gcc.dg/torture/pr33848.c: Likewise.
>
> 	* gcc.c-torture/compile/pr46107.c: Require indirect jumps and
> 	label values.
> 	* gcc.c-torture/compile/pr32919.c: Likewise.
> 	* gcc.c-torture/compile/pr17913.c: Likewise.
> 	* gcc.c-torture/compile/pr51495.c: Likewise.
> 	* gcc.c-torture/compile/pr25224.c: Likewise.
> 	* gcc.c-torture/compile/labels-3.c: Likewise.
> 	* gcc.c-torture/compile/pr27863.c: Likewise.
> 	* gcc.c-torture/compile/20050510-1.c: Likewise.
> 	* gcc.c-torture/compile/pr28489.c: Likewise.
> 	* gcc.c-torture/compile/pr29128.c: Likewise.
> 	* gcc.c-torture/compile/pr21356: Likewise.
> 	* gcc.c-torture/execute/20071210-1.c: Likewise.
> 	* gcc.c-torture/execute/200701220-1.c: Likewise.
> 	* gcc.c-torture/execute/pr51447.c: Likewise.
> 	* gcc.c-torture/execute/comp-goto-1.c: Likewise.
> 	* gcc.c-torture/execute/comp-goto-2.c: Likewise.
> 	* gcc.dg/20021029-1.c: Likewise.
> 	* gcc.dg/pr43379.c: Likewise.
> 	* gcc.dg/pr45259.c: Likewise.
> 	* gcc.dg/torture/pr53695.c: Likewise.
> 	* gcc.dg/torture/pr57584.c: Likewise.
>
> 	* gcc.c-torture/execute/980526-1.c: Skip if -O0 and neither label_values
> 	or indirect_jumps are available.
> 	* gcc.c-torture/compile/920415-1.c: Likewise.  Remove NO_LABEL_VALUES
> 	test.
> 	* gcc.c-torture/compile/920428-3.c: Likewise.
> 	* gcc.c-torture/compile/950613-1.c: Likewise.
>
> 	* gcc.c-torture/compile/pr30984.c: Require indirect jumps.
> 	* gcc.c-torture/compile/991213-3.c: Likewise.
> 	* gcc.c-torture/compile/920825-1.c: Likewise.
> 	* gcc.c-torture/compile/20011029-1.c: Likewise.
> 	* gcc.c-torture/compile/complex-6.c: Likewise.
> 	* gcc.c-torture/compile/pr27127.c: Likewise.
> 	* gcc.c-torture/compile/pr58164.c: Likewise.
> 	* gcc.c-torture/compile/20041214-1.c: Likewise.
> 	* gcc.c-torture/execute/built-in-setjmp.c: Likewise.
> 	* gcc.c-torture/execute/pr56982.c: Likewise.
> 	* gcc.c-torture/execute/pr60003.c: Likewise.
> 	* gcc.c-torture/execute/pr26983.c: Likewise.
> 	* gcc.dg/pr57287-2.c: Likewise.
> 	* gcc.dg/pr59920-1.c: Likewise.
> 	* gcc.dg/pr59920-2.c: Likewise.
> 	* gcc.dg/pr59920-3.c: Likewise.
> 	* gcc.dg/setjmp-3.c: Likewise.
> 	* gcc.dg/setjmp-4.c: Likewise.
> 	* gcc.dg/setjmp-5.c: Likewise.
> 	* gcc.dg/torture/pr48542.c: Likewise.
> 	* gcc.dg/torture/pr57147-2.c: Likewise.
> 	* gcc.dg/torture/pr59993.c: Likewise.
>
> 	* gcc.dg/torture/stackalign/non-local-goto-1.c: Require nonlocal_goto.
> 	* gcc.dg/torture/stackalign/non-local-goto-2.c: Likewise.
> 	* gcc.dg/torture/stackalign/non-local-goto-3.c: Likewise.
> 	* gcc.dg/torture/stackalign/non-local-goto-4.c: Likewise.
> 	* gcc.dg/torture/stackalign/non-local-goto-5.c: Likewise.
>   	* gcc.dg/torture/stackalign/setjmp-1.c: Likewise.
>   	* gcc.dg/torture/stackalign/setjmp-3.c: Likewise.
>   	* gcc.dg/torture/stackalign/setjmp-4.c: Likewise.
> 	* gcc.dg/non-local-goto-1.c: Likewise.
> 	* gcc.dg/non-local-goto-2.c: Likewise.
> 	* gcc.dg/pr49994-1.c: Likewise.
> 	* gcc.dg/torture/pr57036-2.c: Likewise.
>
> 	* gcc.c-torture/compile/20040614-1.c: Require label_values.  Remove
> 	NO_LABEL_VALUES test.
> 	* gcc.c-torture/compile/920831-1.c: Likewise.
> 	* gcc.c-torture/compile/920502-1.c: Likewise.
> 	* gcc.c-torture/compile/920501-7.c: Likewise.
> 	* gcc.dg/pr52139.c: Likewise.
NO_LABEL_VALUES probably hasn't been consistently kept up-to-date as the 
focus of the project has moved a bit away from embedded.  That code also 
predates the push for check_effective_target_*.

OK for the trunk.

jef

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [4/6] nvptx testsuite patches: xfails and skips
  2014-10-21 15:30   ` Jeff Law
@ 2014-10-21 15:32     ` Bernd Schmidt
  0 siblings, 0 replies; 27+ messages in thread
From: Bernd Schmidt @ 2014-10-21 15:32 UTC (permalink / raw)
  To: Jeff Law, GCC Patches

On 10/21/2014 05:27 PM, Jeff Law wrote:
> More ptx tooling failures than I'd expect.  I'll leave it up to you
> whether or not to push on NVidia to fix some of those failures.  The
> timeouts seem particularly troublesome.

All I can say is that we've reported them.


Bernd


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [2/6] nvptx testsuite patches: typed assembly
  2014-10-21 15:22   ` Jeff Law
@ 2014-10-21 15:33     ` Bernd Schmidt
  2014-11-10 16:23       ` Bernd Schmidt
  0 siblings, 1 reply; 27+ messages in thread
From: Bernd Schmidt @ 2014-10-21 15:33 UTC (permalink / raw)
  To: Jeff Law, GCC Patches

On 10/21/2014 05:16 PM, Jeff Law wrote:
> On 10/21/14 14:15, Bernd Schmidt wrote:
>> Since everything in ptx assembly is typed, K&R C is problematic. There
>> are a number of testcases that call functions with the wrong number of
>> arguments, or arguments of the wrong type. I've added a new feature,
>> untyped_assembly, which these tests now require. I've also used this for
>> tests using builtin_apply/builtin_return.
> I'd kind of prefer to see the tests fixed, but I can live with this.

Most of these are quite old, and it seems likely that they should be 
kept as they are for test coverage - it's desirable to know that the 
compiler doesn't crash when a K&R function is called with varying 
numbers of arguments for example.


Bernd

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [6/7] Random tweaks
  2014-10-21 14:30 ` [6/7] Random tweaks Bernd Schmidt
@ 2014-10-21 15:33   ` Jeff Law
  2014-10-21 17:04     ` Jakub Jelinek
  0 siblings, 1 reply; 27+ messages in thread
From: Jeff Law @ 2014-10-21 15:33 UTC (permalink / raw)
  To: Bernd Schmidt, GCC Patches

On 10/21/14 14:26, Bernd Schmidt wrote:
> This tweaks a few tests so that we don't have to skip them.  This is
> mostly concerned with declaring main properly, or changing other
> declarations where the test does not seem to rely on the type mismatches.
>
> I've also included one example of changing a function name to not be
> "call", ptxas seems to have a bug that makes it not allow this function
> name. If that doesn't seem too awful I'll have a few more tests to fix
> up in this way.
>
> There'll be a 7th patch, not because I can't count, but because I didn't
> follow a consistent naming scheme for the patches.
>
>
> Bernd
>
>
> ts-tweaks.diff
>
>
> 	* gcc.c-torture/compile/920625-2.c: Add return type to
> 	freeReturnStruct.
> 	* gcc.c-torture/execute/20091229-1.c: Declare main properly.
> 	* gcc.c-torture/execute/pr61375.c: Likewise.
> 	* gcc.c-torture/execute/20111208-1.c: Use __SIZE_TYPE__ for size_t.
> 	* gcc.dg/pr30904.c: Remove extern from declaration of t.
> 	* gcc.c-torture/compile/callind.c (bar): Renamed from call.
Are any of these obsoleted by Marek's work around gnu11?  If not, 
they're all fine for the trunk.

jeff

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [7/7] nvptx testsuite patches: Return addresses
  2014-10-21 14:34 ` [7/7] nvptx testsuite patches: Return addresses Bernd Schmidt
@ 2014-10-21 15:34   ` Jeff Law
  2014-11-10 20:21     ` H.J. Lu
  0 siblings, 1 reply; 27+ messages in thread
From: Jeff Law @ 2014-10-21 15:34 UTC (permalink / raw)
  To: Bernd Schmidt, GCC Patches

On 10/21/14 14:29, Bernd Schmidt wrote:
> This tests for availability of return addresses in a number of tests.
>
>
> Bernd
>
>
> r422426.diff
>
>
> 	gcc/testsuite/
> 	* lib/target-supports.exp (check_effective_target_return_address):
> 	New function.
> 	* gcc.c-torture/execute/20010122-1.c: Require return_address.
> 	* gcc.c-torture/execute/20030323-1.c: Likewise.
> 	* gcc.c-torture/execute/20030811-1.c: Likewise.
> 	* gcc.c-torture/execute/eeprof-1.c: Likewise.
> 	* gcc.c-torture/execute/frame-address.c: Likewise.
> 	* gcc.c-torture/execute/pr17377.c: Likewise.
OK.
jeff

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [6/7] Random tweaks
  2014-10-21 15:33   ` Jeff Law
@ 2014-10-21 17:04     ` Jakub Jelinek
  2014-10-21 17:49       ` Marek Polacek
  0 siblings, 1 reply; 27+ messages in thread
From: Jakub Jelinek @ 2014-10-21 17:04 UTC (permalink / raw)
  To: Jeff Law; +Cc: Bernd Schmidt, GCC Patches

On Tue, Oct 21, 2014 at 03:32:31PM +0000, Jeff Law wrote:
> On 10/21/14 14:26, Bernd Schmidt wrote:
> >This tweaks a few tests so that we don't have to skip them.  This is
> >mostly concerned with declaring main properly, or changing other
> >declarations where the test does not seem to rely on the type mismatches.
> >
> >I've also included one example of changing a function name to not be
> >"call", ptxas seems to have a bug that makes it not allow this function
> >name. If that doesn't seem too awful I'll have a few more tests to fix
> >up in this way.
> >
> >There'll be a 7th patch, not because I can't count, but because I didn't
> >follow a consistent naming scheme for the patches.
> >
> >
> >Bernd
> >
> >
> >ts-tweaks.diff
> >
> >
> >	* gcc.c-torture/compile/920625-2.c: Add return type to
> >	freeReturnStruct.
> >	* gcc.c-torture/execute/20091229-1.c: Declare main properly.
> >	* gcc.c-torture/execute/pr61375.c: Likewise.
> >	* gcc.c-torture/execute/20111208-1.c: Use __SIZE_TYPE__ for size_t.
> >	* gcc.dg/pr30904.c: Remove extern from declaration of t.
> >	* gcc.c-torture/compile/callind.c (bar): Renamed from call.
> Are any of these obsoleted by Marek's work around gnu11?  If not, they're
> all fine for the trunk.

I think Marek went only for stuff reported as failures in the testsuite.
gcc.c-torture/compile/ defaults to -w I think, supposedly execute/ too,
so C11 incompatibilities in there might not have been reported.

	Jakub

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [6/7] Random tweaks
  2014-10-21 17:04     ` Jakub Jelinek
@ 2014-10-21 17:49       ` Marek Polacek
  2014-10-21 20:24         ` Mike Stump
  0 siblings, 1 reply; 27+ messages in thread
From: Marek Polacek @ 2014-10-21 17:49 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Jeff Law, Bernd Schmidt, GCC Patches

On Tue, Oct 21, 2014 at 06:48:55PM +0200, Jakub Jelinek wrote:
> On Tue, Oct 21, 2014 at 03:32:31PM +0000, Jeff Law wrote:
> > On 10/21/14 14:26, Bernd Schmidt wrote:
> > >This tweaks a few tests so that we don't have to skip them.  This is
> > >mostly concerned with declaring main properly, or changing other
> > >declarations where the test does not seem to rely on the type mismatches.
> > >
> > >I've also included one example of changing a function name to not be
> > >"call", ptxas seems to have a bug that makes it not allow this function
> > >name. If that doesn't seem too awful I'll have a few more tests to fix
> > >up in this way.
> > >
> > >There'll be a 7th patch, not because I can't count, but because I didn't
> > >follow a consistent naming scheme for the patches.
> > >
> > >
> > >Bernd
> > >
> > >
> > >ts-tweaks.diff
> > >
> > >
> > >	* gcc.c-torture/compile/920625-2.c: Add return type to
> > >	freeReturnStruct.
> > >	* gcc.c-torture/execute/20091229-1.c: Declare main properly.
> > >	* gcc.c-torture/execute/pr61375.c: Likewise.
> > >	* gcc.c-torture/execute/20111208-1.c: Use __SIZE_TYPE__ for size_t.
> > >	* gcc.dg/pr30904.c: Remove extern from declaration of t.
> > >	* gcc.c-torture/compile/callind.c (bar): Renamed from call.
> > Are any of these obsoleted by Marek's work around gnu11?  If not, they're
> > all fine for the trunk.
> 
> I think Marek went only for stuff reported as failures in the testsuite.

That's right.

> gcc.c-torture/compile/ defaults to -w I think, supposedly execute/ too,
> so C11 incompatibilities in there might not have been reported.

I can remove the -w and fix C89/C11 incompatibilities, if anyone
thinks it's worth it.

	Marek

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [3/6] nvptx testsuite patches: stdio
  2014-10-21 14:19 ` [3/6] nvptx testsuite patches: stdio Bernd Schmidt
  2014-10-21 15:24   ` Jeff Law
@ 2014-10-21 19:28   ` Mike Stump
  2014-10-21 21:11     ` Bernd Schmidt
  1 sibling, 1 reply; 27+ messages in thread
From: Mike Stump @ 2014-10-21 19:28 UTC (permalink / raw)
  To: Bernd Schmidt; +Cc: GCC Patches

On Oct 21, 2014, at 7:17 AM, Bernd Schmidt <bernds@codesourcery.com> wrote:
> Some tests use stdio functions which are unavaiable with the cut-down newlib I'm using for ptx testing. I'm somewhat uncertain what to do with these; they are by no means the only unavailable library functions the testsuite tries to use (signal is another example). Here's a patch which deals with parts of the problem, but I wouldn't mind leaving this one out if it doesn't seem worthwhile.

So, it is nice if an entire newlib port can be done, then, you don’t have to worry about subsets of it.

I think the patch is Ok, I would change:

+#ifndef __nvptx__
   fprintf (stderr, "Test failed: %s\n", msg);
+#endif

to just comment out the line.

If you want to try your hand at removing stdio in some fashion, you can try, I am skeptical that there is a meaningful way to do that and it seems larger and harder then the patch you have.  The usual fashion I would recommend would be a stub library for testing that simply disappears such calls as uninteresting.  int fpritnf (…) { return 0; } would go a long way.  For test cases that someone care about what fprintf actually does, those can be marked as stdio and likely, those would be a far smaller set to so mark.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [6/7] Random tweaks
  2014-10-21 17:49       ` Marek Polacek
@ 2014-10-21 20:24         ` Mike Stump
  0 siblings, 0 replies; 27+ messages in thread
From: Mike Stump @ 2014-10-21 20:24 UTC (permalink / raw)
  To: Marek Polacek; +Cc: Jakub Jelinek, Jeff Law, Bernd Schmidt, GCC Patches

On Oct 21, 2014, at 10:46 AM, Marek Polacek <polacek@redhat.com> wrote:
> 
> I can remove the -w and fix C89/C11 incompatibilities, if anyone
> thinks it's worth it.

I’d leave the -w, no point in spending much time worrying about it.  The -w is so that no one has to spend time worrying about it.  If you want to fix the language to avoid the warnings when -w isn’t given, feel free.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [3/6] nvptx testsuite patches: stdio
  2014-10-21 19:28   ` Mike Stump
@ 2014-10-21 21:11     ` Bernd Schmidt
  0 siblings, 0 replies; 27+ messages in thread
From: Bernd Schmidt @ 2014-10-21 21:11 UTC (permalink / raw)
  To: Mike Stump; +Cc: GCC Patches

On 10/21/2014 09:01 PM, Mike Stump wrote:
> On Oct 21, 2014, at 7:17 AM, Bernd Schmidt <bernds@codesourcery.com>
> wrote:
>> Some tests use stdio functions which are unavaiable with the
>> cut-down newlib I'm using for ptx testing. I'm somewhat uncertain
>> what to do with these; they are by no means the only unavailable
>> library functions the testsuite tries to use (signal is another
>> example). Here's a patch which deals with parts of the problem, but
>> I wouldn't mind leaving this one out if it doesn't seem
>> worthwhile.
>
> So, it is nice if an entire newlib port can be done, then, you donÂ’t
> have to worry about subsets of it.

That's probably true, but not all functionality can be supported - 
there's no way to do things like signal or setjmp on this target. Rather 
than compile in stuff that doesn't work I thought it better to have link 
errors.

> If you want to try your hand at removing stdio in some fashion, you
> can try, I am skeptical that there is a meaningful way to do that and
> it seems larger and harder then the patch you have.  The usual
> fashion I would recommend would be a stub library for testing that
> simply disappears such calls as uninteresting.  int fpritnf (Â…) {
> return 0; } would go a long way.  For test cases that someone care
> about what fprintf actually does, those can be marked as stdio and
> likely, those would be a far smaller set to so mark.

Hmm, that seems like an ide, a nvptx libteststubs.a. That might clean up 
additional noise from the results.


Bernd

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [2/6] nvptx testsuite patches: typed assembly
  2014-10-21 15:33     ` Bernd Schmidt
@ 2014-11-10 16:23       ` Bernd Schmidt
  0 siblings, 0 replies; 27+ messages in thread
From: Bernd Schmidt @ 2014-11-10 16:23 UTC (permalink / raw)
  To: Jeff Law, GCC Patches

On 10/21/2014 05:32 PM, Bernd Schmidt wrote:
> On 10/21/2014 05:16 PM, Jeff Law wrote:
>> On 10/21/14 14:15, Bernd Schmidt wrote:
>>> Since everything in ptx assembly is typed, K&R C is problematic. There
>>> are a number of testcases that call functions with the wrong number of
>>> arguments, or arguments of the wrong type. I've added a new feature,
>>> untyped_assembly, which these tests now require. I've also used this for
>>> tests using builtin_apply/builtin_return.
>> I'd kind of prefer to see the tests fixed, but I can live with this.
>
> Most of these are quite old, and it seems likely that they should be
> kept as they are for test coverage - it's desirable to know that the
> compiler doesn't crash when a K&R function is called with varying
> numbers of arguments for example.

Just a note that I'm assuming that your mail was an approval and 
checking this in.


Bernd

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [7/7] nvptx testsuite patches: Return addresses
  2014-10-21 15:34   ` Jeff Law
@ 2014-11-10 20:21     ` H.J. Lu
  2014-11-10 20:33       ` Mike Stump
  2014-11-11 11:58       ` Bernd Schmidt
  0 siblings, 2 replies; 27+ messages in thread
From: H.J. Lu @ 2014-11-10 20:21 UTC (permalink / raw)
  To: Jeff Law; +Cc: Bernd Schmidt, GCC Patches

On Tue, Oct 21, 2014 at 8:33 AM, Jeff Law <law@redhat.com> wrote:
> On 10/21/14 14:29, Bernd Schmidt wrote:
>>
>> This tests for availability of return addresses in a number of tests.
>>
>>
>> Bernd
>>
>>
>> r422426.diff
>>
>>
>>         gcc/testsuite/
>>         * lib/target-supports.exp (check_effective_target_return_address):
>>         New function.
>>         * gcc.c-torture/execute/20010122-1.c: Require return_address.
>>         * gcc.c-torture/execute/20030323-1.c: Likewise.
>>         * gcc.c-torture/execute/20030811-1.c: Likewise.
>>         * gcc.c-torture/execute/eeprof-1.c: Likewise.
>>         * gcc.c-torture/execute/frame-address.c: Likewise.
>>         * gcc.c-torture/execute/pr17377.c: Likewise.
>
> OK.
> jeff
>

I checked in this patch to revert the accidental checkin.

-- 
H.J.
----
Index: ChangeLog
===================================================================
--- ChangeLog (revision 217312)
+++ ChangeLog (working copy)
@@ -1,3 +1,7 @@
+2014-11-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+ * gcc.c-torture/compile/pr35468.c: Revert the last change.
+
 2014-11-10  Andreas Tobler  <andreast@gcc.gnu.org>

  * gcc.dg/fshort-wchar.c: Use arm_eabi instead of arm*-*-*eabi*.
Index: gcc.c-torture/compile/pr35468.c
===================================================================
--- gcc.c-torture/compile/pr35468.c (revision 217312)
+++ gcc.c-torture/compile/pr35468.c (working copy)
@@ -1,5 +1,4 @@
 /* PR tree-optimization/35468 */
-/* { dg-require-effective-target no_const_addr_space } */

 void
 foo (void)

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [7/7] nvptx testsuite patches: Return addresses
  2014-11-10 20:21     ` H.J. Lu
@ 2014-11-10 20:33       ` Mike Stump
  2014-11-11 11:58       ` Bernd Schmidt
  1 sibling, 0 replies; 27+ messages in thread
From: Mike Stump @ 2014-11-10 20:33 UTC (permalink / raw)
  To: H.J. Lu; +Cc: Jeff Law, Bernd Schmidt, GCC Patches

On Nov 10, 2014, at 12:19 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> I checked in this patch to revert the accidental checkin.

Thanks.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [7/7] nvptx testsuite patches: Return addresses
  2014-11-10 20:21     ` H.J. Lu
  2014-11-10 20:33       ` Mike Stump
@ 2014-11-11 11:58       ` Bernd Schmidt
  1 sibling, 0 replies; 27+ messages in thread
From: Bernd Schmidt @ 2014-11-11 11:58 UTC (permalink / raw)
  To: H.J. Lu, Jeff Law; +Cc: GCC Patches

On 11/10/2014 09:19 PM, H.J. Lu wrote:
> I checked in this patch to revert the accidental checkin.

Sorry about that, and thanks for fixing it.


Bernd

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2014-11-11 11:56 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-21 14:13 [0/6] nvptx testsuite patches Bernd Schmidt
2014-10-21 14:13 ` [1/6] nvptx testsuite patches: alloca Bernd Schmidt
2014-10-21 15:16   ` Jeff Law
2014-10-21 14:19 ` [2/6] nvptx testsuite patches: typed assembly Bernd Schmidt
2014-10-21 15:22   ` Jeff Law
2014-10-21 15:33     ` Bernd Schmidt
2014-11-10 16:23       ` Bernd Schmidt
2014-10-21 14:19 ` [3/6] nvptx testsuite patches: stdio Bernd Schmidt
2014-10-21 15:24   ` Jeff Law
2014-10-21 19:28   ` Mike Stump
2014-10-21 21:11     ` Bernd Schmidt
2014-10-21 14:22 ` [4/6] nvptx testsuite patches: xfails and skips Bernd Schmidt
2014-10-21 15:30   ` Jeff Law
2014-10-21 15:32     ` Bernd Schmidt
2014-10-21 14:27 ` [5/6] nvptx testsuite patches: jumps and labels Bernd Schmidt
2014-10-21 15:31   ` Jeff Law
2014-10-21 14:30 ` [6/7] Random tweaks Bernd Schmidt
2014-10-21 15:33   ` Jeff Law
2014-10-21 17:04     ` Jakub Jelinek
2014-10-21 17:49       ` Marek Polacek
2014-10-21 20:24         ` Mike Stump
2014-10-21 14:34 ` [7/7] nvptx testsuite patches: Return addresses Bernd Schmidt
2014-10-21 15:34   ` Jeff Law
2014-11-10 20:21     ` H.J. Lu
2014-11-10 20:33       ` Mike Stump
2014-11-11 11:58       ` Bernd Schmidt
2014-10-21 14:48 ` [0/6] nvptx testsuite patches Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).