From patchwork Tue Oct 8 07:17:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 281344 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9B8E42C00AB for ; Tue, 8 Oct 2013 18:18:02 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; q=dns; s=default; b=scVbktfUCItB94luwe1o/iCnRTJWJ4FLL4z5fEm5ZlFsuHw2ps MurA81/WxIzbsU15Yx+naFlFdGEe2yeN32gsChOlNtlfj2n9N24s+Eo2WusnK9FR CDcYe08Asl6G6urmySUWZUWKhwktxPJFXeI8btpiK8/pvywS7aBJG8Bec= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; s= default; bh=b5lwM8TwkWSvv3tqe/j0mD9u8ws=; b=lMbAYkUI6ePWlEBeW6Xv KKS50V29zAeE8uLZzEu3DUqCAH6d7i7vgqpEM3DpGmegHA2Fa0UjgEW4TqJWOZ1S wCh3dxKD9eN32VP1cxpbZdp3s1vBC6lPx5uRTxOkyK1+z9v7e06QTM9THssXrBNm 8BKClgGP2vObq/UmqPbHQds= Received: (qmail 30404 invoked by alias); 8 Oct 2013 07:17:56 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 30391 invoked by uid 89); 8 Oct 2013 07:17:55 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, FROM_12LTRDOM autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 08 Oct 2013 07:17:53 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1VTRYD-00026m-FQ from Thomas_Schwinge@mentor.com ; Tue, 08 Oct 2013 00:17:49 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 8 Oct 2013 00:17:49 -0700 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Tue, 8 Oct 2013 08:17:47 +0100 From: Thomas Schwinge To: CC: Subject: Cleanup patches User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/23.4.1 (x86_64-pc-linux-gnu) Date: Tue, 8 Oct 2013 09:17:35 +0200 Message-ID: <877gdout80.fsf@schwinge.name> MIME-Version: 1.0 Hi! Here are a few cleanup patches, mostly in the realm of OpenMP, so Jakub gets a CC. OK to commit? libgomp/ * omp.h.in: Don't touch the user's namespace. --- libgomp/omp.h.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Grüße, Thomas diff --git libgomp/omp.h.in libgomp/omp.h.in index 5db4407..ce68163 100644 --- libgomp/omp.h.in +++ libgomp/omp.h.in @@ -22,8 +22,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ -#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(-) diff --git gcc/doc/gimple.texi gcc/doc/gimple.texi index 896aea3..7bd9fd5 100644 --- gcc/doc/gimple.texi +++ gcc/doc/gimple.texi @@ -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(+) diff --git gcc/doc/generic.texi gcc/doc/generic.texi index cacab01..07e3f5a 100644 --- gcc/doc/generic.texi +++ gcc/doc/generic.texi @@ -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(-) diff --git gcc/doc/generic.texi gcc/doc/generic.texi index 07e3f5a..ccecd6e 100644 --- gcc/doc/generic.texi +++ gcc/doc/generic.texi @@ -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(-) diff --git gcc/gimple.c gcc/gimple.c index dbcfa3a..4776a7d 100644 --- gcc/gimple.c +++ gcc/gimple.c @@ -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. */ diff --git gcc/gimple.h gcc/gimple.h index e7021a4..636b9e2 100644 --- gcc/gimple.h +++ gcc/gimple.h @@ -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(-) diff --git gcc/testsuite/g++.dg/gomp/gomp.exp gcc/testsuite/g++.dg/gomp/gomp.exp index d0199cb..e783bdb 100644 --- gcc/testsuite/g++.dg/gomp/gomp.exp +++ gcc/testsuite/g++.dg/gomp/gomp.exp @@ -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 diff --git gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.1.c gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.1.c index 4196b2d..f2c4a67 100644 --- gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.1.c +++ gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.1.c @@ -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); } diff --git gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.3.c gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.3.c index 31b2ddf..64005b3 100644 --- gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.3.c +++ gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.3.c @@ -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); } } diff --git gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.4.c gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.4.c index d7579e6..5bb6b80 100644 --- gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.4.c +++ gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.4.c @@ -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); } } diff --git gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.6.c gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.6.c index ac850e5..d18188b 100644 --- gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.6.c +++ gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.6.c @@ -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); } } diff --git gcc/testsuite/gcc.dg/gomp/gomp.exp gcc/testsuite/gcc.dg/gomp/gomp.exp index ca8aefd..cc2cd8e 100644 --- gcc/testsuite/gcc.dg/gomp/gomp.exp +++ gcc/testsuite/gcc.dg/gomp/gomp.exp @@ -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(-) diff --git gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.5.c gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.5.c index 7b53015..7b4aee1 100644 --- gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.5.c +++ gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.5.c @@ -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); } }