Commit acaed831 by Kai Tietz Committed by Kai Tietz

error.c (error_print): Pre-initialize loc by NULL.

2010-06-10  Kai Tietz  <kai.tietz@onevision.com>

	* error.c (error_print): Pre-initialize loc by NULL.
	* openmp.c (resolve_omp_clauses): Add explicit
	braces to avoid ambigous else.
	* array.c (match_subscript): Pre-initialize m to MATCH_ERROR.

From-SVN: r160525
parent e4f32cb0
2010-06-10 Kai Tietz <kai.tietz@onevision.com>
* error.c (error_print): Pre-initialize loc by NULL.
* openmp.c (resolve_omp_clauses): Add explicit
braces to avoid ambigous else.
* array.c (match_subscript): Pre-initialize m to MATCH_ERROR.
2010-06-10 Gerald Pfeifer <gerald@pfeifer.com> 2010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
* gfc-internals.texi: Move to GFDL 1.3. * gfc-internals.texi: Move to GFDL 1.3.
......
...@@ -64,7 +64,7 @@ gfc_copy_array_ref (gfc_array_ref *src) ...@@ -64,7 +64,7 @@ gfc_copy_array_ref (gfc_array_ref *src)
static match static match
match_subscript (gfc_array_ref *ar, int init, bool match_star) match_subscript (gfc_array_ref *ar, int init, bool match_star)
{ {
match m; match m = MATCH_ERROR;
bool star = false; bool star = false;
int i; int i;
......
...@@ -471,7 +471,7 @@ error_print (const char *type, const char *format0, va_list argp) ...@@ -471,7 +471,7 @@ error_print (const char *type, const char *format0, va_list argp)
locus *l1, *l2, *loc; locus *l1, *l2, *loc;
const char *format; const char *format;
l1 = l2 = NULL; loc = l1 = l2 = NULL;
have_l1 = 0; have_l1 = 0;
pos = -1; pos = -1;
......
...@@ -845,11 +845,13 @@ resolve_omp_clauses (gfc_code *code) ...@@ -845,11 +845,13 @@ resolve_omp_clauses (gfc_code *code)
for (list = 0; list < OMP_LIST_NUM; list++) for (list = 0; list < OMP_LIST_NUM; list++)
if (list != OMP_LIST_FIRSTPRIVATE && list != OMP_LIST_LASTPRIVATE) if (list != OMP_LIST_FIRSTPRIVATE && list != OMP_LIST_LASTPRIVATE)
for (n = omp_clauses->lists[list]; n; n = n->next) for (n = omp_clauses->lists[list]; n; n = n->next)
if (n->sym->mark) {
gfc_error ("Symbol '%s' present on multiple clauses at %L", if (n->sym->mark)
n->sym->name, &code->loc); gfc_error ("Symbol '%s' present on multiple clauses at %L",
else n->sym->name, &code->loc);
n->sym->mark = 1; else
n->sym->mark = 1;
}
gcc_assert (OMP_LIST_LASTPRIVATE == OMP_LIST_FIRSTPRIVATE + 1); gcc_assert (OMP_LIST_LASTPRIVATE == OMP_LIST_FIRSTPRIVATE + 1);
for (list = OMP_LIST_FIRSTPRIVATE; list <= OMP_LIST_LASTPRIVATE; list++) for (list = OMP_LIST_FIRSTPRIVATE; list <= OMP_LIST_LASTPRIVATE; list++)
...@@ -862,22 +864,24 @@ resolve_omp_clauses (gfc_code *code) ...@@ -862,22 +864,24 @@ resolve_omp_clauses (gfc_code *code)
} }
for (n = omp_clauses->lists[OMP_LIST_FIRSTPRIVATE]; n; n = n->next) for (n = omp_clauses->lists[OMP_LIST_FIRSTPRIVATE]; n; n = n->next)
if (n->sym->mark) {
gfc_error ("Symbol '%s' present on multiple clauses at %L", if (n->sym->mark)
n->sym->name, &code->loc); gfc_error ("Symbol '%s' present on multiple clauses at %L",
else n->sym->name, &code->loc);
n->sym->mark = 1; else
n->sym->mark = 1;
}
for (n = omp_clauses->lists[OMP_LIST_LASTPRIVATE]; n; n = n->next) for (n = omp_clauses->lists[OMP_LIST_LASTPRIVATE]; n; n = n->next)
n->sym->mark = 0; n->sym->mark = 0;
for (n = omp_clauses->lists[OMP_LIST_LASTPRIVATE]; n; n = n->next) for (n = omp_clauses->lists[OMP_LIST_LASTPRIVATE]; n; n = n->next)
if (n->sym->mark) {
gfc_error ("Symbol '%s' present on multiple clauses at %L", if (n->sym->mark)
n->sym->name, &code->loc); gfc_error ("Symbol '%s' present on multiple clauses at %L",
else n->sym->name, &code->loc);
n->sym->mark = 1; else
n->sym->mark = 1;
}
for (list = 0; list < OMP_LIST_NUM; list++) for (list = 0; list < OMP_LIST_NUM; list++)
if ((n = omp_clauses->lists[list]) != NULL) if ((n = omp_clauses->lists[list]) != NULL)
{ {
......
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