diff mbox

[test] remove another io need

Message ID 55DB22E9.2060303@acm.org
State New
Headers show

Commit Message

Nathan Sidwell Aug. 24, 2015, 1:58 p.m. UTC
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
diff mbox

Patch

2015-08-24  Nathan Sidwell  <nathan@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);