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
This commit is contained in:
Kai Tietz 2010-06-10 08:06:08 +00:00 committed by Kai Tietz
parent e4f32cb0a5
commit acaed831f6
4 changed files with 30 additions and 19 deletions

View File

@ -1,3 +1,10 @@
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>
* gfc-internals.texi: Move to GFDL 1.3.

View File

@ -64,7 +64,7 @@ gfc_copy_array_ref (gfc_array_ref *src)
static match
match_subscript (gfc_array_ref *ar, int init, bool match_star)
{
match m;
match m = MATCH_ERROR;
bool star = false;
int i;

View File

@ -471,7 +471,7 @@ error_print (const char *type, const char *format0, va_list argp)
locus *l1, *l2, *loc;
const char *format;
l1 = l2 = NULL;
loc = l1 = l2 = NULL;
have_l1 = 0;
pos = -1;

View File

@ -845,11 +845,13 @@ resolve_omp_clauses (gfc_code *code)
for (list = 0; list < OMP_LIST_NUM; list++)
if (list != OMP_LIST_FIRSTPRIVATE && list != OMP_LIST_LASTPRIVATE)
for (n = omp_clauses->lists[list]; n; n = n->next)
if (n->sym->mark)
gfc_error ("Symbol '%s' present on multiple clauses at %L",
n->sym->name, &code->loc);
else
n->sym->mark = 1;
{
if (n->sym->mark)
gfc_error ("Symbol '%s' present on multiple clauses at %L",
n->sym->name, &code->loc);
else
n->sym->mark = 1;
}
gcc_assert (OMP_LIST_LASTPRIVATE == OMP_LIST_FIRSTPRIVATE + 1);
for (list = OMP_LIST_FIRSTPRIVATE; list <= OMP_LIST_LASTPRIVATE; list++)
@ -862,22 +864,24 @@ resolve_omp_clauses (gfc_code *code)
}
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",
n->sym->name, &code->loc);
else
n->sym->mark = 1;
{
if (n->sym->mark)
gfc_error ("Symbol '%s' present on multiple clauses at %L",
n->sym->name, &code->loc);
else
n->sym->mark = 1;
}
for (n = omp_clauses->lists[OMP_LIST_LASTPRIVATE]; n; n = n->next)
n->sym->mark = 0;
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",
n->sym->name, &code->loc);
else
n->sym->mark = 1;
{
if (n->sym->mark)
gfc_error ("Symbol '%s' present on multiple clauses at %L",
n->sym->name, &code->loc);
else
n->sym->mark = 1;
}
for (list = 0; list < OMP_LIST_NUM; list++)
if ((n = omp_clauses->lists[list]) != NULL)
{