This is another case of a test failing for PTX because it wanted to use IO. We don't need to call fflush and abort, we could just return 'exit (1)'. This changes the relevant macro to do just that.

As with the matrix patch, other targets should be unaffected.

Any objections?

nathan
2015-08-24  Nathan Sidwell  <nat...@acm.org>

	* gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c: Simply
	use exit code for failure.

Index: gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
===================================================================
--- gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c	(revision 227123)
+++ gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c	(working copy)
@@ -805,12 +805,7 @@ int main (void)\n\
 #define TX(n, type, attrs, fields, ops)   test##n ();\n\
 #include \"t%03d_test.h\"\n\
 #undef TX\n\
-  if (fails)\n\
-    {\n\
-      fflush (stdout);\n\
-      abort ();\n\
-    }\n\
-  exit (0);\n\
+  exit (fails != 0);\n\
 }\n", filecnt, filecnt);
   fclose (outfile);
   sprintf (destptr, "t%03d_x.c", filecnt);

Reply via email to