Commit 9f584046 by Tobias Burnus Committed by Tobias Burnus

openmp.c (check_symbol_not_pointer, [...]): Replace '%s' by %qs.

2015-01-15  Tobias Burnus  <burnus@net-b.de>

        * 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.

From-SVN: r219694
parent 179ed8f5
2015-01-15 Tobias Burnus <burnus@net-b.de>
* 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.
2015-01-15 Thomas Schwinge <thomas@codesourcery.com> 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com> Cesar Philippidis <cesar@codesourcery.com>
James Norris <jnorris@codesourcery.com> James Norris <jnorris@codesourcery.com>
......
...@@ -1457,7 +1457,7 @@ gfc_match_oacc_routine (void) ...@@ -1457,7 +1457,7 @@ gfc_match_oacc_routine (void)
if (!sym->attr.external && !sym->attr.function && !sym->attr.subroutine) if (!sym->attr.external && !sym->attr.function && !sym->attr.subroutine)
{ {
gfc_error ("Syntax error in !$ACC ROUTINE ( NAME ) at %C, invalid" 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; gfc_current_locus = old_loc;
return MATCH_ERROR; return MATCH_ERROR;
} }
...@@ -2649,29 +2649,29 @@ static void ...@@ -2649,29 +2649,29 @@ static void
check_symbol_not_pointer (gfc_symbol *sym, locus loc, const char *name) check_symbol_not_pointer (gfc_symbol *sym, locus loc, const char *name)
{ {
if (sym->ts.type == BT_DERIVED && sym->attr.pointer) 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); sym->name, name, &loc);
if (sym->ts.type == BT_DERIVED && sym->attr.cray_pointer) 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); sym->name, name, &loc);
if (sym->ts.type == BT_DERIVED && sym->attr.cray_pointee) 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); sym->name, name, &loc);
if ((sym->ts.type == BT_ASSUMED && sym->attr.pointer) if ((sym->ts.type == BT_ASSUMED && sym->attr.pointer)
|| (sym->ts.type == BT_CLASS && CLASS_DATA (sym) || (sym->ts.type == BT_CLASS && CLASS_DATA (sym)
&& CLASS_DATA (sym)->attr.pointer)) && 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); sym->name, name, &loc);
if ((sym->ts.type == BT_ASSUMED && sym->attr.cray_pointer) if ((sym->ts.type == BT_ASSUMED && sym->attr.cray_pointer)
|| (sym->ts.type == BT_CLASS && CLASS_DATA (sym) || (sym->ts.type == BT_CLASS && CLASS_DATA (sym)
&& CLASS_DATA (sym)->attr.cray_pointer)) && 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); sym->name, name, &loc);
if ((sym->ts.type == BT_ASSUMED && sym->attr.cray_pointee) if ((sym->ts.type == BT_ASSUMED && sym->attr.cray_pointee)
|| (sym->ts.type == BT_CLASS && CLASS_DATA (sym) || (sym->ts.type == BT_CLASS && CLASS_DATA (sym)
&& CLASS_DATA (sym)->attr.cray_pointee)) && 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); sym->name, name, &loc);
} }
...@@ -2681,14 +2681,14 @@ static void ...@@ -2681,14 +2681,14 @@ static void
check_array_not_assumed (gfc_symbol *sym, locus loc, const char *name) check_array_not_assumed (gfc_symbol *sym, locus loc, const char *name)
{ {
if (sym->as && sym->as->type == AS_ASSUMED_SIZE) 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); sym->name, name, &loc);
if (sym->as && sym->as->type == AS_ASSUMED_RANK) 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); sym->name, name, &loc);
if (sym->as && sym->as->type == AS_DEFERRED && sym->attr.pointer if (sym->as && sym->as->type == AS_DEFERRED && sym->attr.pointer
&& !sym->attr.contiguous) && !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); sym->name, name, &loc);
} }
...@@ -2696,12 +2696,12 @@ static void ...@@ -2696,12 +2696,12 @@ static void
resolve_oacc_data_clauses (gfc_symbol *sym, locus loc, const char *name) resolve_oacc_data_clauses (gfc_symbol *sym, locus loc, const char *name)
{ {
if (sym->ts.type == BT_DERIVED && sym->attr.allocatable) 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); sym->name, name, &loc);
if ((sym->ts.type == BT_ASSUMED && sym->attr.allocatable) if ((sym->ts.type == BT_ASSUMED && sym->attr.allocatable)
|| (sym->ts.type == BT_CLASS && CLASS_DATA (sym) || (sym->ts.type == BT_CLASS && CLASS_DATA (sym)
&& CLASS_DATA (sym)->attr.allocatable)) && 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); "in %s clause at %L", sym->name, name, &loc);
check_symbol_not_pointer (sym, loc, name); check_symbol_not_pointer (sym, loc, name);
check_array_not_assumed (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) ...@@ -2713,25 +2713,25 @@ resolve_oacc_deviceptr_clause (gfc_symbol *sym, locus loc, const char *name)
if (sym->attr.pointer if (sym->attr.pointer
|| (sym->ts.type == BT_CLASS && CLASS_DATA (sym) || (sym->ts.type == BT_CLASS && CLASS_DATA (sym)
&& CLASS_DATA (sym)->attr.class_pointer)) && 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); sym->name, name, &loc);
if (sym->attr.cray_pointer if (sym->attr.cray_pointer
|| (sym->ts.type == BT_CLASS && CLASS_DATA (sym) || (sym->ts.type == BT_CLASS && CLASS_DATA (sym)
&& CLASS_DATA (sym)->attr.cray_pointer)) && 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); sym->name, name, &loc);
if (sym->attr.cray_pointee if (sym->attr.cray_pointee
|| (sym->ts.type == BT_CLASS && CLASS_DATA (sym) || (sym->ts.type == BT_CLASS && CLASS_DATA (sym)
&& CLASS_DATA (sym)->attr.cray_pointee)) && 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); sym->name, name, &loc);
if (sym->attr.allocatable if (sym->attr.allocatable
|| (sym->ts.type == BT_CLASS && CLASS_DATA (sym) || (sym->ts.type == BT_CLASS && CLASS_DATA (sym)
&& CLASS_DATA (sym)->attr.allocatable)) && 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); sym->name, name, &loc);
if (sym->attr.value) 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); sym->name, name, &loc);
check_array_not_assumed (sym, loc, name); check_array_not_assumed (sym, loc, name);
} }
...@@ -3367,18 +3367,18 @@ resolve_omp_clauses (gfc_code *code, locus *where, ...@@ -3367,18 +3367,18 @@ resolve_omp_clauses (gfc_code *code, locus *where,
if (n->sym->attr.allocatable if (n->sym->attr.allocatable
|| (n->sym->ts.type == BT_CLASS && CLASS_DATA (n->sym) || (n->sym->ts.type == BT_CLASS && CLASS_DATA (n->sym)
&& CLASS_DATA (n->sym)->attr.allocatable)) && 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); n->sym->name, name, where);
if (n->sym->attr.pointer if (n->sym->attr.pointer
|| (n->sym->ts.type == BT_CLASS && CLASS_DATA (n->sym) || (n->sym->ts.type == BT_CLASS && CLASS_DATA (n->sym)
&& CLASS_DATA (n->sym)->attr.class_pointer)) && 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); n->sym->name, name, where);
if (n->sym->attr.cray_pointer) 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); n->sym->name, name, where);
if (n->sym->attr.cray_pointee) 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); n->sym->name, name, where);
/* FALLTHRU */ /* FALLTHRU */
case OMP_LIST_DEVICE_RESIDENT: case OMP_LIST_DEVICE_RESIDENT:
...@@ -4624,7 +4624,7 @@ gfc_resolve_oacc_declare (gfc_namespace *ns) ...@@ -4624,7 +4624,7 @@ gfc_resolve_oacc_declare (gfc_namespace *ns)
{ {
n->sym->mark = 0; n->sym->mark = 0;
if (n->sym->attr.flavor == FL_PARAMETER) 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; for (list = OMP_LIST_DEVICE_RESIDENT;
...@@ -4632,7 +4632,7 @@ gfc_resolve_oacc_declare (gfc_namespace *ns) ...@@ -4632,7 +4632,7 @@ gfc_resolve_oacc_declare (gfc_namespace *ns)
for (n = ns->oacc_declare_clauses->lists[list]; n; n = n->next) for (n = ns->oacc_declare_clauses->lists[list]; n; n = n->next)
{ {
if (n->sym->mark) 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); n->sym->name, &loc);
else else
n->sym->mark = 1; n->sym->mark = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment