[PATCH] gcc.dg/gomp/ cleanup

Marek Polacek polacek@redhat.com
Fri Oct 3 11:12:00 GMT 2014


This patch is a cleanup of tests in gcc.dg/gomp/ directory.
See https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02656.html for more info.

Tested on x86_64-linux: vanilla results == results with this patch ==
results with this patch and gnu11 as a default.

Applying to trunk.

2014-10-03  Marek Polacek  <polacek@redhat.com>

	* gcc.dg/gomp/appendix-a/a.35.4.c: Fix implicit declarations.
	* gcc.dg/gomp/appendix-a/a.35.5.c: Likewise.
	* gcc.dg/gomp/appendix-a/a.35.6.c: Likewise.
	* gcc.dg/gomp/asm-1.c: Likewise.
	* gcc.dg/gomp/for-1.c: Likewise.
	* gcc.dg/gomp/empty.c: Fix defaulting to int.
	* gcc.dg/gomp/sharing-3.c: Likewise.
	* gcc.dg/gomp/udr-3.c: Use -std=gnu89.

diff --git gcc/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.4.c gcc/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.4.c
index 5bb6b80..8562fca 100644
--- gcc/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.4.c
+++ gcc/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.4.c
@@ -1,5 +1,7 @@
 /* { dg-do compile } */
 
+void work (int, int);
+
 void
 wrong4 (int n)
 {
diff --git gcc/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.5.c gcc/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.5.c
index 7b4aee1..90d2966 100644
--- gcc/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.5.c
+++ gcc/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.5.c
@@ -1,5 +1,7 @@
 /* { dg-do compile } */
 
+void work (int, int);
+
 void
 wrong5 (int n)
 {
diff --git gcc/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.6.c gcc/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.6.c
index d18188b..6260be7 100644
--- gcc/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.6.c
+++ gcc/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.6.c
@@ -1,5 +1,7 @@
 /* { dg-do compile } */
 
+void work (int, int);
+
 void
 wrong6 (int n)
 {
diff --git gcc/gcc/testsuite/gcc.dg/gomp/asm-1.c gcc/gcc/testsuite/gcc.dg/gomp/asm-1.c
index ced31f3..2b428c0 100644
--- gcc/gcc/testsuite/gcc.dg/gomp/asm-1.c
+++ gcc/gcc/testsuite/gcc.dg/gomp/asm-1.c
@@ -2,6 +2,8 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -fopenmp" } */
 
+extern int omp_get_thread_num (void);
+
 void
 foo (void)
 {
diff --git gcc/gcc/testsuite/gcc.dg/gomp/empty.c gcc/gcc/testsuite/gcc.dg/gomp/empty.c
index 6a21c04..c7aba8f 100644
--- gcc/gcc/testsuite/gcc.dg/gomp/empty.c
+++ gcc/gcc/testsuite/gcc.dg/gomp/empty.c
@@ -1,6 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-O -fopenmp -fdump-tree-ompexp" } */
 
+int
 main()
 {
 #pragma omp parallel
diff --git gcc/gcc/testsuite/gcc.dg/gomp/for-1.c gcc/gcc/testsuite/gcc.dg/gomp/for-1.c
index 384293e..80e0d0b 100644
--- gcc/gcc/testsuite/gcc.dg/gomp/for-1.c
+++ gcc/gcc/testsuite/gcc.dg/gomp/for-1.c
@@ -1,6 +1,8 @@
 /* { dg-do compile } */
 /* { dg-options "-fopenmp -fshow-column" } */
 
+void baz (int);
+
 void foo (int j, int k)
 {
   int i;
diff --git gcc/gcc/testsuite/gcc.dg/gomp/sharing-3.c gcc/gcc/testsuite/gcc.dg/gomp/sharing-3.c
index 36f72e3..4a30198 100644
--- gcc/gcc/testsuite/gcc.dg/gomp/sharing-3.c
+++ gcc/gcc/testsuite/gcc.dg/gomp/sharing-3.c
@@ -3,6 +3,7 @@
 #define N       50
 #define CHUNKSIZE   5
 
+int
 main ()
 {
   int i, chunk;
diff --git gcc/gcc/testsuite/gcc.dg/gomp/udr-3.c gcc/gcc/testsuite/gcc.dg/gomp/udr-3.c
index bdfcce1..96450cd 100644
--- gcc/gcc/testsuite/gcc.dg/gomp/udr-3.c
+++ gcc/gcc/testsuite/gcc.dg/gomp/udr-3.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-fopenmp" } */
+/* { dg-options "-fopenmp -std=gnu89" } */
 
 struct S { int s; };
 struct T { int t; };

	Marek



More information about the Gcc-patches mailing list