This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: more accurate omp in fortran


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]