This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR32634 -- reverted patch, gfortran.dg/interface_16.f90 failure
- From: Paul Thomas <paulthomas2 at wanadoo dot fr>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>, Daniel Franke <franke dot daniel at gmail dot com>, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 12 Jul 2007 22:13:23 +0200
- Subject: Re: PR32634 -- reverted patch, gfortran.dg/interface_16.f90 failure
- References: <339c37f20707120450y7ae2d641ucb173423d7486857@mail.gmail.com> <339c37f20707121207s2dcc404djc4910f840ebb43b9@mail.gmail.com> <469680D2.4030600@net-b.de>
Tobias,
gcc/fortran/module.c: In function 'read_module':
gcc/fortran/module.c:3465: error: 'sym' may be used uninitialized in
this function
We have:
gfc_symbol *sym; [...]
while (peek_atom () != ATOM_RPAREN)
{ [...]
sym = find_true_name (info->u.rsym.true_name, info->u.rsym.module);
} [...]
while (peek_atom () != ATOM_RPAREN)
{ [...]
mio_symbol_interface (&sym->name, &sym->module, &sym->generic);
I don't quickly see whether gcc is overly strict or right.
Tobias
I don't see quite what you have done. The updated write_generic is
static void
write_generic (gfc_symbol *sym)
{
const char *p;
int nuse, j;
if (sym->generic == NULL
|| !gfc_check_access (sym->attr.access, sym->ns->default_access))
return;
if (sym->module == NULL)
sym->module = gfc_get_string (module_name);
/* See how many use names there are. If none, use the symbol name. */
nuse = number_use_names (sym->name);
if (nuse == 0)
{
mio_symbol_interface (&sym->name, &sym->module, &sym->generic);
return;
}
for (j = 1; j <= nuse; j++)
{
/* Get the jth local name for this symbol. */
p = find_use_name_n (sym->name, &j);
mio_symbol_interface (&p, &sym->module, &sym->generic);
}
}
As you can see, you cannot have applied the patch to the write place.
The whitespace is due to cutting and pasting from Windows, just to get
the message out of the door.
I have bootstrapped and regtested on x86_ia64/FC5 ... and I committed it
because I simply will not have any other opportunity for a while.
Enjoy.
Paul