This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: more accurate omp in fortran
- From: Cesar Philippidis <cesar at codesourcery dot com>
- To: Dominique d'HumiÃres <dominiq at lps dot ens dot fr>
- Cc: jakub Jelinek <jakub at redhat dot com>, gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 31 Oct 2015 11:01:10 -0700
- Subject: Re: more accurate omp in fortran
- Authentication-results: sourceware.org; auth=none
- References: <0A6A6FA1-6322-4151-B739-4FA79EAD07BE at lps dot ens dot fr>
On 10/30/2015 09:29 PM, Dominique d'Humières wrote:
>> diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c
>
> Revision r229609 breaks bootstrap:
>
> ../../work/gcc/fortran/openmp.c: In function 'void resolve_omp_clauses(gfc_code*, gfc_omp_clauses*, gfc_namespace*, bool)':
> ../../work/gcc/fortran/openmp.c:2925:27: error: format '%L' expects argument of type 'locus*', but argument 3 has type 'locus' [-Werror=format=]
> n->sym->name, n->where);
> ^
> cc1plus: all warnings being treated as errors
Sorry about that. I as I explained in PR68168, I wasn't using
--enable-bootstrap when I tested this patch because I thought it was
implied by default. I was able to reproduce this problem and fix it with
the attached patch after I explicitly configured and built gcc with
--enable-bootstrap.
I've applied this patch to trunk, since it should have been included
with the original patch in the first place.
Cesar
2015-10-31 Cesar Philippidis <cesar@codesourcery.com>
PR Bootstrap/68168
gcc/fortran/
* openmp.c (resolve_omp_clauses): Pass &n->where when calling
gfc_error.
diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c
index 3fd19b8..e59139c 100644
--- a/gcc/fortran/openmp.c
+++ b/gcc/fortran/openmp.c
@@ -2922,7 +2922,7 @@ resolve_omp_clauses (gfc_code *code, gfc_omp_clauses *omp_clauses,
{
if (!code && (!n->sym->attr.dummy || n->sym->ns != ns))
gfc_error ("Variable %qs is not a dummy argument at %L",
- n->sym->name, n->where);
+ n->sym->name, &n->where);
continue;
}
if (n->sym->attr.flavor == FL_PROCEDURE