From patchwork Thu Jan 15 22:18:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 429616 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 13F941401EB for ; Fri, 16 Jan 2015 09:18:34 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=vd59OsuVUwt8H8R/j urjjj6/LYqBAJ+D8BO9iGzOcuadMFDOvp2OSQucFj2h7gC6mkocXwDqTKx+PbcGW 1XUFzX7NlxwdcqiROCPhMwVa6TPB4ZLO4dnVxPozm5VUNqmIXkXIMKq4u4OTzz+j bdVxX3mlk8QC4xszZBqTrJVEjM= 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 :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; s=default; bh=hKPvHdxghJjXoPfpOtPpe5B CIzY=; b=MUcI/5xJ/jmkPK+yd8wQvXURXd5Eq3C4ZwcFzS/4tXKPBLXRoIcGLuZ LsTbu1aEUVUH/6VpBA9Edlq+8uKTtcgLsjIJSJncup3SJ4vynHH2R3a5aTUHXJ7L 5BN/o3zIifMdwpHFwGuZCsPY0X/4usifZOFaxX+UOADIZeV0TVQ0= Received: (qmail 18447 invoked by alias); 15 Jan 2015 22:18:27 -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 18430 invoked by uid 89); 15 Jan 2015 22:18:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx02.qsc.de Received: from mx02.qsc.de (HELO mx02.qsc.de) (213.148.130.14) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 15 Jan 2015 22:18:23 +0000 Received: from tux.net-b.de (port-92-194-119-246.dynamic.qsc.de [92.194.119.246]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPSA id AF2C7253DA; Thu, 15 Jan 2015 23:18:18 +0100 (CET) Message-ID: <54B83CA8.1040309@net-b.de> Date: Thu, 15 Jan 2015 23:18:16 +0100 From: Tobias Burnus User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Thomas Schwinge , gcc-patches@gcc.gnu.org CC: gfortran Subject: Re: Merge current set of OpenACC changes from gomp-4_0-branch References: <87egqvu77s.fsf@schwinge.name> In-Reply-To: <87egqvu77s.fsf@schwinge.name> Hi Thomas, thanks to you and all others involved for the OpenACC merge. Attached is a patch which converts for Fortran '%s' into %qs, as mentioned to before. (It wasn't possible when the original patch was reviewed as the common diagnostic patches came later.) Committed as Rev. 219694. On the Fortran side: Compared with C/C++, support for "acc cache" seems to be missing (PR63865, contains draft-patch link). (Other PRs: the device_resident clause is not supported (PR63859) - I don't know whether it is supported in C/C++ or not. And there are two ICEs (PR63865, PR63858).) – Is some work on those planed on your side for GCC 5 or more likely not? Tobias Thomas Schwinge wrote: > In r219682, I have committed to trunk our current set of OpenACC changes, > which we had prepared on gomp-4_0-branch. Thanks to everyone who has > been contributing! > > Note that this is an experimental feature, incomplete, and subject to > change in future versions of GCC. We shall update -- and keep updated -- > , to track the current status. (Please > come back to that page in a few days, it has not yet been updated.) > > Please note that there are still a handful of patches pending (posted > weeks ago, need to ping) that are needed for nvptx offloading, so that's > not yet functional. > > Here's the commit log. The patch itself is too big to post inline, so > please find it attached, gzipped. 2015-01-15 Tobias Burnus * openmp.c (check_symbol_not_pointer, resolve_oacc_data_clauses, resolve_oacc_deviceptr_clause, resolve_omp_clauses, gfc_resolve_oacc_declare): Replace '%s' by %qs. diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c index 005739b..422e977 100644 --- a/gcc/fortran/openmp.c +++ b/gcc/fortran/openmp.c @@ -1457,7 +1457,7 @@ gfc_match_oacc_routine (void) if (!sym->attr.external && !sym->attr.function && !sym->attr.subroutine) { gfc_error ("Syntax error in !$ACC ROUTINE ( NAME ) at %C, invalid" - " function name '%s'", sym->name); + " function name %qs", sym->name); gfc_current_locus = old_loc; return MATCH_ERROR; } @@ -2649,29 +2649,29 @@ static void check_symbol_not_pointer (gfc_symbol *sym, locus loc, const char *name) { if (sym->ts.type == BT_DERIVED && sym->attr.pointer) - gfc_error ("POINTER object '%s' of derived type in %s clause at %L", + gfc_error ("POINTER object %qs of derived type in %s clause at %L", sym->name, name, &loc); if (sym->ts.type == BT_DERIVED && sym->attr.cray_pointer) - gfc_error ("Cray pointer object of derived type '%s' in %s clause at %L", + gfc_error ("Cray pointer object of derived type %qs in %s clause at %L", sym->name, name, &loc); if (sym->ts.type == BT_DERIVED && sym->attr.cray_pointee) - gfc_error ("Cray pointee object of derived type '%s' in %s clause at %L", + gfc_error ("Cray pointee object of derived type %qs in %s clause at %L", sym->name, name, &loc); if ((sym->ts.type == BT_ASSUMED && sym->attr.pointer) || (sym->ts.type == BT_CLASS && CLASS_DATA (sym) && CLASS_DATA (sym)->attr.pointer)) - gfc_error ("POINTER object '%s' of polymorphic type in %s clause at %L", + gfc_error ("POINTER object %qs of polymorphic type in %s clause at %L", sym->name, name, &loc); if ((sym->ts.type == BT_ASSUMED && sym->attr.cray_pointer) || (sym->ts.type == BT_CLASS && CLASS_DATA (sym) && CLASS_DATA (sym)->attr.cray_pointer)) - gfc_error ("Cray pointer object of polymorphic type '%s' in %s clause at %L", + gfc_error ("Cray pointer object of polymorphic type %qs in %s clause at %L", sym->name, name, &loc); if ((sym->ts.type == BT_ASSUMED && sym->attr.cray_pointee) || (sym->ts.type == BT_CLASS && CLASS_DATA (sym) && CLASS_DATA (sym)->attr.cray_pointee)) - gfc_error ("Cray pointee object of polymorphic type '%s' in %s clause at %L", + gfc_error ("Cray pointee object of polymorphic type %qs in %s clause at %L", sym->name, name, &loc); } @@ -2681,14 +2681,14 @@ static void check_array_not_assumed (gfc_symbol *sym, locus loc, const char *name) { if (sym->as && sym->as->type == AS_ASSUMED_SIZE) - gfc_error ("Assumed size array '%s' in %s clause at %L", + gfc_error ("Assumed size array %qs in %s clause at %L", sym->name, name, &loc); if (sym->as && sym->as->type == AS_ASSUMED_RANK) - gfc_error ("Assumed rank array '%s' in %s clause at %L", + gfc_error ("Assumed rank array %qs in %s clause at %L", sym->name, name, &loc); if (sym->as && sym->as->type == AS_DEFERRED && sym->attr.pointer && !sym->attr.contiguous) - gfc_error ("Noncontiguous deferred shape array '%s' in %s clause at %L", + gfc_error ("Noncontiguous deferred shape array %qs in %s clause at %L", sym->name, name, &loc); } @@ -2696,12 +2696,12 @@ static void resolve_oacc_data_clauses (gfc_symbol *sym, locus loc, const char *name) { if (sym->ts.type == BT_DERIVED && sym->attr.allocatable) - gfc_error ("ALLOCATABLE object '%s' of derived type in %s clause at %L", + gfc_error ("ALLOCATABLE object %qs of derived type in %s clause at %L", sym->name, name, &loc); if ((sym->ts.type == BT_ASSUMED && sym->attr.allocatable) || (sym->ts.type == BT_CLASS && CLASS_DATA (sym) && CLASS_DATA (sym)->attr.allocatable)) - gfc_error ("ALLOCATABLE object '%s' of polymorphic type " + gfc_error ("ALLOCATABLE object %qs of polymorphic type " "in %s clause at %L", sym->name, name, &loc); check_symbol_not_pointer (sym, loc, name); check_array_not_assumed (sym, loc, name); @@ -2713,25 +2713,25 @@ resolve_oacc_deviceptr_clause (gfc_symbol *sym, locus loc, const char *name) if (sym->attr.pointer || (sym->ts.type == BT_CLASS && CLASS_DATA (sym) && CLASS_DATA (sym)->attr.class_pointer)) - gfc_error ("POINTER object '%s' in %s clause at %L", + gfc_error ("POINTER object %qs in %s clause at %L", sym->name, name, &loc); if (sym->attr.cray_pointer || (sym->ts.type == BT_CLASS && CLASS_DATA (sym) && CLASS_DATA (sym)->attr.cray_pointer)) - gfc_error ("Cray pointer object '%s' in %s clause at %L", + gfc_error ("Cray pointer object %qs in %s clause at %L", sym->name, name, &loc); if (sym->attr.cray_pointee || (sym->ts.type == BT_CLASS && CLASS_DATA (sym) && CLASS_DATA (sym)->attr.cray_pointee)) - gfc_error ("Cray pointee object '%s' in %s clause at %L", + gfc_error ("Cray pointee object %qs in %s clause at %L", sym->name, name, &loc); if (sym->attr.allocatable || (sym->ts.type == BT_CLASS && CLASS_DATA (sym) && CLASS_DATA (sym)->attr.allocatable)) - gfc_error ("ALLOCATABLE object '%s' in %s clause at %L", + gfc_error ("ALLOCATABLE object %qs in %s clause at %L", sym->name, name, &loc); if (sym->attr.value) - gfc_error ("VALUE object '%s' in %s clause at %L", + gfc_error ("VALUE object %qs in %s clause at %L", sym->name, name, &loc); check_array_not_assumed (sym, loc, name); } @@ -3367,18 +3367,18 @@ resolve_omp_clauses (gfc_code *code, locus *where, if (n->sym->attr.allocatable || (n->sym->ts.type == BT_CLASS && CLASS_DATA (n->sym) && CLASS_DATA (n->sym)->attr.allocatable)) - gfc_error ("ALLOCATABLE object '%s' in %s clause at %L", + gfc_error ("ALLOCATABLE object %qs in %s clause at %L", n->sym->name, name, where); if (n->sym->attr.pointer || (n->sym->ts.type == BT_CLASS && CLASS_DATA (n->sym) && CLASS_DATA (n->sym)->attr.class_pointer)) - gfc_error ("POINTER object '%s' in %s clause at %L", + gfc_error ("POINTER object %qs in %s clause at %L", n->sym->name, name, where); if (n->sym->attr.cray_pointer) - gfc_error ("Cray pointer object '%s' in %s clause at %L", + gfc_error ("Cray pointer object %qs in %s clause at %L", n->sym->name, name, where); if (n->sym->attr.cray_pointee) - gfc_error ("Cray pointee object '%s' in %s clause at %L", + gfc_error ("Cray pointee object %qs in %s clause at %L", n->sym->name, name, where); /* FALLTHRU */ case OMP_LIST_DEVICE_RESIDENT: @@ -4624,7 +4624,7 @@ gfc_resolve_oacc_declare (gfc_namespace *ns) { n->sym->mark = 0; if (n->sym->attr.flavor == FL_PARAMETER) - gfc_error ("PARAMETER object '%s' is not allowed at %L", n->sym->name, &loc); + gfc_error ("PARAMETER object %qs is not allowed at %L", n->sym->name, &loc); } for (list = OMP_LIST_DEVICE_RESIDENT; @@ -4632,7 +4632,7 @@ gfc_resolve_oacc_declare (gfc_namespace *ns) for (n = ns->oacc_declare_clauses->lists[list]; n; n = n->next) { if (n->sym->mark) - gfc_error ("Symbol '%s' present on multiple clauses at %L", + gfc_error ("Symbol %qs present on multiple clauses at %L", n->sym->name, &loc); else n->sym->mark = 1;