@@ -22,8 +22,8 @@
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
-#ifndef OMP_H
-#define OMP_H 1
+#ifndef _OMP_H
+#define _OMP_H 1
#ifndef _LIBGOMP_OMP_LOCK_DEFINED
#define _LIBGOMP_OMP_LOCK_DEFINED 1
@@ -104,4 +104,4 @@ int omp_in_final (void) __GOMP_NOTHROW;
}
#endif
-#endif /* OMP_H */
+#endif /* _OMP_H */
gcc/
* doc/gimple.texi (is_gimple_omp): Move into the correct section.
---
gcc/doc/gimple.texi | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
@@ -711,6 +711,10 @@ Return true if g is a @code{GIMPLE_DEBUG} that binds the value of an
expression to a variable.
@end deftypefn
+@deftypefn {GIMPLE function} bool is_gimple_omp (gimple g)
+Return true if g is any of the OpenMP codes.
+@end deftypefn
+
@node Manipulating GIMPLE statements
@section Manipulating GIMPLE statements
@cindex Manipulating GIMPLE statements
@@ -1846,11 +1850,6 @@ Return a pointer to the data argument for @code{OMP_PARALLEL} @code{G}.
Set @code{DATA_ARG} to be the data argument for @code{OMP_PARALLEL} @code{G}.
@end deftypefn
-@deftypefn {GIMPLE function} bool is_gimple_omp (gimple stmt)
-Returns true when the gimple statement @code{STMT} is any of the OpenMP
-types.
-@end deftypefn
-
@node @code{GIMPLE_OMP_RETURN}
@subsection @code{GIMPLE_OMP_RETURN}
gcc/
* doc/generic.texi (Adding new DECL node types): Explain *_CHECK
macros.
---
gcc/doc/generic.texi | 5 +++++
1 file changed, 5 insertions(+)
@@ -924,6 +924,11 @@ structures, something like the following should be used
(BASE_STRUCT_CHECK(NODE)->base_struct.fieldname
@end smallexample
+Reading them from the generated @file{all-tree.def} file (which in
+turn includes all the @file{tree.def} files), @file{gencheck.c} is
+used during GCC's build to generate the @code{*_CHECK} macros for all
+tree codes.
+
@end table
The following two patches change the documentation/sources to
consistently talk about subcodes.
gcc/
* doc/generic.texi (OpenMP): OMP_CLAUSE_* are subcodes, not
sub-codes.
---
gcc/doc/generic.texi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -2204,7 +2204,7 @@ regular critical section around the expression is used.
@item OMP_CLAUSE
Represents clauses associated with one of the @code{OMP_} directives.
-Clauses are represented by separate sub-codes defined in
+Clauses are represented by separate subcodes defined in
@file{tree.h}. Clauses codes can be one of:
@code{OMP_CLAUSE_PRIVATE}, @code{OMP_CLAUSE_SHARED},
@code{OMP_CLAUSE_FIRSTPRIVATE},
gcc/
* gimple.c: GIMPLE statements have subcodes, not sub-codes.
* gimple.h: Likewise.
---
gcc/gimple.c | 4 ++--
gcc/gimple.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
@@ -157,7 +157,7 @@ gimple_set_subcode (gimple g, unsigned subcode)
/* Build a tuple with operands. CODE is the statement to build (which
- must be one of the GIMPLE_WITH_OPS tuples). SUBCODE is the sub-code
+ must be one of the GIMPLE_WITH_OPS tuples). SUBCODE is the subcode
for the new tuple. NUM_OPS is the number of operands to allocate. */
#define gimple_build_with_ops(c, s, n) \
@@ -429,7 +429,7 @@ gimple_build_assign_stat (tree lhs, tree rhs MEM_STAT_DECL)
}
-/* Build a GIMPLE_ASSIGN statement with sub-code SUBCODE and operands
+/* Build a GIMPLE_ASSIGN statement with subcode SUBCODE and operands
OP1 and OP2. If OP2 is NULL then SUBCODE must be of class
GIMPLE_UNARY_RHS or GIMPLE_SINGLE_RHS. */
@@ -81,7 +81,7 @@ enum gimple_rhs_class
/* Specific flags for individual GIMPLE statements. These flags are
always stored in gimple_statement_base.subcode and they may only be
- defined for statement codes that do not use sub-codes.
+ defined for statement codes that do not use subcodes.
Values for the masks can overlap as long as the overlapping values
are never used in the same statement class.
And then, I noticed that the gcc.dg/gomp testsuite was missing some of
its test source files:
gcc/testsuite/
* g++.dg/gomp/gomp.exp: Recurse into subdirectories when looking
for test source files.
* gcc.dg/gomp/gomp.exp: Likewise.
* gcc.dg/gomp/appendix-a/a.35.1.c: Expect error.
* gcc.dg/gomp/appendix-a/a.35.3.c: Likewise.
* gcc.dg/gomp/appendix-a/a.35.4.c: Likewise.
* gcc.dg/gomp/appendix-a/a.35.6.c: Likewise.
---
gcc/testsuite/g++.dg/gomp/gomp.exp | 4 +++-
gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.1.c | 2 +-
gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.3.c | 2 +-
gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.4.c | 2 +-
gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.6.c | 2 +-
gcc/testsuite/gcc.dg/gomp/gomp.exp | 4 +++-
6 files changed, 10 insertions(+), 6 deletions(-)
@@ -27,7 +27,9 @@ if ![check_effective_target_fopenmp] {
dg-init
# Main loop.
-g++-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C $srcdir/c-c++-common/gomp/*.c]] "-fopenmp"
+g++-dg-runtest [lsort [concat \
+ [find $srcdir/$subdir *.C] \
+ [find $srcdir/c-c++-common/gomp *.c]]] "-fopenmp"
# All done.
dg-finish
@@ -15,7 +15,7 @@ wrong1 (int n)
for (i = 0; i < n; i++)
{
/* incorrect nesting of loop regions */
-#pragma omp for /* { dg-warning "may not be closely nested" } */
+#pragma omp for /* { dg-error "may not be closely nested" } */
for (j = 0; j < n; j++)
work (i, j);
}
@@ -12,7 +12,7 @@ wrong3 (int n)
for (i = 0; i < n; i++)
{
/* incorrect nesting of regions */
-#pragma omp single /* { dg-warning "may not be closely nested" } */
+#pragma omp single /* { dg-error "may not be closely nested" } */
work (i, 0);
}
}
@@ -11,7 +11,7 @@ wrong4 (int n)
{
work (i, 0);
/* incorrect nesting of barrier region in a loop region */
-#pragma omp barrier /* { dg-warning "may not be closely nested" } */
+#pragma omp barrier /* { dg-error "may not be closely nested" } */
work (i, 1);
}
}
@@ -9,7 +9,7 @@ wrong6 (int n)
{
work (n, 0);
/* incorrect nesting of barrier region in a single region */
-#pragma omp barrier /* { dg-warning "may not be closely nested" } */
+#pragma omp barrier /* { dg-error "may not be closely nested" } */
work (n, 1);
}
}
@@ -29,7 +29,9 @@ if ![check_effective_target_fopenmp] {
dg-init
# Main loop.
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c $srcdir/c-c++-common/gomp/*.c]] "" "-fopenmp"
+dg-runtest [lsort [concat \
+ [find $srcdir/$subdir *.c] \
+ [find $srcdir/c-c++-common/gomp *.c]]] "" "-fopenmp"
# All done.
dg-finish
Plus, the following patch is needed on gomp-4_0-branch:
gcc/testsuite/
* gcc.dg/gomp/appendix-a/a.35.5.c: Expect error.
---
gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.5.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -9,7 +9,7 @@ wrong5 (int n)
{
work (n, 0);
/* incorrect nesting of barrier region in a critical region */
-#pragma omp barrier
+#pragma omp barrier /* { dg-error "may not be closely nested" } */
work (n, 1);
}
}