Commit 1e89760d by Zack Weinberg Committed by Zack Weinberg

acker1.c: Report failure.

	* gcc.misc-tests/acker1.c: Report failure.  Use return from main,
	not exit. Include stdio.h.
	* gcc.misc-tests/dg-11.c: Remove anchors from regexp.
	* gcc.misc-tests/dg-12.c: Likewise.
	* gcc.misc-tests/dg-5.c: Likewise.
	* gcc.misc-tests/dg-6.c: Likewise.
	* gcc.misc-tests/dg-7.c: Prototype abort.
	* gcc.misc-tests/dg-9.c: Adjust error-message regexps.
	* gcc.misc-tests/dhry.h: Include stdlib.h and string.h.
	* gcc.misc-tests/matrix1.c: Report failure.  Use return from main,
	not exit.
	* gcc.misc-tests/sieve.c: Use return from main, not exit.
	* gcc.misc-tests/sort2.c: Use return from main, not exit.

From-SVN: r34763
parent 39ab19f6
2000-06-28 Zack Weinberg <zack@wolery.cumb.org>
* gcc.misc-tests/acker1.c: Report failure. Use return from main,
not exit. Include stdio.h.
* gcc.misc-tests/dg-11.c: Remove anchors from regexp.
* gcc.misc-tests/dg-12.c: Likewise.
* gcc.misc-tests/dg-5.c: Likewise.
* gcc.misc-tests/dg-6.c: Likewise.
* gcc.misc-tests/dg-7.c: Prototype abort.
* gcc.misc-tests/dg-9.c: Adjust error-message regexps.
* gcc.misc-tests/dhry.h: Include stdlib.h and string.h.
* gcc.misc-tests/matrix1.c: Report failure. Use return from main,
not exit.
* gcc.misc-tests/sieve.c: Use return from main, not exit.
* gcc.misc-tests/sort2.c: Use return from main, not exit.
2000-06-28 Jakub Jelinek <jakub@redhat.com> 2000-06-28 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/cpp/20000628-1.c: New test. * gcc.dg/cpp/20000628-1.c: New test.
......
#include <stdio.h>
int acker(int, int); int acker(int, int);
void main() int
main(void)
{ {
acker(3,6); int n = acker(3,6);
/* */ if (n != 509)
exit(0); printf("acker(3,6) = %d != 509\n", n);
/* */ return(0);
} }
int int
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* { dg-prms-id 42 } */ /* { dg-prms-id 42 } */
/* { dg-do run { target sparc-sun-solaris2* } } */ /* { dg-do run { target sparc-sun-solaris2* } } */
/* The \n is left out of the pattern because tcl's exec will remove it. */ /* The \n is left out of the pattern because tcl's exec will remove it. */
/* { dg-output {^Hello world[.]$} } */ /* { dg-output {Hello world[.]} } */
#include <stdio.h> #include <stdio.h>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* { dg-prms-id 42 } */ /* { dg-prms-id 42 } */
/* { dg-do run { target foo-bar-eh } } */ /* { dg-do run { target foo-bar-eh } } */
/* The \n is left out of the pattern because tcl's exec will remove it. */ /* The \n is left out of the pattern because tcl's exec will remove it. */
/* { dg-output {^Hello world[.]$} } */ /* { dg-output {Hello world[.]} } */
#include <stdio.h> #include <stdio.h>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* { dg-prms-id 42 } */ /* { dg-prms-id 42 } */
/* { dg-do run } */ /* { dg-do run } */
/* The \n is left out of the pattern because tcl's exec will remove it. */ /* The \n is left out of the pattern because tcl's exec will remove it. */
/* { dg-output {^Hello world[.]$} } */ /* { dg-output {Hello world[.]} } */
#include <stdio.h> #include <stdio.h>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* { dg-prms-id 42 } */ /* { dg-prms-id 42 } */
/* { dg-do run { target *-*-* } } */ /* { dg-do run { target *-*-* } } */
/* The \n is left out of the pattern because tcl's exec will remove it. */ /* The \n is left out of the pattern because tcl's exec will remove it. */
/* { dg-output {^Hello world[.]$} { xfail *-*-* } } */ /* { dg-output {Hello world[.]} { xfail *-*-* } } */
#include <stdio.h> #include <stdio.h>
......
/* Test the tester. */ /* Test the tester. */
/* { dg-prms-id 42 } */ /* { dg-prms-id 42 } */
/* { dg-do run { xfail *-*-* } } */ /* { dg-do run { xfail *-*-* } } */
extern void abort (void);
main () { abort (); return 0; } main () { abort (); return 0; }
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
/* { dg-options "-Wall" } */ /* { dg-options "-Wall" } */
f () f ()
{ /* { dg-warning "return-type" "warning test" } */ { /* { dg-warning "return type" "warning test" } */
} /* { dg-warning "control reaches end" "warning test" } */ } /* { dg-warning "control reaches end" "warning test" } */
main (int argc, char *argv[]) main (int argc, char *argv[])
{ /* { dg-warning "return-type" "warning test" } */ { /* { dg-warning "return type" "warning test" } */
foo a; /* { dg-error "syntax" "error test" } */ +; /* { dg-error "parse" "error test 2" { target *-*-* } 11 } */
/* { dg-bogus "foobar" "bogus fail test" } */ /* { dg-bogus "foobar" "bogus fail test" } */
return a; /* { dg-bogus "undeclared|identifier|appears" "bogus pass test" { xfail *-*-* } } */ return a; /* { dg-bogus "undeclared|identifier|appears" "bogus pass test" { xfail *-*-* } } */
......
...@@ -392,6 +392,8 @@ ...@@ -392,6 +392,8 @@
/* General definitions: */ /* General definitions: */
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* for strcpy, strcmp */ /* for strcpy, strcmp */
#define Null 0 #define Null 0
......
...@@ -35,12 +35,12 @@ int i,j,k; ...@@ -35,12 +35,12 @@ int i,j,k;
{ {
if (c[i][j] != BOUND) if (c[i][j] != BOUND)
{ {
/*printf("ERROR\n");*/ puts("ERROR");
return 0; return 0;
} }
} }
} }
i=5; i=5;
exit (0); return 0;
} }
...@@ -21,6 +21,6 @@ main() ...@@ -21,6 +21,6 @@ main()
} }
} }
} }
/* */ exit(0); /* */ return 0;
} }
...@@ -23,7 +23,7 @@ for (L = 0; L < 1000; L++) { ...@@ -23,7 +23,7 @@ for (L = 0; L < 1000; L++) {
Sort_array(Tab,99); /* Sort it. */ Sort_array(Tab,99); /* Sort it. */
/* Print_array(); */ /* Print_array(); */
} }
/* */ exit(0); /* */ return 0;
} }
void Sort_array(Tab,Last) int Tab[]; int Last; { void Sort_array(Tab,Last) int Tab[]; int Last; {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment