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:
parent
e4f32cb0a5
commit
acaed831f6
4 changed files with 30 additions and 19 deletions
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue